Merge "Replace broadcast with adding a method in BugreportCallback"
diff --git a/Android.bp b/Android.bp
index dcb6ac7..26e7165 100644
--- a/Android.bp
+++ b/Android.bp
@@ -348,6 +348,7 @@
         // etc.
         ":framework-javastream-protos",
         ":statslog-framework-java-gen", // FrameworkStatsLog.java
+        ":audio_policy_configuration_V7_0",
     ],
 }
 
@@ -671,6 +672,7 @@
 
     srcs: [
         ":ipconnectivity-proto-src",
+        ":libstats_atom_enum_protos",
         "core/proto/**/*.proto",
         "libs/incident/**/*.proto",
     ],
@@ -697,6 +699,7 @@
 
     srcs: [
         ":ipconnectivity-proto-src",
+        ":libstats_atom_enum_protos",
         "core/proto/**/*.proto",
         "libs/incident/**/*.proto",
     ],
@@ -812,13 +815,19 @@
     name: "platformprotos",
     srcs: [
         ":ipconnectivity-proto-src",
+        ":libstats_atom_enum_protos",
+        ":libstats_internal_protos",
+        ":statsd_internal_protos",
         "cmds/am/proto/instrumentation_data.proto",
         "cmds/statsd/src/**/*.proto",
         "core/proto/**/*.proto",
         "libs/incident/proto/**/*.proto",
     ],
     proto: {
-        include_dirs: ["external/protobuf/src"],
+        include_dirs: [
+            "external/protobuf/src",
+            "frameworks/proto_logging/stats",
+        ],
         type: "full",
     },
     errorprone: {
@@ -841,6 +850,7 @@
     sdk_version: "9",
     srcs: [
         ":ipconnectivity-proto-src",
+        ":libstats_atom_enum_protos",
         "core/proto/**/*.proto",
         "libs/incident/proto/android/os/**/*.proto",
     ],
@@ -856,6 +866,7 @@
 
     srcs: [
         ":ipconnectivity-proto-src",
+        ":libstats_atom_enum_protos",
         "core/proto/**/*.proto",
         "libs/incident/proto/android/os/**/*.proto",
     ],
@@ -876,7 +887,9 @@
 
     proto: {
         export_proto_headers: true,
-        include_dirs: ["external/protobuf/src"],
+        include_dirs: [
+            "external/protobuf/src",
+        ],
     },
 
     cflags: [
@@ -887,6 +900,7 @@
 
     srcs: [
         ":ipconnectivity-proto-src",
+        ":libstats_atom_enum_protos",
         "core/proto/**/*.proto",
     ],
 }
@@ -1255,6 +1269,7 @@
 metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
     "--ignore-classes-on-classpath " +
     "--hide-package com.android.server " +
+    "--hide-package android.audio.policy.configuration.V7_0 " +
     "--error UnhiddenSystemApi " +
     "--hide RequiresPermission " +
     "--hide CallbackInterface " +
diff --git a/ApiDocs.bp b/ApiDocs.bp
index d630209..ba93a48 100644
--- a/ApiDocs.bp
+++ b/ApiDocs.bp
@@ -67,7 +67,7 @@
         ":opt-net-voip-srcs",
         ":art.module.public.api{.public.stubs.source}",
         ":conscrypt.module.public.api{.public.stubs.source}",
-        ":android_icu4j_public_api_files",
+        ":i18n.module.public.api{.public.stubs.source}",
         "test-mock/src/**/*.java",
         "test-runner/src/**/*.java",
     ],
diff --git a/BATTERY_STATS_OWNERS b/BATTERY_STATS_OWNERS
new file mode 100644
index 0000000..7728975
--- /dev/null
+++ b/BATTERY_STATS_OWNERS
@@ -0,0 +1,4 @@
+# OWNERS of BatteryStats related files
+bookatz@google.com
+dplotnikov@google.com
+mwachens@google.com
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..4160122
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,31 @@
+# This top-level list should remain narrowly defined as team leads; individual
+# teams are strongly encouraged to define narrower OWNERS files at deeper
+# levels within the source tree; see OWNERS.md for more details
+akulian@google.com
+dsandler@android.com
+dsandler@google.com
+hackbod@android.com
+hackbod@google.com
+jjaggi@google.com
+jsharkey@android.com
+jsharkey@google.com
+michaelwr@google.com
+nandana@google.com
+narayan@google.com
+ogunwale@google.com
+roosa@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
+yamasani@google.com
+
+# API changes are already covered by API-Review+1 (http://mdb/android-api-council)
+# via https://android.git.corp.google.com/All-Projects/+/refs/meta/config/rules.pl.
+per-file */api/*current.txt = *
+
+# Support bulk translation updates
+per-file */res*/values*/*.xml = byi@google.com, delphij@google.com
+
+per-file Android.bp = file:platform/build/soong:/OWNERS
+per-file Android.mk = file:platform/build/soong:/OWNERS
+per-file ApiDocs.bp = file:platform/build/soong:/OWNERS
+per-file StubLibraries.bp = file:platform/build/soong:/OWNERS
diff --git a/OWNERS.md b/OWNERS.md
new file mode 100644
index 0000000..601b5c64
--- /dev/null
+++ b/OWNERS.md
@@ -0,0 +1,68 @@
+# Background
+
+As general background, `OWNERS` files expedite code reviews by helping code
+authors quickly find relevant reviewers, and they also ensure that stakeholders
+are involved in code changes in their areas.
+
+The structure of `frameworks/base/` is unique among Android repositories, and
+it's evolved into a complex interleaved structure over the years.  Because of
+this structure, the best place to authoritatively define `OWNERS` can vary
+wildly, but here are some common patterns:
+
+* `core/java/` contains source that is included in the base classpath, and as
+such it's where most APIs are defined:
+  * `core/java/android/app/`
+  * `core/java/android/content/`
+* `services/core/` contains most system services, and these directories
+typically have more granularity than `core/java/`, since they can be refactored
+without API changes:
+  * `services/core/java/com/android/server/net/`
+  * `services/core/java/com/android/server/wm/`
+* `services/` contains several system services that have been isolated from the
+main `services/core/` project:
+  * `services/appwidget/`
+  * `services/midi/`
+* `apex/` contains Mainline modules:
+  * `apex/jobscheduler/`
+  * `apex/permission/`
+* Finally, some teams may have dedicated top-level directories:
+  * `media/`
+  * `wifi/`
+
+# Design
+
+Area maintainers are strongly encouraged to list people in a single
+authoritative `OWNERS` file in **exactly one** location.  Then, other paths
+should reference that single authoritative `OWNERS` file using an include
+directive.  This approach ensures that updates are applied consistently across
+the tree, reducing maintenance burden.
+
+# Examples
+
+The exact syntax of `OWNERS` files can be difficult to get correct, so here are
+some common examples:
+
+```
+# Complete include of top-level owners from this repo
+include /ZYGOTE_OWNERS
+# Partial include of top-level owners from this repo
+per-file ZygoteFile.java = file:/ZYGOTE_OWNERS
+```
+```
+# Complete include of subdirectory owners from this repo
+include /services/core/java/com/android/server/net/OWNERS
+# Partial include of subdirectory owners from this repo
+per-file NetworkFile.java = file:/services/core/java/com/android/server/net/OWNERS
+```
+```
+# Complete include of top-level owners from another repo
+include platform/libcore:/OWNERS
+# Partial include of top-level owners from another repo
+per-file LibcoreFile.java = file:platform/libcore:/OWNERS
+```
+```
+# Complete include of subdirectory owners from another repo
+include platform/frameworks/av:/camera/OWNERS
+# Partial include of subdirectory owners from another repo
+per-file CameraFile.java = file:platform/frameworks/av:/camera/OWNERS
+```
diff --git a/StubLibraries.bp b/StubLibraries.bp
index 90bac37..6cabc57 100644
--- a/StubLibraries.bp
+++ b/StubLibraries.bp
@@ -48,7 +48,6 @@
         ":opt-telephony-srcs",
         ":opt-net-voip-srcs",
         ":art.module.public.api{.public.stubs.source}",
-        ":android_icu4j_public_api_files",
         "**/package.html",
     ],
     sdk_version: "core_platform",
@@ -68,6 +67,7 @@
         "android.hardware.cas-V1.2-java",
         "android.hardware.health-V1.0-java-constants",
         "android.hardware.radio-V1.5-java",
+        "android.hardware.radio-V1.6-java",
         "android.hardware.thermal-V1.0-java-constants",
         "android.hardware.thermal-V2.0-java",
         "android.hardware.tv.input-V1.0-java-constants",
@@ -245,6 +245,7 @@
         "framework-statsd.stubs",
         "framework-tethering.stubs",
         "framework-wifi.stubs",
+        "i18n.module.public.api.stubs",
         "private-stub-annotations-jar",
     ],
     defaults: ["android_defaults_stubs_current"],
@@ -262,6 +263,7 @@
         "framework-statsd.stubs.system",
         "framework-tethering.stubs.system",
         "framework-wifi.stubs.system",
+        "i18n.module.public.api.stubs",
         "private-stub-annotations-jar",
     ],
     defaults: [
@@ -295,6 +297,7 @@
         "framework-statsd.stubs.system",
         "framework-tethering.stubs.system",
         "framework-wifi.stubs.system",
+        "i18n.module.public.api.stubs",
         "private-stub-annotations-jar",
     ],
     defaults: [
diff --git a/ZYGOTE_OWNERS b/ZYGOTE_OWNERS
new file mode 100644
index 0000000..90a185b
--- /dev/null
+++ b/ZYGOTE_OWNERS
@@ -0,0 +1,5 @@
+calin@google.com
+chriswailes@google.com
+maco@google.com
+narayan@google.com
+ngeoffray@google.com
diff --git a/apct-tests/perftests/OWNERS b/apct-tests/perftests/OWNERS
new file mode 100644
index 0000000..a060ad9
--- /dev/null
+++ b/apct-tests/perftests/OWNERS
@@ -0,0 +1,2 @@
+timmurray@google.com
+philipcuadra@google.com
diff --git a/apct-tests/perftests/autofill/OWNERS b/apct-tests/perftests/autofill/OWNERS
new file mode 100644
index 0000000..c52751d
--- /dev/null
+++ b/apct-tests/perftests/autofill/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/autofill/OWNERS
diff --git a/apct-tests/perftests/blobstore/OWNERS b/apct-tests/perftests/blobstore/OWNERS
new file mode 100644
index 0000000..65bb6b8
--- /dev/null
+++ b/apct-tests/perftests/blobstore/OWNERS
@@ -0,0 +1 @@
+include /apex/blobstore/OWNERS
diff --git a/apct-tests/perftests/contentcapture/OWNERS b/apct-tests/perftests/contentcapture/OWNERS
new file mode 100644
index 0000000..a28e00a
--- /dev/null
+++ b/apct-tests/perftests/contentcapture/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/contentcapture/OWNERS
diff --git a/apct-tests/perftests/core/apps/overlay/OWNERS b/apct-tests/perftests/core/apps/overlay/OWNERS
new file mode 100644
index 0000000..afb98d4
--- /dev/null
+++ b/apct-tests/perftests/core/apps/overlay/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/content/om/OWNERS
diff --git a/apct-tests/perftests/core/src/android/accounts/OWNERS b/apct-tests/perftests/core/src/android/accounts/OWNERS
new file mode 100644
index 0000000..df1b4f4
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/accounts/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/accounts/OWNERS
diff --git a/apct-tests/perftests/core/src/android/database/OWNERS b/apct-tests/perftests/core/src/android/database/OWNERS
new file mode 100644
index 0000000..bb9a2ca
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/database/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/database/OWNERS
diff --git a/apct-tests/perftests/inputmethod/OWNERS b/apct-tests/perftests/inputmethod/OWNERS
new file mode 100644
index 0000000..5deb2ce
--- /dev/null
+++ b/apct-tests/perftests/inputmethod/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/inputmethod/OWNERS
diff --git a/apct-tests/perftests/packagemanager/OWNERS b/apct-tests/perftests/packagemanager/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/apct-tests/perftests/packagemanager/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/apct-tests/perftests/textclassifier/OWNERS b/apct-tests/perftests/textclassifier/OWNERS
new file mode 100644
index 0000000..46b3cb8
--- /dev/null
+++ b/apct-tests/perftests/textclassifier/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/textclassifier/OWNERS
diff --git a/apct-tests/perftests/windowmanager/OWNERS b/apct-tests/perftests/windowmanager/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/apct-tests/perftests/windowmanager/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/apex/appsearch/OWNERS b/apex/appsearch/OWNERS
new file mode 100644
index 0000000..ce0c212
--- /dev/null
+++ b/apex/appsearch/OWNERS
@@ -0,0 +1 @@
+sudheersai@google.com
diff --git a/apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java b/apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java
index bb9f13f..5cebf8d 100644
--- a/apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java
+++ b/apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java
@@ -128,7 +128,7 @@
          */
         public static final String KEY_USE_REVOCABLE_FD_FOR_READS =
                 "use_revocable_fd_for_reads";
-        public static final boolean DEFAULT_USE_REVOCABLE_FD_FOR_READS = true;
+        public static final boolean DEFAULT_USE_REVOCABLE_FD_FOR_READS = false;
         public static boolean USE_REVOCABLE_FD_FOR_READS =
                 DEFAULT_USE_REVOCABLE_FD_FOR_READS;
 
diff --git a/apex/jobscheduler/framework/java/android/app/job/JobInfo.java b/apex/jobscheduler/framework/java/android/app/job/JobInfo.java
index c2d530d..24b8055 100644
--- a/apex/jobscheduler/framework/java/android/app/job/JobInfo.java
+++ b/apex/jobscheduler/framework/java/android/app/job/JobInfo.java
@@ -462,11 +462,11 @@
     public @NetworkType int getNetworkType() {
         if (networkRequest == null) {
             return NETWORK_TYPE_NONE;
-        } else if (networkRequest.networkCapabilities.hasCapability(NET_CAPABILITY_NOT_METERED)) {
+        } else if (networkRequest.hasCapability(NET_CAPABILITY_NOT_METERED)) {
             return NETWORK_TYPE_UNMETERED;
-        } else if (networkRequest.networkCapabilities.hasCapability(NET_CAPABILITY_NOT_ROAMING)) {
+        } else if (networkRequest.hasCapability(NET_CAPABILITY_NOT_ROAMING)) {
             return NETWORK_TYPE_NOT_ROAMING;
-        } else if (networkRequest.networkCapabilities.hasTransport(TRANSPORT_CELLULAR)) {
+        } else if (networkRequest.hasTransport(TRANSPORT_CELLULAR)) {
             return NETWORK_TYPE_CELLULAR;
         } else {
             return NETWORK_TYPE_ANY;
@@ -1513,7 +1513,7 @@
             }
             // We can't serialize network specifiers
             if (mIsPersisted && mNetworkRequest != null
-                    && mNetworkRequest.networkCapabilities.getNetworkSpecifier() != null) {
+                    && mNetworkRequest.getNetworkSpecifier() != null) {
                 throw new IllegalArgumentException(
                         "Network specifiers aren't supported for persistent jobs");
             }
diff --git a/apex/jobscheduler/framework/java/android/app/job/OWNERS b/apex/jobscheduler/framework/java/android/app/job/OWNERS
new file mode 100644
index 0000000..b4a45f5
--- /dev/null
+++ b/apex/jobscheduler/framework/java/android/app/job/OWNERS
@@ -0,0 +1,7 @@
+# Bug component: 330738
+
+yamasani@google.com
+omakoto@google.com
+ctate@android.com
+ctate@google.com
+kwekua@google.com
diff --git a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
index 0cadbfd..36ccaf9 100644
--- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
+++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
@@ -455,9 +455,6 @@
 
             mSystemServicesReady = true;
 
-            // Offload to handler thread to avoid boot time impact.
-            mHandler.post(AppStandbyController.this::updatePowerWhitelistCache);
-
             boolean userFileExists;
             synchronized (mAppIdleLock) {
                 userFileExists = mAppIdleHistory.userFileExists(UserHandle.USER_SYSTEM);
@@ -474,7 +471,9 @@
             setChargingState(mInjector.isCharging());
 
             // Offload to handler thread after boot completed to avoid boot time impact. This means
-            // that headless system apps may be put in a lower bucket until boot has completed.
+            // that app standby buckets may be slightly out of date and headless system apps may be
+            // put in a lower bucket until boot has completed.
+            mHandler.post(AppStandbyController.this::updatePowerWhitelistCache);
             mHandler.post(this::loadHeadlessSystemAppCache);
         }
     }
@@ -1121,6 +1120,10 @@
             if (isDeviceProvisioningPackage(packageName)) {
                 return STANDBY_BUCKET_EXEMPTED;
             }
+
+            if (mInjector.isWellbeingPackage(packageName)) {
+                return STANDBY_BUCKET_WORKING_SET;
+            }
         }
 
         // Check this last, as it can be the most expensive check
@@ -1930,6 +1933,7 @@
          */
         @GuardedBy("mPowerWhitelistedApps")
         private final ArraySet<String> mPowerWhitelistedApps = new ArraySet<>();
+        private String mWellbeingApp = null;
 
         Injector(Context context, Looper looper) {
             mContext = context;
@@ -1963,6 +1967,9 @@
                 if (activityManager.isLowRamDevice() || ActivityManager.isSmallBatteryDevice()) {
                     mAutoRestrictedBucketDelayMs = 12 * ONE_HOUR;
                 }
+
+                final PackageManager packageManager = mContext.getPackageManager();
+                mWellbeingApp = packageManager.getWellbeingPackageName();
             }
             mBootPhase = phase;
         }
@@ -2007,6 +2014,14 @@
             }
         }
 
+        /**
+         * Returns {@code true} if the supplied package is the wellbeing app. Otherwise,
+         * returns {@code false}.
+         */
+        boolean isWellbeingPackage(String packageName) {
+            return mWellbeingApp != null && mWellbeingApp.equals(packageName);
+        }
+
         void updatePowerWhitelistCache() {
             try {
                 // Don't call out to DeviceIdleController with the lock held.
diff --git a/apex/permission/apex_manifest.json b/apex/permission/apex_manifest.json
index ab57930..7960598 100644
--- a/apex/permission/apex_manifest.json
+++ b/apex/permission/apex_manifest.json
@@ -1,4 +1,4 @@
 {
   "name": "com.android.permission",
-  "version": 300900700
+  "version": 300000000
 }
diff --git a/apex/statsd/.clang-format b/apex/statsd/.clang-format
deleted file mode 100644
index cead3a0..0000000
--- a/apex/statsd/.clang-format
+++ /dev/null
@@ -1,17 +0,0 @@
-BasedOnStyle: Google
-AllowShortIfStatementsOnASingleLine: true
-AllowShortFunctionsOnASingleLine: false
-AllowShortLoopsOnASingleLine: true
-BinPackArguments: true
-BinPackParameters: true
-ColumnLimit: 100
-CommentPragmas: NOLINT:.*
-ContinuationIndentWidth: 8
-DerivePointerAlignment: false
-IndentWidth: 4
-PointerAlignment: Left
-TabWidth: 4
-AccessModifierOffset: -4
-IncludeCategories:
-  - Regex:    '^"Log\.h"'
-    Priority:    -1
diff --git a/apex/statsd/Android.bp b/apex/statsd/Android.bp
deleted file mode 100644
index f13861e..0000000
--- a/apex/statsd/Android.bp
+++ /dev/null
@@ -1,83 +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.
-
-apex {
-    name: "com.android.os.statsd",
-    defaults: ["com.android.os.statsd-defaults"],
-    manifest: "apex_manifest.json",
-}
-
-apex_defaults {
-    jni_libs: [
-        "libstats_jni",
-    ],
-    native_shared_libs: [
-        "libstatspull",
-        "libstatssocket",
-    ],
-    binaries: ["statsd"],
-    java_libs: [
-        "framework-statsd",
-        "service-statsd",
-    ],
-    compile_multilib: "both",
-    prebuilts: ["com.android.os.statsd.init.rc"],
-    name: "com.android.os.statsd-defaults",
-    updatable: true,
-    min_sdk_version: "30",
-    key: "com.android.os.statsd.key",
-    certificate: ":com.android.os.statsd.certificate",
-}
-
-apex_key {
-    name: "com.android.os.statsd.key",
-    public_key: "com.android.os.statsd.avbpubkey",
-    private_key: "com.android.os.statsd.pem",
-}
-
-android_app_certificate {
-    name: "com.android.os.statsd.certificate",
-    // This will use com.android.os.statsd.x509.pem (the cert) and
-    // com.android.os.statsd.pk8 (the private key)
-    certificate: "com.android.os.statsd",
-}
-
-prebuilt_etc {
-    name: "com.android.os.statsd.init.rc",
-    src: "statsd.rc",
-    filename: "init.rc",
-    installable: false,
-}
-
-// JNI library for StatsLog.write
-cc_library_shared {
-    name: "libstats_jni",
-    srcs: ["jni/**/*.cpp"],
-    header_libs: ["libnativehelper_header_only"],
-    shared_libs: [
-        "liblog",  // Has a stable abi - should not be copied into apex.
-        "libstatssocket",
-    ],
-    stl: "libc++_static",
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wextra",
-        "-Wno-unused-parameter",
-    ],
-    apex_available: [
-        "com.android.os.statsd",
-        "test_com.android.os.statsd",
-    ],
-}
diff --git a/apex/statsd/OWNERS b/apex/statsd/OWNERS
deleted file mode 100644
index bed9600..0000000
--- a/apex/statsd/OWNERS
+++ /dev/null
@@ -1,9 +0,0 @@
-jeffreyhuang@google.com
-joeo@google.com
-jtnguyen@google.com
-muhammadq@google.com
-ruchirr@google.com
-singhtejinder@google.com
-tsaichristine@google.com
-yaochen@google.com
-yro@google.com
\ No newline at end of file
diff --git a/apex/statsd/TEST_MAPPING b/apex/statsd/TEST_MAPPING
deleted file mode 100644
index 93f1087..0000000
--- a/apex/statsd/TEST_MAPPING
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "presubmit" : [
-    {
-      "name" : "FrameworkStatsdTest"
-    },
-    {
-      "name" : "LibStatsPullTests"
-    }
-  ]
-}
diff --git a/apex/statsd/aidl/Android.bp b/apex/statsd/aidl/Android.bp
deleted file mode 100644
index 04339e6..0000000
--- a/apex/statsd/aidl/Android.bp
+++ /dev/null
@@ -1,51 +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.
-//
-filegroup {
-    name: "framework-statsd-aidl-sources",
-    srcs: ["**/*.aidl"],
-}
-
-aidl_interface {
-    name: "statsd-aidl",
-    unstable: true,
-    srcs: [
-        "android/os/IPendingIntentRef.aidl",
-        "android/os/IPullAtomCallback.aidl",
-        "android/os/IPullAtomResultReceiver.aidl",
-        "android/os/IStatsCompanionService.aidl",
-        "android/os/IStatsd.aidl",
-        "android/os/StatsDimensionsValueParcel.aidl",
-        "android/util/StatsEventParcel.aidl",
-    ],
-    backend: {
-        java: {
-            enabled: false, // framework-statsd and service-statsd use framework-statsd-aidl-sources
-        },
-        cpp: {
-            enabled: false,
-        },
-        ndk: {
-            enabled: true,
-            apex_available: [
-                // TODO(b/145923087): Remove this once statsd binary is in apex
-                "//apex_available:platform",
-
-                "com.android.os.statsd",
-                "test_com.android.os.statsd",
-            ],
-        },
-    }
-}
diff --git a/apex/statsd/aidl/android/os/IPendingIntentRef.aidl b/apex/statsd/aidl/android/os/IPendingIntentRef.aidl
deleted file mode 100644
index 000a699..0000000
--- a/apex/statsd/aidl/android/os/IPendingIntentRef.aidl
+++ /dev/null
@@ -1,46 +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 android.os;
-
-import android.os.StatsDimensionsValueParcel;
-
-/**
-  * Binder interface to hold a PendingIntent for StatsCompanionService.
-  * {@hide}
-  */
-interface IPendingIntentRef {
-
-    /**
-     * Sends a broadcast to the specified PendingIntent that it should getData now.
-     * This should be only called from StatsCompanionService.
-     */
-     oneway void sendDataBroadcast(long lastReportTimeNs);
-
-    /**
-     * Send a broadcast to the specified PendingIntent notifying it that the list of active configs
-     * has changed. This should be only called from StatsCompanionService.
-     */
-     oneway void sendActiveConfigsChangedBroadcast(in long[] configIds);
-
-     /**
-      * Send a broadcast to the specified PendingIntent, along with the other information
-      * specified. This should only be called from StatsCompanionService.
-      */
-     oneway void sendSubscriberBroadcast(long configUid, long configId, long subscriptionId,
-                                         long subscriptionRuleId, in String[] cookies,
-                                         in StatsDimensionsValueParcel dimensionsValueParcel);
-}
diff --git a/apex/statsd/aidl/android/os/IPullAtomCallback.aidl b/apex/statsd/aidl/android/os/IPullAtomCallback.aidl
deleted file mode 100644
index ff0b97b..0000000
--- a/apex/statsd/aidl/android/os/IPullAtomCallback.aidl
+++ /dev/null
@@ -1,31 +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 android.os;
-
-import android.os.IPullAtomResultReceiver;
-
-/**
-  * Binder interface to pull atoms for the stats service.
-  * {@hide}
-  */
-interface IPullAtomCallback {
-    /**
-     * Initiate a request for a pull for an atom.
-     */
-     oneway void onPullAtom(int atomTag, IPullAtomResultReceiver resultReceiver);
-
-}
diff --git a/apex/statsd/aidl/android/os/IPullAtomResultReceiver.aidl b/apex/statsd/aidl/android/os/IPullAtomResultReceiver.aidl
deleted file mode 100644
index 00d026e..0000000
--- a/apex/statsd/aidl/android/os/IPullAtomResultReceiver.aidl
+++ /dev/null
@@ -1,32 +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 android.os;
-
-import android.util.StatsEventParcel;
-
-/**
-  * Binder interface to pull atoms for the stats service.
-  * {@hide}
-  */
-interface IPullAtomResultReceiver {
-
-    /**
-     * Indicate that a pull request for an atom is complete.
-     */
-     oneway void pullFinished(int atomTag, boolean success, in StatsEventParcel[] output);
-
-}
diff --git a/apex/statsd/aidl/android/os/IStatsCompanionService.aidl b/apex/statsd/aidl/android/os/IStatsCompanionService.aidl
deleted file mode 100644
index d56a4bd..0000000
--- a/apex/statsd/aidl/android/os/IStatsCompanionService.aidl
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.os;
-
-/**
-  * Binder interface to communicate with the Java-based statistics service helper.
-  * {@hide}
-  */
-interface IStatsCompanionService {
-    /**
-     * Tell statscompanion that stastd is up and running.
-     */
-    oneway void statsdReady();
-
-    /**
-      * Register a repeating alarm for pulling to fire at the given timestamp and every
-      * intervalMs thereafter (in ms since epoch).
-      * If polling alarm had already been registered, it will be replaced by new one.
-      * Uses AlarmManager.setRepeating API, so if the timestamp is in past, alarm fires immediately,
-      * and alarm is inexact.
-      */
-    oneway void setPullingAlarm(long nextPullTimeMs);
-
-    /** Cancel any repeating pulling alarm. */
-    oneway void cancelPullingAlarm();
-
-    /**
-      * Register an alarm when we want to trigger subscribers at the given
-      * timestamp (in ms since epoch).
-      * If an alarm had already been registered, it will be replaced by new one.
-      */
-    oneway void setAlarmForSubscriberTriggering(long timestampMs);
-
-    /** Cancel any alarm for the purpose of subscriber triggering. */
-    oneway void cancelAlarmForSubscriberTriggering();
-
-    /**
-     * Ask StatsCompanionService if the given permission is allowed for a particular process
-     * and user ID. statsd is incapable of doing this check itself because checkCallingPermission
-     * is not currently supported by libbinder_ndk.
-     */
-    boolean checkPermission(String permission, int pid, int uid);
-}
diff --git a/apex/statsd/aidl/android/os/IStatsManagerService.aidl b/apex/statsd/aidl/android/os/IStatsManagerService.aidl
deleted file mode 100644
index b59a97e..0000000
--- a/apex/statsd/aidl/android/os/IStatsManagerService.aidl
+++ /dev/null
@@ -1,136 +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 android.os;
-
-import android.app.PendingIntent;
-import android.os.IPullAtomCallback;
-
-/**
-  * Binder interface to communicate with the Java-based statistics service helper.
-  * Contains parcelable objects available only in Java.
-  * {@hide}
-  */
-interface IStatsManagerService {
-
-    /**
-     * Registers the given pending intent for this config key. This intent is invoked when the
-     * memory consumed by the metrics for this configuration approach the pre-defined limits. There
-     * can be at most one listener per config key.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    void setDataFetchOperation(long configId, in PendingIntent pendingIntent,
-        in String packageName);
-
-    /**
-     * Removes the data fetch operation for the specified configuration.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    void removeDataFetchOperation(long configId, in String packageName);
-
-    /**
-     * Registers the given pending intent for this packagename. This intent is invoked when the
-     * active status of any of the configs sent by this package changes and will contain a list of
-     * config ids that are currently active. It also returns the list of configs that are currently
-     * active. There can be at most one active configs changed listener per package.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    long[] setActiveConfigsChangedOperation(in PendingIntent pendingIntent, in String packageName);
-
-    /**
-     * Removes the active configs changed operation for the specified package name.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    void removeActiveConfigsChangedOperation(in String packageName);
-
-    /**
-     * Set the PendingIntent to be used when broadcasting subscriber
-     * information to the given subscriberId within the given config.
-     *
-     * Suppose that the calling uid has added a config with key configKey, and that in this config
-     * it is specified that when a particular anomaly is detected, a broadcast should be sent to
-     * a BroadcastSubscriber with id subscriberId. This function links the given pendingIntent with
-     * that subscriberId (for that config), so that this pendingIntent is used to send the broadcast
-     * when the anomaly is detected.
-     *
-     * This function can only be called by the owner (uid) of the config. It must be called each
-     * time statsd starts. Later calls overwrite previous calls; only one PendingIntent is stored.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    void setBroadcastSubscriber(long configKey, long subscriberId, in PendingIntent pendingIntent,
-                                in String packageName);
-
-    /**
-     * Undoes setBroadcastSubscriber() for the (configKey, subscriberId) pair.
-     * Any broadcasts associated with subscriberId will henceforth not be sent.
-     * No-op if this (configKey, subscriberId) pair was not associated with an PendingIntent.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    void unsetBroadcastSubscriber(long configKey, long subscriberId, in String packageName);
-
-    /**
-     * Returns the most recently registered experiment IDs.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    long[] getRegisteredExperimentIds();
-
-    /**
-     * Fetches metadata across statsd. Returns byte array representing wire-encoded proto.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    byte[] getMetadata(in String packageName);
-
-    /**
-     * Fetches data for the specified configuration key. Returns a byte array representing proto
-     * wire-encoded of ConfigMetricsReportList.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    byte[] getData(in long key, in String packageName);
-
-    /**
-     * Sets a configuration with the specified config id and subscribes to updates for this
-     * configuration id. Broadcasts will be sent if this configuration needs to be collected.
-     * The configuration must be a wire-encoded StatsdConfig. The receiver for this data is
-     * registered in a separate function.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    void addConfiguration(in long configId, in byte[] config, in String packageName);
-
-    /**
-     * Removes the configuration with the matching config id. No-op if this config id does not
-     * exist.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    void removeConfiguration(in long configId, in String packageName);
-
-    /** Tell StatsManagerService to register a puller for the given atom tag with statsd. */
-    oneway void registerPullAtomCallback(int atomTag, long coolDownMillis, long timeoutMillis,
-            in int[] additiveFields, IPullAtomCallback pullerCallback);
-
-    /** Tell StatsManagerService to unregister the pulller for the given atom tag from statsd. */
-    oneway void unregisterPullAtomCallback(int atomTag);
-}
diff --git a/apex/statsd/aidl/android/os/IStatsd.aidl b/apex/statsd/aidl/android/os/IStatsd.aidl
deleted file mode 100644
index 066412a..0000000
--- a/apex/statsd/aidl/android/os/IStatsd.aidl
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.os;
-
-import android.os.IPendingIntentRef;
-import android.os.IPullAtomCallback;
-import android.os.ParcelFileDescriptor;
-
-/**
-  * Binder interface to communicate with the statistics management service.
-  * {@hide}
-  */
-interface IStatsd {
-    /**
-     * Tell the stats daemon that the android system server is up and running.
-     */
-    oneway void systemRunning();
-
-    /**
-     * Tell the stats daemon that the android system has finished booting.
-     */
-    oneway void bootCompleted();
-
-    /**
-     * Tell the stats daemon that the StatsCompanionService is up and running.
-     * Two-way binder call so that caller knows message received.
-     */
-    void statsCompanionReady();
-
-    /**
-     * Tells statsd that it is time to poll some stats. Statsd will be responsible for determing
-     * what stats to poll and initiating the polling.
-     * Two-way binder call so that caller's method (and corresponding wakelocks) will linger.
-     */
-    void informPollAlarmFired();
-
-    /**
-     * Tells statsd that it is time to handle periodic alarms. Statsd will be responsible for
-     * determing what alarm subscriber to trigger.
-     * Two-way binder call so that caller's method (and corresponding wakelocks) will linger.
-     */
-    void informAlarmForSubscriberTriggeringFired();
-
-    /**
-     * Tells statsd that the device is about to shutdown.
-     */
-    void informDeviceShutdown();
-
-    /**
-     * Inform statsd about a file descriptor for a pipe through which we will pipe version
-     * and package information for each uid.
-     * Versions and package information are supplied via UidData proto where info for each app
-     * is captured in its own element of a repeated ApplicationInfo message.
-     */
-    oneway void informAllUidData(in ParcelFileDescriptor fd);
-
-    /**
-     * Inform statsd what the uid, version, version_string, and installer are for one app that was
-     * updated.
-     */
-    oneway void informOnePackage(in String app, in int uid, in long version,
-        in String version_string, in String installer);
-
-    /**
-     * Inform stats that an app was removed.
-     */
-    oneway void informOnePackageRemoved(in String app, in int uid);
-
-    /**
-     * Fetches data for the specified configuration key. Returns a byte array representing proto
-     * wire-encoded of ConfigMetricsReportList.
-     *
-     * Requires Manifest.permission.DUMP.
-     */
-    byte[] getData(in long key, int callingUid);
-
-    /**
-     * Fetches metadata across statsd. Returns byte array representing wire-encoded proto.
-     *
-     * Requires Manifest.permission.DUMP.
-     */
-    byte[] getMetadata();
-
-    /**
-     * Sets a configuration with the specified config id and subscribes to updates for this
-     * configuration key. Broadcasts will be sent if this configuration needs to be collected.
-     * The configuration must be a wire-encoded StatsdConfig. The receiver for this data is
-     * registered in a separate function.
-     *
-     * Requires Manifest.permission.DUMP.
-     */
-    void addConfiguration(in long configId, in byte[] config, in int callingUid);
-
-    /**
-     * Registers the given pending intent for this config key. This intent is invoked when the
-     * memory consumed by the metrics for this configuration approach the pre-defined limits. There
-     * can be at most one listener per config key.
-     *
-     * Requires Manifest.permission.DUMP.
-     */
-    void setDataFetchOperation(long configId, in IPendingIntentRef pendingIntentRef,
-                               int callingUid);
-
-    /**
-     * Removes the data fetch operation for the specified configuration.
-     *
-     * Requires Manifest.permission.DUMP.
-     */
-    void removeDataFetchOperation(long configId, int callingUid);
-
-    /**
-     * Registers the given pending intent for this packagename. This intent is invoked when the
-     * active status of any of the configs sent by this package changes and will contain a list of
-     * config ids that are currently active. It also returns the list of configs that are currently
-     * active. There can be at most one active configs changed listener per package.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    long[] setActiveConfigsChangedOperation(in IPendingIntentRef pendingIntentRef, int callingUid);
-
-    /**
-     * Removes the active configs changed operation for the specified package name.
-     *
-     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS.
-     */
-    void removeActiveConfigsChangedOperation(int callingUid);
-
-    /**
-     * Removes the configuration with the matching config id. No-op if this config id does not
-     * exist.
-     *
-     * Requires Manifest.permission.DUMP.
-     */
-    void removeConfiguration(in long configId, in int callingUid);
-
-    /**
-     * Set the PendingIntentRef to be used when broadcasting subscriber
-     * information to the given subscriberId within the given config.
-     *
-     * Suppose that the calling uid has added a config with key configId, and that in this config
-     * it is specified that when a particular anomaly is detected, a broadcast should be sent to
-     * a BroadcastSubscriber with id subscriberId. This function links the given pendingIntent with
-     * that subscriberId (for that config), so that this pendingIntent is used to send the broadcast
-     * when the anomaly is detected.
-     *
-     * This function can only be called by the owner (uid) of the config. It must be called each
-     * time statsd starts. Later calls overwrite previous calls; only one pendingIntent is stored.
-     *
-     * Requires Manifest.permission.DUMP.
-     */
-    void setBroadcastSubscriber(long configId, long subscriberId, in IPendingIntentRef pir,
-                                int callingUid);
-
-    /**
-     * Undoes setBroadcastSubscriber() for the (configId, subscriberId) pair.
-     * Any broadcasts associated with subscriberId will henceforth not be sent.
-     * No-op if this (configKey, subscriberId) pair was not associated with an PendingIntentRef.
-     *
-     * Requires Manifest.permission.DUMP.
-     */
-    void unsetBroadcastSubscriber(long configId, long subscriberId, int callingUid);
-
-    /**
-     * Tell the stats daemon that all the pullers registered during boot have been sent.
-     */
-    oneway void allPullersFromBootRegistered();
-
-    /**
-     * Registers a puller callback function that, when invoked, pulls the data
-     * for the specified atom tag.
-     */
-    oneway void registerPullAtomCallback(int uid, int atomTag, long coolDownMillis,
-                                         long timeoutMillis,in int[] additiveFields,
-                                         IPullAtomCallback pullerCallback);
-
-    /**
-     * Registers a puller callback function that, when invoked, pulls the data
-     * for the specified atom tag.
-     *
-     * Enforces the REGISTER_STATS_PULL_ATOM permission.
-     */
-    oneway void registerNativePullAtomCallback(int atomTag, long coolDownMillis, long timeoutMillis,
-                           in int[] additiveFields, IPullAtomCallback pullerCallback);
-
-    /**
-     * Unregisters any pullAtomCallback for the given uid/atom.
-     */
-    oneway void unregisterPullAtomCallback(int uid, int atomTag);
-
-    /**
-     * Unregisters any pullAtomCallback for the given atom + caller.
-     *
-     * Enforces the REGISTER_STATS_PULL_ATOM permission.
-     */
-    oneway void unregisterNativePullAtomCallback(int atomTag);
-
-    /**
-     * The install requires staging.
-     */
-    const int FLAG_REQUIRE_STAGING = 0x01;
-
-    /**
-     * Rollback is enabled with this install.
-     */
-    const int FLAG_ROLLBACK_ENABLED = 0x02;
-
-    /**
-     * Requires low latency monitoring.
-     */
-    const int FLAG_REQUIRE_LOW_LATENCY_MONITOR = 0x04;
-
-    /**
-     * Returns the most recently registered experiment IDs.
-     */
-    long[] getRegisteredExperimentIds();
-}
diff --git a/apex/statsd/aidl/android/os/StatsDimensionsValueParcel.aidl b/apex/statsd/aidl/android/os/StatsDimensionsValueParcel.aidl
deleted file mode 100644
index 05f78d0..0000000
--- a/apex/statsd/aidl/android/os/StatsDimensionsValueParcel.aidl
+++ /dev/null
@@ -1,21 +0,0 @@
-package android.os;
-
-/**
- * @hide
- */
-parcelable StatsDimensionsValueParcel {
-    // Field equals atomTag for top level StatsDimensionsValueParcels or
-    // positions in depth (1-indexed) for lower level parcels.
-    int field;
-
-    // Indicator for which type of value is stored. Should be set to one
-    // of the constants in StatsDimensionsValue.java.
-    int valueType;
-
-    String stringValue;
-    int intValue;
-    long longValue;
-    boolean boolValue;
-    float floatValue;
-    StatsDimensionsValueParcel[] tupleValue;
-}
diff --git a/apex/statsd/aidl/android/util/StatsEventParcel.aidl b/apex/statsd/aidl/android/util/StatsEventParcel.aidl
deleted file mode 100644
index add8bfb..0000000
--- a/apex/statsd/aidl/android/util/StatsEventParcel.aidl
+++ /dev/null
@@ -1,8 +0,0 @@
-package android.util;
-
-/**
- * @hide
- */
-parcelable StatsEventParcel {
-    byte[] buffer;
-}
diff --git a/apex/statsd/apex_manifest.json b/apex/statsd/apex_manifest.json
deleted file mode 100644
index 7bf1493..0000000
--- a/apex/statsd/apex_manifest.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "name": "com.android.os.statsd",
-  "version": 300900700
-}
-
diff --git a/apex/statsd/com.android.os.statsd.avbpubkey b/apex/statsd/com.android.os.statsd.avbpubkey
deleted file mode 100644
index d78af8b..0000000
--- a/apex/statsd/com.android.os.statsd.avbpubkey
+++ /dev/null
Binary files differ
diff --git a/apex/statsd/com.android.os.statsd.pem b/apex/statsd/com.android.os.statsd.pem
deleted file mode 100644
index 558e17f..0000000
--- a/apex/statsd/com.android.os.statsd.pem
+++ /dev/null
@@ -1,51 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIJKgIBAAKCAgEA893bbpkivKEiNgfknYBSlzC0csaKU/ddBm5Pb4ZFuab+LQSR
-9DDc5JrsmxyrsrvuwL/zAtMbkyYWzEiUxJtx/w0bw8rC90GoPRSCmxyI0ZK8FuPy
-IAQ7UeNfTWZ485mAUaTSasGIfQ3DY4F0P+aUSijeG3NUY02nALHDMqJX7lXR+mL1
-DUYDg05KB0jxQwlYqBeujTPPiAzEqm3PlBoHuan8/qgK2wdQMTVg/fieUD3lupmV
-Wj2dRZgqfBPA16ZbV4Uo0j0bZSf+fQLiXlU2VJGb5i/FQfjLqMKGABDI0MgK7Sc2
-m4ySpV4g4XKDv/vw6Dw4kwWC7mATEVAkH+q6V7uiZeN6a7w30UMtPI8fPaUvAP3L
-VBjCBIv/3m+CKkWcNxOZ3sQBQl5bS05dxcfiVsBvBLYbvQgC+Wy0Sc3b+1pXFT/E
-uAsbZ4CyVsi1+PAdx3h5e2QAyNCXgZDOcvTUyxY6JLTE0LOVHmI4fJEujBex//Oz
-PCRHvC8K+KiljyQWf/NYrLSD3QGYAjVMtQh7yu2yhzWzgBUxyhuv3rY4ATXsN3bJ
-wW4w7/L/RSLSW5+lp/NoJOD9utbsKTyGMHOY6K8JLOmhv3ORoAEmLYlFTI+FqBi9
-AH1HQEKCyh8Z/bYHLUzGWl6FqAMtcnuintv40BbKyt0/D1ItdbSNKmOZ5rkCAwEA
-AQKCAgAY7ll8mRNADYkd1Pi+UVwgMM6B3WJO6z8LZUOhtyxxqmzZ1VnGiShMBrqh
-sPCsuSHTeswxQbvT81TpVZI/91RUKtbn0VbVSFUWyX4AtY4XPtUT0gHy2/vkh0Y6
-93ruDIdd0Wfhmh+GCV4sUhO8ZKpMWpk6XTQHYuzr2UCHcKlkqElrO6qpzLqXNe3D
-iOWBYPc7WBB0RxO0aPnCIq/SCEc55/MBZdSWR80e+sILtNsagPl3djQaoanub3wI
-a0yPv2YfMHHX7H9cfBY8WYsi8bs4MhqqEcAs2m6XtitU3mJpVcooLJYcmOZ1GYZr
-BfYKLouWcnGmNi4IiLHqVzMaQDkEhAZsRaAXCkoVVrFBedLlmLPpiUIQlINF4vxe
-3IcekTKWyMzkU6h+K8T15MU5mLSqeL2Gji1JIwKJno51FZ9uc++pUJVtfYQmNny8
-8RKvQ1hv/S5yLQKgN+VkNbaWlUoMP73dtUe3m/At71/2Dj7xB0KtcgT1lEMrM1GR
-oynJAJLz/d0n5RUUREwkZZMcA4fQVC7Db6vpK69jPiQMShpZ3JKCEjfYLUuN0slt
-FPhjiR175E0vTRuLoIj4kXNwLLswH0c9zqrKM2S92SCxAV3E4JJGKhUZalvT9s1g
-LrPhMCl6CsOES98T87d3RyAIK0iVRCnRUG3bc+8rzyRd4fzkAQKCAQEA/UjmCSm3
-H46t/1w7YBZPew7SFQOAJe81iDzbonc3fNPD2R8lxtD3MwdvrQ5f9fhT4+uveWNr
-dyBX7ppnissyM3LZRN+7BdeIVVeIPVen6Ou9W2i7q18ZoQx9IpRcZEw5tGJFZaGx
-EmyPN4i1K0ccUkGbBvbXXQ/tcG3wElRpBAc5/TQ8vrpUgHll2/MbYhowx6P9uHv5
-thoyG98X+7Fbg8ikzw5GtyuedXfyX1CpJ7yUQVS2PEaOMXOkZdx2bbWRAYYCpsqB
-dMmjs2PsFhZHu6CpLhlocHbfUiRztCUCaMZJPQXFSVmy8QDMvZEdVLvad9Poi8ny
-lmHVRgxaNbAtIQKCAQEA9nscqRaaO7hIX9bOUxcDbI0486Ws4H0hAFApIN+6/LP4
-hkxey3xWArTYWrvSG1d5GkJAdn99ayWzo2PevmJlrhIJiO1QqYBAk+87cnhwSCmB
-kb0sGkNWcc/xNRy7eqdhyCmVhaUnIbORee+cD6qiu/l2BAclTf2ZARFOGXjhQkvt
-cDbc/9ZR467ceXbiTIU34Be4xnNAY1mo59jvwl9eqxgpefYTqPhcZ7OmlDli77Hd
-XuRfuxLZCscv7A9M5Enc2zwOEP5VwRNwYzYtMm2Yh9CQZxNWC7JVh1Gw5MPFzsGl
-sgEdb4WGneN6PPLQHK7NF0f7wYSNnF0i3XSME9MumQKCAQEA0qMbWydr+TyJC0LC
-xigHtUkgAQXGPsXuePxTk4sdhBwAVcKHgg4qZi+a+gpoV4BLE9LfPU4nAwzM08to
-rI5Lk2nBsnt1Z2hVItQGoy0QoK3b7fbti5ktETf3oRhMtcSGgLLxD5ImVjId8Isq
-T3F15hpVOLdzZxtl1Qg4jKXSJ91yplYY5mzC9Yz/3qkQbsdlJcIFsLS5eG3UmkUw
-Bsr6VmA4X1F6Eb6eqwYzdHz6D+fOS36NhxcODaYkY+myO46xptixv8/NVTiTgQ5q
-OfwRb8Iur/3FUzIoioFyD7Bvjn7ITY1NArEsFS0bF9Nk1yDakKiUThyGN/Xojbac
-FuYKwQKCAQEAxOWJ+qU8phJLdowBHC0ZJiEWasRhep9auoZOpJ01IWOfV6EwZLs5
-dkYDQ1Agwoi5DDn6hu7HQM3IV/CS4mF2OnzcMw7ozc7PR53nTkVZ5LuLbuHAlmZO
-avKjDDucpJmLqjtV34IT5X8t6kt3zqgQAbuBBCy1Jz07ebfaPMzsnWpMDcU1/AW4
-OvrX0wweMOSGwzQP/i/ZMsRQAo2w0gQfeuv9Thk+kU99ebXwjx3co//hCEnFE4s1
-6L8/0AJU+VTr4hJyZi7WUDt4HzkLF+qm22/Hux+eMA/Q9R1UAxtFLCpTdAQiAJGY
-/Q3X+1I434DgAwYU3f1Gpq9cB65vq/KamQKCAQEAjIub5wde/ttHlLALvnOXrbqe
-nUIfWHExMzhul/rkr8fFEJwij2nZUuN2EWUGzBWQQoNXw5QKHLZyPsyFUOa/P2BS
-osnffAa+sumL4k36E71xFdTVV5ExyTXZVB49sPmUpivP9gEucFFqDHKjGsF45dBF
-+DZdykLUIv+/jQUzXGkZ5Wv/r52YUNho4EZdwnlJ2so7cxnsYnjW+c1nlp17tkq5
-DfwktkeD9iFzlaZ66vLoO44luaBm+lC3xM2sHinOTwbk0gvhJAIoLfkOYhpmGc8A
-4W/E1OHfVz6xqVDsMBFhRbQpHNkf8XZNqkIoqHVMTaMOJJlM+lb0+A9B8Bm/XA==
------END RSA PRIVATE KEY-----
diff --git a/apex/statsd/com.android.os.statsd.pk8 b/apex/statsd/com.android.os.statsd.pk8
deleted file mode 100644
index 49910f8..0000000
--- a/apex/statsd/com.android.os.statsd.pk8
+++ /dev/null
Binary files differ
diff --git a/apex/statsd/com.android.os.statsd.x509.pem b/apex/statsd/com.android.os.statsd.x509.pem
deleted file mode 100644
index e7b16b2..0000000
--- a/apex/statsd/com.android.os.statsd.x509.pem
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFDTCCAvWgAwIBAgIUCnta1LAl5fMMLLQx//4zWz9A2A8wDQYJKoZIhvcNAQEL
-BQAwFTETMBEGA1UECgwKR29vZ2xlIExMQzAgFw0xOTA4MTIyMjM5MzBaGA80NzU3
-MDcwODIyMzkzMFowFTETMBEGA1UECgwKR29vZ2xlIExMQzCCAiIwDQYJKoZIhvcN
-AQEBBQADggIPADCCAgoCggIBAOranWZ19jkXCF9WIlXv01tUUvLKMHWKV7X9Earw
-cL7/aax0pFbNJutgyBUiOszbR+0T7quZxz6jACu+6y7iaMJnvMluZsfTi+p2UvQt
-y6Ql7ZUOQ7bVluCFIW5hZ+8d9RrLmZdvX1r4YfF6HufDBkAbj+os+y6407OezJAV
-8EATpemc9gsCC4RJZpwzTs1RUXMD4UoNrLZAE8+7iaJZeBxmz0MAPj92pYc9M7/d
-xInzYvOR08/uEpHt8jlMdVgSQS/FaRlIOIqcGBk3cjkjDlpVATQ4Hyjy+IPQPjTD
-bJUmDJiYeBCyY/pYZQvTQjl8s+fvykTsF9Lfb+E+PhZ0+N8pRi7sUSpisZHSiqaN
-W3oxYWc0YQSuzygHHog8HH/azHX5L805g/+Rwfb/cUF9eJgjq0vrkFnsz4UKgKNV
-hHL90mfqpbc2UvJ8VY8BvIjbsHQ77LrBKlqI9VMPorttpTOuwHHJPKsyN972F0Ul
-lRB6CwFE8csVGWXoNaDZWBv7xTDdbdirmlKDNueg9pw6ksYV2Is9Dv8PxmsZvb+4
-oftC/hb4X1Pudn01PPs9Tx44CwHuVLENUwlDEVzG5zNetsv9kAuCYt3VRVF+NYqj
-NAfLbxCKLe25wGzJrZUEJ1YrYIjpUbfwnttEad/9Pu13DAS7HZwn5vwqEKB/1LlT
-NSUXAgMBAAGjUzBRMB0GA1UdDgQWBBSKElkhJSbzgh8+iysye8SrkmJ62DAfBgNV
-HSMEGDAWgBSKElkhJSbzgh8+iysye8SrkmJ62DAPBgNVHRMBAf8EBTADAQH/MA0G
-CSqGSIb3DQEBCwUAA4ICAQANFGnc2wJBrFbh2nzhl06g4TjPKGRCw365vZ1A3T9O
-jXP0lToHDxB33TpKk6d7zszR1uPphQQxgzhSVZB/jx8q4kWSSoKoF9Dlx7h8rAt+
-2TM5DaBvxrwu5mqOALwQuF81wap1Pl2L2fFHvygCm8b+Ci4iS5vcr0axNnp1rK1b
-vUtRWY4mfxTjJYcgeCVUGskqTb+cCxQZ6Icno6VTKajT1FybRmD3KZJaUuLbNEN+
-IE4nGTMG2WZ5Hl2vR8JJp1sYYn8T3ElMAb0MSNFkqsfI+tToEwGsuJDgYEdtEnzf
-lTycQvn5NhrIZRRN3pqSyWpAU7p9mmyTK0PHMz2D/Rtfb7lE692vXzxCmZND51mc
-YXCCoanV6eZZ7Sbqzh60+5QV38hgFBst5l8CcFaWWSFK9nBWdzS5lhs9lmQ4aiYd
-IE0qsNZgMob+TTP1VW39hu4EDjNmOrKfimM9J2tcPZ5QP01DgETPvAsB7vn2Xz9J
-HGt5ntiSV4W2izDP8viQ1M5NvfdBaUhcnNsE6/sxfU0USRs2hrEp1oiqrv4p6V0P
-qOt7C2/YtJzkrxfsHZAxBUSRHa7LwtzgeiJDUivHn94VnAzSAH8MLx6CzDPQ8HWN
-NiZFxTKfMVyjEmbQ2PalHWB8pWtpdEh7X4rzaqhnLBTis3pGssASgo3ArLIYleAU
-+g==
------END CERTIFICATE-----
diff --git a/apex/statsd/framework/Android.bp b/apex/statsd/framework/Android.bp
deleted file mode 100644
index bf4323d..0000000
--- a/apex/statsd/framework/Android.bp
+++ /dev/null
@@ -1,81 +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 {
-    default_visibility: [ ":__pkg__" ]
-}
-
-genrule {
-    name: "statslog-statsd-java-gen",
-    tools: ["stats-log-api-gen"],
-    cmd: "$(location stats-log-api-gen) --java $(out) --module statsd" +
-         " --javaPackage com.android.internal.statsd --javaClass StatsdStatsLog",
-    out: ["com/android/internal/statsd/StatsdStatsLog.java"],
-}
-
-java_library_static {
-    name: "statslog-statsd",
-    srcs: [
-        ":statslog-statsd-java-gen",
-    ],
-    visibility: [
-        "//cts/hostsidetests/statsd/apps:__subpackages__",
-        "//vendor:__subpackages__",
-    ],
-}
-
-filegroup {
-    name: "framework-statsd-sources",
-    srcs: [
-        "java/**/*.java",
-        ":framework-statsd-aidl-sources",
-        ":statslog-statsd-java-gen",
-    ],
-    visibility: [
-        "//frameworks/base", // For the "global" stubs.
-        "//frameworks/base/apex/statsd:__subpackages__",
-    ],
-}
-java_sdk_library {
-    name: "framework-statsd",
-    defaults: ["framework-module-defaults"],
-    installable: true,
-
-    srcs: [
-        ":framework-statsd-sources",
-    ],
-
-    permitted_packages: [
-        "android.app",
-        "android.os",
-        "android.util",
-        // From :statslog-statsd-java-gen
-        "com.android.internal.statsd",
-    ],
-
-    api_packages: [
-        "android.app",
-        "android.os",
-        "android.util",
-    ],
-
-    hostdex: true, // for hiddenapi check
-
-    impl_library_visibility: ["//frameworks/base/apex/statsd/framework/test:__subpackages__"],
-
-    apex_available: [
-        "com.android.os.statsd",
-        "test_com.android.os.statsd",
-    ],
-}
diff --git a/apex/statsd/framework/api/current.txt b/apex/statsd/framework/api/current.txt
deleted file mode 100644
index a655693..0000000
--- a/apex/statsd/framework/api/current.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-// Signature format: 2.0
-package android.util {
-
-  public final class StatsLog {
-    method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public static boolean logBinaryPushStateChanged(@NonNull String, long, int, int, @NonNull long[]);
-    method public static boolean logEvent(int);
-    method public static boolean logStart(int);
-    method public static boolean logStop(int);
-  }
-
-}
-
diff --git a/apex/statsd/framework/api/module-lib-current.txt b/apex/statsd/framework/api/module-lib-current.txt
deleted file mode 100644
index 8b6e217..0000000
--- a/apex/statsd/framework/api/module-lib-current.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-// Signature format: 2.0
-package android.os {
-
-  public class StatsFrameworkInitializer {
-    method public static void registerServiceWrappers();
-    method public static void setStatsServiceManager(@NonNull android.os.StatsServiceManager);
-  }
-
-}
-
diff --git a/apex/statsd/framework/api/module-lib-removed.txt b/apex/statsd/framework/api/module-lib-removed.txt
deleted file mode 100644
index d802177..0000000
--- a/apex/statsd/framework/api/module-lib-removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/apex/statsd/framework/api/removed.txt b/apex/statsd/framework/api/removed.txt
deleted file mode 100644
index d802177..0000000
--- a/apex/statsd/framework/api/removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/apex/statsd/framework/api/system-current.txt b/apex/statsd/framework/api/system-current.txt
deleted file mode 100644
index 3ea5724..0000000
--- a/apex/statsd/framework/api/system-current.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-// Signature format: 2.0
-package android.app {
-
-  public final class StatsManager {
-    method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void addConfig(long, byte[]) throws android.app.StatsManager.StatsUnavailableException;
-    method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean addConfiguration(long, byte[]);
-    method @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM) public void clearPullAtomCallback(int);
-    method @Deprecated @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getData(long);
-    method @Deprecated @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getMetadata();
-    method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public long[] getRegisteredExperimentIds() throws android.app.StatsManager.StatsUnavailableException;
-    method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getReports(long) throws android.app.StatsManager.StatsUnavailableException;
-    method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getStatsMetadata() throws android.app.StatsManager.StatsUnavailableException;
-    method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void removeConfig(long) throws android.app.StatsManager.StatsUnavailableException;
-    method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean removeConfiguration(long);
-    method @NonNull @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public long[] setActiveConfigsChangedOperation(@Nullable android.app.PendingIntent) throws android.app.StatsManager.StatsUnavailableException;
-    method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void setBroadcastSubscriber(android.app.PendingIntent, long, long) throws android.app.StatsManager.StatsUnavailableException;
-    method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setBroadcastSubscriber(long, long, android.app.PendingIntent);
-    method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setDataFetchOperation(long, android.app.PendingIntent);
-    method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void setFetchReportsOperation(android.app.PendingIntent, long) throws android.app.StatsManager.StatsUnavailableException;
-    method @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM) public void setPullAtomCallback(int, @Nullable android.app.StatsManager.PullAtomMetadata, @NonNull java.util.concurrent.Executor, @NonNull android.app.StatsManager.StatsPullAtomCallback);
-    field public static final String ACTION_STATSD_STARTED = "android.app.action.STATSD_STARTED";
-    field public static final String EXTRA_STATS_ACTIVE_CONFIG_KEYS = "android.app.extra.STATS_ACTIVE_CONFIG_KEYS";
-    field public static final String EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES = "android.app.extra.STATS_BROADCAST_SUBSCRIBER_COOKIES";
-    field public static final String EXTRA_STATS_CONFIG_KEY = "android.app.extra.STATS_CONFIG_KEY";
-    field public static final String EXTRA_STATS_CONFIG_UID = "android.app.extra.STATS_CONFIG_UID";
-    field public static final String EXTRA_STATS_DIMENSIONS_VALUE = "android.app.extra.STATS_DIMENSIONS_VALUE";
-    field public static final String EXTRA_STATS_SUBSCRIPTION_ID = "android.app.extra.STATS_SUBSCRIPTION_ID";
-    field public static final String EXTRA_STATS_SUBSCRIPTION_RULE_ID = "android.app.extra.STATS_SUBSCRIPTION_RULE_ID";
-    field public static final int PULL_SKIP = 1; // 0x1
-    field public static final int PULL_SUCCESS = 0; // 0x0
-  }
-
-  public static class StatsManager.PullAtomMetadata {
-    method @Nullable public int[] getAdditiveFields();
-    method public long getCoolDownMillis();
-    method public long getTimeoutMillis();
-  }
-
-  public static class StatsManager.PullAtomMetadata.Builder {
-    ctor public StatsManager.PullAtomMetadata.Builder();
-    method @NonNull public android.app.StatsManager.PullAtomMetadata build();
-    method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setAdditiveFields(@NonNull int[]);
-    method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setCoolDownMillis(long);
-    method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setTimeoutMillis(long);
-  }
-
-  public static interface StatsManager.StatsPullAtomCallback {
-    method public int onPullAtom(int, @NonNull java.util.List<android.util.StatsEvent>);
-  }
-
-  public static class StatsManager.StatsUnavailableException extends android.util.AndroidException {
-    ctor public StatsManager.StatsUnavailableException(String);
-    ctor public StatsManager.StatsUnavailableException(String, Throwable);
-  }
-
-}
-
-package android.os {
-
-  public final class StatsDimensionsValue implements android.os.Parcelable {
-    method public int describeContents();
-    method public boolean getBooleanValue();
-    method public int getField();
-    method public float getFloatValue();
-    method public int getIntValue();
-    method public long getLongValue();
-    method public String getStringValue();
-    method public java.util.List<android.os.StatsDimensionsValue> getTupleValueList();
-    method public int getValueType();
-    method public boolean isValueType(int);
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final int BOOLEAN_VALUE_TYPE = 5; // 0x5
-    field @NonNull public static final android.os.Parcelable.Creator<android.os.StatsDimensionsValue> CREATOR;
-    field public static final int FLOAT_VALUE_TYPE = 6; // 0x6
-    field public static final int INT_VALUE_TYPE = 3; // 0x3
-    field public static final int LONG_VALUE_TYPE = 4; // 0x4
-    field public static final int STRING_VALUE_TYPE = 2; // 0x2
-    field public static final int TUPLE_VALUE_TYPE = 7; // 0x7
-  }
-
-}
-
-package android.util {
-
-  public final class StatsEvent {
-    method @NonNull public static android.util.StatsEvent.Builder newBuilder();
-  }
-
-  public static final class StatsEvent.Builder {
-    method @NonNull public android.util.StatsEvent.Builder addBooleanAnnotation(byte, boolean);
-    method @NonNull public android.util.StatsEvent.Builder addIntAnnotation(byte, int);
-    method @NonNull public android.util.StatsEvent build();
-    method @NonNull public android.util.StatsEvent.Builder setAtomId(int);
-    method @NonNull public android.util.StatsEvent.Builder usePooledBuffer();
-    method @NonNull public android.util.StatsEvent.Builder writeAttributionChain(@NonNull int[], @NonNull String[]);
-    method @NonNull public android.util.StatsEvent.Builder writeBoolean(boolean);
-    method @NonNull public android.util.StatsEvent.Builder writeByteArray(@NonNull byte[]);
-    method @NonNull public android.util.StatsEvent.Builder writeFloat(float);
-    method @NonNull public android.util.StatsEvent.Builder writeInt(int);
-    method @NonNull public android.util.StatsEvent.Builder writeKeyValuePairs(@Nullable android.util.SparseIntArray, @Nullable android.util.SparseLongArray, @Nullable android.util.SparseArray<java.lang.String>, @Nullable android.util.SparseArray<java.lang.Float>);
-    method @NonNull public android.util.StatsEvent.Builder writeLong(long);
-    method @NonNull public android.util.StatsEvent.Builder writeString(@NonNull String);
-  }
-
-  public final class StatsLog {
-    method public static void write(@NonNull android.util.StatsEvent);
-    method public static void writeRaw(@NonNull byte[], int);
-  }
-
-}
-
diff --git a/apex/statsd/framework/api/system-removed.txt b/apex/statsd/framework/api/system-removed.txt
deleted file mode 100644
index d802177..0000000
--- a/apex/statsd/framework/api/system-removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/apex/statsd/framework/java/android/app/StatsManager.java b/apex/statsd/framework/java/android/app/StatsManager.java
deleted file mode 100644
index a7d2057..0000000
--- a/apex/statsd/framework/java/android/app/StatsManager.java
+++ /dev/null
@@ -1,725 +0,0 @@
-/*
- * Copyright 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.app;
-
-import static android.Manifest.permission.DUMP;
-import static android.Manifest.permission.PACKAGE_USAGE_STATS;
-
-import android.annotation.CallbackExecutor;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
-import android.annotation.SystemApi;
-import android.content.Context;
-import android.os.Binder;
-import android.os.IPullAtomCallback;
-import android.os.IPullAtomResultReceiver;
-import android.os.IStatsManagerService;
-import android.os.RemoteException;
-import android.os.StatsFrameworkInitializer;
-import android.util.AndroidException;
-import android.util.Log;
-import android.util.StatsEvent;
-import android.util.StatsEventParcel;
-
-import com.android.internal.annotations.GuardedBy;
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Executor;
-
-/**
- * API for statsd clients to send configurations and retrieve data.
- *
- * @hide
- */
-@SystemApi
-public final class StatsManager {
-    private static final String TAG = "StatsManager";
-    private static final boolean DEBUG = false;
-
-    private static final Object sLock = new Object();
-    private final Context mContext;
-
-    @GuardedBy("sLock")
-    private IStatsManagerService mStatsManagerService;
-
-    /**
-     * Long extra of uid that added the relevant stats config.
-     */
-    public static final String EXTRA_STATS_CONFIG_UID = "android.app.extra.STATS_CONFIG_UID";
-    /**
-     * Long extra of the relevant stats config's configKey.
-     */
-    public static final String EXTRA_STATS_CONFIG_KEY = "android.app.extra.STATS_CONFIG_KEY";
-    /**
-     * Long extra of the relevant statsd_config.proto's Subscription.id.
-     */
-    public static final String EXTRA_STATS_SUBSCRIPTION_ID =
-            "android.app.extra.STATS_SUBSCRIPTION_ID";
-    /**
-     * Long extra of the relevant statsd_config.proto's Subscription.rule_id.
-     */
-    public static final String EXTRA_STATS_SUBSCRIPTION_RULE_ID =
-            "android.app.extra.STATS_SUBSCRIPTION_RULE_ID";
-    /**
-     *   List<String> of the relevant statsd_config.proto's BroadcastSubscriberDetails.cookie.
-     *   Obtain using {@link android.content.Intent#getStringArrayListExtra(String)}.
-     */
-    public static final String EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES =
-            "android.app.extra.STATS_BROADCAST_SUBSCRIBER_COOKIES";
-    /**
-     * Extra of a {@link android.os.StatsDimensionsValue} representing sliced dimension value
-     * information.
-     */
-    public static final String EXTRA_STATS_DIMENSIONS_VALUE =
-            "android.app.extra.STATS_DIMENSIONS_VALUE";
-    /**
-     * Long array extra of the active configs for the uid that added those configs.
-     */
-    public static final String EXTRA_STATS_ACTIVE_CONFIG_KEYS =
-            "android.app.extra.STATS_ACTIVE_CONFIG_KEYS";
-
-    /**
-     * Broadcast Action: Statsd has started.
-     * Configurations and PendingIntents can now be sent to it.
-     */
-    public static final String ACTION_STATSD_STARTED = "android.app.action.STATSD_STARTED";
-
-    // Pull atom callback return codes.
-    /**
-     * Value indicating that this pull was successful and that the result should be used.
-     *
-     **/
-    public static final int PULL_SUCCESS = 0;
-
-    /**
-     * Value indicating that this pull was unsuccessful and that the result should not be used.
-     **/
-    public static final int PULL_SKIP = 1;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting public static final long DEFAULT_COOL_DOWN_MILLIS = 1_000L; // 1 second.
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting public static final long DEFAULT_TIMEOUT_MILLIS = 2_000L; // 2 seconds.
-
-    /**
-     * Constructor for StatsManagerClient.
-     *
-     * @hide
-     */
-    public StatsManager(Context context) {
-        mContext = context;
-    }
-
-    /**
-     * Adds the given configuration and associates it with the given configKey. If a config with the
-     * given configKey already exists for the caller's uid, it is replaced with the new one.
-     *
-     * @param configKey An arbitrary integer that allows clients to track the configuration.
-     * @param config    Wire-encoded StatsdConfig proto that specifies metrics (and all
-     *                  dependencies eg, conditions and matchers).
-     * @throws StatsUnavailableException if unsuccessful due to failing to connect to stats service
-     * @throws IllegalArgumentException if config is not a wire-encoded StatsdConfig proto
-     */
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public void addConfig(long configKey, byte[] config) throws StatsUnavailableException {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                // can throw IllegalArgumentException
-                service.addConfiguration(configKey, config, mContext.getOpPackageName());
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to connect to statsmanager when adding configuration");
-                throw new StatsUnavailableException("could not connect", e);
-            } catch (SecurityException e) {
-                throw new StatsUnavailableException(e.getMessage(), e);
-            } catch (IllegalStateException e) {
-                Log.e(TAG, "Failed to addConfig in statsmanager");
-                throw new StatsUnavailableException(e.getMessage(), e);
-            }
-        }
-    }
-
-    // TODO: Temporary for backwards compatibility. Remove.
-    /**
-     * @deprecated Use {@link #addConfig(long, byte[])}
-     */
-    @Deprecated
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public boolean addConfiguration(long configKey, byte[] config) {
-        try {
-            addConfig(configKey, config);
-            return true;
-        } catch (StatsUnavailableException | IllegalArgumentException e) {
-            return false;
-        }
-    }
-
-    /**
-     * Remove a configuration from logging.
-     *
-     * @param configKey Configuration key to remove.
-     * @throws StatsUnavailableException if unsuccessful due to failing to connect to stats service
-     */
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public void removeConfig(long configKey) throws StatsUnavailableException {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                service.removeConfiguration(configKey, mContext.getOpPackageName());
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to connect to statsmanager when removing configuration");
-                throw new StatsUnavailableException("could not connect", e);
-            } catch (SecurityException e) {
-                throw new StatsUnavailableException(e.getMessage(), e);
-            } catch (IllegalStateException e) {
-                Log.e(TAG, "Failed to removeConfig in statsmanager");
-                throw new StatsUnavailableException(e.getMessage(), e);
-            }
-        }
-    }
-
-    // TODO: Temporary for backwards compatibility. Remove.
-    /**
-     * @deprecated Use {@link #removeConfig(long)}
-     */
-    @Deprecated
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public boolean removeConfiguration(long configKey) {
-        try {
-            removeConfig(configKey);
-            return true;
-        } catch (StatsUnavailableException e) {
-            return false;
-        }
-    }
-
-    /**
-     * Set the PendingIntent to be used when broadcasting subscriber information to the given
-     * subscriberId within the given config.
-     * <p>
-     * Suppose that the calling uid has added a config with key configKey, and that in this config
-     * it is specified that when a particular anomaly is detected, a broadcast should be sent to
-     * a BroadcastSubscriber with id subscriberId. This function links the given pendingIntent with
-     * that subscriberId (for that config), so that this pendingIntent is used to send the broadcast
-     * when the anomaly is detected.
-     * <p>
-     * When statsd sends the broadcast, the PendingIntent will used to send an intent with
-     * information of
-     * {@link #EXTRA_STATS_CONFIG_UID},
-     * {@link #EXTRA_STATS_CONFIG_KEY},
-     * {@link #EXTRA_STATS_SUBSCRIPTION_ID},
-     * {@link #EXTRA_STATS_SUBSCRIPTION_RULE_ID},
-     * {@link #EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES}, and
-     * {@link #EXTRA_STATS_DIMENSIONS_VALUE}.
-     * <p>
-     * This function can only be called by the owner (uid) of the config. It must be called each
-     * time statsd starts. The config must have been added first (via {@link #addConfig}).
-     *
-     * @param pendingIntent the PendingIntent to use when broadcasting info to the subscriber
-     *                      associated with the given subscriberId. May be null, in which case
-     *                      it undoes any previous setting of this subscriberId.
-     * @param configKey     The integer naming the config to which this subscriber is attached.
-     * @param subscriberId  ID of the subscriber, as used in the config.
-     * @throws StatsUnavailableException if unsuccessful due to failing to connect to stats service
-     */
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public void setBroadcastSubscriber(
-            PendingIntent pendingIntent, long configKey, long subscriberId)
-            throws StatsUnavailableException {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                if (pendingIntent != null) {
-                    service.setBroadcastSubscriber(configKey, subscriberId, pendingIntent,
-                            mContext.getOpPackageName());
-                } else {
-                    service.unsetBroadcastSubscriber(configKey, subscriberId,
-                            mContext.getOpPackageName());
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to connect to statsmanager when adding broadcast subscriber",
-                        e);
-                throw new StatsUnavailableException("could not connect", e);
-            } catch (SecurityException e) {
-                throw new StatsUnavailableException(e.getMessage(), e);
-            }
-        }
-    }
-
-    // TODO: Temporary for backwards compatibility. Remove.
-    /**
-     * @deprecated Use {@link #setBroadcastSubscriber(PendingIntent, long, long)}
-     */
-    @Deprecated
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public boolean setBroadcastSubscriber(
-            long configKey, long subscriberId, PendingIntent pendingIntent) {
-        try {
-            setBroadcastSubscriber(pendingIntent, configKey, subscriberId);
-            return true;
-        } catch (StatsUnavailableException e) {
-            return false;
-        }
-    }
-
-    /**
-     * Registers the operation that is called to retrieve the metrics data. This must be called
-     * each time statsd starts. The config must have been added first (via {@link #addConfig},
-     * although addConfig could have been called on a previous boot). This operation allows
-     * statsd to send metrics data whenever statsd determines that the metrics in memory are
-     * approaching the memory limits. The fetch operation should call {@link #getReports} to fetch
-     * the data, which also deletes the retrieved metrics from statsd's memory.
-     *
-     * @param pendingIntent the PendingIntent to use when broadcasting info to the subscriber
-     *                      associated with the given subscriberId. May be null, in which case
-     *                      it removes any associated pending intent with this configKey.
-     * @param configKey     The integer naming the config to which this operation is attached.
-     * @throws StatsUnavailableException if unsuccessful due to failing to connect to stats service
-     */
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public void setFetchReportsOperation(PendingIntent pendingIntent, long configKey)
-            throws StatsUnavailableException {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                if (pendingIntent == null) {
-                    service.removeDataFetchOperation(configKey, mContext.getOpPackageName());
-                } else {
-                    service.setDataFetchOperation(configKey, pendingIntent,
-                            mContext.getOpPackageName());
-                }
-
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to connect to statsmanager when registering data listener.");
-                throw new StatsUnavailableException("could not connect", e);
-            } catch (SecurityException e) {
-                throw new StatsUnavailableException(e.getMessage(), e);
-            }
-        }
-    }
-
-    /**
-     * Registers the operation that is called whenever there is a change in which configs are
-     * active. This must be called each time statsd starts. This operation allows
-     * statsd to inform clients that they should pull data of the configs that are currently
-     * active. The activeConfigsChangedOperation should set periodic alarms to pull data of configs
-     * that are active and stop pulling data of configs that are no longer active.
-     *
-     * @param pendingIntent the PendingIntent to use when broadcasting info to the subscriber
-     *                      associated with the given subscriberId. May be null, in which case
-     *                      it removes any associated pending intent for this client.
-     * @return A list of configs that are currently active for this client. If the pendingIntent is
-     *         null, this will be an empty list.
-     * @throws StatsUnavailableException if unsuccessful due to failing to connect to stats service
-     */
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public @NonNull long[] setActiveConfigsChangedOperation(@Nullable PendingIntent pendingIntent)
-            throws StatsUnavailableException {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                if (pendingIntent == null) {
-                    service.removeActiveConfigsChangedOperation(mContext.getOpPackageName());
-                    return new long[0];
-                } else {
-                    return service.setActiveConfigsChangedOperation(pendingIntent,
-                            mContext.getOpPackageName());
-                }
-
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to connect to statsmanager "
-                        + "when registering active configs listener.");
-                throw new StatsUnavailableException("could not connect", e);
-            } catch (SecurityException e) {
-                throw new StatsUnavailableException(e.getMessage(), e);
-            }
-        }
-    }
-
-    // TODO: Temporary for backwards compatibility. Remove.
-    /**
-     * @deprecated Use {@link #setFetchReportsOperation(PendingIntent, long)}
-     */
-    @Deprecated
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public boolean setDataFetchOperation(long configKey, PendingIntent pendingIntent) {
-        try {
-            setFetchReportsOperation(pendingIntent, configKey);
-            return true;
-        } catch (StatsUnavailableException e) {
-            return false;
-        }
-    }
-
-    /**
-     * Request the data collected for the given configKey.
-     * This getter is destructive - it also clears the retrieved metrics from statsd's memory.
-     *
-     * @param configKey Configuration key to retrieve data from.
-     * @return Serialized ConfigMetricsReportList proto.
-     * @throws StatsUnavailableException if unsuccessful due to failing to connect to stats service
-     */
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public byte[] getReports(long configKey) throws StatsUnavailableException {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                return service.getData(configKey, mContext.getOpPackageName());
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to connect to statsmanager when getting data");
-                throw new StatsUnavailableException("could not connect", e);
-            } catch (SecurityException e) {
-                throw new StatsUnavailableException(e.getMessage(), e);
-            } catch (IllegalStateException e) {
-                Log.e(TAG, "Failed to getReports in statsmanager");
-                throw new StatsUnavailableException(e.getMessage(), e);
-            }
-        }
-    }
-
-    // TODO: Temporary for backwards compatibility. Remove.
-    /**
-     * @deprecated Use {@link #getReports(long)}
-     */
-    @Deprecated
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public @Nullable byte[] getData(long configKey) {
-        try {
-            return getReports(configKey);
-        } catch (StatsUnavailableException e) {
-            return null;
-        }
-    }
-
-    /**
-     * Clients can request metadata for statsd. Will contain stats across all configurations but not
-     * the actual metrics themselves (metrics must be collected via {@link #getReports(long)}.
-     * This getter is not destructive and will not reset any metrics/counters.
-     *
-     * @return Serialized StatsdStatsReport proto.
-     * @throws StatsUnavailableException if unsuccessful due to failing to connect to stats service
-     */
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public byte[] getStatsMetadata() throws StatsUnavailableException {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                return service.getMetadata(mContext.getOpPackageName());
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to connect to statsmanager when getting metadata");
-                throw new StatsUnavailableException("could not connect", e);
-            } catch (SecurityException e) {
-                throw new StatsUnavailableException(e.getMessage(), e);
-            } catch (IllegalStateException e) {
-                Log.e(TAG, "Failed to getStatsMetadata in statsmanager");
-                throw new StatsUnavailableException(e.getMessage(), e);
-            }
-        }
-    }
-
-    // TODO: Temporary for backwards compatibility. Remove.
-    /**
-     * @deprecated Use {@link #getStatsMetadata()}
-     */
-    @Deprecated
-    @RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
-    public @Nullable byte[] getMetadata() {
-        try {
-            return getStatsMetadata();
-        } catch (StatsUnavailableException e) {
-            return null;
-        }
-    }
-
-    /**
-     * Returns the experiments IDs registered with statsd, or an empty array if there aren't any.
-     *
-     * @throws StatsUnavailableException if unsuccessful due to failing to connect to stats service
-     */
-    @RequiresPermission(allOf = {DUMP, PACKAGE_USAGE_STATS})
-    public long[] getRegisteredExperimentIds()
-            throws StatsUnavailableException {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                return service.getRegisteredExperimentIds();
-            } catch (RemoteException e) {
-                if (DEBUG) {
-                    Log.d(TAG,
-                            "Failed to connect to StatsManagerService when getting "
-                                    + "registered experiment IDs");
-                }
-                throw new StatsUnavailableException("could not connect", e);
-            } catch (IllegalStateException e) {
-                Log.e(TAG, "Failed to getRegisteredExperimentIds in statsmanager");
-                throw new StatsUnavailableException(e.getMessage(), e);
-            }
-        }
-    }
-
-    /**
-     * Sets a callback for an atom when that atom is to be pulled. The stats service will
-     * invoke pullData in the callback when the stats service determines that this atom needs to be
-     * pulled. This method should not be called by third-party apps.
-     *
-     * @param atomTag           The tag of the atom for this puller callback.
-     * @param metadata          Optional metadata specifying the timeout, cool down time, and
-     *                          additive fields for mapping isolated to host uids.
-     * @param executor          The executor in which to run the callback.
-     * @param callback          The callback to be invoked when the stats service pulls the atom.
-     *
-     */
-    @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM)
-    public void setPullAtomCallback(int atomTag, @Nullable PullAtomMetadata metadata,
-            @NonNull @CallbackExecutor Executor executor,
-            @NonNull StatsPullAtomCallback callback) {
-        long coolDownMillis =
-                metadata == null ? DEFAULT_COOL_DOWN_MILLIS : metadata.mCoolDownMillis;
-        long timeoutMillis = metadata == null ? DEFAULT_TIMEOUT_MILLIS : metadata.mTimeoutMillis;
-        int[] additiveFields = metadata == null ? new int[0] : metadata.mAdditiveFields;
-        if (additiveFields == null) {
-            additiveFields = new int[0];
-        }
-
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                PullAtomCallbackInternal rec =
-                    new PullAtomCallbackInternal(atomTag, callback, executor);
-                service.registerPullAtomCallback(
-                        atomTag, coolDownMillis, timeoutMillis, additiveFields, rec);
-            } catch (RemoteException e) {
-                throw new RuntimeException("Unable to register pull callback", e);
-            }
-        }
-    }
-
-    /**
-     * Clears a callback for an atom when that atom is to be pulled. Note that any ongoing
-     * pulls will still occur. This method should not be called by third-party apps.
-     *
-     * @param atomTag           The tag of the atom of which to unregister
-     *
-     */
-    @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM)
-    public void clearPullAtomCallback(int atomTag) {
-        synchronized (sLock) {
-            try {
-                IStatsManagerService service = getIStatsManagerServiceLocked();
-                service.unregisterPullAtomCallback(atomTag);
-            } catch (RemoteException e) {
-                throw new RuntimeException("Unable to unregister pull atom callback");
-            }
-        }
-    }
-
-    private static class PullAtomCallbackInternal extends IPullAtomCallback.Stub {
-        public final int mAtomId;
-        public final StatsPullAtomCallback mCallback;
-        public final Executor mExecutor;
-
-        PullAtomCallbackInternal(int atomId, StatsPullAtomCallback callback, Executor executor) {
-            mAtomId = atomId;
-            mCallback = callback;
-            mExecutor = executor;
-        }
-
-        @Override
-        public void onPullAtom(int atomTag, IPullAtomResultReceiver resultReceiver) {
-            long token = Binder.clearCallingIdentity();
-            try {
-                mExecutor.execute(() -> {
-                    List<StatsEvent> data = new ArrayList<>();
-                    int successInt = mCallback.onPullAtom(atomTag, data);
-                    boolean success = successInt == PULL_SUCCESS;
-                    StatsEventParcel[] parcels = new StatsEventParcel[data.size()];
-                    for (int i = 0; i < data.size(); i++) {
-                        parcels[i] = new StatsEventParcel();
-                        parcels[i].buffer = data.get(i).getBytes();
-                    }
-                    try {
-                        resultReceiver.pullFinished(atomTag, success, parcels);
-                    } catch (RemoteException e) {
-                        Log.w(TAG, "StatsPullResultReceiver failed for tag " + mAtomId
-                                + " due to TransactionTooLarge. Calling pullFinish with no data");
-                        StatsEventParcel[] emptyData = new StatsEventParcel[0];
-                        try {
-                            resultReceiver.pullFinished(atomTag, /*success=*/false, emptyData);
-                        } catch (RemoteException nestedException) {
-                            Log.w(TAG, "StatsPullResultReceiver failed for tag " + mAtomId
-                                    + " with empty payload");
-                        }
-                    }
-                });
-            } finally {
-                Binder.restoreCallingIdentity(token);
-            }
-        }
-    }
-
-    /**
-     * Metadata required for registering a StatsPullAtomCallback.
-     * All fields are optional, and defaults will be used for fields that are unspecified.
-     *
-     */
-    public static class PullAtomMetadata {
-        private final long mCoolDownMillis;
-        private final long mTimeoutMillis;
-        private final int[] mAdditiveFields;
-
-        // Private Constructor for builder
-        private PullAtomMetadata(long coolDownMillis, long timeoutMillis, int[] additiveFields) {
-            mCoolDownMillis = coolDownMillis;
-            mTimeoutMillis = timeoutMillis;
-            mAdditiveFields = additiveFields;
-        }
-
-        /**
-         *  Builder for PullAtomMetadata.
-         */
-        public static class Builder {
-            private long mCoolDownMillis;
-            private long mTimeoutMillis;
-            private int[] mAdditiveFields;
-
-            /**
-             * Returns a new PullAtomMetadata.Builder object for constructing PullAtomMetadata for
-             * StatsManager#registerPullAtomCallback
-             */
-            public Builder() {
-                mCoolDownMillis = DEFAULT_COOL_DOWN_MILLIS;
-                mTimeoutMillis = DEFAULT_TIMEOUT_MILLIS;
-                mAdditiveFields = null;
-            }
-
-            /**
-             * Set the cool down time of the pull in milliseconds. If two successive pulls are
-             * issued within the cool down, a cached version of the first pull will be used for the
-             * second pull. The minimum allowed cool down is 1 second.
-             */
-            @NonNull
-            public Builder setCoolDownMillis(long coolDownMillis) {
-                mCoolDownMillis = coolDownMillis;
-                return this;
-            }
-
-            /**
-             * Set the maximum time the pull can take in milliseconds. The maximum allowed timeout
-             * is 10 seconds.
-             */
-            @NonNull
-            public Builder setTimeoutMillis(long timeoutMillis) {
-                mTimeoutMillis = timeoutMillis;
-                return this;
-            }
-
-            /**
-             * Set the additive fields of this pulled atom.
-             *
-             * This is only applicable for atoms which have a uid field. When tasks are run in
-             * isolated processes, the data will be attributed to the host uid. Additive fields
-             * will be combined when the non-additive fields are the same.
-             */
-            @NonNull
-            public Builder setAdditiveFields(@NonNull int[] additiveFields) {
-                mAdditiveFields = additiveFields;
-                return this;
-            }
-
-            /**
-             * Builds and returns a PullAtomMetadata object with the values set in the builder and
-             * defaults for unset fields.
-             */
-            @NonNull
-            public PullAtomMetadata build() {
-                return new PullAtomMetadata(mCoolDownMillis, mTimeoutMillis, mAdditiveFields);
-            }
-        }
-
-        /**
-         * Return the cool down time of this pull in milliseconds.
-         */
-        public long getCoolDownMillis() {
-            return mCoolDownMillis;
-        }
-
-        /**
-         * Return the maximum amount of time this pull can take in milliseconds.
-         */
-        public long getTimeoutMillis() {
-            return mTimeoutMillis;
-        }
-
-        /**
-         * Return the additive fields of this pulled atom.
-         *
-         * This is only applicable for atoms that have a uid field. When tasks are run in
-         * isolated processes, the data will be attributed to the host uid. Additive fields
-         * will be combined when the non-additive fields are the same.
-         */
-        @Nullable
-        public int[] getAdditiveFields() {
-            return mAdditiveFields;
-        }
-    }
-
-    /**
-     * Callback interface for pulling atoms requested by the stats service.
-     *
-     */
-    public interface StatsPullAtomCallback {
-        /**
-         * Pull data for the specified atom tag, filling in the provided list of StatsEvent data.
-         * @return {@link #PULL_SUCCESS} if the pull was successful, or {@link #PULL_SKIP} if not.
-         */
-        int onPullAtom(int atomTag, @NonNull List<StatsEvent> data);
-    }
-
-    @GuardedBy("sLock")
-    private IStatsManagerService getIStatsManagerServiceLocked() {
-        if (mStatsManagerService != null) {
-            return mStatsManagerService;
-        }
-        mStatsManagerService = IStatsManagerService.Stub.asInterface(
-                StatsFrameworkInitializer
-                .getStatsServiceManager()
-                .getStatsManagerServiceRegisterer()
-                .get());
-        return mStatsManagerService;
-    }
-
-    /**
-     * Exception thrown when communication with the stats service fails (eg if it is not available).
-     * This might be thrown early during boot before the stats service has started or if it crashed.
-     */
-    public static class StatsUnavailableException extends AndroidException {
-        public StatsUnavailableException(String reason) {
-            super("Failed to connect to statsd: " + reason);
-        }
-
-        public StatsUnavailableException(String reason, Throwable e) {
-            super("Failed to connect to statsd: " + reason, e);
-        }
-    }
-}
diff --git a/apex/statsd/framework/java/android/os/StatsDimensionsValue.java b/apex/statsd/framework/java/android/os/StatsDimensionsValue.java
deleted file mode 100644
index 7d9349c..0000000
--- a/apex/statsd/framework/java/android/os/StatsDimensionsValue.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.os;
-
-import android.annotation.SystemApi;
-import android.util.Log;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Container for statsd dimension value information, corresponding to a
- * stats_log.proto's DimensionValue.
- *
- * This consists of a field (an int representing a statsd atom field)
- * and a value (which may be one of a number of types).
- *
- * <p>
- * Only a single value is held, and it is necessarily one of the following types:
- * {@link String}, int, long, boolean, float,
- * or tuple (i.e. {@link List} of {@code StatsDimensionsValue}).
- *
- * The type of value held can be retrieved using {@link #getValueType()}, which returns one of the
- * following ints, depending on the type of value:
- * <ul>
- *  <li>{@link #STRING_VALUE_TYPE}</li>
- *  <li>{@link #INT_VALUE_TYPE}</li>
- *  <li>{@link #LONG_VALUE_TYPE}</li>
- *  <li>{@link #BOOLEAN_VALUE_TYPE}</li>
- *  <li>{@link #FLOAT_VALUE_TYPE}</li>
- *  <li>{@link #TUPLE_VALUE_TYPE}</li>
- * </ul>
- * Alternatively, this can be determined using {@link #isValueType(int)} with one of these constants
- * as a parameter.
- * The value itself can be retrieved using the correct get...Value() function for its type.
- *
- * <p>
- * The field is always an int, and always exists; it can be obtained using {@link #getField()}.
- *
- *
- * @hide
- */
-@SystemApi
-public final class StatsDimensionsValue implements Parcelable {
-    private static final String TAG = "StatsDimensionsValue";
-
-    // Values of the value type correspond to stats_log.proto's DimensionValue fields.
-    // Keep constants in sync with frameworks/base/cmds/statsd/src/HashableDimensionKey.cpp.
-    /** Indicates that this holds a String. */
-    public static final int STRING_VALUE_TYPE = 2;
-    /** Indicates that this holds an int. */
-    public static final int INT_VALUE_TYPE = 3;
-    /** Indicates that this holds a long. */
-    public static final int LONG_VALUE_TYPE = 4;
-    /** Indicates that this holds a boolean. */
-    public static final int BOOLEAN_VALUE_TYPE = 5;
-    /** Indicates that this holds a float. */
-    public static final int FLOAT_VALUE_TYPE = 6;
-    /** Indicates that this holds a List of StatsDimensionsValues. */
-    public static final int TUPLE_VALUE_TYPE = 7;
-
-    private final StatsDimensionsValueParcel mInner;
-
-    /**
-     * Creates a {@code StatsDimensionValue} from a parcel.
-     *
-     * @hide
-     */
-    public StatsDimensionsValue(Parcel in) {
-        mInner = StatsDimensionsValueParcel.CREATOR.createFromParcel(in);
-    }
-
-    /**
-     * Creates a {@code StatsDimensionsValue} from a StatsDimensionsValueParcel
-     *
-     * @hide
-     */
-    public StatsDimensionsValue(StatsDimensionsValueParcel parcel) {
-        mInner = parcel;
-    }
-
-    /**
-     * Return the field, i.e. the tag of a statsd atom.
-     *
-     * @return the field
-     */
-    public int getField() {
-        return mInner.field;
-    }
-
-    /**
-     * Retrieve the String held, if any.
-     *
-     * @return the {@link String} held if {@link #getValueType()} == {@link #STRING_VALUE_TYPE},
-     *         null otherwise
-     */
-    public String getStringValue() {
-        if (mInner.valueType == STRING_VALUE_TYPE) {
-            return mInner.stringValue;
-        } else {
-            Log.w(TAG, "Value type is " + getValueTypeAsString() + ", not string.");
-            return null;
-        }
-    }
-
-    /**
-     * Retrieve the int held, if any.
-     *
-     * @return the int held if {@link #getValueType()} == {@link #INT_VALUE_TYPE}, 0 otherwise
-     */
-    public int getIntValue() {
-        if (mInner.valueType == INT_VALUE_TYPE) {
-            return mInner.intValue;
-        } else {
-            Log.w(TAG, "Value type is " + getValueTypeAsString() + ", not int.");
-            return 0;
-        }
-    }
-
-    /**
-     * Retrieve the long held, if any.
-     *
-     * @return the long held if {@link #getValueType()} == {@link #LONG_VALUE_TYPE}, 0 otherwise
-     */
-    public long getLongValue() {
-        if (mInner.valueType == LONG_VALUE_TYPE) {
-            return mInner.longValue;
-        } else {
-            Log.w(TAG, "Value type is " + getValueTypeAsString() + ", not long.");
-            return 0;
-        }
-    }
-
-    /**
-     * Retrieve the boolean held, if any.
-     *
-     * @return the boolean held if {@link #getValueType()} == {@link #BOOLEAN_VALUE_TYPE},
-     *         false otherwise
-     */
-    public boolean getBooleanValue() {
-        if (mInner.valueType == BOOLEAN_VALUE_TYPE) {
-            return mInner.boolValue;
-        } else {
-            Log.w(TAG, "Value type is " + getValueTypeAsString() + ", not boolean.");
-            return false;
-        }
-    }
-
-    /**
-     * Retrieve the float held, if any.
-     *
-     * @return the float held if {@link #getValueType()} == {@link #FLOAT_VALUE_TYPE}, 0 otherwise
-     */
-    public float getFloatValue() {
-        if (mInner.valueType == FLOAT_VALUE_TYPE) {
-            return mInner.floatValue;
-        } else {
-            Log.w(TAG, "Value type is " + getValueTypeAsString() + ", not float.");
-            return 0;
-        }
-    }
-
-    /**
-     * Retrieve the tuple, in the form of a {@link List} of {@link StatsDimensionsValue}, held,
-     * if any.
-     *
-     * @return the {@link List} of {@link StatsDimensionsValue} held
-     *         if {@link #getValueType()} == {@link #TUPLE_VALUE_TYPE},
-     *         null otherwise
-     */
-    public List<StatsDimensionsValue> getTupleValueList() {
-        if (mInner.valueType == TUPLE_VALUE_TYPE) {
-            int length = (mInner.tupleValue == null) ? 0 : mInner.tupleValue.length;
-            List<StatsDimensionsValue> tupleValues = new ArrayList<>(length);
-            for (int i = 0; i < length; i++) {
-                tupleValues.add(new StatsDimensionsValue(mInner.tupleValue[i]));
-            }
-            return tupleValues;
-        } else {
-            Log.w(TAG, "Value type is " + getValueTypeAsString() + ", not tuple.");
-            return null;
-        }
-    }
-
-    /**
-     * Returns the constant representing the type of value stored, namely one of
-     * <ul>
-     *   <li>{@link #STRING_VALUE_TYPE}</li>
-     *   <li>{@link #INT_VALUE_TYPE}</li>
-     *   <li>{@link #LONG_VALUE_TYPE}</li>
-     *   <li>{@link #BOOLEAN_VALUE_TYPE}</li>
-     *   <li>{@link #FLOAT_VALUE_TYPE}</li>
-     *   <li>{@link #TUPLE_VALUE_TYPE}</li>
-     * </ul>
-     *
-     * @return the constant representing the type of value stored
-     */
-    public int getValueType() {
-        return mInner.valueType;
-    }
-
-    /**
-     * Returns whether the type of value stored is equal to the given type.
-     *
-     * @param valueType int representing the type of value stored, as used in {@link #getValueType}
-     * @return true if {@link #getValueType()} is equal to {@code valueType}.
-     */
-    public boolean isValueType(int valueType) {
-        return mInner.valueType == valueType;
-    }
-
-    /**
-     * Returns a String representing the information in this StatsDimensionValue.
-     * No guarantees are made about the format of this String.
-     *
-     * @return String representation
-     *
-     * @hide
-     */
-    // Follows the format of statsd's dimension.h toString.
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(mInner.field);
-        sb.append(":");
-        switch (mInner.valueType) {
-            case STRING_VALUE_TYPE:
-                sb.append(mInner.stringValue);
-                break;
-            case INT_VALUE_TYPE:
-                sb.append(String.valueOf(mInner.intValue));
-                break;
-            case LONG_VALUE_TYPE:
-                sb.append(String.valueOf(mInner.longValue));
-                break;
-            case BOOLEAN_VALUE_TYPE:
-                sb.append(String.valueOf(mInner.boolValue));
-                break;
-            case FLOAT_VALUE_TYPE:
-                sb.append(String.valueOf(mInner.floatValue));
-                break;
-            case TUPLE_VALUE_TYPE:
-                sb.append("{");
-                int length = (mInner.tupleValue == null) ? 0 : mInner.tupleValue.length;
-                for (int i = 0; i < length; i++) {
-                    StatsDimensionsValue child = new StatsDimensionsValue(mInner.tupleValue[i]);
-                    sb.append(child.toString());
-                    sb.append("|");
-                }
-                sb.append("}");
-                break;
-            default:
-                Log.w(TAG, "Incorrect value type");
-                break;
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Parcelable Creator for StatsDimensionsValue.
-     */
-    public static final @android.annotation.NonNull
-            Parcelable.Creator<StatsDimensionsValue> CREATOR = new
-            Parcelable.Creator<StatsDimensionsValue>() {
-                public StatsDimensionsValue createFromParcel(Parcel in) {
-                    return new StatsDimensionsValue(in);
-                }
-
-                public StatsDimensionsValue[] newArray(int size) {
-                    return new StatsDimensionsValue[size];
-                }
-            };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel out, int flags) {
-        mInner.writeToParcel(out, flags);
-    }
-
-    /**
-     * Returns a string representation of the type of value stored.
-     */
-    private String getValueTypeAsString() {
-        switch (mInner.valueType) {
-            case STRING_VALUE_TYPE:
-                return "string";
-            case INT_VALUE_TYPE:
-                return "int";
-            case LONG_VALUE_TYPE:
-                return "long";
-            case BOOLEAN_VALUE_TYPE:
-                return "boolean";
-            case FLOAT_VALUE_TYPE:
-                return "float";
-            case TUPLE_VALUE_TYPE:
-                return "tuple";
-            default:
-                return "unknown";
-        }
-    }
-}
diff --git a/apex/statsd/framework/java/android/os/StatsFrameworkInitializer.java b/apex/statsd/framework/java/android/os/StatsFrameworkInitializer.java
deleted file mode 100644
index 8dc9123..0000000
--- a/apex/statsd/framework/java/android/os/StatsFrameworkInitializer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.os;
-
-import android.annotation.NonNull;
-import android.annotation.SystemApi;
-import android.annotation.SystemApi.Client;
-import android.app.StatsManager;
-import android.app.SystemServiceRegistry;
-import android.content.Context;
-
-/**
- * Class for performing registration for all stats services
- *
- * @hide
- */
-@SystemApi(client = Client.MODULE_LIBRARIES)
-public class StatsFrameworkInitializer {
-    private StatsFrameworkInitializer() {
-    }
-
-    private static volatile StatsServiceManager sStatsServiceManager;
-
-    /**
-     * Sets an instance of {@link StatsServiceManager} that allows
-     * the statsd mainline module to register/obtain stats binder services. This is called
-     * by the platform during the system initialization.
-     *
-     * @param statsServiceManager instance of {@link StatsServiceManager} that allows
-     * the statsd mainline module to register/obtain statsd binder services.
-     */
-    public static void setStatsServiceManager(
-            @NonNull StatsServiceManager statsServiceManager) {
-        if (sStatsServiceManager != null) {
-            throw new IllegalStateException("setStatsServiceManager called twice!");
-        }
-
-        if (statsServiceManager == null) {
-            throw new NullPointerException("statsServiceManager is null");
-        }
-
-        sStatsServiceManager = statsServiceManager;
-    }
-
-    /** @hide */
-    public static StatsServiceManager getStatsServiceManager() {
-        return sStatsServiceManager;
-    }
-
-    /**
-     * Called by {@link SystemServiceRegistry}'s static initializer and registers all statsd
-     * services to {@link Context}, so that {@link Context#getSystemService} can return them.
-     *
-     * @throws IllegalStateException if this is called from anywhere besides
-     * {@link SystemServiceRegistry}
-     */
-    public static void registerServiceWrappers() {
-        SystemServiceRegistry.registerContextAwareService(
-                Context.STATS_MANAGER,
-                StatsManager.class,
-                context -> new StatsManager(context)
-        );
-    }
-}
diff --git a/apex/statsd/framework/java/android/util/StatsEvent.java b/apex/statsd/framework/java/android/util/StatsEvent.java
deleted file mode 100644
index 8be5c63..0000000
--- a/apex/statsd/framework/java/android/util/StatsEvent.java
+++ /dev/null
@@ -1,879 +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 android.util;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.os.SystemClock;
-
-import com.android.internal.annotations.GuardedBy;
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.util.Arrays;
-
-/**
- * StatsEvent builds and stores the buffer sent over the statsd socket.
- * This class defines and encapsulates the socket protocol.
- *
- * <p>Usage:</p>
- * <pre>
- *      // Pushed event
- *      StatsEvent statsEvent = StatsEvent.newBuilder()
- *          .setAtomId(atomId)
- *          .writeBoolean(false)
- *          .writeString("annotated String field")
- *          .addBooleanAnnotation(annotationId, true)
- *          .usePooledBuffer()
- *          .build();
- *      StatsLog.write(statsEvent);
- *
- *      // Pulled event
- *      StatsEvent statsEvent = StatsEvent.newBuilder()
- *          .setAtomId(atomId)
- *          .writeBoolean(false)
- *          .writeString("annotated String field")
- *          .addBooleanAnnotation(annotationId, true)
- *          .build();
- * </pre>
- * @hide
- **/
-@SystemApi
-public final class StatsEvent {
-    // Type Ids.
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_INT = 0x00;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_LONG = 0x01;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_STRING = 0x02;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_LIST = 0x03;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_FLOAT = 0x04;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_BOOLEAN = 0x05;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_BYTE_ARRAY = 0x06;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_OBJECT = 0x07;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_KEY_VALUE_PAIRS = 0x08;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_ATTRIBUTION_CHAIN = 0x09;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final byte TYPE_ERRORS = 0x0F;
-
-    // Error flags.
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_NO_TIMESTAMP = 0x1;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_NO_ATOM_ID = 0x2;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_OVERFLOW = 0x4;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_ATTRIBUTION_CHAIN_TOO_LONG = 0x8;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_TOO_MANY_KEY_VALUE_PAIRS = 0x10;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_ANNOTATION_DOES_NOT_FOLLOW_FIELD = 0x20;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_INVALID_ANNOTATION_ID = 0x40;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_ANNOTATION_ID_TOO_LARGE = 0x80;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_TOO_MANY_ANNOTATIONS = 0x100;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_TOO_MANY_FIELDS = 0x200;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_ATTRIBUTION_UIDS_TAGS_SIZES_NOT_EQUAL = 0x1000;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int ERROR_ATOM_ID_INVALID_POSITION = 0x2000;
-
-    // Size limits.
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int MAX_ANNOTATION_COUNT = 15;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int MAX_ATTRIBUTION_NODES = 127;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int MAX_NUM_ELEMENTS = 127;
-
-    /**
-     * @hide
-     **/
-    @VisibleForTesting
-    public static final int MAX_KEY_VALUE_PAIRS = 127;
-
-    private static final int LOGGER_ENTRY_MAX_PAYLOAD = 4068;
-
-    // Max payload size is 4 bytes less as 4 bytes are reserved for statsEventTag.
-    // See android_util_StatsLog.cpp.
-    private static final int MAX_PUSH_PAYLOAD_SIZE = LOGGER_ENTRY_MAX_PAYLOAD - 4;
-
-    private static final int MAX_PULL_PAYLOAD_SIZE = 50 * 1024; // 50 KB
-
-    private final int mAtomId;
-    private final byte[] mPayload;
-    private Buffer mBuffer;
-    private final int mNumBytes;
-
-    private StatsEvent(final int atomId, @Nullable final Buffer buffer,
-            @NonNull final byte[] payload, final int numBytes) {
-        mAtomId = atomId;
-        mBuffer = buffer;
-        mPayload = payload;
-        mNumBytes = numBytes;
-    }
-
-    /**
-     * Returns a new StatsEvent.Builder for building StatsEvent object.
-     **/
-    @NonNull
-    public static StatsEvent.Builder newBuilder() {
-        return new StatsEvent.Builder(Buffer.obtain());
-    }
-
-    /**
-     * Get the atom Id of the atom encoded in this StatsEvent object.
-     *
-     * @hide
-     **/
-    public int getAtomId() {
-        return mAtomId;
-    }
-
-    /**
-     * Get the byte array that contains the encoded payload that can be sent to statsd.
-     *
-     * @hide
-     **/
-    @NonNull
-    public byte[] getBytes() {
-        return mPayload;
-    }
-
-    /**
-     * Get the number of bytes used to encode the StatsEvent payload.
-     *
-     * @hide
-     **/
-    public int getNumBytes() {
-        return mNumBytes;
-    }
-
-    /**
-     * Recycle resources used by this StatsEvent object.
-     * No actions should be taken on this StatsEvent after release() is called.
-     *
-     * @hide
-     **/
-    public void release() {
-        if (mBuffer != null) {
-            mBuffer.release();
-            mBuffer = null;
-        }
-    }
-
-    /**
-     * Builder for constructing a StatsEvent object.
-     *
-     * <p>This class defines and encapsulates the socket encoding for the buffer.
-     * The write methods must be called in the same order as the order of fields in the
-     * atom definition.</p>
-     *
-     * <p>setAtomId() can be called anytime before build().</p>
-     *
-     * <p>Example:</p>
-     * <pre>
-     *     // Atom definition.
-     *     message MyAtom {
-     *         optional int32 field1 = 1;
-     *         optional int64 field2 = 2;
-     *         optional string field3 = 3 [(annotation1) = true];
-     *     }
-     *
-     *     // StatsEvent construction for pushed event.
-     *     StatsEvent.newBuilder()
-     *     StatsEvent statsEvent = StatsEvent.newBuilder()
-     *         .setAtomId(atomId)
-     *         .writeInt(3) // field1
-     *         .writeLong(8L) // field2
-     *         .writeString("foo") // field 3
-     *         .addBooleanAnnotation(annotation1Id, true)
-     *         .usePooledBuffer()
-     *         .build();
-     *
-     *     // StatsEvent construction for pulled event.
-     *     StatsEvent.newBuilder()
-     *     StatsEvent statsEvent = StatsEvent.newBuilder()
-     *         .setAtomId(atomId)
-     *         .writeInt(3) // field1
-     *         .writeLong(8L) // field2
-     *         .writeString("foo") // field 3
-     *         .addBooleanAnnotation(annotation1Id, true)
-     *         .build();
-     * </pre>
-     **/
-    public static final class Builder {
-        // Fixed positions.
-        private static final int POS_NUM_ELEMENTS = 1;
-        private static final int POS_TIMESTAMP_NS = POS_NUM_ELEMENTS + Byte.BYTES;
-        private static final int POS_ATOM_ID = POS_TIMESTAMP_NS + Byte.BYTES + Long.BYTES;
-
-        private final Buffer mBuffer;
-        private long mTimestampNs;
-        private int mAtomId;
-        private byte mCurrentAnnotationCount;
-        private int mPos;
-        private int mPosLastField;
-        private byte mLastType;
-        private int mNumElements;
-        private int mErrorMask;
-        private boolean mUsePooledBuffer = false;
-
-        private Builder(final Buffer buffer) {
-            mBuffer = buffer;
-            mCurrentAnnotationCount = 0;
-            mAtomId = 0;
-            mTimestampNs = SystemClock.elapsedRealtimeNanos();
-            mNumElements = 0;
-
-            // Set mPos to 0 for writing TYPE_OBJECT at 0th position.
-            mPos = 0;
-            writeTypeId(TYPE_OBJECT);
-
-            // Write timestamp.
-            mPos = POS_TIMESTAMP_NS;
-            writeLong(mTimestampNs);
-        }
-
-        /**
-         * Sets the atom id for this StatsEvent.
-         *
-         * This should be called immediately after StatsEvent.newBuilder()
-         * and should only be called once.
-         * Not calling setAtomId will result in ERROR_NO_ATOM_ID.
-         * Calling setAtomId out of order will result in ERROR_ATOM_ID_INVALID_POSITION.
-         **/
-        @NonNull
-        public Builder setAtomId(final int atomId) {
-            if (0 == mAtomId) {
-                mAtomId = atomId;
-
-                if (1 == mNumElements) { // Only timestamp is written so far.
-                    writeInt(atomId);
-                } else {
-                    // setAtomId called out of order.
-                    mErrorMask |= ERROR_ATOM_ID_INVALID_POSITION;
-                }
-            }
-
-            return this;
-        }
-
-        /**
-         * Write a boolean field to this StatsEvent.
-         **/
-        @NonNull
-        public Builder writeBoolean(final boolean value) {
-            // Write boolean typeId byte followed by boolean byte representation.
-            writeTypeId(TYPE_BOOLEAN);
-            mPos += mBuffer.putBoolean(mPos, value);
-            mNumElements++;
-            return this;
-        }
-
-        /**
-         * Write an integer field to this StatsEvent.
-         **/
-        @NonNull
-        public Builder writeInt(final int value) {
-            // Write integer typeId byte followed by 4-byte representation of value.
-            writeTypeId(TYPE_INT);
-            mPos += mBuffer.putInt(mPos, value);
-            mNumElements++;
-            return this;
-        }
-
-        /**
-         * Write a long field to this StatsEvent.
-         **/
-        @NonNull
-        public Builder writeLong(final long value) {
-            // Write long typeId byte followed by 8-byte representation of value.
-            writeTypeId(TYPE_LONG);
-            mPos += mBuffer.putLong(mPos, value);
-            mNumElements++;
-            return this;
-        }
-
-        /**
-         * Write a float field to this StatsEvent.
-         **/
-        @NonNull
-        public Builder writeFloat(final float value) {
-            // Write float typeId byte followed by 4-byte representation of value.
-            writeTypeId(TYPE_FLOAT);
-            mPos += mBuffer.putFloat(mPos, value);
-            mNumElements++;
-            return this;
-        }
-
-        /**
-         * Write a String field to this StatsEvent.
-         **/
-        @NonNull
-        public Builder writeString(@NonNull final String value) {
-            // Write String typeId byte, followed by 4-byte representation of number of bytes
-            // in the UTF-8 encoding, followed by the actual UTF-8 byte encoding of value.
-            final byte[] valueBytes = stringToBytes(value);
-            writeByteArray(valueBytes, TYPE_STRING);
-            return this;
-        }
-
-        /**
-         * Write a byte array field to this StatsEvent.
-         **/
-        @NonNull
-        public Builder writeByteArray(@NonNull final byte[] value) {
-            // Write byte array typeId byte, followed by 4-byte representation of number of bytes
-            // in value, followed by the actual byte array.
-            writeByteArray(value, TYPE_BYTE_ARRAY);
-            return this;
-        }
-
-        private void writeByteArray(@NonNull final byte[] value, final byte typeId) {
-            writeTypeId(typeId);
-            final int numBytes = value.length;
-            mPos += mBuffer.putInt(mPos, numBytes);
-            mPos += mBuffer.putByteArray(mPos, value);
-            mNumElements++;
-        }
-
-        /**
-         * Write an attribution chain field to this StatsEvent.
-         *
-         * The sizes of uids and tags must be equal. The AttributionNode at position i is
-         * made up of uids[i] and tags[i].
-         *
-         * @param uids array of uids in the attribution nodes.
-         * @param tags array of tags in the attribution nodes.
-         **/
-        @NonNull
-        public Builder writeAttributionChain(
-                @NonNull final int[] uids, @NonNull final String[] tags) {
-            final byte numUids = (byte) uids.length;
-            final byte numTags = (byte) tags.length;
-
-            if (numUids != numTags) {
-                mErrorMask |= ERROR_ATTRIBUTION_UIDS_TAGS_SIZES_NOT_EQUAL;
-            } else if (numUids > MAX_ATTRIBUTION_NODES) {
-                mErrorMask |= ERROR_ATTRIBUTION_CHAIN_TOO_LONG;
-            } else {
-                // Write attribution chain typeId byte, followed by 1-byte representation of
-                // number of attribution nodes, followed by encoding of each attribution node.
-                writeTypeId(TYPE_ATTRIBUTION_CHAIN);
-                mPos += mBuffer.putByte(mPos, numUids);
-                for (int i = 0; i < numUids; i++) {
-                    // Each uid is encoded as 4-byte representation of its int value.
-                    mPos += mBuffer.putInt(mPos, uids[i]);
-
-                    // Each tag is encoded as 4-byte representation of number of bytes in its
-                    // UTF-8 encoding, followed by the actual UTF-8 bytes.
-                    final byte[] tagBytes = stringToBytes(tags[i]);
-                    mPos += mBuffer.putInt(mPos, tagBytes.length);
-                    mPos += mBuffer.putByteArray(mPos, tagBytes);
-                }
-                mNumElements++;
-            }
-            return this;
-        }
-
-        /**
-         * Write KeyValuePairsAtom entries to this StatsEvent.
-         *
-         * @param intMap Integer key-value pairs.
-         * @param longMap Long key-value pairs.
-         * @param stringMap String key-value pairs.
-         * @param floatMap Float key-value pairs.
-         **/
-        @NonNull
-        public Builder writeKeyValuePairs(
-                @Nullable final SparseIntArray intMap,
-                @Nullable final SparseLongArray longMap,
-                @Nullable final SparseArray<String> stringMap,
-                @Nullable final SparseArray<Float> floatMap) {
-            final int intMapSize = null == intMap ? 0 : intMap.size();
-            final int longMapSize = null == longMap ? 0 : longMap.size();
-            final int stringMapSize = null == stringMap ? 0 : stringMap.size();
-            final int floatMapSize = null == floatMap ? 0 : floatMap.size();
-            final int totalCount = intMapSize + longMapSize + stringMapSize + floatMapSize;
-
-            if (totalCount > MAX_KEY_VALUE_PAIRS) {
-                mErrorMask |= ERROR_TOO_MANY_KEY_VALUE_PAIRS;
-            } else {
-                writeTypeId(TYPE_KEY_VALUE_PAIRS);
-                mPos += mBuffer.putByte(mPos, (byte) totalCount);
-
-                for (int i = 0; i < intMapSize; i++) {
-                    final int key = intMap.keyAt(i);
-                    final int value = intMap.valueAt(i);
-                    mPos += mBuffer.putInt(mPos, key);
-                    writeTypeId(TYPE_INT);
-                    mPos += mBuffer.putInt(mPos, value);
-                }
-
-                for (int i = 0; i < longMapSize; i++) {
-                    final int key = longMap.keyAt(i);
-                    final long value = longMap.valueAt(i);
-                    mPos += mBuffer.putInt(mPos, key);
-                    writeTypeId(TYPE_LONG);
-                    mPos += mBuffer.putLong(mPos, value);
-                }
-
-                for (int i = 0; i < stringMapSize; i++) {
-                    final int key = stringMap.keyAt(i);
-                    final String value = stringMap.valueAt(i);
-                    mPos += mBuffer.putInt(mPos, key);
-                    writeTypeId(TYPE_STRING);
-                    final byte[] valueBytes = stringToBytes(value);
-                    mPos += mBuffer.putInt(mPos, valueBytes.length);
-                    mPos += mBuffer.putByteArray(mPos, valueBytes);
-                }
-
-                for (int i = 0; i < floatMapSize; i++) {
-                    final int key = floatMap.keyAt(i);
-                    final float value = floatMap.valueAt(i);
-                    mPos += mBuffer.putInt(mPos, key);
-                    writeTypeId(TYPE_FLOAT);
-                    mPos += mBuffer.putFloat(mPos, value);
-                }
-
-                mNumElements++;
-            }
-
-            return this;
-        }
-
-        /**
-         * Write a boolean annotation for the last field written.
-         **/
-        @NonNull
-        public Builder addBooleanAnnotation(
-                final byte annotationId, final boolean value) {
-            // Ensure there's a field written to annotate.
-            if (mNumElements < 2) {
-                mErrorMask |= ERROR_ANNOTATION_DOES_NOT_FOLLOW_FIELD;
-            } else if (mCurrentAnnotationCount >= MAX_ANNOTATION_COUNT) {
-                mErrorMask |= ERROR_TOO_MANY_ANNOTATIONS;
-            } else {
-                mPos += mBuffer.putByte(mPos, annotationId);
-                mPos += mBuffer.putByte(mPos, TYPE_BOOLEAN);
-                mPos += mBuffer.putBoolean(mPos, value);
-                mCurrentAnnotationCount++;
-                writeAnnotationCount();
-            }
-
-            return this;
-        }
-
-        /**
-         * Write an integer annotation for the last field written.
-         **/
-        @NonNull
-        public Builder addIntAnnotation(final byte annotationId, final int value) {
-            if (mNumElements < 2) {
-                mErrorMask |= ERROR_ANNOTATION_DOES_NOT_FOLLOW_FIELD;
-            } else if (mCurrentAnnotationCount >= MAX_ANNOTATION_COUNT) {
-                mErrorMask |= ERROR_TOO_MANY_ANNOTATIONS;
-            } else {
-                mPos += mBuffer.putByte(mPos, annotationId);
-                mPos += mBuffer.putByte(mPos, TYPE_INT);
-                mPos += mBuffer.putInt(mPos, value);
-                mCurrentAnnotationCount++;
-                writeAnnotationCount();
-            }
-
-            return this;
-        }
-
-        /**
-         * Indicates to reuse Buffer's byte array as the underlying payload in StatsEvent.
-         * This should be called for pushed events to reduce memory allocations and garbage
-         * collections.
-         **/
-        @NonNull
-        public Builder usePooledBuffer() {
-            mUsePooledBuffer = true;
-            mBuffer.setMaxSize(MAX_PUSH_PAYLOAD_SIZE, mPos);
-            return this;
-        }
-
-        /**
-         * Builds a StatsEvent object with values entered in this Builder.
-         **/
-        @NonNull
-        public StatsEvent build() {
-            if (0L == mTimestampNs) {
-                mErrorMask |= ERROR_NO_TIMESTAMP;
-            }
-            if (0 == mAtomId) {
-                mErrorMask |= ERROR_NO_ATOM_ID;
-            }
-            if (mBuffer.hasOverflowed()) {
-                mErrorMask |= ERROR_OVERFLOW;
-            }
-            if (mNumElements > MAX_NUM_ELEMENTS) {
-                mErrorMask |= ERROR_TOO_MANY_FIELDS;
-            }
-
-            if (0 == mErrorMask) {
-                mBuffer.putByte(POS_NUM_ELEMENTS, (byte) mNumElements);
-            } else {
-                // Write atom id and error mask. Overwrite any annotations for atom Id.
-                mPos = POS_ATOM_ID;
-                mPos += mBuffer.putByte(mPos, TYPE_INT);
-                mPos += mBuffer.putInt(mPos, mAtomId);
-                mPos += mBuffer.putByte(mPos, TYPE_ERRORS);
-                mPos += mBuffer.putInt(mPos, mErrorMask);
-                mBuffer.putByte(POS_NUM_ELEMENTS, (byte) 3);
-            }
-
-            final int size = mPos;
-
-            if (mUsePooledBuffer) {
-                return new StatsEvent(mAtomId, mBuffer, mBuffer.getBytes(), size);
-            } else {
-                // Create a copy of the buffer with the required number of bytes.
-                final byte[] payload = new byte[size];
-                System.arraycopy(mBuffer.getBytes(), 0, payload, 0, size);
-
-                // Return Buffer instance to the pool.
-                mBuffer.release();
-
-                return new StatsEvent(mAtomId, null, payload, size);
-            }
-        }
-
-        private void writeTypeId(final byte typeId) {
-            mPosLastField = mPos;
-            mLastType = typeId;
-            mCurrentAnnotationCount = 0;
-            final byte encodedId = (byte) (typeId & 0x0F);
-            mPos += mBuffer.putByte(mPos, encodedId);
-        }
-
-        private void writeAnnotationCount() {
-            // Use first 4 bits for annotation count and last 4 bits for typeId.
-            final byte encodedId = (byte) ((mCurrentAnnotationCount << 4) | (mLastType & 0x0F));
-            mBuffer.putByte(mPosLastField, encodedId);
-        }
-
-        @NonNull
-        private static byte[] stringToBytes(@Nullable final String value) {
-            return (null == value ? "" : value).getBytes(UTF_8);
-        }
-    }
-
-    private static final class Buffer {
-        private static Object sLock = new Object();
-
-        @GuardedBy("sLock")
-        private static Buffer sPool;
-
-        private byte[] mBytes = new byte[MAX_PUSH_PAYLOAD_SIZE];
-        private boolean mOverflow = false;
-        private int mMaxSize = MAX_PULL_PAYLOAD_SIZE;
-
-        @NonNull
-        private static Buffer obtain() {
-            final Buffer buffer;
-            synchronized (sLock) {
-                buffer = null == sPool ? new Buffer() : sPool;
-                sPool = null;
-            }
-            buffer.reset();
-            return buffer;
-        }
-
-        private Buffer() {
-        }
-
-        @NonNull
-        private byte[] getBytes() {
-            return mBytes;
-        }
-
-        private void release() {
-            // Recycle this Buffer if its size is MAX_PUSH_PAYLOAD_SIZE or under.
-            if (mBytes.length <= MAX_PUSH_PAYLOAD_SIZE) {
-                synchronized (sLock) {
-                    if (null == sPool) {
-                        sPool = this;
-                    }
-                }
-            }
-        }
-
-        private void reset() {
-            mOverflow = false;
-            mMaxSize = MAX_PULL_PAYLOAD_SIZE;
-        }
-
-        private void setMaxSize(final int maxSize, final int numBytesWritten) {
-            mMaxSize = maxSize;
-            if (numBytesWritten > maxSize) {
-                mOverflow = true;
-            }
-        }
-
-        private boolean hasOverflowed() {
-            return mOverflow;
-        }
-
-        /**
-         * Checks for available space in the byte array.
-         *
-         * @param index starting position in the buffer to start the check.
-         * @param numBytes number of bytes to check from index.
-         * @return true if space is available, false otherwise.
-         **/
-        private boolean hasEnoughSpace(final int index, final int numBytes) {
-            final int totalBytesNeeded = index + numBytes;
-
-            if (totalBytesNeeded > mMaxSize) {
-                mOverflow = true;
-                return false;
-            }
-
-            // Expand buffer if needed.
-            if (mBytes.length < mMaxSize && totalBytesNeeded > mBytes.length) {
-                int newSize = mBytes.length;
-                do {
-                    newSize *= 2;
-                } while (newSize <= totalBytesNeeded);
-
-                if (newSize > mMaxSize) {
-                    newSize = mMaxSize;
-                }
-
-                mBytes = Arrays.copyOf(mBytes, newSize);
-            }
-
-            return true;
-        }
-
-        /**
-         * Writes a byte into the buffer.
-         *
-         * @param index position in the buffer where the byte is written.
-         * @param value the byte to write.
-         * @return number of bytes written to buffer from this write operation.
-         **/
-        private int putByte(final int index, final byte value) {
-            if (hasEnoughSpace(index, Byte.BYTES)) {
-                mBytes[index] = (byte) (value);
-                return Byte.BYTES;
-            }
-            return 0;
-        }
-
-        /**
-         * Writes a boolean into the buffer.
-         *
-         * @param index position in the buffer where the boolean is written.
-         * @param value the boolean to write.
-         * @return number of bytes written to buffer from this write operation.
-         **/
-        private int putBoolean(final int index, final boolean value) {
-            return putByte(index, (byte) (value ? 1 : 0));
-        }
-
-        /**
-         * Writes an integer into the buffer.
-         *
-         * @param index position in the buffer where the integer is written.
-         * @param value the integer to write.
-         * @return number of bytes written to buffer from this write operation.
-         **/
-        private int putInt(final int index, final int value) {
-            if (hasEnoughSpace(index, Integer.BYTES)) {
-                // Use little endian byte order.
-                mBytes[index] = (byte) (value);
-                mBytes[index + 1] = (byte) (value >> 8);
-                mBytes[index + 2] = (byte) (value >> 16);
-                mBytes[index + 3] = (byte) (value >> 24);
-                return Integer.BYTES;
-            }
-            return 0;
-        }
-
-        /**
-         * Writes a long into the buffer.
-         *
-         * @param index position in the buffer where the long is written.
-         * @param value the long to write.
-         * @return number of bytes written to buffer from this write operation.
-         **/
-        private int putLong(final int index, final long value) {
-            if (hasEnoughSpace(index, Long.BYTES)) {
-                // Use little endian byte order.
-                mBytes[index] = (byte) (value);
-                mBytes[index + 1] = (byte) (value >> 8);
-                mBytes[index + 2] = (byte) (value >> 16);
-                mBytes[index + 3] = (byte) (value >> 24);
-                mBytes[index + 4] = (byte) (value >> 32);
-                mBytes[index + 5] = (byte) (value >> 40);
-                mBytes[index + 6] = (byte) (value >> 48);
-                mBytes[index + 7] = (byte) (value >> 56);
-                return Long.BYTES;
-            }
-            return 0;
-        }
-
-        /**
-         * Writes a float into the buffer.
-         *
-         * @param index position in the buffer where the float is written.
-         * @param value the float to write.
-         * @return number of bytes written to buffer from this write operation.
-         **/
-        private int putFloat(final int index, final float value) {
-            return putInt(index, Float.floatToIntBits(value));
-        }
-
-        /**
-         * Copies a byte array into the buffer.
-         *
-         * @param index position in the buffer where the byte array is copied.
-         * @param value the byte array to copy.
-         * @return number of bytes written to buffer from this write operation.
-         **/
-        private int putByteArray(final int index, @NonNull final byte[] value) {
-            final int numBytes = value.length;
-            if (hasEnoughSpace(index, numBytes)) {
-                System.arraycopy(value, 0, mBytes, index, numBytes);
-                return numBytes;
-            }
-            return 0;
-        }
-    }
-}
diff --git a/apex/statsd/framework/java/android/util/StatsLog.java b/apex/statsd/framework/java/android/util/StatsLog.java
deleted file mode 100644
index 0a9f4eb..0000000
--- a/apex/statsd/framework/java/android/util/StatsLog.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.util;
-
-import static android.Manifest.permission.DUMP;
-import static android.Manifest.permission.PACKAGE_USAGE_STATS;
-
-import android.Manifest;
-import android.annotation.NonNull;
-import android.annotation.RequiresPermission;
-import android.annotation.SystemApi;
-import android.content.Context;
-import android.os.IStatsd;
-import android.os.Process;
-import android.util.proto.ProtoOutputStream;
-
-import com.android.internal.statsd.StatsdStatsLog;
-
-/**
- * StatsLog provides an API for developers to send events to statsd. The events can be used to
- * define custom metrics inside statsd.
- */
-public final class StatsLog {
-
-    // Load JNI library
-    static {
-        System.loadLibrary("stats_jni");
-    }
-    private static final String TAG = "StatsLog";
-    private static final boolean DEBUG = false;
-    private static final int EXPERIMENT_IDS_FIELD_ID = 1;
-
-    private StatsLog() {
-    }
-
-    /**
-     * Logs a start event.
-     *
-     * @param label developer-chosen label.
-     * @return True if the log request was sent to statsd.
-     */
-    public static boolean logStart(int label) {
-        int callingUid = Process.myUid();
-        StatsdStatsLog.write(
-                StatsdStatsLog.APP_BREADCRUMB_REPORTED,
-                callingUid,
-                label,
-                StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__START);
-        return true;
-    }
-
-    /**
-     * Logs a stop event.
-     *
-     * @param label developer-chosen label.
-     * @return True if the log request was sent to statsd.
-     */
-    public static boolean logStop(int label) {
-        int callingUid = Process.myUid();
-        StatsdStatsLog.write(
-                StatsdStatsLog.APP_BREADCRUMB_REPORTED,
-                callingUid,
-                label,
-                StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP);
-        return true;
-    }
-
-    /**
-     * Logs an event that does not represent a start or stop boundary.
-     *
-     * @param label developer-chosen label.
-     * @return True if the log request was sent to statsd.
-     */
-    public static boolean logEvent(int label) {
-        int callingUid = Process.myUid();
-        StatsdStatsLog.write(
-                StatsdStatsLog.APP_BREADCRUMB_REPORTED,
-                callingUid,
-                label,
-                StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED);
-        return true;
-    }
-
-    /**
-     * Logs an event for binary push for module updates.
-     *
-     * @param trainName        name of install train.
-     * @param trainVersionCode version code of the train.
-     * @param options          optional flags about this install.
-     *                         The last 3 bits indicate options:
-     *                             0x01: FLAG_REQUIRE_STAGING
-     *                             0x02: FLAG_ROLLBACK_ENABLED
-     *                             0x04: FLAG_REQUIRE_LOW_LATENCY_MONITOR
-     * @param state            current install state. Defined as State enums in
-     *                         BinaryPushStateChanged atom in
-     *                         frameworks/base/cmds/statsd/src/atoms.proto
-     * @param experimentIds    experiment ids.
-     * @return True if the log request was sent to statsd.
-     */
-    @RequiresPermission(allOf = {DUMP, PACKAGE_USAGE_STATS})
-    public static boolean logBinaryPushStateChanged(@NonNull String trainName,
-            long trainVersionCode, int options, int state,
-            @NonNull long[] experimentIds) {
-        ProtoOutputStream proto = new ProtoOutputStream();
-        for (long id : experimentIds) {
-            proto.write(
-                    ProtoOutputStream.FIELD_TYPE_INT64
-                    | ProtoOutputStream.FIELD_COUNT_REPEATED
-                    | EXPERIMENT_IDS_FIELD_ID,
-                    id);
-        }
-        StatsdStatsLog.write(StatsdStatsLog.BINARY_PUSH_STATE_CHANGED,
-                trainName,
-                trainVersionCode,
-                (options & IStatsd.FLAG_REQUIRE_STAGING) > 0,
-                (options & IStatsd.FLAG_ROLLBACK_ENABLED) > 0,
-                (options & IStatsd.FLAG_REQUIRE_LOW_LATENCY_MONITOR) > 0,
-                state,
-                proto.getBytes(),
-                0,
-                0,
-                false);
-        return true;
-    }
-
-    /**
-     * Write an event to stats log using the raw format.
-     *
-     * @param buffer    The encoded buffer of data to write.
-     * @param size      The number of bytes from the buffer to write.
-     * @hide
-     */
-    // TODO(b/144935988): Mark deprecated.
-    @SystemApi
-    public static void writeRaw(@NonNull byte[] buffer, int size) {
-        // TODO(b/144935988): make this no-op once clients have migrated to StatsEvent.
-        writeImpl(buffer, size, 0);
-    }
-
-    /**
-     * Write an event to stats log using the raw format.
-     *
-     * @param buffer    The encoded buffer of data to write.
-     * @param size      The number of bytes from the buffer to write.
-     * @param atomId    The id of the atom to which the event belongs.
-     */
-    private static native void writeImpl(@NonNull byte[] buffer, int size, int atomId);
-
-    /**
-     * Write an event to stats log using the raw format encapsulated in StatsEvent.
-     * After writing to stats log, release() is called on the StatsEvent object.
-     * No further action should be taken on the StatsEvent object following this call.
-     *
-     * @param statsEvent    The StatsEvent object containing the encoded buffer of data to write.
-     * @hide
-     */
-    @SystemApi
-    public static void write(@NonNull final StatsEvent statsEvent) {
-        writeImpl(statsEvent.getBytes(), statsEvent.getNumBytes(), statsEvent.getAtomId());
-        statsEvent.release();
-    }
-
-    private static void enforceDumpCallingPermission(Context context) {
-        context.enforceCallingPermission(android.Manifest.permission.DUMP, "Need DUMP permission.");
-    }
-
-    private static void enforcesageStatsCallingPermission(Context context) {
-        context.enforceCallingPermission(Manifest.permission.PACKAGE_USAGE_STATS,
-                "Need PACKAGE_USAGE_STATS permission.");
-    }
-}
diff --git a/apex/statsd/framework/test/Android.bp b/apex/statsd/framework/test/Android.bp
deleted file mode 100644
index b113d595..0000000
--- a/apex/statsd/framework/test/Android.bp
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2020 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-android_test {
-    name: "FrameworkStatsdTest",
-    platform_apis: true,
-    srcs: [
-        // TODO(b/147705194): Use framework-statsd as a lib dependency instead.
-        ":framework-statsd-sources",
-        "**/*.java",
-    ],
-    manifest: "AndroidManifest.xml",
-    static_libs: [
-        "androidx.test.rules",
-        "truth-prebuilt",
-    ],
-    libs: [
-        "android.test.runner.stubs",
-        "android.test.base.stubs",
-    ],
-    test_suites: [
-        "device-tests",
-        "mts",
-    ],
-}
\ No newline at end of file
diff --git a/apex/statsd/framework/test/AndroidManifest.xml b/apex/statsd/framework/test/AndroidManifest.xml
deleted file mode 100644
index 8f89d23..0000000
--- a/apex/statsd/framework/test/AndroidManifest.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2020 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT 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.os.statsd.framework.test"
-        >
-
-    <instrumentation
-            android:name="androidx.test.runner.AndroidJUnitRunner"
-            android:targetPackage="com.android.os.statsd.framework.test"
-            android:label="Framework Statsd Tests" />
-
-</manifest>
diff --git a/apex/statsd/framework/test/AndroidTest.xml b/apex/statsd/framework/test/AndroidTest.xml
deleted file mode 100644
index fb51915..0000000
--- a/apex/statsd/framework/test/AndroidTest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2020 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<configuration description="Runs Tests for Statsd.">
-    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
-        <option name="test-file-name" value="FrameworkStatsdTest.apk" />
-        <option name="install-arg" value="-g" />
-    </target_preparer>
-
-    <option name="test-suite-tag" value="apct" />
-    <option name="test-suite-tag" value="mts" />
-    <option name="test-tag" value="FrameworkStatsdTest" />
-    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
-        <option name="package" value="com.android.os.statsd.framework.test" />
-        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
-        <option name="hidden-api-checks" value="false"/>
-    </test>
-
-    <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
-        <option name="mainline-module-package-name" value="com.google.android.os.statsd" />
-    </object>
-</configuration>
\ No newline at end of file
diff --git a/apex/statsd/framework/test/src/android/app/PullAtomMetadataTest.java b/apex/statsd/framework/test/src/android/app/PullAtomMetadataTest.java
deleted file mode 100644
index fd386bd..0000000
--- a/apex/statsd/framework/test/src/android/app/PullAtomMetadataTest.java
+++ /dev/null
@@ -1,85 +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 android.app;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.app.StatsManager.PullAtomMetadata;
-
-import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@SmallTest
-@RunWith(AndroidJUnit4.class)
-public final class PullAtomMetadataTest {
-
-    @Test
-    public void testEmpty() {
-        PullAtomMetadata metadata = new PullAtomMetadata.Builder().build();
-        assertThat(metadata.getTimeoutMillis()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_MILLIS);
-        assertThat(metadata.getCoolDownMillis()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_MILLIS);
-        assertThat(metadata.getAdditiveFields()).isNull();
-    }
-
-    @Test
-    public void testSetTimeoutMillis() {
-        long timeoutMillis = 500L;
-        PullAtomMetadata metadata =
-                new PullAtomMetadata.Builder().setTimeoutMillis(timeoutMillis).build();
-        assertThat(metadata.getTimeoutMillis()).isEqualTo(timeoutMillis);
-        assertThat(metadata.getCoolDownMillis()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_MILLIS);
-        assertThat(metadata.getAdditiveFields()).isNull();
-    }
-
-    @Test
-    public void testSetCoolDownMillis() {
-        long coolDownMillis = 10_000L;
-        PullAtomMetadata metadata =
-                new PullAtomMetadata.Builder().setCoolDownMillis(coolDownMillis).build();
-        assertThat(metadata.getTimeoutMillis()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_MILLIS);
-        assertThat(metadata.getCoolDownMillis()).isEqualTo(coolDownMillis);
-        assertThat(metadata.getAdditiveFields()).isNull();
-    }
-
-    @Test
-    public void testSetAdditiveFields() {
-        int[] fields = {2, 4, 6};
-        PullAtomMetadata metadata =
-                new PullAtomMetadata.Builder().setAdditiveFields(fields).build();
-        assertThat(metadata.getTimeoutMillis()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_MILLIS);
-        assertThat(metadata.getCoolDownMillis()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_MILLIS);
-        assertThat(metadata.getAdditiveFields()).isEqualTo(fields);
-    }
-
-    @Test
-    public void testSetAllElements() {
-        long timeoutMillis = 300L;
-        long coolDownMillis = 9572L;
-        int[] fields = {3, 2};
-        PullAtomMetadata metadata = new PullAtomMetadata.Builder()
-                .setTimeoutMillis(timeoutMillis)
-                .setCoolDownMillis(coolDownMillis)
-                .setAdditiveFields(fields)
-                .build();
-        assertThat(metadata.getTimeoutMillis()).isEqualTo(timeoutMillis);
-        assertThat(metadata.getCoolDownMillis()).isEqualTo(coolDownMillis);
-        assertThat(metadata.getAdditiveFields()).isEqualTo(fields);
-    }
-}
diff --git a/apex/statsd/framework/test/src/android/os/StatsDimensionsValueTest.java b/apex/statsd/framework/test/src/android/os/StatsDimensionsValueTest.java
deleted file mode 100644
index db25911..0000000
--- a/apex/statsd/framework/test/src/android/os/StatsDimensionsValueTest.java
+++ /dev/null
@@ -1,115 +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 android.os;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-import java.util.List;
-
-@RunWith(JUnit4.class)
-public final class StatsDimensionsValueTest {
-
-    @Test
-    public void testConversionFromStructuredParcel() {
-        int tupleField = 100; // atom id
-        String stringValue = "Hello";
-        int intValue = 123;
-        long longValue = 123456789L;
-        float floatValue = 1.1f;
-        boolean boolValue = true;
-
-        // Construct structured parcel
-        StatsDimensionsValueParcel sdvp = new StatsDimensionsValueParcel();
-        sdvp.field = tupleField;
-        sdvp.valueType = StatsDimensionsValue.TUPLE_VALUE_TYPE;
-        sdvp.tupleValue = new StatsDimensionsValueParcel[5];
-
-        for (int i = 0; i < 5; i++) {
-            sdvp.tupleValue[i] = new StatsDimensionsValueParcel();
-            sdvp.tupleValue[i].field = i + 1;
-        }
-
-        sdvp.tupleValue[0].valueType = StatsDimensionsValue.STRING_VALUE_TYPE;
-        sdvp.tupleValue[1].valueType = StatsDimensionsValue.INT_VALUE_TYPE;
-        sdvp.tupleValue[2].valueType = StatsDimensionsValue.LONG_VALUE_TYPE;
-        sdvp.tupleValue[3].valueType = StatsDimensionsValue.FLOAT_VALUE_TYPE;
-        sdvp.tupleValue[4].valueType = StatsDimensionsValue.BOOLEAN_VALUE_TYPE;
-
-        sdvp.tupleValue[0].stringValue = stringValue;
-        sdvp.tupleValue[1].intValue = intValue;
-        sdvp.tupleValue[2].longValue = longValue;
-        sdvp.tupleValue[3].floatValue = floatValue;
-        sdvp.tupleValue[4].boolValue = boolValue;
-
-        // Convert to StatsDimensionsValue and check result
-        StatsDimensionsValue sdv = new StatsDimensionsValue(sdvp);
-
-        assertThat(sdv.getField()).isEqualTo(tupleField);
-        assertThat(sdv.getValueType()).isEqualTo(StatsDimensionsValue.TUPLE_VALUE_TYPE);
-        List<StatsDimensionsValue> sdvChildren = sdv.getTupleValueList();
-        assertThat(sdvChildren.size()).isEqualTo(5);
-
-        for (int i = 0; i < 5; i++) {
-            assertThat(sdvChildren.get(i).getField()).isEqualTo(i + 1);
-        }
-
-        assertThat(sdvChildren.get(0).getValueType())
-              .isEqualTo(StatsDimensionsValue.STRING_VALUE_TYPE);
-        assertThat(sdvChildren.get(1).getValueType())
-              .isEqualTo(StatsDimensionsValue.INT_VALUE_TYPE);
-        assertThat(sdvChildren.get(2).getValueType())
-              .isEqualTo(StatsDimensionsValue.LONG_VALUE_TYPE);
-        assertThat(sdvChildren.get(3).getValueType())
-              .isEqualTo(StatsDimensionsValue.FLOAT_VALUE_TYPE);
-        assertThat(sdvChildren.get(4).getValueType())
-              .isEqualTo(StatsDimensionsValue.BOOLEAN_VALUE_TYPE);
-
-        assertThat(sdvChildren.get(0).getStringValue()).isEqualTo(stringValue);
-        assertThat(sdvChildren.get(1).getIntValue()).isEqualTo(intValue);
-        assertThat(sdvChildren.get(2).getLongValue()).isEqualTo(longValue);
-        assertThat(sdvChildren.get(3).getFloatValue()).isEqualTo(floatValue);
-        assertThat(sdvChildren.get(4).getBooleanValue()).isEqualTo(boolValue);
-
-        // Ensure that StatsDimensionsValue and StatsDimensionsValueParcel are
-        // parceled equivalently
-        Parcel sdvpParcel = Parcel.obtain();
-        Parcel sdvParcel = Parcel.obtain();
-        sdvp.writeToParcel(sdvpParcel, 0);
-        sdv.writeToParcel(sdvParcel, 0);
-        assertThat(sdvpParcel.dataSize()).isEqualTo(sdvParcel.dataSize());
-    }
-
-    @Test
-    public void testNullTupleArray() {
-        int tupleField = 100; // atom id
-
-        StatsDimensionsValueParcel parcel = new StatsDimensionsValueParcel();
-        parcel.field = tupleField;
-        parcel.valueType = StatsDimensionsValue.TUPLE_VALUE_TYPE;
-        parcel.tupleValue = null;
-
-        StatsDimensionsValue sdv = new StatsDimensionsValue(parcel);
-        assertThat(sdv.getField()).isEqualTo(tupleField);
-        assertThat(sdv.getValueType()).isEqualTo(StatsDimensionsValue.TUPLE_VALUE_TYPE);
-        List<StatsDimensionsValue> sdvChildren = sdv.getTupleValueList();
-        assertThat(sdvChildren.size()).isEqualTo(0);
-    }
-}
diff --git a/apex/statsd/framework/test/src/android/util/StatsEventTest.java b/apex/statsd/framework/test/src/android/util/StatsEventTest.java
deleted file mode 100644
index 8d26369..0000000
--- a/apex/statsd/framework/test/src/android/util/StatsEventTest.java
+++ /dev/null
@@ -1,818 +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 android.util;
-
-import static com.google.common.truth.Truth.assertThat;
-import static com.google.common.truth.Truth.assertWithMessage;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-
-import android.os.SystemClock;
-
-import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
-
-import com.google.common.collect.Range;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Random;
-
-/**
- * Internal tests for {@link StatsEvent}.
- */
-@SmallTest
-@RunWith(AndroidJUnit4.class)
-public class StatsEventTest {
-
-    @Test
-    public void testNoFields() {
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder().usePooledBuffer().build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        final int expectedAtomId = 0;
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(3);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("Third element is not errors type")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_ERRORS);
-
-        final int errorMask = buffer.getInt();
-
-        assertWithMessage("ERROR_NO_ATOM_ID should be the only error in the error mask")
-                .that(errorMask).isEqualTo(StatsEvent.ERROR_NO_ATOM_ID);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testOnlyAtomId() {
-        final int expectedAtomId = 109;
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                .setAtomId(expectedAtomId)
-                .usePooledBuffer()
-                .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(2);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testIntBooleanIntInt() {
-        final int expectedAtomId = 109;
-        final int field1 = 1;
-        final boolean field2 = true;
-        final int field3 = 3;
-        final int field4 = 4;
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                .setAtomId(expectedAtomId)
-                .writeInt(field1)
-                .writeBoolean(field2)
-                .writeInt(field3)
-                .writeInt(field4)
-                .usePooledBuffer()
-                .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(6);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("First field is not Int")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect field 1")
-                .that(buffer.getInt()).isEqualTo(field1);
-
-        assertWithMessage("Second field is not Boolean")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_BOOLEAN);
-
-        assertWithMessage("Incorrect field 2")
-                .that(buffer.get()).isEqualTo(1);
-
-        assertWithMessage("Third field is not Int")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect field 3")
-                .that(buffer.getInt()).isEqualTo(field3);
-
-        assertWithMessage("Fourth field is not Int")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect field 4")
-                .that(buffer.getInt()).isEqualTo(field4);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testStringFloatByteArray() {
-        final int expectedAtomId = 109;
-        final String field1 = "Str 1";
-        final float field2 = 9.334f;
-        final byte[] field3 = new byte[] { 56, 23, 89, -120 };
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                .setAtomId(expectedAtomId)
-                .writeString(field1)
-                .writeFloat(field2)
-                .writeByteArray(field3)
-                .usePooledBuffer()
-                .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(5);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("First field is not String")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_STRING);
-
-        final String field1Actual = getStringFromByteBuffer(buffer);
-        assertWithMessage("Incorrect field 1")
-                .that(field1Actual).isEqualTo(field1);
-
-        assertWithMessage("Second field is not Float")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_FLOAT);
-
-        assertWithMessage("Incorrect field 2")
-                .that(buffer.getFloat()).isEqualTo(field2);
-
-        assertWithMessage("Third field is not byte array")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_BYTE_ARRAY);
-
-        final byte[] field3Actual = getByteArrayFromByteBuffer(buffer);
-        assertWithMessage("Incorrect field 3")
-                .that(field3Actual).isEqualTo(field3);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testAttributionChainLong() {
-        final int expectedAtomId = 109;
-        final int[] uids = new int[] { 1, 2, 3, 4, 5 };
-        final String[] tags = new String[] { "1", "2", "3", "4", "5" };
-        final long field2 = -230909823L;
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                .setAtomId(expectedAtomId)
-                .writeAttributionChain(uids, tags)
-                .writeLong(field2)
-                .usePooledBuffer()
-                .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(4);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("First field is not Attribution Chain")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_ATTRIBUTION_CHAIN);
-
-        assertWithMessage("Incorrect number of attribution nodes")
-                .that(buffer.get()).isEqualTo((byte) uids.length);
-
-        for (int i = 0; i < tags.length; i++) {
-            assertWithMessage("Incorrect uid in Attribution Chain")
-                    .that(buffer.getInt()).isEqualTo(uids[i]);
-
-            final String tag = getStringFromByteBuffer(buffer);
-            assertWithMessage("Incorrect tag in Attribution Chain")
-                    .that(tag).isEqualTo(tags[i]);
-        }
-
-        assertWithMessage("Second field is not Long")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect field 2")
-                .that(buffer.getLong()).isEqualTo(field2);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testKeyValuePairs() {
-        final int expectedAtomId = 109;
-        final SparseIntArray intMap = new SparseIntArray();
-        final SparseLongArray longMap = new SparseLongArray();
-        final SparseArray<String> stringMap = new SparseArray<>();
-        final SparseArray<Float> floatMap = new SparseArray<>();
-        intMap.put(1, -1);
-        intMap.put(2, -2);
-        stringMap.put(3, "abc");
-        stringMap.put(4, "2h");
-        floatMap.put(9, -234.344f);
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                .setAtomId(expectedAtomId)
-                .writeKeyValuePairs(intMap, longMap, stringMap, floatMap)
-                .usePooledBuffer()
-                .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(3);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("First field is not KeyValuePairs")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_KEY_VALUE_PAIRS);
-
-        assertWithMessage("Incorrect number of key value pairs")
-                .that(buffer.get()).isEqualTo(
-                        (byte) (intMap.size() + longMap.size() + stringMap.size()
-                                + floatMap.size()));
-
-        for (int i = 0; i < intMap.size(); i++) {
-            assertWithMessage("Incorrect key in intMap")
-                    .that(buffer.getInt()).isEqualTo(intMap.keyAt(i));
-            assertWithMessage("The type id of the value should be TYPE_INT in intMap")
-                    .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-            assertWithMessage("Incorrect value in intMap")
-                    .that(buffer.getInt()).isEqualTo(intMap.valueAt(i));
-        }
-
-        for (int i = 0; i < longMap.size(); i++) {
-            assertWithMessage("Incorrect key in longMap")
-                    .that(buffer.getInt()).isEqualTo(longMap.keyAt(i));
-            assertWithMessage("The type id of the value should be TYPE_LONG in longMap")
-                    .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-            assertWithMessage("Incorrect value in longMap")
-                    .that(buffer.getLong()).isEqualTo(longMap.valueAt(i));
-        }
-
-        for (int i = 0; i < stringMap.size(); i++) {
-            assertWithMessage("Incorrect key in stringMap")
-                    .that(buffer.getInt()).isEqualTo(stringMap.keyAt(i));
-            assertWithMessage("The type id of the value should be TYPE_STRING in stringMap")
-                    .that(buffer.get()).isEqualTo(StatsEvent.TYPE_STRING);
-            final String value = getStringFromByteBuffer(buffer);
-            assertWithMessage("Incorrect value in stringMap")
-                    .that(value).isEqualTo(stringMap.valueAt(i));
-        }
-
-        for (int i = 0; i < floatMap.size(); i++) {
-            assertWithMessage("Incorrect key in floatMap")
-                    .that(buffer.getInt()).isEqualTo(floatMap.keyAt(i));
-            assertWithMessage("The type id of the value should be TYPE_FLOAT in floatMap")
-                    .that(buffer.get()).isEqualTo(StatsEvent.TYPE_FLOAT);
-            assertWithMessage("Incorrect value in floatMap")
-                    .that(buffer.getFloat()).isEqualTo(floatMap.valueAt(i));
-        }
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testSingleAnnotations() {
-        final int expectedAtomId = 109;
-        final int field1 = 1;
-        final byte field1AnnotationId = 45;
-        final boolean field1AnnotationValue = false;
-        final boolean field2 = true;
-        final byte field2AnnotationId = 1;
-        final int field2AnnotationValue = 23;
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                .setAtomId(expectedAtomId)
-                .writeInt(field1)
-                .addBooleanAnnotation(field1AnnotationId, field1AnnotationValue)
-                .writeBoolean(field2)
-                .addIntAnnotation(field2AnnotationId, field2AnnotationValue)
-                .usePooledBuffer()
-                .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(4);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        final byte field1Header = buffer.get();
-        final int field1AnnotationValueCount = field1Header >> 4;
-        final byte field1Type = (byte) (field1Header & 0x0F);
-        assertWithMessage("First field is not Int")
-                .that(field1Type).isEqualTo(StatsEvent.TYPE_INT);
-        assertWithMessage("First field annotation count is wrong")
-                .that(field1AnnotationValueCount).isEqualTo(1);
-        assertWithMessage("Incorrect field 1")
-                .that(buffer.getInt()).isEqualTo(field1);
-        assertWithMessage("First field's annotation id is wrong")
-                .that(buffer.get()).isEqualTo(field1AnnotationId);
-        assertWithMessage("First field's annotation type is wrong")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_BOOLEAN);
-        assertWithMessage("First field's annotation value is wrong")
-                .that(buffer.get()).isEqualTo(field1AnnotationValue ? 1 : 0);
-
-        final byte field2Header = buffer.get();
-        final int field2AnnotationValueCount = field2Header >> 4;
-        final byte field2Type = (byte) (field2Header & 0x0F);
-        assertWithMessage("Second field is not boolean")
-                .that(field2Type).isEqualTo(StatsEvent.TYPE_BOOLEAN);
-        assertWithMessage("Second field annotation count is wrong")
-                .that(field2AnnotationValueCount).isEqualTo(1);
-        assertWithMessage("Incorrect field 2")
-                .that(buffer.get()).isEqualTo(field2 ? 1 : 0);
-        assertWithMessage("Second field's annotation id is wrong")
-                .that(buffer.get()).isEqualTo(field2AnnotationId);
-        assertWithMessage("Second field's annotation type is wrong")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-        assertWithMessage("Second field's annotation value is wrong")
-                .that(buffer.getInt()).isEqualTo(field2AnnotationValue);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testAtomIdAnnotations() {
-        final int expectedAtomId = 109;
-        final byte atomAnnotationId = 84;
-        final int atomAnnotationValue = 9;
-        final int field1 = 1;
-        final byte field1AnnotationId = 45;
-        final boolean field1AnnotationValue = false;
-        final boolean field2 = true;
-        final byte field2AnnotationId = 1;
-        final int field2AnnotationValue = 23;
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                .setAtomId(expectedAtomId)
-                .addIntAnnotation(atomAnnotationId, atomAnnotationValue)
-                .writeInt(field1)
-                .addBooleanAnnotation(field1AnnotationId, field1AnnotationValue)
-                .writeBoolean(field2)
-                .addIntAnnotation(field2AnnotationId, field2AnnotationValue)
-                .usePooledBuffer()
-                .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(4);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        final byte atomIdHeader = buffer.get();
-        final int atomIdAnnotationValueCount = atomIdHeader >> 4;
-        final byte atomIdValueType = (byte) (atomIdHeader & 0x0F);
-        assertWithMessage("Second element is not atom id")
-                .that(atomIdValueType).isEqualTo(StatsEvent.TYPE_INT);
-        assertWithMessage("Atom id annotation count is wrong")
-                .that(atomIdAnnotationValueCount).isEqualTo(1);
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-        assertWithMessage("Atom id's annotation id is wrong")
-                .that(buffer.get()).isEqualTo(atomAnnotationId);
-        assertWithMessage("Atom id's annotation type is wrong")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-        assertWithMessage("Atom id's annotation value is wrong")
-                .that(buffer.getInt()).isEqualTo(atomAnnotationValue);
-
-        final byte field1Header = buffer.get();
-        final int field1AnnotationValueCount = field1Header >> 4;
-        final byte field1Type = (byte) (field1Header & 0x0F);
-        assertWithMessage("First field is not Int")
-                .that(field1Type).isEqualTo(StatsEvent.TYPE_INT);
-        assertWithMessage("First field annotation count is wrong")
-                .that(field1AnnotationValueCount).isEqualTo(1);
-        assertWithMessage("Incorrect field 1")
-                .that(buffer.getInt()).isEqualTo(field1);
-        assertWithMessage("First field's annotation id is wrong")
-                .that(buffer.get()).isEqualTo(field1AnnotationId);
-        assertWithMessage("First field's annotation type is wrong")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_BOOLEAN);
-        assertWithMessage("First field's annotation value is wrong")
-                .that(buffer.get()).isEqualTo(field1AnnotationValue ? 1 : 0);
-
-        final byte field2Header = buffer.get();
-        final int field2AnnotationValueCount = field2Header >> 4;
-        final byte field2Type = (byte) (field2Header & 0x0F);
-        assertWithMessage("Second field is not boolean")
-                .that(field2Type).isEqualTo(StatsEvent.TYPE_BOOLEAN);
-        assertWithMessage("Second field annotation count is wrong")
-                .that(field2AnnotationValueCount).isEqualTo(1);
-        assertWithMessage("Incorrect field 2")
-                .that(buffer.get()).isEqualTo(field2 ? 1 : 0);
-        assertWithMessage("Second field's annotation id is wrong")
-                .that(buffer.get()).isEqualTo(field2AnnotationId);
-        assertWithMessage("Second field's annotation type is wrong")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-        assertWithMessage("Second field's annotation value is wrong")
-                .that(buffer.getInt()).isEqualTo(field2AnnotationValue);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testSetAtomIdNotCalledImmediately() {
-        final int expectedAtomId = 109;
-        final int field1 = 25;
-        final boolean field2 = true;
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                .writeInt(field1)
-                .setAtomId(expectedAtomId)
-                .writeBoolean(field2)
-                .usePooledBuffer()
-                .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get()).isEqualTo(3);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong()).isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id")
-                .that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("Third element is not errors type")
-                .that(buffer.get()).isEqualTo(StatsEvent.TYPE_ERRORS);
-
-        final int errorMask = buffer.getInt();
-
-        assertWithMessage("ERROR_ATOM_ID_INVALID_POSITION should be the only error in the mask")
-                .that(errorMask).isEqualTo(StatsEvent.ERROR_ATOM_ID_INVALID_POSITION);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testLargePulledEvent() {
-        final int expectedAtomId = 10_020;
-        byte[] field1 = new byte[10 * 1024];
-        new Random().nextBytes(field1);
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent =
-                StatsEvent.newBuilder().setAtomId(expectedAtomId).writeByteArray(field1).build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get())
-                .isEqualTo(3);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong())
-                .isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id").that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("Third element is not byte array")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_BYTE_ARRAY);
-
-        final byte[] field1Actual = getByteArrayFromByteBuffer(buffer);
-        assertWithMessage("Incorrect field 1").that(field1Actual).isEqualTo(field1);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testPulledEventOverflow() {
-        final int expectedAtomId = 10_020;
-        byte[] field1 = new byte[50 * 1024];
-        new Random().nextBytes(field1);
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent =
-                StatsEvent.newBuilder().setAtomId(expectedAtomId).writeByteArray(field1).build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get())
-                .isEqualTo(3);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong())
-                .isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id").that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("Third element is not errors type")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_ERRORS);
-
-        final int errorMask = buffer.getInt();
-
-        assertWithMessage("ERROR_OVERFLOW should be the only error in the error mask")
-                .that(errorMask)
-                .isEqualTo(StatsEvent.ERROR_OVERFLOW);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    @Test
-    public void testPushedEventOverflow() {
-        final int expectedAtomId = 10_020;
-        byte[] field1 = new byte[10 * 1024];
-        new Random().nextBytes(field1);
-
-        final long minTimestamp = SystemClock.elapsedRealtimeNanos();
-        final StatsEvent statsEvent = StatsEvent.newBuilder()
-                                              .setAtomId(expectedAtomId)
-                                              .writeByteArray(field1)
-                                              .usePooledBuffer()
-                                              .build();
-        final long maxTimestamp = SystemClock.elapsedRealtimeNanos();
-
-        assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId);
-
-        final ByteBuffer buffer =
-                ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN);
-
-        assertWithMessage("Root element in buffer is not TYPE_OBJECT")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_OBJECT);
-
-        assertWithMessage("Incorrect number of elements in root object")
-                .that(buffer.get())
-                .isEqualTo(3);
-
-        assertWithMessage("First element is not timestamp")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_LONG);
-
-        assertWithMessage("Incorrect timestamp")
-                .that(buffer.getLong())
-                .isIn(Range.closed(minTimestamp, maxTimestamp));
-
-        assertWithMessage("Second element is not atom id")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_INT);
-
-        assertWithMessage("Incorrect atom id").that(buffer.getInt()).isEqualTo(expectedAtomId);
-
-        assertWithMessage("Third element is not errors type")
-                .that(buffer.get())
-                .isEqualTo(StatsEvent.TYPE_ERRORS);
-
-        final int errorMask = buffer.getInt();
-
-        assertWithMessage("ERROR_OVERFLOW should be the only error in the error mask")
-                .that(errorMask)
-                .isEqualTo(StatsEvent.ERROR_OVERFLOW);
-
-        assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position());
-
-        statsEvent.release();
-    }
-
-    private static byte[] getByteArrayFromByteBuffer(final ByteBuffer buffer) {
-        final int numBytes = buffer.getInt();
-        byte[] bytes = new byte[numBytes];
-        buffer.get(bytes);
-        return bytes;
-    }
-
-    private static String getStringFromByteBuffer(final ByteBuffer buffer) {
-        final byte[] bytes = getByteArrayFromByteBuffer(buffer);
-        return new String(bytes, UTF_8);
-    }
-}
diff --git a/apex/statsd/jni/android_util_StatsLog.cpp b/apex/statsd/jni/android_util_StatsLog.cpp
deleted file mode 100644
index 71ce949..0000000
--- a/apex/statsd/jni/android_util_StatsLog.cpp
+++ /dev/null
@@ -1,90 +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.
- */
-
-#define LOG_NAMESPACE "StatsLog.tag."
-#define LOG_TAG "StatsLog_println"
-
-#include <jni.h>
-#include <log/log.h>
-#include <nativehelper/scoped_local_ref.h>
-#include "stats_buffer_writer.h"
-
-namespace android {
-
-static void android_util_StatsLog_write(JNIEnv* env, jobject clazz, jbyteArray buf, jint size,
-        jint atomId) {
-    if (buf == NULL) {
-        return;
-    }
-    jint actualSize = env->GetArrayLength(buf);
-    if (actualSize < size) {
-        return;
-    }
-
-    jbyte* bufferArray = env->GetByteArrayElements(buf, NULL);
-    if (bufferArray == NULL) {
-        return;
-    }
-
-    write_buffer_to_statsd((void*) bufferArray, size, atomId);
-
-    env->ReleaseByteArrayElements(buf, bufferArray, 0);
-}
-
-/*
- * JNI registration.
- */
-static const JNINativeMethod gMethods[] = {
-    /* name, signature, funcPtr */
-    { "writeImpl", "([BII)V", (void*) android_util_StatsLog_write },
-};
-
-int register_android_util_StatsLog(JNIEnv* env)
-{
-    static const char* kStatsLogClass = "android/util/StatsLog";
-
-    ScopedLocalRef<jclass> cls(env, env->FindClass(kStatsLogClass));
-    if (cls.get() == nullptr) {
-        ALOGE("jni statsd registration failure, class not found '%s'", kStatsLogClass);
-        return JNI_ERR;
-    }
-
-    const jint count = sizeof(gMethods) / sizeof(gMethods[0]);
-    int status = env->RegisterNatives(cls.get(), gMethods, count);
-    if (status < 0) {
-        ALOGE("jni statsd registration failure, status: %d", status);
-        return JNI_ERR;
-    }
-    return JNI_VERSION_1_4;
-}
-
-}; // namespace android
-
-/*
- * JNI Initialization
- */
-jint JNI_OnLoad(JavaVM* jvm, void* reserved) {
-    JNIEnv* e;
-
-    ALOGV("statsd : loading JNI\n");
-    // Check JNI version
-    if (jvm->GetEnv((void**)&e, JNI_VERSION_1_4)) {
-        ALOGE("JNI version mismatch error");
-        return JNI_ERR;
-    }
-
-    return android::register_android_util_StatsLog(e);
-}
diff --git a/apex/statsd/service/Android.bp b/apex/statsd/service/Android.bp
deleted file mode 100644
index df0ccfc..0000000
--- a/apex/statsd/service/Android.bp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2020 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-filegroup {
-    name: "service-statsd-sources",
-    srcs: [
-        "java/**/*.java",
-    ],
-}
-
-java_library {
-    name: "service-statsd",
-    srcs: [ ":service-statsd-sources" ],
-    sdk_version: "system_server_current",
-    libs: [
-        "framework-annotations-lib",
-        "framework-statsd",
-    ],
-    plugins: ["java_api_finder"],
-    apex_available: [
-        "com.android.os.statsd",
-        "test_com.android.os.statsd",
-    ],
-}
diff --git a/apex/statsd/service/java/com/android/server/stats/StatsCompanion.java b/apex/statsd/service/java/com/android/server/stats/StatsCompanion.java
deleted file mode 100644
index dc477a5..0000000
--- a/apex/statsd/service/java/com/android/server/stats/StatsCompanion.java
+++ /dev/null
@@ -1,188 +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.server.stats;
-
-import android.app.PendingIntent;
-import android.app.StatsManager;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Binder;
-import android.os.IPendingIntentRef;
-import android.os.Process;
-import android.os.StatsDimensionsValue;
-import android.os.StatsDimensionsValueParcel;
-import android.util.Log;
-
-import com.android.server.SystemService;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-/**
- * @hide
- */
-public class StatsCompanion {
-    private static final String TAG = "StatsCompanion";
-    private static final boolean DEBUG = false;
-
-    private static final int AID_STATSD = 1066;
-
-    private static final String STATS_COMPANION_SERVICE = "statscompanion";
-    private static final String STATS_MANAGER_SERVICE = "statsmanager";
-
-    static void enforceStatsdCallingUid() {
-        if (Binder.getCallingPid() == Process.myPid()) {
-            return;
-        }
-        if (Binder.getCallingUid() != AID_STATSD) {
-            throw new SecurityException("Not allowed to access StatsCompanion");
-        }
-    }
-
-    /**
-     * Lifecycle class for both {@link StatsCompanionService} and {@link StatsManagerService}.
-     */
-    public static final class Lifecycle extends SystemService {
-        private StatsCompanionService mStatsCompanionService;
-        private StatsManagerService mStatsManagerService;
-
-        public Lifecycle(Context context) {
-            super(context);
-        }
-
-        @Override
-        public void onStart() {
-            mStatsCompanionService = new StatsCompanionService(getContext());
-            mStatsManagerService = new StatsManagerService(getContext());
-            mStatsCompanionService.setStatsManagerService(mStatsManagerService);
-            mStatsManagerService.setStatsCompanionService(mStatsCompanionService);
-
-            try {
-                publishBinderService(STATS_COMPANION_SERVICE, mStatsCompanionService);
-                if (DEBUG) Log.d(TAG, "Published " + STATS_COMPANION_SERVICE);
-                publishBinderService(STATS_MANAGER_SERVICE, mStatsManagerService);
-                if (DEBUG) Log.d(TAG, "Published " + STATS_MANAGER_SERVICE);
-            } catch (Exception e) {
-                Log.e(TAG, "Failed to publishBinderService", e);
-            }
-        }
-
-        @Override
-        public void onBootPhase(int phase) {
-            super.onBootPhase(phase);
-            if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
-                mStatsCompanionService.systemReady();
-            }
-            if (phase == PHASE_BOOT_COMPLETED) {
-                mStatsCompanionService.bootCompleted();
-            }
-        }
-    }
-
-    /**
-     * Wrapper for {@link PendingIntent}. Allows Statsd to send PendingIntents.
-     */
-    public static class PendingIntentRef extends IPendingIntentRef.Stub {
-
-        private static final String TAG = "PendingIntentRef";
-
-        /**
-         * The last report time is provided with each intent registered to
-         * StatsManager#setFetchReportsOperation. This allows easy de-duping in the receiver if
-         * statsd is requesting the client to retrieve the same statsd data. The last report time
-         * corresponds to the last_report_elapsed_nanos that will provided in the current
-         * ConfigMetricsReport, and this timestamp also corresponds to the
-         * current_report_elapsed_nanos of the most recently obtained ConfigMetricsReport.
-         */
-        private static final String EXTRA_LAST_REPORT_TIME = "android.app.extra.LAST_REPORT_TIME";
-        private static final int CODE_DATA_BROADCAST = 1;
-        private static final int CODE_ACTIVE_CONFIGS_BROADCAST = 1;
-        private static final int CODE_SUBSCRIBER_BROADCAST = 1;
-
-        private final PendingIntent mPendingIntent;
-        private final Context mContext;
-
-        public PendingIntentRef(PendingIntent pendingIntent, Context context) {
-            mPendingIntent = pendingIntent;
-            mContext = context;
-        }
-
-        @Override
-        public void sendDataBroadcast(long lastReportTimeNs) {
-            enforceStatsdCallingUid();
-            Intent intent = new Intent();
-            intent.putExtra(EXTRA_LAST_REPORT_TIME, lastReportTimeNs);
-            try {
-                mPendingIntent.send(mContext, CODE_DATA_BROADCAST, intent, null, null);
-            } catch (PendingIntent.CanceledException e) {
-                Log.w(TAG, "Unable to send PendingIntent");
-            }
-        }
-
-        @Override
-        public void sendActiveConfigsChangedBroadcast(long[] configIds) {
-            enforceStatsdCallingUid();
-            Intent intent = new Intent();
-            intent.putExtra(StatsManager.EXTRA_STATS_ACTIVE_CONFIG_KEYS, configIds);
-            try {
-                mPendingIntent.send(mContext, CODE_ACTIVE_CONFIGS_BROADCAST, intent, null, null);
-                if (DEBUG) {
-                    Log.d(TAG, "Sent broadcast with config ids " + Arrays.toString(configIds));
-                }
-            } catch (PendingIntent.CanceledException e) {
-                Log.w(TAG, "Unable to send active configs changed broadcast using PendingIntent");
-            }
-        }
-
-        @Override
-        public void sendSubscriberBroadcast(long configUid, long configId, long subscriptionId,
-                long subscriptionRuleId, String[] cookies,
-                StatsDimensionsValueParcel dimensionsValueParcel) {
-            enforceStatsdCallingUid();
-            StatsDimensionsValue dimensionsValue = new StatsDimensionsValue(dimensionsValueParcel);
-            Intent intent =
-                    new Intent()
-                            .putExtra(StatsManager.EXTRA_STATS_CONFIG_UID, configUid)
-                            .putExtra(StatsManager.EXTRA_STATS_CONFIG_KEY, configId)
-                            .putExtra(StatsManager.EXTRA_STATS_SUBSCRIPTION_ID, subscriptionId)
-                            .putExtra(StatsManager.EXTRA_STATS_SUBSCRIPTION_RULE_ID,
-                                    subscriptionRuleId)
-                            .putExtra(StatsManager.EXTRA_STATS_DIMENSIONS_VALUE, dimensionsValue);
-
-            ArrayList<String> cookieList = new ArrayList<>(cookies.length);
-            cookieList.addAll(Arrays.asList(cookies));
-            intent.putStringArrayListExtra(
-                    StatsManager.EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES, cookieList);
-
-            if (DEBUG) {
-                Log.d(TAG,
-                        String.format(
-                                "Statsd sendSubscriberBroadcast with params {%d %d %d %d %s %s}",
-                                configUid, configId, subscriptionId, subscriptionRuleId,
-                                Arrays.toString(cookies),
-                                dimensionsValue));
-            }
-            try {
-                mPendingIntent.send(mContext, CODE_SUBSCRIBER_BROADCAST, intent, null, null);
-            } catch (PendingIntent.CanceledException e) {
-                Log.w(TAG,
-                        "Unable to send using PendingIntent from uid " + configUid
-                                + "; presumably it had been cancelled.");
-            }
-        }
-    }
-}
diff --git a/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java b/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java
deleted file mode 100644
index b5e7224..0000000
--- a/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java
+++ /dev/null
@@ -1,751 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.server.stats;
-
-import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
-
-import android.app.AlarmManager;
-import android.app.AlarmManager.OnAlarmListener;
-import android.app.StatsManager;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.os.Binder;
-import android.os.Bundle;
-import android.os.FileUtils;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.IBinder;
-import android.os.IStatsCompanionService;
-import android.os.IStatsd;
-import android.os.Looper;
-import android.os.ParcelFileDescriptor;
-import android.os.PowerManager;
-import android.os.RemoteException;
-import android.os.StatsFrameworkInitializer;
-import android.os.SystemClock;
-import android.os.UserHandle;
-import android.os.UserManager;
-import android.util.Log;
-import android.util.proto.ProtoOutputStream;
-
-import com.android.internal.annotations.GuardedBy;
-
-import java.io.File;
-import java.io.FileDescriptor;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-/**
- * Helper service for statsd (the native stats management service in cmds/statsd/).
- * Used for registering and receiving alarms on behalf of statsd.
- *
- * @hide
- */
-public class StatsCompanionService extends IStatsCompanionService.Stub {
-
-    private static final long MILLIS_IN_A_DAY = TimeUnit.DAYS.toMillis(1);
-
-    public static final String RESULT_RECEIVER_CONTROLLER_KEY = "controller_activity";
-    public static final String CONFIG_DIR = "/data/misc/stats-service";
-
-    static final String TAG = "StatsCompanionService";
-    static final boolean DEBUG = false;
-    /**
-     * Hard coded field ids of frameworks/base/cmds/statsd/src/uid_data.proto
-     * to be used in ProtoOutputStream.
-     */
-    private static final int APPLICATION_INFO_FIELD_ID = 1;
-    private static final int UID_FIELD_ID = 1;
-    private static final int VERSION_FIELD_ID = 2;
-    private static final int VERSION_STRING_FIELD_ID = 3;
-    private static final int PACKAGE_NAME_FIELD_ID = 4;
-    private static final int INSTALLER_FIELD_ID = 5;
-
-    public static final int DEATH_THRESHOLD = 10;
-
-    static final class CompanionHandler extends Handler {
-        CompanionHandler(Looper looper) {
-            super(looper);
-        }
-    }
-
-    private final Context mContext;
-    private final AlarmManager mAlarmManager;
-    @GuardedBy("sStatsdLock")
-    private static IStatsd sStatsd;
-    private static final Object sStatsdLock = new Object();
-
-    private final OnAlarmListener mPullingAlarmListener;
-    private final OnAlarmListener mPeriodicAlarmListener;
-
-    private StatsManagerService mStatsManagerService;
-
-    @GuardedBy("sStatsdLock")
-    private final HashSet<Long> mDeathTimeMillis = new HashSet<>();
-    @GuardedBy("sStatsdLock")
-    private final HashMap<Long, String> mDeletedFiles = new HashMap<>();
-    private final CompanionHandler mHandler;
-
-    // Flag that is set when PHASE_BOOT_COMPLETED is triggered in the StatsCompanion lifecycle.
-    private AtomicBoolean mBootCompleted = new AtomicBoolean(false);
-
-    public StatsCompanionService(Context context) {
-        super();
-        mContext = context;
-        mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
-        if (DEBUG) Log.d(TAG, "Registered receiver for ACTION_PACKAGE_REPLACED and ADDED.");
-        HandlerThread handlerThread = new HandlerThread(TAG);
-        handlerThread.start();
-        mHandler = new CompanionHandler(handlerThread.getLooper());
-
-        mPullingAlarmListener = new PullingAlarmListener(context);
-        mPeriodicAlarmListener = new PeriodicAlarmListener(context);
-    }
-
-    private final static int[] toIntArray(List<Integer> list) {
-        int[] ret = new int[list.size()];
-        for (int i = 0; i < ret.length; i++) {
-            ret[i] = list.get(i);
-        }
-        return ret;
-    }
-
-    private final static long[] toLongArray(List<Long> list) {
-        long[] ret = new long[list.size()];
-        for (int i = 0; i < ret.length; i++) {
-            ret[i] = list.get(i);
-        }
-        return ret;
-    }
-
-    /**
-     * Non-blocking call to retrieve a reference to statsd
-     *
-     * @return IStatsd object if statsd is ready, null otherwise.
-     */
-    private static IStatsd getStatsdNonblocking() {
-        synchronized (sStatsdLock) {
-            return sStatsd;
-        }
-    }
-
-    private static void informAllUids(Context context) {
-        ParcelFileDescriptor[] fds;
-        try {
-            fds = ParcelFileDescriptor.createPipe();
-        } catch (IOException e) {
-            Log.e(TAG, "Failed to create a pipe to send uid map data.", e);
-            return;
-        }
-        HandlerThread backgroundThread = new HandlerThread(
-                "statsCompanionService.bg", THREAD_PRIORITY_BACKGROUND);
-        backgroundThread.start();
-        Handler handler = new Handler(backgroundThread.getLooper());
-        handler.post(() -> {
-            UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
-            PackageManager pm = context.getPackageManager();
-            final List<UserHandle> users = um.getUserHandles(true);
-            if (DEBUG) {
-                Log.d(TAG, "Iterating over " + users.size() + " userHandles.");
-            }
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd == null) {
-                return;
-            }
-            try {
-                statsd.informAllUidData(fds[0]);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to send uid map to statsd");
-            }
-            try {
-                fds[0].close();
-            } catch (IOException e) {
-                Log.e(TAG, "Failed to close the read side of the pipe.", e);
-            }
-            final ParcelFileDescriptor writeFd = fds[1];
-            FileOutputStream fout = new ParcelFileDescriptor.AutoCloseOutputStream(writeFd);
-            try {
-                ProtoOutputStream output = new ProtoOutputStream(fout);
-                int numRecords = 0;
-                // Add in all the apps for every user/profile.
-                for (UserHandle userHandle : users) {
-                    List<PackageInfo> pi =
-                            pm.getInstalledPackagesAsUser(PackageManager.MATCH_UNINSTALLED_PACKAGES
-                                            | PackageManager.MATCH_ANY_USER
-                                            | PackageManager.MATCH_APEX,
-                                    userHandle.getIdentifier());
-                    for (int j = 0; j < pi.size(); j++) {
-                        if (pi.get(j).applicationInfo != null) {
-                            String installer;
-                            try {
-                                installer = pm.getInstallerPackageName(pi.get(j).packageName);
-                            } catch (IllegalArgumentException e) {
-                                installer = "";
-                            }
-                            long applicationInfoToken =
-                                    output.start(ProtoOutputStream.FIELD_TYPE_MESSAGE
-                                            | ProtoOutputStream.FIELD_COUNT_REPEATED
-                                                    | APPLICATION_INFO_FIELD_ID);
-                            output.write(ProtoOutputStream.FIELD_TYPE_INT32
-                                    | ProtoOutputStream.FIELD_COUNT_SINGLE | UID_FIELD_ID,
-                                            pi.get(j).applicationInfo.uid);
-                            output.write(ProtoOutputStream.FIELD_TYPE_INT64
-                                    | ProtoOutputStream.FIELD_COUNT_SINGLE
-                                            | VERSION_FIELD_ID, pi.get(j).getLongVersionCode());
-                            output.write(ProtoOutputStream.FIELD_TYPE_STRING
-                                    | ProtoOutputStream.FIELD_COUNT_SINGLE
-                                    | VERSION_STRING_FIELD_ID,
-                                            pi.get(j).versionName);
-                            output.write(ProtoOutputStream.FIELD_TYPE_STRING
-                                    | ProtoOutputStream.FIELD_COUNT_SINGLE
-                                            | PACKAGE_NAME_FIELD_ID, pi.get(j).packageName);
-                            output.write(ProtoOutputStream.FIELD_TYPE_STRING
-                                    | ProtoOutputStream.FIELD_COUNT_SINGLE
-                                            | INSTALLER_FIELD_ID,
-                                                    installer == null ? "" : installer);
-                            numRecords++;
-                            output.end(applicationInfoToken);
-                        }
-                    }
-                }
-                output.flush();
-                if (DEBUG) {
-                    Log.d(TAG, "Sent data for " + numRecords + " apps");
-                }
-            } finally {
-                FileUtils.closeQuietly(fout);
-                backgroundThread.quit();
-                backgroundThread.interrupt();
-            }
-        });
-    }
-
-    private static class WakelockThread extends Thread {
-        private final PowerManager.WakeLock mWl;
-        private final Runnable mRunnable;
-
-        WakelockThread(Context context, String wakelockName, Runnable runnable) {
-            PowerManager powerManager = (PowerManager)
-                    context.getSystemService(Context.POWER_SERVICE);
-            mWl = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, wakelockName);
-            mRunnable = runnable;
-        }
-        @Override
-        public void run() {
-            try {
-                mRunnable.run();
-            } finally {
-                mWl.release();
-            }
-        }
-        @Override
-        public void start() {
-            mWl.acquire();
-            super.start();
-        }
-    }
-
-    private final static class AppUpdateReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            /**
-             * App updates actually consist of REMOVE, ADD, and then REPLACE broadcasts. To avoid
-             * waste, we ignore the REMOVE and ADD broadcasts that contain the replacing flag.
-             * If we can't find the value for EXTRA_REPLACING, we default to false.
-             */
-            if (!intent.getAction().equals(Intent.ACTION_PACKAGE_REPLACED)
-                    && intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
-                return; // Keep only replacing or normal add and remove.
-            }
-            if (DEBUG) Log.d(TAG, "StatsCompanionService noticed an app was updated.");
-            synchronized (sStatsdLock) {
-                if (sStatsd == null) {
-                    Log.w(TAG, "Could not access statsd to inform it of an app update");
-                    return;
-                }
-                try {
-                    if (intent.getAction().equals(Intent.ACTION_PACKAGE_REMOVED)) {
-                        Bundle b = intent.getExtras();
-                        int uid = b.getInt(Intent.EXTRA_UID);
-                        boolean replacing = intent.getBooleanExtra(Intent.EXTRA_REPLACING, false);
-                        if (!replacing) {
-                            // Don't bother sending an update if we're right about to get another
-                            // intent for the new version that's added.
-                            String app = intent.getData().getSchemeSpecificPart();
-                            sStatsd.informOnePackageRemoved(app, uid);
-                        }
-                    } else {
-                        PackageManager pm = context.getPackageManager();
-                        Bundle b = intent.getExtras();
-                        int uid = b.getInt(Intent.EXTRA_UID);
-                        String app = intent.getData().getSchemeSpecificPart();
-                        PackageInfo pi = pm.getPackageInfo(app, PackageManager.MATCH_ANY_USER);
-                        String installer;
-                        try {
-                            installer = pm.getInstallerPackageName(app);
-                        } catch (IllegalArgumentException e) {
-                            installer = "";
-                        }
-                        sStatsd.informOnePackage(
-                                app,
-                                uid,
-                                pi.getLongVersionCode(),
-                                pi.versionName == null ? "" : pi.versionName,
-                                installer == null ? "" : installer);
-                    }
-                } catch (Exception e) {
-                    Log.w(TAG, "Failed to inform statsd of an app update", e);
-                }
-            }
-        }
-    }
-
-    private static final class UserUpdateReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            // Pull the latest state of UID->app name, version mapping.
-            // Needed since the new user basically has a version of every app.
-            informAllUids(context);
-        }
-    }
-
-    public final static class PullingAlarmListener implements OnAlarmListener {
-        private final Context mContext;
-
-        PullingAlarmListener(Context context) {
-            mContext = context;
-        }
-
-        @Override
-        public void onAlarm() {
-            if (DEBUG) {
-                Log.d(TAG, "Time to poll something.");
-            }
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd == null) {
-                Log.w(TAG, "Could not access statsd to inform it of pulling alarm firing.");
-                return;
-            }
-
-            // Wakelock needs to be retained while calling statsd.
-            Thread thread = new WakelockThread(mContext,
-                    PullingAlarmListener.class.getCanonicalName(), new Runnable() {
-                        @Override
-                        public void run() {
-                            try {
-                                statsd.informPollAlarmFired();
-                            } catch (RemoteException e) {
-                                Log.w(TAG, "Failed to inform statsd of pulling alarm firing.", e);
-                            }
-                        }
-                    });
-            thread.start();
-        }
-    }
-
-    public final static class PeriodicAlarmListener implements OnAlarmListener {
-        private final Context mContext;
-
-        PeriodicAlarmListener(Context context) {
-            mContext = context;
-        }
-
-        @Override
-        public void onAlarm() {
-            if (DEBUG) {
-                Log.d(TAG, "Time to trigger periodic alarm.");
-            }
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd == null) {
-                Log.w(TAG, "Could not access statsd to inform it of periodic alarm firing.");
-                return;
-            }
-
-            // Wakelock needs to be retained while calling statsd.
-            Thread thread = new WakelockThread(mContext,
-                    PeriodicAlarmListener.class.getCanonicalName(), new Runnable() {
-                        @Override
-                        public void run() {
-                            try {
-                                statsd.informAlarmForSubscriberTriggeringFired();
-                            } catch (RemoteException e) {
-                                Log.w(TAG, "Failed to inform statsd of periodic alarm firing.", e);
-                            }
-                        }
-                    });
-            thread.start();
-        }
-    }
-
-    public final static class ShutdownEventReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            /**
-             * Skip immediately if intent is not relevant to device shutdown.
-             */
-            if (!intent.getAction().equals(Intent.ACTION_REBOOT)
-                    && !(intent.getAction().equals(Intent.ACTION_SHUTDOWN)
-                    && (intent.getFlags() & Intent.FLAG_RECEIVER_FOREGROUND) != 0)) {
-                return;
-            }
-
-            if (DEBUG) {
-                Log.i(TAG, "StatsCompanionService noticed a shutdown.");
-            }
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd == null) {
-                Log.w(TAG, "Could not access statsd to inform it of a shutdown event.");
-                return;
-            }
-            try {
-                // two way binder call
-                statsd.informDeviceShutdown();
-            } catch (Exception e) {
-                Log.w(TAG, "Failed to inform statsd of a shutdown event.", e);
-            }
-        }
-    }
-
-    @Override // Binder call
-    public void setAlarmForSubscriberTriggering(long timestampMs) {
-        StatsCompanion.enforceStatsdCallingUid();
-        if (DEBUG) {
-            Log.d(TAG,
-                    "Setting periodic alarm in about " + (timestampMs
-                            - SystemClock.elapsedRealtime()));
-        }
-        final long callingToken = Binder.clearCallingIdentity();
-        try {
-            // using ELAPSED_REALTIME, not ELAPSED_REALTIME_WAKEUP, so if device is asleep, will
-            // only fire when it awakens.
-            mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME, timestampMs, TAG + ".periodic",
-                    mPeriodicAlarmListener, mHandler);
-        } finally {
-            Binder.restoreCallingIdentity(callingToken);
-        }
-    }
-
-    @Override // Binder call
-    public void cancelAlarmForSubscriberTriggering() {
-        StatsCompanion.enforceStatsdCallingUid();
-        if (DEBUG) {
-            Log.d(TAG, "Cancelling periodic alarm");
-        }
-        final long callingToken = Binder.clearCallingIdentity();
-        try {
-            mAlarmManager.cancel(mPeriodicAlarmListener);
-        } finally {
-            Binder.restoreCallingIdentity(callingToken);
-        }
-    }
-
-    @Override // Binder call
-    public void setPullingAlarm(long nextPullTimeMs) {
-        StatsCompanion.enforceStatsdCallingUid();
-        if (DEBUG) {
-            Log.d(TAG, "Setting pulling alarm in about "
-                    + (nextPullTimeMs - SystemClock.elapsedRealtime()));
-        }
-        final long callingToken = Binder.clearCallingIdentity();
-        try {
-            // using ELAPSED_REALTIME, not ELAPSED_REALTIME_WAKEUP, so if device is asleep, will
-            // only fire when it awakens.
-            mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME, nextPullTimeMs, TAG + ".pull",
-                    mPullingAlarmListener, mHandler);
-        } finally {
-            Binder.restoreCallingIdentity(callingToken);
-        }
-    }
-
-    @Override // Binder call
-    public void cancelPullingAlarm() {
-        StatsCompanion.enforceStatsdCallingUid();
-        if (DEBUG) {
-            Log.d(TAG, "Cancelling pulling alarm");
-        }
-        final long callingToken = Binder.clearCallingIdentity();
-        try {
-            mAlarmManager.cancel(mPullingAlarmListener);
-        } finally {
-            Binder.restoreCallingIdentity(callingToken);
-        }
-    }
-
-    @Override // Binder call
-    public void statsdReady() {
-        StatsCompanion.enforceStatsdCallingUid();
-        if (DEBUG) {
-            Log.d(TAG, "learned that statsdReady");
-        }
-        sayHiToStatsd(); // tell statsd that we're ready too and link to it
-
-        final Intent intent = new Intent(StatsManager.ACTION_STATSD_STARTED);
-        // Retrieve list of broadcast receivers for this broadcast & send them directed broadcasts
-        // to wake them up (if they're in background).
-        List<ResolveInfo> resolveInfos =
-                mContext.getPackageManager().queryBroadcastReceiversAsUser(
-                        intent, 0, UserHandle.SYSTEM);
-        if (resolveInfos == null || resolveInfos.isEmpty()) {
-            return; // No need to send broadcast.
-        }
-
-        for (ResolveInfo resolveInfo : resolveInfos) {
-            Intent intentToSend = new Intent(intent);
-            intentToSend.setComponent(new ComponentName(
-                    resolveInfo.activityInfo.applicationInfo.packageName,
-                    resolveInfo.activityInfo.name));
-            mContext.sendBroadcastAsUser(intentToSend, UserHandle.SYSTEM,
-                    android.Manifest.permission.DUMP);
-        }
-    }
-
-    @Override // Binder call
-    public boolean checkPermission(String permission, int pid, int uid) {
-        StatsCompanion.enforceStatsdCallingUid();
-        return mContext.checkPermission(permission, pid, uid) == PackageManager.PERMISSION_GRANTED;
-    }
-
-    // Statsd related code
-
-    /**
-     * Fetches the statsd IBinder service. This is a blocking call that always refetches statsd
-     * instead of returning the cached sStatsd.
-     * Note: This should only be called from {@link #sayHiToStatsd()}. All other clients should use
-     * the cached sStatsd via {@link #getStatsdNonblocking()}.
-     */
-    private IStatsd fetchStatsdServiceLocked() {
-        sStatsd = IStatsd.Stub.asInterface(StatsFrameworkInitializer
-                .getStatsServiceManager()
-                .getStatsdServiceRegisterer()
-                .get());
-        return sStatsd;
-    }
-
-    private void registerStatsdDeathRecipient(IStatsd statsd, List<BroadcastReceiver> receivers) {
-        StatsdDeathRecipient deathRecipient = new StatsdDeathRecipient(statsd, receivers);
-
-        try {
-            statsd.asBinder().linkToDeath(deathRecipient, /*flags=*/0);
-        } catch (RemoteException e) {
-            Log.e(TAG, "linkToDeath (StatsdDeathRecipient) failed");
-            // Statsd has already died. Unregister receivers ourselves.
-            for (BroadcastReceiver receiver : receivers) {
-                mContext.unregisterReceiver(receiver);
-            }
-            synchronized (sStatsdLock) {
-                if (statsd == sStatsd) {
-                    statsdNotReadyLocked();
-                }
-            }
-        }
-    }
-
-    /**
-     * Now that the android system is ready, StatsCompanion is ready too, so inform statsd.
-     */
-    void systemReady() {
-        if (DEBUG) Log.d(TAG, "Learned that systemReady");
-        sayHiToStatsd();
-    }
-
-    void setStatsManagerService(StatsManagerService statsManagerService) {
-        mStatsManagerService = statsManagerService;
-    }
-
-    /**
-     * Tells statsd that statscompanion is ready. If the binder call returns, link to
-     * statsd.
-     */
-    private void sayHiToStatsd() {
-        IStatsd statsd;
-        synchronized (sStatsdLock) {
-            if (sStatsd != null && sStatsd.asBinder().isBinderAlive()) {
-                Log.e(TAG, "statsd has already been fetched before",
-                        new IllegalStateException("IStatsd object should be null or dead"));
-                return;
-            }
-            statsd = fetchStatsdServiceLocked();
-        }
-
-        if (statsd == null) {
-            Log.i(TAG, "Could not yet find statsd to tell it that StatsCompanion is alive.");
-            return;
-        }
-
-        // Cleann up from previous statsd - cancel any alarms that had been set. Do this here
-        // instead of in binder death because statsd can come back and set different alarms, or not
-        // want to set an alarm when it had been set. This guarantees that when we get a new statsd,
-        // we cancel any alarms before it is able to set them.
-        cancelPullingAlarm();
-        cancelAlarmForSubscriberTriggering();
-
-        if (DEBUG) Log.d(TAG, "Saying hi to statsd");
-        mStatsManagerService.statsdReady(statsd);
-        try {
-            statsd.statsCompanionReady();
-
-            BroadcastReceiver appUpdateReceiver = new AppUpdateReceiver();
-            BroadcastReceiver userUpdateReceiver = new UserUpdateReceiver();
-            BroadcastReceiver shutdownEventReceiver = new ShutdownEventReceiver();
-
-            // Setup broadcast receiver for updates.
-            IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_REPLACED);
-            filter.addAction(Intent.ACTION_PACKAGE_ADDED);
-            filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
-            filter.addDataScheme("package");
-            mContext.registerReceiverForAllUsers(appUpdateReceiver, filter, null, null);
-
-            // Setup receiver for user initialize (which happens once for a new user)
-            // and if a user is removed.
-            filter = new IntentFilter(Intent.ACTION_USER_INITIALIZE);
-            filter.addAction(Intent.ACTION_USER_REMOVED);
-            mContext.registerReceiverForAllUsers(userUpdateReceiver, filter, null, null);
-
-            // Setup receiver for device reboots or shutdowns.
-            filter = new IntentFilter(Intent.ACTION_REBOOT);
-            filter.addAction(Intent.ACTION_SHUTDOWN);
-            mContext.registerReceiverForAllUsers(shutdownEventReceiver, filter, null, null);
-
-            // Register death recipient.
-            List<BroadcastReceiver> broadcastReceivers =
-                    List.of(appUpdateReceiver, userUpdateReceiver, shutdownEventReceiver);
-            registerStatsdDeathRecipient(statsd, broadcastReceivers);
-
-            // Tell statsd that boot has completed. The signal may have already been sent, but since
-            // the signal-receiving function is idempotent, that's ok.
-            if (mBootCompleted.get()) {
-                statsd.bootCompleted();
-            }
-
-            // Pull the latest state of UID->app name, version mapping when statsd starts.
-            informAllUids(mContext);
-
-            Log.i(TAG, "Told statsd that StatsCompanionService is alive.");
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to inform statsd that statscompanion is ready", e);
-        }
-    }
-
-    private class StatsdDeathRecipient implements IBinder.DeathRecipient {
-
-        private final IStatsd mStatsd;
-        private final List<BroadcastReceiver> mReceiversToUnregister;
-
-        StatsdDeathRecipient(IStatsd statsd, List<BroadcastReceiver> receivers) {
-            mStatsd = statsd;
-            mReceiversToUnregister = receivers;
-        }
-
-        // It is possible for binderDied to be called after a restarted statsd calls statsdReady,
-        // but that's alright because the code does not assume an ordering of the two calls.
-        @Override
-        public void binderDied() {
-            Log.i(TAG, "Statsd is dead - erase all my knowledge, except pullers");
-            synchronized (sStatsdLock) {
-                long now = SystemClock.elapsedRealtime();
-                for (Long timeMillis : mDeathTimeMillis) {
-                    long ageMillis = now - timeMillis;
-                    if (ageMillis > MILLIS_IN_A_DAY) {
-                        mDeathTimeMillis.remove(timeMillis);
-                    }
-                }
-                for (Long timeMillis : mDeletedFiles.keySet()) {
-                    long ageMillis = now - timeMillis;
-                    if (ageMillis > MILLIS_IN_A_DAY * 7) {
-                        mDeletedFiles.remove(timeMillis);
-                    }
-                }
-                mDeathTimeMillis.add(now);
-                if (mDeathTimeMillis.size() >= DEATH_THRESHOLD) {
-                    mDeathTimeMillis.clear();
-                    File[] configs = new File(CONFIG_DIR).listFiles();
-                    if (configs != null && configs.length > 0) {
-                        String fileName = configs[0].getName();
-                        if (configs[0].delete()) {
-                            mDeletedFiles.put(now, fileName);
-                        }
-                    }
-                }
-
-                // Unregister receivers on death because receivers can only be unregistered once.
-                // Otherwise, an IllegalArgumentException is thrown.
-                for (BroadcastReceiver receiver: mReceiversToUnregister) {
-                    mContext.unregisterReceiver(receiver);
-                }
-
-                // It's possible for statsd to have restarted and called statsdReady, causing a new
-                // sStatsd binder object to be fetched, before the binderDied callback runs. Only
-                // call #statsdNotReadyLocked if that hasn't happened yet.
-                if (mStatsd == sStatsd) {
-                    statsdNotReadyLocked();
-                }
-            }
-        }
-    }
-
-    private void statsdNotReadyLocked() {
-        sStatsd = null;
-        mStatsManagerService.statsdNotReady();
-    }
-
-    void bootCompleted() {
-        mBootCompleted.set(true);
-        IStatsd statsd = getStatsdNonblocking();
-        if (statsd == null) {
-            // Statsd is not yet ready.
-            // Delay the boot completed ping to {@link #sayHiToStatsd()}
-            return;
-        }
-        try {
-            statsd.bootCompleted();
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to notify statsd that boot completed");
-        }
-    }
-
-    @Override
-    protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
-        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
-                != PackageManager.PERMISSION_GRANTED) {
-            return;
-        }
-
-        synchronized (sStatsdLock) {
-            writer.println("Number of configuration files deleted: " + mDeletedFiles.size());
-            if (mDeletedFiles.size() > 0) {
-                writer.println("  timestamp, deleted file name");
-            }
-            long lastBootMillis =
-                    SystemClock.currentThreadTimeMillis() - SystemClock.elapsedRealtime();
-            for (Long elapsedMillis : mDeletedFiles.keySet()) {
-                long deletionMillis = lastBootMillis + elapsedMillis;
-                writer.println("  " + deletionMillis + ", " + mDeletedFiles.get(elapsedMillis));
-            }
-        }
-    }
-}
diff --git a/apex/statsd/service/java/com/android/server/stats/StatsManagerService.java b/apex/statsd/service/java/com/android/server/stats/StatsManagerService.java
deleted file mode 100644
index 97846f2..0000000
--- a/apex/statsd/service/java/com/android/server/stats/StatsManagerService.java
+++ /dev/null
@@ -1,661 +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.server.stats;
-
-import static com.android.server.stats.StatsCompanion.PendingIntentRef;
-
-import android.Manifest;
-import android.annotation.Nullable;
-import android.app.AppOpsManager;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.os.Binder;
-import android.os.IPullAtomCallback;
-import android.os.IStatsManagerService;
-import android.os.IStatsd;
-import android.os.Process;
-import android.os.RemoteException;
-import android.util.ArrayMap;
-import android.util.Log;
-
-import com.android.internal.annotations.GuardedBy;
-
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * Service for {@link android.app.StatsManager}.
- *
- * @hide
- */
-public class StatsManagerService extends IStatsManagerService.Stub {
-
-    private static final String TAG = "StatsManagerService";
-    private static final boolean DEBUG = false;
-
-    private static final int STATSD_TIMEOUT_MILLIS = 5000;
-
-    private static final String USAGE_STATS_PERMISSION_OPS = "android:get_usage_stats";
-
-    @GuardedBy("mLock")
-    private IStatsd mStatsd;
-    private final Object mLock = new Object();
-
-    private StatsCompanionService mStatsCompanionService;
-    private Context mContext;
-
-    @GuardedBy("mLock")
-    private ArrayMap<ConfigKey, PendingIntentRef> mDataFetchPirMap = new ArrayMap<>();
-    @GuardedBy("mLock")
-    private ArrayMap<Integer, PendingIntentRef> mActiveConfigsPirMap = new ArrayMap<>();
-    @GuardedBy("mLock")
-    private ArrayMap<ConfigKey, ArrayMap<Long, PendingIntentRef>> mBroadcastSubscriberPirMap =
-            new ArrayMap<>();
-
-    public StatsManagerService(Context context) {
-        super();
-        mContext = context;
-    }
-
-    private static class ConfigKey {
-        private final int mUid;
-        private final long mConfigId;
-
-        ConfigKey(int uid, long configId) {
-            mUid = uid;
-            mConfigId = configId;
-        }
-
-        public int getUid() {
-            return mUid;
-        }
-
-        public long getConfigId() {
-            return mConfigId;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(mUid, mConfigId);
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (obj instanceof ConfigKey) {
-                ConfigKey other = (ConfigKey) obj;
-                return this.mUid == other.getUid() && this.mConfigId == other.getConfigId();
-            }
-            return false;
-        }
-    }
-
-    private static class PullerKey {
-        private final int mUid;
-        private final int mAtomTag;
-
-        PullerKey(int uid, int atom) {
-            mUid = uid;
-            mAtomTag = atom;
-        }
-
-        public int getUid() {
-            return mUid;
-        }
-
-        public int getAtom() {
-            return mAtomTag;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(mUid, mAtomTag);
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (obj instanceof PullerKey) {
-                PullerKey other = (PullerKey) obj;
-                return this.mUid == other.getUid() && this.mAtomTag == other.getAtom();
-            }
-            return false;
-        }
-    }
-
-    private static class PullerValue {
-        private final long mCoolDownMillis;
-        private final long mTimeoutMillis;
-        private final int[] mAdditiveFields;
-        private final IPullAtomCallback mCallback;
-
-        PullerValue(long coolDownMillis, long timeoutMillis, int[] additiveFields,
-                IPullAtomCallback callback) {
-            mCoolDownMillis = coolDownMillis;
-            mTimeoutMillis = timeoutMillis;
-            mAdditiveFields = additiveFields;
-            mCallback = callback;
-        }
-
-        public long getCoolDownMillis() {
-            return mCoolDownMillis;
-        }
-
-        public long getTimeoutMillis() {
-            return mTimeoutMillis;
-        }
-
-        public int[] getAdditiveFields() {
-            return mAdditiveFields;
-        }
-
-        public IPullAtomCallback getCallback() {
-            return mCallback;
-        }
-    }
-
-    private final ArrayMap<PullerKey, PullerValue> mPullers = new ArrayMap<>();
-
-    @Override
-    public void registerPullAtomCallback(int atomTag, long coolDownMillis, long timeoutMillis,
-            int[] additiveFields, IPullAtomCallback pullerCallback) {
-        enforceRegisterStatsPullAtomPermission();
-        if (pullerCallback == null) {
-            Log.w(TAG, "Puller callback is null for atom " + atomTag);
-            return;
-        }
-        int callingUid = Binder.getCallingUid();
-        PullerKey key = new PullerKey(callingUid, atomTag);
-        PullerValue val =
-                new PullerValue(coolDownMillis, timeoutMillis, additiveFields, pullerCallback);
-
-        // Always cache the puller in StatsManagerService. If statsd is down, we will register the
-        // puller when statsd comes back up.
-        synchronized (mLock) {
-            mPullers.put(key, val);
-        }
-
-        IStatsd statsd = getStatsdNonblocking();
-        if (statsd == null) {
-            return;
-        }
-
-        final long token = Binder.clearCallingIdentity();
-        try {
-            statsd.registerPullAtomCallback(callingUid, atomTag, coolDownMillis, timeoutMillis,
-                    additiveFields, pullerCallback);
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to access statsd to register puller for atom " + atomTag);
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    @Override
-    public void unregisterPullAtomCallback(int atomTag) {
-        enforceRegisterStatsPullAtomPermission();
-        int callingUid = Binder.getCallingUid();
-        PullerKey key = new PullerKey(callingUid, atomTag);
-
-        // Always remove the puller from StatsManagerService even if statsd is down. When statsd
-        // comes back up, we will not re-register the removed puller.
-        synchronized (mLock) {
-            mPullers.remove(key);
-        }
-
-        IStatsd statsd = getStatsdNonblocking();
-        if (statsd == null) {
-            return;
-        }
-
-        final long token = Binder.clearCallingIdentity();
-        try {
-            statsd.unregisterPullAtomCallback(callingUid, atomTag);
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to access statsd to unregister puller for atom " + atomTag);
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    @Override
-    public void setDataFetchOperation(long configId, PendingIntent pendingIntent,
-            String packageName) {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        PendingIntentRef pir = new PendingIntentRef(pendingIntent, mContext);
-        ConfigKey key = new ConfigKey(callingUid, configId);
-        // We add the PIR to a map so we can reregister if statsd is unavailable.
-        synchronized (mLock) {
-            mDataFetchPirMap.put(key, pir);
-        }
-        try {
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd != null) {
-                statsd.setDataFetchOperation(configId, pir, callingUid);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to setDataFetchOperation with statsd");
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    @Override
-    public void removeDataFetchOperation(long configId, String packageName) {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        ConfigKey key = new ConfigKey(callingUid, configId);
-        synchronized (mLock) {
-            mDataFetchPirMap.remove(key);
-        }
-        try {
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd != null) {
-                statsd.removeDataFetchOperation(configId, callingUid);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to removeDataFetchOperation with statsd");
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    @Override
-    public long[] setActiveConfigsChangedOperation(PendingIntent pendingIntent,
-            String packageName) {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        PendingIntentRef pir = new PendingIntentRef(pendingIntent, mContext);
-        // We add the PIR to a map so we can reregister if statsd is unavailable.
-        synchronized (mLock) {
-            mActiveConfigsPirMap.put(callingUid, pir);
-        }
-        try {
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd != null) {
-                return statsd.setActiveConfigsChangedOperation(pir, callingUid);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to setActiveConfigsChangedOperation with statsd");
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-        return new long[] {};
-    }
-
-    @Override
-    public void removeActiveConfigsChangedOperation(String packageName) {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        synchronized (mLock) {
-            mActiveConfigsPirMap.remove(callingUid);
-        }
-        try {
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd != null) {
-                statsd.removeActiveConfigsChangedOperation(callingUid);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to removeActiveConfigsChangedOperation with statsd");
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    @Override
-    public void setBroadcastSubscriber(long configId, long subscriberId,
-            PendingIntent pendingIntent, String packageName) {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        PendingIntentRef pir = new PendingIntentRef(pendingIntent, mContext);
-        ConfigKey key = new ConfigKey(callingUid, configId);
-        // We add the PIR to a map so we can reregister if statsd is unavailable.
-        synchronized (mLock) {
-            ArrayMap<Long, PendingIntentRef> innerMap = mBroadcastSubscriberPirMap
-                    .getOrDefault(key, new ArrayMap<>());
-            innerMap.put(subscriberId, pir);
-            mBroadcastSubscriberPirMap.put(key, innerMap);
-        }
-        try {
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd != null) {
-                statsd.setBroadcastSubscriber(
-                        configId, subscriberId, pir, callingUid);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to setBroadcastSubscriber with statsd");
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    @Override
-    public void unsetBroadcastSubscriber(long configId, long subscriberId, String packageName) {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        ConfigKey key = new ConfigKey(callingUid, configId);
-        synchronized (mLock) {
-            ArrayMap<Long, PendingIntentRef> innerMap = mBroadcastSubscriberPirMap
-                    .getOrDefault(key, new ArrayMap<>());
-            innerMap.remove(subscriberId);
-            if (innerMap.isEmpty()) {
-                mBroadcastSubscriberPirMap.remove(key);
-            }
-        }
-        try {
-            IStatsd statsd = getStatsdNonblocking();
-            if (statsd != null) {
-                statsd.unsetBroadcastSubscriber(configId, subscriberId, callingUid);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to unsetBroadcastSubscriber with statsd");
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    @Override
-    public long[] getRegisteredExperimentIds() throws IllegalStateException {
-        enforceDumpAndUsageStatsPermission(null);
-        final long token = Binder.clearCallingIdentity();
-        try {
-            IStatsd statsd = waitForStatsd();
-            if (statsd != null) {
-                return statsd.getRegisteredExperimentIds();
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to getRegisteredExperimentIds with statsd");
-            throw new IllegalStateException(e.getMessage(), e);
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-        throw new IllegalStateException("Failed to connect to statsd to registerExperimentIds");
-    }
-
-    @Override
-    public byte[] getMetadata(String packageName) throws IllegalStateException {
-        enforceDumpAndUsageStatsPermission(packageName);
-        final long token = Binder.clearCallingIdentity();
-        try {
-            IStatsd statsd = waitForStatsd();
-            if (statsd != null) {
-                return statsd.getMetadata();
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to getMetadata with statsd");
-            throw new IllegalStateException(e.getMessage(), e);
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-        throw new IllegalStateException("Failed to connect to statsd to getMetadata");
-    }
-
-    @Override
-    public byte[] getData(long key, String packageName) throws IllegalStateException {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        try {
-            IStatsd statsd = waitForStatsd();
-            if (statsd != null) {
-                return statsd.getData(key, callingUid);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to getData with statsd");
-            throw new IllegalStateException(e.getMessage(), e);
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-        throw new IllegalStateException("Failed to connect to statsd to getData");
-    }
-
-    @Override
-    public void addConfiguration(long configId, byte[] config, String packageName)
-            throws IllegalStateException {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        try {
-            IStatsd statsd = waitForStatsd();
-            if (statsd != null) {
-                statsd.addConfiguration(configId, config, callingUid);
-                return;
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to addConfiguration with statsd");
-            throw new IllegalStateException(e.getMessage(), e);
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-        throw new IllegalStateException("Failed to connect to statsd to addConfig");
-    }
-
-    @Override
-    public void removeConfiguration(long configId, String packageName)
-            throws IllegalStateException {
-        enforceDumpAndUsageStatsPermission(packageName);
-        int callingUid = Binder.getCallingUid();
-        final long token = Binder.clearCallingIdentity();
-        try {
-            IStatsd statsd = waitForStatsd();
-            if (statsd != null) {
-                statsd.removeConfiguration(configId, callingUid);
-                return;
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to removeConfiguration with statsd");
-            throw new IllegalStateException(e.getMessage(), e);
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-        throw new IllegalStateException("Failed to connect to statsd to removeConfig");
-    }
-
-    void setStatsCompanionService(StatsCompanionService statsCompanionService) {
-        mStatsCompanionService = statsCompanionService;
-    }
-
-    /**
-     * Checks that the caller has both DUMP and PACKAGE_USAGE_STATS permissions. Also checks that
-     * the caller has USAGE_STATS_PERMISSION_OPS for the specified packageName if it is not null.
-     *
-     * @param packageName The packageName to check USAGE_STATS_PERMISSION_OPS.
-     */
-    private void enforceDumpAndUsageStatsPermission(@Nullable String packageName) {
-        int callingUid = Binder.getCallingUid();
-        int callingPid = Binder.getCallingPid();
-
-        if (callingPid == Process.myPid()) {
-            return;
-        }
-
-        mContext.enforceCallingPermission(Manifest.permission.DUMP, null);
-        mContext.enforceCallingPermission(Manifest.permission.PACKAGE_USAGE_STATS, null);
-
-        if (packageName == null) {
-            return;
-        }
-        AppOpsManager appOpsManager = (AppOpsManager) mContext
-                .getSystemService(Context.APP_OPS_SERVICE);
-        switch (appOpsManager.noteOp(USAGE_STATS_PERMISSION_OPS,
-                Binder.getCallingUid(), packageName, null, null)) {
-            case AppOpsManager.MODE_ALLOWED:
-            case AppOpsManager.MODE_DEFAULT:
-                break;
-            default:
-                throw new SecurityException(
-                        String.format("UID %d / PID %d lacks app-op %s",
-                                callingUid, callingPid, USAGE_STATS_PERMISSION_OPS)
-                );
-        }
-    }
-
-    private void enforceRegisterStatsPullAtomPermission() {
-        mContext.enforceCallingOrSelfPermission(
-                android.Manifest.permission.REGISTER_STATS_PULL_ATOM,
-                "Need REGISTER_STATS_PULL_ATOM permission.");
-    }
-
-
-    /**
-     * Clients should call this if blocking until statsd to be ready is desired
-     *
-     * @return IStatsd object if statsd becomes ready within the timeout, null otherwise.
-     */
-    private IStatsd waitForStatsd() {
-        synchronized (mLock) {
-            if (mStatsd == null) {
-                try {
-                    mLock.wait(STATSD_TIMEOUT_MILLIS);
-                } catch (InterruptedException e) {
-                    Log.e(TAG, "wait for statsd interrupted");
-                }
-            }
-            return mStatsd;
-        }
-    }
-
-    /**
-     * Clients should call this to receive a reference to statsd.
-     *
-     * @return IStatsd object if statsd is ready, null otherwise.
-     */
-    private IStatsd getStatsdNonblocking() {
-        synchronized (mLock) {
-            return mStatsd;
-        }
-    }
-
-    /**
-     * Called from {@link StatsCompanionService}.
-     *
-     * Tells StatsManagerService that Statsd is ready and updates
-     * Statsd with the contents of our local cache.
-     */
-    void statsdReady(IStatsd statsd) {
-        synchronized (mLock) {
-            mStatsd = statsd;
-            mLock.notify();
-        }
-        sayHiToStatsd(statsd);
-    }
-
-    /**
-     * Called from {@link StatsCompanionService}.
-     *
-     * Tells StatsManagerService that Statsd is no longer ready
-     * and we should no longer make binder calls with statsd.
-     */
-    void statsdNotReady() {
-        synchronized (mLock) {
-            mStatsd = null;
-        }
-    }
-
-    private void sayHiToStatsd(IStatsd statsd) {
-        if (statsd == null) {
-            return;
-        }
-
-        final long token = Binder.clearCallingIdentity();
-        try {
-            registerAllPullers(statsd);
-            registerAllDataFetchOperations(statsd);
-            registerAllActiveConfigsChangedOperations(statsd);
-            registerAllBroadcastSubscribers(statsd);
-        } catch (RemoteException e) {
-            Log.e(TAG, "StatsManager failed to (re-)register data with statsd");
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    // Pre-condition: the Binder calling identity has already been cleared
-    private void registerAllPullers(IStatsd statsd) throws RemoteException {
-        // Since we do not want to make an IPC with the lock held, we first create a copy of the
-        // data with the lock held before iterating through the map.
-        ArrayMap<PullerKey, PullerValue> pullersCopy;
-        synchronized (mLock) {
-            pullersCopy = new ArrayMap<>(mPullers);
-        }
-
-        for (Map.Entry<PullerKey, PullerValue> entry : pullersCopy.entrySet()) {
-            PullerKey key = entry.getKey();
-            PullerValue value = entry.getValue();
-            statsd.registerPullAtomCallback(key.getUid(), key.getAtom(), value.getCoolDownMillis(),
-                    value.getTimeoutMillis(), value.getAdditiveFields(), value.getCallback());
-        }
-        statsd.allPullersFromBootRegistered();
-    }
-
-    // Pre-condition: the Binder calling identity has already been cleared
-    private void registerAllDataFetchOperations(IStatsd statsd) throws RemoteException {
-        // Since we do not want to make an IPC with the lock held, we first create a copy of the
-        // data with the lock held before iterating through the map.
-        ArrayMap<ConfigKey, PendingIntentRef> dataFetchCopy;
-        synchronized (mLock) {
-            dataFetchCopy = new ArrayMap<>(mDataFetchPirMap);
-        }
-
-        for (Map.Entry<ConfigKey, PendingIntentRef> entry : dataFetchCopy.entrySet()) {
-            ConfigKey key = entry.getKey();
-            statsd.setDataFetchOperation(key.getConfigId(), entry.getValue(), key.getUid());
-        }
-    }
-
-    // Pre-condition: the Binder calling identity has already been cleared
-    private void registerAllActiveConfigsChangedOperations(IStatsd statsd) throws RemoteException {
-        // Since we do not want to make an IPC with the lock held, we first create a copy of the
-        // data with the lock held before iterating through the map.
-        ArrayMap<Integer, PendingIntentRef> activeConfigsChangedCopy;
-        synchronized (mLock) {
-            activeConfigsChangedCopy = new ArrayMap<>(mActiveConfigsPirMap);
-        }
-
-        for (Map.Entry<Integer, PendingIntentRef> entry : activeConfigsChangedCopy.entrySet()) {
-            statsd.setActiveConfigsChangedOperation(entry.getValue(), entry.getKey());
-        }
-    }
-
-    // Pre-condition: the Binder calling identity has already been cleared
-    private void registerAllBroadcastSubscribers(IStatsd statsd) throws RemoteException {
-        // Since we do not want to make an IPC with the lock held, we first create a deep copy of
-        // the data with the lock held before iterating through the map.
-        ArrayMap<ConfigKey, ArrayMap<Long, PendingIntentRef>> broadcastSubscriberCopy =
-                new ArrayMap<>();
-        synchronized (mLock) {
-            for (Map.Entry<ConfigKey, ArrayMap<Long, PendingIntentRef>> entry :
-                    mBroadcastSubscriberPirMap.entrySet()) {
-                broadcastSubscriberCopy.put(entry.getKey(), new ArrayMap(entry.getValue()));
-            }
-        }
-
-        for (Map.Entry<ConfigKey, ArrayMap<Long, PendingIntentRef>> entry :
-                mBroadcastSubscriberPirMap.entrySet()) {
-            ConfigKey configKey = entry.getKey();
-            for (Map.Entry<Long, PendingIntentRef> subscriberEntry : entry.getValue().entrySet()) {
-                statsd.setBroadcastSubscriber(configKey.getConfigId(), subscriberEntry.getKey(),
-                        subscriberEntry.getValue(), configKey.getUid());
-            }
-        }
-    }
-}
diff --git a/apex/statsd/statsd.rc b/apex/statsd/statsd.rc
deleted file mode 100644
index 605da2a..0000000
--- a/apex/statsd/statsd.rc
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-service statsd /apex/com.android.os.statsd/bin/statsd
-    class main
-    socket statsdw dgram+passcred 0222 statsd statsd
-    user statsd
-    group statsd log
-    writepid /dev/cpuset/system-background/tasks
diff --git a/apex/statsd/testing/Android.bp b/apex/statsd/testing/Android.bp
deleted file mode 100644
index a9cd0cc..0000000
--- a/apex/statsd/testing/Android.bp
+++ /dev/null
@@ -1,25 +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.
-
-apex_test {
-    name: "test_com.android.os.statsd",
-    visibility: [
-        "//system/apex/tests",
-    ],
-    defaults: ["com.android.os.statsd-defaults"],
-    manifest: "test_manifest.json",
-    file_contexts: ":com.android.os.statsd-file_contexts",
-    // Test APEX, should never be installed
-    installable: false,
-}
diff --git a/apex/statsd/testing/test_manifest.json b/apex/statsd/testing/test_manifest.json
deleted file mode 100644
index 57343d3..0000000
--- a/apex/statsd/testing/test_manifest.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "name": "com.android.os.statsd",
-  "version": 2147483647
-}
diff --git a/apex/statsd/tests/libstatspull/Android.bp b/apex/statsd/tests/libstatspull/Android.bp
deleted file mode 100644
index 05b3e04..0000000
--- a/apex/statsd/tests/libstatspull/Android.bp
+++ /dev/null
@@ -1,61 +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.
-
-android_test {
-    name: "LibStatsPullTests",
-    static_libs: [
-        "androidx.test.rules",
-        "platformprotoslite",
-        "statsdprotolite",
-        "truth-prebuilt",
-    ],
-    libs: [
-        "android.test.runner.stubs",
-        "android.test.base.stubs",
-    ],
-    jni_libs: [
-        "libstatspull_testhelper",
-    ],
-    srcs: [
-        "src/**/*.java",
-        "protos/**/*.proto",
-        ],
-    test_suites: [
-        "device-tests",
-        "mts",
-    ],
-    platform_apis: true,
-    privileged: true,
-    certificate: "platform",
-    compile_multilib: "both",
-}
-
-cc_library_shared {
-    name: "libstatspull_testhelper",
-    srcs: ["jni/stats_pull_helper.cpp"],
-    cflags: [
-        "-Wall",
-        "-Werror",
-    ],
-    shared_libs: [
-        "libbinder_ndk",
-        "statsd-aidl-ndk_platform",
-    ],
-    static_libs: [
-        "libstatspull_private",
-        "libstatssocket_private",
-        "libutils",
-        "libcutils",
-    ],
-}
diff --git a/apex/statsd/tests/libstatspull/AndroidManifest.xml b/apex/statsd/tests/libstatspull/AndroidManifest.xml
deleted file mode 100644
index 0c669b0..0000000
--- a/apex/statsd/tests/libstatspull/AndroidManifest.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.internal.os.statsd.libstats" >
-
-
-    <uses-permission android:name="android.permission.DUMP" />
-    <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
-    <uses-permission android:name="android.permission.REGISTER_STATS_PULL_ATOM" />
-
-    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
-                     android:targetPackage="com.android.internal.os.statsd.libstats"
-                     android:label="Tests for libstatspull">
-    </instrumentation>
-</manifest>
-
diff --git a/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp b/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp
deleted file mode 100644
index 166592d..0000000
--- a/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp
+++ /dev/null
@@ -1,70 +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.
- */
-
-#include <jni.h>
-#include <log/log.h>
-#include <stats_event.h>
-#include <stats_pull_atom_callback.h>
-
-#include <chrono>
-#include <thread>
-
-using std::this_thread::sleep_for;
-
-namespace {
-static int32_t sAtomTag;
-static int32_t sPullReturnVal;
-static int64_t sLatencyMillis;
-static int32_t sAtomsPerPull;
-static int32_t sNumPulls = 0;
-
-static AStatsManager_PullAtomCallbackReturn pullAtomCallback(int32_t atomTag, AStatsEventList* data,
-                                                             void* /*cookie*/) {
-    sNumPulls++;
-    sleep_for(std::chrono::milliseconds(sLatencyMillis));
-    for (int i = 0; i < sAtomsPerPull; i++) {
-        AStatsEvent* event = AStatsEventList_addStatsEvent(data);
-        AStatsEvent_setAtomId(event, atomTag);
-        AStatsEvent_writeInt64(event, (int64_t) sNumPulls);
-        AStatsEvent_build(event);
-    }
-    return sPullReturnVal;
-}
-
-extern "C" JNIEXPORT void JNICALL
-Java_com_android_internal_os_statsd_libstats_LibStatsPullTests_setStatsPuller(
-        JNIEnv* /*env*/, jobject /* this */, jint atomTag, jlong timeoutMillis,
-        jlong coolDownMillis, jint pullRetVal, jlong latencyMillis, int atomsPerPull) {
-    sAtomTag = atomTag;
-    sPullReturnVal = pullRetVal;
-    sLatencyMillis = latencyMillis;
-    sAtomsPerPull = atomsPerPull;
-    sNumPulls = 0;
-    AStatsManager_PullAtomMetadata* metadata = AStatsManager_PullAtomMetadata_obtain();
-    AStatsManager_PullAtomMetadata_setCoolDownMillis(metadata, coolDownMillis);
-    AStatsManager_PullAtomMetadata_setTimeoutMillis(metadata, timeoutMillis);
-
-    AStatsManager_setPullAtomCallback(sAtomTag, metadata, &pullAtomCallback, nullptr);
-    AStatsManager_PullAtomMetadata_release(metadata);
-}
-
-extern "C" JNIEXPORT void JNICALL
-Java_com_android_internal_os_statsd_libstats_LibStatsPullTests_clearStatsPuller(JNIEnv* /*env*/,
-                                                                                jobject /* this */,
-                                                                                jint /*atomTag*/) {
-    AStatsManager_clearPullAtomCallback(sAtomTag);
-}
-} // namespace
diff --git a/apex/statsd/tests/libstatspull/protos/test_atoms.proto b/apex/statsd/tests/libstatspull/protos/test_atoms.proto
deleted file mode 100644
index 56c1b53..0000000
--- a/apex/statsd/tests/libstatspull/protos/test_atoms.proto
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto2";
-
-package com.android.internal.os.statsd.protos;
-
-option java_package = "com.android.internal.os.statsd.protos";
-option java_outer_classname = "TestAtoms";
-
-message PullCallbackAtomWrapper {
-  optional PullCallbackAtom pull_callback_atom = 150030;
-}
-
-message PullCallbackAtom {
-  optional int64 long_val = 1;
-}
-
-
-
diff --git a/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/LibStatsPullTests.java b/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/LibStatsPullTests.java
deleted file mode 100644
index 6108a32..0000000
--- a/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/LibStatsPullTests.java
+++ /dev/null
@@ -1,287 +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.internal.os.statsd.libstats;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.app.StatsManager;
-import android.content.Context;
-import android.util.Log;
-import android.util.StatsLog;
-
-import androidx.test.InstrumentationRegistry;
-import androidx.test.filters.MediumTest;
-import androidx.test.runner.AndroidJUnit4;
-
-import com.android.internal.os.StatsdConfigProto.AtomMatcher;
-import com.android.internal.os.StatsdConfigProto.FieldFilter;
-import com.android.internal.os.StatsdConfigProto.GaugeMetric;
-import com.android.internal.os.StatsdConfigProto.PullAtomPackages;
-import com.android.internal.os.StatsdConfigProto.SimpleAtomMatcher;
-import com.android.internal.os.StatsdConfigProto.StatsdConfig;
-import com.android.internal.os.StatsdConfigProto.TimeUnit;
-import com.android.internal.os.statsd.protos.TestAtoms;
-import com.android.os.AtomsProto.Atom;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.util.List;
-
-/**
- * Test puller registration.
- */
-@MediumTest
-@RunWith(AndroidJUnit4.class)
-public class LibStatsPullTests {
-    private static final String LOG_TAG = LibStatsPullTests.class.getSimpleName();
-    private static final int SHORT_SLEEP_MILLIS = 250;
-    private static final int LONG_SLEEP_MILLIS = 1_000;
-    private Context mContext;
-    private static final int PULL_ATOM_TAG = 150030;
-    private static final int APP_BREADCRUMB_LABEL = 3;
-    private static int sPullReturnValue;
-    private static long sConfigId;
-    private static long sPullLatencyMillis;
-    private static long sPullTimeoutMillis;
-    private static long sCoolDownMillis;
-    private static int sAtomsPerPull;
-
-    static {
-        System.loadLibrary("statspull_testhelper");
-    }
-
-    /**
-     * Setup the tests. Initialize shared data.
-     */
-    @Before
-    public void setup() {
-        mContext = InstrumentationRegistry.getTargetContext();
-        assertThat(InstrumentationRegistry.getInstrumentation()).isNotNull();
-        sPullReturnValue = StatsManager.PULL_SUCCESS;
-        sPullLatencyMillis = 0;
-        sPullTimeoutMillis = 10_000L;
-        sCoolDownMillis = 1_000L;
-        sAtomsPerPull = 1;
-    }
-
-    /**
-     * Teardown the tests.
-     */
-    @After
-    public void tearDown() throws Exception {
-        clearStatsPuller(PULL_ATOM_TAG);
-        StatsManager statsManager = (StatsManager) mContext.getSystemService(
-                Context.STATS_MANAGER);
-        statsManager.removeConfig(sConfigId);
-    }
-
-    /**
-     * Tests adding a puller callback and that pulls complete successfully.
-     */
-    @Test
-    public void testPullAtomCallbackRegistration() throws Exception {
-        StatsManager statsManager = (StatsManager) mContext.getSystemService(
-                Context.STATS_MANAGER);
-        // Upload a config that captures that pulled atom.
-        createAndAddConfigToStatsd(statsManager);
-
-        // Add the puller.
-        setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
-                sPullLatencyMillis, sAtomsPerPull);
-        Thread.sleep(SHORT_SLEEP_MILLIS);
-        StatsLog.logStart(APP_BREADCRUMB_LABEL);
-        // Let the current bucket finish.
-        Thread.sleep(LONG_SLEEP_MILLIS);
-        List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
-        clearStatsPuller(PULL_ATOM_TAG);
-        assertThat(data.size()).isEqualTo(1);
-        TestAtoms.PullCallbackAtomWrapper atomWrapper = null;
-        try {
-            atomWrapper = TestAtoms.PullCallbackAtomWrapper.parser()
-                    .parseFrom(data.get(0).toByteArray());
-        } catch (Exception e) {
-            Log.e(LOG_TAG, "Failed to parse primitive atoms");
-        }
-        assertThat(atomWrapper).isNotNull();
-        assertThat(atomWrapper.hasPullCallbackAtom()).isTrue();
-        TestAtoms.PullCallbackAtom atom =
-                atomWrapper.getPullCallbackAtom();
-        assertThat(atom.getLongVal()).isEqualTo(1);
-    }
-
-    /**
-     * Tests that a failed pull is skipped.
-     */
-    @Test
-    public void testPullAtomCallbackFailure() throws Exception {
-        StatsManager statsManager = (StatsManager) mContext.getSystemService(
-                Context.STATS_MANAGER);
-        createAndAddConfigToStatsd(statsManager);
-        sPullReturnValue = StatsManager.PULL_SKIP;
-        // Add the puller.
-        setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
-                sPullLatencyMillis, sAtomsPerPull);
-        Thread.sleep(SHORT_SLEEP_MILLIS);
-        StatsLog.logStart(APP_BREADCRUMB_LABEL);
-        // Let the current bucket finish.
-        Thread.sleep(LONG_SLEEP_MILLIS);
-        List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
-        clearStatsPuller(PULL_ATOM_TAG);
-        assertThat(data.size()).isEqualTo(0);
-    }
-
-    /**
-     * Tests that a pull that times out is skipped.
-     */
-    @Test
-    public void testPullAtomCallbackTimeout() throws Exception {
-        StatsManager statsManager = (StatsManager) mContext.getSystemService(
-                Context.STATS_MANAGER);
-        createAndAddConfigToStatsd(statsManager);
-        // The puller will sleep for 1.5 sec.
-        sPullLatencyMillis = 1_500;
-        // 1 second timeout
-        sPullTimeoutMillis = 1_000;
-
-        // Add the puller.
-        setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
-                sPullLatencyMillis, sAtomsPerPull);
-        Thread.sleep(SHORT_SLEEP_MILLIS);
-        StatsLog.logStart(APP_BREADCRUMB_LABEL);
-        // Let the current bucket finish and the pull timeout.
-        Thread.sleep(sPullLatencyMillis * 2);
-        List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
-        clearStatsPuller(PULL_ATOM_TAG);
-        assertThat(data.size()).isEqualTo(0);
-    }
-
-    /**
-     * Tests that 2 pulls in quick succession use the cache instead of pulling again.
-     */
-    @Test
-    public void testPullAtomCallbackCache() throws Exception {
-        StatsManager statsManager = (StatsManager) mContext.getSystemService(
-                Context.STATS_MANAGER);
-        createAndAddConfigToStatsd(statsManager);
-
-        // Set the cooldown to 10 seconds
-        sCoolDownMillis = 10_000L;
-        // Add the puller.
-        setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
-                sPullLatencyMillis, sAtomsPerPull);
-
-        Thread.sleep(SHORT_SLEEP_MILLIS);
-        StatsLog.logStart(APP_BREADCRUMB_LABEL);
-        // Pull from cache.
-        StatsLog.logStart(APP_BREADCRUMB_LABEL);
-        Thread.sleep(LONG_SLEEP_MILLIS);
-        List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
-        clearStatsPuller(PULL_ATOM_TAG);
-        assertThat(data.size()).isEqualTo(2);
-        for (int i = 0; i < data.size(); i++) {
-            TestAtoms.PullCallbackAtomWrapper atomWrapper = null;
-            try {
-                atomWrapper = TestAtoms.PullCallbackAtomWrapper.parser()
-                        .parseFrom(data.get(i).toByteArray());
-            } catch (Exception e) {
-                Log.e(LOG_TAG, "Failed to parse primitive atoms");
-            }
-            assertThat(atomWrapper).isNotNull();
-            assertThat(atomWrapper.hasPullCallbackAtom()).isTrue();
-            TestAtoms.PullCallbackAtom atom =
-                    atomWrapper.getPullCallbackAtom();
-            assertThat(atom.getLongVal()).isEqualTo(1);
-        }
-    }
-
-    /**
-     * Tests that a pull that returns 1000 stats events works properly.
-     */
-    @Test
-    public void testPullAtomCallbackStress() throws Exception {
-        StatsManager statsManager = (StatsManager) mContext.getSystemService(
-                Context.STATS_MANAGER);
-        // Upload a config that captures that pulled atom.
-        createAndAddConfigToStatsd(statsManager);
-        sAtomsPerPull = 1000;
-        // Add the puller.
-        setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
-                sPullLatencyMillis, sAtomsPerPull);
-
-        Thread.sleep(SHORT_SLEEP_MILLIS);
-        StatsLog.logStart(APP_BREADCRUMB_LABEL);
-        // Let the current bucket finish.
-        Thread.sleep(LONG_SLEEP_MILLIS);
-        List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
-        clearStatsPuller(PULL_ATOM_TAG);
-        assertThat(data.size()).isEqualTo(sAtomsPerPull);
-
-        for (int i = 0; i < data.size(); i++) {
-            TestAtoms.PullCallbackAtomWrapper atomWrapper = null;
-            try {
-                atomWrapper = TestAtoms.PullCallbackAtomWrapper.parser()
-                        .parseFrom(data.get(i).toByteArray());
-            } catch (Exception e) {
-                Log.e(LOG_TAG, "Failed to parse primitive atoms");
-            }
-            assertThat(atomWrapper).isNotNull();
-            assertThat(atomWrapper.hasPullCallbackAtom()).isTrue();
-            TestAtoms.PullCallbackAtom atom =
-                    atomWrapper.getPullCallbackAtom();
-            assertThat(atom.getLongVal()).isEqualTo(1);
-        }
-    }
-
-    private void createAndAddConfigToStatsd(StatsManager statsManager) throws Exception {
-        sConfigId = System.currentTimeMillis();
-        long triggerMatcherId = sConfigId + 10;
-        long pullerMatcherId = sConfigId + 11;
-        long metricId = sConfigId + 100;
-        StatsdConfig config = StatsConfigUtils.getSimpleTestConfig(sConfigId)
-                .addAtomMatcher(
-                        StatsConfigUtils.getAppBreadcrumbMatcher(triggerMatcherId,
-                                APP_BREADCRUMB_LABEL))
-                .addAtomMatcher(AtomMatcher.newBuilder()
-                        .setId(pullerMatcherId)
-                        .setSimpleAtomMatcher(SimpleAtomMatcher.newBuilder()
-                                .setAtomId(PULL_ATOM_TAG))
-                )
-                .addGaugeMetric(GaugeMetric.newBuilder()
-                        .setId(metricId)
-                        .setWhat(pullerMatcherId)
-                        .setTriggerEvent(triggerMatcherId)
-                        .setGaugeFieldsFilter(FieldFilter.newBuilder().setIncludeAll(true))
-                        .setBucket(TimeUnit.CTS)
-                        .setSamplingType(GaugeMetric.SamplingType.FIRST_N_SAMPLES)
-                        .setMaxNumGaugeAtomsPerBucket(1000)
-                )
-                .addPullAtomPackages(PullAtomPackages.newBuilder()
-                        .setAtomId(PULL_ATOM_TAG)
-                        .addPackages(LibStatsPullTests.class.getPackage().getName()))
-                .build();
-        statsManager.addConfig(sConfigId, config.toByteArray());
-        assertThat(StatsConfigUtils.verifyValidConfigExists(statsManager, sConfigId)).isTrue();
-    }
-
-    private native void setStatsPuller(int atomTag, long timeoutMillis, long coolDownMillis,
-            int pullReturnVal, long latencyMillis, int atomPerPull);
-
-    private native void clearStatsPuller(int atomTag);
-}
-
diff --git a/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/StatsConfigUtils.java b/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/StatsConfigUtils.java
deleted file mode 100644
index b5afb94..0000000
--- a/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/StatsConfigUtils.java
+++ /dev/null
@@ -1,124 +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.internal.os.statsd.libstats;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.app.StatsManager;
-import android.util.Log;
-
-import com.android.internal.os.StatsdConfigProto.AtomMatcher;
-import com.android.internal.os.StatsdConfigProto.FieldValueMatcher;
-import com.android.internal.os.StatsdConfigProto.SimpleAtomMatcher;
-import com.android.internal.os.StatsdConfigProto.StatsdConfig;
-import com.android.os.AtomsProto.AppBreadcrumbReported;
-import com.android.os.AtomsProto.Atom;
-import com.android.os.StatsLog.ConfigMetricsReport;
-import com.android.os.StatsLog.ConfigMetricsReportList;
-import com.android.os.StatsLog.GaugeBucketInfo;
-import com.android.os.StatsLog.GaugeMetricData;
-import com.android.os.StatsLog.StatsLogReport;
-import com.android.os.StatsLog.StatsdStatsReport;
-import com.android.os.StatsLog.StatsdStatsReport.ConfigStats;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Util class for constructing statsd configs.
- */
-public class StatsConfigUtils {
-    public static final String TAG = "statsd.StatsConfigUtils";
-    public static final int SHORT_WAIT = 2_000; // 2 seconds.
-
-    /**
-     * @return An empty StatsdConfig in serialized proto format.
-     */
-    public static StatsdConfig.Builder getSimpleTestConfig(long configId) {
-        return StatsdConfig.newBuilder().setId(configId)
-                .addAllowedLogSource(StatsConfigUtils.class.getPackage().getName());
-    }
-
-
-    public static boolean verifyValidConfigExists(StatsManager statsManager, long configId) {
-        StatsdStatsReport report = null;
-        try {
-            report = StatsdStatsReport.parser().parseFrom(statsManager.getStatsMetadata());
-        } catch (Exception e) {
-            Log.e(TAG, "getMetadata failed", e);
-        }
-        assertThat(report).isNotNull();
-        boolean foundConfig = false;
-        for (ConfigStats configStats : report.getConfigStatsList()) {
-            if (configStats.getId() == configId && configStats.getIsValid()
-                    && configStats.getDeletionTimeSec() == 0) {
-                foundConfig = true;
-            }
-        }
-        return foundConfig;
-    }
-
-    public static AtomMatcher getAppBreadcrumbMatcher(long id, int label) {
-        return AtomMatcher.newBuilder()
-                .setId(id)
-                .setSimpleAtomMatcher(
-                        SimpleAtomMatcher.newBuilder()
-                                .setAtomId(Atom.APP_BREADCRUMB_REPORTED_FIELD_NUMBER)
-                                .addFieldValueMatcher(FieldValueMatcher.newBuilder()
-                                        .setField(AppBreadcrumbReported.LABEL_FIELD_NUMBER)
-                                        .setEqInt(label)
-                                )
-                )
-                .build();
-    }
-
-    public static ConfigMetricsReport getConfigMetricsReport(StatsManager statsManager,
-            long configId) {
-        ConfigMetricsReportList reportList = null;
-        try {
-            reportList = ConfigMetricsReportList.parser()
-                    .parseFrom(statsManager.getReports(configId));
-        } catch (Exception e) {
-            Log.e(TAG, "getData failed", e);
-        }
-        assertThat(reportList).isNotNull();
-        assertThat(reportList.getReportsCount()).isEqualTo(1);
-        ConfigMetricsReport report = reportList.getReports(0);
-        assertThat(report.getDumpReportReason())
-                .isEqualTo(ConfigMetricsReport.DumpReportReason.GET_DATA_CALLED);
-        return report;
-
-    }
-    public static List<Atom> getGaugeMetricDataList(ConfigMetricsReport report) {
-        List<Atom> data = new ArrayList<>();
-        for (StatsLogReport metric : report.getMetricsList()) {
-            for (GaugeMetricData gaugeMetricData : metric.getGaugeMetrics().getDataList()) {
-                for (GaugeBucketInfo bucketInfo : gaugeMetricData.getBucketInfoList()) {
-                    for (Atom atom : bucketInfo.getAtomList()) {
-                        data.add(atom);
-                    }
-                }
-            }
-        }
-        return data;
-    }
-
-    public static List<Atom> getGaugeMetricDataList(StatsManager statsManager, long configId) {
-        ConfigMetricsReport report = getConfigMetricsReport(statsManager, configId);
-        return getGaugeMetricDataList(report);
-    }
-}
-
diff --git a/api/Android.bp b/api/Android.bp
index 471b993..f11cd49 100644
--- a/api/Android.bp
+++ b/api/Android.bp
@@ -36,6 +36,7 @@
         ":framework-statsd{.public.api.txt}",
         ":framework-tethering{.public.api.txt}",
         ":framework-wifi{.public.api.txt}",
+        ":i18n.module.public.api{.public.api.txt}",
         ":non-updatable-current.txt",
     ],
     out: ["current.txt"],
@@ -48,7 +49,10 @@
             dest: "current.txt",
         },
         {
-            targets: ["sdk", "win_sdk"],
+            targets: [
+                "sdk",
+                "win_sdk",
+            ],
             dir: "apistubs/android/public/api",
             dest: "android.txt",
         },
@@ -68,6 +72,7 @@
         ":framework-statsd{.public.stubs.source}",
         ":framework-tethering{.public.stubs.source}",
         ":framework-wifi{.public.stubs.source}",
+        ":i18n.module.public.api{.public.stubs.source}",
     ],
     out: ["current.srcjar"],
     tools: ["merge_zips"],
@@ -86,6 +91,7 @@
         ":framework-statsd{.public.removed-api.txt}",
         ":framework-tethering{.public.removed-api.txt}",
         ":framework-wifi{.public.removed-api.txt}",
+        ":i18n.module.public.api{.public.removed-api.txt}",
         ":non-updatable-removed.txt",
     ],
     out: ["removed.txt"],
@@ -122,7 +128,10 @@
             dest: "system-current.txt",
         },
         {
-            targets: ["sdk", "win_sdk"],
+            targets: [
+                "sdk",
+                "win_sdk",
+            ],
             dir: "apistubs/android/system/api",
             dest: "android.txt",
         },
@@ -177,7 +186,10 @@
             dest: "module-lib-current.txt",
         },
         {
-            targets: ["sdk", "win_sdk"],
+            targets: [
+                "sdk",
+                "win_sdk",
+            ],
             dir: "apistubs/android/module-lib/api",
             dest: "android.txt",
         },
diff --git a/api/OWNERS b/api/OWNERS
new file mode 100644
index 0000000..88d0b61
--- /dev/null
+++ b/api/OWNERS
@@ -0,0 +1 @@
+per-file Android.bp = file:platform/build/soong:/OWNERS
diff --git a/cmds/am/OWNERS b/cmds/am/OWNERS
new file mode 100644
index 0000000..72c0a9e
--- /dev/null
+++ b/cmds/am/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/am/OWNERS
diff --git a/cmds/appops/OWNERS b/cmds/appops/OWNERS
new file mode 100644
index 0000000..999ea0e
--- /dev/null
+++ b/cmds/appops/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/permission/OWNERS
diff --git a/cmds/backup/OWNERS b/cmds/backup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/cmds/backup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/cmds/bmgr/OWNERS b/cmds/bmgr/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/cmds/bmgr/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 5bcf307..2c7ee21 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -582,6 +582,7 @@
         result = movie();
     }
 
+    mCallbacks->shutdown();
     eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
     eglDestroyContext(mDisplay, mContext);
     eglDestroySurface(mDisplay, mSurface);
@@ -668,7 +669,6 @@
     int exitnow = atoi(value);
     if (exitnow) {
         requestExit();
-        mCallbacks->shutdown();
     }
 }
 
diff --git a/cmds/bu/OWNERS b/cmds/bu/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/cmds/bu/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/cmds/dpm/OWNERS b/cmds/dpm/OWNERS
new file mode 100644
index 0000000..e95633a
--- /dev/null
+++ b/cmds/dpm/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/app/admin/OWNERS
diff --git a/cmds/ime/OWNERS b/cmds/ime/OWNERS
new file mode 100644
index 0000000..5deb2ce
--- /dev/null
+++ b/cmds/ime/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/inputmethod/OWNERS
diff --git a/cmds/incident/OWNERS b/cmds/incident/OWNERS
new file mode 100644
index 0000000..f766115
--- /dev/null
+++ b/cmds/incident/OWNERS
@@ -0,0 +1 @@
+include /cmds/incidentd/OWNERS
diff --git a/cmds/incidentd/src/IncidentService.cpp b/cmds/incidentd/src/IncidentService.cpp
index dc16125..13bf197 100644
--- a/cmds/incidentd/src/IncidentService.cpp
+++ b/cmds/incidentd/src/IncidentService.cpp
@@ -554,6 +554,10 @@
             return NO_ERROR;
         }
         if (!args[0].compare(String8("section"))) {
+            if (argCount == 1) {
+                fprintf(out, "Not enough arguments for section\n");
+                return NO_ERROR;
+            }
             int id = atoi(args[1]);
             int idx = 0;
             while (SECTION_LIST[idx] != NULL) {
diff --git a/cmds/input/OWNERS b/cmds/input/OWNERS
new file mode 100644
index 0000000..d701f23
--- /dev/null
+++ b/cmds/input/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/hardware/input/OWNERS
diff --git a/cmds/locksettings/OWNERS b/cmds/locksettings/OWNERS
new file mode 100644
index 0000000..0a8dc8c
--- /dev/null
+++ b/cmds/locksettings/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/locksettings/OWNERS
diff --git a/cmds/pm/OWNERS b/cmds/pm/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/cmds/pm/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/cmds/sm/OWNERS b/cmds/sm/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/cmds/sm/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/cmds/statsd/.clang-format b/cmds/statsd/.clang-format
deleted file mode 100644
index cead3a0..0000000
--- a/cmds/statsd/.clang-format
+++ /dev/null
@@ -1,17 +0,0 @@
-BasedOnStyle: Google
-AllowShortIfStatementsOnASingleLine: true
-AllowShortFunctionsOnASingleLine: false
-AllowShortLoopsOnASingleLine: true
-BinPackArguments: true
-BinPackParameters: true
-ColumnLimit: 100
-CommentPragmas: NOLINT:.*
-ContinuationIndentWidth: 8
-DerivePointerAlignment: false
-IndentWidth: 4
-PointerAlignment: Left
-TabWidth: 4
-AccessModifierOffset: -4
-IncludeCategories:
-  - Regex:    '^"Log\.h"'
-    Priority:    -1
diff --git a/cmds/statsd/Android.bp b/cmds/statsd/Android.bp
deleted file mode 100644
index 0617eb6..0000000
--- a/cmds/statsd/Android.bp
+++ /dev/null
@@ -1,433 +0,0 @@
-//
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-// ==========================================================
-// Build the library for use on the host
-// ==========================================================
-cc_library_host_shared {
-    name: "libstats_proto_host",
-    srcs: [
-        "src/atoms.proto",
-        "src/atom_field_options.proto",
-    ],
-
-    shared_libs: [
-        "libplatformprotos",
-    ],
-
-    proto: {
-        type: "full",
-        export_proto_headers: true,
-        include_dirs: [
-            "external/protobuf/src",
-        ],
-    },
-
-    export_shared_lib_headers: [
-        "libplatformprotos",
-    ]
-
-}
-
-cc_defaults {
-    name: "statsd_defaults",
-
-    srcs: [
-        "src/active_config_list.proto",
-        "src/anomaly/AlarmMonitor.cpp",
-        "src/anomaly/AlarmTracker.cpp",
-        "src/anomaly/AnomalyTracker.cpp",
-        "src/anomaly/DurationAnomalyTracker.cpp",
-        "src/anomaly/subscriber_util.cpp",
-        "src/condition/CombinationConditionTracker.cpp",
-        "src/condition/condition_util.cpp",
-        "src/condition/ConditionWizard.cpp",
-        "src/condition/SimpleConditionTracker.cpp",
-        "src/config/ConfigKey.cpp",
-        "src/config/ConfigListener.cpp",
-        "src/config/ConfigManager.cpp",
-        "src/experiment_ids.proto",
-        "src/external/Perfetto.cpp",
-        "src/external/PullResultReceiver.cpp",
-        "src/external/puller_util.cpp",
-        "src/external/StatsCallbackPuller.cpp",
-        "src/external/StatsPuller.cpp",
-        "src/external/StatsPullerManager.cpp",
-        "src/external/TrainInfoPuller.cpp",
-        "src/FieldValue.cpp",
-        "src/guardrail/StatsdStats.cpp",
-        "src/hash.cpp",
-        "src/HashableDimensionKey.cpp",
-        "src/logd/LogEvent.cpp",
-        "src/logd/LogEventQueue.cpp",
-        "src/matchers/CombinationLogMatchingTracker.cpp",
-        "src/matchers/EventMatcherWizard.cpp",
-        "src/matchers/matcher_util.cpp",
-        "src/matchers/SimpleLogMatchingTracker.cpp",
-        "src/metadata_util.cpp",
-        "src/metrics/CountMetricProducer.cpp",
-        "src/metrics/duration_helper/MaxDurationTracker.cpp",
-        "src/metrics/duration_helper/OringDurationTracker.cpp",
-        "src/metrics/DurationMetricProducer.cpp",
-        "src/metrics/EventMetricProducer.cpp",
-        "src/metrics/GaugeMetricProducer.cpp",
-        "src/metrics/MetricProducer.cpp",
-        "src/metrics/metrics_manager_util.cpp",
-        "src/metrics/MetricsManager.cpp",
-        "src/metrics/ValueMetricProducer.cpp",
-        "src/packages/UidMap.cpp",
-        "src/shell/shell_config.proto",
-        "src/shell/ShellSubscriber.cpp",
-        "src/socket/StatsSocketListener.cpp",
-        "src/state/StateManager.cpp",
-        "src/state/StateTracker.cpp",
-        "src/stats_log_util.cpp",
-        "src/statscompanion_util.cpp",
-        "src/statsd_config.proto",
-        "src/statsd_metadata.proto",
-        "src/StatsLogProcessor.cpp",
-        "src/StatsService.cpp",
-        "src/storage/StorageManager.cpp",
-        "src/subscriber/IncidentdReporter.cpp",
-        "src/subscriber/SubscriberReporter.cpp",
-        "src/uid_data.proto",
-        "src/utils/MultiConditionTrigger.cpp",
-    ],
-
-    local_include_dirs: [
-        "src",
-    ],
-
-    static_libs: [
-        "libbase",
-        "libcutils",
-        "libgtest_prod",
-        "libprotoutil",
-        "libstatslog_statsd",
-        "libsysutils",
-        "libutils",
-        "statsd-aidl-ndk_platform",
-    ],
-    shared_libs: [
-        "libbinder_ndk",
-        "libincident",
-        "liblog",
-    ],
-}
-
-genrule {
-    name: "statslog_statsd.h",
-    tools: ["stats-log-api-gen"],
-    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_statsd.h --module statsd --namespace android,os,statsd,util",
-    out: [
-        "statslog_statsd.h",
-    ],
-}
-
-genrule {
-    name: "statslog_statsd.cpp",
-    tools: ["stats-log-api-gen"],
-    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_statsd.cpp --module statsd --namespace android,os,statsd,util --importHeader statslog_statsd.h",
-    out: [
-        "statslog_statsd.cpp",
-    ],
-}
-
-genrule {
-    name: "statslog_statsdtest.h",
-    tools: ["stats-log-api-gen"],
-    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_statsdtest.h --module statsdtest --namespace android,os,statsd,util",
-    out: [
-        "statslog_statsdtest.h",
-    ],
-}
-
-genrule {
-    name: "statslog_statsdtest.cpp",
-    tools: ["stats-log-api-gen"],
-    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_statsdtest.cpp --module statsdtest --namespace android,os,statsd,util --importHeader statslog_statsdtest.h",
-    out: [
-        "statslog_statsdtest.cpp",
-    ],
-}
-
-cc_library_static {
-    name: "libstatslog_statsdtest",
-    generated_sources: ["statslog_statsdtest.cpp"],
-    generated_headers: ["statslog_statsdtest.h"],
-    export_generated_headers: ["statslog_statsdtest.h"],
-    shared_libs: [
-        "libstatssocket",
-    ]
-}
-
-cc_library_static {
-    name: "libstatslog_statsd",
-    generated_sources: ["statslog_statsd.cpp"],
-    generated_headers: ["statslog_statsd.h"],
-    export_generated_headers: ["statslog_statsd.h"],
-    apex_available: [
-        "com.android.os.statsd",
-        "test_com.android.os.statsd",
-    ],
-    shared_libs: [
-        "libstatssocket",
-    ]
-}
-
-// =========
-// statsd
-// =========
-
-cc_binary {
-    name: "statsd",
-    defaults: ["statsd_defaults"],
-
-    srcs: ["src/main.cpp"],
-
-    cflags: [
-        "-Wall",
-        "-Wextra",
-        "-Werror",
-        "-Wno-unused-parameter",
-        // optimize for size (protobuf glop can get big)
-        "-Os",
-        // "-g",
-        // "-O0",
-    ],
-
-    product_variables: {
-        eng: {
-            // Enable sanitizer ONLY on eng builds
-            //sanitize: {
-            //    address: true,
-            //},
-        },
-        debuggable: {
-            // Add a flag to enable stats log printing from statsd on debug builds.
-            cflags: ["-DVERY_VERBOSE_PRINTING"],
-        },
-    },
-
-    proto: {
-        type: "lite",
-        static: true,
-    },
-    stl: "libc++_static",
-
-    shared_libs: [
-        "libstatssocket",
-    ],
-
-    apex_available: [
-        "com.android.os.statsd",
-        "test_com.android.os.statsd",
-    ],
-}
-
-// ==============
-// statsd_test
-// ==============
-
-cc_test {
-    name: "statsd_test",
-    defaults: ["statsd_defaults"],
-    test_suites: ["device-tests", "mts"],
-    test_config: "statsd_test.xml",
-
-    //TODO(b/153588990): Remove when the build system properly separates
-    //32bit and 64bit architectures.
-    compile_multilib: "both",
-    multilib: {
-        lib64: {
-            suffix: "64",
-        },
-        lib32: {
-            suffix: "32",
-        },
-    },
-
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wno-missing-field-initializers",
-        "-Wno-unused-variable",
-        "-Wno-unused-function",
-        "-Wno-unused-parameter",
-    ],
-
-    require_root: true,
-
-    srcs: [
-        // atom_field_options.proto needs field_options.proto, but that is
-        // not included in libprotobuf-cpp-lite, so compile it here.
-        ":libprotobuf-internal-protos",
-
-        "src/atom_field_options.proto",
-        "src/atoms.proto",
-        "src/shell/shell_data.proto",
-        "src/stats_log.proto",
-        "tests/AlarmMonitor_test.cpp",
-        "tests/anomaly/AlarmTracker_test.cpp",
-        "tests/anomaly/AnomalyTracker_test.cpp",
-        "tests/condition/CombinationConditionTracker_test.cpp",
-        "tests/condition/ConditionTimer_test.cpp",
-        "tests/condition/SimpleConditionTracker_test.cpp",
-        "tests/ConfigManager_test.cpp",
-        "tests/e2e/Alarm_e2e_test.cpp",
-        "tests/e2e/Anomaly_count_e2e_test.cpp",
-        "tests/e2e/Anomaly_duration_sum_e2e_test.cpp",
-        "tests/e2e/Attribution_e2e_test.cpp",
-        "tests/e2e/ConfigTtl_e2e_test.cpp",
-        "tests/e2e/CountMetric_e2e_test.cpp",
-        "tests/e2e/DurationMetric_e2e_test.cpp",
-        "tests/e2e/GaugeMetric_e2e_pull_test.cpp",
-        "tests/e2e/GaugeMetric_e2e_push_test.cpp",
-        "tests/e2e/MetricActivation_e2e_test.cpp",
-        "tests/e2e/MetricConditionLink_e2e_test.cpp",
-        "tests/e2e/PartialBucket_e2e_test.cpp",
-        "tests/e2e/ValueMetric_pull_e2e_test.cpp",
-        "tests/e2e/WakelockDuration_e2e_test.cpp",
-        "tests/external/puller_util_test.cpp",
-        "tests/external/StatsCallbackPuller_test.cpp",
-        "tests/external/StatsPuller_test.cpp",
-        "tests/external/StatsPullerManager_test.cpp",
-        "tests/FieldValue_test.cpp",
-        "tests/guardrail/StatsdStats_test.cpp",
-        "tests/HashableDimensionKey_test.cpp",
-        "tests/indexed_priority_queue_test.cpp",
-        "tests/log_event/LogEventQueue_test.cpp",
-        "tests/LogEntryMatcher_test.cpp",
-        "tests/LogEvent_test.cpp",
-        "tests/metadata_util_test.cpp",
-        "tests/metrics/CountMetricProducer_test.cpp",
-        "tests/metrics/DurationMetricProducer_test.cpp",
-        "tests/metrics/EventMetricProducer_test.cpp",
-        "tests/metrics/GaugeMetricProducer_test.cpp",
-        "tests/metrics/MaxDurationTracker_test.cpp",
-        "tests/metrics/metrics_test_helper.cpp",
-        "tests/metrics/OringDurationTracker_test.cpp",
-        "tests/metrics/ValueMetricProducer_test.cpp",
-        "tests/MetricsManager_test.cpp",
-        "tests/shell/ShellSubscriber_test.cpp",
-        "tests/state/StateTracker_test.cpp",
-        "tests/statsd_test_util.cpp",
-        "tests/StatsLogProcessor_test.cpp",
-        "tests/StatsService_test.cpp",
-        "tests/storage/StorageManager_test.cpp",
-        "tests/UidMap_test.cpp",
-        "tests/utils/MultiConditionTrigger_test.cpp",
-    ],
-
-    static_libs: [
-        "libgmock",
-        "libplatformprotos",
-        "libstatslog_statsdtest",
-        "libstatssocket_private",
-    ],
-
-    proto: {
-        type: "lite",
-        include_dirs: ["external/protobuf/src"],
-    },
-
-}
-
-//#############################
-// statsd micro benchmark
-//#############################
-
-cc_benchmark {
-    name: "statsd_benchmark",
-    defaults: ["statsd_defaults"],
-
-    srcs: [
-        // atom_field_options.proto needs field_options.proto, but that is
-        // not included in libprotobuf-cpp-lite, so compile it here.
-        ":libprotobuf-internal-protos",
-
-        "benchmark/duration_metric_benchmark.cpp",
-        "benchmark/filter_value_benchmark.cpp",
-        "benchmark/get_dimensions_for_condition_benchmark.cpp",
-        "benchmark/hello_world_benchmark.cpp",
-        "benchmark/log_event_benchmark.cpp",
-        "benchmark/main.cpp",
-        "benchmark/metric_util.cpp",
-        "benchmark/stats_write_benchmark.cpp",
-        "src/atom_field_options.proto",
-        "src/atoms.proto",
-        "src/stats_log.proto",
-    ],
-
-    proto: {
-        type: "lite",
-        include_dirs: ["external/protobuf/src"],
-    },
-
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wno-unused-parameter",
-        "-Wno-unused-variable",
-        "-Wno-unused-function",
-
-        // Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374
-        "-Wno-varargs",
-    ],
-
-    static_libs: [
-        "libplatformprotos",
-        "libstatssocket_private",
-    ],
-
-    shared_libs: [
-        "libgtest_prod",
-        "libprotobuf-cpp-lite",
-        "libstatslog",
-    ],
-}
-
-// ====  java proto device library (for test only)  ==============================
-java_library {
-    name: "statsdprotolite",
-    sdk_version: "core_current",
-    proto: {
-        type: "lite",
-        include_dirs: ["external/protobuf/src"],
-    },
-
-    srcs: [
-        "src/atoms.proto",
-        "src/shell/shell_config.proto",
-        "src/shell/shell_data.proto",
-        "src/stats_log.proto",
-        "src/statsd_config.proto",
-    ],
-
-    static_libs: [
-        "platformprotoslite",
-    ],
-    // Protos have lots of MissingOverride and similar.
-    errorprone: {
-        javacflags: ["-XepDisableAllChecks"],
-    },
-}
-
-// Filegroup for statsd config proto definition.
-filegroup {
-    name: "statsd-config-proto-def",
-    srcs: ["src/statsd_config.proto"],
-}
diff --git a/cmds/statsd/OWNERS b/cmds/statsd/OWNERS
deleted file mode 100644
index a61babf..0000000
--- a/cmds/statsd/OWNERS
+++ /dev/null
@@ -1,9 +0,0 @@
-jeffreyhuang@google.com
-joeo@google.com
-jtnguyen@google.com
-muhammadq@google.com
-ruchirr@google.com
-singhtejinder@google.com
-tsaichristine@google.com
-yaochen@google.com
-yro@google.com
diff --git a/cmds/statsd/TEST_MAPPING b/cmds/statsd/TEST_MAPPING
deleted file mode 100644
index 8dee073..0000000
--- a/cmds/statsd/TEST_MAPPING
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "presubmit" : [
-    {
-      "name" : "statsd_test"
-    }
-  ]
-}
\ No newline at end of file
diff --git a/cmds/statsd/benchmark/duration_metric_benchmark.cpp b/cmds/statsd/benchmark/duration_metric_benchmark.cpp
deleted file mode 100644
index 2d315d9..0000000
--- a/cmds/statsd/benchmark/duration_metric_benchmark.cpp
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 <vector>
-#include "benchmark/benchmark.h"
-#include "FieldValue.h"
-#include "HashableDimensionKey.h"
-#include "logd/LogEvent.h"
-#include "stats_log_util.h"
-#include "metric_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::vector;
-
-static StatsdConfig CreateDurationMetricConfig_NoLink_AND_CombinationCondition(
-        DurationMetric::AggregationType aggregationType, bool addExtraDimensionInCondition) {
-    StatsdConfig config;
-    *config.add_atom_matcher() = CreateStartScheduledJobAtomMatcher();
-    *config.add_atom_matcher() = CreateFinishScheduledJobAtomMatcher();
-    *config.add_atom_matcher() = CreateSyncStartAtomMatcher();
-    *config.add_atom_matcher() = CreateSyncEndAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-
-    auto scheduledJobPredicate = CreateScheduledJobPredicate();
-    auto dimensions = scheduledJobPredicate.mutable_simple_predicate()->mutable_dimensions();
-    dimensions->set_field(android::util::SCHEDULED_JOB_STATE_CHANGED);
-    dimensions->add_child()->set_field(2);  // job name field.
-
-    auto screenIsOffPredicate = CreateScreenIsOffPredicate();
-
-    auto isSyncingPredicate = CreateIsSyncingPredicate();
-    auto syncDimension = isSyncingPredicate.mutable_simple_predicate()->mutable_dimensions();
-    *syncDimension = CreateAttributionUidAndTagDimensions(android::util::SYNC_STATE_CHANGED,
-                                                          {Position::FIRST});
-    if (addExtraDimensionInCondition) {
-        syncDimension->add_child()->set_field(2 /* name field*/);
-    }
-
-    *config.add_predicate() = scheduledJobPredicate;
-    *config.add_predicate() = screenIsOffPredicate;
-    *config.add_predicate() = isSyncingPredicate;
-    auto combinationPredicate = config.add_predicate();
-    combinationPredicate->set_id(StringToId("CombinationPredicate"));
-    combinationPredicate->mutable_combination()->set_operation(LogicalOperation::AND);
-    addPredicateToPredicateCombination(screenIsOffPredicate, combinationPredicate);
-    addPredicateToPredicateCombination(isSyncingPredicate, combinationPredicate);
-
-    auto metric = config.add_duration_metric();
-    metric->set_bucket(FIVE_MINUTES);
-    metric->set_id(StringToId("scheduledJob"));
-    metric->set_what(scheduledJobPredicate.id());
-    metric->set_condition(combinationPredicate->id());
-    metric->set_aggregation_type(aggregationType);
-    auto dimensionWhat = metric->mutable_dimensions_in_what();
-    dimensionWhat->set_field(android::util::SCHEDULED_JOB_STATE_CHANGED);
-    dimensionWhat->add_child()->set_field(2);  // job name field.
-    *metric->mutable_dimensions_in_condition() = CreateAttributionUidAndTagDimensions(
-            android::util::SYNC_STATE_CHANGED, {Position::FIRST});
-    return config;
-}
-
-static StatsdConfig CreateDurationMetricConfig_Link_AND_CombinationCondition(
-        DurationMetric::AggregationType aggregationType, bool addExtraDimensionInCondition) {
-    StatsdConfig config;
-    *config.add_atom_matcher() = CreateStartScheduledJobAtomMatcher();
-    *config.add_atom_matcher() = CreateFinishScheduledJobAtomMatcher();
-    *config.add_atom_matcher() = CreateSyncStartAtomMatcher();
-    *config.add_atom_matcher() = CreateSyncEndAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-
-    auto scheduledJobPredicate = CreateScheduledJobPredicate();
-    auto dimensions = scheduledJobPredicate.mutable_simple_predicate()->mutable_dimensions();
-    *dimensions = CreateAttributionUidDimensions(
-                android::util::SCHEDULED_JOB_STATE_CHANGED, {Position::FIRST});
-    dimensions->add_child()->set_field(2);  // job name field.
-
-    auto isSyncingPredicate = CreateIsSyncingPredicate();
-    auto syncDimension = isSyncingPredicate.mutable_simple_predicate()->mutable_dimensions();
-    *syncDimension = CreateAttributionUidDimensions(
-            android::util::SYNC_STATE_CHANGED, {Position::FIRST});
-    if (addExtraDimensionInCondition) {
-        syncDimension->add_child()->set_field(2 /* name field*/);
-    }
-
-    auto screenIsOffPredicate = CreateScreenIsOffPredicate();
-
-    *config.add_predicate() = scheduledJobPredicate;
-    *config.add_predicate() = screenIsOffPredicate;
-    *config.add_predicate() = isSyncingPredicate;
-    auto combinationPredicate = config.add_predicate();
-    combinationPredicate->set_id(StringToId("CombinationPredicate"));
-    combinationPredicate->mutable_combination()->set_operation(LogicalOperation::AND);
-    addPredicateToPredicateCombination(screenIsOffPredicate, combinationPredicate);
-    addPredicateToPredicateCombination(isSyncingPredicate, combinationPredicate);
-
-    auto metric = config.add_duration_metric();
-    metric->set_bucket(FIVE_MINUTES);
-    metric->set_id(StringToId("scheduledJob"));
-    metric->set_what(scheduledJobPredicate.id());
-    metric->set_condition(combinationPredicate->id());
-    metric->set_aggregation_type(aggregationType);
-    *metric->mutable_dimensions_in_what() = CreateAttributionUidDimensions(
-            android::util::SCHEDULED_JOB_STATE_CHANGED, {Position::FIRST});
-
-    auto links = metric->add_links();
-    links->set_condition(isSyncingPredicate.id());
-    *links->mutable_fields_in_what() =
-            CreateAttributionUidDimensions(
-                android::util::SCHEDULED_JOB_STATE_CHANGED, {Position::FIRST});
-    *links->mutable_fields_in_condition() =
-            CreateAttributionUidDimensions(android::util::SYNC_STATE_CHANGED, {Position::FIRST});
-    return config;
-}
-
-static void BM_DurationMetricNoLink(benchmark::State& state) {
-    ConfigKey cfgKey;
-    auto config = CreateDurationMetricConfig_NoLink_AND_CombinationCondition(
-            DurationMetric::SUM, false);
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 11,
-                                                   android::view::DISPLAY_STATE_OFF));
-    events.push_back(
-            CreateScreenStateChangedEvent(bucketStartTimeNs + 40, android::view::DISPLAY_STATE_ON));
-
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 102,
-                                                   android::view::DISPLAY_STATE_OFF));
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 450,
-                                                   android::view::DISPLAY_STATE_ON));
-
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 650,
-                                                   android::view::DISPLAY_STATE_OFF));
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 100,
-                                                   android::view::DISPLAY_STATE_ON));
-
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 640,
-                                                   android::view::DISPLAY_STATE_OFF));
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 650,
-                                                   android::view::DISPLAY_STATE_ON));
-
-    vector<int> attributionUids1 = {9999};
-    vector<string> attributionTags1 = {""};
-    events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + 2, attributionUids1,
-                                                  attributionTags1, "job0"));
-    events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + 101, attributionUids1,
-                                                   attributionTags1, "job0"));
-
-    events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + 201, attributionUids1,
-                                                  attributionTags1, "job2"));
-    events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + 500, attributionUids1,
-                                                   attributionTags1, "job2"));
-
-    vector<int> attributionUids2 = {8888};
-    events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + 600, attributionUids2,
-                                                  attributionTags1, "job2"));
-    events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + bucketSizeNs + 850,
-                                                   attributionUids2, attributionTags1, "job2"));
-
-    events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + bucketSizeNs + 600,
-                                                  attributionUids2, attributionTags1, "job1"));
-    events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + bucketSizeNs + 900,
-                                                   attributionUids2, attributionTags1, "job1"));
-
-    vector<int> attributionUids3 = {111, 222, 222};
-    vector<string> attributionTags3 = {"App1", "GMSCoreModule1", "GMSCoreModule2"};
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 10, attributionUids3,
-                                          attributionTags3, "ReadEmail"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + 50, attributionUids3, attributionTags3,
-                                        "ReadEmail"));
-
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 200, attributionUids3,
-                                          attributionTags3, "ReadEmail"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 300, attributionUids3,
-                                        attributionTags3, "ReadEmail"));
-
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 400, attributionUids3,
-                                          attributionTags3, "ReadDoc"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs - 1, attributionUids3,
-                                        attributionTags3, "ReadDoc"));
-
-    vector<int> attributionUids4 = {333, 222, 555};
-    vector<string> attributionTags4 = {"App2", "GMSCoreModule1", "GMSCoreModule2"};
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 401, attributionUids4,
-                                          attributionTags4, "ReadEmail"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 700, attributionUids4,
-                                        attributionTags4, "ReadEmail"));
-    sortLogEventsByTimestamp(&events);
-
-    while (state.KeepRunning()) {
-        auto processor = CreateStatsLogProcessor(
-                bucketStartTimeNs / NS_PER_SEC, config, cfgKey);
-        for (const auto& event : events) {
-            processor->OnLogEvent(event.get());
-        }
-    }
-}
-
-BENCHMARK(BM_DurationMetricNoLink);
-
-
-static void BM_DurationMetricLink(benchmark::State& state) {
-    ConfigKey cfgKey;
-    auto config = CreateDurationMetricConfig_Link_AND_CombinationCondition(
-        DurationMetric::SUM, false);
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 55,
-                                                   android::view::DISPLAY_STATE_OFF));
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 120,
-                                                   android::view::DISPLAY_STATE_ON));
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 121,
-                                                   android::view::DISPLAY_STATE_OFF));
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 450,
-                                                   android::view::DISPLAY_STATE_ON));
-
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + 501,
-                                                   android::view::DISPLAY_STATE_OFF));
-    events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 100,
-                                                   android::view::DISPLAY_STATE_ON));
-
-    vector<int> attributionUids1 = {111};
-    vector<string> attributionTags1 = {"App1"};
-    events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + 1, attributionUids1,
-                                                  attributionTags1, "job1"));
-    events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + 101, attributionUids1,
-                                                   attributionTags1, "job1"));
-
-    vector<int> attributionUids2 = {333};
-    vector<string> attributionTags2 = {"App2"};
-    events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + 201, attributionUids2,
-                                                  attributionTags2, "job2"));
-    events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + 500, attributionUids2,
-                                                   attributionTags2, "job2"));
-    events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + 600, attributionUids2,
-                                                  attributionTags2, "job2"));
-    events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + bucketSizeNs + 850,
-                                                   attributionUids2, attributionTags2, "job2"));
-
-    vector<int> attributionUids3 = {444};
-    vector<string> attributionTags3 = {"App3"};
-    events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + bucketSizeNs - 2,
-                                                  attributionUids3, attributionTags3, "job3"));
-    events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + bucketSizeNs + 900,
-                                                   attributionUids3, attributionTags3, "job3"));
-
-    vector<int> attributionUids4 = {111, 222, 222};
-    vector<string> attributionTags4 = {"App1", "GMSCoreModule1", "GMSCoreModule2"};
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 50, attributionUids4,
-                                          attributionTags4, "ReadEmail"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + 110, attributionUids4, attributionTags4,
-                                        "ReadEmail"));
-
-    vector<int> attributionUids5 = {333, 222, 555};
-    vector<string> attributionTags5 = {"App2", "GMSCoreModule1", "GMSCoreModule2"};
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 300, attributionUids5,
-                                          attributionTags5, "ReadEmail"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 700, attributionUids5,
-                                        attributionTags5, "ReadEmail"));
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 400, attributionUids5,
-                                          attributionTags5, "ReadDoc"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs - 1, attributionUids5,
-                                        attributionTags5, "ReadDoc"));
-
-    vector<int> attributionUids6 = {444, 222, 555};
-    vector<string> attributionTags6 = {"App3", "GMSCoreModule1", "GMSCoreModule2"};
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 550, attributionUids6,
-                                          attributionTags6, "ReadDoc"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + 800, attributionUids6, attributionTags6,
-                                        "ReadDoc"));
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + bucketSizeNs - 1, attributionUids6,
-                                          attributionTags6, "ReadDoc"));
-    events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 700, attributionUids6,
-                                        attributionTags6, "ReadDoc"));
-    sortLogEventsByTimestamp(&events);
-
-    while (state.KeepRunning()) {
-        auto processor = CreateStatsLogProcessor(
-                bucketStartTimeNs / NS_PER_SEC, config, cfgKey);
-        for (const auto& event : events) {
-            processor->OnLogEvent(event.get());
-        }
-    }
-}
-
-BENCHMARK(BM_DurationMetricLink);
-
-}  //  namespace statsd
-}  //  namespace os
-}  //  namespace android
diff --git a/cmds/statsd/benchmark/filter_value_benchmark.cpp b/cmds/statsd/benchmark/filter_value_benchmark.cpp
deleted file mode 100644
index 743ccc4..0000000
--- a/cmds/statsd/benchmark/filter_value_benchmark.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 <vector>
-
-#include "FieldValue.h"
-#include "HashableDimensionKey.h"
-#include "benchmark/benchmark.h"
-#include "logd/LogEvent.h"
-#include "metric_util.h"
-#include "stats_event.h"
-#include "stats_log_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::vector;
-
-static void createLogEventAndMatcher(LogEvent* event, FieldMatcher* field_matcher) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, 1);
-    AStatsEvent_overwriteTimestamp(statsEvent, 100000);
-
-    std::vector<int> attributionUids = {100, 100};
-    std::vector<string> attributionTags = {"LOCATION", "LOCATION"};
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-
-    AStatsEvent_writeFloat(statsEvent, 3.2f);
-    AStatsEvent_writeString(statsEvent, "LOCATION");
-    AStatsEvent_writeInt64(statsEvent, 990);
-
-    parseStatsEventToLogEvent(statsEvent, event);
-
-    field_matcher->set_field(1);
-    auto child = field_matcher->add_child();
-    child->set_field(1);
-    child->set_position(FIRST);
-    child->add_child()->set_field(1);
-}
-
-static void BM_FilterValue(benchmark::State& state) {
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    FieldMatcher field_matcher;
-    createLogEventAndMatcher(&event, &field_matcher);
-
-    std::vector<Matcher> matchers;
-    translateFieldMatcher(field_matcher, &matchers);
-
-    while (state.KeepRunning()) {
-        HashableDimensionKey output;
-        filterValues(matchers, event.getValues(), &output);
-    }
-}
-
-BENCHMARK(BM_FilterValue);
-
-}  //  namespace statsd
-}  //  namespace os
-}  //  namespace android
diff --git a/cmds/statsd/benchmark/get_dimensions_for_condition_benchmark.cpp b/cmds/statsd/benchmark/get_dimensions_for_condition_benchmark.cpp
deleted file mode 100644
index 7a45565..0000000
--- a/cmds/statsd/benchmark/get_dimensions_for_condition_benchmark.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 <vector>
-
-#include "FieldValue.h"
-#include "HashableDimensionKey.h"
-#include "benchmark/benchmark.h"
-#include "logd/LogEvent.h"
-#include "metric_util.h"
-#include "stats_event.h"
-#include "stats_log_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::vector;
-
-static void createLogEventAndLink(LogEvent* event, Metric2Condition *link) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, 1);
-    AStatsEvent_overwriteTimestamp(statsEvent, 100000);
-
-    std::vector<int> attributionUids = {100, 100};
-    std::vector<string> attributionTags = {"LOCATION", "LOCATION"};
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-
-    AStatsEvent_writeFloat(statsEvent, 3.2f);
-    AStatsEvent_writeString(statsEvent, "LOCATION");
-    AStatsEvent_writeInt64(statsEvent, 990);
-
-    parseStatsEventToLogEvent(statsEvent, event);
-
-    link->conditionId = 1;
-
-    FieldMatcher field_matcher;
-    field_matcher.set_field(event->GetTagId());
-    auto child = field_matcher.add_child();
-    child->set_field(1);
-    child->set_position(FIRST);
-    child->add_child()->set_field(1);
-
-    translateFieldMatcher(field_matcher, &link->metricFields);
-    field_matcher.set_field(event->GetTagId() + 1);
-    translateFieldMatcher(field_matcher, &link->conditionFields);
-}
-
-static void BM_GetDimensionInCondition(benchmark::State& state) {
-    Metric2Condition link;
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    createLogEventAndLink(&event, &link);
-
-    while (state.KeepRunning()) {
-        HashableDimensionKey output;
-        getDimensionForCondition(event.getValues(), link, &output);
-    }
-}
-
-BENCHMARK(BM_GetDimensionInCondition);
-
-
-}  //  namespace statsd
-}  //  namespace os
-}  //  namespace android
diff --git a/cmds/statsd/benchmark/hello_world_benchmark.cpp b/cmds/statsd/benchmark/hello_world_benchmark.cpp
deleted file mode 100644
index c732d39..0000000
--- a/cmds/statsd/benchmark/hello_world_benchmark.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "benchmark/benchmark.h"
-
-static void BM_StringCreation(benchmark::State& state) {
-    while (state.KeepRunning()) std::string empty_string;
-}
-// Register the function as a benchmark
-BENCHMARK(BM_StringCreation);
-
-// Define another benchmark
-static void BM_StringCopy(benchmark::State& state) {
-    std::string x = "hello";
-    while (state.KeepRunning()) std::string copy(x);
-}
-BENCHMARK(BM_StringCopy);
diff --git a/cmds/statsd/benchmark/log_event_benchmark.cpp b/cmds/statsd/benchmark/log_event_benchmark.cpp
deleted file mode 100644
index 057e00b..0000000
--- a/cmds/statsd/benchmark/log_event_benchmark.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 <vector>
-#include "benchmark/benchmark.h"
-#include "logd/LogEvent.h"
-#include "stats_event.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-static size_t createAndParseStatsEvent(uint8_t* msg) {
-    AStatsEvent* event = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(event, 100);
-    AStatsEvent_writeInt32(event, 2);
-    AStatsEvent_writeFloat(event, 2.0);
-    AStatsEvent_build(event);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(event, &size);
-    memcpy(msg, buf, size);
-    return size;
-}
-
-static void BM_LogEventCreation(benchmark::State& state) {
-    uint8_t msg[LOGGER_ENTRY_MAX_PAYLOAD];
-    size_t size = createAndParseStatsEvent(msg);
-    while (state.KeepRunning()) {
-        LogEvent event(/*uid=*/ 1000, /*pid=*/ 1001);
-        benchmark::DoNotOptimize(event.parseBuffer(msg, size));
-    }
-}
-BENCHMARK(BM_LogEventCreation);
-
-}  //  namespace statsd
-}  //  namespace os
-}  //  namespace android
diff --git a/cmds/statsd/benchmark/main.cpp b/cmds/statsd/benchmark/main.cpp
deleted file mode 100644
index 08921f3..0000000
--- a/cmds/statsd/benchmark/main.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 <benchmark/benchmark.h>
-
-BENCHMARK_MAIN();
diff --git a/cmds/statsd/benchmark/metric_util.cpp b/cmds/statsd/benchmark/metric_util.cpp
deleted file mode 100644
index 89fd3d9..0000000
--- a/cmds/statsd/benchmark/metric_util.cpp
+++ /dev/null
@@ -1,379 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "metric_util.h"
-
-#include "stats_event.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(atomId);
-    return atom_matcher;
-}
-
-AtomMatcher CreateScheduledJobStateChangedAtomMatcher(const string& name,
-                                                      ScheduledJobStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(android::util::SCHEDULED_JOB_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(3);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateStartScheduledJobAtomMatcher() {
-    return CreateScheduledJobStateChangedAtomMatcher("ScheduledJobStart",
-                                                     ScheduledJobStateChanged::STARTED);
-}
-
-AtomMatcher CreateFinishScheduledJobAtomMatcher() {
-    return CreateScheduledJobStateChangedAtomMatcher("ScheduledJobFinish",
-                                                     ScheduledJobStateChanged::FINISHED);
-}
-
-AtomMatcher CreateScreenBrightnessChangedAtomMatcher() {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId("ScreenBrightnessChanged"));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(android::util::SCREEN_BRIGHTNESS_CHANGED);
-    return atom_matcher;
-}
-
-AtomMatcher CreateUidProcessStateChangedAtomMatcher() {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId("UidProcessStateChanged"));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(android::util::UID_PROCESS_STATE_CHANGED);
-    return atom_matcher;
-}
-
-AtomMatcher CreateWakelockStateChangedAtomMatcher(const string& name,
-                                                  WakelockStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(android::util::WAKELOCK_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(4);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateAcquireWakelockAtomMatcher() {
-    return CreateWakelockStateChangedAtomMatcher("AcquireWakelock", WakelockStateChanged::ACQUIRE);
-}
-
-AtomMatcher CreateReleaseWakelockAtomMatcher() {
-    return CreateWakelockStateChangedAtomMatcher("ReleaseWakelock", WakelockStateChanged::RELEASE);
-}
-
-AtomMatcher CreateScreenStateChangedAtomMatcher(
-    const string& name, android::view::DisplayStateEnum state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(android::util::SCREEN_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(1);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateScreenTurnedOnAtomMatcher() {
-    return CreateScreenStateChangedAtomMatcher("ScreenTurnedOn",
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-}
-
-AtomMatcher CreateScreenTurnedOffAtomMatcher() {
-    return CreateScreenStateChangedAtomMatcher("ScreenTurnedOff",
-            ::android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-}
-
-AtomMatcher CreateSyncStateChangedAtomMatcher(
-    const string& name, SyncStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(android::util::SYNC_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(3);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateSyncStartAtomMatcher() {
-    return CreateSyncStateChangedAtomMatcher("SyncStart", SyncStateChanged::ON);
-}
-
-AtomMatcher CreateSyncEndAtomMatcher() {
-    return CreateSyncStateChangedAtomMatcher("SyncEnd", SyncStateChanged::OFF);
-}
-
-AtomMatcher CreateActivityForegroundStateChangedAtomMatcher(
-    const string& name, ActivityForegroundStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(android::util::ACTIVITY_FOREGROUND_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(4);  // Activity field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateMoveToBackgroundAtomMatcher() {
-    return CreateActivityForegroundStateChangedAtomMatcher(
-        "MoveToBackground", ActivityForegroundStateChanged::BACKGROUND);
-}
-
-AtomMatcher CreateMoveToForegroundAtomMatcher() {
-    return CreateActivityForegroundStateChangedAtomMatcher(
-        "MoveToForeground", ActivityForegroundStateChanged::FOREGROUND);
-}
-
-Predicate CreateScheduledJobPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("ScheduledJobRunningPredicate"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("ScheduledJobStart"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("ScheduledJobFinish"));
-    return predicate;
-}
-
-Predicate CreateBatterySaverModePredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("BatterySaverIsOn"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("BatterySaverModeStart"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("BatterySaverModeStop"));
-    return predicate;
-}
-
-Predicate CreateScreenIsOnPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("ScreenIsOn"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("ScreenTurnedOn"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("ScreenTurnedOff"));
-    return predicate;
-}
-
-Predicate CreateScreenIsOffPredicate() {
-    Predicate predicate;
-    predicate.set_id(1111123);
-    predicate.mutable_simple_predicate()->set_start(StringToId("ScreenTurnedOff"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("ScreenTurnedOn"));
-    return predicate;
-}
-
-Predicate CreateHoldingWakelockPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("HoldingWakelock"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("AcquireWakelock"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("ReleaseWakelock"));
-    return predicate;
-}
-
-Predicate CreateIsSyncingPredicate() {
-    Predicate predicate;
-    predicate.set_id(33333333333333);
-    predicate.mutable_simple_predicate()->set_start(StringToId("SyncStart"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("SyncEnd"));
-    return predicate;
-}
-
-Predicate CreateIsInBackgroundPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("IsInBackground"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("MoveToBackground"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("MoveToForeground"));
-    return predicate;
-}
-
-void addPredicateToPredicateCombination(const Predicate& predicate,
-                                        Predicate* combinationPredicate) {
-    combinationPredicate->mutable_combination()->add_predicate(predicate.id());
-}
-
-FieldMatcher CreateAttributionUidDimensions(const int atomId,
-                                            const std::vector<Position>& positions) {
-    FieldMatcher dimensions;
-    dimensions.set_field(atomId);
-    for (const auto position : positions) {
-        auto child = dimensions.add_child();
-        child->set_field(1);
-        child->set_position(position);
-        child->add_child()->set_field(1);
-    }
-    return dimensions;
-}
-
-FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId,
-                                                 const std::vector<Position>& positions) {
-    FieldMatcher dimensions;
-    dimensions.set_field(atomId);
-    for (const auto position : positions) {
-        auto child = dimensions.add_child();
-        child->set_field(1);
-        child->set_position(position);
-        child->add_child()->set_field(1);
-        child->add_child()->set_field(2);
-    }
-    return dimensions;
-}
-
-FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields) {
-    FieldMatcher dimensions;
-    dimensions.set_field(atomId);
-    for (const int field : fields) {
-        dimensions.add_child()->set_field(field);
-    }
-    return dimensions;
-}
-
-void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids,
-                      const vector<string>& attributionTags) {
-    vector<const char*> cTags(attributionTags.size());
-    for (int i = 0; i < cTags.size(); i++) {
-        cTags[i] = attributionTags[i].c_str();
-    }
-
-    AStatsEvent_writeAttributionChain(statsEvent,
-                                      reinterpret_cast<const uint32_t*>(attributionUids.data()),
-                                      cTags.data(), attributionUids.size());
-}
-
-void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent) {
-    AStatsEvent_build(statsEvent);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(statsEvent, &size);
-    logEvent->parseBuffer(buf, size);
-
-    AStatsEvent_release(statsEvent);
-}
-
-std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(
-        uint64_t timestampNs, const android::view::DisplayStateEnum state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::SCREEN_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateScheduledJobStateChangedEvent(
-        const vector<int>& attributionUids, const vector<string>& attributionTags,
-        const string& jobName, const ScheduledJobStateChanged::State state, uint64_t timestampNs) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::SCHEDULED_JOB_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_writeString(statsEvent, jobName.c_str());
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateStartScheduledJobEvent(uint64_t timestampNs,
-                                                       const vector<int>& attributionUids,
-                                                       const vector<string>& attributionTags,
-                                                       const string& jobName) {
-    return CreateScheduledJobStateChangedEvent(attributionUids, attributionTags, jobName,
-                                               ScheduledJobStateChanged::STARTED, timestampNs);
-}
-
-// Create log event when scheduled job finishes.
-std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent(uint64_t timestampNs,
-                                                        const vector<int>& attributionUids,
-                                                        const vector<string>& attributionTags,
-                                                        const string& jobName) {
-    return CreateScheduledJobStateChangedEvent(attributionUids, attributionTags, jobName,
-                                               ScheduledJobStateChanged::FINISHED, timestampNs);
-}
-
-std::unique_ptr<LogEvent> CreateSyncStateChangedEvent(uint64_t timestampNs,
-                                                      const vector<int>& attributionUids,
-                                                      const vector<string>& attributionTags,
-                                                      const string& name,
-                                                      const SyncStateChanged::State state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::SYNC_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_writeString(statsEvent, name.c_str());
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateSyncStartEvent(uint64_t timestampNs,
-                                               const vector<int>& attributionUids,
-                                               const vector<string>& attributionTags,
-                                               const string& name) {
-    return CreateSyncStateChangedEvent(timestampNs, attributionUids, attributionTags, name,
-                                       SyncStateChanged::ON);
-}
-
-std::unique_ptr<LogEvent> CreateSyncEndEvent(uint64_t timestampNs,
-                                             const vector<int>& attributionUids,
-                                             const vector<string>& attributionTags,
-                                             const string& name) {
-    return CreateSyncStateChangedEvent(timestampNs, attributionUids, attributionTags, name,
-                                       SyncStateChanged::OFF);
-}
-
-sp<StatsLogProcessor> CreateStatsLogProcessor(const long timeBaseSec, const StatsdConfig& config,
-                                              const ConfigKey& key) {
-    sp<UidMap> uidMap = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    sp<StatsLogProcessor> processor =
-            new StatsLogProcessor(uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor,
-                                  timeBaseSec * NS_PER_SEC, [](const ConfigKey&) { return true; },
-                                  [](const int&, const vector<int64_t>&) { return true; });
-    processor->OnConfigUpdated(timeBaseSec * NS_PER_SEC, key, config);
-    return processor;
-}
-
-void sortLogEventsByTimestamp(std::vector<std::unique_ptr<LogEvent>> *events) {
-  std::sort(events->begin(), events->end(),
-            [](const std::unique_ptr<LogEvent>& a, const std::unique_ptr<LogEvent>& b) {
-              return a->GetElapsedTimestampNs() < b->GetElapsedTimestampNs();
-            });
-}
-
-int64_t StringToId(const string& str) {
-    return static_cast<int64_t>(std::hash<std::string>()(str));
-}
-
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/benchmark/metric_util.h b/cmds/statsd/benchmark/metric_util.h
deleted file mode 100644
index 3efaa85..0000000
--- a/cmds/statsd/benchmark/metric_util.h
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#pragma once
-
-#include "frameworks/base/cmds/statsd/src/stats_log.pb.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "src/StatsLogProcessor.h"
-#include "src/logd/LogEvent.h"
-#include "stats_event.h"
-#include "statslog.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Create AtomMatcher proto to simply match a specific atom type.
-AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId);
-
-// Create AtomMatcher proto for scheduled job state changed.
-AtomMatcher CreateScheduledJobStateChangedAtomMatcher();
-
-// Create AtomMatcher proto for starting a scheduled job.
-AtomMatcher CreateStartScheduledJobAtomMatcher();
-
-// Create AtomMatcher proto for a scheduled job is done.
-AtomMatcher CreateFinishScheduledJobAtomMatcher();
-
-// Create AtomMatcher proto for screen brightness state changed.
-AtomMatcher CreateScreenBrightnessChangedAtomMatcher();
-
-// Create AtomMatcher proto for acquiring wakelock.
-AtomMatcher CreateAcquireWakelockAtomMatcher();
-
-// Create AtomMatcher proto for releasing wakelock.
-AtomMatcher CreateReleaseWakelockAtomMatcher() ;
-
-// Create AtomMatcher proto for screen turned on.
-AtomMatcher CreateScreenTurnedOnAtomMatcher();
-
-// Create AtomMatcher proto for screen turned off.
-AtomMatcher CreateScreenTurnedOffAtomMatcher();
-
-// Create AtomMatcher proto for app sync turned on.
-AtomMatcher CreateSyncStartAtomMatcher();
-
-// Create AtomMatcher proto for app sync turned off.
-AtomMatcher CreateSyncEndAtomMatcher();
-
-// Create AtomMatcher proto for app sync moves to background.
-AtomMatcher CreateMoveToBackgroundAtomMatcher();
-
-// Create AtomMatcher proto for app sync moves to foreground.
-AtomMatcher CreateMoveToForegroundAtomMatcher();
-
-// Create Predicate proto for screen is off.
-Predicate CreateScreenIsOffPredicate();
-
-// Create Predicate proto for a running scheduled job.
-Predicate CreateScheduledJobPredicate();
-
-// Create Predicate proto for holding wakelock.
-Predicate CreateHoldingWakelockPredicate();
-
-// Create a Predicate proto for app syncing.
-Predicate CreateIsSyncingPredicate();
-
-// Create a Predicate proto for app is in background.
-Predicate CreateIsInBackgroundPredicate();
-
-// Add a predicate to the predicate combination.
-void addPredicateToPredicateCombination(const Predicate& predicate, Predicate* combination);
-
-// Create dimensions from primitive fields.
-FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields);
-
-// Create dimensions by attribution uid and tag.
-FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId,
-                                                  const std::vector<Position>& positions);
-
-// Create dimensions by attribution uid only.
-FieldMatcher CreateAttributionUidDimensions(const int atomId,
-                                            const std::vector<Position>& positions);
-
-void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids,
-                      const vector<string>& attributionTags);
-
-void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent);
-
-// Create log event for screen state changed.
-std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(
-        uint64_t timestampNs, const android::view::DisplayStateEnum state);
-
-// Create log event when scheduled job starts.
-std::unique_ptr<LogEvent> CreateStartScheduledJobEvent(uint64_t timestampNs,
-                                                       const vector<int>& attributionUids,
-                                                       const vector<string>& attributionTags,
-                                                       const string& jobName);
-
-// Create log event when scheduled job finishes.
-std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent(uint64_t timestampNs,
-                                                        const vector<int>& attributionUids,
-                                                        const vector<string>& attributionTags,
-                                                        const string& jobName);
-
-// Create log event when the app sync starts.
-std::unique_ptr<LogEvent> CreateSyncStartEvent(uint64_t timestampNs,
-                                               const vector<int>& attributionUids,
-                                               const vector<string>& attributionTags,
-                                               const string& name);
-
-// Create log event when the app sync ends.
-std::unique_ptr<LogEvent> CreateSyncEndEvent(uint64_t timestampNs,
-                                             const vector<int>& attributionUids,
-                                             const vector<string>& attributionTags,
-                                             const string& name);
-
-// Create a statsd log event processor upon the start time in seconds, config and key.
-sp<StatsLogProcessor> CreateStatsLogProcessor(const long timeBaseSec, const StatsdConfig& config,
-                                              const ConfigKey& key);
-
-// Util function to sort the log events by timestamp.
-void sortLogEventsByTimestamp(std::vector<std::unique_ptr<LogEvent>> *events);
-
-int64_t StringToId(const string& str);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/benchmark/stats_write_benchmark.cpp b/cmds/statsd/benchmark/stats_write_benchmark.cpp
deleted file mode 100644
index f5a0cd5..0000000
--- a/cmds/statsd/benchmark/stats_write_benchmark.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "benchmark/benchmark.h"
-#include <statslog.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-static void BM_StatsWrite(benchmark::State& state) {
-    const char* reason = "test";
-    int64_t boot_end_time = 1234567;
-    int64_t total_duration = 100;
-    int64_t bootloader_duration = 10;
-    int64_t time_since_last_boot = 99999999;
-    while (state.KeepRunning()) {
-        android::util::stats_write(
-                android::util::BOOT_SEQUENCE_REPORTED, reason, reason,
-                boot_end_time, total_duration, bootloader_duration, time_since_last_boot);
-        total_duration++;
-    }
-}
-BENCHMARK(BM_StatsWrite);
-
-}  //  namespace statsd
-}  //  namespace os
-}  //  namespace android
diff --git a/cmds/statsd/src/FieldValue.cpp b/cmds/statsd/src/FieldValue.cpp
deleted file mode 100644
index c9ccfb9..0000000
--- a/cmds/statsd/src/FieldValue.cpp
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false
-#include "Log.h"
-#include "FieldValue.h"
-#include "HashableDimensionKey.h"
-#include "math.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-int32_t getEncodedField(int32_t pos[], int32_t depth, bool includeDepth) {
-    int32_t field = 0;
-    for (int32_t i = 0; i <= depth; i++) {
-        int32_t shiftBits = 8 * (kMaxLogDepth - i);
-        field |= (pos[i] << shiftBits);
-    }
-
-    if (includeDepth) {
-        field |= (depth << 24);
-    }
-    return field;
-}
-
-int32_t encodeMatcherMask(int32_t mask[], int32_t depth) {
-    return getEncodedField(mask, depth, false) | 0xff000000;
-}
-
-bool Field::matches(const Matcher& matcher) const {
-    if (mTag != matcher.mMatcher.getTag()) {
-        return false;
-    }
-    if ((mField & matcher.mMask) == matcher.mMatcher.getField()) {
-        return true;
-    }
-
-    if (matcher.hasAllPositionMatcher() &&
-        (mField & (matcher.mMask & kClearAllPositionMatcherMask)) == matcher.mMatcher.getField()) {
-        return true;
-    }
-
-    return false;
-}
-
-void translateFieldMatcher(int tag, const FieldMatcher& matcher, int depth, int* pos, int* mask,
-                           std::vector<Matcher>* output) {
-    if (depth > kMaxLogDepth) {
-        ALOGE("depth > 2");
-        return;
-    }
-
-    pos[depth] = matcher.field();
-    mask[depth] = 0x7f;
-
-    if (matcher.has_position()) {
-        depth++;
-        if (depth > 2) {
-            return;
-        }
-        switch (matcher.position()) {
-            case Position::ALL:
-                pos[depth] = 0x00;
-                mask[depth] = 0x7f;
-                break;
-            case Position::ANY:
-                pos[depth] = 0;
-                mask[depth] = 0;
-                break;
-            case Position::FIRST:
-                pos[depth] = 1;
-                mask[depth] = 0x7f;
-                break;
-            case Position::LAST:
-                pos[depth] = 0x80;
-                mask[depth] = 0x80;
-                break;
-            case Position::POSITION_UNKNOWN:
-                pos[depth] = 0;
-                mask[depth] = 0;
-                break;
-        }
-    }
-
-    if (matcher.child_size() == 0) {
-        output->push_back(Matcher(Field(tag, pos, depth), encodeMatcherMask(mask, depth)));
-    } else {
-        for (const auto& child : matcher.child()) {
-            translateFieldMatcher(tag, child, depth + 1, pos, mask, output);
-        }
-    }
-}
-
-void translateFieldMatcher(const FieldMatcher& matcher, std::vector<Matcher>* output) {
-    int pos[] = {1, 1, 1};
-    int mask[] = {0x7f, 0x7f, 0x7f};
-    int tag = matcher.field();
-    for (const auto& child : matcher.child()) {
-        translateFieldMatcher(tag, child, 0, pos, mask, output);
-    }
-}
-
-bool isAttributionUidField(const FieldValue& value) {
-    return isAttributionUidField(value.mField, value.mValue);
-}
-
-int32_t getUidIfExists(const FieldValue& value) {
-    // the field is uid field if the field is the uid field in attribution node
-    // or annotated as such in the atom
-    bool isUid = isAttributionUidField(value) || isUidField(value);
-    return isUid ? value.mValue.int_value : -1;
-}
-
-bool isAttributionUidField(const Field& field, const Value& value) {
-    int f = field.getField() & 0xff007f;
-    if (f == 0x10001 && value.getType() == INT) {
-        return true;
-    }
-    return false;
-}
-
-bool isUidField(const FieldValue& fieldValue) {
-    return fieldValue.mAnnotations.isUidField();
-}
-
-Value::Value(const Value& from) {
-    type = from.getType();
-    switch (type) {
-        case INT:
-            int_value = from.int_value;
-            break;
-        case LONG:
-            long_value = from.long_value;
-            break;
-        case FLOAT:
-            float_value = from.float_value;
-            break;
-        case DOUBLE:
-            double_value = from.double_value;
-            break;
-        case STRING:
-            str_value = from.str_value;
-            break;
-        case STORAGE:
-            storage_value = from.storage_value;
-            break;
-        default:
-            break;
-    }
-}
-
-std::string Value::toString() const {
-    switch (type) {
-        case INT:
-            return std::to_string(int_value) + "[I]";
-        case LONG:
-            return std::to_string(long_value) + "[L]";
-        case FLOAT:
-            return std::to_string(float_value) + "[F]";
-        case DOUBLE:
-            return std::to_string(double_value) + "[D]";
-        case STRING:
-            return str_value + "[S]";
-        case STORAGE:
-            return "bytes of size " + std::to_string(storage_value.size()) + "[ST]";
-        default:
-            return "[UNKNOWN]";
-    }
-}
-
-bool Value::isZero() const {
-    switch (type) {
-        case INT:
-            return int_value == 0;
-        case LONG:
-            return long_value == 0;
-        case FLOAT:
-            return fabs(float_value) <= std::numeric_limits<float>::epsilon();
-        case DOUBLE:
-            return fabs(double_value) <= std::numeric_limits<double>::epsilon();
-        case STRING:
-            return str_value.size() == 0;
-        case STORAGE:
-            return storage_value.size() == 0;
-        default:
-            return false;
-    }
-}
-
-bool Value::operator==(const Value& that) const {
-    if (type != that.getType()) return false;
-
-    switch (type) {
-        case INT:
-            return int_value == that.int_value;
-        case LONG:
-            return long_value == that.long_value;
-        case FLOAT:
-            return float_value == that.float_value;
-        case DOUBLE:
-            return double_value == that.double_value;
-        case STRING:
-            return str_value == that.str_value;
-        case STORAGE:
-            return storage_value == that.storage_value;
-        default:
-            return false;
-    }
-}
-
-bool Value::operator!=(const Value& that) const {
-    if (type != that.getType()) return true;
-    switch (type) {
-        case INT:
-            return int_value != that.int_value;
-        case LONG:
-            return long_value != that.long_value;
-        case FLOAT:
-            return float_value != that.float_value;
-        case DOUBLE:
-            return double_value != that.double_value;
-        case STRING:
-            return str_value != that.str_value;
-        case STORAGE:
-            return storage_value != that.storage_value;
-        default:
-            return false;
-    }
-}
-
-bool Value::operator<(const Value& that) const {
-    if (type != that.getType()) return type < that.getType();
-
-    switch (type) {
-        case INT:
-            return int_value < that.int_value;
-        case LONG:
-            return long_value < that.long_value;
-        case FLOAT:
-            return float_value < that.float_value;
-        case DOUBLE:
-            return double_value < that.double_value;
-        case STRING:
-            return str_value < that.str_value;
-        case STORAGE:
-            return storage_value < that.storage_value;
-        default:
-            return false;
-    }
-}
-
-bool Value::operator>(const Value& that) const {
-    if (type != that.getType()) return type > that.getType();
-
-    switch (type) {
-        case INT:
-            return int_value > that.int_value;
-        case LONG:
-            return long_value > that.long_value;
-        case FLOAT:
-            return float_value > that.float_value;
-        case DOUBLE:
-            return double_value > that.double_value;
-        case STRING:
-            return str_value > that.str_value;
-        case STORAGE:
-            return storage_value > that.storage_value;
-        default:
-            return false;
-    }
-}
-
-bool Value::operator>=(const Value& that) const {
-    if (type != that.getType()) return type >= that.getType();
-
-    switch (type) {
-        case INT:
-            return int_value >= that.int_value;
-        case LONG:
-            return long_value >= that.long_value;
-        case FLOAT:
-            return float_value >= that.float_value;
-        case DOUBLE:
-            return double_value >= that.double_value;
-        case STRING:
-            return str_value >= that.str_value;
-        case STORAGE:
-            return storage_value >= that.storage_value;
-        default:
-            return false;
-    }
-}
-
-Value Value::operator-(const Value& that) const {
-    Value v;
-    if (type != that.type) {
-        ALOGE("Can't operate on different value types, %d, %d", type, that.type);
-        return v;
-    }
-    if (type == STRING) {
-        ALOGE("Can't operate on string value type");
-        return v;
-    }
-
-    if (type == STORAGE) {
-        ALOGE("Can't operate on storage value type");
-        return v;
-    }
-
-    switch (type) {
-        case INT:
-            v.setInt(int_value - that.int_value);
-            break;
-        case LONG:
-            v.setLong(long_value - that.long_value);
-            break;
-        case FLOAT:
-            v.setFloat(float_value - that.float_value);
-            break;
-        case DOUBLE:
-            v.setDouble(double_value - that.double_value);
-            break;
-        default:
-            break;
-    }
-    return v;
-}
-
-Value& Value::operator=(const Value& that) {
-    type = that.type;
-    switch (type) {
-        case INT:
-            int_value = that.int_value;
-            break;
-        case LONG:
-            long_value = that.long_value;
-            break;
-        case FLOAT:
-            float_value = that.float_value;
-            break;
-        case DOUBLE:
-            double_value = that.double_value;
-            break;
-        case STRING:
-            str_value = that.str_value;
-            break;
-        case STORAGE:
-            storage_value = that.storage_value;
-            break;
-        default:
-            break;
-    }
-    return *this;
-}
-
-Value& Value::operator+=(const Value& that) {
-    if (type != that.type) {
-        ALOGE("Can't operate on different value types, %d, %d", type, that.type);
-        return *this;
-    }
-    if (type == STRING) {
-        ALOGE("Can't operate on string value type");
-        return *this;
-    }
-    if (type == STORAGE) {
-        ALOGE("Can't operate on storage value type");
-        return *this;
-    }
-
-    switch (type) {
-        case INT:
-            int_value += that.int_value;
-            break;
-        case LONG:
-            long_value += that.long_value;
-            break;
-        case FLOAT:
-            float_value += that.float_value;
-            break;
-        case DOUBLE:
-            double_value += that.double_value;
-            break;
-        default:
-            break;
-    }
-    return *this;
-}
-
-double Value::getDouble() const {
-    switch (type) {
-        case INT:
-            return int_value;
-        case LONG:
-            return long_value;
-        case FLOAT:
-            return float_value;
-        case DOUBLE:
-            return double_value;
-        default:
-            return 0;
-    }
-}
-
-bool equalDimensions(const std::vector<Matcher>& dimension_a,
-                     const std::vector<Matcher>& dimension_b) {
-    bool eq = dimension_a.size() == dimension_b.size();
-    for (size_t i = 0; eq && i < dimension_a.size(); ++i) {
-        if (dimension_b[i] != dimension_a[i]) {
-            eq = false;
-        }
-    }
-    return eq;
-}
-
-bool subsetDimensions(const std::vector<Matcher>& dimension_a,
-                      const std::vector<Matcher>& dimension_b) {
-    if (dimension_a.size() > dimension_b.size()) {
-        return false;
-    }
-    for (size_t i = 0; i < dimension_a.size(); ++i) {
-        bool found = false;
-        for (size_t j = 0; j < dimension_b.size(); ++j) {
-            if (dimension_a[i] == dimension_b[j]) {
-                found = true;
-            }
-        }
-        if (!found) {
-            return false;
-        }
-    }
-    return true;
-}
-
-bool HasPositionANY(const FieldMatcher& matcher) {
-    if (matcher.has_position() && matcher.position() == Position::ANY) {
-        return true;
-    }
-    for (const auto& child : matcher.child()) {
-        if (HasPositionANY(child)) {
-            return true;
-        }
-    }
-    return false;
-}
-
-bool HasPositionALL(const FieldMatcher& matcher) {
-    if (matcher.has_position() && matcher.position() == Position::ALL) {
-        return true;
-    }
-    for (const auto& child : matcher.child()) {
-        if (HasPositionALL(child)) {
-            return true;
-        }
-    }
-    return false;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/FieldValue.h b/cmds/statsd/src/FieldValue.h
deleted file mode 100644
index fd86e36..0000000
--- a/cmds/statsd/src/FieldValue.h
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "annotations.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class HashableDimensionKey;
-struct Matcher;
-struct Field;
-struct FieldValue;
-
-const int32_t kMaxLogDepth = 2;
-const int32_t kLastBitMask = 0x80;
-const int32_t kClearLastBitDeco = 0x7f;
-const int32_t kClearAllPositionMatcherMask = 0xffff00ff;
-
-enum Type { UNKNOWN, INT, LONG, FLOAT, DOUBLE, STRING, STORAGE };
-
-int32_t getEncodedField(int32_t pos[], int32_t depth, bool includeDepth);
-
-int32_t encodeMatcherMask(int32_t mask[], int32_t depth);
-
-// Get the encoded field for a leaf with a [field] number at depth 0;
-inline int32_t getSimpleField(size_t field) {
-    return ((int32_t)field << 8 * 2);
-}
-
-/**
- * Field is a wrapper class for 2 integers that represents the field of a log element in its Atom
- * proto.
- * [mTag]: the atom id.
- * [mField]: encoded path from the root (atom) to leaf.
- *
- * For example:
- * WakeLockStateChanged {
- *    repeated AttributionNode = 1;
- *    int state = 2;
- *    string tag = 3;
- * }
- * Read from logd, the items are structured as below:
- * [[[1000, "tag"], [2000, "tag2"],], 2,"hello"]
- *
- * When we read through the list, we will encode each field in a 32bit integer.
- * 8bit segments   |--------|--------|--------|--------|
- *                    Depth   field0 [L]field1 [L]field1
- *
- *  The first 8 bits are the depth of the field. for example, the uid 1000 has depth 2.
- *  The following 3 8-bit are for the item's position at each level.
- *  The first bit of each 8bits field is reserved to mark if the item is the last item at that level
- *  this is to make matching easier later.
- *
- *  The above wakelock event is translated into FieldValue pairs.
- *  0x02010101->1000
- *  0x02010182->tag
- *  0x02018201->2000
- *  0x02018282->tag2
- *  0x00020000->2
- *  0x00030000->"hello"
- *
- *  This encoding is the building block for the later operations.
- *  Please see the definition for Matcher below to see how the matching is done.
- */
-struct Field {
-private:
-    int32_t mTag;
-    int32_t mField;
-
-public:
-    Field() {}
-
-    Field(int32_t tag, int32_t pos[], int32_t depth) : mTag(tag) {
-        mField = getEncodedField(pos, depth, true);
-    }
-
-    Field(const Field& from) : mTag(from.getTag()), mField(from.getField()) {
-    }
-
-    Field(int32_t tag, int32_t field) : mTag(tag), mField(field){};
-
-    inline void setField(int32_t field) {
-        mField = field;
-    }
-
-    inline void setTag(int32_t tag) {
-        mTag = tag;
-    }
-
-    inline void decorateLastPos(int32_t depth) {
-        int32_t mask = kLastBitMask << 8 * (kMaxLogDepth - depth);
-        mField |= mask;
-    }
-
-    inline int32_t getTag() const {
-        return mTag;
-    }
-
-    inline int32_t getDepth() const {
-        return (mField >> 24);
-    }
-
-    inline int32_t getPath(int32_t depth) const {
-        if (depth > 2 || depth < 0) return 0;
-
-        int32_t field = (mField & 0x00ffffff);
-        int32_t mask = 0xffffffff;
-        return (field & (mask << 8 * (kMaxLogDepth - depth)));
-    }
-
-    inline int32_t getPrefix(int32_t depth) const {
-        if (depth == 0) return 0;
-        return getPath(depth - 1);
-    }
-
-    inline int32_t getField() const {
-        return mField;
-    }
-
-    inline int32_t getRawPosAtDepth(int32_t depth) const {
-        int32_t field = (mField & 0x00ffffff);
-        int32_t shift = 8 * (kMaxLogDepth - depth);
-        int32_t mask = 0xff << shift;
-
-        return (field & mask) >> shift;
-    }
-
-    inline int32_t getPosAtDepth(int32_t depth) const {
-        return getRawPosAtDepth(depth) & kClearLastBitDeco;
-    }
-
-    // Check if the first bit of the 8-bit segment for depth is 1
-    inline bool isLastPos(int32_t depth) const {
-        int32_t field = (mField & 0x00ffffff);
-        int32_t mask = kLastBitMask << 8 * (kMaxLogDepth - depth);
-        return (field & mask) != 0;
-    }
-
-    // if the 8-bit segment is all 0's
-    inline bool isAnyPosMatcher(int32_t depth) const {
-        return getDepth() >= depth && getRawPosAtDepth(depth) == 0;
-    }
-    // if the 8bit is 0x80 (1000 0000)
-    inline bool isLastPosMatcher(int32_t depth) const {
-        return getDepth() >= depth && getRawPosAtDepth(depth) == kLastBitMask;
-    }
-
-    inline bool operator==(const Field& that) const {
-        return mTag == that.getTag() && mField == that.getField();
-    };
-
-    inline bool operator!=(const Field& that) const {
-        return mTag != that.getTag() || mField != that.getField();
-    };
-
-    bool operator<(const Field& that) const {
-        if (mTag != that.getTag()) {
-            return mTag < that.getTag();
-        }
-
-        if (mField != that.getField()) {
-            return mField < that.getField();
-        }
-
-        return false;
-    }
-
-    bool matches(const Matcher& that) const;
-};
-
-/**
- * Matcher represents a leaf matcher in the FieldMatcher in statsd_config.
- *
- * It contains all information needed to match one or more leaf node.
- * All information is encoded in a Field(2 ints) and a bit mask(1 int).
- *
- * For example, to match the first/any/last uid field in attribution chain in Atom 10,
- * we have the following FieldMatcher in statsd_config
- *    FieldMatcher {
- *        field:10
- *         FieldMatcher {
- *              field:1
- *              position: any/last/first
- *              FieldMatcher {
- *                  field:1
- *              }
- *          }
- *     }
- *
- * We translate the FieldMatcher into a Field, and mask
- * First: [Matcher Field] 0x02010101  [Mask]0xff7f7f7f
- * Last:  [Matcher Field] 0x02018001  [Mask]0xff7f807f
- * Any:   [Matcher Field] 0x02010001  [Mask]0xff7f007f
- * All:   [Matcher Field] 0x02010001  [Mask]0xff7f7f7f
- *
- * [To match a log Field with a Matcher] we apply the bit mask to the log Field and check if
- * the result is equal to the Matcher Field. That's a bit wise AND operation + check if 2 ints are
- * equal. Nothing can beat the performance of this matching algorithm.
- *
- * TODO(b/110561213): ADD EXAMPLE HERE.
- */
-struct Matcher {
-    Matcher(const Field& matcher, int32_t mask) : mMatcher(matcher), mMask(mask){};
-
-    const Field mMatcher;
-    const int32_t mMask;
-
-    inline const Field& getMatcher() const {
-        return mMatcher;
-    }
-
-    inline int32_t getMask() const {
-        return mMask;
-    }
-
-    inline int32_t getRawMaskAtDepth(int32_t depth) const {
-        int32_t field = (mMask & 0x00ffffff);
-        int32_t shift = 8 * (kMaxLogDepth - depth);
-        int32_t mask = 0xff << shift;
-
-        return (field & mask) >> shift;
-    }
-
-    bool hasAllPositionMatcher() const {
-        return mMatcher.getDepth() == 2 && getRawMaskAtDepth(1) == 0x7f;
-    }
-
-    bool hasAnyPositionMatcher(int* prefix) const {
-        if (mMatcher.getDepth() == 2 && mMatcher.getRawPosAtDepth(1) == 0) {
-            (*prefix) = mMatcher.getPrefix(1);
-            return true;
-        }
-        return false;
-    }
-
-    inline bool operator!=(const Matcher& that) const {
-        return mMatcher != that.getMatcher() || mMask != that.getMask();
-    }
-
-    inline bool operator==(const Matcher& that) const {
-        return mMatcher == that.mMatcher && mMask == that.mMask;
-    }
-};
-
-inline Matcher getSimpleMatcher(int32_t tag, size_t field) {
-    return Matcher(Field(tag, getSimpleField(field)), 0xff7f0000);
-}
-
-inline Matcher getFirstUidMatcher(int32_t atomId) {
-    int32_t pos[] = {1, 1, 1};
-    return Matcher(Field(atomId, pos, 2), 0xff7f7f7f);
-}
-
-/**
- * A wrapper for a union type to contain multiple types of values.
- *
- */
-struct Value {
-    Value() : type(UNKNOWN) {}
-
-    Value(int32_t v) {
-        int_value = v;
-        type = INT;
-    }
-
-    Value(int64_t v) {
-        long_value = v;
-        type = LONG;
-    }
-
-    Value(float v) {
-        float_value = v;
-        type = FLOAT;
-    }
-
-    Value(double v) {
-        double_value = v;
-        type = DOUBLE;
-    }
-
-    Value(const std::string& v) {
-        str_value = v;
-        type = STRING;
-    }
-
-    Value(const std::vector<uint8_t>& v) {
-        storage_value = v;
-        type = STORAGE;
-    }
-
-    void setInt(int32_t v) {
-        int_value = v;
-        type = INT;
-    }
-
-    void setLong(int64_t v) {
-        long_value = v;
-        type = LONG;
-    }
-
-    void setFloat(float v) {
-        float_value = v;
-        type = FLOAT;
-    }
-
-    void setDouble(double v) {
-        double_value = v;
-        type = DOUBLE;
-    }
-
-    union {
-        int32_t int_value;
-        int64_t long_value;
-        float float_value;
-        double double_value;
-    };
-    std::string str_value;
-    std::vector<uint8_t> storage_value;
-
-    Type type;
-
-    std::string toString() const;
-
-    bool isZero() const;
-
-    Type getType() const {
-        return type;
-    }
-
-    double getDouble() const;
-
-    Value(const Value& from);
-
-    bool operator==(const Value& that) const;
-    bool operator!=(const Value& that) const;
-
-    bool operator<(const Value& that) const;
-    bool operator>(const Value& that) const;
-    bool operator>=(const Value& that) const;
-    Value operator-(const Value& that) const;
-    Value& operator+=(const Value& that);
-    Value& operator=(const Value& that);
-};
-
-class Annotations {
-public:
-    Annotations() {
-        setNested(true);  // Nested = true by default
-    }
-
-    // This enum stores where particular annotations can be found in the
-    // bitmask. Note that these pos do not correspond to annotation ids.
-    enum {
-        NESTED_POS = 0x0,
-        PRIMARY_POS = 0x1,
-        EXCLUSIVE_POS = 0x2,
-        UID_POS = 0x3
-    };
-
-    inline void setNested(bool nested) { setBitmaskAtPos(NESTED_POS, nested); }
-
-    inline void setPrimaryField(bool primary) { setBitmaskAtPos(PRIMARY_POS, primary); }
-
-    inline void setExclusiveState(bool exclusive) { setBitmaskAtPos(EXCLUSIVE_POS, exclusive); }
-
-    inline void setUidField(bool isUid) { setBitmaskAtPos(UID_POS, isUid); }
-
-    // Default value = false
-    inline bool isNested() const { return getValueFromBitmask(NESTED_POS); }
-
-    // Default value = false
-    inline bool isPrimaryField() const { return getValueFromBitmask(PRIMARY_POS); }
-
-    // Default value = false
-    inline bool isExclusiveState() const { return getValueFromBitmask(EXCLUSIVE_POS); }
-
-    // Default value = false
-    inline bool isUidField() const { return getValueFromBitmask(UID_POS); }
-
-private:
-    inline void setBitmaskAtPos(int pos, bool value) {
-        mBooleanBitmask &= ~(1 << pos); // clear
-        mBooleanBitmask |= (value << pos); // set
-    }
-
-    inline bool getValueFromBitmask(int pos) const {
-        return (mBooleanBitmask >> pos) & 0x1;
-    }
-
-    // This is a bitmask over all annotations stored in boolean form. Because
-    // there are only 4 booleans, just one byte is required.
-    uint8_t mBooleanBitmask = 0;
-};
-
-/**
- * Represents a log item, or a dimension item (They are essentially the same).
- */
-struct FieldValue {
-    FieldValue() {}
-    FieldValue(const Field& field, const Value& value) : mField(field), mValue(value) {
-    }
-    bool operator==(const FieldValue& that) const {
-        return mField == that.mField && mValue == that.mValue;
-    }
-    bool operator!=(const FieldValue& that) const {
-        return mField != that.mField || mValue != that.mValue;
-    }
-    bool operator<(const FieldValue& that) const {
-        if (mField != that.mField) {
-            return mField < that.mField;
-        }
-
-        if (mValue != that.mValue) {
-            return mValue < that.mValue;
-        }
-
-        return false;
-    }
-
-    Field mField;
-    Value mValue;
-    Annotations mAnnotations;
-};
-
-bool HasPositionANY(const FieldMatcher& matcher);
-bool HasPositionALL(const FieldMatcher& matcher);
-
-bool isAttributionUidField(const FieldValue& value);
-
-/* returns uid if the field is uid field, or -1 if the field is not a uid field */
-int getUidIfExists(const FieldValue& value);
-
-void translateFieldMatcher(const FieldMatcher& matcher, std::vector<Matcher>* output);
-
-bool isAttributionUidField(const Field& field, const Value& value);
-bool isUidField(const FieldValue& fieldValue);
-
-bool equalDimensions(const std::vector<Matcher>& dimension_a,
-                     const std::vector<Matcher>& dimension_b);
-
-// Returns true if dimension_a is a subset of dimension_b.
-bool subsetDimensions(const std::vector<Matcher>& dimension_a,
-                      const std::vector<Matcher>& dimension_b);
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/HashableDimensionKey.cpp b/cmds/statsd/src/HashableDimensionKey.cpp
deleted file mode 100644
index eba66e0..0000000
--- a/cmds/statsd/src/HashableDimensionKey.cpp
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "HashableDimensionKey.h"
-#include "FieldValue.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::string;
-using std::vector;
-using android::base::StringPrintf;
-
-// These constants must be kept in sync with those in StatsDimensionsValue.java
-const static int STATS_DIMENSIONS_VALUE_STRING_TYPE = 2;
-const static int STATS_DIMENSIONS_VALUE_INT_TYPE = 3;
-const static int STATS_DIMENSIONS_VALUE_LONG_TYPE = 4;
-// const static int STATS_DIMENSIONS_VALUE_BOOL_TYPE = 5; (commented out because
-// unused -- statsd does not correctly support bool types)
-const static int STATS_DIMENSIONS_VALUE_FLOAT_TYPE = 6;
-const static int STATS_DIMENSIONS_VALUE_TUPLE_TYPE = 7;
-
-/**
- * Recursive helper function that populates a parent StatsDimensionsValueParcel
- * with children StatsDimensionsValueParcels.
- *
- * \param parent parcel that will be populated with children
- * \param childDepth depth of children FieldValues
- * \param childPrefix expected FieldValue prefix of children
- * \param dims vector of FieldValues stored by HashableDimensionKey
- * \param index position in dims to start reading children from
- */
-static void populateStatsDimensionsValueParcelChildren(StatsDimensionsValueParcel& parent,
-                                                       int childDepth, int childPrefix,
-                                                       const vector<FieldValue>& dims,
-                                                       size_t& index) {
-    if (childDepth > 2) {
-        ALOGE("Depth > 2 not supported by StatsDimensionsValueParcel.");
-        return;
-    }
-
-    while (index < dims.size()) {
-        const FieldValue& dim = dims[index];
-        int fieldDepth = dim.mField.getDepth();
-        int fieldPrefix = dim.mField.getPrefix(childDepth);
-
-        StatsDimensionsValueParcel child;
-        child.field = dim.mField.getPosAtDepth(childDepth);
-
-        if (fieldDepth == childDepth && fieldPrefix == childPrefix) {
-            switch (dim.mValue.getType()) {
-                case INT:
-                    child.valueType = STATS_DIMENSIONS_VALUE_INT_TYPE;
-                    child.intValue = dim.mValue.int_value;
-                    break;
-                case LONG:
-                    child.valueType = STATS_DIMENSIONS_VALUE_LONG_TYPE;
-                    child.longValue = dim.mValue.long_value;
-                    break;
-                case FLOAT:
-                    child.valueType = STATS_DIMENSIONS_VALUE_FLOAT_TYPE;
-                    child.floatValue = dim.mValue.float_value;
-                    break;
-                case STRING:
-                    child.valueType = STATS_DIMENSIONS_VALUE_STRING_TYPE;
-                    child.stringValue = dim.mValue.str_value;
-                    break;
-                default:
-                    ALOGE("Encountered FieldValue with unsupported value type.");
-                    break;
-            }
-            index++;
-            parent.tupleValue.push_back(child);
-        } else if (fieldDepth > childDepth && fieldPrefix == childPrefix) {
-            // This FieldValue is not a child of the current parent, but it is
-            // an indirect descendant. Thus, create a direct child of TUPLE_TYPE
-            // and recurse to parcel the indirect descendants.
-            child.valueType = STATS_DIMENSIONS_VALUE_TUPLE_TYPE;
-            populateStatsDimensionsValueParcelChildren(child, childDepth + 1,
-                                                       dim.mField.getPrefix(childDepth + 1), dims,
-                                                       index);
-            parent.tupleValue.push_back(child);
-        } else {
-            return;
-        }
-    }
-}
-
-StatsDimensionsValueParcel HashableDimensionKey::toStatsDimensionsValueParcel() const {
-    StatsDimensionsValueParcel root;
-    if (mValues.size() == 0) {
-        return root;
-    }
-
-    root.field = mValues[0].mField.getTag();
-    root.valueType = STATS_DIMENSIONS_VALUE_TUPLE_TYPE;
-
-    // Children of the root correspond to top-level (depth = 0) FieldValues.
-    int childDepth = 0;
-    int childPrefix = 0;
-    size_t index = 0;
-    populateStatsDimensionsValueParcelChildren(root, childDepth, childPrefix, mValues, index);
-
-    return root;
-}
-
-android::hash_t hashDimension(const HashableDimensionKey& value) {
-    android::hash_t hash = 0;
-    for (const auto& fieldValue : value.getValues()) {
-        hash = android::JenkinsHashMix(hash, android::hash_type((int)fieldValue.mField.getField()));
-        hash = android::JenkinsHashMix(hash, android::hash_type((int)fieldValue.mField.getTag()));
-        hash = android::JenkinsHashMix(hash, android::hash_type((int)fieldValue.mValue.getType()));
-        switch (fieldValue.mValue.getType()) {
-            case INT:
-                hash = android::JenkinsHashMix(hash,
-                                               android::hash_type(fieldValue.mValue.int_value));
-                break;
-            case LONG:
-                hash = android::JenkinsHashMix(hash,
-                                               android::hash_type(fieldValue.mValue.long_value));
-                break;
-            case STRING:
-                hash = android::JenkinsHashMix(hash, static_cast<uint32_t>(std::hash<std::string>()(
-                                                             fieldValue.mValue.str_value)));
-                break;
-            case FLOAT: {
-                hash = android::JenkinsHashMix(hash,
-                                               android::hash_type(fieldValue.mValue.float_value));
-                break;
-            }
-            default:
-                break;
-        }
-    }
-    return JenkinsHashWhiten(hash);
-}
-
-bool filterValues(const Matcher& matcherField, const vector<FieldValue>& values,
-                  FieldValue* output) {
-    for (const auto& value : values) {
-        if (value.mField.matches(matcherField)) {
-            (*output) = value;
-            return true;
-        }
-    }
-    return false;
-}
-
-bool filterValues(const vector<Matcher>& matcherFields, const vector<FieldValue>& values,
-                  HashableDimensionKey* output) {
-    size_t num_matches = 0;
-    for (const auto& value : values) {
-        for (size_t i = 0; i < matcherFields.size(); ++i) {
-            const auto& matcher = matcherFields[i];
-            if (value.mField.matches(matcher)) {
-                output->addValue(value);
-                output->mutableValue(num_matches)->mField.setTag(value.mField.getTag());
-                output->mutableValue(num_matches)->mField.setField(
-                    value.mField.getField() & matcher.mMask);
-                num_matches++;
-            }
-        }
-    }
-    return num_matches > 0;
-}
-
-bool filterPrimaryKey(const std::vector<FieldValue>& values, HashableDimensionKey* output) {
-    size_t num_matches = 0;
-    const int32_t simpleFieldMask = 0xff7f0000;
-    const int32_t attributionUidFieldMask = 0xff7f7f7f;
-    for (const auto& value : values) {
-        if (value.mAnnotations.isPrimaryField()) {
-            output->addValue(value);
-            output->mutableValue(num_matches)->mField.setTag(value.mField.getTag());
-            const int32_t mask =
-                    isAttributionUidField(value) ? attributionUidFieldMask : simpleFieldMask;
-            output->mutableValue(num_matches)->mField.setField(value.mField.getField() & mask);
-            num_matches++;
-        }
-    }
-    return num_matches > 0;
-}
-
-void filterGaugeValues(const std::vector<Matcher>& matcherFields,
-                       const std::vector<FieldValue>& values, std::vector<FieldValue>* output) {
-    for (const auto& field : matcherFields) {
-        for (const auto& value : values) {
-            if (value.mField.matches(field)) {
-                output->push_back(value);
-            }
-        }
-    }
-}
-
-void getDimensionForCondition(const std::vector<FieldValue>& eventValues,
-                              const Metric2Condition& links,
-                              HashableDimensionKey* conditionDimension) {
-    // Get the dimension first by using dimension from what.
-    filterValues(links.metricFields, eventValues, conditionDimension);
-
-    size_t count = conditionDimension->getValues().size();
-    if (count != links.conditionFields.size()) {
-        return;
-    }
-
-    for (size_t i = 0; i < count; i++) {
-        conditionDimension->mutableValue(i)->mField.setField(
-                links.conditionFields[i].mMatcher.getField());
-        conditionDimension->mutableValue(i)->mField.setTag(
-                links.conditionFields[i].mMatcher.getTag());
-    }
-}
-
-void getDimensionForState(const std::vector<FieldValue>& eventValues, const Metric2State& link,
-                          HashableDimensionKey* statePrimaryKey) {
-    // First, get the dimension from the event using the "what" fields from the
-    // MetricStateLinks.
-    filterValues(link.metricFields, eventValues, statePrimaryKey);
-
-    // Then check that the statePrimaryKey size equals the number of state fields
-    size_t count = statePrimaryKey->getValues().size();
-    if (count != link.stateFields.size()) {
-        return;
-    }
-
-    // For each dimension Value in the statePrimaryKey, set the field and tag
-    // using the state atom fields from MetricStateLinks.
-    for (size_t i = 0; i < count; i++) {
-        statePrimaryKey->mutableValue(i)->mField.setField(link.stateFields[i].mMatcher.getField());
-        statePrimaryKey->mutableValue(i)->mField.setTag(link.stateFields[i].mMatcher.getTag());
-    }
-}
-
-bool containsLinkedStateValues(const HashableDimensionKey& whatKey,
-                               const HashableDimensionKey& primaryKey,
-                               const vector<Metric2State>& stateLinks, const int32_t stateAtomId) {
-    if (whatKey.getValues().size() < primaryKey.getValues().size()) {
-        ALOGE("Contains linked values false: whatKey is too small");
-        return false;
-    }
-
-    for (const auto& primaryValue : primaryKey.getValues()) {
-        bool found = false;
-        for (const auto& whatValue : whatKey.getValues()) {
-            if (linked(stateLinks, stateAtomId, primaryValue.mField, whatValue.mField) &&
-                primaryValue.mValue == whatValue.mValue) {
-                found = true;
-                break;
-            }
-        }
-        if (!found) {
-            return false;
-        }
-    }
-    return true;
-}
-
-bool linked(const vector<Metric2State>& stateLinks, const int32_t stateAtomId,
-            const Field& stateField, const Field& metricField) {
-    for (auto stateLink : stateLinks) {
-        if (stateLink.stateAtomId != stateAtomId) {
-            continue;
-        }
-
-        for (size_t i = 0; i < stateLink.stateFields.size(); i++) {
-            if (stateLink.stateFields[i].mMatcher == stateField &&
-                stateLink.metricFields[i].mMatcher == metricField) {
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-bool LessThan(const vector<FieldValue>& s1, const vector<FieldValue>& s2) {
-    if (s1.size() != s2.size()) {
-        return s1.size() < s2.size();
-    }
-
-    size_t count = s1.size();
-    for (size_t i = 0; i < count; i++) {
-        if (s1[i] != s2[i]) {
-            return s1[i] < s2[i];
-        }
-    }
-    return false;
-}
-
-bool HashableDimensionKey::operator!=(const HashableDimensionKey& that) const {
-    return !((*this) == that);
-}
-
-bool HashableDimensionKey::operator==(const HashableDimensionKey& that) const {
-    if (mValues.size() != that.getValues().size()) {
-        return false;
-    }
-    size_t count = mValues.size();
-    for (size_t i = 0; i < count; i++) {
-        if (mValues[i] != (that.getValues())[i]) {
-            return false;
-        }
-    }
-    return true;
-};
-
-bool HashableDimensionKey::operator<(const HashableDimensionKey& that) const {
-    return LessThan(getValues(), that.getValues());
-};
-
-bool HashableDimensionKey::contains(const HashableDimensionKey& that) const {
-    if (mValues.size() < that.getValues().size()) {
-        return false;
-    }
-
-    if (mValues.size() == that.getValues().size()) {
-        return (*this) == that;
-    }
-
-    for (const auto& value : that.getValues()) {
-        bool found = false;
-        for (const auto& myValue : mValues) {
-            if (value.mField == myValue.mField && value.mValue == myValue.mValue) {
-                found = true;
-                break;
-            }
-        }
-        if (!found) {
-            return false;
-        }
-    }
-
-    return true;
-}
-
-string HashableDimensionKey::toString() const {
-    std::string output;
-    for (const auto& value : mValues) {
-        output += StringPrintf("(%d)%#x->%s ", value.mField.getTag(), value.mField.getField(),
-                               value.mValue.toString().c_str());
-    }
-    return output;
-}
-
-bool MetricDimensionKey::operator==(const MetricDimensionKey& that) const {
-    return mDimensionKeyInWhat == that.getDimensionKeyInWhat() &&
-           mStateValuesKey == that.getStateValuesKey();
-};
-
-string MetricDimensionKey::toString() const {
-    return mDimensionKeyInWhat.toString() + mStateValuesKey.toString();
-}
-
-bool MetricDimensionKey::operator<(const MetricDimensionKey& that) const {
-    if (mDimensionKeyInWhat < that.getDimensionKeyInWhat()) {
-        return true;
-    } else if (that.getDimensionKeyInWhat() < mDimensionKeyInWhat) {
-        return false;
-    }
-
-    return mStateValuesKey < that.getStateValuesKey();
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/HashableDimensionKey.h b/cmds/statsd/src/HashableDimensionKey.h
deleted file mode 100644
index bd01100..0000000
--- a/cmds/statsd/src/HashableDimensionKey.h
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <aidl/android/os/StatsDimensionsValueParcel.h>
-#include <utils/JenkinsHash.h>
-#include <vector>
-#include "android-base/stringprintf.h"
-#include "FieldValue.h"
-#include "logd/LogEvent.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using ::aidl::android::os::StatsDimensionsValueParcel;
-
-struct Metric2Condition {
-    int64_t conditionId;
-    std::vector<Matcher> metricFields;
-    std::vector<Matcher> conditionFields;
-};
-
-struct Metric2State {
-    int32_t stateAtomId;
-    std::vector<Matcher> metricFields;
-    std::vector<Matcher> stateFields;
-};
-
-class HashableDimensionKey {
-public:
-    explicit HashableDimensionKey(const std::vector<FieldValue>& values) {
-        mValues = values;
-    }
-
-    HashableDimensionKey() {};
-
-    HashableDimensionKey(const HashableDimensionKey& that) : mValues(that.getValues()){};
-
-    inline void addValue(const FieldValue& value) {
-        mValues.push_back(value);
-    }
-
-    inline const std::vector<FieldValue>& getValues() const {
-        return mValues;
-    }
-
-    inline std::vector<FieldValue>* mutableValues() {
-        return &mValues;
-    }
-
-    inline FieldValue* mutableValue(size_t i) {
-        if (i >= 0 && i < mValues.size()) {
-            return &(mValues[i]);
-        }
-        return nullptr;
-    }
-
-    StatsDimensionsValueParcel toStatsDimensionsValueParcel() const;
-
-    std::string toString() const;
-
-    bool operator!=(const HashableDimensionKey& that) const;
-
-    bool operator==(const HashableDimensionKey& that) const;
-
-    bool operator<(const HashableDimensionKey& that) const;
-
-    bool contains(const HashableDimensionKey& that) const;
-
-private:
-    std::vector<FieldValue> mValues;
-};
-
-class MetricDimensionKey {
-public:
-    explicit MetricDimensionKey(const HashableDimensionKey& dimensionKeyInWhat,
-                                const HashableDimensionKey& stateValuesKey)
-        : mDimensionKeyInWhat(dimensionKeyInWhat), mStateValuesKey(stateValuesKey){};
-
-    MetricDimensionKey(){};
-
-    MetricDimensionKey(const MetricDimensionKey& that)
-        : mDimensionKeyInWhat(that.getDimensionKeyInWhat()),
-          mStateValuesKey(that.getStateValuesKey()){};
-
-    MetricDimensionKey& operator=(const MetricDimensionKey& from) = default;
-
-    std::string toString() const;
-
-    inline const HashableDimensionKey& getDimensionKeyInWhat() const {
-        return mDimensionKeyInWhat;
-    }
-
-    inline const HashableDimensionKey& getStateValuesKey() const {
-        return mStateValuesKey;
-    }
-
-    inline HashableDimensionKey* getMutableStateValuesKey() {
-        return &mStateValuesKey;
-    }
-
-    inline void setStateValuesKey(const HashableDimensionKey& key) {
-        mStateValuesKey = key;
-    }
-
-    bool hasStateValuesKey() const {
-        return mStateValuesKey.getValues().size() > 0;
-    }
-
-    bool operator==(const MetricDimensionKey& that) const;
-
-    bool operator<(const MetricDimensionKey& that) const;
-
-private:
-    HashableDimensionKey mDimensionKeyInWhat;
-    HashableDimensionKey mStateValuesKey;
-};
-
-android::hash_t hashDimension(const HashableDimensionKey& key);
-
-/**
- * Returns true if a FieldValue field matches the matcher field.
- * The value of the FieldValue is output.
- */
-bool filterValues(const Matcher& matcherField, const std::vector<FieldValue>& values,
-                  FieldValue* output);
-
-/**
- * Creating HashableDimensionKeys from FieldValues using matcher.
- *
- * This function may make modifications to the Field if the matcher has Position=FIRST,LAST or ALL
- * in it. This is because: for example, when we create dimension from last uid in attribution chain,
- * In one event, uid 1000 is at position 5 and it's the last
- * In another event, uid 1000 is at position 6, and it's the last
- * these 2 events should be mapped to the same dimension.  So we will remove the original position
- * from the dimension key for the uid field (by applying 0x80 bit mask).
- */
-bool filterValues(const std::vector<Matcher>& matcherFields, const std::vector<FieldValue>& values,
-                  HashableDimensionKey* output);
-
-/**
- * Creating HashableDimensionKeys from State Primary Keys in FieldValues.
- *
- * This function may make modifications to the Field if the matcher has Position=FIRST,LAST or ALL
- * in it. This is because: for example, when we create dimension from last uid in attribution chain,
- * In one event, uid 1000 is at position 5 and it's the last
- * In another event, uid 1000 is at position 6, and it's the last
- * these 2 events should be mapped to the same dimension.  So we will remove the original position
- * from the dimension key for the uid field (by applying 0x80 bit mask).
- */
-bool filterPrimaryKey(const std::vector<FieldValue>& values, HashableDimensionKey* output);
-
-/**
- * Filter the values from FieldValues using the matchers.
- *
- * In contrast to the above function, this function will not do any modification to the original
- * data. Considering it as taking a snapshot on the atom event.
- */
-void filterGaugeValues(const std::vector<Matcher>& matchers, const std::vector<FieldValue>& values,
-                       std::vector<FieldValue>* output);
-
-void getDimensionForCondition(const std::vector<FieldValue>& eventValues,
-                              const Metric2Condition& links,
-                              HashableDimensionKey* conditionDimension);
-
-/**
- * Get dimension values using metric's "what" fields and fill statePrimaryKey's
- * mField information using "state" fields.
- */
-void getDimensionForState(const std::vector<FieldValue>& eventValues, const Metric2State& link,
-                          HashableDimensionKey* statePrimaryKey);
-
-/**
- * Returns true if the primaryKey values are a subset of the whatKey values.
- * The values from the primaryKey come from the state atom, so we need to
- * check that a link exists between the state atom field and what atom field.
- *
- * Example:
- * whatKey = [Atom: 10, {uid: 1005, wakelock_name: "compose"}]
- * statePrimaryKey = [Atom: 27, {uid: 1005}]
- * Returns true IF one of the Metric2State links Atom 10's uid to Atom 27's uid
- *
- * Example:
- * whatKey = [Atom: 10, {uid: 1005, wakelock_name: "compose"}]
- * statePrimaryKey = [Atom: 59, {uid: 1005, package_name: "system"}]
- * Returns false
- */
-bool containsLinkedStateValues(const HashableDimensionKey& whatKey,
-                               const HashableDimensionKey& primaryKey,
-                               const std::vector<Metric2State>& stateLinks,
-                               const int32_t stateAtomId);
-
-/**
- * Returns true if there is a Metric2State link that links the stateField and
- * the metricField (they are equal fields from different atoms).
- */
-bool linked(const std::vector<Metric2State>& stateLinks, const int32_t stateAtomId,
-            const Field& stateField, const Field& metricField);
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-namespace std {
-
-using android::os::statsd::HashableDimensionKey;
-using android::os::statsd::MetricDimensionKey;
-
-template <>
-struct hash<HashableDimensionKey> {
-    std::size_t operator()(const HashableDimensionKey& key) const {
-        return hashDimension(key);
-    }
-};
-
-template <>
-struct hash<MetricDimensionKey> {
-    std::size_t operator()(const MetricDimensionKey& key) const {
-        android::hash_t hash = hashDimension(key.getDimensionKeyInWhat());
-        hash = android::JenkinsHashMix(hash, hashDimension(key.getStateValuesKey()));
-        return android::JenkinsHashWhiten(hash);
-    }
-};
-}  // namespace std
diff --git a/cmds/statsd/src/Log.h b/cmds/statsd/src/Log.h
deleted file mode 100644
index 87f4cba..0000000
--- a/cmds/statsd/src/Log.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * This file must be included at the top of the file. Other header files
- * occasionally include log.h, and if LOG_TAG isn't set when that happens
- * we'll get a preprocesser error when we try to define it here.
- */
-
-#pragma once
-
-#define LOG_TAG "statsd"
-
-#include <log/log.h>
-
-// Use the local value to turn on/off debug logs instead of using log.tag. properties.
-// The advantage is that in production compiler can remove the logging code if the local
-// DEBUG/VERBOSE is false.
-#define VLOG(...) \
-    if (DEBUG) ALOGD(__VA_ARGS__);
diff --git a/cmds/statsd/src/StatsLogProcessor.cpp b/cmds/statsd/src/StatsLogProcessor.cpp
deleted file mode 100644
index c10f248..0000000
--- a/cmds/statsd/src/StatsLogProcessor.cpp
+++ /dev/null
@@ -1,1132 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "StatsLogProcessor.h"
-
-#include <android-base/file.h>
-#include <cutils/multiuser.h>
-#include <frameworks/base/cmds/statsd/src/active_config_list.pb.h>
-#include <frameworks/base/cmds/statsd/src/experiment_ids.pb.h>
-
-#include "android-base/stringprintf.h"
-#include "external/StatsPullerManager.h"
-#include "guardrail/StatsdStats.h"
-#include "logd/LogEvent.h"
-#include "metrics/CountMetricProducer.h"
-#include "StatsService.h"
-#include "state/StateManager.h"
-#include "stats_log_util.h"
-#include "stats_util.h"
-#include "statslog_statsd.h"
-#include "storage/StorageManager.h"
-
-using namespace android;
-using android::base::StringPrintf;
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_FLOAT;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::ProtoOutputStream;
-using std::vector;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// for ConfigMetricsReportList
-const int FIELD_ID_CONFIG_KEY = 1;
-const int FIELD_ID_REPORTS = 2;
-// for ConfigKey
-const int FIELD_ID_UID = 1;
-const int FIELD_ID_ID = 2;
-// for ConfigMetricsReport
-// const int FIELD_ID_METRICS = 1; // written in MetricsManager.cpp
-const int FIELD_ID_UID_MAP = 2;
-const int FIELD_ID_LAST_REPORT_ELAPSED_NANOS = 3;
-const int FIELD_ID_CURRENT_REPORT_ELAPSED_NANOS = 4;
-const int FIELD_ID_LAST_REPORT_WALL_CLOCK_NANOS = 5;
-const int FIELD_ID_CURRENT_REPORT_WALL_CLOCK_NANOS = 6;
-const int FIELD_ID_DUMP_REPORT_REASON = 8;
-const int FIELD_ID_STRINGS = 9;
-
-// for ActiveConfigList
-const int FIELD_ID_ACTIVE_CONFIG_LIST_CONFIG = 1;
-
-// for permissions checks
-constexpr const char* kPermissionDump = "android.permission.DUMP";
-constexpr const char* kPermissionUsage = "android.permission.PACKAGE_USAGE_STATS";
-
-#define NS_PER_HOUR 3600 * NS_PER_SEC
-
-#define STATS_ACTIVE_METRIC_DIR "/data/misc/stats-active-metric"
-#define STATS_METADATA_DIR "/data/misc/stats-metadata"
-
-// Cool down period for writing data to disk to avoid overwriting files.
-#define WRITE_DATA_COOL_DOWN_SEC 5
-
-StatsLogProcessor::StatsLogProcessor(const sp<UidMap>& uidMap,
-                                     const sp<StatsPullerManager>& pullerManager,
-                                     const sp<AlarmMonitor>& anomalyAlarmMonitor,
-                                     const sp<AlarmMonitor>& periodicAlarmMonitor,
-                                     const int64_t timeBaseNs,
-                                     const std::function<bool(const ConfigKey&)>& sendBroadcast,
-                                     const std::function<bool(
-                                            const int&, const vector<int64_t>&)>& activateBroadcast)
-    : mUidMap(uidMap),
-      mPullerManager(pullerManager),
-      mAnomalyAlarmMonitor(anomalyAlarmMonitor),
-      mPeriodicAlarmMonitor(periodicAlarmMonitor),
-      mSendBroadcast(sendBroadcast),
-      mSendActivationBroadcast(activateBroadcast),
-      mTimeBaseNs(timeBaseNs),
-      mLargestTimestampSeen(0),
-      mLastTimestampSeen(0) {
-    mPullerManager->ForceClearPullerCache();
-    StateManager::getInstance().updateLogSources(uidMap);
-}
-
-StatsLogProcessor::~StatsLogProcessor() {
-}
-
-static void flushProtoToBuffer(ProtoOutputStream& proto, vector<uint8_t>* outData) {
-    outData->clear();
-    outData->resize(proto.size());
-    size_t pos = 0;
-    sp<android::util::ProtoReader> reader = proto.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&((*outData)[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-}
-
-void StatsLogProcessor::processFiredAnomalyAlarmsLocked(
-        const int64_t& timestampNs,
-        unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> alarmSet) {
-    for (const auto& itr : mMetricsManagers) {
-        itr.second->onAnomalyAlarmFired(timestampNs, alarmSet);
-    }
-}
-void StatsLogProcessor::onPeriodicAlarmFired(
-        const int64_t& timestampNs,
-        unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> alarmSet) {
-
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    for (const auto& itr : mMetricsManagers) {
-        itr.second->onPeriodicAlarmFired(timestampNs, alarmSet);
-    }
-}
-
-void StatsLogProcessor::mapIsolatedUidToHostUidIfNecessaryLocked(LogEvent* event) const {
-    if (std::pair<int, int> indexRange; event->hasAttributionChain(&indexRange)) {
-        vector<FieldValue>* const fieldValues = event->getMutableValues();
-        for (int i = indexRange.first; i <= indexRange.second; i++) {
-            FieldValue& fieldValue = fieldValues->at(i);
-            if (isAttributionUidField(fieldValue)) {
-                const int hostUid = mUidMap->getHostUidOrSelf(fieldValue.mValue.int_value);
-                fieldValue.mValue.setInt(hostUid);
-            }
-        }
-    } else {
-        int uidFieldIndex = event->getUidFieldIndex();
-        if (uidFieldIndex != -1) {
-           Value& value = (*event->getMutableValues())[uidFieldIndex].mValue;
-           const int hostUid = mUidMap->getHostUidOrSelf(value.int_value);
-           value.setInt(hostUid);
-        }
-    }
-}
-
-void StatsLogProcessor::onIsolatedUidChangedEventLocked(const LogEvent& event) {
-    status_t err = NO_ERROR, err2 = NO_ERROR, err3 = NO_ERROR;
-    bool is_create = event.GetBool(3, &err);
-    auto parent_uid = int(event.GetLong(1, &err2));
-    auto isolated_uid = int(event.GetLong(2, &err3));
-    if (err == NO_ERROR && err2 == NO_ERROR && err3 == NO_ERROR) {
-        if (is_create) {
-            mUidMap->assignIsolatedUid(isolated_uid, parent_uid);
-        } else {
-            mUidMap->removeIsolatedUid(isolated_uid);
-        }
-    } else {
-        ALOGE("Failed to parse uid in the isolated uid change event.");
-    }
-}
-
-void StatsLogProcessor::onBinaryPushStateChangedEventLocked(LogEvent* event) {
-    pid_t pid = event->GetPid();
-    uid_t uid = event->GetUid();
-    if (!checkPermissionForIds(kPermissionDump, pid, uid) ||
-        !checkPermissionForIds(kPermissionUsage, pid, uid)) {
-        return;
-    }
-    // The Get* functions don't modify the status on success, they only write in
-    // failure statuses, so we can use one status variable for all calls then
-    // check if it is no longer NO_ERROR.
-    status_t err = NO_ERROR;
-    InstallTrainInfo trainInfo;
-    trainInfo.trainName = string(event->GetString(1 /*train name field id*/, &err));
-    trainInfo.trainVersionCode = event->GetLong(2 /*train version field id*/, &err);
-    trainInfo.requiresStaging = event->GetBool(3 /*requires staging field id*/, &err);
-    trainInfo.rollbackEnabled = event->GetBool(4 /*rollback enabled field id*/, &err);
-    trainInfo.requiresLowLatencyMonitor =
-            event->GetBool(5 /*requires low latency monitor field id*/, &err);
-    trainInfo.status = int32_t(event->GetLong(6 /*state field id*/, &err));
-    std::vector<uint8_t> trainExperimentIdBytes =
-            event->GetStorage(7 /*experiment ids field id*/, &err);
-    bool is_rollback = event->GetBool(10 /*is rollback field id*/, &err);
-
-    if (err != NO_ERROR) {
-        ALOGE("Failed to parse fields in binary push state changed log event");
-        return;
-    }
-    ExperimentIds trainExperimentIds;
-    if (!trainExperimentIds.ParseFromArray(trainExperimentIdBytes.data(),
-                                           trainExperimentIdBytes.size())) {
-        ALOGE("Failed to parse experimentids in binary push state changed.");
-        return;
-    }
-    trainInfo.experimentIds = {trainExperimentIds.experiment_id().begin(),
-                               trainExperimentIds.experiment_id().end()};
-
-    // Update the train info on disk and get any data the logevent is missing.
-    getAndUpdateTrainInfoOnDisk(is_rollback, &trainInfo);
-
-    std::vector<uint8_t> trainExperimentIdProto;
-    writeExperimentIdsToProto(trainInfo.experimentIds, &trainExperimentIdProto);
-    int32_t userId = multiuser_get_user_id(uid);
-
-    event->updateValue(2 /*train version field id*/, trainInfo.trainVersionCode, LONG);
-    event->updateValue(7 /*experiment ids field id*/, trainExperimentIdProto, STORAGE);
-    event->updateValue(8 /*user id field id*/, userId, INT);
-
-    // If this event is a rollback event, then the following bits in the event
-    // are invalid and we will need to update them with the values we pulled
-    // from disk.
-    if (is_rollback) {
-        int bit = trainInfo.requiresStaging ? 1 : 0;
-        event->updateValue(3 /*requires staging field id*/, bit, INT);
-        bit = trainInfo.rollbackEnabled ? 1 : 0;
-        event->updateValue(4 /*rollback enabled field id*/, bit, INT);
-        bit = trainInfo.requiresLowLatencyMonitor ? 1 : 0;
-        event->updateValue(5 /*requires low latency monitor field id*/, bit, INT);
-    }
-}
-
-void StatsLogProcessor::getAndUpdateTrainInfoOnDisk(bool is_rollback,
-                                                    InstallTrainInfo* trainInfo) {
-    // If the train name is empty, we don't know which train to attribute the
-    // event to, so return early.
-    if (trainInfo->trainName.empty()) {
-        return;
-    }
-    bool readTrainInfoSuccess = false;
-    InstallTrainInfo trainInfoOnDisk;
-    readTrainInfoSuccess = StorageManager::readTrainInfo(trainInfo->trainName, trainInfoOnDisk);
-
-    bool resetExperimentIds = false;
-    if (readTrainInfoSuccess) {
-        // Keep the old train version if we received an empty version.
-        if (trainInfo->trainVersionCode == -1) {
-            trainInfo->trainVersionCode = trainInfoOnDisk.trainVersionCode;
-        } else if (trainInfo->trainVersionCode != trainInfoOnDisk.trainVersionCode) {
-            // Reset experiment ids if we receive a new non-empty train version.
-            resetExperimentIds = true;
-        }
-
-        // Reset if we received a different experiment id.
-        if (!trainInfo->experimentIds.empty() &&
-            (trainInfoOnDisk.experimentIds.empty() ||
-             trainInfo->experimentIds.at(0) != trainInfoOnDisk.experimentIds[0])) {
-            resetExperimentIds = true;
-        }
-    }
-
-    // Find the right experiment IDs
-    if ((!resetExperimentIds || is_rollback) && readTrainInfoSuccess) {
-        trainInfo->experimentIds = trainInfoOnDisk.experimentIds;
-    }
-
-    if (!trainInfo->experimentIds.empty()) {
-        int64_t firstId = trainInfo->experimentIds.at(0);
-        auto& ids = trainInfo->experimentIds;
-        switch (trainInfo->status) {
-            case android::os::statsd::util::BINARY_PUSH_STATE_CHANGED__STATE__INSTALL_SUCCESS:
-                if (find(ids.begin(), ids.end(), firstId + 1) == ids.end()) {
-                    ids.push_back(firstId + 1);
-                }
-                break;
-            case android::os::statsd::util::BINARY_PUSH_STATE_CHANGED__STATE__INSTALLER_ROLLBACK_INITIATED:
-                if (find(ids.begin(), ids.end(), firstId + 2) == ids.end()) {
-                    ids.push_back(firstId + 2);
-                }
-                break;
-            case android::os::statsd::util::BINARY_PUSH_STATE_CHANGED__STATE__INSTALLER_ROLLBACK_SUCCESS:
-                if (find(ids.begin(), ids.end(), firstId + 3) == ids.end()) {
-                    ids.push_back(firstId + 3);
-                }
-                break;
-        }
-    }
-
-    // If this event is a rollback event, the following fields are invalid and
-    // need to be replaced by the fields stored to disk.
-    if (is_rollback) {
-        trainInfo->requiresStaging = trainInfoOnDisk.requiresStaging;
-        trainInfo->rollbackEnabled = trainInfoOnDisk.rollbackEnabled;
-        trainInfo->requiresLowLatencyMonitor = trainInfoOnDisk.requiresLowLatencyMonitor;
-    }
-
-    StorageManager::writeTrainInfo(*trainInfo);
-}
-
-void StatsLogProcessor::onWatchdogRollbackOccurredLocked(LogEvent* event) {
-    pid_t pid = event->GetPid();
-    uid_t uid = event->GetUid();
-    if (!checkPermissionForIds(kPermissionDump, pid, uid) ||
-        !checkPermissionForIds(kPermissionUsage, pid, uid)) {
-        return;
-    }
-    // The Get* functions don't modify the status on success, they only write in
-    // failure statuses, so we can use one status variable for all calls then
-    // check if it is no longer NO_ERROR.
-    status_t err = NO_ERROR;
-    int32_t rollbackType = int32_t(event->GetInt(1 /*rollback type field id*/, &err));
-    string packageName = string(event->GetString(2 /*package name field id*/, &err));
-
-    if (err != NO_ERROR) {
-        ALOGE("Failed to parse fields in watchdog rollback occurred log event");
-        return;
-    }
-
-    vector<int64_t> experimentIds =
-        processWatchdogRollbackOccurred(rollbackType, packageName);
-    vector<uint8_t> experimentIdProto;
-    writeExperimentIdsToProto(experimentIds, &experimentIdProto);
-
-    event->updateValue(6 /*experiment ids field id*/, experimentIdProto, STORAGE);
-}
-
-vector<int64_t> StatsLogProcessor::processWatchdogRollbackOccurred(const int32_t rollbackTypeIn,
-                                                                    const string& packageNameIn) {
-    // If the package name is empty, we can't attribute it to any train, so
-    // return early.
-    if (packageNameIn.empty()) {
-      return vector<int64_t>();
-    }
-    bool readTrainInfoSuccess = false;
-    InstallTrainInfo trainInfoOnDisk;
-    // We use the package name of the event as the train name.
-    readTrainInfoSuccess = StorageManager::readTrainInfo(packageNameIn, trainInfoOnDisk);
-
-    if (!readTrainInfoSuccess) {
-        return vector<int64_t>();
-    }
-
-    if (trainInfoOnDisk.experimentIds.empty()) {
-        return vector<int64_t>();
-    }
-
-    int64_t firstId = trainInfoOnDisk.experimentIds[0];
-    auto& ids = trainInfoOnDisk.experimentIds;
-    switch (rollbackTypeIn) {
-      case android::os::statsd::util::WATCHDOG_ROLLBACK_OCCURRED__ROLLBACK_TYPE__ROLLBACK_INITIATE:
-            if (find(ids.begin(), ids.end(), firstId + 4) == ids.end()) {
-                ids.push_back(firstId + 4);
-            }
-            StorageManager::writeTrainInfo(trainInfoOnDisk);
-            break;
-      case android::os::statsd::util::WATCHDOG_ROLLBACK_OCCURRED__ROLLBACK_TYPE__ROLLBACK_SUCCESS:
-            if (find(ids.begin(), ids.end(), firstId + 5) == ids.end()) {
-                ids.push_back(firstId + 5);
-            }
-            StorageManager::writeTrainInfo(trainInfoOnDisk);
-            break;
-    }
-
-    return trainInfoOnDisk.experimentIds;
-}
-
-void StatsLogProcessor::resetConfigs() {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    resetConfigsLocked(getElapsedRealtimeNs());
-}
-
-void StatsLogProcessor::resetConfigsLocked(const int64_t timestampNs) {
-    std::vector<ConfigKey> configKeys;
-    for (auto it = mMetricsManagers.begin(); it != mMetricsManagers.end(); it++) {
-        configKeys.push_back(it->first);
-    }
-    resetConfigsLocked(timestampNs, configKeys);
-}
-
-void StatsLogProcessor::OnLogEvent(LogEvent* event) {
-    OnLogEvent(event, getElapsedRealtimeNs());
-}
-
-void StatsLogProcessor::OnLogEvent(LogEvent* event, int64_t elapsedRealtimeNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-
-    // Tell StatsdStats about new event
-    const int64_t eventElapsedTimeNs = event->GetElapsedTimestampNs();
-    int atomId = event->GetTagId();
-    StatsdStats::getInstance().noteAtomLogged(atomId, eventElapsedTimeNs / NS_PER_SEC);
-    if (!event->isValid()) {
-        StatsdStats::getInstance().noteAtomError(atomId);
-        return;
-    }
-
-    // Hard-coded logic to update train info on disk and fill in any information
-    // this log event may be missing.
-    if (atomId == android::os::statsd::util::BINARY_PUSH_STATE_CHANGED) {
-        onBinaryPushStateChangedEventLocked(event);
-    }
-
-    // Hard-coded logic to update experiment ids on disk for certain rollback
-    // types and fill the rollback atom with experiment ids
-    if (atomId == android::os::statsd::util::WATCHDOG_ROLLBACK_OCCURRED) {
-        onWatchdogRollbackOccurredLocked(event);
-    }
-
-#ifdef VERY_VERBOSE_PRINTING
-    if (mPrintAllLogs) {
-        ALOGI("%s", event->ToString().c_str());
-    }
-#endif
-    resetIfConfigTtlExpiredLocked(eventElapsedTimeNs);
-
-    // Hard-coded logic to update the isolated uid's in the uid-map.
-    // The field numbers need to be currently updated by hand with atoms.proto
-    if (atomId == android::os::statsd::util::ISOLATED_UID_CHANGED) {
-        onIsolatedUidChangedEventLocked(*event);
-    } else {
-        // Map the isolated uid to host uid if necessary.
-        mapIsolatedUidToHostUidIfNecessaryLocked(event);
-    }
-
-    StateManager::getInstance().onLogEvent(*event);
-
-    if (mMetricsManagers.empty()) {
-        return;
-    }
-
-    bool fireAlarm = false;
-    {
-        std::lock_guard<std::mutex> anomalyLock(mAnomalyAlarmMutex);
-        if (mNextAnomalyAlarmTime != 0 &&
-            MillisToNano(mNextAnomalyAlarmTime) <= elapsedRealtimeNs) {
-            mNextAnomalyAlarmTime = 0;
-            VLOG("informing anomaly alarm at time %lld", (long long)elapsedRealtimeNs);
-            fireAlarm = true;
-        }
-    }
-    if (fireAlarm) {
-        informAnomalyAlarmFiredLocked(NanoToMillis(elapsedRealtimeNs));
-    }
-
-    int64_t curTimeSec = getElapsedRealtimeSec();
-    if (curTimeSec - mLastPullerCacheClearTimeSec > StatsdStats::kPullerCacheClearIntervalSec) {
-        mPullerManager->ClearPullerCacheIfNecessary(curTimeSec * NS_PER_SEC);
-        mLastPullerCacheClearTimeSec = curTimeSec;
-    }
-
-    std::unordered_set<int> uidsWithActiveConfigsChanged;
-    std::unordered_map<int, std::vector<int64_t>> activeConfigsPerUid;
-    // pass the event to metrics managers.
-    for (auto& pair : mMetricsManagers) {
-        int uid = pair.first.GetUid();
-        int64_t configId = pair.first.GetId();
-        bool isPrevActive = pair.second->isActive();
-        pair.second->onLogEvent(*event);
-        bool isCurActive = pair.second->isActive();
-        // Map all active configs by uid.
-        if (isCurActive) {
-            auto activeConfigs = activeConfigsPerUid.find(uid);
-            if (activeConfigs != activeConfigsPerUid.end()) {
-                activeConfigs->second.push_back(configId);
-            } else {
-                vector<int64_t> newActiveConfigs;
-                newActiveConfigs.push_back(configId);
-                activeConfigsPerUid[uid] = newActiveConfigs;
-            }
-        }
-        // The activation state of this config changed.
-        if (isPrevActive != isCurActive) {
-            VLOG("Active status changed for uid  %d", uid);
-            uidsWithActiveConfigsChanged.insert(uid);
-            StatsdStats::getInstance().noteActiveStatusChanged(pair.first, isCurActive);
-        }
-        flushIfNecessaryLocked(pair.first, *(pair.second));
-    }
-
-    // Don't use the event timestamp for the guardrail.
-    for (int uid : uidsWithActiveConfigsChanged) {
-        // Send broadcast so that receivers can pull data.
-        auto lastBroadcastTime = mLastActivationBroadcastTimes.find(uid);
-        if (lastBroadcastTime != mLastActivationBroadcastTimes.end()) {
-            if (elapsedRealtimeNs - lastBroadcastTime->second <
-                StatsdStats::kMinActivationBroadcastPeriodNs) {
-                StatsdStats::getInstance().noteActivationBroadcastGuardrailHit(uid);
-                VLOG("StatsD would've sent an activation broadcast but the rate limit stopped us.");
-                return;
-            }
-        }
-        auto activeConfigs = activeConfigsPerUid.find(uid);
-        if (activeConfigs != activeConfigsPerUid.end()) {
-            if (mSendActivationBroadcast(uid, activeConfigs->second)) {
-                VLOG("StatsD sent activation notice for uid %d", uid);
-                mLastActivationBroadcastTimes[uid] = elapsedRealtimeNs;
-            }
-        } else {
-            std::vector<int64_t> emptyActiveConfigs;
-            if (mSendActivationBroadcast(uid, emptyActiveConfigs)) {
-                VLOG("StatsD sent EMPTY activation notice for uid %d", uid);
-                mLastActivationBroadcastTimes[uid] = elapsedRealtimeNs;
-            }
-        }
-    }
-}
-
-void StatsLogProcessor::GetActiveConfigs(const int uid, vector<int64_t>& outActiveConfigs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    GetActiveConfigsLocked(uid, outActiveConfigs);
-}
-
-void StatsLogProcessor::GetActiveConfigsLocked(const int uid, vector<int64_t>& outActiveConfigs) {
-    outActiveConfigs.clear();
-    for (auto& pair : mMetricsManagers) {
-        if (pair.first.GetUid() == uid && pair.second->isActive()) {
-            outActiveConfigs.push_back(pair.first.GetId());
-        }
-    }
-}
-
-void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key,
-                                        const StatsdConfig& config) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    WriteDataToDiskLocked(key, timestampNs, CONFIG_UPDATED, NO_TIME_CONSTRAINTS);
-    OnConfigUpdatedLocked(timestampNs, key, config);
-}
-
-void StatsLogProcessor::OnConfigUpdatedLocked(
-        const int64_t timestampNs, const ConfigKey& key, const StatsdConfig& config) {
-    VLOG("Updated configuration for key %s", key.ToString().c_str());
-    sp<MetricsManager> newMetricsManager =
-            new MetricsManager(key, config, mTimeBaseNs, timestampNs, mUidMap, mPullerManager,
-                               mAnomalyAlarmMonitor, mPeriodicAlarmMonitor);
-    if (newMetricsManager->isConfigValid()) {
-        newMetricsManager->init();
-        mUidMap->OnConfigUpdated(key);
-        newMetricsManager->refreshTtl(timestampNs);
-        mMetricsManagers[key] = newMetricsManager;
-        VLOG("StatsdConfig valid");
-    } else {
-        // If there is any error in the config, don't use it.
-        // Remove any existing config with the same key.
-        ALOGE("StatsdConfig NOT valid");
-        mMetricsManagers.erase(key);
-    }
-}
-
-size_t StatsLogProcessor::GetMetricsSize(const ConfigKey& key) const {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    auto it = mMetricsManagers.find(key);
-    if (it == mMetricsManagers.end()) {
-        ALOGW("Config source %s does not exist", key.ToString().c_str());
-        return 0;
-    }
-    return it->second->byteSize();
-}
-
-void StatsLogProcessor::dumpStates(int out, bool verbose) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    FILE* fout = fdopen(out, "w");
-    if (fout == NULL) {
-        return;
-    }
-    fprintf(fout, "MetricsManager count: %lu\n", (unsigned long)mMetricsManagers.size());
-    for (auto metricsManager : mMetricsManagers) {
-        metricsManager.second->dumpStates(fout, verbose);
-    }
-
-    fclose(fout);
-}
-
-/*
- * onDumpReport dumps serialized ConfigMetricsReportList into proto.
- */
-void StatsLogProcessor::onDumpReport(const ConfigKey& key, const int64_t dumpTimeStampNs,
-                                     const bool include_current_partial_bucket,
-                                     const bool erase_data,
-                                     const DumpReportReason dumpReportReason,
-                                     const DumpLatency dumpLatency,
-                                     ProtoOutputStream* proto) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-
-    // Start of ConfigKey.
-    uint64_t configKeyToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_ID_CONFIG_KEY);
-    proto->write(FIELD_TYPE_INT32 | FIELD_ID_UID, key.GetUid());
-    proto->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)key.GetId());
-    proto->end(configKeyToken);
-    // End of ConfigKey.
-
-    bool keepFile = false;
-    auto it = mMetricsManagers.find(key);
-    if (it != mMetricsManagers.end() && it->second->shouldPersistLocalHistory()) {
-        keepFile = true;
-    }
-
-    // Then, check stats-data directory to see there's any file containing
-    // ConfigMetricsReport from previous shutdowns to concatenate to reports.
-    StorageManager::appendConfigMetricsReport(
-            key, proto, erase_data && !keepFile /* should remove file after appending it */,
-            dumpReportReason == ADB_DUMP /*if caller is adb*/);
-
-    if (it != mMetricsManagers.end()) {
-        // This allows another broadcast to be sent within the rate-limit period if we get close to
-        // filling the buffer again soon.
-        mLastBroadcastTimes.erase(key);
-
-        vector<uint8_t> buffer;
-        onConfigMetricsReportLocked(key, dumpTimeStampNs, include_current_partial_bucket,
-                                    erase_data, dumpReportReason, dumpLatency,
-                                    false /* is this data going to be saved on disk */, &buffer);
-        proto->write(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_REPORTS,
-                     reinterpret_cast<char*>(buffer.data()), buffer.size());
-    } else {
-        ALOGW("Config source %s does not exist", key.ToString().c_str());
-    }
-}
-
-/*
- * onDumpReport dumps serialized ConfigMetricsReportList into outData.
- */
-void StatsLogProcessor::onDumpReport(const ConfigKey& key, const int64_t dumpTimeStampNs,
-                                     const bool include_current_partial_bucket,
-                                     const bool erase_data,
-                                     const DumpReportReason dumpReportReason,
-                                     const DumpLatency dumpLatency,
-                                     vector<uint8_t>* outData) {
-    ProtoOutputStream proto;
-    onDumpReport(key, dumpTimeStampNs, include_current_partial_bucket, erase_data,
-                 dumpReportReason, dumpLatency, &proto);
-
-    if (outData != nullptr) {
-        flushProtoToBuffer(proto, outData);
-        VLOG("output data size %zu", outData->size());
-    }
-
-    StatsdStats::getInstance().noteMetricsReportSent(key, proto.size());
-}
-
-/*
- * onConfigMetricsReportLocked dumps serialized ConfigMetricsReport into outData.
- */
-void StatsLogProcessor::onConfigMetricsReportLocked(
-        const ConfigKey& key, const int64_t dumpTimeStampNs,
-        const bool include_current_partial_bucket, const bool erase_data,
-        const DumpReportReason dumpReportReason, const DumpLatency dumpLatency,
-        const bool dataSavedOnDisk, vector<uint8_t>* buffer) {
-    // We already checked whether key exists in mMetricsManagers in
-    // WriteDataToDisk.
-    auto it = mMetricsManagers.find(key);
-    if (it == mMetricsManagers.end()) {
-        return;
-    }
-    int64_t lastReportTimeNs = it->second->getLastReportTimeNs();
-    int64_t lastReportWallClockNs = it->second->getLastReportWallClockNs();
-
-    std::set<string> str_set;
-
-    ProtoOutputStream tempProto;
-    // First, fill in ConfigMetricsReport using current data on memory, which
-    // starts from filling in StatsLogReport's.
-    it->second->onDumpReport(dumpTimeStampNs, include_current_partial_bucket, erase_data,
-                             dumpLatency, &str_set, &tempProto);
-
-    // Fill in UidMap if there is at least one metric to report.
-    // This skips the uid map if it's an empty config.
-    if (it->second->getNumMetrics() > 0) {
-        uint64_t uidMapToken = tempProto.start(FIELD_TYPE_MESSAGE | FIELD_ID_UID_MAP);
-        mUidMap->appendUidMap(
-                dumpTimeStampNs, key, it->second->hashStringInReport() ? &str_set : nullptr,
-                it->second->versionStringsInReport(), it->second->installerInReport(), &tempProto);
-        tempProto.end(uidMapToken);
-    }
-
-    // Fill in the timestamps.
-    tempProto.write(FIELD_TYPE_INT64 | FIELD_ID_LAST_REPORT_ELAPSED_NANOS,
-                    (long long)lastReportTimeNs);
-    tempProto.write(FIELD_TYPE_INT64 | FIELD_ID_CURRENT_REPORT_ELAPSED_NANOS,
-                    (long long)dumpTimeStampNs);
-    tempProto.write(FIELD_TYPE_INT64 | FIELD_ID_LAST_REPORT_WALL_CLOCK_NANOS,
-                    (long long)lastReportWallClockNs);
-    tempProto.write(FIELD_TYPE_INT64 | FIELD_ID_CURRENT_REPORT_WALL_CLOCK_NANOS,
-                    (long long)getWallClockNs());
-    // Dump report reason
-    tempProto.write(FIELD_TYPE_INT32 | FIELD_ID_DUMP_REPORT_REASON, dumpReportReason);
-
-    for (const auto& str : str_set) {
-        tempProto.write(FIELD_TYPE_STRING | FIELD_COUNT_REPEATED | FIELD_ID_STRINGS, str);
-    }
-
-    flushProtoToBuffer(tempProto, buffer);
-
-    // save buffer to disk if needed
-    if (erase_data && !dataSavedOnDisk && it->second->shouldPersistLocalHistory()) {
-        VLOG("save history to disk");
-        string file_name = StorageManager::getDataHistoryFileName((long)getWallClockSec(),
-                                                                  key.GetUid(), key.GetId());
-        StorageManager::writeFile(file_name.c_str(), buffer->data(), buffer->size());
-    }
-}
-
-void StatsLogProcessor::resetConfigsLocked(const int64_t timestampNs,
-                                           const std::vector<ConfigKey>& configs) {
-    for (const auto& key : configs) {
-        StatsdConfig config;
-        if (StorageManager::readConfigFromDisk(key, &config)) {
-            OnConfigUpdatedLocked(timestampNs, key, config);
-            StatsdStats::getInstance().noteConfigReset(key);
-        } else {
-            ALOGE("Failed to read backup config from disk for : %s", key.ToString().c_str());
-            auto it = mMetricsManagers.find(key);
-            if (it != mMetricsManagers.end()) {
-                it->second->refreshTtl(timestampNs);
-            }
-        }
-    }
-}
-
-void StatsLogProcessor::resetIfConfigTtlExpiredLocked(const int64_t timestampNs) {
-    std::vector<ConfigKey> configKeysTtlExpired;
-    for (auto it = mMetricsManagers.begin(); it != mMetricsManagers.end(); it++) {
-        if (it->second != nullptr && !it->second->isInTtl(timestampNs)) {
-            configKeysTtlExpired.push_back(it->first);
-        }
-    }
-    if (configKeysTtlExpired.size() > 0) {
-        WriteDataToDiskLocked(CONFIG_RESET, NO_TIME_CONSTRAINTS);
-        resetConfigsLocked(timestampNs, configKeysTtlExpired);
-    }
-}
-
-void StatsLogProcessor::OnConfigRemoved(const ConfigKey& key) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    auto it = mMetricsManagers.find(key);
-    if (it != mMetricsManagers.end()) {
-        WriteDataToDiskLocked(key, getElapsedRealtimeNs(), CONFIG_REMOVED,
-                              NO_TIME_CONSTRAINTS);
-        mMetricsManagers.erase(it);
-        mUidMap->OnConfigRemoved(key);
-    }
-    StatsdStats::getInstance().noteConfigRemoved(key);
-
-    mLastBroadcastTimes.erase(key);
-
-    int uid = key.GetUid();
-    bool lastConfigForUid = true;
-    for (auto it : mMetricsManagers) {
-        if (it.first.GetUid() == uid) {
-            lastConfigForUid = false;
-            break;
-        }
-    }
-    if (lastConfigForUid) {
-        mLastActivationBroadcastTimes.erase(uid);
-    }
-
-    if (mMetricsManagers.empty()) {
-        mPullerManager->ForceClearPullerCache();
-    }
-}
-
-void StatsLogProcessor::flushIfNecessaryLocked(const ConfigKey& key,
-                                               MetricsManager& metricsManager) {
-    int64_t elapsedRealtimeNs = getElapsedRealtimeNs();
-    auto lastCheckTime = mLastByteSizeTimes.find(key);
-    if (lastCheckTime != mLastByteSizeTimes.end()) {
-        if (elapsedRealtimeNs - lastCheckTime->second < StatsdStats::kMinByteSizeCheckPeriodNs) {
-            return;
-        }
-    }
-
-    // We suspect that the byteSize() computation is expensive, so we set a rate limit.
-    size_t totalBytes = metricsManager.byteSize();
-    mLastByteSizeTimes[key] = elapsedRealtimeNs;
-    bool requestDump = false;
-    if (totalBytes > StatsdStats::kMaxMetricsBytesPerConfig) {
-        // Too late. We need to start clearing data.
-        metricsManager.dropData(elapsedRealtimeNs);
-        StatsdStats::getInstance().noteDataDropped(key, totalBytes);
-        VLOG("StatsD had to toss out metrics for %s", key.ToString().c_str());
-    } else if ((totalBytes > StatsdStats::kBytesPerConfigTriggerGetData) ||
-               (mOnDiskDataConfigs.find(key) != mOnDiskDataConfigs.end())) {
-        // Request to send a broadcast if:
-        // 1. in memory data > threshold   OR
-        // 2. config has old data report on disk.
-        requestDump = true;
-    }
-
-    if (requestDump) {
-        // Send broadcast so that receivers can pull data.
-        auto lastBroadcastTime = mLastBroadcastTimes.find(key);
-        if (lastBroadcastTime != mLastBroadcastTimes.end()) {
-            if (elapsedRealtimeNs - lastBroadcastTime->second <
-                    StatsdStats::kMinBroadcastPeriodNs) {
-                VLOG("StatsD would've sent a broadcast but the rate limit stopped us.");
-                return;
-            }
-        }
-        if (mSendBroadcast(key)) {
-            mOnDiskDataConfigs.erase(key);
-            VLOG("StatsD triggered data fetch for %s", key.ToString().c_str());
-            mLastBroadcastTimes[key] = elapsedRealtimeNs;
-            StatsdStats::getInstance().noteBroadcastSent(key);
-        }
-    }
-}
-
-void StatsLogProcessor::WriteDataToDiskLocked(const ConfigKey& key,
-                                              const int64_t timestampNs,
-                                              const DumpReportReason dumpReportReason,
-                                              const DumpLatency dumpLatency) {
-    if (mMetricsManagers.find(key) == mMetricsManagers.end() ||
-        !mMetricsManagers.find(key)->second->shouldWriteToDisk()) {
-        return;
-    }
-    vector<uint8_t> buffer;
-    onConfigMetricsReportLocked(key, timestampNs, true /* include_current_partial_bucket*/,
-                                true /* erase_data */, dumpReportReason, dumpLatency, true,
-                                &buffer);
-    string file_name =
-            StorageManager::getDataFileName((long)getWallClockSec(), key.GetUid(), key.GetId());
-    StorageManager::writeFile(file_name.c_str(), buffer.data(), buffer.size());
-
-    // We were able to write the ConfigMetricsReport to disk, so we should trigger collection ASAP.
-    mOnDiskDataConfigs.insert(key);
-}
-
-void StatsLogProcessor::SaveActiveConfigsToDisk(int64_t currentTimeNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    const int64_t timeNs = getElapsedRealtimeNs();
-    // Do not write to disk if we already have in the last few seconds.
-    if (static_cast<unsigned long long> (timeNs) <
-            mLastActiveMetricsWriteNs + WRITE_DATA_COOL_DOWN_SEC * NS_PER_SEC) {
-        ALOGI("Statsd skipping writing active metrics to disk. Already wrote data in last %d seconds",
-                WRITE_DATA_COOL_DOWN_SEC);
-        return;
-    }
-    mLastActiveMetricsWriteNs = timeNs;
-
-    ProtoOutputStream proto;
-    WriteActiveConfigsToProtoOutputStreamLocked(currentTimeNs, DEVICE_SHUTDOWN, &proto);
-
-    string file_name = StringPrintf("%s/active_metrics", STATS_ACTIVE_METRIC_DIR);
-    StorageManager::deleteFile(file_name.c_str());
-    android::base::unique_fd fd(
-            open(file_name.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR));
-    if (fd == -1) {
-        ALOGE("Attempt to write %s but failed", file_name.c_str());
-        return;
-    }
-    proto.flush(fd.get());
-}
-
-void StatsLogProcessor::SaveMetadataToDisk(int64_t currentWallClockTimeNs,
-                                           int64_t systemElapsedTimeNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    // Do not write to disk if we already have in the last few seconds.
-    if (static_cast<unsigned long long> (systemElapsedTimeNs) <
-            mLastMetadataWriteNs + WRITE_DATA_COOL_DOWN_SEC * NS_PER_SEC) {
-        ALOGI("Statsd skipping writing metadata to disk. Already wrote data in last %d seconds",
-                WRITE_DATA_COOL_DOWN_SEC);
-        return;
-    }
-    mLastMetadataWriteNs = systemElapsedTimeNs;
-
-    metadata::StatsMetadataList metadataList;
-    WriteMetadataToProtoLocked(
-            currentWallClockTimeNs, systemElapsedTimeNs, &metadataList);
-
-    string file_name = StringPrintf("%s/metadata", STATS_METADATA_DIR);
-    StorageManager::deleteFile(file_name.c_str());
-
-    if (metadataList.stats_metadata_size() == 0) {
-        // Skip the write if we have nothing to write.
-        return;
-    }
-
-    std::string data;
-    metadataList.SerializeToString(&data);
-    StorageManager::writeFile(file_name.c_str(), data.c_str(), data.size());
-}
-
-void StatsLogProcessor::WriteMetadataToProto(int64_t currentWallClockTimeNs,
-                                             int64_t systemElapsedTimeNs,
-                                             metadata::StatsMetadataList* metadataList) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    WriteMetadataToProtoLocked(currentWallClockTimeNs, systemElapsedTimeNs, metadataList);
-}
-
-void StatsLogProcessor::WriteMetadataToProtoLocked(int64_t currentWallClockTimeNs,
-                                                   int64_t systemElapsedTimeNs,
-                                                   metadata::StatsMetadataList* metadataList) {
-    for (const auto& pair : mMetricsManagers) {
-        const sp<MetricsManager>& metricsManager = pair.second;
-        metadata::StatsMetadata* statsMetadata = metadataList->add_stats_metadata();
-        bool metadataWritten = metricsManager->writeMetadataToProto(currentWallClockTimeNs,
-                systemElapsedTimeNs, statsMetadata);
-        if (!metadataWritten) {
-            metadataList->mutable_stats_metadata()->RemoveLast();
-        }
-    }
-}
-
-void StatsLogProcessor::LoadMetadataFromDisk(int64_t currentWallClockTimeNs,
-                                             int64_t systemElapsedTimeNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    string file_name = StringPrintf("%s/metadata", STATS_METADATA_DIR);
-    int fd = open(file_name.c_str(), O_RDONLY | O_CLOEXEC);
-    if (-1 == fd) {
-        VLOG("Attempt to read %s but failed", file_name.c_str());
-        StorageManager::deleteFile(file_name.c_str());
-        return;
-    }
-    string content;
-    if (!android::base::ReadFdToString(fd, &content)) {
-        ALOGE("Attempt to read %s but failed", file_name.c_str());
-        close(fd);
-        StorageManager::deleteFile(file_name.c_str());
-        return;
-    }
-
-    close(fd);
-
-    metadata::StatsMetadataList statsMetadataList;
-    if (!statsMetadataList.ParseFromString(content)) {
-        ALOGE("Attempt to read %s but failed; failed to metadata", file_name.c_str());
-        StorageManager::deleteFile(file_name.c_str());
-        return;
-    }
-    SetMetadataStateLocked(statsMetadataList, currentWallClockTimeNs, systemElapsedTimeNs);
-    StorageManager::deleteFile(file_name.c_str());
-}
-
-void StatsLogProcessor::SetMetadataState(const metadata::StatsMetadataList& statsMetadataList,
-                                         int64_t currentWallClockTimeNs,
-                                         int64_t systemElapsedTimeNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    SetMetadataStateLocked(statsMetadataList, currentWallClockTimeNs, systemElapsedTimeNs);
-}
-
-void StatsLogProcessor::SetMetadataStateLocked(
-        const metadata::StatsMetadataList& statsMetadataList,
-        int64_t currentWallClockTimeNs,
-        int64_t systemElapsedTimeNs) {
-    for (const metadata::StatsMetadata& metadata : statsMetadataList.stats_metadata()) {
-        ConfigKey key(metadata.config_key().uid(), metadata.config_key().config_id());
-        auto it = mMetricsManagers.find(key);
-        if (it == mMetricsManagers.end()) {
-            ALOGE("No config found for configKey %s", key.ToString().c_str());
-            continue;
-        }
-        VLOG("Setting metadata %s", key.ToString().c_str());
-        it->second->loadMetadata(metadata, currentWallClockTimeNs, systemElapsedTimeNs);
-    }
-    VLOG("Successfully loaded %d metadata.", statsMetadataList.stats_metadata_size());
-}
-
-void StatsLogProcessor::WriteActiveConfigsToProtoOutputStream(
-        int64_t currentTimeNs, const DumpReportReason reason, ProtoOutputStream* proto) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    WriteActiveConfigsToProtoOutputStreamLocked(currentTimeNs, reason, proto);
-}
-
-void StatsLogProcessor::WriteActiveConfigsToProtoOutputStreamLocked(
-        int64_t currentTimeNs,  const DumpReportReason reason, ProtoOutputStream* proto) {
-    for (const auto& pair : mMetricsManagers) {
-        const sp<MetricsManager>& metricsManager = pair.second;
-        uint64_t configToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                     FIELD_ID_ACTIVE_CONFIG_LIST_CONFIG);
-        metricsManager->writeActiveConfigToProtoOutputStream(currentTimeNs, reason, proto);
-        proto->end(configToken);
-    }
-}
-void StatsLogProcessor::LoadActiveConfigsFromDisk() {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    string file_name = StringPrintf("%s/active_metrics", STATS_ACTIVE_METRIC_DIR);
-    int fd = open(file_name.c_str(), O_RDONLY | O_CLOEXEC);
-    if (-1 == fd) {
-        VLOG("Attempt to read %s but failed", file_name.c_str());
-        StorageManager::deleteFile(file_name.c_str());
-        return;
-    }
-    string content;
-    if (!android::base::ReadFdToString(fd, &content)) {
-        ALOGE("Attempt to read %s but failed", file_name.c_str());
-        close(fd);
-        StorageManager::deleteFile(file_name.c_str());
-        return;
-    }
-
-    close(fd);
-
-    ActiveConfigList activeConfigList;
-    if (!activeConfigList.ParseFromString(content)) {
-        ALOGE("Attempt to read %s but failed; failed to load active configs", file_name.c_str());
-        StorageManager::deleteFile(file_name.c_str());
-        return;
-    }
-    // Passing in mTimeBaseNs only works as long as we only load from disk is when statsd starts.
-    SetConfigsActiveStateLocked(activeConfigList, mTimeBaseNs);
-    StorageManager::deleteFile(file_name.c_str());
-}
-
-void StatsLogProcessor::SetConfigsActiveState(const ActiveConfigList& activeConfigList,
-                                                    int64_t currentTimeNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    SetConfigsActiveStateLocked(activeConfigList, currentTimeNs);
-}
-
-void StatsLogProcessor::SetConfigsActiveStateLocked(const ActiveConfigList& activeConfigList,
-                                                    int64_t currentTimeNs) {
-    for (int i = 0; i < activeConfigList.config_size(); i++) {
-        const auto& config = activeConfigList.config(i);
-        ConfigKey key(config.uid(), config.id());
-        auto it = mMetricsManagers.find(key);
-        if (it == mMetricsManagers.end()) {
-            ALOGE("No config found for config %s", key.ToString().c_str());
-            continue;
-        }
-        VLOG("Setting active config %s", key.ToString().c_str());
-        it->second->loadActiveConfig(config, currentTimeNs);
-    }
-    VLOG("Successfully loaded %d active configs.", activeConfigList.config_size());
-}
-
-void StatsLogProcessor::WriteDataToDiskLocked(const DumpReportReason dumpReportReason,
-                                              const DumpLatency dumpLatency) {
-    const int64_t timeNs = getElapsedRealtimeNs();
-    // Do not write to disk if we already have in the last few seconds.
-    // This is to avoid overwriting files that would have the same name if we
-    //   write twice in the same second.
-    if (static_cast<unsigned long long> (timeNs) <
-            mLastWriteTimeNs + WRITE_DATA_COOL_DOWN_SEC * NS_PER_SEC) {
-        ALOGI("Statsd skipping writing data to disk. Already wrote data in last %d seconds",
-                WRITE_DATA_COOL_DOWN_SEC);
-        return;
-    }
-    mLastWriteTimeNs = timeNs;
-    for (auto& pair : mMetricsManagers) {
-        WriteDataToDiskLocked(pair.first, timeNs, dumpReportReason, dumpLatency);
-    }
-}
-
-void StatsLogProcessor::WriteDataToDisk(const DumpReportReason dumpReportReason,
-                                        const DumpLatency dumpLatency) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    WriteDataToDiskLocked(dumpReportReason, dumpLatency);
-}
-
-void StatsLogProcessor::informPullAlarmFired(const int64_t timestampNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    mPullerManager->OnAlarmFired(timestampNs);
-}
-
-int64_t StatsLogProcessor::getLastReportTimeNs(const ConfigKey& key) {
-    auto it = mMetricsManagers.find(key);
-    if (it == mMetricsManagers.end()) {
-        return 0;
-    } else {
-        return it->second->getLastReportTimeNs();
-    }
-}
-
-void StatsLogProcessor::notifyAppUpgrade(const int64_t& eventTimeNs, const string& apk,
-                                         const int uid, const int64_t version) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    VLOG("Received app upgrade");
-    StateManager::getInstance().notifyAppChanged(apk, mUidMap);
-    for (const auto& it : mMetricsManagers) {
-        it.second->notifyAppUpgrade(eventTimeNs, apk, uid, version);
-    }
-}
-
-void StatsLogProcessor::notifyAppRemoved(const int64_t& eventTimeNs, const string& apk,
-                                         const int uid) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    VLOG("Received app removed");
-    StateManager::getInstance().notifyAppChanged(apk, mUidMap);
-    for (const auto& it : mMetricsManagers) {
-        it.second->notifyAppRemoved(eventTimeNs, apk, uid);
-    }
-}
-
-void StatsLogProcessor::onUidMapReceived(const int64_t& eventTimeNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    VLOG("Received uid map");
-    StateManager::getInstance().updateLogSources(mUidMap);
-    for (const auto& it : mMetricsManagers) {
-        it.second->onUidMapReceived(eventTimeNs);
-    }
-}
-
-void StatsLogProcessor::onStatsdInitCompleted(const int64_t& elapsedTimeNs) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    VLOG("Received boot completed signal");
-    for (const auto& it : mMetricsManagers) {
-        it.second->onStatsdInitCompleted(elapsedTimeNs);
-    }
-}
-
-void StatsLogProcessor::noteOnDiskData(const ConfigKey& key) {
-    std::lock_guard<std::mutex> lock(mMetricsMutex);
-    mOnDiskDataConfigs.insert(key);
-}
-
-void StatsLogProcessor::setAnomalyAlarm(const int64_t elapsedTimeMillis) {
-    std::lock_guard<std::mutex> lock(mAnomalyAlarmMutex);
-    mNextAnomalyAlarmTime = elapsedTimeMillis;
-}
-
-void StatsLogProcessor::cancelAnomalyAlarm() {
-    std::lock_guard<std::mutex> lock(mAnomalyAlarmMutex);
-    mNextAnomalyAlarmTime = 0;
-}
-
-void StatsLogProcessor::informAnomalyAlarmFiredLocked(const int64_t elapsedTimeMillis) {
-    VLOG("StatsService::informAlarmForSubscriberTriggeringFired was called");
-    std::unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> alarmSet =
-            mAnomalyAlarmMonitor->popSoonerThan(static_cast<uint32_t>(elapsedTimeMillis / 1000));
-    if (alarmSet.size() > 0) {
-        VLOG("Found periodic alarm fired.");
-        processFiredAnomalyAlarmsLocked(MillisToNano(elapsedTimeMillis), alarmSet);
-    } else {
-        ALOGW("Cannot find an periodic alarm that fired. Perhaps it was recently cancelled.");
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/StatsLogProcessor.h b/cmds/statsd/src/StatsLogProcessor.h
deleted file mode 100644
index 08f4668..0000000
--- a/cmds/statsd/src/StatsLogProcessor.h
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <gtest/gtest_prod.h>
-#include "config/ConfigListener.h"
-#include "logd/LogEvent.h"
-#include "metrics/MetricsManager.h"
-#include "packages/UidMap.h"
-#include "external/StatsPullerManager.h"
-
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "frameworks/base/cmds/statsd/src/statsd_metadata.pb.h"
-
-#include <stdio.h>
-#include <unordered_map>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-
-class StatsLogProcessor : public ConfigListener, public virtual PackageInfoListener {
-public:
-    StatsLogProcessor(const sp<UidMap>& uidMap, const sp<StatsPullerManager>& pullerManager,
-                      const sp<AlarmMonitor>& anomalyAlarmMonitor,
-                      const sp<AlarmMonitor>& subscriberTriggerAlarmMonitor,
-                      const int64_t timeBaseNs,
-                      const std::function<bool(const ConfigKey&)>& sendBroadcast,
-                      const std::function<bool(const int&,
-                                               const vector<int64_t>&)>& sendActivationBroadcast);
-    virtual ~StatsLogProcessor();
-
-    void OnLogEvent(LogEvent* event);
-
-    void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key,
-                         const StatsdConfig& config);
-    void OnConfigRemoved(const ConfigKey& key);
-
-    size_t GetMetricsSize(const ConfigKey& key) const;
-
-    void GetActiveConfigs(const int uid, vector<int64_t>& outActiveConfigs);
-
-    void onDumpReport(const ConfigKey& key, const int64_t dumpTimeNs,
-                      const bool include_current_partial_bucket, const bool erase_data,
-                      const DumpReportReason dumpReportReason,
-                      const DumpLatency dumpLatency,
-                      vector<uint8_t>* outData);
-    void onDumpReport(const ConfigKey& key, const int64_t dumpTimeNs,
-                      const bool include_current_partial_bucket, const bool erase_data,
-                      const DumpReportReason dumpReportReason,
-                      const DumpLatency dumpLatency,
-                      ProtoOutputStream* proto);
-
-    /* Tells MetricsManager that the alarms in alarmSet have fired. Modifies periodic alarmSet. */
-    void onPeriodicAlarmFired(
-            const int64_t& timestampNs,
-            unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> alarmSet);
-
-    /* Flushes data to disk. Data on memory will be gone after written to disk. */
-    void WriteDataToDisk(const DumpReportReason dumpReportReason,
-                         const DumpLatency dumpLatency);
-
-    /* Persist configs containing metrics with active activations to disk. */
-    void SaveActiveConfigsToDisk(int64_t currentTimeNs);
-
-    /* Writes the current active status/ttl for all configs and metrics to ProtoOutputStream. */
-    void WriteActiveConfigsToProtoOutputStream(
-            int64_t currentTimeNs, const DumpReportReason reason, ProtoOutputStream* proto);
-
-    /* Load configs containing metrics with active activations from disk. */
-    void LoadActiveConfigsFromDisk();
-
-    /* Persist metadata for configs and metrics to disk. */
-    void SaveMetadataToDisk(int64_t currentWallClockTimeNs, int64_t systemElapsedTimeNs);
-
-    /* Writes the statsd metadata for all configs and metrics to StatsMetadataList. */
-    void WriteMetadataToProto(int64_t currentWallClockTimeNs,
-                              int64_t systemElapsedTimeNs,
-                              metadata::StatsMetadataList* metadataList);
-
-    /* Load stats metadata for configs and metrics from disk. */
-    void LoadMetadataFromDisk(int64_t currentWallClockTimeNs,
-                              int64_t systemElapsedTimeNs);
-
-    /* Sets the metadata for all configs and metrics */
-    void SetMetadataState(const metadata::StatsMetadataList& statsMetadataList,
-                          int64_t currentWallClockTimeNs,
-                          int64_t systemElapsedTimeNs);
-
-    /* Sets the active status/ttl for all configs and metrics to the status in ActiveConfigList. */
-    void SetConfigsActiveState(const ActiveConfigList& activeConfigList, int64_t currentTimeNs);
-
-    /* Notify all MetricsManagers of app upgrades */
-    void notifyAppUpgrade(const int64_t& eventTimeNs, const string& apk, const int uid,
-                          const int64_t version) override;
-
-    /* Notify all MetricsManagers of app removals */
-    void notifyAppRemoved(const int64_t& eventTimeNs, const string& apk, const int uid) override;
-
-    /* Notify all MetricsManagers of uid map snapshots received */
-    void onUidMapReceived(const int64_t& eventTimeNs) override;
-
-    /* Notify all metrics managers of boot completed
-     * This will force a bucket split when the boot is finished.
-     */
-    void onStatsdInitCompleted(const int64_t& elapsedTimeNs);
-
-    // Reset all configs.
-    void resetConfigs();
-
-    inline sp<UidMap> getUidMap() {
-        return mUidMap;
-    }
-
-    void dumpStates(int outFd, bool verbose);
-
-    void informPullAlarmFired(const int64_t timestampNs);
-
-    int64_t getLastReportTimeNs(const ConfigKey& key);
-
-    inline void setPrintLogs(bool enabled) {
-#ifdef VERY_VERBOSE_PRINTING
-        std::lock_guard<std::mutex> lock(mMetricsMutex);
-        mPrintAllLogs = enabled;
-#endif
-    }
-
-    // Add a specific config key to the possible configs to dump ASAP.
-    void noteOnDiskData(const ConfigKey& key);
-
-    void setAnomalyAlarm(const int64_t timeMillis);
-
-    void cancelAnomalyAlarm();
-
-private:
-    // For testing only.
-    inline sp<AlarmMonitor> getAnomalyAlarmMonitor() const {
-        return mAnomalyAlarmMonitor;
-    }
-
-    inline sp<AlarmMonitor> getPeriodicAlarmMonitor() const {
-        return mPeriodicAlarmMonitor;
-    }
-
-    mutable mutex mMetricsMutex;
-
-    // Guards mNextAnomalyAlarmTime. A separate mutex is needed because alarms are set/cancelled
-    // in the onLogEvent code path, which is locked by mMetricsMutex.
-    // DO NOT acquire mMetricsMutex while holding mAnomalyAlarmMutex. This can lead to a deadlock.
-    mutable mutex mAnomalyAlarmMutex;
-
-    std::unordered_map<ConfigKey, sp<MetricsManager>> mMetricsManagers;
-
-    std::unordered_map<ConfigKey, int64_t> mLastBroadcastTimes;
-
-    // Last time we sent a broadcast to this uid that the active configs had changed.
-    std::unordered_map<int, int64_t> mLastActivationBroadcastTimes;
-
-    // Tracks when we last checked the bytes consumed for each config key.
-    std::unordered_map<ConfigKey, int64_t> mLastByteSizeTimes;
-
-    // Tracks which config keys has metric reports on disk
-    std::set<ConfigKey> mOnDiskDataConfigs;
-
-    sp<UidMap> mUidMap;  // Reference to the UidMap to lookup app name and version for each uid.
-
-    sp<StatsPullerManager> mPullerManager;  // Reference to StatsPullerManager
-
-    sp<AlarmMonitor> mAnomalyAlarmMonitor;
-
-    sp<AlarmMonitor> mPeriodicAlarmMonitor;
-
-    void OnLogEvent(LogEvent* event, int64_t elapsedRealtimeNs);
-
-    void resetIfConfigTtlExpiredLocked(const int64_t timestampNs);
-
-    void OnConfigUpdatedLocked(
-        const int64_t currentTimestampNs, const ConfigKey& key, const StatsdConfig& config);
-
-    void GetActiveConfigsLocked(const int uid, vector<int64_t>& outActiveConfigs);
-
-    void WriteActiveConfigsToProtoOutputStreamLocked(
-            int64_t currentTimeNs, const DumpReportReason reason, ProtoOutputStream* proto);
-
-    void SetConfigsActiveStateLocked(const ActiveConfigList& activeConfigList,
-                                     int64_t currentTimeNs);
-
-    void SetMetadataStateLocked(const metadata::StatsMetadataList& statsMetadataList,
-                                int64_t currentWallClockTimeNs,
-                                int64_t systemElapsedTimeNs);
-
-    void WriteMetadataToProtoLocked(int64_t currentWallClockTimeNs,
-                                    int64_t systemElapsedTimeNs,
-                                    metadata::StatsMetadataList* metadataList);
-
-    void WriteDataToDiskLocked(const DumpReportReason dumpReportReason,
-                               const DumpLatency dumpLatency);
-
-    void WriteDataToDiskLocked(const ConfigKey& key, const int64_t timestampNs,
-                               const DumpReportReason dumpReportReason,
-                               const DumpLatency dumpLatency);
-
-    void onConfigMetricsReportLocked(
-            const ConfigKey& key, const int64_t dumpTimeStampNs,
-            const bool include_current_partial_bucket, const bool erase_data,
-            const DumpReportReason dumpReportReason, const DumpLatency dumpLatency,
-            /*if dataSavedToDisk is true, it indicates the caller will write the data to disk
-             (e.g., before reboot). So no need to further persist local history.*/
-            const bool dataSavedToDisk, vector<uint8_t>* proto);
-
-    /* Check if we should send a broadcast if approaching memory limits and if we're over, we
-     * actually delete the data. */
-    void flushIfNecessaryLocked(const ConfigKey& key, MetricsManager& metricsManager);
-
-    // Maps the isolated uid in the log event to host uid if the log event contains uid fields.
-    void mapIsolatedUidToHostUidIfNecessaryLocked(LogEvent* event) const;
-
-    // Handler over the isolated uid change event.
-    void onIsolatedUidChangedEventLocked(const LogEvent& event);
-
-    // Handler over the binary push state changed event.
-    void onBinaryPushStateChangedEventLocked(LogEvent* event);
-
-    // Handler over the watchdog rollback occurred event.
-    void onWatchdogRollbackOccurredLocked(LogEvent* event);
-
-    // Updates train info on disk based on binary push state changed info and
-    // write disk info into parameters.
-    void getAndUpdateTrainInfoOnDisk(bool is_rollback, InstallTrainInfo* trainInfoIn);
-
-    // Gets experiment ids on disk for associated train and updates them
-    // depending on rollback type. Then writes them back to disk and returns
-    // them.
-    std::vector<int64_t> processWatchdogRollbackOccurred(const int32_t rollbackTypeIn,
-                                                          const string& packageName);
-
-    // Reset all configs.
-    void resetConfigsLocked(const int64_t timestampNs);
-    // Reset the specified configs.
-    void resetConfigsLocked(const int64_t timestampNs, const std::vector<ConfigKey>& configs);
-
-    // An anomaly alarm should have fired.
-    // Check with anomaly alarm manager to find the alarms and process the result.
-    void informAnomalyAlarmFiredLocked(const int64_t elapsedTimeMillis);
-
-    /* Tells MetricsManager that the alarms in alarmSet have fired. Modifies anomaly alarmSet. */
-    void processFiredAnomalyAlarmsLocked(
-            const int64_t& timestampNs,
-            unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> alarmSet);
-
-    // Function used to send a broadcast so that receiver for the config key can call getData
-    // to retrieve the stored data.
-    std::function<bool(const ConfigKey& key)> mSendBroadcast;
-
-    // Function used to send a broadcast so that receiver can be notified of which configs
-    // are currently active.
-    std::function<bool(const int& uid, const vector<int64_t>& configIds)> mSendActivationBroadcast;
-
-    const int64_t mTimeBaseNs;
-
-    // Largest timestamp of the events that we have processed.
-    int64_t mLargestTimestampSeen = 0;
-
-    int64_t mLastTimestampSeen = 0;
-
-    int64_t mLastPullerCacheClearTimeSec = 0;
-
-    // Last time we wrote data to disk.
-    int64_t mLastWriteTimeNs = 0;
-
-    // Last time we wrote active metrics to disk.
-    int64_t mLastActiveMetricsWriteNs = 0;
-
-    //Last time we wrote metadata to disk.
-    int64_t mLastMetadataWriteNs = 0;
-
-    // The time for the next anomaly alarm for alerts.
-    int64_t mNextAnomalyAlarmTime = 0;
-
-#ifdef VERY_VERBOSE_PRINTING
-    bool mPrintAllLogs = false;
-#endif
-
-    FRIEND_TEST(StatsLogProcessorTest, TestOutOfOrderLogs);
-    FRIEND_TEST(StatsLogProcessorTest, TestRateLimitByteSize);
-    FRIEND_TEST(StatsLogProcessorTest, TestRateLimitBroadcast);
-    FRIEND_TEST(StatsLogProcessorTest, TestDropWhenByteSizeTooLarge);
-    FRIEND_TEST(StatsLogProcessorTest, InvalidConfigRemoved);
-    FRIEND_TEST(StatsLogProcessorTest, TestActiveConfigMetricDiskWriteRead);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationOnBoot);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationOnBootMultipleActivations);
-    FRIEND_TEST(StatsLogProcessorTest,
-            TestActivationOnBootMultipleActivationsDifferentActivationTypes);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationsPersistAcrossSystemServerRestart);
-
-    FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForSumDuration1);
-    FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForSumDuration2);
-    FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForSumDuration3);
-    FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForMaxDuration1);
-    FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForMaxDuration2);
-    FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForMaxDuration3);
-    FRIEND_TEST(MetricConditionLinkE2eTest, TestMultiplePredicatesAndLinks1);
-    FRIEND_TEST(MetricConditionLinkE2eTest, TestMultiplePredicatesAndLinks2);
-    FRIEND_TEST(AttributionE2eTest, TestAttributionMatchAndSliceByFirstUid);
-    FRIEND_TEST(AttributionE2eTest, TestAttributionMatchAndSliceByChain);
-    FRIEND_TEST(GaugeMetricE2eTest, TestMultipleFieldsForPushedEvent);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEvents);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEvent_LateAlarm);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEventsWithActivation);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEventsNoCondition);
-    FRIEND_TEST(GaugeMetricE2eTest, TestConditionChangeToTrueSamplePulledEvents);
-
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestSlicedCountMetric_single_bucket);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestSlicedCountMetric_multiple_buckets);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestCountMetric_save_refractory_to_disk_no_data_written);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestCountMetric_save_refractory_to_disk);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestCountMetric_load_refractory_from_disk);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_single_bucket);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_multiple_buckets);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_long_refractory_period);
-
-    FRIEND_TEST(AlarmE2eTest, TestMultipleAlarms);
-    FRIEND_TEST(ConfigTtlE2eTest, TestCountMetric);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetric);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithOneDeactivation);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithTwoDeactivations);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithSameDeactivation);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithTwoMetricsTwoDeactivations);
-
-    FRIEND_TEST(CountMetricE2eTest, TestInitialConditionChanges);
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedState);
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedStateWithMap);
-    FRIEND_TEST(CountMetricE2eTest, TestMultipleSlicedStates);
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedStateWithPrimaryFields);
-
-    FRIEND_TEST(DurationMetricE2eTest, TestOneBucket);
-    FRIEND_TEST(DurationMetricE2eTest, TestTwoBuckets);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithActivation);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithActivationAndSlicedCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedState);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithConditionAndSlicedState);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedStateMapped);
-    FRIEND_TEST(DurationMetricE2eTest, TestSlicedStatePrimaryFieldsNotSubsetDimInWhat);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedStatePrimaryFieldsSubset);
-
-    FRIEND_TEST(ValueMetricE2eTest, TestInitialConditionChanges);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents_LateAlarm);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents_WithActivation);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithDimensions);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithIncorrectDimensions);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/StatsService.cpp b/cmds/statsd/src/StatsService.cpp
deleted file mode 100644
index 368a6c4..0000000
--- a/cmds/statsd/src/StatsService.cpp
+++ /dev/null
@@ -1,1310 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "StatsService.h"
-#include "stats_log_util.h"
-#include "android-base/stringprintf.h"
-#include "config/ConfigKey.h"
-#include "config/ConfigManager.h"
-#include "guardrail/StatsdStats.h"
-#include "storage/StorageManager.h"
-#include "subscriber/SubscriberReporter.h"
-
-#include <android-base/file.h>
-#include <android-base/strings.h>
-#include <cutils/multiuser.h>
-#include <frameworks/base/cmds/statsd/src/statsd_config.pb.h>
-#include <frameworks/base/cmds/statsd/src/uid_data.pb.h>
-#include <private/android_filesystem_config.h>
-#include <statslog_statsd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/system_properties.h>
-#include <unistd.h>
-#include <utils/String16.h>
-
-using namespace android;
-
-using android::base::StringPrintf;
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_MESSAGE;
-
-using Status = ::ndk::ScopedAStatus;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-constexpr const char* kPermissionDump = "android.permission.DUMP";
-
-constexpr const char* kPermissionRegisterPullAtom = "android.permission.REGISTER_STATS_PULL_ATOM";
-
-#define STATS_SERVICE_DIR "/data/misc/stats-service"
-
-// for StatsDataDumpProto
-const int FIELD_ID_REPORTS_LIST = 1;
-
-static Status exception(int32_t code, const std::string& msg) {
-    ALOGE("%s (%d)", msg.c_str(), code);
-    return Status::fromExceptionCodeWithMessage(code, msg.c_str());
-}
-
-static bool checkPermission(const char* permission) {
-    pid_t pid = AIBinder_getCallingPid();
-    uid_t uid = AIBinder_getCallingUid();
-    return checkPermissionForIds(permission, pid, uid);
-}
-
-Status checkUid(uid_t expectedUid) {
-    uid_t uid = AIBinder_getCallingUid();
-    if (uid == expectedUid || uid == AID_ROOT) {
-        return Status::ok();
-    } else {
-        return exception(EX_SECURITY,
-                         StringPrintf("UID %d is not expected UID %d", uid, expectedUid));
-    }
-}
-
-#define ENFORCE_UID(uid) {                                        \
-    Status status = checkUid((uid));                              \
-    if (!status.isOk()) {                                         \
-        return status;                                            \
-    }                                                             \
-}
-
-StatsService::StatsService(const sp<Looper>& handlerLooper, shared_ptr<LogEventQueue> queue)
-    : mAnomalyAlarmMonitor(new AlarmMonitor(
-              MIN_DIFF_TO_UPDATE_REGISTERED_ALARM_SECS,
-              [this](const shared_ptr<IStatsCompanionService>& /*sc*/, int64_t timeMillis) {
-                  mProcessor->setAnomalyAlarm(timeMillis);
-                  StatsdStats::getInstance().noteRegisteredAnomalyAlarmChanged();
-              },
-              [this](const shared_ptr<IStatsCompanionService>& /*sc*/) {
-                  mProcessor->cancelAnomalyAlarm();
-                  StatsdStats::getInstance().noteRegisteredAnomalyAlarmChanged();
-              })),
-      mPeriodicAlarmMonitor(new AlarmMonitor(
-              MIN_DIFF_TO_UPDATE_REGISTERED_ALARM_SECS,
-              [](const shared_ptr<IStatsCompanionService>& sc, int64_t timeMillis) {
-                  if (sc != nullptr) {
-                      sc->setAlarmForSubscriberTriggering(timeMillis);
-                      StatsdStats::getInstance().noteRegisteredPeriodicAlarmChanged();
-                  }
-              },
-              [](const shared_ptr<IStatsCompanionService>& sc) {
-                  if (sc != nullptr) {
-                      sc->cancelAlarmForSubscriberTriggering();
-                      StatsdStats::getInstance().noteRegisteredPeriodicAlarmChanged();
-                  }
-              })),
-      mEventQueue(queue),
-      mBootCompleteTrigger({kBootCompleteTag, kUidMapReceivedTag, kAllPullersRegisteredTag},
-                           [this]() { mProcessor->onStatsdInitCompleted(getElapsedRealtimeNs()); }),
-      mStatsCompanionServiceDeathRecipient(
-              AIBinder_DeathRecipient_new(StatsService::statsCompanionServiceDied)) {
-    mUidMap = UidMap::getInstance();
-    mPullerManager = new StatsPullerManager();
-    StatsPuller::SetUidMap(mUidMap);
-    mConfigManager = new ConfigManager();
-    mProcessor = new StatsLogProcessor(
-            mUidMap, mPullerManager, mAnomalyAlarmMonitor, mPeriodicAlarmMonitor,
-            getElapsedRealtimeNs(),
-            [this](const ConfigKey& key) {
-                shared_ptr<IPendingIntentRef> receiver = mConfigManager->GetConfigReceiver(key);
-                if (receiver == nullptr) {
-                    VLOG("Could not find a broadcast receiver for %s", key.ToString().c_str());
-                    return false;
-                } else if (receiver->sendDataBroadcast(
-                           mProcessor->getLastReportTimeNs(key)).isOk()) {
-                    return true;
-                } else {
-                    VLOG("Failed to send a broadcast for receiver %s", key.ToString().c_str());
-                    return false;
-                }
-            },
-            [this](const int& uid, const vector<int64_t>& activeConfigs) {
-                shared_ptr<IPendingIntentRef> receiver =
-                    mConfigManager->GetActiveConfigsChangedReceiver(uid);
-                if (receiver == nullptr) {
-                    VLOG("Could not find receiver for uid %d", uid);
-                    return false;
-                } else if (receiver->sendActiveConfigsChangedBroadcast(activeConfigs).isOk()) {
-                    VLOG("StatsService::active configs broadcast succeeded for uid %d" , uid);
-                    return true;
-                } else {
-                    VLOG("StatsService::active configs broadcast failed for uid %d" , uid);
-                    return false;
-                }
-            });
-
-    mUidMap->setListener(mProcessor);
-    mConfigManager->AddListener(mProcessor);
-
-    init_system_properties();
-
-    if (mEventQueue != nullptr) {
-        std::thread pushedEventThread([this] { readLogs(); });
-        pushedEventThread.detach();
-    }
-}
-
-StatsService::~StatsService() {
-}
-
-/* Runs on a dedicated thread to process pushed events. */
-void StatsService::readLogs() {
-    // Read forever..... long live statsd
-    while (1) {
-        // Block until an event is available.
-        auto event = mEventQueue->waitPop();
-        // Pass it to StatsLogProcess to all configs/metrics
-        // At this point, the LogEventQueue is not blocked, so that the socketListener
-        // can read events from the socket and write to buffer to avoid data drop.
-        mProcessor->OnLogEvent(event.get());
-        // The ShellSubscriber is only used by shell for local debugging.
-        if (mShellSubscriber != nullptr) {
-            mShellSubscriber->onLogEvent(*event);
-        }
-    }
-}
-
-void StatsService::init_system_properties() {
-    mEngBuild = false;
-    const prop_info* buildType = __system_property_find("ro.build.type");
-    if (buildType != NULL) {
-        __system_property_read_callback(buildType, init_build_type_callback, this);
-    }
-}
-
-void StatsService::init_build_type_callback(void* cookie, const char* /*name*/, const char* value,
-                                            uint32_t serial) {
-    if (0 == strcmp("eng", value) || 0 == strcmp("userdebug", value)) {
-        reinterpret_cast<StatsService*>(cookie)->mEngBuild = true;
-    }
-}
-
-/**
- * Write data from statsd.
- * Format for statsdStats:  adb shell dumpsys stats --metadata [-v] [--proto]
- * Format for data report:  adb shell dumpsys stats [anything other than --metadata] [--proto]
- * Anything ending in --proto will be in proto format.
- * Anything without --metadata as the first argument will be report information.
- *     (bugreports call "adb shell dumpsys stats --dump-priority NORMAL -a --proto")
- * TODO: Come up with a more robust method of enacting <serviceutils/PriorityDumper.h>.
- */
-status_t StatsService::dump(int fd, const char** args, uint32_t numArgs) {
-    if (!checkPermission(kPermissionDump)) {
-        return PERMISSION_DENIED;
-    }
-
-    int lastArg = numArgs - 1;
-    bool asProto = false;
-    if (lastArg >= 0 && string(args[lastArg]) == "--proto") { // last argument
-        asProto = true;
-        lastArg--;
-    }
-    if (numArgs > 0 && string(args[0]) == "--metadata") { // first argument
-        // Request is to dump statsd stats.
-        bool verbose = false;
-        if (lastArg >= 0 && string(args[lastArg]) == "-v") {
-            verbose = true;
-            lastArg--;
-        }
-        dumpStatsdStats(fd, verbose, asProto);
-    } else {
-        // Request is to dump statsd report data.
-        if (asProto) {
-            dumpIncidentSection(fd);
-        } else {
-            dprintf(fd, "Non-proto format of stats data dump not available; see proto version.\n");
-        }
-    }
-
-    return NO_ERROR;
-}
-
-/**
- * Write debugging data about statsd in text or proto format.
- */
-void StatsService::dumpStatsdStats(int out, bool verbose, bool proto) {
-    if (proto) {
-        vector<uint8_t> data;
-        StatsdStats::getInstance().dumpStats(&data, false); // does not reset statsdStats.
-        for (size_t i = 0; i < data.size(); i ++) {
-            dprintf(out, "%c", data[i]);
-        }
-    } else {
-        StatsdStats::getInstance().dumpStats(out);
-        mProcessor->dumpStates(out, verbose);
-    }
-}
-
-/**
- * Write stats report data in StatsDataDumpProto incident section format.
- */
-void StatsService::dumpIncidentSection(int out) {
-    ProtoOutputStream proto;
-    for (const ConfigKey& configKey : mConfigManager->GetAllConfigKeys()) {
-        uint64_t reportsListToken =
-                proto.start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_REPORTS_LIST);
-        // Don't include the current bucket to avoid skipping buckets.
-        // If we need to include the current bucket later, consider changing to NO_TIME_CONSTRAINTS
-        // or other alternatives to avoid skipping buckets for pulled metrics.
-        mProcessor->onDumpReport(configKey, getElapsedRealtimeNs(),
-                                 false /* includeCurrentBucket */, false /* erase_data */,
-                                 ADB_DUMP,
-                                 FAST,
-                                 &proto);
-        proto.end(reportsListToken);
-        proto.flush(out);
-        proto.clear();
-    }
-}
-
-/**
- * Implementation of the adb shell cmd stats command.
- */
-status_t StatsService::handleShellCommand(int in, int out, int err, const char** argv,
-                                          uint32_t argc) {
-    uid_t uid = AIBinder_getCallingUid();
-    if (uid != AID_ROOT && uid != AID_SHELL) {
-        return PERMISSION_DENIED;
-    }
-
-    Vector<String8> utf8Args;
-    utf8Args.setCapacity(argc);
-    for (uint32_t i = 0; i < argc; i++) {
-        utf8Args.push(String8(argv[i]));
-    }
-
-    if (argc >= 1) {
-        // adb shell cmd stats config ...
-        if (!utf8Args[0].compare(String8("config"))) {
-            return cmd_config(in, out, err, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("print-uid-map"))) {
-            return cmd_print_uid_map(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("dump-report"))) {
-            return cmd_dump_report(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("pull-source")) && argc > 1) {
-            return cmd_print_pulled_metrics(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("send-broadcast"))) {
-            return cmd_trigger_broadcast(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("print-stats"))) {
-            return cmd_print_stats(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("meminfo"))) {
-            return cmd_dump_memory_info(out);
-        }
-
-        if (!utf8Args[0].compare(String8("write-to-disk"))) {
-            return cmd_write_data_to_disk(out);
-        }
-
-        if (!utf8Args[0].compare(String8("log-app-breadcrumb"))) {
-            return cmd_log_app_breadcrumb(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("log-binary-push"))) {
-            return cmd_log_binary_push(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("clear-puller-cache"))) {
-            return cmd_clear_puller_cache(out);
-        }
-
-        if (!utf8Args[0].compare(String8("print-logs"))) {
-            return cmd_print_logs(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("send-active-configs"))) {
-            return cmd_trigger_active_config_broadcast(out, utf8Args);
-        }
-
-        if (!utf8Args[0].compare(String8("data-subscribe"))) {
-            {
-                std::lock_guard<std::mutex> lock(mShellSubscriberMutex);
-                if (mShellSubscriber == nullptr) {
-                    mShellSubscriber = new ShellSubscriber(mUidMap, mPullerManager);
-                }
-            }
-            int timeoutSec = -1;
-            if (argc >= 2) {
-                timeoutSec = atoi(utf8Args[1].c_str());
-            }
-            mShellSubscriber->startNewSubscription(in, out, timeoutSec);
-            return NO_ERROR;
-        }
-    }
-
-    print_cmd_help(out);
-    return NO_ERROR;
-}
-
-void StatsService::print_cmd_help(int out) {
-    dprintf(out,
-            "usage: adb shell cmd stats print-stats-log [tag_required] "
-            "[timestamp_nsec_optional]\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats meminfo\n");
-    dprintf(out, "\n");
-    dprintf(out, "  Prints the malloc debug information. You need to run the following first: \n");
-    dprintf(out, "   # adb shell stop\n");
-    dprintf(out, "   # adb shell setprop libc.debug.malloc.program statsd \n");
-    dprintf(out, "   # adb shell setprop libc.debug.malloc.options backtrace \n");
-    dprintf(out, "   # adb shell start\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats print-uid-map [PKG]\n");
-    dprintf(out, "\n");
-    dprintf(out, "  Prints the UID, app name, version mapping.\n");
-    dprintf(out, "  PKG           Optional package name to print the uids of the package\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats pull-source ATOM_TAG [PACKAGE] \n");
-    dprintf(out, "\n");
-    dprintf(out, "  Prints the output of a pulled atom\n");
-    dprintf(out, "  UID           The atom to pull\n");
-    dprintf(out, "  PACKAGE       The package to pull from. Default is AID_SYSTEM\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats write-to-disk \n");
-    dprintf(out, "\n");
-    dprintf(out, "  Flushes all data on memory to disk.\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats log-app-breadcrumb [UID] LABEL STATE\n");
-    dprintf(out, "  Writes an AppBreadcrumbReported event to the statslog buffer.\n");
-    dprintf(out, "  UID           The uid to use. It is only possible to pass a UID\n");
-    dprintf(out, "                parameter on eng builds. If UID is omitted the calling\n");
-    dprintf(out, "                uid is used.\n");
-    dprintf(out, "  LABEL         Integer in [0, 15], as per atoms.proto.\n");
-    dprintf(out, "  STATE         Integer in [0, 3], as per atoms.proto.\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out,
-            "usage: adb shell cmd stats log-binary-push NAME VERSION STAGING ROLLBACK_ENABLED "
-            "LOW_LATENCY STATE EXPERIMENT_IDS\n");
-    dprintf(out, "  Log a binary push state changed event.\n");
-    dprintf(out, "  NAME                The train name.\n");
-    dprintf(out, "  VERSION             The train version code.\n");
-    dprintf(out, "  STAGING             If this train requires a restart.\n");
-    dprintf(out, "  ROLLBACK_ENABLED    If rollback should be enabled for this install.\n");
-    dprintf(out, "  LOW_LATENCY         If the train requires low latency monitoring.\n");
-    dprintf(out, "  STATE               The status of the train push.\n");
-    dprintf(out, "                      Integer value of the enum in atoms.proto.\n");
-    dprintf(out, "  EXPERIMENT_IDS      Comma separated list of experiment ids.\n");
-    dprintf(out, "                      Leave blank for none.\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats config remove [UID] [NAME]\n");
-    dprintf(out, "usage: adb shell cmd stats config update [UID] NAME\n");
-    dprintf(out, "\n");
-    dprintf(out, "  Adds, updates or removes a configuration. The proto should be in\n");
-    dprintf(out, "  wire-encoded protobuf format and passed via stdin. If no UID and name is\n");
-    dprintf(out, "  provided, then all configs will be removed from memory and disk.\n");
-    dprintf(out, "\n");
-    dprintf(out, "  UID           The uid to use. It is only possible to pass the UID\n");
-    dprintf(out, "                parameter on eng builds. If UID is omitted the calling\n");
-    dprintf(out, "                uid is used.\n");
-    dprintf(out, "  NAME          The per-uid name to use\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n              *Note: If both UID and NAME are omitted then all configs will\n");
-    dprintf(out, "\n                     be removed from memory and disk!\n");
-    dprintf(out, "\n");
-    dprintf(out,
-            "usage: adb shell cmd stats dump-report [UID] NAME [--keep_data] "
-            "[--include_current_bucket] [--proto]\n");
-    dprintf(out, "  Dump all metric data for a configuration.\n");
-    dprintf(out, "  UID           The uid of the configuration. It is only possible to pass\n");
-    dprintf(out, "                the UID parameter on eng builds. If UID is omitted the\n");
-    dprintf(out, "                calling uid is used.\n");
-    dprintf(out, "  NAME          The name of the configuration\n");
-    dprintf(out, "  --keep_data   Do NOT erase the data upon dumping it.\n");
-    dprintf(out, "  --proto       Print proto binary.\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats send-broadcast [UID] NAME\n");
-    dprintf(out, "  Send a broadcast that triggers the subscriber to fetch metrics.\n");
-    dprintf(out, "  UID           The uid of the configuration. It is only possible to pass\n");
-    dprintf(out, "                the UID parameter on eng builds. If UID is omitted the\n");
-    dprintf(out, "                calling uid is used.\n");
-    dprintf(out, "  NAME          The name of the configuration\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out,
-            "usage: adb shell cmd stats send-active-configs [--uid=UID] [--configs] "
-            "[NAME1] [NAME2] [NAME3..]\n");
-    dprintf(out, "  Send a broadcast that informs the subscriber of the current active configs.\n");
-    dprintf(out, "  --uid=UID     The uid of the configurations. It is only possible to pass\n");
-    dprintf(out, "                the UID parameter on eng builds. If UID is omitted the\n");
-    dprintf(out, "                calling uid is used.\n");
-    dprintf(out, "  --configs     Send the list of configs in the name list instead of\n");
-    dprintf(out, "                the currently active configs\n");
-    dprintf(out, "  NAME LIST     List of configuration names to be included in the broadcast.\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats print-stats\n");
-    dprintf(out, "  Prints some basic stats.\n");
-    dprintf(out, "  --proto       Print proto binary instead of string format.\n");
-    dprintf(out, "\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats clear-puller-cache\n");
-    dprintf(out, "  Clear cached puller data.\n");
-    dprintf(out, "\n");
-    dprintf(out, "usage: adb shell cmd stats print-logs\n");
-    dprintf(out, "      Only works on eng build\n");
-}
-
-status_t StatsService::cmd_trigger_broadcast(int out, Vector<String8>& args) {
-    string name;
-    bool good = false;
-    int uid;
-    const int argCount = args.size();
-    if (argCount == 2) {
-        // Automatically pick the UID
-        uid = AIBinder_getCallingUid();
-        name.assign(args[1].c_str(), args[1].size());
-        good = true;
-    } else if (argCount == 3) {
-        good = getUidFromArgs(args, 1, uid);
-        if (!good) {
-            dprintf(out, "Invalid UID. Note that the metrics can only be dumped for "
-                         "other UIDs on eng or userdebug builds.\n");
-        }
-        name.assign(args[2].c_str(), args[2].size());
-    }
-    if (!good) {
-        print_cmd_help(out);
-        return UNKNOWN_ERROR;
-    }
-    ConfigKey key(uid, StrToInt64(name));
-    shared_ptr<IPendingIntentRef> receiver = mConfigManager->GetConfigReceiver(key);
-    if (receiver == nullptr) {
-        VLOG("Could not find receiver for %s, %s", args[1].c_str(), args[2].c_str());
-        return UNKNOWN_ERROR;
-    } else if (receiver->sendDataBroadcast(mProcessor->getLastReportTimeNs(key)).isOk()) {
-        VLOG("StatsService::trigger broadcast succeeded to %s, %s", args[1].c_str(),
-             args[2].c_str());
-    } else {
-        VLOG("StatsService::trigger broadcast failed to %s, %s", args[1].c_str(), args[2].c_str());
-        return UNKNOWN_ERROR;
-    }
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_trigger_active_config_broadcast(int out, Vector<String8>& args) {
-    const int argCount = args.size();
-    int uid;
-    vector<int64_t> configIds;
-    if (argCount == 1) {
-        // Automatically pick the uid and send a broadcast that has no active configs.
-        uid = AIBinder_getCallingUid();
-        mProcessor->GetActiveConfigs(uid, configIds);
-    } else {
-        int curArg = 1;
-        if(args[curArg].find("--uid=") == 0) {
-            string uidArgStr(args[curArg].c_str());
-            string uidStr = uidArgStr.substr(6);
-            if (!getUidFromString(uidStr.c_str(), uid)) {
-                dprintf(out, "Invalid UID. Note that the config can only be set for "
-                             "other UIDs on eng or userdebug builds.\n");
-                return UNKNOWN_ERROR;
-            }
-            curArg++;
-        } else {
-            uid = AIBinder_getCallingUid();
-        }
-        if (curArg == argCount || args[curArg] != "--configs") {
-            VLOG("Reached end of args, or specify configs not set. Sending actual active configs,");
-            mProcessor->GetActiveConfigs(uid, configIds);
-        } else {
-            // Flag specified, use the given list of configs.
-            curArg++;
-            for (int i = curArg; i < argCount; i++) {
-                char* endp;
-                int64_t configID = strtoll(args[i].c_str(), &endp, 10);
-                if (endp == args[i].c_str() || *endp != '\0') {
-                    dprintf(out, "Error parsing config ID.\n");
-                    return UNKNOWN_ERROR;
-                }
-                VLOG("Adding config id %ld", static_cast<long>(configID));
-                configIds.push_back(configID);
-            }
-        }
-    }
-    shared_ptr<IPendingIntentRef> receiver = mConfigManager->GetActiveConfigsChangedReceiver(uid);
-    if (receiver == nullptr) {
-        VLOG("Could not find receiver for uid %d", uid);
-        return UNKNOWN_ERROR;
-    } else if (receiver->sendActiveConfigsChangedBroadcast(configIds).isOk()) {
-        VLOG("StatsService::trigger active configs changed broadcast succeeded for uid %d" , uid);
-    } else {
-        VLOG("StatsService::trigger active configs changed broadcast failed for uid %d", uid);
-        return UNKNOWN_ERROR;
-    }
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_config(int in, int out, int err, Vector<String8>& args) {
-    const int argCount = args.size();
-    if (argCount >= 2) {
-        if (args[1] == "update" || args[1] == "remove") {
-            bool good = false;
-            int uid = -1;
-            string name;
-
-            if (argCount == 3) {
-                // Automatically pick the UID
-                uid = AIBinder_getCallingUid();
-                name.assign(args[2].c_str(), args[2].size());
-                good = true;
-            } else if (argCount == 4) {
-                good = getUidFromArgs(args, 2, uid);
-                if (!good) {
-                    dprintf(err, "Invalid UID. Note that the config can only be set for "
-                                 "other UIDs on eng or userdebug builds.\n");
-                }
-                name.assign(args[3].c_str(), args[3].size());
-            } else if (argCount == 2 && args[1] == "remove") {
-                good = true;
-            }
-
-            if (!good) {
-                // If arg parsing failed, print the help text and return an error.
-                print_cmd_help(out);
-                return UNKNOWN_ERROR;
-            }
-
-            if (args[1] == "update") {
-                char* endp;
-                int64_t configID = strtoll(name.c_str(), &endp, 10);
-                if (endp == name.c_str() || *endp != '\0') {
-                    dprintf(err, "Error parsing config ID.\n");
-                    return UNKNOWN_ERROR;
-                }
-
-                // Read stream into buffer.
-                string buffer;
-                if (!android::base::ReadFdToString(in, &buffer)) {
-                    dprintf(err, "Error reading stream for StatsConfig.\n");
-                    return UNKNOWN_ERROR;
-                }
-
-                // Parse buffer.
-                StatsdConfig config;
-                if (!config.ParseFromString(buffer)) {
-                    dprintf(err, "Error parsing proto stream for StatsConfig.\n");
-                    return UNKNOWN_ERROR;
-                }
-
-                // Add / update the config.
-                mConfigManager->UpdateConfig(ConfigKey(uid, configID), config);
-            } else {
-                if (argCount == 2) {
-                    cmd_remove_all_configs(out);
-                } else {
-                    // Remove the config.
-                    mConfigManager->RemoveConfig(ConfigKey(uid, StrToInt64(name)));
-                }
-            }
-
-            return NO_ERROR;
-        }
-    }
-    print_cmd_help(out);
-    return UNKNOWN_ERROR;
-}
-
-status_t StatsService::cmd_dump_report(int out, const Vector<String8>& args) {
-    if (mProcessor != nullptr) {
-        int argCount = args.size();
-        bool good = false;
-        bool proto = false;
-        bool includeCurrentBucket = false;
-        bool eraseData = true;
-        int uid;
-        string name;
-        if (!std::strcmp("--proto", args[argCount-1].c_str())) {
-            proto = true;
-            argCount -= 1;
-        }
-        if (!std::strcmp("--include_current_bucket", args[argCount-1].c_str())) {
-            includeCurrentBucket = true;
-            argCount -= 1;
-        }
-        if (!std::strcmp("--keep_data", args[argCount-1].c_str())) {
-            eraseData = false;
-            argCount -= 1;
-        }
-        if (argCount == 2) {
-            // Automatically pick the UID
-            uid = AIBinder_getCallingUid();
-            name.assign(args[1].c_str(), args[1].size());
-            good = true;
-        } else if (argCount == 3) {
-            good = getUidFromArgs(args, 1, uid);
-            if (!good) {
-                dprintf(out, "Invalid UID. Note that the metrics can only be dumped for "
-                             "other UIDs on eng or userdebug builds.\n");
-            }
-            name.assign(args[2].c_str(), args[2].size());
-        }
-        if (good) {
-            vector<uint8_t> data;
-            mProcessor->onDumpReport(ConfigKey(uid, StrToInt64(name)), getElapsedRealtimeNs(),
-                                     includeCurrentBucket, eraseData, ADB_DUMP,
-                                     NO_TIME_CONSTRAINTS,
-                                     &data);
-            if (proto) {
-                for (size_t i = 0; i < data.size(); i ++) {
-                    dprintf(out, "%c", data[i]);
-                }
-            } else {
-                dprintf(out, "Non-proto stats data dump not currently supported.\n");
-            }
-            return android::OK;
-        } else {
-            // If arg parsing failed, print the help text and return an error.
-            print_cmd_help(out);
-            return UNKNOWN_ERROR;
-        }
-    } else {
-        dprintf(out, "Log processor does not exist...\n");
-        return UNKNOWN_ERROR;
-    }
-}
-
-status_t StatsService::cmd_print_stats(int out, const Vector<String8>& args) {
-    int argCount = args.size();
-    bool proto = false;
-    if (!std::strcmp("--proto", args[argCount-1].c_str())) {
-        proto = true;
-        argCount -= 1;
-    }
-    StatsdStats& statsdStats = StatsdStats::getInstance();
-    if (proto) {
-        vector<uint8_t> data;
-        statsdStats.dumpStats(&data, false); // does not reset statsdStats.
-        for (size_t i = 0; i < data.size(); i ++) {
-            dprintf(out, "%c", data[i]);
-        }
-
-    } else {
-        vector<ConfigKey> configs = mConfigManager->GetAllConfigKeys();
-        for (const ConfigKey& key : configs) {
-            dprintf(out, "Config %s uses %zu bytes\n", key.ToString().c_str(),
-                    mProcessor->GetMetricsSize(key));
-        }
-        statsdStats.dumpStats(out);
-    }
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_print_uid_map(int out, const Vector<String8>& args) {
-    if (args.size() > 1) {
-        string pkg;
-        pkg.assign(args[1].c_str(), args[1].size());
-        auto uids = mUidMap->getAppUid(pkg);
-        dprintf(out, "%s -> [ ", pkg.c_str());
-        for (const auto& uid : uids) {
-            dprintf(out, "%d ", uid);
-        }
-        dprintf(out, "]\n");
-    } else {
-        mUidMap->printUidMap(out);
-    }
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_write_data_to_disk(int out) {
-    dprintf(out, "Writing data to disk\n");
-    mProcessor->WriteDataToDisk(ADB_DUMP, NO_TIME_CONSTRAINTS);
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_log_app_breadcrumb(int out, const Vector<String8>& args) {
-    bool good = false;
-    int32_t uid;
-    int32_t label;
-    int32_t state;
-    const int argCount = args.size();
-    if (argCount == 3) {
-        // Automatically pick the UID
-        uid = AIBinder_getCallingUid();
-        label = atoi(args[1].c_str());
-        state = atoi(args[2].c_str());
-        good = true;
-    } else if (argCount == 4) {
-        good = getUidFromArgs(args, 1, uid);
-        if (!good) {
-            dprintf(out,
-                    "Invalid UID. Note that selecting a UID for writing AppBreadcrumb can only be "
-                    "done for other UIDs on eng or userdebug builds.\n");
-        }
-        label = atoi(args[2].c_str());
-        state = atoi(args[3].c_str());
-    }
-    if (good) {
-        dprintf(out, "Logging AppBreadcrumbReported(%d, %d, %d) to statslog.\n", uid, label, state);
-        android::os::statsd::util::stats_write(
-                android::os::statsd::util::APP_BREADCRUMB_REPORTED, uid, label, state);
-    } else {
-        print_cmd_help(out);
-        return UNKNOWN_ERROR;
-    }
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_log_binary_push(int out, const Vector<String8>& args) {
-    // Security checks are done in the sendBinaryPushStateChanged atom.
-    const int argCount = args.size();
-    if (argCount != 7 && argCount != 8) {
-        dprintf(out, "Incorrect number of argument supplied\n");
-        return UNKNOWN_ERROR;
-    }
-    string trainName = string(args[1].c_str());
-    int64_t trainVersion = strtoll(args[2].c_str(), nullptr, 10);
-    int32_t state = atoi(args[6].c_str());
-    vector<int64_t> experimentIds;
-    if (argCount == 8) {
-        vector<string> experimentIdsString = android::base::Split(string(args[7].c_str()), ",");
-        for (string experimentIdString : experimentIdsString) {
-            int64_t experimentId = strtoll(experimentIdString.c_str(), nullptr, 10);
-            experimentIds.push_back(experimentId);
-        }
-    }
-    dprintf(out, "Logging BinaryPushStateChanged\n");
-    vector<uint8_t> experimentIdBytes;
-    writeExperimentIdsToProto(experimentIds, &experimentIdBytes);
-    LogEvent event(trainName, trainVersion, args[3], args[4], args[5], state, experimentIdBytes, 0);
-    mProcessor->OnLogEvent(&event);
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_print_pulled_metrics(int out, const Vector<String8>& args) {
-    int s = atoi(args[1].c_str());
-    vector<int32_t> uids;
-    if (args.size() > 2) {
-        string package = string(args[2].c_str());
-        auto it = UidMap::sAidToUidMapping.find(package);
-        if (it != UidMap::sAidToUidMapping.end()) {
-            uids.push_back(it->second);
-        } else {
-            set<int32_t> uids_set = mUidMap->getAppUid(package);
-            uids.insert(uids.end(), uids_set.begin(), uids_set.end());
-        }
-    } else {
-        uids.push_back(AID_SYSTEM);
-    }
-    vector<shared_ptr<LogEvent>> stats;
-    if (mPullerManager->Pull(s, uids, getElapsedRealtimeNs(), &stats)) {
-        for (const auto& it : stats) {
-            dprintf(out, "Pull from %d: %s\n", s, it->ToString().c_str());
-        }
-        dprintf(out, "Pull from %d: Received %zu elements\n", s, stats.size());
-        return NO_ERROR;
-    }
-    return UNKNOWN_ERROR;
-}
-
-status_t StatsService::cmd_remove_all_configs(int out) {
-    dprintf(out, "Removing all configs...\n");
-    VLOG("StatsService::cmd_remove_all_configs was called");
-    mConfigManager->RemoveAllConfigs();
-    StorageManager::deleteAllFiles(STATS_SERVICE_DIR);
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_dump_memory_info(int out) {
-    dprintf(out, "meminfo not available.\n");
-    return NO_ERROR;
-}
-
-status_t StatsService::cmd_clear_puller_cache(int out) {
-    VLOG("StatsService::cmd_clear_puller_cache with Pid %i, Uid %i",
-            AIBinder_getCallingPid(), AIBinder_getCallingUid());
-    if (checkPermission(kPermissionDump)) {
-        int cleared = mPullerManager->ForceClearPullerCache();
-        dprintf(out, "Puller removed %d cached data!\n", cleared);
-        return NO_ERROR;
-    } else {
-        return PERMISSION_DENIED;
-    }
-}
-
-status_t StatsService::cmd_print_logs(int out, const Vector<String8>& args) {
-    VLOG("StatsService::cmd_print_logs with Pid %i, Uid %i", AIBinder_getCallingPid(),
-         AIBinder_getCallingUid());
-    if (checkPermission(kPermissionDump)) {
-        bool enabled = true;
-        if (args.size() >= 2) {
-            enabled = atoi(args[1].c_str()) != 0;
-        }
-        mProcessor->setPrintLogs(enabled);
-        return NO_ERROR;
-    } else {
-        return PERMISSION_DENIED;
-    }
-}
-
-bool StatsService::getUidFromArgs(const Vector<String8>& args, size_t uidArgIndex, int32_t& uid) {
-    return getUidFromString(args[uidArgIndex].c_str(), uid);
-}
-
-bool StatsService::getUidFromString(const char* s, int32_t& uid) {
-    if (*s == '\0') {
-        return false;
-    }
-    char* endc = NULL;
-    int64_t longUid = strtol(s, &endc, 0);
-    if (*endc != '\0') {
-        return false;
-    }
-    int32_t goodUid = static_cast<int32_t>(longUid);
-    if (longUid < 0 || static_cast<uint64_t>(longUid) != static_cast<uid_t>(goodUid)) {
-        return false;  // It was not of uid_t type.
-    }
-    uid = goodUid;
-
-    int32_t callingUid = AIBinder_getCallingUid();
-    return mEngBuild // UserDebug/EngBuild are allowed to impersonate uids.
-            || (callingUid == goodUid) // Anyone can 'impersonate' themselves.
-            || (callingUid == AID_ROOT && goodUid == AID_SHELL); // ROOT can impersonate SHELL.
-}
-
-Status StatsService::informAllUidData(const ScopedFileDescriptor& fd) {
-    ENFORCE_UID(AID_SYSTEM);
-    // Read stream into buffer.
-    string buffer;
-    if (!android::base::ReadFdToString(fd.get(), &buffer)) {
-        return exception(EX_ILLEGAL_ARGUMENT, "Failed to read all data from the pipe.");
-    }
-
-    // Parse buffer.
-    UidData uidData;
-    if (!uidData.ParseFromString(buffer)) {
-        return exception(EX_ILLEGAL_ARGUMENT, "Error parsing proto stream for UidData.");
-    }
-
-    vector<String16> versionStrings;
-    vector<String16> installers;
-    vector<String16> packageNames;
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-
-    const auto numEntries = uidData.app_info_size();
-    versionStrings.reserve(numEntries);
-    installers.reserve(numEntries);
-    packageNames.reserve(numEntries);
-    uids.reserve(numEntries);
-    versions.reserve(numEntries);
-
-    for (const auto& appInfo: uidData.app_info()) {
-        packageNames.emplace_back(String16(appInfo.package_name().c_str()));
-        uids.push_back(appInfo.uid());
-        versions.push_back(appInfo.version());
-        versionStrings.emplace_back(String16(appInfo.version_string().c_str()));
-        installers.emplace_back(String16(appInfo.installer().c_str()));
-    }
-
-    mUidMap->updateMap(getElapsedRealtimeNs(),
-                       uids,
-                       versions,
-                       versionStrings,
-                       packageNames,
-                       installers);
-
-    mBootCompleteTrigger.markComplete(kUidMapReceivedTag);
-    VLOG("StatsService::informAllUidData UidData proto parsed successfully.");
-    return Status::ok();
-}
-
-Status StatsService::informOnePackage(const string& app, int32_t uid, int64_t version,
-                                      const string& versionString, const string& installer) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::informOnePackage was called");
-    String16 utf16App = String16(app.c_str());
-    String16 utf16VersionString = String16(versionString.c_str());
-    String16 utf16Installer = String16(installer.c_str());
-
-    mUidMap->updateApp(getElapsedRealtimeNs(), utf16App, uid, version, utf16VersionString,
-                       utf16Installer);
-    return Status::ok();
-}
-
-Status StatsService::informOnePackageRemoved(const string& app, int32_t uid) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::informOnePackageRemoved was called");
-    String16 utf16App = String16(app.c_str());
-    mUidMap->removeApp(getElapsedRealtimeNs(), utf16App, uid);
-    mConfigManager->RemoveConfigs(uid);
-    return Status::ok();
-}
-
-Status StatsService::informAlarmForSubscriberTriggeringFired() {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::informAlarmForSubscriberTriggeringFired was called");
-    int64_t currentTimeSec = getElapsedRealtimeSec();
-    std::unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> alarmSet =
-            mPeriodicAlarmMonitor->popSoonerThan(static_cast<uint32_t>(currentTimeSec));
-    if (alarmSet.size() > 0) {
-        VLOG("Found periodic alarm fired.");
-        mProcessor->onPeriodicAlarmFired(currentTimeSec * NS_PER_SEC, alarmSet);
-    } else {
-        ALOGW("Cannot find an periodic alarm that fired. Perhaps it was recently cancelled.");
-    }
-    return Status::ok();
-}
-
-Status StatsService::informPollAlarmFired() {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::informPollAlarmFired was called");
-    mProcessor->informPullAlarmFired(getElapsedRealtimeNs());
-    VLOG("StatsService::informPollAlarmFired succeeded");
-    return Status::ok();
-}
-
-Status StatsService::systemRunning() {
-    ENFORCE_UID(AID_SYSTEM);
-
-    // When system_server is up and running, schedule the dropbox task to run.
-    VLOG("StatsService::systemRunning");
-    sayHiToStatsCompanion();
-    return Status::ok();
-}
-
-Status StatsService::informDeviceShutdown() {
-    ENFORCE_UID(AID_SYSTEM);
-    VLOG("StatsService::informDeviceShutdown");
-    mProcessor->WriteDataToDisk(DEVICE_SHUTDOWN, FAST);
-    mProcessor->SaveActiveConfigsToDisk(getElapsedRealtimeNs());
-    mProcessor->SaveMetadataToDisk(getWallClockNs(), getElapsedRealtimeNs());
-    return Status::ok();
-}
-
-void StatsService::sayHiToStatsCompanion() {
-    shared_ptr<IStatsCompanionService> statsCompanion = getStatsCompanionService();
-    if (statsCompanion != nullptr) {
-        VLOG("Telling statsCompanion that statsd is ready");
-        statsCompanion->statsdReady();
-    } else {
-        VLOG("Could not access statsCompanion");
-    }
-}
-
-Status StatsService::statsCompanionReady() {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::statsCompanionReady was called");
-    shared_ptr<IStatsCompanionService> statsCompanion = getStatsCompanionService();
-    if (statsCompanion == nullptr) {
-        return exception(EX_NULL_POINTER,
-                         "StatsCompanion unavailable despite it contacting statsd.");
-    }
-    VLOG("StatsService::statsCompanionReady linking to statsCompanion.");
-    AIBinder_linkToDeath(statsCompanion->asBinder().get(),
-                         mStatsCompanionServiceDeathRecipient.get(), this);
-    mPullerManager->SetStatsCompanionService(statsCompanion);
-    mAnomalyAlarmMonitor->setStatsCompanionService(statsCompanion);
-    mPeriodicAlarmMonitor->setStatsCompanionService(statsCompanion);
-    return Status::ok();
-}
-
-Status StatsService::bootCompleted() {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::bootCompleted was called");
-    mBootCompleteTrigger.markComplete(kBootCompleteTag);
-    return Status::ok();
-}
-
-void StatsService::Startup() {
-    mConfigManager->Startup();
-    mProcessor->LoadActiveConfigsFromDisk();
-    mProcessor->LoadMetadataFromDisk(getWallClockNs(), getElapsedRealtimeNs());
-}
-
-void StatsService::Terminate() {
-    ALOGI("StatsService::Terminating");
-    if (mProcessor != nullptr) {
-        mProcessor->WriteDataToDisk(TERMINATION_SIGNAL_RECEIVED, FAST);
-        mProcessor->SaveActiveConfigsToDisk(getElapsedRealtimeNs());
-        mProcessor->SaveMetadataToDisk(getWallClockNs(), getElapsedRealtimeNs());
-    }
-}
-
-// Test only interface!!!
-void StatsService::OnLogEvent(LogEvent* event) {
-    mProcessor->OnLogEvent(event);
-    if (mShellSubscriber != nullptr) {
-        mShellSubscriber->onLogEvent(*event);
-    }
-}
-
-Status StatsService::getData(int64_t key, const int32_t callingUid, vector<uint8_t>* output) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::getData with Uid %i", callingUid);
-    ConfigKey configKey(callingUid, key);
-    // The dump latency does not matter here since we do not include the current bucket, we do not
-    // need to pull any new data anyhow.
-    mProcessor->onDumpReport(configKey, getElapsedRealtimeNs(), false /* include_current_bucket*/,
-                             true /* erase_data */, GET_DATA_CALLED, FAST, output);
-    return Status::ok();
-}
-
-Status StatsService::getMetadata(vector<uint8_t>* output) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    StatsdStats::getInstance().dumpStats(output, false); // Don't reset the counters.
-    return Status::ok();
-}
-
-Status StatsService::addConfiguration(int64_t key, const vector <uint8_t>& config,
-                                      const int32_t callingUid) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    if (addConfigurationChecked(callingUid, key, config)) {
-        return Status::ok();
-    } else {
-        return exception(EX_ILLEGAL_ARGUMENT, "Could not parse malformatted StatsdConfig.");
-    }
-}
-
-bool StatsService::addConfigurationChecked(int uid, int64_t key, const vector<uint8_t>& config) {
-    ConfigKey configKey(uid, key);
-    StatsdConfig cfg;
-    if (config.size() > 0) {  // If the config is empty, skip parsing.
-        if (!cfg.ParseFromArray(&config[0], config.size())) {
-            return false;
-        }
-    }
-    mConfigManager->UpdateConfig(configKey, cfg);
-    return true;
-}
-
-Status StatsService::removeDataFetchOperation(int64_t key,
-                                              const int32_t callingUid) {
-    ENFORCE_UID(AID_SYSTEM);
-    ConfigKey configKey(callingUid, key);
-    mConfigManager->RemoveConfigReceiver(configKey);
-    return Status::ok();
-}
-
-Status StatsService::setDataFetchOperation(int64_t key,
-                                           const shared_ptr<IPendingIntentRef>& pir,
-                                           const int32_t callingUid) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    ConfigKey configKey(callingUid, key);
-    mConfigManager->SetConfigReceiver(configKey, pir);
-    if (StorageManager::hasConfigMetricsReport(configKey)) {
-        VLOG("StatsService::setDataFetchOperation marking configKey %s to dump reports on disk",
-             configKey.ToString().c_str());
-        mProcessor->noteOnDiskData(configKey);
-    }
-    return Status::ok();
-}
-
-Status StatsService::setActiveConfigsChangedOperation(const shared_ptr<IPendingIntentRef>& pir,
-                                                      const int32_t callingUid,
-                                                      vector<int64_t>* output) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    mConfigManager->SetActiveConfigsChangedReceiver(callingUid, pir);
-    if (output != nullptr) {
-        mProcessor->GetActiveConfigs(callingUid, *output);
-    } else {
-        ALOGW("StatsService::setActiveConfigsChanged output was nullptr");
-    }
-    return Status::ok();
-}
-
-Status StatsService::removeActiveConfigsChangedOperation(const int32_t callingUid) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    mConfigManager->RemoveActiveConfigsChangedReceiver(callingUid);
-    return Status::ok();
-}
-
-Status StatsService::removeConfiguration(int64_t key, const int32_t callingUid) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    ConfigKey configKey(callingUid, key);
-    mConfigManager->RemoveConfig(configKey);
-    return Status::ok();
-}
-
-Status StatsService::setBroadcastSubscriber(int64_t configId,
-                                            int64_t subscriberId,
-                                            const shared_ptr<IPendingIntentRef>& pir,
-                                            const int32_t callingUid) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::setBroadcastSubscriber called.");
-    ConfigKey configKey(callingUid, configId);
-    SubscriberReporter::getInstance()
-            .setBroadcastSubscriber(configKey, subscriberId, pir);
-    return Status::ok();
-}
-
-Status StatsService::unsetBroadcastSubscriber(int64_t configId,
-                                              int64_t subscriberId,
-                                              const int32_t callingUid) {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::unsetBroadcastSubscriber called.");
-    ConfigKey configKey(callingUid, configId);
-    SubscriberReporter::getInstance()
-            .unsetBroadcastSubscriber(configKey, subscriberId);
-    return Status::ok();
-}
-
-Status StatsService::allPullersFromBootRegistered() {
-    ENFORCE_UID(AID_SYSTEM);
-
-    VLOG("StatsService::allPullersFromBootRegistered was called");
-    mBootCompleteTrigger.markComplete(kAllPullersRegisteredTag);
-    return Status::ok();
-}
-
-Status StatsService::registerPullAtomCallback(int32_t uid, int32_t atomTag, int64_t coolDownMillis,
-                                              int64_t timeoutMillis,
-                                              const std::vector<int32_t>& additiveFields,
-                                              const shared_ptr<IPullAtomCallback>& pullerCallback) {
-    ENFORCE_UID(AID_SYSTEM);
-    VLOG("StatsService::registerPullAtomCallback called.");
-    mPullerManager->RegisterPullAtomCallback(uid, atomTag, MillisToNano(coolDownMillis),
-                                             MillisToNano(timeoutMillis), additiveFields,
-                                             pullerCallback);
-    return Status::ok();
-}
-
-Status StatsService::registerNativePullAtomCallback(
-        int32_t atomTag, int64_t coolDownMillis, int64_t timeoutMillis,
-        const std::vector<int32_t>& additiveFields,
-        const shared_ptr<IPullAtomCallback>& pullerCallback) {
-    if (!checkPermission(kPermissionRegisterPullAtom)) {
-        return exception(
-                EX_SECURITY,
-                StringPrintf("Uid %d does not have the %s permission when registering atom %d",
-                             AIBinder_getCallingUid(), kPermissionRegisterPullAtom, atomTag));
-    }
-    VLOG("StatsService::registerNativePullAtomCallback called.");
-    int32_t uid = AIBinder_getCallingUid();
-    mPullerManager->RegisterPullAtomCallback(uid, atomTag, MillisToNano(coolDownMillis),
-                                             MillisToNano(timeoutMillis), additiveFields,
-                                             pullerCallback);
-    return Status::ok();
-}
-
-Status StatsService::unregisterPullAtomCallback(int32_t uid, int32_t atomTag) {
-    ENFORCE_UID(AID_SYSTEM);
-    VLOG("StatsService::unregisterPullAtomCallback called.");
-    mPullerManager->UnregisterPullAtomCallback(uid, atomTag);
-    return Status::ok();
-}
-
-Status StatsService::unregisterNativePullAtomCallback(int32_t atomTag) {
-    if (!checkPermission(kPermissionRegisterPullAtom)) {
-        return exception(
-                EX_SECURITY,
-                StringPrintf("Uid %d does not have the %s permission when unregistering atom %d",
-                             AIBinder_getCallingUid(), kPermissionRegisterPullAtom, atomTag));
-    }
-    VLOG("StatsService::unregisterNativePullAtomCallback called.");
-    int32_t uid = AIBinder_getCallingUid();
-    mPullerManager->UnregisterPullAtomCallback(uid, atomTag);
-    return Status::ok();
-}
-
-Status StatsService::getRegisteredExperimentIds(std::vector<int64_t>* experimentIdsOut) {
-    ENFORCE_UID(AID_SYSTEM);
-    // TODO: add verifier permission
-
-    experimentIdsOut->clear();
-    // Read the latest train info
-    vector<InstallTrainInfo> trainInfoList = StorageManager::readAllTrainInfo();
-    if (trainInfoList.empty()) {
-        // No train info means no experiment IDs, return an empty list
-        return Status::ok();
-    }
-
-    // Copy the experiment IDs to the out vector
-    for (InstallTrainInfo& trainInfo : trainInfoList) {
-        experimentIdsOut->insert(experimentIdsOut->end(),
-                                 trainInfo.experimentIds.begin(),
-                                 trainInfo.experimentIds.end());
-    }
-    return Status::ok();
-}
-
-void StatsService::statsCompanionServiceDied(void* cookie) {
-    auto thiz = static_cast<StatsService*>(cookie);
-    thiz->statsCompanionServiceDiedImpl();
-}
-
-void StatsService::statsCompanionServiceDiedImpl() {
-    ALOGW("statscompanion service died");
-    StatsdStats::getInstance().noteSystemServerRestart(getWallClockSec());
-    if (mProcessor != nullptr) {
-        ALOGW("Reset statsd upon system server restarts.");
-        int64_t systemServerRestartNs = getElapsedRealtimeNs();
-        ProtoOutputStream activeConfigsProto;
-        mProcessor->WriteActiveConfigsToProtoOutputStream(systemServerRestartNs,
-                STATSCOMPANION_DIED, &activeConfigsProto);
-        metadata::StatsMetadataList metadataList;
-        mProcessor->WriteMetadataToProto(getWallClockNs(),
-                systemServerRestartNs, &metadataList);
-        mProcessor->WriteDataToDisk(STATSCOMPANION_DIED, FAST);
-        mProcessor->resetConfigs();
-
-        std::string serializedActiveConfigs;
-        if (activeConfigsProto.serializeToString(&serializedActiveConfigs)) {
-            ActiveConfigList activeConfigs;
-            if (activeConfigs.ParseFromString(serializedActiveConfigs)) {
-                mProcessor->SetConfigsActiveState(activeConfigs, systemServerRestartNs);
-            }
-        }
-        mProcessor->SetMetadataState(metadataList, getWallClockNs(), systemServerRestartNs);
-    }
-    mAnomalyAlarmMonitor->setStatsCompanionService(nullptr);
-    mPeriodicAlarmMonitor->setStatsCompanionService(nullptr);
-    mPullerManager->SetStatsCompanionService(nullptr);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h
deleted file mode 100644
index 479f4e8..0000000
--- a/cmds/statsd/src/StatsService.h
+++ /dev/null
@@ -1,416 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef STATS_SERVICE_H
-#define STATS_SERVICE_H
-
-#include <aidl/android/os/BnStatsd.h>
-#include <aidl/android/os/IPendingIntentRef.h>
-#include <aidl/android/os/IPullAtomCallback.h>
-#include <gtest/gtest_prod.h>
-#include <utils/Looper.h>
-
-#include <mutex>
-
-#include "StatsLogProcessor.h"
-#include "anomaly/AlarmMonitor.h"
-#include "config/ConfigManager.h"
-#include "external/StatsPullerManager.h"
-#include "logd/LogEventQueue.h"
-#include "packages/UidMap.h"
-#include "shell/ShellSubscriber.h"
-#include "statscompanion_util.h"
-#include "utils/MultiConditionTrigger.h"
-
-using namespace android;
-using namespace android::os;
-using namespace std;
-
-using Status = ::ndk::ScopedAStatus;
-using aidl::android::os::BnStatsd;
-using aidl::android::os::IPendingIntentRef;
-using aidl::android::os::IPullAtomCallback;
-using ::ndk::ScopedAIBinder_DeathRecipient;
-using ::ndk::ScopedFileDescriptor;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class StatsService : public BnStatsd {
-public:
-    StatsService(const sp<Looper>& handlerLooper, std::shared_ptr<LogEventQueue> queue);
-    virtual ~StatsService();
-
-    /** The anomaly alarm registered with AlarmManager won't be updated by less than this. */
-    const uint32_t MIN_DIFF_TO_UPDATE_REGISTERED_ALARM_SECS = 5;
-
-    virtual status_t dump(int fd, const char** args, uint32_t numArgs) override;
-    virtual status_t handleShellCommand(int in, int out, int err, const char** argv,
-                                        uint32_t argc) override;
-
-    virtual Status systemRunning();
-    virtual Status statsCompanionReady();
-    virtual Status bootCompleted();
-    virtual Status informPollAlarmFired();
-    virtual Status informAlarmForSubscriberTriggeringFired();
-
-    virtual Status informAllUidData(const ScopedFileDescriptor& fd);
-    virtual Status informOnePackage(const string& app, int32_t uid, int64_t version,
-                                    const string& versionString, const string& installer);
-    virtual Status informOnePackageRemoved(const string& app, int32_t uid);
-    virtual Status informDeviceShutdown();
-
-    /**
-     * Called right before we start processing events.
-     */
-    void Startup();
-
-    /**
-     * Called when terminiation signal received.
-     */
-    void Terminate();
-
-    /**
-     * Test ONLY interface. In real world, StatsService reads from LogEventQueue.
-     */
-    virtual void OnLogEvent(LogEvent* event);
-
-    /**
-     * Binder call for clients to request data for this configuration key.
-     */
-    virtual Status getData(int64_t key,
-                           const int32_t callingUid,
-                           vector<uint8_t>* output) override;
-
-
-    /**
-     * Binder call for clients to get metadata across all configs in statsd.
-     */
-    virtual Status getMetadata(vector<uint8_t>* output) override;
-
-
-    /**
-     * Binder call to let clients send a configuration and indicate they're interested when they
-     * should requestData for this configuration.
-     */
-    virtual Status addConfiguration(int64_t key,
-                                    const vector<uint8_t>& config,
-                                    const int32_t callingUid) override;
-
-    /**
-     * Binder call to let clients register the data fetch operation for a configuration.
-     */
-    virtual Status setDataFetchOperation(int64_t key,
-                                         const shared_ptr<IPendingIntentRef>& pir,
-                                         const int32_t callingUid) override;
-
-    /**
-     * Binder call to remove the data fetch operation for the specified config key.
-     */
-    virtual Status removeDataFetchOperation(int64_t key,
-                                            const int32_t callingUid) override;
-
-    /**
-     * Binder call to let clients register the active configs changed operation.
-     */
-    virtual Status setActiveConfigsChangedOperation(const shared_ptr<IPendingIntentRef>& pir,
-                                                    const int32_t callingUid,
-                                                    vector<int64_t>* output) override;
-
-    /**
-     * Binder call to remove the active configs changed operation for the specified package..
-     */
-    virtual Status removeActiveConfigsChangedOperation(const int32_t callingUid) override;
-    /**
-     * Binder call to allow clients to remove the specified configuration.
-     */
-    virtual Status removeConfiguration(int64_t key,
-                                       const int32_t callingUid) override;
-
-    /**
-     * Binder call to associate the given config's subscriberId with the given pendingIntentRef.
-     */
-    virtual Status setBroadcastSubscriber(int64_t configId,
-                                          int64_t subscriberId,
-                                          const shared_ptr<IPendingIntentRef>& pir,
-                                          const int32_t callingUid) override;
-
-    /**
-     * Binder call to unassociate the given config's subscriberId with any pendingIntentRef.
-     */
-    virtual Status unsetBroadcastSubscriber(int64_t configId,
-                                            int64_t subscriberId,
-                                            const int32_t callingUid) override;
-
-    /** Inform statsCompanion that statsd is ready. */
-    virtual void sayHiToStatsCompanion();
-
-    /**
-     * Binder call to notify statsd that all pullers from boot have been registered.
-     */
-    virtual Status allPullersFromBootRegistered();
-
-    /**
-     * Binder call to register a callback function for a pulled atom.
-     */
-    virtual Status registerPullAtomCallback(
-            int32_t uid, int32_t atomTag, int64_t coolDownMillis, int64_t timeoutMillis,
-            const std::vector<int32_t>& additiveFields,
-            const shared_ptr<IPullAtomCallback>& pullerCallback) override;
-
-    /**
-     * Binder call to register a callback function for a pulled atom.
-     */
-    virtual Status registerNativePullAtomCallback(
-            int32_t atomTag, int64_t coolDownMillis, int64_t timeoutMillis,
-            const std::vector<int32_t>& additiveFields,
-            const shared_ptr<IPullAtomCallback>& pullerCallback) override;
-
-    /**
-     * Binder call to unregister any existing callback for the given uid and atom.
-     */
-    virtual Status unregisterPullAtomCallback(int32_t uid, int32_t atomTag) override;
-
-    /**
-     * Binder call to unregister any existing callback for the given atom and calling uid.
-     */
-    virtual Status unregisterNativePullAtomCallback(int32_t atomTag) override;
-
-    /**
-     * Binder call to get registered experiment IDs.
-     */
-    virtual Status getRegisteredExperimentIds(std::vector<int64_t>* expIdsOut);
-
-private:
-    /**
-     * Load system properties at init.
-     */
-    void init_system_properties();
-
-    /**
-     * Helper for loading system properties.
-     */
-    static void init_build_type_callback(void* cookie, const char* name, const char* value,
-                                         uint32_t serial);
-
-    /**
-     * Proto output of statsd report data dumpsys, wrapped in a StatsDataDumpProto.
-     */
-    void dumpIncidentSection(int outFd);
-
-    /**
-     * Text or proto output of statsdStats dumpsys.
-     */
-    void dumpStatsdStats(int outFd, bool verbose, bool proto);
-
-    /**
-     * Print usage information for the commands
-     */
-    void print_cmd_help(int out);
-
-    /* Runs on its dedicated thread to process pushed stats event from socket. */
-    void readLogs();
-
-    /**
-     * Trigger a broadcast.
-     */
-    status_t cmd_trigger_broadcast(int outFd, Vector<String8>& args);
-
-
-    /**
-     * Trigger an active configs changed broadcast.
-     */
-    status_t cmd_trigger_active_config_broadcast(int outFd, Vector<String8>& args);
-
-    /**
-     * Handle the config sub-command.
-     */
-    status_t cmd_config(int inFd, int outFd, int err, Vector<String8>& args);
-
-    /**
-     * Prints some basic stats to std out.
-     */
-    status_t cmd_print_stats(int outFd, const Vector<String8>& args);
-
-    /**
-     * Print the event log.
-     */
-    status_t cmd_dump_report(int outFd, const Vector<String8>& args);
-
-    /**
-     * Print the mapping of uids to package names.
-     */
-    status_t cmd_print_uid_map(int outFd, const Vector<String8>& args);
-
-    /**
-     * Flush the data to disk.
-     */
-    status_t cmd_write_data_to_disk(int outFd);
-
-    /**
-     * Write an AppBreadcrumbReported event to the StatsLog buffer, as if calling
-     * StatsLog.write(APP_BREADCRUMB_REPORTED).
-     */
-    status_t cmd_log_app_breadcrumb(int outFd, const Vector<String8>& args);
-
-    /**
-     * Write an BinaryPushStateChanged event, as if calling StatsLog.logBinaryPushStateChanged().
-     */
-    status_t cmd_log_binary_push(int outFd, const Vector<String8>& args);
-
-    /**
-     * Print contents of a pulled metrics source.
-     */
-    status_t cmd_print_pulled_metrics(int outFd, const Vector<String8>& args);
-
-    /**
-     * Removes all configs stored on disk and on memory.
-     */
-    status_t cmd_remove_all_configs(int outFd);
-
-    /*
-     * Dump memory usage by statsd.
-     */
-    status_t cmd_dump_memory_info(int outFd);
-
-    /*
-     * Clear all puller cached data
-     */
-    status_t cmd_clear_puller_cache(int outFd);
-
-    /**
-     * Print all stats logs received to logcat.
-     */
-    status_t cmd_print_logs(int outFd, const Vector<String8>& args);
-
-    /**
-     * Writes the value of args[uidArgIndex] into uid.
-     * Returns whether the uid is reasonable (type uid_t) and whether
-     * 1. it is equal to the calling uid, or
-     * 2. the device is mEngBuild, or
-     * 3. the caller is AID_ROOT and the uid is AID_SHELL (i.e. ROOT can impersonate SHELL).
-     */
-    bool getUidFromArgs(const Vector<String8>& args, size_t uidArgIndex, int32_t& uid);
-
-    /**
-     * Writes the value of uidSting into uid.
-     * Returns whether the uid is reasonable (type uid_t) and whether
-     * 1. it is equal to the calling uid, or
-     * 2. the device is mEngBuild, or
-     * 3. the caller is AID_ROOT and the uid is AID_SHELL (i.e. ROOT can impersonate SHELL).
-     */
-     bool getUidFromString(const char* uidString, int32_t& uid);
-
-    /**
-     * Adds a configuration after checking permissions and obtaining UID from binder call.
-     */
-    bool addConfigurationChecked(int uid, int64_t key, const vector<uint8_t>& config);
-
-    /**
-     * Update a configuration.
-     */
-    void set_config(int uid, const string& name, const StatsdConfig& config);
-
-    /**
-     * Death recipient callback that is called when StatsCompanionService dies.
-     * The cookie is a pointer to a StatsService object.
-     */
-    static void statsCompanionServiceDied(void* cookie);
-
-    /**
-     * Implementation of statsCompanionServiceDied.
-     */
-    void statsCompanionServiceDiedImpl();
-
-    /**
-     * Tracks the uid <--> package name mapping.
-     */
-    sp<UidMap> mUidMap;
-
-    /**
-     * Fetches external metrics
-     */
-    sp<StatsPullerManager> mPullerManager;
-
-    /**
-     * Tracks the configurations that have been passed to statsd.
-     */
-    sp<ConfigManager> mConfigManager;
-
-    /**
-     * The metrics recorder.
-     */
-    sp<StatsLogProcessor> mProcessor;
-
-    /**
-     * The alarm monitor for anomaly detection.
-     */
-    const sp<AlarmMonitor> mAnomalyAlarmMonitor;
-
-    /**
-     * The alarm monitor for alarms to directly trigger subscriber.
-     */
-    const sp<AlarmMonitor> mPeriodicAlarmMonitor;
-
-    /**
-     * Whether this is an eng build.
-     */
-    bool mEngBuild;
-
-    sp<ShellSubscriber> mShellSubscriber;
-
-    /**
-     * Mutex for setting the shell subscriber
-     */
-    mutable mutex mShellSubscriberMutex;
-    std::shared_ptr<LogEventQueue> mEventQueue;
-
-    MultiConditionTrigger mBootCompleteTrigger;
-    static const inline string kBootCompleteTag = "BOOT_COMPLETE";
-    static const inline string kUidMapReceivedTag = "UID_MAP";
-    static const inline string kAllPullersRegisteredTag = "PULLERS_REGISTERED";
-
-    ScopedAIBinder_DeathRecipient mStatsCompanionServiceDeathRecipient;
-
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationsPersistAcrossSystemServerRestart);
-    FRIEND_TEST(StatsServiceTest, TestAddConfig_simple);
-    FRIEND_TEST(StatsServiceTest, TestAddConfig_empty);
-    FRIEND_TEST(StatsServiceTest, TestAddConfig_invalid);
-    FRIEND_TEST(StatsServiceTest, TestGetUidFromArgs);
-    FRIEND_TEST(PartialBucketE2eTest, TestCountMetricNoSplitOnNewApp);
-    FRIEND_TEST(PartialBucketE2eTest, TestCountMetricSplitOnBoot);
-    FRIEND_TEST(PartialBucketE2eTest, TestCountMetricSplitOnUpgrade);
-    FRIEND_TEST(PartialBucketE2eTest, TestCountMetricSplitOnRemoval);
-    FRIEND_TEST(PartialBucketE2eTest, TestCountMetricWithoutSplit);
-    FRIEND_TEST(PartialBucketE2eTest, TestValueMetricOnBootWithoutMinPartialBucket);
-    FRIEND_TEST(PartialBucketE2eTest, TestValueMetricWithoutMinPartialBucket);
-    FRIEND_TEST(PartialBucketE2eTest, TestValueMetricWithMinPartialBucket);
-    FRIEND_TEST(PartialBucketE2eTest, TestGaugeMetricOnBootWithoutMinPartialBucket);
-    FRIEND_TEST(PartialBucketE2eTest, TestGaugeMetricWithoutMinPartialBucket);
-    FRIEND_TEST(PartialBucketE2eTest, TestGaugeMetricWithMinPartialBucket);
-
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_single_bucket);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_multiple_buckets);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_long_refractory_period);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // STATS_SERVICE_H
diff --git a/cmds/statsd/src/active_config_list.proto b/cmds/statsd/src/active_config_list.proto
deleted file mode 100644
index 9929833..0000000
--- a/cmds/statsd/src/active_config_list.proto
+++ /dev/null
@@ -1,57 +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.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-option java_package = "com.android.os";
-option java_multiple_files = true;
-option java_outer_classname = "ActiveConfigProto";
-
-message ActiveEventActivation {
-    optional int32 atom_matcher_index = 1;
-
-    // Time left in activation. When this proto is loaded after device boot,
-    // the activation should be set to active for this duration.
-    // This field will only be set when the state is ACTIVE
-    optional int64 remaining_ttl_nanos = 2;
-
-    enum State {
-        UNNKNOWN = 0;
-        // This metric should activate for remaining_ttl_nanos when we load the activations.
-        ACTIVE = 1;
-        // When we load the activations, this metric should activate on next boot for the tll
-        // specified in the config.
-        ACTIVATE_ON_BOOT = 2;
-    }
-    optional State state = 3;
-}
-
-message ActiveMetric {
-    optional int64 id = 1;
-    repeated ActiveEventActivation activation = 2;
-}
-
-message ActiveConfig {
-    optional int64 id = 1;
-    optional int32 uid = 2;
-    repeated ActiveMetric metric = 3;
-}
-
-// all configs and their metrics on device.
-message ActiveConfigList {
-    repeated ActiveConfig config = 1;
-}
diff --git a/cmds/statsd/src/annotations.h b/cmds/statsd/src/annotations.h
deleted file mode 100644
index cf7f543..0000000
--- a/cmds/statsd/src/annotations.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const uint8_t ANNOTATION_ID_IS_UID = 1;
-const uint8_t ANNOTATION_ID_TRUNCATE_TIMESTAMP = 2;
-const uint8_t ANNOTATION_ID_PRIMARY_FIELD = 3;
-const uint8_t ANNOTATION_ID_EXCLUSIVE_STATE = 4;
-const uint8_t ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID = 5;
-const uint8_t ANNOTATION_ID_TRIGGER_STATE_RESET = 7;
-const uint8_t ANNOTATION_ID_STATE_NESTED = 8;
-
-} // namespace statsd
-} // namespace os
-} // namespace android
diff --git a/cmds/statsd/src/anomaly/AlarmMonitor.cpp b/cmds/statsd/src/anomaly/AlarmMonitor.cpp
deleted file mode 100644
index b632d04..0000000
--- a/cmds/statsd/src/anomaly/AlarmMonitor.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false
-#include "Log.h"
-
-#include "anomaly/AlarmMonitor.h"
-#include "guardrail/StatsdStats.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-AlarmMonitor::AlarmMonitor(
-        uint32_t minDiffToUpdateRegisteredAlarmTimeSec,
-        const std::function<void(const shared_ptr<IStatsCompanionService>&, int64_t)>& updateAlarm,
-        const std::function<void(const shared_ptr<IStatsCompanionService>&)>& cancelAlarm)
-    : mRegisteredAlarmTimeSec(0),
-      mMinUpdateTimeSec(minDiffToUpdateRegisteredAlarmTimeSec),
-      mUpdateAlarm(updateAlarm),
-      mCancelAlarm(cancelAlarm) {}
-
-AlarmMonitor::~AlarmMonitor() {}
-
-void AlarmMonitor::setStatsCompanionService(
-        shared_ptr<IStatsCompanionService> statsCompanionService) {
-    std::lock_guard<std::mutex> lock(mLock);
-    shared_ptr<IStatsCompanionService> tmpForLock = mStatsCompanionService;
-    mStatsCompanionService = statsCompanionService;
-    if (statsCompanionService == nullptr) {
-        VLOG("Erasing link to statsCompanionService");
-        return;
-    }
-    VLOG("Creating link to statsCompanionService");
-    const sp<const InternalAlarm> top = mPq.top();
-    if (top != nullptr) {
-        updateRegisteredAlarmTime_l(top->timestampSec);
-    }
-}
-
-void AlarmMonitor::add(sp<const InternalAlarm> alarm) {
-    std::lock_guard<std::mutex> lock(mLock);
-    if (alarm == nullptr) {
-        ALOGW("Asked to add a null alarm.");
-        return;
-    }
-    if (alarm->timestampSec < 1) {
-        // forbidden since a timestamp 0 is used to indicate no alarm registered
-        ALOGW("Asked to add a 0-time alarm.");
-        return;
-    }
-    // TODO(b/110563466): Ensure that refractory period is respected.
-    VLOG("Adding alarm with time %u", alarm->timestampSec);
-    mPq.push(alarm);
-    if (mRegisteredAlarmTimeSec < 1 ||
-        alarm->timestampSec + mMinUpdateTimeSec < mRegisteredAlarmTimeSec) {
-        updateRegisteredAlarmTime_l(alarm->timestampSec);
-    }
-}
-
-void AlarmMonitor::remove(sp<const InternalAlarm> alarm) {
-    std::lock_guard<std::mutex> lock(mLock);
-    if (alarm == nullptr) {
-        ALOGW("Asked to remove a null alarm.");
-        return;
-    }
-    VLOG("Removing alarm with time %u", alarm->timestampSec);
-    bool wasPresent = mPq.remove(alarm);
-    if (!wasPresent) return;
-    if (mPq.empty()) {
-        VLOG("Queue is empty. Cancel any alarm.");
-        cancelRegisteredAlarmTime_l();
-        return;
-    }
-    uint32_t soonestAlarmTimeSec = mPq.top()->timestampSec;
-    VLOG("Soonest alarm is %u", soonestAlarmTimeSec);
-    if (soonestAlarmTimeSec > mRegisteredAlarmTimeSec + mMinUpdateTimeSec) {
-        updateRegisteredAlarmTime_l(soonestAlarmTimeSec);
-    }
-}
-
-// More efficient than repeatedly calling remove(mPq.top()) since it batches the
-// updates to the registered alarm.
-unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> AlarmMonitor::popSoonerThan(
-        uint32_t timestampSec) {
-    VLOG("Removing alarms with time <= %u", timestampSec);
-    unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> oldAlarms;
-    std::lock_guard<std::mutex> lock(mLock);
-
-    for (sp<const InternalAlarm> t = mPq.top(); t != nullptr && t->timestampSec <= timestampSec;
-        t = mPq.top()) {
-        oldAlarms.insert(t);
-        mPq.pop();  // remove t
-    }
-    // Always update registered alarm time (if anything has changed).
-    if (!oldAlarms.empty()) {
-        if (mPq.empty()) {
-            VLOG("Queue is empty. Cancel any alarm.");
-            cancelRegisteredAlarmTime_l();
-        } else {
-            // Always update the registered alarm in this case (unlike remove()).
-            updateRegisteredAlarmTime_l(mPq.top()->timestampSec);
-        }
-    }
-    return oldAlarms;
-}
-
-void AlarmMonitor::updateRegisteredAlarmTime_l(uint32_t timestampSec) {
-    VLOG("Updating reg alarm time to %u", timestampSec);
-    mRegisteredAlarmTimeSec = timestampSec;
-    mUpdateAlarm(mStatsCompanionService, secToMs(mRegisteredAlarmTimeSec));
-}
-
-void AlarmMonitor::cancelRegisteredAlarmTime_l() {
-    VLOG("Cancelling reg alarm.");
-    mRegisteredAlarmTimeSec = 0;
-    mCancelAlarm(mStatsCompanionService);
-}
-
-int64_t AlarmMonitor::secToMs(uint32_t timeSec) {
-    return ((int64_t)timeSec) * 1000;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/AlarmMonitor.h b/cmds/statsd/src/anomaly/AlarmMonitor.h
deleted file mode 100644
index 5c34e38..0000000
--- a/cmds/statsd/src/anomaly/AlarmMonitor.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "anomaly/indexed_priority_queue.h"
-
-#include <aidl/android/os/IStatsCompanionService.h>
-#include <utils/RefBase.h>
-
-#include <unordered_set>
-#include <vector>
-
-using namespace android;
-
-using aidl::android::os::IStatsCompanionService;
-using std::function;
-using std::shared_ptr;
-using std::unordered_set;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * Represents an alarm, associated with some aggregate metric, holding a
- * projected time at which the metric is expected to exceed its anomaly
- * threshold.
- * Timestamps are in seconds since epoch in a uint32, so will fail in year 2106.
- */
-struct InternalAlarm : public RefBase {
-    explicit InternalAlarm(uint32_t timestampSec) : timestampSec(timestampSec) {
-    }
-
-    const uint32_t timestampSec;
-
-    /** InternalAlarm a is smaller (higher priority) than b if its timestamp is sooner. */
-    struct SmallerTimestamp {
-        bool operator()(sp<const InternalAlarm> a, sp<const InternalAlarm> b) const {
-            return (a->timestampSec < b->timestampSec);
-        }
-    };
-};
-
-/**
- * Manages internal alarms that may get registered with the AlarmManager.
- */
-class AlarmMonitor : public RefBase {
-public:
-    /**
-     * @param minDiffToUpdateRegisteredAlarmTimeSec If the soonest alarm differs
-     * from the registered alarm by more than this amount, update the registered
-     * alarm.
-     */
-    AlarmMonitor(uint32_t minDiffToUpdateRegisteredAlarmTimeSec,
-                 const function<void(const shared_ptr<IStatsCompanionService>&, int64_t)>&
-                         updateAlarm,
-                 const function<void(const shared_ptr<IStatsCompanionService>&)>& cancelAlarm);
-    ~AlarmMonitor();
-
-    /**
-     * Tells AnomalyMonitor what IStatsCompanionService to use and, if
-     * applicable, immediately registers an existing alarm with it.
-     * If nullptr, AnomalyMonitor will continue to add/remove alarms, but won't
-     * update IStatsCompanionService (until such time as it is set non-null).
-     */
-    void setStatsCompanionService(shared_ptr<IStatsCompanionService> statsCompanionService);
-
-    /**
-     * Adds the given alarm (reference) to the queue.
-     */
-    void add(sp<const InternalAlarm> alarm);
-
-    /**
-     * Removes the given alarm (reference) from the queue.
-     * Note that alarm comparison is reference-based; if another alarm exists
-     * with the same timestampSec, that alarm will still remain in the queue.
-     */
-    void remove(sp<const InternalAlarm> alarm);
-
-    /**
-     * Returns and removes all alarms whose timestamp <= the given timestampSec.
-     * Always updates the registered alarm if return is non-empty.
-     */
-    unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> popSoonerThan(
-            uint32_t timestampSec);
-
-    /**
-     * Returns the projected alarm timestamp that is registered with
-     * StatsCompanionService. This may not be equal to the soonest alarm,
-     * but should be within minDiffToUpdateRegisteredAlarmTimeSec of it.
-     */
-    uint32_t getRegisteredAlarmTimeSec() const {
-        return mRegisteredAlarmTimeSec;
-    }
-
-private:
-    std::mutex mLock;
-
-    /**
-     * Timestamp (seconds since epoch) of the alarm registered with
-     * StatsCompanionService. This, in general, may not be equal to the soonest
-     * alarm stored in mPq, but should be within minUpdateTimeSec of it.
-     * A value of 0 indicates that no alarm is currently registered.
-     */
-    uint32_t mRegisteredAlarmTimeSec;
-
-    /**
-     * Priority queue of alarms, prioritized by soonest alarm.timestampSec.
-     */
-    indexed_priority_queue<InternalAlarm, InternalAlarm::SmallerTimestamp> mPq;
-
-    /**
-     * Binder interface for communicating with StatsCompanionService.
-     */
-    shared_ptr<IStatsCompanionService> mStatsCompanionService = nullptr;
-
-    /**
-     * Amount by which the soonest projected alarm must differ from
-     * mRegisteredAlarmTimeSec before updateRegisteredAlarmTime_l is called.
-     */
-    uint32_t mMinUpdateTimeSec;
-
-    /**
-     * Updates the alarm registered with StatsCompanionService to the given time.
-     * Also correspondingly updates mRegisteredAlarmTimeSec.
-     */
-    void updateRegisteredAlarmTime_l(uint32_t timestampSec);
-
-    /**
-     * Cancels the alarm registered with StatsCompanionService.
-     * Also correspondingly sets mRegisteredAlarmTimeSec to 0.
-     */
-    void cancelRegisteredAlarmTime_l();
-
-    /** Converts uint32 timestamp in seconds to a Java long in msec. */
-    int64_t secToMs(uint32_t timeSec);
-
-    // Callback function to update the alarm via StatsCompanionService.
-    std::function<void(const shared_ptr<IStatsCompanionService>, int64_t)> mUpdateAlarm;
-
-    // Callback function to cancel the alarm via StatsCompanionService.
-    std::function<void(const shared_ptr<IStatsCompanionService>)> mCancelAlarm;
-
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/AlarmTracker.cpp b/cmds/statsd/src/anomaly/AlarmTracker.cpp
deleted file mode 100644
index 6d9beb8..0000000
--- a/cmds/statsd/src/anomaly/AlarmTracker.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "anomaly/AlarmTracker.h"
-#include "anomaly/subscriber_util.h"
-#include "HashableDimensionKey.h"
-#include "stats_util.h"
-#include "storage/StorageManager.h"
-
-#include <time.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-AlarmTracker::AlarmTracker(const int64_t startMillis,
-                           const int64_t currentMillis,
-                           const Alarm& alarm, const ConfigKey& configKey,
-                           const sp<AlarmMonitor>& alarmMonitor)
-    : mAlarmConfig(alarm),
-      mConfigKey(configKey),
-      mAlarmMonitor(alarmMonitor) {
-    VLOG("AlarmTracker() called");
-    mAlarmSec = (startMillis + mAlarmConfig.offset_millis()) / MS_PER_SEC;
-    // startMillis is the time statsd is created. We need to find the 1st alarm timestamp after
-    // the config is added to statsd.
-    mAlarmSec = findNextAlarmSec(currentMillis / MS_PER_SEC);  // round up
-    mInternalAlarm = new InternalAlarm{static_cast<uint32_t>(mAlarmSec)};
-    VLOG("AlarmTracker sets the periodic alarm at: %lld", (long long)mAlarmSec);
-    if (mAlarmMonitor != nullptr) {
-        mAlarmMonitor->add(mInternalAlarm);
-    }
-}
-
-AlarmTracker::~AlarmTracker() {
-    VLOG("~AlarmTracker() called");
-    if (mInternalAlarm != nullptr && mAlarmMonitor != nullptr) {
-        mAlarmMonitor->remove(mInternalAlarm);
-    }
-}
-
-void AlarmTracker::addSubscription(const Subscription& subscription) {
-    mSubscriptions.push_back(subscription);
-}
-
-int64_t AlarmTracker::findNextAlarmSec(int64_t currentTimeSec) {
-    if (currentTimeSec < mAlarmSec) {
-        return mAlarmSec;
-    }
-    int64_t periodsForward =
-        ((currentTimeSec - mAlarmSec) * MS_PER_SEC) / mAlarmConfig.period_millis() + 1;
-    return mAlarmSec + periodsForward * mAlarmConfig.period_millis() / MS_PER_SEC;
-}
-
-void AlarmTracker::informAlarmsFired(
-        const int64_t& timestampNs,
-        unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& firedAlarms) {
-    if (firedAlarms.empty() || mInternalAlarm == nullptr ||
-        firedAlarms.find(mInternalAlarm) == firedAlarms.end()) {
-        return;
-    }
-    if (!mSubscriptions.empty()) {
-        VLOG("AlarmTracker triggers the subscribers.");
-        triggerSubscribers(mAlarmConfig.id(), 0 /*metricId N/A*/, DEFAULT_METRIC_DIMENSION_KEY,
-                           0 /* metricValue N/A */, mConfigKey, mSubscriptions);
-    }
-    firedAlarms.erase(mInternalAlarm);
-    mAlarmSec = findNextAlarmSec((timestampNs-1) / NS_PER_SEC + 1); // round up
-    mInternalAlarm = new InternalAlarm{static_cast<uint32_t>(mAlarmSec)};
-    VLOG("AlarmTracker sets the periodic alarm at: %lld", (long long)mAlarmSec);
-    if (mAlarmMonitor != nullptr) {
-        mAlarmMonitor->add(mInternalAlarm);
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/AlarmTracker.h b/cmds/statsd/src/anomaly/AlarmTracker.h
deleted file mode 100644
index 2da4a186..0000000
--- a/cmds/statsd/src/anomaly/AlarmTracker.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <gtest/gtest_prod.h>
-
-#include "AlarmMonitor.h"
-#include "config/ConfigKey.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"  // Alarm
-
-#include <stdlib.h>
-#include <utils/RefBase.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class AlarmTracker : public virtual RefBase {
-public:
-    AlarmTracker(const int64_t startMillis,
-                 const int64_t currentMillis,
-                 const Alarm& alarm, const ConfigKey& configKey,
-                 const sp<AlarmMonitor>& subscriberAlarmMonitor);
-
-    virtual ~AlarmTracker();
-
-    void onAlarmFired();
-
-    void addSubscription(const Subscription& subscription);
-
-    void informAlarmsFired(const int64_t& timestampNs,
-            unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& firedAlarms);
-
-protected:
-    // For test only. Returns the alarm timestamp in seconds. Otherwise returns 0.
-    inline int32_t getAlarmTimestampSec() const {
-        return mInternalAlarm == nullptr ? 0 : mInternalAlarm->timestampSec;
-    }
-
-    int64_t findNextAlarmSec(int64_t currentTimeMillis);
-
-    // statsd_config.proto Alarm message that defines this tracker.
-    const Alarm mAlarmConfig;
-
-    // A reference to the Alarm's config key.
-    const ConfigKey mConfigKey;
-
-    // The subscriptions that depend on this alarm.
-    std::vector<Subscription> mSubscriptions;
-
-    // Alarm monitor.
-    sp<AlarmMonitor> mAlarmMonitor;
-
-    // The current expected alarm time in seconds.
-    int64_t mAlarmSec;
-
-    // The current alarm.
-    sp<const InternalAlarm> mInternalAlarm;
-
-    FRIEND_TEST(AlarmTrackerTest, TestTriggerTimestamp);
-    FRIEND_TEST(AlarmE2eTest, TestMultipleAlarms);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/AnomalyTracker.cpp b/cmds/statsd/src/anomaly/AnomalyTracker.cpp
deleted file mode 100644
index 619752c..0000000
--- a/cmds/statsd/src/anomaly/AnomalyTracker.cpp
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "AnomalyTracker.h"
-#include "external/Perfetto.h"
-#include "guardrail/StatsdStats.h"
-#include "metadata_util.h"
-#include "stats_log_util.h"
-#include "subscriber_util.h"
-#include "subscriber/IncidentdReporter.h"
-#include "subscriber/SubscriberReporter.h"
-
-#include <inttypes.h>
-#include <statslog_statsd.h>
-#include <time.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-AnomalyTracker::AnomalyTracker(const Alert& alert, const ConfigKey& configKey)
-        : mAlert(alert), mConfigKey(configKey), mNumOfPastBuckets(mAlert.num_buckets() - 1) {
-    VLOG("AnomalyTracker() called");
-    if (mAlert.num_buckets() <= 0) {
-        ALOGE("Cannot create AnomalyTracker with %lld buckets", (long long)mAlert.num_buckets());
-        return;
-    }
-    if (!mAlert.has_trigger_if_sum_gt()) {
-        ALOGE("Cannot create AnomalyTracker without threshold");
-        return;
-    }
-    resetStorage();  // initialization
-}
-
-AnomalyTracker::~AnomalyTracker() {
-    VLOG("~AnomalyTracker() called");
-}
-
-void AnomalyTracker::resetStorage() {
-    VLOG("resetStorage() called.");
-    mPastBuckets.clear();
-    // Excludes the current bucket.
-    mPastBuckets.resize(mNumOfPastBuckets);
-    mSumOverPastBuckets.clear();
-}
-
-size_t AnomalyTracker::index(int64_t bucketNum) const {
-    if (bucketNum < 0) {
-        ALOGE("index() was passed a negative bucket number (%lld)!", (long long)bucketNum);
-    }
-    return bucketNum % mNumOfPastBuckets;
-}
-
-void AnomalyTracker::advanceMostRecentBucketTo(const int64_t& bucketNum) {
-    VLOG("advanceMostRecentBucketTo() called.");
-    if (mNumOfPastBuckets <= 0) {
-        return;
-    }
-    if (bucketNum <= mMostRecentBucketNum) {
-        ALOGW("Cannot advance buckets backwards (bucketNum=%lld but mMostRecentBucketNum=%lld)",
-              (long long)bucketNum, (long long)mMostRecentBucketNum);
-        return;
-    }
-    // If in the future (i.e. buckets are ancient), just empty out all past info.
-    if (bucketNum >= mMostRecentBucketNum + mNumOfPastBuckets) {
-        resetStorage();
-        mMostRecentBucketNum = bucketNum;
-        return;
-    }
-
-    // Clear out space by emptying out old mPastBuckets[i] values and update mSumOverPastBuckets.
-    for (int64_t i = mMostRecentBucketNum + 1; i <= bucketNum; i++) {
-        const int idx = index(i);
-        subtractBucketFromSum(mPastBuckets[idx]);
-        mPastBuckets[idx] = nullptr;  // release (but not clear) the old bucket.
-    }
-    mMostRecentBucketNum = bucketNum;
-}
-
-void AnomalyTracker::addPastBucket(const MetricDimensionKey& key,
-                                   const int64_t& bucketValue,
-                                   const int64_t& bucketNum) {
-    VLOG("addPastBucket(bucketValue) called.");
-    if (mNumOfPastBuckets == 0 ||
-        bucketNum < 0 || bucketNum <= mMostRecentBucketNum - mNumOfPastBuckets) {
-        return;
-    }
-
-    const int bucketIndex = index(bucketNum);
-    if (bucketNum <= mMostRecentBucketNum && (mPastBuckets[bucketIndex] != nullptr)) {
-        // We need to insert into an already existing past bucket.
-        std::shared_ptr<DimToValMap>& bucket = mPastBuckets[bucketIndex];
-        auto itr = bucket->find(key);
-        if (itr != bucket->end()) {
-            // Old entry already exists; update it.
-            subtractValueFromSum(key, itr->second);
-            itr->second = bucketValue;
-        } else {
-            bucket->insert({key, bucketValue});
-        }
-        mSumOverPastBuckets[key] += bucketValue;
-    } else {
-        // Bucket does not exist yet (in future or was never made), so we must make it.
-        std::shared_ptr<DimToValMap> bucket = std::make_shared<DimToValMap>();
-        bucket->insert({key, bucketValue});
-        addPastBucket(bucket, bucketNum);
-    }
-}
-
-void AnomalyTracker::addPastBucket(std::shared_ptr<DimToValMap> bucket,
-                                   const int64_t& bucketNum) {
-    VLOG("addPastBucket(bucket) called.");
-    if (mNumOfPastBuckets == 0 ||
-            bucketNum < 0 || bucketNum <= mMostRecentBucketNum - mNumOfPastBuckets) {
-        return;
-    }
-
-    if (bucketNum <= mMostRecentBucketNum) {
-        // We are updating an old bucket, not adding a new one.
-        subtractBucketFromSum(mPastBuckets[index(bucketNum)]);
-    } else {
-        // Clear space for the new bucket to be at bucketNum.
-        advanceMostRecentBucketTo(bucketNum);
-    }
-    mPastBuckets[index(bucketNum)] = bucket;
-    addBucketToSum(bucket);
-}
-
-void AnomalyTracker::subtractBucketFromSum(const shared_ptr<DimToValMap>& bucket) {
-    if (bucket == nullptr) {
-        return;
-    }
-    for (const auto& keyValuePair : *bucket) {
-        subtractValueFromSum(keyValuePair.first, keyValuePair.second);
-    }
-}
-
-
-void AnomalyTracker::subtractValueFromSum(const MetricDimensionKey& key,
-                                          const int64_t& bucketValue) {
-    auto itr = mSumOverPastBuckets.find(key);
-    if (itr == mSumOverPastBuckets.end()) {
-        return;
-    }
-    itr->second -= bucketValue;
-    if (itr->second == 0) {
-        mSumOverPastBuckets.erase(itr);
-    }
-}
-
-void AnomalyTracker::addBucketToSum(const shared_ptr<DimToValMap>& bucket) {
-    if (bucket == nullptr) {
-        return;
-    }
-    // For each dimension present in the bucket, add its value to its corresponding sum.
-    for (const auto& keyValuePair : *bucket) {
-        mSumOverPastBuckets[keyValuePair.first] += keyValuePair.second;
-    }
-}
-
-int64_t AnomalyTracker::getPastBucketValue(const MetricDimensionKey& key,
-                                           const int64_t& bucketNum) const {
-    if (bucketNum < 0 || mMostRecentBucketNum < 0
-            || bucketNum <= mMostRecentBucketNum - mNumOfPastBuckets
-            || bucketNum > mMostRecentBucketNum) {
-        return 0;
-    }
-
-    const auto& bucket = mPastBuckets[index(bucketNum)];
-    if (bucket == nullptr) {
-        return 0;
-    }
-    const auto& itr = bucket->find(key);
-    return itr == bucket->end() ? 0 : itr->second;
-}
-
-int64_t AnomalyTracker::getSumOverPastBuckets(const MetricDimensionKey& key) const {
-    const auto& itr = mSumOverPastBuckets.find(key);
-    if (itr != mSumOverPastBuckets.end()) {
-        return itr->second;
-    }
-    return 0;
-}
-
-bool AnomalyTracker::detectAnomaly(const int64_t& currentBucketNum,
-                                   const MetricDimensionKey& key,
-                                   const int64_t& currentBucketValue) {
-
-    // currentBucketNum should be the next bucket after pastBuckets. If not, advance so that it is.
-    if (currentBucketNum > mMostRecentBucketNum + 1) {
-        advanceMostRecentBucketTo(currentBucketNum - 1);
-    }
-    return mAlert.has_trigger_if_sum_gt() &&
-           getSumOverPastBuckets(key) + currentBucketValue > mAlert.trigger_if_sum_gt();
-}
-
-void AnomalyTracker::declareAnomaly(const int64_t& timestampNs, int64_t metricId,
-                                    const MetricDimensionKey& key, int64_t metricValue) {
-    // TODO(b/110563466): Why receive timestamp? RefractoryPeriod should always be based on
-    // real time right now.
-    if (isInRefractoryPeriod(timestampNs, key)) {
-        VLOG("Skipping anomaly declaration since within refractory period");
-        return;
-    }
-    if (mAlert.has_refractory_period_secs()) {
-        mRefractoryPeriodEndsSec[key] = ((timestampNs + NS_PER_SEC - 1) / NS_PER_SEC) // round up
-                                        + mAlert.refractory_period_secs();
-        // TODO(b/110563466): If we had access to the bucket_size_millis, consider
-        // calling resetStorage()
-        // if (mAlert.refractory_period_secs() > mNumOfPastBuckets * bucketSizeNs) {resetStorage();}
-    }
-
-    if (!mSubscriptions.empty()) {
-        ALOGI("An anomaly (%" PRId64 ") %s has occurred! Informing subscribers.",
-                mAlert.id(), key.toString().c_str());
-        informSubscribers(key, metricId, metricValue);
-    } else {
-        ALOGI("An anomaly has occurred! (But no subscriber for that alert.)");
-    }
-
-    StatsdStats::getInstance().noteAnomalyDeclared(mConfigKey, mAlert.id());
-
-    // TODO(b/110564268): This should also take in the const MetricDimensionKey& key?
-    util::stats_write(util::ANOMALY_DETECTED, mConfigKey.GetUid(),
-                      mConfigKey.GetId(), mAlert.id());
-}
-
-void AnomalyTracker::detectAndDeclareAnomaly(const int64_t& timestampNs,
-                                             const int64_t& currBucketNum, int64_t metricId,
-                                             const MetricDimensionKey& key,
-                                             const int64_t& currentBucketValue) {
-    if (detectAnomaly(currBucketNum, key, currentBucketValue)) {
-        declareAnomaly(timestampNs, metricId, key, currentBucketValue);
-    }
-}
-
-bool AnomalyTracker::isInRefractoryPeriod(const int64_t& timestampNs,
-                                          const MetricDimensionKey& key) const {
-    const auto& it = mRefractoryPeriodEndsSec.find(key);
-    if (it != mRefractoryPeriodEndsSec.end()) {
-        return timestampNs < (it->second *  (int64_t)NS_PER_SEC);
-    }
-    return false;
-}
-
-void AnomalyTracker::informSubscribers(const MetricDimensionKey& key, int64_t metric_id,
-                                       int64_t metricValue) {
-    triggerSubscribers(mAlert.id(), metric_id, key, metricValue, mConfigKey, mSubscriptions);
-}
-
-bool AnomalyTracker::writeAlertMetadataToProto(int64_t currentWallClockTimeNs,
-                                               int64_t systemElapsedTimeNs,
-                                               metadata::AlertMetadata* alertMetadata) {
-    bool metadataWritten = false;
-
-    if (mRefractoryPeriodEndsSec.empty()) {
-        return false;
-    }
-
-    for (const auto& it: mRefractoryPeriodEndsSec) {
-        // Do not write the timestamp to disk if it has already expired
-        if (it.second < systemElapsedTimeNs / NS_PER_SEC) {
-            continue;
-        }
-
-        metadataWritten = true;
-        if (alertMetadata->alert_dim_keyed_data_size() == 0) {
-            alertMetadata->set_alert_id(mAlert.id());
-        }
-
-        metadata::AlertDimensionKeyedData* keyedData = alertMetadata->add_alert_dim_keyed_data();
-        // We convert and write the refractory_end_sec to wall clock time because we do not know
-        // when statsd will start again.
-        int32_t refractoryEndWallClockSec = (int32_t) ((currentWallClockTimeNs / NS_PER_SEC) +
-                (it.second - systemElapsedTimeNs / NS_PER_SEC));
-
-        keyedData->set_last_refractory_ends_sec(refractoryEndWallClockSec);
-        writeMetricDimensionKeyToMetadataDimensionKey(
-                it.first, keyedData->mutable_dimension_key());
-    }
-
-    return metadataWritten;
-}
-
-void AnomalyTracker::loadAlertMetadata(
-        const metadata::AlertMetadata& alertMetadata,
-        int64_t currentWallClockTimeNs,
-        int64_t systemElapsedTimeNs) {
-    for (const metadata::AlertDimensionKeyedData& keyedData :
-            alertMetadata.alert_dim_keyed_data()) {
-        if ((uint64_t) keyedData.last_refractory_ends_sec() < currentWallClockTimeNs / NS_PER_SEC) {
-            // Do not update the timestamp if it has already expired.
-            continue;
-        }
-        MetricDimensionKey metricKey = loadMetricDimensionKeyFromProto(
-                keyedData.dimension_key());
-        int32_t refractoryPeriodEndsSec = (int32_t) keyedData.last_refractory_ends_sec() -
-                currentWallClockTimeNs / NS_PER_SEC + systemElapsedTimeNs / NS_PER_SEC;
-        mRefractoryPeriodEndsSec[metricKey] = refractoryPeriodEndsSec;
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/AnomalyTracker.h b/cmds/statsd/src/anomaly/AnomalyTracker.h
deleted file mode 100644
index bf36a3b..0000000
--- a/cmds/statsd/src/anomaly/AnomalyTracker.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <stdlib.h>
-
-#include <gtest/gtest_prod.h>
-#include <utils/RefBase.h>
-
-#include "AlarmMonitor.h"
-#include "config/ConfigKey.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"  // Alert
-#include "frameworks/base/cmds/statsd/src/statsd_metadata.pb.h"  // AlertMetadata
-#include "stats_util.h"  // HashableDimensionKey and DimToValMap
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::shared_ptr;
-using std::unordered_map;
-
-// Does NOT allow negative values.
-class AnomalyTracker : public virtual RefBase {
-public:
-    AnomalyTracker(const Alert& alert, const ConfigKey& configKey);
-
-    virtual ~AnomalyTracker();
-
-    // Add subscriptions that depend on this alert.
-    void addSubscription(const Subscription& subscription) {
-        mSubscriptions.push_back(subscription);
-    }
-
-    // Adds a bucket for the given bucketNum (index starting at 0).
-    // If a bucket for bucketNum already exists, it will be replaced.
-    // Also, advances to bucketNum (if not in the past), effectively filling any intervening
-    // buckets with 0s.
-    void addPastBucket(std::shared_ptr<DimToValMap> bucket, const int64_t& bucketNum);
-
-    // Inserts (or replaces) the bucket entry for the given bucketNum at the given key to be the
-    // given bucketValue. If the bucket does not exist, it will be created.
-    // Also, advances to bucketNum (if not in the past), effectively filling any intervening
-    // buckets with 0s.
-    void addPastBucket(const MetricDimensionKey& key, const int64_t& bucketValue,
-                       const int64_t& bucketNum);
-
-    // Returns true if, based on past buckets plus the new currentBucketValue (which generally
-    // represents the partially-filled current bucket), an anomaly has happened.
-    // Also advances to currBucketNum-1.
-    bool detectAnomaly(const int64_t& currBucketNum, const MetricDimensionKey& key,
-                       const int64_t& currentBucketValue);
-
-    // Informs incidentd about the detected alert.
-    void declareAnomaly(const int64_t& timestampNs, int64_t metricId, const MetricDimensionKey& key,
-                        int64_t metricValue);
-
-    // Detects if, based on past buckets plus the new currentBucketValue (which generally
-    // represents the partially-filled current bucket), an anomaly has happened, and if so,
-    // declares an anomaly and informs relevant subscribers.
-    // Also advances to currBucketNum-1.
-    void detectAndDeclareAnomaly(const int64_t& timestampNs, const int64_t& currBucketNum,
-                                 int64_t metricId, const MetricDimensionKey& key,
-                                 const int64_t& currentBucketValue);
-
-    // Init the AlarmMonitor which is shared across anomaly trackers.
-    virtual void setAlarmMonitor(const sp<AlarmMonitor>& alarmMonitor) {
-        return; // Base AnomalyTracker class has no need for the AlarmMonitor.
-    }
-
-    // Returns the sum of all past bucket values for the given dimension key.
-    int64_t getSumOverPastBuckets(const MetricDimensionKey& key) const;
-
-    // Returns the value for a past bucket, or 0 if that bucket doesn't exist.
-    int64_t getPastBucketValue(const MetricDimensionKey& key, const int64_t& bucketNum) const;
-
-    // Returns the anomaly threshold set in the configuration.
-    inline int64_t getAnomalyThreshold() const {
-        return mAlert.trigger_if_sum_gt();
-    }
-
-    // Returns the refractory period ending timestamp (in seconds) for the given key.
-    // Before this moment, any detected anomaly will be ignored.
-    // If there is no stored refractory period ending timestamp, returns 0.
-    uint32_t getRefractoryPeriodEndsSec(const MetricDimensionKey& key) const {
-        const auto& it = mRefractoryPeriodEndsSec.find(key);
-        return it != mRefractoryPeriodEndsSec.end() ? it->second : 0;
-    }
-
-    // Returns the (constant) number of past buckets this anomaly tracker can store.
-    inline int getNumOfPastBuckets() const {
-        return mNumOfPastBuckets;
-    }
-
-    // Declares an anomaly for each alarm in firedAlarms that belongs to this AnomalyTracker,
-    // and removes it from firedAlarms. Does NOT remove the alarm from the AlarmMonitor.
-    virtual void informAlarmsFired(const int64_t& timestampNs,
-            unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& firedAlarms) {
-        return; // The base AnomalyTracker class doesn't have alarms.
-    }
-
-    // Writes metadata of the alert (refractory_period_end_sec) to AlertMetadata.
-    // Returns true if at least one element is written to alertMetadata.
-    bool writeAlertMetadataToProto(
-            int64_t currentWallClockTimeNs,
-            int64_t systemElapsedTimeNs, metadata::AlertMetadata* alertMetadata);
-
-    void loadAlertMetadata(
-            const metadata::AlertMetadata& alertMetadata,
-            int64_t currentWallClockTimeNs,
-            int64_t systemElapsedTimeNs);
-
-protected:
-    // For testing only.
-    // Returns the alarm timestamp in seconds for the query dimension if it exists. Otherwise
-    // returns 0.
-    virtual uint32_t getAlarmTimestampSec(const MetricDimensionKey& dimensionKey) const {
-        return 0;   // The base AnomalyTracker class doesn't have alarms.
-    }
-
-    // statsd_config.proto Alert message that defines this tracker.
-    const Alert mAlert;
-
-    // The subscriptions that depend on this alert.
-    std::vector<Subscription> mSubscriptions;
-
-    // A reference to the Alert's config key.
-    const ConfigKey mConfigKey;
-
-    // Number of past buckets. One less than the total number of buckets needed
-    // for the anomaly detection (since the current bucket is not in the past).
-    const int mNumOfPastBuckets;
-
-    // Values for each of the past mNumOfPastBuckets buckets. Always of size mNumOfPastBuckets.
-    // mPastBuckets[i] can be null, meaning that no data is present in that bucket.
-    std::vector<shared_ptr<DimToValMap>> mPastBuckets;
-
-    // Cached sum over all existing buckets in mPastBuckets.
-    // Its buckets never contain entries of 0.
-    DimToValMap mSumOverPastBuckets;
-
-    // The bucket number of the last added bucket.
-    int64_t mMostRecentBucketNum = -1;
-
-    // Map from each dimension to the timestamp that its refractory period (if this anomaly was
-    // declared for that dimension) ends, in seconds. From this moment and onwards, anomalies
-    // can be declared again.
-    // Entries may be, but are not guaranteed to be, removed after the period is finished.
-    unordered_map<MetricDimensionKey, uint32_t> mRefractoryPeriodEndsSec;
-
-    // Advances mMostRecentBucketNum to bucketNum, deleting any data that is now too old.
-    // Specifically, since it is now too old, removes the data for
-    //   [mMostRecentBucketNum - mNumOfPastBuckets + 1, bucketNum - mNumOfPastBuckets].
-    void advanceMostRecentBucketTo(const int64_t& bucketNum);
-
-    // Add the information in the given bucket to mSumOverPastBuckets.
-    void addBucketToSum(const shared_ptr<DimToValMap>& bucket);
-
-    // Subtract the information in the given bucket from mSumOverPastBuckets
-    // and remove any items with value 0.
-    void subtractBucketFromSum(const shared_ptr<DimToValMap>& bucket);
-
-    // From mSumOverPastBuckets[key], subtracts bucketValue, removing it if it is now 0.
-    void subtractValueFromSum(const MetricDimensionKey& key, const int64_t& bucketValue);
-
-    // Returns true if in the refractory period, else false.
-    bool isInRefractoryPeriod(const int64_t& timestampNs, const MetricDimensionKey& key) const;
-
-    // Calculates the corresponding bucket index within the circular array.
-    // Requires bucketNum >= 0.
-    size_t index(int64_t bucketNum) const;
-
-    // Resets all bucket data. For use when all the data gets stale.
-    virtual void resetStorage();
-
-    // Informs the subscribers (incidentd, perfetto, broadcasts, etc) that an anomaly has occurred.
-    void informSubscribers(const MetricDimensionKey& key, int64_t metricId, int64_t metricValue);
-
-    FRIEND_TEST(AnomalyTrackerTest, TestConsecutiveBuckets);
-    FRIEND_TEST(AnomalyTrackerTest, TestSparseBuckets);
-    FRIEND_TEST(GaugeMetricProducerTest, TestAnomalyDetection);
-    FRIEND_TEST(CountMetricProducerTest, TestAnomalyDetectionUnSliced);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_single_bucket);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_multiple_buckets);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_long_refractory_period);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/DurationAnomalyTracker.cpp b/cmds/statsd/src/anomaly/DurationAnomalyTracker.cpp
deleted file mode 100644
index 2b56810..0000000
--- a/cmds/statsd/src/anomaly/DurationAnomalyTracker.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "DurationAnomalyTracker.h"
-#include "guardrail/StatsdStats.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-DurationAnomalyTracker::DurationAnomalyTracker(const Alert& alert, const ConfigKey& configKey,
-                                               const sp<AlarmMonitor>& alarmMonitor)
-        : AnomalyTracker(alert, configKey), mAlarmMonitor(alarmMonitor) {
-    VLOG("DurationAnomalyTracker() called");
-}
-
-DurationAnomalyTracker::~DurationAnomalyTracker() {
-    VLOG("~DurationAnomalyTracker() called");
-    cancelAllAlarms();
-}
-
-void DurationAnomalyTracker::startAlarm(const MetricDimensionKey& dimensionKey,
-                                        const int64_t& timestampNs) {
-    // Alarms are stored in secs. Must round up, since if it fires early, it is ignored completely.
-    uint32_t timestampSec = static_cast<uint32_t>((timestampNs -1) / NS_PER_SEC) + 1; // round up
-    if (isInRefractoryPeriod(timestampNs, dimensionKey)) {
-        VLOG("Not setting anomaly alarm since it would fall in the refractory period.");
-        return;
-    }
-
-    auto itr = mAlarms.find(dimensionKey);
-    if (itr != mAlarms.end() && mAlarmMonitor != nullptr) {
-        mAlarmMonitor->remove(itr->second);
-    }
-
-    sp<const InternalAlarm> alarm = new InternalAlarm{timestampSec};
-    mAlarms[dimensionKey] = alarm;
-    if (mAlarmMonitor != nullptr) {
-        mAlarmMonitor->add(alarm);
-    }
-}
-
-void DurationAnomalyTracker::stopAlarm(const MetricDimensionKey& dimensionKey,
-                                       const int64_t& timestampNs) {
-    const auto itr = mAlarms.find(dimensionKey);
-    if (itr == mAlarms.end()) {
-        return;
-    }
-
-    // If the alarm is set in the past but hasn't fired yet (due to lag), catch it now.
-    if (itr->second != nullptr && timestampNs >= (int64_t)NS_PER_SEC * itr->second->timestampSec) {
-        declareAnomaly(timestampNs, mAlert.metric_id(), dimensionKey,
-                       mAlert.trigger_if_sum_gt() + (timestampNs / NS_PER_SEC) -
-                               itr->second->timestampSec);
-    }
-    if (mAlarmMonitor != nullptr) {
-        mAlarmMonitor->remove(itr->second);
-    }
-    mAlarms.erase(dimensionKey);
-}
-
-void DurationAnomalyTracker::cancelAllAlarms() {
-    if (mAlarmMonitor != nullptr) {
-        for (const auto& itr : mAlarms) {
-            mAlarmMonitor->remove(itr.second);
-        }
-    }
-    mAlarms.clear();
-}
-
-void DurationAnomalyTracker::informAlarmsFired(const int64_t& timestampNs,
-        unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& firedAlarms) {
-
-    if (firedAlarms.empty() || mAlarms.empty()) return;
-    // Find the intersection of firedAlarms and mAlarms.
-    // The for loop is inefficient, since it loops over all keys, but that's okay since it is very
-    // seldomly called. The alternative would be having InternalAlarms store information about the
-    // DurationAnomalyTracker and key, but that's a lot of data overhead to speed up something that
-    // is rarely ever called.
-    unordered_map<MetricDimensionKey, sp<const InternalAlarm>> matchedAlarms;
-    for (const auto& kv : mAlarms) {
-        if (firedAlarms.count(kv.second) > 0) {
-            matchedAlarms.insert({kv.first, kv.second});
-        }
-    }
-
-    // Now declare each of these alarms to have fired.
-    for (const auto& kv : matchedAlarms) {
-        declareAnomaly(
-                timestampNs, mAlert.metric_id(), kv.first,
-                mAlert.trigger_if_sum_gt() + (timestampNs / NS_PER_SEC) - kv.second->timestampSec);
-        mAlarms.erase(kv.first);
-        firedAlarms.erase(kv.second);  // No one else can also own it, so we're done with it.
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/DurationAnomalyTracker.h b/cmds/statsd/src/anomaly/DurationAnomalyTracker.h
deleted file mode 100644
index 686d8f9..0000000
--- a/cmds/statsd/src/anomaly/DurationAnomalyTracker.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "AlarmMonitor.h"
-#include "AnomalyTracker.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::unordered_map;
-
-class DurationAnomalyTracker : public virtual AnomalyTracker {
-public:
-    DurationAnomalyTracker(const Alert& alert, const ConfigKey& configKey,
-                           const sp<AlarmMonitor>& alarmMonitor);
-
-    virtual ~DurationAnomalyTracker();
-
-    // Sets an alarm for the given timestamp.
-    // Replaces previous alarm if one already exists.
-    void startAlarm(const MetricDimensionKey& dimensionKey, const int64_t& eventTime);
-
-    // Stops the alarm.
-    // If it should have already fired, but hasn't yet (e.g. because the AlarmManager is delayed),
-    // declare the anomaly now.
-    void stopAlarm(const MetricDimensionKey& dimensionKey, const int64_t& timestampNs);
-
-    // Stop all the alarms owned by this tracker. Does not declare any anomalies.
-    void cancelAllAlarms();
-
-    // Declares an anomaly for each alarm in firedAlarms that belongs to this DurationAnomalyTracker
-    // and removes it from firedAlarms. The AlarmMonitor is not informed.
-    // Note that this will generally be called from a different thread from the other functions;
-    // the caller is responsible for thread safety.
-    void informAlarmsFired(const int64_t& timestampNs,
-            unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& firedAlarms) override;
-
-protected:
-    // Returns the alarm timestamp in seconds for the query dimension if it exists. Otherwise
-    // returns 0.
-    uint32_t getAlarmTimestampSec(const MetricDimensionKey& dimensionKey) const override {
-        auto it = mAlarms.find(dimensionKey);
-        return it == mAlarms.end() ? 0 : it->second->timestampSec;
-    }
-
-    // The alarms owned by this tracker. The alarm monitor also shares the alarm pointers when they
-    // are still active.
-    std::unordered_map<MetricDimensionKey, sp<const InternalAlarm>> mAlarms;
-
-    // Anomaly alarm monitor.
-    sp<AlarmMonitor> mAlarmMonitor;
-
-    FRIEND_TEST(OringDurationTrackerTest, TestPredictAnomalyTimestamp);
-    FRIEND_TEST(OringDurationTrackerTest, TestAnomalyDetectionExpiredAlarm);
-    FRIEND_TEST(OringDurationTrackerTest, TestAnomalyDetectionFiredAlarm);
-    FRIEND_TEST(MaxDurationTrackerTest, TestAnomalyDetection);
-    FRIEND_TEST(MaxDurationTrackerTest, TestAnomalyPredictedTimestamp);
-    FRIEND_TEST(MaxDurationTrackerTest, TestAnomalyPredictedTimestamp_UpdatedOnStop);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/indexed_priority_queue.h b/cmds/statsd/src/anomaly/indexed_priority_queue.h
deleted file mode 100644
index 99882d0..0000000
--- a/cmds/statsd/src/anomaly/indexed_priority_queue.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <utils/RefBase.h>
-#include <unordered_map>
-#include <vector>
-
-using namespace android;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/** Defines a hash function for sp<const AA>, returning the hash of the underlying pointer. */
-template <class AA>
-struct SpHash {
-    size_t operator()(const sp<const AA>& k) const {
-        return std::hash<const AA*>()(k.get());
-    }
-};
-
-/**
- * Min priority queue for generic type AA.
- * Unlike a regular priority queue, this class is also capable of removing interior elements.
- * @tparam Comparator must implement [bool operator()(sp<const AA> a, sp<const AA> b)], returning
- *    whether a should be closer to the top of the queue than b.
- */
-template <class AA, class Comparator>
-class indexed_priority_queue {
-public:
-    indexed_priority_queue();
-    /** Adds a into the priority queue. If already present or a==nullptr, does nothing. */
-    void push(sp<const AA> a);
-    /*
-     * Removes a from the priority queue. If not present or a==nullptr, does nothing.
-     * Returns true if a had been present (and is now removed), else false.
-     */
-    bool remove(sp<const AA> a);
-    /** Removes the top element, if there is one. */
-    void pop();
-    /** Removes all elements. */
-    void clear();
-    /** Returns whether priority queue contains a (not just a copy of a, but a itself). */
-    bool contains(sp<const AA> a) const;
-    /** Returns min element. Returns nullptr iff empty(). */
-    sp<const AA> top() const;
-    /** Returns number of elements in priority queue. */
-    size_t size() const {
-        return pq.size() - 1;
-    }  // pq is 1-indexed
-    /** Returns true iff priority queue is empty. */
-    bool empty() const {
-        return size() < 1;
-    }
-
-private:
-    /** Vector representing a min-heap (1-indexed, with nullptr at 0). */
-    std::vector<sp<const AA>> pq;
-    /** Mapping of each element in pq to its index in pq (i.e. the inverse of a=pq[i]). */
-    std::unordered_map<sp<const AA>, size_t, SpHash<AA>> indices;
-
-    void init();
-    void sift_up(size_t idx);
-    void sift_down(size_t idx);
-    /** Returns whether pq[idx1] is considered higher than pq[idx2], according to Comparator. */
-    bool higher(size_t idx1, size_t idx2) const;
-    void swap_indices(size_t i, size_t j);
-};
-
-// Implementation must be done in this file due to use of template.
-
-template <class AA, class Comparator>
-indexed_priority_queue<AA, Comparator>::indexed_priority_queue() {
-    init();
-}
-
-template <class AA, class Comparator>
-void indexed_priority_queue<AA, Comparator>::push(sp<const AA> a) {
-    if (a == nullptr) return;
-    if (contains(a)) return;
-    pq.push_back(a);
-    size_t idx = size();  // index of last element since 1-indexed
-    indices.insert({a, idx});
-    sift_up(idx);  // get the pq back in order
-}
-
-template <class AA, class Comparator>
-bool indexed_priority_queue<AA, Comparator>::remove(sp<const AA> a) {
-    if (a == nullptr) return false;
-    if (!contains(a)) return false;
-    size_t idx = indices[a];
-    if (idx >= pq.size()) {
-        return false;
-    }
-    if (idx == size()) {  // if a is the last element, i.e. at index idx == size() == (pq.size()-1)
-        pq.pop_back();
-        indices.erase(a);
-        return true;
-    }
-    // move last element (guaranteed not to be at idx) to idx, then delete a
-    sp<const AA> last_a = pq.back();
-    pq[idx] = last_a;
-    pq.pop_back();
-    indices[last_a] = idx;
-    indices.erase(a);
-
-    // get the heap back in order (since the element at idx is not in order)
-    sift_up(idx);
-    sift_down(idx);
-
-    return true;
-}
-
-// The same as, but slightly more efficient than, remove(top()).
-template <class AA, class Comparator>
-void indexed_priority_queue<AA, Comparator>::pop() {
-    sp<const AA> a = top();
-    if (a == nullptr) return;
-    const size_t idx = 1;
-    if (idx == size()) {  // if a is the last element
-        pq.pop_back();
-        indices.erase(a);
-        return;
-    }
-    // move last element (guaranteed not to be at idx) to idx, then delete a
-    sp<const AA> last_a = pq.back();
-    pq[idx] = last_a;
-    pq.pop_back();
-    indices[last_a] = idx;
-    indices.erase(a);
-
-    // get the heap back in order (since the element at idx is not in order)
-    sift_down(idx);
-}
-
-template <class AA, class Comparator>
-void indexed_priority_queue<AA, Comparator>::clear() {
-    pq.clear();
-    indices.clear();
-    init();
-}
-
-template <class AA, class Comparator>
-sp<const AA> indexed_priority_queue<AA, Comparator>::top() const {
-    if (empty()) return nullptr;
-    return pq[1];
-}
-
-template <class AA, class Comparator>
-void indexed_priority_queue<AA, Comparator>::init() {
-    pq.push_back(nullptr);         // so that pq is 1-indexed.
-    indices.insert({nullptr, 0});  // just to be consistent with pq.
-}
-
-template <class AA, class Comparator>
-void indexed_priority_queue<AA, Comparator>::sift_up(size_t idx) {
-    while (idx > 1) {
-        size_t parent = idx / 2;
-        if (higher(idx, parent))
-            swap_indices(idx, parent);
-        else
-            break;
-        idx = parent;
-    }
-}
-
-template <class AA, class Comparator>
-void indexed_priority_queue<AA, Comparator>::sift_down(size_t idx) {
-    while (2 * idx <= size()) {
-        size_t child = 2 * idx;
-        if (child < size() && higher(child + 1, child)) child++;
-        if (higher(child, idx))
-            swap_indices(child, idx);
-        else
-            break;
-        idx = child;
-    }
-}
-
-template <class AA, class Comparator>
-bool indexed_priority_queue<AA, Comparator>::higher(size_t idx1, size_t idx2) const {
-    if (!(0u < idx1 && idx1 < pq.size() && 0u < idx2 && idx2 < pq.size())) {
-        return false;  // got to do something.
-    }
-    return Comparator()(pq[idx1], pq[idx2]);
-}
-
-template <class AA, class Comparator>
-bool indexed_priority_queue<AA, Comparator>::contains(sp<const AA> a) const {
-    if (a == nullptr) return false;  // publicly, we pretend that nullptr is not actually in pq.
-    return indices.count(a) > 0;
-}
-
-template <class AA, class Comparator>
-void indexed_priority_queue<AA, Comparator>::swap_indices(size_t i, size_t j) {
-    if (!(0u < i && i < pq.size() && 0u < j && j < pq.size())) {
-        return;
-    }
-    sp<const AA> val_i = pq[i];
-    sp<const AA> val_j = pq[j];
-    pq[i] = val_j;
-    pq[j] = val_i;
-    indices[val_i] = j;
-    indices[val_j] = i;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/subscriber_util.cpp b/cmds/statsd/src/anomaly/subscriber_util.cpp
deleted file mode 100644
index 5a4a41d..0000000
--- a/cmds/statsd/src/anomaly/subscriber_util.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "external/Perfetto.h"
-#include "subscriber/IncidentdReporter.h"
-#include "subscriber/SubscriberReporter.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-void triggerSubscribers(int64_t ruleId, int64_t metricId, const MetricDimensionKey& dimensionKey,
-                        int64_t metricValue, const ConfigKey& configKey,
-                        const std::vector<Subscription>& subscriptions) {
-    VLOG("informSubscribers called.");
-    if (subscriptions.empty()) {
-        VLOG("No Subscriptions were associated.");
-        return;
-    }
-
-    for (const Subscription& subscription : subscriptions) {
-        if (subscription.probability_of_informing() < 1
-                && ((float)rand() / (float)RAND_MAX) >= subscription.probability_of_informing()) {
-            // Note that due to float imprecision, 0.0 and 1.0 might not truly mean never/always.
-            // The config writer was advised to use -0.1 and 1.1 for never/always.
-            ALOGI("Fate decided that a subscriber would not be informed.");
-            continue;
-        }
-        switch (subscription.subscriber_information_case()) {
-            case Subscription::SubscriberInformationCase::kIncidentdDetails:
-                if (!GenerateIncidentReport(subscription.incidentd_details(), ruleId, metricId,
-                                            dimensionKey, metricValue, configKey)) {
-                    ALOGW("Failed to generate incident report.");
-                }
-                break;
-            case Subscription::SubscriberInformationCase::kPerfettoDetails:
-                if (!CollectPerfettoTraceAndUploadToDropbox(subscription.perfetto_details(),
-                                                            subscription.id(), ruleId, configKey)) {
-                    ALOGW("Failed to generate perfetto traces.");
-                }
-                break;
-            case Subscription::SubscriberInformationCase::kBroadcastSubscriberDetails:
-                SubscriberReporter::getInstance().alertBroadcastSubscriber(configKey, subscription,
-                                                                           dimensionKey);
-                break;
-            default:
-                break;
-        }
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/anomaly/subscriber_util.h b/cmds/statsd/src/anomaly/subscriber_util.h
deleted file mode 100644
index 1df3c89..0000000
--- a/cmds/statsd/src/anomaly/subscriber_util.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "config/ConfigKey.h"
-#include "HashableDimensionKey.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-void triggerSubscribers(const int64_t ruleId, const int64_t metricId,
-                        const MetricDimensionKey& dimensionKey, int64_t metricValue,
-                        const ConfigKey& configKey, const std::vector<Subscription>& subscriptions);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/atom_field_options.proto b/cmds/statsd/src/atom_field_options.proto
deleted file mode 100644
index ff5717e..0000000
--- a/cmds/statsd/src/atom_field_options.proto
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-option java_package = "com.android.os";
-option java_multiple_files = true;
-option java_outer_classname = "AtomFieldOptions";
-
-import "google/protobuf/descriptor.proto";
-
-// Used to annotate an atom that represents a state change. A state change atom must have exactly
-// ONE exclusive state field, and any number of primary key fields. For example, message
-// UidProcessStateChanged {
-//    optional int32 uid = 1 [(state_field_option).primary_field = true];
-//    optional android.app.ProcessStateEnum state =
-//            2 [(state_field_option).exclusive_state = true];
-//  }
-// Each UidProcessStateChanged atom event represents a state change for a specific uid.
-// A new state automatically overrides the previous state.
-//
-// If the atom has 2 or more primary fields, it means the combination of the
-// primary fields are the primary key.
-// For example:
-// message ThreadStateChanged {
-//    optional int32 pid = 1  [(state_field_option).primary_field = true];
-//    optional int32 tid = 2  [(state_field_option).primary_field = true];
-//    optional int32 state = 3 [(state_field_option).exclusive_state = true];
-// }
-//
-// Sometimes, there is no primary key field, when the state is GLOBAL.
-// For example,
-// message ScreenStateChanged {
-//    optional android.view.DisplayStateEnum state =
-//          1 [(state_field_option).exclusive_state = true];
-// }
-//
-// For state atoms with attribution chain, sometimes the primary key is the first uid in the chain.
-// For example:
-// message AudioStateChanged {
-//   repeated AttributionNode attribution_node = 1
-//       [(stateFieldOption).primary_field_first_uid = true];
-//
-//    enum State {
-//      OFF = 0;
-//      ON = 1;
-//      // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
-//      RESET = 2;
-//    }
-//    optional State state = 2 [(stateFieldOption).exclusive_state = true];
-// }
-message StateAtomFieldOption {
-    // Fields that represent the key that the state belongs to.
-    // Used on simple proto fields. Do not use on attribution chains.
-    optional bool primary_field = 1 [default = false];
-
-    // The field that represents the state. It's an exclusive state.
-    optional bool exclusive_state = 2 [default = false];
-
-    // Used on an attribution chain field to indicate that the first uid is the
-    // primary field.
-    optional bool primary_field_first_uid = 3 [default = false];
-
-    // Note: We cannot annotate directly on the enums because many enums are imported from other
-    // proto files in the platform. proto-lite cc library does not support annotations unfortunately
-
-    // Knowing the default state value allows state trackers to remove entries that become the
-    // default state. If there is no default value specified, the default value is unknown, and all
-    // states will be tracked in memory.
-    optional int32 default_state_value = 4;
-
-    // A reset state signals all states go to default value. For example, BLE reset means all active
-    // BLE scans are to be turned off.
-    optional int32 trigger_state_reset_value = 5;
-
-    // If the state change needs to count nesting.
-    optional bool nested = 6 [default = true];
-}
-
-// Used to generate StatsLog.write APIs.
-enum LogMode {
-    MODE_UNSET = 0;
-    // Log fields as their actual types e.g., all primary data types.
-    // Or fields that are hardcoded in stats_log_api_gen tool e.g., AttributionNode
-    MODE_AUTOMATIC = 1;
-    // Log fields in their proto binary format. These fields will not be parsed in statsd
-    MODE_BYTES = 2;
-}
-
-extend google.protobuf.FieldOptions {
-    // Flags to decorate an atom that presents a state change.
-    optional StateAtomFieldOption state_field_option = 50000;
-
-    // Flags to decorate the uid fields in an atom.
-    optional bool is_uid = 50001 [default = false];
-
-    optional LogMode log_mode = 50002 [default = MODE_AUTOMATIC];
-
-    repeated string module = 50004;
-
-    optional bool truncate_timestamp = 50005 [default = false];
-}
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
deleted file mode 100644
index cca6299..0000000
--- a/cmds/statsd/src/atoms.proto
+++ /dev/null
@@ -1,11217 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-option java_package = "com.android.os";
-option java_outer_classname = "AtomsProto";
-
-import "frameworks/base/cmds/statsd/src/atom_field_options.proto";
-import "frameworks/base/core/proto/android/app/enums.proto";
-import "frameworks/base/core/proto/android/app/job/enums.proto";
-import "frameworks/base/core/proto/android/app/settings_enums.proto";
-import "frameworks/base/core/proto/android/app/media_output_enum.proto";
-import "frameworks/base/core/proto/android/app/tvsettings_enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto";
-import "frameworks/base/core/proto/android/debug/enums.proto";
-import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto";
-import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto";
-import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
-import "frameworks/base/core/proto/android/os/enums.proto";
-import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto";
-import "frameworks/base/core/proto/android/server/enums.proto";
-import "frameworks/base/core/proto/android/server/job/enums.proto";
-import "frameworks/base/core/proto/android/server/location/enums.proto";
-import "frameworks/base/core/proto/android/service/procstats_enum.proto";
-import "frameworks/base/core/proto/android/service/usb.proto";
-import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto";
-import "frameworks/base/core/proto/android/stats/connectivity/tethering.proto";
-import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto";
-import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
-import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto";
-import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
-import "frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto";
-import "frameworks/base/core/proto/android/stats/enums.proto";
-import "frameworks/base/core/proto/android/stats/intelligence/enums.proto";
-import "frameworks/base/core/proto/android/stats/launcher/launcher.proto";
-import "frameworks/base/core/proto/android/stats/location/location_enums.proto";
-import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto";
-import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto";
-import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto";
-import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
-import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto";
-import "frameworks/base/core/proto/android/stats/tls/enums.proto";
-import "frameworks/base/core/proto/android/telecomm/enums.proto";
-import "frameworks/base/core/proto/android/telephony/enums.proto";
-import "frameworks/base/core/proto/android/view/enums.proto";
-import "frameworks/base/core/proto/android/wifi/enums.proto";
-import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto";
-import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto";
-
-/**
- * The primary atom class. This message defines all of the available
- * raw stats log events from the Android system, also known as "atoms."
- *
- * This field contains a single oneof with all of the available messages.
- * The stats-log-api-gen tool runs as part of the Android build and
- * generates the android.util.StatsLog class, which contains the constants
- * and methods that Android uses to log.
- *
- * This Atom class is not actually built into the Android system.
- * Instead, statsd on Android constructs these messages synthetically,
- * in the format defined here and in stats_log.proto.
- */
-message Atom {
-    // Pushed atoms start at 2.
-    oneof pushed {
-        // For StatsLog reasons, 1 is illegal and will not work. Must start at 2.
-        BleScanStateChanged ble_scan_state_changed = 2
-                [(module) = "bluetooth", (module) = "statsdtest"];
-        ProcessStateChanged process_state_changed = 3 [(module) = "framework"];
-        BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"];
-        SensorStateChanged sensor_state_changed =
-                5 [(module) = "framework", (module) = "statsdtest"];
-        GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"];
-        SyncStateChanged sync_state_changed = 7 [(module) = "framework", (module) = "statsdtest"];
-        ScheduledJobStateChanged scheduled_job_state_changed =
-                8 [(module) = "framework", (module) = "statsdtest"];
-        ScreenBrightnessChanged screen_brightness_changed =
-                9 [(module) = "framework", (module) = "statsdtest"];
-        WakelockStateChanged wakelock_state_changed =
-                10 [(module) = "framework", (module) = "statsdtest"];
-        LongPartialWakelockStateChanged long_partial_wakelock_state_changed =
-                11 [(module) = "framework"];
-        MobileRadioPowerStateChanged mobile_radio_power_state_changed =
-                12 [(module) = "framework", (truncate_timestamp) = true];
-        WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"];
-        ActivityManagerSleepStateChanged activity_manager_sleep_state_changed =
-                14 [(module) = "framework"];
-        MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"];
-        ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"];
-        CachedKillReported cached_kill_reported = 17 [(module) = "framework"];
-        ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"];
-        LauncherUIChanged launcher_event = 19 [(module) = "sysui"];
-        BatterySaverModeStateChanged battery_saver_mode_state_changed =
-                20 [(module) = "framework", (module) = "statsdtest"];
-        DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"];
-        DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"];
-        AudioStateChanged audio_state_changed =
-                23 [(module) = "framework", (truncate_timestamp) = true];
-        MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"];
-        CameraStateChanged camera_state_changed = 25 [(module) = "framework"];
-        FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"];
-        UidProcessStateChanged uid_process_state_changed =
-                27 [(module) = "framework", (module) = "statsdtest"];
-        ProcessLifeCycleStateChanged process_life_cycle_state_changed =
-                28 [(module) = "framework", (module) = "statsdtest"];
-        ScreenStateChanged screen_state_changed =
-                29 [(module) = "framework", (module) = "statsdtest"];
-        BatteryLevelChanged battery_level_changed =
-                30 [(module) = "framework", (module) = "statsdtest"];
-        ChargingStateChanged charging_state_changed = 31 [(module) = "framework"];
-        PluggedStateChanged plugged_state_changed = 32
-                [(module) = "framework", (module) = "statsdtest"];
-        InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"];
-        TouchEventReported touch_event_reported = 34;
-        WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"];
-        KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"];
-        WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"];
-        WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"];
-        WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"];
-        PhoneSignalStrengthChanged phone_signal_strength_changed =
-                40 [(module) = "framework", (truncate_timestamp) = true];
-        SettingChanged setting_changed = 41 [(module) = "framework"];
-        ActivityForegroundStateChanged activity_foreground_state_changed =
-                42 [(module) = "framework", (module) = "statsdtest"];
-        IsolatedUidChanged isolated_uid_changed =
-                43 [(module) = "framework", (module) = "statsd", (module) = "statsdtest"];
-        PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"];
-        WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"];
-        AnomalyDetected anomaly_detected = 46 [(module) = "statsd"];
-        AppBreadcrumbReported app_breadcrumb_reported = 47 [(module) = "statsd"];
-        AppStartOccurred app_start_occurred = 48 [(module) = "framework", (module) = "statsdtest"];
-        AppStartCanceled app_start_canceled = 49 [(module) = "framework"];
-        AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"];
-        LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"];
-        PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"];
-        WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"];
-        LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"];
-        AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"];
-        ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"];
-        BootSequenceReported boot_sequence_reported = 57;
-        DaveyOccurred davey_occurred = 58 [(module) = "statsd"];
-        OverlayStateChanged overlay_state_changed =
-                59 [(module) = "framework", (module) = "statsdtest"];
-        ForegroundServiceStateChanged foreground_service_state_changed
-                = 60 [(module) = "framework"];
-        CallStateChanged call_state_changed =
-                61 [(module) = "telecom", (truncate_timestamp) = true];
-        KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"];
-        KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"];
-        KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"];
-        AppDied app_died = 65 [(module) = "framework"];
-        ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"];
-        BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"];
-        BluetoothConnectionStateChanged bluetooth_connection_state_changed =
-                68 [(module) = "bluetooth"];
-        GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"];
-        UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"];
-        SpeakerImpedanceReported speaker_impedance_reported = 71;
-        HardwareFailed hardware_failed = 72;
-        PhysicalDropDetected physical_drop_detected = 73;
-        ChargeCyclesReported charge_cycles_reported = 74;
-        MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"];
-        MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"];
-        UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"];
-        AppCrashOccurred app_crash_occurred = 78 [(module) = "framework", (module) = "statsdtest"];
-        ANROccurred anr_occurred = 79 [(module) = "framework"];
-        WTFOccurred wtf_occurred = 80 [(module) = "framework"];
-        LowMemReported low_mem_reported = 81 [(module) = "framework"];
-        GenericAtom generic_atom = 82;
-        KeyValuePairsAtom key_value_pairs_atom = 83 [(module) = "framework", (module) = "statsd"];
-        VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"];
-        DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"];
-        ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
-        BiometricAcquired biometric_acquired = 87 [(module) = "framework"];
-        BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"];
-        BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"];
-        UiEventReported ui_event_reported = 90 [(module) = "framework", (module) = "sysui"];
-        BatteryHealthSnapshot battery_health_snapshot = 91;
-        SlowIo slow_io = 92;
-        BatteryCausedShutdown battery_caused_shutdown = 93;
-        PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"];
-        PhoneStateChanged phone_state_changed = 95 [(module) = "framework"];
-        UserRestrictionChanged user_restriction_changed = 96;
-        SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"];
-        ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"];
-        // TODO: service state change is very noisy shortly after boot, as well
-        // as at other transitions - coming out of doze, device plugged in, etc.
-        // Consider removing this if it becomes a problem
-        ServiceStateChanged service_state_changed = 99 [(module) = "framework"];
-        ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"];
-        FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"];
-        BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"];
-        DevicePolicyEvent device_policy_event = 103 [(module) = "framework"];
-        DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"];
-        DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported =
-            105 [(module) = "docsui"];
-        DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"];
-        DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"];
-        DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request =
-            108 [(module) = "docsui"];
-        DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"];
-        DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"];
-        DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"];
-        DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"];
-        WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"];
-        WifiRunningStateChanged wifi_running_state_changed = 114
-                [(module) = "framework", deprecated = true];
-        AppCompacted app_compacted = 115 [(module) = "framework"];
-        NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"];
-        DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported =
-            117 [(module) = "docsui"];
-        DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"];
-        DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"];
-        DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"];
-        DataStallEvent data_stall_event = 121 [(module) = "network_stack"];
-        RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"];
-        SignedConfigReported signed_config_reported = 123 [(module) = "framework"];
-        GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"];
-        BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event =
-                125 [(module) = "bluetooth"];
-        BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed =
-                126 [(module) = "bluetooth"];
-        BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed =
-                127 [(module) = "bluetooth"];
-        AppDowngraded app_downgraded = 128 [(module) = "framework"];
-        AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129;
-        LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"];
-        GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"];
-        GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"];
-        UsbPortOverheatEvent usb_port_overheat_event_reported = 133;
-        NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"];
-        NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"];
-        NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"];
-        NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"];
-        NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"];
-        NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"];
-        SeStateChanged se_state_changed = 140 [(module) = "secure_element"];
-        SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"];
-        BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported =
-                142 [(module) = "framework"];
-        AttentionManagerServiceResultReported attention_manager_service_result_reported =
-                143 [(module) = "framework"];
-        AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"];
-        SpeechDspStatReported speech_dsp_stat_reported = 145;
-        UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"];
-        WatchdogRollbackOccurred watchdog_rollback_occurred =
-                147 [(module) = "framework", (module) = "statsd"];
-        BiometricSystemHealthIssueDetected biometric_system_health_issue_detected =
-                148 [(module) = "framework"];
-        BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"];
-        ScheduledJobConstraintChanged scheduled_job_constraint_changed =
-                150 [(module) = "framework"];
-        BluetoothActiveDeviceChanged bluetooth_active_device_changed =
-                151 [(module) = "bluetooth"];
-        BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed =
-                152 [(module) = "bluetooth"];
-        BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed =
-                153 [(module) = "bluetooth"];
-        BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed =
-                154 [(module) = "bluetooth"];
-        BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported =
-                155 [(module) = "bluetooth"];
-        BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported =
-                156 [(module) = "bluetooth"];
-        BluetoothDeviceRssiReported bluetooth_device_rssi_reported =
-                157 [(module) = "bluetooth"];
-        BluetoothDeviceFailedContactCounterReported
-                bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"];
-        BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported =
-                159 [(module) = "bluetooth"];
-        BluetoothHciTimeoutReported bluetooth_hci_timeout_reported =
-                160 [(module) = "bluetooth"];
-        BluetoothQualityReportReported bluetooth_quality_report_reported =
-                161 [(module) = "bluetooth"];
-        BluetoothDeviceInfoReported bluetooth_device_info_reported =
-                162 [(module) = "bluetooth"];
-        BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported =
-                163 [(module) = "bluetooth"];
-        BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported =
-                164 [(module) = "bluetooth"];
-        BluetoothBondStateChanged bluetooth_bond_state_changed =
-                165 [(module) = "bluetooth"];
-        BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported =
-                166 [(module) = "bluetooth"];
-        BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported =
-                167 [(module) = "bluetooth"];
-        ScreenTimeoutExtensionReported screen_timeout_extension_reported =
-                168 [(module) = "framework"];
-        ProcessStartTime process_start_time = 169 [(module) = "framework"];
-        PermissionGrantRequestResultReported permission_grant_request_result_reported =
-                170 [(module) = "permissioncontroller"];
-        BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
-        DeviceIdentifierAccessDenied device_identifier_access_denied =
-                172 [(module) = "telephony_common"];
-        BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"];
-        AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"];
-        AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"];
-        AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"];
-        TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"];
-        HiddenApiUsed hidden_api_used = 178 [(module) = "framework"];
-        StyleUIChanged style_ui_changed = 179 [(module) = "sysui"];
-        PrivacyIndicatorsInteracted privacy_indicators_interacted =
-                180 [(module) = "permissioncontroller"];
-        AppInstallOnExternalStorageReported app_install_on_external_storage_reported =
-                181 [(module) = "framework"];
-        NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"];
-        AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"];
-        BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"];
-        SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"];
-        TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"];
-        BluetoothClassOfDeviceReported bluetooth_class_of_device_reported =
-                187 [(module) = "bluetooth"];
-        IntelligenceEventReported intelligence_event_reported =
-                188 [(module) = "intelligence"];
-        ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed =
-                189 [(module) = "framework"];
-        RoleRequestResultReported role_request_result_reported =
-                190 [(module) = "permissioncontroller"];
-        MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191;
-        MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192;
-        MediametricsAudiothreadReported mediametrics_audiothread_reported = 193;
-        MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194;
-        MediametricsCodecReported mediametrics_codec_reported = 195;
-        MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196;
-        MediametricsExtractorReported mediametrics_extractor_reported = 197;
-        MediametricsMediadrmReported mediametrics_mediadrm_reported = 198;
-        MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
-        MediametricsRecorderReported mediametrics_recorder_reported = 200;
-        MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201;
-        CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"];
-        GarageModeInfo garage_mode_info = 204 [(module) = "car"];
-        TestAtomReported test_atom_reported = 205 [(module) = "cts"];
-        ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported =
-                206 [(module) = "framework"];
-        ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"];
-        ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"];
-        ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"];
-        LocationManagerApiUsageReported location_manager_api_usage_reported =
-                210 [(module) = "framework"];
-        ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported =
-                211 [(module) = "permissioncontroller"];
-        RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result =
-                212 [(module) = "permissioncontroller"];
-        GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions =
-                213 [(module) = "permissioncontroller"];
-        LocationAccessCheckNotificationAction location_access_check_notification_action =
-                214 [(module) = "permissioncontroller"];
-        AppPermissionFragmentActionReported app_permission_fragment_action_reported =
-                215 [(module) = "permissioncontroller"];
-        AppPermissionFragmentViewed app_permission_fragment_viewed =
-                216 [(module) = "permissioncontroller"];
-        AppPermissionsFragmentViewed app_permissions_fragment_viewed =
-                217 [(module) = "permissioncontroller"];
-        PermissionAppsFragmentViewed permission_apps_fragment_viewed =
-                218  [(module) = "permissioncontroller"];
-        TextSelectionEvent text_selection_event = 219  [(module) = "textclassifier"];
-        TextLinkifyEvent text_linkify_event = 220  [(module) = "textclassifier"];
-        ConversationActionsEvent conversation_actions_event = 221  [(module) = "textclassifier"];
-        LanguageDetectionEvent language_detection_event = 222  [(module) = "textclassifier"];
-        ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"];
-        BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"];
-        UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225;
-        UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226;
-        CameraActionEvent camera_action_event = 227 [(module) = "framework"];
-        AppCompatibilityChangeReported app_compatibility_change_reported =
-                228 [(module) = "framework"];
-        PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"];
-        VmsClientConnectionStateChanged vms_client_connection_state_changed =
-                230 [(module) = "car"];
-        MediaProviderScanOccurred media_provider_scan_occurred = 233 [(module) = "mediaprovider"];
-        MediaContentDeleted media_content_deleted = 234 [(module) = "mediaprovider"];
-        MediaProviderPermissionRequested media_provider_permission_requested =
-            235 [(module) = "mediaprovider"];
-        MediaProviderSchemaChanged media_provider_schema_changed = 236 [(module) = "mediaprovider"];
-        MediaProviderIdleMaintenanceFinished media_provider_idle_maintenance_finished =
-            237 [(module) = "mediaprovider"];
-        RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"];
-        BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"];
-        BootTimeEventElapsedTime boot_time_event_elapsed_time_reported =
-                240 [(module) = "framework"];
-        BootTimeEventUtcTime boot_time_event_utc_time_reported = 241;
-        BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"];
-        UserspaceRebootReported userspace_reboot_reported = 243 [(module) = "framework"];
-        NotificationReported notification_reported = 244 [(module) = "framework"];
-        NotificationPanelReported notification_panel_reported = 245 [(module) = "sysui"];
-        NotificationChannelModified notification_channel_modified = 246 [(module) = "framework"];
-        IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"];
-        IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"];
-        CellBroadcastMessageReported cb_message_reported =
-            249 [(module) = "cellbroadcast"];
-        CellBroadcastMessageError cb_message_error =
-            250 [(module) = "cellbroadcast"];
-        WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"];
-        WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"];
-        WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"];
-        AppFreezeChanged app_freeze_changed = 254 [(module) = "framework"];
-        SnapshotMergeReported snapshot_merge_reported = 255;
-        ForegroundServiceAppOpSessionEnded foreground_service_app_op_session_ended =
-            256  [(module) = "framework"];
-        DisplayJankReported display_jank_reported = 257;
-        AppStandbyBucketChanged app_standby_bucket_changed = 258 [(module) = "framework"];
-        SharesheetStarted sharesheet_started = 259 [(module) = "framework"];
-        RankingSelected ranking_selected = 260 [(module) = "framework", (module) = "sysui"];
-        TvSettingsUIInteracted tvsettings_ui_interacted = 261 [(module) = "tv_settings"];
-        LauncherStaticLayout launcher_snapshot = 262 [(module) = "sysui"];
-        PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"];
-        UserLifecycleJourneyReported user_lifecycle_journey_reported = 264 [(module) = "framework"];
-        UserLifecycleEventOccurred user_lifecycle_event_occurred = 265 [(module) = "framework"];
-        AccessibilityShortcutReported accessibility_shortcut_reported =
-            266 [(module) = "framework"];
-        AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "settings"];
-        DocsUIDragAndDropReported docs_ui_drag_and_drop_reported = 268 [(module) = "docsui"];
-        AppUsageEventOccurred app_usage_event_occurred = 269 [(module) = "framework"];
-        AutoRevokeNotificationClicked auto_revoke_notification_clicked =
-            270 [(module) = "permissioncontroller"];
-        AutoRevokeFragmentAppViewed auto_revoke_fragment_app_viewed =
-            271 [(module) = "permissioncontroller"];
-        AutoRevokedAppInteraction auto_revoked_app_interaction =
-            272 [(module) = "permissioncontroller", (module) = "settings"];
-        AppPermissionGroupsFragmentAutoRevokeAction
-            app_permission_groups_fragment_auto_revoke_action =
-            273 [(module) = "permissioncontroller"];
-        EvsUsageStatsReported evs_usage_stats_reported = 274 [(module) = "evs"];
-        AudioPowerUsageDataReported audio_power_usage_data_reported = 275;
-        TvTunerStateChanged tv_tuner_state_changed = 276 [(module) = "framework"];
-        MediaOutputOpSwitchReported mediaoutput_op_switch_reported =
-            277 [(module) = "settings"];
-        CellBroadcastMessageFiltered cb_message_filtered =
-            278 [(module) = "cellbroadcast"];
-        TvTunerDvrStatus tv_tuner_dvr_status = 279 [(module) = "framework"];
-        TvCasSessionOpenStatus tv_cas_session_open_status =
-            280 [(module) = "framework"];
-        AssistantInvocationReported assistant_invocation_reported = 281 [(module) = "framework"];
-        DisplayWakeReported display_wake_reported = 282 [(module) = "framework"];
-        CarUserHalModifyUserRequestReported car_user_hal_modify_user_request_reported =
-            283 [(module) = "car"];
-        CarUserHalModifyUserResponseReported car_user_hal_modify_user_response_reported =
-            284 [(module) = "car"];
-        CarUserHalPostSwitchResponseReported car_user_hal_post_switch_response_reported =
-            285 [(module) = "car"];
-        CarUserHalInitialUserInfoRequestReported car_user_hal_initial_user_info_request_reported =
-            286 [(module) = "car"];
-        CarUserHalInitialUserInfoResponseReported car_user_hal_initial_user_info_response_reported =
-            287 [(module) = "car"];
-        CarUserHalUserAssociationRequestReported car_user_hal_user_association_request_reported =
-            288 [(module) = "car"];
-        CarUserHalSetUserAssociationResponseReported car_user_hal_set_user_association_response_reported =
-            289 [(module) = "car"];
-        NetworkIpProvisioningReported network_ip_provisioning_reported =
-            290 [(module) = "network_stack"];
-        NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(module) = "network_stack"];
-        NetworkValidationReported network_validation_reported = 292 [(module) = "network_stack"];
-        NetworkStackQuirkReported network_stack_quirk_reported = 293 [(module) = "network_stack"];
-        MediametricsAudioRecordDeviceUsageReported mediametrics_audiorecorddeviceusage_reported =
-            294;
-        MediametricsAudioThreadDeviceUsageReported mediametrics_audiothreaddeviceusage_reported =
-            295;
-        MediametricsAudioTrackDeviceUsageReported mediametrics_audiotrackdeviceusage_reported =
-            296;
-        MediametricsAudioDeviceConnectionReported mediametrics_audiodeviceconnection_reported =
-            297;
-        BlobCommitted blob_committed = 298 [(module) = "framework"];
-        BlobLeased blob_leased = 299 [(module) = "framework"];
-        BlobOpened blob_opened = 300 [(module) = "framework"];
-        ContactsProviderStatusReported contacts_provider_status_reported = 301;
-        KeystoreKeyEventReported keystore_key_event_reported = 302;
-        NetworkTetheringReported  network_tethering_reported =
-            303 [(module) = "network_tethering"];
-        ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"];
-        TlsHandshakeReported tls_handshake_reported = 317 [(module) = "conscrypt"];
-
-        // StatsdStats tracks platform atoms with ids upto 500.
-        // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
-    }
-
-    // Pulled events will start at field 10000.
-    // Next: 10084
-    oneof pulled {
-        WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"];
-        WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"];
-        MobileBytesTransfer mobile_bytes_transfer =
-                10002 [(module) = "framework", (truncate_timestamp) = true];
-        MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg =
-                10003 [(module) = "framework", (truncate_timestamp) = true];
-        BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"];
-        KernelWakelock kernel_wakelock = 10004 [(module) = "framework"];
-        SubsystemSleepState subsystem_sleep_state = 10005 [(module) = "statsdtest"];
-        CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"];
-        CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework", (module) = "statsdtest"];
-        CpuTimePerUidFreq cpu_time_per_uid_freq =
-                10010 [(module) = "framework", (module) = "statsd"];
-        WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"];
-        ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"];
-        BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"];
-        ProcessMemoryState process_memory_state = 10013 [(module) = "framework"];
-        SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"];
-        SystemUptime system_uptime = 10015 [(module) = "framework"];
-        CpuActiveTime cpu_active_time = 10016 [(module) = "framework", (module) = "statsdtest"];
-        CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"];
-        DiskSpace disk_space = 10018 [deprecated=true, (module) = "statsdtest"];
-        RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"];
-        FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"];
-        Temperature temperature = 10021 [(module) = "framework", (module) = "statsdtest"];
-        BinderCalls binder_calls = 10022 [(module) = "framework", (module) = "statsd"];
-        BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"];
-        LooperStats looper_stats = 10024 [(module) = "framework", (module) = "statsd"];
-        DiskStats disk_stats = 10025 [(module) = "framework"];
-        DirectoryUsage directory_usage = 10026 [(module) = "framework"];
-        AppSize app_size = 10027 [(module) = "framework"];
-        CategorySize category_size = 10028 [(module) = "framework"];
-        ProcStats proc_stats = 10029 [(module) = "framework"];
-        BatteryVoltage battery_voltage = 10030 [(module) = "framework"];
-        NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"];
-        DiskIo disk_io = 10032 [(module) = "framework"];
-        PowerProfile power_profile = 10033 [(module) = "framework"];
-        ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"];
-        ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"];
-        CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"];
-        OnDevicePowerMeasurement on_device_power_measurement = 10038;
-        DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"];
-        DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid =
-                10040 [(module) = "framework"];
-        DeviceCalculatedPowerBlameOther device_calculated_power_blame_other =
-                10041 [(module) = "framework"];
-        ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"];
-        BatteryLevel battery_level = 10043 [(module) = "framework"];
-        BuildInformation build_information = 10044 [(module) = "framework"];
-        BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"];
-        DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"];
-        DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"];
-        NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"];
-        RoleHolder role_holder = 10049 [(module) = "framework"];
-        DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"];
-        TrainInfo train_info = 10051 [(module) = "statsd"];
-        TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"];
-        ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"];
-        GpuStatsGlobalInfo gpu_stats_global_info = 10054;
-        GpuStatsAppInfo gpu_stats_app_info = 10055;
-        SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"];
-        AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"];
-        FaceSettings face_settings = 10058 [(module) = "framework"];
-        CoolingDevice cooling_device = 10059 [(module) = "framework"];
-        AppOps app_ops = 10060 [(module) = "framework"];
-        ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"];
-        SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062;
-        SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063;
-        ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"];
-        VmsClientStats vms_client_stats = 10065 [(module) = "car"];
-        NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"];
-        DangerousPermissionStateSampled dangerous_permission_state_sampled =
-                10067 [(module) = "framework"];
-        GraphicsStats graphics_stats = 10068;
-        RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"];
-        IonHeapSize ion_heap_size = 10070 [(module) = "framework"];
-        PackageNotificationPreferences package_notification_preferences =
-                10071 [(module) = "framework"];
-        PackageNotificationChannelPreferences package_notification_channel_preferences =
-                10072 [(module) = "framework"];
-        PackageNotificationChannelGroupPreferences package_notification_channel_group_preferences =
-                10073 [(module) = "framework"];
-        GnssStats gnss_stats = 10074 [(module) = "framework"];
-        AttributedAppOps attributed_app_ops = 10075 [(module) = "framework"];
-        VoiceCallSession voice_call_session = 10076 [(module) = "telephony"];
-        VoiceCallRatUsage voice_call_rat_usage = 10077 [(module) = "telephony"];
-        SimSlotState sim_slot_state = 10078 [(module) = "telephony"];
-        SupportedRadioAccessFamily supported_radio_access_family = 10079 [(module) = "telephony"];
-        SettingSnapshot setting_snapshot = 10080 [(module) = "framework"];
-        BlobInfo blob_info = 10081 [(module) = "framework"];
-        DataUsageBytesTransfer data_usage_bytes_transfer = 10082 [(module) = "framework"];
-        BytesTransferByTagAndMetered bytes_transfer_by_tag_and_metered =
-                10083 [(module) = "framework"];
-        DNDModeProto dnd_mode_rule = 10084 [(module) = "framework"];
-        GeneralExternalStorageAccessStats general_external_storage_access_stats =
-            10085 [(module) = "mediaprovider"];
-    }
-
-    // DO NOT USE field numbers above 100,000 in AOSP.
-    // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use.
-    // Field numbers 200,000 and above are reserved for future use; do not use them at all.
-
-    reserved 10036;
-}
-
-/**
- * This proto represents a node of an attribution chain.
- * Note: All attribution chains are represented as a repeated field of type
- * AttributionNode. It is understood that in such arrays, the order is that
- * of calls, that is [A, B, C] if A calls B that calls C.
- */
-message AttributionNode {
-    // The uid for a given element in the attribution chain.
-    optional int32 uid = 1;
-
-    // The (optional) string tag for an element in the attribution chain. If the
-    // element has no tag, it is encoded as an empty string.
-    optional string tag = 2;
-}
-
-message KeyValuePair {
-    optional int32 key = 1;
-    oneof value {
-        int32 value_int = 2;
-        int64 value_long = 3;
-        string value_str = 4;
-        float value_float = 5;
-    }
-}
-
-message KeyValuePairsAtom {
-    optional int32 uid = 1;
-    repeated KeyValuePair pairs = 2;
-}
-
-/*
- * *****************************************************************************
- * Below are all of the individual atoms that are logged by Android via statsd.
- *
- * RULES:
- *   - The field ids for each atom must start at 1, and count upwards by 1.
- *     Skipping field ids is not allowed.
- *   - These form an API, so renaming, renumbering or removing fields is
- *     not allowed between android releases.  (This is not currently enforced,
- *     but there will be a tool to enforce this restriction).
- *   - The types must be built-in protocol buffer types, namely, no sub-messages
- *     are allowed (yet).  The bytes type is also not allowed.
- *   - The CamelCase name of the message type should match the
- *     underscore_separated name as defined in Atom.
- *   - If an atom represents work that can be attributed to an app, there can
- *     be exactly one AttributionChain field. It must be field number 1.
- *   - A field that is a uid should be a string field, tagged with the [xxx]
- *     annotation. The generated code on android will be represented by UIDs,
- *     and those UIDs will be translated in xxx to those strings.
- *
- * CONVENTIONS:
- *   - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange.
- *   - If there is a UID, it goes first. Think in an object-oriented fashion.
- * *****************************************************************************
- */
-
-/**
- * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged.
- * Logs when the Thermal service HAL notifies the throttling start/stop events.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
- */
-message ThermalThrottlingStateChanged {
-    // The type of temperature being reported (CPU, GPU, SKIN, etc)
-    optional android.os.TemperatureTypeEnum sensor_type = 1;
-
-    // Throttling state, this field is DEPRECATED
-    enum State {
-        UNKNOWN = 0;
-        START = 1; // START indicated that throttling was triggered.
-        STOP = 2; // STOP indicates that throttling was cleared.
-    }
-    optional State state = 2;
-
-    optional float temperature = 3;
-}
-
-/**
- * Logs when the screen state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message ScreenStateChanged {
-    // New screen state, from frameworks/base/core/proto/android/view/enums.proto.
-    optional android.view.DisplayStateEnum state = 1
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs that the process state of the uid, as determined by ActivityManager
- * (i.e. the highest process state of that uid's processes) has changed.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message UidProcessStateChanged {
-    optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true];
-
-    // The state, from frameworks/base/core/proto/android/app/enums.proto.
-    optional android.app.ProcessStateEnum state = 2
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs process state change of a process, as per the activity manager.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
- */
-message ProcessStateChanged {
-    optional int32 uid = 1;
-    optional string process_name = 2;
-    optional string package_name = 3;
-    // TODO: remove this when validation is done
-    optional int64 version = 5;
-    // The state, from frameworks/base/core/proto/android/app/enums.proto.
-    optional android.app.ProcessStateEnum state = 4;
-}
-
-/**
- * Logs when ActivityManagerService sleep state is changed.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java
- */
-message ActivityManagerSleepStateChanged {
-    // TODO: import frameworks proto
-    enum State {
-        UNKNOWN = 0;
-        ASLEEP = 1;
-        AWAKE = 2;
-    }
-    optional State state = 1
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs when system memory state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message MemoryFactorStateChanged {
-    // TODO: import frameworks proto
-    enum State {
-        MEMORY_UNKNOWN = 0;
-        NORMAL = 1;     // normal.
-        MODERATE = 2;   // moderate memory pressure.
-        LOW = 3;        // low memory.
-        CRITICAL = 4;   // critical memory.
-
-    }
-    optional State factor = 1 [(state_field_option).exclusive_state = true];
-}
-
-/**
- * Logs when app is using too much cpu, according to ActivityManagerService.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message ExcessiveCpuUsageReported {
-    optional int32 uid = 1;
-    optional string process_name = 2;
-    optional string package_name = 3;
-    // package version. TODO: remove this when validation is done
-    optional int64 version = 4;
-}
-
-/**
- * Logs when a cached process is killed, along with its pss.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message CachedKillReported {
-    optional int32 uid = 1;
-    optional string process_name = 2;
-    optional string package_name = 3;
-    // TODO: remove this when validation is done
-    optional int64 version = 5;
-    optional int64 pss = 4;
-}
-
-/**
- * Logs the change in wifi health.
- *
- * Logged from:
- *   frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java
- */
-message WifiHealthStatReported {
-    enum Band {
-        UNKNOWN = 0;
-        // All of 2.4GHz band
-        BAND_2G = 1;
-        // Frequencies in the range of [5150, 5250) GHz
-        BAND_5G_LOW = 2;
-        // Frequencies in the range of [5250, 5725) GHz
-        BAND_5G_MIDDLE = 3;
-        // Frequencies in the range of [5725, 5850) GHz
-        BAND_5G_HIGH = 4;
-        // Frequencies in the range of [5925, 6425) GHz
-        BAND_6G_LOW = 5;
-        // Frequencies in the range of [6425, 6875) GHz
-        BAND_6G_MIDDLE = 6;
-        // Frequencies in the range of [6875, 7125) GHz
-        BAND_6G_HIGH = 7;
-    }
-    // duration this stat is obtained over in milliseconds
-    optional int32 duration_millis = 1;
-    // whether wifi is classified as sufficient for the user's data traffic, determined
-    // by whether the calculated throughput exceeds the average demand within |duration_millis|
-    optional bool is_sufficient = 2;
-    // whether cellular data is available
-    optional bool is_cell_data_available = 3;
-    // the Band bucket the connected network is on
-    optional Band band = 4;
-}
-
-/**
- * Logged when wifi detects a significant change in connection failure rate.
- *
- * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java
- *
- */
-message WifiFailureStatReported {
-    enum AbnormalityType {
-        UNKNOWN = 0;
-        SIGNIFICANT_INCREASE = 1;
-        SIGNIFICANT_DECREASE = 2;
-        SIMPLY_HIGH = 3;
-    }
-    enum FailureType {
-        FAILURE_UNKNOWN = 0;
-        FAILURE_CONNECTION = 1;
-        FAILURE_ASSOCIATION_REJECTION = 2;
-        FAILURE_ASSOCIATION_TIMEOUT = 3;
-        FAILURE_AUTHENTICATION = 4;
-        FAILURE_NON_LOCAL_DISCONNECTION = 5;
-        FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6;
-    }
-    // Reason for uploading this stat
-    optional AbnormalityType abnormality_type = 1;
-    // The particular type of failure
-    optional FailureType failure_type = 2;
-    // How many times we have encountered this combination of AbnormalityType and FailureType
-    optional int32 failure_count = 3;
-}
-
-/**
- * Logs whether a wifi connection is successful and reasons for failure if it isn't.
- *
- * Logged from:
- *   frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
- */
-message WifiConnectionResultReported {
-    enum FailureCode {
-        FAILURE_UNKNOWN = 0;
-        FAILURE_ASSOCIATION_TIMEOUT = 1;
-        FAILURE_ASSOCIATION_REJECTION = 2;
-        FAILURE_AUTHENTICATION_GENERAL = 3;
-        FAILURE_AUTHENTICATION_EAP = 4;
-        FAILURE_DHCP = 5;
-        FAILURE_NETWORK_DISCONNECTION = 6;
-        FAILURE_ROAM_TIMEOUT = 7;
-    }
-    // true represents a successful connection
-    optional bool connection_result = 1;
-    // reason for the connection failure
-    optional FailureCode failure_code = 2;
-    // scan rssi before the connection attempt
-    optional int32 rssi = 3;
-}
-
-/**
- * Logs when memory stats of a process is reported.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
- */
-message ProcessMemoryStatReported {
-    optional int32 uid = 1;
-    optional string process_name = 2;
-    optional string package_name = 3;
-    //TODO: remove this when validation is done
-    optional int64 version = 9;
-    optional int64 pss = 4;
-    optional int64 uss = 5;
-    optional int64 rss = 6;
-    enum Type {
-        ADD_PSS_INTERNAL_SINGLE = 0;
-        ADD_PSS_INTERNAL_ALL_MEM = 1;
-        ADD_PSS_INTERNAL_ALL_POLL = 2;
-        ADD_PSS_EXTERNAL = 3;
-        ADD_PSS_EXTERNAL_SLOW = 4;
-    }
-    optional Type type = 7;
-    optional int64 duration_millis = 8;
-}
-
-/**
- * Logs that a process started, finished, crashed, or ANRed.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message ProcessLifeCycleStateChanged {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process name (usually same as the app name).
-    optional string process_name = 2;
-
-    // What lifecycle state the process changed to.
-    // This enum is specific to atoms.proto.
-    enum State {
-        FINISHED = 0;
-        STARTED = 1;
-        CRASHED = 2;
-    }
-    optional State state = 3;
-}
-
-/**
- * Logs when the ble scan state changes.
- *
- * Logged from:
- *   packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
- */
-message BleScanStateChanged {
-    repeated AttributionNode attribution_node = 1
-            [(state_field_option).primary_field_first_uid = true];
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-        // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes).
-        RESET = 2;
-    }
-    optional State state = 2 [
-        (state_field_option).exclusive_state = true,
-        (state_field_option).default_state_value = 0 /* State.OFF */,
-        (state_field_option).trigger_state_reset_value = 2 /* State.RESET */,
-        (state_field_option).nested = true
-    ];
-
-    // Does the scan have a filter.
-    optional bool is_filtered = 3 [(state_field_option).primary_field = true];
-    // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally.
-    optional bool is_first_match = 4 [(state_field_option).primary_field = true];
-    // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC).
-    optional bool is_opportunistic = 5 [(state_field_option).primary_field = true];
-}
-
-/**
- * Logs reporting of a ble scan finding results.
- *
- * Logged from:
- *   packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
- */
-// TODO: Consider also tracking per-scanner-id.
-message BleScanResultReceived {
-    repeated AttributionNode attribution_node = 1;
-
-    // Number of ble scan results returned.
-    optional int32 num_results = 2;
-}
-
-/**
- * Logs when a sensor state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message SensorStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    // The id (int) of the sensor.
-    optional int32 sensor_id = 2;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 3;
-}
-
-/**
- * Logs when GPS state changes.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message GpsScanStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 2;
-}
-
-/**
- * Logs when GPS signal quality.
- *
- * Logged from:
- *   /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
- */
-message GpsSignalQualityChanged {
-    optional android.server.location.GpsSignalQualityEnum level = 1;
-}
-
-
-/**
- * Logs when a sync manager sync state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message SyncStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    // Name of the sync (as named in the app). Can be chosen at run-time.
-    optional string sync_name = 2;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 3;
-}
-
-/*
- * Deferred job stats.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java
-*/
-message DeferredJobStatsReported {
-    repeated AttributionNode attribution_node = 1;
-
-    // Number of jobs deferred.
-    optional int32 num_jobs_deferred = 2;
-
-    // Time since the last job runs.
-    optional int64 time_since_last_job_millis = 3;
-}
-
-/**
- * Logs when a job scheduler job state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message ScheduledJobStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    // Name of the job (as named in the app)
-    optional string job_name = 2;
-
-    enum State {
-        FINISHED = 0;
-        STARTED = 1;
-        SCHEDULED = 2;
-    }
-    optional State state = 3;
-
-    // The reason a job has stopped.
-    // This is only applicable when the state is FINISHED.
-    // The default value is STOP_REASON_UNKNOWN.
-    optional android.app.job.StopReasonEnum stop_reason = 4;
-
-    // The standby bucket of the app that scheduled the job. These match the framework constants
-    // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is
-    // already assigned 0.
-    enum Bucket {
-        UNKNOWN = -1;
-        ACTIVE = 0;
-        WORKING_SET = 1;
-        FREQUENT = 2;
-        RARE = 3;
-        NEVER = 4;
-        RESTRICTED = 5;
-    }
-    optional Bucket standby_bucket = 5 [default = UNKNOWN];
-
-    // The job id (as assigned by the app).
-    optional int32 job_id = 6;
-
-    // One flag for each of the API constraints defined by Jobscheduler. Does not include implcit
-    // constraints as they are always assumed to be set.
-    optional bool has_charging_constraint = 7;
-    optional bool has_battery_not_low_constraint = 8;
-    optional bool has_storage_not_low_constraint = 9;
-    optional bool has_timing_delay_constraint = 10;
-    optional bool has_deadline_constraint = 11;
-    optional bool has_idle_constraint = 12;
-    optional bool has_connectivity_constraint = 13;
-    optional bool has_content_trigger_constraint = 14;
-}
-
-/**
- * Logs when the audio state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message AudioStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-        // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
-        RESET = 2;
-    }
-    optional State state = 2;
-}
-
-/**
- * Logs when the video codec state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message MediaCodecStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-        // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes).
-        RESET = 2;
-    }
-    optional State state = 2;
-}
-
-/**
- * Logs when the flashlight state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message FlashlightStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-        // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes).
-        RESET = 2;
-    }
-    optional State state = 2;
-}
-
-/**
- * Logs when the camera state changes.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message CameraStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-        // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes).
-        RESET = 2;
-    }
-    optional State state = 2;
-}
-
-/**
- * Logs that the state of a wakelock (per app and per wakelock name) has changed.
- *
- * Logged from:
- *   TODO
- */
-message WakelockStateChanged {
-    repeated AttributionNode attribution_node = 1
-            [(state_field_option).primary_field_first_uid = true];
-
-    // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock.
-    // From frameworks/base/core/proto/android/os/enums.proto.
-    optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).primary_field = true];
-
-    // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
-    optional string tag = 3 [(state_field_option).primary_field = true];
-
-    enum State {
-        RELEASE = 0;
-        ACQUIRE = 1;
-        CHANGE_RELEASE = 2;
-        CHANGE_ACQUIRE = 3;
-    }
-    optional State state = 4 [
-        (state_field_option).exclusive_state = true,
-        (state_field_option).default_state_value = 0,
-        (state_field_option).nested = true
-    ];
-}
-
-/**
- * Logs when a partial wakelock is considered 'long' (over 1 min).
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message LongPartialWakelockStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
-    optional string tag = 2;
-
-    // TODO: I have no idea what this is.
-    optional string history_tag = 3;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 4;
-}
-
-/**
- * Logs when the device is interactive, according to the PowerManager Notifier.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/power/Notifier.java
- */
-message InteractiveStateChanged {
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 1;
-}
-
-/**
- * Logs Battery Saver state change.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message BatterySaverModeStateChanged {
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 1
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs Doze mode state change.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message DeviceIdleModeStateChanged {
-    optional android.server.DeviceIdleModeEnum state = 1
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-
-/**
- * Logs state change of Doze mode including maintenance windows.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message DeviceIdlingModeStateChanged {
-    optional android.server.DeviceIdleModeEnum state = 1
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs screen brightness level.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message ScreenBrightnessChanged {
-    // Screen brightness level. Should be in [-1, 255] according to PowerManager.java.
-    optional int32 level = 1;
-}
-
-/**
- * Logs battery level (percent full, from 0 to 100).
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message BatteryLevelChanged {
-    // Battery level. Should be in [0, 100].
-    optional int32 battery_level = 1;
-}
-
-/**
- * Logs change in charging status of the device.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message ChargingStateChanged {
-    // State of the battery, from frameworks/base/core/proto/android/os/enums.proto.
-    optional android.os.BatteryStatusEnum state = 1
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs whether the device is plugged in, and what power source it is using.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message PluggedStateChanged {
-    // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto.
-    optional android.os.BatteryPluggedStateEnum state = 1
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs when an app's wakeup alarm fires.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message WakeupAlarmOccurred {
-    repeated AttributionNode attribution_node = 1;
-
-    // Name of the wakeup alarm.
-    optional string tag = 2;
-
-    // Name of source package (for historical reasons, since BatteryStats tracked it).
-    optional string package_name = 3;
-
-    // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired.
-    optional AppStandbyBucketChanged.Bucket app_standby_bucket = 4;
-}
-
-/**
- * Logs when an an app causes the mobile radio to change state.
- * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
- */
-message MobileRadioPowerStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
-    optional android.telephony.DataConnectionPowerStateEnum state = 2;
-}
-
-/**
- * Logs when an an app causes the wifi radio to change state.
- * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
- */
-message WifiRadioPowerStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
-    optional android.telephony.DataConnectionPowerStateEnum state = 2;
-}
-
-/**
- * Logs kernel wakeup reasons and aborts.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message KernelWakeupReported {
-    // Name of the kernel wakeup reason (or abort).
-    optional string wakeup_reason_name = 1;
-
-    // Duration (in microseconds) for the wake-up interrupt to be serviced.
-    optional int64 duration_micros = 2;
-}
-
-/**
- * Logs when Wifi is toggled on/off.
- * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message WifiEnabledStateChanged {
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 1;
-}
-
-/**
- * This atom is deprecated starting in R.
- *
- * Logs when an app causes Wifi to run. In this context, 'to run' means to use Wifi Client Mode.
- * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'.
- * Note that Wifi Scanning is monitored separately in WifiScanStateChanged.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message WifiRunningStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 2;
-}
-
-/**
- * Logs wifi locks held by an app.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message WifiLockStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 2;
-
-    // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto.
-    optional android.net.wifi.WifiModeEnum mode = 3;
-}
-
-/**
- * Logs wifi signal strength changes.
- *
- * Logged from:
- *   frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
- */
-message WifiSignalStrengthChanged {
-    // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
-    optional android.telephony.SignalStrengthEnum signal_strength = 1;
-}
-
-/**
- * Logs wifi scans performed by an app.
- *
- * Logged from:
- *   frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
- */
-message WifiScanStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 2;
-}
-
-/**
- * Logs wifi multicast locks held by an app
- *
- * Logged from:
- *   frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java
- */
-message WifiMulticastLockStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 2;
-
-    optional string tag = 3;
-}
-
-/**
- * Logs shutdown reason and duration on next boot.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/server/BootReceiver.java
- */
-message ShutdownSequenceReported {
-    // True if shutdown is for a reboot. Default: false if we do not know.
-    optional bool reboot = 1;
-
-    // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>".
-    optional string reason = 2;
-
-    // Beginning of shutdown time in ms using wall clock time since unix epoch.
-    // Default: 0 if no start time received.
-    optional int64 start_time_millis = 3;
-
-    // Duration of shutdown in ms. Default: 0 if no duration received.
-    optional int64 duration_millis = 4;
-}
-
-
-/**
- * Logs boot reason and duration.
- *
- * Logged from:
- *   system/core/bootstat/bootstat.cpp
- */
-message BootSequenceReported {
-    // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list
-    // Default: "<EMPTY>" if not available.
-    optional string bootloader_reason = 1;
-
-    // Reason for system boot. Eg. bootloader, reboot,userrequested
-    // Default: "<EMPTY>" if not available.
-    optional string system_reason = 2;
-
-    // End of boot time in ms from unix epoch using system wall clock.
-    optional int64 end_time_millis = 3;
-
-    // Total boot duration in ms.
-    optional int64 total_duration_millis = 4;
-
-    // Bootloader duration in ms.
-    optional int64 bootloader_duration_millis = 5;
-
-    // Time since last boot in ms. Default: 0 if not available.
-    optional int64 time_since_last_boot = 6;
-}
-
-
-/**
- * Logs call state and disconnect cause (if applicable).
- *
- * Logged from:
- *   packages/services/Telecomm/src/com/android/server/telecom/Call.java
- */
-message CallStateChanged {
-    // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED.
-    // From frameworks/base/core/proto/android/telecomm/enums.proto.
-    optional android.telecom.CallStateEnum call_state = 1;
-
-    // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY.
-    // This value is only applicable when the call_state is DISCONNECTED, and
-    // should always be UNKNOWN if the call_state is not DISCONNECTED.
-    // From frameworks/base/core/proto/android/telecomm/enums.proto.
-    optional android.telecom.DisconnectCauseEnum disconnect_cause = 2;
-
-    // True if the call is self-managed, which are apps that use the
-    // telecom infrastructure to make their own calls.
-    optional bool self_managed = 3;
-
-    // True if call is external. External calls are calls on connected Wear
-    // devices but show up in Telecom so the user can pull them onto the device.
-    optional bool external_call = 4;
-}
-
-/**
- * Logs keyguard state. The keyguard is the lock screen.
- *
- * Logged from:
- *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
- */
-message KeyguardStateChanged {
-    enum State {
-        UNKNOWN = 0;
-        // The keyguard is hidden when the phone is unlocked.
-        HIDDEN = 1;
-        // The keyguard is shown when the phone is locked (screen turns off).
-        SHOWN= 2;
-        // The keyguard is occluded when something is overlaying the keyguard.
-        // Eg. Opening the camera while on the lock screen.
-        OCCLUDED = 3;
-    }
-    optional State state = 1;
-}
-
-/**
- * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and
- * prompts the user to enter a password (pattern, pin, etc).
- *
- * Logged from:
- *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
- */
-
-message KeyguardBouncerStateChanged {
-    enum State {
-        UNKNOWN = 0;
-        // Bouncer is hidden, either as a result of successfully entering the
-        // password, screen timing out, or user going back to lock screen.
-        HIDDEN = 1;
-        // This is when the user is being prompted to enter the password.
-        SHOWN = 2;
-    }
-    optional State state = 1;
-}
-
-/**
- * Logs the result of entering a password into the keyguard bouncer.
- *
- * Logged from:
- *   frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
- */
-message KeyguardBouncerPasswordEntered {
-    enum BouncerResult {
-        UNKNOWN = 0;
-        // The password entered was incorrect.
-        FAILURE = 1;
-        // The password entered was correct.
-        SUCCESS = 2;
-    }
-    optional BouncerResult result = 1;
-}
-
-/*
- * Logs changes to the configuration of the device. The configuration is defined
- * in frameworks/base/core/java/android/content/res/Configuration.java
- * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html
- * Please go there to interpret the possible values each field can be.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message ResourceConfigurationChanged {
-    // Bit mask of color capabilities of the screen.
-    // Contains information about the color gamut and hdr mode of the screen.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode
-    optional int32 color_mode = 1;
-
-    // The target screen density being rendered to.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi
-    optional int32 density_dpi = 2;
-
-    // Current user preference for the scaling factor for fonts,
-    // relative to the base density scaling.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale
-    optional float font_scale = 3;
-
-    // Flag indicating whether the hard keyboard is hidden.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden
-    optional int32 hard_keyboard_hidden = 4;
-
-    // The type of keyboard attached to the device.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard
-    optional int32 keyboard = 5;
-
-    // Flag indicating whether any keyboard is available. Takes soft keyboards into account.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden
-    optional int32 keyboard_hidden = 6;
-
-    // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier.
-    // 0 if undefined.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc
-    optional int32 mcc = 7;
-
-    // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier.
-    // 0 if undefined. Note: the actual MNC may be 0, to check for this use the
-    // MNC_ZERO symbol defined in Configuration.java.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc
-    optional int32 mnc = 8;
-
-    // The kind of navigation available on the device.
-    // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation
-    optional int32 navigation = 9;
-
-    // Flag indicating whether the navigation is available.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden
-    optional int32 navigation_hidden = 10;
-
-    // Overall orientation of the screen.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation
-    optional int32 orientation = 11;
-
-    // The current height of the available screen space, in dp units.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp
-    optional int32 screen_height_dp = 12;
-
-    // Bit mask of overall layout of the screen.
-    // Contains information about screen size, whether the screen is wider/taller
-    // than normal, whether the screen layout is right-tl-left or left-to-right,
-    // and whether the screen has a rounded shape.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout
-    optional int32 screen_layout = 13;
-
-    // Current width of the available screen space, in dp units.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp
-    optional int32 screen_width_dp = 14;
-
-    // The smallest screen size an application will see in normal operation.
-    // This is the smallest value of both screenWidthDp and screenHeightDp
-    // in portrait and landscape.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
-    optional int32 smallest_screen_width_dp = 15;
-
-    // The type of touch screen attached to the device.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen
-    optional int32 touchscreen = 16;
-
-    // Bit mask of the ui mode.
-    // Contains information about the overall ui mode of the device.
-    // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET
-    // Also contains information about whether the device is in night mode.
-    // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode
-    optional int32 ui_mode = 17;
-}
-
-
-/**
- * Logs changes in the connection state of the mobile radio.
- *
- * Logged from:
- *    frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
- */
-message MobileConnectionStateChanged {
-    // States are from the state machine DataConnection.java.
-    enum State {
-        UNKNOWN = 0;
-        // The connection is inactive, or disconnected.
-        INACTIVE = 1;
-        // The connection is being activated, or connecting.
-        ACTIVATING = 2;
-        // The connection is active, or connected.
-        ACTIVE = 3;
-        // The connection is disconnecting.
-        DISCONNECTING = 4;
-        // The connection is disconnecting after creating a connection.
-        DISCONNECTION_ERROR_CREATING_CONNECTION = 5;
-    }
-    optional State state  = 1;
-    // For multi-sim phones, this distinguishes between the sim cards.
-    optional int32 sim_slot_index = 2;
-    // Used to identify the connection. Starts at 0 and increments by 1 for
-    // every new network created. Resets whenever the device reboots.
-    optional int32 data_connection_id = 3;
-    // A bitmask for the capabilities of this connection.
-    // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS.
-    // Default value (if we have no information): 0
-    optional int64 capabilities = 4;
-    // If this connection has internet.
-    // This just checks if the DEFAULT bit of capabilities is set.
-    optional bool has_internet = 5;
-}
-
-/**
- * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA.
- *
- * Logged from:
- *   frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
- */
-message MobileRadioTechnologyChanged {
-    optional android.telephony.NetworkTypeEnum state = 1;
-    // For multi-sim phones, this distinguishes between the sim cards.
-    optional int32 sim_slot_index = 2;
-}
-
-/**
- * Logs the VID and PID of any connected USB devices.
- *
- * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present.
- *
- * Logged by Vendor.
- */
-message UsbDeviceAttached {
-    optional int32 vid = 1;
-    optional int32 pid = 2;
-    optional bool has_audio = 3;
-    optional bool has_hid = 4;
-    optional bool has_storage = 5;
-    enum State {
-        STATE_DISCONNECTED = 0;
-        STATE_CONNECTED = 1;
-    }
-    optional State state = 6;
-    optional int64 last_connect_duration_millis = 7;
-}
-
-
-/**
- * Logs when Bluetooth is enabled and disabled.
- *
- * Logged from:
- *   services/core/java/com/android/server/BluetoothManagerService.java
- */
-message BluetoothEnabledStateChanged {
-    repeated AttributionNode attribution_node = 1;
-    // Whether or not bluetooth is enabled on the device.
-    enum State {
-        UNKNOWN = 0;
-        ENABLED = 1;
-        DISABLED = 2;
-    }
-    optional State state = 2;
-    // The reason for being enabled/disabled.
-    // Eg. Airplane mode, crash, application request.
-    optional android.bluetooth.EnableDisableReasonEnum reason = 3;
-    // If the reason is an application request, this will be the package name.
-    optional string pkg_name = 4;
-}
-
-/**
- * Logs when profiles on a Bluetooth device connects and disconnects.
- *
- * Logged from:
- *    packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
- *
- * Next Tag: 6
- */
-message BluetoothConnectionStateChanged {
-    // The state of the connection.
-    // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
-    optional android.bluetooth.ConnectionStateEnum state = 1;
-    // An identifier that can be used to match connect and disconnect events.
-    // Currently is last two bytes of a hash of a device level ID and
-    // the mac address of the bluetooth device that is connected.
-    // Deprecated: use obfuscated_id instead, this one is always 0 for Q+
-    optional int32 obfuscated_id = 2 [deprecated = true];
-    // The profile that is connected. Eg. GATT, A2DP, HEADSET.
-    // From android.bluetooth.BluetoothAdapter.java
-    // Default: 0 when not used
-    optional int32 bt_profile = 3;
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 5;
-}
-
-/**
- * Logs when a Bluetooth device connects and disconnects over ACL
- *
- * Logged from:
- *    packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
- *
- * Next Tag: 4
- */
-message BluetoothAclConnectionStateChanged {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // The state of the connection.
-    // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
-    optional android.bluetooth.ConnectionStateEnum state = 2;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 3;
-}
-
-/**
- * Logs when a Bluetooth device connects and disconnects over SCO
- *
- * Logged from:
- *    packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
- *    packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java
- *
- * Next Tag: 5
- */
-message BluetoothScoConnectionStateChanged {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // The state of the connection.
-    // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
-    optional android.bluetooth.ConnectionStateEnum state = 2;
-    // Codec used for this SCO connection
-    // Default: UNKNOWN
-    optional android.bluetooth.hfp.ScoCodec codec = 3;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 4;
-}
-
-/**
- * Logged when active device of a profile changes
- *
- * Logged from:
- *     packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
- *     packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java
- *     packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java
- */
-message BluetoothActiveDeviceChanged {
-    // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID
-    // From android.bluetooth.BluetoothProfile
-    optional int32 bt_profile = 1;
-    // An identifier that can be used to match events for this new active device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if there is no active device for this profile
-    optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 3;
-}
-
-// Logs when there is an event affecting Bluetooth device's link layer connection.
-// - This event is triggered when there is a related HCI command or event
-// - Users of this metrics can deduce Bluetooth device's connection state from these events
-// - HCI commands are logged before the command is sent, after receiving command status, and after
-//   receiving command complete
-// - HCI events are logged when they arrive
-//
-// Low level log from system/bt
-//
-// Bluetooth classic commands:
-// - CMD_CREATE_CONNECTION
-// - CMD_DISCONNECT
-// - CMD_CREATE_CONNECTION_CANCEL
-// - CMD_ACCEPT_CONNECTION_REQUEST
-// - CMD_REJECT_CONNECTION_REQUEST
-// - CMD_SETUP_ESCO_CONNECTION
-// - CMD_ACCEPT_ESCO_CONNECTION
-// - CMD_REJECT_ESCO_CONNECTION
-// - CMD_ENH_SETUP_ESCO_CONNECTION
-// - CMD_ENH_ACCEPT_ESCO_CONNECTION
-//
-// Bluetooth low energy commands:
-// - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00]
-// - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
-// - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
-// - CMD_BLE_CLEAR_WHITE_LIST
-// - CMD_BLE_ADD_WHITE_LIST
-// - CMD_BLE_REMOVE_WHITE_LIST
-//
-// Bluetooth classic events:
-// - EVT_CONNECTION_COMP
-// - EVT_CONNECTION_REQUEST
-// - EVT_DISCONNECTION_COMP
-// - EVT_ESCO_CONNECTION_COMP
-// - EVT_ESCO_CONNECTION_CHANGED
-//
-// Bluetooth low energy meta events:
-// - BLE_EVT_CONN_COMPLETE_EVT
-// - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT
-//
-// Next tag: 10
-message BluetoothLinkLayerConnectionEvent {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Connection handle of this connection if available
-    // Range: 0x0000 - 0x0EFF (12 bits)
-    // Default: 0xFFFF if the handle is unknown
-    optional int32 connection_handle = 2;
-    // Direction of the link
-    // Default: DIRECTION_UNKNOWN
-    optional android.bluetooth.DirectionEnum direction = 3;
-    // Type of this link
-    // Default: LINK_TYPE_UNKNOWN
-    optional android.bluetooth.LinkTypeEnum type = 4;
-
-    // Reason metadata for this link layer connection event, rules for interpretation:
-    // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or
-    //    EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case
-    // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is
-    //    set and valid, ignore hci_ble_event
-
-    // HCI command associated with this event
-    // Default: CMD_UNKNOWN
-    optional android.bluetooth.hci.CommandEnum hci_cmd = 5;
-    // HCI event associated with this event
-    // Default: EVT_UNKNOWN
-    optional android.bluetooth.hci.EventEnum hci_event = 6;
-    // HCI BLE meta event associated with this event
-    // Default: BLE_EVT_UNKNOWN
-    optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7;
-    // HCI command status code if this is triggerred by hci_cmd
-    // Default: STATUS_UNKNOWN
-    optional android.bluetooth.hci.StatusEnum cmd_status = 8;
-    // HCI reason code associated with this event
-    // Default: STATUS_UNKNOWN
-    optional android.bluetooth.hci.StatusEnum reason_code = 9;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 10;
-}
-
-/**
- * Logs when a module is rolled back by Watchdog.
- *
- * Logged from: Rollback Manager
- */
-message WatchdogRollbackOccurred {
-    enum RollbackType {
-        UNKNOWN = 0;
-        ROLLBACK_INITIATE = 1;
-        ROLLBACK_SUCCESS = 2;
-        ROLLBACK_FAILURE = 3;
-        ROLLBACK_BOOT_TRIGGERED = 4;
-    }
-    optional RollbackType rollback_type = 1;
-
-    optional string package_name = 2;
-
-    optional int32 package_version_code = 3;
-
-    enum RollbackReasonType {
-        REASON_UNKNOWN = 0;
-        REASON_NATIVE_CRASH = 1;
-        REASON_EXPLICIT_HEALTH_CHECK = 2;
-        REASON_APP_CRASH = 3;
-        REASON_APP_NOT_RESPONDING = 4;
-        REASON_NATIVE_CRASH_DURING_BOOT = 5;
-    }
-    optional RollbackReasonType rollback_reason = 4;
-
-    // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback
-    // is initiated. Empty if the package is unknown.
-    optional string failing_package_name = 5;
-
-    optional TrainExperimentIds experiment_ids = 6 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Logs when there is a change in Bluetooth A2DP playback state
- *
- * Logged from:
- *     packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
- */
-message BluetoothA2dpPlaybackStateChanged {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Current playback state
-    // Default: PLAYBACK_STATE_UNKNOWN
-    optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2;
-    // Current audio coding mode
-    // Default: AUDIO_CODING_MODE_UNKNOWN
-    optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 4;
-}
-
-/**
- * Logs when there is a change in A2DP codec config for a particular remote device
- *
- * Logged from:
- *     frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
- *     packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
- */
-message BluetoothA2dpCodecConfigChanged {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
-    // Default SOURCE_CODEC_TYPE_INVALID
-    optional int32 codec_type = 2;
-    // Codec priroity, the higher the more preferred, -1 for disabled
-    // Default: CODEC_PRIORITY_DEFAULT
-    optional int32 codec_priority = 3;
-    // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig
-    // Default: SAMPLE_RATE_NONE
-    optional int32 sample_rate = 4;
-    // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig
-    // Default: BITS_PER_SAMPLE_NONE
-    optional int32 bits_per_sample = 5;
-    // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig
-    // Default: CHANNEL_MODE_NONE
-    optional int32 channel_mode = 6;
-    // Codec specific values
-    // Default 0
-    optional int64 codec_specific_1 = 7;
-    optional int64 codec_specific_2 = 8;
-    optional int64 codec_specific_3 = 9;
-    optional int64 codec_specific_4 = 10;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 11;
-}
-
-/**
- * Logs when there is a change in selectable A2DP codec capability for a paricular remote device
- * Each codec's capability is logged separately due to statsd restriction
- *
- * Logged from:
- *     frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
- *     packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
- */
-message BluetoothA2dpCodecCapabilityChanged {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
-    // Default SOURCE_CODEC_TYPE_INVALID
-    optional int32 codec_type = 2;
-    // Codec priroity, the higher the more preferred, -1 for disabled
-    // Default: CODEC_PRIORITY_DEFAULT
-    optional int32 codec_priority = 3;
-    // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants
-    // in BluetoothCodecConfig
-    // Default: empty and SAMPLE_RATE_NONE for individual item
-    optional int32 sample_rate = 4;
-    // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants
-    // in BluetoothCodecConfig
-    // Default: empty and BITS_PER_SAMPLE_NONE for individual item
-    optional int32 bits_per_sample = 5;
-    // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in
-    // BluetoothCodecConfig
-    // Default: empty and CHANNEL_MODE_NONE for individual item
-    optional int32 channel_mode = 6;
-    // Codec specific values
-    // Default 0
-    optional int64 codec_specific_1 = 7;
-    optional int64 codec_specific_2 = 8;
-    optional int64 codec_specific_3 = 9;
-    optional int64 codec_specific_4 = 10;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 11;
-}
-
-/**
- * Logs when A2DP failed to read from PCM source.
- * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding.
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothA2dpAudioUnderrunReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Encoding interval in nanoseconds
-    // Default: 0
-    optional int64 encoding_interval_nanos = 2;
-    // Number of bytes of PCM data that could not be read from the source
-    // Default: 0
-    optional int32 num_missing_pcm_bytes = 3;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 4;
-}
-
-/**
- * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit
- * buffer queue is full and we have to drop data
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothA2dpAudioOverrunReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Encoding interval in nanoseconds
-    // Default: 0
-    optional int64 encoding_interval_nanos = 2;
-    // Number of buffers dropped in this event
-    // Each buffer is encoded in one encoding interval and consists of multiple encoded frames
-    // Default: 0
-    optional int32 num_dropped_buffers = 3;
-    // Number of encoded buffers dropped in this event
-    // Default 0
-    optional int32 num_dropped_encoded_frames = 4;
-    // Number of encoded bytes dropped in this event
-    // Default: 0
-    optional int32 num_dropped_encoded_bytes = 5;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 6;
-}
-
-/**
- * Logs when we receive reports regarding a device's RSSI value
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothDeviceRssiReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Connection handle of this connection if available
-    // Range: 0x0000 - 0x0EFF (12 bits)
-    // Default: 0xFFFF if the handle is unknown
-    optional int32 connection_handle = 2;
-    // HCI command status code if this is triggerred by hci_cmd
-    // Default: STATUS_UNKNOWN
-    optional android.bluetooth.hci.StatusEnum hci_status = 3;
-    // BR/EDR
-    //   Range: -128 ≤ N ≤ 127 (signed integer)
-    //   Units: dB
-    // LE:
-    //   Range: -127 to 20, 127 (signed integer)
-    //   Units: dBm
-    // Invalid when an out of range value is reported
-    optional int32 rssi = 4;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 5;
-}
-
-/**
- * Logs when we receive reports regarding how many consecutive failed contacts for a connection
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothDeviceFailedContactCounterReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Connection handle of this connection if available
-    // Range: 0x0000 - 0x0EFF (12 bits)
-    // Default: 0xFFFF if the handle is unknown
-    optional int32 connection_handle = 2;
-    // HCI command status code if this is triggerred by hci_cmd
-    // Default: STATUS_UNKNOWN
-    optional android.bluetooth.hci.StatusEnum cmd_status = 3;
-    // Number of consecutive failed contacts for a connection corresponding to the Handle
-    // Range: uint16_t, 0-0xFFFF
-    // Default: 0xFFFFF
-    optional int32 failed_contact_counter = 4;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 5;
-}
-
-/**
- * Logs when we receive reports regarding the tranmit power level used for a specific connection
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothDeviceTxPowerLevelReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Connection handle of this connection if available
-    // Range: 0x0000 - 0x0EFF (12 bits)
-    // Default: 0xFFFF if the handle is unknown
-    optional int32 connection_handle = 2;
-    // HCI command status code if this is triggered by hci_cmd
-    // Default: STATUS_UNKNOWN
-    optional android.bluetooth.hci.StatusEnum hci_status = 3;
-    // Range: -30 ≤ N ≤ 20
-    // Units: dBm
-    // Invalid when an out of range value is reported
-    optional int32 transmit_power_level = 4;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 5;
-}
-
-/**
- * Logs when Bluetooth controller failed to reply with command status within a timeout period after
- * receiving an HCI command from the host
- *
- * Logged from: system/bt
- */
-message BluetoothHciTimeoutReported {
-    // HCI command associated with this event
-    // Default: CMD_UNKNOWN
-    optional android.bluetooth.hci.CommandEnum hci_command = 1;
-}
-
-/**
- * Logs when we receive Bluetooth Link Quality Report event from the controller
- * See Android Bluetooth HCI specification for more details
- *
- * Note: all count and bytes field are counted since last event
- *
- * Logged from: system/bt
- */
-message BluetoothQualityReportReported {
-    // Quality report ID
-    // Original type: uint8_t
-    // Default: BQR_ID_UNKNOWN
-    optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1;
-    // Packet type of the connection
-    // Original type: uint8_t
-    // Default: BQR_PACKET_TYPE_UNKNOWN
-    optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2;
-    // Connection handle of the connection
-    // Original type: uint16_t
-    optional int32 connection_handle = 3;
-    // Performing Role for the connection
-    // Original type: uint8_t
-    optional int32 connection_role = 4;
-    // Current Transmit Power Level for the connection. This value is the same as the controller's
-    // response to the HCI_Read_Transmit_Power_Level HCI command
-    // Original type: uint8_t
-    optional int32 tx_power_level = 5;
-    // Received Signal Strength Indication (RSSI) value for the connection. This value is an
-    // absolute receiver signal strength value
-    // Original type: int8_t
-    optional int32 rssi = 6;
-    // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the
-    // channels used by the link currently
-    // Original type: uint8_t
-    optional int32 snr = 7;
-    // Indicates the number of unused channels in AFH_channel_map
-    // Original type: uint8_t
-    optional int32 unused_afh_channel_count = 8;
-    // Indicates the number of the channels which are interfered and quality is bad but are still
-    // selected for AFH
-    // Original type: uint8_t
-    optional int32 afh_select_unideal_channel_count = 9;
-    // Current Link Supervision Timeout Setting
-    // Unit: N * 0.3125 ms (1 Bluetooth Clock)
-    // Original type: uint16_t
-    optional int32 lsto = 10;
-    // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's
-    // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of
-    // 0x01 (Piconet Clock)
-    // Unit: N * 0.3125 ms (1 Bluetooth Clock)
-    // Original type: uint32_t
-    optional int64 connection_piconet_clock = 11;
-    // The count of retransmission
-    // Original type: uint32_t
-    optional int64 retransmission_count = 12;
-    // The count of no RX
-    // Original type: uint32_t
-    optional int64 no_rx_count = 13;
-    // The count of NAK (Negative Acknowledge)
-    // Original type: uint32_t
-    optional int64 nak_count = 14;
-    // Controller timestamp of last TX ACK
-    // Unit: N * 0.3125 ms (1 Bluetooth Clock)
-    // Original type: uint32_t
-    optional int64 last_tx_ack_timestamp = 15;
-    // The count of Flow-off (STOP)
-    // Original type: uint32_t
-    optional int64 flow_off_count = 16;
-    // Controller timestamp of last Flow-on (GO)
-    // Unit: N * 0.3125 ms (1 Bluetooth Clock)
-    // Original type: uint32_t
-    optional int64 last_flow_on_timestamp = 17;
-    // Buffer overflow count (how many bytes of TX data are dropped) since the last event
-    // Original type: uint32_t
-    optional int64 buffer_overflow_bytes = 18;
-    // Buffer underflow count (in byte) since last event
-    // Original type: uint32_t
-    optional int64 buffer_underflow_bytes = 19;
-}
-
-/**
- * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack
- *
- * Notes:
- * - Each event can be partially filled as we might learn different pieces of device
- *   information at different time
- * - Multiple device info events can be combined to give more complete picture
- * - When multiple device info events tries to describe the same information, the
- *   later one wins
- *
- * Logged from:
- *     packages/apps/Bluetooth
- */
-message BluetoothDeviceInfoReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Where is this device info obtained from
-    optional android.bluetooth.DeviceInfoSrcEnum source_type = 2;
-    // Name of the data source
-    // For EXTERNAL: package name of the data source
-    // For INTERNAL: null for general case, component name otherwise
-    optional string source_name = 3;
-    // Name of the manufacturer of this device
-    optional string manufacturer = 4;
-    // Model of this device
-    optional string model = 5;
-    // Hardware version of this device
-    optional string hardware_version = 6;
-    // Software version of this device
-    optional string software_version = 7;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 8;
-}
-
-/**
- * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote
- * device, as documented by the Bluetooth Core HCI specification
- * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification
- * Vol 2, Part E, Page 1118
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothRemoteVersionInfoReported {
-    // Connection handle of the connection
-    // Original type: uint16_t
-    optional int32 connection_handle = 1;
-    // HCI command status code
-    // Default: STATUS_UNKNOWN
-    optional android.bluetooth.hci.StatusEnum hci_status = 2;
-    // 1 byte Version of current LMP in the remote controller
-    optional int32 lmp_version = 3;
-    // 2 bytes LMP manufacturer code of the remote controller
-    // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
-    optional int32 lmp_manufacturer_code = 4;
-    // 4 bytes subversion of the LMP in the remote controller
-    optional int32 lmp_subversion = 5;
-}
-
-/**
- * Logs when certain Bluetooth SDP attributes are discovered
- * Constant definitions are from:
- *     https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
- *
- * Current logged attributes:
- * - BluetoothProfileDescriptorList
- * - Supported Features Bitmask
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothSdpAttributeReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes
-    // Original type: uint16_t
-    optional int32 protocol_uuid = 2;
-    // Short form UUIDs used to identify Bluetooth SDP attribute types
-    // Original type: uint16_t
-    optional int32 attribute_id = 3;
-    // Attribute value for the particular attribute
-    optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 5;
-}
-
-/**
- * Logs when bond state of a Bluetooth device changes
- *
- * Logged from:
- *     frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
- *     packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
- */
-message BluetoothBondStateChanged {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Preferred transport type to remote dual mode device
-    // Default: TRANSPORT_AUTO means no preference
-    optional android.bluetooth.TransportTypeEnum transport = 2;
-    // The type of this Bluetooth device (Classic, LE, or Dual mode)
-    // Default: UNKNOWN
-    optional android.bluetooth.DeviceTypeEnum type = 3;
-    // Current bond state (NONE, BONDING, BONDED)
-    // Default: BOND_STATE_UNKNOWN
-    optional android.bluetooth.BondStateEnum bond_state = 4;
-    // Bonding sub state
-    // Default: BOND_SUB_STATE_UNKNOWN
-    optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5;
-    // Unbond Reason
-    // Default: UNBOND_REASON_UNKNOWN
-    optional android.bluetooth.UnbondReasonEnum unbond_reason = 6;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 7;
-}
-
-/**
- * Logs there is an event related Bluetooth classic pairing
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothClassicPairingEventReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Connection handle of this connection if available
-    // Range: 0x0000 - 0x0EFF (12 bits)
-    // Default: 0xFFFF if the handle is unknown
-    optional int32 connection_handle = 2;
-    // HCI command associated with this event
-    // Default: CMD_UNKNOWN
-    optional android.bluetooth.hci.CommandEnum hci_cmd = 3;
-    // HCI event associated with this event
-    // Default: EVT_UNKNOWN
-    optional android.bluetooth.hci.EventEnum hci_event = 4;
-    // HCI command status code if this is triggerred by hci_cmd
-    // Default: STATUS_UNKNOWN
-    optional android.bluetooth.hci.StatusEnum cmd_status = 5;
-    // HCI reason code associated with this event
-    // Default: STATUS_UNKNOWN
-    optional android.bluetooth.hci.StatusEnum reason_code = 6;
-    // A status value related to this specific event
-    // Default: 0
-    optional int64 event_value = 7;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 8;
-}
-
-/**
- * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP)
- *
- * Logged from:
- *     system/bt
- */
-message BluetoothSmpPairingEventReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if the device identifier is not known
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // SMP command sent or received over L2CAP
-    // Default: CMD_UNKNOWN
-    optional android.bluetooth.smp.CommandEnum smp_command = 2;
-    // Whether this command is sent or received
-    // Default: DIRECTION_UNKNOWN
-    optional android.bluetooth.DirectionEnum direction = 3;
-    // SMP failure reason code
-    // Default: PAIRING_FAIL_REASON_DEFAULT
-    optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 5;
-}
-
-/**
- * Logs when a Bluetooth socket’s connection state changed
- *
- * Logged from:
- *   system/bt
- */
-message BluetoothSocketConnectionStateChanged {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if this is a server listener socket
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Temporary port of this socket for the current connection or session only
-    // Default 0 when unknown or don't care
-    optional int32 port = 2;
-    // Socket type as mentioned in
-    // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
-    // Default: SOCKET_TYPE_UNKNOWN
-    optional android.bluetooth.SocketTypeEnum type = 3;
-    // Socket connection state
-    // Default: SOCKET_CONNECTION_STATE_UNKNOWN
-    optional android.bluetooth.SocketConnectionstateEnum state = 4;
-    // Number of bytes sent to remote device during this connection
-    optional int64 tx_bytes = 5;
-    // Number of bytes received from remote device during this connection
-    optional int64 rx_bytes = 6;
-    // Socket owner's UID
-    optional int32 uid = 7 [(is_uid) = true];
-    // Server port of this socket, if any. When both |server_port| and |port| fields are populated,
-    // |port| must be spawned by |server_port|
-    // Default 0 when unknown or don't care
-    optional int32 server_port = 8;
-    // Whether this is a server listener socket
-    optional android.bluetooth.SocketRoleEnum is_server = 9;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 10;
-}
-
-/**
- * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection
- *
- * Logged from:
- *   packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
- *   packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
- *
- */
-message BluetoothClassOfDeviceReported {
-    // An identifier that can be used to match events for this device.
-    // Currently, this is a salted hash of the MAC address of this Bluetooth device.
-    // Salt: Randomly generated 256 bit value
-    // Hash algorithm: HMAC-SHA256
-    // Size: 32 byte
-    // Default: null or empty if this is a server listener socket
-    optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Class of Device (CoD) value including both Major, Minor device class and service class
-    // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband
-    // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass
-    // Default: 0
-    optional int32 class_of_device = 2;
-    // An identifier that can be used to match events for this device.
-    // The incremental identifier is locally generated and guaranteed not derived
-    // from any globally unique hardware id.
-    // For paired devices, it stays consistent between Bluetooth toggling for the
-    // same remote device.
-    // For unpaired devices, it stays consistent within the same Bluetooth adapter
-    // session for the same remote device.
-    // Default: 0 if the device's metric id is unknown.
-    optional int32 metric_id = 3;
-}
-
-/**
- * Logs when something is plugged into or removed from the USB-C connector.
- *
- * Logged from:
- *  UsbService
- */
-message UsbConnectorStateChanged {
-    enum State {
-        STATE_DISCONNECTED = 0;
-        STATE_CONNECTED = 1;
-    }
-    optional State state = 1
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-    optional string id = 2 [(state_field_option).primary_field = true];
-    // Last active session in ms.
-    // 0 when the port is in connected state.
-    optional int64 last_connect_duration_millis = 3;
-}
-
-/**
- * Logs the reported speaker impedance.
- *
- * Logged from:
- *  Vendor audio implementation.
- */
-message SpeakerImpedanceReported {
-    optional int32 speaker_location = 1;
-    optional int32 impedance = 2;
-}
-
-/**
- * Logs the report of a failed hardware.
- *
- * Logged from:
- *  Vendor HALs.
- *
- */
-message HardwareFailed {
-    enum HardwareType {
-        HARDWARE_FAILED_UNKNOWN = 0;
-        HARDWARE_FAILED_MICROPHONE = 1;
-        HARDWARE_FAILED_CODEC = 2;
-        HARDWARE_FAILED_SPEAKER = 3;
-        HARDWARE_FAILED_FINGERPRINT = 4;
-    }
-    optional HardwareType hardware_type = 1;
-
-   /**
-    * hardware_location allows vendors to differentiate between multiple instances of
-    * the same hardware_type.  The specific locations are vendor defined integers,
-    * referring to board-specific numbering schemes.
-    */
-    optional int32 hardware_location = 2;
-
-    /**
-     * failure_code is specific to the HardwareType of the failed hardware.
-     * It should use one of the enum values defined below.
-     */
-    enum HardwareErrorCode {
-        UNKNOWN = 0;
-        COMPLETE = 1;
-        SPEAKER_HIGH_Z = 2;
-        SPEAKER_SHORT = 3;
-        FINGERPRINT_SENSOR_BROKEN = 4;
-        FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5;
-        DEGRADE = 6;
-    }
-    optional int32 failure_code = 3;
-}
-
-/**
- * Log an event when the device has been physically dropped.
- * Reported from the /vendor partition.
- */
-message PhysicalDropDetected {
-    // Confidence that the event was actually a drop, 0 -> 100
-    optional int32 confidence_pctg = 1;
-    // Peak acceleration of the drop, in 1/1000s of a g.
-    optional int32 accel_peak_thousandths_g = 2;
-    // Duration of freefall in ms
-    optional int32 freefall_time_millis = 3;
-}
-
-/**
- * Log bucketed battery charge cycles.
- *
- * Each bucket represents cycles of the battery past
- * a given charge point.  For example, if 10 cycle buckets are
- * initialized, bucket 1 is the lowest 1/10th of the battery,
- * and bucket 10 is 100%.
- *
- * Logged from:
- * /sys/class/power_supply/bms/cycle_count, via Vendor.
- */
-message ChargeCyclesReported {
-    optional int32 cycle_bucket_1 = 1;
-    optional int32 cycle_bucket_2 = 2;
-    optional int32 cycle_bucket_3 = 3;
-    optional int32 cycle_bucket_4 = 4;
-    optional int32 cycle_bucket_5 = 5;
-    optional int32 cycle_bucket_6 = 6;
-    optional int32 cycle_bucket_7 = 7;
-    optional int32 cycle_bucket_8 = 8;
-    optional int32 cycle_bucket_9 = 9;
-    optional int32 cycle_bucket_10 = 10;
-}
-
-/**
- * Log battery health snapshot.
- *
- * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level
- * are snapshotted periodically over 24hrs.
- */
-message BatteryHealthSnapshot {
-    enum BatterySnapshotType {
-        UNKNOWN = 0;
-        MIN_TEMP = 1;         // Snapshot at min batt temp over 24hrs.
-        MAX_TEMP = 2;         // Snapshot at max batt temp over 24hrs.
-        MIN_RESISTANCE = 3;   // Snapshot at min batt resistance over 24hrs.
-        MAX_RESISTANCE = 4;   // Snapshot at max batt resistance over 24hrs.
-        MIN_VOLTAGE = 5;      // Snapshot at min batt voltage over 24hrs.
-        MAX_VOLTAGE = 6;      // Snapshot at max batt voltage over 24hrs.
-        MIN_CURRENT = 7;      // Snapshot at min batt current over 24hrs.
-        MAX_CURRENT = 8;      // Snapshot at max batt current over 24hrs.
-        MIN_BATT_LEVEL = 9;   // Snapshot at min battery level (SoC) over 24hrs.
-        MAX_BATT_LEVEL = 10;  // Snapshot at max battery level (SoC) over 24hrs.
-        AVG_RESISTANCE = 11;  // Snapshot at average battery resistance over 24hrs.
-    }
-    optional BatterySnapshotType type = 1;
-    // Temperature, in 1/10ths of degree C.
-    optional int32 temperature_deci_celsius = 2;
-    // Voltage Battery Voltage, in microVolts.
-    optional int32 voltage_micro_volt = 3;
-    // Current Battery current, in microAmps.
-    optional int32 current_micro_amps = 4;
-    // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts.
-    optional int32 open_circuit_micro_volt = 5;
-    // Resistance Battery Resistance, in microOhms.
-    optional int32 resistance_micro_ohm = 6;
-    // Level Battery Level, as % of full.
-    optional int32 level_percent = 7;
-}
-
-/**
- * Log slow I/O operations on the primary storage.
- */
-message SlowIo {
-    // Classifications of IO Operations.
-    enum IoOperation {
-        UNKNOWN = 0;
-        READ = 1;
-        WRITE = 2;
-        UNMAP = 3;
-        SYNC = 4;
-    }
-    optional IoOperation operation = 1;
-
-    // The number of slow IO operations of this type over 24 hours.
-    optional int32 count = 2;
-}
-
-/**
- * Log battery caused shutdown with the last recorded voltage.
- */
-message BatteryCausedShutdown {
-    // The last recorded battery voltage prior to shutdown.
-    optional int32 last_recorded_micro_volt = 1;
-}
-
-/**
- * Logs when ThermalService receives throttling events.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
- */
-message ThermalThrottlingSeverityStateChanged {
-    // The type of temperature being reported (CPU, GPU, SKIN, etc)
-    optional android.os.TemperatureTypeEnum sensor_type = 1;
-
-    // The name of the temperature source. Eg. CPU0
-    optional string sensor_name = 2;
-
-    // Temperature in tenths of a degree C.
-    // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
-    optional int32 temperature_deci_celsius = 3;
-
-    // Relative severity of the throttling, see enum definition.
-    optional android.os.ThrottlingSeverityEnum severity = 4;
-}
-
-/**
- * Logs the duration of a davey (jank of >=700ms) when it occurs
- *
- * Logged from:
- *   frameworks/base/libs/hwui/JankTracker.cpp
- */
-message DaveyOccurred {
-    // The UID that logged this atom.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Amount of time it took to render the frame. Should be >=700ms.
-    optional int64 jank_duration_millis = 2;
-}
-
-/**
- * Logs phone signal strength changes.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message PhoneSignalStrengthChanged {
-    // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
-    optional android.telephony.SignalStrengthEnum signal_strength = 1;
-}
-
-
-/**
- * Logs when the phone state, sim state or signal strength changes
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message PhoneServiceStateChanged {
-    optional android.telephony.ServiceStateEnum state = 1;
-    optional android.telephony.SimStateEnum sim_state = 2;
-    optional android.telephony.SignalStrengthEnum signal_strength = 3;
-}
-
-/**
- * Logs when the phone becomes on or off.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java
- */
-message PhoneStateChanged {
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 1;
-}
-
-message BackGesture {
-    enum BackType {
-        DEFAULT_BACK_TYPE = 0;
-        COMPLETED = 1;
-        COMPLETED_REJECTED = 2; // successful because coming from rejected area
-        INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area
-        INCOMPLETE = 4;  // Unsuccessful, for reasons other than below.
-        INCOMPLETE_FAR_FROM_EDGE = 5;  // Unsuccessful, far from the edge.
-        INCOMPLETE_MULTI_TOUCH = 6;  // Unsuccessful, multi touch.
-        INCOMPLETE_LONG_PRESS = 7;  // Unsuccessful, long press.
-        INCOMPLETE_VERTICAL_MOVE = 8;  // Unsuccessful, move vertically.
-    }
-    optional BackType type = 1;
-
-    optional int32 y_coordinate = 2 [deprecated = true]; // y coordinate for ACTION_DOWN event
-    optional int32 start_x = 4;  // X coordinate for ACTION_DOWN event.
-    optional int32 start_y = 5;  // Y coordinate for ACTION_DOWN event.
-    optional int32 end_x = 6;   // X coordinate for ACTION_MOVE event.
-    optional int32 end_y = 7;  // Y coordinate for ACTION_MOVE event.
-    optional int32 left_boundary = 8;  // left edge width + left inset
-    optional int32 right_boundary = 9;  // screen width - (right edge width + right inset)
-
-    enum WindowHorizontalLocation {
-        DEFAULT_LOCATION = 0;
-        LEFT = 1;
-        RIGHT = 2;
-    }
-    optional WindowHorizontalLocation x_location = 3 [deprecated = true];
-}
-
-message ExclusionRectStateChanged {
-    optional string component_name = 1;    // if not available, simply packageName
-    optional int32 requested_height = 2;   // px
-    optional int32 rejected_height = 3;    // px
-
-    enum WindowHorizontalLocation {
-        DEFAULT_LOCATION = 0;
-        LEFT = 1;
-        RIGHT = 2;
-    }
-    optional WindowHorizontalLocation x_location = 4;
-    optional bool landscape = 5;
-    optional bool splitscreen = 6;
-    optional int32 duration_millis = 7;
-}
-
-/**
- * Logs when IME is on.
- *
- * Logged from: /packages/SystemUI/src/com/android/systemui/
-                statusbar/phone/NavigationBarView.java
- *
- */
-message ImeTouchReported {
-    optional int32 x_coordinate = 1;  // X coordinate for ACTION_DOWN event.
-    optional int32 y_coordinate = 2;  // Y coordinate for ACTION_DOWN event.
-}
-
-/**
- * Logs when Launcher (HomeScreen) UI has changed or was interacted.
- *
- * Logged from:
- *   packages/apps/Launcher3
- */
-message LauncherUIChanged {
-    optional android.stats.launcher.LauncherAction action = 1 [deprecated = true];
-    optional android.stats.launcher.LauncherState src_state = 2;
-    optional android.stats.launcher.LauncherState dst_state = 3;
-    optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES, deprecated = true];
-    optional bool is_swipe_up_enabled = 5 [deprecated = true];
-
-    // The event id (e.g., app launch, drag and drop, long press)
-    optional int32 event_id = 6;
-    // The event's source or target id (e.g., icon, task, button)
-    optional int32 target_id = 7;
-    // If the target needs to be tracked, use this id field
-    optional int32 instance_id = 8;
-    optional int32 uid = 9 [(is_uid) = true];
-    optional string package_name = 10;
-    optional string component_name = 11;
-
-    // (x, y) coordinate and the index information of the target on the container
-    optional int32 grid_x = 12 [default = -1];
-    optional int32 grid_y = 13 [default = -1];
-    optional int32 page_id = 14 [default = -2];
-
-    // e.g., folder icon's (x, y) location and index information on the workspace
-    optional int32 grid_x_parent = 15 [default = -1];
-    optional int32 grid_y_parent = 16 [default = -1];
-    optional int32 page_id_parent = 17 [default = -2];
-
-    // e.g., SEARCHBOX_ALLAPPS, FOLDER_WORKSPACE
-    optional int32 hierarchy = 18;
-
-    optional bool is_work_profile = 19;
-
-    // Used to store the predicted rank of the target
-    optional int32 rank = 20 [default = -1];
-
-    // e.g., folderLabelState can be captured in the following two fields
-    optional int32 from_state = 21;
-    optional int32 to_state = 22;
-
-    // e.g., autofilled or suggested texts that are not user entered
-    optional string edittext = 23;
-
-    // e.g., number of contents inside a container (e.g., icons inside a folder)
-    optional int32 cardinality = 24;
-}
-
-/**
- * Used for snapshot of the HomeScreen UI elements
- *
- * Logged from:
- *   packages/apps/Launcher3
- */
-message LauncherStaticLayout {
-    // The event id (e.g., snapshot, drag and drop)
-    optional int32 event_id = 1;
-    // The event's source or target id (e.g., icon, shortcut, widget)
-    optional int32 target_id = 2;
-    // If the target needs to be tracked, use this id field
-    optional int32 instance_id = 3;
-    optional int32 uid = 4 [(is_uid) = true];
-    optional string package_name = 5;
-    optional string component_name = 6;
-
-    // (x, y) coordinate and the index information of the target on the container
-    optional int32 grid_x = 7 [default = -1];
-    optional int32 grid_y = 8 [default = -1];
-    optional int32 page_id = 9 [default = -2];
-
-    // e.g., folder icon's (x, y) location and index information on the workspace
-    // e.g., when used with widgets target, use these values for (span_x, span_y)
-    optional int32 grid_x_parent = 10 [default = -1];
-    optional int32 grid_y_parent = 11 [default = -1];
-    optional int32 page_id_parent = 12 [default = -2];
-
-    // UNKNOWN = 0
-    // HOTSEAT = 1
-    // WORKSPACE = 2
-    // FOLDER_HOTSEAT = 3
-    // FOLDER_WORKSPACE = 4
-    optional int32 hierarchy = 13;
-
-    optional bool is_work_profile = 14;
-
-    // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION
-    optional int32 origin = 15;
-
-    // e.g., number of icons inside a folder
-    optional int32 cardinality = 16;
-
-    // e.g., (x, y) span of the widget inside homescreen grid system
-    optional int32 span_x = 17 [default = 1];
-    optional int32 span_y = 18 [default = 1];
-}
-
-/**
- * Logs when Wallpaper or ThemePicker UI has changed.
- *
- * Logged from:
- *   packages/apps/ThemePicker
- *   packages/apps/WallpaperPicker2
- */
-message StyleUIChanged {
-    optional android.stats.style.Action action = 1;
-    optional int32 color_package_hash = 2;
-    optional int32 font_package_hash  = 3;
-    optional int32 shape_package_hash = 4;
-    optional int32 clock_package_hash = 5;
-    optional int32 launcher_grid = 6;
-    optional int32 wallpaper_category_hash = 7;
-    optional int32 wallpaper_id_hash = 8;
-    optional int32 color_preference = 9;
-    optional android.stats.style.LocationPreference location_preference = 10;
-}
-
-/**
- * Logs when Settings UI has changed.
- *
- * Logged from:
- *   packages/apps/Settings
- */
-message SettingsUIChanged {
-    /**
-     * Where this SettingsUIChange event comes from. For example, if
-     * it's a PAGE_VISIBLE event, where the page is opened from.
-     */
-    optional android.app.settings.PageId attribution = 1;
-
-    /**
-     * What the UI action is.
-     */
-    optional android.app.settings.Action action = 2;
-
-    /**
-     * Where the action is happening
-     */
-    optional android.app.settings.PageId page_id = 3;
-
-    /**
-     * What preference changed in this event.
-     */
-    optional string changed_preference_key = 4;
-
-    /**
-     * The new value of the changed preference.
-     */
-    optional int64 changed_preference_int_value = 5;
-}
-
-/**
- * Logs basic timing information about touch events.
- * Reported at most every 5 minutes while device is being interacted with.
- *
- * Logged from:
- *   frameworks/native/services/inputflinger
- */
-message TouchEventReported {
-    /**
-     * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean,
-     * and the standard deviation of the time spent processing touchscreen events
-     * in the kernel and inputflinger. The units are microseconds.
-     *
-     * On supported devices, the starting point is taken during the hard interrupt inside the
-     * kernel touch driver. On all other devices, the starting point is taken inside
-     * the kernel's input event subsystem upon receipt of the input event.
-     * The ending point is taken inside InputDispatcher, just after the input event
-     * is sent to the app.
-     */
-    // Minimum value
-    optional float latency_min_micros = 1;
-    // Maximum value
-    optional float latency_max_micros = 2;
-    // Average value
-    optional float latency_mean_micros = 3;
-    // Standard deviation
-    optional float latency_stdev_micros = 4;
-    // Number of touch events (input_event) in this report
-    optional int32 count = 5;
-}
-
-/**
- * Logs gesture classification and timing information for touch events.
- *
- * Logged from:
- *   frameworks/base/core/java/android/view/GestureDetector.java
- *   frameworks/base/core/java/android/view/View.java
- */
-message TouchGestureClassified {
-    // The source of the classification (e.g. Java class name).
-    optional string source = 1;
-
-    enum Classification {
-        UNKNOWN_CLASSIFICATION = 0;
-        SINGLE_TAP = 1;
-        DOUBLE_TAP = 2;
-        LONG_PRESS = 3;
-        DEEP_PRESS = 4;
-        SCROLL = 5;
-    }
-    // The classification of the gesture.
-    optional Classification classification = 2;
-
-    // The interval from the start of a touch event stream until the
-    // classification was made.
-    optional int32 latency_millis = 3;
-
-    // The distance from the location of the first touch event to the
-    // location of the touch event when the classification was made.
-    optional float displacement_px = 4;
-}
-
-/**
- * Logs that a setting was updated.
- * Logged from:
- *   frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
- * The tag and is_default allow resetting of settings to default values based on the specified
- * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details.
- */
-message SettingChanged {
-    // The name of the setting.
-    optional string setting = 1;
-
-    // The change being imposed on this setting. May represent a number, eg "3".
-    optional string value = 2;
-
-    // The new value of this setting. For most settings, this is same as value. For some settings,
-    // value is +X or -X where X represents an element in a set. For example, if the previous value
-    // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C.
-    // The +/- feature is currently only used for location_providers_allowed.
-    optional string new_value = 3;
-
-    // The previous value of this setting.
-    optional string prev_value = 4;
-
-    // The tag used with the is_default for resetting sets of settings. This is generally null.
-    optional string tag = 5;
-
-    // True if this setting with tag should be resettable.
-    optional bool is_default = 6;
-
-    // The associated user (for multi-user feature). Defined in android/os/UserHandle.java
-    optional int32 user = 7;
-
-    enum ChangeReason {
-        UPDATED = 1; // Updated can be an insertion or an update.
-        DELETED = 2;
-    }
-    optional ChangeReason reason = 8;
-}
-
-/**
- * Logs activity going to foreground or background
- *
- * Logged from:
-  *   frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
- */
-message ActivityForegroundStateChanged {
-    optional int32 uid = 1 [(is_uid) = true];
-    optional string pkg_name = 2;
-    optional string class_name = 3;
-
-    enum State {
-        BACKGROUND = 0;
-        FOREGROUND = 1;
-    }
-    optional State state = 4;
-}
-
-/**
- * Logs when a volume entered low Storage state.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
- */
-message LowStorageStateChanged {
-    // Volume that ran out of storage.
-    optional string volume_description = 1;
-
-    enum State {
-        UNKNOWN = 0;
-        OFF = 1;
-        ON = 2;
-    }
-    optional State state = 2;
-}
-
-/**
- * Logs when an app is downgraded.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
- */
-message AppDowngraded {
-    optional string package_name = 1;
-    // Size of the package (all data) before being downgraded.
-    optional int64 size_in_bytes_before = 2;
-    // Size of the package (all data) after being downgraded.
-    optional int64 size_in_bytes_after = 3;
-
-    optional bool aggressive = 4;
-}
-
-/**
- * Logs when an app is optimized after being downgraded.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
- */
-message AppOptimizedAfterDowngraded {
-    optional string package_name = 1;
-}
-
-/**
- * Logs whenever an app is installed on external storage.
- * Logged from:
-        frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
- */
-message AppInstallOnExternalStorageReported {
-    // The type of external storage.
-    optional android.stats.storage.ExternalStorageType storage_type = 1;
-    // The name of the package that is installed on the sd card.
-    optional string package_name = 2;
-}
-
-/**
- * Logs when an app crashes.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message AppCrashOccurred {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional string event_type = 2;
-
-    // The name of the process.
-    // system_server if it is not by an app
-    optional string process_name = 3;
-
-    // The pid if available. -1 means not available.
-    optional int32 pid = 4;
-
-    optional string package_name = 5;
-
-    enum InstantApp {
-        UNAVAILABLE = 0;
-        FALSE = 1;
-        TRUE = 2;
-    }
-    optional InstantApp is_instant_app = 6;
-
-    enum ForegroundState {
-        UNKNOWN = 0;
-        BACKGROUND = 1;
-        FOREGROUND = 2;
-    }
-    optional ForegroundState foreground_state = 7;
-
-    optional android.server.ErrorSource error_source = 8;
-}
-
-/**
- * Logs when a WTF (What a Terrible Failure) happened.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message WTFOccurred {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional string tag = 2;
-
-    // The name of the process.
-    // system_server if it is not by an app
-    optional string process_name = 3;
-
-    // The pid if available. -1 means not available.
-    optional int32 pid = 4;
-
-    optional android.server.ErrorSource error_source = 5;
-}
-
-/**
- * Logs when system server reports low memory.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message LowMemReported {
-}
-
-/**
- * Logs when an app ANR (App Not Responding) occurs.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/am/AppErrors.java
- */
-message ANROccurred {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional string process_name = 2;
-
-    optional string short_component_name = 3;
-
-    optional string reason = 4;
-
-    enum InstantApp {
-        UNAVAILABLE = 0;
-        FALSE = 1;
-        TRUE = 2;
-    }
-    optional InstantApp is_instant_app = 5;
-
-    enum ForegroundState {
-        UNKNOWN = 0;
-        BACKGROUND = 1;
-        FOREGROUND = 2;
-    }
-    optional ForegroundState foreground_state = 6;
-
-    optional android.server.ErrorSource error_source = 7;
-
-    optional string package_name = 8;
-}
-
-/**
- * Logs when the vibrator state changes.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/VibratorService.java
- */
-message VibratorStateChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    enum State {
-        OFF = 0;
-        ON = 1;
-    }
-    optional State state = 2;
-
-    // Duration (in milliseconds) requested to keep the vibrator on.
-    // Only applicable for State == ON.
-    optional int64 duration_millis = 3;
-}
-
-/*
- * Allows other apps to push events into statsd.
- * Logged from:
- *      frameworks/base/core/java/android/util/StatsLog.java
- */
-message AppBreadcrumbReported {
-    // The uid of the application that sent this custom atom.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16).
-    optional int32 label = 2;
-
-    // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom
-    // predicates for the metrics).
-    enum State {
-        UNKNOWN = 0;
-        UNSPECIFIED = 1;  // For events that are known to not represent START/STOP.
-        STOP = 2;
-        START = 3;
-    }
-    optional State state = 3;
-}
-
-/**
- * Logs the wall-clock time when a significant wall-clock time shift occurs.
- * For example, this could be due to the user manually changing the time.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
- */
-message WallClockTimeShifted {
-    // New wall-clock time in milliseconds, according to System.currentTimeMillis().
-    optional int64 wall_clock_timestamp_millis = 1;
-}
-
-/**
- * Logs when statsd detects an anomaly.
- *
- * Logged from:
- *   frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp
- */
-message AnomalyDetected {
-    // Uid that owns the config whose anomaly detection alert fired.
-    optional int32 config_uid = 1 [(is_uid) = true];
-
-    // Id of the config whose anomaly detection alert fired.
-    optional int64 config_id = 2;
-
-    // Id of the alert (i.e. name of the anomaly that was detected).
-    optional int64 alert_id = 3;
-}
-
-message AppStartOccurred {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The app package name.
-    optional string pkg_name = 2;
-
-    enum TransitionType {
-        UNKNOWN = 0;
-        WARM = 1;
-        HOT = 2;
-        COLD = 3;
-    }
-    // The transition type.
-    optional TransitionType type = 3;
-
-    // The activity name.
-    optional string activity_name = 4;
-
-    // The name of the calling app. Empty if not set.
-    optional string calling_pkg_name = 5;
-
-    // Whether the app is an instant app.
-    optional bool is_instant_app = 6;
-
-    // Device uptime when activity started.
-    optional int64 activity_start_millis = 7;
-
-    optional android.app.AppTransitionReasonEnum reason = 8;
-
-    optional int32 transition_delay_millis = 9;
-    // -1 if not set.
-    optional int32 starting_window_delay_millis = 10;
-    // -1 if not set.
-    optional int32 bind_application_delay_millis = 11;
-    optional int32 windows_drawn_delay_millis = 12;
-
-    // Empty if not set.
-    optional string launch_token = 13;
-
-    // The compiler filter used when when the package was optimized.
-    optional int32 package_optimization_compilation_filter = 14;
-
-    // The reason why the package was optimized.
-    optional int32 package_optimization_compilation_reason = 15;
-}
-
-message AppStartCanceled {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The app package name.
-    optional string pkg_name = 2;
-
-    enum TransitionType {
-        UNKNOWN = 0;
-        WARM = 1;
-        HOT = 2;
-        COLD = 3;
-    }
-    // The transition type.
-    optional TransitionType type = 3;
-
-    // The activity name.
-    optional string activity_name = 4;
-}
-
-message AppStartFullyDrawn {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The app package name.
-    optional string pkg_name = 2;
-
-    enum TransitionType {
-        UNKNOWN = 0;
-        WITH_BUNDLE = 1;
-        WITHOUT_BUNDLE = 2;
-    }
-    // The transition type.
-    optional TransitionType type = 3;
-
-    // The activity name.
-    optional string activity_name = 4;
-
-    optional bool transition_process_running = 5;
-
-    // App startup time (until call to Activity#reportFullyDrawn()).
-    optional int64 app_startup_time_millis = 6;
-}
-
-/**
- * Logs a picture-in-picture action
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- *      frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java
- *      frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
- */
-message PictureInPictureStateChanged {
-    // -1 if it is not available
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional string short_name = 2;
-
-    enum State {
-        ENTERED = 1;
-        EXPANDED_TO_FULL_SCREEN = 2;
-        MINIMIZED = 3;
-        DISMISSED = 4;
-    }
-    optional State state = 3;
-}
-
-/**
- * Logs overlay action
- * Logged from:
- *     services/core/java/com/android/server/wm/Session.java
- */
-message OverlayStateChanged {
-    optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true];
-
-    optional string package_name = 2 [(state_field_option).primary_field = true];
-
-    optional bool using_alert_window = 3;
-
-    enum State {
-        ENTERED = 1;
-        EXITED = 2;
-    }
-    optional State state = 4
-            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs foreground service starts and stops.
- * Note that this is not when a service starts or stops, but when it is
- * considered foreground.
- * Logged from
- *     frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
- */
-message ForegroundServiceStateChanged {
-    optional int32 uid = 1 [(is_uid) = true];
-    // package_name + "/" + class_name
-    optional string short_name = 2;
-
-    enum State {
-        ENTER = 1;
-        EXIT = 2;
-    }
-    optional State state = 3;
-
-    // Whether the fgs is allowed while-in-use permissions, i.e. is considered 'in-use' to the user.
-    // (If the fgs was started while the app wasn't TOP it usually will be denied these permissions)
-    optional bool allow_while_in_use_permission = 4;
-}
-
-/**
- * Logs the number of times a uid accesses a sensitive AppOp during a foreground service session.
- * A foreground service session is any continuous period during which the uid holds at least one
- * foreground service; the atom will be pushed when the uid no longer holds any foreground services.
- * Accesses initiated while the uid is in the TOP state are ignored.
- * Sessions with no attempted accesses are not logged.
- * Logged from
- *     frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
- */
-message ForegroundServiceAppOpSessionEnded {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The operation's name.
-    // Only following four ops are logged
-    // COARSE_LOCATION = 0
-    // FINE_LOCATION = 1
-    // CAMERA = 26
-    // RECORD_AUDIO = 27
-    optional android.app.AppOpEnum app_op_name = 2 [default = APP_OP_NONE];
-
-    // The uid's permission mode for accessing the AppOp during this fgs session.
-    enum Mode {
-        MODE_UNKNOWN = 0;
-        MODE_ALLOWED = 1; // Always allowed
-        MODE_IGNORED = 2; // Denied
-        MODE_FOREGROUND = 3; // Allow-while-in-use (or allowed-one-time)
-    }
-    optional Mode app_op_mode = 3;
-
-    // Number of times this AppOp was requested and allowed.
-    optional int32 count_ops_accepted = 4;
-    // Number of times this AppOp was requested but denied.
-    optional int32 count_ops_rejected = 5;
-}
-
-/**
- * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky
- * behavior in its own uid. However, the metrics of these isolated uid's almost always should be
- * attributed back to the parent (host) uid. One example is Chrome.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message IsolatedUidChanged {
-    // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid.
-    // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd.
-    // This field is ignored when event == REMOVED.
-    optional int32 parent_uid = 1;
-
-    optional int32 isolated_uid = 2;
-
-    // We expect an isolated uid to be removed before if it's used for another parent uid.
-    enum Event {
-        REMOVED = 0;
-        CREATED = 1;
-    }
-    optional Event event = 3;
-}
-
-/*
- * Logs the reception of an incoming network packet causing the main system to wake up for
- * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd
- * and processed by WakeupController.cpp.
- */
-message PacketWakeupOccurred {
-    // The uid owning the socket into which the packet was delivered, or -1 if the packet was
-    // delivered nowhere.
-    optional int32 uid = 1 [(is_uid) = true];
-    // The interface name on which the packet was received.
-    optional string iface = 2;
-    // The ethertype value of the packet.
-    optional int32 ethertype = 3;
-    // String representation of the destination MAC address of the packet.
-    optional string destination_hardware_address = 4;
-    // String representation of the source address of the packet if this was an IP packet.
-    optional string source_ip = 5;
-    // String representation of the destination address of the packet if this was an IP packet.
-    optional string destination_ip = 6;
-    // The value of the protocol field if this was an IPv4 packet or the value of the Next Header
-    // field if this was an IPv6 packet. The range of possible values is the same for both IP
-    // families.
-    optional int32 ip_next_header = 7;
-    // The source port if this was a TCP or UDP packet.
-    optional int32 source_port = 8;
-    // The destination port if this was a TCP or UDP packet.
-    optional int32 destination_port = 9;
-}
-
-/*
- * Logs the memory stats for an app on startup.
- * Logged from:
- *     frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message AppStartMemoryStateCaptured {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process name.
-    optional string process_name = 2;
-
-    // The activity name.
-    optional string activity_name = 3;
-
-    // # of page-faults
-    optional int64 page_fault = 4;
-
-    // # of major page-faults
-    optional int64 page_major_fault = 5;
-
-    // RSS
-    optional int64 rss_in_bytes = 6;
-
-    // CACHE
-    optional int64 cache_in_bytes = 7;
-
-    // SWAP
-    optional int64 swap_in_bytes = 8;
-}
-
-/*
- * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries
- * for LMK event.
- * Logged from:
- *      system/core/lmkd/lmkd.c
- */
-message LmkStateChanged {
-    enum State {
-        UNKNOWN = 0;
-        START = 1;
-        STOP = 2;
-    }
-    optional State state = 1;
-}
-
-/*
- * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure.
- * Logged from:
- *      system/core/lmkd/lmkd.c
- */
-message LmkKillOccurred {
-    enum Reason {
-        UNKNOWN = 0;
-        PRESSURE_AFTER_KILL = 1;
-        NOT_RESPONDING = 2;
-        LOW_SWAP_AND_THRASHING = 3;
-        LOW_MEM_AND_SWAP = 4;
-        LOW_MEM_AND_THRASHING = 5;
-        DIRECT_RECL_AND_THRASHING = 6;
-        LOW_MEM_AND_SWAP_UTIL = 7;
-    }
-
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process name.
-    optional string process_name = 2;
-
-    // oom adj score.
-    optional int32 oom_adj_score = 3;
-
-    // # of page-faults
-    optional int64 page_fault = 4;
-
-    // # of major page-faults
-    optional int64 page_major_fault = 5;
-
-    // RSS
-    optional int64 rss_in_bytes = 6;
-
-    // CACHE
-    optional int64 cache_in_bytes = 7;
-
-    // SWAP
-    optional int64 swap_in_bytes = 8;
-
-    // The elapsed real time of start of the process.
-    optional int64 process_start_time_nanos = 9;
-
-    // Min oom adj score considered by lmkd.
-    optional int32 min_oom_score = 10;
-
-    // Free physical memory on device at LMK time.
-    optional int32 free_mem_kb = 11;
-
-    // Free swap on device at LMK time.
-    optional int32 free_swap_kb = 12;
-
-    // What triggered the LMK event.
-    optional Reason reason = 13;
-}
-
-/*
- * Logs when the ActivityManagerService detects that an app died.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message AppDied {
-    // timestamp(elapsedRealtime) of record creation
-    optional uint64 timestamp_millis = 1 [(state_field_option).exclusive_state = true];
-}
-
-/**
- * An atom for generic metrics logging. Available from Android Q.
- */
-message GenericAtom {
-    // The uid of the application that sent this custom atom.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // An event_id indicates the type of event.
-    optional android.stats.EventType event_id = 2;
-}
-
-/**
- * Atom for simple logging of user interaction and impression events, such as "the user touched
- * this button" or "this dialog was displayed".
- * Keep the UI event stream clean: don't use for system or background events.
- * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/
- *   frameworks/base/packages/SystemUI/src/com/android/systemui/
- */
-message UiEventReported {
-    // The event_id.
-    optional int32 event_id = 1;
-    // The event's source or target uid and package, if applicable.
-    // For example, the package posting a notification, or the destination package of a share.
-    optional int32 uid = 2 [(is_uid) = true];
-    optional string package_name = 3;
-    // An identifier used to disambiguate which logs refer to a particular instance of some
-    // UI element. Useful when there might be multiple instances simultaneously active.
-    optional int32 instance_id = 4;
-}
-
-/**
- * Reports a notification was created or updated.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/notification/
- */
-message NotificationReported {
-    // The event_id (as for UiEventReported).
-    optional int32 event_id = 1;
-    // The notifying app's uid and package.
-    optional int32 uid = 2 [(is_uid) = true];
-    optional string package_name = 3;
-    // A small system-assigned identifier for the notification.
-    // Locally probably-unique, but expect collisions across users and/or days.
-    optional int32 instance_id = 4;
-    optional int32 notification_id_hash = 5;  // Small hash of the app-assigned notif ID + tag
-    optional int32 channel_id_hash = 6;  // Small hash of app-assigned channel ID
-
-    // Grouping information
-    optional int32 group_id_hash = 7;  // Small hash of the group ID of the notification
-    optional int32 group_instance_id = 8;  // Instance_id of the group-summary notification
-    optional bool is_group_summary = 9;  // Tags the group-summary notification
-
-    // Attributes
-    optional string category = 10;   // App-assigned notification category (API-defined strings)
-    optional int32 style = 11;       // App-assigned notification style
-    optional int32 num_people = 12;  // Number of Person records attached to the notification
-
-    // Ordering, importance and interruptiveness
-
-    optional int32 position = 13;    // Position in NotificationManager's list
-
-    optional android.stats.sysui.NotificationImportance importance = 14;
-    optional int32 alerting = 15;    // Bitfield, 1=buzz 2=beep 4=blink
-
-    enum NotificationImportanceExplanation {
-        IMPORTANCE_EXPLANATION_UNKNOWN = 0;
-        IMPORTANCE_EXPLANATION_APP = 1;     // App-specified channel importance.
-        IMPORTANCE_EXPLANATION_USER = 2;    // User-specified channel importance.
-        IMPORTANCE_EXPLANATION_ASST = 3;    // Notification Assistant override.
-        IMPORTANCE_EXPLANATION_SYSTEM = 4;  // System override.
-        // Like _APP, but based on pre-channels priority signal.
-        IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5;
-    }
-
-    optional NotificationImportanceExplanation importance_source = 16;
-    optional android.stats.sysui.NotificationImportance importance_initial = 17;
-    optional NotificationImportanceExplanation importance_initial_source = 18;
-    optional android.stats.sysui.NotificationImportance importance_asst = 19;
-    optional int32 assistant_hash = 20;
-    optional float assistant_ranking_score = 21;
-}
-
-message Notification {
-    // The notifying app's uid and package.
-    optional int32 uid = 1 [(is_uid) = true];
-    optional string package_name = 2;
-    // A small system-assigned identifier for the notification.
-    optional int32 instance_id = 3;
-
-    // Grouping information.
-    optional int32 group_instance_id = 4;
-    optional bool is_group_summary = 5;
-
-    // The section of the shade that the notification is in.
-    // See NotificationSectionsManager.PriorityBucket.
-    enum NotificationSection {
-        SECTION_UNKNOWN = 0;
-        SECTION_HEADS_UP = 1;
-        SECTION_MEDIA_CONTROLS = 2;
-        SECTION_PEOPLE = 3;
-        SECTION_ALERTING = 4;
-        SECTION_SILENT = 5;
-    }
-    optional NotificationSection section = 6;
-}
-
-message NotificationList {
-    repeated Notification notifications = 1;  // An ordered sequence of notifications.
-}
-
-/**
- * Reports a notification panel was displayed, e.g. from the lockscreen or status bar.
- *
- * Logged from:
- *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
- */
-message NotificationPanelReported {
-    // The event_id (as for UiEventReported).
-    optional int32 event_id = 1;
-    optional int32 num_notifications = 2;
-    // The notifications in the panel, in the order that they appear there.
-    optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Reports a notification channel, or channel group, was created, updated, or deleted.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/notification/
- */
-message NotificationChannelModified {
-    // The event_id (as for UiEventReported).
-    optional int32 event_id = 1;
-    // The notifying app's uid and package.
-    optional int32 uid = 2 [(is_uid) = true];
-    optional string package_name = 3;
-    // Hash of app-assigned notification channel ID or channel-group ID
-    optional int32 channel_id_hash = 4;
-    // Previous importance setting, if applicable
-    optional android.stats.sysui.NotificationImportance old_importance = 5;
-    // New importance setting
-    optional android.stats.sysui.NotificationImportance importance = 6;
-}
-
-
-/**
- * Logs when a biometric acquire event occurs.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricAcquired {
-    // Biometric modality that was acquired.
-    optional android.hardware.biometrics.ModalityEnum modality = 1;
-    // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java.
-    optional int32 user = 2;
-    // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage.
-    optional bool is_crypto = 3;
-    // Action that the device is performing. Acquired messages are only expected for enroll and
-    // authenticate. Other actions may indicate an error.
-    optional android.hardware.biometrics.ActionEnum action = 4;
-    // The client that this acquisition was received for.
-    optional android.hardware.biometrics.ClientEnum client = 5;
-    // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager.
-    optional int32 acquire_info = 6;
-    // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
-    optional int32 acquire_info_vendor = 7;
-    // Dictates if this message should trigger additional debugging.
-    optional bool debug = 8;
-}
-
-/**
- * Logs when a biometric authentication event occurs.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricAuthenticated {
-    // Biometric modality that was used.
-    optional android.hardware.biometrics.ModalityEnum modality = 1;
-    // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
-    optional int32 user = 2;
-    // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password
-    // storage.
-    optional bool is_crypto = 3;
-    // The client that this acquisition was received for.
-    optional android.hardware.biometrics.ClientEnum client = 4;
-    // If authentication requires user confirmation. See BiometricPrompt's
-    // setRequireConfirmation(bool) method.
-    optional bool require_confirmation = 5;
-
-    enum State {
-        UNKNOWN = 0;
-        REJECTED = 1;
-        PENDING_CONFIRMATION = 2;
-        CONFIRMED = 3;
-    }
-
-    // State of the current auth attempt.
-    optional State state = 6;
-    // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is
-    // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to
-    // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
-    // CONFIRMED.
-    optional int64 latency_millis = 7;
-    // Dictates if this message should trigger additional debugging.
-    optional bool debug = 8;
-}
-
-/**
- * Logs when a biometric error occurs.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricErrorOccurred {
-    // Biometric modality that was used.
-    optional android.hardware.biometrics.ModalityEnum modality = 1;
-    // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
-    optional int32 user = 2;
-    // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage.
-    optional bool is_crypto = 3;
-    // Action that the device is performing.
-    optional android.hardware.biometrics.ActionEnum action = 4;
-    // The client that this acquisition was received for.
-    optional android.hardware.biometrics.ClientEnum client = 5;
-    // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors
-    // are unique to modality.
-    optional int32 error_info = 6;
-    // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
-    // by the vendor and not specified by the HIDL interface.
-    optional int32 error_info_vendor = 7;
-    // Dictates if this message should trigger additional debugging.
-    optional bool debug = 8;
-    // Time spent during the authentication attempt.
-    optional int64 latency_millis = 9;
-}
-
-/**
- * Logs when a system health issue is detected.
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricSystemHealthIssueDetected {
-    // Biometric modality.
-    optional android.hardware.biometrics.ModalityEnum modality = 1;
-    // Type of issue detected.
-    optional android.hardware.biometrics.IssueEnum issue = 2;
-    // Dictates if this message should trigger additional debugging.
-    optional bool debug = 3;
-}
-
-/**
- * Logs when a biometric enrollment occurs.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricEnrolled {
-    // Biometric modality that was used.
-    optional android.hardware.biometrics.ModalityEnum modality = 1;
-    // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
-    optional int32 user = 2;
-    // The amount of time the enrollment took in milliseconds.
-    optional int64 latency_millis = 3;
-    // Whether or not the enrollment was successful.
-    optional bool success = 4;
-}
-
-/*
- * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips.
- */
-message FlagFlipUpdateOccurred {
-    // If the event is from a flag config package, specify the package name.
-    optional string flag_flip_package_name = 1;
-
-    // The order id of the package
-    optional int64 order_id = 2;
-}
-
-/**
- * Potential experiment ids that goes with a train install.
- * Should be kept in sync with experiment_ids.proto.
- */
-message TrainExperimentIds {
-    repeated int64 experiment_id = 1;
-}
-
-/*
- * Logs when a binary push state changes.
- * Logged by the installer via public api.
- */
-message BinaryPushStateChanged {
-    // Name of the train.
-    optional string train_name = 1;
-    // Version code for a "train" of packages that need to be installed atomically
-    optional int64 train_version_code = 2;
-    // After installation of this package, device requires a restart.
-    optional bool requires_staging = 3;
-    // Rollback should be enabled for this install.
-    optional bool rollback_enabled = 4;
-    // Requires low latency monitoring if possible.
-    optional bool requires_low_latency_monitor = 5;
-
-    enum State {
-        UNKNOWN = 0;
-        INSTALL_REQUESTED = 1;
-        INSTALL_STARTED = 2;
-        INSTALL_STAGED_NOT_READY = 3;
-        INSTALL_STAGED_READY = 4;
-        INSTALL_SUCCESS = 5;
-        // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
-        // and INSTALL_FAILURE_COMMIT.
-        INSTALL_FAILURE = 6  [deprecated = true];
-        // This enum is for installs that are manually cancelled via the Manual Update UI.
-        INSTALL_CANCELLED = 7;
-        INSTALLER_ROLLBACK_REQUESTED = 8;
-        INSTALLER_ROLLBACK_INITIATED = 9;
-        INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
-        INSTALLER_ROLLBACK_STAGED = 11;
-        INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
-        INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
-        INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
-        INSTALLER_ROLLBACK_SUCCESS = 15;
-        INSTALLER_ROLLBACK_FAILURE = 16;
-        INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
-        INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
-        INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
-        INSTALL_STAGED_CANCEL_REQUESTED = 20;
-        INSTALL_STAGED_CANCEL_SUCCESS = 21;
-        INSTALL_STAGED_CANCEL_FAILURE = 22;
-        INSTALL_FAILURE_DOWNLOAD = 23;
-        INSTALL_FAILURE_STATE_MISMATCH = 24;
-        INSTALL_FAILURE_COMMIT = 25;
-        REBOOT_TRIGGERED = 26;
-    }
-    optional State state = 6;
-    // Possible experiment ids for monitoring this push.
-    optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES];
-    // user id
-    optional int32 user_id = 8;
-    optional int32 reason = 9;
-    // Whether or not this is a rollback event
-    optional bool is_rollback = 10;
-}
-
-/* Test atom, is not logged anywhere */
-message TestAtomReported {
-    repeated AttributionNode attribution_node = 1;
-    optional int32 int_field = 2;
-    optional int64 long_field = 3;
-    optional float float_field = 4;
-    optional string string_field = 5;
-    optional bool boolean_field = 6;
-    enum State {
-        UNKNOWN = 0;
-        OFF = 1;
-        ON = 2;
-    }
-    optional State state = 7;
-    optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/** Represents USB port overheat event. */
-message UsbPortOverheatEvent {
-    /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */
-    optional int32 plug_temperature_deci_c = 1;
-
-    /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */
-    optional int32 max_temperature_deci_c = 2;
-
-    /* Time between USB plug event and overheat threshold trip, in seconds. */
-    optional int32 time_to_overheat_secs = 3;
-
-    /* Time between overheat threshold trip and hysteresis, in seconds. */
-    optional int32 time_to_hysteresis_secs = 4;
-
-    /* Time between hysteresis and active mitigation ending, in seconds. */
-    optional int32 time_to_inactive_secs = 5;
-};
-
-/**
- * Logs total effective full charge and discharge cycles on a battery.
- * Here are some examples of one effective cycle:
- *   1) the battery charges from 0% to 100% and drains back to 0%,
- *   2) charging from 50% to 100% and draining back to 50% twice.
- * Pulled from:
- *   frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
- */
-message BatteryCycleCount {
-    /* Number of total charge and discharge cycles on the system battery. */
-    optional int32 cycle_count = 1;
-}
-
-/**
- * Logs that external storage is mounted and information about it, the storage type (sd card/usb/
- * others), its type (public or private) and the size in bytes.
- * Pulled from:
- *   StatsCompanionService
- */
-
-message ExternalStorageInfo {
-
-    enum VolumeType {
-        UNKNOWN = 0;
-        PUBLIC = 1;
-        PRIVATE = 2;
-        OTHER = 3;
-    }
-
-    // The type of external storage.
-    optional android.stats.storage.ExternalStorageType storage_type = 1;
-    // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal.
-    optional VolumeType volume_type = 2;
-    // Total size of the sd card in bytes.
-    optional int64 size_bytes = 3;
-}
-
-/*
- * Logs when a connection becomes available and lost.
- * Logged in StatsCompanionService.java
- */
-message ConnectivityStateChanged {
-  // Id of the network.
-  optional int32 net_id = 1;
-
-  enum State {
-    UNKNOWN = 0;
-    CONNECTED = 1;
-    DISCONNECTED = 2;
-  }
-  // Connected state of a network.
-  optional State state = 2;
-}
-
-/**
- * Logs when a service starts and stops.
- * Logged from:
- *   services/core/java/com/android/server/am/ActiveServices.java
- */
-message ServiceStateChanged {
-
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional string package_name = 2;
-
-    optional string service_name = 3;
-
-    enum State {
-        START = 1;
-        STOP = 2;
-    }
-
-    optional State state = 4;
-}
-
-/**
- * Logs when a service is launched.
- * Logged from:
- *   services/core/java/com/android/server/am/ActiveServices.java
- */
-message ServiceLaunchReported {
-
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional string package_name = 2;
-
-    optional string service_name = 3;
-}
-
-/**
- * Logs when a hidden API is used.
- *
- * Logged from:
- *     libcore/libart/src/main/java/dalvik/system/VMRuntime.java
- */
-message HiddenApiUsed {
-    // The uid of the app making the hidden access.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Signature of the method or field accessed.
-    optional string signature = 2;
-
-    enum AccessMethod {
-        NONE = 0;
-        REFLECTION = 1;
-        JNI = 2;
-        LINKING = 3;
-    }
-
-    // Type of access.
-    optional AccessMethod access_method = 3;
-
-    // Whether the access was prevented or not.
-    optional bool access_denied = 4;
-}
-
-/**
- * Logs user interaction with the Privacy Indicators added in Q. In particular:
- * - When user sees privacy chip
- * - When user clicks privacy chip
- * - How does the user exit the Privacy Dialog
- * Logged from:
- *   packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
- */
-message PrivacyIndicatorsInteracted {
-
-    enum Type {
-        UNKNOWN = 0;
-        CHIP_VIEWED = 1;
-        CHIP_CLICKED = 2;
-        DIALOG_PRIVACY_SETTINGS = 3;
-        DIALOG_DISMISS = 4;
-        DIALOG_LINE_ITEM = 5;
-    }
-
-    optional Type type = 1 [(state_field_option).exclusive_state = true];
-
-    // Used if the type is LINE_ITEM
-    optional string package_name = 2;
-}
-
-/**
- * Logs information about a package that is moved from the internal to external storage and vice
- * versa.
- * It logs the package name, the type of the external storage where the package is installed
- * (if moved to external storage, or UNKNOWN if moved to internal storage),
- * and the move type: if it's from internal to external or the other way around.
- *
- * Logged from:
-        frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
- */
-message AppMovedStorageReported {
-    enum MoveType {
-        UNKNOWN = 0;
-        TO_EXTERNAL = 1;
-        TO_INTERNAL = 2;
-    }
-    // The type of the external storage.
-    optional android.stats.storage.ExternalStorageType external_storage_type = 1;
-    // The type of move.
-    optional MoveType move_type = 2;
-    // The name of the package that was moved.
-    optional string package_name = 3;
-}
-
-/**
- * Logs when system server watchdog occurs.
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/Watchdog.java
- */
-message SystemServerWatchdogOccurred {
-    optional string subject = 1;
-}
-
-/**
- * Logs when new file added to tombstones.
- * Logged from:
- *      frameworks/base/core/java/com/android/server/BootReceiver.java
- */
-message TombStoneOccurred {
-}
-
-/*
- * Information about a role request
- *
- * Logged from:
- *   packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java
- */
-message RoleRequestResultReported {
-    // UID of application requesting the role
-    optional int32 requesting_uid = 1;
-
-    // Package name of application requesting the role
-    optional string requesting_package_name = 2;
-
-    // The role to be granted
-    optional string role_name = 3;
-
-    // The count of applications qualifying for the role
-    optional int32 qualifying_count = 4;
-
-    // UID of application current granted the role
-    optional int32 current_uid = 5;
-
-    // Package name of application current granted the role
-    optional string current_package_name = 6;
-
-    // UID of another application that user chose to grant the role to, instead of the requesting
-    // application
-    optional int32 granted_another_uid = 7;
-
-    // Package name of another application that user chose to grant the role to, instead of the
-    // requesting application
-    optional string granted_another_package_name = 8;
-
-    enum Result {
-        UNDEFINED = 0;
-        // role request was ignored
-        IGNORED = 1;
-        // role request was ignored because it's already granted
-        IGNORED_ALREADY_GRANTED = 2;
-        // role request was ignored because the application isn't qualified
-        IGNORED_NOT_QUALIFIED = 3;
-        // role request was ignored because user said it should be always denied
-        IGNORED_USER_ALWAYS_DENIED = 4;
-        // role was granted by user action
-        USER_GRANTED = 5;
-        // role was denied by user action
-        USER_DENIED = 6;
-        // role was denied by user granting another application the role
-        USER_DENIED_GRANTED_ANOTHER = 7;
-        // role was denied and set to be always denied by the user
-        USER_DENIED_WITH_ALWAYS = 8;
-    }
-    // The result of the role request
-    optional Result result = 9;
-}
-
-/**
- * Logs when a Vehicle Maps Service client's connection state has changed
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java
- */
-message VmsClientConnectionStateChanged {
-    // The UID of the VMS client app
-    optional int32 uid = 1 [(is_uid) = true];
-
-    enum State {
-        UNKNOWN = 0;
-        // Attempting to connect to the client
-        CONNECTING = 1;
-        // Client connection established
-        CONNECTED = 2;
-        // Client connection closed unexpectedly
-        DISCONNECTED = 3;
-        // Client connection closed by VMS
-        TERMINATED = 4;
-        // Error establishing the client connection
-        CONNECTION_ERROR = 5;
-    }
-
-    optional State state  = 2;
-}
-
-message MimeTypes {
-    repeated string mime_types = 1;
-}
-
-/**
- * Logs statistics regarding accesses to external storage.
- * All stats are normalized for one day period.
- *
- * Logged from:
- *   packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
- */
-message GeneralExternalStorageAccessStats {
-    optional int32 uid = 1 [(is_uid) = true];
-    // Total number of accesses like creation, open, delete and rename/update.
-    // Includes file path and ContentResolver accesses
-    optional uint32 total_accesses = 2;
-    // Number of file path accesses, as opposed to file path and ContentResolver.
-    optional uint32 file_path_accesses = 3;
-    // Number of accesses on secondary volumes like SD cards.
-    // Includes file path and ContentResolver accesses
-    optional uint32 secondary_storage_accesses = 4;
-    // Comma-separated list of mime types that were accessed.
-    optional MimeTypes mime_types_accessed = 5;
-}
-
-/**
- * Logs when MediaProvider has successfully finished scanning a storage volume.
- *
- * Logged from:
- *   packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java
- */
-message MediaProviderScanOccurred {
-    enum Reason {
-        // Scan triggered due to unknown reason
-        UNKNOWN = 0;
-        // Scan triggered due to storage volume being mounted
-        MOUNTED = 1;
-        // Scan triggered due to explicit user action or app request
-        DEMAND = 2;
-        // Scan triggered due to idle maintenance
-        IDLE = 3;
-    }
-
-    // Volume type that this event pertains to
-    optional android.stats.mediaprovider.VolumeType volume_type = 1;
-    // Reason why this scan was triggered
-    optional Reason reason = 2;
-    // Total number of files scanned
-    optional int64 item_count = 3;
-    // Duration of scan, normalized per file
-    optional float normalized_duration_millis = 4;
-    // Number of database inserts, normalized per file
-    optional float normalized_insert_count = 5;
-    // Number of database updates, normalized per file
-    optional float normalized_update_count = 6;
-    // Number of database deletes, normalized per file
-    optional float normalized_delete_count = 7;
-}
-
-/**
- * Logs when an app has asked MediaProvider to delete media belonging to the user.
- *
- * Logged from:
- *   packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
- */
-message MediaContentDeleted {
-    // Volume type that this event pertains to
-    optional android.stats.mediaprovider.VolumeType volume_type = 1;
-    // UID of app that requested deletion
-    optional int32 uid = 2 [(is_uid) = true];
-    // Number of items that were deleted
-    optional int32 item_count = 3;
-}
-
-/**
- * Logs when an app has asked MediaProvider to grant them access to media belonging to the user.
- *
- * Logged from:
- *   packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java
- */
-message MediaProviderPermissionRequested {
-    enum Result {
-        UNKNOWN = 0;
-        USER_GRANTED = 1;
-        AUTO_GRANTED = 2;
-        USER_DENIED = 3;
-        USER_DENIED_WITH_PREJUDICE = 4;
-        AUTO_DENIED = 5;
-    }
-
-    // Volume type that this event pertains to
-    optional android.stats.mediaprovider.VolumeType volume_type = 1;
-    // UID of app that requested permission
-    optional int32 uid = 2 [(is_uid) = true];
-    // Number of items that were requested
-    optional int32 item_count = 3;
-    // Result of this request
-    optional Result result = 4;
-}
-
-/**
- * Logs when MediaProvider has finished upgrading or downgrading its database schema.
- *
- * Logged from:
- *   packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java
- */
-message MediaProviderSchemaChanged {
-    // Volume type that this event pertains to
-    optional android.stats.mediaprovider.VolumeType volume_type = 1;
-    // Old database version code
-    optional int32 version_from = 2;
-    // New database version code
-    optional int32 version_to = 3;
-    // Total number of files in database
-    optional int64 item_count = 4;
-    // Duration of schema change, normalized per file
-    optional float normalized_duration_millis = 5;
-}
-
-/**
- * Logs when MediaProvider has finished an idle maintenance job.
- *
- * Logged from:
- *   packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
- */
-message MediaProviderIdleMaintenanceFinished {
-    // Volume type that this event pertains to
-    optional android.stats.mediaprovider.VolumeType volume_type = 1;
-
-    // Total number of files in database
-    optional int64 item_count = 2;
-    // Duration of idle maintenance, normalized per file
-    optional float normalized_duration_millis = 3;
-    // Number of thumbnails found to be stale, normalized per file
-    optional float normalized_stale_thumbnails = 4;
-    // Number of items found to be expired, normalized per file
-    optional float normalized_expired_media = 5;
-}
-
-/**
- * Represents boot time event with duration in ms.
- *
- * Logged from: bootstat and various system server components. Check each enums for details.
- */
-message BootTimeEventDuration {
-    enum DurationEvent {
-        UNKNOWN = 0;
-        // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat.
-        ABSOLUTE_BOOT_TIME = 1;
-        // Bootloader's 1st stage execution time.
-        // Logged from bootstat.
-        BOOTLOADER_FIRST_STAGE_EXEC = 2;
-        // Bootloader's 1st stage loading time.
-        // Logged from bootstat.
-        BOOTLOADER_FIRST_STAGE_LOAD = 3;
-        // Bootloader's kernel loading time.
-        // Logged from bootstat.
-        BOOTLOADER_KERNEL_LOAD = 4;
-        // Bootloader's 2nd stage execution time.
-        // Logged from bootstat.
-        BOOTLOADER_SECOND_STAGE_EXEC = 5;
-        // Bootloader's 2nd stage loading time.
-        // Logged from bootstat.
-        BOOTLOADER_SECOND_STAGE_LOAD = 6;
-        // Duration for Bootloader to show unlocked device's warning UI. This should not happen
-        // for locked device.
-        // Logged from bootstat.
-        BOOTLOADER_UI_WAIT = 7;
-        // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above.
-        // Logged from bootstat.
-        BOOTLOADER_TOTAL = 8;
-        // Shutdown duration inside init for the reboot before the current boot up.
-        // Logged from f/b/services/.../BootReceiver.java.
-        SHUTDOWN_DURATION = 9;
-        // Total time for mounting of disk devices during bootup.
-        // Logged from f/b/services/.../BootReceiver.java.
-        MOUNT_DEFAULT_DURATION = 10;
-        // Total time for early stage mounting of disk devices during bootup.
-        // Logged from f/b/services/.../BootReceiver.java.
-        MOUNT_EARLY_DURATION = 11;
-        // Total time for late stage mounting of disk devices during bootup.
-        // Logged from f/b/services/.../BootReceiver.java.
-        MOUNT_LATE_DURATION = 12;
-        // Average time to scan non-system app after OTA
-        // Logged from f/b/services/.../PackageManagerService.java
-        OTA_PACKAGE_MANAGER_INIT_TIME = 13;
-        // Time to initialize Package manager after OTA
-        // Logged from f/b/services/.../PackageManagerService.java
-        OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14;
-        // Time to scan all system app from Package manager after OTA
-        // Logged from f/b/services/.../PackageManagerService.java
-        OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15;
-        // Init's total time for cold boot stage.
-        // Logged from bootstat.
-        COLDBOOT_WAIT = 16;
-        // Init's total time for initializing selinux.
-        // Logged from bootstat.
-        SELINUX_INIT = 17;
-        // Time since last factory reset.
-        // Logged from bootstat.
-        FACTORY_RESET_TIME_SINCE_RESET = 18;
-        // Init's total time spent for completing the 1st stage.
-        // Logged from bootstat.
-        ANDROID_INIT_STAGE_1 = 19;
-    }
-
-    // Type of the event.
-    optional DurationEvent event = 1;
-    // Duration of the event in ms.
-    optional int64 duration_millis = 2;
-}
-
-/**
- * Represents the start of specific boot time event during bootup in ms. This is usually a time
- * since boot-up.
- *
- * Logged from: bootstat and various system server components. Check each enums for details.
- */
-message BootTimeEventElapsedTime {
-    enum ElapsedTimeEvent {
-        UNKNOWN = 0;
-        // Time when init starts 1st stage. Logged from bootstat.
-        ANDROID_INIT_STAGE_1 = 1;
-        // Time when sys.boot_completed prop is set.
-        // Logged from bootstat.
-        BOOT_COMPLETE = 2;
-        // BOOT_COMPLETE for encrypted device.
-        BOOT_COMPLETE_ENCRYPTION = 3;
-        // BOOT_COMPLETE for device with no encryption.
-        BOOT_COMPLETE_NO_ENCRYPTION = 4;
-        // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time.
-        BOOT_COMPLETE_POST_DECRYPT = 5;
-        // BOOT_COMPLETE after factory reset.
-        FACTORY_RESET_BOOT_COMPLETE = 6;
-        // BOOT_COMPLETE_NO_ENCRYPTION after factory reset.
-        FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7;
-        // BOOT_COMPLETE_POST_DECRYPT after factory reset.
-        FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8;
-        // BOOT_COMPLETE after OTA.
-        OTA_BOOT_COMPLETE = 9;
-        // BOOT_COMPLETE_NO_ENCRYPTION after OTA.
-        OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10;
-        // BOOT_COMPLETE_POST_DECRYPT after OTA.
-        OTA_BOOT_COMPLETE_POST_DECRYPT = 11;
-        // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast.
-        // Logged from  f/b/services/.../UserController.java
-        FRAMEWORK_LOCKED_BOOT_COMPLETED = 12;
-        // Time when the system starts sending BOOT_COMPLETED broadcast.
-        // Logged from  f/b/services/.../UserController.java
-        FRAMEWORK_BOOT_COMPLETED = 13;
-        // Time when the package manager starts init.
-        // Logged from f/b/services/.../SystemServer.java
-        PACKAGE_MANAGER_INIT_START = 14;
-        // Time when package manager is ready
-        // Logged from f/b/services/.../SystemServer.java
-        PACKAGE_MANAGER_INIT_READY = 15;
-        // Represents the time when user has entered unlock credential for system with user pin.
-        // Logged from bootstat.
-        POST_DECRYPT = 16;
-        // Represents the start of zygote's init.
-        // Logged from zygote itself.
-        ZYGOTE_INIT_START = 17;
-        // Represents the start of secondary zygote's init.
-        // TODO: add logging to zygote
-        SECONDARY_ZYGOTE_INIT_START = 18;
-        // Represents the start of system server's init.
-        // Logged from f/b/services/.../SystemServer.java
-        SYSTEM_SERVER_INIT_START = 19;
-        // Represents the completion of system server's init.
-        // Logged from f/b/services/.../SystemServer.java
-        SYSTEM_SERVER_READY = 20;
-        // Represents the start of launcher during boot-up.
-        // TODO: add logging
-        LAUNCHER_START = 21;
-        // Represents the completion of launcher's initial rendering. User can use other apps from
-        // launcher from this point.
-        // TODO: add logging
-        LAUNCHER_SHOWN = 22;
-    }
-
-    // Type of the event.
-    optional ElapsedTimeEvent event = 1;
-    // Time since bootup for the event.
-    // It should be acquired from SystemClock elapsedRealtime() call or equivalent.
-    optional int64 time_millis = 2;
-}
-
-/**
- * Boot time events with UTC time.
- *
- * Logged from: bootstat and various system server components. Check each enums for details.
- */
-message BootTimeEventUtcTime {
-    enum UtcTimeEvent {
-        UNKNOWN = 0;
-        // Time of the bootstat's marking of 1st boot after the last factory reset.
-        // Logged from bootstat.
-        FACTORY_RESET_RESET_TIME = 1;
-        // The time when bootstat records FACTORY_RESET_* events. This is close to
-        // BOOT_COMPLETE time for the current bootup.
-        // Logged from bootstat.
-        FACTORY_RESET_CURRENT_TIME = 2;
-        // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose.
-        // Logged from bootstat.
-        FACTORY_RESET_RECORD_VALUE = 3;
-    }
-
-    // Type of the event.
-    optional UtcTimeEvent event = 1;
-    // UTC time for the event.
-    optional int64 utc_time_secs = 2;
-}
-
-/**
- * Boot time events representing specific error code during bootup.
- * Meaning of error code can be different per each event type.
- *
- * Logged from: bootstat and various system server components. Check each enums for details.
- */
-message BootTimeEventErrorCode {
-    enum ErrorCodeEvent {
-        UNKNOWN = 0;
-        // Linux error code for time() call to get the current UTC time.
-        // Logged from bootstat.
-        FACTORY_RESET_CURRENT_TIME_FAILURE = 1;
-        // Represents UmountStat before the reboot for the current boot up. Error codes defined
-        // as UMOUNT_STAT_* from init/reboot.cpp.
-        // Logged from f/b/services/.../BootReceiver.java.
-        SHUTDOWN_UMOUNT_STAT = 2;
-        // Reprepsents fie system mounting error code of /data partition for the current boot.
-        // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp.
-        // Logged from f/b/services/.../BootReceiver.java.
-        FS_MGR_FS_STAT_DATA_PARTITION = 3;
-    }
-
-    // Type of the event.
-    optional ErrorCodeEvent event = 1;
-    // error code defined per each event type.
-    // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of
-    // FS_MGR_FS_STAT.
-    optional int32 error_code = 2;
-}
-
-/**
- * Collects Virtual A/B statistics related to the use of dm-snapshot performed
- * after an OTA.
- *
- * Logged from:
- *  - system/update_engine/cleanup_previous_update_action.cc
- */
-message SnapshotMergeReported {
-    // Keep in sync with
-    // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.proto
-    enum UpdateState {
-        // No update or merge is in progress.
-        NONE = 0;
-        // An update is applying; snapshots may already exist.
-        INITIATED = 1;
-        // An update is pending, but has not been successfully booted yet.
-        UNVERIFIED = 2;
-        // The kernel is merging in the background.
-        MERGING = 3;
-        // Post-merge cleanup steps could not be completed due to a transient
-        // error, but the next reboot will finish any pending operations.
-        MERGE_NEEDS_REBOOT = 4;
-        // Merging is complete, and needs to be acknowledged.
-        MERGE_COMPLETED = 5;
-        // Merging failed due to an unrecoverable error.
-        MERGE_FAILED = 6;
-        // The update was implicitly cancelled, either by a rollback or a flash
-        // operation via fastboot. This state can only be returned by WaitForMerge.
-        CANCELLED = 7;
-    };
-
-    // Status of the update after the merge attempts.
-    optional UpdateState final_state = 1;
-
-    // Time to complete a merge operation in milliseconds.
-    // A negative value corresponds to the case in which the merge operation
-    // was interrupted and resumed (e.g. in case of a system reboot during the
-    // merge).
-    optional int64 duration_millis = 2;
-
-    // Number of reboots that occurred after issuing and before completing the
-    // merge of all the snapshot devices.
-    optional int32 intermediate_reboots = 3;
-
-    // The device has been upgraded to Virtual A/B.
-    optional bool is_vab_retrofit = 4;
-
-    // Space that has been temporarily allocated in the /data partition
-    // containing the dm-snapshot's copy-on-write data generated during a
-    // Virtual A/B update.
-    optional int64 cow_file_size_bytes = 5;
-}
-
-/**
- * Event representing when BlobStoreManager.Session#commit() is called
- *
- * Logged from:
- *  frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
- */
-message BlobCommitted {
-    // Uid of the Blob committer
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Id of the Blob committed
-    optional int64 blob_id = 2;
-
-    // Size of the Blob
-    optional int64 size = 3;
-
-    enum Result {
-        UNKNOWN = 0;
-        // Commit Succeeded
-        SUCCESS = 1;
-        // Commit Failed: Error occurred during commit
-        ERROR_DURING_COMMIT = 2;
-        // Commit Failed: Digest of the data did not match Blob digest
-        DIGEST_MISMATCH = 3;
-        // Commit Failed: Allowed count limit exceeded
-        COUNT_LIMIT_EXCEEDED = 4;
-    }
-    optional Result result = 4;
-}
-
-/**
- * Event representing when BlobStoreManager#acquireLease() is called
- *
- * Logged from:
- *  frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
- */
-message BlobLeased{
-    // Uid of the Blob leasee
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Id of the Blob leased or 0 if the Blob does not exist
-    optional int64 blob_id = 2;
-
-    // Size of the Blob or 0 if the Blob does not exist
-    optional int64 size = 3;
-
-    enum Result {
-        UNKNOWN = 0;
-        // Lease Succeeded
-        SUCCESS = 1;
-        // Lease Failed: Blob does not exist
-        BLOB_DNE = 2;
-        // Lease Failed: Leasee does not have access to the Blob
-        ACCESS_NOT_ALLOWED = 3;
-        // Lease Failed: Leasee requested an invalid expiry duration
-        LEASE_EXPIRY_INVALID = 4;
-        // Lease Failed: Leasee has exceeded the total data lease limit
-        DATA_SIZE_LIMIT_EXCEEDED = 5;
-        // Leasee Failed: Allowed count limit exceeded
-        COUNT_LIMIT_EXCEEDED = 6;
-    }
-    optional Result result = 4;
-}
-
-/**
- * Event representing when BlobStoreManager#openBlob() is called
- *
- * Logged from:
- *  frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
- */
-message BlobOpened{
-    // Uid of the Blob opener
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Id of the Blob opened or 0 if the Blob does not exist
-    optional int64 blob_id = 2;
-
-    // Size of the Blob or 0 if the Blob does not exist
-    optional int64 size = 3;
-
-    enum Result {
-        UNKNOWN = 0;
-        // Open Succeeded
-        SUCCESS = 1;
-        // Open Failed: Blob does not exist
-        BLOB_DNE = 2;
-        // Open Failed: Opener does not have access to the Blob
-        ACCESS_NOT_ALLOWED = 3;
-    }
-    optional Result result = 4;
-}
-
-//////////////////////////////////////////////////////////////////////
-// Pulled atoms below this line //
-//////////////////////////////////////////////////////////////////////
-
-/**
- * Pulls bytes transferred via wifi (Sum of foreground and background usage).
- *
- * Pulled from:
- *   StatsCompanionService (using BatteryStats to get which interfaces are wifi)
- */
-message WifiBytesTransfer {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional int64 rx_bytes = 2;
-
-    optional int64 rx_packets = 3;
-
-    optional int64 tx_bytes = 4;
-
-    optional int64 tx_packets = 5;
-}
-
-/**
- * Pulls bytes transferred via wifi (separated by foreground and background usage).
- *
- * Pulled from:
- *   StatsCompanionService (using BatteryStats to get which interfaces are wifi)
- */
-message WifiBytesTransferByFgBg {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats.
-    optional bool is_foreground = 2;
-
-    optional int64 rx_bytes = 3;
-
-    optional int64 rx_packets = 4;
-
-    optional int64 tx_bytes = 5;
-
-    optional int64 tx_packets = 6;
-}
-
-/**
- * Pulls bytes transferred via mobile networks (Sum of foreground and background usage).
- *
- * Pulled from:
- *   StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
- */
-message MobileBytesTransfer {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional int64 rx_bytes = 2;
-
-    optional int64 rx_packets = 3;
-
-    optional int64 tx_bytes = 4;
-
-    optional int64 tx_packets = 5;
-}
-
-/**
- * Pulls bytes transferred via mobile networks (separated by foreground and background usage).
- *
- * Pulled from:
- *   StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
- */
-message MobileBytesTransferByFgBg {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // 1 denotes foreground and 0 denotes background. This is called Set in
-    // NetworkStats.
-    optional bool is_foreground = 2;
-
-    optional int64 rx_bytes = 3;
-
-    optional int64 rx_packets = 4;
-
-    optional int64 tx_bytes = 5;
-
-    optional int64 tx_packets = 6;
-}
-
-/**
- * Used for pull network statistics via mobile|wifi networks, and sliced by interesting dimensions.
- * Note that the data is expected to be sliced into more dimensions in future. In other words,
- * the caller must not assume any row of data is one full report when filtering with a set of
- * matching conditions, because future data may represent with multiple rows what is currently
- * represented by one.
- * To avoid being broken by future slicing, callers must take care to aggregate rows even if they
- * query all the existing columns.
- *
- * Pulled from:
- *   StatsPullAtomService (using NetworkStatsService to get NetworkStats)
- */
-message DataUsageBytesTransfer {
-    // State of this record. Should be NetworkStats#SET_DEFAULT or NetworkStats#SET_FOREGROUND to
-    // indicate the foreground state, or NetworkStats#SET_ALL to indicate the record is for all
-    // states combined, not including debug states. See NetworkStats#SET_*.
-    optional int32 state = 1;
-
-    optional int64 rx_bytes = 2;
-
-    optional int64 rx_packets = 3;
-
-    optional int64 tx_bytes = 4;
-
-    optional int64 tx_packets = 5;
-
-    // Radio Access Technology (RAT) type of this record, should be one of
-    // TelephonyManager#NETWORK_TYPE_* constants, or NetworkTemplate#NETWORK_TYPE_ALL to indicate
-    // the record is for all rat types combined.
-    optional int32 rat_type = 6;
-
-    // Mcc/Mnc read from sim if the record is for a specific subscription, null indicates the
-    // record is combined across subscriptions.
-    optional string sim_mcc = 7;
-    optional string sim_mnc = 8;
-
-    // Allows mobile virtual network operators (MVNOs) to be identified with individual IDs.
-    // See TelephonyManager#getSimCarrierId.
-    optional int32 carrier_id = 9;
-
-    // Enumeration of opportunistic states with an additional ALL state indicates the record is
-    // combined regardless of the boolean value in its field.
-    enum DataSubscriptionState {
-        UNKNOWN = 0; // For server side backward compatibility.
-        ALL = 1;
-        OPPORTUNISTIC = 2;
-        NOT_OPPORTUNISTIC = 3;
-    }
-    // Mark whether the subscription is an opportunistic data subscription, and ALL indicates the
-    // record is combined across opportunistic data subscriptions.
-    // See {@link SubscriptionManager#setOpportunistic}.
-    optional DataSubscriptionState opportunistic_data_sub = 10;
-
-    // Indicate whether NR is connected, server side could use this with RAT type to determine if
-    // the record is for 5G NSA (Non Stand Alone) mode, where the primary cell is still LTE and
-    // network allocates a secondary 5G cell so telephony reports RAT = LTE along with NR state as
-    // connected.
-    optional bool is_nr_connected = 11;
-}
-
-/**
- * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller.
- *
- * Pulled from:
- *   StatsCompanionService
- */
-message BluetoothBytesTransfer {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional int64 rx_bytes = 2;
-
-    optional int64 tx_bytes = 3;
-}
-
-/**
- * Pulls the kernel wakelock durations. This atom is adapted from
- * android/internal/os/KernelWakelockStats.java
- *
- * Pulled from:
- *   StatsCompanionService using KernelWakelockReader.
- */
-message KernelWakelock {
-    optional string name = 1;
-
-    optional int32 count = 2;
-
-    optional int32 version = 3;
-
-    optional int64 time_micros = 4;
-}
-
-/**
- * Pulls low power state information. If power.stats HAL is not available, this
- * includes platform and subsystem sleep state information,
- * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState
- * as defined in:
- *   hardware/interfaces/power/1.0/types.hal
- *   hardware/interfaces/power/1.1/types.hal
- * If power.stats HAL is available, this includes PowerEntityStateResidencyResult
- * as defined in:
- *   hardware/interfaces/power/stats/1.0/types.hal
- */
-message SubsystemSleepState {
-    // Subsystem name
-    optional string subsystem_name = 1;
-    // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty.
-    // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name.
-    // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the
-    //    powerEntityStateName from the corresponding PowerEntityStateInfo.
-    optional string subname = 2;
-    // The number of times it entered, or voted for entering the sleep state
-    optional uint64 count = 3;
-    // The length of time spent in, or spent voting for, the sleep state
-    optional uint64 time_millis = 4;
-}
-
-/**
- * Pulls on-device power measurement information.
- * Data defined by hardware/interfaces/power/stats/1.0/types.hal.
- * Pulled from:
- *   frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp
- */
-message OnDevicePowerMeasurement {
-    // Name of the subsystem (to which the rail belongs).
-    optional string subsystem_name = 1;
-
-    // Rail name. The rail lies within the subsystem.
-    optional string rail_name = 2;
-
-    // Time (in ms since boot) at which the rail energy value was measured.
-    // This may differ slightly from the time that statsd logs this information.
-    optional uint64 measurement_timestamp_millis = 3;
-
-    // Accumulated energy used via the rail since device boot in uWs.
-    optional uint64 energy_microwatt_secs = 4;
-}
-
-/**
- * Pulls Cpu time per frequency.
- * Pulls the time the cpu spend on the frequency index. Frequency index
- * starts from highest to lowest. The value should be monotonically
- * increasing since boot. However, if there is a cpu
- * hotplug event, the value would be reset as well.
- */
-message CpuTimePerFreq {
-    optional uint32 cluster = 1;
-    optional uint32 freq_index = 2;
-    optional uint64 time_millis = 3;
-}
-
-/**
- * Pulls Cpu Time Per Uid.
- * Note that isolated process uid time should be attributed to host uids.
- */
-message CpuTimePerUid {
-    optional int32 uid = 1 [(is_uid) = true];
-    optional uint64 user_time_micros = 2;
-    optional uint64 sys_time_micros = 3;
-}
-
-/**
- * Pulls Cpu Time Per Uid per frequency.
- * Note that isolated process uid time should be attributed to host uids.
- * For each uid, we order the time by descending frequencies.
- */
-message CpuTimePerUidFreq {
-    optional int32 uid = 1 [(is_uid) = true];
-    optional uint32 freq_index = 2;
-    optional uint64 time_millis = 3;
-}
-
-/**
- * Pulls Wifi Controller Activity Energy Info
- */
-message WifiActivityInfo {
-    // timestamp(wall clock) of record creation
-    optional uint64 timestamp_millis = 1;
-    // stack reported state
-    // TODO: replace this with proto enum
-    optional int32 stack_state = 2;
-    // tx time in millis
-    optional uint64 controller_tx_time_millis = 3;
-    // rx time in millis
-    optional uint64 controller_rx_time_millis = 4;
-    // idle time in millis
-    optional uint64 controller_idle_time_millis = 5;
-    // product of current(mA), voltage(V) and time(ms)
-    optional uint64 controller_energy_used = 6;
-}
-
-/**
- * Pulls Modem Activity Energy Info
- */
-message ModemActivityInfo {
-    // timestamp(wall clock) of record creation
-    optional uint64 timestamp_millis = 1;
-    // sleep time in millis.
-    optional uint64 sleep_time_millis = 2;
-    // idle time in millis
-    optional uint64 controller_idle_time_millis = 3;
-    /**
-     * Tx power index
-     * index 0 = tx_power < 0dBm
-     * index 1 = 0dBm < tx_power < 5dBm
-     * index 2 = 5dBm < tx_power < 15dBm
-     * index 3 = 15dBm < tx_power < 20dBm
-     * index 4 = tx_power > 20dBm
-     */
-    // tx time in ms at power level 0
-    optional uint64 controller_tx_time_pl0_millis = 4;
-    // tx time in ms at power level 1
-    optional uint64 controller_tx_time_pl1_millis = 5;
-    // tx time in ms at power level 2
-    optional uint64 controller_tx_time_pl2_millis = 6;
-    // tx time in ms at power level 3
-    optional uint64 controller_tx_time_pl3_millis = 7;
-    // tx time in ms at power level 4
-    optional uint64 controller_tx_time_pl4_millis = 8;
-    // rx time in ms at power level 5
-    optional uint64 controller_rx_time_millis = 9;
-    // product of current(mA), voltage(V) and time(ms)
-    optional uint64 energy_used = 10 [deprecated=true];
-}
-
-/**
- * Pulls Bluetooth Activity Energy Info
- * Note: BluetoothBytesTransfer is pulled at the same time from the controller.
- */
-message BluetoothActivityInfo {
-    // timestamp(wall clock) of record creation
-    optional uint64 timestamp_millis = 1;
-    // bluetooth stack state
-    optional int32 bluetooth_stack_state = 2;
-    // tx time in millis
-    optional uint64 controller_tx_time_millis = 3;
-    // rx time in millis
-    optional uint64 controller_rx_time_millis = 4;
-    // idle time in millis
-    optional uint64 controller_idle_time_millis = 5;
-    // product of current(mA), voltage(V) and time(ms)
-    optional uint64 energy_used = 6;
-}
-
-/*
- * Logs the memory stats for a process.
- *
- * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService).
- */
-message ProcessMemoryState {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process name.
-    // Usually package name, "system" for system server.
-    // Provided by ActivityManagerService.
-    optional string process_name = 2;
-
-    // Current OOM score adjustment. Value read from ProcessRecord.
-    optional int32 oom_adj_score = 3;
-
-    // # of page-faults
-    optional int64 page_fault = 4;
-
-    // # of major page-faults
-    optional int64 page_major_fault = 5;
-
-    // RSS
-    // Value is read from memory.stat, field total_rss if per-app memory
-    // cgroups are enabled. Otherwise, value from /proc/pid/stat.
-    optional int64 rss_in_bytes = 6;
-
-    // CACHE
-    // Value is read from memory.stat, field total_cache if per-app memory
-    // cgroups are enabled. Otherwise, 0.
-    optional int64 cache_in_bytes = 7;
-
-    // SWAP
-    // Value is read from memory.stat, field total_swap if per-app memory
-    // cgroups are enabled. Otherwise, 0.
-    optional int64 swap_in_bytes = 8;
-
-    // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1.
-    optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true];
-
-    // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
-    optional int64 start_time_nanos = 10 [deprecated = true];
-
-    // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
-    optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true];
-}
-
-/*
- * Logs the memory high-water mark for a process.
- *
- * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie)
- * and for selected native processes.
- *
- * Pulling this atom resets high-water mark counters for all processes.
- */
-message ProcessMemoryHighWaterMark {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process name.
-    // Usually package name or process cmdline.
-    // Provided by ActivityManagerService or read from /proc/PID/cmdline.
-    optional string process_name = 2;
-
-    // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is
-    // computed by converting kilobytes to bytes.
-    optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true];
-
-    // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in
-    // /proc/PID/status.
-    optional int32 rss_high_water_mark_in_kilobytes = 4;
-}
-
-/*
- * Logs the memory stats for a process.
- *
- * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService)
- * and for selected native processes.
- */
-message ProcessMemorySnapshot {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process name.
-    // Usually package name or process cmdline.
-    // Provided by ActivityManagerService or read from /proc/PID/cmdline.
-    optional string process_name = 2;
-
-    // The pid of the process.
-    // Allows to disambiguate instances of the process.
-    optional int32 pid = 3;
-
-    // The current OOM score adjustment value.
-    // Read from ProcessRecord for managed processes.
-    // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones.
-    optional int32 oom_score_adj = 4;
-
-    // The current RSS of the process.
-    // VmRSS from /proc/pid/status.
-    optional int32 rss_in_kilobytes = 5;
-
-    // The current anon RSS of the process.
-    // RssAnon from /proc/pid/status.
-    optional int32 anon_rss_in_kilobytes = 6;
-
-    // The current swap size of the process.
-    // VmSwap from /proc/pid/status.
-    optional int32 swap_in_kilobytes = 7;
-
-    // The sum of rss_in_kilobytes and swap_in_kilobytes.
-    optional int32 anon_rss_and_swap_in_kilobytes = 8;
-}
-
-/*
- * Elapsed real time from SystemClock.
- */
-message SystemElapsedRealtime {
-    optional uint64 time_millis = 1;
-}
-
-/*
- * Up time from SystemClock.
- */
-message SystemUptime {
-    // Milliseconds since the system was booted.
-    // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting
-    // for external input).
-    // It is not affected by clock scaling, idle, or other power saving mechanisms.
-    optional uint64 uptime_millis = 1;
-}
-
-/*
- * Reads from /proc/uid_concurrent_active_time which has the format:
- * active: X (X is # cores)
- * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores)
- * [uid1]: [time-0] [time-1] [time-2] ... ...
- * ...
- * Time-N means the CPU time a UID spent running concurrently with N other processes.
- * The file contains a monotonically increasing count of time for a single boot.
- */
-message CpuActiveTime {
-    optional int32 uid = 1 [(is_uid) = true];
-    optional uint64 time_millis = 2;
-}
-
-/**
- * Reads from /proc/uid_concurrent_policy_time which has the format:
- * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4)
- * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
- * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
- * ...
- * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes.
- * The file contains a monotonically increasing count of time for a single boot.
- */
-message CpuClusterTime {
-    optional int32 uid = 1 [(is_uid) = true];
-    optional int32 cluster_index = 2;
-    optional uint64 time_millis = 3;
-}
-
-/*
- * Pulls free disk space, for data, system partition and temporary directory.
- */
-message DiskSpace {
-    // available bytes in data partition
-    optional uint64 data_available_bytes = 1;
-    // available bytes in system partition
-    optional uint64 system_available_bytes = 2;
-    // available bytes in download cache or temp directories
-    optional uint64 temp_available_bytes = 3;
-}
-
-/**
- * Pulls battery coulomb counter, which is the remaining battery charge in uAh.
- *
- * Pulled from StatsCompanionService.java
- */
-message RemainingBatteryCapacity {
-    optional int32 charge_micro_ampere_hour = 1;
-}
-
-/**
- * Pulls battery capacity, which is the battery capacity when full in uAh.
- * Pulled from:
- *   frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
- */
-message FullBatteryCapacity {
-    optional int32 capacity_micro_ampere_hour = 1;
-}
-
-/**
- * Pulls battery voltage.
- * Pulled from:
- *   frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
- */
-message BatteryVoltage {
-    // The voltage of the battery, in millivolts.
-    optional int32 voltage_millivolt = 1;
-}
-
-/**
- * Pulls battery level (percent full, from 0 to 100).
- *
- * Pulled from:
- *   frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
- */
-message BatteryLevel {
-    // Battery level. Should be in [0, 100].
-    optional int32 battery_level = 1;
-}
-
-/**
- * Pulls the temperature of various parts of the device.
- * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303.
- *
- * Pulled from StatsCompanionService.java
- */
-message Temperature {
-    // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_.
-    optional android.os.TemperatureTypeEnum sensor_location = 1;
-
-    // The name of the temperature source. Eg. CPU0
-    optional string sensor_name = 2;
-
-    // Temperature in tenths of a degree C.
-    // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
-    optional int32 temperature_deci_celsius = 3;
-
-    // Relative severity of the throttling, see enum definition.
-    optional android.os.ThrottlingSeverityEnum severity = 4;
-}
-
-/**
- * Pulls the statistics of calls to Binder.
- *
- * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one
- * config on the device.
- *
- * Next tag: 15
- */
-message BinderCalls {
-    // UID of the process responsible for the binder transaction. It will be set if the process
-    // executing the binder transaction attribute the transaction to another uid using
-    // Binder.setThreadWorkSource().
-    //
-    // If not set, the value will be -1.
-    optional int32 uid = 1 [(is_uid) = true];
-    // UID of the process executing the binder transaction.
-    optional int32 direct_caller_uid = 14;
-    // Fully qualified class name of the API call.
-    //
-    // This is a system server class name.
-    //
-    // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid
-    // gets recycled and we have isolated uids, we might attribute the data incorrectly.
-    // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less
-    // commonly used APIs.
-    optional string service_class_name = 2;
-    // Method name of the API call. It can also be a transaction code if we cannot
-    // resolve it to a name. See Binder#getTransactionName.
-    //
-    // This is a system server method name.
-    optional string service_method_name = 3;
-    // Total number of API calls.
-    optional int64 call_count = 4;
-    // True if the screen was interactive PowerManager#isInteractive at the end of the call.
-    optional bool screen_interactive = 13;
-    // Total number of API calls we have data recorded for. If we collected data for all the calls,
-    // call_count will be equal to recorded_call_count.
-    //
-    // If recorded_call_count is different than call_count, it means data collection has been
-    // sampled. All the fields below will be sampled in this case.
-    optional int64 recorded_call_count = 12;
-    // Number of exceptions thrown by the API.
-    optional int64 recorded_exception_count = 5;
-    // Total latency of all API calls.
-    // Average can be computed using total_latency_micros / recorded_call_count.
-    optional int64 recorded_total_latency_micros = 6;
-    // Maximum latency of one API call.
-    optional int64 recorded_max_latency_micros = 7;
-    // Total CPU usage of all API calls.
-    // Average can be computed using total_cpu_micros / recorded_call_count.
-    // Total can be computed using total_cpu_micros / recorded_call_count * call_count.
-    optional int64 recorded_total_cpu_micros = 8;
-    // Maximum CPU usage of one API call.
-    optional int64 recorded_max_cpu_micros = 9;
-    // Maximum parcel reply size of one API call.
-    optional int64 recorded_max_reply_size_bytes = 10;
-    // Maximum parcel request size of one API call.
-    optional int64 recorded_max_request_size_bytes = 11;
-}
-
-/**
- * Pulls the statistics of exceptions during calls to Binder.
- *
- * Binder stats are cumulative from boot unless somebody reset the data using
- * > adb shell dumpsys binder_calls_stats --reset
- */
-message BinderCallsExceptions {
-    // Exception class name, e.g. java.lang.IllegalArgumentException.
-    //
-    // This is an exception class name thrown by the system server.
-    optional string exception_class_name = 1;
-    // Total number of exceptions.
-    optional int64 exception_count = 2;
-}
-
-/**
- * Pulls the statistics of message dispatching on HandlerThreads.
- *
- * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one
- * config on the device.
- *
- * Next tag: 11
- */
-message LooperStats {
-    // The uid that made a call to the System Server and caused the message to be enqueued.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Fully qualified class name of the handler target class.
-    //
-    // This field does not contain PII. This is a system server class name.
-    optional string handler_class_name = 2;
-
-    // The name of the thread that runs the Looper.
-    //
-    // This field does not contain PII. This is a system server thread name.
-    optional string looper_thread_name = 3;
-
-    // The name of the dispatched message.
-    //
-    // This field does not contain PII. This is a system server constant or class
-    // name.
-    optional string message_name = 4;
-
-    // Total number of successfully dispatched messages.
-    optional int64 message_count = 5;
-
-    // Total number of messages that failed dispatching.
-    optional int64 exception_count = 6;
-
-    // Total number of processed messages we have data recorded for. If we
-    // collected data for all the messages, message_count will be equal to
-    // recorded_message_count.
-    //
-    // If recorded_message_count is different than message_count, it means data
-    // collection has been sampled. The fields below will be sampled in this case.
-    optional int64 recorded_message_count = 7;
-
-    // Total latency of all processed messages.
-    // Average can be computed using recorded_total_latency_micros /
-    // recorded_message_count.
-    optional int64 recorded_total_latency_micros = 8;
-
-    // Total CPU usage of all processed message.
-    // Average can be computed using recorded_total_cpu_micros /
-    // recorded_message_count. Total can be computed using
-    // recorded_total_cpu_micros / recorded_message_count * message_count.
-    optional int64 recorded_total_cpu_micros = 9;
-
-    // True if the screen was interactive PowerManager#isInteractive at the end of the call.
-    optional bool screen_interactive = 10;
-
-    // Max recorded CPU usage of all processed messages.
-    optional int64 recorded_max_cpu_micros = 11;
-
-    // Max recorded latency of all processed messages.
-    optional int64 recorded_max_latency_micros = 12;
-
-    // Total number of messages we tracked the dispatching delay for. If we
-    // collected data for all the messages, message_count will be equal to
-    // recorded_delay_message_count.
-    //
-    // If recorded_delay_message_count is different than message_count, it means data
-    // collection has been sampled or/and not all messages specified the target dispatch time.
-    // The fields below will be sampled in this case.
-    optional int64 recorded_delay_message_count = 13;
-
-    // Total dispatching delay of all processed messages.
-    // Calculated as a difference between the target dispatching time (Message.when)
-    // and the actual dispatching time.
-    // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count.
-    optional int64 recorded_total_delay_millis = 14;
-
-    // Max dispatching delay of all processed messages.
-    // Calculated as a difference between the target dispatching time (Message.when)
-    // and the actual dispatching time.
-    optional int64 recorded_max_delay_millis = 15;
-}
-
-/**
- * Pulls disk information, such as write speed and latency.
- */
-message DiskStats {
-    // Time taken to open, write 512B to, and close a file.
-    // -1 if error performing the check.
-    optional int64 data_write_latency_millis = 1;
-
-    optional bool file_based_encryption = 2;
-
-    // Recent disk write speed in kB/s.
-    // -1 if error querying storageed.
-    // 0 if data is unavailable.
-    optional int32 recent_disk_write_speed = 3;
-}
-
-
-/**
- * Free and total bytes of the Data, Cache, and System partition.
- */
-message DirectoryUsage {
-    enum Directory {
-        UNKNOWN = 0;
-        DATA = 1;
-        CACHE = 2;
-        SYSTEM = 3;
-    }
-    optional Directory directory = 1;
-    optional int64 free_bytes = 2;
-    optional int64 total_bytes = 3;
-}
-
-
-/**
- * Size of an application: apk size, data size, and cache size.
- * Reads from a cached file produced daily by DiskStatsLoggingService.java.
- * Information is only reported for apps with the primary user (user 0).
- * Sizes are aggregated by package name.
- */
-message AppSize {
-    // Including uids will involve modifying diskstats logic.
-    optional string package_name = 1;
-    // App size in bytes. -1 if unavailable.
-    optional int64 app_size_bytes = 2;
-    // App data size in bytes. -1 if unavailable.
-    optional int64 app_data_size_bytes = 3;
-    // App cache size in bytes. -1 if unavailable.
-    optional int64 app_cache_size_bytes = 4;
-    // Time that the cache file was produced.
-    // Uses System.currentTimeMillis(), which is wall clock time.
-    optional int64 cache_time_millis = 5;
-}
-
-
-/**
- * Size of a particular category. Eg: photos, videos.
- * Reads from a cached file produced daily by DiskStatsLoggingService.java.
- */
-message CategorySize {
-    enum Category {
-        UNKNOWN = 0;
-        APP_SIZE = 1;
-        APP_DATA_SIZE = 2;
-        APP_CACHE_SIZE = 3;
-        PHOTOS = 4;
-        VIDEOS = 5;
-        AUDIO = 6;
-        DOWNLOADS = 7;
-        SYSTEM = 8;
-        OTHER = 9;
-    }
-    optional Category category = 1;
-    // Category size in bytes.
-    optional int64 size_bytes = 2;
-    // Time that the cache file was produced.
-    // Uses System.currentTimeMillis(), which is wall clock time.
-    optional int64 cache_time_millis = 3;
-}
-
-/**
- * Pulls per uid I/O stats. The stats are cumulative since boot.
- *
- * Read/write bytes are I/O events from a storage device
- * Read/write chars are data requested by read/write syscalls, and can be
- *   satisfied by caching.
- *
- * Pulled from StatsCompanionService, which reads proc/uid_io/stats.
- */
-message DiskIo {
-    optional int32 uid = 1 [(is_uid) = true];
-    optional int64 fg_chars_read = 2;
-    optional int64 fg_chars_write = 3;
-    optional int64 fg_bytes_read = 4;
-    optional int64 fg_bytes_write = 5;
-    optional int64 bg_chars_read = 6;
-    optional int64 bg_chars_write = 7;
-    optional int64 bg_bytes_read = 8;
-    optional int64 bg_bytes_write = 9;
-    optional int64 fg_fsync = 10;
-    optional int64 bg_fsync= 11;
-}
-
-
-/**
- * Pulls the number of fingerprints for each user.
- *
- * Pulled from StatsCompanionService, which queries <Biometric>Manager.
- */
-message NumFingerprintsEnrolled {
-    // The associated user. Eg: 0 for owners, 10+ for others.
-    // Defined in android/os/UserHandle.java
-    optional int32 user = 1;
-    // Number of fingerprints registered to that user.
-    optional int32 num_fingerprints_enrolled = 2;
-}
-
-/**
- * Pulls the number of faces for each user.
- *
- * Pulled from StatsCompanionService, which queries <Biometric>Manager.
- */
-message NumFacesEnrolled {
-    // The associated user. Eg: 0 for owners, 10+ for others.
-    // Defined in android/os/UserHandle.java
-    optional int32 user = 1;
-    // Number of faces registered to that user.
-    optional int32 num_faces_enrolled = 2;
-}
-/**
- * A mapping of role holder -> role
- */
-message RoleHolder {
-    // uid of the role holder
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // package name of the role holder
-    optional string package_name = 2;
-
-    // the role held
-    optional string role = 3;
-}
-
-message AggStats {
-    // These are all in byte resolution.
-    optional int64 min = 1 [deprecated = true];
-    optional int64 average = 2 [deprecated = true];
-    optional int64 max = 3 [deprecated = true];
-
-    // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above
-    // int64 fields.
-    optional int32 mean_kb = 4;
-    optional int32 max_kb = 5;
-}
-
-// A reduced subset of process states; reducing the number of possible states allows more
-// aggressive device-side aggregation of statistics and hence reduces metric upload size.
-enum ProcessStateAggregated {
-    PROCESS_STATE_UNKNOWN = 0;
-    // Persistent system process.
-    PROCESS_STATE_PERSISTENT = 1;
-    // Top activity; actually any visible activity.
-    PROCESS_STATE_TOP = 2;
-    // Process binding to top or a foreground service.
-    PROCESS_STATE_BOUND_TOP_OR_FGS = 3;
-    // Processing running a foreground service.
-    PROCESS_STATE_FGS = 4;
-    // Important foreground process (ime, wallpaper, etc).
-    PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
-    // Important background process.
-    PROCESS_STATE_BACKGROUND = 6;
-    // Process running a receiver.
-    PROCESS_STATE_RECEIVER = 7;
-    // All kinds of cached processes.
-    PROCESS_STATE_CACHED = 8;
-}
-
-// Next tag: 13
-message ProcessStatsStateProto {
-    optional android.service.procstats.ScreenState screen_state = 1;
-
-    optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true];
-
-    // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
-    // and not frameworks/base/core/java/android/app/ActivityManager.java
-    optional android.service.procstats.ProcessState process_state = 3 [deprecated = true];
-
-    optional ProcessStateAggregated process_state_aggregated = 10;
-
-    // Millisecond uptime duration spent in this state
-    optional int64 duration_millis = 4 [deprecated = true];
-    // Same as above, but with minute resolution so it fits into an int32.
-    optional int32 duration_minutes = 11;
-
-    // Millisecond elapsed realtime duration spent in this state
-    optional int64 realtime_duration_millis = 9 [deprecated = true];
-    // Same as above, but with minute resolution so it fits into an int32.
-    optional int32 realtime_duration_minutes = 12;
-
-    // # of samples taken
-    optional int32 sample_size = 5;
-
-    // PSS is memory reserved for this process
-    optional AggStats pss = 6 [deprecated = true];
-
-    // USS is memory shared between processes, divided evenly for accounting
-    optional AggStats uss = 7 [deprecated = true];
-
-    // RSS is memory resident for this process
-    optional AggStats rss = 8;
-}
-
-// Next Tag: 8
-message ProcessStatsProto {
-    // Name of process.
-    optional string process = 1;
-
-    // Uid of the process.
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Information about how often kills occurred
-    message Kill {
-        // Count of excessive CPU kills
-        optional int32 cpu = 1;
-
-        // Count of kills when cached
-        optional int32 cached = 2;
-
-        // PSS stats during cached kill
-        optional AggStats cached_pss = 3;
-    }
-    optional Kill kill = 3 [deprecated = true];
-
-    // Time and memory spent in various states.
-    repeated ProcessStatsStateProto states = 5;
-
-    // Total time process has been running...  screen_state, memory_state, and process_state
-    // will not be set.
-    optional ProcessStatsStateProto total_running_state = 6;
-
-    // Association data for this process in this state;
-    // each entry here is one association.
-    repeated ProcessStatsAssociationProto assocs = 7;
-}
-
-// Next Tag: 6
-message ProcessStatsAssociationProto {
-    // Procss Name of the associated process (client process of service binding)
-    optional string assoc_process_name = 1;
-
-    // Package Name of the associated package (client package of service binding)
-    optional string assoc_package_name = 2 [deprecated = true];
-
-    // UID of the associated process/package (client package of service binding)
-    optional int32 assoc_uid = 5 [(is_uid) = true];
-
-    // Total count of the times this association (service binding) appeared.
-    optional int32 total_count = 3;
-
-    // Uptime total duration in seconds this association (service binding) was around.
-    optional int32 total_duration_secs = 4;
-}
-
-message PackageServiceOperationStatsProto {
-    // Operate enum: Started, Foreground, Bound, Executing
-    optional android.service.procstats.ServiceOperationState operation = 1;
-
-    // Number of times the service was in this operation.
-    optional int32 count = 2;
-
-    // Information about a state the service can be in.
-    message StateStats {
-        // Screen state enum.
-        optional android.service.procstats.ScreenState screen_state = 1;
-        // Memory state enum.
-        optional android.service.procstats.MemoryState memory_state = 2;
-
-        // duration in milliseconds.
-        optional int64 duration_millis = 3;
-        // Millisecond elapsed realtime duration spent in this state
-        optional int64 realtime_duration_millis = 4;
-    }
-    repeated StateStats state_stats = 3;
-}
-
-message PackageServiceStatsProto {
-    // Name of service component.
-    optional string service_name = 1;
-
-    // The operation stats.
-    // The package_name, package_uid, package_version, service_name will not be set to save space.
-    repeated PackageServiceOperationStatsProto operation_stats = 2;
-}
-
-message PackageAssociationSourceProcessStatsProto {
-    // Uid of the process.
-    optional int32 process_uid = 1;
-    // Process name.
-    optional string process_name = 2;
-    // Package name.
-    optional string package_name = 7;
-    // Total count of the times this association appeared.
-    optional int32 total_count = 3;
-
-    // Millisecond uptime total duration this association was around.
-    optional int64 total_duration_millis = 4;
-
-    // Total count of the times this association became actively impacting its target process.
-    optional int32 active_count = 5;
-
-    // Information on one source in this association.
-    message StateStats {
-        // Process state enum.
-        optional android.service.procstats.ProcessState process_state = 1;
-        // Millisecond uptime duration spent in this state
-        optional int64 duration_millis = 2;
-        // Millisecond elapsed realtime duration spent in this state
-        optional int64 realtime_duration_mmillis = 3;
-    }
-    repeated StateStats active_state_stats = 6;
-}
-
-message PackageAssociationProcessStatsProto {
-    // Name of the target component.
-    optional string component_name = 1;
-    // Information on one source in this association.
-    repeated PackageAssociationSourceProcessStatsProto sources = 2;
-}
-
-
-message ProcessStatsPackageProto {
-    // Name of package.
-    optional string package = 1;
-
-    // Uid of the package.
-    optional int32 uid = 2;
-
-    // Version of the package.
-    optional int64 version = 3;
-
-    // Stats for each process running with the package loaded in to it.
-    repeated ProcessStatsProto process_stats = 4;
-
-    // Stats for each of the package's services.
-    repeated PackageServiceStatsProto service_stats = 5;
-
-    // Stats for each association with the package.
-    repeated PackageAssociationProcessStatsProto association_stats = 6;
-}
-
-message ProcessStatsSectionProto {
-    // Elapsed realtime at start of report.
-    optional int64 start_realtime_millis = 1;
-
-    // Elapsed realtime at end of report.
-    optional int64 end_realtime_millis = 2;
-
-    // CPU uptime at start of report.
-    optional int64 start_uptime_millis = 3;
-
-    // CPU uptime at end of report.
-    optional int64 end_uptime_millis = 4;
-
-    // System runtime library. e.g. "libdvm.so", "libart.so".
-    optional string runtime = 5;
-
-    // whether kernel reports swapped pss.
-    optional bool has_swapped_pss = 6;
-
-    // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops".
-    enum Status {
-        STATUS_UNKNOWN = 0;
-        STATUS_COMPLETE = 1;
-        STATUS_PARTIAL = 2;
-        STATUS_SHUTDOWN = 3;
-        STATUS_SYSPROPS = 4;
-    }
-    repeated Status status = 7;
-
-    // Number of pages available of various types and sizes, representation fragmentation.
-    repeated ProcessStatsAvailablePagesProto available_pages = 10;
-
-    // Stats for each process.
-    repeated ProcessStatsProto process_stats = 8;
-
-    // Stats for each package.
-    repeated ProcessStatsPackageProto package_stats = 9;
-}
-
-message ProcessStatsAvailablePagesProto {
-    // Node these pages are in (as per /proc/pagetypeinfo)
-    optional int32 node = 1;
-
-    // Zone these pages are in (as per /proc/pagetypeinfo)
-    optional string zone = 2;
-
-    // Label for the type of these pages (as per /proc/pagetypeinfo)
-    optional string label = 3;
-
-    // Distribution of number of pages available by order size.  First entry in array is
-    // order 0, second is order 1, etc.  Each order increase is a doubling of page size.
-    repeated int32 pages_per_order = 4;
-}
-
-/**
- * Pulled from ProcessStatsService.java
- */
-message ProcStats {
-    optional ProcessStatsSectionProto proc_stats_section = 1;
-    // Data pulled from device into this is sometimes sharded across multiple atoms to work around
-    // a size limit. When this happens, this shard ID will contain an increasing 1-indexed integer
-    // with the number of this shard.
-    optional int32 shard_id = 2;
-}
-
-/**
- * Pulled from ProcessStatsService.java
- */
-message ProcStatsPkgProc {
-    optional ProcessStatsSectionProto proc_stats_section = 1;
-}
-
-// Next Tag: 2
-message PackageRemoteViewInfoProto {
-    optional string package_name = 1;
-    // add per-package additional info here (like channels)
-}
-
-// Next Tag: 2
-message NotificationRemoteViewsProto {
-    repeated PackageRemoteViewInfoProto package_remote_view_info = 1;
-}
-
-/**
- * Pulled from NotificationManagerService.java
- */
-message NotificationRemoteViews {
-    optional NotificationRemoteViewsProto notification_remote_views = 1;
-}
-
-/**
- * Atom that contains a list of a package's preferences, pulled from NotificationManagerService.java
- */
-message PackageNotificationPreferences {
-    // Uid under which the package is installed.
-    optional int32 uid = 1 [(is_uid) = true];
-    // Notification importance, which specifies when and how a notification is displayed.
-    // Specified under core/java/android/app/NotificationManager.java.
-    optional int32 importance = 2;
-    // Lockscreen visibility as set by the user.
-    optional int32 visibility = 3;
-    // Bitfield mask indicating what fields were locked by the user (see LockableAppfields in
-    // PreferencesHelper.java)
-    optional int32 user_locked_fields = 4;
-}
-
-/**
- * Atom that contains a list of a package's channel preferences, pulled from
- * NotificationManagerService.java.
- */
-message PackageNotificationChannelPreferences {
-    // Uid under which the package is installed.
-    optional int32 uid = 1 [(is_uid) = true];
-    // Channel's ID. Should always be available.
-    optional string channel_id = 2;
-    // Channel's name. Should always be available.
-    optional string channel_name = 3;
-    // Channel's description. Optionally set by the channel creator.
-    optional string description = 4;
-    // Notification importance, which specifies when and how a notification is displayed. Specified
-    // under core/java/android/app/NotificationManager.java.
-    optional int32 importance = 5;
-    // Bitmask representing which fields have been set by the user. See field bitmask descriptions
-    // at core/java/android/app/NotificationChannel.java
-    optional int32 user_locked_fields = 6;
-    // Indicates if the channel was deleted by the app.
-    optional bool is_deleted = 7;
-    // Indicates if the channel was marked as a conversation by the app.
-    optional bool is_conversation = 8;
-    // Indicates if the channel is a conversation that was demoted by the user.
-    optional bool is_demoted_conversation = 9;
-    // Indicates if the channel is a conversation that was marked as important by the user.
-    optional bool is_important_conversation = 10;
-}
-
-/**
- * Atom that represents an item in the list of Do Not Disturb rules, pulled from
- * NotificationManagerService.java.
- */
-message DNDModeProto {
-    enum Mode {
-        ROOT_CONFIG = -1;  // Used to distinguish the config (one per user) from the rules.
-        ZEN_MODE_OFF = 0;
-        ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
-        ZEN_MODE_NO_INTERRUPTIONS = 2;
-        ZEN_MODE_ALARMS = 3;
-    }
-    optional int32 user = 1;  // Android user ID (0, 1, 10, ...)
-    optional bool enabled = 2;  // true for ROOT_CONFIG if a manualRule is enabled
-    optional bool channels_bypassing = 3; // only valid for ROOT_CONFIG
-    optional Mode zen_mode = 4;
-    // id is one of the system default rule IDs, or empty
-    // May also be "MANUAL_RULE" to indicate app-activation of the manual rule.
-    optional string id = 5;
-    optional int32 uid = 6 [(is_uid) = true]; // currently only SYSTEM_UID or 0 for other
-    optional DNDPolicyProto policy = 7;
-}
-
-/**
- * Atom that represents a Do Not Disturb policy, an optional detail proto for DNDModeProto.
- */
-message DNDPolicyProto {
-    enum State {
-        STATE_UNSET = 0;
-        STATE_ALLOW = 1;
-        STATE_DISALLOW = 2;
-    }
-    optional State calls = 1;
-    optional State repeat_callers = 2;
-    optional State messages = 3;
-    optional State conversations = 4;
-    optional State reminders = 5;
-    optional State events = 6;
-    optional State alarms = 7;
-    optional State media = 8;
-    optional State system = 9;
-    optional State fullscreen = 10;
-    optional State lights = 11;
-    optional State peek = 12;
-    optional State status_bar = 13;
-    optional State badge = 14;
-    optional State ambient = 15;
-    optional State notification_list = 16;
-
-    enum PeopleType {
-        PEOPLE_UNSET = 0;
-        PEOPLE_ANYONE = 1;
-        PEOPLE_CONTACTS = 2;
-        PEOPLE_STARRED = 3;
-        PEOPLE_NONE = 4;
-    }
-
-    optional PeopleType allow_calls_from = 17;
-    optional PeopleType allow_messages_from = 18;
-
-    enum ConversationType {
-        CONV_UNSET = 0;
-        CONV_ANYONE = 1;
-        CONV_IMPORTANT = 2;
-        CONV_NONE = 3;
-    }
-
-    optional ConversationType allow_conversations_from = 19;
-}
-
-/**
- * Atom that contains a list of a package's channel group preferences, pulled from
- * NotificationManagerService.java.
- */
-message PackageNotificationChannelGroupPreferences {
-    // Uid under which the package is installed.
-    optional int32 uid = 1 [(is_uid) = true];
-    // Channel Group's ID. Should always be available.
-    optional string group_id = 2;
-    // Channel Group's name. Should always be available.
-    optional string group_name = 3;
-    // Channel Group's description. Optionally set by group creator.
-    optional string description = 4;
-    // Indicates if notifications from this channel group are blocked.
-    optional bool is_blocked = 5;
-    // Bitmask representing which fields have been set by the user. See field bitmask descriptions
-    // at core/java/android/app/NotificationChannelGroup.java
-    optional int32 user_locked_fields = 6;
-}
-
-message PowerProfileProto {
-    optional double cpu_suspend = 1;
-
-    optional double cpu_idle = 2;
-
-    optional double cpu_active = 3;
-
-    message CpuCluster {
-        optional int32 id = 1;
-        optional double cluster_power = 2;
-        optional int32 cores = 3;
-        repeated int64 speed = 4;
-        repeated double core_power = 5;
-    }
-
-    repeated CpuCluster cpu_cluster = 40;
-
-    optional double wifi_scan = 4;
-
-    optional double wifi_on = 5;
-
-    optional double wifi_active = 6;
-
-    optional double wifi_controller_idle = 7;
-
-    optional double wifi_controller_rx = 8;
-
-    optional double wifi_controller_tx = 9;
-
-    repeated double wifi_controller_tx_levels = 10;
-
-    optional double wifi_controller_operating_voltage = 11;
-
-    optional double bluetooth_controller_idle = 12;
-
-    optional double bluetooth_controller_rx = 13;
-
-    optional double bluetooth_controller_tx = 14;
-
-    optional double bluetooth_controller_operating_voltage = 15;
-
-    optional double modem_controller_sleep = 16;
-
-    optional double modem_controller_idle = 17;
-
-    optional double modem_controller_rx = 18;
-
-    repeated double modem_controller_tx = 19;
-
-    optional double modem_controller_operating_voltage = 20;
-
-    optional double gps_on = 21;
-
-    repeated double gps_signal_quality_based = 22;
-
-    optional double gps_operating_voltage = 23;
-
-    optional double bluetooth_on = 24;
-
-    optional double bluetooth_active = 25;
-
-    optional double bluetooth_at_cmd = 26;
-
-    optional double ambient_display = 27;
-
-    optional double screen_on = 28;
-
-    optional double radio_on = 29;
-
-    optional double radio_scanning = 30;
-
-    optional double radio_active = 31;
-
-    optional double screen_full = 32;
-
-    optional double audio = 33;
-
-    optional double video = 34;
-
-    optional double flashlight = 35;
-
-    optional double memory = 36;
-
-    optional double camera = 37;
-
-    optional double wifi_batched_scan = 38;
-
-    optional double battery_capacity = 39;
-}
-
-/**
- * power_profile.xml and other constants for power model calculations.
- * Pulled from PowerProfile.java
- */
-message PowerProfile {
-    optional PowerProfileProto power_profile = 1;
-}
-
-/**
- * Logs when a user restriction was added or removed.
- *
- * Logged from:
- *   frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
- */
-message UserRestrictionChanged {
-    // The raw string of the user restriction as defined in UserManager.
-    // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS.
-    optional string restriction = 1;
-    // Whether the restriction is enabled or disabled.
-    optional bool enabled = 2;
-}
-
-/**
- * Pulls process user time and system time. Puller takes a snapshot of all pids
- * in the system and returns cpu stats for those that are working at the time.
- * Dead pids will be dropped. Kernel processes are excluded.
- * Min cool-down is 5 sec.
- */
-message ProcessCpuTime {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional string process_name = 2;
-    // Process cpu time in user space, cumulative from boot/process start
-    optional int64 user_time_millis = 3;
-    // Process cpu time in system space, cumulative from boot/process start
-    optional int64 system_time_millis = 4;
-}
-
-/**
- * Pulls the CPU usage for each thread.
- *
- * Read from /proc/$PID/task/$TID/time_in_state files.
- *
- * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and
- * time_in_state files not being present on some phones, have not been addressed. These should be
- * considered before a public release.
- */
-message CpuTimePerThreadFreq {
-    // UID that owns the process.
-    optional int32 uid = 1 [(is_uid) = true];
-    // ID of the process.
-    optional int32 process_id = 2;
-    // ID of the thread.
-    optional int32 thread_id = 3;
-    // Name of the process taken from `/proc/$PID/cmdline`.
-    optional string process_name = 4;
-    // Name of the thread taken from `/proc/$PID/task/$TID/comm`
-    optional string thread_name = 5;
-
-    // Report eight different frequencies, and how much time is spent in each frequency. Frequencies
-    // are given in KHz, and time is given in milliseconds since the thread started. All eight
-    // frequencies are given here as the alternative is sending eight separate atoms. This method
-    // significantly reduces the amount of data created
-    optional int32 frequency1_khz = 6;
-    optional int32 time1_millis = 7;
-    optional int32 frequency2_khz = 8;
-    optional int32 time2_millis = 9;
-    optional int32 frequency3_khz = 10;
-    optional int32 time3_millis = 11;
-    optional int32 frequency4_khz = 12;
-    optional int32 time4_millis = 13;
-    optional int32 frequency5_khz = 14;
-    optional int32 time5_millis = 15;
-    optional int32 frequency6_khz = 16;
-    optional int32 time6_millis = 17;
-    optional int32 frequency7_khz = 18;
-    optional int32 time7_millis = 19;
-    optional int32 frequency8_khz = 20;
-    optional int32 time8_millis = 21;
-}
-
-/**
- * Pulls information about the device's build.
- */
-message BuildInformation {
-    // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse.
-    // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags.
-    optional string fingerprint = 1;
-
-    // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated.
-    optional string brand = 2;
-
-    // Build.PRODUCT. The name of the overall product.
-    optional string product = 3;
-
-    // Build.DEVICE. The name of the industrial design.
-    optional string device = 4;
-
-    // Build.VERSION.RELEASE. The user-visible version string.  E.g., "1.0" or "3.4b5" or "bananas".
-    optional string version_release = 5;
-
-    // Build.ID. E.g. a label like "M4-rc20".
-    optional string id = 6;
-
-    // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to
-    // represent this build.
-    optional string version_incremental = 7;
-
-    // Build.TYPE. The type of build, like "user" or "eng".
-    optional string type = 8;
-
-    // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug".
-    optional string tags = 9;
-}
-
-/**
- * Logs information about mismatched caller for content capture.
- *
- * Logged from:
- *   frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java
- */
-message ContentCaptureCallerMismatchReported {
-    optional string intended_package = 1;
-    optional string calling_package = 2;
-}
-
-/**
- * Logs information about content capture service events.
- *
- * Logged from:
- *   frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
- */
-message ContentCaptureServiceEvents {
-    // The type of event.
-    enum Event {
-        UNKNOWN = 0;
-        ON_CONNECTED = 1;
-        ON_DISCONNECTED = 2;
-        SET_WHITELIST = 3;
-        SET_DISABLED = 4;
-        ON_USER_DATA_REMOVED = 5;
-        ON_DATA_SHARE_REQUEST = 6;
-        ACCEPT_DATA_SHARE_REQUEST = 7;
-        REJECT_DATA_SHARE_REQUEST = 8;
-        DATA_SHARE_WRITE_FINISHED = 9;
-        DATA_SHARE_ERROR_IOEXCEPTION = 10;
-        DATA_SHARE_ERROR_EMPTY_DATA = 11;
-        DATA_SHARE_ERROR_CLIENT_PIPE_FAIL = 12;
-        DATA_SHARE_ERROR_SERVICE_PIPE_FAIL = 13;
-        DATA_SHARE_ERROR_CONCURRENT_REQUEST = 14;
-        DATA_SHARE_ERROR_TIMEOUT_INTERRUPTED = 15;
-    }
-    optional Event event = 1;
-    // component/package of content capture service.
-    optional string service_info = 2;
-    // component/package of target.
-    // it's a concatenated list of component/package for SET_WHITELIST event
-    // separated by " ".
-    optional string target_info = 3;
-}
-
-/**
- * Logs information about content capture session events.
- *
- * Logged from:
- *   frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
- */
-message ContentCaptureSessionEvents {
-    // The type of event.
-    enum Event {
-        UNKNOWN = 0;
-        ON_SESSION_STARTED = 1;
-        ON_SESSION_FINISHED = 2;
-        SESSION_NOT_CREATED = 3;
-    }
-    optional int32 session_id = 1;
-    optional Event event = 2;
-    // (n/a on session finished)
-    optional int32 state_flags = 3;
-    // component/package of content capture service.
-    optional string service_info = 4;
-    // component/package of app.
-    // (n/a on session finished)
-    optional string app_info = 5;
-    optional bool is_child_session = 6;
-}
-
-/**
- * Logs information about session being flushed.
- *
- * Logged from:
- *   frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
- */
-message ContentCaptureFlushed {
-    optional int32 session_id = 1;
-    // component/package of content capture service.
-    optional string service_info = 2;
-    // component/package of app.
-    optional string app_info = 3;
-    // session start/finish events
-    optional int32 child_session_started = 4;
-    optional int32 child_session_finished = 5;
-    // count of view events.
-    optional int32 view_appeared_count = 6;
-    optional int32 view_disappeared_count = 7;
-    optional int32 view_text_changed_count = 8;
-
-    // Flush stats.
-    optional int32 max_events = 9;
-    optional int32 idle_flush_freq = 10;
-    optional int32 text_flush_freq = 11;
-    optional int32 flush_reason = 12;
-}
-
-/**
- * Pulls on-device BatteryStats power use calculations for the overall device.
- */
-message DeviceCalculatedPowerUse {
-    // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
-    // BatteryStats last reset (i.e. roughly since device was last significantly charged).
-    // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()).
-    optional int64 computed_power_nano_amp_secs = 1;
-}
-
-/**
- * Pulls on-device BatteryStats power use calculations broken down by uid.
- * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use
- * that is attributed to non-uid items. They must all be included to get the total power use.
- */
-message DeviceCalculatedPowerBlameUid {
-    // Uid being blamed. Note: isolated uids have already been mapped to host uid.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
-    // BatteryStats last reset (i.e. roughly since device was last significantly charged).
-    optional int64 power_nano_amp_secs = 2;
-}
-
-/**
- * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by
- * drain type.
- * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that
- * is attributed uids. They must all be included to get the total power use.
- */
-message DeviceCalculatedPowerBlameOther {
-    // The type of item whose power use is being reported.
-    enum DrainType {
-        AMBIENT_DISPLAY = 0;
-        // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid.
-        BLUETOOTH = 2;
-        CAMERA = 3;
-        // Cell-standby
-        CELL = 4;
-        FLASHLIGHT = 5;
-        IDLE = 6;
-        MEMORY = 7;
-        // Amount that total computed drain exceeded the drain estimated using the
-        // battery level changes and capacity.
-        OVERCOUNTED = 8;
-        PHONE = 9;
-        SCREEN = 10;
-        // Amount that total computed drain was below the drain estimated using the
-        // battery level changes and capacity.
-        UNACCOUNTED = 11;
-        // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported.
-        WIFI = 13;
-    }
-    optional DrainType drain_type = 1;
-
-    // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
-    // BatteryStats last reset (i.e. roughly since device was last significantly charged).
-    optional int64 power_nano_amp_secs = 2;
-}
-
-/**
- * Logs device policy features.
- *
- * Logged from:
- *   frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
- *   packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/
- */
-message DevicePolicyEvent {
-    // The event id - unique for each event.
-    optional android.stats.devicepolicy.EventId event_id = 1;
-    // The admin package name.
-    optional string admin_package_name = 2;
-    // A generic integer parameter.
-    optional int32 integer_value = 3;
-    // A generic boolean parameter.
-    optional bool boolean_value = 4;
-    // A parameter specifying a time period in milliseconds.
-    optional uint64 time_period_millis = 5;
-    // A parameter specifying a list of package names, bundle extras or string parameters.
-    optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUILaunchReported {
-    optional android.stats.docsui.LaunchAction launch_action = 1;
-    optional bool has_initial_uri = 2;
-    optional android.stats.docsui.MimeType mime_type = 3;
-    optional android.stats.docsui.Root initial_root = 4;
-}
-
-/**
- * Logs root/app visited event in file managers/picker. Call this when the user
- * taps on root/app in hamburger menu.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIRootVisitedReported {
-    optional android.stats.docsui.ContextScope scope = 1;
-    optional android.stats.docsui.Root root = 2;
-}
-
-/**
- * Logs file operation stats. Call this when a file operation has completed.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIFileOperationReported {
-    optional android.stats.docsui.Provider provider = 1;
-    optional android.stats.docsui.FileOperation file_op = 2;
-}
-
-/**
- * Logs file operation stats. Call this when a copy/move operation has completed with a specific
- * mode.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIFileOperationCopyMoveModeReported {
-    optional android.stats.docsui.FileOperation file_op = 1;
-    optional android.stats.docsui.CopyMoveOpMode mode = 2;
-}
-
-
-/**
- * Logs file sub operation stats. Call this when a file operation has failed.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIFileOperationFailureReported {
-    optional android.stats.docsui.Authority authority = 1;
-    optional android.stats.docsui.SubFileOperation sub_op = 2;
-}
-
-/**
-* Logs the cancellation of a file operation. Call this when a job is canceled
-*
-* Logged from:
-*     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
-*/
-message DocsUIFileOperationCanceledReported {
-    optional android.stats.docsui.FileOperation file_op = 1;
-}
-
-/**
- * Logs startup time in milliseconds.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIStartupMsReported {
-    optional int32 startup_millis = 1;
-}
-
-/**
- * Logs the action that was started by user.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIUserActionReported {
-    optional android.stats.docsui.UserAction action = 1;
-}
-
-/**
- * Logs the invalid type when invalid scoped access is requested.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java
- */
-message DocsUIInvalidScopedAccessRequestReported {
-    optional android.stats.docsui.InvalidScopedAccess type = 1;
-}
-
-/**
- * Logs the package name that launches docsui picker mode.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIPickerLaunchedFromReported {
-    optional string package_name = 1;
-}
-
-/**
- * Logs the search type.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUISearchTypeReported {
-    optional android.stats.docsui.SearchType search_type = 1;
-}
-
-/**
- * Logs the search mode.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUISearchModeReported {
-    optional android.stats.docsui.SearchMode search_mode = 1;
-}
-
-/**
- * Logs the pick result information.
- *
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIPickResultReported {
-    optional int32 total_action_count = 1;
-    optional int64 duration_millis = 2;
-    optional int32 file_count= 3;
-    optional bool is_searching = 4;
-    optional android.stats.docsui.Root picked_from = 5;
-    optional android.stats.docsui.MimeType mime_type = 6;
-    optional int32 repeatedly_pick_times = 7;
-}
-
-/** Logs the drag and drop of files.
-
- * Logged from:
- *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIDragAndDropReported {
-    optional bool drag_initiated_from_docsui = 1;
-}
-
-/**
- * Logs when an app's memory is compacted.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message AppCompacted {
-  // The pid of the process being compacted.
-  optional int32 pid = 1;
-
-  // The name of the process being compacted.
-  optional string process_name = 2;
-
-  // The type of compaction.
-  enum Action {
-    UNKNOWN = 0;
-    SOME = 1;
-    FULL = 2;
-    PERSISTENT = 3;
-    BFGS = 4;
-  }
-  optional Action action = 3;
-
-  // Total RSS in kilobytes consumed by the process prior to compaction.
-  optional int64 before_rss_total_kilobytes = 4;
-
-  // File RSS in kilobytes consumed by the process prior to compaction.
-  optional int64 before_rss_file_kilobytes = 5;
-
-  // Anonymous RSS in kilobytes consumed by the process prior to compaction.
-  optional int64 before_rss_anon_kilobytes = 6;
-
-  // Swap in kilobytes consumed by the process prior to compaction.
-  optional int64 before_swap_kilobytes = 7;
-
-  // Total RSS in kilobytes consumed by the process after compaction.
-  optional int64 after_rss_total_kilobytes = 8;
-
-  // File RSS in kilobytes consumed by the process after compaction.
-  optional int64 after_rss_file_kilobytes = 9;
-
-  // Anonymous RSS in kilobytes consumed by the process after compaction.
-  optional int64 after_rss_anon_kilobytes = 10;
-
-  // Swap in kilobytes consumed by the process after compaction.
-  optional int64 after_swap_kilobytes = 11;
-
-  // The time taken to perform compaction in milliseconds.
-  optional int64 time_to_compact_millis = 12;
-
-  // The last compaction action performed for this app.
-  optional Action last_action = 13;
-
-  // The last time that compaction was attempted on this process in milliseconds
-  // since boot, not including sleep (see SystemClock.uptimeMillis()).
-  optional int64 last_compact_timestamp_ms_since_boot = 14;
-
-  // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction.
-  optional int32 oom_score_adj = 15;
-
-  // The process state at the time of compaction.
-  optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN];
-
-  // Free ZRAM in kilobytes before compaction.
-  optional int64 before_zram_free_kilobytes = 17;
-
-  // Free ZRAM in kilobytes after compaction.
-  optional int64 after_zram_free_kilobytes = 18;
-}
-
-/**
- * Logs when a Tethering event occurs.
- *
- */
-message NetworkTetheringReported {
-  // tethering error code
-  optional android.stats.connectivity.ErrorCode error_code = 1;
-
-  // tethering downstream type
-  optional android.stats.connectivity.DownstreamType downstream_type = 2;
-
-  // transport type of upstream network
-  optional android.stats.connectivity.UpstreamType upstream_type = 3;
-
-  // The user type of Tethering
-  optional android.stats.connectivity.UserType user_type= 4;
-}
-
-/**
- * Logs a DNS lookup operation initiated by the system resolver on behalf of an application
- * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName().
- *
- * The NetworkDnsEventReported message represents the entire lookup operation, which may
- * result one or more queries to the recursive DNS resolvers. Those are individually logged
- * in DnsQueryEvents to enable computing error rates and network latency and timeouts
- * broken up by query type, transport, network interface, etc.
- */
-message NetworkDnsEventReported {
-    optional android.stats.dnsresolver.EventType event_type = 1;
-
-    optional android.stats.dnsresolver.ReturnCode return_code = 2;
-
-    // The latency in microseconds of the entire DNS lookup operation.
-    optional int32 latency_micros = 3;
-
-    // Only valid for event_type = EVENT_GETADDRINFO.
-    optional int32 hints_ai_flags = 4;
-
-    // Flags passed to android_res_nsend() defined in multinetwork.h
-    // Only valid for event_type = EVENT_RESNSEND.
-    optional int32 res_nsend_flags = 5;
-
-    optional android.stats.dnsresolver.NetworkType network_type = 6;
-
-    // The DNS over TLS mode on a specific netId.
-    optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7;
-
-    // Additional pass-through fields opaque to statsd.
-    // The DNS resolver Mainline module can add new fields here without requiring an OS update.
-    optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES];
-
-    // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom.
-    optional int32 sampling_rate_denom = 9;
-}
-
-/**
- * logs the CapportApiData info
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message CapportApiData {
-    // The TTL of the network connection provided by captive portal
-    optional int32 remaining_ttl_secs = 1;
-
-    // The limit traffic data of the network connection provided by captive portal
-    optional int32 remaining_bytes = 2;
-
-    // Is portal url option included in the DHCP packet (Yes, No)
-    optional bool has_portal_url = 3;
-
-    // Is venue info (e.g. store info, maps, flight status) included (Yes, No)
-    optional bool has_venue_info = 4;
-}
-
-/**
- * logs a network Probe Event
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message ProbeEvent {
-    // The probe type (http or https, or captive portal API...)
-    optional android.stats.connectivity.ProbeType probe_type = 1;
-
-    // The latency in microseconds of the probe event
-    optional int32 latency_micros = 2;
-
-    // The result of the probe event
-    optional android.stats.connectivity.ProbeResult probe_result = 3;
-
-    // The CaptivePortal API info
-    optional CapportApiData capport_api_data = 4;
-}
-
-/**
- * log each ProbeEvent in ProbeEvents
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message ProbeEvents {
-    // Record probe event during the validation
-    repeated ProbeEvent probe_event = 1;
-}
-
-/**
- * The DHCP (Dynamic Host Configuration Protocol) session info
- * Logged from:
- * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java
- */
-message DhcpSession {
-    // The DHCP Feature(s) enabled in this session
-    repeated android.stats.connectivity.DhcpFeature used_features = 1;
-
-    // The discover packet (re)transmit count
-    optional int32 discover_count = 2;
-
-    // The request packet (re)transmit count
-    optional int32 request_count = 3;
-
-    // The IPv4 address conflict count
-    // (only be meaningful when duplicate address detection is enabled)
-    optional int32 conflict_count = 4;
-
-    // The DHCP packet parsing error code in this session
-    // (defined in android.net.metrics.DhcpErrorEvent)
-    repeated android.stats.connectivity.DhcpErrorCode error_code = 5;
-
-    // The result of DHCP hostname transliteration
-    optional android.stats.connectivity.HostnameTransResult ht_result = 6;
-}
-
-/**
- * Logs Network IP provisioning event
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/networkstack/metrics/NetworkIpProvisioningMetrics.java
- */
-message NetworkIpProvisioningReported {
-    // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
-    optional android.stats.connectivity.TransportType transport_type = 1;
-
-    // The latency in microseconds of IP Provisioning over IPV4
-    optional int32 ipv4_latency_micros = 2;
-
-    // The latency in microseconds of IP Provisioning over IPV6
-    optional int32 ipv6_latency_micros = 3;
-
-    // The time duration between provisioning start and end (success or failure)
-    optional int64 provisioning_duration_micros = 4;
-
-    // The specific disconnect reason for this IP provisioning
-    optional android.stats.connectivity.DisconnectCode disconnect_code = 5;
-
-    // Log DHCP session info (Only valid for IPv4)
-    optional DhcpSession dhcp_session = 6 [(log_mode) = MODE_BYTES];
-
-    // The random number between 0 ~ 999 for sampling
-    optional int32 random_number = 7;
-}
-
-/**
- * Logs Network DHCP Renew event
- * Logged from:
- * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java
- */
-message NetworkDhcpRenewReported {
-    // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
-    optional android.stats.connectivity.TransportType transport_type = 1;
-
-    // The request packet (re)transmit count
-    optional int32 request_count = 2;
-
-    // The latency in microseconds of DHCP Renew
-    optional int32 latency_micros = 3;
-
-    // The DHCP error code is defined in android.net.metrics.DhcpErrorEvent
-    optional android.stats.connectivity.DhcpErrorCode error_code = 4;
-
-    // The result of DHCP renew
-    optional android.stats.connectivity.DhcpRenewResult renew_result = 5;
-
-    // The random number between 0 ~ 999 for sampling
-    optional int32 random_number = 6;
-}
-
-/**
- * Logs Network Validation event
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message NetworkValidationReported {
-    // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
-    optional android.stats.connectivity.TransportType transport_type = 1;
-
-    // Record each probe event
-    optional ProbeEvents probe_events = 2 [(log_mode) = MODE_BYTES];
-
-    // The result of the network validation
-    optional android.stats.connectivity.ValidationResult validation_result = 3;
-
-    // The latency in microseconds of network validation
-    optional int32 latency_micros = 4;
-
-    // The validation index (the first validation attempt or second, third...)
-    optional int32 validation_index = 5;
-
-    // The random number between 0 ~ 999 for sampling
-    optional int32 random_number = 6;
-}
-
-/**
- * Logs NetworkStack Quirk event
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/networkstack/
- */
-message NetworkStackQuirkReported {
-    // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
-    optional android.stats.connectivity.TransportType transport_type = 1;
-
-    // Record each Quirk event
-    optional android.stats.connectivity.NetworkQuirkEvent event = 2;
-}
-
-/**
- * Logs when a data stall event occurs.
- *
- * Log from:
- *     packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message DataStallEvent {
-    // Data stall evaluation type.
-    // See packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
-    // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*.
-    optional int32 evaluation_type = 1;
-    // See definition in data_stall_event.proto.
-    optional com.android.server.connectivity.ProbeResult validation_result = 2;
-    // See definition in data_stall_event.proto.
-    optional android.net.NetworkCapabilitiesProto.Transport network_type = 3;
-    // See definition in data_stall_event.proto.
-    optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES];
-    // See definition in data_stall_event.proto.
-    optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES];
-    // See definition in data_stall_event.proto.
-    optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES];
-    // The tcp packets fail rate from the latest tcp polling.
-    optional int32 tcp_fail_rate = 7;
-    // Number of packets sent since the last received packet.
-    optional int32 tcp_sent_since_last_recv = 8;
-}
-
-/*
- * Logs when RescueParty resets some set of experiment flags.
- *
- * Logged from:
- *     frameworks/base/services/core/java/com/android/server/RescueParty.java
- */
-message RescuePartyResetReported {
-    // The rescue level of this reset. A value of 0 indicates missing or unknown level information.
-    optional int32 rescue_level = 1;
-}
-
-/**
- * Logs when signed config is received from an APK, and if that config was applied successfully.
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java
- */
-message SignedConfigReported {
-    enum Type {
-        UNKNOWN_TYPE = 0;
-        GLOBAL_SETTINGS = 1;
-    }
-    optional Type type = 1;
-
-    // The final status of the signed config received.
-    enum Status {
-        UNKNOWN_STATUS = 0;
-        APPLIED = 1;
-        BASE64_FAILURE_CONFIG = 2;
-        BASE64_FAILURE_SIGNATURE = 3;
-        SECURITY_EXCEPTION = 4;
-        INVALID_CONFIG = 5;
-        OLD_CONFIG = 6;
-        SIGNATURE_CHECK_FAILED = 7;
-        NOT_APPLICABLE = 8;
-        SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9;
-    }
-    optional Status status = 2;
-
-    // The version of the signed config processed.
-    optional int32 version = 3;
-
-    // The package name that the config was extracted from.
-    optional string from_package = 4;
-
-    enum Key {
-        NO_KEY = 0;
-        DEBUG = 1;
-        PRODUCTION = 2;
-    }
-    // Which key was used to verify the config.
-    optional Key verified_with = 5;
-}
-
-/*
- * Logs GNSS Network-Initiated (NI) location events.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
- */
-message GnssNiEventReported {
-    // The type of GnssNiEvent.
-    enum EventType {
-        UNKNOWN = 0;
-        NI_REQUEST = 1;
-        NI_RESPONSE = 2;
-    }
-    optional EventType event_type = 1;
-
-    // An ID generated by HAL to associate NI notifications and UI responses.
-    optional int32 notification_id = 2;
-
-    // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
-    optional android.server.location.GnssNiType ni_type = 3;
-
-    // NI requires notification.
-    optional bool need_notify = 4;
-
-    // NI requires verification.
-    optional bool need_verify = 5;
-
-    // NI requires privacy override, no notification/minimal trace.
-    optional bool privacy_override = 6;
-
-    // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in
-    // seconds.
-    optional int32 timeout = 7;
-
-    // Default response when timeout.
-    optional android.server.location.GnssUserResponseType default_response = 8;
-
-    // String representing the requester of the network inititated location request.
-    optional string requestor_id = 9;
-
-    // Notification message text string representing the service(for eg. SUPL-service) who sent the
-    // network initiated location request.
-    optional string text = 10;
-
-    // requestorId decoding scheme.
-    optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11;
-
-    // Notification message text decoding scheme.
-    optional android.server.location.GnssNiEncodingType text_encoding = 12;
-
-    // True if SUPL ES is enabled.
-    optional bool is_supl_es_enabled = 13;
-
-    // True if GNSS location is enabled.
-    optional bool is_location_enabled = 14;
-
-    // GNSS NI responses which define the response in NI structures.
-    optional android.server.location.GnssUserResponseType user_response = 15;
-}
-
-/**
- * Logs GNSS non-framework (NFW) location notification.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
- */
-message GnssNfwNotificationReported {
-    // Package name of the Android proxy application representing the non-framework entity that
-    // requested location. Set to empty string if unknown.
-    optional string proxy_app_package_name = 1;
-
-    // Protocol stack that initiated the non-framework location request.
-    optional android.server.location.NfwProtocolStack protocol_stack = 2;
-
-    // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise,
-    // set to empty string. This field is opaque to the framework and used for logging purposes.
-    optional string other_protocol_stack_name = 3;
-
-    // Source initiating/receiving the location information.
-    optional android.server.location.NfwRequestor requestor = 4;
-
-    // Identity of the endpoint receiving the location information. For example, carrier name, OEM
-    // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework
-    // and used for logging purposes.
-    optional string requestor_id = 5;
-
-    // Indicates whether location information was provided for this request.
-    optional android.server.location.NfwResponseType response_type = 6;
-
-    // True if the device is in user initiated emergency session.
-    optional bool in_emergency_mode = 7;
-
-    // True if cached location is provided.
-    optional bool is_cached_location = 8;
-
-    // True if proxy app permission mismatch between framework and GNSS HAL.
-    optional bool is_permission_mismatched = 9;
-}
-
-/**
- * Logs GNSS configuration as defined in IGnssConfiguration.hal.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java
- */
-message GnssConfigurationReported {
-    // SUPL host name.
-    optional string supl_host = 1;
-
-    // SUPL port number.
-    optional int32 supl_port = 2;
-
-    // C2K host name.
-    optional string c2k_host = 3;
-
-    // C2K port number.
-    optional int32 c2k_port = 4;
-
-    // The SUPL version requested by Carrier.
-    optional int32 supl_ver = 5;
-
-    // The SUPL mode.
-    optional android.server.location.SuplMode supl_mode = 6;
-
-    // True if NI emergency SUPL restrictions is enabled.
-    optional bool supl_es = 7;
-
-    // LTE Positioning Profile settings
-    optional android.server.location.LppProfile lpp_profile = 8;
-
-    // Positioning protocol on A-Glonass system.
-    optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9;
-
-    // True if emergency PDN is used. Otherwise, regular PDN is used.
-    optional bool use_emergency_pdn_for_emergency_supl= 10;
-
-    // Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
-    optional android.server.location.GpsLock gps_lock = 11;
-
-    // Number of seconds to extend the emergency session duration post emergency call.
-    optional int32 es_extension_sec = 12;
-
-    // The full list of package names of proxy Android applications representing the non-framework
-    // location access entities (on/off the device) for which the framework user has granted
-    // non-framework location access permission. The package names are concatenated in one string
-    // with spaces as separators.
-    optional string enabled_proxy_app_package_name_list = 13;
-}
-
-/**
- * Logs when a NFC device's error occurred.
- * Logged from:
- *     system/nfc/src/nfc/nfc/nfc_ncif.cc
- *     packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java
- */
-message NfcErrorOccurred {
-    enum Type {
-        UNKNOWN = 0;
-        CMD_TIMEOUT = 1;
-        ERROR_NOTIFICATION = 2;
-        AID_OVERFLOW = 3;
-    }
-    optional Type type = 1;
-    // If it's nci cmd timeout, log the timeout command.
-    optional uint32 nci_cmd = 2;
-
-    optional uint32 error_ntf_status_code = 3;
-}
-
-/**
- * Logs when a NFC device's state changed event
- * Logged from:
- *     packages/apps/Nfc/src/com/android/nfc/NfcService.java
- */
-message NfcStateChanged {
-    enum State {
-        UNKNOWN = 0;
-        OFF = 1;
-        ON = 2;
-        ON_LOCKED = 3; // Secure Nfc enabled.
-        CRASH_RESTART = 4; // NfcService watchdog timeout restart.
-    }
-    optional State state = 1;
-}
-
-/**
- * Logs when a NFC Beam Transaction occurred.
- * Logged from:
- *     packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
- */
-message NfcBeamOccurred {
-    enum Operation {
-        UNKNOWN = 0;
-        SEND = 1;
-        RECEIVE = 2;
-    }
-    optional Operation operation = 1;
-}
-
-/**
- * Logs when a NFC Card Emulation Transaction occurred.
- * Logged from:
- *     packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java
- *     packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java
- */
-message NfcCardemulationOccurred {
-    enum Category {
-        UNKNOWN = 0;
-        HCE_PAYMENT = 1;
-        HCE_OTHER = 2;
-        OFFHOST = 3;
-    }
-    // Transaction belongs to HCE payment or HCE other category, or offhost.
-    optional Category category = 1;
-    // SeName from transaction: SIMx, eSEx, HCE, HCEF.
-    optional string se_name = 2;
-}
-
-/**
- * Logs when a NFC Tag event occurred.
- * Logged from:
- *     packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java
- */
-message NfcTagOccurred {
-    enum Type {
-        UNKNOWN = 0;
-        URL = 1;
-        BT_PAIRING = 2;
-        PROVISION = 3;
-        WIFI_CONNECT = 4;
-        APP_LAUNCH = 5;
-        OTHERS = 6;
-    }
-    optional Type type = 1;
-}
-
-/**
- * Logs when Hce transaction triggered
- * Logged from:
- *     system/nfc/src/nfc/nfc/nfc_ncif.cc
- */
-message NfcHceTransactionOccurred {
-    // The latency period(in microseconds) it took for the first HCE data
-    // exchange.
-    optional uint32 latency_micros = 1;
-}
-
-/**
- * Logs when SecureElement state event changed
- * Logged from:
- *     packages/apps/SecureElement/src/com/android/se/Terminal.java
- */
-message SeStateChanged {
-    enum State {
-        UNKNOWN = 0;
-        INITIALIZED = 1;
-        DISCONNECTED = 2;
-        CONNECTED = 3;
-        HALCRASH = 4;
-    }
-    optional State state = 1;
-
-    optional string state_change_reason = 2;
-    // SIMx or eSEx.
-    optional string terminal = 3;
-}
-
-/**
- * Information about a permission grant request
- */
-message PermissionGrantRequestResultReported {
-    // unique value identifying an API call. A API call might result in multiple of these atoms
-    optional int64 request_id = 1;
-
-    // UID of package requesting the permission grant
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Name of package requesting the permission grant
-    optional string package_name = 3;
-
-    // The permission to be granted
-    optional string permission_name = 4;
-
-    // If the permission was explicitly requested via the API or added by the system
-    optional bool is_implicit = 5;
-
-    enum Result {
-        UNDEFINED = 0;
-        // permission request was ignored
-        IGNORED = 1;
-        // permission request was ignored because it was user fixed
-        IGNORED_USER_FIXED = 2;
-        // permission request was ignored because it was policy fixed
-        IGNORED_POLICY_FIXED = 3;
-        // permission was granted by user action
-        USER_GRANTED = 4;
-        // permission was automatically granted
-        AUTO_GRANTED = 5;
-        // permission was denied by user action
-        USER_DENIED = 6;
-        // permission was denied with prejudice by the user
-        USER_DENIED_WITH_PREJUDICE = 7;
-        // permission was automatically denied
-        AUTO_DENIED = 8;
-        // permission request was ignored because permission is restricted
-        IGNORED_RESTRICTED_PERMISSION = 9;
-        // one time permission was granted by user action
-        USER_GRANTED_ONE_TIME = 10;
-        // user ignored request by leaving the request screen without choosing any option
-        USER_IGNORED = 11;
-        // user granted the permission after being linked to settings
-        USER_GRANTED_IN_SETTINGS = 12;
-        // user denied the permission after being linked to settings
-        USER_DENIED_IN_SETTINGS = 13;
-        // user denied the permission with prejudice after being linked to settings
-        USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14;
-        // permission was automatically revoked after one-time permission expired
-        AUTO_ONE_TIME_PERMISSION_REVOKED = 15;
-        // permission was automatically revoked for unused app
-        AUTO_UNUSED_APP_PERMISSION_REVOKED = 16;
-    }
-    // The result of the permission grant
-    optional Result result = 6;
-}
-
-/**
- * Logs when Omapi API used
- * Logged from:
- *     packages/apps/SecureElement/src/com/android/se/Terminal.java
- */
-message SeOmapiReported {
-    enum Operation {
-        UNKNOWN = 0;
-        OPEN_CHANNEL = 1;
-    }
-    optional Operation operation = 1;
-    // SIMx or eSEx.
-    optional string terminal = 2;
-
-    optional string package_name = 3;
-}
-
-/**
-  * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED.
-  * The dispatch latency is the dispatchClockTime - enqueueClockTime.
-  * Logged from:
-  *   frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
-  */
-message BroadcastDispatchLatencyReported {
-    optional int64 dispatch_latency_millis = 1;
-}
-
-/**
-   * Logs AttentionManagerService attention check result.
-   *
-   * Logged from:
-   *   frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java
-   */
-message AttentionManagerServiceResultReported {
-    // See core/java/android/service/attention/AttentionService.java
-    enum AttentionCheckResult {
-        UNKNOWN = 20;
-        ATTENTION_SUCCESS_ABSENT = 0;
-        ATTENTION_SUCCESS_PRESENT = 1;
-        ATTENTION_FAILURE_UNKNOWN = 2;
-        ATTENTION_FAILURE_CANCELLED = 3;
-        ATTENTION_FAILURE_PREEMPTED = 4;
-        ATTENTION_FAILURE_TIMED_OUT = 5;
-        ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6;
-    }
-    optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN];
-}
-
-/**
- * Logs when an adb connection changes state.
- *
- * Logged from:
- *     frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java
- */
-message AdbConnectionChanged {
-    // The last time this system connected via adb, or 0 if the 'always allow' option was not
-    // previously selected for this system.
-    optional int64 last_connection_time_millis = 1;
-
-    // The time in ms within which a subsequent connection from an 'always allow' system is allowed
-    // to reconnect via adb without user interaction.
-    optional int64 auth_window_millis = 2;
-
-    // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto.
-    optional android.debug.AdbConnectionStateEnum state = 3;
-
-    // True if the 'always allow' option was selected for this system.
-    optional bool always_allow = 4;
-}
-
-/*
- * Logs the reported speech DSP status.
- *
- * Logged from:
- *  Vendor audio implementation.
- */
-message SpeechDspStatReported {
-    // The total Speech DSP uptime in milliseconds.
-    optional int32 total_uptime_millis = 1;
-    // The total Speech DSP downtime in milliseconds.
-    optional int32 total_downtime_millis = 2;
-    optional int32 total_crash_count = 3;
-    optional int32 total_recover_count = 4;
-}
-
-/**
- * Logs USB connector contaminant status.
- *
- * Logged from: USB Service.
- */
-message UsbContaminantReported {
-    optional string id = 1;
-    optional android.service.usb.ContaminantPresenceStatus status = 2;
-}
-
-/**
- * This atom is for debugging purpose.
- */
-message DebugElapsedClock {
-    // Monotically increasing value for each pull.
-    optional int64 pull_count = 1;
-    // Time from System.elapsedRealtime.
-    optional int64 elapsed_clock_millis = 2;
-    // Time from System.elapsedRealtime.
-    optional int64 same_elapsed_clock_millis = 3;
-    // Diff between current elapsed time and elapsed time from previous pull.
-    optional int64 elapsed_clock_diff_millis = 4;
-
-    enum Type {
-      TYPE_UNKNOWN = 0;
-      ALWAYS_PRESENT = 1;
-      PRESENT_ON_ODD_PULLS = 2;
-    }
-    // Type of behavior for the pulled data.
-    optional Type type = 5;
-}
-
-/**
- * This atom is for debugging purpose.
- */
-message DebugFailingElapsedClock {
-    // Monotically increasing value for each pull.
-    optional int64 pull_count = 1;
-    // Time from System.elapsedRealtime.
-    optional int64 elapsed_clock_millis = 2;
-    // Time from System.elapsedRealtime.
-    optional int64 same_elapsed_clock_millis = 3;
-    // Diff between current elapsed time and elapsed time from previous pull.
-    optional int64 elapsed_clock_diff_millis = 4;
-}
-
-/** Logs System UI bubbles event changed.
- *
- * Logged from:
- *     frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles
- */
-message BubbleUIChanged {
-
-    // The app package that is posting the bubble.
-    optional string package_name = 1;
-
-    // The notification channel that is posting the bubble.
-    optional string notification_channel = 2;
-
-    // The notification id associated with the posted bubble.
-    optional int32 notification_id = 3;
-
-    // The position of the bubble within the bubble stack.
-    optional int32 position = 4;
-
-    // The total number of bubbles within the bubble stack.
-    optional int32 total_number = 5;
-
-    // User interactions with the bubble.
-    enum Action {
-        UNKNOWN = 0;
-        POSTED = 1;
-        UPDATED = 2;
-        EXPANDED = 3;
-        COLLAPSED = 4;
-        DISMISSED = 5;
-        STACK_DISMISSED = 6;
-        STACK_MOVED = 7;
-        HEADER_GO_TO_APP = 8;
-        HEADER_GO_TO_SETTINGS = 9;
-        PERMISSION_OPT_IN = 10;
-        PERMISSION_OPT_OUT = 11;
-        PERMISSION_DIALOG_SHOWN = 12;
-        SWIPE_LEFT = 13;
-        SWIPE_RIGHT = 14;
-        STACK_EXPANDED = 15;
-        FLYOUT = 16;
-    }
-    optional Action action = 6;
-
-    // Normalized screen position of the bubble stack. The range is between 0 and 1.
-    optional float normalized_x_position = 7;
-    optional float normalized_y_position = 8;
-
-    // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon.
-    optional bool is_unread = 9;
-
-    // Whether the bubble is an on-going one.
-    optional bool is_ongoing = 10;
-
-    // Whether the bubble is produced by an app running in foreground.
-    // This is deprecated and the value should be ignored.
-    optional bool is_foreground = 11 [deprecated = true];
-}
-
-/**
-  * Logs System UI bubbles developer errors.
-  *
-  * Logged from:
-  *   frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
-  */
-message BubbleDeveloperErrorReported {
-
-    // The app package that is posting the bubble.
-    optional string package_name = 1;
-
-    // Bubble developer error type enums.
-    enum Error {
-        UNKNOWN = 0;
-        ACTIVITY_INFO_MISSING = 1;
-        ACTIVITY_INFO_NOT_RESIZABLE = 2;
-        DOCUMENT_LAUNCH_NOT_ALWAYS = 3;
-    }
-    optional Error error = 2 [default = UNKNOWN];
-}
-
-/**
- * Logs that a constraint for a scheduled job has changed.
- *
- * Logged from:
- *     frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java
- */
-message ScheduledJobConstraintChanged {
-    repeated AttributionNode attribution_node = 1;
-
-    // Name of the job.
-    optional string job_name = 2;
-
-    optional com.android.server.job.ConstraintEnum constraint = 3;
-
-    enum State {
-        UNKNOWN = 0;
-        UNSATISFIED = 1;
-        SATISFIED = 2;
-    }
-    optional State state = 4;
-}
-
-/**
- * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check
- * returns true.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
- */
-message ScreenTimeoutExtensionReported {
-    // Describes how many times in a row did the power manager reset the screen off timeout.
-    optional uint32 consecutive_timeout_extended_count = 1;
-}
-
-/*
-* Logs number of milliseconds it takes to start a process.
-* The definition of app process start time is from the app launch time to
-* the time that Zygote finished forking the app process and loaded the
-* application package's java classes.
-
-* This metric is different from AppStartOccurred which is for foreground
-* activity only.
-
-* ProcessStartTime can report all processes (both foreground and background)
-* start time.
-*
-* Logged from:
-*   frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
-*/
-message ProcessStartTime {
-    // The uid of the ProcessRecord.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process pid.
-    optional int32 pid = 2;
-
-    // The process name.
-    // Usually package name, "system" for system server.
-    // Provided by ActivityManagerService.
-    optional string process_name = 3;
-
-    enum StartType {
-        UNKNOWN = 0;
-        WARM = 1;
-        HOT = 2;
-        COLD = 3;
-    }
-
-    // The start type.
-    optional StartType type = 4;
-
-    // The elapsed realtime at the start of the process.
-    optional int64 process_start_time_millis = 5;
-
-    // Number of milliseconds it takes to reach bind application.
-    optional int32 bind_application_delay_millis = 6;
-
-    // Number of milliseconds it takes to finish start of the process.
-    optional int32 process_start_delay_millis = 7;
-
-    // hostingType field in ProcessRecord, the component type such as "activity",
-    // "service", "content provider", "broadcast" or other strings.
-    optional string hosting_type = 8;
-
-    // hostingNameStr field in ProcessRecord. The component class name that runs
-    // in this process.
-    optional string hosting_name = 9;
-}
-
-/**
- * Track Media Codec usage
- * Logged from:
- *   frameworks/av/media/libstagefright/MediaCodec.cpp
- *   frameworks/av/services/mediaanalytics/statsd_codec.cpp
- */
-message MediametricsCodecReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track Media Extractor (pulling video/audio streams out of containers) usage
- * Logged from:
- *   frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp
- *   frameworks/av/services/mediaanalytics/statsd_extractor.cpp
- */
-message MediametricsExtractorReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track how we arbitrate between microphone/input requests.
- * Logged from
- *   frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
- *   frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp
- */
-message MediametricsAudiopolicyReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track how we arbitrate between microphone requests.
- * Logged from
- *   frameworks/av/media/libaudioclient/AudioRecord.cpp
- *   frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp
- */
-message MediametricsAudiorecordReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track how we arbitrate between microphone/input requests.
- * Logged from
- *   frameworks/av/media/libnblog/ReportPerformance.cpp
- *   frameworks/av/services/mediaanalytics/statsd_audiothread.cpp
- */
-message MediametricsAudiothreadReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track how we arbitrate between microphone/input requests.
- * Logged from
- *   frameworks/av/media/libaudioclient/AudioTrack.cpp
- *   frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp
- */
-message MediametricsAudiotrackReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track information about DRM framework performance
- * Logged from
- *   frameworks/av/drm/libmediadrm/DrmHal.cpp
- *   frameworks/av/services/mediaanalytics/statsd_drm.cpp
- */
-message MediametricsMediadrmReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    // vendor+description tell about which DRM plugin is in use on this device
-    optional string vendor = 5;
-    optional string description = 6;
-    // from frameworks/av/drm/libmediadrm/protos/metrics.proto
-    optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track information about the widevine DRM plugin performance
- * Logged from
- *   vendor/widevine/libwvdrmengine/cdm/metrics
- *   frameworks/av/services/mediaanalytics/statsd_drm.cpp
- */
-message MediametricsDrmWidevineReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track information about recordings (e.g. camcorder)
- * Logged from
- *   frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp
- *   frameworks/av/services/mediaanalytics/statsd_recorder.cpp
- */
-message MediametricsRecorderReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track Media Player usage
- * Logged from:
- *   frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
- *   frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp
- */
-message MediametricsNuPlayerReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track Legacy DRM usage
- * Logged from
- *   frameworks/av/drm/drmserver/DrmManager.cpp
- */
-message MediametricsDrmManagerReported {
-    optional int64 timestamp_nanos = 1;
-    optional string package_name = 2;
-    optional int64 package_version_code = 3;
-    optional int64 media_apex_version = 4;
-
-    enum Method {
-        METHOD_NOT_FOUND       = -1;
-        GET_CONSTRAINTS        =  0;
-        GET_METADATA           =  1;
-        CAN_HANDLE             =  2;
-        PROCESS_DRM_INFO       =  3;
-        ACQUIRE_DRM_INFO       =  4;
-        SAVE_RIGHTS            =  5;
-        GET_ORIGINAL_MIME_TYPE =  6;
-        GET_DRM_OBJECT_TYPE    =  7;
-        CHECK_RIGHTS_STATUS    =  8;
-        REMOVE_RIGHTS          =  9;
-        REMOVE_ALL_RIGHTS      = 10;
-        OPEN_CONVERT_SESSION   = 11;
-        OPEN_DECRYPT_SESSION   = 12;
-    }
-
-    // plugin_id+description inform which Legacy DRM plugins are still in use on device
-    optional string plugin_id = 5;
-    optional string description = 6;
-    optional Method method = 7;
-    optional string mime_types = 8;
-
-    optional int64 get_constraints_count =  9;
-    optional int64 get_metadata_count = 10;
-    optional int64 can_handle_count = 11;
-    optional int64 process_drm_info_count = 12;
-    optional int64 acquire_drm_info_count = 13;
-    optional int64 save_rights_count = 14;
-    optional int64 get_original_mime_type_count = 15;
-    optional int64 get_drm_object_type_count = 16;
-    optional int64 check_rights_status_count = 17;
-    optional int64 remove_rights_count = 18;
-    optional int64 remove_all_rights_count = 19;
-    optional int64 open_convert_session_count = 20;
-    optional int64 open_decrypt_session_count = 21;
-}
-
-/**
- * State of a dangerous permission requested by a package
- * Pulled from: StatsCompanionService
-*/
-message DangerousPermissionState {
-    // Name of the permission
-    optional string permission_name = 1;
-
-    // Uid of the package
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Package requesting the permission
-    optional string package_name = 3;
-
-    // If the permission is granted to the uid
-    optional bool is_granted = 4;
-
-    // Permission flags as per android.content.pm.PermissionFlags
-    optional int32 permission_flags = 5;
-}
-
-/**
- * Logs when a package is denied access to a device identifier based on the new access requirements.
- *
- * Logged from:
- *     frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
- */
-message DeviceIdentifierAccessDenied {
-    // The name of the package denied access to the requested device identifier.
-    optional string package_name = 1;
-
-    // The name of the device identifier method the package attempted to invoke.
-    optional string method_name = 2;
-
-    // True if the package is preinstalled.
-    // Starting from Android 11, this boolean is not set and will always be false.
-    optional bool is_preinstalled = 3 [deprecated = true];
-
-    // True if the package is privileged.
-    // Starting from Android 11, this boolean is not set and will always be false.
-    optional bool is_priv_app = 4 [deprecated = true];
-}
-
-/**
- * Pulls the ongoing mainline install train version code.
- * Pulled from StatsCompanionService
- */
-message TrainInfo {
-    optional int64 train_version_code = 1;
-
-    optional TrainExperimentIds train_experiment_id = 2;
-
-    optional string train_name = 3;
-
-    enum Status {
-        UNKNOWN = 0;
-        INSTALL_REQUESTED = 1;
-        INSTALL_STARTED = 2;
-        INSTALL_STAGED_NOT_READY = 3;
-        INSTALL_STAGED_READY = 4;
-        INSTALL_SUCCESS = 5;
-        // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
-        // and INSTALL_FAILURE_COMMIT.
-        INSTALL_FAILURE = 6  [deprecated = true];
-        // This enum is for installs that are manually cancelled via the Manual Update UI.
-        INSTALL_CANCELLED = 7;
-        INSTALLER_ROLLBACK_REQUESTED = 8;
-        INSTALLER_ROLLBACK_INITIATED = 9;
-        INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
-        INSTALLER_ROLLBACK_STAGED = 11;
-        INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
-        INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
-        INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
-        INSTALLER_ROLLBACK_SUCCESS = 15;
-        INSTALLER_ROLLBACK_FAILURE = 16;
-        INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
-        INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
-        INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
-        INSTALL_STAGED_CANCEL_REQUESTED = 20;
-        INSTALL_STAGED_CANCEL_SUCCESS = 21;
-        INSTALL_STAGED_CANCEL_FAILURE = 22;
-        INSTALL_FAILURE_DOWNLOAD = 23;
-        INSTALL_FAILURE_STATE_MISMATCH = 24;
-        INSTALL_FAILURE_COMMIT = 25;
-        REBOOT_TRIGGERED = 26;
-    }
-    optional Status status = 4;
-}
-
-/**
- * Logs the gesture stage changed event.
- *
- * Logged from:
- *   frameworks/base/packages/SystemUI/
- */
-message AssistGestureStageReported {
-    optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1;
-}
-
-/**
- * Logs the feedback type.
- *
- * Logged from:
- *   frameworks/base/packages/SystemUI/
- */
-message AssistGestureFeedbackReported {
-    // Whether or not the gesture was used.
-    optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1;
-}
-
-/**
- * Logs the progress.
- *
- * Logged from:
- *   frameworks/base/packages/SystemUI/
- */
-message AssistGestureProgressReported {
-    // [0,100] progress for the assist gesture.
-    optional int32 progress = 1;
-}
-
-/*
- * Information about the time zone data on a device.
- */
-message TimeZoneDataInfo {
-    // A version identifier for the data set on device. e.g. "2018i"
-    optional string tzdb_version = 1;
-}
-
-/**
- * Logs the GPU stats global health information.
- *
- * Logged from:
- *   frameworks/native/services/gpuservice/gpustats/
- */
-message GpuStatsGlobalInfo {
-    // Package name of the gpu driver.
-    optional string driver_package_name = 1;
-
-    // Version name of the gpu driver.
-    optional string driver_version_name = 2;
-
-    // Version code of the gpu driver.
-    optional int64 driver_version_code = 3;
-
-    // Build time of the gpu driver in UTC as seconds since January 1, 1970.
-    optional int64 driver_build_time = 4;
-
-    // Total count of the gl driver gets loaded.
-    optional int64 gl_loading_count = 5;
-
-    // Total count of the gl driver fails to be loaded.
-    optional int64 gl_loading_failure_count = 6;
-
-    // Total count of the Vulkan driver gets loaded.
-    optional int64 vk_loading_count = 7;
-
-    // Total count of the Vulkan driver fails to be loaded.
-    optional int64 vk_loading_failure_count = 8;
-
-    // Api version of the system Vulkan driver.
-    optional int32 vulkan_version = 9;
-
-    // Api version of the system CPU Vulkan driver.
-    optional int32 cpu_vulkan_version = 10;
-
-    // Api version of the system GLES driver.
-    optional int32 gles_version = 11;
-
-    // Total count of the angle driver gets loaded.
-    optional int64 angle_loading_count = 12;
-
-    // Total count of the angle driver fails to be loaded.
-    optional int64 angle_loading_failure_count = 13;
-}
-
-/**
- * GPU driver loading time info.
- */
-message GpuDriverLoadingTime {
-    // List of all the driver loading times for this app. The list size is
-    // capped at 50.
-    repeated int64 driver_loading_time = 1;
-}
-
-/**
- * Logs the GPU stats per app health information.
- *
- * Logged from:
- *   frameworks/native/services/gpuservice/gpustats/
- */
-message GpuStatsAppInfo {
-    // Package name of the application that loads the gpu driver. Total number
-    // of different packages is capped at 100.
-    optional string app_package_name = 1;
-
-    // Version code of the gpu driver this app loads.
-    optional int64 driver_version_code = 2;
-
-    // gl driver loading time info.
-    optional GpuDriverLoadingTime gl_driver_loading_time = 3
-            [(android.os.statsd.log_mode) = MODE_BYTES];
-
-    // Vulkan driver loading time info.
-    optional GpuDriverLoadingTime vk_driver_loading_time = 4
-            [(android.os.statsd.log_mode) = MODE_BYTES];
-
-    // Angle driver loading time info.
-    optional GpuDriverLoadingTime angle_driver_loading_time = 5
-            [(android.os.statsd.log_mode) = MODE_BYTES];
-
-    // CPU Vulkan implementation is in use.
-    optional bool cpu_vulkan_in_use = 6;
-
-    // App is not doing pre-rotation correctly.
-    optional bool false_prerotation = 7;
-
-    // App creates GLESv1 context.
-    optional bool gles_1_in_use = 8;
-}
-
-/*
- * Logs the size of the system ion heap.
- *
- * Pulled from StatsCompanionService.
- */
-message SystemIonHeapSize {
-    // Deprecated due to limited support of ion stats in debugfs.
-    // Use `IonHeapSize` instead.
-    option deprecated = true;
-
-    // Size of the system ion heap in bytes.
-    // Read from debugfs.
-    optional int64 size_in_bytes = 1;
-}
-
-/*
- * Logs the total size of the ion heap.
- *
- * Pulled from StatsCompanionService.
- */
-message IonHeapSize {
-    // Total size of all ion heaps in kilobytes.
-    // Read from: /sys/kernel/ion/total_heaps_kb.
-    optional int32 total_size_kb = 1;
-}
-
-/*
- * Logs the per-process size of the system ion heap.
- *
- * Pulled from StatsCompanionService.
- */
-message ProcessSystemIonHeapSize {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process name (from /proc/PID/cmdline).
-    optional string process_name = 2;
-
-    // Sum of sizes of all allocations.
-    optional int32 total_size_in_kilobytes = 3;
-
-    // Number of allocations.
-    optional int32 allocation_count = 4;
-
-    // Size of the largest allocation.
-    optional int32 max_size_in_kilobytes = 5;
-}
-
-/**
- * Push network stack events.
- *
- * Log from:
- *     frameworks/base/packages/NetworkStack/
- */
-message NetworkStackReported {
-    // The id that indicates the event reported from NetworkStack.
-    optional int32 event_id = 1;
-    // The data for the reported events.
-    optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Logs the apps that are installed on the external storage.
- * Pulled from:
- *   StatsCompanionService
- */
-message AppsOnExternalStorageInfo {
-    // The type of the external storage.
-    optional android.stats.storage.ExternalStorageType external_storage_type = 1;
-    // The name of the package that is installed on the external storage.
-    optional string package_name = 2;
-}
-
-/**
- * Logs the settings related to Face.
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/stats
- */
-message FaceSettings {
-    // Whether or not face unlock is allowed on Keyguard.
-    optional bool unlock_keyguard_enabled = 1;
-    // Whether or not face unlock dismisses the Keyguard.
-    optional bool unlock_dismisses_keyguard = 2;
-    // Whether or not face unlock requires attention.
-    optional bool unlock_attention_required = 3;
-    // Whether or not face unlock is allowed for apps (through BiometricPrompt).
-    optional bool unlock_app_enabled = 4;
-    // Whether or not face unlock always requires user confirmation.
-    optional bool unlock_always_require_confirmation = 5;
-    // Whether or not a diverse set of poses are required during enrollment.
-    optional bool unlock_diversity_required = 6;
-}
-
-/**
- * Logs cooling devices maintained by the kernel.
- *
- * Pulled from StatsCompanionService.java
- */
-message CoolingDevice {
-    // The type of cooling device being reported. Eg. CPU, GPU...
-    optional android.os.CoolingTypeEnum device_location = 1;
-    // The name of the cooling device source. Eg. CPU0
-    optional string device_name = 2;
-    // Current throttle state of the cooling device. The value can any unsigned
-    // integer between 0 and max_state defined in its driver. 0 means device is
-    // not in throttling, higher value means deeper throttling.
-    optional int32 state = 3;
-}
-
-/**
- * Intelligence has several counter-type events that don't warrant a
- * full separate atom. These are primarily API call counters but also include
- * counters for feature usage and specific failure modes.
- *
- * Logged from the Intelligence mainline module.
- */
-message IntelligenceEventReported {
-  // The event type.
-  optional android.stats.intelligence.EventType event_id = 1;
-  // Success, failure.
-  optional android.stats.intelligence.Status status = 2;
-  // How many times the event occured (to report a batch of high frequency events).
-  optional int32 count = 3;
-  // How long the event took (sum of durations if count > 1)
-  optional int64 duration_millis = 4;
-}
-
-/**
- * Logs when Car Power state changed.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/CarStatsLog.java
- */
-message CarPowerStateChanged {
-    // States come from CpmsState in CarPowerManagementService.java.
-    enum State {
-       WAIT_FOR_VHAL = 0;
-       ON = 1;
-       SHUTDOWN_PREPARE = 2;
-       WAIT_FOR_FINISH = 3;
-       SUSPEND = 4;
-       SIMULATE_SLEEP = 5;
-    }
-    optional State state = 1;
-}
-
-/**
- * Logs when Car User Hal is requested to switch/create/remove user.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalModifyUserRequestReported {
-    // Request id for the request.
-    optional int32 request_id = 1;
-    // Request type.
-    enum RequestType {
-        UNKNOWN = 0;
-        // Car user manager requested user switch.
-        SWITCH_REQUEST_ANDROID = 1;
-        // OEM requested User switch.
-        SWITCH_REQUEST_OEM = 2;
-        // Hal switch requested after android switch using activity manager.
-        SWITCH_REQUEST_LEGACY = 3;
-        // Create User
-        CREATE_REQUEST = 4;
-        // Remove User
-        REMOVE_REQUEST = 5;
-    }
-    optional RequestType request_type = 2;
-    // Android User id of the current user which can only be 0, 10, 11 and so on.
-    // -1 if not available.
-    optional int32 user_id = 3;
-    // VHAL flags of the current user. (-1 if not available)
-    optional int32 user_flags = 4;
-    // Android User id of the target user for switch/create/remove. It can only
-    // be 0, 10, 11 and so on. -1 if not available.
-    optional int32 target_user_id = 5;
-    // VHAL flags of the target user for switch/create/remove. (-1 if not available)
-    optional int32 target_user_flags = 6;
-    // Request timeout Milliseconds (-1 if not available)
-    optional int32 timeout_millis = 7;
-}
-
-/**
- * Logs when Car User Hal responds to switch/create user request.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalModifyUserResponseReported {
-    // Request id of the request associated with the response.
-    optional int32 request_id = 1;
-    // Car user hal callback status.
-    enum CallbackStatus {
-        UNKNOWN = 0;
-        // Hal response was invalid.
-        INVALID = 1;
-        // Hal response was ok.
-        OK = 2;
-        // Hal timeout during set call.
-        HAL_SET_TIMEOUT = 3;
-        // Hal response timeout.
-        HAL_RESPONSE_TIMEOUT = 4;
-        // Hal responded with wrong info.
-        WRONG_HAL_RESPONSE = 5;
-        // Hal is processing multiple requests simultaneously.
-        CONCURRENT_OPERATION = 6;
-    }
-    optional CallbackStatus callback_status = 2;
-
-    // Hal request status for user switch/create/remove.
-    enum HalRequestStatus {
-        UNSPECIFIED = 0;
-        // Hal request for user switch/create is successful.
-        SUCCESS = 1;
-        // Hal request for user switch/create failed.
-        FAILURE = 2;
-    }
-    optional HalRequestStatus request_status = 3;
-}
-
-/**
- * Logs when post switch response is posted to Car User Hal.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalPostSwitchResponseReported {
-    // Request id.
-    optional int32 request_id = 1;
-
-    // Android user switch status.
-    enum UserSwitchStatus {
-        UNKNOWN = 0;
-        // Android user switch is successful.
-        SUCCESS = 1;
-        // Android user switch failed.
-        FAILURE = 2;
-    }
-    optional UserSwitchStatus switch_status = 2;
-}
-
-/**
- * Logs when initial user information is requested from Car User Hal.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalInitialUserInfoRequestReported {
-    // Request id for the request.
-    optional int32 request_id = 1;
-
-    // Request type for initial user information.
-    enum InitialUserInfoRequestType {
-        UNKNOWN = 0;
-        // At the first time Android was booted (or after a factory reset).
-        FIRST_BOOT = 1;
-        // At the first time Android was booted after the system was updated.
-        FIRST_BOOT_AFTER_OTA = 2;
-        // When Android was booted "from scratch".
-        COLD_BOOT = 3;
-        // When Android was resumed after the system was suspended to memory.
-        RESUME = 4;
-    }
-    optional InitialUserInfoRequestType request_type = 2;
-    // Request timeout Milliseconds (-1 if not available)
-    optional int32 timeout_millis = 3;
-}
-
-/**
- * Logs when Car User Hal responds to initial user information requests.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalInitialUserInfoResponseReported {
-    // Request id of the request associated with the response.
-    optional int32 request_id = 1;
-    // Car user hal callback status.
-    enum CallbackStatus {
-        UNKNOWN = 0;
-        // Hal response was invalid.
-        INVALID = 1;
-        // Hal response was ok.
-        OK = 2;
-        // Hal timeout during set call.
-        HAL_SET_TIMEOUT = 3;
-        // Hal response timeout.
-        HAL_RESPONSE_TIMEOUT = 4;
-        // Hal responded with wrong info.
-        WRONG_HAL_RESPONSE = 5;
-        // Hal is processing multiple requests simultaneously.
-        CONCURRENT_OPERATION = 6;
-    }
-    optional CallbackStatus callback_status = 2;
-    // Response for initial user information request.
-    enum InitialUserInfoResponseAction {
-        UNSPECIFIED = 0;
-        // Let the Android System decide what to do.
-        DEFAULT = 1;
-        // Switch to an existing Android user.
-        SWITCH = 2;
-        // Create a new Android user (and switch to it).
-        CREATE = 3;
-    }
-    optional InitialUserInfoResponseAction response_action = 3;
-    // Android User id of the target user which can only be 0, 10, 11 and so on.
-    // -1 if not available.
-    optional int32 target_user = 4;
-    // VHAL flags of the current user. (-1 if not available)
-    optional int32 target_user_flags = 5;
-    // User locales
-    optional string user_locales = 6;
-}
-
-/**
- * Logs when set user association is requested from Car User Hal.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalUserAssociationRequestReported {
-    // Request id for the request.
-    optional int32 request_id = 1;
-    // Request type.
-    enum RequestType {
-        UNKNOWN = 0;
-        // For setting user association information.
-        SET = 1;
-        // For getting user association information.
-        GET = 2;
-    }
-    optional RequestType request_type = 2;
-    // Android User id of the current user which can only be 0, 10, 11 and so on.
-    // -1 if not available.
-    optional int32 current_user_id = 3;
-    // VHAL flags of the current user. (-1 if not available)
-    optional int32 current_user_flags = 4;
-    // Number of the set associations requested.
-    optional int32 number_associations = 5;
-    // Concatenated string for the types from set associations request.
-    // This is a string converted from an array of integers.
-    optional string user_identification_association_types = 6;
-    // Concatenated string for the values from set associations request.
-    // This is a string converted from an array of integers.
-    optional string user_identification_association_values = 7;
-}
-
-/**
- * Logs when Car User Hal responds to set user association requests.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalSetUserAssociationResponseReported {
-    // Request id of the request associated with the response.
-    optional int32 request_id = 1;
-    // Car user hal callback status.
-    enum CallbackStatus {
-        UNKNOWN = 0;
-        // Hal response was invalid.
-        INVALID = 1;
-        // Hal response was ok.
-        OK = 2;
-        // Hal timeout during set call.
-        HAL_SET_TIMEOUT = 3;
-        // Hal response timeout.
-        HAL_RESPONSE_TIMEOUT = 4;
-        // Hal responded with wrong info.
-        WRONG_HAL_RESPONSE = 5;
-        // Hal is processing multiple requests simultaneously.
-        CONCURRENT_OPERATION = 6;
-    }
-    optional CallbackStatus callback_status = 2;
-    // Number of the set associations in the response.
-    optional int32 number_associations = 3;
-    // Concatenated string for the types from set associations request.
-    // This is a string converted from an array of integers.
-    optional string user_identification_association_types = 4;
-    // Concatenated string for the values from set associations request.
-    // This is a string converted from an array of integers.
-    optional string user_identification_association_values = 5;
-}
-
-/**
- * Logs whether GarageMode is entered.
- *
- * Logged from:
- *   packages/services/Car/service/src/com/android/car/CarStatsLog.java
- */
-message GarageModeInfo {
-    // Whether GarageMode is entered.
-    optional bool is_garage_mode = 1;
-}
-
-/**
- * Historical app ops data per package.
- */
-message AppOps {
-    // Uid of the package requesting the op
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Name of the package performing the op
-    optional string package_name = 2;
-
-    // operation id
-    optional android.app.AppOpEnum op_id = 3 [default = APP_OP_NONE];
-
-    // The number of times the op was granted while the app was in the
-    // foreground (only for trusted requests)
-    optional int64 trusted_foreground_granted_count = 4;
-
-    // The number of times the op was granted while the app was in the
-    // background (only for trusted requests)
-    optional int64 trusted_background_granted_count = 5;
-
-    // The number of times the op was rejected while the app was in the
-    // foreground (only for trusted requests)
-    optional int64 trusted_foreground_rejected_count = 6;
-
-    // The number of times the op was rejected while the app was in the
-    // background (only for trusted requests)
-    optional int64 trusted_background_rejected_count = 7;
-
-    // For long-running operations, total duration of the operation
-    // while the app was in the foreground (only for trusted requests)
-    optional int64 trusted_foreground_duration_millis = 8;
-
-    // For long-running operations, total duration of the operation
-    // while the app was in the background (only for trusted requests)
-    optional int64 trusted_background_duration_millis = 9;
-
-    // Whether AppOps is guarded by Runtime permission
-    optional bool is_runtime_permission = 10;
-}
-
-/**
- * Historical app ops data per package and attribution tag.
- */
-message AttributedAppOps {
-    // Uid of the package requesting the op
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Name of the package performing the op
-    optional string package_name = 2;
-
-    // tag; provided by developer when accessing related API, limited at 50 chars by API.
-    // Attributions must be provided through manifest using <attribution> tag available in R and
-    // above.
-    optional string tag = 3;
-
-    // operation id
-    optional android.app.AppOpEnum op = 4 [default = APP_OP_NONE];
-
-    // The number of times the op was granted while the app was in the
-    // foreground (only for trusted requests)
-    optional int64 trusted_foreground_granted_count = 5;
-
-    // The number of times the op was granted while the app was in the
-    // background (only for trusted requests)
-    optional int64 trusted_background_granted_count = 6;
-
-    // The number of times the op was rejected while the app was in the
-    // foreground (only for trusted requests)
-    optional int64 trusted_foreground_rejected_count = 7;
-
-    // The number of times the op was rejected while the app was in the
-    // background (only for trusted requests)
-    optional int64 trusted_background_rejected_count = 8;
-
-    // For long-running operations, total duration of the operation
-    // while the app was in the foreground (only for trusted requests)
-    optional int64 trusted_foreground_duration_millis = 9;
-
-    // For long-running operations, total duration of the operation
-    // while the app was in the background (only for trusted requests)
-    optional int64 trusted_background_duration_millis = 10;
-
-    // Whether AppOps is guarded by Runtime permission
-    optional bool is_runtime_permission = 11;
-
-    // Sampling rate used on device, from 0 to 100
-    optional int32 sampling_rate = 12;
-}
-
-/**
- * Location Manager API Usage information(e.g. API under usage,
- * API call's parameters).
- * Logged from:
- *  frameworks/base/services/core/java/com/android/server/LocationManagerService.java
- */
-message LocationManagerApiUsageReported {
-
-    // Indicating if usage starts or usage ends.
-    optional android.stats.location.UsageState state = 1;
-
-    // LocationManagerService's API in use.
-    // We can identify which API from LocationManager is
-    // invoking current LMS API by the combination of
-    // API parameter(e.g. is_listener_null, is_intent_null,
-    // is_location_request_null)
-    optional android.stats.location.LocationManagerServiceApi api_in_use = 2;
-
-    // Name of the package calling the API.
-    optional string calling_package_name = 3;
-
-    // Type of the location provider.
-    optional android.stats.location.ProviderType provider = 4;
-
-    // Quality of the location request
-    optional android.stats.location.LocationRequestQuality quality = 5;
-
-    // The desired interval for active location updates, in milliseconds.
-    // Bucketized to reduce cardinality.
-    optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6;
-
-    // Minimum distance between location updates, in meters.
-    // Bucketized to reduce cardinality.
-    optional android.stats.location.SmallestDisplacementBucket
-            bucketized_smallest_displacement = 7;
-
-    // The number of location updates.
-    optional int64 num_updates = 8;
-
-    // The request expiration time, in millisecond since boot.
-    // Bucketized to reduce cardinality.
-    optional android.stats.location.ExpirationBucket
-            bucketized_expire_in = 9;
-
-    // Type of Callback passed in for this API.
-    optional android.stats.location.CallbackType callback_type = 10;
-
-    // The radius of the central point of the alert
-    // region, in meters. Only for API REQUEST_GEOFENCE.
-    // Bucketized to reduce cardinality.
-    optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11;
-
-    // Activity Importance of API caller.
-    // Categorized to 3 types that are interesting from location's perspective.
-    optional android.stats.location.ActivityImportance activiy_importance = 12;
-}
-
-/**
- * Information about a permission grant or denial made by user inside ReviewPermissionsFragment
- */
-message ReviewPermissionsFragmentResultReported {
-    // unique value identifying a permission group change. A permission group change might result
-    // in multiple of these atoms
-    optional int64 change_id = 1;
-
-    // UID of package the permission belongs to
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Name of package the permission belongs to
-    optional string package_name = 3;
-
-    // The permission to be granted
-    optional string permission_name = 4;
-
-    // The result of the permission grant
-    optional bool permission_granted = 5;
-}
-
-/**
-* Information about results of permission upgrade by RuntimePermissionsUpgradeController
-* Logged from: RuntimePermissionUpdgradeController
-*/
-message RuntimePermissionsUpgradeResult {
-    // Permission granted as result of upgrade
-    optional string permission_name = 1;
-
-    // UID of package granted permission
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Name of package granted permission
-    optional string package_name = 3;
-}
-
-/**
-* Information about a buttons presented in GrantPermissionsActivty and choice made by user
-*/
-message GrantPermissionsActivityButtonActions {
-    // Permission granted as result of upgrade
-    optional string permission_group_name = 1;
-
-    // UID of package granted permission
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Name of package requesting permission
-    optional string package_name = 3;
-
-    // Buttons presented in the dialog - bit flags, bit numbers are in accordance with
-    // LABEL_ constants in GrantPermissionActivity.java
-    optional int32 buttons_presented = 4;
-
-    // Button clicked by user - same as bit flags in buttons_presented with only single bit set
-    optional int32 button_clicked = 5;
-
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 6;
-}
-
-/**
- * Information about LocationAccessCheck notification presented to user
- */
-message LocationAccessCheckNotificationAction {
-
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-
-    // Uid of package for which location access check is presented
-    optional int32 package_uid = 2;
-
-    // Name of package for which location access check is presented
-    optional string package_name = 3;
-
-    enum Result {
-        UNDEFINED = 0;
-        // notification was presented to the user
-        NOTIFICATION_PRESENTED = 1;
-        // notification was declined by the user
-        NOTIFICATION_DECLINED = 2;
-        // notification was clicked by the user
-        NOTIFICATION_CLICKED = 3;
-    }
-
-    // View / interaction recorded
-    optional Result result = 4;
-}
-
-/**
- * Information about a permission grant or revoke made by user inside AppPermissionFragment
- */
-message AppPermissionFragmentActionReported {
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-
-    // unique value identifying a permission group change. A permission group change might result
-    // in multiple of these atoms
-    optional int64 change_id = 2;
-
-    // UID of package the permission belongs to
-    optional int32 uid = 3 [(is_uid) = true];
-
-    // Name of package the permission belongs to
-    optional string package_name = 4;
-
-    // The permission to be granted
-    optional string permission_name = 5;
-
-    // The result of the permission grant
-    optional bool permission_granted = 6;
-
-    // State of Permission Flags after grant as per android.content.pm.PermissionFlags
-    optional int32 permission_flags = 7;
-
-    enum Button {
-        UNDEFINED = 0;
-        // Allow button
-        ALLOW = 1;
-        // Deny button
-        DENY = 2;
-        // Ask every time button
-        ASK_EVERY_TIME = 3;
-        // Allow all the time button
-        ALLOW_ALWAYS = 4;
-        // Allow only while using the app button
-        ALLOW_FOREGROUND = 5;
-        // Same is Deny button but shown in while in use dialog
-        DENY_FOREGROUND = 6;
-    }
-
-    // Button pressed in the dialog
-    optional Button button_pressed = 8;
-}
-
-/**
-* Information about a AppPermissionFragment viewed by user
-*/
-message AppPermissionFragmentViewed {
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-
-    // UID of package for which permissions are viewed
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Name of package for which permissions are viewed
-    optional string package_name = 3;
-
-    // Permission group viewed
-    optional string permission_group_name = 4;
-}
-
-/**
-* Information about a AppPermissionGroupsFragment viewed by user. Fragment has been renamed, but
-* the log retains the old fragment name.
-*/
-message AppPermissionsFragmentViewed {
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-
-    // id which identifies single view as every view might have several logging records
-    // with different package information attached
-    optional int64 view_id = 2;
-
-    // Permission group viewed
-    optional string permission_group_name = 3;
-
-    // UID of package for which permissions are viewed
-    optional int32 uid = 4 [(is_uid) = true];
-
-    // Name of package for which permissions are viewed
-    optional string package_name = 5;
-
-    // Category in which permission is included
-    enum Category {
-      UNDEFINED = 0;
-      ALLOWED = 1;
-      ALLOWED_FOREGROUND = 2;
-      DENIED = 3;
-    }
-    optional Category category = 6;
-}
-/**
-* Information about a PermissionAppsFragment viewed by user.
-* Logged from ui/handheld/PermissionAppsFragment.java
-*/
-message PermissionAppsFragmentViewed {
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-
-    // id which identifies single view as every view might have several logging records
-    // with different package information attached
-    optional int64 view_id = 2;
-
-    // Permission group viewed
-    optional string permission_group_name = 3;
-
-    // UID of package for which permissions are viewed
-    optional int32 uid = 4 [(is_uid) = true];
-
-    // Name of package for which permissions are viewed
-    optional string package_name = 5;
-
-    // Category in which app is included
-    enum Category {
-        UNDEFINED = 0;
-        ALLOWED = 1;
-        ALLOWED_FOREGROUND = 2;
-        DENIED = 3;
-    }
-    optional Category category = 6;
-}
-
-/**
-* Log that the Auto Revoke notification has been clicked
-* Logged from ui/ManagePermissionsActivity
-*/
-message AutoRevokeNotificationClicked {
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-}
-
-/**
-* Log that an app has been displayed on the auto revoke page, and lists one permission that was
-* auto revoked for it.
-* Logged from ui/handheld/AutoRevokeFragment
-*/
-message AutoRevokeFragmentAppViewed {
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-
-    // UID of package for which permissions are viewed
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Name of package for which permissions are viewed
-    optional string package_name = 3;
-
-    // The name of a permission group that has been revoked
-    optional string permission_group_name = 4;
-
-    // The age of the app- more than three months old, or more than six months
-    enum Age {
-        UNDEFINED = 0;
-        NEWER_BUCKET = 1;
-        OLDER_BUCKET = 2;
-    }
-
-    // How long the app has been unused. Currently, newer bucket is 3 months, older is 6 months
-    optional Age age = 5;
-}
-
-/**
-* Log that the user has interacted with an app on the auto revoke fragment
-* Logged from ui/handheld/AutoRevokeFragment
-*/
-message AutoRevokedAppInteraction {
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-
-    // UID of package for which permissions are viewed
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Name of package for which permissions are viewed
-    optional string package_name = 3;
-
-    enum Action {
-        UNDEFINED = 0;
-        REMOVE = 1;
-        OPEN = 2;
-        APP_INFO = 3;
-        PERMISSIONS = 4;
-        REMOVE_IN_SETTINGS = 5;
-        OPEN_IN_SETTINGS = 6;
-    }
-
-    // The action the user took to interact with the app
-    optional Action action = 4;
-}
-
-/**
-* Log that the AppPermissionGroupsFragment has been interacted with for the possible purposes of
-* auto revoke, or that the auto revoke switch has been changed
-* Logged from ui/handheld/AppPermissionGroupsFragment
- */
-message AppPermissionGroupsFragmentAutoRevokeAction {
-    // id which identifies single session of user interacting with permission controller
-    optional int64 session_id = 1;
-
-    // UID of package for which permissions are viewed
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // Name of package for which permissions are viewed
-    optional string package_name = 3;
-
-    enum Action {
-        UNDEFINED = 0;
-        OPENED_FOR_AUTO_REVOKE = 1;
-        OPENED_FROM_INTENT = 2;
-        SWITCH_ENABLED = 3;
-        SWITCH_DISABLED = 4;
-    }
-
-    // The action the user took to interact with the fragment
-    optional Action action = 4;
-}
-
-/**
- * Logs when there is a smart selection related event.
- * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
- * Logged from: TextClassifierEventLogger.java
- */
-message TextSelectionEvent {
-    // A session ID.
-    optional string session_id = 1;
-
-    // Event type of this event.
-    optional android.stats.textclassifier.EventType event_type = 2;
-
-    // Name of the annotator model that is involved in this event.
-    optional string model_name = 3;
-
-    // Type of widget that was involved in triggering this event.
-    optional android.stats.textclassifier.WidgetType widget_type = 4;
-
-    // Index of this event in a session.
-    optional int32 event_index = 5;
-
-    // Entity type that is involved.
-    optional string entity_type = 6;
-
-    // Relative word index of the start of the selection.
-    optional int32 relative_word_start_index = 7;
-
-    // Relative word (exclusive) index of the end of the selection.
-    optional int32 relative_word_end_index = 8;
-
-    // Relative word index of the start of the smart selection.
-    optional int32 relative_suggested_word_start_index = 9;
-
-    // Relative word (exclusive) index of the end of the smart selection.
-    optional int32 relative_suggested_word_end_index = 10;
-
-    // Name of source package.
-    optional string package_name = 11;
-
-    // Name of the LangID model that is involved in this event.
-    optional string langid_model_name = 12;
-}
-
-/**
- * Logs when there is a smart linkify related event.
- * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
- * Logged from: TextClassifierEventLogger.java
- */
-message TextLinkifyEvent {
-    // A session ID.
-    optional string session_id = 1;
-
-    // Event type of this event.
-    optional android.stats.textclassifier.EventType event_type = 2;
-
-    // Name of the annotator model that is involved in this event.
-    optional string model_name = 3;
-
-    // Type of widget that was involved in triggering this event.
-    optional android.stats.textclassifier.WidgetType widget_type = 4;
-
-    // Index of this event in a session.
-    optional int32 event_index = 5;
-
-    // Entity type that is involved.
-    optional string entity_type = 6;
-
-    // Number of links detected.
-    optional int32 num_links = 7;
-
-    // The total length of all links.
-    optional int32 linked_text_length = 8;
-
-    // Length of input text.
-    optional int32 text_length = 9;
-
-    // Time spent on generating links in ms.
-    optional int64 latency_millis = 10;
-
-    // Name of source package.
-    optional string package_name = 11;
-
-    // Name of the LangID model that is involved in this event.
-    optional string langid_model_name = 12;
-}
-
-/**
- * Logs when there is a conversation actions related event.
- * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
- * Logged from: TextClassifierEventLogger.java
- */
-message ConversationActionsEvent {
-    // A session ID.
-    optional string session_id = 1;
-
-    // Event type of this event.
-    optional android.stats.textclassifier.EventType event_type = 2;
-
-    // Name of the actions model that is involved in this event.
-    optional string model_name = 3;
-
-    // Type of widget that was involved in triggering this event.
-    optional android.stats.textclassifier.WidgetType widget_type = 4;
-
-    // The first entity type that is involved.
-    optional string first_entity_type = 5;
-
-    // The second entity type that is involved.
-    optional string second_entity_type = 6;
-
-    // The third entity type that is involved.
-    optional string third_entity_type = 7;
-
-    // The score of the first entity type.
-    optional float score = 8;
-
-    // Name of source package.
-    optional string package_name = 9;
-
-    // Name of the annotator model that is involved in this event.
-    optional string annotator_model_name = 10;
-
-    // Name of the LangID model that is involved in this event.
-    optional string langid_model_name = 11;
-}
-
-/**
- * Logs when there is a language detection related event.
- * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
- * Logged from: TextClassifierEventLogger.java
- */
-message LanguageDetectionEvent {
-    // A session ID.
-    optional string session_id = 1;
-
-    // Event type of this event.
-    optional android.stats.textclassifier.EventType event_type = 2;
-
-    // Name of the language detection model that is involved in this event.
-    optional string model_name = 3;
-
-    // Type of widget that was involved in triggering this event.
-    optional android.stats.textclassifier.WidgetType widget_type = 4;
-
-    // Detected language.
-    optional string language_tag = 5;
-
-    // Score of the detected language.
-    optional float score = 6;
-
-    // Position of this action.
-    optional int32 action_index = 7;
-
-    // Name of source package.
-    optional string package_name = 8;
-}
-
-/**
- * Information about an OTA update attempt by update_engine.
- * Logged from platform/system/update_engine/metrics_reporter_android.cc
- */
-message UpdateEngineUpdateAttemptReported {
-    // The number of attempts for the update engine to apply a given payload.
-    optional int32 attempt_number = 1;
-
-    optional android.stats.otaupdate.PayloadType payload_type = 2;
-
-    // The total time in minutes for the update engine to apply a given payload.
-    // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and
-    // it's increased when the system is sleeping.
-    optional int32 duration_boottime_in_minutes = 3;
-
-    // The total time in minutes for the update engine to apply a given payload.
-    // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW;
-    // and it's not increased when the system is sleeping.
-    optional int32 duration_monotonic_in_minutes = 4;
-
-    // The size of the payload in MiBs.
-    optional int32 payload_size_mib = 5;
-
-    // The attempt result reported by the update engine for an OTA update.
-    optional android.stats.otaupdate.AttemptResult attempt_result = 6;
-
-    // The error code reported by the update engine after an OTA update attempt
-    // on A/B devices.
-    optional android.stats.otaupdate.ErrorCode error_code = 7;
-
-    // The build fingerprint of the source system. The value is read from a
-    // system property when the device takes the update. e.g.
-    // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys
-    optional string source_fingerprint = 8;
-
-    // Size of super partition.
-    optional int64 super_partition_size_bytes = 9;
-
-    // Size of current slot within the super partition.
-    optional int64 slot_size_bytes = 10;
-
-    // Free space available in the super partition.
-    optional int64 super_free_space_bytes = 11;
-}
-
-/**
- * Information about all the attempts the device make before finishing the
- * successful update.
- * Logged from platform/system/update_engine/metrics_reporter_android.cc
- */
-message UpdateEngineSuccessfulUpdateReported {
-    // The number of attempts for the update engine to apply the payload for a
-    // successful update.
-    optional int32 attempt_count = 1;
-
-    optional android.stats.otaupdate.PayloadType payload_type = 2;
-
-    optional int32 payload_size_mib = 3;
-
-    // The total number of bytes downloaded by update_engine since the last
-    // successful update.
-    optional int32 total_bytes_downloaded_mib = 4;
-
-    // The ratio in percentage of the over-downloaded bytes compared to the
-    // total bytes needed to successfully install the update. e.g. 200 if we
-    // download 200MiB in total for a 100MiB package.
-    optional int32 download_overhead_percentage = 5;
-
-    // The total time in minutes for the update engine to apply the payload for a
-    // successful update.
-    optional int32 total_duration_minutes = 6;
-
-    // The number of reboot of the device during a successful update.
-    optional int32 reboot_count = 7;
-}
-
-/**
- * Reported when the RebootEscrow HAL has attempted to recover the escrowed
- * key to indicate whether it was successful or not.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java
- */
-message RebootEscrowRecoveryReported {
-    optional bool successful = 1;
-}
-
-/**
- * Global display pipeline metrics reported by SurfaceFlinger.
- * Pulled from:
- *    frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
- */
-message SurfaceflingerStatsGlobalInfo {
-    // Total number of frames presented during the tracing period
-    optional int64 total_frames = 1;
-    // Total number of frames missed
-    optional int64 missed_frames = 2;
-    // Total number of frames that fell back to client composition
-    optional int64 client_composition_frames = 3;
-    // Total time the display was turned on
-    optional int64 display_on_millis = 4;
-    // Total time that was spent performing animations.
-    // This is derived from the present-to-present layer histogram
-    optional int64 animation_millis = 5;
-    // Total number of event connections tracked by SurfaceFlinger at the time
-    // of this pull. If this number grows prohibitively large, then this can
-    // cause jank due to resource contention.
-    optional int32 event_connection_count = 6;
-    // Set of timings measured from when SurfaceFlinger began compositing a
-    // frame, until the frame was requested to be presented to the display. This
-    // measures SurfaceFlinger's total CPU walltime on the critical path per
-    // frame.
-    optional FrameTimingHistogram frame_duration = 7
-        [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Set of timings measured from when SurfaceFlinger first began using the
-    // GPU to composite a frame, until the GPU has finished compositing that
-    // frame. This measures the total additional time SurfaceFlinger needed to
-    // perform due to falling back into GPU composition.
-    optional FrameTimingHistogram render_engine_timing = 8
-        [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Per-layer display pipeline metrics reported by SurfaceFlinger.
- * The number of layers uploaded will be restricted due to size limitations.
- * Pulled from:
- *    frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
- */
-message SurfaceflingerStatsLayerInfo {
-    // The layer for this set of metrics
-    // For now we can infer that the package name is included in the layer
-    // name.
-    optional string layer_name = 1;
-    // Total number of frames presented
-    optional int64 total_frames = 2;
-    // Total number of dropped frames while latching a buffer for this layer.
-    optional int64 dropped_frames = 3;
-    // Set of timings measured between successive presentation timestamps.
-    optional FrameTimingHistogram present_to_present = 4
-        [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Set of timings measured from when an app queued a buffer for
-    // presentation, until the buffer was actually presented to the
-    // display.
-    optional FrameTimingHistogram post_to_present = 5
-        [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Set of timings measured from when a buffer is ready to be presented,
-    // until the buffer was actually presented to the display.
-    optional FrameTimingHistogram acquire_to_present = 6
-        [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Set of timings measured from when a buffer was latched by
-    // SurfaceFlinger, until the buffer was presented to the display
-    optional FrameTimingHistogram latch_to_present = 7
-        [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Set of timings measured from the desired presentation to the actual
-    // presentation time
-    optional FrameTimingHistogram desired_to_present = 8
-        [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Set of timings measured from when an app queued a buffer for
-    // presentation, until the buffer was ready to be presented.
-    optional FrameTimingHistogram post_to_acquire = 9
-        [(android.os.statsd.log_mode) = MODE_BYTES];
-    // Frames missed latch because the acquire fence didn't fire
-    optional int64 late_acquire_frames = 10;
-    // Frames latched early because the desired present time was bad
-    optional int64 bad_desired_present_frames = 11;
-}
-
-/**
- * Histogram of frame counts bucketed by time in milliseconds.
- * Because of size limitations, we hard-cap the number of buckets, with
- * buckets for corresponding to larger milliseconds being less precise.
- */
-message FrameTimingHistogram {
-    // Timings in milliseconds that describes a set of histogram buckets
-    repeated int32 time_millis_buckets = 1;
-    // Number of frames that match to each time_millis, i.e. the bucket
-    // contents
-    // It's required that len(time_millis) == len(frame_count)
-    repeated int64 frame_counts = 2;
-}
-
-/**
- * Janky event as reported by SurfaceFlinger.
- * This event is intended to be consumed by a Perfetto subscriber for
- * automated trace collection.
- *
- * Logged from:
- *    frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp
- */
-message DisplayJankReported {
-    // Informational field for how long the janky event lasted in milliseconds
-    optional int64 event_duration_millis = 1;
-    // Number of frame deadlines missed, where SurfaceFlinger failed to update
-    // the display on time.
-    optional int32 present_deadlines_missed = 2;
-}
-
-/**
- * Information about camera facing and API level usage.
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java
- */
-message CameraActionEvent {
-    // Camera session duration
-    optional int64 duration_millis = 1;
-
-    // Camera API level used
-    optional int32 api_level = 2;
-
-    // Name of client package
-    optional string package_name = 3;
-
-    // Camera facing
-    enum Facing {
-        UNKNOWN = 0;
-        BACK = 1;
-        FRONT = 2;
-        EXTERNAL = 3;
-    }
-    optional Facing facing = 4;
-}
-
-/**
- * Logs when a compatibility change is affecting an app.
- *
- * Logged from:
- *   frameworks/base/core/java/android/app/AppCompatCallbacks.java and
- *   frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java
- */
-message AppCompatibilityChangeReported {
-    // The UID of the app being affected by the compatibilty change.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The ID of the change affecting the app.
-    optional int64 change_id = 2;
-
-    enum State {
-        UNKNOWN_STATE = 0;
-        ENABLED = 1;
-        DISABLED = 2;
-        LOGGED = 3;
-    }
-
-    // The state of the change - if logged from gating whether it was enabled or disabled, or just
-    // logged otherwise.
-    optional State state = 3;
-
-    enum Source {
-        UNKNOWN_SOURCE = 0;
-        APP_PROCESS = 1;
-        SYSTEM_SERVER = 2;
-    }
-
-    // Where it was logged from.
-    optional Source source = 4;
-
-}
-
-/**
- * Logged from
- *     external/perfetto/src/perfetto_cmd/perfetto_cmd.cc
- */
-message PerfettoUploaded {
-    enum Event {
-        PERFETTO_UNDEFINED = 0;
-        PERFETTO_TRACE_BEGIN = 1;
-        PERFETTO_BACKGROUND_TRACE_BEGIN = 2;
-        PERFETTO_ON_CONNECT = 3;
-        PERFETTO_ON_TRACING_DISABLED = 4;
-        PERFETTO_UPLOAD_DROPBOX_BEGIN = 5;
-        PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6;
-        PERFETTO_UPLOAD_DROPBOX_FAILURE = 7;
-        PERFETTO_UPLOAD_INCIDENT_BEGIN = 8;
-        PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9;
-        PERFETTO_UPLOAD_INCIDENT_FAILURE = 10;
-        PERFETTO_FINALIZE_TRACE_AND_EXIT = 11;
-        PERFETTO_TRIGGER_BEGIN = 12;
-        PERFETTO_TRIGGER_SUCCESS = 13;
-        PERFETTO_TRIGGER_FAILURE = 14;
-        PERFETTO_HIT_GUARDRAILS = 15;
-        PERFETTO_ON_TIMEOUT = 16;
-        PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17;
-    }
-
-    // Which stage of the pipeline we are reporting from.
-    optional Event event = 1;
-
-    // UUID matching the one set inside the SystemInfo trace packet.
-    optional int64 trace_uuid_lsb = 2;
-    optional int64 trace_uuid_msb = 3;
-}
-
-/**
- * Pulls client metrics on data transferred via Vehicle Maps Service.
- * Metrics are keyed by uid + layer.
- *
- * Pulled from:
- *   packages/services/Car/service/src/com/android/car/stats/CarStatsService.java
- */
-message VmsClientStats {
-    // UID of the VMS client app
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // VMS layer definition
-    optional int32 layer_type = 2;
-    optional int32 layer_channel = 3;
-    optional int32 layer_version = 4;
-
-    // Bytes and packets sent by the client for the layer
-    optional int64 tx_bytes = 5;
-    optional int64 tx_packets = 6;
-
-    // Bytes and packets received by the client for the layer
-    optional int64 rx_bytes = 7;
-    optional int64 rx_packets = 8;
-
-    // Bytes and packets dropped due to client error
-    optional int64 dropped_bytes = 9;
-    optional int64 dropped_packets = 10;
-}
-
-/**
- * State of a dangerous permission requested by a package - sampled
- * Pulled from: StatsCompanionService.java with data obtained from PackageManager API
-*/
-message DangerousPermissionStateSampled {
-    // Name of the permission
-    optional string permission_name = 1;
-
-    // Uid of the package
-    optional int32 uid = 2 [(is_uid) = true];
-
-    // If the permission is granted to the uid
-    optional bool is_granted = 3;
-
-    // Permission flags as per android.content.pm.PermissionFlags
-    optional int32 permission_flags = 4;
-}
-
-/**
- * HWUI stats for a given app.
- */
-message GraphicsStats {
-    // The package name of the app
-    optional string package_name = 1;
-
-    // The version code of the app
-    optional int64 version_code = 2;
-
-    // The start & end timestamps in UTC as
-    // milliseconds since January 1, 1970
-    // Compatible with java.util.Date#setTime()
-    optional int64 start_millis = 3;
-
-    optional int64 end_millis = 4;
-
-    // HWUI renders pipeline type: GL (1) or Vulkan (2).
-    enum PipelineType {
-        UNKNOWN = 0;
-        GL = 1;
-        VULKAN = 2;
-    }
-
-    // HWUI renders pipeline type: GL or Vulkan.
-    optional PipelineType pipeline = 5;
-
-    // Distinct frame count.
-    optional int32 total_frames = 6;
-
-    // Number of "missed vsync" events.
-    optional int32 missed_vsync_count = 7;
-
-    // Number of frames in triple-buffering scenario (high input latency)
-    optional int32 high_input_latency_count = 8;
-
-    // Number of "slow UI thread" events.
-    optional int32 slow_ui_thread_count = 9;
-
-    // Number of "slow bitmap upload" events.
-    optional int32 slow_bitmap_upload_count = 10;
-
-    // Number of "slow draw" events.
-    optional int32 slow_draw_count = 11;
-
-    // Number of frames that missed their deadline (aka, visibly janked)
-    optional int32 missed_deadline_count = 12;
-
-    // The frame time histogram for the package
-    optional FrameTimingHistogram cpu_histogram = 13
-    [(android.os.statsd.log_mode) = MODE_BYTES];
-
-    // The gpu frame time histogram for the package
-    optional FrameTimingHistogram gpu_histogram = 14
-    [(android.os.statsd.log_mode) = MODE_BYTES];
-
-    // UI mainline module version.
-    optional int64 version_ui_module = 15;
-
-    // If true, these are HWUI stats for up to a 24h period for a given app from today.
-    // If false, these are HWUI stats for a 24h period for a given app from the last complete
-    // day (yesterday). Stats from yesterday stay constant, while stats from today may change as
-    // more apps are running / rendering.
-    optional bool is_today = 16;
-}
-
-/**
- * Message related to dangerous (runtime) app ops access
- */
-message RuntimeAppOpAccess {
-    // Uid of the package accessing app op
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Name of the package accessing app op
-    optional string package_name = 2;
-
-    // deprecated - set to empty string
-    optional string op_deprecated = 3 [deprecated = true];
-
-    // attribution_tag; provided by developer when accessing related API, limited at 50 chars by
-    // API. Attributions must be provided through manifest using <attribution> tag available in R
-    // and above.
-    optional string attribution_tag = 4;
-
-    // message related to app op access, limited to 600 chars by API
-    optional string message = 5;
-
-    enum SamplingStrategy {
-        DEFAULT = 0;
-        UNIFORM = 1;
-        RARELY_USED = 2;
-        BOOT_TIME_SAMPLING = 3;
-        UNIFORM_OPS = 4;
-    }
-
-    // sampling strategy used to collect this message
-    optional SamplingStrategy sampling_strategy = 6;
-
-    // operation id
-    optional android.app.AppOpEnum op = 7 [default = APP_OP_NONE];
-}
-
-/*
- * Logs userspace reboot outcome and duration.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/server/BootReceiver.java
- */
-message UserspaceRebootReported {
-    // Possible outcomes of userspace reboot.
-    enum Outcome {
-        // Default value in case platform failed to determine the outcome.
-        OUTCOME_UNKNOWN = 0;
-        // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot).
-        SUCCESS = 1;
-        // Userspace reboot shutdown sequence was aborted.
-        FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2;
-        // Remounting userdata into checkpointing mode failed.
-        FAILED_USERDATA_REMOUNT = 3;
-        // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard
-        // reboot.
-        FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4;
-    }
-    // Outcome of userspace reboot. Always set.
-    optional Outcome outcome = 1;
-    // Duration of userspace reboot in case it has a successful outcome.
-    // Duration is measured as time between userspace reboot was initiated and until boot completed
-    // (e.g. sys.boot_completed=1).
-    optional int64 duration_millis = 2;
-    // State of primary user's (user0) credential encryption storage.
-    enum UserEncryptionState {
-        // Default value.
-        USER_ENCRYPTION_STATE_UNKNOWN = 0;
-        // Credential encrypted storage is unlocked.
-        UNLOCKED = 1;
-        // Credential encrypted storage is locked.
-        LOCKED = 2;
-    }
-    // State of primary user's encryption storage at the moment boot completed. Always set.
-    optional UserEncryptionState user_encryption_state = 3;
-}
-
-/*
- * Logs integrity check information during each install.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
- */
-message IntegrityCheckResultReported {
-    optional string package_name = 1;
-    optional string app_certificate_hash = 2;
-    optional int64 version_code = 3;
-    optional string installer_package_name = 4;
-    enum Response {
-        UNKNOWN = 0;
-        ALLOWED = 1;
-        REJECTED = 2;
-        FORCE_ALLOWED = 3;
-    }
-    optional Response response = 5;
-    // An estimate on the cause of the response. This will only be populated for
-    // REJECTED and FORCE_ALLOWED
-    optional bool caused_by_app_cert_rule = 6;
-    optional bool caused_by_installer_rule = 7;
-}
-
-/**
- * Logs the information about the rules and the provider whenever rules are
- * pushed into AppIntegrityManager.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
- */
-message IntegrityRulesPushed {
-    optional bool success = 1;
-    // Package name of the app that pushed the rules.
-    optional string rule_provider = 2;
-    // Version string of arbitrary format provided by the rule provider to
-    // identify the rules.
-    optional string rule_version = 3;
-}
-
-/**
- * Logs when a cell broadcast message is received on the device.
- *
- * Logged from Cell Broadcast module and platform:
- *   packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
- *   packages/apps/CellBroadcastReceiver/
- *   frameworks/opt/telephony/src/java/com/android/internal/telephony/CellBroadcastServiceManager.java
- */
-message CellBroadcastMessageReported {
-    // The type of Cell Broadcast message
-    enum CbType {
-        UNKNOWN_TYPE = 0;
-        GSM = 1;
-        CDMA = 2;
-        CDMA_SPC = 3;
-    }
-
-    // The parts of the cell broadcast message pipeline
-    enum ReportSource {
-        UNKNOWN_SOURCE = 0;
-        FRAMEWORK = 1;
-        CB_SERVICE = 2;
-        CB_RECEIVER_APP = 3;
-    }
-
-    // GSM, CDMA, CDMA-SCP
-    optional CbType type = 1;
-
-    // The source of the report
-    optional ReportSource source = 2;
-}
-
-/**
- * Logs when a cell broadcast message is filtered out, or otherwise intentionally not sent to CBR.
- *
- * Logged from CellBroadcastService module:
- *   packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
- */
-message CellBroadcastMessageFiltered {
-    enum FilterReason {
-        NOT_FILTERED = 0;
-        DUPLICATE_MESSAGE = 1;
-        GEOFENCED_MESSAGE = 2;
-        AREA_INFO_MESSAGE = 3;
-    }
-
-    // GSM, CDMA, CDMA-SCP
-    optional CellBroadcastMessageReported.CbType type = 1;
-
-    // The source of the report
-    optional FilterReason filter = 2;
-}
-
-/**
- * Logs when an error occurs while handling a cell broadcast message;
- *
- * Logged from CellBroadcastService module:
- *   packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
- */
-message CellBroadcastMessageError {
-    // The type of error raised when trying to handle a cell broadcast message
-    enum ErrorType {
-        UNKNOWN_TYPE = 0;
-        CDMA_DECODING_ERROR = 1;
-        CDMA_SCP_EMPTY = 2;
-        CDMA_SCP_HANDLING_ERROR = 3;
-        GSM_INVALID_HEADER_LENGTH = 4;
-        GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5;
-        GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6;
-        GSM_INVALID_PDU = 7;
-        GSM_INVALID_GEO_FENCING_DATA = 8;
-        GSM_UMTS_INVALID_WAC = 9;
-        FAILED_TO_INSERT_TO_DB = 10;
-        UNEXPECTED_GEOMETRY_FROM_FWK = 11;
-        UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12;
-        UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13;
-        UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14;
-        NO_CONNECTION_TO_CB_SERVICE = 15;
-    }
-
-    // What kind of error occurred
-    optional ErrorType type = 1;
-
-    // Exception message (or log message) associated with the error (max 1000 chars)
-    optional string exception_message = 2;
-}
-
-/**
- * Logs when a tune occurs through device's Frontend.
- * This is atom ID 276.
- *
- * Logged from:
- *   frameworks/base/media/java/android/media/tv/tuner/Tuner.java
- */
-message TvTunerStateChanged {
-    enum State {
-        UNKNOWN = 0;
-        TUNING = 1; // Signal is tuned
-        LOCKED = 2;    // the signal is locked
-        NOT_LOCKED = 3; // the signal isn’t locked.
-        SIGNAL_LOST = 4; // the signal was locked, but is lost now.
-        SCANNING = 5; // the signal is scanned
-        SCAN_STOPPED = 6; // the scan is stopped.
-    }
-    // The uid of the application that sent this custom atom.
-    optional int32 uid = 1 [(is_uid) = true];
-    //  new state
-    optional State state = 2;
-}
-
-/**
- * Logs the status of a dvr playback or record.
- * This is atom ID 279.
- *
- * Logged from:
- *   frameworks/base/media/java/android/media/tv/tuner/dvr
- */
-message TvTunerDvrStatus {
-    enum Type {
-        UNKNOWN_TYPE = 0;
-        PLAYBACK = 1; // is a playback
-        RECORD = 2; // is a record
-    }
-    enum State {
-        UNKNOWN_STATE = 0;
-        STARTED = 1; // DVR is started
-        STOPPED = 2; // DVR is stopped
-    }
-    // The uid of the application that sent this custom atom.
-    optional int32 uid = 1 [(is_uid) = true];
-    // DVR type
-    optional Type type = 2;
-    //  DVR state
-    optional State state = 3;
-    //  Identify the segment of a record or playback
-    optional int32 segment_id = 4;
-    // indicate how many overflow or underflow happened between started to stopped
-    optional int32 overflow_underflow_count = 5;
-}
-
-/**
- * Logs when a cas session opened through MediaCas.
- * This is atom ID 280.
- *
- * Logged from:
- *   frameworks/base/media/java/android/media/MediaCas.java
- */
-message TvCasSessionOpenStatus {
-    enum State {
-        UNKNOWN = 0;
-        SUCCEEDED = 1; // indicate that the session is opened successfully.
-        FAILED = 2; // indicate that the session isn’t opened successfully.
-    }
-    // The uid of the application that sent this custom atom.
-    optional int32 uid = 1 [(is_uid) = true];
-    //  Cas system Id
-    optional int32 cas_system_id = 2;
-    // State of the session
-    optional State state = 3;
-}
-
-/**
- * Logs for ContactsProvider general usage.
- * This is atom ID 301.
- *
- * Logged from:
- *   packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java
- */
-message ContactsProviderStatusReported {
-    enum ApiType {
-        UNKNOWN_API = 0;
-        QUERY = 1;
-        // INSERT includes insert and bulkInsert, and inserts triggered by applyBatch.
-        INSERT = 2;
-        // UPDATE and DELETE includes update/delete and the ones triggered by applyBatch.
-        UPDATE = 3;
-        DELETE = 4;
-    }
-
-    enum ResultType {
-        UNKNOWN_RESULT = 0;
-        SUCCESS = 1;
-        FAIL = 2;
-        ILLEGAL_ARGUMENT = 3;
-        UNSUPPORTED_OPERATION = 4;
-    }
-
-    enum CallerType {
-        UNSPECIFIED_CALLER_TYPE = 0;
-        CALLER_IS_SYNC_ADAPTER = 1;
-        CALLER_IS_NOT_SYNC_ADAPTER = 2;
-    }
-
-    optional ApiType api_type = 1;
-    // Defined in
-    // packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java
-    optional int32 uri_type = 2;
-    optional CallerType caller_type = 3;
-    optional ResultType result_type = 4;
-    optional int32 result_count = 5;
-    optional int64 latency_micros = 6;
-}
-
-/**
- * Logs when an app is frozen or unfrozen.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/CachedAppOptimizer.java
- */
-message AppFreezeChanged {
-    // The type of event.
-    enum Action {
-        UNKNOWN = 0;
-        FREEZE_APP = 1;
-        UNFREEZE_APP = 2;
-    }
-    optional Action action = 1;
-
-    // Pid of the process being frozen.
-    optional int32 pid = 2;
-
-    // Name of the process being frozen.
-    optional string process_name = 3;
-
-    // Time since last unfrozen.
-    optional int64 time_unfrozen_millis = 4;
-}
-
-/**
- * Pulls information for a single voice call.
- *
- * Each pull creates multiple atoms, one for each call. The sequence is randomized when pulled.
- *
- * Pulled from:
- *   frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message VoiceCallSession {
-    // Bearer (IMS or CS) when the call started.
-    optional android.telephony.CallBearerEnum bearer_at_start = 1;
-
-    // Bearer (IMS or CS) when the call ended.
-    // The bearer may change during the call, e.g. due to SRVCC.
-    optional android.telephony.CallBearerEnum bearer_at_end = 2;
-
-    // Direction of the call (incoming or outgoing).
-    optional android.telephony.CallDirectionEnum direction = 3;
-
-    // Time spent setting up the call.
-    optional android.telephony.CallSetupDurationEnum setup_duration = 4;
-
-    // Whether the call ended before the setup was completed.
-    optional bool setup_failed = 5;
-
-    // IMS reason code or CS disconnect cause.
-    // For IMS, see: frameworks/base/telephony/java/android/telephony/ims/ImsReasonInfo.java
-    // For CS, see: frameworks/base/telephony/java/android/telephony/DisconnectCause.java
-    optional int32 disconnect_reason_code = 6;
-
-    // IMS extra code or CS precise disconnect cause.
-    // For IMS, this code is vendor-specific
-    // For CS, see: frameworks/base/telephony/java/android/telephony/PreciseDisconnectCause.java
-    optional int32 disconnect_extra_code = 7;
-
-    // IMS extra message or CS vendor cause.
-    optional string disconnect_extra_message = 8;
-
-    // Radio access technology (RAT) used when call started.
-    optional android.telephony.NetworkTypeEnum rat_at_start = 9;
-
-    // Radio access technology (RAT) used when call terminated.
-    optional android.telephony.NetworkTypeEnum rat_at_end = 10;
-
-    // Number of times RAT changed during the call.
-    optional int64 rat_switch_count = 11;
-
-    // A bitmask of all codecs used during the call.
-    // See: frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/VoiceCallSessionStats.java
-    optional int64 codec_bitmask = 12;
-
-    // Number of other calls going on during call setup, for the same SIM slot.
-    optional int32 concurrent_call_count_at_start = 13;
-
-    // Number of other calls going on during call termination, for the same SIM slot.
-    optional int32 concurrent_call_count_at_end = 14;
-
-    // Index of the SIM is used, 0 for single-SIM devices.
-    optional int32 sim_slot_index = 15;
-
-    // Whether the device was in multi-SIM mode (with multiple active SIM profiles).
-    optional bool is_multi_sim = 16;
-
-    // Whether the call was made with an eSIM profile.
-    optional bool is_esim = 17;
-
-    // Carrier ID of the SIM card.
-    // See https://source.android.com/devices/tech/config/carrierid.
-    optional int32 carrier_id = 18;
-
-    // Whether an SRVCC has been completed successfully for this call.
-    optional bool srvcc_completed = 19;
-
-    // Number of SRVCC failures.
-    optional int64 srvcc_failure_count = 20;
-
-    // Number of SRVCC cancellations.
-    optional int64 srvcc_cancellation_count = 21;
-
-    // Whether the Real-Time Text (RTT) was ever used in the call (rather than whether RTT was
-    // enabled in the dialer's settings).
-    optional bool rtt_enabled = 22;
-
-    // Whether this was an emergency call.
-    optional bool is_emergency = 23;
-
-    // Whether the call was performed while roaming.
-    optional bool is_roaming = 24;
-
-    // A random number used as the dimension field to pull multiple atoms.
-    optional int32 dimension = 25;
-}
-
-/**
- * Pulls voice call radio access technology (RAT) usage.
- *
- * Each pull creates multiple atoms, one for each carrier/RAT, the order of which is irrelevant to
- * time. The atom will be skipped if not enough data is available.
- *
- * Pulled from:
- *   frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message VoiceCallRatUsage {
-    // Carrier ID (https://source.android.com/devices/tech/config/carrierid).
-    optional int32 carrier_id = 1;
-
-    // Radio access technology.
-    optional android.telephony.NetworkTypeEnum rat = 2;
-
-    // Total duration that voice calls spent on this carrier and RAT.
-    optional int64 total_duration_seconds = 3;
-
-    // Total number of calls using this carrier and RAT.
-    // A call is counted once even if it used the RAT multiple times.
-    optional int64 call_count = 4;
-}
-
-/**
- * Pulls the number of active SIM slots and SIMs/eSIM profiles.
- *
- * Pulled from:
- *   frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message SimSlotState {
-    // Number of active SIM slots (both physical and eSIM profiles) in the device.
-    optional int32 active_slot_count = 1;
-
-    // Number of SIM cards (both physical and active eSIM profiles).
-    // This number is always equal to or less than the number of active SIM slots.
-    optional int32 sim_count = 2;
-
-    // Number of active eSIM profiles.
-    // This number is always equal to or less than the number of SIMs.
-    optional int32 esim_count = 3;
-}
-
-/**
- * Pulls supported cellular radio access technologies.
- *
- * This atom reports the capabilities of the device, rather than the network it has access to.
- *
- * Pulled from:
- *   frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message SupportedRadioAccessFamily {
-    // A bitmask of supported radio technologies.
-    // See android.telephony.TelephonyManager.NetworkTypeBitMask.
-    optional int64 network_type_bitmask = 1;
-}
-
-/**
- * Logs gnss stats from location service provider
- *
- * Pulled from:
- *  frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
- */
-
-message GnssStats {
-    // Number of location reports since boot
-    optional int64 location_reports = 1;
-
-    // Total pulled reports of Location failures since boot
-    optional int64 location_failure_reports = 2;
-
-    // Number of time to first fix reports since boot
-    optional int64 time_to_first_fix_reports = 3;
-
-    // Total pulled reported time to first fix (in milli-seconds) since boot
-    optional int64 time_to_first_fix_millis = 4;
-
-    // Number of position accuracy reports since boot
-    optional int64 position_accuracy_reports = 5;
-
-    // Total pulled reported position accuracy (in meters) since boot
-    optional int64 position_accuracy_meters = 6;
-
-    // Number of top 4 average CN0 reports since boot
-    optional int64 top_four_average_cn0_reports = 7;
-
-    // Total pulled reported of top 4 average CN0 (dB-mHz) since boot
-    optional int64 top_four_average_cn0_db_mhz = 8;
-
-    // Number of l5 top 4 average CN0 reports since boot
-    optional int64 l5_top_four_average_cn0_reports = 9;
-
-    // Total pulled reported of l5 top 4 average CN0 (dB-mHz) since boot
-    optional int64 l5_top_four_average_cn0_db_mhz = 10;
-
-    // Total number of sv status messages reports since boot
-    optional int64 sv_status_reports = 11;
-
-    // Total number of sv status messages reports, where sv is used in fix since boot
-    optional int64 sv_status_reports_used_in_fix = 12;
-
-    // Total number of L5 sv status messages reports since boot
-    optional int64 l5_sv_status_reports = 13;
-
-    // Total number of L5 sv status messages reports, where sv is used in fix since boot
-    optional int64 l5_sv_status_reports_used_in_fix = 14;
-}
-
-/**
- * Logs when an app is moved to a different standby bucket.
- *
- * Logged from:
- *   frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/AppIdleHistory.java
- */
-message AppStandbyBucketChanged {
-    optional string package_name = 1;
-
-    // Should be 0, 10, 11, 12, etc. where 0 is the owner. See UserHandle for more documentation.
-    optional int32 user_id = 2;
-
-    // These enum values match the constants defined in UsageStatsManager.java.
-    enum Bucket {
-        BUCKET_UNKNOWN = 0;
-        BUCKET_EXEMPTED = 5;
-        BUCKET_ACTIVE = 10;
-        BUCKET_WORKING_SET = 20;
-        BUCKET_FREQUENT = 30;
-        BUCKET_RARE = 40;
-        BUCKET_RESTRICTED = 45;
-        BUCKET_NEVER = 50;
-    }
-    optional Bucket bucket = 3;
-
-    enum MainReason {
-        MAIN_UNKNOWN = 0;
-        MAIN_DEFAULT = 0x0100;
-        MAIN_TIMEOUT = 0x0200;
-        MAIN_USAGE = 0x0300;
-        MAIN_FORCED_BY_USER = 0x0400;
-        MAIN_PREDICTED = 0x0500;
-        MAIN_FORCED_BY_SYSTEM = 0x0600;
-    }
-    optional MainReason main_reason = 4;
-
-    // A more detailed reason for the standby bucket change. The sub reason name is dependent on
-    // the main reason. Values are one of the REASON_SUB_XXX constants defined in
-    // UsageStatsManager.java.
-    optional int32 sub_reason = 5;
-}
-
-/**
-* Reports a started sharesheet transaction.
-*
-* Logged from:
-*   frameworks/base/core/java/com/android/internal/app/ChooserActivity.java
-*/
-message SharesheetStarted {
-    // The event_id (as for UiEventReported).
-    optional int32 event_id = 1;
-    // The calling app's package name.
-    optional string package_name = 2;
-    // An identifier to tie together multiple logs relating to the same share event
-    optional int32 instance_id = 3;
-    // The mime type of the share
-    optional string mime_type = 4;
-    // The number of direct targets the calling app is providing that will be shown.
-    optional int32 num_app_provided_direct_targets = 5;
-    // The number of app targets the calling app is providing that will be shown.
-    optional int32 num_app_provided_app_targets = 6;
-    // True if the share originates from the workprofile
-    optional bool is_workprofile = 7;
-
-    enum SharesheetPreviewType {  // Constants from ChooserActivity.java
-        CONTENT_PREVIEW_TYPE_UNKNOWN = 0;  // Default for proto 2 / 3 compatibility.
-        CONTENT_PREVIEW_IMAGE = 1;  // The preview shown in the sharesheet is an image.
-        CONTENT_PREVIEW_FILE = 2;  // The preview shown in the sharesheet is a file.
-        CONTENT_PREVIEW_TEXT = 3;  // The preview shown in the sharesheet is text.
-    }
-    // How the sharesheet preview is presented.
-    optional SharesheetPreviewType preview_type = 8;
-
-    enum ResolverActivityIntent { // Intents handled by ResolverActivity.java
-        INTENT_DEFAULT = 0;
-        INTENT_ACTION_VIEW = 1;
-        INTENT_ACTION_EDIT = 2;
-        INTENT_ACTION_SEND = 3;
-        INTENT_ACTION_SENDTO = 4;
-        INTENT_ACTION_SEND_MULTIPLE = 5;
-        INTENT_ACTION_IMAGE_CAPTURE = 6;
-        INTENT_ACTION_MAIN = 7;
-    }
-    // The intent being processed (only SEND and SEND_MULTIPLE are system sharesheet)
-    optional ResolverActivityIntent intent_type = 9;
-}
-
-/**
- * Reports a ranking selection event.
- *
- * Logged from:
- *   frameworks/base/core/java/com/android/internal/app/ChooserActivity.java (sharesheet)
- */
-message RankingSelected {
-    // The event_id (as for UiEventReported).
-    optional int32 event_id = 1;
-    // The relevant app's package name (can be source or picked package).
-    optional string package_name = 2;
-    // An identifier to tie together multiple logs relating to the same share event.
-    optional int32 instance_id = 3;
-    // Which of the ranked targets got picked, default starting position 0.
-    optional int32 position_picked = 4;
-}
-
-/**
- * Logs when TvSettings UI is interacted at.
- *
- * Logged from: packages/apps/TvSettings
- */
-message TvSettingsUIInteracted {
-
-    /** The UI action category */
-    optional android.app.tvsettings.Action action = 1;
-
-    /** The ID of the entry that the users actioned on */
-    optional android.app.tvsettings.ItemId item_id = 2;
-}
-
-/**
- * Logs information about a package installation using package installer V2 APIs.
- *
- * Logged from:
- *      frameworks/base/services/core/java/com/android/server/pm/PackageInstallerSession.java
- */
-message PackageInstallerV2Reported {
-    // Whether this installation uses Incremental File System
-    optional bool is_incremental = 1;
-    // Name of the package that is intended to be installed
-    optional string package_name = 2;
-    // The duration between when the install was requested to when the install has completed
-    optional int64 duration_millis = 3;
-    // Installation result in final integer, which are SystemApi's.
-    // Return_code 1 indicates success.
-    // For full list, see frameworks/base/core/java/android/content/pm/PackageManager.java
-    optional int32 return_code  = 4;
-    // Total size of the APKs installed for this package
-    optional int64 apks_size_bytes = 5;
-}
-
-/**
- * Logs settings provider values.
- *
- * Use DeviceConfig.getProperties to get a list Setting key, query the data from content provider,
- * then write the value to proto.
- *
- */
-message SettingSnapshot {
-
-    // Setting key
-    optional string name = 1;
-
-    enum SettingsValueType {
-        NOTASSIGNED = 0;
-        ASSIGNED_BOOL_TYPE = 1;
-        ASSIGNED_INT_TYPE = 2;
-        ASSIGNED_FLOAT_TYPE = 3;
-        ASSIGNED_STRING_TYPE = 4;
-    };
-    // Setting value type
-    optional SettingsValueType type = 2;
-
-    optional bool bool_value = 3;
-
-    optional int32 int_value = 4;
-
-    optional float float_value = 5;
-
-    optional string str_value = 6;
-
-    // Android user index. 0 for primary user, 10, 11 for secondary or profile user
-    optional int32 user_id = 7;
-}
-
-/**
- * An event logged to indicate that a user journey is about to be performed. This atom includes
- * relevant information about the users involved in the journey. A UserLifecycleEventOccurred event
- * will immediately follow this atom which will describe the event(s) and its state.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/UserController.java
- *   frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java
- */
-message UserLifecycleJourneyReported {
-    // An identifier to track a chain of user lifecycle events occurring (referenced in the
-    // UserLifecycleEventOccurred atom)
-    optional int64 session_id = 1;
-
-    // Indicates what type of user journey this session is related to
-    enum Journey {
-        UNKNOWN = 0; // Undefined user lifecycle journey
-        USER_SWITCH_UI = 1; // A user switch journey where a UI is shown
-        USER_SWITCH_FG = 2; // A user switch journey without a UI shown
-        USER_START = 3; // A user start journey
-        USER_CREATE = 4; // A user creation journey
-    }
-    optional Journey journey = 2;
-    // Which user the journey is originating from - could be -1 for certain phases (eg USER_CREATE)
-    // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
-    optional int32 origin_user = 3;
-    // Which user the journey is targeting
-    // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
-    optional int32 target_user = 4;
-
-    // What is the user type of the target user
-    // These should be in sync with USER_TYPE_* flags defined in UserManager.java
-    enum UserType {
-        TYPE_UNKNOWN = 0;
-        FULL_SYSTEM = 1;
-        FULL_SECONDARY = 2;
-        FULL_GUEST = 3;
-        FULL_DEMO = 4;
-        FULL_RESTRICTED = 5;
-        PROFILE_MANAGED = 6;
-        SYSTEM_HEADLESS = 7;
-    }
-    optional UserType user_type = 5;
-    // What are the flags attached to the target user
-    optional int32 user_flags = 6;
-}
-
-/**
- * An event logged when a specific user lifecycle event is performed. These events should be
- * correlated with a UserLifecycleJourneyReported atom via the session_id.
- * Note: journeys can span over multiple events, hence some events may share a single session id.
- *
- * Logged from:
- *   frameworks/base/services/core/java/com/android/server/am/UserController.java
- *   frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java
- */
-message UserLifecycleEventOccurred {
-    // An id which links back to user details (reported in the UserLifecycleJourneyReported atom)
-    optional int64 session_id = 1;
-    // The target user for this event (same as target_user in the UserLifecycleJourneyReported atom)
-    // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
-    optional int32 user_id = 2;
-
-    enum Event {
-        UNKNOWN = 0; // Indicates that the associated user journey timed-out or resulted in an error
-        SWITCH_USER = 1; // Indicates that this is a user switch event
-        START_USER = 2; // Indicates that this is a user start event
-        CREATE_USER = 3; // Indicates that this is a user create event
-        USER_RUNNING_LOCKED = 4; // Indicates that user is running in locked state
-        UNLOCKING_USER = 5; // Indicates that this is a user unlocking event
-        UNLOCKED_USER = 6; // Indicates that this is a user unlocked event
-    }
-    optional Event event = 3;
-
-    enum State {
-        NONE = 0; // Indicates the associated event has no start/end defined
-        BEGIN = 1;
-        FINISH = 2;
-    }
-    optional State state = 4; // Represents the state of an event (beginning/ending)
-}
-
-/**
- * Logs when accessibility shortcut clicked.
- *
- * Logged from:
- *   frameworks/base/services/accessibility/java/com/android/server/accessibility
- */
-message AccessibilityShortcutReported {
-    // The accessibility feature(including installed a11y service, framework a11y feature,
-    // and installed a11y activity) package name that is assigned to the accessibility shortcut.
-    optional string package_name = 1;
-
-    // The definition of the accessibility shortcut.
-    // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
-    optional android.stats.accessibility.ShortcutType shortcut_type = 2;
-
-    // The definition of the service status.
-    // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
-    optional android.stats.accessibility.ServiceStatus service_status = 3;
-}
-
-/**
- * Logs when accessibility service status changed.
- *
- * Logged from:
- *   packages/apps/Settings/src/com/android/settings/accessibility
- */
-message AccessibilityServiceReported {
-    // The accessibility service package name.
-    optional string package_name = 1;
-
-    // The definition of the service status.
-    // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
-    optional android.stats.accessibility.ServiceStatus service_status = 2;
-}
-
-/**
- * Logs when display wake up.
- *
- * Logged from:
- *   services/core/java/com/android/server/power/Notifier.java
- */
-
-message DisplayWakeReported {
-    // Wake_up_reason code
-    // If LOWORD(wake_up_reason) = 0
-    //     reference to HIWORD(wake_up_reason) PowerManager.WAKE_REASON_XXX
-    //     else reference wake_up_reason to
-    //     services/core/java/com/android/server/power/Notifier.java#onWakeUp
-    optional int32 wake_up_reason = 1;
-}
-
-/**
- * Logs app usage events.
- */
-message AppUsageEventOccurred {
-    optional int32 uid = 1 [(is_uid) = true];
-    optional string package_name = 2;
-    optional string class_name = 3;
-
-    enum EventType {
-        NONE = 0;
-        MOVE_TO_FOREGROUND = 1;
-        MOVE_TO_BACKGROUND = 2;
-    }
-    optional EventType event_type = 4;
-}
-
-/*
- * Quality metrics logged when EVS cameras are active.
- *
- * Logged from:
- *  packages/services/Car/evs/manager/1.1/Enumerator.cpp
- */
-message EvsUsageStatsReported {
-
-    // Camera identifier to distinguish the source camera device.  This is not
-    // globally unique and therefore cannot be used to identify the user and/or
-    // the device.
-    optional int32 device_id = 1;
-
-    // Peak number of clients during the service
-    optional int32 peak_num_clients = 2;
-
-    // Number of erroneous events during the service
-    optional int32 num_errors = 3;
-
-    // Round trip latency of the very first frame
-    optional int64 first_latency_millis = 4;
-
-    // Average frame round trip latency
-    optional float avg_latency_millis = 5;
-
-    // Peak frame round trip latency
-    optional int64 peak_latency_millis = 6;
-
-    // Total number of frames received
-    optional int64 total_frames = 7;
-
-    // Number of frames ignored
-    optional int64 ignored_frames = 8;
-
-    // Number of dropped frames to synchronize camera devices
-    optional int64 dropped_frames_to_sync = 9;
-
-    // The duration of the service
-    optional int64 duration_millis = 10;
-}
-
-/**
- * Logs audio power usage stats.
- *
- * Pushed from:
- *  frameworks/av/services/mediametrics/AudioPowerUsage.cpp
- */
-message AudioPowerUsageDataReported {
-    /**
-     * Device used for input/output
-     *
-     * All audio devices please refer to below file:
-     * system/media/audio/include/system/audio-base.h
-     *
-     * Define our own enum values because we don't report all audio devices.
-     * Currently, we only report built-in audio devices such as handset, speaker,
-     * built-in mics, common audio devices such as wired headset, usb headset
-     * and bluetooth devices.
-     */
-    enum AudioDevice {
-        OUTPUT_EARPIECE         = 0x1; // handset
-        OUTPUT_SPEAKER          = 0x2; // dual speaker
-        OUTPUT_WIRED_HEADSET    = 0x4; // 3.5mm headset
-        OUTPUT_USB_HEADSET      = 0x8; // usb headset
-        OUTPUT_BLUETOOTH_SCO    = 0x10; // bluetooth sco
-        OUTPUT_BLUETOOTH_A2DP   = 0x20; // a2dp
-        OUTPUT_SPEAKER_SAFE     = 0x40; // bottom speaker
-
-        INPUT_DEVICE_BIT        = 0x40000000; // non-negative positive int32.
-        INPUT_BUILTIN_MIC       = 0x40000001; // buildin mic
-        INPUT_BUILTIN_BACK_MIC  = 0x40000002; // buildin back mic
-        INPUT_WIRED_HEADSET_MIC = 0x40000004; // 3.5mm headset mic
-        INPUT_USB_HEADSET_MIC   = 0x40000008; // usb headset mic
-        INPUT_BLUETOOTH_SCO     = 0x40000010; // bluetooth sco mic
-    }
-    optional AudioDevice audio_device = 1;
-
-    // Duration of the audio in seconds
-    optional int32 duration_secs = 2;
-
-    // Average volume (0 ... 1.0)
-    optional float average_volume = 3;
-
-    enum AudioType {
-        UNKNOWN_TYPE = 0;
-        VOICE_CALL_TYPE = 1; // voice call
-        VOIP_CALL_TYPE = 2; // voip call, including uplink and downlink
-        MEDIA_TYPE = 3; // music and system sound
-        RINGTONE_NOTIFICATION_TYPE = 4; // ringtone and notification
-        ALARM_TYPE = 5; // alarm type
-        // record type
-        CAMCORDER_TYPE = 6; // camcorder
-        RECORD_TYPE = 7;  // other recording
-    }
-    optional AudioType type = 4;
-}
-
-/**
-  * Pulls bytes transferred over WiFi and mobile networks sliced by uid, is_metered, and tag.
-  *
-  * Pulled from:
-  *   StatsPullAtomService, which uses NetworkStatsService to query NetworkStats.
-  */
-message BytesTransferByTagAndMetered {
-    optional int32 uid = 1 [(is_uid) = true];
-
-    optional bool is_metered = 2;
-
-    optional int32 tag = 3;
-
-    optional int64 rx_bytes = 4;
-
-    optional int64 rx_packets = 5;
-
-    optional int64 tx_bytes = 6;
-
-    optional int64 tx_packets = 7;
-}
-
-/*
- * Logs when the Media Output Switcher finishes a media switch operation.
- *
- * Logged from:
- *  packages/apps/Settings/src/com/android/settings/media/MediaOutputSliceWorker.java
- */
-message MediaOutputOpSwitchReported {
-    // Source medium type before switching.
-    optional android.app.settings.mediaoutput.MediumType source = 1;
-
-    // Target medium type after switching.
-    optional android.app.settings.mediaoutput.MediumType target = 2;
-
-    // The result of switching.
-    optional android.app.settings.mediaoutput.SwitchResult result = 3;
-
-    // The detail code of a switching result.
-    optional android.app.settings.mediaoutput.SubResult subresult = 4;
-
-    /*
-     * The package name of a pre-installed app, whose media session is being switched.
-     */
-    optional string media_session_package_name = 5;
-
-    // The amount of available wired devices when a switching is being performed.
-    optional int32 available_wired_device_count = 6;
-
-    // The amount of available Bluetooth devices a switching is being performed.
-    optional int32 available_bt_device_count = 7;
-
-    // The amount of available remote devices when a switching is being performed.
-    optional int32 available_remote_device_count = 8;
-
-    // The amount of applied devices within a remote dynamic group after a switching is done.
-    optional int32 applied_device_count_within_remote_group = 9;
-}
-
-/**
- * Logs when the Assistant is invoked.
- *
- * Logged from:
- *   frameworks/base/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
- */
-message AssistantInvocationReported {
-
-    // The event_id (as for UiEventReported).
-    optional int32 event_id = 1;
-
-    // The registered Assistant's uid and package (as for UiEventReported).
-    optional int32 uid = 2 [(is_uid) = true];
-    optional string package_name = 3;
-
-    // An identifier used to disambiguate which logs refer to a particular invocation of the
-    // Assistant  (as for UiEventReported).
-    optional int32 instance_id = 4;
-
-    // The state of the device at the time of invocation.
-    enum DeviceState {
-        UNKNOWN_DEVICE_STATE = 0;
-        AOD1 = 1;
-        AOD2 = 2;
-        BOUNCER = 3;
-        UNLOCKED_LOCKSCREEN = 4;
-        LAUNCHER_HOME = 5;
-        LAUNCHER_OVERVIEW = 6;
-        LAUNCHER_ALL_APPS = 7;
-        APP_DEFAULT = 8;
-        APP_IMMERSIVE = 9;
-        APP_FULLSCREEN = 10;
-    }
-    optional DeviceState device_state = 5;
-
-    // Whether the Assistant handles were showing at the time of invocation.
-    optional bool assistant_handles_showing = 6;
-}
-
-/**
- * Logs when an AudioRecord finishes running on an audio device
- *
- * Logged from:
- *   frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioRecordDeviceUsageReported {
-    // The devices connected to this AudioRecord.
-    // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
-    // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
-    // See audio_device_t in system/media/audio/include/system/audio-base.h
-    optional string devices = 1;
-
-    // The name of the remote device attached to the device, typically available for USB or BT.
-    // This may be empty for a fixed device, or separated by "|" if more than one.
-    optional string device_names = 2;
-
-    // The amount of time spent in the device as measured by the active track in AudioFlinger.
-    optional int64 device_time_nanos = 3;
-
-    // The audio data format used for encoding.
-    // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
-    optional string encoding = 4;
-
-    // The client-server buffer framecount.
-    // The framecount is generally between 960 - 48000 for PCM encoding.
-    // The framecount represents raw buffer size in bytes for non-PCM encoding.
-    optional int32 frame_count = 5;
-
-    // The number of audio intervals (contiguous, continuous playbacks).
-    optional int32 interval_count = 6;
-
-    // The sample rate of the AudioRecord.
-    // A number generally between 8000-96000 (frames per second).
-    optional int32 sample_rate = 7;
-
-    // The audio input flags used to construct the AudioRecord.
-    // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t
-    optional string flags = 8;
-
-    // The santized package name of the audio client associated with the AudioRecord.
-    // See getSanitizedPackageNameAndVersionCode() in
-    // frameworks/av/services/mediametrics/MediaMetricsService.cpp
-    optional string package_name = 9;
-
-    // The selected device id (nonzero if a non-default device is selected)
-    optional int32 selected_device_id = 10;
-
-    // The caller of the AudioRecord.
-    // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp
-    optional string caller = 11;
-
-    // The audio source for AudioRecord.
-    // An enumeration from system/media/audio/include/system/audio-base.h audio_source_t
-    optional string source = 12;
-}
-
-/**
- * Logs when an AudioThread finishes running on an audio device
- *
- * Logged from:
- *   frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioThreadDeviceUsageReported {
-    // The devices connected to this audio thread.
-    // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
-    // (for record threads):
-    // See lookup<INPUT_DEVICE> in frameworks/av/services/mediametrics/AudioTypes.cpp
-    // (for playback threads):
-    // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
-    // See audio_device_t in system/media/audio/include/system/audio-base.h
-    optional string devices = 1;
-
-    // The name of the remote device attached to the device, typically available for USB or BT.
-    // This may be empty for a fixed device, or separated by "|" if more than one.
-    optional string device_names = 2;
-
-    // The amount of time spent in the device as measured by the active track in AudioFlinger.
-    optional int64 device_time_nanos = 3;
-
-    // The audio data format used for encoding.
-    // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
-    optional string encoding = 4;
-
-    // The framecount of the buffer delivered to (or from) the HAL.
-    // The framecount is generally ~960 for PCM encoding.
-    // The framecount represents raw buffer size in bytes for non-PCM encoding.
-    optional int32 frame_count = 5;
-
-    // The number of audio intervals (contiguous, continuous playbacks).
-    optional int32 interval_count = 6;
-
-    // The sample rate of the audio thread.
-    // A number generally between 8000-96000 (frames per second).
-    optional int32 sample_rate = 7;
-
-    // The audio flags used to construct the thread
-    // (for record threads):
-    // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t
-    // (for playback threads):
-    // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t
-    optional string flags = 8;
-
-    // The number of underruns encountered for a playback thread or the
-    // number of overruns encountered for a capture thread.
-    optional int32 xruns = 9;
-
-    // The type of thread
-    // A thread type enumeration from
-    // frameworks/av/mediametrics/services/Translate.h
-    optional string type = 10;
-}
-
-/**
- * Logs when an AudioTrack finishes running on an audio device
- *
- * Logged from:
- *   frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioTrackDeviceUsageReported {
-    // The output devices connected to this AudioTrack.
-    // A string OR of various output device categories, e.g. "DEVICE1|DEVICE2".
-    // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
-    // See audio_device_t in system/media/audio/include/system/audio-base.h
-    optional string devices = 1;
-
-    // The name of the remote device attached to the device, typically available for USB or BT.
-    // This may be empty for a fixed device, or separated by "|" if more than one.
-    optional string device_names = 2;
-
-    // The amount of time spent in the device as measured by the active track in AudioFlinger.
-    optional int64 device_time_nanos = 3;
-
-    // The audio data format used for encoding.
-    // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
-    optional string encoding = 4;
-
-    // The client-server buffer framecount.
-    // The framecount is generally between 960 - 48000 for PCM encoding.
-    // The framecount represents raw buffer size in bytes for non-PCM encoding.
-    // A static track (see traits) may have a very large framecount.
-    optional int32 frame_count = 5;
-
-    // The number of audio intervals (contiguous, continuous playbacks).
-    optional int32 interval_count = 6;
-
-    // The sample rate of the AudioTrack.
-    // A number generally between 8000-96000 (frames per second).
-    optional int32 sample_rate = 7;
-
-    // The audio flags used to construct the AudioTrack.
-    // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t
-    optional string flags = 8;
-
-    // The number of underruns encountered.
-    optional int32 xruns = 9;
-
-    // The santized package name of the audio client associated with the AudioTrack.
-    // See getSanitizedPackageNameAndVersionCode() in
-    // frameworks/av/services/mediametrics/MediaMetricsService.cpp
-    optional string package_name = 10;
-
-    // The latency of the last sample in the buffer in milliseconds.
-    optional float device_latency_millis = 11;
-
-    // The startup time in milliseconds from start() to sample played.
-    optional float device_startup_millis = 12;
-
-    // The average volume of the track on the device [ 0.f - 1.f ]
-    optional float device_volume = 13;
-
-    // The selected device id (nonzero if a non-default device is selected)
-    optional int32 selected_device_id = 14;
-
-    // The stream_type category for the AudioTrack.
-    // An enumeration from system/media/audio/include/system/audio-base.h audio_stream_type_t
-    optional string stream_type = 15;
-
-    // The usage for the AudioTrack.
-    // An enumeration from system/media/audio/include/system/audio-base.h audio_usage_t
-    optional string usage = 16;
-
-    // The content type of the AudioTrack.
-    // An enumeration from system/media/audio/include/system/audio-base.h audio_content_type_t
-    optional string content_type = 17;
-
-    // The caller of the AudioTrack.
-    // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp
-    optional string caller = 18;
-
-    // The traits of the AudioTrack.
-    // A string OR of different traits, may be empty string.
-    // Only "static" is supported for R.
-    // See lookup<TRACK_TRAITS>() in frameworks/av/services/mediametrics/AudioTypes.cpp
-    optional string traits = 19;
-}
-
-/**
- * Logs the status of an audio device connection attempt.
- *
- * Logged from:
- *   frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioDeviceConnectionReported {
-    // The input devices represented by this report.
-    // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
-    // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
-    // See audio_device_t in system/media/audio/include/system/audio-base.h
-    optional string input_devices = 1;
-
-    // The output devices represented by this report.
-    // A string OR of various output device categories.
-    // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
-    // See audio_device_t in system/media/audio/include/system/audio-base.h
-    optional string output_devices = 2;
-
-    // The name of the remote device attached to the device, typically available for USB or BT.
-    // This may be empty for a fixed device, or separated by "|" if more than one.
-    optional string device_names = 3;
-
-    // The result of the audio device connection.
-    // 0 indicates success: connection verified.
-    // 1 indicates unknown: connection not verified or not known if diverted properly.
-    // Other values indicate specific status.
-    // See DeviceConnectionResult in frameworks/av/services/mediametrics/AudioTypes.h
-    optional int32 result = 4;
-
-    // Average milliseconds of time to connect
-    optional float time_to_connect_millis = 5;
-
-    // Number of connections if aggregated statistics, otherwise 1.
-    optional int32 connection_count = 6;
-}
-
-/**
- * Logs: i) creation of different types of cryptographic keys in the keystore,
- * ii) operations performed using the keys,
- * iii) attestation of the keys
- * Logged from: system/security/keystore/key_event_log_handler.cpp
- */
-message KeystoreKeyEventReported {
-
-    enum Algorithm {
-        /** Asymmetric algorithms. */
-        RSA = 1;
-        // 2 removed, do not reuse.
-        EC = 3;
-        /** Block cipher algorithms */
-        AES = 32;
-        TRIPLE_DES = 33;
-        /** MAC algorithms */
-        HMAC = 128;
-    };
-    /** Algorithm associated with the key */
-    optional Algorithm algorithm = 1;
-
-    /** Size of the key */
-    optional int32 key_size = 2;
-
-    enum KeyOrigin {
-        /** Generated in keymaster.  Should not exist outside the TEE. */
-        GENERATED = 0;
-        /** Derived inside keymaster.  Likely exists off-device. */
-        DERIVED = 1;
-        /** Imported into keymaster.  Existed as cleartext in Android. */
-        IMPORTED = 2;
-        /** Keymaster did not record origin. */
-        UNKNOWN = 3;
-        /** Securely imported into Keymaster. */
-        SECURELY_IMPORTED = 4;
-    };
-    /* Logs whether the key was generated, imported, securely imported, or derived.*/
-    optional KeyOrigin key_origin = 3;
-
-    enum HardwareAuthenticatorType {
-        NONE = 0;
-        PASSWORD = 1;
-        FINGERPRINT = 2;
-        // Additional entries must be powers of 2.
-    };
-    /**
-     * What auth types does this key require? If none,
-     * then no auth required.
-     */
-    optional HardwareAuthenticatorType user_auth_type = 4;
-
-    /**
-     * If user authentication is required, is the requirement time based? If it
-     * is not time based then this field will not be used and the key is per
-     * operation. Per operation keys must be user authenticated on each usage.
-     */
-    optional int32 user_auth_key_timeout_secs = 5;
-
-    /**
-     * padding mode, digest, block_mode and purpose should ideally be repeated
-     * fields. However, since statsd does not support repeated fields in
-     * pushed atoms, they are represented using bitmaps.
-     */
-
-    /** Track which padding mode is being used.*/
-    optional int32 padding_mode_bitmap = 6;
-
-    /** Track which digest is being used. */
-    optional int32 digest_bitmap = 7;
-
-    /** Track what block mode is being used (for encryption). */
-    optional int32 block_mode_bitmap = 8;
-
-    /** Track what purpose is this key serving. */
-    optional int32 purpose_bitmap = 9;
-
-    enum EcCurve {
-        P_224 = 0;
-        P_256 = 1;
-        P_384 = 2;
-        P_521 = 3;
-    };
-    /** Which ec curve was selected if elliptic curve cryptography is in use **/
-    optional EcCurve ec_curve = 10;
-
-    enum KeyBlobUsageRequirements {
-        STANDALONE = 0;
-        REQUIRES_FILE_SYSTEM = 1;
-    };
-    /** Standalone or is a file system required */
-    optional KeyBlobUsageRequirements key_blob_usage_reqs = 11;
-
-    enum Type {
-        key_operation = 0;
-        key_creation = 1;
-        key_attestation = 2;
-    }
-    /** Key creation event, operation event or attestation event? */
-    optional Type type = 12;
-
-    /** Was the key creation, operation, or attestation successful? */
-    optional bool was_successful = 13;
-
-    /** Response code or error code */
-    optional int32 error_code = 14;
-}
-
-// Blob Committer stats
-// Keep in sync between:
-//     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
-//     frameworks/base/cmds/statsd/src/atoms.proto
-message BlobCommitterProto {
-    // Committer app's uid
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Unix epoch timestamp of the commit in milliseconds
-    optional int64 commit_timestamp_millis = 2;
-
-    // Flags of what access types the committer has set for the Blob
-    optional int32 access_mode = 3;
-
-    // Number of packages that have been whitelisted for ACCESS_TYPE_WHITELIST
-    optional int32 num_whitelisted_package = 4;
-}
-
-// Blob Leasee stats
-// Keep in sync between:
-//     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
-//     frameworks/base/cmds/statsd/src/atoms.proto
-message BlobLeaseeProto {
-    // Leasee app's uid
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // Unix epoch timestamp for lease expiration in milliseconds
-    optional int64 lease_expiry_timestamp_millis = 2;
-}
-
-// List of Blob Committers
-// Keep in sync between:
-//     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
-//     frameworks/base/cmds/statsd/src/atoms.proto
-message BlobCommitterListProto {
-    repeated BlobCommitterProto committer = 1;
-}
-
-// List of Blob Leasees
-// Keep in sync between:
-//     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
-//     frameworks/base/cmds/statsd/src/atoms.proto
-message BlobLeaseeListProto {
-    repeated BlobLeaseeProto leasee = 1;
-}
-
-/**
- * Logs the current state of a Blob committed with BlobStoreManager
- *
- * Pulled from:
- *  frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
- */
-message BlobInfo {
-    // Id of the Blob
-    optional int64 blob_id = 1;
-
-    // Size of the Blob data
-    optional int64 size = 2;
-
-    // Unix epoch timestamp of the Blob's expiration in milliseconds
-    optional int64 expiry_timestamp_millis = 3;
-
-    // List of committers of this Blob
-    optional BlobCommitterListProto committers = 4;
-
-    // List of leasees of this Blob
-    optional BlobLeaseeListProto leasees = 5;
-}
-
-/**
-  * Pushes TLS handshake counters from Conscrypt.
-  * Pulled from:
-  *   external/conscrypt/common/src/main/java/org/conscrypt/ConscryptEngineSocket.java
-  *   external/conscrypt/common/src/main/java/org/conscrypt/ConscryptFileDescriptorSocket.java
-  */
-  message TlsHandshakeReported {
-    optional bool success = 1;
-
-    optional android.stats.tls.Protocol protocol = 2;
-
-    optional android.stats.tls.CipherSuite cipher_suite = 3;
-
-    optional int32 handshake_duration_millis = 4;
-}
diff --git a/cmds/statsd/src/condition/CombinationConditionTracker.cpp b/cmds/statsd/src/condition/CombinationConditionTracker.cpp
deleted file mode 100644
index e9875ba..0000000
--- a/cmds/statsd/src/condition/CombinationConditionTracker.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-#include "CombinationConditionTracker.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::unordered_map;
-using std::vector;
-
-CombinationConditionTracker::CombinationConditionTracker(const int64_t& id, const int index)
-    : ConditionTracker(id, index) {
-    VLOG("creating CombinationConditionTracker %lld", (long long)mConditionId);
-}
-
-CombinationConditionTracker::~CombinationConditionTracker() {
-    VLOG("~CombinationConditionTracker() %lld", (long long)mConditionId);
-}
-
-bool CombinationConditionTracker::init(const vector<Predicate>& allConditionConfig,
-                                       const vector<sp<ConditionTracker>>& allConditionTrackers,
-                                       const unordered_map<int64_t, int>& conditionIdIndexMap,
-                                       vector<bool>& stack,
-                                       vector<ConditionState>& initialConditionCache) {
-    VLOG("Combination predicate init() %lld", (long long)mConditionId);
-    if (mInitialized) {
-        return true;
-    }
-
-    // mark this node as visited in the recursion stack.
-    stack[mIndex] = true;
-
-    Predicate_Combination combinationCondition = allConditionConfig[mIndex].combination();
-
-    if (!combinationCondition.has_operation()) {
-        return false;
-    }
-    mLogicalOperation = combinationCondition.operation();
-
-    if (mLogicalOperation == LogicalOperation::NOT && combinationCondition.predicate_size() != 1) {
-        return false;
-    }
-
-    for (auto child : combinationCondition.predicate()) {
-        auto it = conditionIdIndexMap.find(child);
-
-        if (it == conditionIdIndexMap.end()) {
-            ALOGW("Predicate %lld not found in the config", (long long)child);
-            return false;
-        }
-
-        int childIndex = it->second;
-        const auto& childTracker = allConditionTrackers[childIndex];
-        // if the child is a visited node in the recursion -> circle detected.
-        if (stack[childIndex]) {
-            ALOGW("Circle detected!!!");
-            return false;
-        }
-
-        bool initChildSucceeded =
-                childTracker->init(allConditionConfig, allConditionTrackers, conditionIdIndexMap,
-                                   stack, initialConditionCache);
-
-        if (!initChildSucceeded) {
-            ALOGW("Child initialization failed %lld ", (long long)child);
-            return false;
-        } else {
-            VLOG("Child initialization success %lld ", (long long)child);
-        }
-
-        if (allConditionTrackers[childIndex]->isSliced()) {
-            setSliced(true);
-            mSlicedChildren.push_back(childIndex);
-        } else {
-            mUnSlicedChildren.push_back(childIndex);
-        }
-        mChildren.push_back(childIndex);
-        mTrackerIndex.insert(childTracker->getLogTrackerIndex().begin(),
-                             childTracker->getLogTrackerIndex().end());
-    }
-
-    mUnSlicedPartCondition = evaluateCombinationCondition(mUnSlicedChildren, mLogicalOperation,
-                                                          initialConditionCache);
-    initialConditionCache[mIndex] =
-            evaluateCombinationCondition(mChildren, mLogicalOperation, initialConditionCache);
-
-    // unmark this node in the recursion stack.
-    stack[mIndex] = false;
-
-    mInitialized = true;
-
-    return true;
-}
-
-void CombinationConditionTracker::isConditionMet(
-        const ConditionKey& conditionParameters, const vector<sp<ConditionTracker>>& allConditions,
-        const bool isPartialLink,
-        vector<ConditionState>& conditionCache) const {
-    // So far, this is fine as there is at most one child having sliced output.
-    for (const int childIndex : mChildren) {
-        if (conditionCache[childIndex] == ConditionState::kNotEvaluated) {
-            allConditions[childIndex]->isConditionMet(conditionParameters, allConditions,
-                                                      isPartialLink,
-                                                      conditionCache);
-        }
-    }
-    conditionCache[mIndex] =
-            evaluateCombinationCondition(mChildren, mLogicalOperation, conditionCache);
-}
-
-void CombinationConditionTracker::evaluateCondition(
-        const LogEvent& event, const std::vector<MatchingState>& eventMatcherValues,
-        const std::vector<sp<ConditionTracker>>& mAllConditions,
-        std::vector<ConditionState>& nonSlicedConditionCache,
-        std::vector<bool>& conditionChangedCache) {
-    // value is up to date.
-    if (nonSlicedConditionCache[mIndex] != ConditionState::kNotEvaluated) {
-        return;
-    }
-
-    for (const int childIndex : mChildren) {
-        // So far, this is fine as there is at most one child having sliced output.
-        if (nonSlicedConditionCache[childIndex] == ConditionState::kNotEvaluated) {
-            const sp<ConditionTracker>& child = mAllConditions[childIndex];
-            child->evaluateCondition(event, eventMatcherValues, mAllConditions,
-                                     nonSlicedConditionCache, conditionChangedCache);
-        }
-    }
-
-    ConditionState newCondition =
-            evaluateCombinationCondition(mChildren, mLogicalOperation, nonSlicedConditionCache);
-    if (!mSliced) {
-        bool nonSlicedChanged = (mUnSlicedPartCondition != newCondition);
-        mUnSlicedPartCondition = newCondition;
-
-        nonSlicedConditionCache[mIndex] = mUnSlicedPartCondition;
-        conditionChangedCache[mIndex] = nonSlicedChanged;
-    } else {
-        mUnSlicedPartCondition = evaluateCombinationCondition(mUnSlicedChildren, mLogicalOperation,
-                                                              nonSlicedConditionCache);
-
-        for (const int childIndex : mChildren) {
-            // If any of the sliced condition in children condition changes, the combination
-            // condition may be changed too.
-            if (conditionChangedCache[childIndex]) {
-                conditionChangedCache[mIndex] = true;
-                break;
-            }
-        }
-        nonSlicedConditionCache[mIndex] = newCondition;
-        VLOG("CombinationPredicate %lld sliced may changed? %d", (long long)mConditionId,
-            conditionChangedCache[mIndex] == true);
-    }
-}
-
-bool CombinationConditionTracker::equalOutputDimensions(
-        const std::vector<sp<ConditionTracker>>& allConditions,
-        const vector<Matcher>& dimensions) const {
-    if (mSlicedChildren.size() != 1 ||
-        mSlicedChildren.front() >= (int)allConditions.size() ||
-        mLogicalOperation != LogicalOperation::AND) {
-        return false;
-    }
-    const sp<ConditionTracker>& slicedChild = allConditions.at(mSlicedChildren.front());
-    return slicedChild->equalOutputDimensions(allConditions, dimensions);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/condition/CombinationConditionTracker.h b/cmds/statsd/src/condition/CombinationConditionTracker.h
deleted file mode 100644
index 39ff0ab..0000000
--- a/cmds/statsd/src/condition/CombinationConditionTracker.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COMBINATION_CONDITION_TRACKER_H
-#define COMBINATION_CONDITION_TRACKER_H
-
-#include "ConditionTracker.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class CombinationConditionTracker : public virtual ConditionTracker {
-public:
-    CombinationConditionTracker(const int64_t& id, const int index);
-
-    ~CombinationConditionTracker();
-
-    bool init(const std::vector<Predicate>& allConditionConfig,
-              const std::vector<sp<ConditionTracker>>& allConditionTrackers,
-              const std::unordered_map<int64_t, int>& conditionIdIndexMap, std::vector<bool>& stack,
-              std::vector<ConditionState>& initialConditionCache) override;
-
-    void evaluateCondition(const LogEvent& event,
-                           const std::vector<MatchingState>& eventMatcherValues,
-                           const std::vector<sp<ConditionTracker>>& mAllConditions,
-                           std::vector<ConditionState>& conditionCache,
-                           std::vector<bool>& changedCache) override;
-
-    void isConditionMet(const ConditionKey& conditionParameters,
-                        const std::vector<sp<ConditionTracker>>& allConditions,
-                        const bool isPartialLink,
-                        std::vector<ConditionState>& conditionCache) const override;
-
-    // Only one child predicate can have dimension.
-    const std::set<HashableDimensionKey>* getChangedToTrueDimensions(
-            const std::vector<sp<ConditionTracker>>& allConditions) const override {
-        for (const auto& child : mChildren) {
-            auto result = allConditions[child]->getChangedToTrueDimensions(allConditions);
-            if (result != nullptr) {
-                return result;
-            }
-        }
-        return nullptr;
-    }
-
-    // Only one child predicate can have dimension.
-    const std::set<HashableDimensionKey>* getChangedToFalseDimensions(
-            const std::vector<sp<ConditionTracker>>& allConditions) const override {
-        for (const auto& child : mChildren) {
-            auto result = allConditions[child]->getChangedToFalseDimensions(allConditions);
-            if (result != nullptr) {
-                return result;
-            }
-        }
-        return nullptr;
-    }
-
-    bool IsSimpleCondition() const  override { return false; }
-
-    bool IsChangedDimensionTrackable() const  override {
-        return mLogicalOperation == LogicalOperation::AND && mSlicedChildren.size() == 1;
-    }
-
-    bool equalOutputDimensions(
-        const std::vector<sp<ConditionTracker>>& allConditions,
-        const vector<Matcher>& dimensions) const override;
-
-    void getTrueSlicedDimensions(
-            const std::vector<sp<ConditionTracker>>& allConditions,
-            std::set<HashableDimensionKey>* dimensions) const override {
-        if (mSlicedChildren.size() == 1) {
-            return allConditions[mSlicedChildren.front()]->getTrueSlicedDimensions(
-                allConditions, dimensions);
-        }
-    }
-
-
-private:
-    LogicalOperation mLogicalOperation;
-
-    // Store index of the children Predicates.
-    // We don't store string name of the Children, because we want to get rid of the hash map to
-    // map the name to object. We don't want to store smart pointers to children, because it
-    // increases the risk of circular dependency and memory leak.
-    std::vector<int> mChildren;
-
-    std::vector<int> mSlicedChildren;
-    std::vector<int> mUnSlicedChildren;
-
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // COMBINATION_CONDITION_TRACKER_H
diff --git a/cmds/statsd/src/condition/ConditionTimer.h b/cmds/statsd/src/condition/ConditionTimer.h
deleted file mode 100644
index 442bc11..0000000
--- a/cmds/statsd/src/condition/ConditionTimer.h
+++ /dev/null
@@ -1,83 +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.
- */
-#pragma once
-
-#include <gtest/gtest_prod.h>
-#include <stdint.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * A simple stopwatch to time the duration of condition being true.
- *
- * The owner of the stopwatch (MetricProducer) is responsible to notify the stopwatch when condition
- * changes (start/pause), and when to start a new bucket (a new lap basically). All timestamps
- * should be elapsedRealTime in nano seconds.
- *
- * Keep the timer simple and inline everything. This class is *NOT* thread safe. Caller is
- * responsible for thread safety.
- */
-class ConditionTimer {
-public:
-    explicit ConditionTimer(bool initCondition, int64_t bucketStartNs) : mCondition(initCondition) {
-        if (initCondition) {
-            mLastConditionTrueTimestampNs = bucketStartNs;
-        }
-    };
-
-    // Tracks how long the condition has been stayed true in the *current* bucket.
-    // When a new bucket is created, this value will be reset to 0.
-    int64_t mTimerNs = 0;
-
-    // Last elapsed real timestamp when condition turned to true
-    // When a new bucket is created and the condition is true, then the timestamp is set
-    // to be the bucket start timestamp.
-    int64_t mLastConditionTrueTimestampNs = 0;
-
-    bool mCondition = false;
-
-    int64_t newBucketStart(int64_t nextBucketStartNs) {
-        if (mCondition) {
-            mTimerNs += (nextBucketStartNs - mLastConditionTrueTimestampNs);
-            mLastConditionTrueTimestampNs = nextBucketStartNs;
-        }
-
-        int64_t temp = mTimerNs;
-        mTimerNs = 0;
-        return temp;
-    }
-
-    void onConditionChanged(bool newCondition, int64_t timestampNs) {
-        if (newCondition == mCondition) {
-            return;
-        }
-        mCondition = newCondition;
-        if (newCondition) {
-            mLastConditionTrueTimestampNs = timestampNs;
-        } else {
-            mTimerNs += (timestampNs - mLastConditionTrueTimestampNs);
-        }
-    }
-
-    FRIEND_TEST(ConditionTimerTest, TestTimer_Inital_False);
-    FRIEND_TEST(ConditionTimerTest, TestTimer_Inital_True);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
\ No newline at end of file
diff --git a/cmds/statsd/src/condition/ConditionTracker.h b/cmds/statsd/src/condition/ConditionTracker.h
deleted file mode 100644
index 62736c8..0000000
--- a/cmds/statsd/src/condition/ConditionTracker.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "condition/condition_util.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "matchers/LogMatchingTracker.h"
-#include "matchers/matcher_util.h"
-
-#include <utils/RefBase.h>
-
-#include <unordered_map>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class ConditionTracker : public virtual RefBase {
-public:
-    ConditionTracker(const int64_t& id, const int index)
-        : mConditionId(id),
-          mIndex(index),
-          mInitialized(false),
-          mTrackerIndex(),
-          mUnSlicedPartCondition(ConditionState::kUnknown),
-          mSliced(false){};
-
-    virtual ~ConditionTracker(){};
-
-    inline const int64_t& getId() { return mConditionId; }
-
-    // Initialize this ConditionTracker. This initialization is done recursively (DFS). It can also
-    // be done in the constructor, but we do it separately because (1) easy to return a bool to
-    // indicate whether the initialization is successful. (2) makes unit test easier.
-    // allConditionConfig: the list of all Predicate config from statsd_config.
-    // allConditionTrackers: the list of all ConditionTrackers (this is needed because we may also
-    //                       need to call init() on children conditions)
-    // conditionIdIndexMap: the mapping from condition id to its index.
-    // stack: a bit map to keep track which nodes have been visited on the stack in the recursion.
-    // initialConditionCache: tracks initial conditions of all ConditionTrackers.
-    virtual bool init(const std::vector<Predicate>& allConditionConfig,
-                      const std::vector<sp<ConditionTracker>>& allConditionTrackers,
-                      const std::unordered_map<int64_t, int>& conditionIdIndexMap,
-                      std::vector<bool>& stack,
-                      std::vector<ConditionState>& initialConditionCache) = 0;
-
-    // evaluate current condition given the new event.
-    // event: the new log event
-    // eventMatcherValues: the results of the LogMatcherTrackers. LogMatcherTrackers always process
-    //                     event before ConditionTrackers, because ConditionTracker depends on
-    //                     LogMatchingTrackers.
-    // mAllConditions: the list of all ConditionTracker
-    // conditionCache: the cached non-sliced condition of the ConditionTrackers for this new event.
-    // conditionChanged: the bit map to record whether the condition has changed.
-    //                   If the condition has dimension, then any sub condition changes will report
-    //                   conditionChanged.
-    virtual void evaluateCondition(const LogEvent& event,
-                                   const std::vector<MatchingState>& eventMatcherValues,
-                                   const std::vector<sp<ConditionTracker>>& mAllConditions,
-                                   std::vector<ConditionState>& conditionCache,
-                                   std::vector<bool>& conditionChanged) = 0;
-
-    // Query the condition with parameters.
-    // [conditionParameters]: a map from condition name to the HashableDimensionKey to query the
-    //                       condition.
-    // [allConditions]: all condition trackers. This is needed because the condition evaluation is
-    //                  done recursively
-    // [isPartialLink]: true if the link specified by 'conditionParameters' contains all the fields
-    //                  in the condition tracker output dimension.
-    // [conditionCache]: the cache holding the condition evaluation values.
-    virtual void isConditionMet(
-            const ConditionKey& conditionParameters,
-            const std::vector<sp<ConditionTracker>>& allConditions,
-            const bool isPartialLink,
-            std::vector<ConditionState>& conditionCache) const = 0;
-
-    // return the list of LogMatchingTracker index that this ConditionTracker uses.
-    virtual const std::set<int>& getLogTrackerIndex() const {
-        return mTrackerIndex;
-    }
-
-    virtual void setSliced(bool sliced) {
-        mSliced = mSliced | sliced;
-    }
-
-    inline bool isSliced() const {
-        return mSliced;
-    }
-
-    virtual const std::set<HashableDimensionKey>* getChangedToTrueDimensions(
-            const std::vector<sp<ConditionTracker>>& allConditions) const = 0;
-    virtual const std::set<HashableDimensionKey>* getChangedToFalseDimensions(
-            const std::vector<sp<ConditionTracker>>& allConditions) const = 0;
-
-    inline int64_t getConditionId() const {
-        return mConditionId;
-    }
-
-    virtual void getTrueSlicedDimensions(
-        const std::vector<sp<ConditionTracker>>& allConditions,
-        std::set<HashableDimensionKey>* dimensions) const = 0;
-
-    virtual bool IsChangedDimensionTrackable() const = 0;
-
-    virtual bool IsSimpleCondition() const = 0;
-
-    virtual bool equalOutputDimensions(
-        const std::vector<sp<ConditionTracker>>& allConditions,
-        const vector<Matcher>& dimensions) const = 0;
-
-    // Return the current condition state of the unsliced part of the condition.
-    inline ConditionState getUnSlicedPartConditionState() const  {
-        return mUnSlicedPartCondition;
-    }
-
-protected:
-    const int64_t mConditionId;
-
-    // the index of this condition in the manager's condition list.
-    const int mIndex;
-
-    // if it's properly initialized.
-    bool mInitialized;
-
-    // the list of LogMatchingTracker index that this ConditionTracker uses.
-    std::set<int> mTrackerIndex;
-
-    // This variable is only used for CombinationConditionTrackers.
-    // SimpleConditionTrackers technically don't have an unsliced part because
-    // they are either sliced or unsliced.
-    //
-    // CombinationConditionTrackers have multiple children ConditionTrackers
-    // that can be a mixture of sliced or unsliced. This tracks the
-    // condition of the unsliced part of the combination condition.
-    ConditionState mUnSlicedPartCondition;
-
-    bool mSliced;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/condition/ConditionWizard.cpp b/cmds/statsd/src/condition/ConditionWizard.cpp
deleted file mode 100644
index c542032..0000000
--- a/cmds/statsd/src/condition/ConditionWizard.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ConditionWizard.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::vector;
-
-ConditionState ConditionWizard::query(const int index, const ConditionKey& parameters,
-                                      const bool isPartialLink) {
-    vector<ConditionState> cache(mAllConditions.size(), ConditionState::kNotEvaluated);
-
-    mAllConditions[index]->isConditionMet(
-        parameters, mAllConditions, isPartialLink,
-        cache);
-    return cache[index];
-}
-
-const set<HashableDimensionKey>* ConditionWizard::getChangedToTrueDimensions(
-        const int index) const {
-    return mAllConditions[index]->getChangedToTrueDimensions(mAllConditions);
-}
-
-const set<HashableDimensionKey>* ConditionWizard::getChangedToFalseDimensions(
-        const int index) const {
-    return mAllConditions[index]->getChangedToFalseDimensions(mAllConditions);
-}
-
-bool ConditionWizard::IsChangedDimensionTrackable(const int index) {
-    if (index >= 0 && index < (int)mAllConditions.size()) {
-        return mAllConditions[index]->IsChangedDimensionTrackable();
-    } else {
-        return false;
-    }
-}
-
-bool ConditionWizard::IsSimpleCondition(const int index) {
-    if (index >= 0 && index < (int)mAllConditions.size()) {
-        return mAllConditions[index]->IsSimpleCondition();
-    } else {
-        return false;
-    }
-}
-
-bool ConditionWizard::equalOutputDimensions(const int index, const vector<Matcher>& dimensions) {
-    if (index >= 0 && index < (int)mAllConditions.size()) {
-        return mAllConditions[index]->equalOutputDimensions(mAllConditions, dimensions);
-    } else {
-        return false;
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/condition/ConditionWizard.h b/cmds/statsd/src/condition/ConditionWizard.h
deleted file mode 100644
index 8926479..0000000
--- a/cmds/statsd/src/condition/ConditionWizard.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef CONDITION_WIZARD_H
-#define CONDITION_WIZARD_H
-
-#include "ConditionTracker.h"
-#include "condition_util.h"
-#include "stats_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Held by MetricProducer, to query a condition state with input defined in MetricConditionLink.
-class ConditionWizard : public virtual android::RefBase {
-public:
-    ConditionWizard(){};  // for testing
-    explicit ConditionWizard(std::vector<sp<ConditionTracker>>& conditionTrackers)
-        : mAllConditions(conditionTrackers){};
-
-    virtual ~ConditionWizard(){};
-
-    // Query condition state, for a ConditionTracker at [conditionIndex], with [conditionParameters]
-    // [conditionParameters] mapping from condition name to the HashableDimensionKey to query the
-    //                       condition.
-    // The ConditionTracker at [conditionIndex] can be a CombinationConditionTracker. In this case,
-    // the conditionParameters contains the parameters for it's children SimpleConditionTrackers.
-    virtual ConditionState query(const int conditionIndex, const ConditionKey& conditionParameters,
-                                 const bool isPartialLink);
-
-    virtual const std::set<HashableDimensionKey>* getChangedToTrueDimensions(const int index) const;
-    virtual const std::set<HashableDimensionKey>* getChangedToFalseDimensions(
-            const int index) const;
-    bool equalOutputDimensions(const int index, const vector<Matcher>& dimensions);
-
-    bool IsChangedDimensionTrackable(const int index);
-    bool IsSimpleCondition(const int index);
-
-    ConditionState getUnSlicedPartConditionState(const int index) {
-        return mAllConditions[index]->getUnSlicedPartConditionState();
-    }
-    void getTrueSlicedDimensions(const int index,
-        std::set<HashableDimensionKey>* trueDimensions) const {
-        return mAllConditions[index]->getTrueSlicedDimensions(mAllConditions, trueDimensions);
-    }
-
-private:
-    std::vector<sp<ConditionTracker>> mAllConditions;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#endif  // CONDITION_WIZARD_H
diff --git a/cmds/statsd/src/condition/SimpleConditionTracker.cpp b/cmds/statsd/src/condition/SimpleConditionTracker.cpp
deleted file mode 100644
index efb4d49..0000000
--- a/cmds/statsd/src/condition/SimpleConditionTracker.cpp
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "SimpleConditionTracker.h"
-#include "guardrail/StatsdStats.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::unordered_map;
-
-SimpleConditionTracker::SimpleConditionTracker(
-        const ConfigKey& key, const int64_t& id, const int index,
-        const SimplePredicate& simplePredicate,
-        const unordered_map<int64_t, int>& trackerNameIndexMap)
-    : ConditionTracker(id, index), mConfigKey(key), mContainANYPositionInInternalDimensions(false) {
-    VLOG("creating SimpleConditionTracker %lld", (long long)mConditionId);
-    mCountNesting = simplePredicate.count_nesting();
-
-    if (simplePredicate.has_start()) {
-        auto pair = trackerNameIndexMap.find(simplePredicate.start());
-        if (pair == trackerNameIndexMap.end()) {
-            ALOGW("Start matcher %lld not found in the config", (long long)simplePredicate.start());
-            return;
-        }
-        mStartLogMatcherIndex = pair->second;
-        mTrackerIndex.insert(mStartLogMatcherIndex);
-    } else {
-        mStartLogMatcherIndex = -1;
-    }
-
-    if (simplePredicate.has_stop()) {
-        auto pair = trackerNameIndexMap.find(simplePredicate.stop());
-        if (pair == trackerNameIndexMap.end()) {
-            ALOGW("Stop matcher %lld not found in the config", (long long)simplePredicate.stop());
-            return;
-        }
-        mStopLogMatcherIndex = pair->second;
-        mTrackerIndex.insert(mStopLogMatcherIndex);
-    } else {
-        mStopLogMatcherIndex = -1;
-    }
-
-    if (simplePredicate.has_stop_all()) {
-        auto pair = trackerNameIndexMap.find(simplePredicate.stop_all());
-        if (pair == trackerNameIndexMap.end()) {
-            ALOGW("Stop all matcher %lld found in the config", (long long)simplePredicate.stop_all());
-            return;
-        }
-        mStopAllLogMatcherIndex = pair->second;
-        mTrackerIndex.insert(mStopAllLogMatcherIndex);
-    } else {
-        mStopAllLogMatcherIndex = -1;
-    }
-
-    if (simplePredicate.has_dimensions()) {
-        translateFieldMatcher(simplePredicate.dimensions(), &mOutputDimensions);
-        if (mOutputDimensions.size() > 0) {
-            mSliced = true;
-            mDimensionTag = mOutputDimensions[0].mMatcher.getTag();
-        }
-        mContainANYPositionInInternalDimensions = HasPositionANY(simplePredicate.dimensions());
-    }
-
-    if (simplePredicate.initial_value() == SimplePredicate_InitialValue_FALSE) {
-        mInitialValue = ConditionState::kFalse;
-    } else {
-        mInitialValue = ConditionState::kUnknown;
-    }
-
-    mInitialized = true;
-}
-
-SimpleConditionTracker::~SimpleConditionTracker() {
-    VLOG("~SimpleConditionTracker()");
-}
-
-bool SimpleConditionTracker::init(const vector<Predicate>& allConditionConfig,
-                                  const vector<sp<ConditionTracker>>& allConditionTrackers,
-                                  const unordered_map<int64_t, int>& conditionIdIndexMap,
-                                  vector<bool>& stack,
-                                  vector<ConditionState>& initialConditionCache) {
-    // SimpleConditionTracker does not have dependency on other conditions, thus we just return
-    // if the initialization was successful.
-    initialConditionCache[mIndex] = mInitialValue;
-    return mInitialized;
-}
-
-void SimpleConditionTracker::dumpState() {
-    VLOG("%lld DUMP:", (long long)mConditionId);
-    for (const auto& pair : mSlicedConditionState) {
-        VLOG("\t%s : %d", pair.first.toString().c_str(), pair.second);
-    }
-
-    VLOG("Changed to true keys: \n");
-    for (const auto& key : mLastChangedToTrueDimensions) {
-        VLOG("%s", key.toString().c_str());
-    }
-    VLOG("Changed to false keys: \n");
-    for (const auto& key : mLastChangedToFalseDimensions) {
-        VLOG("%s", key.toString().c_str());
-    }
-}
-
-void SimpleConditionTracker::handleStopAll(std::vector<ConditionState>& conditionCache,
-                                           std::vector<bool>& conditionChangedCache) {
-    // Unless the default condition is false, and there was nothing started, otherwise we have
-    // triggered a condition change.
-    conditionChangedCache[mIndex] =
-            (mInitialValue == ConditionState::kFalse && mSlicedConditionState.empty()) ? false
-                                                                                           : true;
-
-    for (const auto& cond : mSlicedConditionState) {
-        if (cond.second > 0) {
-            mLastChangedToFalseDimensions.insert(cond.first);
-        }
-    }
-
-    // After StopAll, we know everything has stopped. From now on, default condition is false.
-    mInitialValue = ConditionState::kFalse;
-    mSlicedConditionState.clear();
-    conditionCache[mIndex] = ConditionState::kFalse;
-}
-
-bool SimpleConditionTracker::hitGuardRail(const HashableDimensionKey& newKey) {
-    if (!mSliced || mSlicedConditionState.find(newKey) != mSlicedConditionState.end()) {
-        // if the condition is not sliced or the key is not new, we are good!
-        return false;
-    }
-    // 1. Report the tuple count if the tuple count > soft limit
-    if (mSlicedConditionState.size() > StatsdStats::kDimensionKeySizeSoftLimit - 1) {
-        size_t newTupleCount = mSlicedConditionState.size() + 1;
-        StatsdStats::getInstance().noteConditionDimensionSize(mConfigKey, mConditionId, newTupleCount);
-        // 2. Don't add more tuples, we are above the allowed threshold. Drop the data.
-        if (newTupleCount > StatsdStats::kDimensionKeySizeHardLimit) {
-            ALOGE("Predicate %lld dropping data for dimension key %s",
-                (long long)mConditionId, newKey.toString().c_str());
-            return true;
-        }
-    }
-    return false;
-}
-
-void SimpleConditionTracker::handleConditionEvent(const HashableDimensionKey& outputKey,
-                                                  bool matchStart, ConditionState* conditionCache,
-                                                  bool* conditionChangedCache) {
-    bool changed = false;
-    auto outputIt = mSlicedConditionState.find(outputKey);
-    ConditionState newCondition;
-    if (hitGuardRail(outputKey)) {
-        (*conditionChangedCache) = false;
-        // Tells the caller it's evaluated.
-        (*conditionCache) = ConditionState::kUnknown;
-        return;
-    }
-    if (outputIt == mSlicedConditionState.end()) {
-        // We get a new output key.
-        newCondition = matchStart ? ConditionState::kTrue : ConditionState::kFalse;
-        if (matchStart && mInitialValue != ConditionState::kTrue) {
-            mSlicedConditionState[outputKey] = 1;
-            changed = true;
-            mLastChangedToTrueDimensions.insert(outputKey);
-        } else if (mInitialValue != ConditionState::kFalse) {
-            // it's a stop and we don't have history about it.
-            // If the default condition is not false, it means this stop is valuable to us.
-            mSlicedConditionState[outputKey] = 0;
-            mLastChangedToFalseDimensions.insert(outputKey);
-            changed = true;
-        }
-    } else {
-        // we have history about this output key.
-        auto& startedCount = outputIt->second;
-        // assign the old value first.
-        newCondition = startedCount > 0 ? ConditionState::kTrue : ConditionState::kFalse;
-        if (matchStart) {
-            if (startedCount == 0) {
-                mLastChangedToTrueDimensions.insert(outputKey);
-                // This condition for this output key will change from false -> true
-                changed = true;
-            }
-
-            // it's ok to do ++ here, even if we don't count nesting. The >1 counts will be treated
-            // as 1 if not counting nesting.
-            startedCount++;
-            newCondition = ConditionState::kTrue;
-        } else {
-            // This is a stop event.
-            if (startedCount > 0) {
-                if (mCountNesting) {
-                    startedCount--;
-                    if (startedCount == 0) {
-                        newCondition = ConditionState::kFalse;
-                    }
-                } else {
-                    // not counting nesting, so ignore the number of starts, stop now.
-                    startedCount = 0;
-                    newCondition = ConditionState::kFalse;
-                }
-                // if everything has stopped for this output key, condition true -> false;
-                if (startedCount == 0) {
-                    mLastChangedToFalseDimensions.insert(outputKey);
-                    changed = true;
-                }
-            }
-
-            // if default condition is false, it means we don't need to keep the false values.
-            if (mInitialValue == ConditionState::kFalse && startedCount == 0) {
-                mSlicedConditionState.erase(outputIt);
-                VLOG("erase key %s", outputKey.toString().c_str());
-            }
-        }
-    }
-
-    // dump all dimensions for debugging
-    if (DEBUG) {
-        dumpState();
-    }
-
-    (*conditionChangedCache) = changed;
-    (*conditionCache) = newCondition;
-
-    VLOG("SimplePredicate %lld nonSlicedChange? %d", (long long)mConditionId,
-         conditionChangedCache[mIndex] == true);
-}
-
-void SimpleConditionTracker::evaluateCondition(
-        const LogEvent& event,
-        const vector<MatchingState>& eventMatcherValues,
-        const vector<sp<ConditionTracker>>& mAllConditions,
-        vector<ConditionState>& conditionCache,
-        vector<bool>& conditionChangedCache) {
-    if (conditionCache[mIndex] != ConditionState::kNotEvaluated) {
-        // it has been evaluated.
-        VLOG("Yes, already evaluated, %lld %d",
-            (long long)mConditionId, conditionCache[mIndex]);
-        return;
-    }
-    mLastChangedToTrueDimensions.clear();
-    mLastChangedToFalseDimensions.clear();
-
-    if (mStopAllLogMatcherIndex >= 0 && mStopAllLogMatcherIndex < int(eventMatcherValues.size()) &&
-        eventMatcherValues[mStopAllLogMatcherIndex] == MatchingState::kMatched) {
-        handleStopAll(conditionCache, conditionChangedCache);
-        return;
-    }
-
-    int matchedState = -1;
-    // Note: The order to evaluate the following start, stop, stop_all matters.
-    // The priority of overwrite is stop_all > stop > start.
-    if (mStartLogMatcherIndex >= 0 &&
-        eventMatcherValues[mStartLogMatcherIndex] == MatchingState::kMatched) {
-        matchedState = 1;
-    }
-
-    if (mStopLogMatcherIndex >= 0 &&
-        eventMatcherValues[mStopLogMatcherIndex] == MatchingState::kMatched) {
-        matchedState = 0;
-    }
-
-    if (matchedState < 0) {
-        // The event doesn't match this condition. So we just report existing condition values.
-        conditionChangedCache[mIndex] = false;
-        if (mSliced) {
-            // if the condition result is sliced. The overall condition is true if any of the sliced
-            // condition is true
-            conditionCache[mIndex] = mInitialValue;
-            for (const auto& slicedCondition : mSlicedConditionState) {
-                if (slicedCondition.second > 0) {
-                    conditionCache[mIndex] = ConditionState::kTrue;
-                    break;
-                }
-            }
-        } else {
-            const auto& itr = mSlicedConditionState.find(DEFAULT_DIMENSION_KEY);
-            if (itr == mSlicedConditionState.end()) {
-                // condition not sliced, but we haven't seen the matched start or stop yet. so
-                // return initial value.
-                conditionCache[mIndex] = mInitialValue;
-            } else {
-                // return the cached condition.
-                conditionCache[mIndex] =
-                        itr->second > 0 ? ConditionState::kTrue : ConditionState::kFalse;
-            }
-        }
-        return;
-    }
-
-    ConditionState overallState = mInitialValue;
-    bool overallChanged = false;
-
-    if (mOutputDimensions.size() == 0) {
-        handleConditionEvent(DEFAULT_DIMENSION_KEY, matchedState == 1, &overallState,
-                             &overallChanged);
-    } else if (!mContainANYPositionInInternalDimensions) {
-        HashableDimensionKey outputValue;
-        filterValues(mOutputDimensions, event.getValues(), &outputValue);
-
-        // If this event has multiple nodes in the attribution chain,  this log event probably will
-        // generate multiple dimensions. If so, we will find if the condition changes for any
-        // dimension and ask the corresponding metric producer to verify whether the actual sliced
-        // condition has changed or not.
-        // A high level assumption is that a predicate is either sliced or unsliced. We will never
-        // have both sliced and unsliced version of a predicate.
-        handleConditionEvent(outputValue, matchedState == 1, &overallState, &overallChanged);
-    } else {
-        ALOGE("The condition tracker should not be sliced by ANY position matcher.");
-    }
-    conditionCache[mIndex] = overallState;
-    conditionChangedCache[mIndex] = overallChanged;
-}
-
-void SimpleConditionTracker::isConditionMet(
-        const ConditionKey& conditionParameters, const vector<sp<ConditionTracker>>& allConditions,
-        const bool isPartialLink,
-        vector<ConditionState>& conditionCache) const {
-
-    if (conditionCache[mIndex] != ConditionState::kNotEvaluated) {
-        // it has been evaluated.
-        VLOG("Yes, already evaluated, %lld %d",
-            (long long)mConditionId, conditionCache[mIndex]);
-        return;
-    }
-    const auto pair = conditionParameters.find(mConditionId);
-
-    if (pair == conditionParameters.end()) {
-        ConditionState conditionState = ConditionState::kNotEvaluated;
-        conditionState = conditionState | mInitialValue;
-        if (!mSliced) {
-            const auto& itr = mSlicedConditionState.find(DEFAULT_DIMENSION_KEY);
-            if (itr != mSlicedConditionState.end()) {
-                ConditionState sliceState =
-                    itr->second > 0 ? ConditionState::kTrue : ConditionState::kFalse;
-                conditionState = conditionState | sliceState;
-            }
-        }
-        conditionCache[mIndex] = conditionState;
-        return;
-    }
-
-    ConditionState conditionState = ConditionState::kNotEvaluated;
-    const HashableDimensionKey& key = pair->second;
-    if (isPartialLink) {
-        // For unseen key, check whether the require dimensions are subset of sliced condition
-        // output.
-        conditionState = conditionState | mInitialValue;
-        for (const auto& slice : mSlicedConditionState) {
-            ConditionState sliceState =
-                slice.second > 0 ? ConditionState::kTrue : ConditionState::kFalse;
-            if (slice.first.contains(key)) {
-                conditionState = conditionState | sliceState;
-            }
-        }
-    } else {
-        auto startedCountIt = mSlicedConditionState.find(key);
-        conditionState = conditionState | mInitialValue;
-        if (startedCountIt != mSlicedConditionState.end()) {
-            ConditionState sliceState =
-                startedCountIt->second > 0 ? ConditionState::kTrue : ConditionState::kFalse;
-            conditionState = conditionState | sliceState;
-        }
-
-    }
-    conditionCache[mIndex] = conditionState;
-    VLOG("Predicate %lld return %d", (long long)mConditionId, conditionCache[mIndex]);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/condition/SimpleConditionTracker.h b/cmds/statsd/src/condition/SimpleConditionTracker.h
deleted file mode 100644
index ea7f87b..0000000
--- a/cmds/statsd/src/condition/SimpleConditionTracker.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SIMPLE_CONDITION_TRACKER_H
-#define SIMPLE_CONDITION_TRACKER_H
-
-#include <gtest/gtest_prod.h>
-#include "ConditionTracker.h"
-#include "config/ConfigKey.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "stats_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class SimpleConditionTracker : public virtual ConditionTracker {
-public:
-    SimpleConditionTracker(const ConfigKey& key, const int64_t& id, const int index,
-                           const SimplePredicate& simplePredicate,
-                           const std::unordered_map<int64_t, int>& trackerNameIndexMap);
-
-    ~SimpleConditionTracker();
-
-    bool init(const std::vector<Predicate>& allConditionConfig,
-              const std::vector<sp<ConditionTracker>>& allConditionTrackers,
-              const std::unordered_map<int64_t, int>& conditionIdIndexMap, std::vector<bool>& stack,
-              std::vector<ConditionState>& initialConditionCache) override;
-
-    void evaluateCondition(const LogEvent& event,
-                           const std::vector<MatchingState>& eventMatcherValues,
-                           const std::vector<sp<ConditionTracker>>& mAllConditions,
-                           std::vector<ConditionState>& conditionCache,
-                           std::vector<bool>& changedCache) override;
-
-    void isConditionMet(const ConditionKey& conditionParameters,
-                        const std::vector<sp<ConditionTracker>>& allConditions,
-                        const bool isPartialLink,
-                        std::vector<ConditionState>& conditionCache) const override;
-
-    virtual const std::set<HashableDimensionKey>* getChangedToTrueDimensions(
-            const std::vector<sp<ConditionTracker>>& allConditions) const {
-        if (mSliced) {
-            return &mLastChangedToTrueDimensions;
-        } else {
-            return nullptr;
-        }
-    }
-
-    virtual const std::set<HashableDimensionKey>* getChangedToFalseDimensions(
-            const std::vector<sp<ConditionTracker>>& allConditions) const {
-        if (mSliced) {
-            return &mLastChangedToFalseDimensions;
-        } else {
-            return nullptr;
-        }
-    }
-
-    void getTrueSlicedDimensions(
-            const std::vector<sp<ConditionTracker>>& allConditions,
-            std::set<HashableDimensionKey>* dimensions) const override {
-        for (const auto& itr : mSlicedConditionState) {
-            if (itr.second > 0) {
-                dimensions->insert(itr.first);
-            }
-        }
-    }
-
-    bool IsChangedDimensionTrackable() const  override { return true; }
-
-    bool IsSimpleCondition() const  override { return true; }
-
-    bool equalOutputDimensions(
-        const std::vector<sp<ConditionTracker>>& allConditions,
-        const vector<Matcher>& dimensions) const override {
-            return equalDimensions(mOutputDimensions, dimensions);
-    }
-
-private:
-    const ConfigKey mConfigKey;
-    // The index of the LogEventMatcher which defines the start.
-    int mStartLogMatcherIndex;
-
-    // The index of the LogEventMatcher which defines the end.
-    int mStopLogMatcherIndex;
-
-    // if the start end needs to be nested.
-    bool mCountNesting;
-
-    // The index of the LogEventMatcher which defines the stop all.
-    int mStopAllLogMatcherIndex;
-
-    ConditionState mInitialValue;
-
-    std::vector<Matcher> mOutputDimensions;
-
-    bool mContainANYPositionInInternalDimensions;
-
-    std::set<HashableDimensionKey> mLastChangedToTrueDimensions;
-    std::set<HashableDimensionKey> mLastChangedToFalseDimensions;
-
-    int mDimensionTag;
-
-    std::map<HashableDimensionKey, int> mSlicedConditionState;
-
-    void handleStopAll(std::vector<ConditionState>& conditionCache,
-                       std::vector<bool>& changedCache);
-
-    void handleConditionEvent(const HashableDimensionKey& outputKey, bool matchStart,
-                              ConditionState* conditionCache, bool* changedCache);
-
-    bool hitGuardRail(const HashableDimensionKey& newKey);
-
-    void dumpState();
-
-    FRIEND_TEST(SimpleConditionTrackerTest, TestSlicedCondition);
-    FRIEND_TEST(SimpleConditionTrackerTest, TestSlicedWithNoOutputDim);
-    FRIEND_TEST(SimpleConditionTrackerTest, TestStopAll);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // SIMPLE_CONDITION_TRACKER_H
diff --git a/cmds/statsd/src/condition/condition_util.cpp b/cmds/statsd/src/condition/condition_util.cpp
deleted file mode 100644
index 60b8c53..0000000
--- a/cmds/statsd/src/condition/condition_util.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "Log.h"
-
-#include "condition_util.h"
-
-#include "../matchers/matcher_util.h"
-#include "ConditionTracker.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "stats_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::vector;
-
-
-ConditionState evaluateCombinationCondition(const std::vector<int>& children,
-                                            const LogicalOperation& operation,
-                                            const std::vector<ConditionState>& conditionCache) {
-    ConditionState newCondition;
-
-    bool hasUnknown = false;
-    bool hasFalse = false;
-    bool hasTrue = false;
-
-    for (auto childIndex : children) {
-        ConditionState childState = conditionCache[childIndex];
-        if (childState == ConditionState::kUnknown) {
-            hasUnknown = true;
-            break;
-        }
-        if (childState == ConditionState::kFalse) {
-            hasFalse = true;
-        }
-        if (childState == ConditionState::kTrue) {
-            hasTrue = true;
-        }
-    }
-
-    // If any child condition is in unknown state, the condition is unknown too.
-    if (hasUnknown) {
-        return ConditionState::kUnknown;
-    }
-
-    switch (operation) {
-        case LogicalOperation::AND: {
-            newCondition = hasFalse ? ConditionState::kFalse : ConditionState::kTrue;
-            break;
-        }
-        case LogicalOperation::OR: {
-            newCondition = hasTrue ? ConditionState::kTrue : ConditionState::kFalse;
-            break;
-        }
-        case LogicalOperation::NOT:
-            newCondition = children.empty() ? ConditionState::kUnknown :
-                              ((conditionCache[children[0]] == ConditionState::kFalse) ?
-                                  ConditionState::kTrue : ConditionState::kFalse);
-            break;
-        case LogicalOperation::NAND:
-            newCondition = hasFalse ? ConditionState::kTrue : ConditionState::kFalse;
-            break;
-        case LogicalOperation::NOR:
-            newCondition = hasTrue ? ConditionState::kFalse : ConditionState::kTrue;
-            break;
-        case LogicalOperation::LOGICAL_OPERATION_UNSPECIFIED:
-            newCondition = ConditionState::kFalse;
-            break;
-    }
-    return newCondition;
-}
-
-ConditionState operator|(ConditionState l, ConditionState r) {
-    return l >= r ? l : r;
-}
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/condition/condition_util.h b/cmds/statsd/src/condition/condition_util.h
deleted file mode 100644
index fed90ec..0000000
--- a/cmds/statsd/src/condition/condition_util.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef CONDITION_UTIL_H
-#define CONDITION_UTIL_H
-
-#include <vector>
-#include "../matchers/matcher_util.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-enum ConditionState {
-    kNotEvaluated = -2,
-    kUnknown = -1,
-    kFalse = 0,
-    kTrue = 1,
-};
-
-ConditionState operator|(ConditionState l, ConditionState r);
-
-ConditionState evaluateCombinationCondition(const std::vector<int>& children,
-                                            const LogicalOperation& operation,
-                                            const std::vector<ConditionState>& conditionCache);
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#endif  // CONDITION_UTIL_H
diff --git a/cmds/statsd/src/config/ConfigKey.cpp b/cmds/statsd/src/config/ConfigKey.cpp
deleted file mode 100644
index 4a2bd27..0000000
--- a/cmds/statsd/src/config/ConfigKey.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "config/ConfigKey.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-ConfigKey::ConfigKey() {
-}
-
-ConfigKey::ConfigKey(const ConfigKey& that) : mId(that.mId), mUid(that.mUid) {
-}
-
-ConfigKey::ConfigKey(int uid, const int64_t& id) : mId(id), mUid(uid) {
-}
-
-ConfigKey::~ConfigKey() {
-}
-
-string ConfigKey::ToString() const {
-    string s;
-    s += "(" + std::to_string(mUid) + " " + std::to_string(mId) + ")";
-    return s;
-}
-
-
-int64_t StrToInt64(const string& str) {
-    char* endp;
-    int64_t value;
-    value = strtoll(str.c_str(), &endp, 0);
-    if (endp == str.c_str() || *endp != '\0') {
-        value = 0;
-    }
-    return value;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/config/ConfigKey.h b/cmds/statsd/src/config/ConfigKey.h
deleted file mode 100644
index 4cc9393..0000000
--- a/cmds/statsd/src/config/ConfigKey.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-
-#include <string>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::hash;
-using std::string;
-
-/**
- * Uniquely identifies a configuration.
- */
-class ConfigKey {
-public:
-    ConfigKey();
-    ConfigKey(const ConfigKey& that);
-    ConfigKey(int uid, const int64_t& id);
-    ~ConfigKey();
-
-    inline int GetUid() const {
-        return mUid;
-    }
-    inline const int64_t& GetId() const {
-        return mId;
-    }
-
-    inline bool operator<(const ConfigKey& that) const {
-        if (mUid < that.mUid) {
-            return true;
-        }
-        if (mUid > that.mUid) {
-            return false;
-        }
-        return mId < that.mId;
-    };
-
-    inline bool operator==(const ConfigKey& that) const {
-        return mUid == that.mUid && mId == that.mId;
-    };
-
-    string ToString() const;
-
-private:
-    int64_t mId;
-    int mUid;
-};
-
-int64_t StrToInt64(const string& str);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-/**
- * A hash function for ConfigKey so it can be used for unordered_map/set.
- * Unfortunately this has to go in std namespace because C++ is fun!
- */
-namespace std {
-
-using android::os::statsd::ConfigKey;
-
-template <>
-struct hash<ConfigKey> {
-    std::size_t operator()(const ConfigKey& key) const {
-        return (7 * key.GetUid()) ^ ((hash<long long>()(key.GetId())));
-    }
-};
-
-}  // namespace std
diff --git a/cmds/statsd/src/config/ConfigListener.cpp b/cmds/statsd/src/config/ConfigListener.cpp
deleted file mode 100644
index 21a3f16..0000000
--- a/cmds/statsd/src/config/ConfigListener.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "config/ConfigListener.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-ConfigListener::ConfigListener() {
-}
-
-ConfigListener::~ConfigListener() {
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/config/ConfigListener.h b/cmds/statsd/src/config/ConfigListener.h
deleted file mode 100644
index dcd5e52..0000000
--- a/cmds/statsd/src/config/ConfigListener.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "config/ConfigKey.h"
-
-#include <utils/RefBase.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using android::RefBase;
-
-/**
- * Callback for different subsystems inside statsd to implement to find out
- * when a configuration has been added, updated or removed.
- */
-class ConfigListener : public virtual RefBase {
-public:
-    ConfigListener();
-    virtual ~ConfigListener();
-
-    /**
-     * A configuration was added or updated.
-     */
-    virtual void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key,
-                                 const StatsdConfig& config) = 0;
-
-    /**
-     * A configuration was removed.
-     */
-    virtual void OnConfigRemoved(const ConfigKey& key) = 0;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/config/ConfigManager.cpp b/cmds/statsd/src/config/ConfigManager.cpp
deleted file mode 100644
index 13020e0..0000000
--- a/cmds/statsd/src/config/ConfigManager.cpp
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "config/ConfigManager.h"
-#include "storage/StorageManager.h"
-
-#include "guardrail/StatsdStats.h"
-#include "stats_log_util.h"
-#include "stats_util.h"
-#include "stats_log_util.h"
-
-#include <stdio.h>
-#include <vector>
-#include "android-base/stringprintf.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::pair;
-using std::string;
-using std::vector;
-
-#define STATS_SERVICE_DIR "/data/misc/stats-service"
-
-using android::base::StringPrintf;
-using std::unique_ptr;
-
-struct ConfigReceiverDeathCookie {
-    ConfigReceiverDeathCookie(const wp<ConfigManager>& configManager, const ConfigKey& configKey,
-                              const shared_ptr<IPendingIntentRef>& pir) :
-            mConfigManager(configManager), mConfigKey(configKey), mPir(pir) {
-    }
-
-    wp<ConfigManager> mConfigManager;
-    ConfigKey mConfigKey;
-    shared_ptr<IPendingIntentRef> mPir;
-};
-
-void ConfigManager::configReceiverDied(void* cookie) {
-    auto cookie_ = static_cast<ConfigReceiverDeathCookie*>(cookie);
-    sp<ConfigManager> thiz = cookie_->mConfigManager.promote();
-    if (!thiz) {
-        return;
-    }
-
-    ConfigKey& configKey = cookie_->mConfigKey;
-    shared_ptr<IPendingIntentRef>& pir = cookie_->mPir;
-
-    // Erase the mapping from the config key to the config receiver (pir) if the
-    // mapping still exists.
-    lock_guard<mutex> lock(thiz->mMutex);
-    auto it = thiz->mConfigReceivers.find(configKey);
-    if (it != thiz->mConfigReceivers.end() && it->second == pir) {
-        thiz->mConfigReceivers.erase(configKey);
-    }
-
-    // The death recipient corresponding to this specific pir can never be
-    // triggered again, so free up resources.
-    delete cookie_;
-}
-
-struct ActiveConfigChangedReceiverDeathCookie {
-    ActiveConfigChangedReceiverDeathCookie(const wp<ConfigManager>& configManager, const int uid,
-                                           const shared_ptr<IPendingIntentRef>& pir) :
-            mConfigManager(configManager), mUid(uid), mPir(pir) {
-    }
-
-    wp<ConfigManager> mConfigManager;
-    int mUid;
-    shared_ptr<IPendingIntentRef> mPir;
-};
-
-void ConfigManager::activeConfigChangedReceiverDied(void* cookie) {
-    auto cookie_ = static_cast<ActiveConfigChangedReceiverDeathCookie*>(cookie);
-    sp<ConfigManager> thiz = cookie_->mConfigManager.promote();
-    if (!thiz) {
-        return;
-    }
-
-    int uid = cookie_->mUid;
-    shared_ptr<IPendingIntentRef>& pir = cookie_->mPir;
-
-    // Erase the mapping from the config key to the active config changed
-    // receiver (pir) if the mapping still exists.
-    lock_guard<mutex> lock(thiz->mMutex);
-    auto it = thiz->mActiveConfigsChangedReceivers.find(uid);
-    if (it != thiz->mActiveConfigsChangedReceivers.end() && it->second == pir) {
-        thiz->mActiveConfigsChangedReceivers.erase(uid);
-    }
-
-    // The death recipient corresponding to this specific pir can never
-    // be triggered again, so free up resources.
-    delete cookie_;
-}
-
-ConfigManager::ConfigManager() :
-    mConfigReceiverDeathRecipient(AIBinder_DeathRecipient_new(configReceiverDied)),
-    mActiveConfigChangedReceiverDeathRecipient(
-            AIBinder_DeathRecipient_new(activeConfigChangedReceiverDied)) {
-}
-
-ConfigManager::~ConfigManager() {
-}
-
-void ConfigManager::Startup() {
-    map<ConfigKey, StatsdConfig> configsFromDisk;
-    StorageManager::readConfigFromDisk(configsFromDisk);
-    for (const auto& pair : configsFromDisk) {
-        UpdateConfig(pair.first, pair.second);
-    }
-}
-
-void ConfigManager::StartupForTest() {
-    // No-op function to avoid reading configs from disks for tests.
-}
-
-void ConfigManager::AddListener(const sp<ConfigListener>& listener) {
-    lock_guard<mutex> lock(mMutex);
-    mListeners.push_back(listener);
-}
-
-void ConfigManager::UpdateConfig(const ConfigKey& key, const StatsdConfig& config) {
-    vector<sp<ConfigListener>> broadcastList;
-    {
-        lock_guard <mutex> lock(mMutex);
-
-        const int numBytes = config.ByteSize();
-        vector<uint8_t> buffer(numBytes);
-        config.SerializeToArray(&buffer[0], numBytes);
-
-        auto uidIt = mConfigs.find(key.GetUid());
-        // GuardRail: Limit the number of configs per uid.
-        if (uidIt != mConfigs.end()) {
-            auto it = uidIt->second.find(key);
-            if (it == uidIt->second.end() &&
-                uidIt->second.size() >= StatsdStats::kMaxConfigCountPerUid) {
-                ALOGE("ConfigManager: uid %d has exceeded the config count limit", key.GetUid());
-                return;
-            }
-        }
-
-        // Check if it's a duplicate config.
-        if (uidIt != mConfigs.end() && uidIt->second.find(key) != uidIt->second.end() &&
-            StorageManager::hasIdenticalConfig(key, buffer)) {
-            // This is a duplicate config.
-            ALOGI("ConfigManager This is a duplicate config %s", key.ToString().c_str());
-            // Update saved file on disk. We still update timestamp of file when
-            // there exists a duplicate configuration to avoid garbage collection.
-            update_saved_configs_locked(key, buffer, numBytes);
-            return;
-        }
-
-        // Update saved file on disk.
-        update_saved_configs_locked(key, buffer, numBytes);
-
-        // Add to set.
-        mConfigs[key.GetUid()].insert(key);
-
-        for (const sp<ConfigListener>& listener : mListeners) {
-            broadcastList.push_back(listener);
-        }
-    }
-
-    const int64_t timestampNs = getElapsedRealtimeNs();
-    // Tell everyone
-    for (const sp<ConfigListener>& listener : broadcastList) {
-        listener->OnConfigUpdated(timestampNs, key, config);
-    }
-}
-
-void ConfigManager::SetConfigReceiver(const ConfigKey& key,
-                                      const shared_ptr<IPendingIntentRef>& pir) {
-    lock_guard<mutex> lock(mMutex);
-    mConfigReceivers[key] = pir;
-    AIBinder_linkToDeath(pir->asBinder().get(), mConfigReceiverDeathRecipient.get(),
-                         new ConfigReceiverDeathCookie(this, key, pir));
-}
-
-void ConfigManager::RemoveConfigReceiver(const ConfigKey& key) {
-    lock_guard<mutex> lock(mMutex);
-    mConfigReceivers.erase(key);
-}
-
-void ConfigManager::SetActiveConfigsChangedReceiver(const int uid,
-                                                    const shared_ptr<IPendingIntentRef>& pir) {
-    {
-        lock_guard<mutex> lock(mMutex);
-        mActiveConfigsChangedReceivers[uid] = pir;
-    }
-    AIBinder_linkToDeath(pir->asBinder().get(), mActiveConfigChangedReceiverDeathRecipient.get(),
-                         new ActiveConfigChangedReceiverDeathCookie(this, uid, pir));
-}
-
-void ConfigManager::RemoveActiveConfigsChangedReceiver(const int uid) {
-    lock_guard<mutex> lock(mMutex);
-    mActiveConfigsChangedReceivers.erase(uid);
-}
-
-void ConfigManager::RemoveConfig(const ConfigKey& key) {
-    vector<sp<ConfigListener>> broadcastList;
-    {
-        lock_guard <mutex> lock(mMutex);
-
-        auto uid = key.GetUid();
-        auto uidIt = mConfigs.find(uid);
-        if (uidIt != mConfigs.end() && uidIt->second.find(key) != uidIt->second.end()) {
-            // Remove from map
-            uidIt->second.erase(key);
-
-            for (const sp<ConfigListener>& listener : mListeners) {
-                broadcastList.push_back(listener);
-            }
-        }
-
-        // Remove from disk. There can still be a lingering file on disk so we check
-        // whether or not the config was on memory.
-        remove_saved_configs(key);
-    }
-
-    for (const sp<ConfigListener>& listener:broadcastList) {
-        listener->OnConfigRemoved(key);
-    }
-}
-
-void ConfigManager::remove_saved_configs(const ConfigKey& key) {
-    string suffix = StringPrintf("%d_%lld", key.GetUid(), (long long)key.GetId());
-    StorageManager::deleteSuffixedFiles(STATS_SERVICE_DIR, suffix.c_str());
-}
-
-void ConfigManager::RemoveConfigs(int uid) {
-    vector<ConfigKey> removed;
-    vector<sp<ConfigListener>> broadcastList;
-    {
-        lock_guard <mutex> lock(mMutex);
-
-        auto uidIt = mConfigs.find(uid);
-        if (uidIt == mConfigs.end()) {
-            return;
-        }
-
-        for (auto it = uidIt->second.begin(); it != uidIt->second.end(); ++it) {
-            // Remove from map
-                remove_saved_configs(*it);
-                removed.push_back(*it);
-        }
-
-        mConfigs.erase(uidIt);
-
-        for (const sp<ConfigListener>& listener : mListeners) {
-            broadcastList.push_back(listener);
-        }
-    }
-
-    // Remove separately so if they do anything in the callback they can't mess up our iteration.
-    for (auto& key : removed) {
-        // Tell everyone
-        for (const sp<ConfigListener>& listener:broadcastList) {
-            listener->OnConfigRemoved(key);
-        }
-    }
-}
-
-void ConfigManager::RemoveAllConfigs() {
-    vector<ConfigKey> removed;
-    vector<sp<ConfigListener>> broadcastList;
-    {
-        lock_guard <mutex> lock(mMutex);
-
-        for (auto uidIt = mConfigs.begin(); uidIt != mConfigs.end();) {
-            for (auto it = uidIt->second.begin(); it != uidIt->second.end();) {
-                // Remove from map
-                removed.push_back(*it);
-                it = uidIt->second.erase(it);
-            }
-            uidIt = mConfigs.erase(uidIt);
-        }
-
-        for (const sp<ConfigListener>& listener : mListeners) {
-            broadcastList.push_back(listener);
-        }
-    }
-
-    // Remove separately so if they do anything in the callback they can't mess up our iteration.
-    for (auto& key : removed) {
-        // Tell everyone
-        for (const sp<ConfigListener>& listener:broadcastList) {
-            listener->OnConfigRemoved(key);
-        }
-    }
-}
-
-vector<ConfigKey> ConfigManager::GetAllConfigKeys() const {
-    lock_guard<mutex> lock(mMutex);
-
-    vector<ConfigKey> ret;
-    for (auto uidIt = mConfigs.cbegin(); uidIt != mConfigs.cend(); ++uidIt) {
-        for (auto it = uidIt->second.cbegin(); it != uidIt->second.cend(); ++it) {
-            ret.push_back(*it);
-        }
-    }
-    return ret;
-}
-
-const shared_ptr<IPendingIntentRef> ConfigManager::GetConfigReceiver(const ConfigKey& key) const {
-    lock_guard<mutex> lock(mMutex);
-
-    auto it = mConfigReceivers.find(key);
-    if (it == mConfigReceivers.end()) {
-        return nullptr;
-    } else {
-        return it->second;
-    }
-}
-
-const shared_ptr<IPendingIntentRef> ConfigManager::GetActiveConfigsChangedReceiver(const int uid)
-        const {
-    lock_guard<mutex> lock(mMutex);
-
-    auto it = mActiveConfigsChangedReceivers.find(uid);
-    if (it == mActiveConfigsChangedReceivers.end()) {
-        return nullptr;
-    } else {
-        return it->second;
-    }
-}
-
-void ConfigManager::Dump(FILE* out) {
-    lock_guard<mutex> lock(mMutex);
-
-    fprintf(out, "CONFIGURATIONS\n");
-    fprintf(out, "     uid name\n");
-    for (auto uidIt = mConfigs.cbegin(); uidIt != mConfigs.cend(); ++uidIt) {
-        for (auto it = uidIt->second.cbegin(); it != uidIt->second.cend(); ++it) {
-            fprintf(out, "  %6d %lld\n", it->GetUid(), (long long)it->GetId());
-            auto receiverIt = mConfigReceivers.find(*it);
-            if (receiverIt != mConfigReceivers.end()) {
-                fprintf(out, "    -> received by PendingIntent as binder\n");
-            }
-        }
-    }
-}
-
-void ConfigManager::update_saved_configs_locked(const ConfigKey& key,
-                                                const vector<uint8_t>& buffer,
-                                                const int numBytes) {
-    // If there is a pre-existing config with same key we should first delete it.
-    remove_saved_configs(key);
-
-    // Then we save the latest config.
-    string file_name =
-        StringPrintf("%s/%ld_%d_%lld", STATS_SERVICE_DIR, time(nullptr),
-                     key.GetUid(), (long long)key.GetId());
-    StorageManager::writeFile(file_name.c_str(), &buffer[0], numBytes);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/config/ConfigManager.h b/cmds/statsd/src/config/ConfigManager.h
deleted file mode 100644
index bef057f..0000000
--- a/cmds/statsd/src/config/ConfigManager.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "config/ConfigKey.h"
-#include "config/ConfigListener.h"
-
-#include <aidl/android/os/IPendingIntentRef.h>
-#include <mutex>
-#include <string>
-
-#include <stdio.h>
-
-using aidl::android::os::IPendingIntentRef;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * Keeps track of which configurations have been set from various sources.
- */
-class ConfigManager : public virtual android::RefBase {
-public:
-    ConfigManager();
-    virtual ~ConfigManager();
-
-    /**
-     * Initialize ConfigListener by reading from disk and get updates.
-     */
-    void Startup();
-
-    /*
-     * No-op initializer for tests.
-     */
-    void StartupForTest();
-
-    /**
-     * Someone else wants to know about the configs.
-     */
-    void AddListener(const sp<ConfigListener>& listener);
-
-    /**
-     * A configuration was added or updated.
-     *
-     * Reports this to listeners.
-     */
-    void UpdateConfig(const ConfigKey& key, const StatsdConfig& data);
-
-    /**
-     * Sets the broadcast receiver for a configuration key.
-     */
-    void SetConfigReceiver(const ConfigKey& key, const shared_ptr<IPendingIntentRef>& pir);
-
-    /**
-     * Returns the package name and class name representing the broadcast receiver for this config.
-     */
-    const shared_ptr<IPendingIntentRef> GetConfigReceiver(const ConfigKey& key) const;
-
-    /**
-     * Returns all config keys registered.
-     */
-    std::vector<ConfigKey> GetAllConfigKeys() const;
-
-    /**
-     * Erase any broadcast receiver associated with this config key.
-     */
-    void RemoveConfigReceiver(const ConfigKey& key);
-
-    /**
-     * Sets the broadcast receiver that is notified whenever the list of active configs
-     * changes for this uid.
-     */
-    void SetActiveConfigsChangedReceiver(const int uid, const shared_ptr<IPendingIntentRef>& pir);
-
-    /**
-     * Returns the broadcast receiver for active configs changed for this uid.
-     */
-
-    const shared_ptr<IPendingIntentRef> GetActiveConfigsChangedReceiver(const int uid) const;
-
-    /**
-     * Erase any active configs changed broadcast receiver associated with this uid.
-     */
-    void RemoveActiveConfigsChangedReceiver(const int uid);
-
-    /**
-     * A configuration was removed.
-     *
-     * Reports this to listeners.
-     */
-    void RemoveConfig(const ConfigKey& key);
-
-    /**
-     * Remove all of the configs for the given uid.
-     */
-    void RemoveConfigs(int uid);
-
-    /**
-     * Remove all of the configs from memory.
-     */
-    void RemoveAllConfigs();
-
-    /**
-     * Text dump of our state for debugging.
-     */
-    void Dump(FILE* out);
-
-private:
-    mutable std::mutex mMutex;
-
-    /**
-     * Save the configs to disk.
-     */
-    void update_saved_configs_locked(const ConfigKey& key,
-                                     const std::vector<uint8_t>& buffer,
-                                     const int numBytes);
-
-    /**
-     * Remove saved configs from disk.
-     */
-    void remove_saved_configs(const ConfigKey& key);
-
-    /**
-     * Maps from uid to the config keys that have been set.
-     */
-    std::map<int, std::set<ConfigKey>> mConfigs;
-
-    /**
-     * Each config key can be subscribed by up to one receiver, specified as IPendingIntentRef.
-     */
-    std::map<ConfigKey, shared_ptr<IPendingIntentRef>> mConfigReceivers;
-
-    /**
-     * Each uid can be subscribed by up to one receiver to notify that the list of active configs
-     * for this uid has changed. The receiver is specified as IPendingIntentRef.
-     */
-     std::map<int, shared_ptr<IPendingIntentRef>> mActiveConfigsChangedReceivers;
-
-    /**
-     * The ConfigListeners that will be told about changes.
-     */
-    std::vector<sp<ConfigListener>> mListeners;
-
-    // Death recipients that are triggered when the host process holding an
-    // IPendingIntentRef dies.
-    ::ndk::ScopedAIBinder_DeathRecipient mConfigReceiverDeathRecipient;
-    ::ndk::ScopedAIBinder_DeathRecipient mActiveConfigChangedReceiverDeathRecipient;
-
-    /**
-     * Death recipient callback that is called when a config receiver dies.
-     * The cookie is a pointer to a ConfigReceiverDeathCookie.
-     */
-    static void configReceiverDied(void* cookie);
-
-    /**
-     * Death recipient callback that is called when an active config changed
-     * receiver dies. The cookie is a pointer to an
-     * ActiveConfigChangedReceiverDeathCookie.
-     */
-    static void activeConfigChangedReceiverDied(void* cookie);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/experiment_ids.proto b/cmds/statsd/src/experiment_ids.proto
deleted file mode 100644
index c203631..0000000
--- a/cmds/statsd/src/experiment_ids.proto
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-
-option java_package = "com.android.internal.os";
-option java_outer_classname = "ExperimentIdsProto";
-
-// StatsLogProcessor uses the proto to parse experiment ids from
-// BinaryPushStateChanged atoms. This needs to be in sync with
-// TrainExperimentIds in atoms.proto.
-message ExperimentIds {
-    repeated int64 experiment_id = 1;
-}
diff --git a/cmds/statsd/src/external/Perfetto.cpp b/cmds/statsd/src/external/Perfetto.cpp
deleted file mode 100644
index 85b660e..0000000
--- a/cmds/statsd/src/external/Perfetto.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "config/ConfigKey.h"
-#include "Log.h"
-
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"  // Alert
-
-#include <android-base/unique_fd.h>
-#include <inttypes.h>
-#include <sys/wait.h>
-
-#include <string>
-
-namespace {
-const char kDropboxTag[] = "perfetto";
-}
-
-namespace android {
-namespace os {
-namespace statsd {
-
-bool CollectPerfettoTraceAndUploadToDropbox(const PerfettoDetails& config,
-                                            int64_t subscription_id,
-                                            int64_t alert_id,
-                                            const ConfigKey& configKey) {
-    VLOG("Starting trace collection through perfetto");
-
-    if (!config.has_trace_config()) {
-        ALOGE("The perfetto trace config is empty, aborting");
-        return false;
-    }
-
-    char subscriptionId[25];
-    char alertId[25];
-    char configId[25];
-    char configUid[25];
-    snprintf(subscriptionId, sizeof(subscriptionId), "%" PRId64, subscription_id);
-    snprintf(alertId, sizeof(alertId), "%" PRId64, alert_id);
-    snprintf(configId, sizeof(configId), "%" PRId64, configKey.GetId());
-    snprintf(configUid, sizeof(configUid), "%d", configKey.GetUid());
-
-    android::base::unique_fd readPipe;
-    android::base::unique_fd writePipe;
-    if (!android::base::Pipe(&readPipe, &writePipe)) {
-        ALOGE("pipe() failed while calling the Perfetto client: %s", strerror(errno));
-        return false;
-    }
-
-    pid_t pid = fork();
-    if (pid < 0) {
-        ALOGE("fork() failed while calling the Perfetto client: %s", strerror(errno));
-        return false;
-    }
-
-    if (pid == 0) {
-        // Child process.
-
-        // No malloc calls or library calls after this point. Remember that even
-        // ALOGx (aka android_printLog()) can use dynamic memory for vsprintf().
-
-        writePipe.reset();  // Close the write end (owned by the main process).
-
-        // Replace stdin with |readPipe| so the main process can write into it.
-        if (dup2(readPipe.get(), STDIN_FILENO) < 0) _exit(1);
-        readPipe.reset();
-
-        // Replace stdout/stderr with /dev/null and close any other file
-        // descriptor. This is to avoid SELinux complaining about perfetto
-        // trying to access files accidentally left open by statsd (i.e. files
-        // that have been opened without the O_CLOEXEC flag).
-        int devNullFd = open("/dev/null", O_RDWR | O_CLOEXEC);
-        if (dup2(devNullFd, STDOUT_FILENO) < 0) _exit(2);
-        if (dup2(devNullFd, STDERR_FILENO) < 0) _exit(3);
-        close(devNullFd);
-        for (int i = 0; i < 1024; i++) {
-            if (i != STDIN_FILENO && i != STDOUT_FILENO && i != STDERR_FILENO) close(i);
-        }
-
-        execl("/system/bin/perfetto", "perfetto", "--background", "--config", "-", "--dropbox",
-              kDropboxTag, "--alert-id", alertId, "--config-id", configId, "--config-uid",
-              configUid, "--subscription-id", subscriptionId, nullptr);
-
-        // execl() doesn't return in case of success, if we get here something
-        // failed.
-        _exit(4);
-    }
-
-    // Main process.
-
-    readPipe.reset();  // Close the read end (owned by the child process).
-
-    // Using fdopen() because fwrite() has the right logic to chunking write()
-    // over a pipe (see __sfvwrite()).
-    FILE* writePipeStream = android::base::Fdopen(std::move(writePipe), "wb");
-    if (!writePipeStream) {
-        ALOGE("fdopen() failed while calling the Perfetto client: %s", strerror(errno));
-        return false;
-    }
-
-    const std::string& cfgProto = config.trace_config();
-    size_t bytesWritten = fwrite(cfgProto.data(), 1, cfgProto.size(), writePipeStream);
-    fclose(writePipeStream);
-    if (bytesWritten != cfgProto.size() || cfgProto.size() == 0) {
-        ALOGE("fwrite() failed (ret: %zd) while calling the Perfetto client: %s", bytesWritten,
-              strerror(errno));
-        return false;
-    }
-
-    // This does NOT wait for the full duration of the trace. It just waits until
-    // the process has read the config from stdin and detached.
-    int childStatus = 0;
-    waitpid(pid, &childStatus, 0);
-    if (!WIFEXITED(childStatus) || WEXITSTATUS(childStatus) != 0) {
-        ALOGE("Child process failed (0x%x) while calling the Perfetto client", childStatus);
-        return false;
-    }
-
-    VLOG("CollectPerfettoTraceAndUploadToDropbox() succeeded");
-    return true;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/Perfetto.h b/cmds/statsd/src/external/Perfetto.h
deleted file mode 100644
index 095782a..0000000
--- a/cmds/statsd/src/external/Perfetto.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class ConfigKey;
-class PerfettoDetails;  // Declared in statsd_config.pb.h
-
-// Starts the collection of a Perfetto trace with the given |config|.
-// The trace is uploaded to Dropbox by the perfetto cmdline util once done.
-// This method returns immediately after passing the config and does NOT wait
-// for the full duration of the trace.
-bool CollectPerfettoTraceAndUploadToDropbox(const PerfettoDetails& config,
-                                            int64_t subscription_id,
-                                            int64_t alert_id,
-                                            const ConfigKey& configKey);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/PullDataReceiver.h b/cmds/statsd/src/external/PullDataReceiver.h
deleted file mode 100644
index dd5c0cf..0000000
--- a/cmds/statsd/src/external/PullDataReceiver.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-
-#include <utils/RefBase.h>
-#include "StatsPuller.h"
-#include "logd/LogEvent.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class PullDataReceiver : virtual public RefBase{
- public:
-  virtual ~PullDataReceiver() {}
-  /**
-   * @param data The pulled data.
-   * @param pullSuccess Whether the pull succeeded. If the pull does not succeed, the data for the
-   * bucket should be invalidated.
-   * @param originalPullTimeNs This is when all the pulls have been initiated (elapsed time).
-   */
-  virtual void onDataPulled(const std::vector<std::shared_ptr<LogEvent>>& data, 
-                            bool pullSuccess, int64_t originalPullTimeNs) = 0;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/PullResultReceiver.cpp b/cmds/statsd/src/external/PullResultReceiver.cpp
deleted file mode 100644
index 8aa4792..0000000
--- a/cmds/statsd/src/external/PullResultReceiver.cpp
+++ /dev/null
@@ -1,39 +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.
- */
-
-#include "PullResultReceiver.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-PullResultReceiver::PullResultReceiver(
-        std::function<void(int32_t, bool, const vector<StatsEventParcel>&)> pullFinishCb)
-    : pullFinishCallback(std::move(pullFinishCb)) {
-}
-
-Status PullResultReceiver::pullFinished(int32_t atomTag, bool success,
-                                        const vector<StatsEventParcel>& output) {
-    pullFinishCallback(atomTag, success, output);
-    return Status::ok();
-}
-
-PullResultReceiver::~PullResultReceiver() {
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/PullResultReceiver.h b/cmds/statsd/src/external/PullResultReceiver.h
deleted file mode 100644
index ceaae80..0000000
--- a/cmds/statsd/src/external/PullResultReceiver.h
+++ /dev/null
@@ -1,48 +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.
- */
-
-#include <aidl/android/os/BnPullAtomResultReceiver.h>
-#include <aidl/android/util/StatsEventParcel.h>
-
-using namespace std;
-
-using Status = ::ndk::ScopedAStatus;
-using aidl::android::os::BnPullAtomResultReceiver;
-using aidl::android::util::StatsEventParcel;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class PullResultReceiver : public BnPullAtomResultReceiver {
-public:
-    PullResultReceiver(function<void(int32_t, bool, const vector<StatsEventParcel>&)>
-                               pullFinishCallback);
-    ~PullResultReceiver();
-
-    /**
-     * Binder call for finishing a pull.
-     */
-    Status pullFinished(int32_t atomTag, bool success,
-                        const vector<StatsEventParcel>& output) override;
-
-private:
-    function<void(int32_t, bool, const vector<StatsEventParcel>&)> pullFinishCallback;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/PullUidProvider.h b/cmds/statsd/src/external/PullUidProvider.h
deleted file mode 100644
index 2318c50..0000000
--- a/cmds/statsd/src/external/PullUidProvider.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-
-#include <utils/RefBase.h>
-
-#include "StatsPuller.h"
-#include "logd/LogEvent.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class PullUidProvider : virtual public RefBase {
-public:
-    virtual ~PullUidProvider() {}
-
-    /**
-     * @param atomId The atom for which to get the uids.
-     */
-    virtual vector<int32_t> getPullAtomUids(int32_t atomId) = 0;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/StatsCallbackPuller.cpp b/cmds/statsd/src/external/StatsCallbackPuller.cpp
deleted file mode 100644
index 78e6f09..0000000
--- a/cmds/statsd/src/external/StatsCallbackPuller.cpp
+++ /dev/null
@@ -1,116 +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.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "StatsCallbackPuller.h"
-#include "PullResultReceiver.h"
-#include "StatsPullerManager.h"
-#include "logd/LogEvent.h"
-#include "stats_log_util.h"
-
-#include <aidl/android/util/StatsEventParcel.h>
-
-using namespace std;
-
-using Status = ::ndk::ScopedAStatus;
-using aidl::android::util::StatsEventParcel;
-using ::ndk::SharedRefBase;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-StatsCallbackPuller::StatsCallbackPuller(int tagId, const shared_ptr<IPullAtomCallback>& callback,
-                                         const int64_t coolDownNs, int64_t timeoutNs,
-                                         const vector<int> additiveFields)
-    : StatsPuller(tagId, coolDownNs, timeoutNs, additiveFields), mCallback(callback) {
-    VLOG("StatsCallbackPuller created for tag %d", tagId);
-}
-
-bool StatsCallbackPuller::PullInternal(vector<shared_ptr<LogEvent>>* data) {
-    VLOG("StatsCallbackPuller called for tag %d", mTagId);
-    if(mCallback == nullptr) {
-        ALOGW("No callback registered");
-        return false;
-    }
-
-    // Shared variables needed in the result receiver.
-    shared_ptr<mutex> cv_mutex = make_shared<mutex>();
-    shared_ptr<condition_variable> cv = make_shared<condition_variable>();
-    shared_ptr<bool> pullFinish = make_shared<bool>(false);
-    shared_ptr<bool> pullSuccess = make_shared<bool>(false);
-    shared_ptr<vector<shared_ptr<LogEvent>>> sharedData =
-            make_shared<vector<shared_ptr<LogEvent>>>();
-
-    shared_ptr<PullResultReceiver> resultReceiver = SharedRefBase::make<PullResultReceiver>(
-            [cv_mutex, cv, pullFinish, pullSuccess, sharedData](
-                    int32_t atomTag, bool success, const vector<StatsEventParcel>& output) {
-                // This is the result of the pull, executing in a statsd binder thread.
-                // The pull could have taken a long time, and we should only modify
-                // data (the output param) if the pointer is in scope and the pull did not time out.
-                {
-                    lock_guard<mutex> lk(*cv_mutex);
-                    for (const StatsEventParcel& parcel: output) {
-                        shared_ptr<LogEvent> event = make_shared<LogEvent>(/*uid=*/-1, /*pid=*/-1);
-                        bool valid = event->parseBuffer((uint8_t*)parcel.buffer.data(),
-                                                        parcel.buffer.size());
-                        if (valid) {
-                            sharedData->push_back(event);
-                        } else {
-                            StatsdStats::getInstance().noteAtomError(event->GetTagId(),
-                                                                     /*pull=*/true);
-                        }
-                    }
-                    *pullSuccess = success;
-                    *pullFinish = true;
-                }
-                cv->notify_one();
-            });
-
-    // Initiate the pull. This is a oneway call to a different process, except
-    // in unit tests. In process calls are not oneway.
-    Status status = mCallback->onPullAtom(mTagId, resultReceiver);
-    if (!status.isOk()) {
-        StatsdStats::getInstance().notePullBinderCallFailed(mTagId);
-        return false;
-    }
-
-    {
-        unique_lock<mutex> unique_lk(*cv_mutex);
-        // Wait until the pull finishes, or until the pull timeout.
-        cv->wait_for(unique_lk, chrono::nanoseconds(mPullTimeoutNs),
-                     [pullFinish] { return *pullFinish; });
-        if (!*pullFinish) {
-            // Note: The parent stats puller will also note that there was a timeout and that the
-            // cache should be cleared. Once we migrate all pullers to this callback, we could
-            // consolidate the logic.
-            return true;
-        } else {
-            // Only copy the data if we did not timeout and the pull was successful.
-            if (*pullSuccess) {
-                *data = std::move(*sharedData);
-            }
-            VLOG("StatsCallbackPuller::pull succeeded for %d", mTagId);
-            return *pullSuccess;
-        }
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/StatsCallbackPuller.h b/cmds/statsd/src/external/StatsCallbackPuller.h
deleted file mode 100644
index e82e8bb..0000000
--- a/cmds/statsd/src/external/StatsCallbackPuller.h
+++ /dev/null
@@ -1,46 +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.
- */
-
-#pragma once
-
-#include <aidl/android/os/IPullAtomCallback.h>
-#include "StatsPuller.h"
-
-using aidl::android::os::IPullAtomCallback;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class StatsCallbackPuller : public StatsPuller {
-public:
-    explicit StatsCallbackPuller(int tagId, const shared_ptr<IPullAtomCallback>& callback,
-                                 const int64_t coolDownNs, const int64_t timeoutNs,
-                                 const std::vector<int> additiveFields);
-
-private:
-    bool PullInternal(vector<std::shared_ptr<LogEvent>>* data) override;
-    const shared_ptr<IPullAtomCallback> mCallback;
-
-    FRIEND_TEST(StatsCallbackPullerTest, PullFail);
-    FRIEND_TEST(StatsCallbackPullerTest, PullSuccess);
-    FRIEND_TEST(StatsCallbackPullerTest, PullTimeout);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/StatsPuller.cpp b/cmds/statsd/src/external/StatsPuller.cpp
deleted file mode 100644
index bb5d0a6..0000000
--- a/cmds/statsd/src/external/StatsPuller.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "StatsPuller.h"
-#include "StatsPullerManager.h"
-#include "guardrail/StatsdStats.h"
-#include "puller_util.h"
-#include "stats_log_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::lock_guard;
-
-sp<UidMap> StatsPuller::mUidMap = nullptr;
-void StatsPuller::SetUidMap(const sp<UidMap>& uidMap) { mUidMap = uidMap; }
-
-StatsPuller::StatsPuller(const int tagId, const int64_t coolDownNs, const int64_t pullTimeoutNs,
-                         const std::vector<int> additiveFields)
-    : mTagId(tagId),
-      mPullTimeoutNs(pullTimeoutNs),
-      mCoolDownNs(coolDownNs),
-      mAdditiveFields(additiveFields),
-      mLastPullTimeNs(0),
-      mLastEventTimeNs(0) {
-}
-
-bool StatsPuller::Pull(const int64_t eventTimeNs, std::vector<std::shared_ptr<LogEvent>>* data) {
-    lock_guard<std::mutex> lock(mLock);
-    const int64_t elapsedTimeNs = getElapsedRealtimeNs();
-    const int64_t systemUptimeMillis = getSystemUptimeMillis();
-    StatsdStats::getInstance().notePull(mTagId);
-    const bool shouldUseCache =
-            (mLastEventTimeNs == eventTimeNs) || (elapsedTimeNs - mLastPullTimeNs < mCoolDownNs);
-    if (shouldUseCache) {
-        if (mHasGoodData) {
-            (*data) = mCachedData;
-            StatsdStats::getInstance().notePullFromCache(mTagId);
-
-        }
-        return mHasGoodData;
-    }
-    if (mLastPullTimeNs > 0) {
-        StatsdStats::getInstance().updateMinPullIntervalSec(
-                mTagId, (elapsedTimeNs - mLastPullTimeNs) / NS_PER_SEC);
-    }
-    mCachedData.clear();
-    mLastPullTimeNs = elapsedTimeNs;
-    mLastEventTimeNs = eventTimeNs;
-    mHasGoodData = PullInternal(&mCachedData);
-    if (!mHasGoodData) {
-        return mHasGoodData;
-    }
-    const int64_t pullElapsedDurationNs = getElapsedRealtimeNs() - elapsedTimeNs;
-    const int64_t pullSystemUptimeDurationMillis = getSystemUptimeMillis() - systemUptimeMillis;
-    StatsdStats::getInstance().notePullTime(mTagId, pullElapsedDurationNs);
-    const bool pullTimeOut = pullElapsedDurationNs > mPullTimeoutNs;
-    if (pullTimeOut) {
-        // Something went wrong. Discard the data.
-        mCachedData.clear();
-        mHasGoodData = false;
-        StatsdStats::getInstance().notePullTimeout(
-                mTagId, pullSystemUptimeDurationMillis, NanoToMillis(pullElapsedDurationNs));
-        ALOGW("Pull for atom %d exceeds timeout %lld nano seconds.", mTagId,
-              (long long)pullElapsedDurationNs);
-        return mHasGoodData;
-    }
-
-    if (mCachedData.size() > 0) {
-        mapAndMergeIsolatedUidsToHostUid(mCachedData, mUidMap, mTagId, mAdditiveFields);
-    }
-
-    if (mCachedData.empty()) {
-        VLOG("Data pulled is empty");
-        StatsdStats::getInstance().noteEmptyData(mTagId);
-    }
-
-    (*data) = mCachedData;
-    return mHasGoodData;
-}
-
-int StatsPuller::ForceClearCache() {
-    return clearCache();
-}
-
-int StatsPuller::clearCache() {
-    lock_guard<std::mutex> lock(mLock);
-    return clearCacheLocked();
-}
-
-int StatsPuller::clearCacheLocked() {
-    int ret = mCachedData.size();
-    mCachedData.clear();
-    mLastPullTimeNs = 0;
-    mLastEventTimeNs = 0;
-    return ret;
-}
-
-int StatsPuller::ClearCacheIfNecessary(int64_t timestampNs) {
-    if (timestampNs - mLastPullTimeNs > mCoolDownNs) {
-        return clearCache();
-    } else {
-        return 0;
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/StatsPuller.h b/cmds/statsd/src/external/StatsPuller.h
deleted file mode 100644
index 470d15e..0000000
--- a/cmds/statsd/src/external/StatsPuller.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <aidl/android/os/IStatsCompanionService.h>
-#include <utils/RefBase.h>
-#include <mutex>
-#include <vector>
-#include "packages/UidMap.h"
-
-#include "guardrail/StatsdStats.h"
-#include "logd/LogEvent.h"
-#include "puller_util.h"
-
-using aidl::android::os::IStatsCompanionService;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class StatsPuller : public virtual RefBase {
-public:
-    explicit StatsPuller(const int tagId,
-                         const int64_t coolDownNs = NS_PER_SEC,
-                         const int64_t pullTimeoutNs = StatsdStats::kPullMaxDelayNs,
-                         const std::vector<int> additiveFields = std::vector<int>());
-
-    virtual ~StatsPuller() {}
-
-    // Pulls the most recent data.
-    // The data may be served from cache if consecutive pulls come within
-    // predefined cooldown time.
-    // Returns true if the pull was successful.
-    // Returns false when
-    //   1) the pull fails
-    //   2) pull takes longer than mPullTimeoutNs (intrinsic to puller)
-    // If a metric wants to make any change to the data, like timestamps, it
-    // should make a copy as this data may be shared with multiple metrics.
-    bool Pull(const int64_t eventTimeNs, std::vector<std::shared_ptr<LogEvent>>* data);
-
-    // Clear cache immediately
-    int ForceClearCache();
-
-    // Clear cache if elapsed time is more than cooldown time
-    int ClearCacheIfNecessary(int64_t timestampNs);
-
-    static void SetUidMap(const sp<UidMap>& uidMap);
-
-    virtual void SetStatsCompanionService(
-            shared_ptr<IStatsCompanionService> statsCompanionService) {};
-
-protected:
-    const int mTagId;
-
-    // Max time allowed to pull this atom.
-    // We cannot reliably kill a pull thread. So we don't terminate the puller.
-    // The data is discarded if the pull takes longer than this and mHasGoodData
-    // marked as false.
-    const int64_t mPullTimeoutNs = StatsdStats::kPullMaxDelayNs;
-
-private:
-    mutable std::mutex mLock;
-
-    // Real puller impl.
-    virtual bool PullInternal(std::vector<std::shared_ptr<LogEvent>>* data) = 0;
-
-    bool mHasGoodData = false;
-
-    // Minimum time before this puller does actual pull again.
-    // Pullers can cause significant impact to system health and battery.
-    // So that we don't pull too frequently.
-    // If a pull request comes before cooldown, a cached version from previous pull
-    // will be returned.
-    const int64_t mCoolDownNs = 1 * NS_PER_SEC;
-
-    // The field numbers of the fields that need to be summed when merging
-    // isolated uid with host uid.
-    const std::vector<int> mAdditiveFields;
-
-    int64_t mLastPullTimeNs;
-
-    // All pulls happen due to an event (app upgrade, bucket boundary, condition change, etc).
-    // If multiple pulls need to be done at the same event time, we will always use the cache after
-    // the first pull.
-    int64_t mLastEventTimeNs;
-
-    // Cache of data from last pull. If next request comes before cool down finishes,
-    // cached data will be returned.
-    // Cached data is cleared when
-    //   1) A pull fails
-    //   2) A new pull request comes after cooldown time.
-    //   3) clearCache is called.
-    std::vector<std::shared_ptr<LogEvent>> mCachedData;
-
-    int clearCache();
-
-    int clearCacheLocked();
-
-    static sp<UidMap> mUidMap;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/StatsPullerManager.cpp b/cmds/statsd/src/external/StatsPullerManager.cpp
deleted file mode 100644
index 8a9ec74..0000000
--- a/cmds/statsd/src/external/StatsPullerManager.cpp
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false
-#include "Log.h"
-
-#include "StatsPullerManager.h"
-
-#include <cutils/log.h>
-#include <math.h>
-#include <stdint.h>
-
-#include <algorithm>
-#include <iostream>
-
-#include "../StatsService.h"
-#include "../logd/LogEvent.h"
-#include "../stats_log_util.h"
-#include "../statscompanion_util.h"
-#include "StatsCallbackPuller.h"
-#include "TrainInfoPuller.h"
-#include "statslog_statsd.h"
-
-using std::shared_ptr;
-using std::vector;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Stores the puller as a wp to avoid holding a reference in case it is unregistered and
-// pullAtomCallbackDied is never called.
-struct PullAtomCallbackDeathCookie {
-    PullAtomCallbackDeathCookie(const wp<StatsPullerManager>& pullerManager,
-                                const PullerKey& pullerKey, const wp<StatsPuller>& puller) :
-            mPullerManager(pullerManager), mPullerKey(pullerKey), mPuller(puller) {
-    }
-
-    wp<StatsPullerManager> mPullerManager;
-    PullerKey mPullerKey;
-    wp<StatsPuller> mPuller;
-};
-
-void StatsPullerManager::pullAtomCallbackDied(void* cookie) {
-    PullAtomCallbackDeathCookie* cookie_ = static_cast<PullAtomCallbackDeathCookie*>(cookie);
-    sp<StatsPullerManager> thiz = cookie_->mPullerManager.promote();
-    if (!thiz) {
-        return;
-    }
-
-    const PullerKey& pullerKey = cookie_->mPullerKey;
-    wp<StatsPuller> puller = cookie_->mPuller;
-
-    // Erase the mapping from the puller key to the puller if the mapping still exists.
-    // Note that we are removing the StatsPuller object, which internally holds the binder
-    // IPullAtomCallback. However, each new registration creates a new StatsPuller, so this works.
-    lock_guard<mutex> lock(thiz->mLock);
-    const auto& it = thiz->kAllPullAtomInfo.find(pullerKey);
-    if (it != thiz->kAllPullAtomInfo.end() && puller != nullptr && puller == it->second) {
-        StatsdStats::getInstance().notePullerCallbackRegistrationChanged(pullerKey.atomTag,
-                                                                         /*registered=*/false);
-        thiz->kAllPullAtomInfo.erase(pullerKey);
-    }
-    // The death recipient corresponding to this specific IPullAtomCallback can never
-    // be triggered again, so free up resources.
-    delete cookie_;
-}
-
-// Values smaller than this may require to update the alarm.
-const int64_t NO_ALARM_UPDATE = INT64_MAX;
-
-StatsPullerManager::StatsPullerManager()
-    : kAllPullAtomInfo({
-              // TrainInfo.
-              {{.atomTag = util::TRAIN_INFO, .uid = AID_STATSD}, new TrainInfoPuller()},
-      }),
-      mNextPullTimeNs(NO_ALARM_UPDATE),
-      mPullAtomCallbackDeathRecipient(AIBinder_DeathRecipient_new(pullAtomCallbackDied)) {
-}
-
-bool StatsPullerManager::Pull(int tagId, const ConfigKey& configKey, const int64_t eventTimeNs,
-                              vector<shared_ptr<LogEvent>>* data, bool useUids) {
-    std::lock_guard<std::mutex> _l(mLock);
-    return PullLocked(tagId, configKey, eventTimeNs, data, useUids);
-}
-
-bool StatsPullerManager::Pull(int tagId, const vector<int32_t>& uids, const int64_t eventTimeNs,
-                              vector<std::shared_ptr<LogEvent>>* data, bool useUids) {
-    std::lock_guard<std::mutex> _l(mLock);
-    return PullLocked(tagId, uids, eventTimeNs, data, useUids);
-}
-
-bool StatsPullerManager::PullLocked(int tagId, const ConfigKey& configKey,
-                                    const int64_t eventTimeNs, vector<shared_ptr<LogEvent>>* data,
-                                    bool useUids) {
-    vector<int32_t> uids;
-    if (useUids) {
-        auto uidProviderIt = mPullUidProviders.find(configKey);
-        if (uidProviderIt == mPullUidProviders.end()) {
-            ALOGE("Error pulling tag %d. No pull uid provider for config key %s", tagId,
-                  configKey.ToString().c_str());
-            StatsdStats::getInstance().notePullUidProviderNotFound(tagId);
-            return false;
-        }
-        sp<PullUidProvider> pullUidProvider = uidProviderIt->second.promote();
-        if (pullUidProvider == nullptr) {
-            ALOGE("Error pulling tag %d, pull uid provider for config %s is gone.", tagId,
-                  configKey.ToString().c_str());
-            StatsdStats::getInstance().notePullUidProviderNotFound(tagId);
-            return false;
-        }
-        uids = pullUidProvider->getPullAtomUids(tagId);
-    }
-    return PullLocked(tagId, uids, eventTimeNs, data, useUids);
-}
-
-bool StatsPullerManager::PullLocked(int tagId, const vector<int32_t>& uids,
-                                    const int64_t eventTimeNs, vector<shared_ptr<LogEvent>>* data,
-                                    bool useUids) {
-    VLOG("Initiating pulling %d", tagId);
-    if (useUids) {
-        for (int32_t uid : uids) {
-            PullerKey key = {.atomTag = tagId, .uid = uid};
-            auto pullerIt = kAllPullAtomInfo.find(key);
-            if (pullerIt != kAllPullAtomInfo.end()) {
-                bool ret = pullerIt->second->Pull(eventTimeNs, data);
-                VLOG("pulled %zu items", data->size());
-                if (!ret) {
-                    StatsdStats::getInstance().notePullFailed(tagId);
-                }
-                return ret;
-            }
-        }
-        StatsdStats::getInstance().notePullerNotFound(tagId);
-        ALOGW("StatsPullerManager: Unknown tagId %d", tagId);
-        return false;  // Return early since we don't know what to pull.
-    } else {
-        PullerKey key = {.atomTag = tagId, .uid = -1};
-        auto pullerIt = kAllPullAtomInfo.find(key);
-        if (pullerIt != kAllPullAtomInfo.end()) {
-            bool ret = pullerIt->second->Pull(eventTimeNs, data);
-            VLOG("pulled %zu items", data->size());
-            if (!ret) {
-                StatsdStats::getInstance().notePullFailed(tagId);
-            }
-            return ret;
-        }
-        ALOGW("StatsPullerManager: Unknown tagId %d", tagId);
-        return false;  // Return early since we don't know what to pull.
-    }
-}
-
-bool StatsPullerManager::PullerForMatcherExists(int tagId) const {
-    // Pulled atoms might be registered after we parse the config, so just make sure the id is in
-    // an appropriate range.
-    return isVendorPulledAtom(tagId) || isPulledAtom(tagId);
-}
-
-void StatsPullerManager::updateAlarmLocked() {
-    if (mNextPullTimeNs == NO_ALARM_UPDATE) {
-        VLOG("No need to set alarms. Skipping");
-        return;
-    }
-
-    // TODO(b/151045771): do not hold a lock while making a binder call
-    if (mStatsCompanionService != nullptr) {
-        mStatsCompanionService->setPullingAlarm(mNextPullTimeNs / 1000000);
-    } else {
-        VLOG("StatsCompanionService not available. Alarm not set.");
-    }
-    return;
-}
-
-void StatsPullerManager::SetStatsCompanionService(
-        shared_ptr<IStatsCompanionService> statsCompanionService) {
-    std::lock_guard<std::mutex> _l(mLock);
-    shared_ptr<IStatsCompanionService> tmpForLock = mStatsCompanionService;
-    mStatsCompanionService = statsCompanionService;
-    for (const auto& pulledAtom : kAllPullAtomInfo) {
-        pulledAtom.second->SetStatsCompanionService(statsCompanionService);
-    }
-    if (mStatsCompanionService != nullptr) {
-        updateAlarmLocked();
-    }
-}
-
-void StatsPullerManager::RegisterReceiver(int tagId, const ConfigKey& configKey,
-                                          wp<PullDataReceiver> receiver, int64_t nextPullTimeNs,
-                                          int64_t intervalNs) {
-    std::lock_guard<std::mutex> _l(mLock);
-    auto& receivers = mReceivers[{.atomTag = tagId, .configKey = configKey}];
-    for (auto it = receivers.begin(); it != receivers.end(); it++) {
-        if (it->receiver == receiver) {
-            VLOG("Receiver already registered of %d", (int)receivers.size());
-            return;
-        }
-    }
-    ReceiverInfo receiverInfo;
-    receiverInfo.receiver = receiver;
-
-    // Round it to the nearest minutes. This is the limit of alarm manager.
-    // In practice, we should always have larger buckets.
-    int64_t roundedIntervalNs = intervalNs / NS_PER_SEC / 60 * NS_PER_SEC * 60;
-    // Scheduled pulling should be at least 1 min apart.
-    // This can be lower in cts tests, in which case we round it to 1 min.
-    if (roundedIntervalNs < 60 * (int64_t)NS_PER_SEC) {
-        roundedIntervalNs = 60 * (int64_t)NS_PER_SEC;
-    }
-
-    receiverInfo.intervalNs = roundedIntervalNs;
-    receiverInfo.nextPullTimeNs = nextPullTimeNs;
-    receivers.push_back(receiverInfo);
-
-    // There is only one alarm for all pulled events. So only set it to the smallest denom.
-    if (nextPullTimeNs < mNextPullTimeNs) {
-        VLOG("Updating next pull time %lld", (long long)mNextPullTimeNs);
-        mNextPullTimeNs = nextPullTimeNs;
-        updateAlarmLocked();
-    }
-    VLOG("Puller for tagId %d registered of %d", tagId, (int)receivers.size());
-}
-
-void StatsPullerManager::UnRegisterReceiver(int tagId, const ConfigKey& configKey,
-                                            wp<PullDataReceiver> receiver) {
-    std::lock_guard<std::mutex> _l(mLock);
-    auto receiversIt = mReceivers.find({.atomTag = tagId, .configKey = configKey});
-    if (receiversIt == mReceivers.end()) {
-        VLOG("Unknown pull code or no receivers: %d", tagId);
-        return;
-    }
-    std::list<ReceiverInfo>& receivers = receiversIt->second;
-    for (auto it = receivers.begin(); it != receivers.end(); it++) {
-        if (receiver == it->receiver) {
-            receivers.erase(it);
-            VLOG("Puller for tagId %d unregistered of %d", tagId, (int)receivers.size());
-            return;
-        }
-    }
-}
-
-void StatsPullerManager::RegisterPullUidProvider(const ConfigKey& configKey,
-                                                 wp<PullUidProvider> provider) {
-    std::lock_guard<std::mutex> _l(mLock);
-    mPullUidProviders[configKey] = provider;
-}
-
-void StatsPullerManager::UnregisterPullUidProvider(const ConfigKey& configKey,
-                                                   wp<PullUidProvider> provider) {
-    std::lock_guard<std::mutex> _l(mLock);
-    const auto& it = mPullUidProviders.find(configKey);
-    if (it != mPullUidProviders.end() && it->second == provider) {
-        mPullUidProviders.erase(it);
-    }
-}
-
-void StatsPullerManager::OnAlarmFired(int64_t elapsedTimeNs) {
-    std::lock_guard<std::mutex> _l(mLock);
-    int64_t wallClockNs = getWallClockNs();
-
-    int64_t minNextPullTimeNs = NO_ALARM_UPDATE;
-
-    vector<pair<const ReceiverKey*, vector<ReceiverInfo*>>> needToPull;
-    for (auto& pair : mReceivers) {
-        vector<ReceiverInfo*> receivers;
-        if (pair.second.size() != 0) {
-            for (ReceiverInfo& receiverInfo : pair.second) {
-                if (receiverInfo.nextPullTimeNs <= elapsedTimeNs) {
-                    receivers.push_back(&receiverInfo);
-                } else {
-                    if (receiverInfo.nextPullTimeNs < minNextPullTimeNs) {
-                        minNextPullTimeNs = receiverInfo.nextPullTimeNs;
-                    }
-                }
-            }
-            if (receivers.size() > 0) {
-                needToPull.push_back(make_pair(&pair.first, receivers));
-            }
-        }
-    }
-    for (const auto& pullInfo : needToPull) {
-        vector<shared_ptr<LogEvent>> data;
-        bool pullSuccess = PullLocked(pullInfo.first->atomTag, pullInfo.first->configKey,
-                                      elapsedTimeNs, &data);
-        if (!pullSuccess) {
-            VLOG("pull failed at %lld, will try again later", (long long)elapsedTimeNs);
-        }
-
-        // Convention is to mark pull atom timestamp at request time.
-        // If we pull at t0, puller starts at t1, finishes at t2, and send back
-        // at t3, we mark t0 as its timestamp, which should correspond to its
-        // triggering event, such as condition change at t0.
-        // Here the triggering event is alarm fired from AlarmManager.
-        // In ValueMetricProducer and GaugeMetricProducer we do same thing
-        // when pull on condition change, etc.
-        for (auto& event : data) {
-            event->setElapsedTimestampNs(elapsedTimeNs);
-            event->setLogdWallClockTimestampNs(wallClockNs);
-        }
-
-        for (const auto& receiverInfo : pullInfo.second) {
-            sp<PullDataReceiver> receiverPtr = receiverInfo->receiver.promote();
-            if (receiverPtr != nullptr) {
-                receiverPtr->onDataPulled(data, pullSuccess, elapsedTimeNs);
-                // We may have just come out of a coma, compute next pull time.
-                int numBucketsAhead =
-                        (elapsedTimeNs - receiverInfo->nextPullTimeNs) / receiverInfo->intervalNs;
-                receiverInfo->nextPullTimeNs += (numBucketsAhead + 1) * receiverInfo->intervalNs;
-                if (receiverInfo->nextPullTimeNs < minNextPullTimeNs) {
-                    minNextPullTimeNs = receiverInfo->nextPullTimeNs;
-                }
-            } else {
-                VLOG("receiver already gone.");
-            }
-        }
-    }
-
-    VLOG("mNextPullTimeNs: %lld updated to %lld", (long long)mNextPullTimeNs,
-         (long long)minNextPullTimeNs);
-    mNextPullTimeNs = minNextPullTimeNs;
-    updateAlarmLocked();
-}
-
-int StatsPullerManager::ForceClearPullerCache() {
-    int totalCleared = 0;
-    for (const auto& pulledAtom : kAllPullAtomInfo) {
-        totalCleared += pulledAtom.second->ForceClearCache();
-    }
-    return totalCleared;
-}
-
-int StatsPullerManager::ClearPullerCacheIfNecessary(int64_t timestampNs) {
-    int totalCleared = 0;
-    for (const auto& pulledAtom : kAllPullAtomInfo) {
-        totalCleared += pulledAtom.second->ClearCacheIfNecessary(timestampNs);
-    }
-    return totalCleared;
-}
-
-void StatsPullerManager::RegisterPullAtomCallback(const int uid, const int32_t atomTag,
-                                                  const int64_t coolDownNs, const int64_t timeoutNs,
-                                                  const vector<int32_t>& additiveFields,
-                                                  const shared_ptr<IPullAtomCallback>& callback,
-                                                  bool useUid) {
-    std::lock_guard<std::mutex> _l(mLock);
-    VLOG("RegisterPullerCallback: adding puller for tag %d", atomTag);
-
-    if (callback == nullptr) {
-        ALOGW("SetPullAtomCallback called with null callback for atom %d.", atomTag);
-        return;
-    }
-
-    StatsdStats::getInstance().notePullerCallbackRegistrationChanged(atomTag, /*registered=*/true);
-    int64_t actualCoolDownNs = coolDownNs < kMinCoolDownNs ? kMinCoolDownNs : coolDownNs;
-    int64_t actualTimeoutNs = timeoutNs > kMaxTimeoutNs ? kMaxTimeoutNs : timeoutNs;
-
-    sp<StatsCallbackPuller> puller = new StatsCallbackPuller(atomTag, callback, actualCoolDownNs,
-                                                             actualTimeoutNs, additiveFields);
-    PullerKey key = {.atomTag = atomTag, .uid = useUid ? uid : -1};
-    AIBinder_linkToDeath(callback->asBinder().get(), mPullAtomCallbackDeathRecipient.get(),
-                         new PullAtomCallbackDeathCookie(this, key, puller));
-    kAllPullAtomInfo[key] = puller;
-}
-
-void StatsPullerManager::UnregisterPullAtomCallback(const int uid, const int32_t atomTag,
-                                                    bool useUids) {
-    std::lock_guard<std::mutex> _l(mLock);
-    PullerKey key = {.atomTag = atomTag, .uid = useUids ? uid : -1};
-    if (kAllPullAtomInfo.find(key) != kAllPullAtomInfo.end()) {
-        StatsdStats::getInstance().notePullerCallbackRegistrationChanged(atomTag,
-                                                                         /*registered=*/false);
-        kAllPullAtomInfo.erase(key);
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/StatsPullerManager.h b/cmds/statsd/src/external/StatsPullerManager.h
deleted file mode 100644
index 194a0f5..0000000
--- a/cmds/statsd/src/external/StatsPullerManager.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <aidl/android/os/IPullAtomCallback.h>
-#include <aidl/android/os/IStatsCompanionService.h>
-#include <utils/RefBase.h>
-
-#include <list>
-#include <vector>
-
-#include "PullDataReceiver.h"
-#include "PullUidProvider.h"
-#include "StatsPuller.h"
-#include "guardrail/StatsdStats.h"
-#include "logd/LogEvent.h"
-#include "packages/UidMap.h"
-
-using aidl::android::os::IPullAtomCallback;
-using aidl::android::os::IStatsCompanionService;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-typedef struct PullerKey {
-    // The uid of the process that registers this puller.
-    const int uid = -1;
-    // The atom that this puller is for.
-    const int atomTag;
-
-    bool operator<(const PullerKey& that) const {
-        if (uid < that.uid) {
-            return true;
-        }
-        if (uid > that.uid) {
-            return false;
-        }
-        return atomTag < that.atomTag;
-    };
-
-    bool operator==(const PullerKey& that) const {
-        return uid == that.uid && atomTag == that.atomTag;
-    };
-} PullerKey;
-
-class StatsPullerManager : public virtual RefBase {
-public:
-    StatsPullerManager();
-
-    virtual ~StatsPullerManager() {
-    }
-
-
-    // Registers a receiver for tagId. It will be pulled on the nextPullTimeNs
-    // and then every intervalNs thereafter.
-    virtual void RegisterReceiver(int tagId, const ConfigKey& configKey,
-                                  wp<PullDataReceiver> receiver, int64_t nextPullTimeNs,
-                                  int64_t intervalNs);
-
-    // Stop listening on a tagId.
-    virtual void UnRegisterReceiver(int tagId, const ConfigKey& configKey,
-                                    wp<PullDataReceiver> receiver);
-
-    // Registers a pull uid provider for the config key. When pulling atoms, it will be used to
-    // determine which uids to pull from.
-    virtual void RegisterPullUidProvider(const ConfigKey& configKey, wp<PullUidProvider> provider);
-
-    // Unregister a pull uid provider.
-    virtual void UnregisterPullUidProvider(const ConfigKey& configKey,
-                                           wp<PullUidProvider> provider);
-
-    // Verify if we know how to pull for this matcher
-    bool PullerForMatcherExists(int tagId) const;
-
-    void OnAlarmFired(int64_t elapsedTimeNs);
-
-    // Pulls the most recent data.
-    // The data may be served from cache if consecutive pulls come within
-    // mCoolDownNs.
-    // Returns true if the pull was successful.
-    // Returns false when
-    //   1) the pull fails
-    //   2) pull takes longer than mPullTimeoutNs (intrinsic to puller)
-    //   3) Either a PullUidProvider was not registered for the config, or the there was no puller
-    //      registered for any of the uids for this atom.
-    // If the metric wants to make any change to the data, like timestamps, they
-    // should make a copy as this data may be shared with multiple metrics.
-    virtual bool Pull(int tagId, const ConfigKey& configKey, const int64_t eventTimeNs,
-                      vector<std::shared_ptr<LogEvent>>* data, bool useUids = true);
-
-    // Same as above, but directly specify the allowed uids to pull from.
-    virtual bool Pull(int tagId, const vector<int32_t>& uids, const int64_t eventTimeNs,
-                      vector<std::shared_ptr<LogEvent>>* data, bool useUids = true);
-
-    // Clear pull data cache immediately.
-    int ForceClearPullerCache();
-
-    // Clear pull data cache if it is beyond respective cool down time.
-    int ClearPullerCacheIfNecessary(int64_t timestampNs);
-
-    void SetStatsCompanionService(shared_ptr<IStatsCompanionService> statsCompanionService);
-
-    void RegisterPullAtomCallback(const int uid, const int32_t atomTag, const int64_t coolDownNs,
-                                  const int64_t timeoutNs, const vector<int32_t>& additiveFields,
-                                  const shared_ptr<IPullAtomCallback>& callback,
-                                  bool useUid = true);
-
-    void UnregisterPullAtomCallback(const int uid, const int32_t atomTag, bool useUids = true);
-
-    std::map<const PullerKey, sp<StatsPuller>> kAllPullAtomInfo;
-
-private:
-    const static int64_t kMinCoolDownNs = NS_PER_SEC;
-    const static int64_t kMaxTimeoutNs = 10 * NS_PER_SEC;
-    shared_ptr<IStatsCompanionService> mStatsCompanionService = nullptr;
-
-    // A struct containing an atom id and a Config Key
-    typedef struct ReceiverKey {
-        const int atomTag;
-        const ConfigKey configKey;
-
-        inline bool operator<(const ReceiverKey& that) const {
-            return atomTag == that.atomTag ? configKey < that.configKey : atomTag < that.atomTag;
-        }
-    } ReceiverKey;
-
-    typedef struct {
-        int64_t nextPullTimeNs;
-        int64_t intervalNs;
-        wp<PullDataReceiver> receiver;
-    } ReceiverInfo;
-
-    // mapping from Receiver Key to receivers
-    std::map<ReceiverKey, std::list<ReceiverInfo>> mReceivers;
-
-    // mapping from Config Key to the PullUidProvider for that config
-    std::map<ConfigKey, wp<PullUidProvider>> mPullUidProviders;
-
-    bool PullLocked(int tagId, const ConfigKey& configKey, const int64_t eventTimeNs,
-                    vector<std::shared_ptr<LogEvent>>* data, bool useUids = true);
-
-    bool PullLocked(int tagId, const vector<int32_t>& uids, const int64_t eventTimeNs,
-                    vector<std::shared_ptr<LogEvent>>* data, bool useUids);
-
-    // locks for data receiver and StatsCompanionService changes
-    std::mutex mLock;
-
-    void updateAlarmLocked();
-
-    int64_t mNextPullTimeNs;
-
-    // Death recipient that is triggered when the process holding the IPullAtomCallback has died.
-    ::ndk::ScopedAIBinder_DeathRecipient mPullAtomCallbackDeathRecipient;
-
-    /**
-     * Death recipient callback that is called when a pull atom callback dies.
-     * The cookie is a pointer to a PullAtomCallbackDeathCookie.
-     */
-    static void pullAtomCallbackDied(void* cookie);
-
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEvents);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEvent_LateAlarm);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEventsWithActivation);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEventsNoCondition);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents_LateAlarm);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents_WithActivation);
-
-    FRIEND_TEST(StatsLogProcessorTest, TestPullUidProviderSetOnConfigUpdate);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/TrainInfoPuller.cpp b/cmds/statsd/src/external/TrainInfoPuller.cpp
deleted file mode 100644
index 3837f4a..0000000
--- a/cmds/statsd/src/external/TrainInfoPuller.cpp
+++ /dev/null
@@ -1,55 +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.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "external/StatsPuller.h"
-
-#include "TrainInfoPuller.h"
-#include "logd/LogEvent.h"
-#include "stats_log_util.h"
-#include "statslog_statsd.h"
-#include "storage/StorageManager.h"
-
-using std::make_shared;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-TrainInfoPuller::TrainInfoPuller() :
-    StatsPuller(util::TRAIN_INFO) {
-}
-
-bool TrainInfoPuller::PullInternal(vector<shared_ptr<LogEvent>>* data) {
-    vector<InstallTrainInfo> trainInfoList =
-        StorageManager::readAllTrainInfo();
-    if (trainInfoList.empty()) {
-        ALOGW("Train info was empty.");
-        return true;
-    }
-    for (InstallTrainInfo& trainInfo : trainInfoList) {
-        auto event = make_shared<LogEvent>(getWallClockNs(), getElapsedRealtimeNs(), trainInfo);
-        data->push_back(event);
-    }
-    return true;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/TrainInfoPuller.h b/cmds/statsd/src/external/TrainInfoPuller.h
deleted file mode 100644
index 615d023..0000000
--- a/cmds/statsd/src/external/TrainInfoPuller.h
+++ /dev/null
@@ -1,38 +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.
- */
-
-#pragma once
-
-#include "StatsPuller.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * Reads train info from disk.
- */
-class TrainInfoPuller : public StatsPuller {
- public:
-  TrainInfoPuller();
-
- private:
-  bool PullInternal(vector<std::shared_ptr<LogEvent>>* data) override;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/puller_util.cpp b/cmds/statsd/src/external/puller_util.cpp
deleted file mode 100644
index aa99d00..0000000
--- a/cmds/statsd/src/external/puller_util.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "puller_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using namespace std;
-
-/**
- * Process all data and merge isolated with host if necessary.
- * For example:
- *   NetworkBytesAtom {
- *       int uid = 1;
- *       State process_state = 2;
- *       int byte_send = 3;
- *       int byte_recv = 4;
- *   }
- *   additive fields are {3, 4}
- * If we pulled the following events (uid1_child is an isolated uid which maps to uid1):
- * [uid1, fg, 100, 200]
- * [uid1_child, fg, 100, 200]
- * [uid1, bg, 100, 200]
- *
- * We want to merge them and results should be:
- * [uid1, fg, 200, 400]
- * [uid1, bg, 100, 200]
- *
- * All atoms should be of the same tagId. All fields should be present.
- */
-void mapAndMergeIsolatedUidsToHostUid(vector<shared_ptr<LogEvent>>& data, const sp<UidMap>& uidMap,
-                                      int tagId, const vector<int>& additiveFieldsVec) {
-    // Check the first LogEvent for attribution chain or a uid field as either all atoms with this
-    // tagId have them or none of them do.
-    std::pair<int, int> attrIndexRange;
-    const bool hasAttributionChain = data[0]->hasAttributionChain(&attrIndexRange);
-    bool hasUidField = (data[0]->getUidFieldIndex() != -1);
-
-    if (!hasAttributionChain && !hasUidField) {
-        VLOG("No uid or attribution chain to merge, atom %d", tagId);
-        return;
-    }
-
-    // 1. Map all isolated uid in-place to host uid
-    for (shared_ptr<LogEvent>& event : data) {
-        if (event->GetTagId() != tagId) {
-            ALOGE("Wrong atom. Expecting %d, got %d", tagId, event->GetTagId());
-            return;
-        }
-        if (hasAttributionChain) {
-            vector<FieldValue>* const fieldValues = event->getMutableValues();
-            for (int i = attrIndexRange.first; i <= attrIndexRange.second; i++) {
-                FieldValue& fieldValue = fieldValues->at(i);
-                if (isAttributionUidField(fieldValue)) {
-                    const int hostUid = uidMap->getHostUidOrSelf(fieldValue.mValue.int_value);
-                    fieldValue.mValue.setInt(hostUid);
-                }
-            }
-        } else {
-            int uidFieldIndex = event->getUidFieldIndex();
-            if (uidFieldIndex != -1) {
-                Value& value = (*event->getMutableValues())[uidFieldIndex].mValue;
-                const int hostUid = uidMap->getHostUidOrSelf(value.int_value);
-                value.setInt(hostUid);
-            } else {
-                ALOGE("Malformed log, uid not found. %s", event->ToString().c_str());
-            }
-        }
-    }
-
-    // 2. sort the data, bit-wise
-    sort(data.begin(), data.end(),
-         [](const shared_ptr<LogEvent>& lhs, const shared_ptr<LogEvent>& rhs) {
-             if (lhs->size() != rhs->size()) {
-                 return lhs->size() < rhs->size();
-             }
-             const std::vector<FieldValue>& lhsValues = lhs->getValues();
-             const std::vector<FieldValue>& rhsValues = rhs->getValues();
-             for (int i = 0; i < (int)lhs->size(); i++) {
-                 if (lhsValues[i] != rhsValues[i]) {
-                     return lhsValues[i] < rhsValues[i];
-                 }
-             }
-             return false;
-         });
-
-    vector<shared_ptr<LogEvent>> mergedData;
-    const set<int> additiveFields(additiveFieldsVec.begin(), additiveFieldsVec.end());
-    bool needMerge = true;
-
-    // 3. do the merge.
-    // The loop invariant is this: for every event, check if it differs on
-    // non-additive fields, or have different attribution chain length.
-    // If so, no need to merge, add itself to the result.
-    // Otherwise, merge the value onto the one immediately next to it.
-    for (int i = 0; i < (int)data.size() - 1; i++) {
-        // Size different, must be different chains.
-        if (data[i]->size() != data[i + 1]->size()) {
-            mergedData.push_back(data[i]);
-            continue;
-        }
-        vector<FieldValue>* lhsValues = data[i]->getMutableValues();
-        vector<FieldValue>* rhsValues = data[i + 1]->getMutableValues();
-        needMerge = true;
-        for (int p = 0; p < (int)lhsValues->size(); p++) {
-            if ((*lhsValues)[p] != (*rhsValues)[p]) {
-                int pos = (*lhsValues)[p].mField.getPosAtDepth(0);
-                // Differ on non-additive field, abort.
-                if (additiveFields.find(pos) == additiveFields.end()) {
-                    needMerge = false;
-                    break;
-                }
-            }
-        }
-        if (!needMerge) {
-            mergedData.push_back(data[i]);
-            continue;
-        }
-        // This should be infrequent operation.
-        for (int p = 0; p < (int)lhsValues->size(); p++) {
-            int pos = (*lhsValues)[p].mField.getPosAtDepth(0);
-            if (additiveFields.find(pos) != additiveFields.end()) {
-                (*rhsValues)[p].mValue += (*lhsValues)[p].mValue;
-            }
-        }
-    }
-    mergedData.push_back(data.back());
-
-    data.clear();
-    data = mergedData;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/external/puller_util.h b/cmds/statsd/src/external/puller_util.h
deleted file mode 100644
index afcf68c..0000000
--- a/cmds/statsd/src/external/puller_util.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <vector>
-#include "StatsPuller.h"
-#include "logd/LogEvent.h"
-#include "packages/UidMap.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-void mapAndMergeIsolatedUidsToHostUid(std::vector<std::shared_ptr<LogEvent>>& data,
-                                      const sp<UidMap>& uidMap, int tagId,
-                                      const vector<int>& additiveFieldsVec);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/guardrail/StatsdStats.cpp b/cmds/statsd/src/guardrail/StatsdStats.cpp
deleted file mode 100644
index 6e89038..0000000
--- a/cmds/statsd/src/guardrail/StatsdStats.cpp
+++ /dev/null
@@ -1,1101 +0,0 @@
-/*
- * Copyright 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "StatsdStats.h"
-
-#include <android/util/ProtoOutputStream.h>
-#include "../stats_log_util.h"
-#include "statslog_statsd.h"
-#include "storage/StorageManager.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_FLOAT;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::ProtoOutputStream;
-using std::lock_guard;
-using std::shared_ptr;
-using std::string;
-using std::to_string;
-using std::vector;
-
-const int FIELD_ID_BEGIN_TIME = 1;
-const int FIELD_ID_END_TIME = 2;
-const int FIELD_ID_CONFIG_STATS = 3;
-const int FIELD_ID_ATOM_STATS = 7;
-const int FIELD_ID_UIDMAP_STATS = 8;
-const int FIELD_ID_ANOMALY_ALARM_STATS = 9;
-const int FIELD_ID_PERIODIC_ALARM_STATS = 12;
-const int FIELD_ID_SYSTEM_SERVER_RESTART = 15;
-const int FIELD_ID_LOGGER_ERROR_STATS = 16;
-const int FIELD_ID_OVERFLOW = 18;
-const int FIELD_ID_ACTIVATION_BROADCAST_GUARDRAIL = 19;
-
-const int FIELD_ID_ATOM_STATS_TAG = 1;
-const int FIELD_ID_ATOM_STATS_COUNT = 2;
-const int FIELD_ID_ATOM_STATS_ERROR_COUNT = 3;
-
-const int FIELD_ID_ANOMALY_ALARMS_REGISTERED = 1;
-const int FIELD_ID_PERIODIC_ALARMS_REGISTERED = 1;
-
-const int FIELD_ID_LOG_LOSS_STATS_TIME = 1;
-const int FIELD_ID_LOG_LOSS_STATS_COUNT = 2;
-const int FIELD_ID_LOG_LOSS_STATS_ERROR = 3;
-const int FIELD_ID_LOG_LOSS_STATS_TAG = 4;
-const int FIELD_ID_LOG_LOSS_STATS_UID = 5;
-const int FIELD_ID_LOG_LOSS_STATS_PID = 6;
-
-const int FIELD_ID_OVERFLOW_COUNT = 1;
-const int FIELD_ID_OVERFLOW_MAX_HISTORY = 2;
-const int FIELD_ID_OVERFLOW_MIN_HISTORY = 3;
-
-const int FIELD_ID_CONFIG_STATS_UID = 1;
-const int FIELD_ID_CONFIG_STATS_ID = 2;
-const int FIELD_ID_CONFIG_STATS_CREATION = 3;
-const int FIELD_ID_CONFIG_STATS_RESET = 19;
-const int FIELD_ID_CONFIG_STATS_DELETION = 4;
-const int FIELD_ID_CONFIG_STATS_METRIC_COUNT = 5;
-const int FIELD_ID_CONFIG_STATS_CONDITION_COUNT = 6;
-const int FIELD_ID_CONFIG_STATS_MATCHER_COUNT = 7;
-const int FIELD_ID_CONFIG_STATS_ALERT_COUNT = 8;
-const int FIELD_ID_CONFIG_STATS_VALID = 9;
-const int FIELD_ID_CONFIG_STATS_BROADCAST = 10;
-const int FIELD_ID_CONFIG_STATS_DATA_DROP_TIME = 11;
-const int FIELD_ID_CONFIG_STATS_DATA_DROP_BYTES = 21;
-const int FIELD_ID_CONFIG_STATS_DUMP_REPORT_TIME = 12;
-const int FIELD_ID_CONFIG_STATS_DUMP_REPORT_BYTES = 20;
-const int FIELD_ID_CONFIG_STATS_MATCHER_STATS = 13;
-const int FIELD_ID_CONFIG_STATS_CONDITION_STATS = 14;
-const int FIELD_ID_CONFIG_STATS_METRIC_STATS = 15;
-const int FIELD_ID_CONFIG_STATS_ALERT_STATS = 16;
-const int FIELD_ID_CONFIG_STATS_METRIC_DIMENSION_IN_CONDITION_STATS = 17;
-const int FIELD_ID_CONFIG_STATS_ANNOTATION = 18;
-const int FIELD_ID_CONFIG_STATS_ACTIVATION = 22;
-const int FIELD_ID_CONFIG_STATS_DEACTIVATION = 23;
-const int FIELD_ID_CONFIG_STATS_ANNOTATION_INT64 = 1;
-const int FIELD_ID_CONFIG_STATS_ANNOTATION_INT32 = 2;
-
-const int FIELD_ID_MATCHER_STATS_ID = 1;
-const int FIELD_ID_MATCHER_STATS_COUNT = 2;
-const int FIELD_ID_CONDITION_STATS_ID = 1;
-const int FIELD_ID_CONDITION_STATS_COUNT = 2;
-const int FIELD_ID_METRIC_STATS_ID = 1;
-const int FIELD_ID_METRIC_STATS_COUNT = 2;
-const int FIELD_ID_ALERT_STATS_ID = 1;
-const int FIELD_ID_ALERT_STATS_COUNT = 2;
-
-const int FIELD_ID_UID_MAP_CHANGES = 1;
-const int FIELD_ID_UID_MAP_BYTES_USED = 2;
-const int FIELD_ID_UID_MAP_DROPPED_CHANGES = 3;
-const int FIELD_ID_UID_MAP_DELETED_APPS = 4;
-
-const int FIELD_ID_ACTIVATION_BROADCAST_GUARDRAIL_UID = 1;
-const int FIELD_ID_ACTIVATION_BROADCAST_GUARDRAIL_TIME = 2;
-
-const std::map<int, std::pair<size_t, size_t>> StatsdStats::kAtomDimensionKeySizeLimitMap = {
-        {util::BINDER_CALLS, {6000, 10000}},
-        {util::LOOPER_STATS, {1500, 2500}},
-        {util::CPU_TIME_PER_UID_FREQ, {6000, 10000}},
-};
-
-StatsdStats::StatsdStats() {
-    mPushedAtomStats.resize(kMaxPushedAtomId + 1);
-    mStartTimeSec = getWallClockSec();
-}
-
-StatsdStats& StatsdStats::getInstance() {
-    static StatsdStats statsInstance;
-    return statsInstance;
-}
-
-void StatsdStats::addToIceBoxLocked(shared_ptr<ConfigStats>& stats) {
-    // The size of mIceBox grows strictly by one at a time. It won't be > kMaxIceBoxSize.
-    if (mIceBox.size() == kMaxIceBoxSize) {
-        mIceBox.pop_front();
-    }
-    mIceBox.push_back(stats);
-}
-
-void StatsdStats::noteConfigReceived(
-        const ConfigKey& key, int metricsCount, int conditionsCount, int matchersCount,
-        int alertsCount, const std::list<std::pair<const int64_t, const int32_t>>& annotations,
-        bool isValid) {
-    lock_guard<std::mutex> lock(mLock);
-    int32_t nowTimeSec = getWallClockSec();
-
-    // If there is an existing config for the same key, icebox the old config.
-    noteConfigRemovedInternalLocked(key);
-
-    shared_ptr<ConfigStats> configStats = std::make_shared<ConfigStats>();
-    configStats->uid = key.GetUid();
-    configStats->id = key.GetId();
-    configStats->creation_time_sec = nowTimeSec;
-    configStats->metric_count = metricsCount;
-    configStats->condition_count = conditionsCount;
-    configStats->matcher_count = matchersCount;
-    configStats->alert_count = alertsCount;
-    configStats->is_valid = isValid;
-    for (auto& v : annotations) {
-        configStats->annotations.emplace_back(v);
-    }
-
-    if (isValid) {
-        mConfigStats[key] = configStats;
-    } else {
-        configStats->deletion_time_sec = nowTimeSec;
-        addToIceBoxLocked(configStats);
-    }
-}
-
-void StatsdStats::noteConfigRemovedInternalLocked(const ConfigKey& key) {
-    auto it = mConfigStats.find(key);
-    if (it != mConfigStats.end()) {
-        int32_t nowTimeSec = getWallClockSec();
-        it->second->deletion_time_sec = nowTimeSec;
-        addToIceBoxLocked(it->second);
-        mConfigStats.erase(it);
-    }
-}
-
-void StatsdStats::noteConfigRemoved(const ConfigKey& key) {
-    lock_guard<std::mutex> lock(mLock);
-    noteConfigRemovedInternalLocked(key);
-}
-
-void StatsdStats::noteConfigResetInternalLocked(const ConfigKey& key) {
-    auto it = mConfigStats.find(key);
-    if (it != mConfigStats.end()) {
-        it->second->reset_time_sec = getWallClockSec();
-    }
-}
-
-void StatsdStats::noteConfigReset(const ConfigKey& key) {
-    lock_guard<std::mutex> lock(mLock);
-    noteConfigResetInternalLocked(key);
-}
-
-void StatsdStats::noteLogLost(int32_t wallClockTimeSec, int32_t count, int32_t lastError,
-                              int32_t lastTag, int32_t uid, int32_t pid) {
-    lock_guard<std::mutex> lock(mLock);
-    if (mLogLossStats.size() == kMaxLoggerErrors) {
-        mLogLossStats.pop_front();
-    }
-    mLogLossStats.emplace_back(wallClockTimeSec, count, lastError, lastTag, uid, pid);
-}
-
-void StatsdStats::noteBroadcastSent(const ConfigKey& key) {
-    noteBroadcastSent(key, getWallClockSec());
-}
-
-void StatsdStats::noteBroadcastSent(const ConfigKey& key, int32_t timeSec) {
-    lock_guard<std::mutex> lock(mLock);
-    auto it = mConfigStats.find(key);
-    if (it == mConfigStats.end()) {
-        ALOGE("Config key %s not found!", key.ToString().c_str());
-        return;
-    }
-    if (it->second->broadcast_sent_time_sec.size() == kMaxTimestampCount) {
-        it->second->broadcast_sent_time_sec.pop_front();
-    }
-    it->second->broadcast_sent_time_sec.push_back(timeSec);
-}
-
-void StatsdStats::noteActiveStatusChanged(const ConfigKey& key, bool activated) {
-    noteActiveStatusChanged(key, activated, getWallClockSec());
-}
-
-void StatsdStats::noteActiveStatusChanged(const ConfigKey& key, bool activated, int32_t timeSec) {
-    lock_guard<std::mutex> lock(mLock);
-    auto it = mConfigStats.find(key);
-    if (it == mConfigStats.end()) {
-        ALOGE("Config key %s not found!", key.ToString().c_str());
-        return;
-    }
-    auto& vec = activated ? it->second->activation_time_sec
-                          : it->second->deactivation_time_sec;
-    if (vec.size() == kMaxTimestampCount) {
-        vec.pop_front();
-    }
-    vec.push_back(timeSec);
-}
-
-void StatsdStats::noteActivationBroadcastGuardrailHit(const int uid) {
-    noteActivationBroadcastGuardrailHit(uid, getWallClockSec());
-}
-
-void StatsdStats::noteActivationBroadcastGuardrailHit(const int uid, const int32_t timeSec) {
-    lock_guard<std::mutex> lock(mLock);
-    auto& guardrailTimes = mActivationBroadcastGuardrailStats[uid];
-    if (guardrailTimes.size() == kMaxTimestampCount) {
-        guardrailTimes.pop_front();
-    }
-    guardrailTimes.push_back(timeSec);
-}
-
-void StatsdStats::noteDataDropped(const ConfigKey& key, const size_t totalBytes) {
-    noteDataDropped(key, totalBytes, getWallClockSec());
-}
-
-void StatsdStats::noteEventQueueOverflow(int64_t oldestEventTimestampNs) {
-    lock_guard<std::mutex> lock(mLock);
-
-    mOverflowCount++;
-
-    int64_t history = getElapsedRealtimeNs() - oldestEventTimestampNs;
-
-    if (history > mMaxQueueHistoryNs) {
-        mMaxQueueHistoryNs = history;
-    }
-
-    if (history < mMinQueueHistoryNs) {
-        mMinQueueHistoryNs = history;
-    }
-}
-
-void StatsdStats::noteDataDropped(const ConfigKey& key, const size_t totalBytes, int32_t timeSec) {
-    lock_guard<std::mutex> lock(mLock);
-    auto it = mConfigStats.find(key);
-    if (it == mConfigStats.end()) {
-        ALOGE("Config key %s not found!", key.ToString().c_str());
-        return;
-    }
-    if (it->second->data_drop_time_sec.size() == kMaxTimestampCount) {
-        it->second->data_drop_time_sec.pop_front();
-        it->second->data_drop_bytes.pop_front();
-    }
-    it->second->data_drop_time_sec.push_back(timeSec);
-    it->second->data_drop_bytes.push_back(totalBytes);
-}
-
-void StatsdStats::noteMetricsReportSent(const ConfigKey& key, const size_t num_bytes) {
-    noteMetricsReportSent(key, num_bytes, getWallClockSec());
-}
-
-void StatsdStats::noteMetricsReportSent(const ConfigKey& key, const size_t num_bytes,
-                                        int32_t timeSec) {
-    lock_guard<std::mutex> lock(mLock);
-    auto it = mConfigStats.find(key);
-    if (it == mConfigStats.end()) {
-        ALOGE("Config key %s not found!", key.ToString().c_str());
-        return;
-    }
-    if (it->second->dump_report_stats.size() == kMaxTimestampCount) {
-        it->second->dump_report_stats.pop_front();
-    }
-    it->second->dump_report_stats.push_back(std::make_pair(timeSec, num_bytes));
-}
-
-void StatsdStats::noteUidMapDropped(int deltas) {
-    lock_guard<std::mutex> lock(mLock);
-    mUidMapStats.dropped_changes += mUidMapStats.dropped_changes + deltas;
-}
-
-void StatsdStats::noteUidMapAppDeletionDropped() {
-    lock_guard<std::mutex> lock(mLock);
-    mUidMapStats.deleted_apps++;
-}
-
-void StatsdStats::setUidMapChanges(int changes) {
-    lock_guard<std::mutex> lock(mLock);
-    mUidMapStats.changes = changes;
-}
-
-void StatsdStats::setCurrentUidMapMemory(int bytes) {
-    lock_guard<std::mutex> lock(mLock);
-    mUidMapStats.bytes_used = bytes;
-}
-
-void StatsdStats::noteConditionDimensionSize(const ConfigKey& key, const int64_t& id, int size) {
-    lock_guard<std::mutex> lock(mLock);
-    // if name doesn't exist before, it will create the key with count 0.
-    auto statsIt = mConfigStats.find(key);
-    if (statsIt == mConfigStats.end()) {
-        return;
-    }
-
-    auto& conditionSizeMap = statsIt->second->condition_stats;
-    if (size > conditionSizeMap[id]) {
-        conditionSizeMap[id] = size;
-    }
-}
-
-void StatsdStats::noteMetricDimensionSize(const ConfigKey& key, const int64_t& id, int size) {
-    lock_guard<std::mutex> lock(mLock);
-    // if name doesn't exist before, it will create the key with count 0.
-    auto statsIt = mConfigStats.find(key);
-    if (statsIt == mConfigStats.end()) {
-        return;
-    }
-    auto& metricsDimensionMap = statsIt->second->metric_stats;
-    if (size > metricsDimensionMap[id]) {
-        metricsDimensionMap[id] = size;
-    }
-}
-
-void StatsdStats::noteMetricDimensionInConditionSize(
-        const ConfigKey& key, const int64_t& id, int size) {
-    lock_guard<std::mutex> lock(mLock);
-    // if name doesn't exist before, it will create the key with count 0.
-    auto statsIt = mConfigStats.find(key);
-    if (statsIt == mConfigStats.end()) {
-        return;
-    }
-    auto& metricsDimensionMap = statsIt->second->metric_dimension_in_condition_stats;
-    if (size > metricsDimensionMap[id]) {
-        metricsDimensionMap[id] = size;
-    }
-}
-
-void StatsdStats::noteMatcherMatched(const ConfigKey& key, const int64_t& id) {
-    lock_guard<std::mutex> lock(mLock);
-
-    auto statsIt = mConfigStats.find(key);
-    if (statsIt == mConfigStats.end()) {
-        return;
-    }
-    statsIt->second->matcher_stats[id]++;
-}
-
-void StatsdStats::noteAnomalyDeclared(const ConfigKey& key, const int64_t& id) {
-    lock_guard<std::mutex> lock(mLock);
-    auto statsIt = mConfigStats.find(key);
-    if (statsIt == mConfigStats.end()) {
-        return;
-    }
-    statsIt->second->alert_stats[id]++;
-}
-
-void StatsdStats::noteRegisteredAnomalyAlarmChanged() {
-    lock_guard<std::mutex> lock(mLock);
-    mAnomalyAlarmRegisteredStats++;
-}
-
-void StatsdStats::noteRegisteredPeriodicAlarmChanged() {
-    lock_guard<std::mutex> lock(mLock);
-    mPeriodicAlarmRegisteredStats++;
-}
-
-void StatsdStats::updateMinPullIntervalSec(int pullAtomId, long intervalSec) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[pullAtomId].minPullIntervalSec =
-            std::min(mPulledAtomStats[pullAtomId].minPullIntervalSec, intervalSec);
-}
-
-void StatsdStats::notePull(int pullAtomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[pullAtomId].totalPull++;
-}
-
-void StatsdStats::notePullFromCache(int pullAtomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[pullAtomId].totalPullFromCache++;
-}
-
-void StatsdStats::notePullTime(int pullAtomId, int64_t pullTimeNs) {
-    lock_guard<std::mutex> lock(mLock);
-    auto& pullStats = mPulledAtomStats[pullAtomId];
-    pullStats.maxPullTimeNs = std::max(pullStats.maxPullTimeNs, pullTimeNs);
-    pullStats.avgPullTimeNs = (pullStats.avgPullTimeNs * pullStats.numPullTime + pullTimeNs) /
-                              (pullStats.numPullTime + 1);
-    pullStats.numPullTime += 1;
-}
-
-void StatsdStats::notePullDelay(int pullAtomId, int64_t pullDelayNs) {
-    lock_guard<std::mutex> lock(mLock);
-    auto& pullStats = mPulledAtomStats[pullAtomId];
-    pullStats.maxPullDelayNs = std::max(pullStats.maxPullDelayNs, pullDelayNs);
-    pullStats.avgPullDelayNs =
-        (pullStats.avgPullDelayNs * pullStats.numPullDelay + pullDelayNs) /
-            (pullStats.numPullDelay + 1);
-    pullStats.numPullDelay += 1;
-}
-
-void StatsdStats::notePullDataError(int pullAtomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[pullAtomId].dataError++;
-}
-
-void StatsdStats::notePullTimeout(int pullAtomId,
-                                  int64_t pullUptimeMillis,
-                                  int64_t pullElapsedMillis) {
-    lock_guard<std::mutex> lock(mLock);
-    PulledAtomStats& pulledAtomStats = mPulledAtomStats[pullAtomId];
-    pulledAtomStats.pullTimeout++;
-
-    if (pulledAtomStats.pullTimeoutMetadata.size() == kMaxTimestampCount) {
-        pulledAtomStats.pullTimeoutMetadata.pop_front();
-    }
-
-    pulledAtomStats.pullTimeoutMetadata.emplace_back(pullUptimeMillis, pullElapsedMillis);
-}
-
-void StatsdStats::notePullExceedMaxDelay(int pullAtomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[pullAtomId].pullExceedMaxDelay++;
-}
-
-void StatsdStats::noteAtomLogged(int atomId, int32_t timeSec) {
-    lock_guard<std::mutex> lock(mLock);
-
-    if (atomId <= kMaxPushedAtomId) {
-        mPushedAtomStats[atomId]++;
-    } else {
-        if (mNonPlatformPushedAtomStats.size() < kMaxNonPlatformPushedAtoms) {
-            mNonPlatformPushedAtomStats[atomId]++;
-        }
-    }
-}
-
-void StatsdStats::noteSystemServerRestart(int32_t timeSec) {
-    lock_guard<std::mutex> lock(mLock);
-
-    if (mSystemServerRestartSec.size() == kMaxSystemServerRestarts) {
-        mSystemServerRestartSec.pop_front();
-    }
-    mSystemServerRestartSec.push_back(timeSec);
-}
-
-void StatsdStats::notePullFailed(int atomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[atomId].pullFailed++;
-}
-
-void StatsdStats::notePullUidProviderNotFound(int atomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[atomId].pullUidProviderNotFound++;
-}
-
-void StatsdStats::notePullerNotFound(int atomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[atomId].pullerNotFound++;
-}
-
-void StatsdStats::notePullBinderCallFailed(int atomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[atomId].binderCallFailCount++;
-}
-
-void StatsdStats::noteEmptyData(int atomId) {
-    lock_guard<std::mutex> lock(mLock);
-    mPulledAtomStats[atomId].emptyData++;
-}
-
-void StatsdStats::notePullerCallbackRegistrationChanged(int atomId, bool registered) {
-    lock_guard<std::mutex> lock(mLock);
-    if (registered) {
-        mPulledAtomStats[atomId].registeredCount++;
-    } else {
-        mPulledAtomStats[atomId].unregisteredCount++;
-    }
-}
-
-void StatsdStats::noteHardDimensionLimitReached(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).hardDimensionLimitReached++;
-}
-
-void StatsdStats::noteLateLogEventSkipped(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).lateLogEventSkipped++;
-}
-
-void StatsdStats::noteSkippedForwardBuckets(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).skippedForwardBuckets++;
-}
-
-void StatsdStats::noteBadValueType(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).badValueType++;
-}
-
-void StatsdStats::noteBucketDropped(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).bucketDropped++;
-}
-
-void StatsdStats::noteBucketUnknownCondition(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).bucketUnknownCondition++;
-}
-
-void StatsdStats::noteConditionChangeInNextBucket(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).conditionChangeInNextBucket++;
-}
-
-void StatsdStats::noteInvalidatedBucket(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).invalidatedBucket++;
-}
-
-void StatsdStats::noteBucketCount(int64_t metricId) {
-    lock_guard<std::mutex> lock(mLock);
-    getAtomMetricStats(metricId).bucketCount++;
-}
-
-void StatsdStats::noteBucketBoundaryDelayNs(int64_t metricId, int64_t timeDelayNs) {
-    lock_guard<std::mutex> lock(mLock);
-    AtomMetricStats& pullStats = getAtomMetricStats(metricId);
-    pullStats.maxBucketBoundaryDelayNs =
-            std::max(pullStats.maxBucketBoundaryDelayNs, timeDelayNs);
-    pullStats.minBucketBoundaryDelayNs =
-            std::min(pullStats.minBucketBoundaryDelayNs, timeDelayNs);
-}
-
-void StatsdStats::noteAtomError(int atomTag, bool pull) {
-    lock_guard<std::mutex> lock(mLock);
-    if (pull) {
-        mPulledAtomStats[atomTag].atomErrorCount++;
-        return;
-    }
-
-    bool present = (mPushedAtomErrorStats.find(atomTag) != mPushedAtomErrorStats.end());
-    bool full = (mPushedAtomErrorStats.size() >= (size_t)kMaxPushedAtomErrorStatsSize);
-    if (!full || present) {
-        mPushedAtomErrorStats[atomTag]++;
-    }
-}
-
-StatsdStats::AtomMetricStats& StatsdStats::getAtomMetricStats(int64_t metricId) {
-    auto atomMetricStatsIter = mAtomMetricStats.find(metricId);
-    if (atomMetricStatsIter != mAtomMetricStats.end()) {
-        return atomMetricStatsIter->second;
-    }
-    auto emplaceResult = mAtomMetricStats.emplace(metricId, AtomMetricStats());
-    return emplaceResult.first->second;
-}
-
-void StatsdStats::reset() {
-    lock_guard<std::mutex> lock(mLock);
-    resetInternalLocked();
-}
-
-void StatsdStats::resetInternalLocked() {
-    // Reset the historical data, but keep the active ConfigStats
-    mStartTimeSec = getWallClockSec();
-    mIceBox.clear();
-    std::fill(mPushedAtomStats.begin(), mPushedAtomStats.end(), 0);
-    mNonPlatformPushedAtomStats.clear();
-    mAnomalyAlarmRegisteredStats = 0;
-    mPeriodicAlarmRegisteredStats = 0;
-    mSystemServerRestartSec.clear();
-    mLogLossStats.clear();
-    mOverflowCount = 0;
-    mMinQueueHistoryNs = kInt64Max;
-    mMaxQueueHistoryNs = 0;
-    for (auto& config : mConfigStats) {
-        config.second->broadcast_sent_time_sec.clear();
-        config.second->activation_time_sec.clear();
-        config.second->deactivation_time_sec.clear();
-        config.second->data_drop_time_sec.clear();
-        config.second->data_drop_bytes.clear();
-        config.second->dump_report_stats.clear();
-        config.second->annotations.clear();
-        config.second->matcher_stats.clear();
-        config.second->condition_stats.clear();
-        config.second->metric_stats.clear();
-        config.second->metric_dimension_in_condition_stats.clear();
-        config.second->alert_stats.clear();
-    }
-    for (auto& pullStats : mPulledAtomStats) {
-        pullStats.second.totalPull = 0;
-        pullStats.second.totalPullFromCache = 0;
-        pullStats.second.minPullIntervalSec = LONG_MAX;
-        pullStats.second.avgPullTimeNs = 0;
-        pullStats.second.maxPullTimeNs = 0;
-        pullStats.second.numPullTime = 0;
-        pullStats.second.avgPullDelayNs = 0;
-        pullStats.second.maxPullDelayNs = 0;
-        pullStats.second.numPullDelay = 0;
-        pullStats.second.dataError = 0;
-        pullStats.second.pullTimeout = 0;
-        pullStats.second.pullExceedMaxDelay = 0;
-        pullStats.second.pullFailed = 0;
-        pullStats.second.pullUidProviderNotFound = 0;
-        pullStats.second.pullerNotFound = 0;
-        pullStats.second.registeredCount = 0;
-        pullStats.second.unregisteredCount = 0;
-        pullStats.second.atomErrorCount = 0;
-        pullStats.second.binderCallFailCount = 0;
-        pullStats.second.pullTimeoutMetadata.clear();
-    }
-    mAtomMetricStats.clear();
-    mActivationBroadcastGuardrailStats.clear();
-    mPushedAtomErrorStats.clear();
-}
-
-string buildTimeString(int64_t timeSec) {
-    time_t t = timeSec;
-    struct tm* tm = localtime(&t);
-    char timeBuffer[80];
-    strftime(timeBuffer, sizeof(timeBuffer), "%Y-%m-%d %I:%M%p", tm);
-    return string(timeBuffer);
-}
-
-int StatsdStats::getPushedAtomErrors(int atomId) const {
-    const auto& it = mPushedAtomErrorStats.find(atomId);
-    if (it != mPushedAtomErrorStats.end()) {
-        return it->second;
-    } else {
-        return 0;
-    }
-}
-
-void StatsdStats::dumpStats(int out) const {
-    lock_guard<std::mutex> lock(mLock);
-    time_t t = mStartTimeSec;
-    struct tm* tm = localtime(&t);
-    char timeBuffer[80];
-    strftime(timeBuffer, sizeof(timeBuffer), "%Y-%m-%d %I:%M%p\n", tm);
-    dprintf(out, "Stats collection start second: %s\n", timeBuffer);
-    dprintf(out, "%lu Config in icebox: \n", (unsigned long)mIceBox.size());
-    for (const auto& configStats : mIceBox) {
-        dprintf(out,
-                "Config {%d_%lld}: creation=%d, deletion=%d, reset=%d, #metric=%d, #condition=%d, "
-                "#matcher=%d, #alert=%d,  valid=%d\n",
-                configStats->uid, (long long)configStats->id, configStats->creation_time_sec,
-                configStats->deletion_time_sec, configStats->reset_time_sec,
-                configStats->metric_count, configStats->condition_count, configStats->matcher_count,
-                configStats->alert_count, configStats->is_valid);
-
-        for (const auto& broadcastTime : configStats->broadcast_sent_time_sec) {
-            dprintf(out, "\tbroadcast time: %d\n", broadcastTime);
-        }
-
-        for (const int& activationTime : configStats->activation_time_sec) {
-            dprintf(out, "\tactivation time: %d\n", activationTime);
-        }
-
-        for (const int& deactivationTime : configStats->deactivation_time_sec) {
-            dprintf(out, "\tdeactivation time: %d\n", deactivationTime);
-        }
-
-        auto dropTimePtr = configStats->data_drop_time_sec.begin();
-        auto dropBytesPtr = configStats->data_drop_bytes.begin();
-        for (int i = 0; i < (int)configStats->data_drop_time_sec.size();
-             i++, dropTimePtr++, dropBytesPtr++) {
-            dprintf(out, "\tdata drop time: %d with size %lld", *dropTimePtr,
-                    (long long)*dropBytesPtr);
-        }
-    }
-    dprintf(out, "%lu Active Configs\n", (unsigned long)mConfigStats.size());
-    for (auto& pair : mConfigStats) {
-        auto& configStats = pair.second;
-        dprintf(out,
-                "Config {%d-%lld}: creation=%d, deletion=%d, #metric=%d, #condition=%d, "
-                "#matcher=%d, #alert=%d,  valid=%d\n",
-                configStats->uid, (long long)configStats->id, configStats->creation_time_sec,
-                configStats->deletion_time_sec, configStats->metric_count,
-                configStats->condition_count, configStats->matcher_count, configStats->alert_count,
-                configStats->is_valid);
-        for (const auto& annotation : configStats->annotations) {
-            dprintf(out, "\tannotation: %lld, %d\n", (long long)annotation.first,
-                    annotation.second);
-        }
-
-        for (const auto& broadcastTime : configStats->broadcast_sent_time_sec) {
-            dprintf(out, "\tbroadcast time: %s(%lld)\n", buildTimeString(broadcastTime).c_str(),
-                    (long long)broadcastTime);
-        }
-
-        for (const int& activationTime : configStats->activation_time_sec) {
-            dprintf(out, "\tactivation time: %d\n", activationTime);
-        }
-
-        for (const int& deactivationTime : configStats->deactivation_time_sec) {
-            dprintf(out, "\tdeactivation time: %d\n", deactivationTime);
-        }
-
-        auto dropTimePtr = configStats->data_drop_time_sec.begin();
-        auto dropBytesPtr = configStats->data_drop_bytes.begin();
-        for (int i = 0; i < (int)configStats->data_drop_time_sec.size();
-             i++, dropTimePtr++, dropBytesPtr++) {
-            dprintf(out, "\tdata drop time: %s(%lld) with %lld bytes\n",
-                    buildTimeString(*dropTimePtr).c_str(), (long long)*dropTimePtr,
-                    (long long)*dropBytesPtr);
-        }
-
-        for (const auto& dump : configStats->dump_report_stats) {
-            dprintf(out, "\tdump report time: %s(%lld) bytes: %lld\n",
-                    buildTimeString(dump.first).c_str(), (long long)dump.first,
-                    (long long)dump.second);
-        }
-
-        for (const auto& stats : pair.second->matcher_stats) {
-            dprintf(out, "matcher %lld matched %d times\n", (long long)stats.first, stats.second);
-        }
-
-        for (const auto& stats : pair.second->condition_stats) {
-            dprintf(out, "condition %lld max output tuple size %d\n", (long long)stats.first,
-                    stats.second);
-        }
-
-        for (const auto& stats : pair.second->condition_stats) {
-            dprintf(out, "metrics %lld max output tuple size %d\n", (long long)stats.first,
-                    stats.second);
-        }
-
-        for (const auto& stats : pair.second->alert_stats) {
-            dprintf(out, "alert %lld declared %d times\n", (long long)stats.first, stats.second);
-        }
-    }
-    dprintf(out, "********Disk Usage stats***********\n");
-    StorageManager::printStats(out);
-    dprintf(out, "********Pushed Atom stats***********\n");
-    const size_t atomCounts = mPushedAtomStats.size();
-    for (size_t i = 2; i < atomCounts; i++) {
-        if (mPushedAtomStats[i] > 0) {
-            dprintf(out, "Atom %zu->(total count)%d, (error count)%d\n", i, mPushedAtomStats[i],
-                    getPushedAtomErrors((int)i));
-        }
-    }
-    for (const auto& pair : mNonPlatformPushedAtomStats) {
-        dprintf(out, "Atom %d->(total count)%d, (error count)%d\n", pair.first, pair.second,
-                getPushedAtomErrors(pair.first));
-    }
-
-    dprintf(out, "********Pulled Atom stats***********\n");
-    for (const auto& pair : mPulledAtomStats) {
-        dprintf(out,
-                "Atom %d->(total pull)%ld, (pull from cache)%ld, "
-                "(pull failed)%ld, (min pull interval)%ld \n"
-                "  (average pull time nanos)%lld, (max pull time nanos)%lld, (average pull delay "
-                "nanos)%lld, "
-                "  (max pull delay nanos)%lld, (data error)%ld\n"
-                "  (pull timeout)%ld, (pull exceed max delay)%ld"
-                "  (no uid provider count)%ld, (no puller found count)%ld\n"
-                "  (registered count) %ld, (unregistered count) %ld"
-                "  (atom error count) %d\n",
-                (int)pair.first, (long)pair.second.totalPull, (long)pair.second.totalPullFromCache,
-                (long)pair.second.pullFailed, (long)pair.second.minPullIntervalSec,
-                (long long)pair.second.avgPullTimeNs, (long long)pair.second.maxPullTimeNs,
-                (long long)pair.second.avgPullDelayNs, (long long)pair.second.maxPullDelayNs,
-                pair.second.dataError, pair.second.pullTimeout, pair.second.pullExceedMaxDelay,
-                pair.second.pullUidProviderNotFound, pair.second.pullerNotFound,
-                pair.second.registeredCount, pair.second.unregisteredCount,
-                pair.second.atomErrorCount);
-        if (pair.second.pullTimeoutMetadata.size() > 0) {
-            string uptimeMillis = "(pull timeout system uptime millis) ";
-            string pullTimeoutMillis = "(pull timeout elapsed time millis) ";
-            for (const auto& stats : pair.second.pullTimeoutMetadata) {
-                uptimeMillis.append(to_string(stats.pullTimeoutUptimeMillis)).append(",");;
-                pullTimeoutMillis.append(to_string(stats.pullTimeoutElapsedMillis)).append(",");
-            }
-            uptimeMillis.pop_back();
-            uptimeMillis.push_back('\n');
-            pullTimeoutMillis.pop_back();
-            pullTimeoutMillis.push_back('\n');
-            dprintf(out, "%s", uptimeMillis.c_str());
-            dprintf(out, "%s", pullTimeoutMillis.c_str());
-        }
-    }
-
-    if (mAnomalyAlarmRegisteredStats > 0) {
-        dprintf(out, "********AnomalyAlarmStats stats***********\n");
-        dprintf(out, "Anomaly alarm registrations: %d\n", mAnomalyAlarmRegisteredStats);
-    }
-
-    if (mPeriodicAlarmRegisteredStats > 0) {
-        dprintf(out, "********SubscriberAlarmStats stats***********\n");
-        dprintf(out, "Subscriber alarm registrations: %d\n", mPeriodicAlarmRegisteredStats);
-    }
-
-    dprintf(out, "UID map stats: bytes=%d, changes=%d, deleted=%d, changes lost=%d\n",
-            mUidMapStats.bytes_used, mUidMapStats.changes, mUidMapStats.deleted_apps,
-            mUidMapStats.dropped_changes);
-
-    for (const auto& restart : mSystemServerRestartSec) {
-        dprintf(out, "System server restarts at %s(%lld)\n", buildTimeString(restart).c_str(),
-                (long long)restart);
-    }
-
-    for (const auto& loss : mLogLossStats) {
-        dprintf(out,
-                "Log loss: %lld (wall clock sec) - %d (count), %d (last error), %d (last tag), %d "
-                "(uid), %d (pid)\n",
-                (long long)loss.mWallClockSec, loss.mCount, loss.mLastError, loss.mLastTag,
-                loss.mUid, loss.mPid);
-    }
-
-    dprintf(out, "Event queue overflow: %d; MaxHistoryNs: %lld; MinHistoryNs: %lld\n",
-            mOverflowCount, (long long)mMaxQueueHistoryNs, (long long)mMinQueueHistoryNs);
-
-    if (mActivationBroadcastGuardrailStats.size() > 0) {
-        dprintf(out, "********mActivationBroadcastGuardrail stats***********\n");
-        for (const auto& pair: mActivationBroadcastGuardrailStats) {
-            dprintf(out, "Uid %d: Times: ", pair.first);
-            for (const auto& guardrailHitTime : pair.second) {
-                dprintf(out, "%d ", guardrailHitTime);
-            }
-        }
-        dprintf(out, "\n");
-    }
-}
-
-void addConfigStatsToProto(const ConfigStats& configStats, ProtoOutputStream* proto) {
-    uint64_t token =
-            proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_CONFIG_STATS);
-    proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_UID, configStats.uid);
-    proto->write(FIELD_TYPE_INT64 | FIELD_ID_CONFIG_STATS_ID, (long long)configStats.id);
-    proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_CREATION, configStats.creation_time_sec);
-    if (configStats.reset_time_sec != 0) {
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_RESET, configStats.reset_time_sec);
-    }
-    if (configStats.deletion_time_sec != 0) {
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_DELETION,
-                     configStats.deletion_time_sec);
-    }
-    proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_METRIC_COUNT, configStats.metric_count);
-    proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_CONDITION_COUNT,
-                 configStats.condition_count);
-    proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_MATCHER_COUNT, configStats.matcher_count);
-    proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_ALERT_COUNT, configStats.alert_count);
-    proto->write(FIELD_TYPE_BOOL | FIELD_ID_CONFIG_STATS_VALID, configStats.is_valid);
-
-    for (const auto& broadcast : configStats.broadcast_sent_time_sec) {
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_BROADCAST | FIELD_COUNT_REPEATED,
-                     broadcast);
-    }
-
-    for (const auto& activation : configStats.activation_time_sec) {
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_ACTIVATION | FIELD_COUNT_REPEATED,
-                     activation);
-    }
-
-    for (const auto& deactivation : configStats.deactivation_time_sec) {
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_DEACTIVATION | FIELD_COUNT_REPEATED,
-                     deactivation);
-    }
-
-    for (const auto& drop_time : configStats.data_drop_time_sec) {
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_DATA_DROP_TIME | FIELD_COUNT_REPEATED,
-                     drop_time);
-    }
-
-    for (const auto& drop_bytes : configStats.data_drop_bytes) {
-        proto->write(
-                FIELD_TYPE_INT64 | FIELD_ID_CONFIG_STATS_DATA_DROP_BYTES | FIELD_COUNT_REPEATED,
-                (long long)drop_bytes);
-    }
-
-    for (const auto& dump : configStats.dump_report_stats) {
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_DUMP_REPORT_TIME |
-                     FIELD_COUNT_REPEATED,
-                     dump.first);
-    }
-
-    for (const auto& dump : configStats.dump_report_stats) {
-        proto->write(FIELD_TYPE_INT64 | FIELD_ID_CONFIG_STATS_DUMP_REPORT_BYTES |
-                     FIELD_COUNT_REPEATED,
-                     (long long)dump.second);
-    }
-
-    for (const auto& annotation : configStats.annotations) {
-        uint64_t token = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                      FIELD_ID_CONFIG_STATS_ANNOTATION);
-        proto->write(FIELD_TYPE_INT64 | FIELD_ID_CONFIG_STATS_ANNOTATION_INT64,
-                     (long long)annotation.first);
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_ANNOTATION_INT32, annotation.second);
-        proto->end(token);
-    }
-
-    for (const auto& pair : configStats.matcher_stats) {
-        uint64_t tmpToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                          FIELD_ID_CONFIG_STATS_MATCHER_STATS);
-        proto->write(FIELD_TYPE_INT64 | FIELD_ID_MATCHER_STATS_ID, (long long)pair.first);
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_MATCHER_STATS_COUNT, pair.second);
-        proto->end(tmpToken);
-    }
-
-    for (const auto& pair : configStats.condition_stats) {
-        uint64_t tmpToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                          FIELD_ID_CONFIG_STATS_CONDITION_STATS);
-        proto->write(FIELD_TYPE_INT64 | FIELD_ID_CONDITION_STATS_ID, (long long)pair.first);
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONDITION_STATS_COUNT, pair.second);
-        proto->end(tmpToken);
-    }
-
-    for (const auto& pair : configStats.metric_stats) {
-        uint64_t tmpToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                          FIELD_ID_CONFIG_STATS_METRIC_STATS);
-        proto->write(FIELD_TYPE_INT64 | FIELD_ID_METRIC_STATS_ID, (long long)pair.first);
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_METRIC_STATS_COUNT, pair.second);
-        proto->end(tmpToken);
-    }
-    for (const auto& pair : configStats.metric_dimension_in_condition_stats) {
-        uint64_t tmpToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                         FIELD_ID_CONFIG_STATS_METRIC_DIMENSION_IN_CONDITION_STATS);
-        proto->write(FIELD_TYPE_INT64 | FIELD_ID_METRIC_STATS_ID, (long long)pair.first);
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_METRIC_STATS_COUNT, pair.second);
-        proto->end(tmpToken);
-    }
-
-    for (const auto& pair : configStats.alert_stats) {
-        uint64_t tmpToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                          FIELD_ID_CONFIG_STATS_ALERT_STATS);
-        proto->write(FIELD_TYPE_INT64 | FIELD_ID_ALERT_STATS_ID, (long long)pair.first);
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_ALERT_STATS_COUNT, pair.second);
-        proto->end(tmpToken);
-    }
-
-    proto->end(token);
-}
-
-void StatsdStats::dumpStats(std::vector<uint8_t>* output, bool reset) {
-    lock_guard<std::mutex> lock(mLock);
-
-    ProtoOutputStream proto;
-    proto.write(FIELD_TYPE_INT32 | FIELD_ID_BEGIN_TIME, mStartTimeSec);
-    proto.write(FIELD_TYPE_INT32 | FIELD_ID_END_TIME, (int32_t)getWallClockSec());
-
-    for (const auto& configStats : mIceBox) {
-        addConfigStatsToProto(*configStats, &proto);
-    }
-
-    for (auto& pair : mConfigStats) {
-        addConfigStatsToProto(*(pair.second), &proto);
-    }
-
-    const size_t atomCounts = mPushedAtomStats.size();
-    for (size_t i = 2; i < atomCounts; i++) {
-        if (mPushedAtomStats[i] > 0) {
-            uint64_t token =
-                    proto.start(FIELD_TYPE_MESSAGE | FIELD_ID_ATOM_STATS | FIELD_COUNT_REPEATED);
-            proto.write(FIELD_TYPE_INT32 | FIELD_ID_ATOM_STATS_TAG, (int32_t)i);
-            proto.write(FIELD_TYPE_INT32 | FIELD_ID_ATOM_STATS_COUNT, mPushedAtomStats[i]);
-            int errors = getPushedAtomErrors(i);
-            if (errors > 0) {
-                proto.write(FIELD_TYPE_INT32 | FIELD_ID_ATOM_STATS_ERROR_COUNT, errors);
-            }
-            proto.end(token);
-        }
-    }
-
-    for (const auto& pair : mNonPlatformPushedAtomStats) {
-        uint64_t token =
-                proto.start(FIELD_TYPE_MESSAGE | FIELD_ID_ATOM_STATS | FIELD_COUNT_REPEATED);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_ATOM_STATS_TAG, pair.first);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_ATOM_STATS_COUNT, pair.second);
-        int errors = getPushedAtomErrors(pair.first);
-        if (errors > 0) {
-            proto.write(FIELD_TYPE_INT32 | FIELD_ID_ATOM_STATS_ERROR_COUNT, errors);
-        }
-        proto.end(token);
-    }
-
-    for (const auto& pair : mPulledAtomStats) {
-        android::os::statsd::writePullerStatsToStream(pair, &proto);
-    }
-
-    for (const auto& pair : mAtomMetricStats) {
-        android::os::statsd::writeAtomMetricStatsToStream(pair, &proto);
-    }
-
-    if (mAnomalyAlarmRegisteredStats > 0) {
-        uint64_t token = proto.start(FIELD_TYPE_MESSAGE | FIELD_ID_ANOMALY_ALARM_STATS);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_ANOMALY_ALARMS_REGISTERED,
-                    mAnomalyAlarmRegisteredStats);
-        proto.end(token);
-    }
-
-    if (mPeriodicAlarmRegisteredStats > 0) {
-        uint64_t token = proto.start(FIELD_TYPE_MESSAGE | FIELD_ID_PERIODIC_ALARM_STATS);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_PERIODIC_ALARMS_REGISTERED,
-                    mPeriodicAlarmRegisteredStats);
-        proto.end(token);
-    }
-
-    uint64_t uidMapToken = proto.start(FIELD_TYPE_MESSAGE | FIELD_ID_UIDMAP_STATS);
-    proto.write(FIELD_TYPE_INT32 | FIELD_ID_UID_MAP_CHANGES, mUidMapStats.changes);
-    proto.write(FIELD_TYPE_INT32 | FIELD_ID_UID_MAP_BYTES_USED, mUidMapStats.bytes_used);
-    proto.write(FIELD_TYPE_INT32 | FIELD_ID_UID_MAP_DROPPED_CHANGES, mUidMapStats.dropped_changes);
-    proto.write(FIELD_TYPE_INT32 | FIELD_ID_UID_MAP_DELETED_APPS, mUidMapStats.deleted_apps);
-    proto.end(uidMapToken);
-
-    for (const auto& error : mLogLossStats) {
-        uint64_t token = proto.start(FIELD_TYPE_MESSAGE | FIELD_ID_LOGGER_ERROR_STATS |
-                                      FIELD_COUNT_REPEATED);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_LOG_LOSS_STATS_TIME, error.mWallClockSec);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_LOG_LOSS_STATS_COUNT, error.mCount);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_LOG_LOSS_STATS_ERROR, error.mLastError);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_LOG_LOSS_STATS_TAG, error.mLastTag);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_LOG_LOSS_STATS_UID, error.mUid);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_LOG_LOSS_STATS_PID, error.mPid);
-        proto.end(token);
-    }
-
-    if (mOverflowCount > 0) {
-        uint64_t token = proto.start(FIELD_TYPE_MESSAGE | FIELD_ID_OVERFLOW);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_OVERFLOW_COUNT, (int32_t)mOverflowCount);
-        proto.write(FIELD_TYPE_INT64 | FIELD_ID_OVERFLOW_MAX_HISTORY,
-                    (long long)mMaxQueueHistoryNs);
-        proto.write(FIELD_TYPE_INT64 | FIELD_ID_OVERFLOW_MIN_HISTORY,
-                    (long long)mMinQueueHistoryNs);
-        proto.end(token);
-    }
-
-    for (const auto& restart : mSystemServerRestartSec) {
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_SYSTEM_SERVER_RESTART | FIELD_COUNT_REPEATED,
-                    restart);
-    }
-
-    for (const auto& pair: mActivationBroadcastGuardrailStats) {
-        uint64_t token = proto.start(FIELD_TYPE_MESSAGE |
-                                     FIELD_ID_ACTIVATION_BROADCAST_GUARDRAIL |
-                                     FIELD_COUNT_REPEATED);
-        proto.write(FIELD_TYPE_INT32 | FIELD_ID_ACTIVATION_BROADCAST_GUARDRAIL_UID,
-                    (int32_t) pair.first);
-        for (const auto& guardrailHitTime : pair.second) {
-            proto.write(FIELD_TYPE_INT32 | FIELD_ID_ACTIVATION_BROADCAST_GUARDRAIL_TIME |
-                            FIELD_COUNT_REPEATED,
-                        guardrailHitTime);
-        }
-        proto.end(token);
-    }
-
-    output->clear();
-    size_t bufferSize = proto.size();
-    output->resize(bufferSize);
-
-    size_t pos = 0;
-    sp<android::util::ProtoReader> reader = proto.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&((*output)[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-
-    if (reset) {
-        resetInternalLocked();
-    }
-
-    VLOG("reset=%d, returned proto size %lu", reset, (unsigned long)bufferSize);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/guardrail/StatsdStats.h b/cmds/statsd/src/guardrail/StatsdStats.h
deleted file mode 100644
index 0050484..0000000
--- a/cmds/statsd/src/guardrail/StatsdStats.h
+++ /dev/null
@@ -1,678 +0,0 @@
-/*
- * Copyright 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-
-#include "config/ConfigKey.h"
-
-#include <gtest/gtest_prod.h>
-#include <log/log_time.h>
-#include <list>
-#include <mutex>
-#include <string>
-#include <vector>
-#include <unordered_map>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-struct ConfigStats {
-    int32_t uid;
-    int64_t id;
-    int32_t creation_time_sec;
-    int32_t deletion_time_sec = 0;
-    int32_t reset_time_sec = 0;
-    int32_t metric_count;
-    int32_t condition_count;
-    int32_t matcher_count;
-    int32_t alert_count;
-    bool is_valid;
-
-    std::list<int32_t> broadcast_sent_time_sec;
-
-    // Times at which this config is activated.
-    std::list<int32_t> activation_time_sec;
-
-    // Times at which this config is deactivated.
-    std::list<int32_t> deactivation_time_sec;
-
-    std::list<int32_t> data_drop_time_sec;
-    // Number of bytes dropped at corresponding time.
-    std::list<int64_t> data_drop_bytes;
-    std::list<std::pair<int32_t, int64_t>> dump_report_stats;
-
-    // Stores how many times a matcher have been matched. The map size is capped by kMaxConfigCount.
-    std::map<const int64_t, int> matcher_stats;
-
-    // Stores the number of output tuple of condition trackers when it's bigger than
-    // kDimensionKeySizeSoftLimit. When you see the number is kDimensionKeySizeHardLimit +1,
-    // it means some data has been dropped. The map size is capped by kMaxConfigCount.
-    std::map<const int64_t, int> condition_stats;
-
-    // Stores the number of output tuple of metric producers when it's bigger than
-    // kDimensionKeySizeSoftLimit. When you see the number is kDimensionKeySizeHardLimit +1,
-    // it means some data has been dropped. The map size is capped by kMaxConfigCount.
-    std::map<const int64_t, int> metric_stats;
-
-    // Stores the max number of output tuple of dimensions in condition across dimensions in what
-    // when it's bigger than kDimensionKeySizeSoftLimit. When you see the number is
-    // kDimensionKeySizeHardLimit +1, it means some data has been dropped. The map size is capped by
-    // kMaxConfigCount.
-    std::map<const int64_t, int> metric_dimension_in_condition_stats;
-
-    // Stores the number of times an anomaly detection alert has been declared.
-    // The map size is capped by kMaxConfigCount.
-    std::map<const int64_t, int> alert_stats;
-
-    // Stores the config ID for each sub-config used.
-    std::list<std::pair<const int64_t, const int32_t>> annotations;
-};
-
-struct UidMapStats {
-    int32_t changes;
-    int32_t bytes_used;
-    int32_t dropped_changes;
-    int32_t deleted_apps = 0;
-};
-
-// Keeps track of stats of statsd.
-// Single instance shared across the process. All public methods are thread safe.
-class StatsdStats {
-public:
-    static StatsdStats& getInstance();
-    ~StatsdStats(){};
-
-    const static int kDimensionKeySizeSoftLimit = 500;
-    const static int kDimensionKeySizeHardLimit = 800;
-
-    // Per atom dimension key size limit
-    static const std::map<int, std::pair<size_t, size_t>> kAtomDimensionKeySizeLimitMap;
-
-    const static int kMaxConfigCountPerUid = 20;
-    const static int kMaxAlertCountPerConfig = 100;
-    const static int kMaxConditionCountPerConfig = 300;
-    const static int kMaxMetricCountPerConfig = 1000;
-    const static int kMaxMatcherCountPerConfig = 800;
-
-    // The max number of old config stats we keep.
-    const static int kMaxIceBoxSize = 20;
-
-    const static int kMaxLoggerErrors = 20;
-
-    const static int kMaxSystemServerRestarts = 20;
-
-    const static int kMaxTimestampCount = 20;
-
-    const static int kMaxLogSourceCount = 50;
-
-    const static int kMaxPullAtomPackages = 100;
-
-    // Max memory allowed for storing metrics per configuration. If this limit is exceeded, statsd
-    // drops the metrics data in memory.
-    static const size_t kMaxMetricsBytesPerConfig = 2 * 1024 * 1024;
-
-    // Soft memory limit per configuration. Once this limit is exceeded, we begin notifying the
-    // data subscriber that it's time to call getData.
-    static const size_t kBytesPerConfigTriggerGetData = 192 * 1024;
-
-    // Cap the UID map's memory usage to this. This should be fairly high since the UID information
-    // is critical for understanding the metrics.
-    const static size_t kMaxBytesUsedUidMap = 50 * 1024;
-
-    // The number of deleted apps that are stored in the uid map.
-    const static int kMaxDeletedAppsInUidMap = 100;
-
-    /* Minimum period between two broadcasts in nanoseconds. */
-    static const int64_t kMinBroadcastPeriodNs = 60 * NS_PER_SEC;
-
-    /* Min period between two checks of byte size per config key in nanoseconds. */
-    static const int64_t kMinByteSizeCheckPeriodNs = 60 * NS_PER_SEC;
-
-    /* Minimum period between two activation broadcasts in nanoseconds. */
-    static const int64_t kMinActivationBroadcastPeriodNs = 10 * NS_PER_SEC;
-
-    // Maximum age (30 days) that files on disk can exist in seconds.
-    static const int kMaxAgeSecond = 60 * 60 * 24 * 30;
-
-    // Maximum age (2 days) that local history files on disk can exist in seconds.
-    static const int kMaxLocalHistoryAgeSecond = 60 * 60 * 24 * 2;
-
-    // Maximum number of files (1000) that can be in stats directory on disk.
-    static const int kMaxFileNumber = 1000;
-
-    // Maximum size of all files that can be written to stats directory on disk.
-    static const int kMaxFileSize = 50 * 1024 * 1024;
-
-    // How long to try to clear puller cache from last time
-    static const long kPullerCacheClearIntervalSec = 1;
-
-    // Max time to do a pull.
-    static const int64_t kPullMaxDelayNs = 30 * NS_PER_SEC;
-
-    // Maximum number of pushed atoms statsd stats will track above kMaxPushedAtomId.
-    static const int kMaxNonPlatformPushedAtoms = 100;
-
-    // Maximum atom id value that we consider a platform pushed atom.
-    // This should be updated once highest pushed atom id in atoms.proto approaches this value.
-    static const int kMaxPushedAtomId = 500;
-
-    // Atom id that is the start of the pulled atoms.
-    static const int kPullAtomStartTag = 10000;
-
-    // Atom id that is the start of vendor atoms.
-    static const int kVendorAtomStartTag = 100000;
-
-    // Vendor pulled atom start id.
-    static const int32_t kVendorPulledAtomStartTag = 150000;
-
-    // Beginning of range for timestamp truncation.
-    static const int32_t kTimestampTruncationStartTag = 300000;
-
-    // End of range for timestamp truncation.
-    static const int32_t kTimestampTruncationEndTag = 304999;
-
-    // Max accepted atom id.
-    static const int32_t kMaxAtomTag = 200000;
-
-    static const int64_t kInt64Max = 0x7fffffffffffffffLL;
-
-    static const int32_t kMaxLoggedBucketDropEvents = 10;
-
-    /**
-     * Report a new config has been received and report the static stats about the config.
-     *
-     * The static stats include: the count of metrics, conditions, matchers, and alerts.
-     * If the config is not valid, this config stats will be put into icebox immediately.
-     */
-    void noteConfigReceived(const ConfigKey& key, int metricsCount, int conditionsCount,
-                            int matchersCount, int alertCount,
-                            const std::list<std::pair<const int64_t, const int32_t>>& annotations,
-                            bool isValid);
-    /**
-     * Report a config has been removed.
-     */
-    void noteConfigRemoved(const ConfigKey& key);
-    /**
-     * Report a config has been reset when ttl expires.
-     */
-    void noteConfigReset(const ConfigKey& key);
-
-    /**
-     * Report a broadcast has been sent to a config owner to collect the data.
-     */
-    void noteBroadcastSent(const ConfigKey& key);
-
-    /**
-     * Report that a config has become activated or deactivated.
-     * This can be different from whether or not a broadcast is sent if the
-     * guardrail prevented the broadcast from being sent.
-     */
-    void noteActiveStatusChanged(const ConfigKey& key, bool activate);
-
-    /**
-     * Report a config's metrics data has been dropped.
-     */
-    void noteDataDropped(const ConfigKey& key, const size_t totalBytes);
-
-    /**
-     * Report metrics data report has been sent.
-     *
-     * The report may be requested via StatsManager API, or through adb cmd.
-     */
-    void noteMetricsReportSent(const ConfigKey& key, const size_t num_bytes);
-
-    /**
-     * Report the size of output tuple of a condition.
-     *
-     * Note: only report when the condition has an output dimension, and the tuple
-     * count > kDimensionKeySizeSoftLimit.
-     *
-     * [key]: The config key that this condition belongs to.
-     * [id]: The id of the condition.
-     * [size]: The output tuple size.
-     */
-    void noteConditionDimensionSize(const ConfigKey& key, const int64_t& id, int size);
-
-    /**
-     * Report the size of output tuple of a metric.
-     *
-     * Note: only report when the metric has an output dimension, and the tuple
-     * count > kDimensionKeySizeSoftLimit.
-     *
-     * [key]: The config key that this metric belongs to.
-     * [id]: The id of the metric.
-     * [size]: The output tuple size.
-     */
-    void noteMetricDimensionSize(const ConfigKey& key, const int64_t& id, int size);
-
-    /**
-     * Report the max size of output tuple of dimension in condition across dimensions in what.
-     *
-     * Note: only report when the metric has an output dimension in condition, and the max tuple
-     * count > kDimensionKeySizeSoftLimit.
-     *
-     * [key]: The config key that this metric belongs to.
-     * [id]: The id of the metric.
-     * [size]: The output tuple size.
-     */
-    void noteMetricDimensionInConditionSize(const ConfigKey& key, const int64_t& id, int size);
-
-    /**
-     * Report a matcher has been matched.
-     *
-     * [key]: The config key that this matcher belongs to.
-     * [id]: The id of the matcher.
-     */
-    void noteMatcherMatched(const ConfigKey& key, const int64_t& id);
-
-    /**
-     * Report that an anomaly detection alert has been declared.
-     *
-     * [key]: The config key that this alert belongs to.
-     * [id]: The id of the alert.
-     */
-    void noteAnomalyDeclared(const ConfigKey& key, const int64_t& id);
-
-    /**
-     * Report an atom event has been logged.
-     */
-    void noteAtomLogged(int atomId, int32_t timeSec);
-
-    /**
-     * Report that statsd modified the anomaly alarm registered with StatsCompanionService.
-     */
-    void noteRegisteredAnomalyAlarmChanged();
-
-    /**
-     * Report that statsd modified the periodic alarm registered with StatsCompanionService.
-     */
-    void noteRegisteredPeriodicAlarmChanged();
-
-    /**
-     * Records the number of delta entries that are being dropped from the uid map.
-     */
-    void noteUidMapDropped(int deltas);
-
-    /**
-     * Records that an app was deleted (from statsd's map).
-     */
-    void noteUidMapAppDeletionDropped();
-
-    /**
-     * Updates the number of changes currently stored in the uid map.
-     */
-    void setUidMapChanges(int changes);
-    void setCurrentUidMapMemory(int bytes);
-
-    /*
-     * Updates minimum interval between pulls for an pulled atom.
-     */
-    void updateMinPullIntervalSec(int pullAtomId, long intervalSec);
-
-    /*
-     * Notes an atom is pulled.
-     */
-    void notePull(int pullAtomId);
-
-    /*
-     * Notes an atom is served from puller cache.
-     */
-    void notePullFromCache(int pullAtomId);
-
-    /*
-     * Notify data error for pulled atom.
-     */
-    void notePullDataError(int pullAtomId);
-
-    /*
-     * Records time for actual pulling, not including those served from cache and not including
-     * statsd processing delays.
-     */
-    void notePullTime(int pullAtomId, int64_t pullTimeNs);
-
-    /*
-     * Records pull delay for a pulled atom, including those served from cache and including statsd
-     * processing delays.
-     */
-    void notePullDelay(int pullAtomId, int64_t pullDelayNs);
-
-    /*
-     * Records pull exceeds timeout for the puller.
-     */
-    void notePullTimeout(int pullAtomId, int64_t pullUptimeMillis, int64_t pullElapsedMillis);
-
-    /*
-     * Records pull exceeds max delay for a metric.
-     */
-    void notePullExceedMaxDelay(int pullAtomId);
-
-    /*
-     * Records when system server restarts.
-     */
-    void noteSystemServerRestart(int32_t timeSec);
-
-    /**
-     * Records statsd skipped an event.
-     */
-    void noteLogLost(int32_t wallClockTimeSec, int32_t count, int32_t lastError,
-                     int32_t lastAtomTag, int32_t uid, int32_t pid);
-
-    /**
-     * Records that the pull of an atom has failed. Eg, if the client indicated the pull failed, if
-     * the pull timed out, or if the outgoing binder call failed.
-     * This count will only increment if the puller was actually invoked.
-     *
-     * It does not include a pull not occurring due to not finding the appropriate
-     * puller. These cases are covered in other counts.
-     */
-    void notePullFailed(int atomId);
-
-    /**
-     * Records that the pull of an atom has failed due to not having a uid provider.
-     */
-    void notePullUidProviderNotFound(int atomId);
-
-    /**
-     * Records that the pull of an atom has failed due not finding a puller registered by a
-     * trusted uid.
-     */
-    void notePullerNotFound(int atomId);
-
-    /**
-     * Records that the pull has failed due to the outgoing binder call failing.
-     */
-    void notePullBinderCallFailed(int atomId);
-
-    /**
-     * A pull with no data occurred
-     */
-    void noteEmptyData(int atomId);
-
-    /**
-     * Records that a puller callback for the given atomId was registered or unregistered.
-     *
-     * @param registered True if the callback was registered, false if was unregistered.
-     */
-    void notePullerCallbackRegistrationChanged(int atomId, bool registered);
-
-    /**
-     * Hard limit was reached in the cardinality of an atom
-     */
-    void noteHardDimensionLimitReached(int64_t metricId);
-
-    /**
-     * A log event was too late, arrived in the wrong bucket and was skipped
-     */
-    void noteLateLogEventSkipped(int64_t metricId);
-
-    /**
-     * Buckets were skipped as time elapsed without any data for them
-     */
-    void noteSkippedForwardBuckets(int64_t metricId);
-
-    /**
-     * An unsupported value type was received
-     */
-    void noteBadValueType(int64_t metricId);
-
-    /**
-     * Buckets were dropped due to reclaim memory.
-     */
-    void noteBucketDropped(int64_t metricId);
-
-    /**
-     * A condition change was too late, arrived in the wrong bucket and was skipped
-     */
-    void noteConditionChangeInNextBucket(int64_t metricId);
-
-    /**
-     * A bucket has been tagged as invalid.
-     */
-    void noteInvalidatedBucket(int64_t metricId);
-
-    /**
-     * Tracks the total number of buckets (include skipped/invalid buckets).
-     */
-    void noteBucketCount(int64_t metricId);
-
-    /**
-     * For pulls at bucket boundaries, it represents the misalignment between the real timestamp and
-     * the end of the bucket.
-     */
-    void noteBucketBoundaryDelayNs(int64_t metricId, int64_t timeDelayNs);
-
-    /**
-     * Number of buckets with unknown condition.
-     */
-    void noteBucketUnknownCondition(int64_t metricId);
-
-    /* Reports one event has been dropped due to queue overflow, and the oldest event timestamp in
-     * the queue */
-    void noteEventQueueOverflow(int64_t oldestEventTimestampNs);
-
-    /**
-     * Reports that the activation broadcast guardrail was hit for this uid. Namely, the broadcast
-     * should have been sent, but instead was skipped due to hitting the guardrail.
-     */
-     void noteActivationBroadcastGuardrailHit(const int uid);
-
-     /**
-      * Reports that an atom is erroneous or cannot be parsed successfully by
-      * statsd. An atom tag of 0 indicates that the client did not supply the
-      * atom id within the encoding.
-      *
-      * For pushed atoms only, this call should be preceded by a call to
-      * noteAtomLogged.
-      */
-     void noteAtomError(int atomTag, bool pull=false);
-
-    /**
-     * Reset the historical stats. Including all stats in icebox, and the tracked stats about
-     * metrics, matchers, and atoms. The active configs will be kept and StatsdStats will continue
-     * to collect stats after reset() has been called.
-     */
-    void reset();
-
-    /**
-     * Output the stats in protobuf binary format to [buffer].
-     *
-     * [reset]: whether to clear the historical stats after the call.
-     */
-    void dumpStats(std::vector<uint8_t>* buffer, bool reset);
-
-    /**
-     * Output statsd stats in human readable format to [out] file descriptor.
-     */
-    void dumpStats(int outFd) const;
-
-    typedef struct PullTimeoutMetadata {
-        int64_t pullTimeoutUptimeMillis;
-        int64_t pullTimeoutElapsedMillis;
-        PullTimeoutMetadata(int64_t uptimeMillis, int64_t elapsedMillis) :
-            pullTimeoutUptimeMillis(uptimeMillis),
-            pullTimeoutElapsedMillis(elapsedMillis) {/* do nothing */}
-    } PullTimeoutMetadata;
-
-    typedef struct {
-        long totalPull = 0;
-        long totalPullFromCache = 0;
-        long minPullIntervalSec = LONG_MAX;
-        int64_t avgPullTimeNs = 0;
-        int64_t maxPullTimeNs = 0;
-        long numPullTime = 0;
-        int64_t avgPullDelayNs = 0;
-        int64_t maxPullDelayNs = 0;
-        long numPullDelay = 0;
-        long dataError = 0;
-        long pullTimeout = 0;
-        long pullExceedMaxDelay = 0;
-        long pullFailed = 0;
-        long pullUidProviderNotFound = 0;
-        long pullerNotFound = 0;
-        long emptyData = 0;
-        long registeredCount = 0;
-        long unregisteredCount = 0;
-        int32_t atomErrorCount = 0;
-        long binderCallFailCount = 0;
-        std::list<PullTimeoutMetadata> pullTimeoutMetadata;
-    } PulledAtomStats;
-
-    typedef struct {
-        long hardDimensionLimitReached = 0;
-        long lateLogEventSkipped = 0;
-        long skippedForwardBuckets = 0;
-        long badValueType = 0;
-        long conditionChangeInNextBucket = 0;
-        long invalidatedBucket = 0;
-        long bucketDropped = 0;
-        int64_t minBucketBoundaryDelayNs = 0;
-        int64_t maxBucketBoundaryDelayNs = 0;
-        long bucketUnknownCondition = 0;
-        long bucketCount = 0;
-    } AtomMetricStats;
-
-private:
-    StatsdStats();
-
-    mutable std::mutex mLock;
-
-    int32_t mStartTimeSec;
-
-    // Track the number of dropped entries used by the uid map.
-    UidMapStats mUidMapStats;
-
-    // The stats about the configs that are still in use.
-    // The map size is capped by kMaxConfigCount.
-    std::map<const ConfigKey, std::shared_ptr<ConfigStats>> mConfigStats;
-
-    // Stores the stats for the configs that are no longer in use.
-    // The size of the vector is capped by kMaxIceBoxSize.
-    std::list<const std::shared_ptr<ConfigStats>> mIceBox;
-
-    // Stores the number of times a pushed atom is logged.
-    // The size of the vector is the largest pushed atom id in atoms.proto + 1. Atoms
-    // out of that range will be put in mNonPlatformPushedAtomStats.
-    // This is a vector, not a map because it will be accessed A LOT -- for each stats log.
-    std::vector<int> mPushedAtomStats;
-
-    // Stores the number of times a pushed atom is logged for atom ids above kMaxPushedAtomId.
-    // The max size of the map is kMaxNonPlatformPushedAtoms.
-    std::unordered_map<int, int> mNonPlatformPushedAtomStats;
-
-    // Maps PullAtomId to its stats. The size is capped by the puller atom counts.
-    std::map<int, PulledAtomStats> mPulledAtomStats;
-
-    // Stores the number of times a pushed atom was logged erroneously. The
-    // corresponding counts for pulled atoms are stored in PulledAtomStats.
-    // The max size of this map is kMaxAtomErrorsStatsSize.
-    std::map<int, int> mPushedAtomErrorStats;
-    int kMaxPushedAtomErrorStatsSize = 100;
-
-    // Maps metric ID to its stats. The size is capped by the number of metrics.
-    std::map<int64_t, AtomMetricStats> mAtomMetricStats;
-
-    // Maps uids to times when the activation changed broadcast not sent due to hitting the
-    // guardrail. The size is capped by the number of configs, and up to 20 times per uid.
-    std::map<int, std::list<int32_t>> mActivationBroadcastGuardrailStats;
-
-    struct LogLossStats {
-        LogLossStats(int32_t sec, int32_t count, int32_t error, int32_t tag, int32_t uid,
-                     int32_t pid)
-            : mWallClockSec(sec),
-              mCount(count),
-              mLastError(error),
-              mLastTag(tag),
-              mUid(uid),
-              mPid(pid) {
-        }
-        int32_t mWallClockSec;
-        int32_t mCount;
-        // error code defined in linux/errno.h
-        int32_t mLastError;
-        int32_t mLastTag;
-        int32_t mUid;
-        int32_t mPid;
-    };
-
-    // Max of {(now - oldestEventTimestamp) when overflow happens}.
-    // This number is helpful to understand how SLOW statsd can be.
-    int64_t mMaxQueueHistoryNs = 0;
-
-    // Min of {(now - oldestEventTimestamp) when overflow happens}.
-    // This number is helpful to understand how FAST the events floods to statsd.
-    int64_t mMinQueueHistoryNs = kInt64Max;
-
-    // Total number of events that are lost due to queue overflow.
-    int32_t mOverflowCount = 0;
-
-    // Timestamps when we detect log loss, and the number of logs lost.
-    std::list<LogLossStats> mLogLossStats;
-
-    std::list<int32_t> mSystemServerRestartSec;
-
-    // Stores the number of times statsd modified the anomaly alarm registered with
-    // StatsCompanionService.
-    int mAnomalyAlarmRegisteredStats = 0;
-
-    // Stores the number of times statsd registers the periodic alarm changes
-    int mPeriodicAlarmRegisteredStats = 0;
-
-    void noteConfigResetInternalLocked(const ConfigKey& key);
-
-    void noteConfigRemovedInternalLocked(const ConfigKey& key);
-
-    void resetInternalLocked();
-
-    void noteDataDropped(const ConfigKey& key, const size_t totalBytes, int32_t timeSec);
-
-    void noteMetricsReportSent(const ConfigKey& key, const size_t num_bytes, int32_t timeSec);
-
-    void noteBroadcastSent(const ConfigKey& key, int32_t timeSec);
-
-    void noteActiveStatusChanged(const ConfigKey& key, bool activate, int32_t timeSec);
-
-    void noteActivationBroadcastGuardrailHit(const int uid, int32_t timeSec);
-
-    void addToIceBoxLocked(std::shared_ptr<ConfigStats>& stats);
-
-    int getPushedAtomErrors(int atomId) const;
-
-    /**
-     * Get a reference to AtomMetricStats for a metric. If none exists, create it. The reference
-     * will live as long as `this`.
-     */
-    StatsdStats::AtomMetricStats& getAtomMetricStats(int64_t metricId);
-
-    FRIEND_TEST(StatsdStatsTest, TestValidConfigAdd);
-    FRIEND_TEST(StatsdStatsTest, TestInvalidConfigAdd);
-    FRIEND_TEST(StatsdStatsTest, TestConfigRemove);
-    FRIEND_TEST(StatsdStatsTest, TestSubStats);
-    FRIEND_TEST(StatsdStatsTest, TestAtomLog);
-    FRIEND_TEST(StatsdStatsTest, TestNonPlatformAtomLog);
-    FRIEND_TEST(StatsdStatsTest, TestTimestampThreshold);
-    FRIEND_TEST(StatsdStatsTest, TestAnomalyMonitor);
-    FRIEND_TEST(StatsdStatsTest, TestSystemServerCrash);
-    FRIEND_TEST(StatsdStatsTest, TestPullAtomStats);
-    FRIEND_TEST(StatsdStatsTest, TestAtomMetricsStats);
-    FRIEND_TEST(StatsdStatsTest, TestActivationBroadcastGuardrailHit);
-    FRIEND_TEST(StatsdStatsTest, TestAtomErrorStats);
-
-    FRIEND_TEST(StatsLogProcessorTest, InvalidConfigRemoved);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/hash.cpp b/cmds/statsd/src/hash.cpp
deleted file mode 100644
index 543a748..0000000
--- a/cmds/statsd/src/hash.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "hash.h"
-
-#ifndef FALLTHROUGH_INTENDED
-#define FALLTHROUGH_INTENDED [[fallthrough]]
-#endif
-
-namespace android {
-namespace os {
-namespace statsd {
-
-namespace {
-// Lower-level versions of Get... that read directly from a character buffer
-// without any bounds checking.
-inline uint32_t DecodeFixed32(const char *ptr) {
-  return ((static_cast<uint32_t>(static_cast<unsigned char>(ptr[0]))) |
-          (static_cast<uint32_t>(static_cast<unsigned char>(ptr[1])) << 8) |
-          (static_cast<uint32_t>(static_cast<unsigned char>(ptr[2])) << 16) |
-          (static_cast<uint32_t>(static_cast<unsigned char>(ptr[3])) << 24));
-}
-
-inline uint64_t DecodeFixed64(const char* ptr) {
-    uint64_t lo = DecodeFixed32(ptr);
-    uint64_t hi = DecodeFixed32(ptr + 4);
-    return (hi << 32) | lo;
-}
-
-// 0xff is in case char is signed.
-static inline uint32_t ByteAs32(char c) { return static_cast<uint32_t>(c) & 0xff; }
-static inline uint64_t ByteAs64(char c) { return static_cast<uint64_t>(c) & 0xff; }
-
-}  // namespace
-
-uint32_t Hash32(const char *data, size_t n, uint32_t seed) {
-  // 'm' and 'r' are mixing constants generated offline.
-  // They're not really 'magic', they just happen to work well.
-  const uint32_t m = 0x5bd1e995;
-  const int r = 24;
-
-  // Initialize the hash to a 'random' value
-  uint32_t h = static_cast<uint32_t>(seed ^ n);
-
-  // Mix 4 bytes at a time into the hash
-  while (n >= 4) {
-    uint32_t k = DecodeFixed32(data);
-    k *= m;
-    k ^= k >> r;
-    k *= m;
-    h *= m;
-    h ^= k;
-    data += 4;
-    n -= 4;
-  }
-
-  // Handle the last few bytes of the input array
-  switch (n) {
-    case 3:
-      h ^= ByteAs32(data[2]) << 16;
-      FALLTHROUGH_INTENDED;
-    case 2:
-      h ^= ByteAs32(data[1]) << 8;
-      FALLTHROUGH_INTENDED;
-    case 1:
-      h ^= ByteAs32(data[0]);
-      h *= m;
-  }
-
-  // Do a few final mixes of the hash to ensure the last few
-  // bytes are well-incorporated.
-  h ^= h >> 13;
-  h *= m;
-  h ^= h >> 15;
-  return h;
-}
-
-uint64_t Hash64(const char* data, size_t n, uint64_t seed) {
-  const uint64_t m = 0xc6a4a7935bd1e995;
-  const int r = 47;
-
-  uint64_t h = seed ^ (n * m);
-
-  while (n >= 8) {
-    uint64_t k = DecodeFixed64(data);
-    data += 8;
-    n -= 8;
-
-    k *= m;
-    k ^= k >> r;
-    k *= m;
-
-    h ^= k;
-    h *= m;
-  }
-
-  switch (n) {
-    case 7:
-      h ^= ByteAs64(data[6]) << 48;
-      FALLTHROUGH_INTENDED;
-    case 6:
-      h ^= ByteAs64(data[5]) << 40;
-      FALLTHROUGH_INTENDED;
-    case 5:
-      h ^= ByteAs64(data[4]) << 32;
-      FALLTHROUGH_INTENDED;
-    case 4:
-      h ^= ByteAs64(data[3]) << 24;
-      FALLTHROUGH_INTENDED;
-    case 3:
-      h ^= ByteAs64(data[2]) << 16;
-      FALLTHROUGH_INTENDED;
-    case 2:
-      h ^= ByteAs64(data[1]) << 8;
-      FALLTHROUGH_INTENDED;
-    case 1:
-      h ^= ByteAs64(data[0]);
-      h *= m;
-  }
-
-  h ^= h >> r;
-  h *= m;
-  h ^= h >> r;
-
-  return h;
-}
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/hash.h b/cmds/statsd/src/hash.h
deleted file mode 100644
index cfe869f..0000000
--- a/cmds/statsd/src/hash.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <string>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-extern uint32_t Hash32(const char *data, size_t n, uint32_t seed);
-extern uint64_t Hash64(const char* data, size_t n, uint64_t seed);
-
-inline uint32_t Hash32(const char *data, size_t n) {
-  return Hash32(data, n, 0xBEEF);
-}
-
-inline uint32_t Hash32(const std::string &input) {
-  return Hash32(input.data(), input.size());
-}
-
-inline uint64_t Hash64(const char* data, size_t n) {
-  return Hash64(data, n, 0xDECAFCAFFE);
-}
-
-inline uint64_t Hash64(const std::string& str) {
-  return Hash64(str.data(), str.size());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/logd/LogEvent.cpp b/cmds/statsd/src/logd/LogEvent.cpp
deleted file mode 100644
index f56fa62..0000000
--- a/cmds/statsd/src/logd/LogEvent.cpp
+++ /dev/null
@@ -1,599 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "logd/LogEvent.h"
-
-#include <android-base/stringprintf.h>
-#include <android/binder_ibinder.h>
-#include <private/android_filesystem_config.h>
-
-#include "annotations.h"
-#include "stats_log_util.h"
-#include "statslog_statsd.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// for TrainInfo experiment id serialization
-const int FIELD_ID_EXPERIMENT_ID = 1;
-
-using namespace android::util;
-using android::base::StringPrintf;
-using android::util::ProtoOutputStream;
-using std::string;
-using std::vector;
-
-// stats_event.h socket types. Keep in sync.
-/* ERRORS */
-#define ERROR_NO_TIMESTAMP 0x1
-#define ERROR_NO_ATOM_ID 0x2
-#define ERROR_OVERFLOW 0x4
-#define ERROR_ATTRIBUTION_CHAIN_TOO_LONG 0x8
-#define ERROR_TOO_MANY_KEY_VALUE_PAIRS 0x10
-#define ERROR_ANNOTATION_DOES_NOT_FOLLOW_FIELD 0x20
-#define ERROR_INVALID_ANNOTATION_ID 0x40
-#define ERROR_ANNOTATION_ID_TOO_LARGE 0x80
-#define ERROR_TOO_MANY_ANNOTATIONS 0x100
-#define ERROR_TOO_MANY_FIELDS 0x200
-#define ERROR_INVALID_VALUE_TYPE 0x400
-#define ERROR_STRING_NOT_NULL_TERMINATED 0x800
-
-/* TYPE IDS */
-#define INT32_TYPE 0x00
-#define INT64_TYPE 0x01
-#define STRING_TYPE 0x02
-#define LIST_TYPE 0x03
-#define FLOAT_TYPE 0x04
-#define BOOL_TYPE 0x05
-#define BYTE_ARRAY_TYPE 0x06
-#define OBJECT_TYPE 0x07
-#define KEY_VALUE_PAIRS_TYPE 0x08
-#define ATTRIBUTION_CHAIN_TYPE 0x09
-#define ERROR_TYPE 0x0F
-
-LogEvent::LogEvent(int32_t uid, int32_t pid)
-    : mLogdTimestampNs(time(nullptr)), mLogUid(uid), mLogPid(pid) {
-}
-
-LogEvent::LogEvent(const string& trainName, int64_t trainVersionCode, bool requiresStaging,
-                   bool rollbackEnabled, bool requiresLowLatencyMonitor, int32_t state,
-                   const std::vector<uint8_t>& experimentIds, int32_t userId) {
-    mLogdTimestampNs = getWallClockNs();
-    mElapsedTimestampNs = getElapsedRealtimeNs();
-    mTagId = util::BINARY_PUSH_STATE_CHANGED;
-    mLogUid = AIBinder_getCallingUid();
-    mLogPid = AIBinder_getCallingPid();
-
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(1)), Value(trainName)));
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(2)), Value(trainVersionCode)));
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(3)), Value((int)requiresStaging)));
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(4)), Value((int)rollbackEnabled)));
-    mValues.push_back(
-            FieldValue(Field(mTagId, getSimpleField(5)), Value((int)requiresLowLatencyMonitor)));
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(6)), Value(state)));
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(7)), Value(experimentIds)));
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(8)), Value(userId)));
-}
-
-LogEvent::LogEvent(int64_t wallClockTimestampNs, int64_t elapsedTimestampNs,
-                   const InstallTrainInfo& trainInfo) {
-    mLogdTimestampNs = wallClockTimestampNs;
-    mElapsedTimestampNs = elapsedTimestampNs;
-    mTagId = util::TRAIN_INFO;
-
-    mValues.push_back(
-            FieldValue(Field(mTagId, getSimpleField(1)), Value(trainInfo.trainVersionCode)));
-    std::vector<uint8_t> experimentIdsProto;
-    writeExperimentIdsToProto(trainInfo.experimentIds, &experimentIdsProto);
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(2)), Value(experimentIdsProto)));
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(3)), Value(trainInfo.trainName)));
-    mValues.push_back(FieldValue(Field(mTagId, getSimpleField(4)), Value(trainInfo.status)));
-}
-
-void LogEvent::parseInt32(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) {
-    int32_t value = readNextValue<int32_t>();
-    addToValues(pos, depth, value, last);
-    parseAnnotations(numAnnotations);
-}
-
-void LogEvent::parseInt64(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) {
-    int64_t value = readNextValue<int64_t>();
-    addToValues(pos, depth, value, last);
-    parseAnnotations(numAnnotations);
-}
-
-void LogEvent::parseString(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) {
-    int32_t numBytes = readNextValue<int32_t>();
-    if ((uint32_t)numBytes > mRemainingLen) {
-        mValid = false;
-        return;
-    }
-
-    string value = string((char*)mBuf, numBytes);
-    mBuf += numBytes;
-    mRemainingLen -= numBytes;
-    addToValues(pos, depth, value, last);
-    parseAnnotations(numAnnotations);
-}
-
-void LogEvent::parseFloat(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) {
-    float value = readNextValue<float>();
-    addToValues(pos, depth, value, last);
-    parseAnnotations(numAnnotations);
-}
-
-void LogEvent::parseBool(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) {
-    // cast to int32_t because FieldValue does not support bools
-    int32_t value = (int32_t)readNextValue<uint8_t>();
-    addToValues(pos, depth, value, last);
-    parseAnnotations(numAnnotations);
-}
-
-void LogEvent::parseByteArray(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) {
-    int32_t numBytes = readNextValue<int32_t>();
-    if ((uint32_t)numBytes > mRemainingLen) {
-        mValid = false;
-        return;
-    }
-
-    vector<uint8_t> value(mBuf, mBuf + numBytes);
-    mBuf += numBytes;
-    mRemainingLen -= numBytes;
-    addToValues(pos, depth, value, last);
-    parseAnnotations(numAnnotations);
-}
-
-void LogEvent::parseKeyValuePairs(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) {
-    int32_t numPairs = readNextValue<uint8_t>();
-
-    for (pos[1] = 1; pos[1] <= numPairs; pos[1]++) {
-        last[1] = (pos[1] == numPairs);
-
-        // parse key
-        pos[2] = 1;
-        parseInt32(pos, /*depth=*/2, last, /*numAnnotations=*/0);
-
-        // parse value
-        last[2] = true;
-
-        uint8_t typeInfo = readNextValue<uint8_t>();
-        switch (getTypeId(typeInfo)) {
-            case INT32_TYPE:
-                pos[2] = 2;  // pos[2] determined by index of type in KeyValuePair in atoms.proto
-                parseInt32(pos, /*depth=*/2, last, /*numAnnotations=*/0);
-                break;
-            case INT64_TYPE:
-                pos[2] = 3;
-                parseInt64(pos, /*depth=*/2, last, /*numAnnotations=*/0);
-                break;
-            case STRING_TYPE:
-                pos[2] = 4;
-                parseString(pos, /*depth=*/2, last, /*numAnnotations=*/0);
-                break;
-            case FLOAT_TYPE:
-                pos[2] = 5;
-                parseFloat(pos, /*depth=*/2, last, /*numAnnotations=*/0);
-                break;
-            default:
-                mValid = false;
-        }
-    }
-
-    parseAnnotations(numAnnotations);
-
-    pos[1] = pos[2] = 1;
-    last[1] = last[2] = false;
-}
-
-void LogEvent::parseAttributionChain(int32_t* pos, int32_t depth, bool* last,
-                                     uint8_t numAnnotations) {
-    const unsigned int firstUidInChainIndex = mValues.size();
-    const int32_t numNodes = readNextValue<uint8_t>();
-    for (pos[1] = 1; pos[1] <= numNodes; pos[1]++) {
-        last[1] = (pos[1] == numNodes);
-
-        // parse uid
-        pos[2] = 1;
-        parseInt32(pos, /*depth=*/2, last, /*numAnnotations=*/0);
-
-        // parse tag
-        pos[2] = 2;
-        last[2] = true;
-        parseString(pos, /*depth=*/2, last, /*numAnnotations=*/0);
-    }
-    // Check if at least one node was successfully parsed.
-    if (mValues.size() - 1 > firstUidInChainIndex) {
-        mAttributionChainStartIndex = static_cast<int8_t>(firstUidInChainIndex);
-        mAttributionChainEndIndex = static_cast<int8_t>(mValues.size() - 1);
-    }
-
-    parseAnnotations(numAnnotations, firstUidInChainIndex);
-
-    pos[1] = pos[2] = 1;
-    last[1] = last[2] = false;
-}
-
-// Assumes that mValues is not empty
-bool LogEvent::checkPreviousValueType(Type expected) {
-    return mValues[mValues.size() - 1].mValue.getType() == expected;
-}
-
-void LogEvent::parseIsUidAnnotation(uint8_t annotationType) {
-    if (mValues.empty() || !checkPreviousValueType(INT) || annotationType != BOOL_TYPE) {
-        mValid = false;
-        return;
-    }
-
-    bool isUid = readNextValue<uint8_t>();
-    if (isUid) mUidFieldIndex = static_cast<int8_t>(mValues.size() - 1);
-    mValues[mValues.size() - 1].mAnnotations.setUidField(isUid);
-}
-
-void LogEvent::parseTruncateTimestampAnnotation(uint8_t annotationType) {
-    if (!mValues.empty() || annotationType != BOOL_TYPE) {
-        mValid = false;
-        return;
-    }
-
-    mTruncateTimestamp = readNextValue<uint8_t>();
-}
-
-void LogEvent::parsePrimaryFieldAnnotation(uint8_t annotationType) {
-    if (mValues.empty() || annotationType != BOOL_TYPE) {
-        mValid = false;
-        return;
-    }
-
-    const bool primaryField = readNextValue<uint8_t>();
-    mValues[mValues.size() - 1].mAnnotations.setPrimaryField(primaryField);
-}
-
-void LogEvent::parsePrimaryFieldFirstUidAnnotation(uint8_t annotationType,
-                                                   int firstUidInChainIndex) {
-    if (mValues.empty() || annotationType != BOOL_TYPE || -1 == firstUidInChainIndex) {
-        mValid = false;
-        return;
-    }
-
-    const bool primaryField = readNextValue<uint8_t>();
-    mValues[firstUidInChainIndex].mAnnotations.setPrimaryField(primaryField);
-}
-
-void LogEvent::parseExclusiveStateAnnotation(uint8_t annotationType) {
-    if (mValues.empty() || annotationType != BOOL_TYPE) {
-        mValid = false;
-        return;
-    }
-
-    const bool exclusiveState = readNextValue<uint8_t>();
-    mExclusiveStateFieldIndex = static_cast<int8_t>(mValues.size() - 1);
-    mValues[getExclusiveStateFieldIndex()].mAnnotations.setExclusiveState(exclusiveState);
-}
-
-void LogEvent::parseTriggerStateResetAnnotation(uint8_t annotationType) {
-    if (mValues.empty() || annotationType != INT32_TYPE) {
-        mValid = false;
-        return;
-    }
-
-    mResetState = readNextValue<int32_t>();
-}
-
-void LogEvent::parseStateNestedAnnotation(uint8_t annotationType) {
-    if (mValues.empty() || annotationType != BOOL_TYPE) {
-        mValid = false;
-        return;
-    }
-
-    bool nested = readNextValue<uint8_t>();
-    mValues[mValues.size() - 1].mAnnotations.setNested(nested);
-}
-
-// firstUidInChainIndex is a default parameter that is only needed when parsing
-// annotations for attribution chains.
-void LogEvent::parseAnnotations(uint8_t numAnnotations, int firstUidInChainIndex) {
-    for (uint8_t i = 0; i < numAnnotations; i++) {
-        uint8_t annotationId = readNextValue<uint8_t>();
-        uint8_t annotationType = readNextValue<uint8_t>();
-
-        switch (annotationId) {
-            case ANNOTATION_ID_IS_UID:
-                parseIsUidAnnotation(annotationType);
-                break;
-            case ANNOTATION_ID_TRUNCATE_TIMESTAMP:
-                parseTruncateTimestampAnnotation(annotationType);
-                break;
-            case ANNOTATION_ID_PRIMARY_FIELD:
-                parsePrimaryFieldAnnotation(annotationType);
-                break;
-            case ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID:
-                parsePrimaryFieldFirstUidAnnotation(annotationType, firstUidInChainIndex);
-                break;
-            case ANNOTATION_ID_EXCLUSIVE_STATE:
-                parseExclusiveStateAnnotation(annotationType);
-                break;
-            case ANNOTATION_ID_TRIGGER_STATE_RESET:
-                parseTriggerStateResetAnnotation(annotationType);
-                break;
-            case ANNOTATION_ID_STATE_NESTED:
-                parseStateNestedAnnotation(annotationType);
-                break;
-            default:
-                mValid = false;
-                return;
-        }
-    }
-}
-
-// This parsing logic is tied to the encoding scheme used in StatsEvent.java and
-// stats_event.c
-bool LogEvent::parseBuffer(uint8_t* buf, size_t len) {
-    mBuf = buf;
-    mRemainingLen = (uint32_t)len;
-
-    int32_t pos[] = {1, 1, 1};
-    bool last[] = {false, false, false};
-
-    // Beginning of buffer is OBJECT_TYPE | NUM_FIELDS | TIMESTAMP | ATOM_ID
-    uint8_t typeInfo = readNextValue<uint8_t>();
-    if (getTypeId(typeInfo) != OBJECT_TYPE) mValid = false;
-
-    uint8_t numElements = readNextValue<uint8_t>();
-    if (numElements < 2 || numElements > 127) mValid = false;
-
-    typeInfo = readNextValue<uint8_t>();
-    if (getTypeId(typeInfo) != INT64_TYPE) mValid = false;
-    mElapsedTimestampNs = readNextValue<int64_t>();
-    numElements--;
-
-    typeInfo = readNextValue<uint8_t>();
-    if (getTypeId(typeInfo) != INT32_TYPE) mValid = false;
-    mTagId = readNextValue<int32_t>();
-    numElements--;
-    parseAnnotations(getNumAnnotations(typeInfo));  // atom-level annotations
-
-    for (pos[0] = 1; pos[0] <= numElements && mValid; pos[0]++) {
-        last[0] = (pos[0] == numElements);
-
-        typeInfo = readNextValue<uint8_t>();
-        uint8_t typeId = getTypeId(typeInfo);
-
-        switch (typeId) {
-            case BOOL_TYPE:
-                parseBool(pos, /*depth=*/0, last, getNumAnnotations(typeInfo));
-                break;
-            case INT32_TYPE:
-                parseInt32(pos, /*depth=*/0, last, getNumAnnotations(typeInfo));
-                break;
-            case INT64_TYPE:
-                parseInt64(pos, /*depth=*/0, last, getNumAnnotations(typeInfo));
-                break;
-            case FLOAT_TYPE:
-                parseFloat(pos, /*depth=*/0, last, getNumAnnotations(typeInfo));
-                break;
-            case BYTE_ARRAY_TYPE:
-                parseByteArray(pos, /*depth=*/0, last, getNumAnnotations(typeInfo));
-                break;
-            case STRING_TYPE:
-                parseString(pos, /*depth=*/0, last, getNumAnnotations(typeInfo));
-                break;
-            case KEY_VALUE_PAIRS_TYPE:
-                parseKeyValuePairs(pos, /*depth=*/0, last, getNumAnnotations(typeInfo));
-                break;
-            case ATTRIBUTION_CHAIN_TYPE:
-                parseAttributionChain(pos, /*depth=*/0, last, getNumAnnotations(typeInfo));
-                break;
-            case ERROR_TYPE:
-                /* mErrorBitmask =*/ readNextValue<int32_t>();
-                mValid = false;
-                break;
-            default:
-                mValid = false;
-                break;
-        }
-    }
-
-    if (mRemainingLen != 0) mValid = false;
-    mBuf = nullptr;
-    return mValid;
-}
-
-uint8_t LogEvent::getTypeId(uint8_t typeInfo) {
-    return typeInfo & 0x0F;  // type id in lower 4 bytes
-}
-
-uint8_t LogEvent::getNumAnnotations(uint8_t typeInfo) {
-    return (typeInfo >> 4) & 0x0F;  // num annotations in upper 4 bytes
-}
-
-int64_t LogEvent::GetLong(size_t key, status_t* err) const {
-    // TODO(b/110561208): encapsulate the magical operations in Field struct as static functions
-    int field = getSimpleField(key);
-    for (const auto& value : mValues) {
-        if (value.mField.getField() == field) {
-            if (value.mValue.getType() == LONG) {
-                return value.mValue.long_value;
-            } else if (value.mValue.getType() == INT) {
-                return value.mValue.int_value;
-            } else {
-                *err = BAD_TYPE;
-                return 0;
-            }
-        }
-        if ((size_t)value.mField.getPosAtDepth(0) > key) {
-            break;
-        }
-    }
-
-    *err = BAD_INDEX;
-    return 0;
-}
-
-int LogEvent::GetInt(size_t key, status_t* err) const {
-    int field = getSimpleField(key);
-    for (const auto& value : mValues) {
-        if (value.mField.getField() == field) {
-            if (value.mValue.getType() == INT) {
-                return value.mValue.int_value;
-            } else {
-                *err = BAD_TYPE;
-                return 0;
-            }
-        }
-        if ((size_t)value.mField.getPosAtDepth(0) > key) {
-            break;
-        }
-    }
-
-    *err = BAD_INDEX;
-    return 0;
-}
-
-const char* LogEvent::GetString(size_t key, status_t* err) const {
-    int field = getSimpleField(key);
-    for (const auto& value : mValues) {
-        if (value.mField.getField() == field) {
-            if (value.mValue.getType() == STRING) {
-                return value.mValue.str_value.c_str();
-            } else {
-                *err = BAD_TYPE;
-                return 0;
-            }
-        }
-        if ((size_t)value.mField.getPosAtDepth(0) > key) {
-            break;
-        }
-    }
-
-    *err = BAD_INDEX;
-    return NULL;
-}
-
-bool LogEvent::GetBool(size_t key, status_t* err) const {
-    int field = getSimpleField(key);
-    for (const auto& value : mValues) {
-        if (value.mField.getField() == field) {
-            if (value.mValue.getType() == INT) {
-                return value.mValue.int_value != 0;
-            } else if (value.mValue.getType() == LONG) {
-                return value.mValue.long_value != 0;
-            } else {
-                *err = BAD_TYPE;
-                return false;
-            }
-        }
-        if ((size_t)value.mField.getPosAtDepth(0) > key) {
-            break;
-        }
-    }
-
-    *err = BAD_INDEX;
-    return false;
-}
-
-float LogEvent::GetFloat(size_t key, status_t* err) const {
-    int field = getSimpleField(key);
-    for (const auto& value : mValues) {
-        if (value.mField.getField() == field) {
-            if (value.mValue.getType() == FLOAT) {
-                return value.mValue.float_value;
-            } else {
-                *err = BAD_TYPE;
-                return 0.0;
-            }
-        }
-        if ((size_t)value.mField.getPosAtDepth(0) > key) {
-            break;
-        }
-    }
-
-    *err = BAD_INDEX;
-    return 0.0;
-}
-
-std::vector<uint8_t> LogEvent::GetStorage(size_t key, status_t* err) const {
-    int field = getSimpleField(key);
-    for (const auto& value : mValues) {
-        if (value.mField.getField() == field) {
-            if (value.mValue.getType() == STORAGE) {
-                return value.mValue.storage_value;
-            } else {
-                *err = BAD_TYPE;
-                return vector<uint8_t>();
-            }
-        }
-        if ((size_t)value.mField.getPosAtDepth(0) > key) {
-            break;
-        }
-    }
-
-    *err = BAD_INDEX;
-    return vector<uint8_t>();
-}
-
-string LogEvent::ToString() const {
-    string result;
-    result += StringPrintf("{ uid(%d) %lld %lld (%d)", mLogUid, (long long)mLogdTimestampNs,
-                           (long long)mElapsedTimestampNs, mTagId);
-    for (const auto& value : mValues) {
-        result +=
-                StringPrintf("%#x", value.mField.getField()) + "->" + value.mValue.toString() + " ";
-    }
-    result += " }";
-    return result;
-}
-
-void LogEvent::ToProto(ProtoOutputStream& protoOutput) const {
-    writeFieldValueTreeToStream(mTagId, getValues(), &protoOutput);
-}
-
-bool LogEvent::hasAttributionChain(std::pair<int, int>* indexRange) const {
-    if (mAttributionChainStartIndex == -1 || mAttributionChainEndIndex == -1) {
-        return false;
-    }
-
-    if (nullptr != indexRange) {
-        indexRange->first = static_cast<int>(mAttributionChainStartIndex);
-        indexRange->second = static_cast<int>(mAttributionChainEndIndex);
-    }
-
-    return true;
-}
-
-void writeExperimentIdsToProto(const std::vector<int64_t>& experimentIds,
-                               std::vector<uint8_t>* protoOut) {
-    ProtoOutputStream proto;
-    for (const auto& expId : experimentIds) {
-        proto.write(FIELD_TYPE_INT64 | FIELD_COUNT_REPEATED | FIELD_ID_EXPERIMENT_ID,
-                    (long long)expId);
-    }
-
-    protoOut->resize(proto.size());
-    size_t pos = 0;
-    sp<ProtoReader> reader = proto.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(protoOut->data() + pos, reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/logd/LogEvent.h b/cmds/statsd/src/logd/LogEvent.h
deleted file mode 100644
index a5f2460..0000000
--- a/cmds/statsd/src/logd/LogEvent.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "FieldValue.h"
-
-#include <android/util/ProtoOutputStream.h>
-#include <private/android_logger.h>
-
-#include <string>
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-struct InstallTrainInfo {
-    int64_t trainVersionCode;
-    std::string trainName;
-    int32_t status;
-    std::vector<int64_t> experimentIds;
-    bool requiresStaging;
-    bool rollbackEnabled;
-    bool requiresLowLatencyMonitor;
-};
-
-/**
- * This class decodes the structured, serialized encoding of an atom into a
- * vector of FieldValues.
- */
-class LogEvent {
-public:
-    /**
-     * \param uid user id of the logging caller
-     * \param pid process id of the logging caller
-     */
-    explicit LogEvent(int32_t uid, int32_t pid);
-
-    /**
-     * Parses the atomId, timestamp, and vector of values from a buffer
-     * containing the StatsEvent/AStatsEvent encoding of an atom.
-     *
-     * \param buf a buffer that begins at the start of the serialized atom (it
-     * should not include the android_log_header_t or the StatsEventTag)
-     * \param len size of the buffer
-     *
-     * \return success of the initialization
-     */
-    bool parseBuffer(uint8_t* buf, size_t len);
-
-    // Constructs a BinaryPushStateChanged LogEvent from API call.
-    explicit LogEvent(const std::string& trainName, int64_t trainVersionCode, bool requiresStaging,
-                      bool rollbackEnabled, bool requiresLowLatencyMonitor, int32_t state,
-                      const std::vector<uint8_t>& experimentIds, int32_t userId);
-
-    explicit LogEvent(int64_t wallClockTimestampNs, int64_t elapsedTimestampNs,
-                      const InstallTrainInfo& installTrainInfo);
-
-    ~LogEvent() {}
-
-    /**
-     * Get the timestamp associated with this event.
-     */
-    inline int64_t GetLogdTimestampNs() const { return mLogdTimestampNs; }
-    inline int64_t GetElapsedTimestampNs() const { return mElapsedTimestampNs; }
-
-    /**
-     * Get the tag for this event.
-     */
-    inline int GetTagId() const { return mTagId; }
-
-    /**
-     * Get the uid of the logging client.
-     * Returns -1 if the uid is unknown/has not been set.
-     */
-    inline int32_t GetUid() const { return mLogUid; }
-
-    /**
-     * Get the pid of the logging client.
-     * Returns -1 if the pid is unknown/has not been set.
-     */
-    inline int32_t GetPid() const { return mLogPid; }
-
-    /**
-     * Get the nth value, starting at 1.
-     *
-     * Returns BAD_INDEX if the index is larger than the number of elements.
-     * Returns BAD_TYPE if the index is available but the data is the wrong type.
-     */
-    int64_t GetLong(size_t key, status_t* err) const;
-    int GetInt(size_t key, status_t* err) const;
-    const char* GetString(size_t key, status_t* err) const;
-    bool GetBool(size_t key, status_t* err) const;
-    float GetFloat(size_t key, status_t* err) const;
-    std::vector<uint8_t> GetStorage(size_t key, status_t* err) const;
-
-    /**
-     * Return a string representation of this event.
-     */
-    std::string ToString() const;
-
-    /**
-     * Write this object to a ProtoOutputStream.
-     */
-    void ToProto(android::util::ProtoOutputStream& out) const;
-
-    /**
-     * Set elapsed timestamp if the original timestamp is missing.
-     */
-    void setElapsedTimestampNs(int64_t timestampNs) {
-        mElapsedTimestampNs = timestampNs;
-    }
-
-    /**
-     * Set the timestamp if the original logd timestamp is missing.
-     */
-    void setLogdWallClockTimestampNs(int64_t timestampNs) {
-        mLogdTimestampNs = timestampNs;
-    }
-
-    inline int size() const {
-        return mValues.size();
-    }
-
-    const std::vector<FieldValue>& getValues() const {
-        return mValues;
-    }
-
-    std::vector<FieldValue>* getMutableValues() {
-        return &mValues;
-    }
-
-    // Default value = false
-    inline bool shouldTruncateTimestamp() const {
-        return mTruncateTimestamp;
-    }
-
-    // Returns the index of the uid field within the FieldValues vector if the
-    // uid exists. If there is no uid field, returns -1.
-    //
-    // If the index within the atom definition is desired, do the following:
-    //    int vectorIndex = LogEvent.getUidFieldIndex();
-    //    if (vectorIndex != -1) {
-    //        FieldValue& v = LogEvent.getValues()[vectorIndex];
-    //        int atomIndex = v.mField.getPosAtDepth(0);
-    //    }
-    // Note that atomIndex is 1-indexed.
-    inline int getUidFieldIndex() {
-        return static_cast<int>(mUidFieldIndex);
-    }
-
-    // Returns whether this LogEvent has an AttributionChain.
-    // If it does and indexRange is not a nullptr, populate indexRange with the start and end index
-    // of the AttributionChain within mValues.
-    bool hasAttributionChain(std::pair<int, int>* indexRange = nullptr) const;
-
-    // Returns the index of the exclusive state field within the FieldValues vector if
-    // an exclusive state exists. If there is no exclusive state field, returns -1.
-    //
-    // If the index within the atom definition is desired, do the following:
-    //    int vectorIndex = LogEvent.getExclusiveStateFieldIndex();
-    //    if (vectorIndex != -1) {
-    //        FieldValue& v = LogEvent.getValues()[vectorIndex];
-    //        int atomIndex = v.mField.getPosAtDepth(0);
-    //    }
-    // Note that atomIndex is 1-indexed.
-    inline int getExclusiveStateFieldIndex() const {
-        return static_cast<int>(mExclusiveStateFieldIndex);
-    }
-
-    // If a reset state is not sent in the StatsEvent, returns -1. Note that a
-    // reset state is sent if and only if a reset should be triggered.
-    inline int getResetState() const {
-        return mResetState;
-    }
-
-    inline LogEvent makeCopy() {
-        return LogEvent(*this);
-    }
-
-    template <class T>
-    status_t updateValue(size_t key, T& value, Type type) {
-        int field = getSimpleField(key);
-        for (auto& fieldValue : mValues) {
-            if (fieldValue.mField.getField() == field) {
-                if (fieldValue.mValue.getType() == type) {
-                    fieldValue.mValue = Value(value);
-                   return OK;
-               } else {
-                   return BAD_TYPE;
-                }
-            }
-        }
-        return BAD_INDEX;
-    }
-
-    bool isValid() const {
-        return mValid;
-    }
-
-private:
-    /**
-     * Only use this if copy is absolutely needed.
-     */
-    LogEvent(const LogEvent&) = default;
-
-    void parseInt32(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations);
-    void parseInt64(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations);
-    void parseString(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations);
-    void parseFloat(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations);
-    void parseBool(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations);
-    void parseByteArray(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations);
-    void parseKeyValuePairs(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations);
-    void parseAttributionChain(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations);
-
-    void parseAnnotations(uint8_t numAnnotations, int firstUidInChainIndex = -1);
-    void parseIsUidAnnotation(uint8_t annotationType);
-    void parseTruncateTimestampAnnotation(uint8_t annotationType);
-    void parsePrimaryFieldAnnotation(uint8_t annotationType);
-    void parsePrimaryFieldFirstUidAnnotation(uint8_t annotationType, int firstUidInChainIndex);
-    void parseExclusiveStateAnnotation(uint8_t annotationType);
-    void parseTriggerStateResetAnnotation(uint8_t annotationType);
-    void parseStateNestedAnnotation(uint8_t annotationType);
-    bool checkPreviousValueType(Type expected);
-
-    /**
-     * The below two variables are only valid during the execution of
-     * parseBuffer. There are no guarantees about the state of these variables
-     * before/after.
-     */
-    uint8_t* mBuf;
-    uint32_t mRemainingLen; // number of valid bytes left in the buffer being parsed
-
-    bool mValid = true; // stores whether the event we received from the socket is valid
-
-    /**
-     * Side-effects:
-     *    If there is enough space in buffer to read value of type T
-     *        - move mBuf past the value that was just read
-     *        - decrement mRemainingLen by size of T
-     *    Else
-     *        - set mValid to false
-     */
-    template <class T>
-    T readNextValue() {
-        T value;
-        if (mRemainingLen < sizeof(T)) {
-            mValid = false;
-            value = 0; // all primitive types can successfully cast 0
-        } else {
-            // When alignof(T) == 1, hopefully the compiler can optimize away
-            // this conditional as always true.
-            if ((reinterpret_cast<uintptr_t>(mBuf) % alignof(T)) == 0) {
-                // We're properly aligned, and can safely make this assignment.
-                value = *((T*)mBuf);
-            } else {
-                // We need to use memcpy.  It's slower, but safe.
-                memcpy(&value, mBuf, sizeof(T));
-            }
-            mBuf += sizeof(T);
-            mRemainingLen -= sizeof(T);
-        }
-        return value;
-    }
-
-    template <class T>
-    void addToValues(int32_t* pos, int32_t depth, T& value, bool* last) {
-        Field f = Field(mTagId, pos, depth);
-        // do not decorate last position at depth 0
-        for (int i = 1; i < depth; i++) {
-            if (last[i]) f.decorateLastPos(i);
-        }
-
-        Value v = Value(value);
-        mValues.push_back(FieldValue(f, v));
-    }
-
-    uint8_t getTypeId(uint8_t typeInfo);
-    uint8_t getNumAnnotations(uint8_t typeInfo);
-
-    // The items are naturally sorted in DFS order as we read them. this allows us to do fast
-    // matching.
-    std::vector<FieldValue> mValues;
-
-    // The timestamp set by the logd.
-    int64_t mLogdTimestampNs;
-
-    // The elapsed timestamp set by statsd log writer.
-    int64_t mElapsedTimestampNs;
-
-    // The atom tag of the event (defaults to 0 if client does not
-    // appropriately set the atom id).
-    int mTagId = 0;
-
-    // The uid of the logging client (defaults to -1).
-    int32_t mLogUid = -1;
-
-    // The pid of the logging client (defaults to -1).
-    int32_t mLogPid = -1;
-
-    // Annotations
-    bool mTruncateTimestamp = false;
-    int mResetState = -1;
-
-    // Indexes within the FieldValue vector can be stored in 7 bits because
-    // that's the assumption enforced by the encoding used in FieldValue.
-    int8_t mUidFieldIndex = -1;
-    int8_t mAttributionChainStartIndex = -1;
-    int8_t mAttributionChainEndIndex = -1;
-    int8_t mExclusiveStateFieldIndex = -1;
-};
-
-void writeExperimentIdsToProto(const std::vector<int64_t>& experimentIds, std::vector<uint8_t>* protoOut);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/logd/LogEventQueue.cpp b/cmds/statsd/src/logd/LogEventQueue.cpp
deleted file mode 100644
index 146464b..0000000
--- a/cmds/statsd/src/logd/LogEventQueue.cpp
+++ /dev/null
@@ -1,62 +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.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "LogEventQueue.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::unique_lock;
-using std::unique_ptr;
-
-unique_ptr<LogEvent> LogEventQueue::waitPop() {
-    std::unique_lock<std::mutex> lock(mMutex);
-
-    if (mQueue.empty()) {
-        mCondition.wait(lock, [this] { return !this->mQueue.empty(); });
-    }
-
-    unique_ptr<LogEvent> item = std::move(mQueue.front());
-    mQueue.pop();
-
-    return item;
-}
-
-bool LogEventQueue::push(unique_ptr<LogEvent> item, int64_t* oldestTimestampNs) {
-    bool success;
-    {
-        std::unique_lock<std::mutex> lock(mMutex);
-        if (mQueue.size() < mQueueLimit) {
-            mQueue.push(std::move(item));
-            success = true;
-        } else {
-            // safe operation as queue must not be empty.
-            *oldestTimestampNs = mQueue.front()->GetElapsedTimestampNs();
-            success = false;
-        }
-    }
-
-    mCondition.notify_one();
-    return success;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/logd/LogEventQueue.h b/cmds/statsd/src/logd/LogEventQueue.h
deleted file mode 100644
index 9dda3d2..0000000
--- a/cmds/statsd/src/logd/LogEventQueue.h
+++ /dev/null
@@ -1,57 +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.
- */
-
-#pragma once
-
-#include "LogEvent.h"
-
-#include <condition_variable>
-#include <mutex>
-#include <queue>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * A zero copy thread safe queue buffer for producing and consuming LogEvent.
- */
-class LogEventQueue {
-public:
-    explicit LogEventQueue(size_t maxSize) : mQueueLimit(maxSize){};
-
-    /**
-     * Blocking read one event from the queue.
-     */
-    std::unique_ptr<LogEvent> waitPop();
-
-    /**
-     * Puts a LogEvent ptr to the end of the queue.
-     * Returns false on failure when the queue is full, and output the oldest event timestamp
-     * in the queue.
-     */
-    bool push(std::unique_ptr<LogEvent> event, int64_t* oldestTimestampNs);
-
-private:
-    const size_t mQueueLimit;
-    std::condition_variable mCondition;
-    std::mutex mMutex;
-    std::queue<std::unique_ptr<LogEvent>> mQueue;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/main.cpp b/cmds/statsd/src/main.cpp
deleted file mode 100644
index cd9c4e5..0000000
--- a/cmds/statsd/src/main.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "StatsService.h"
-#include "socket/StatsSocketListener.h"
-
-#include <android/binder_interface_utils.h>
-#include <android/binder_process.h>
-#include <android/binder_manager.h>
-#include <utils/Looper.h>
-
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-using namespace android;
-using namespace android::os::statsd;
-using ::ndk::SharedRefBase;
-using std::shared_ptr;
-using std::make_shared;
-
-shared_ptr<StatsService> gStatsService = nullptr;
-sp<StatsSocketListener> gSocketListener = nullptr;
-
-void signalHandler(int sig) {
-    if (sig == SIGPIPE) {
-        // ShellSubscriber uses SIGPIPE as a signal to detect the end of the
-        // client process. Don't prematurely exit(1) here. Instead, ignore the
-        // signal and allow the write call to return EPIPE.
-        ALOGI("statsd received SIGPIPE. Ignoring signal.");
-        return;
-    }
-
-    if (gSocketListener != nullptr) gSocketListener->stopListener();
-    if (gStatsService != nullptr) gStatsService->Terminate();
-    ALOGW("statsd terminated on receiving signal %d.", sig);
-    exit(1);
-}
-
-void registerSignalHandlers()
-{
-    struct sigaction sa;
-    sigemptyset(&sa.sa_mask);
-    sa.sa_flags = 0;
-    sa.sa_handler = signalHandler;
-    sigaction(SIGPIPE, &sa, nullptr);
-    sigaction(SIGHUP, &sa, nullptr);
-    sigaction(SIGINT, &sa, nullptr);
-    sigaction(SIGQUIT, &sa, nullptr);
-    sigaction(SIGTERM, &sa, nullptr);
-}
-
-int main(int /*argc*/, char** /*argv*/) {
-    // Set up the looper
-    sp<Looper> looper(Looper::prepare(0 /* opts */));
-
-    // Set up the binder
-    ABinderProcess_setThreadPoolMaxThreadCount(9);
-    ABinderProcess_startThreadPool();
-
-    std::shared_ptr<LogEventQueue> eventQueue =
-            std::make_shared<LogEventQueue>(2000 /*buffer limit. Buffer is NOT pre-allocated*/);
-
-    // Create the service
-    gStatsService = SharedRefBase::make<StatsService>(looper, eventQueue);
-    // TODO(b/149582373): Set DUMP_FLAG_PROTO once libbinder_ndk supports
-    // setting dumpsys priorities.
-    binder_status_t status = AServiceManager_addService(gStatsService->asBinder().get(), "stats");
-    if (status != STATUS_OK) {
-        ALOGE("Failed to add service as AIDL service");
-        return -1;
-    }
-
-    registerSignalHandlers();
-
-    gStatsService->sayHiToStatsCompanion();
-
-    gStatsService->Startup();
-
-    gSocketListener = new StatsSocketListener(eventQueue);
-
-    ALOGI("Statsd starts to listen to socket.");
-    // Backlog and /proc/sys/net/unix/max_dgram_qlen set to large value
-    if (gSocketListener->startListener(600)) {
-        exit(1);
-    }
-
-    // Loop forever -- the reports run on this thread in a handler, and the
-    // binder calls remain responsive in their pool of one thread.
-    while (true) {
-        looper->pollAll(-1 /* timeoutMillis */);
-    }
-    ALOGW("statsd escaped from its loop.");
-
-    return 1;
-}
diff --git a/cmds/statsd/src/matchers/CombinationLogMatchingTracker.cpp b/cmds/statsd/src/matchers/CombinationLogMatchingTracker.cpp
deleted file mode 100644
index b94a957..0000000
--- a/cmds/statsd/src/matchers/CombinationLogMatchingTracker.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "Log.h"
-
-#include "CombinationLogMatchingTracker.h"
-#include "matchers/matcher_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-CombinationLogMatchingTracker::CombinationLogMatchingTracker(const int64_t& id, const int index)
-    : LogMatchingTracker(id, index) {
-}
-
-CombinationLogMatchingTracker::~CombinationLogMatchingTracker() {
-}
-
-bool CombinationLogMatchingTracker::init(const vector<AtomMatcher>& allLogMatchers,
-                                         const vector<sp<LogMatchingTracker>>& allTrackers,
-                                         const unordered_map<int64_t, int>& matcherMap,
-                                         vector<bool>& stack) {
-    if (mInitialized) {
-        return true;
-    }
-
-    // mark this node as visited in the recursion stack.
-    stack[mIndex] = true;
-
-    AtomMatcher_Combination matcher = allLogMatchers[mIndex].combination();
-
-    // LogicalOperation is missing in the config
-    if (!matcher.has_operation()) {
-        return false;
-    }
-
-    mLogicalOperation = matcher.operation();
-
-    if (mLogicalOperation == LogicalOperation::NOT && matcher.matcher_size() != 1) {
-        return false;
-    }
-
-    for (const auto& child : matcher.matcher()) {
-        auto pair = matcherMap.find(child);
-        if (pair == matcherMap.end()) {
-            ALOGW("Matcher %lld not found in the config", (long long)child);
-            return false;
-        }
-
-        int childIndex = pair->second;
-
-        // if the child is a visited node in the recursion -> circle detected.
-        if (stack[childIndex]) {
-            ALOGE("Circle detected in matcher config");
-            return false;
-        }
-
-        if (!allTrackers[childIndex]->init(allLogMatchers, allTrackers, matcherMap, stack)) {
-            ALOGW("child matcher init failed %lld", (long long)child);
-            return false;
-        }
-
-        mChildren.push_back(childIndex);
-
-        const set<int>& childTagIds = allTrackers[childIndex]->getAtomIds();
-        mAtomIds.insert(childTagIds.begin(), childTagIds.end());
-    }
-
-    mInitialized = true;
-    // unmark this node in the recursion stack.
-    stack[mIndex] = false;
-    return true;
-}
-
-void CombinationLogMatchingTracker::onLogEvent(const LogEvent& event,
-                                               const vector<sp<LogMatchingTracker>>& allTrackers,
-                                               vector<MatchingState>& matcherResults) {
-    // this event has been processed.
-    if (matcherResults[mIndex] != MatchingState::kNotComputed) {
-        return;
-    }
-
-    if (mAtomIds.find(event.GetTagId()) == mAtomIds.end()) {
-        matcherResults[mIndex] = MatchingState::kNotMatched;
-        return;
-    }
-
-    // evaluate children matchers if they haven't been evaluated.
-    for (const int childIndex : mChildren) {
-        if (matcherResults[childIndex] == MatchingState::kNotComputed) {
-            const sp<LogMatchingTracker>& child = allTrackers[childIndex];
-            child->onLogEvent(event, allTrackers, matcherResults);
-        }
-    }
-
-    bool matched = combinationMatch(mChildren, mLogicalOperation, matcherResults);
-    matcherResults[mIndex] = matched ? MatchingState::kMatched : MatchingState::kNotMatched;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/matchers/CombinationLogMatchingTracker.h b/cmds/statsd/src/matchers/CombinationLogMatchingTracker.h
deleted file mode 100644
index 55bc4605..0000000
--- a/cmds/statsd/src/matchers/CombinationLogMatchingTracker.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef COMBINATION_LOG_MATCHING_TRACKER_H
-#define COMBINATION_LOG_MATCHING_TRACKER_H
-
-#include <unordered_map>
-#include <vector>
-#include "LogMatchingTracker.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Represents a AtomMatcher_Combination in the StatsdConfig.
-class CombinationLogMatchingTracker : public virtual LogMatchingTracker {
-public:
-    CombinationLogMatchingTracker(const int64_t& id, const int index);
-
-    bool init(const std::vector<AtomMatcher>& allLogMatchers,
-              const std::vector<sp<LogMatchingTracker>>& allTrackers,
-              const std::unordered_map<int64_t, int>& matcherMap,
-              std::vector<bool>& stack);
-
-    ~CombinationLogMatchingTracker();
-
-    void onLogEvent(const LogEvent& event,
-                    const std::vector<sp<LogMatchingTracker>>& allTrackers,
-                    std::vector<MatchingState>& matcherResults) override;
-
-private:
-    LogicalOperation mLogicalOperation;
-
-    std::vector<int> mChildren;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#endif  // COMBINATION_LOG_MATCHING_TRACKER_H
diff --git a/cmds/statsd/src/matchers/EventMatcherWizard.cpp b/cmds/statsd/src/matchers/EventMatcherWizard.cpp
deleted file mode 100644
index 025c9a8..0000000
--- a/cmds/statsd/src/matchers/EventMatcherWizard.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "EventMatcherWizard.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::vector;
-
-MatchingState EventMatcherWizard::matchLogEvent(const LogEvent& event, int matcher_index) {
-    if (matcher_index < 0 || matcher_index >= (int)mAllEventMatchers.size()) {
-        return MatchingState::kNotComputed;
-    }
-    vector<MatchingState> matcherCache(mAllEventMatchers.size(), MatchingState::kNotComputed);
-    mAllEventMatchers[matcher_index]->onLogEvent(event, mAllEventMatchers, matcherCache);
-    return matcherCache[matcher_index];
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
\ No newline at end of file
diff --git a/cmds/statsd/src/matchers/EventMatcherWizard.h b/cmds/statsd/src/matchers/EventMatcherWizard.h
deleted file mode 100644
index 57ec2b3..0000000
--- a/cmds/statsd/src/matchers/EventMatcherWizard.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "LogMatchingTracker.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class EventMatcherWizard : public virtual android::RefBase {
-public:
-    EventMatcherWizard(){};  // for testing
-    EventMatcherWizard(const std::vector<sp<LogMatchingTracker>>& eventTrackers)
-        : mAllEventMatchers(eventTrackers){};
-
-    virtual ~EventMatcherWizard(){};
-
-    MatchingState matchLogEvent(const LogEvent& event, int matcher_index);
-
-private:
-    std::vector<sp<LogMatchingTracker>> mAllEventMatchers;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/matchers/LogMatchingTracker.h b/cmds/statsd/src/matchers/LogMatchingTracker.h
deleted file mode 100644
index 88ab4e6..0000000
--- a/cmds/statsd/src/matchers/LogMatchingTracker.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef LOG_MATCHING_TRACKER_H
-#define LOG_MATCHING_TRACKER_H
-
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "logd/LogEvent.h"
-#include "matchers/matcher_util.h"
-
-#include <utils/RefBase.h>
-
-#include <set>
-#include <unordered_map>
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class LogMatchingTracker : public virtual RefBase {
-public:
-    LogMatchingTracker(const int64_t& id, const int index)
-        : mId(id), mIndex(index), mInitialized(false){};
-
-    virtual ~LogMatchingTracker(){};
-
-    // Initialize this LogMatchingTracker.
-    // allLogMatchers: the list of the AtomMatcher proto config. This is needed because we don't
-    //                 store the proto object in memory. We only need it during initilization.
-    // allTrackers: the list of the LogMatchingTracker objects. It's a one-to-one mapping with
-    //              allLogMatchers. This is needed because the initialization is done recursively
-    //              for CombinationLogMatchingTrackers using DFS.
-    // stack: a bit map to record which matcher has been visited on the stack. This is for detecting
-    //        circle dependency.
-    virtual bool init(const std::vector<AtomMatcher>& allLogMatchers,
-                      const std::vector<sp<LogMatchingTracker>>& allTrackers,
-                      const std::unordered_map<int64_t, int>& matcherMap,
-                      std::vector<bool>& stack) = 0;
-
-    // Called when a log event comes.
-    // event: the log event.
-    // allTrackers: the list of all LogMatchingTrackers. This is needed because the log processing
-    //              is done recursively.
-    // matcherResults: The cached results for all matchers for this event. Parent matchers can
-    //                 directly access the children's matching results if they have been evaluated.
-    //                 Otherwise, call children matchers' onLogEvent.
-    virtual void onLogEvent(const LogEvent& event,
-                            const std::vector<sp<LogMatchingTracker>>& allTrackers,
-                            std::vector<MatchingState>& matcherResults) = 0;
-
-    // Get the tagIds that this matcher cares about. The combined collection is stored
-    // in MetricMananger, so that we can pass any LogEvents that are not interest of us. It uses
-    // some memory but hopefully it can save us much CPU time when there is flood of events.
-    virtual const std::set<int>& getAtomIds() const {
-        return mAtomIds;
-    }
-
-    const int64_t& getId() const {
-        return mId;
-    }
-
-protected:
-    // Name of this matching. We don't really need the name, but it makes log message easy to debug.
-    const int64_t mId;
-
-    // Index of this LogMatchingTracker in MetricsManager's container.
-    const int mIndex;
-
-    // Whether this LogMatchingTracker has been properly initialized.
-    bool mInitialized;
-
-    // The collection of the event tag ids that this LogMatchingTracker cares. So we can quickly
-    // return kNotMatched when we receive an event with an id not in the list. This is especially
-    // useful when we have a complex CombinationLogMatcherTracker.
-    std::set<int> mAtomIds;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // LOG_MATCHING_TRACKER_H
diff --git a/cmds/statsd/src/matchers/SimpleLogMatchingTracker.cpp b/cmds/statsd/src/matchers/SimpleLogMatchingTracker.cpp
deleted file mode 100644
index 082daf5a..0000000
--- a/cmds/statsd/src/matchers/SimpleLogMatchingTracker.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "SimpleLogMatchingTracker.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::unordered_map;
-using std::vector;
-
-
-SimpleLogMatchingTracker::SimpleLogMatchingTracker(const int64_t& id, const int index,
-                                                   const SimpleAtomMatcher& matcher,
-                                                   const UidMap& uidMap)
-    : LogMatchingTracker(id, index), mMatcher(matcher), mUidMap(uidMap) {
-    if (!matcher.has_atom_id()) {
-        mInitialized = false;
-    } else {
-        mAtomIds.insert(matcher.atom_id());
-        mInitialized = true;
-    }
-}
-
-SimpleLogMatchingTracker::~SimpleLogMatchingTracker() {
-}
-
-bool SimpleLogMatchingTracker::init(const vector<AtomMatcher>& allLogMatchers,
-                                    const vector<sp<LogMatchingTracker>>& allTrackers,
-                                    const unordered_map<int64_t, int>& matcherMap,
-                                    vector<bool>& stack) {
-    // no need to do anything.
-    return mInitialized;
-}
-
-void SimpleLogMatchingTracker::onLogEvent(const LogEvent& event,
-                                          const vector<sp<LogMatchingTracker>>& allTrackers,
-                                          vector<MatchingState>& matcherResults) {
-    if (matcherResults[mIndex] != MatchingState::kNotComputed) {
-        VLOG("Matcher %lld already evaluated ", (long long)mId);
-        return;
-    }
-
-    if (mAtomIds.find(event.GetTagId()) == mAtomIds.end()) {
-        matcherResults[mIndex] = MatchingState::kNotMatched;
-        return;
-    }
-
-    bool matched = matchesSimple(mUidMap, mMatcher, event);
-    matcherResults[mIndex] = matched ? MatchingState::kMatched : MatchingState::kNotMatched;
-    VLOG("Stats SimpleLogMatcher %lld matched? %d", (long long)mId, matched);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/matchers/SimpleLogMatchingTracker.h b/cmds/statsd/src/matchers/SimpleLogMatchingTracker.h
deleted file mode 100644
index a0f6a88..0000000
--- a/cmds/statsd/src/matchers/SimpleLogMatchingTracker.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SIMPLE_LOG_MATCHING_TRACKER_H
-#define SIMPLE_LOG_MATCHING_TRACKER_H
-
-#include <unordered_map>
-#include <vector>
-#include "LogMatchingTracker.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "packages/UidMap.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class SimpleLogMatchingTracker : public virtual LogMatchingTracker {
-public:
-    SimpleLogMatchingTracker(const int64_t& id, const int index,
-                             const SimpleAtomMatcher& matcher,
-                             const UidMap& uidMap);
-
-    ~SimpleLogMatchingTracker();
-
-    bool init(const std::vector<AtomMatcher>& allLogMatchers,
-              const std::vector<sp<LogMatchingTracker>>& allTrackers,
-              const std::unordered_map<int64_t, int>& matcherMap,
-              std::vector<bool>& stack) override;
-
-    void onLogEvent(const LogEvent& event,
-                    const std::vector<sp<LogMatchingTracker>>& allTrackers,
-                    std::vector<MatchingState>& matcherResults) override;
-
-private:
-    const SimpleAtomMatcher mMatcher;
-    const UidMap& mUidMap;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#endif  // SIMPLE_LOG_MATCHING_TRACKER_H
diff --git a/cmds/statsd/src/matchers/matcher_util.cpp b/cmds/statsd/src/matchers/matcher_util.cpp
deleted file mode 100644
index 2b4c6a3..0000000
--- a/cmds/statsd/src/matchers/matcher_util.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "matchers/LogMatchingTracker.h"
-#include "matchers/matcher_util.h"
-#include "stats_util.h"
-
-using std::set;
-using std::string;
-using std::vector;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-bool combinationMatch(const vector<int>& children, const LogicalOperation& operation,
-                      const vector<MatchingState>& matcherResults) {
-    bool matched;
-    switch (operation) {
-        case LogicalOperation::AND: {
-            matched = true;
-            for (const int childIndex : children) {
-                if (matcherResults[childIndex] != MatchingState::kMatched) {
-                    matched = false;
-                    break;
-                }
-            }
-            break;
-        }
-        case LogicalOperation::OR: {
-            matched = false;
-            for (const int childIndex : children) {
-                if (matcherResults[childIndex] == MatchingState::kMatched) {
-                    matched = true;
-                    break;
-                }
-            }
-            break;
-        }
-        case LogicalOperation::NOT:
-            matched = matcherResults[children[0]] == MatchingState::kNotMatched;
-            break;
-        case LogicalOperation::NAND:
-            matched = false;
-            for (const int childIndex : children) {
-                if (matcherResults[childIndex] != MatchingState::kMatched) {
-                    matched = true;
-                    break;
-                }
-            }
-            break;
-        case LogicalOperation::NOR:
-            matched = true;
-            for (const int childIndex : children) {
-                if (matcherResults[childIndex] == MatchingState::kMatched) {
-                    matched = false;
-                    break;
-                }
-            }
-            break;
-        case LogicalOperation::LOGICAL_OPERATION_UNSPECIFIED:
-            matched = false;
-            break;
-    }
-    return matched;
-}
-
-bool tryMatchString(const UidMap& uidMap, const FieldValue& fieldValue, const string& str_match) {
-    if (isAttributionUidField(fieldValue) || isUidField(fieldValue)) {
-        int uid = fieldValue.mValue.int_value;
-        auto aidIt = UidMap::sAidToUidMapping.find(str_match);
-        if (aidIt != UidMap::sAidToUidMapping.end()) {
-            return ((int)aidIt->second) == uid;
-        }
-        std::set<string> packageNames = uidMap.getAppNamesFromUid(uid, true /* normalize*/);
-        return packageNames.find(str_match) != packageNames.end();
-    } else if (fieldValue.mValue.getType() == STRING) {
-        return fieldValue.mValue.str_value == str_match;
-    }
-    return false;
-}
-
-bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher,
-                   const vector<FieldValue>& values, int start, int end, int depth) {
-    if (depth > 2) {
-        ALOGE("Depth > 3 not supported");
-        return false;
-    }
-
-    if (start >= end) {
-        return false;
-    }
-
-    // Filter by entry field first
-    int newStart = -1;
-    int newEnd = end;
-    // because the fields are naturally sorted in the DFS order. we can safely
-    // break when pos is larger than the one we are searching for.
-    for (int i = start; i < end; i++) {
-        int pos = values[i].mField.getPosAtDepth(depth);
-        if (pos == matcher.field()) {
-            if (newStart == -1) {
-                newStart = i;
-            }
-            newEnd = i + 1;
-        } else if (pos > matcher.field()) {
-            break;
-        }
-    }
-
-    // Now we have zoomed in to a new range
-    start = newStart;
-    end = newEnd;
-
-    if (start == -1) {
-        // No such field found.
-        return false;
-    }
-
-    vector<pair<int, int>> ranges; // the ranges are for matching ANY position
-    if (matcher.has_position()) {
-        // Repeated fields position is stored as a node in the path.
-        depth++;
-        if (depth > 2) {
-            return false;
-        }
-        switch (matcher.position()) {
-            case Position::FIRST: {
-                for (int i = start; i < end; i++) {
-                    int pos = values[i].mField.getPosAtDepth(depth);
-                    if (pos != 1) {
-                        // Again, the log elements are stored in sorted order. so
-                        // once the position is > 1, we break;
-                        end = i;
-                        break;
-                    }
-                }
-                ranges.push_back(std::make_pair(start, end));
-                break;
-            }
-            case Position::LAST: {
-                // move the starting index to the first LAST field at the depth.
-                for (int i = start; i < end; i++) {
-                    if (values[i].mField.isLastPos(depth)) {
-                        start = i;
-                        break;
-                    }
-                }
-                ranges.push_back(std::make_pair(start, end));
-                break;
-            }
-            case Position::ANY: {
-                // ANY means all the children matchers match in any of the sub trees, it's a match
-                newStart = start;
-                newEnd = end;
-                // Here start is guaranteed to be a valid index.
-                int currentPos = values[start].mField.getPosAtDepth(depth);
-                // Now find all sub trees ranges.
-                for (int i = start; i < end; i++) {
-                    int newPos = values[i].mField.getPosAtDepth(depth);
-                    if (newPos != currentPos) {
-                        ranges.push_back(std::make_pair(newStart, i));
-                        newStart = i;
-                        currentPos = newPos;
-                    }
-                }
-                ranges.push_back(std::make_pair(newStart, end));
-                break;
-            }
-            case Position::ALL:
-                ALOGE("Not supported: field matcher with ALL position.");
-                break;
-            case Position::POSITION_UNKNOWN:
-                break;
-        }
-    } else {
-        // No position
-        ranges.push_back(std::make_pair(start, end));
-    }
-    // start and end are still pointing to the matched range.
-    switch (matcher.value_matcher_case()) {
-        case FieldValueMatcher::kMatchesTuple: {
-            ++depth;
-            // If any range matches all matchers, good.
-            for (const auto& range : ranges) {
-                bool matched = true;
-                for (const auto& subMatcher : matcher.matches_tuple().field_value_matcher()) {
-                    if (!matchesSimple(uidMap, subMatcher, values, range.first, range.second,
-                                       depth)) {
-                        matched = false;
-                        break;
-                    }
-                }
-                if (matched) return true;
-            }
-            return false;
-        }
-        // Finally, we get to the point of real value matching.
-        // If the field matcher ends with ANY, then we have [start, end) range > 1.
-        // In the following, we should return true, when ANY of the values matches.
-        case FieldValueMatcher::ValueMatcherCase::kEqBool: {
-            for (int i = start; i < end; i++) {
-                if ((values[i].mValue.getType() == INT &&
-                     (values[i].mValue.int_value != 0) == matcher.eq_bool()) ||
-                    (values[i].mValue.getType() == LONG &&
-                     (values[i].mValue.long_value != 0) == matcher.eq_bool())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kEqString: {
-            for (int i = start; i < end; i++) {
-                if (tryMatchString(uidMap, values[i], matcher.eq_string())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kNeqAnyString: {
-            const auto& str_list = matcher.neq_any_string();
-            for (int i = start; i < end; i++) {
-                bool notEqAll = true;
-                for (const auto& str : str_list.str_value()) {
-                    if (tryMatchString(uidMap, values[i], str)) {
-                        notEqAll = false;
-                        break;
-                    }
-                }
-                if (notEqAll) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kEqAnyString: {
-            const auto& str_list = matcher.eq_any_string();
-            for (int i = start; i < end; i++) {
-                for (const auto& str : str_list.str_value()) {
-                    if (tryMatchString(uidMap, values[i], str)) {
-                        return true;
-                    }
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kEqInt: {
-            for (int i = start; i < end; i++) {
-                if (values[i].mValue.getType() == INT &&
-                    (matcher.eq_int() == values[i].mValue.int_value)) {
-                    return true;
-                }
-                // eq_int covers both int and long.
-                if (values[i].mValue.getType() == LONG &&
-                    (matcher.eq_int() == values[i].mValue.long_value)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kLtInt: {
-            for (int i = start; i < end; i++) {
-                if (values[i].mValue.getType() == INT &&
-                    (values[i].mValue.int_value < matcher.lt_int())) {
-                    return true;
-                }
-                // lt_int covers both int and long.
-                if (values[i].mValue.getType() == LONG &&
-                    (values[i].mValue.long_value < matcher.lt_int())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kGtInt: {
-            for (int i = start; i < end; i++) {
-                if (values[i].mValue.getType() == INT &&
-                    (values[i].mValue.int_value > matcher.gt_int())) {
-                    return true;
-                }
-                // gt_int covers both int and long.
-                if (values[i].mValue.getType() == LONG &&
-                    (values[i].mValue.long_value > matcher.gt_int())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kLtFloat: {
-            for (int i = start; i < end; i++) {
-                if (values[i].mValue.getType() == FLOAT &&
-                    (values[i].mValue.float_value < matcher.lt_float())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kGtFloat: {
-            for (int i = start; i < end; i++) {
-                if (values[i].mValue.getType() == FLOAT &&
-                    (values[i].mValue.float_value > matcher.gt_float())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kLteInt: {
-            for (int i = start; i < end; i++) {
-                if (values[i].mValue.getType() == INT &&
-                    (values[i].mValue.int_value <= matcher.lte_int())) {
-                    return true;
-                }
-                // lte_int covers both int and long.
-                if (values[i].mValue.getType() == LONG &&
-                    (values[i].mValue.long_value <= matcher.lte_int())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        case FieldValueMatcher::ValueMatcherCase::kGteInt: {
-            for (int i = start; i < end; i++) {
-                if (values[i].mValue.getType() == INT &&
-                    (values[i].mValue.int_value >= matcher.gte_int())) {
-                    return true;
-                }
-                // gte_int covers both int and long.
-                if (values[i].mValue.getType() == LONG &&
-                    (values[i].mValue.long_value >= matcher.gte_int())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        default:
-            return false;
-    }
-}
-
-bool matchesSimple(const UidMap& uidMap, const SimpleAtomMatcher& simpleMatcher,
-                   const LogEvent& event) {
-    if (event.GetTagId() != simpleMatcher.atom_id()) {
-        return false;
-    }
-
-    for (const auto& matcher : simpleMatcher.field_value_matcher()) {
-        if (!matchesSimple(uidMap, matcher, event.getValues(), 0, event.getValues().size(), 0)) {
-            return false;
-        }
-    }
-    return true;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/matchers/matcher_util.h b/cmds/statsd/src/matchers/matcher_util.h
deleted file mode 100644
index 1ab3e87..0000000
--- a/cmds/statsd/src/matchers/matcher_util.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "logd/LogEvent.h"
-
-#include <vector>
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "packages/UidMap.h"
-#include "stats_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-enum MatchingState {
-    kNotComputed = -1,
-    kNotMatched = 0,
-    kMatched = 1,
-};
-
-bool combinationMatch(const std::vector<int>& children, const LogicalOperation& operation,
-                      const std::vector<MatchingState>& matcherResults);
-
-bool matchesSimple(const UidMap& uidMap,
-    const SimpleAtomMatcher& simpleMatcher, const LogEvent& wrapper);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metadata_util.cpp b/cmds/statsd/src/metadata_util.cpp
deleted file mode 100644
index 27ee59b..0000000
--- a/cmds/statsd/src/metadata_util.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "FieldValue.h"
-#include "metadata_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using google::protobuf::RepeatedPtrField;
-
-void writeValueToProto(metadata::FieldValue* metadataFieldValue, const Value& value) {
-    std::string storage_value;
-    switch (value.getType()) {
-        case INT:
-            metadataFieldValue->set_value_int(value.int_value);
-            break;
-        case LONG:
-            metadataFieldValue->set_value_long(value.long_value);
-            break;
-        case FLOAT:
-            metadataFieldValue->set_value_float(value.float_value);
-            break;
-        case DOUBLE:
-            metadataFieldValue->set_value_double(value.double_value);
-            break;
-        case STRING:
-            metadataFieldValue->set_value_str(value.str_value.c_str());
-            break;
-        case STORAGE: // byte array
-            storage_value = ((char*) value.storage_value.data());
-            metadataFieldValue->set_value_storage(storage_value);
-            break;
-        default:
-            break;
-    }
-}
-
-void writeMetricDimensionKeyToMetadataDimensionKey(
-        const MetricDimensionKey& metricKey,
-        metadata::MetricDimensionKey* metadataMetricKey) {
-    for (const FieldValue& fieldValue : metricKey.getDimensionKeyInWhat().getValues()) {
-        metadata::FieldValue* metadataFieldValue = metadataMetricKey->add_dimension_key_in_what();
-        metadata::Field* metadataField = metadataFieldValue->mutable_field();
-        metadataField->set_tag(fieldValue.mField.getTag());
-        metadataField->set_field(fieldValue.mField.getField());
-        writeValueToProto(metadataFieldValue, fieldValue.mValue);
-    }
-
-    for (const FieldValue& fieldValue : metricKey.getStateValuesKey().getValues()) {
-        metadata::FieldValue* metadataFieldValue = metadataMetricKey->add_state_values_key();
-        metadata::Field* metadataField = metadataFieldValue->mutable_field();
-        metadataField->set_tag(fieldValue.mField.getTag());
-        metadataField->set_field(fieldValue.mField.getField());
-        writeValueToProto(metadataFieldValue, fieldValue.mValue);
-    }
-}
-
-void writeFieldValuesFromMetadata(
-        const RepeatedPtrField<metadata::FieldValue>& repeatedFieldValueList,
-        std::vector<FieldValue>* fieldValues) {
-    for (const metadata::FieldValue& metadataFieldValue : repeatedFieldValueList) {
-        Field field(metadataFieldValue.field().tag(), metadataFieldValue.field().field());
-        Value value;
-        switch (metadataFieldValue.value_case()) {
-            case metadata::FieldValue::ValueCase::kValueInt:
-                value = Value(metadataFieldValue.value_int());
-                break;
-            case metadata::FieldValue::ValueCase::kValueLong:
-                value = Value(metadataFieldValue.value_long());
-                break;
-            case metadata::FieldValue::ValueCase::kValueFloat:
-                value = Value(metadataFieldValue.value_float());
-                break;
-            case metadata::FieldValue::ValueCase::kValueDouble:
-                value = Value(metadataFieldValue.value_double());
-                break;
-            case metadata::FieldValue::ValueCase::kValueStr:
-                value = Value(metadataFieldValue.value_str());
-                break;
-            case metadata::FieldValue::ValueCase::kValueStorage:
-                value = Value(metadataFieldValue.value_storage());
-                break;
-            default:
-                break;
-        }
-        FieldValue fieldValue(field, value);
-        fieldValues->emplace_back(field, value);
-    }
-}
-
-MetricDimensionKey loadMetricDimensionKeyFromProto(
-        const metadata::MetricDimensionKey& metricDimensionKey) {
-    std::vector<FieldValue> dimKeyInWhatFieldValues;
-    writeFieldValuesFromMetadata(metricDimensionKey.dimension_key_in_what(),
-            &dimKeyInWhatFieldValues);
-    std::vector<FieldValue> stateValuesFieldValues;
-    writeFieldValuesFromMetadata(metricDimensionKey.state_values_key(), &stateValuesFieldValues);
-
-    HashableDimensionKey dimKeyInWhat(dimKeyInWhatFieldValues);
-    HashableDimensionKey stateValues(stateValuesFieldValues);
-    MetricDimensionKey metricKey(dimKeyInWhat, stateValues);
-    return metricKey;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
\ No newline at end of file
diff --git a/cmds/statsd/src/metadata_util.h b/cmds/statsd/src/metadata_util.h
deleted file mode 100644
index 84a39ff..0000000
--- a/cmds/statsd/src/metadata_util.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "HashableDimensionKey.h"
-
-#include "frameworks/base/cmds/statsd/src/statsd_metadata.pb.h"  // AlertMetadata
-
-namespace android {
-namespace os {
-namespace statsd {
-
-void writeMetricDimensionKeyToMetadataDimensionKey(const MetricDimensionKey& metricKey,
-                                                   metadata::MetricDimensionKey* metadataMetricKey);
-
-MetricDimensionKey loadMetricDimensionKeyFromProto(
-        const metadata::MetricDimensionKey& metricDimensionKey);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
\ No newline at end of file
diff --git a/cmds/statsd/src/metrics/CountMetricProducer.cpp b/cmds/statsd/src/metrics/CountMetricProducer.cpp
deleted file mode 100644
index 5739612..0000000
--- a/cmds/statsd/src/metrics/CountMetricProducer.cpp
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "CountMetricProducer.h"
-
-#include <inttypes.h>
-#include <limits.h>
-#include <stdlib.h>
-
-#include "guardrail/StatsdStats.h"
-#include "stats_log_util.h"
-#include "stats_util.h"
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_FLOAT;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::ProtoOutputStream;
-using std::map;
-using std::string;
-using std::unordered_map;
-using std::vector;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// for StatsLogReport
-const int FIELD_ID_ID = 1;
-const int FIELD_ID_COUNT_METRICS = 5;
-const int FIELD_ID_TIME_BASE = 9;
-const int FIELD_ID_BUCKET_SIZE = 10;
-const int FIELD_ID_DIMENSION_PATH_IN_WHAT = 11;
-const int FIELD_ID_IS_ACTIVE = 14;
-
-// for CountMetricDataWrapper
-const int FIELD_ID_DATA = 1;
-// for CountMetricData
-const int FIELD_ID_DIMENSION_IN_WHAT = 1;
-const int FIELD_ID_SLICE_BY_STATE = 6;
-const int FIELD_ID_BUCKET_INFO = 3;
-const int FIELD_ID_DIMENSION_LEAF_IN_WHAT = 4;
-// for CountBucketInfo
-const int FIELD_ID_COUNT = 3;
-const int FIELD_ID_BUCKET_NUM = 4;
-const int FIELD_ID_START_BUCKET_ELAPSED_MILLIS = 5;
-const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 6;
-
-CountMetricProducer::CountMetricProducer(
-        const ConfigKey& key, const CountMetric& metric, const int conditionIndex,
-        const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard,
-        const int64_t timeBaseNs, const int64_t startTimeNs,
-        const unordered_map<int, shared_ptr<Activation>>& eventActivationMap,
-        const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap,
-        const vector<int>& slicedStateAtoms,
-        const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap)
-    : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard,
-                     eventActivationMap, eventDeactivationMap, slicedStateAtoms, stateGroupMap) {
-    if (metric.has_bucket()) {
-        mBucketSizeNs =
-                TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()) * 1000000;
-    } else {
-        mBucketSizeNs = LLONG_MAX;
-    }
-
-    if (metric.has_dimensions_in_what()) {
-        translateFieldMatcher(metric.dimensions_in_what(), &mDimensionsInWhat);
-        mContainANYPositionInDimensionsInWhat = HasPositionANY(metric.dimensions_in_what());
-    }
-
-    mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what());
-
-    if (metric.links().size() > 0) {
-        for (const auto& link : metric.links()) {
-            Metric2Condition mc;
-            mc.conditionId = link.condition();
-            translateFieldMatcher(link.fields_in_what(), &mc.metricFields);
-            translateFieldMatcher(link.fields_in_condition(), &mc.conditionFields);
-            mMetric2ConditionLinks.push_back(mc);
-        }
-        mConditionSliced = true;
-    }
-
-    for (const auto& stateLink : metric.state_link()) {
-        Metric2State ms;
-        ms.stateAtomId = stateLink.state_atom_id();
-        translateFieldMatcher(stateLink.fields_in_what(), &ms.metricFields);
-        translateFieldMatcher(stateLink.fields_in_state(), &ms.stateFields);
-        mMetric2StateLinks.push_back(ms);
-    }
-
-    flushIfNeededLocked(startTimeNs);
-    // Adjust start for partial bucket
-    mCurrentBucketStartTimeNs = startTimeNs;
-
-    VLOG("metric %lld created. bucket size %lld start_time: %lld", (long long)metric.id(),
-         (long long)mBucketSizeNs, (long long)mTimeBaseNs);
-}
-
-CountMetricProducer::~CountMetricProducer() {
-    VLOG("~CountMetricProducer() called");
-}
-
-void CountMetricProducer::onStateChanged(const int64_t eventTimeNs, const int32_t atomId,
-                                         const HashableDimensionKey& primaryKey,
-                                         const FieldValue& oldState, const FieldValue& newState) {
-    VLOG("CountMetric %lld onStateChanged time %lld, State%d, key %s, %d -> %d",
-         (long long)mMetricId, (long long)eventTimeNs, atomId, primaryKey.toString().c_str(),
-         oldState.mValue.int_value, newState.mValue.int_value);
-}
-
-void CountMetricProducer::dumpStatesLocked(FILE* out, bool verbose) const {
-    if (mCurrentSlicedCounter == nullptr ||
-        mCurrentSlicedCounter->size() == 0) {
-        return;
-    }
-
-    fprintf(out, "CountMetric %lld dimension size %lu\n", (long long)mMetricId,
-            (unsigned long)mCurrentSlicedCounter->size());
-    if (verbose) {
-        for (const auto& it : *mCurrentSlicedCounter) {
-            fprintf(out, "\t(what)%s\t(state)%s  %lld\n",
-                    it.first.getDimensionKeyInWhat().toString().c_str(),
-                    it.first.getStateValuesKey().toString().c_str(), (unsigned long long)it.second);
-        }
-    }
-}
-
-void CountMetricProducer::onSlicedConditionMayChangeLocked(bool overallCondition,
-                                                           const int64_t eventTime) {
-    VLOG("Metric %lld onSlicedConditionMayChange", (long long)mMetricId);
-}
-
-
-void CountMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
-    mPastBuckets.clear();
-}
-
-void CountMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
-                                             const bool include_current_partial_bucket,
-                                             const bool erase_data,
-                                             const DumpLatency dumpLatency,
-                                             std::set<string> *str_set,
-                                             ProtoOutputStream* protoOutput) {
-    if (include_current_partial_bucket) {
-        flushLocked(dumpTimeNs);
-    } else {
-        flushIfNeededLocked(dumpTimeNs);
-    }
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
-    protoOutput->write(FIELD_TYPE_BOOL | FIELD_ID_IS_ACTIVE, isActiveLocked());
-
-
-    if (mPastBuckets.empty()) {
-        return;
-    }
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TIME_BASE, (long long)mTimeBaseNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_SIZE, (long long)mBucketSizeNs);
-
-    // Fills the dimension path if not slicing by ALL.
-    if (!mSliceByPositionALL) {
-        if (!mDimensionsInWhat.empty()) {
-            uint64_t dimenPathToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_WHAT);
-            writeDimensionPathToProto(mDimensionsInWhat, protoOutput);
-            protoOutput->end(dimenPathToken);
-        }
-    }
-
-    uint64_t protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_COUNT_METRICS);
-
-    for (const auto& counter : mPastBuckets) {
-        const MetricDimensionKey& dimensionKey = counter.first;
-        VLOG("  dimension key %s", dimensionKey.toString().c_str());
-
-        uint64_t wrapperToken =
-                protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
-
-        // First fill dimension.
-        if (mSliceByPositionALL) {
-            uint64_t dimensionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
-            writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), str_set, protoOutput);
-            protoOutput->end(dimensionToken);
-        } else {
-            writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInWhat(),
-                                           FIELD_ID_DIMENSION_LEAF_IN_WHAT, str_set, protoOutput);
-        }
-        // Then fill slice_by_state.
-        for (auto state : dimensionKey.getStateValuesKey().getValues()) {
-            uint64_t stateToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                     FIELD_ID_SLICE_BY_STATE);
-            writeStateToProto(state, protoOutput);
-            protoOutput->end(stateToken);
-        }
-        // Then fill bucket_info (CountBucketInfo).
-        for (const auto& bucket : counter.second) {
-            uint64_t bucketInfoToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_BUCKET_INFO);
-            // Partial bucket.
-            if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_MILLIS,
-                                   (long long)NanoToMillis(bucket.mBucketStartNs));
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_MILLIS,
-                                   (long long)NanoToMillis(bucket.mBucketEndNs));
-            } else {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_NUM,
-                                   (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs)));
-            }
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_COUNT, (long long)bucket.mCount);
-            protoOutput->end(bucketInfoToken);
-            VLOG("\t bucket [%lld - %lld] count: %lld", (long long)bucket.mBucketStartNs,
-                 (long long)bucket.mBucketEndNs, (long long)bucket.mCount);
-        }
-        protoOutput->end(wrapperToken);
-    }
-
-    protoOutput->end(protoToken);
-
-    if (erase_data) {
-        mPastBuckets.clear();
-    }
-}
-
-void CountMetricProducer::dropDataLocked(const int64_t dropTimeNs) {
-    flushIfNeededLocked(dropTimeNs);
-    StatsdStats::getInstance().noteBucketDropped(mMetricId);
-    mPastBuckets.clear();
-}
-
-void CountMetricProducer::onConditionChangedLocked(const bool conditionMet,
-                                                   const int64_t eventTime) {
-    VLOG("Metric %lld onConditionChanged", (long long)mMetricId);
-    mCondition = conditionMet ? ConditionState::kTrue : ConditionState::kFalse;
-}
-
-bool CountMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) {
-    if (mCurrentSlicedCounter->find(newKey) != mCurrentSlicedCounter->end()) {
-        return false;
-    }
-    // ===========GuardRail==============
-    // 1. Report the tuple count if the tuple count > soft limit
-    if (mCurrentSlicedCounter->size() > StatsdStats::kDimensionKeySizeSoftLimit - 1) {
-        size_t newTupleCount = mCurrentSlicedCounter->size() + 1;
-        StatsdStats::getInstance().noteMetricDimensionSize(mConfigKey, mMetricId, newTupleCount);
-        // 2. Don't add more tuples, we are above the allowed threshold. Drop the data.
-        if (newTupleCount > StatsdStats::kDimensionKeySizeHardLimit) {
-            ALOGE("CountMetric %lld dropping data for dimension key %s",
-                (long long)mMetricId, newKey.toString().c_str());
-            StatsdStats::getInstance().noteHardDimensionLimitReached(mMetricId);
-            return true;
-        }
-    }
-
-    return false;
-}
-
-void CountMetricProducer::onMatchedLogEventInternalLocked(
-        const size_t matcherIndex, const MetricDimensionKey& eventKey,
-        const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-        const map<int, HashableDimensionKey>& statePrimaryKeys) {
-    int64_t eventTimeNs = event.GetElapsedTimestampNs();
-    flushIfNeededLocked(eventTimeNs);
-
-    if (!condition) {
-        return;
-    }
-
-    auto it = mCurrentSlicedCounter->find(eventKey);
-    if (it == mCurrentSlicedCounter->end()) {
-        // ===========GuardRail==============
-        if (hitGuardRailLocked(eventKey)) {
-            return;
-        }
-        // create a counter for the new key
-        (*mCurrentSlicedCounter)[eventKey] = 1;
-    } else {
-        // increment the existing value
-        auto& count = it->second;
-        count++;
-    }
-    for (auto& tracker : mAnomalyTrackers) {
-        int64_t countWholeBucket = mCurrentSlicedCounter->find(eventKey)->second;
-        auto prev = mCurrentFullCounters->find(eventKey);
-        if (prev != mCurrentFullCounters->end()) {
-            countWholeBucket += prev->second;
-        }
-        tracker->detectAndDeclareAnomaly(eventTimeNs, mCurrentBucketNum, mMetricId, eventKey,
-                                         countWholeBucket);
-    }
-
-    VLOG("metric %lld %s->%lld", (long long)mMetricId, eventKey.toString().c_str(),
-         (long long)(*mCurrentSlicedCounter)[eventKey]);
-}
-
-// When a new matched event comes in, we check if event falls into the current
-// bucket. If not, flush the old counter to past buckets and initialize the new bucket.
-void CountMetricProducer::flushIfNeededLocked(const int64_t& eventTimeNs) {
-    int64_t currentBucketEndTimeNs = getCurrentBucketEndTimeNs();
-    if (eventTimeNs < currentBucketEndTimeNs) {
-        return;
-    }
-
-    // Setup the bucket start time and number.
-    int64_t numBucketsForward = 1 + (eventTimeNs - currentBucketEndTimeNs) / mBucketSizeNs;
-    int64_t nextBucketNs = currentBucketEndTimeNs + (numBucketsForward - 1) * mBucketSizeNs;
-    flushCurrentBucketLocked(eventTimeNs, nextBucketNs);
-
-    mCurrentBucketNum += numBucketsForward;
-    VLOG("metric %lld: new bucket start time: %lld", (long long)mMetricId,
-         (long long)mCurrentBucketStartTimeNs);
-}
-
-void CountMetricProducer::flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                                   const int64_t& nextBucketStartTimeNs) {
-    int64_t fullBucketEndTimeNs = getCurrentBucketEndTimeNs();
-    CountBucket info;
-    info.mBucketStartNs = mCurrentBucketStartTimeNs;
-    if (eventTimeNs < fullBucketEndTimeNs) {
-        info.mBucketEndNs = eventTimeNs;
-    } else {
-        info.mBucketEndNs = fullBucketEndTimeNs;
-    }
-    for (const auto& counter : *mCurrentSlicedCounter) {
-        info.mCount = counter.second;
-        auto& bucketList = mPastBuckets[counter.first];
-        bucketList.push_back(info);
-        VLOG("metric %lld, dump key value: %s -> %lld", (long long)mMetricId,
-             counter.first.toString().c_str(),
-             (long long)counter.second);
-    }
-
-    // If we have finished a full bucket, then send this to anomaly tracker.
-    if (eventTimeNs > fullBucketEndTimeNs) {
-        // Accumulate partial buckets with current value and then send to anomaly tracker.
-        if (mCurrentFullCounters->size() > 0) {
-            for (const auto& keyValuePair : *mCurrentSlicedCounter) {
-                (*mCurrentFullCounters)[keyValuePair.first] += keyValuePair.second;
-            }
-            for (auto& tracker : mAnomalyTrackers) {
-                tracker->addPastBucket(mCurrentFullCounters, mCurrentBucketNum);
-            }
-            mCurrentFullCounters = std::make_shared<DimToValMap>();
-        } else {
-            // Skip aggregating the partial buckets since there's no previous partial bucket.
-            for (auto& tracker : mAnomalyTrackers) {
-                tracker->addPastBucket(mCurrentSlicedCounter, mCurrentBucketNum);
-            }
-        }
-    } else {
-        // Accumulate partial bucket.
-        for (const auto& keyValuePair : *mCurrentSlicedCounter) {
-            (*mCurrentFullCounters)[keyValuePair.first] += keyValuePair.second;
-        }
-    }
-
-    StatsdStats::getInstance().noteBucketCount(mMetricId);
-    // Only resets the counters, but doesn't setup the times nor numbers.
-    // (Do not clear since the old one is still referenced in mAnomalyTrackers).
-    mCurrentSlicedCounter = std::make_shared<DimToValMap>();
-    mCurrentBucketStartTimeNs = nextBucketStartTimeNs;
-}
-
-// Rough estimate of CountMetricProducer buffer stored. This number will be
-// greater than actual data size as it contains each dimension of
-// CountMetricData is  duplicated.
-size_t CountMetricProducer::byteSizeLocked() const {
-    size_t totalSize = 0;
-    for (const auto& pair : mPastBuckets) {
-        totalSize += pair.second.size() * kBucketSize;
-    }
-    return totalSize;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/CountMetricProducer.h b/cmds/statsd/src/metrics/CountMetricProducer.h
deleted file mode 100644
index f05fb06..0000000
--- a/cmds/statsd/src/metrics/CountMetricProducer.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COUNT_METRIC_PRODUCER_H
-#define COUNT_METRIC_PRODUCER_H
-
-#include <android/util/ProtoOutputStream.h>
-#include <gtest/gtest_prod.h>
-
-#include <unordered_map>
-
-#include "MetricProducer.h"
-#include "anomaly/AnomalyTracker.h"
-#include "condition/ConditionTracker.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "matchers/matcher_util.h"
-#include "stats_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-struct CountBucket {
-    int64_t mBucketStartNs;
-    int64_t mBucketEndNs;
-    int64_t mCount;
-};
-
-class CountMetricProducer : public MetricProducer {
-public:
-    CountMetricProducer(
-            const ConfigKey& key, const CountMetric& countMetric, const int conditionIndex,
-            const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard,
-            const int64_t timeBaseNs, const int64_t startTimeNs,
-            const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap = {},
-            const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>&
-                    eventDeactivationMap = {},
-            const vector<int>& slicedStateAtoms = {},
-            const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap = {});
-
-    virtual ~CountMetricProducer();
-
-    void onStateChanged(const int64_t eventTimeNs, const int32_t atomId,
-                        const HashableDimensionKey& primaryKey, const FieldValue& oldState,
-                        const FieldValue& newState) override;
-
-protected:
-    void onMatchedLogEventInternalLocked(
-            const size_t matcherIndex, const MetricDimensionKey& eventKey,
-            const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-            const std::map<int, HashableDimensionKey>& statePrimaryKeys) override;
-
-private:
-
-    void onDumpReportLocked(const int64_t dumpTimeNs,
-                            const bool include_current_partial_bucket,
-                            const bool erase_data,
-                            const DumpLatency dumpLatency,
-                            std::set<string> *str_set,
-                            android::util::ProtoOutputStream* protoOutput) override;
-
-    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
-
-    // Internal interface to handle condition change.
-    void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
-
-    // Internal interface to handle sliced condition change.
-    void onSlicedConditionMayChangeLocked(bool overallCondition, const int64_t eventTime) override;
-
-    // Internal function to calculate the current used bytes.
-    size_t byteSizeLocked() const override;
-
-    void dumpStatesLocked(FILE* out, bool verbose) const override;
-
-    void dropDataLocked(const int64_t dropTimeNs) override;
-
-    // Util function to flush the old packet.
-    void flushIfNeededLocked(const int64_t& newEventTime) override;
-
-    void flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                  const int64_t& nextBucketStartTimeNs) override;
-
-    std::unordered_map<MetricDimensionKey, std::vector<CountBucket>> mPastBuckets;
-
-    // The current bucket (may be a partial bucket).
-    std::shared_ptr<DimToValMap> mCurrentSlicedCounter = std::make_shared<DimToValMap>();
-
-    // The sum of previous partial buckets in the current full bucket (excluding the current
-    // partial bucket). This is only updated while flushing the current bucket.
-    std::shared_ptr<DimToValMap> mCurrentFullCounters = std::make_shared<DimToValMap>();
-
-    static const size_t kBucketSize = sizeof(CountBucket{});
-
-    bool hitGuardRailLocked(const MetricDimensionKey& newKey);
-
-    FRIEND_TEST(CountMetricProducerTest, TestNonDimensionalEvents);
-    FRIEND_TEST(CountMetricProducerTest, TestEventsWithNonSlicedCondition);
-    FRIEND_TEST(CountMetricProducerTest, TestEventsWithSlicedCondition);
-    FRIEND_TEST(CountMetricProducerTest, TestAnomalyDetectionUnSliced);
-    FRIEND_TEST(CountMetricProducerTest, TestFirstBucket);
-    FRIEND_TEST(CountMetricProducerTest, TestOneWeekTimeUnit);
-
-    FRIEND_TEST(CountMetricProducerTest_PartialBucket, TestSplitInCurrentBucket);
-    FRIEND_TEST(CountMetricProducerTest_PartialBucket, TestSplitInNextBucket);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#endif  // COUNT_METRIC_PRODUCER_H
diff --git a/cmds/statsd/src/metrics/DurationMetricProducer.cpp b/cmds/statsd/src/metrics/DurationMetricProducer.cpp
deleted file mode 100644
index e9b0438..0000000
--- a/cmds/statsd/src/metrics/DurationMetricProducer.cpp
+++ /dev/null
@@ -1,653 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false
-
-#include "Log.h"
-#include "DurationMetricProducer.h"
-#include "guardrail/StatsdStats.h"
-#include "stats_util.h"
-#include "stats_log_util.h"
-
-#include <limits.h>
-#include <stdlib.h>
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_FLOAT;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::ProtoOutputStream;
-using std::string;
-using std::unordered_map;
-using std::vector;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// for StatsLogReport
-const int FIELD_ID_ID = 1;
-const int FIELD_ID_DURATION_METRICS = 6;
-const int FIELD_ID_TIME_BASE = 9;
-const int FIELD_ID_BUCKET_SIZE = 10;
-const int FIELD_ID_DIMENSION_PATH_IN_WHAT = 11;
-const int FIELD_ID_IS_ACTIVE = 14;
-// for DurationMetricDataWrapper
-const int FIELD_ID_DATA = 1;
-// for DurationMetricData
-const int FIELD_ID_DIMENSION_IN_WHAT = 1;
-const int FIELD_ID_BUCKET_INFO = 3;
-const int FIELD_ID_DIMENSION_LEAF_IN_WHAT = 4;
-const int FIELD_ID_SLICE_BY_STATE = 6;
-// for DurationBucketInfo
-const int FIELD_ID_DURATION = 3;
-const int FIELD_ID_BUCKET_NUM = 4;
-const int FIELD_ID_START_BUCKET_ELAPSED_MILLIS = 5;
-const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 6;
-
-DurationMetricProducer::DurationMetricProducer(
-        const ConfigKey& key, const DurationMetric& metric, const int conditionIndex,
-        const vector<ConditionState>& initialConditionCache, const size_t startIndex,
-        const size_t stopIndex, const size_t stopAllIndex, const bool nesting,
-        const sp<ConditionWizard>& wizard, const FieldMatcher& internalDimensions,
-        const int64_t timeBaseNs, const int64_t startTimeNs,
-        const unordered_map<int, shared_ptr<Activation>>& eventActivationMap,
-        const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap,
-        const vector<int>& slicedStateAtoms,
-        const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap)
-    : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard,
-                     eventActivationMap, eventDeactivationMap, slicedStateAtoms, stateGroupMap),
-      mAggregationType(metric.aggregation_type()),
-      mStartIndex(startIndex),
-      mStopIndex(stopIndex),
-      mStopAllIndex(stopAllIndex),
-      mNested(nesting),
-      mContainANYPositionInInternalDimensions(false) {
-    if (metric.has_bucket()) {
-        mBucketSizeNs =
-                TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()) * 1000000;
-    } else {
-        mBucketSizeNs = LLONG_MAX;
-    }
-
-    if (metric.has_dimensions_in_what()) {
-        translateFieldMatcher(metric.dimensions_in_what(), &mDimensionsInWhat);
-        mContainANYPositionInDimensionsInWhat = HasPositionANY(metric.dimensions_in_what());
-    }
-
-    if (internalDimensions.has_field()) {
-        translateFieldMatcher(internalDimensions, &mInternalDimensions);
-        mContainANYPositionInInternalDimensions = HasPositionANY(internalDimensions);
-    }
-    if (mContainANYPositionInInternalDimensions) {
-        ALOGE("Position ANY in internal dimension not supported.");
-    }
-    if (mContainANYPositionInDimensionsInWhat) {
-        ALOGE("Position ANY in dimension_in_what not supported.");
-    }
-
-    mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what());
-
-    if (metric.links().size() > 0) {
-        for (const auto& link : metric.links()) {
-            Metric2Condition mc;
-            mc.conditionId = link.condition();
-            translateFieldMatcher(link.fields_in_what(), &mc.metricFields);
-            translateFieldMatcher(link.fields_in_condition(), &mc.conditionFields);
-            mMetric2ConditionLinks.push_back(mc);
-        }
-        mConditionSliced = true;
-    }
-    mUnSlicedPartCondition = ConditionState::kUnknown;
-
-    for (const auto& stateLink : metric.state_link()) {
-        Metric2State ms;
-        ms.stateAtomId = stateLink.state_atom_id();
-        translateFieldMatcher(stateLink.fields_in_what(), &ms.metricFields);
-        translateFieldMatcher(stateLink.fields_in_state(), &ms.stateFields);
-        mMetric2StateLinks.push_back(ms);
-    }
-
-    mUseWhatDimensionAsInternalDimension = equalDimensions(mDimensionsInWhat, mInternalDimensions);
-    if (mWizard != nullptr && mConditionTrackerIndex >= 0 &&
-            mMetric2ConditionLinks.size() == 1) {
-        mHasLinksToAllConditionDimensionsInTracker = mWizard->equalOutputDimensions(
-                mConditionTrackerIndex, mMetric2ConditionLinks.begin()->conditionFields);
-    }
-    flushIfNeededLocked(startTimeNs);
-    // Adjust start for partial bucket
-    mCurrentBucketStartTimeNs = startTimeNs;
-    VLOG("metric %lld created. bucket size %lld start_time: %lld", (long long)metric.id(),
-         (long long)mBucketSizeNs, (long long)mTimeBaseNs);
-}
-
-DurationMetricProducer::~DurationMetricProducer() {
-    VLOG("~DurationMetric() called");
-}
-
-sp<AnomalyTracker> DurationMetricProducer::addAnomalyTracker(
-        const Alert &alert, const sp<AlarmMonitor>& anomalyAlarmMonitor) {
-    std::lock_guard<std::mutex> lock(mMutex);
-    if (mAggregationType == DurationMetric_AggregationType_SUM) {
-        if (alert.trigger_if_sum_gt() > alert.num_buckets() * mBucketSizeNs) {
-            ALOGW("invalid alert for SUM: threshold (%f) > possible recordable value (%d x %lld)",
-                  alert.trigger_if_sum_gt(), alert.num_buckets(), (long long)mBucketSizeNs);
-            return nullptr;
-        }
-    }
-    sp<DurationAnomalyTracker> anomalyTracker =
-        new DurationAnomalyTracker(alert, mConfigKey, anomalyAlarmMonitor);
-    if (anomalyTracker != nullptr) {
-        mAnomalyTrackers.push_back(anomalyTracker);
-    }
-    return anomalyTracker;
-}
-
-void DurationMetricProducer::onStateChanged(const int64_t eventTimeNs, const int32_t atomId,
-                                            const HashableDimensionKey& primaryKey,
-                                            const FieldValue& oldState,
-                                            const FieldValue& newState) {
-    // Check if this metric has a StateMap. If so, map the new state value to
-    // the correct state group id.
-    FieldValue newStateCopy = newState;
-    mapStateValue(atomId, &newStateCopy);
-
-    flushIfNeededLocked(eventTimeNs);
-
-    // Each duration tracker is mapped to a different whatKey (a set of values from the
-    // dimensionsInWhat fields). We notify all trackers iff the primaryKey field values from the
-    // state change event are a subset of the tracker's whatKey field values.
-    //
-    // Ex. For a duration metric dimensioned on uid and tag:
-    // DurationTracker1 whatKey = uid: 1001, tag: 1
-    // DurationTracker2 whatKey = uid: 1002, tag 1
-    //
-    // If the state change primaryKey = uid: 1001, we only notify DurationTracker1 of a state
-    // change.
-    for (auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-        if (!containsLinkedStateValues(whatIt.first, primaryKey, mMetric2StateLinks, atomId)) {
-            continue;
-        }
-        whatIt.second->onStateChanged(eventTimeNs, atomId, newStateCopy);
-    }
-}
-
-unique_ptr<DurationTracker> DurationMetricProducer::createDurationTracker(
-        const MetricDimensionKey& eventKey) const {
-    switch (mAggregationType) {
-        case DurationMetric_AggregationType_SUM:
-            return make_unique<OringDurationTracker>(
-                    mConfigKey, mMetricId, eventKey, mWizard, mConditionTrackerIndex, mNested,
-                    mCurrentBucketStartTimeNs, mCurrentBucketNum, mTimeBaseNs, mBucketSizeNs,
-                    mConditionSliced, mHasLinksToAllConditionDimensionsInTracker, mAnomalyTrackers);
-        case DurationMetric_AggregationType_MAX_SPARSE:
-            return make_unique<MaxDurationTracker>(
-                    mConfigKey, mMetricId, eventKey, mWizard, mConditionTrackerIndex, mNested,
-                    mCurrentBucketStartTimeNs, mCurrentBucketNum, mTimeBaseNs, mBucketSizeNs,
-                    mConditionSliced, mHasLinksToAllConditionDimensionsInTracker, mAnomalyTrackers);
-    }
-}
-
-// SlicedConditionChange optimization case 1:
-// 1. If combination condition, logical operation is AND, only one sliced child predicate.
-// 2. The links covers all dimension fields in the sliced child condition predicate.
-void DurationMetricProducer::onSlicedConditionMayChangeLocked_opt1(bool condition,
-                                                                   const int64_t eventTime) {
-    if (mMetric2ConditionLinks.size() != 1 ||
-        !mHasLinksToAllConditionDimensionsInTracker) {
-        return;
-    }
-
-    bool  currentUnSlicedPartCondition = true;
-    if (!mWizard->IsSimpleCondition(mConditionTrackerIndex)) {
-        ConditionState unslicedPartState =
-            mWizard->getUnSlicedPartConditionState(mConditionTrackerIndex);
-        // When the unsliced part is still false, return directly.
-        if (mUnSlicedPartCondition == ConditionState::kFalse &&
-            unslicedPartState == ConditionState::kFalse) {
-            return;
-        }
-        mUnSlicedPartCondition = unslicedPartState;
-        currentUnSlicedPartCondition = mUnSlicedPartCondition > 0;
-    }
-
-    auto dimensionsChangedToTrue = mWizard->getChangedToTrueDimensions(mConditionTrackerIndex);
-    auto dimensionsChangedToFalse = mWizard->getChangedToFalseDimensions(mConditionTrackerIndex);
-
-    // The condition change is from the unsliced predicates.
-    // We need to find out the true dimensions from the sliced predicate and flip their condition
-    // state based on the new unsliced condition state.
-    if (dimensionsChangedToTrue == nullptr || dimensionsChangedToFalse == nullptr ||
-        (dimensionsChangedToTrue->empty() && dimensionsChangedToFalse->empty())) {
-        std::set<HashableDimensionKey> trueConditionDimensions;
-        mWizard->getTrueSlicedDimensions(mConditionTrackerIndex, &trueConditionDimensions);
-        for (auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-            HashableDimensionKey linkedConditionDimensionKey;
-            getDimensionForCondition(whatIt.first.getValues(), mMetric2ConditionLinks[0],
-                                     &linkedConditionDimensionKey);
-            if (trueConditionDimensions.find(linkedConditionDimensionKey) !=
-                    trueConditionDimensions.end()) {
-                whatIt.second->onConditionChanged(currentUnSlicedPartCondition, eventTime);
-            }
-        }
-    } else {
-        // Handle the condition change from the sliced predicate.
-        if (currentUnSlicedPartCondition) {
-            for (auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-                HashableDimensionKey linkedConditionDimensionKey;
-                getDimensionForCondition(whatIt.first.getValues(), mMetric2ConditionLinks[0],
-                                         &linkedConditionDimensionKey);
-                if (dimensionsChangedToTrue->find(linkedConditionDimensionKey) !=
-                        dimensionsChangedToTrue->end()) {
-                    whatIt.second->onConditionChanged(true, eventTime);
-                }
-                if (dimensionsChangedToFalse->find(linkedConditionDimensionKey) !=
-                        dimensionsChangedToFalse->end()) {
-                    whatIt.second->onConditionChanged(false, eventTime);
-                }
-            }
-        }
-    }
-}
-
-void DurationMetricProducer::onSlicedConditionMayChangeInternalLocked(bool overallCondition,
-        const int64_t eventTimeNs) {
-    bool changeDimTrackable = mWizard->IsChangedDimensionTrackable(mConditionTrackerIndex);
-    if (changeDimTrackable && mHasLinksToAllConditionDimensionsInTracker) {
-        onSlicedConditionMayChangeLocked_opt1(overallCondition, eventTimeNs);
-        return;
-    }
-
-    // Now for each of the on-going event, check if the condition has changed for them.
-    for (auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-        whatIt.second->onSlicedConditionMayChange(overallCondition, eventTimeNs);
-    }
-}
-
-void DurationMetricProducer::onSlicedConditionMayChangeLocked(bool overallCondition,
-                                                              const int64_t eventTime) {
-    VLOG("Metric %lld onSlicedConditionMayChange", (long long)mMetricId);
-
-    if (!mIsActive) {
-        return;
-    }
-
-    flushIfNeededLocked(eventTime);
-
-    if (!mConditionSliced) {
-        return;
-    }
-
-    onSlicedConditionMayChangeInternalLocked(overallCondition, eventTime);
-}
-
-void DurationMetricProducer::onActiveStateChangedLocked(const int64_t& eventTimeNs) {
-    MetricProducer::onActiveStateChangedLocked(eventTimeNs);
-
-    if (!mConditionSliced) {
-        if (ConditionState::kTrue != mCondition) {
-            return;
-        }
-
-        if (mIsActive) {
-            flushIfNeededLocked(eventTimeNs);
-        }
-
-        for (auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-            whatIt.second->onConditionChanged(mIsActive, eventTimeNs);
-        }
-    } else if (mIsActive) {
-        flushIfNeededLocked(eventTimeNs);
-        onSlicedConditionMayChangeInternalLocked(mIsActive, eventTimeNs);
-    } else { // mConditionSliced == true && !mIsActive
-        for (auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-            whatIt.second->onConditionChanged(mIsActive, eventTimeNs);
-        }
-    }
-}
-
-void DurationMetricProducer::onConditionChangedLocked(const bool conditionMet,
-                                                      const int64_t eventTime) {
-    VLOG("Metric %lld onConditionChanged", (long long)mMetricId);
-    mCondition = conditionMet ? ConditionState::kTrue : ConditionState::kFalse;
-
-    if (!mIsActive) {
-        return;
-    }
-
-    flushIfNeededLocked(eventTime);
-    for (auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-        whatIt.second->onConditionChanged(conditionMet, eventTime);
-    }
-}
-
-void DurationMetricProducer::dropDataLocked(const int64_t dropTimeNs) {
-    flushIfNeededLocked(dropTimeNs);
-    StatsdStats::getInstance().noteBucketDropped(mMetricId);
-    mPastBuckets.clear();
-}
-
-void DurationMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
-    flushIfNeededLocked(dumpTimeNs);
-    mPastBuckets.clear();
-}
-
-void DurationMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
-                                                const bool include_current_partial_bucket,
-                                                const bool erase_data,
-                                                const DumpLatency dumpLatency,
-                                                std::set<string> *str_set,
-                                                ProtoOutputStream* protoOutput) {
-    if (include_current_partial_bucket) {
-        flushLocked(dumpTimeNs);
-    } else {
-        flushIfNeededLocked(dumpTimeNs);
-    }
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
-    protoOutput->write(FIELD_TYPE_BOOL | FIELD_ID_IS_ACTIVE, isActiveLocked());
-
-    if (mPastBuckets.empty()) {
-        VLOG(" Duration metric, empty return");
-        return;
-    }
-
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TIME_BASE, (long long)mTimeBaseNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_SIZE, (long long)mBucketSizeNs);
-
-    if (!mSliceByPositionALL) {
-        if (!mDimensionsInWhat.empty()) {
-            uint64_t dimenPathToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_WHAT);
-            writeDimensionPathToProto(mDimensionsInWhat, protoOutput);
-            protoOutput->end(dimenPathToken);
-        }
-    }
-
-    uint64_t protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_DURATION_METRICS);
-
-    VLOG("Duration metric %lld dump report now...", (long long)mMetricId);
-
-    for (const auto& pair : mPastBuckets) {
-        const MetricDimensionKey& dimensionKey = pair.first;
-        VLOG("  dimension key %s", dimensionKey.toString().c_str());
-
-        uint64_t wrapperToken =
-                protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
-
-        // First fill dimension.
-        if (mSliceByPositionALL) {
-            uint64_t dimensionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
-            writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), str_set, protoOutput);
-            protoOutput->end(dimensionToken);
-        } else {
-            writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInWhat(),
-                                           FIELD_ID_DIMENSION_LEAF_IN_WHAT, str_set, protoOutput);
-        }
-        // Then fill slice_by_state.
-        for (auto state : dimensionKey.getStateValuesKey().getValues()) {
-            uint64_t stateToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                     FIELD_ID_SLICE_BY_STATE);
-            writeStateToProto(state, protoOutput);
-            protoOutput->end(stateToken);
-        }
-        // Then fill bucket_info (DurationBucketInfo).
-        for (const auto& bucket : pair.second) {
-            uint64_t bucketInfoToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_BUCKET_INFO);
-            if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_MILLIS,
-                                   (long long)NanoToMillis(bucket.mBucketStartNs));
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_MILLIS,
-                                   (long long)NanoToMillis(bucket.mBucketEndNs));
-            } else {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_NUM,
-                                   (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs)));
-            }
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_DURATION, (long long)bucket.mDuration);
-            protoOutput->end(bucketInfoToken);
-            VLOG("\t bucket [%lld - %lld] duration: %lld", (long long)bucket.mBucketStartNs,
-                 (long long)bucket.mBucketEndNs, (long long)bucket.mDuration);
-        }
-
-        protoOutput->end(wrapperToken);
-    }
-
-    protoOutput->end(protoToken);
-    if (erase_data) {
-        mPastBuckets.clear();
-    }
-}
-
-void DurationMetricProducer::flushIfNeededLocked(const int64_t& eventTimeNs) {
-    int64_t currentBucketEndTimeNs = getCurrentBucketEndTimeNs();
-
-    if (currentBucketEndTimeNs > eventTimeNs) {
-        return;
-    }
-    VLOG("flushing...........");
-    int numBucketsForward = 1 + (eventTimeNs - currentBucketEndTimeNs) / mBucketSizeNs;
-    int64_t nextBucketNs = currentBucketEndTimeNs + (numBucketsForward - 1) * mBucketSizeNs;
-    flushCurrentBucketLocked(eventTimeNs, nextBucketNs);
-
-    mCurrentBucketNum += numBucketsForward;
-}
-
-void DurationMetricProducer::flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                                      const int64_t& nextBucketStartTimeNs) {
-    for (auto whatIt = mCurrentSlicedDurationTrackerMap.begin();
-            whatIt != mCurrentSlicedDurationTrackerMap.end();) {
-        if (whatIt->second->flushCurrentBucket(eventTimeNs, &mPastBuckets)) {
-            VLOG("erase bucket for key %s", whatIt->first.toString().c_str());
-            whatIt = mCurrentSlicedDurationTrackerMap.erase(whatIt);
-        } else {
-            ++whatIt;
-        }
-    }
-    StatsdStats::getInstance().noteBucketCount(mMetricId);
-    mCurrentBucketStartTimeNs = nextBucketStartTimeNs;
-}
-
-void DurationMetricProducer::dumpStatesLocked(FILE* out, bool verbose) const {
-    if (mCurrentSlicedDurationTrackerMap.size() == 0) {
-        return;
-    }
-
-    fprintf(out, "DurationMetric %lld dimension size %lu\n", (long long)mMetricId,
-            (unsigned long)mCurrentSlicedDurationTrackerMap.size());
-    if (verbose) {
-        for (const auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-            fprintf(out, "\t(what)%s\n", whatIt.first.toString().c_str());
-            whatIt.second->dumpStates(out, verbose);
-        }
-    }
-}
-
-bool DurationMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) {
-    auto whatIt = mCurrentSlicedDurationTrackerMap.find(newKey.getDimensionKeyInWhat());
-    if (whatIt == mCurrentSlicedDurationTrackerMap.end()) {
-        // 1. Report the tuple count if the tuple count > soft limit
-        if (mCurrentSlicedDurationTrackerMap.size() > StatsdStats::kDimensionKeySizeSoftLimit - 1) {
-            size_t newTupleCount = mCurrentSlicedDurationTrackerMap.size() + 1;
-            StatsdStats::getInstance().noteMetricDimensionSize(
-                    mConfigKey, mMetricId, newTupleCount);
-            // 2. Don't add more tuples, we are above the allowed threshold. Drop the data.
-            if (newTupleCount > StatsdStats::kDimensionKeySizeHardLimit) {
-                ALOGE("DurationMetric %lld dropping data for what dimension key %s",
-                    (long long)mMetricId, newKey.getDimensionKeyInWhat().toString().c_str());
-                StatsdStats::getInstance().noteHardDimensionLimitReached(mMetricId);
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-void DurationMetricProducer::handleStartEvent(const MetricDimensionKey& eventKey,
-                                              const ConditionKey& conditionKeys,
-                                              bool condition, const LogEvent& event) {
-    const auto& whatKey = eventKey.getDimensionKeyInWhat();
-    auto whatIt = mCurrentSlicedDurationTrackerMap.find(whatKey);
-    if (whatIt == mCurrentSlicedDurationTrackerMap.end()) {
-        if (hitGuardRailLocked(eventKey)) {
-            return;
-        }
-        mCurrentSlicedDurationTrackerMap[whatKey] = createDurationTracker(eventKey);
-    }
-
-    auto it = mCurrentSlicedDurationTrackerMap.find(whatKey);
-    if (mUseWhatDimensionAsInternalDimension) {
-        it->second->noteStart(whatKey, condition, event.GetElapsedTimestampNs(), conditionKeys);
-        return;
-    }
-
-    if (mInternalDimensions.empty()) {
-        it->second->noteStart(DEFAULT_DIMENSION_KEY, condition, event.GetElapsedTimestampNs(),
-                              conditionKeys);
-    } else {
-        HashableDimensionKey dimensionKey = DEFAULT_DIMENSION_KEY;
-        filterValues(mInternalDimensions, event.getValues(), &dimensionKey);
-        it->second->noteStart(dimensionKey, condition, event.GetElapsedTimestampNs(),
-                              conditionKeys);
-    }
-
-}
-
-void DurationMetricProducer::onMatchedLogEventInternalLocked(
-        const size_t matcherIndex, const MetricDimensionKey& eventKey,
-        const ConditionKey& conditionKeys, bool condition, const LogEvent& event,
-        const map<int, HashableDimensionKey>& statePrimaryKeys) {
-    ALOGW("Not used in duration tracker.");
-}
-
-void DurationMetricProducer::onMatchedLogEventLocked(const size_t matcherIndex,
-                                                     const LogEvent& event) {
-    int64_t eventTimeNs = event.GetElapsedTimestampNs();
-    if (eventTimeNs < mTimeBaseNs) {
-        return;
-    }
-
-    if (mIsActive) {
-        flushIfNeededLocked(event.GetElapsedTimestampNs());
-    }
-
-    // Handles Stopall events.
-    if (matcherIndex == mStopAllIndex) {
-        for (auto& whatIt : mCurrentSlicedDurationTrackerMap) {
-            whatIt.second->noteStopAll(event.GetElapsedTimestampNs());
-        }
-        return;
-    }
-
-    HashableDimensionKey dimensionInWhat = DEFAULT_DIMENSION_KEY;
-    if (!mDimensionsInWhat.empty()) {
-        filterValues(mDimensionsInWhat, event.getValues(), &dimensionInWhat);
-    }
-
-    // Stores atom id to primary key pairs for each state atom that the metric is
-    // sliced by.
-    std::map<int, HashableDimensionKey> statePrimaryKeys;
-
-    // For states with primary fields, use MetricStateLinks to get the primary
-    // field values from the log event. These values will form a primary key
-    // that will be used to query StateTracker for the correct state value.
-    for (const auto& stateLink : mMetric2StateLinks) {
-        getDimensionForState(event.getValues(), stateLink,
-                             &statePrimaryKeys[stateLink.stateAtomId]);
-    }
-
-    // For each sliced state, query StateTracker for the state value using
-    // either the primary key from the previous step or the DEFAULT_DIMENSION_KEY.
-    //
-    // Expected functionality: for any case where the MetricStateLinks are
-    // initialized incorrectly (ex. # of state links != # of primary fields, no
-    // links are provided for a state with primary fields, links are provided
-    // in the wrong order, etc.), StateTracker will simply return kStateUnknown
-    // when queried using an incorrect key.
-    HashableDimensionKey stateValuesKey = DEFAULT_DIMENSION_KEY;
-    for (auto atomId : mSlicedStateAtoms) {
-        FieldValue value;
-        if (statePrimaryKeys.find(atomId) != statePrimaryKeys.end()) {
-            // found a primary key for this state, query using the key
-            queryStateValue(atomId, statePrimaryKeys[atomId], &value);
-        } else {
-            // if no MetricStateLinks exist for this state atom,
-            // query using the default dimension key (empty HashableDimensionKey)
-            queryStateValue(atomId, DEFAULT_DIMENSION_KEY, &value);
-        }
-        mapStateValue(atomId, &value);
-        stateValuesKey.addValue(value);
-    }
-
-    // Handles Stop events.
-    if (matcherIndex == mStopIndex) {
-        if (mUseWhatDimensionAsInternalDimension) {
-            auto whatIt = mCurrentSlicedDurationTrackerMap.find(dimensionInWhat);
-            if (whatIt != mCurrentSlicedDurationTrackerMap.end()) {
-                whatIt->second->noteStop(dimensionInWhat, event.GetElapsedTimestampNs(), false);
-            }
-            return;
-        }
-
-        HashableDimensionKey internalDimensionKey = DEFAULT_DIMENSION_KEY;
-        if (!mInternalDimensions.empty()) {
-            filterValues(mInternalDimensions, event.getValues(), &internalDimensionKey);
-        }
-
-        auto whatIt = mCurrentSlicedDurationTrackerMap.find(dimensionInWhat);
-        if (whatIt != mCurrentSlicedDurationTrackerMap.end()) {
-            whatIt->second->noteStop(internalDimensionKey, event.GetElapsedTimestampNs(), false);
-        }
-        return;
-    }
-
-    bool condition;
-    ConditionKey conditionKey;
-    if (mConditionSliced) {
-        for (const auto& link : mMetric2ConditionLinks) {
-            getDimensionForCondition(event.getValues(), link, &conditionKey[link.conditionId]);
-        }
-
-        auto conditionState =
-            mWizard->query(mConditionTrackerIndex, conditionKey,
-                           !mHasLinksToAllConditionDimensionsInTracker);
-        condition = conditionState == ConditionState::kTrue;
-    } else {
-        // TODO: The unknown condition state is not handled here, we should fix it.
-        condition = mCondition == ConditionState::kTrue;
-    }
-
-    condition = condition && mIsActive;
-
-    handleStartEvent(MetricDimensionKey(dimensionInWhat, stateValuesKey), conditionKey, condition,
-                     event);
-}
-
-size_t DurationMetricProducer::byteSizeLocked() const {
-    size_t totalSize = 0;
-    for (const auto& pair : mPastBuckets) {
-        totalSize += pair.second.size() * kBucketSize;
-    }
-    return totalSize;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/DurationMetricProducer.h b/cmds/statsd/src/metrics/DurationMetricProducer.h
deleted file mode 100644
index bfe1010..0000000
--- a/cmds/statsd/src/metrics/DurationMetricProducer.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-
-#include <unordered_map>
-
-#include <android/util/ProtoOutputStream.h>
-#include "../anomaly/DurationAnomalyTracker.h"
-#include "../condition/ConditionTracker.h"
-#include "../matchers/matcher_util.h"
-#include "MetricProducer.h"
-#include "duration_helper/DurationTracker.h"
-#include "duration_helper/MaxDurationTracker.h"
-#include "duration_helper/OringDurationTracker.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "stats_util.h"
-
-using namespace std;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class DurationMetricProducer : public MetricProducer {
-public:
-    DurationMetricProducer(
-            const ConfigKey& key, const DurationMetric& durationMetric, const int conditionIndex,
-            const vector<ConditionState>& initialConditionCache, const size_t startIndex,
-            const size_t stopIndex, const size_t stopAllIndex, const bool nesting,
-            const sp<ConditionWizard>& wizard, const FieldMatcher& internalDimensions,
-            const int64_t timeBaseNs, const int64_t startTimeNs,
-            const unordered_map<int, shared_ptr<Activation>>& eventActivationMap = {},
-            const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap = {},
-            const vector<int>& slicedStateAtoms = {},
-            const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap = {});
-
-    virtual ~DurationMetricProducer();
-
-    sp<AnomalyTracker> addAnomalyTracker(const Alert &alert,
-                                         const sp<AlarmMonitor>& anomalyAlarmMonitor) override;
-
-    void onStateChanged(const int64_t eventTimeNs, const int32_t atomId,
-                        const HashableDimensionKey& primaryKey, const FieldValue& oldState,
-                        const FieldValue& newState) override;
-
-protected:
-    void onMatchedLogEventLocked(const size_t matcherIndex, const LogEvent& event) override;
-
-    void onMatchedLogEventInternalLocked(
-            const size_t matcherIndex, const MetricDimensionKey& eventKey,
-            const ConditionKey& conditionKeys, bool condition, const LogEvent& event,
-            const std::map<int, HashableDimensionKey>& statePrimaryKeys) override;
-
-private:
-    void handleStartEvent(const MetricDimensionKey& eventKey, const ConditionKey& conditionKeys,
-                          bool condition, const LogEvent& event);
-
-    void onDumpReportLocked(const int64_t dumpTimeNs,
-                            const bool include_current_partial_bucket,
-                            const bool erase_data,
-                            const DumpLatency dumpLatency,
-                            std::set<string> *str_set,
-                            android::util::ProtoOutputStream* protoOutput) override;
-
-    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
-
-    // Internal interface to handle condition change.
-    void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
-
-    // Internal interface to handle active state change.
-    void onActiveStateChangedLocked(const int64_t& eventTimeNs) override;
-
-    // Internal interface to handle sliced condition change.
-    void onSlicedConditionMayChangeLocked(bool overallCondition, const int64_t eventTime) override;
-
-    void onSlicedConditionMayChangeInternalLocked(bool overallCondition,
-                                                  const int64_t eventTimeNs);
-
-    void onSlicedConditionMayChangeLocked_opt1(bool overallCondition, const int64_t eventTime);
-    void onSlicedConditionMayChangeLocked_opt2(bool overallCondition, const int64_t eventTime);
-
-    // Internal function to calculate the current used bytes.
-    size_t byteSizeLocked() const override;
-
-    void dumpStatesLocked(FILE* out, bool verbose) const override;
-
-    void dropDataLocked(const int64_t dropTimeNs) override;
-
-    // Util function to flush the old packet.
-    void flushIfNeededLocked(const int64_t& eventTime);
-
-    void flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                  const int64_t& nextBucketStartTimeNs) override;
-
-    const DurationMetric_AggregationType mAggregationType;
-
-    // Index of the SimpleAtomMatcher which defines the start.
-    const size_t mStartIndex;
-
-    // Index of the SimpleAtomMatcher which defines the stop.
-    const size_t mStopIndex;
-
-    // Index of the SimpleAtomMatcher which defines the stop all for all dimensions.
-    const size_t mStopAllIndex;
-
-    // nest counting -- for the same key, stops must match the number of starts to make real stop
-    const bool mNested;
-
-    // The dimension from the atom predicate. e.g., uid, wakelock name.
-    vector<Matcher> mInternalDimensions;
-
-    bool mContainANYPositionInInternalDimensions;
-
-    // This boolean is true iff When mInternalDimensions == mDimensionsInWhat
-    bool mUseWhatDimensionAsInternalDimension;
-
-    // Caches the current unsliced part condition.
-    ConditionState mUnSlicedPartCondition;
-
-    // Save the past buckets and we can clear when the StatsLogReport is dumped.
-    std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>> mPastBuckets;
-
-    // The duration trackers in the current bucket.
-    std::unordered_map<HashableDimensionKey, std::unique_ptr<DurationTracker>>
-            mCurrentSlicedDurationTrackerMap;
-
-    // Helper function to create a duration tracker given the metric aggregation type.
-    std::unique_ptr<DurationTracker> createDurationTracker(
-            const MetricDimensionKey& eventKey) const;
-
-    // This hides the base class's std::vector<sp<AnomalyTracker>> mAnomalyTrackers
-    std::vector<sp<DurationAnomalyTracker>> mAnomalyTrackers;
-
-    // Util function to check whether the specified dimension hits the guardrail.
-    bool hitGuardRailLocked(const MetricDimensionKey& newKey);
-
-    static const size_t kBucketSize = sizeof(DurationBucket{});
-
-    FRIEND_TEST(DurationMetricTrackerTest, TestNoCondition);
-    FRIEND_TEST(DurationMetricTrackerTest, TestNonSlicedCondition);
-    FRIEND_TEST(DurationMetricTrackerTest, TestNonSlicedConditionUnknownState);
-    FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicates);
-    FRIEND_TEST(DurationMetricTrackerTest, TestFirstBucket);
-
-    FRIEND_TEST(DurationMetricProducerTest_PartialBucket, TestSumDuration);
-    FRIEND_TEST(DurationMetricProducerTest_PartialBucket,
-                TestSumDurationWithSplitInFollowingBucket);
-    FRIEND_TEST(DurationMetricProducerTest_PartialBucket, TestMaxDuration);
-    FRIEND_TEST(DurationMetricProducerTest_PartialBucket, TestMaxDurationWithSplitInNextBucket);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/EventMetricProducer.cpp b/cmds/statsd/src/metrics/EventMetricProducer.cpp
deleted file mode 100644
index dc0036a..0000000
--- a/cmds/statsd/src/metrics/EventMetricProducer.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "EventMetricProducer.h"
-#include "stats_util.h"
-#include "stats_log_util.h"
-
-#include <limits.h>
-#include <stdlib.h>
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_FLOAT;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_STRING;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::ProtoOutputStream;
-using std::map;
-using std::string;
-using std::unordered_map;
-using std::vector;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// for StatsLogReport
-const int FIELD_ID_ID = 1;
-const int FIELD_ID_EVENT_METRICS = 4;
-const int FIELD_ID_IS_ACTIVE = 14;
-// for EventMetricDataWrapper
-const int FIELD_ID_DATA = 1;
-// for EventMetricData
-const int FIELD_ID_ELAPSED_TIMESTAMP_NANOS = 1;
-const int FIELD_ID_ATOMS = 2;
-
-EventMetricProducer::EventMetricProducer(
-        const ConfigKey& key, const EventMetric& metric, const int conditionIndex,
-        const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard,
-        const int64_t startTimeNs,
-        const unordered_map<int, shared_ptr<Activation>>& eventActivationMap,
-        const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap,
-        const vector<int>& slicedStateAtoms,
-        const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap)
-    : MetricProducer(metric.id(), key, startTimeNs, conditionIndex, initialConditionCache, wizard,
-                     eventActivationMap, eventDeactivationMap, slicedStateAtoms, stateGroupMap) {
-    if (metric.links().size() > 0) {
-        for (const auto& link : metric.links()) {
-            Metric2Condition mc;
-            mc.conditionId = link.condition();
-            translateFieldMatcher(link.fields_in_what(), &mc.metricFields);
-            translateFieldMatcher(link.fields_in_condition(), &mc.conditionFields);
-            mMetric2ConditionLinks.push_back(mc);
-        }
-        mConditionSliced = true;
-    }
-    mProto = std::make_unique<ProtoOutputStream>();
-    VLOG("metric %lld created. bucket size %lld start_time: %lld", (long long)metric.id(),
-         (long long)mBucketSizeNs, (long long)mTimeBaseNs);
-}
-
-EventMetricProducer::~EventMetricProducer() {
-    VLOG("~EventMetricProducer() called");
-}
-
-void EventMetricProducer::dropDataLocked(const int64_t dropTimeNs) {
-    mProto->clear();
-    StatsdStats::getInstance().noteBucketDropped(mMetricId);
-}
-
-void EventMetricProducer::onSlicedConditionMayChangeLocked(bool overallCondition,
-                                                           const int64_t eventTime) {
-}
-
-std::unique_ptr<std::vector<uint8_t>> serializeProtoLocked(ProtoOutputStream& protoOutput) {
-    size_t bufferSize = protoOutput.size();
-
-    std::unique_ptr<std::vector<uint8_t>> buffer(new std::vector<uint8_t>(bufferSize));
-
-    size_t pos = 0;
-    sp<android::util::ProtoReader> reader = protoOutput.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&((*buffer)[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-
-    return buffer;
-}
-
-void EventMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
-    mProto->clear();
-}
-
-void EventMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
-                                             const bool include_current_partial_bucket,
-                                             const bool erase_data,
-                                             const DumpLatency dumpLatency,
-                                             std::set<string> *str_set,
-                                             ProtoOutputStream* protoOutput) {
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
-    protoOutput->write(FIELD_TYPE_BOOL | FIELD_ID_IS_ACTIVE, isActiveLocked());
-    if (mProto->size() <= 0) {
-        return;
-    }
-
-    size_t bufferSize = mProto->size();
-    VLOG("metric %lld dump report now... proto size: %zu ",
-        (long long)mMetricId, bufferSize);
-    std::unique_ptr<std::vector<uint8_t>> buffer = serializeProtoLocked(*mProto);
-
-    protoOutput->write(FIELD_TYPE_MESSAGE | FIELD_ID_EVENT_METRICS,
-                       reinterpret_cast<char*>(buffer.get()->data()), buffer.get()->size());
-
-    if (erase_data) {
-        mProto->clear();
-    }
-}
-
-void EventMetricProducer::onConditionChangedLocked(const bool conditionMet,
-                                                   const int64_t eventTime) {
-    VLOG("Metric %lld onConditionChanged", (long long)mMetricId);
-    mCondition = conditionMet ? ConditionState::kTrue : ConditionState::kFalse;
-}
-
-void EventMetricProducer::onMatchedLogEventInternalLocked(
-        const size_t matcherIndex, const MetricDimensionKey& eventKey,
-        const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-        const map<int, HashableDimensionKey>& statePrimaryKeys) {
-    if (!condition) {
-        return;
-    }
-
-    uint64_t wrapperToken =
-            mProto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
-    const int64_t elapsedTimeNs = truncateTimestampIfNecessary(event);
-    mProto->write(FIELD_TYPE_INT64 | FIELD_ID_ELAPSED_TIMESTAMP_NANOS, (long long) elapsedTimeNs);
-
-    uint64_t eventToken = mProto->start(FIELD_TYPE_MESSAGE | FIELD_ID_ATOMS);
-    event.ToProto(*mProto);
-    mProto->end(eventToken);
-    mProto->end(wrapperToken);
-}
-
-size_t EventMetricProducer::byteSizeLocked() const {
-    return mProto->bytesWritten();
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/EventMetricProducer.h b/cmds/statsd/src/metrics/EventMetricProducer.h
deleted file mode 100644
index bfb2de3..0000000
--- a/cmds/statsd/src/metrics/EventMetricProducer.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef EVENT_METRIC_PRODUCER_H
-#define EVENT_METRIC_PRODUCER_H
-
-#include <unordered_map>
-
-#include <android/util/ProtoOutputStream.h>
-
-#include "../condition/ConditionTracker.h"
-#include "../matchers/matcher_util.h"
-#include "MetricProducer.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "stats_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class EventMetricProducer : public MetricProducer {
-public:
-    EventMetricProducer(
-            const ConfigKey& key, const EventMetric& eventMetric, const int conditionIndex,
-            const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard,
-            const int64_t startTimeNs,
-            const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap = {},
-            const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>&
-                    eventDeactivationMap = {},
-            const vector<int>& slicedStateAtoms = {},
-            const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap = {});
-
-    virtual ~EventMetricProducer();
-
-private:
-    void onMatchedLogEventInternalLocked(
-            const size_t matcherIndex, const MetricDimensionKey& eventKey,
-            const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-            const std::map<int, HashableDimensionKey>& statePrimaryKeys) override;
-
-    void onDumpReportLocked(const int64_t dumpTimeNs,
-                            const bool include_current_partial_bucket,
-                            const bool erase_data,
-                            const DumpLatency dumpLatency,
-                            std::set<string> *str_set,
-                            android::util::ProtoOutputStream* protoOutput) override;
-    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
-
-    // Internal interface to handle condition change.
-    void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
-
-    // Internal interface to handle sliced condition change.
-    void onSlicedConditionMayChangeLocked(bool overallCondition, const int64_t eventTime) override;
-
-    void dropDataLocked(const int64_t dropTimeNs) override;
-
-    // Internal function to calculate the current used bytes.
-    size_t byteSizeLocked() const override;
-
-    void dumpStatesLocked(FILE* out, bool verbose) const override{};
-
-    // Maps to a EventMetricDataWrapper. Storing atom events in ProtoOutputStream
-    // is more space efficient than storing LogEvent.
-    std::unique_ptr<android::util::ProtoOutputStream> mProto;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#endif  // EVENT_METRIC_PRODUCER_H
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
deleted file mode 100644
index 020f4b6..0000000
--- a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
-* Copyright (C) 2017 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "../guardrail/StatsdStats.h"
-#include "GaugeMetricProducer.h"
-#include "../stats_log_util.h"
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_FLOAT;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::ProtoOutputStream;
-using std::map;
-using std::string;
-using std::unordered_map;
-using std::vector;
-using std::make_shared;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// for StatsLogReport
-const int FIELD_ID_ID = 1;
-const int FIELD_ID_GAUGE_METRICS = 8;
-const int FIELD_ID_TIME_BASE = 9;
-const int FIELD_ID_BUCKET_SIZE = 10;
-const int FIELD_ID_DIMENSION_PATH_IN_WHAT = 11;
-const int FIELD_ID_IS_ACTIVE = 14;
-// for GaugeMetricDataWrapper
-const int FIELD_ID_DATA = 1;
-const int FIELD_ID_SKIPPED = 2;
-// for SkippedBuckets
-const int FIELD_ID_SKIPPED_START_MILLIS = 3;
-const int FIELD_ID_SKIPPED_END_MILLIS = 4;
-const int FIELD_ID_SKIPPED_DROP_EVENT = 5;
-// for DumpEvent Proto
-const int FIELD_ID_BUCKET_DROP_REASON = 1;
-const int FIELD_ID_DROP_TIME = 2;
-// for GaugeMetricData
-const int FIELD_ID_DIMENSION_IN_WHAT = 1;
-const int FIELD_ID_BUCKET_INFO = 3;
-const int FIELD_ID_DIMENSION_LEAF_IN_WHAT = 4;
-// for GaugeBucketInfo
-const int FIELD_ID_ATOM = 3;
-const int FIELD_ID_ELAPSED_ATOM_TIMESTAMP = 4;
-const int FIELD_ID_BUCKET_NUM = 6;
-const int FIELD_ID_START_BUCKET_ELAPSED_MILLIS = 7;
-const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 8;
-
-GaugeMetricProducer::GaugeMetricProducer(
-        const ConfigKey& key, const GaugeMetric& metric, const int conditionIndex,
-        const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard,
-        const int whatMatcherIndex, const sp<EventMatcherWizard>& matcherWizard,
-        const int pullTagId, const int triggerAtomId, const int atomId, const int64_t timeBaseNs,
-        const int64_t startTimeNs, const sp<StatsPullerManager>& pullerManager,
-        const unordered_map<int, shared_ptr<Activation>>& eventActivationMap,
-        const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap)
-    : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard,
-                     eventActivationMap, eventDeactivationMap, /*slicedStateAtoms=*/{},
-                     /*stateGroupMap=*/{}),
-      mWhatMatcherIndex(whatMatcherIndex),
-      mEventMatcherWizard(matcherWizard),
-      mPullerManager(pullerManager),
-      mPullTagId(pullTagId),
-      mTriggerAtomId(triggerAtomId),
-      mAtomId(atomId),
-      mIsPulled(pullTagId != -1),
-      mMinBucketSizeNs(metric.min_bucket_size_nanos()),
-      mMaxPullDelayNs(metric.max_pull_delay_sec() > 0 ? metric.max_pull_delay_sec() * NS_PER_SEC
-                                                      : StatsdStats::kPullMaxDelayNs),
-      mDimensionSoftLimit(StatsdStats::kAtomDimensionKeySizeLimitMap.find(pullTagId) !=
-                                          StatsdStats::kAtomDimensionKeySizeLimitMap.end()
-                                  ? StatsdStats::kAtomDimensionKeySizeLimitMap.at(pullTagId).first
-                                  : StatsdStats::kDimensionKeySizeSoftLimit),
-      mDimensionHardLimit(StatsdStats::kAtomDimensionKeySizeLimitMap.find(pullTagId) !=
-                                          StatsdStats::kAtomDimensionKeySizeLimitMap.end()
-                                  ? StatsdStats::kAtomDimensionKeySizeLimitMap.at(pullTagId).second
-                                  : StatsdStats::kDimensionKeySizeHardLimit),
-      mGaugeAtomsPerDimensionLimit(metric.max_num_gauge_atoms_per_bucket()),
-      mSplitBucketForAppUpgrade(metric.split_bucket_for_app_upgrade()) {
-    mCurrentSlicedBucket = std::make_shared<DimToGaugeAtomsMap>();
-    mCurrentSlicedBucketForAnomaly = std::make_shared<DimToValMap>();
-    int64_t bucketSizeMills = 0;
-    if (metric.has_bucket()) {
-        bucketSizeMills = TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket());
-    } else {
-        bucketSizeMills = TimeUnitToBucketSizeInMillis(ONE_HOUR);
-    }
-    mBucketSizeNs = bucketSizeMills * 1000000;
-
-    mSamplingType = metric.sampling_type();
-    if (!metric.gauge_fields_filter().include_all()) {
-        translateFieldMatcher(metric.gauge_fields_filter().fields(), &mFieldMatchers);
-    }
-
-    if (metric.has_dimensions_in_what()) {
-        translateFieldMatcher(metric.dimensions_in_what(), &mDimensionsInWhat);
-        mContainANYPositionInDimensionsInWhat = HasPositionANY(metric.dimensions_in_what());
-    }
-
-    if (metric.links().size() > 0) {
-        for (const auto& link : metric.links()) {
-            Metric2Condition mc;
-            mc.conditionId = link.condition();
-            translateFieldMatcher(link.fields_in_what(), &mc.metricFields);
-            translateFieldMatcher(link.fields_in_condition(), &mc.conditionFields);
-            mMetric2ConditionLinks.push_back(mc);
-        }
-        mConditionSliced = true;
-    }
-    mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what());
-
-    flushIfNeededLocked(startTimeNs);
-    // Kicks off the puller immediately.
-    if (mIsPulled && mSamplingType == GaugeMetric::RANDOM_ONE_SAMPLE) {
-        mPullerManager->RegisterReceiver(mPullTagId, mConfigKey, this, getCurrentBucketEndTimeNs(),
-                                         mBucketSizeNs);
-    }
-
-    // Adjust start for partial first bucket and then pull if needed
-    mCurrentBucketStartTimeNs = startTimeNs;
-
-    VLOG("Gauge metric %lld created. bucket size %lld start_time: %lld sliced %d",
-         (long long)metric.id(), (long long)mBucketSizeNs, (long long)mTimeBaseNs,
-         mConditionSliced);
-}
-
-GaugeMetricProducer::~GaugeMetricProducer() {
-    VLOG("~GaugeMetricProducer() called");
-    if (mIsPulled && mSamplingType == GaugeMetric::RANDOM_ONE_SAMPLE) {
-        mPullerManager->UnRegisterReceiver(mPullTagId, mConfigKey, this);
-    }
-}
-
-void GaugeMetricProducer::dumpStatesLocked(FILE* out, bool verbose) const {
-    if (mCurrentSlicedBucket == nullptr ||
-        mCurrentSlicedBucket->size() == 0) {
-        return;
-    }
-
-    fprintf(out, "GaugeMetric %lld dimension size %lu\n", (long long)mMetricId,
-            (unsigned long)mCurrentSlicedBucket->size());
-    if (verbose) {
-        for (const auto& it : *mCurrentSlicedBucket) {
-            fprintf(out, "\t(what)%s\t(states)%s  %d atoms\n",
-                    it.first.getDimensionKeyInWhat().toString().c_str(),
-                    it.first.getStateValuesKey().toString().c_str(), (int)it.second.size());
-        }
-    }
-}
-
-void GaugeMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
-    flushIfNeededLocked(dumpTimeNs);
-    mPastBuckets.clear();
-    mSkippedBuckets.clear();
-}
-
-void GaugeMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
-                                             const bool include_current_partial_bucket,
-                                             const bool erase_data,
-                                             const DumpLatency dumpLatency,
-                                             std::set<string> *str_set,
-                                             ProtoOutputStream* protoOutput) {
-    VLOG("Gauge metric %lld report now...", (long long)mMetricId);
-    if (include_current_partial_bucket) {
-        flushLocked(dumpTimeNs);
-    } else {
-        flushIfNeededLocked(dumpTimeNs);
-    }
-
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
-    protoOutput->write(FIELD_TYPE_BOOL | FIELD_ID_IS_ACTIVE, isActiveLocked());
-
-    if (mPastBuckets.empty() && mSkippedBuckets.empty()) {
-        return;
-    }
-
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TIME_BASE, (long long)mTimeBaseNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_SIZE, (long long)mBucketSizeNs);
-
-    // Fills the dimension path if not slicing by ALL.
-    if (!mSliceByPositionALL) {
-        if (!mDimensionsInWhat.empty()) {
-            uint64_t dimenPathToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_WHAT);
-            writeDimensionPathToProto(mDimensionsInWhat, protoOutput);
-            protoOutput->end(dimenPathToken);
-        }
-    }
-
-    uint64_t protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_GAUGE_METRICS);
-
-    for (const auto& skippedBucket : mSkippedBuckets) {
-        uint64_t wrapperToken =
-                protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_SKIPPED);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_START_MILLIS,
-                           (long long)(NanoToMillis(skippedBucket.bucketStartTimeNs)));
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_END_MILLIS,
-                           (long long)(NanoToMillis(skippedBucket.bucketEndTimeNs)));
-
-        for (const auto& dropEvent : skippedBucket.dropEvents) {
-            uint64_t dropEventToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                         FIELD_ID_SKIPPED_DROP_EVENT);
-            protoOutput->write(FIELD_TYPE_INT32 | FIELD_ID_BUCKET_DROP_REASON, dropEvent.reason);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_DROP_TIME, (long long) (NanoToMillis(dropEvent.dropTimeNs)));
-            protoOutput->end(dropEventToken);
-        }
-        protoOutput->end(wrapperToken);
-    }
-
-    for (const auto& pair : mPastBuckets) {
-        const MetricDimensionKey& dimensionKey = pair.first;
-
-        VLOG("Gauge dimension key %s", dimensionKey.toString().c_str());
-        uint64_t wrapperToken =
-                protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
-
-        // First fill dimension.
-        if (mSliceByPositionALL) {
-            uint64_t dimensionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
-            writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), str_set, protoOutput);
-            protoOutput->end(dimensionToken);
-        } else {
-            writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInWhat(),
-                                           FIELD_ID_DIMENSION_LEAF_IN_WHAT, str_set, protoOutput);
-        }
-
-        // Then fill bucket_info (GaugeBucketInfo).
-        for (const auto& bucket : pair.second) {
-            uint64_t bucketInfoToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_BUCKET_INFO);
-
-            if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_MILLIS,
-                                   (long long)NanoToMillis(bucket.mBucketStartNs));
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_MILLIS,
-                                   (long long)NanoToMillis(bucket.mBucketEndNs));
-            } else {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_NUM,
-                                   (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs)));
-            }
-
-            if (!bucket.mGaugeAtoms.empty()) {
-                for (const auto& atom : bucket.mGaugeAtoms) {
-                    uint64_t atomsToken =
-                        protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                           FIELD_ID_ATOM);
-                    writeFieldValueTreeToStream(mAtomId, *(atom.mFields), protoOutput);
-                    protoOutput->end(atomsToken);
-                }
-                for (const auto& atom : bucket.mGaugeAtoms) {
-                    protoOutput->write(FIELD_TYPE_INT64 | FIELD_COUNT_REPEATED |
-                                               FIELD_ID_ELAPSED_ATOM_TIMESTAMP,
-                                       (long long)atom.mElapsedTimestampNs);
-                }
-            }
-            protoOutput->end(bucketInfoToken);
-            VLOG("Gauge \t bucket [%lld - %lld] includes %d atoms.",
-                 (long long)bucket.mBucketStartNs, (long long)bucket.mBucketEndNs,
-                 (int)bucket.mGaugeAtoms.size());
-        }
-        protoOutput->end(wrapperToken);
-    }
-    protoOutput->end(protoToken);
-
-
-    if (erase_data) {
-        mPastBuckets.clear();
-        mSkippedBuckets.clear();
-    }
-}
-
-void GaugeMetricProducer::prepareFirstBucketLocked() {
-    if (mIsActive && mIsPulled && mSamplingType == GaugeMetric::RANDOM_ONE_SAMPLE) {
-        pullAndMatchEventsLocked(mCurrentBucketStartTimeNs);
-    }
-}
-
-void GaugeMetricProducer::pullAndMatchEventsLocked(const int64_t timestampNs) {
-    bool triggerPuller = false;
-    switch(mSamplingType) {
-        // When the metric wants to do random sampling and there is already one gauge atom for the
-        // current bucket, do not do it again.
-        case GaugeMetric::RANDOM_ONE_SAMPLE: {
-            triggerPuller = mCondition == ConditionState::kTrue && mCurrentSlicedBucket->empty();
-            break;
-        }
-        case GaugeMetric::CONDITION_CHANGE_TO_TRUE: {
-            triggerPuller = mCondition == ConditionState::kTrue;
-            break;
-        }
-        case GaugeMetric::FIRST_N_SAMPLES: {
-            triggerPuller = mCondition == ConditionState::kTrue;
-            break;
-        }
-        default:
-            break;
-    }
-    if (!triggerPuller) {
-        return;
-    }
-    vector<std::shared_ptr<LogEvent>> allData;
-    if (!mPullerManager->Pull(mPullTagId, mConfigKey, timestampNs, &allData)) {
-        ALOGE("Gauge Stats puller failed for tag: %d at %lld", mPullTagId, (long long)timestampNs);
-        return;
-    }
-    const int64_t pullDelayNs = getElapsedRealtimeNs() - timestampNs;
-    StatsdStats::getInstance().notePullDelay(mPullTagId, pullDelayNs);
-    if (pullDelayNs > mMaxPullDelayNs) {
-        ALOGE("Pull finish too late for atom %d", mPullTagId);
-        StatsdStats::getInstance().notePullExceedMaxDelay(mPullTagId);
-        return;
-    }
-    for (const auto& data : allData) {
-        LogEvent localCopy = data->makeCopy();
-        localCopy.setElapsedTimestampNs(timestampNs);
-        if (mEventMatcherWizard->matchLogEvent(localCopy, mWhatMatcherIndex) ==
-            MatchingState::kMatched) {
-            onMatchedLogEventLocked(mWhatMatcherIndex, localCopy);
-        }
-    }
-}
-
-void GaugeMetricProducer::onActiveStateChangedLocked(const int64_t& eventTimeNs) {
-    MetricProducer::onActiveStateChangedLocked(eventTimeNs);
-    if (ConditionState::kTrue != mCondition || !mIsPulled) {
-        return;
-    }
-    if (mTriggerAtomId == -1 || (mIsActive && mSamplingType == GaugeMetric::RANDOM_ONE_SAMPLE)) {
-        pullAndMatchEventsLocked(eventTimeNs);
-    }
-
-}
-
-void GaugeMetricProducer::onConditionChangedLocked(const bool conditionMet,
-                                                   const int64_t eventTimeNs) {
-    VLOG("GaugeMetric %lld onConditionChanged", (long long)mMetricId);
-
-    mCondition = conditionMet ? ConditionState::kTrue : ConditionState::kFalse;
-    if (!mIsActive) {
-        return;
-    }
-
-    flushIfNeededLocked(eventTimeNs);
-    if (mIsPulled && mTriggerAtomId == -1) {
-        pullAndMatchEventsLocked(eventTimeNs);
-    }  // else: Push mode. No need to proactively pull the gauge data.
-}
-
-void GaugeMetricProducer::onSlicedConditionMayChangeLocked(bool overallCondition,
-                                                           const int64_t eventTimeNs) {
-    VLOG("GaugeMetric %lld onSlicedConditionMayChange overall condition %d", (long long)mMetricId,
-         overallCondition);
-    mCondition = overallCondition ? ConditionState::kTrue : ConditionState::kFalse;
-    if (!mIsActive) {
-        return;
-    }
-
-    flushIfNeededLocked(eventTimeNs);
-    // If the condition is sliced, mCondition is true if any of the dimensions is true. And we will
-    // pull for every dimension.
-    if (mIsPulled && mTriggerAtomId == -1) {
-        pullAndMatchEventsLocked(eventTimeNs);
-    }  // else: Push mode. No need to proactively pull the gauge data.
-}
-
-std::shared_ptr<vector<FieldValue>> GaugeMetricProducer::getGaugeFields(const LogEvent& event) {
-    std::shared_ptr<vector<FieldValue>> gaugeFields;
-    if (mFieldMatchers.size() > 0) {
-        gaugeFields = std::make_shared<vector<FieldValue>>();
-        filterGaugeValues(mFieldMatchers, event.getValues(), gaugeFields.get());
-    } else {
-        gaugeFields = std::make_shared<vector<FieldValue>>(event.getValues());
-    }
-    // Trim all dimension fields from output. Dimensions will appear in output report and will
-    // benefit from dictionary encoding. For large pulled atoms, this can give the benefit of
-    // optional repeated field.
-    for (const auto& field : mDimensionsInWhat) {
-        for (auto it = gaugeFields->begin(); it != gaugeFields->end();) {
-            if (it->mField.matches(field)) {
-                it = gaugeFields->erase(it);
-            } else {
-                it++;
-            }
-        }
-    }
-    return gaugeFields;
-}
-
-void GaugeMetricProducer::onDataPulled(const std::vector<std::shared_ptr<LogEvent>>& allData,
-                                       bool pullSuccess, int64_t originalPullTimeNs) {
-    std::lock_guard<std::mutex> lock(mMutex);
-    if (!pullSuccess || allData.size() == 0) {
-        return;
-    }
-    const int64_t pullDelayNs = getElapsedRealtimeNs() - originalPullTimeNs;
-    StatsdStats::getInstance().notePullDelay(mPullTagId, pullDelayNs);
-    if (pullDelayNs > mMaxPullDelayNs) {
-        ALOGE("Pull finish too late for atom %d", mPullTagId);
-        StatsdStats::getInstance().notePullExceedMaxDelay(mPullTagId);
-        return;
-    }
-    for (const auto& data : allData) {
-        if (mEventMatcherWizard->matchLogEvent(
-                *data, mWhatMatcherIndex) == MatchingState::kMatched) {
-            onMatchedLogEventLocked(mWhatMatcherIndex, *data);
-        }
-    }
-}
-
-bool GaugeMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) {
-    if (mCurrentSlicedBucket->find(newKey) != mCurrentSlicedBucket->end()) {
-        return false;
-    }
-    // 1. Report the tuple count if the tuple count > soft limit
-    if (mCurrentSlicedBucket->size() > mDimensionSoftLimit - 1) {
-        size_t newTupleCount = mCurrentSlicedBucket->size() + 1;
-        StatsdStats::getInstance().noteMetricDimensionSize(mConfigKey, mMetricId, newTupleCount);
-        // 2. Don't add more tuples, we are above the allowed threshold. Drop the data.
-        if (newTupleCount > mDimensionHardLimit) {
-            ALOGE("GaugeMetric %lld dropping data for dimension key %s",
-                (long long)mMetricId, newKey.toString().c_str());
-            StatsdStats::getInstance().noteHardDimensionLimitReached(mMetricId);
-            return true;
-        }
-    }
-
-    return false;
-}
-
-void GaugeMetricProducer::onMatchedLogEventInternalLocked(
-        const size_t matcherIndex, const MetricDimensionKey& eventKey,
-        const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-        const map<int, HashableDimensionKey>& statePrimaryKeys) {
-    if (condition == false) {
-        return;
-    }
-    int64_t eventTimeNs = event.GetElapsedTimestampNs();
-    if (eventTimeNs < mCurrentBucketStartTimeNs) {
-        VLOG("Gauge Skip event due to late arrival: %lld vs %lld", (long long)eventTimeNs,
-             (long long)mCurrentBucketStartTimeNs);
-        return;
-    }
-    flushIfNeededLocked(eventTimeNs);
-
-    if (mTriggerAtomId == event.GetTagId()) {
-        pullAndMatchEventsLocked(eventTimeNs);
-        return;
-    }
-
-    // When gauge metric wants to randomly sample the output atom, we just simply use the first
-    // gauge in the given bucket.
-    if (mCurrentSlicedBucket->find(eventKey) != mCurrentSlicedBucket->end() &&
-        mSamplingType == GaugeMetric::RANDOM_ONE_SAMPLE) {
-        return;
-    }
-    if (hitGuardRailLocked(eventKey)) {
-        return;
-    }
-    if ((*mCurrentSlicedBucket)[eventKey].size() >= mGaugeAtomsPerDimensionLimit) {
-        return;
-    }
-
-    const int64_t truncatedElapsedTimestampNs = truncateTimestampIfNecessary(event);
-    GaugeAtom gaugeAtom(getGaugeFields(event), truncatedElapsedTimestampNs);
-    (*mCurrentSlicedBucket)[eventKey].push_back(gaugeAtom);
-    // Anomaly detection on gauge metric only works when there is one numeric
-    // field specified.
-    if (mAnomalyTrackers.size() > 0) {
-        if (gaugeAtom.mFields->size() == 1) {
-            const Value& value = gaugeAtom.mFields->begin()->mValue;
-            long gaugeVal = 0;
-            if (value.getType() == INT) {
-                gaugeVal = (long)value.int_value;
-            } else if (value.getType() == LONG) {
-                gaugeVal = value.long_value;
-            }
-            for (auto& tracker : mAnomalyTrackers) {
-                tracker->detectAndDeclareAnomaly(eventTimeNs, mCurrentBucketNum, mMetricId,
-                                                 eventKey, gaugeVal);
-            }
-        }
-    }
-}
-
-void GaugeMetricProducer::updateCurrentSlicedBucketForAnomaly() {
-    for (const auto& slice : *mCurrentSlicedBucket) {
-        if (slice.second.empty()) {
-            continue;
-        }
-        const Value& value = slice.second.front().mFields->front().mValue;
-        long gaugeVal = 0;
-        if (value.getType() == INT) {
-            gaugeVal = (long)value.int_value;
-        } else if (value.getType() == LONG) {
-            gaugeVal = value.long_value;
-        }
-        (*mCurrentSlicedBucketForAnomaly)[slice.first] = gaugeVal;
-    }
-}
-
-void GaugeMetricProducer::dropDataLocked(const int64_t dropTimeNs) {
-    flushIfNeededLocked(dropTimeNs);
-    StatsdStats::getInstance().noteBucketDropped(mMetricId);
-    mPastBuckets.clear();
-}
-
-// When a new matched event comes in, we check if event falls into the current
-// bucket. If not, flush the old counter to past buckets and initialize the new
-// bucket.
-// if data is pushed, onMatchedLogEvent will only be called through onConditionChanged() inside
-// the GaugeMetricProducer while holding the lock.
-void GaugeMetricProducer::flushIfNeededLocked(const int64_t& eventTimeNs) {
-    int64_t currentBucketEndTimeNs = getCurrentBucketEndTimeNs();
-
-    if (eventTimeNs < currentBucketEndTimeNs) {
-        VLOG("Gauge eventTime is %lld, less than next bucket start time %lld",
-             (long long)eventTimeNs, (long long)(mCurrentBucketStartTimeNs + mBucketSizeNs));
-        return;
-    }
-
-    // Adjusts the bucket start and end times.
-    int64_t numBucketsForward = 1 + (eventTimeNs - currentBucketEndTimeNs) / mBucketSizeNs;
-    int64_t nextBucketNs = currentBucketEndTimeNs + (numBucketsForward - 1) * mBucketSizeNs;
-    flushCurrentBucketLocked(eventTimeNs, nextBucketNs);
-
-    mCurrentBucketNum += numBucketsForward;
-    VLOG("Gauge metric %lld: new bucket start time: %lld", (long long)mMetricId,
-         (long long)mCurrentBucketStartTimeNs);
-}
-
-void GaugeMetricProducer::flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                                   const int64_t& nextBucketStartTimeNs) {
-    int64_t fullBucketEndTimeNs = getCurrentBucketEndTimeNs();
-    int64_t bucketEndTime = eventTimeNs < fullBucketEndTimeNs ? eventTimeNs : fullBucketEndTimeNs;
-
-    GaugeBucket info;
-    info.mBucketStartNs = mCurrentBucketStartTimeNs;
-    info.mBucketEndNs = bucketEndTime;
-
-    // Add bucket to mPastBuckets if bucket is large enough.
-    // Otherwise, drop the bucket data and add bucket metadata to mSkippedBuckets.
-    bool isBucketLargeEnough = info.mBucketEndNs - mCurrentBucketStartTimeNs >= mMinBucketSizeNs;
-    if (isBucketLargeEnough) {
-        for (const auto& slice : *mCurrentSlicedBucket) {
-            info.mGaugeAtoms = slice.second;
-            auto& bucketList = mPastBuckets[slice.first];
-            bucketList.push_back(info);
-            VLOG("Gauge gauge metric %lld, dump key value: %s", (long long)mMetricId,
-                 slice.first.toString().c_str());
-        }
-    } else {
-        mCurrentSkippedBucket.bucketStartTimeNs = mCurrentBucketStartTimeNs;
-        mCurrentSkippedBucket.bucketEndTimeNs = bucketEndTime;
-        if (!maxDropEventsReached()) {
-            mCurrentSkippedBucket.dropEvents.emplace_back(
-                    buildDropEvent(eventTimeNs, BucketDropReason::BUCKET_TOO_SMALL));
-        }
-        mSkippedBuckets.emplace_back(mCurrentSkippedBucket);
-    }
-
-    // If we have anomaly trackers, we need to update the partial bucket values.
-    if (mAnomalyTrackers.size() > 0) {
-        updateCurrentSlicedBucketForAnomaly();
-
-        if (eventTimeNs > fullBucketEndTimeNs) {
-            // This is known to be a full bucket, so send this data to the anomaly tracker.
-            for (auto& tracker : mAnomalyTrackers) {
-                tracker->addPastBucket(mCurrentSlicedBucketForAnomaly, mCurrentBucketNum);
-            }
-            mCurrentSlicedBucketForAnomaly = std::make_shared<DimToValMap>();
-        }
-    }
-
-    StatsdStats::getInstance().noteBucketCount(mMetricId);
-    mCurrentSlicedBucket = std::make_shared<DimToGaugeAtomsMap>();
-    mCurrentBucketStartTimeNs = nextBucketStartTimeNs;
-    mCurrentSkippedBucket.reset();
-}
-
-size_t GaugeMetricProducer::byteSizeLocked() const {
-    size_t totalSize = 0;
-    for (const auto& pair : mPastBuckets) {
-        for (const auto& bucket : pair.second) {
-            totalSize += bucket.mGaugeAtoms.size() * sizeof(GaugeAtom);
-            for (const auto& atom : bucket.mGaugeAtoms) {
-                if (atom.mFields != nullptr) {
-                    totalSize += atom.mFields->size() * sizeof(FieldValue);
-                }
-            }
-        }
-    }
-    return totalSize;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.h b/cmds/statsd/src/metrics/GaugeMetricProducer.h
deleted file mode 100644
index ef3a24a..0000000
--- a/cmds/statsd/src/metrics/GaugeMetricProducer.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <unordered_map>
-
-#include <android/util/ProtoOutputStream.h>
-#include <gtest/gtest_prod.h>
-#include "../condition/ConditionTracker.h"
-#include "../external/PullDataReceiver.h"
-#include "../external/StatsPullerManager.h"
-#include "../matchers/matcher_util.h"
-#include "../matchers/EventMatcherWizard.h"
-#include "MetricProducer.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "../stats_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-struct GaugeAtom {
-    GaugeAtom(std::shared_ptr<vector<FieldValue>> fields, int64_t elapsedTimeNs)
-        : mFields(fields), mElapsedTimestampNs(elapsedTimeNs) {
-    }
-    std::shared_ptr<vector<FieldValue>> mFields;
-    int64_t mElapsedTimestampNs;
-};
-
-struct GaugeBucket {
-    int64_t mBucketStartNs;
-    int64_t mBucketEndNs;
-    std::vector<GaugeAtom> mGaugeAtoms;
-};
-
-typedef std::unordered_map<MetricDimensionKey, std::vector<GaugeAtom>>
-    DimToGaugeAtomsMap;
-
-// This gauge metric producer first register the puller to automatically pull the gauge at the
-// beginning of each bucket. If the condition is met, insert it to the bucket info. Otherwise
-// proactively pull the gauge when the condition is changed to be true. Therefore, the gauge metric
-// producer always reports the guage at the earliest time of the bucket when the condition is met.
-class GaugeMetricProducer : public virtual MetricProducer, public virtual PullDataReceiver {
-public:
-    GaugeMetricProducer(
-            const ConfigKey& key, const GaugeMetric& gaugeMetric, const int conditionIndex,
-            const vector<ConditionState>& initialConditionCache,
-            const sp<ConditionWizard>& conditionWizard, const int whatMatcherIndex,
-            const sp<EventMatcherWizard>& matcherWizard, const int pullTagId,
-            const int triggerAtomId, const int atomId, const int64_t timeBaseNs,
-            const int64_t startTimeNs, const sp<StatsPullerManager>& pullerManager,
-            const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap = {},
-            const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>&
-                    eventDeactivationMap = {});
-
-    virtual ~GaugeMetricProducer();
-
-    // Handles when the pulled data arrives.
-    void onDataPulled(const std::vector<std::shared_ptr<LogEvent>>& data,
-                      bool pullSuccess, int64_t originalPullTimeNs) override;
-
-    // GaugeMetric needs to immediately trigger another pull when we create the partial bucket.
-    void notifyAppUpgrade(const int64_t& eventTimeNs) override {
-        std::lock_guard<std::mutex> lock(mMutex);
-
-        if (!mSplitBucketForAppUpgrade) {
-            return;
-        }
-        flushLocked(eventTimeNs);
-        if (mIsPulled && mSamplingType == GaugeMetric::RANDOM_ONE_SAMPLE) {
-            pullAndMatchEventsLocked(eventTimeNs);
-        }
-    };
-
-    // GaugeMetric needs to immediately trigger another pull when we create the partial bucket.
-    void onStatsdInitCompleted(const int64_t& eventTimeNs) override {
-        std::lock_guard<std::mutex> lock(mMutex);
-
-        flushLocked(eventTimeNs);
-        if (mIsPulled && mSamplingType == GaugeMetric::RANDOM_ONE_SAMPLE) {
-            pullAndMatchEventsLocked(eventTimeNs);
-        }
-    };
-
-protected:
-    void onMatchedLogEventInternalLocked(
-            const size_t matcherIndex, const MetricDimensionKey& eventKey,
-            const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-            const std::map<int, HashableDimensionKey>& statePrimaryKeys) override;
-
-private:
-    void onDumpReportLocked(const int64_t dumpTimeNs,
-                            const bool include_current_partial_bucket,
-                            const bool erase_data,
-                            const DumpLatency dumpLatency,
-                            std::set<string> *str_set,
-                            android::util::ProtoOutputStream* protoOutput) override;
-    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
-
-    // Internal interface to handle condition change.
-    void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
-
-    // Internal interface to handle active state change.
-    void onActiveStateChangedLocked(const int64_t& eventTimeNs) override;
-
-    // Internal interface to handle sliced condition change.
-    void onSlicedConditionMayChangeLocked(bool overallCondition, const int64_t eventTime) override;
-
-    // Internal function to calculate the current used bytes.
-    size_t byteSizeLocked() const override;
-
-    void dumpStatesLocked(FILE* out, bool verbose) const override;
-
-    void dropDataLocked(const int64_t dropTimeNs) override;
-
-    // Util function to flush the old packet.
-    void flushIfNeededLocked(const int64_t& eventTime) override;
-
-    void flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                  const int64_t& nextBucketStartTimeNs) override;
-
-    void prepareFirstBucketLocked() override;
-
-    void pullAndMatchEventsLocked(const int64_t timestampNs);
-
-    const int mWhatMatcherIndex;
-
-    sp<EventMatcherWizard> mEventMatcherWizard;
-
-    sp<StatsPullerManager> mPullerManager;
-    // tagId for pulled data. -1 if this is not pulled
-    const int mPullTagId;
-
-    // tagId for atoms that trigger the pulling, if any
-    const int mTriggerAtomId;
-
-    // tagId for output atom
-    const int mAtomId;
-
-    // if this is pulled metric
-    const bool mIsPulled;
-
-    // Save the past buckets and we can clear when the StatsLogReport is dumped.
-    std::unordered_map<MetricDimensionKey, std::vector<GaugeBucket>> mPastBuckets;
-
-    // The current partial bucket.
-    std::shared_ptr<DimToGaugeAtomsMap> mCurrentSlicedBucket;
-
-    // The current full bucket for anomaly detection. This is updated to the latest value seen for
-    // this slice (ie, for partial buckets, we use the last partial bucket in this full bucket).
-    std::shared_ptr<DimToValMap> mCurrentSlicedBucketForAnomaly;
-
-    const int64_t mMinBucketSizeNs;
-
-    // Translate Atom based bucket to single numeric value bucket for anomaly and updates the map
-    // for each slice with the latest value.
-    void updateCurrentSlicedBucketForAnomaly();
-
-    // Allowlist of fields to report. Empty means all are reported.
-    std::vector<Matcher> mFieldMatchers;
-
-    GaugeMetric::SamplingType mSamplingType;
-
-    const int64_t mMaxPullDelayNs;
-
-    // apply an allowlist on the original input
-    std::shared_ptr<vector<FieldValue>> getGaugeFields(const LogEvent& event);
-
-    // Util function to check whether the specified dimension hits the guardrail.
-    bool hitGuardRailLocked(const MetricDimensionKey& newKey);
-
-    static const size_t kBucketSize = sizeof(GaugeBucket{});
-
-    const size_t mDimensionSoftLimit;
-
-    const size_t mDimensionHardLimit;
-
-    const size_t mGaugeAtomsPerDimensionLimit;
-
-    const bool mSplitBucketForAppUpgrade;
-
-    FRIEND_TEST(GaugeMetricProducerTest, TestPulledEventsWithCondition);
-    FRIEND_TEST(GaugeMetricProducerTest, TestPulledEventsWithSlicedCondition);
-    FRIEND_TEST(GaugeMetricProducerTest, TestPulledEventsNoCondition);
-    FRIEND_TEST(GaugeMetricProducerTest, TestPulledWithAppUpgradeDisabled);
-    FRIEND_TEST(GaugeMetricProducerTest, TestPulledEventsAnomalyDetection);
-    FRIEND_TEST(GaugeMetricProducerTest, TestFirstBucket);
-    FRIEND_TEST(GaugeMetricProducerTest, TestPullOnTrigger);
-    FRIEND_TEST(GaugeMetricProducerTest, TestRemoveDimensionInOutput);
-
-    FRIEND_TEST(GaugeMetricProducerTest_PartialBucket, TestPushedEvents);
-    FRIEND_TEST(GaugeMetricProducerTest_PartialBucket, TestPulled);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/MetricProducer.cpp b/cmds/statsd/src/metrics/MetricProducer.cpp
deleted file mode 100644
index fe143e4..0000000
--- a/cmds/statsd/src/metrics/MetricProducer.cpp
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "MetricProducer.h"
-
-#include "../guardrail/StatsdStats.h"
-#include "state/StateTracker.h"
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_ENUM;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::ProtoOutputStream;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-
-// for ActiveMetric
-const int FIELD_ID_ACTIVE_METRIC_ID = 1;
-const int FIELD_ID_ACTIVE_METRIC_ACTIVATION = 2;
-
-// for ActiveEventActivation
-const int FIELD_ID_ACTIVE_EVENT_ACTIVATION_ATOM_MATCHER_INDEX = 1;
-const int FIELD_ID_ACTIVE_EVENT_ACTIVATION_REMAINING_TTL_NANOS = 2;
-const int FIELD_ID_ACTIVE_EVENT_ACTIVATION_STATE = 3;
-
-MetricProducer::MetricProducer(
-        const int64_t& metricId, const ConfigKey& key, const int64_t timeBaseNs,
-        const int conditionIndex, const vector<ConditionState>& initialConditionCache,
-        const sp<ConditionWizard>& wizard,
-        const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap,
-        const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>&
-                eventDeactivationMap,
-        const vector<int>& slicedStateAtoms,
-        const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap)
-    : mMetricId(metricId),
-      mConfigKey(key),
-      mTimeBaseNs(timeBaseNs),
-      mCurrentBucketStartTimeNs(timeBaseNs),
-      mCurrentBucketNum(0),
-      mCondition(initialCondition(conditionIndex, initialConditionCache)),
-      mConditionTrackerIndex(conditionIndex),
-      mConditionSliced(false),
-      mWizard(wizard),
-      mContainANYPositionInDimensionsInWhat(false),
-      mSliceByPositionALL(false),
-      mHasLinksToAllConditionDimensionsInTracker(false),
-      mEventActivationMap(eventActivationMap),
-      mEventDeactivationMap(eventDeactivationMap),
-      mIsActive(mEventActivationMap.empty()),
-      mSlicedStateAtoms(slicedStateAtoms),
-      mStateGroupMap(stateGroupMap) {
-}
-
-void MetricProducer::onMatchedLogEventLocked(const size_t matcherIndex, const LogEvent& event) {
-    if (!mIsActive) {
-        return;
-    }
-    int64_t eventTimeNs = event.GetElapsedTimestampNs();
-    // this is old event, maybe statsd restarted?
-    if (eventTimeNs < mTimeBaseNs) {
-        return;
-    }
-
-    bool condition;
-    ConditionKey conditionKey;
-    if (mConditionSliced) {
-        for (const auto& link : mMetric2ConditionLinks) {
-            getDimensionForCondition(event.getValues(), link, &conditionKey[link.conditionId]);
-        }
-        auto conditionState =
-            mWizard->query(mConditionTrackerIndex, conditionKey,
-                           !mHasLinksToAllConditionDimensionsInTracker);
-        condition = (conditionState == ConditionState::kTrue);
-    } else {
-        // TODO: The unknown condition state is not handled here, we should fix it.
-        condition = mCondition == ConditionState::kTrue;
-    }
-
-    // Stores atom id to primary key pairs for each state atom that the metric is
-    // sliced by.
-    std::map<int32_t, HashableDimensionKey> statePrimaryKeys;
-
-    // For states with primary fields, use MetricStateLinks to get the primary
-    // field values from the log event. These values will form a primary key
-    // that will be used to query StateTracker for the correct state value.
-    for (const auto& stateLink : mMetric2StateLinks) {
-        getDimensionForState(event.getValues(), stateLink,
-                             &statePrimaryKeys[stateLink.stateAtomId]);
-    }
-
-    // For each sliced state, query StateTracker for the state value using
-    // either the primary key from the previous step or the DEFAULT_DIMENSION_KEY.
-    //
-    // Expected functionality: for any case where the MetricStateLinks are
-    // initialized incorrectly (ex. # of state links != # of primary fields, no
-    // links are provided for a state with primary fields, links are provided
-    // in the wrong order, etc.), StateTracker will simply return kStateUnknown
-    // when queried using an incorrect key.
-    HashableDimensionKey stateValuesKey;
-    for (auto atomId : mSlicedStateAtoms) {
-        FieldValue value;
-        if (statePrimaryKeys.find(atomId) != statePrimaryKeys.end()) {
-            // found a primary key for this state, query using the key
-            queryStateValue(atomId, statePrimaryKeys[atomId], &value);
-        } else {
-            // if no MetricStateLinks exist for this state atom,
-            // query using the default dimension key (empty HashableDimensionKey)
-            queryStateValue(atomId, DEFAULT_DIMENSION_KEY, &value);
-        }
-        mapStateValue(atomId, &value);
-        stateValuesKey.addValue(value);
-    }
-
-    HashableDimensionKey dimensionInWhat;
-    filterValues(mDimensionsInWhat, event.getValues(), &dimensionInWhat);
-    MetricDimensionKey metricKey(dimensionInWhat, stateValuesKey);
-    onMatchedLogEventInternalLocked(matcherIndex, metricKey, conditionKey, condition, event,
-                                    statePrimaryKeys);
-}
-
-bool MetricProducer::evaluateActiveStateLocked(int64_t elapsedTimestampNs) {
-    bool isActive = mEventActivationMap.empty();
-    for (auto& it : mEventActivationMap) {
-        if (it.second->state == ActivationState::kActive &&
-            elapsedTimestampNs > it.second->ttl_ns + it.second->start_ns) {
-            it.second->state = ActivationState::kNotActive;
-        }
-        if (it.second->state == ActivationState::kActive) {
-            isActive = true;
-        }
-    }
-    return isActive;
-}
-
-void MetricProducer::flushIfExpire(int64_t elapsedTimestampNs) {
-    std::lock_guard<std::mutex> lock(mMutex);
-    if (!mIsActive) {
-        return;
-    }
-    mIsActive = evaluateActiveStateLocked(elapsedTimestampNs);
-    if (!mIsActive) {
-        onActiveStateChangedLocked(elapsedTimestampNs);
-    }
-}
-
-void MetricProducer::activateLocked(int activationTrackerIndex, int64_t elapsedTimestampNs) {
-    auto it = mEventActivationMap.find(activationTrackerIndex);
-    if (it == mEventActivationMap.end()) {
-        return;
-    }
-    auto& activation = it->second;
-    if (ACTIVATE_ON_BOOT == activation->activationType) {
-        if (ActivationState::kNotActive == activation->state) {
-            activation->state = ActivationState::kActiveOnBoot;
-        }
-        // If the Activation is already active or set to kActiveOnBoot, do nothing.
-        return;
-    }
-    activation->start_ns = elapsedTimestampNs;
-    activation->state = ActivationState::kActive;
-    bool oldActiveState = mIsActive;
-    mIsActive = true;
-    if (!oldActiveState) { // Metric went from not active to active.
-        onActiveStateChangedLocked(elapsedTimestampNs);
-    }
-}
-
-void MetricProducer::cancelEventActivationLocked(int deactivationTrackerIndex) {
-    auto it = mEventDeactivationMap.find(deactivationTrackerIndex);
-    if (it == mEventDeactivationMap.end()) {
-        return;
-    }
-    for (auto activationToCancelIt : it->second)  {
-        activationToCancelIt->state = ActivationState::kNotActive;
-    }
-}
-
-void MetricProducer::loadActiveMetricLocked(const ActiveMetric& activeMetric,
-                                            int64_t currentTimeNs) {
-    if (mEventActivationMap.size() == 0) {
-        return;
-    }
-    for (int i = 0; i < activeMetric.activation_size(); i++) {
-        const auto& activeEventActivation = activeMetric.activation(i);
-        auto it = mEventActivationMap.find(activeEventActivation.atom_matcher_index());
-        if (it == mEventActivationMap.end()) {
-            ALOGE("Saved event activation not found");
-            continue;
-        }
-        auto& activation = it->second;
-        // If the event activation does not have a state, assume it is active.
-        if (!activeEventActivation.has_state() ||
-                activeEventActivation.state() == ActiveEventActivation::ACTIVE) {
-            // We don't want to change the ttl for future activations, so we set the start_ns
-            // such that start_ns + ttl_ns == currentTimeNs + remaining_ttl_nanos
-            activation->start_ns =
-                currentTimeNs + activeEventActivation.remaining_ttl_nanos() - activation->ttl_ns;
-            activation->state = ActivationState::kActive;
-            mIsActive = true;
-        } else if (activeEventActivation.state() == ActiveEventActivation::ACTIVATE_ON_BOOT) {
-            activation->state = ActivationState::kActiveOnBoot;
-        }
-    }
-}
-
-void MetricProducer::writeActiveMetricToProtoOutputStream(
-        int64_t currentTimeNs, const DumpReportReason reason, ProtoOutputStream* proto) {
-    proto->write(FIELD_TYPE_INT64 | FIELD_ID_ACTIVE_METRIC_ID, (long long)mMetricId);
-    for (auto& it : mEventActivationMap) {
-        const int atom_matcher_index = it.first;
-        const std::shared_ptr<Activation>& activation = it.second;
-
-        if (ActivationState::kNotActive == activation->state ||
-                (ActivationState::kActive == activation->state &&
-                 activation->start_ns + activation->ttl_ns < currentTimeNs)) {
-            continue;
-        }
-
-        const uint64_t activationToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                FIELD_ID_ACTIVE_METRIC_ACTIVATION);
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_ACTIVE_EVENT_ACTIVATION_ATOM_MATCHER_INDEX,
-                atom_matcher_index);
-        if (ActivationState::kActive == activation->state) {
-            const int64_t remainingTtlNs =
-                    activation->start_ns + activation->ttl_ns - currentTimeNs;
-            proto->write(FIELD_TYPE_INT64 | FIELD_ID_ACTIVE_EVENT_ACTIVATION_REMAINING_TTL_NANOS,
-                    (long long)remainingTtlNs);
-            proto->write(FIELD_TYPE_ENUM | FIELD_ID_ACTIVE_EVENT_ACTIVATION_STATE,
-                    ActiveEventActivation::ACTIVE);
-
-        } else if (ActivationState::kActiveOnBoot == activation->state) {
-            if (reason == DEVICE_SHUTDOWN || reason == TERMINATION_SIGNAL_RECEIVED) {
-                proto->write(
-                        FIELD_TYPE_INT64 | FIELD_ID_ACTIVE_EVENT_ACTIVATION_REMAINING_TTL_NANOS,
-                        (long long)activation->ttl_ns);
-                proto->write(FIELD_TYPE_ENUM | FIELD_ID_ACTIVE_EVENT_ACTIVATION_STATE,
-                                    ActiveEventActivation::ACTIVE);
-            } else if (reason == STATSCOMPANION_DIED) {
-                // We are saving because of system server death, not due to a device shutdown.
-                // Next time we load, we do not want to activate metrics that activate on boot.
-                proto->write(FIELD_TYPE_ENUM | FIELD_ID_ACTIVE_EVENT_ACTIVATION_STATE,
-                                                    ActiveEventActivation::ACTIVATE_ON_BOOT);
-            }
-        }
-        proto->end(activationToken);
-    }
-}
-
-void MetricProducer::queryStateValue(const int32_t atomId, const HashableDimensionKey& queryKey,
-                                     FieldValue* value) {
-    if (!StateManager::getInstance().getStateValue(atomId, queryKey, value)) {
-        value->mValue = Value(StateTracker::kStateUnknown);
-        value->mField.setTag(atomId);
-        ALOGW("StateTracker not found for state atom %d", atomId);
-        return;
-    }
-}
-
-void MetricProducer::mapStateValue(const int32_t atomId, FieldValue* value) {
-    // check if there is a state map for this atom
-    auto atomIt = mStateGroupMap.find(atomId);
-    if (atomIt == mStateGroupMap.end()) {
-        return;
-    }
-    auto valueIt = atomIt->second.find(value->mValue.int_value);
-    if (valueIt == atomIt->second.end()) {
-        // state map exists, but value was not put in a state group
-        // so set mValue to kStateUnknown
-        // TODO(tsaichristine): handle incomplete state maps
-        value->mValue.setInt(StateTracker::kStateUnknown);
-    } else {
-        // set mValue to group_id
-        value->mValue.setLong(valueIt->second);
-    }
-}
-
-HashableDimensionKey MetricProducer::getUnknownStateKey() {
-    HashableDimensionKey stateKey;
-    for (auto atom : mSlicedStateAtoms) {
-        FieldValue fieldValue;
-        fieldValue.mField.setTag(atom);
-        fieldValue.mValue.setInt(StateTracker::kStateUnknown);
-        stateKey.addValue(fieldValue);
-    }
-    return stateKey;
-}
-
-DropEvent MetricProducer::buildDropEvent(const int64_t dropTimeNs, const BucketDropReason reason) {
-    DropEvent event;
-    event.reason = reason;
-    event.dropTimeNs = dropTimeNs;
-    return event;
-}
-
-bool MetricProducer::maxDropEventsReached() {
-    return mCurrentSkippedBucket.dropEvents.size() >= StatsdStats::kMaxLoggedBucketDropEvents;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/MetricProducer.h b/cmds/statsd/src/metrics/MetricProducer.h
deleted file mode 100644
index be4cd67..0000000
--- a/cmds/statsd/src/metrics/MetricProducer.h
+++ /dev/null
@@ -1,508 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef METRIC_PRODUCER_H
-#define METRIC_PRODUCER_H
-
-#include <frameworks/base/cmds/statsd/src/active_config_list.pb.h>
-#include <utils/RefBase.h>
-
-#include <unordered_map>
-
-#include "HashableDimensionKey.h"
-#include "anomaly/AnomalyTracker.h"
-#include "condition/ConditionWizard.h"
-#include "config/ConfigKey.h"
-#include "matchers/matcher_util.h"
-#include "packages/PackageInfoListener.h"
-#include "state/StateListener.h"
-#include "state/StateManager.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Keep this in sync with DumpReportReason enum in stats_log.proto
-enum DumpReportReason {
-    DEVICE_SHUTDOWN = 1,
-    CONFIG_UPDATED = 2,
-    CONFIG_REMOVED = 3,
-    GET_DATA_CALLED = 4,
-    ADB_DUMP = 5,
-    CONFIG_RESET = 6,
-    STATSCOMPANION_DIED = 7,
-    TERMINATION_SIGNAL_RECEIVED = 8
-};
-
-// If the metric has no activation requirement, it will be active once the metric producer is
-// created.
-// If the metric needs to be activated by atoms, the metric producer will start
-// with kNotActive state, turn to kActive or kActiveOnBoot when the activation event arrives, become
-// kNotActive when it reaches the duration limit (timebomb). If the activation event arrives again
-// before or after it expires, the event producer will be re-activated and ttl will be reset.
-enum ActivationState {
-    kNotActive = 0,
-    kActive = 1,
-    kActiveOnBoot = 2,
-};
-
-enum DumpLatency {
-    // In some cases, we only have a short time range to do the dump, e.g. statsd is being killed.
-    // We might be able to return all the data in this mode. For instance, pull metrics might need
-    // to be pulled when the current bucket is requested.
-    FAST = 1,
-    // In other cases, it is fine for a dump to take more than a few milliseconds, e.g. config
-    // updates.
-    NO_TIME_CONSTRAINTS = 2
-};
-
-// Keep this in sync with BucketDropReason enum in stats_log.proto
-enum BucketDropReason {
-    // For ValueMetric, a bucket is dropped during a dump report request iff
-    // current bucket should be included, a pull is needed (pulled metric and
-    // condition is true), and we are under fast time constraints.
-    DUMP_REPORT_REQUESTED = 1,
-    EVENT_IN_WRONG_BUCKET = 2,
-    CONDITION_UNKNOWN = 3,
-    PULL_FAILED = 4,
-    PULL_DELAYED = 5,
-    DIMENSION_GUARDRAIL_REACHED = 6,
-    MULTIPLE_BUCKETS_SKIPPED = 7,
-    // Not an invalid bucket case, but the bucket is dropped.
-    BUCKET_TOO_SMALL = 8,
-    // Not an invalid bucket case, but the bucket is skipped.
-    NO_DATA = 9
-};
-
-struct Activation {
-    Activation(const ActivationType& activationType, const int64_t ttlNs)
-        : ttl_ns(ttlNs),
-          start_ns(0),
-          state(ActivationState::kNotActive),
-          activationType(activationType) {}
-
-    const int64_t ttl_ns;
-    int64_t start_ns;
-    ActivationState state;
-    const ActivationType activationType;
-};
-
-struct DropEvent {
-    // Reason for dropping the bucket and/or marking the bucket invalid.
-    BucketDropReason reason;
-    // The timestamp of the drop event.
-    int64_t dropTimeNs;
-};
-
-struct SkippedBucket {
-    // Start time of the dropped bucket.
-    int64_t bucketStartTimeNs;
-    // End time of the dropped bucket.
-    int64_t bucketEndTimeNs;
-    // List of events that invalidated this bucket.
-    std::vector<DropEvent> dropEvents;
-
-    void reset() {
-        bucketStartTimeNs = 0;
-        bucketEndTimeNs = 0;
-        dropEvents.clear();
-    }
-};
-
-// A MetricProducer is responsible for compute one single metrics, creating stats log report, and
-// writing the report to dropbox. MetricProducers should respond to package changes as required in
-// PackageInfoListener, but if none of the metrics are slicing by package name, then the update can
-// be a no-op.
-class MetricProducer : public virtual android::RefBase, public virtual StateListener {
-public:
-    MetricProducer(const int64_t& metricId, const ConfigKey& key, const int64_t timeBaseNs,
-                   const int conditionIndex, const vector<ConditionState>& initialConditionCache,
-                   const sp<ConditionWizard>& wizard,
-                   const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap,
-                   const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>&
-                           eventDeactivationMap,
-                   const vector<int>& slicedStateAtoms,
-                   const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap);
-
-    virtual ~MetricProducer(){};
-
-    ConditionState initialCondition(const int conditionIndex,
-                                    const vector<ConditionState>& initialConditionCache) const {
-        return conditionIndex >= 0 ? initialConditionCache[conditionIndex] : ConditionState::kTrue;
-    }
-
-    /**
-     * Force a partial bucket split on app upgrade
-     */
-    virtual void notifyAppUpgrade(const int64_t& eventTimeNs) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        flushLocked(eventTimeNs);
-    };
-
-    void notifyAppRemoved(const int64_t& eventTimeNs) {
-        // Force buckets to split on removal also.
-        notifyAppUpgrade(eventTimeNs);
-    };
-
-    /**
-     * Force a partial bucket split on boot complete.
-     */
-    virtual void onStatsdInitCompleted(const int64_t& eventTimeNs) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        flushLocked(eventTimeNs);
-    }
-    // Consume the parsed stats log entry that already matched the "what" of the metric.
-    void onMatchedLogEvent(const size_t matcherIndex, const LogEvent& event) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        onMatchedLogEventLocked(matcherIndex, event);
-    }
-
-    void onConditionChanged(const bool condition, const int64_t eventTime) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        onConditionChangedLocked(condition, eventTime);
-    }
-
-    void onSlicedConditionMayChange(bool overallCondition, const int64_t eventTime) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        onSlicedConditionMayChangeLocked(overallCondition, eventTime);
-    }
-
-    bool isConditionSliced() const {
-        std::lock_guard<std::mutex> lock(mMutex);
-        return mConditionSliced;
-    };
-
-    void onStateChanged(const int64_t eventTimeNs, const int32_t atomId,
-                        const HashableDimensionKey& primaryKey, const FieldValue& oldState,
-                        const FieldValue& newState){};
-
-    // Output the metrics data to [protoOutput]. All metrics reports end with the same timestamp.
-    // This method clears all the past buckets.
-    void onDumpReport(const int64_t dumpTimeNs,
-                      const bool include_current_partial_bucket,
-                      const bool erase_data,
-                      const DumpLatency dumpLatency,
-                      std::set<string> *str_set,
-                      android::util::ProtoOutputStream* protoOutput) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        return onDumpReportLocked(dumpTimeNs, include_current_partial_bucket, erase_data,
-                dumpLatency, str_set, protoOutput);
-    }
-
-    void clearPastBuckets(const int64_t dumpTimeNs) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        return clearPastBucketsLocked(dumpTimeNs);
-    }
-
-    void prepareFirstBucket() {
-        std::lock_guard<std::mutex> lock(mMutex);
-        prepareFirstBucketLocked();
-    }
-
-    // Returns the memory in bytes currently used to store this metric's data. Does not change
-    // state.
-    size_t byteSize() const {
-        std::lock_guard<std::mutex> lock(mMutex);
-        return byteSizeLocked();
-    }
-
-    void dumpStates(FILE* out, bool verbose) const {
-        std::lock_guard<std::mutex> lock(mMutex);
-        dumpStatesLocked(out, verbose);
-    }
-
-    // Let MetricProducer drop in-memory data to save memory.
-    // We still need to keep future data valid and anomaly tracking work, which means we will
-    // have to flush old data, informing anomaly trackers then safely drop old data.
-    // We still keep current bucket data for future metrics' validity.
-    void dropData(const int64_t dropTimeNs) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        dropDataLocked(dropTimeNs);
-    }
-
-    void loadActiveMetric(const ActiveMetric& activeMetric, int64_t currentTimeNs) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        loadActiveMetricLocked(activeMetric, currentTimeNs);
-    }
-
-    void activate(int activationTrackerIndex, int64_t elapsedTimestampNs) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        activateLocked(activationTrackerIndex, elapsedTimestampNs);
-    }
-
-    void cancelEventActivation(int deactivationTrackerIndex) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        cancelEventActivationLocked(deactivationTrackerIndex);
-    }
-
-    bool isActive() const {
-        std::lock_guard<std::mutex> lock(mMutex);
-        return isActiveLocked();
-    }
-
-    void flushIfExpire(int64_t elapsedTimestampNs);
-
-    void writeActiveMetricToProtoOutputStream(
-            int64_t currentTimeNs, const DumpReportReason reason, ProtoOutputStream* proto);
-
-    // Start: getters/setters
-    inline const int64_t& getMetricId() const {
-        return mMetricId;
-    }
-
-    // For test only.
-    inline int64_t getCurrentBucketNum() const {
-        return mCurrentBucketNum;
-    }
-
-    int64_t getBucketSizeInNs() const {
-        std::lock_guard<std::mutex> lock(mMutex);
-        return mBucketSizeNs;
-    }
-
-    inline const std::vector<int> getSlicedStateAtoms() {
-        std::lock_guard<std::mutex> lock(mMutex);
-        return mSlicedStateAtoms;
-    }
-
-    /* If alert is valid, adds an AnomalyTracker and returns it. If invalid, returns nullptr. */
-    virtual sp<AnomalyTracker> addAnomalyTracker(const Alert &alert,
-                                                 const sp<AlarmMonitor>& anomalyAlarmMonitor) {
-        std::lock_guard<std::mutex> lock(mMutex);
-        sp<AnomalyTracker> anomalyTracker = new AnomalyTracker(alert, mConfigKey);
-        if (anomalyTracker != nullptr) {
-            mAnomalyTrackers.push_back(anomalyTracker);
-        }
-        return anomalyTracker;
-    }
-    // End: getters/setters
-protected:
-    /**
-     * Flushes the current bucket if the eventTime is after the current bucket's end time.
-     */
-    virtual void flushIfNeededLocked(const int64_t& eventTime){};
-
-    /**
-     * For metrics that aggregate (ie, every metric producer except for EventMetricProducer),
-     * we need to be able to flush the current buckets on demand (ie, end the current bucket and
-     * start new bucket). If this function is called when eventTimeNs is greater than the current
-     * bucket's end timestamp, than we flush up to the end of the latest full bucket; otherwise,
-     * we assume that we want to flush a partial bucket. The bucket start timestamp and bucket
-     * number are not changed by this function. This method should only be called by
-     * flushIfNeededLocked or flushLocked or the app upgrade handler; the caller MUST update the
-     * bucket timestamp and bucket number as needed.
-     */
-    virtual void flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                          const int64_t& nextBucketStartTimeNs) {};
-
-    /**
-     * Flushes all the data including the current partial bucket.
-     */
-    virtual void flushLocked(const int64_t& eventTimeNs) {
-        flushIfNeededLocked(eventTimeNs);
-        flushCurrentBucketLocked(eventTimeNs, eventTimeNs);
-    };
-
-    /*
-     * Individual metrics can implement their own business logic here. All pre-processing is done.
-     *
-     * [matcherIndex]: the index of the matcher which matched this event. This is interesting to
-     *                 DurationMetric, because it has start/stop/stop_all 3 matchers.
-     * [eventKey]: the extracted dimension key for the final output. if the metric doesn't have
-     *             dimensions, it will be DEFAULT_DIMENSION_KEY
-     * [conditionKey]: the keys of conditions which should be used to query the condition for this
-     *                 target event (from MetricConditionLink). This is passed to individual metrics
-     *                 because DurationMetric needs it to be cached.
-     * [condition]: whether condition is met. If condition is sliced, this is the result coming from
-     *              query with ConditionWizard; If condition is not sliced, this is the
-     *              nonSlicedCondition.
-     * [event]: the log event, just in case the metric needs its data, e.g., EventMetric.
-     */
-    virtual void onMatchedLogEventInternalLocked(
-            const size_t matcherIndex, const MetricDimensionKey& eventKey,
-            const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-            const map<int, HashableDimensionKey>& statePrimaryKeys) = 0;
-
-    // Consume the parsed stats log entry that already matched the "what" of the metric.
-    virtual void onMatchedLogEventLocked(const size_t matcherIndex, const LogEvent& event);
-    virtual void onConditionChangedLocked(const bool condition, const int64_t eventTime) = 0;
-    virtual void onSlicedConditionMayChangeLocked(bool overallCondition,
-                                                  const int64_t eventTime) = 0;
-    virtual void onDumpReportLocked(const int64_t dumpTimeNs,
-                                    const bool include_current_partial_bucket,
-                                    const bool erase_data,
-                                    const DumpLatency dumpLatency,
-                                    std::set<string> *str_set,
-                                    android::util::ProtoOutputStream* protoOutput) = 0;
-    virtual void clearPastBucketsLocked(const int64_t dumpTimeNs) = 0;
-    virtual void prepareFirstBucketLocked(){};
-    virtual size_t byteSizeLocked() const = 0;
-    virtual void dumpStatesLocked(FILE* out, bool verbose) const = 0;
-    virtual void dropDataLocked(const int64_t dropTimeNs) = 0;
-    void loadActiveMetricLocked(const ActiveMetric& activeMetric, int64_t currentTimeNs);
-    void activateLocked(int activationTrackerIndex, int64_t elapsedTimestampNs);
-    void cancelEventActivationLocked(int deactivationTrackerIndex);
-
-    bool evaluateActiveStateLocked(int64_t elapsedTimestampNs);
-
-    virtual void onActiveStateChangedLocked(const int64_t& eventTimeNs) {
-        if (!mIsActive) {
-            flushLocked(eventTimeNs);
-        }
-    }
-
-    inline bool isActiveLocked() const {
-        return mIsActive;
-    }
-
-    // Convenience to compute the current bucket's end time, which is always aligned with the
-    // start time of the metric.
-    int64_t getCurrentBucketEndTimeNs() const {
-        return mTimeBaseNs + (mCurrentBucketNum + 1) * mBucketSizeNs;
-    }
-
-    int64_t getBucketNumFromEndTimeNs(const int64_t endNs) {
-        return (endNs - mTimeBaseNs) / mBucketSizeNs - 1;
-    }
-
-    // Query StateManager for original state value using the queryKey.
-    // The field and value are output.
-    void queryStateValue(const int32_t atomId, const HashableDimensionKey& queryKey,
-                         FieldValue* value);
-
-    // If a state map exists for the given atom, replace the original state
-    // value with the group id mapped to the value.
-    // If no state map exists, keep the original state value.
-    void mapStateValue(const int32_t atomId, FieldValue* value);
-
-    // Returns a HashableDimensionKey with unknown state value for each state
-    // atom.
-    HashableDimensionKey getUnknownStateKey();
-
-    DropEvent buildDropEvent(const int64_t dropTimeNs, const BucketDropReason reason);
-
-    // Returns true if the number of drop events in the current bucket has
-    // exceeded the maximum number allowed, which is currently capped at 10.
-    bool maxDropEventsReached();
-
-    const int64_t mMetricId;
-
-    const ConfigKey mConfigKey;
-
-    // The time when this metric producer was first created. The end time for the current bucket
-    // can be computed from this based on mCurrentBucketNum.
-    int64_t mTimeBaseNs;
-
-    // Start time may not be aligned with the start of statsd if there is an app upgrade in the
-    // middle of a bucket.
-    int64_t mCurrentBucketStartTimeNs;
-
-    // Used by anomaly detector to track which bucket we are in. This is not sent with the produced
-    // report.
-    int64_t mCurrentBucketNum;
-
-    int64_t mBucketSizeNs;
-
-    ConditionState mCondition;
-
-    int mConditionTrackerIndex;
-
-    bool mConditionSliced;
-
-    sp<ConditionWizard> mWizard;
-
-    bool mContainANYPositionInDimensionsInWhat;
-
-    bool mSliceByPositionALL;
-
-    vector<Matcher> mDimensionsInWhat;  // The dimensions_in_what defined in statsd_config
-
-    // True iff the metric to condition links cover all dimension fields in the condition tracker.
-    // This field is always false for combinational condition trackers.
-    bool mHasLinksToAllConditionDimensionsInTracker;
-
-    std::vector<Metric2Condition> mMetric2ConditionLinks;
-
-    std::vector<sp<AnomalyTracker>> mAnomalyTrackers;
-
-    mutable std::mutex mMutex;
-
-    // When the metric producer has multiple activations, these activations are ORed to determine
-    // whether the metric producer is ready to generate metrics.
-    std::unordered_map<int, std::shared_ptr<Activation>> mEventActivationMap;
-
-    // Maps index of atom matcher for deactivation to a list of Activation structs.
-    std::unordered_map<int, std::vector<std::shared_ptr<Activation>>> mEventDeactivationMap;
-
-    bool mIsActive;
-
-    // The slice_by_state atom ids defined in statsd_config.
-    const std::vector<int32_t> mSlicedStateAtoms;
-
-    // Maps atom ids and state values to group_ids (<atom_id, <value, group_id>>).
-    const std::unordered_map<int32_t, std::unordered_map<int, int64_t>> mStateGroupMap;
-
-    // MetricStateLinks defined in statsd_config that link fields in the state
-    // atom to fields in the "what" atom.
-    std::vector<Metric2State> mMetric2StateLinks;
-
-    SkippedBucket mCurrentSkippedBucket;
-    // Buckets that were invalidated and had their data dropped.
-    std::vector<SkippedBucket> mSkippedBuckets;
-
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedState);
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedStateWithMap);
-    FRIEND_TEST(CountMetricE2eTest, TestMultipleSlicedStates);
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedStateWithPrimaryFields);
-    FRIEND_TEST(CountMetricE2eTest, TestInitialConditionChanges);
-
-    FRIEND_TEST(DurationMetricE2eTest, TestOneBucket);
-    FRIEND_TEST(DurationMetricE2eTest, TestTwoBuckets);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithActivation);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithActivationAndSlicedCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedState);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithConditionAndSlicedState);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedStateMapped);
-    FRIEND_TEST(DurationMetricE2eTest, TestSlicedStatePrimaryFieldsNotSubsetDimInWhat);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedStatePrimaryFieldsSubset);
-
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetric);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithOneDeactivation);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithTwoDeactivations);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithSameDeactivation);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithTwoMetricsTwoDeactivations);
-
-    FRIEND_TEST(StatsLogProcessorTest, TestActiveConfigMetricDiskWriteRead);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationOnBoot);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationOnBootMultipleActivations);
-    FRIEND_TEST(StatsLogProcessorTest,
-            TestActivationOnBootMultipleActivationsDifferentActivationTypes);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationsPersistAcrossSystemServerRestart);
-
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithDimensions);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithIncorrectDimensions);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitialConditionChanges);
-
-    FRIEND_TEST(MetricsManagerTest, TestInitialConditions);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#endif  // METRIC_PRODUCER_H
diff --git a/cmds/statsd/src/metrics/MetricsManager.cpp b/cmds/statsd/src/metrics/MetricsManager.cpp
deleted file mode 100644
index 2d5aa56..0000000
--- a/cmds/statsd/src/metrics/MetricsManager.cpp
+++ /dev/null
@@ -1,695 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "MetricsManager.h"
-
-#include <private/android_filesystem_config.h>
-
-#include "CountMetricProducer.h"
-#include "condition/CombinationConditionTracker.h"
-#include "condition/SimpleConditionTracker.h"
-#include "guardrail/StatsdStats.h"
-#include "matchers/CombinationLogMatchingTracker.h"
-#include "matchers/SimpleLogMatchingTracker.h"
-#include "metrics_manager_util.h"
-#include "state/StateManager.h"
-#include "stats_log_util.h"
-#include "stats_util.h"
-#include "statslog_statsd.h"
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::ProtoOutputStream;
-
-using std::set;
-using std::string;
-using std::vector;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const int FIELD_ID_METRICS = 1;
-const int FIELD_ID_ANNOTATIONS = 7;
-const int FIELD_ID_ANNOTATIONS_INT64 = 1;
-const int FIELD_ID_ANNOTATIONS_INT32 = 2;
-
-// for ActiveConfig
-const int FIELD_ID_ACTIVE_CONFIG_ID = 1;
-const int FIELD_ID_ACTIVE_CONFIG_UID = 2;
-const int FIELD_ID_ACTIVE_CONFIG_METRIC = 3;
-
-MetricsManager::MetricsManager(const ConfigKey& key, const StatsdConfig& config,
-                               const int64_t timeBaseNs, const int64_t currentTimeNs,
-                               const sp<UidMap>& uidMap,
-                               const sp<StatsPullerManager>& pullerManager,
-                               const sp<AlarmMonitor>& anomalyAlarmMonitor,
-                               const sp<AlarmMonitor>& periodicAlarmMonitor)
-    : mConfigKey(key),
-      mUidMap(uidMap),
-      mTtlNs(config.has_ttl_in_seconds() ? config.ttl_in_seconds() * NS_PER_SEC : -1),
-      mTtlEndNs(-1),
-      mLastReportTimeNs(currentTimeNs),
-      mLastReportWallClockNs(getWallClockNs()),
-      mPullerManager(pullerManager),
-      mWhitelistedAtomIds(config.whitelisted_atom_ids().begin(),
-                          config.whitelisted_atom_ids().end()),
-      mShouldPersistHistory(config.persist_locally()) {
-    // Init the ttl end timestamp.
-    refreshTtl(timeBaseNs);
-
-    mConfigValid = initStatsdConfig(
-            key, config, *uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor,
-            timeBaseNs, currentTimeNs, mTagIds, mAllAtomMatchers, mAllConditionTrackers,
-            mAllMetricProducers, mAllAnomalyTrackers, mAllPeriodicAlarmTrackers,
-            mConditionToMetricMap, mTrackerToMetricMap, mTrackerToConditionMap,
-            mActivationAtomTrackerToMetricMap, mDeactivationAtomTrackerToMetricMap,
-            mAlertTrackerMap, mMetricIndexesWithActivation, mNoReportMetricIds);
-
-    mHashStringsInReport = config.hash_strings_in_metric_report();
-    mVersionStringsInReport = config.version_strings_in_metric_report();
-    mInstallerInReport = config.installer_in_metric_report();
-
-    // Init allowed pushed atom uids.
-    if (config.allowed_log_source_size() == 0) {
-        mConfigValid = false;
-        ALOGE("Log source allowlist is empty! This config won't get any data. Suggest adding at "
-                      "least AID_SYSTEM and AID_STATSD to the allowed_log_source field.");
-    } else {
-        for (const auto& source : config.allowed_log_source()) {
-            auto it = UidMap::sAidToUidMapping.find(source);
-            if (it != UidMap::sAidToUidMapping.end()) {
-                mAllowedUid.push_back(it->second);
-            } else {
-                mAllowedPkg.push_back(source);
-            }
-        }
-
-        if (mAllowedUid.size() + mAllowedPkg.size() > StatsdStats::kMaxLogSourceCount) {
-            ALOGE("Too many log sources. This is likely to be an error in the config.");
-            mConfigValid = false;
-        } else {
-            initLogSourceWhiteList();
-        }
-    }
-
-    // Init default allowed pull atom uids.
-    int numPullPackages = 0;
-    for (const string& pullSource : config.default_pull_packages()) {
-        auto it = UidMap::sAidToUidMapping.find(pullSource);
-        if (it != UidMap::sAidToUidMapping.end()) {
-            numPullPackages++;
-            mDefaultPullUids.insert(it->second);
-        } else {
-            ALOGE("Default pull atom packages must be in sAidToUidMapping");
-            mConfigValid = false;
-        }
-    }
-    // Init per-atom pull atom packages.
-    for (const PullAtomPackages& pullAtomPackages : config.pull_atom_packages()) {
-        int32_t atomId = pullAtomPackages.atom_id();
-        for (const string& pullPackage : pullAtomPackages.packages()) {
-            numPullPackages++;
-            auto it = UidMap::sAidToUidMapping.find(pullPackage);
-            if (it != UidMap::sAidToUidMapping.end()) {
-                mPullAtomUids[atomId].insert(it->second);
-            } else {
-                mPullAtomPackages[atomId].insert(pullPackage);
-            }
-        }
-    }
-    if (numPullPackages > StatsdStats::kMaxPullAtomPackages) {
-        ALOGE("Too many sources in default_pull_packages and pull_atom_packages. This is likely to "
-              "be an error in the config");
-        mConfigValid = false;
-    } else {
-        initPullAtomSources();
-    }
-    mPullerManager->RegisterPullUidProvider(mConfigKey, this);
-
-    // Store the sub-configs used.
-    for (const auto& annotation : config.annotation()) {
-        mAnnotations.emplace_back(annotation.field_int64(), annotation.field_int32());
-    }
-
-    // Guardrail. Reject the config if it's too big.
-    if (mAllMetricProducers.size() > StatsdStats::kMaxMetricCountPerConfig ||
-        mAllConditionTrackers.size() > StatsdStats::kMaxConditionCountPerConfig ||
-        mAllAtomMatchers.size() > StatsdStats::kMaxMatcherCountPerConfig) {
-        ALOGE("This config is too big! Reject!");
-        mConfigValid = false;
-    }
-    if (mAllAnomalyTrackers.size() > StatsdStats::kMaxAlertCountPerConfig) {
-        ALOGE("This config has too many alerts! Reject!");
-        mConfigValid = false;
-    }
-
-    mIsAlwaysActive = (mMetricIndexesWithActivation.size() != mAllMetricProducers.size()) ||
-            (mAllMetricProducers.size() == 0);
-    bool isActive = mIsAlwaysActive;
-    for (int metric : mMetricIndexesWithActivation) {
-        isActive |= mAllMetricProducers[metric]->isActive();
-    }
-    mIsActive = isActive;
-    VLOG("mIsActive is initialized to %d", mIsActive)
-
-    // no matter whether this config is valid, log it in the stats.
-    StatsdStats::getInstance().noteConfigReceived(
-            key, mAllMetricProducers.size(), mAllConditionTrackers.size(), mAllAtomMatchers.size(),
-            mAllAnomalyTrackers.size(), mAnnotations, mConfigValid);
-    // Check active
-    for (const auto& metric : mAllMetricProducers) {
-        if (metric->isActive()) {
-            mIsActive = true;
-            break;
-        }
-    }
-}
-
-MetricsManager::~MetricsManager() {
-    for (auto it : mAllMetricProducers) {
-        for (int atomId : it->getSlicedStateAtoms()) {
-            StateManager::getInstance().unregisterListener(atomId, it);
-        }
-    }
-    mPullerManager->UnregisterPullUidProvider(mConfigKey, this);
-
-    VLOG("~MetricsManager()");
-}
-
-void MetricsManager::initLogSourceWhiteList() {
-    std::lock_guard<std::mutex> lock(mAllowedLogSourcesMutex);
-    mAllowedLogSources.clear();
-    mAllowedLogSources.insert(mAllowedUid.begin(), mAllowedUid.end());
-
-    for (const auto& pkg : mAllowedPkg) {
-        auto uids = mUidMap->getAppUid(pkg);
-        mAllowedLogSources.insert(uids.begin(), uids.end());
-    }
-    if (DEBUG) {
-        for (const auto& uid : mAllowedLogSources) {
-            VLOG("Allowed uid %d", uid);
-        }
-    }
-}
-
-void MetricsManager::initPullAtomSources() {
-    std::lock_guard<std::mutex> lock(mAllowedLogSourcesMutex);
-    mCombinedPullAtomUids.clear();
-    for (const auto& [atomId, uids] : mPullAtomUids) {
-        mCombinedPullAtomUids[atomId].insert(uids.begin(), uids.end());
-    }
-    for (const auto& [atomId, packages] : mPullAtomPackages) {
-        for (const string& pkg : packages) {
-            set<int32_t> uids = mUidMap->getAppUid(pkg);
-            mCombinedPullAtomUids[atomId].insert(uids.begin(), uids.end());
-        }
-    }
-}
-
-bool MetricsManager::isConfigValid() const {
-    return mConfigValid;
-}
-
-void MetricsManager::notifyAppUpgrade(const int64_t& eventTimeNs, const string& apk, const int uid,
-                                      const int64_t version) {
-    // Inform all metric producers.
-    for (const auto& it : mAllMetricProducers) {
-        it->notifyAppUpgrade(eventTimeNs);
-    }
-    // check if we care this package
-    if (std::find(mAllowedPkg.begin(), mAllowedPkg.end(), apk) != mAllowedPkg.end()) {
-        // We will re-initialize the whole list because we don't want to keep the multi mapping of
-        // UID<->pkg inside MetricsManager to reduce the memory usage.
-        initLogSourceWhiteList();
-    }
-
-    for (const auto& it : mPullAtomPackages) {
-        if (it.second.find(apk) != it.second.end()) {
-            initPullAtomSources();
-            return;
-        }
-    }
-}
-
-void MetricsManager::notifyAppRemoved(const int64_t& eventTimeNs, const string& apk,
-                                      const int uid) {
-    // Inform all metric producers.
-    for (const auto& it : mAllMetricProducers) {
-        it->notifyAppRemoved(eventTimeNs);
-    }
-    // check if we care this package
-    if (std::find(mAllowedPkg.begin(), mAllowedPkg.end(), apk) != mAllowedPkg.end()) {
-        // We will re-initialize the whole list because we don't want to keep the multi mapping of
-        // UID<->pkg inside MetricsManager to reduce the memory usage.
-        initLogSourceWhiteList();
-    }
-
-    for (const auto& it : mPullAtomPackages) {
-        if (it.second.find(apk) != it.second.end()) {
-            initPullAtomSources();
-            return;
-        }
-    }
-}
-
-void MetricsManager::onUidMapReceived(const int64_t& eventTimeNs) {
-    // Purposefully don't inform metric producers on a new snapshot
-    // because we don't need to flush partial buckets.
-    // This occurs if a new user is added/removed or statsd crashes.
-    initPullAtomSources();
-
-    if (mAllowedPkg.size() == 0) {
-        return;
-    }
-    initLogSourceWhiteList();
-}
-
-void MetricsManager::onStatsdInitCompleted(const int64_t& eventTimeNs) {
-    // Inform all metric producers.
-    for (const auto& it : mAllMetricProducers) {
-        it->onStatsdInitCompleted(eventTimeNs);
-    }
-}
-
-void MetricsManager::init() {
-    for (const auto& producer : mAllMetricProducers) {
-        producer->prepareFirstBucket();
-    }
-}
-
-vector<int32_t> MetricsManager::getPullAtomUids(int32_t atomId) {
-    std::lock_guard<std::mutex> lock(mAllowedLogSourcesMutex);
-    vector<int32_t> uids;
-    const auto& it = mCombinedPullAtomUids.find(atomId);
-    if (it != mCombinedPullAtomUids.end()) {
-        uids.insert(uids.end(), it->second.begin(), it->second.end());
-    }
-    uids.insert(uids.end(), mDefaultPullUids.begin(), mDefaultPullUids.end());
-    return uids;
-}
-
-void MetricsManager::dumpStates(FILE* out, bool verbose) {
-    fprintf(out, "ConfigKey %s, allowed source:", mConfigKey.ToString().c_str());
-    {
-        std::lock_guard<std::mutex> lock(mAllowedLogSourcesMutex);
-        for (const auto& source : mAllowedLogSources) {
-            fprintf(out, "%d ", source);
-        }
-    }
-    fprintf(out, "\n");
-    for (const auto& producer : mAllMetricProducers) {
-        producer->dumpStates(out, verbose);
-    }
-}
-
-void MetricsManager::dropData(const int64_t dropTimeNs) {
-    for (const auto& producer : mAllMetricProducers) {
-        producer->dropData(dropTimeNs);
-    }
-}
-
-void MetricsManager::onDumpReport(const int64_t dumpTimeStampNs,
-                                  const bool include_current_partial_bucket,
-                                  const bool erase_data,
-                                  const DumpLatency dumpLatency,
-                                  std::set<string> *str_set,
-                                  ProtoOutputStream* protoOutput) {
-    VLOG("=========================Metric Reports Start==========================");
-    // one StatsLogReport per MetricProduer
-    for (const auto& producer : mAllMetricProducers) {
-        if (mNoReportMetricIds.find(producer->getMetricId()) == mNoReportMetricIds.end()) {
-            uint64_t token = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_METRICS);
-            if (mHashStringsInReport) {
-                producer->onDumpReport(dumpTimeStampNs, include_current_partial_bucket, erase_data,
-                                       dumpLatency, str_set, protoOutput);
-            } else {
-                producer->onDumpReport(dumpTimeStampNs, include_current_partial_bucket, erase_data,
-                                       dumpLatency, nullptr, protoOutput);
-            }
-            protoOutput->end(token);
-        } else {
-            producer->clearPastBuckets(dumpTimeStampNs);
-        }
-    }
-    for (const auto& annotation : mAnnotations) {
-        uint64_t token = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                            FIELD_ID_ANNOTATIONS);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ANNOTATIONS_INT64,
-                           (long long)annotation.first);
-        protoOutput->write(FIELD_TYPE_INT32 | FIELD_ID_ANNOTATIONS_INT32, annotation.second);
-        protoOutput->end(token);
-    }
-
-    // Do not update the timestamps when data is not cleared to avoid timestamps from being
-    // misaligned.
-    if (erase_data) {
-        mLastReportTimeNs = dumpTimeStampNs;
-        mLastReportWallClockNs = getWallClockNs();
-    }
-    VLOG("=========================Metric Reports End==========================");
-}
-
-
-bool MetricsManager::checkLogCredentials(const LogEvent& event) {
-    if (mWhitelistedAtomIds.find(event.GetTagId()) != mWhitelistedAtomIds.end()) {
-        return true;
-    }
-    std::lock_guard<std::mutex> lock(mAllowedLogSourcesMutex);
-    if (mAllowedLogSources.find(event.GetUid()) == mAllowedLogSources.end()) {
-        VLOG("log source %d not on the whitelist", event.GetUid());
-        return false;
-    }
-    return true;
-}
-
-bool MetricsManager::eventSanityCheck(const LogEvent& event) {
-    if (event.GetTagId() == util::APP_BREADCRUMB_REPORTED) {
-        // Check that app breadcrumb reported fields are valid.
-        status_t err = NO_ERROR;
-
-        // Uid is 3rd from last field and must match the caller's uid,
-        // unless that caller is statsd itself (statsd is allowed to spoof uids).
-        long appHookUid = event.GetLong(event.size()-2, &err);
-        if (err != NO_ERROR) {
-            VLOG("APP_BREADCRUMB_REPORTED had error when parsing the uid");
-            return false;
-        }
-
-        // Because the uid within the LogEvent may have been mapped from
-        // isolated to host, map the loggerUid similarly before comparing.
-        int32_t loggerUid = mUidMap->getHostUidOrSelf(event.GetUid());
-        if (loggerUid != appHookUid && loggerUid != AID_STATSD) {
-            VLOG("APP_BREADCRUMB_REPORTED has invalid uid: claimed %ld but caller is %d",
-                 appHookUid, loggerUid);
-            return false;
-        }
-
-        // The state must be from 0,3. This part of code must be manually updated.
-        long appHookState = event.GetLong(event.size(), &err);
-        if (err != NO_ERROR) {
-            VLOG("APP_BREADCRUMB_REPORTED had error when parsing the state field");
-            return false;
-        } else if (appHookState < 0 || appHookState > 3) {
-            VLOG("APP_BREADCRUMB_REPORTED does not have valid state %ld", appHookState);
-            return false;
-        }
-    } else if (event.GetTagId() == util::DAVEY_OCCURRED) {
-        // Daveys can be logged from any app since they are logged in libs/hwui/JankTracker.cpp.
-        // Check that the davey duration is reasonable. Max length check is for privacy.
-        status_t err = NO_ERROR;
-
-        // Uid is the first field provided.
-        long jankUid = event.GetLong(1, &err);
-        if (err != NO_ERROR) {
-            VLOG("Davey occurred had error when parsing the uid");
-            return false;
-        }
-        int32_t loggerUid = event.GetUid();
-        if (loggerUid != jankUid && loggerUid != AID_STATSD) {
-            VLOG("DAVEY_OCCURRED has invalid uid: claimed %ld but caller is %d", jankUid,
-                 loggerUid);
-            return false;
-        }
-
-        long duration = event.GetLong(event.size(), &err);
-        if (err != NO_ERROR) {
-            VLOG("Davey occurred had error when parsing the duration");
-            return false;
-        } else if (duration > 100000) {
-            VLOG("Davey duration is unreasonably long: %ld", duration);
-            return false;
-        }
-    }
-
-    return true;
-}
-
-// Consume the stats log if it's interesting to this metric.
-void MetricsManager::onLogEvent(const LogEvent& event) {
-    if (!mConfigValid) {
-        return;
-    }
-
-    if (!checkLogCredentials(event)) {
-        return;
-    }
-
-    if (!eventSanityCheck(event)) {
-        return;
-    }
-
-    int tagId = event.GetTagId();
-    int64_t eventTimeNs = event.GetElapsedTimestampNs();
-
-    bool isActive = mIsAlwaysActive;
-
-    // Set of metrics that are still active after flushing.
-    unordered_set<int> activeMetricsIndices;
-
-    // Update state of all metrics w/ activation conditions as of eventTimeNs.
-    for (int metricIndex : mMetricIndexesWithActivation) {
-        const sp<MetricProducer>& metric = mAllMetricProducers[metricIndex];
-        metric->flushIfExpire(eventTimeNs);
-        if (metric->isActive()) {
-            // If this metric w/ activation condition is still active after
-            // flushing, remember it.
-            activeMetricsIndices.insert(metricIndex);
-        }
-    }
-
-    mIsActive = isActive || !activeMetricsIndices.empty();
-
-    if (mTagIds.find(tagId) == mTagIds.end()) {
-        // Not interesting...
-        return;
-    }
-
-    vector<MatchingState> matcherCache(mAllAtomMatchers.size(), MatchingState::kNotComputed);
-
-    // Evaluate all atom matchers.
-    for (auto& matcher : mAllAtomMatchers) {
-        matcher->onLogEvent(event, mAllAtomMatchers, matcherCache);
-    }
-
-    // Set of metrics that received an activation cancellation.
-    unordered_set<int> metricIndicesWithCanceledActivations;
-
-    // Determine which metric activations received a cancellation and cancel them.
-    for (const auto& it : mDeactivationAtomTrackerToMetricMap) {
-        if (matcherCache[it.first] == MatchingState::kMatched) {
-            for (int metricIndex : it.second) {
-                mAllMetricProducers[metricIndex]->cancelEventActivation(it.first);
-                metricIndicesWithCanceledActivations.insert(metricIndex);
-            }
-        }
-    }
-
-    // Determine whether any metrics are no longer active after cancelling metric activations.
-    for (const int metricIndex : metricIndicesWithCanceledActivations) {
-        const sp<MetricProducer>& metric = mAllMetricProducers[metricIndex];
-        metric->flushIfExpire(eventTimeNs);
-        if (!metric->isActive()) {
-            activeMetricsIndices.erase(metricIndex);
-        }
-    }
-
-    isActive |= !activeMetricsIndices.empty();
-
-
-    // Determine which metric activations should be turned on and turn them on
-    for (const auto& it : mActivationAtomTrackerToMetricMap) {
-        if (matcherCache[it.first] == MatchingState::kMatched) {
-            for (int metricIndex : it.second) {
-                mAllMetricProducers[metricIndex]->activate(it.first, eventTimeNs);
-                isActive |= mAllMetricProducers[metricIndex]->isActive();
-            }
-        }
-    }
-
-    mIsActive = isActive;
-
-    // A bitmap to see which ConditionTracker needs to be re-evaluated.
-    vector<bool> conditionToBeEvaluated(mAllConditionTrackers.size(), false);
-
-    for (const auto& pair : mTrackerToConditionMap) {
-        if (matcherCache[pair.first] == MatchingState::kMatched) {
-            const auto& conditionList = pair.second;
-            for (const int conditionIndex : conditionList) {
-                conditionToBeEvaluated[conditionIndex] = true;
-            }
-        }
-    }
-
-    vector<ConditionState> conditionCache(mAllConditionTrackers.size(),
-                                          ConditionState::kNotEvaluated);
-    // A bitmap to track if a condition has changed value.
-    vector<bool> changedCache(mAllConditionTrackers.size(), false);
-    for (size_t i = 0; i < mAllConditionTrackers.size(); i++) {
-        if (conditionToBeEvaluated[i] == false) {
-            continue;
-        }
-        sp<ConditionTracker>& condition = mAllConditionTrackers[i];
-        condition->evaluateCondition(event, matcherCache, mAllConditionTrackers, conditionCache,
-                                     changedCache);
-    }
-
-    for (size_t i = 0; i < mAllConditionTrackers.size(); i++) {
-        if (changedCache[i] == false) {
-            continue;
-        }
-        auto pair = mConditionToMetricMap.find(i);
-        if (pair != mConditionToMetricMap.end()) {
-            auto& metricList = pair->second;
-            for (auto metricIndex : metricList) {
-                // Metric cares about non sliced condition, and it's changed.
-                // Push the new condition to it directly.
-                if (!mAllMetricProducers[metricIndex]->isConditionSliced()) {
-                    mAllMetricProducers[metricIndex]->onConditionChanged(conditionCache[i],
-                                                                         eventTimeNs);
-                    // Metric cares about sliced conditions, and it may have changed. Send
-                    // notification, and the metric can query the sliced conditions that are
-                    // interesting to it.
-                } else {
-                    mAllMetricProducers[metricIndex]->onSlicedConditionMayChange(conditionCache[i],
-                                                                                 eventTimeNs);
-                }
-            }
-        }
-    }
-
-    // For matched AtomMatchers, tell relevant metrics that a matched event has come.
-    for (size_t i = 0; i < mAllAtomMatchers.size(); i++) {
-        if (matcherCache[i] == MatchingState::kMatched) {
-            StatsdStats::getInstance().noteMatcherMatched(mConfigKey,
-                                                          mAllAtomMatchers[i]->getId());
-            auto pair = mTrackerToMetricMap.find(i);
-            if (pair != mTrackerToMetricMap.end()) {
-                auto& metricList = pair->second;
-                for (const int metricIndex : metricList) {
-                    // pushed metrics are never scheduled pulls
-                    mAllMetricProducers[metricIndex]->onMatchedLogEvent(i, event);
-                }
-            }
-        }
-    }
-}
-
-void MetricsManager::onAnomalyAlarmFired(
-        const int64_t& timestampNs,
-        unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& alarmSet) {
-    for (const auto& itr : mAllAnomalyTrackers) {
-        itr->informAlarmsFired(timestampNs, alarmSet);
-    }
-}
-
-void MetricsManager::onPeriodicAlarmFired(
-        const int64_t& timestampNs,
-        unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& alarmSet) {
-    for (const auto& itr : mAllPeriodicAlarmTrackers) {
-        itr->informAlarmsFired(timestampNs, alarmSet);
-    }
-}
-
-// Returns the total byte size of all metrics managed by a single config source.
-size_t MetricsManager::byteSize() {
-    size_t totalSize = 0;
-    for (const auto& metricProducer : mAllMetricProducers) {
-        totalSize += metricProducer->byteSize();
-    }
-    return totalSize;
-}
-
-void MetricsManager::loadActiveConfig(const ActiveConfig& config, int64_t currentTimeNs) {
-    if (config.metric_size() == 0) {
-        ALOGW("No active metric for config %s", mConfigKey.ToString().c_str());
-        return;
-    }
-
-    for (int i = 0; i < config.metric_size(); i++) {
-        const auto& activeMetric = config.metric(i);
-        for (int metricIndex : mMetricIndexesWithActivation) {
-            const auto& metric = mAllMetricProducers[metricIndex];
-            if (metric->getMetricId() == activeMetric.id()) {
-                VLOG("Setting active metric: %lld", (long long)metric->getMetricId());
-                metric->loadActiveMetric(activeMetric, currentTimeNs);
-                if (!mIsActive && metric->isActive()) {
-                    StatsdStats::getInstance().noteActiveStatusChanged(mConfigKey,
-                                                                       /*activate=*/ true);
-                }
-                mIsActive |= metric->isActive();
-            }
-        }
-    }
-}
-
-void MetricsManager::writeActiveConfigToProtoOutputStream(
-        int64_t currentTimeNs, const DumpReportReason reason, ProtoOutputStream* proto) {
-    proto->write(FIELD_TYPE_INT64 | FIELD_ID_ACTIVE_CONFIG_ID, (long long)mConfigKey.GetId());
-    proto->write(FIELD_TYPE_INT32 | FIELD_ID_ACTIVE_CONFIG_UID, mConfigKey.GetUid());
-    for (int metricIndex : mMetricIndexesWithActivation) {
-        const auto& metric = mAllMetricProducers[metricIndex];
-        const uint64_t metricToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                FIELD_ID_ACTIVE_CONFIG_METRIC);
-        metric->writeActiveMetricToProtoOutputStream(currentTimeNs, reason, proto);
-        proto->end(metricToken);
-    }
-}
-
-bool MetricsManager::writeMetadataToProto(int64_t currentWallClockTimeNs,
-                                          int64_t systemElapsedTimeNs,
-                                          metadata::StatsMetadata* statsMetadata) {
-    bool metadataWritten = false;
-    metadata::ConfigKey* configKey = statsMetadata->mutable_config_key();
-    configKey->set_config_id(mConfigKey.GetId());
-    configKey->set_uid(mConfigKey.GetUid());
-    for (const auto& anomalyTracker : mAllAnomalyTrackers) {
-        metadata::AlertMetadata* alertMetadata = statsMetadata->add_alert_metadata();
-        bool alertWritten = anomalyTracker->writeAlertMetadataToProto(currentWallClockTimeNs,
-                systemElapsedTimeNs, alertMetadata);
-        if (!alertWritten) {
-            statsMetadata->mutable_alert_metadata()->RemoveLast();
-        }
-        metadataWritten |= alertWritten;
-    }
-    return metadataWritten;
-}
-
-void MetricsManager::loadMetadata(const metadata::StatsMetadata& metadata,
-                                  int64_t currentWallClockTimeNs,
-                                  int64_t systemElapsedTimeNs) {
-    for (const metadata::AlertMetadata& alertMetadata : metadata.alert_metadata()) {
-        int64_t alertId = alertMetadata.alert_id();
-        auto it = mAlertTrackerMap.find(alertId);
-        if (it == mAlertTrackerMap.end()) {
-            ALOGE("No anomalyTracker found for alertId %lld", (long long) alertId);
-            continue;
-        }
-        mAllAnomalyTrackers[it->second]->loadAlertMetadata(alertMetadata,
-                                                           currentWallClockTimeNs,
-                                                           systemElapsedTimeNs);
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/MetricsManager.h b/cmds/statsd/src/metrics/MetricsManager.h
deleted file mode 100644
index ad30a88..0000000
--- a/cmds/statsd/src/metrics/MetricsManager.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "anomaly/AlarmMonitor.h"
-#include "anomaly/AlarmTracker.h"
-#include "anomaly/AnomalyTracker.h"
-#include "condition/ConditionTracker.h"
-#include "config/ConfigKey.h"
-#include "external/StatsPullerManager.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "frameworks/base/cmds/statsd/src/statsd_metadata.pb.h"
-#include "logd/LogEvent.h"
-#include "matchers/LogMatchingTracker.h"
-#include "metrics/MetricProducer.h"
-#include "packages/UidMap.h"
-
-#include <unordered_map>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// A MetricsManager is responsible for managing metrics from one single config source.
-class MetricsManager : public virtual android::RefBase, public virtual PullUidProvider {
-public:
-    MetricsManager(const ConfigKey& configKey, const StatsdConfig& config, const int64_t timeBaseNs,
-                   const int64_t currentTimeNs, const sp<UidMap>& uidMap,
-                   const sp<StatsPullerManager>& pullerManager,
-                   const sp<AlarmMonitor>& anomalyAlarmMonitor,
-                   const sp<AlarmMonitor>& periodicAlarmMonitor);
-
-    virtual ~MetricsManager();
-
-    // Return whether the configuration is valid.
-    bool isConfigValid() const;
-
-    bool checkLogCredentials(const LogEvent& event);
-
-    bool eventSanityCheck(const LogEvent& event);
-
-    void onLogEvent(const LogEvent& event);
-
-    void onAnomalyAlarmFired(
-        const int64_t& timestampNs,
-        unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& alarmSet);
-
-    void onPeriodicAlarmFired(
-        const int64_t& timestampNs,
-        unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>>& alarmSet);
-
-    void notifyAppUpgrade(const int64_t& eventTimeNs, const string& apk, const int uid,
-                          const int64_t version);
-
-    void notifyAppRemoved(const int64_t& eventTimeNs, const string& apk, const int uid);
-
-    void onUidMapReceived(const int64_t& eventTimeNs);
-
-    void onStatsdInitCompleted(const int64_t& elapsedTimeNs);
-
-    void init();
-
-    vector<int32_t> getPullAtomUids(int32_t atomId) override;
-
-    bool shouldWriteToDisk() const {
-        return mNoReportMetricIds.size() != mAllMetricProducers.size();
-    }
-
-    bool shouldPersistLocalHistory() const {
-        return mShouldPersistHistory;
-    }
-
-    void dumpStates(FILE* out, bool verbose);
-
-    inline bool isInTtl(const int64_t timestampNs) const {
-        return mTtlNs <= 0 || timestampNs < mTtlEndNs;
-    };
-
-    inline bool hashStringInReport() const {
-        return mHashStringsInReport;
-    };
-
-    inline bool versionStringsInReport() const {
-        return mVersionStringsInReport;
-    };
-
-    inline bool installerInReport() const {
-        return mInstallerInReport;
-    };
-
-    void refreshTtl(const int64_t currentTimestampNs) {
-        if (mTtlNs > 0) {
-            mTtlEndNs = currentTimestampNs + mTtlNs;
-        }
-    };
-
-    // Returns the elapsed realtime when this metric manager last reported metrics. If this config
-    // has not yet dumped any reports, this is the time the metricsmanager was initialized.
-    inline int64_t getLastReportTimeNs() const {
-        return mLastReportTimeNs;
-    };
-
-    inline int64_t getLastReportWallClockNs() const {
-        return mLastReportWallClockNs;
-    };
-
-    inline size_t getNumMetrics() const {
-        return mAllMetricProducers.size();
-    }
-
-    virtual void dropData(const int64_t dropTimeNs);
-
-    virtual void onDumpReport(const int64_t dumpTimeNs,
-                              const bool include_current_partial_bucket,
-                              const bool erase_data,
-                              const DumpLatency dumpLatency,
-                              std::set<string> *str_set,
-                              android::util::ProtoOutputStream* protoOutput);
-
-    // Computes the total byte size of all metrics managed by a single config source.
-    // Does not change the state.
-    virtual size_t byteSize();
-
-    // Returns whether or not this config is active.
-    // The config is active if any metric in the config is active.
-    inline bool isActive() const {
-        return mIsActive;
-    }
-
-    void loadActiveConfig(const ActiveConfig& config, int64_t currentTimeNs);
-
-    void writeActiveConfigToProtoOutputStream(
-            int64_t currentTimeNs, const DumpReportReason reason, ProtoOutputStream* proto);
-
-    // Returns true if at least one piece of metadata is written.
-    bool writeMetadataToProto(int64_t currentWallClockTimeNs,
-                              int64_t systemElapsedTimeNs,
-                              metadata::StatsMetadata* statsMetadata);
-
-    void loadMetadata(const metadata::StatsMetadata& metadata,
-                      int64_t currentWallClockTimeNs,
-                      int64_t systemElapsedTimeNs);
-private:
-    // For test only.
-    inline int64_t getTtlEndNs() const { return mTtlEndNs; }
-
-    const ConfigKey mConfigKey;
-
-    sp<UidMap> mUidMap;
-
-    bool mConfigValid = false;
-
-    bool mHashStringsInReport = false;
-    bool mVersionStringsInReport = false;
-    bool mInstallerInReport = false;
-
-    const int64_t mTtlNs;
-    int64_t mTtlEndNs;
-
-    int64_t mLastReportTimeNs;
-    int64_t mLastReportWallClockNs;
-
-    sp<StatsPullerManager> mPullerManager;
-
-    // The uid log sources from StatsdConfig.
-    std::vector<int32_t> mAllowedUid;
-
-    // The pkg log sources from StatsdConfig.
-    std::vector<std::string> mAllowedPkg;
-
-    // The combined uid sources (after translating pkg name to uid).
-    // Logs from uids that are not in the list will be ignored to avoid spamming.
-    std::set<int32_t> mAllowedLogSources;
-
-    // To guard access to mAllowedLogSources
-    mutable std::mutex mAllowedLogSourcesMutex;
-
-    const std::set<int32_t> mWhitelistedAtomIds;
-
-    // We can pull any atom from these uids.
-    std::set<int32_t> mDefaultPullUids;
-
-    // Uids that specific atoms can pull from.
-    // This is a map<atom id, set<uids>>
-    std::map<int32_t, std::set<int32_t>> mPullAtomUids;
-
-    // Packages that specific atoms can be pulled from.
-    std::map<int32_t, std::set<std::string>> mPullAtomPackages;
-
-    // All uids to pull for this atom. NOTE: Does not include the default uids for memory.
-    std::map<int32_t, std::set<int32_t>> mCombinedPullAtomUids;
-
-    // Contains the annotations passed in with StatsdConfig.
-    std::list<std::pair<const int64_t, const int32_t>> mAnnotations;
-
-    const bool mShouldPersistHistory;
-
-
-    // All event tags that are interesting to my metrics.
-    std::set<int> mTagIds;
-
-    // We only store the sp of LogMatchingTracker, MetricProducer, and ConditionTracker in
-    // MetricsManager. There are relationships between them, and the relationships are denoted by
-    // index instead of pointers. The reasons for this are: (1) the relationship between them are
-    // complicated, so storing index instead of pointers reduces the risk that A holds B's sp, and B
-    // holds A's sp. (2) When we evaluate matcher results, or condition results, we can quickly get
-    // the related results from a cache using the index.
-
-    // Hold all the atom matchers from the config.
-    std::vector<sp<LogMatchingTracker>> mAllAtomMatchers;
-
-    // Hold all the conditions from the config.
-    std::vector<sp<ConditionTracker>> mAllConditionTrackers;
-
-    // Hold all metrics from the config.
-    std::vector<sp<MetricProducer>> mAllMetricProducers;
-
-    // Hold all alert trackers.
-    std::vector<sp<AnomalyTracker>> mAllAnomalyTrackers;
-
-    // Hold all periodic alarm trackers.
-    std::vector<sp<AlarmTracker>> mAllPeriodicAlarmTrackers;
-
-    // To make the log processing more efficient, we want to do as much filtering as possible
-    // before we go into individual trackers and conditions to match.
-
-    // 1st filter: check if the event tag id is in mTagIds.
-    // 2nd filter: if it is, we parse the event because there is at least one member is interested.
-    //             then pass to all LogMatchingTrackers (itself also filter events by ids).
-    // 3nd filter: for LogMatchingTrackers that matched this event, we pass this event to the
-    //             ConditionTrackers and MetricProducers that use this matcher.
-    // 4th filter: for ConditionTrackers that changed value due to this event, we pass
-    //             new conditions to  metrics that use this condition.
-
-    // The following map is initialized from the statsd_config.
-
-    // Maps from the index of the LogMatchingTracker to index of MetricProducer.
-    std::unordered_map<int, std::vector<int>> mTrackerToMetricMap;
-
-    // Maps from LogMatchingTracker to ConditionTracker
-    std::unordered_map<int, std::vector<int>> mTrackerToConditionMap;
-
-    // Maps from ConditionTracker to MetricProducer
-    std::unordered_map<int, std::vector<int>> mConditionToMetricMap;
-
-    // Maps from life span triggering event to MetricProducers.
-    std::unordered_map<int, std::vector<int>> mActivationAtomTrackerToMetricMap;
-
-    // Maps deactivation triggering event to MetricProducers.
-    std::unordered_map<int, std::vector<int>> mDeactivationAtomTrackerToMetricMap;
-
-    // Maps AlertIds to the index of the corresponding AnomalyTracker stored in mAllAnomalyTrackers.
-    // The map is used in LoadMetadata to more efficiently lookup AnomalyTrackers from an AlertId.
-    std::unordered_map<int64_t, int> mAlertTrackerMap;
-
-    std::vector<int> mMetricIndexesWithActivation;
-
-    void initLogSourceWhiteList();
-
-    void initPullAtomSources();
-
-    // The metrics that don't need to be uploaded or even reported.
-    std::set<int64_t> mNoReportMetricIds;
-
-   // The config is active if any metric in the config is active.
-    bool mIsActive;
-
-    // The config is always active if any metric in the config does not have an activation signal.
-    bool mIsAlwaysActive;
-
-    FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensions);
-    FRIEND_TEST(MetricConditionLinkE2eTest, TestMultiplePredicatesAndLinks);
-    FRIEND_TEST(AttributionE2eTest, TestAttributionMatchAndSliceByFirstUid);
-    FRIEND_TEST(AttributionE2eTest, TestAttributionMatchAndSliceByChain);
-    FRIEND_TEST(GaugeMetricE2eTest, TestMultipleFieldsForPushedEvent);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEvents);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEvent_LateAlarm);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEventsWithActivation);
-    FRIEND_TEST(GaugeMetricE2eTest, TestRandomSamplePulledEventsNoCondition);
-    FRIEND_TEST(GaugeMetricE2eTest, TestConditionChangeToTrueSamplePulledEvents);
-
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestSlicedCountMetric_single_bucket);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestSlicedCountMetric_multiple_buckets);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestCountMetric_save_refractory_to_disk_no_data_written);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestCountMetric_save_refractory_to_disk);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestCountMetric_load_refractory_from_disk);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_single_bucket);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_multiple_buckets);
-    FRIEND_TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_long_refractory_period);
-
-    FRIEND_TEST(AlarmE2eTest, TestMultipleAlarms);
-    FRIEND_TEST(ConfigTtlE2eTest, TestCountMetric);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetric);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithOneDeactivation);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithTwoDeactivations);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithSameDeactivation);
-    FRIEND_TEST(MetricActivationE2eTest, TestCountMetricWithTwoMetricsTwoDeactivations);
-
-    FRIEND_TEST(MetricsManagerTest, TestLogSources);
-
-    FRIEND_TEST(StatsLogProcessorTest, TestActiveConfigMetricDiskWriteRead);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationOnBoot);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationOnBootMultipleActivations);
-    FRIEND_TEST(StatsLogProcessorTest,
-            TestActivationOnBootMultipleActivationsDifferentActivationTypes);
-    FRIEND_TEST(StatsLogProcessorTest, TestActivationsPersistAcrossSystemServerRestart);
-
-    FRIEND_TEST(CountMetricE2eTest, TestInitialConditionChanges);
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedState);
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedStateWithMap);
-    FRIEND_TEST(CountMetricE2eTest, TestMultipleSlicedStates);
-    FRIEND_TEST(CountMetricE2eTest, TestSlicedStateWithPrimaryFields);
-
-    FRIEND_TEST(DurationMetricE2eTest, TestOneBucket);
-    FRIEND_TEST(DurationMetricE2eTest, TestTwoBuckets);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithActivation);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithActivationAndSlicedCondition);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedState);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithConditionAndSlicedState);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedStateMapped);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedStatePrimaryFieldsSuperset);
-    FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedStatePrimaryFieldsSubset);
-
-    FRIEND_TEST(ValueMetricE2eTest, TestInitialConditionChanges);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents_LateAlarm);
-    FRIEND_TEST(ValueMetricE2eTest, TestPulledEvents_WithActivation);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithDimensions);
-    FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithIncorrectDimensions);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.cpp b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
deleted file mode 100644
index 5987a72..0000000
--- a/cmds/statsd/src/metrics/ValueMetricProducer.cpp
+++ /dev/null
@@ -1,1156 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "ValueMetricProducer.h"
-#include "../guardrail/StatsdStats.h"
-#include "../stats_log_util.h"
-
-#include <limits.h>
-#include <stdlib.h>
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_DOUBLE;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::ProtoOutputStream;
-using std::map;
-using std::shared_ptr;
-using std::unordered_map;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// for StatsLogReport
-const int FIELD_ID_ID = 1;
-const int FIELD_ID_VALUE_METRICS = 7;
-const int FIELD_ID_TIME_BASE = 9;
-const int FIELD_ID_BUCKET_SIZE = 10;
-const int FIELD_ID_DIMENSION_PATH_IN_WHAT = 11;
-const int FIELD_ID_IS_ACTIVE = 14;
-// for ValueMetricDataWrapper
-const int FIELD_ID_DATA = 1;
-const int FIELD_ID_SKIPPED = 2;
-// for SkippedBuckets
-const int FIELD_ID_SKIPPED_START_MILLIS = 3;
-const int FIELD_ID_SKIPPED_END_MILLIS = 4;
-const int FIELD_ID_SKIPPED_DROP_EVENT = 5;
-// for DumpEvent Proto
-const int FIELD_ID_BUCKET_DROP_REASON = 1;
-const int FIELD_ID_DROP_TIME = 2;
-// for ValueMetricData
-const int FIELD_ID_DIMENSION_IN_WHAT = 1;
-const int FIELD_ID_BUCKET_INFO = 3;
-const int FIELD_ID_DIMENSION_LEAF_IN_WHAT = 4;
-const int FIELD_ID_SLICE_BY_STATE = 6;
-// for ValueBucketInfo
-const int FIELD_ID_VALUE_INDEX = 1;
-const int FIELD_ID_VALUE_LONG = 2;
-const int FIELD_ID_VALUE_DOUBLE = 3;
-const int FIELD_ID_VALUES = 9;
-const int FIELD_ID_BUCKET_NUM = 4;
-const int FIELD_ID_START_BUCKET_ELAPSED_MILLIS = 5;
-const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 6;
-const int FIELD_ID_CONDITION_TRUE_NS = 10;
-
-const Value ZERO_LONG((int64_t)0);
-const Value ZERO_DOUBLE((int64_t)0);
-
-// ValueMetric has a minimum bucket size of 10min so that we don't pull too frequently
-ValueMetricProducer::ValueMetricProducer(
-        const ConfigKey& key, const ValueMetric& metric, const int conditionIndex,
-        const vector<ConditionState>& initialConditionCache,
-        const sp<ConditionWizard>& conditionWizard, const int whatMatcherIndex,
-        const sp<EventMatcherWizard>& matcherWizard, const int pullTagId, const int64_t timeBaseNs,
-        const int64_t startTimeNs, const sp<StatsPullerManager>& pullerManager,
-        const unordered_map<int, shared_ptr<Activation>>& eventActivationMap,
-        const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap,
-        const vector<int>& slicedStateAtoms,
-        const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap)
-    : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache,
-                     conditionWizard, eventActivationMap, eventDeactivationMap, slicedStateAtoms,
-                     stateGroupMap),
-      mWhatMatcherIndex(whatMatcherIndex),
-      mEventMatcherWizard(matcherWizard),
-      mPullerManager(pullerManager),
-      mPullTagId(pullTagId),
-      mIsPulled(pullTagId != -1),
-      mMinBucketSizeNs(metric.min_bucket_size_nanos()),
-      mDimensionSoftLimit(StatsdStats::kAtomDimensionKeySizeLimitMap.find(pullTagId) !=
-                                          StatsdStats::kAtomDimensionKeySizeLimitMap.end()
-                                  ? StatsdStats::kAtomDimensionKeySizeLimitMap.at(pullTagId).first
-                                  : StatsdStats::kDimensionKeySizeSoftLimit),
-      mDimensionHardLimit(StatsdStats::kAtomDimensionKeySizeLimitMap.find(pullTagId) !=
-                                          StatsdStats::kAtomDimensionKeySizeLimitMap.end()
-                                  ? StatsdStats::kAtomDimensionKeySizeLimitMap.at(pullTagId).second
-                                  : StatsdStats::kDimensionKeySizeHardLimit),
-      mUseAbsoluteValueOnReset(metric.use_absolute_value_on_reset()),
-      mAggregationType(metric.aggregation_type()),
-      mUseDiff(metric.has_use_diff() ? metric.use_diff() : (mIsPulled ? true : false)),
-      mValueDirection(metric.value_direction()),
-      mSkipZeroDiffOutput(metric.skip_zero_diff_output()),
-      mUseZeroDefaultBase(metric.use_zero_default_base()),
-      mHasGlobalBase(false),
-      mCurrentBucketIsSkipped(false),
-      mMaxPullDelayNs(metric.max_pull_delay_sec() > 0 ? metric.max_pull_delay_sec() * NS_PER_SEC
-                                                      : StatsdStats::kPullMaxDelayNs),
-      mSplitBucketForAppUpgrade(metric.split_bucket_for_app_upgrade()),
-      // Condition timer will be set later within the constructor after pulling events
-      mConditionTimer(false, timeBaseNs) {
-    int64_t bucketSizeMills = 0;
-    if (metric.has_bucket()) {
-        bucketSizeMills = TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket());
-    } else {
-        bucketSizeMills = TimeUnitToBucketSizeInMillis(ONE_HOUR);
-    }
-
-    mBucketSizeNs = bucketSizeMills * 1000000;
-
-    translateFieldMatcher(metric.value_field(), &mFieldMatchers);
-
-    if (metric.has_dimensions_in_what()) {
-        translateFieldMatcher(metric.dimensions_in_what(), &mDimensionsInWhat);
-        mContainANYPositionInDimensionsInWhat = HasPositionANY(metric.dimensions_in_what());
-        mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what());
-    }
-
-    if (metric.links().size() > 0) {
-        for (const auto& link : metric.links()) {
-            Metric2Condition mc;
-            mc.conditionId = link.condition();
-            translateFieldMatcher(link.fields_in_what(), &mc.metricFields);
-            translateFieldMatcher(link.fields_in_condition(), &mc.conditionFields);
-            mMetric2ConditionLinks.push_back(mc);
-        }
-        mConditionSliced = true;
-    }
-
-    for (const auto& stateLink : metric.state_link()) {
-        Metric2State ms;
-        ms.stateAtomId = stateLink.state_atom_id();
-        translateFieldMatcher(stateLink.fields_in_what(), &ms.metricFields);
-        translateFieldMatcher(stateLink.fields_in_state(), &ms.stateFields);
-        mMetric2StateLinks.push_back(ms);
-    }
-
-    int64_t numBucketsForward = calcBucketsForwardCount(startTimeNs);
-    mCurrentBucketNum += numBucketsForward;
-
-    flushIfNeededLocked(startTimeNs);
-
-    if (mIsPulled) {
-        mPullerManager->RegisterReceiver(mPullTagId, mConfigKey, this, getCurrentBucketEndTimeNs(),
-                                         mBucketSizeNs);
-    }
-
-    // Only do this for partial buckets like first bucket. All other buckets should use
-    // flushIfNeeded to adjust start and end to bucket boundaries.
-    // Adjust start for partial bucket
-    mCurrentBucketStartTimeNs = startTimeNs;
-    mConditionTimer.newBucketStart(mCurrentBucketStartTimeNs);
-
-    // Now that activations are processed, start the condition timer if needed.
-    mConditionTimer.onConditionChanged(mIsActive && mCondition == ConditionState::kTrue,
-                                       mCurrentBucketStartTimeNs);
-
-    VLOG("value metric %lld created. bucket size %lld start_time: %lld", (long long)metric.id(),
-         (long long)mBucketSizeNs, (long long)mTimeBaseNs);
-}
-
-ValueMetricProducer::~ValueMetricProducer() {
-    VLOG("~ValueMetricProducer() called");
-    if (mIsPulled) {
-        mPullerManager->UnRegisterReceiver(mPullTagId, mConfigKey, this);
-    }
-}
-
-void ValueMetricProducer::onStateChanged(int64_t eventTimeNs, int32_t atomId,
-                                         const HashableDimensionKey& primaryKey,
-                                         const FieldValue& oldState, const FieldValue& newState) {
-    VLOG("ValueMetric %lld onStateChanged time %lld, State %d, key %s, %d -> %d",
-         (long long)mMetricId, (long long)eventTimeNs, atomId, primaryKey.toString().c_str(),
-         oldState.mValue.int_value, newState.mValue.int_value);
-
-    // If old and new states are in the same StateGroup, then we do not need to
-    // pull for this state change.
-    FieldValue oldStateCopy = oldState;
-    FieldValue newStateCopy = newState;
-    mapStateValue(atomId, &oldStateCopy);
-    mapStateValue(atomId, &newStateCopy);
-    if (oldStateCopy == newStateCopy) {
-        return;
-    }
-
-    // If condition is not true or metric is not active, we do not need to pull
-    // for this state change.
-    if (mCondition != ConditionState::kTrue || !mIsActive) {
-        return;
-    }
-
-    bool isEventLate = eventTimeNs < mCurrentBucketStartTimeNs;
-    if (isEventLate) {
-        VLOG("Skip event due to late arrival: %lld vs %lld", (long long)eventTimeNs,
-             (long long)mCurrentBucketStartTimeNs);
-        invalidateCurrentBucket(eventTimeNs, BucketDropReason::EVENT_IN_WRONG_BUCKET);
-        return;
-    }
-    mStateChangePrimaryKey.first = atomId;
-    mStateChangePrimaryKey.second = primaryKey;
-    if (mIsPulled) {
-        pullAndMatchEventsLocked(eventTimeNs);
-    }
-    mStateChangePrimaryKey.first = 0;
-    mStateChangePrimaryKey.second = DEFAULT_DIMENSION_KEY;
-    flushIfNeededLocked(eventTimeNs);
-}
-
-void ValueMetricProducer::onSlicedConditionMayChangeLocked(bool overallCondition,
-                                                           const int64_t eventTime) {
-    VLOG("Metric %lld onSlicedConditionMayChange", (long long)mMetricId);
-}
-
-void ValueMetricProducer::dropDataLocked(const int64_t dropTimeNs) {
-    StatsdStats::getInstance().noteBucketDropped(mMetricId);
-
-    // The current partial bucket is not flushed and does not require a pull,
-    // so the data is still valid.
-    flushIfNeededLocked(dropTimeNs);
-    clearPastBucketsLocked(dropTimeNs);
-}
-
-void ValueMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
-    mPastBuckets.clear();
-    mSkippedBuckets.clear();
-}
-
-void ValueMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
-                                             const bool include_current_partial_bucket,
-                                             const bool erase_data,
-                                             const DumpLatency dumpLatency,
-                                             std::set<string> *str_set,
-                                             ProtoOutputStream* protoOutput) {
-    VLOG("metric %lld dump report now...", (long long)mMetricId);
-    if (include_current_partial_bucket) {
-        // For pull metrics, we need to do a pull at bucket boundaries. If we do not do that the
-        // current bucket will have incomplete data and the next will have the wrong snapshot to do
-        // a diff against. If the condition is false, we are fine since the base data is reset and
-        // we are not tracking anything.
-        bool pullNeeded = mIsPulled && mCondition == ConditionState::kTrue;
-        if (pullNeeded) {
-            switch (dumpLatency) {
-                case FAST:
-                    invalidateCurrentBucket(dumpTimeNs, BucketDropReason::DUMP_REPORT_REQUESTED);
-                    break;
-                case NO_TIME_CONSTRAINTS:
-                    pullAndMatchEventsLocked(dumpTimeNs);
-                    break;
-            }
-        }
-        flushCurrentBucketLocked(dumpTimeNs, dumpTimeNs);
-    }
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
-    protoOutput->write(FIELD_TYPE_BOOL | FIELD_ID_IS_ACTIVE, isActiveLocked());
-
-    if (mPastBuckets.empty() && mSkippedBuckets.empty()) {
-        return;
-    }
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TIME_BASE, (long long)mTimeBaseNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_SIZE, (long long)mBucketSizeNs);
-    // Fills the dimension path if not slicing by ALL.
-    if (!mSliceByPositionALL) {
-        if (!mDimensionsInWhat.empty()) {
-            uint64_t dimenPathToken =
-                    protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_WHAT);
-            writeDimensionPathToProto(mDimensionsInWhat, protoOutput);
-            protoOutput->end(dimenPathToken);
-        }
-    }
-
-    uint64_t protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_VALUE_METRICS);
-
-    for (const auto& skippedBucket : mSkippedBuckets) {
-        uint64_t wrapperToken =
-                protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_SKIPPED);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_START_MILLIS,
-                           (long long)(NanoToMillis(skippedBucket.bucketStartTimeNs)));
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_END_MILLIS,
-                           (long long)(NanoToMillis(skippedBucket.bucketEndTimeNs)));
-        for (const auto& dropEvent : skippedBucket.dropEvents) {
-            uint64_t dropEventToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                         FIELD_ID_SKIPPED_DROP_EVENT);
-            protoOutput->write(FIELD_TYPE_INT32 | FIELD_ID_BUCKET_DROP_REASON, dropEvent.reason);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_DROP_TIME,
-                               (long long)(NanoToMillis(dropEvent.dropTimeNs)));
-            ;
-            protoOutput->end(dropEventToken);
-        }
-        protoOutput->end(wrapperToken);
-    }
-
-    for (const auto& pair : mPastBuckets) {
-        const MetricDimensionKey& dimensionKey = pair.first;
-        VLOG("  dimension key %s", dimensionKey.toString().c_str());
-        uint64_t wrapperToken =
-                protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
-
-        // First fill dimension.
-        if (mSliceByPositionALL) {
-            uint64_t dimensionToken =
-                    protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
-            writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), str_set, protoOutput);
-            protoOutput->end(dimensionToken);
-        } else {
-            writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInWhat(),
-                                           FIELD_ID_DIMENSION_LEAF_IN_WHAT, str_set, protoOutput);
-        }
-
-        // Then fill slice_by_state.
-        for (auto state : dimensionKey.getStateValuesKey().getValues()) {
-            uint64_t stateToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                     FIELD_ID_SLICE_BY_STATE);
-            writeStateToProto(state, protoOutput);
-            protoOutput->end(stateToken);
-        }
-
-        // Then fill bucket_info (ValueBucketInfo).
-        for (const auto& bucket : pair.second) {
-            uint64_t bucketInfoToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_BUCKET_INFO);
-
-            if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_MILLIS,
-                                   (long long)NanoToMillis(bucket.mBucketStartNs));
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_MILLIS,
-                                   (long long)NanoToMillis(bucket.mBucketEndNs));
-            } else {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_NUM,
-                                   (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs)));
-            }
-            // only write the condition timer value if the metric has a condition.
-            if (mConditionTrackerIndex >= 0) {
-                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_CONDITION_TRUE_NS,
-                                   (long long)bucket.mConditionTrueNs);
-            }
-            for (int i = 0; i < (int)bucket.valueIndex.size(); i++) {
-                int index = bucket.valueIndex[i];
-                const Value& value = bucket.values[i];
-                uint64_t valueToken = protoOutput->start(
-                        FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_VALUES);
-                protoOutput->write(FIELD_TYPE_INT32 | FIELD_ID_VALUE_INDEX,
-                                   index);
-                if (value.getType() == LONG) {
-                    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_VALUE_LONG,
-                                       (long long)value.long_value);
-                    VLOG("\t bucket [%lld - %lld] value %d: %lld", (long long)bucket.mBucketStartNs,
-                         (long long)bucket.mBucketEndNs, index, (long long)value.long_value);
-                } else if (value.getType() == DOUBLE) {
-                    protoOutput->write(FIELD_TYPE_DOUBLE | FIELD_ID_VALUE_DOUBLE,
-                                       value.double_value);
-                    VLOG("\t bucket [%lld - %lld] value %d: %.2f", (long long)bucket.mBucketStartNs,
-                         (long long)bucket.mBucketEndNs, index, value.double_value);
-                } else {
-                    VLOG("Wrong value type for ValueMetric output: %d", value.getType());
-                }
-                protoOutput->end(valueToken);
-            }
-            protoOutput->end(bucketInfoToken);
-        }
-        protoOutput->end(wrapperToken);
-    }
-    protoOutput->end(protoToken);
-
-    VLOG("metric %lld dump report now...", (long long)mMetricId);
-    if (erase_data) {
-        mPastBuckets.clear();
-        mSkippedBuckets.clear();
-    }
-}
-
-void ValueMetricProducer::invalidateCurrentBucketWithoutResetBase(const int64_t dropTimeNs,
-                                                                  const BucketDropReason reason) {
-    if (!mCurrentBucketIsSkipped) {
-        // Only report to StatsdStats once per invalid bucket.
-        StatsdStats::getInstance().noteInvalidatedBucket(mMetricId);
-    }
-
-    skipCurrentBucket(dropTimeNs, reason);
-}
-
-void ValueMetricProducer::invalidateCurrentBucket(const int64_t dropTimeNs,
-                                                  const BucketDropReason reason) {
-    invalidateCurrentBucketWithoutResetBase(dropTimeNs, reason);
-    resetBase();
-}
-
-void ValueMetricProducer::skipCurrentBucket(const int64_t dropTimeNs,
-                                            const BucketDropReason reason) {
-    if (!maxDropEventsReached()) {
-        mCurrentSkippedBucket.dropEvents.emplace_back(buildDropEvent(dropTimeNs, reason));
-    }
-    mCurrentBucketIsSkipped = true;
-}
-
-void ValueMetricProducer::resetBase() {
-    for (auto& slice : mCurrentBaseInfo) {
-        for (auto& baseInfo : slice.second) {
-            baseInfo.hasBase = false;
-        }
-    }
-    mHasGlobalBase = false;
-}
-
-// Handle active state change. Active state change is treated like a condition change:
-// - drop bucket if active state change event arrives too late
-// - if condition is true, pull data on active state changes
-// - ConditionTimer tracks changes based on AND of condition and active state.
-void ValueMetricProducer::onActiveStateChangedLocked(const int64_t& eventTimeNs) {
-    bool isEventTooLate  = eventTimeNs < mCurrentBucketStartTimeNs;
-    if (isEventTooLate) {
-        // Drop bucket because event arrived too late, ie. we are missing data for this bucket.
-        StatsdStats::getInstance().noteLateLogEventSkipped(mMetricId);
-        invalidateCurrentBucket(eventTimeNs, BucketDropReason::EVENT_IN_WRONG_BUCKET);
-    }
-
-    // Call parent method once we've verified the validity of current bucket.
-    MetricProducer::onActiveStateChangedLocked(eventTimeNs);
-
-    if (ConditionState::kTrue != mCondition) {
-        return;
-    }
-
-    // Pull on active state changes.
-    if (!isEventTooLate) {
-        if (mIsPulled) {
-            pullAndMatchEventsLocked(eventTimeNs);
-        }
-        // When active state changes from true to false, clear diff base but don't
-        // reset other counters as we may accumulate more value in the bucket.
-        if (mUseDiff && !mIsActive) {
-            resetBase();
-        }
-    }
-
-    flushIfNeededLocked(eventTimeNs);
-
-    // Let condition timer know of new active state.
-    mConditionTimer.onConditionChanged(mIsActive, eventTimeNs);
-}
-
-void ValueMetricProducer::onConditionChangedLocked(const bool condition,
-                                                   const int64_t eventTimeNs) {
-    ConditionState newCondition = condition ? ConditionState::kTrue : ConditionState::kFalse;
-    bool isEventTooLate  = eventTimeNs < mCurrentBucketStartTimeNs;
-
-    // If the config is not active, skip the event.
-    if (!mIsActive) {
-        mCondition = isEventTooLate ? ConditionState::kUnknown : newCondition;
-        return;
-    }
-
-    // If the event arrived late, mark the bucket as invalid and skip the event.
-    if (isEventTooLate) {
-        VLOG("Skip event due to late arrival: %lld vs %lld", (long long)eventTimeNs,
-             (long long)mCurrentBucketStartTimeNs);
-        StatsdStats::getInstance().noteLateLogEventSkipped(mMetricId);
-        StatsdStats::getInstance().noteConditionChangeInNextBucket(mMetricId);
-        invalidateCurrentBucket(eventTimeNs, BucketDropReason::EVENT_IN_WRONG_BUCKET);
-        mCondition = ConditionState::kUnknown;
-        mConditionTimer.onConditionChanged(mCondition, eventTimeNs);
-        return;
-    }
-
-    // If the previous condition was unknown, mark the bucket as invalid
-    // because the bucket will contain partial data. For example, the condition
-    // change might happen close to the end of the bucket and we might miss a
-    // lot of data.
-    //
-    // We still want to pull to set the base.
-    if (mCondition == ConditionState::kUnknown) {
-        invalidateCurrentBucket(eventTimeNs, BucketDropReason::CONDITION_UNKNOWN);
-    }
-
-    // Pull and match for the following condition change cases:
-    // unknown/false -> true - condition changed
-    // true -> false - condition changed
-    // true -> true - old condition was true so we can flush the bucket at the
-    // end if needed.
-    //
-    // We don’t need to pull for unknown -> false or false -> false.
-    //
-    // onConditionChangedLocked might happen on bucket boundaries if this is
-    // called before #onDataPulled.
-    if (mIsPulled &&
-        (newCondition == ConditionState::kTrue || mCondition == ConditionState::kTrue)) {
-        pullAndMatchEventsLocked(eventTimeNs);
-    }
-
-    // For metrics that use diff, when condition changes from true to false,
-    // clear diff base but don't reset other counts because we may accumulate
-    // more value in the bucket.
-    if (mUseDiff &&
-        (mCondition == ConditionState::kTrue && newCondition == ConditionState::kFalse)) {
-        resetBase();
-    }
-
-    // Update condition state after pulling.
-    mCondition = newCondition;
-
-    flushIfNeededLocked(eventTimeNs);
-    mConditionTimer.onConditionChanged(mCondition, eventTimeNs);
-}
-
-void ValueMetricProducer::prepareFirstBucketLocked() {
-    // Kicks off the puller immediately if condition is true and diff based.
-    if (mIsActive && mIsPulled && mCondition == ConditionState::kTrue && mUseDiff) {
-        pullAndMatchEventsLocked(mCurrentBucketStartTimeNs);
-    }
-}
-
-void ValueMetricProducer::pullAndMatchEventsLocked(const int64_t timestampNs) {
-    vector<std::shared_ptr<LogEvent>> allData;
-    if (!mPullerManager->Pull(mPullTagId, mConfigKey, timestampNs, &allData)) {
-        ALOGE("Stats puller failed for tag: %d at %lld", mPullTagId, (long long)timestampNs);
-        invalidateCurrentBucket(timestampNs, BucketDropReason::PULL_FAILED);
-        return;
-    }
-
-    accumulateEvents(allData, timestampNs, timestampNs);
-}
-
-int64_t ValueMetricProducer::calcPreviousBucketEndTime(const int64_t currentTimeNs) {
-    return mTimeBaseNs + ((currentTimeNs - mTimeBaseNs) / mBucketSizeNs) * mBucketSizeNs;
-}
-
-// By design, statsd pulls data at bucket boundaries using AlarmManager. These pulls are likely
-// to be delayed. Other events like condition changes or app upgrade which are not based on
-// AlarmManager might have arrived earlier and close the bucket.
-void ValueMetricProducer::onDataPulled(const std::vector<std::shared_ptr<LogEvent>>& allData,
-                                       bool pullSuccess, int64_t originalPullTimeNs) {
-    std::lock_guard<std::mutex> lock(mMutex);
-    if (mCondition == ConditionState::kTrue) {
-        // If the pull failed, we won't be able to compute a diff.
-        if (!pullSuccess) {
-            invalidateCurrentBucket(originalPullTimeNs, BucketDropReason::PULL_FAILED);
-        } else {
-            bool isEventLate = originalPullTimeNs < getCurrentBucketEndTimeNs();
-            if (isEventLate) {
-                // If the event is late, we are in the middle of a bucket. Just
-                // process the data without trying to snap the data to the nearest bucket.
-                accumulateEvents(allData, originalPullTimeNs, originalPullTimeNs);
-            } else {
-                // For scheduled pulled data, the effective event time is snap to the nearest
-                // bucket end. In the case of waking up from a deep sleep state, we will
-                // attribute to the previous bucket end. If the sleep was long but not very
-                // long, we will be in the immediate next bucket. Previous bucket may get a
-                // larger number as we pull at a later time than real bucket end.
-                //
-                // If the sleep was very long, we skip more than one bucket before sleep. In
-                // this case, if the diff base will be cleared and this new data will serve as
-                // new diff base.
-                int64_t bucketEndTime = calcPreviousBucketEndTime(originalPullTimeNs) - 1;
-                StatsdStats::getInstance().noteBucketBoundaryDelayNs(
-                        mMetricId, originalPullTimeNs - bucketEndTime);
-                accumulateEvents(allData, originalPullTimeNs, bucketEndTime);
-            }
-        }
-    }
-
-    // We can probably flush the bucket. Since we used bucketEndTime when calling
-    // #onMatchedLogEventInternalLocked, the current bucket will not have been flushed.
-    flushIfNeededLocked(originalPullTimeNs);
-}
-
-void ValueMetricProducer::accumulateEvents(const std::vector<std::shared_ptr<LogEvent>>& allData,
-                                           int64_t originalPullTimeNs, int64_t eventElapsedTimeNs) {
-    bool isEventLate = eventElapsedTimeNs < mCurrentBucketStartTimeNs;
-    if (isEventLate) {
-        VLOG("Skip bucket end pull due to late arrival: %lld vs %lld",
-             (long long)eventElapsedTimeNs, (long long)mCurrentBucketStartTimeNs);
-        StatsdStats::getInstance().noteLateLogEventSkipped(mMetricId);
-        invalidateCurrentBucket(eventElapsedTimeNs, BucketDropReason::EVENT_IN_WRONG_BUCKET);
-        return;
-    }
-
-    const int64_t elapsedRealtimeNs = getElapsedRealtimeNs();
-    const int64_t pullDelayNs = elapsedRealtimeNs - originalPullTimeNs;
-    StatsdStats::getInstance().notePullDelay(mPullTagId, pullDelayNs);
-    if (pullDelayNs > mMaxPullDelayNs) {
-        ALOGE("Pull finish too late for atom %d, longer than %lld", mPullTagId,
-              (long long)mMaxPullDelayNs);
-        StatsdStats::getInstance().notePullExceedMaxDelay(mPullTagId);
-        // We are missing one pull from the bucket which means we will not have a complete view of
-        // what's going on.
-        invalidateCurrentBucket(eventElapsedTimeNs, BucketDropReason::PULL_DELAYED);
-        return;
-    }
-
-    mMatchedMetricDimensionKeys.clear();
-    for (const auto& data : allData) {
-        LogEvent localCopy = data->makeCopy();
-        if (mEventMatcherWizard->matchLogEvent(localCopy, mWhatMatcherIndex) ==
-            MatchingState::kMatched) {
-            localCopy.setElapsedTimestampNs(eventElapsedTimeNs);
-            onMatchedLogEventLocked(mWhatMatcherIndex, localCopy);
-        }
-    }
-    // If a key that is:
-    // 1. Tracked in mCurrentSlicedBucket and
-    // 2. A superset of the current mStateChangePrimaryKey
-    // was not found in the new pulled data (i.e. not in mMatchedDimensionInWhatKeys)
-    // then we need to reset the base.
-    for (auto& slice : mCurrentSlicedBucket) {
-        const auto& whatKey = slice.first.getDimensionKeyInWhat();
-        bool presentInPulledData =
-                mMatchedMetricDimensionKeys.find(whatKey) != mMatchedMetricDimensionKeys.end();
-        if (!presentInPulledData && whatKey.contains(mStateChangePrimaryKey.second)) {
-            auto it = mCurrentBaseInfo.find(whatKey);
-            for (auto& baseInfo : it->second) {
-                baseInfo.hasBase = false;
-            }
-        }
-    }
-    mMatchedMetricDimensionKeys.clear();
-    mHasGlobalBase = true;
-
-    // If we reach the guardrail, we might have dropped some data which means the bucket is
-    // incomplete.
-    //
-    // The base also needs to be reset. If we do not have the full data, we might
-    // incorrectly compute the diff when mUseZeroDefaultBase is true since an existing key
-    // might be missing from mCurrentSlicedBucket.
-    if (hasReachedGuardRailLimit()) {
-        invalidateCurrentBucket(eventElapsedTimeNs, BucketDropReason::DIMENSION_GUARDRAIL_REACHED);
-        mCurrentSlicedBucket.clear();
-    }
-}
-
-void ValueMetricProducer::dumpStatesLocked(FILE* out, bool verbose) const {
-    if (mCurrentSlicedBucket.size() == 0) {
-        return;
-    }
-
-    fprintf(out, "ValueMetric %lld dimension size %lu\n", (long long)mMetricId,
-            (unsigned long)mCurrentSlicedBucket.size());
-    if (verbose) {
-        for (const auto& it : mCurrentSlicedBucket) {
-          for (const auto& interval : it.second) {
-              fprintf(out, "\t(what)%s\t(states)%s  (value)%s\n",
-                      it.first.getDimensionKeyInWhat().toString().c_str(),
-                      it.first.getStateValuesKey().toString().c_str(),
-                      interval.value.toString().c_str());
-          }
-        }
-    }
-}
-
-bool ValueMetricProducer::hasReachedGuardRailLimit() const {
-    return mCurrentSlicedBucket.size() >= mDimensionHardLimit;
-}
-
-bool ValueMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) {
-    // ===========GuardRail==============
-    // 1. Report the tuple count if the tuple count > soft limit
-    if (mCurrentSlicedBucket.find(newKey) != mCurrentSlicedBucket.end()) {
-        return false;
-    }
-    if (mCurrentSlicedBucket.size() > mDimensionSoftLimit - 1) {
-        size_t newTupleCount = mCurrentSlicedBucket.size() + 1;
-        StatsdStats::getInstance().noteMetricDimensionSize(mConfigKey, mMetricId, newTupleCount);
-        // 2. Don't add more tuples, we are above the allowed threshold. Drop the data.
-        if (hasReachedGuardRailLimit()) {
-            ALOGE("ValueMetric %lld dropping data for dimension key %s", (long long)mMetricId,
-                  newKey.toString().c_str());
-            StatsdStats::getInstance().noteHardDimensionLimitReached(mMetricId);
-            return true;
-        }
-    }
-
-    return false;
-}
-
-bool ValueMetricProducer::hitFullBucketGuardRailLocked(const MetricDimensionKey& newKey) {
-    // ===========GuardRail==============
-    // 1. Report the tuple count if the tuple count > soft limit
-    if (mCurrentFullBucket.find(newKey) != mCurrentFullBucket.end()) {
-        return false;
-    }
-    if (mCurrentFullBucket.size() > mDimensionSoftLimit - 1) {
-        size_t newTupleCount = mCurrentFullBucket.size() + 1;
-        // 2. Don't add more tuples, we are above the allowed threshold. Drop the data.
-        if (newTupleCount > mDimensionHardLimit) {
-            ALOGE("ValueMetric %lld dropping data for full bucket dimension key %s",
-                  (long long)mMetricId,
-                  newKey.toString().c_str());
-            return true;
-        }
-    }
-
-    return false;
-}
-
-bool getDoubleOrLong(const LogEvent& event, const Matcher& matcher, Value& ret) {
-    for (const FieldValue& value : event.getValues()) {
-        if (value.mField.matches(matcher)) {
-            switch (value.mValue.type) {
-                case INT:
-                    ret.setLong(value.mValue.int_value);
-                    break;
-                case LONG:
-                    ret.setLong(value.mValue.long_value);
-                    break;
-                case FLOAT:
-                    ret.setDouble(value.mValue.float_value);
-                    break;
-                case DOUBLE:
-                    ret.setDouble(value.mValue.double_value);
-                    break;
-                default:
-                    return false;
-                    break;
-            }
-            return true;
-        }
-    }
-    return false;
-}
-
-void ValueMetricProducer::onMatchedLogEventInternalLocked(
-        const size_t matcherIndex, const MetricDimensionKey& eventKey,
-        const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-        const map<int, HashableDimensionKey>& statePrimaryKeys) {
-    auto whatKey = eventKey.getDimensionKeyInWhat();
-    auto stateKey = eventKey.getStateValuesKey();
-
-    // Skip this event if a state changed occurred for a different primary key.
-    auto it = statePrimaryKeys.find(mStateChangePrimaryKey.first);
-    // Check that both the atom id and the primary key are equal.
-    if (it != statePrimaryKeys.end() && it->second != mStateChangePrimaryKey.second) {
-        VLOG("ValueMetric skip event with primary key %s because state change primary key "
-             "is %s",
-             it->second.toString().c_str(), mStateChangePrimaryKey.second.toString().c_str());
-        return;
-    }
-
-    int64_t eventTimeNs = event.GetElapsedTimestampNs();
-    if (eventTimeNs < mCurrentBucketStartTimeNs) {
-        VLOG("Skip event due to late arrival: %lld vs %lld", (long long)eventTimeNs,
-             (long long)mCurrentBucketStartTimeNs);
-        return;
-    }
-    mMatchedMetricDimensionKeys.insert(whatKey);
-
-    if (!mIsPulled) {
-        // We cannot flush without doing a pull first.
-        flushIfNeededLocked(eventTimeNs);
-    }
-
-    // We should not accumulate the data for pushed metrics when the condition is false.
-    bool shouldSkipForPushMetric = !mIsPulled && !condition;
-    // For pulled metrics, there are two cases:
-    // - to compute diffs, we need to process all the state changes
-    // - for non-diffs metrics, we should ignore the data if the condition wasn't true. If we have a
-    // state change from
-    //     + True -> True: we should process the data, it might be a bucket boundary
-    //     + True -> False: we als need to process the data.
-    bool shouldSkipForPulledMetric = mIsPulled && !mUseDiff
-            && mCondition != ConditionState::kTrue;
-    if (shouldSkipForPushMetric || shouldSkipForPulledMetric) {
-        VLOG("ValueMetric skip event because condition is false and we are not using diff (for "
-             "pulled metric)");
-        return;
-    }
-
-    if (hitGuardRailLocked(eventKey)) {
-        return;
-    }
-
-    vector<BaseInfo>& baseInfos = mCurrentBaseInfo[whatKey];
-    if (baseInfos.size() < mFieldMatchers.size()) {
-        VLOG("Resizing number of intervals to %d", (int)mFieldMatchers.size());
-        baseInfos.resize(mFieldMatchers.size());
-    }
-
-    for (BaseInfo& baseInfo : baseInfos) {
-        if (!baseInfo.hasCurrentState) {
-            baseInfo.currentState = getUnknownStateKey();
-            baseInfo.hasCurrentState = true;
-        }
-    }
-
-    // We need to get the intervals stored with the previous state key so we can
-    // close these value intervals.
-    const auto oldStateKey = baseInfos[0].currentState;
-    vector<Interval>& intervals = mCurrentSlicedBucket[MetricDimensionKey(whatKey, oldStateKey)];
-    if (intervals.size() < mFieldMatchers.size()) {
-        VLOG("Resizing number of intervals to %d", (int)mFieldMatchers.size());
-        intervals.resize(mFieldMatchers.size());
-    }
-
-    // We only use anomaly detection under certain cases.
-    // N.B.: The anomaly detection cases were modified in order to fix an issue with value metrics
-    // containing multiple values. We tried to retain all previous behaviour, but we are unsure the
-    // previous behaviour was correct. At the time of the fix, anomaly detection had no owner.
-    // Whoever next works on it should look into the cases where it is triggered in this function.
-    // Discussion here: http://ag/6124370.
-    bool useAnomalyDetection = true;
-
-    for (int i = 0; i < (int)mFieldMatchers.size(); i++) {
-        const Matcher& matcher = mFieldMatchers[i];
-        BaseInfo& baseInfo = baseInfos[i];
-        Interval& interval = intervals[i];
-        interval.valueIndex = i;
-        Value value;
-        baseInfo.hasCurrentState = true;
-        baseInfo.currentState = stateKey;
-        if (!getDoubleOrLong(event, matcher, value)) {
-            VLOG("Failed to get value %d from event %s", i, event.ToString().c_str());
-            StatsdStats::getInstance().noteBadValueType(mMetricId);
-            return;
-        }
-        interval.seenNewData = true;
-
-        if (mUseDiff) {
-            if (!baseInfo.hasBase) {
-                if (mHasGlobalBase && mUseZeroDefaultBase) {
-                    // The bucket has global base. This key does not.
-                    // Optionally use zero as base.
-                    baseInfo.base = (value.type == LONG ? ZERO_LONG : ZERO_DOUBLE);
-                    baseInfo.hasBase = true;
-                } else {
-                    // no base. just update base and return.
-                    baseInfo.base = value;
-                    baseInfo.hasBase = true;
-                    // If we're missing a base, do not use anomaly detection on incomplete data
-                    useAnomalyDetection = false;
-                    // Continue (instead of return) here in order to set baseInfo.base and
-                    // baseInfo.hasBase for other baseInfos
-                    continue;
-                }
-            }
-
-            Value diff;
-            switch (mValueDirection) {
-                case ValueMetric::INCREASING:
-                    if (value >= baseInfo.base) {
-                        diff = value - baseInfo.base;
-                    } else if (mUseAbsoluteValueOnReset) {
-                        diff = value;
-                    } else {
-                        VLOG("Unexpected decreasing value");
-                        StatsdStats::getInstance().notePullDataError(mPullTagId);
-                        baseInfo.base = value;
-                        // If we've got bad data, do not use anomaly detection
-                        useAnomalyDetection = false;
-                        continue;
-                    }
-                    break;
-                case ValueMetric::DECREASING:
-                    if (baseInfo.base >= value) {
-                        diff = baseInfo.base - value;
-                    } else if (mUseAbsoluteValueOnReset) {
-                        diff = value;
-                    } else {
-                        VLOG("Unexpected increasing value");
-                        StatsdStats::getInstance().notePullDataError(mPullTagId);
-                        baseInfo.base = value;
-                        // If we've got bad data, do not use anomaly detection
-                        useAnomalyDetection = false;
-                        continue;
-                    }
-                    break;
-                case ValueMetric::ANY:
-                    diff = value - baseInfo.base;
-                    break;
-                default:
-                    break;
-            }
-            baseInfo.base = value;
-            value = diff;
-        }
-
-        if (interval.hasValue) {
-            switch (mAggregationType) {
-                case ValueMetric::SUM:
-                    // for AVG, we add up and take average when flushing the bucket
-                case ValueMetric::AVG:
-                    interval.value += value;
-                    break;
-                case ValueMetric::MIN:
-                    interval.value = std::min(value, interval.value);
-                    break;
-                case ValueMetric::MAX:
-                    interval.value = std::max(value, interval.value);
-                    break;
-                default:
-                    break;
-            }
-        } else {
-            interval.value = value;
-            interval.hasValue = true;
-        }
-        interval.sampleSize += 1;
-    }
-
-    // Only trigger the tracker if all intervals are correct
-    if (useAnomalyDetection) {
-        // TODO: propgate proper values down stream when anomaly support doubles
-        long wholeBucketVal = intervals[0].value.long_value;
-        auto prev = mCurrentFullBucket.find(eventKey);
-        if (prev != mCurrentFullBucket.end()) {
-            wholeBucketVal += prev->second;
-        }
-        for (auto& tracker : mAnomalyTrackers) {
-            tracker->detectAndDeclareAnomaly(eventTimeNs, mCurrentBucketNum, mMetricId, eventKey,
-                                             wholeBucketVal);
-        }
-    }
-}
-
-// For pulled metrics, we always need to make sure we do a pull before flushing the bucket
-// if mCondition is true!
-void ValueMetricProducer::flushIfNeededLocked(const int64_t& eventTimeNs) {
-    int64_t currentBucketEndTimeNs = getCurrentBucketEndTimeNs();
-    if (eventTimeNs < currentBucketEndTimeNs) {
-        VLOG("eventTime is %lld, less than current bucket end time %lld", (long long)eventTimeNs,
-             (long long)(currentBucketEndTimeNs));
-        return;
-    }
-    int64_t numBucketsForward = calcBucketsForwardCount(eventTimeNs);
-    int64_t nextBucketStartTimeNs = currentBucketEndTimeNs + (numBucketsForward - 1) * mBucketSizeNs;
-    flushCurrentBucketLocked(eventTimeNs, nextBucketStartTimeNs);
-}
-
-int64_t ValueMetricProducer::calcBucketsForwardCount(const int64_t& eventTimeNs) const {
-    int64_t currentBucketEndTimeNs = getCurrentBucketEndTimeNs();
-    if (eventTimeNs < currentBucketEndTimeNs) {
-        return 0;
-    }
-    return 1 + (eventTimeNs - currentBucketEndTimeNs) / mBucketSizeNs;
-}
-
-void ValueMetricProducer::flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                                   const int64_t& nextBucketStartTimeNs) {
-    if (mCondition == ConditionState::kUnknown) {
-        StatsdStats::getInstance().noteBucketUnknownCondition(mMetricId);
-        invalidateCurrentBucketWithoutResetBase(eventTimeNs, BucketDropReason::CONDITION_UNKNOWN);
-    }
-
-    VLOG("finalizing bucket for %ld, dumping %d slices", (long)mCurrentBucketStartTimeNs,
-         (int)mCurrentSlicedBucket.size());
-
-    int64_t fullBucketEndTimeNs = getCurrentBucketEndTimeNs();
-    int64_t bucketEndTime = fullBucketEndTimeNs;
-    int64_t numBucketsForward = calcBucketsForwardCount(eventTimeNs);
-
-    // Skip buckets if this is a pulled metric or a pushed metric that is diffed.
-    if (numBucketsForward > 1 && (mIsPulled || mUseDiff)) {
-
-        VLOG("Skipping forward %lld buckets", (long long)numBucketsForward);
-        StatsdStats::getInstance().noteSkippedForwardBuckets(mMetricId);
-        // Something went wrong. Maybe the device was sleeping for a long time. It is better
-        // to mark the current bucket as invalid. The last pull might have been successful through.
-        invalidateCurrentBucketWithoutResetBase(eventTimeNs,
-                                                BucketDropReason::MULTIPLE_BUCKETS_SKIPPED);
-        // End the bucket at the next bucket start time so the entire interval is skipped.
-        bucketEndTime = nextBucketStartTimeNs;
-    } else if (eventTimeNs < fullBucketEndTimeNs) {
-        bucketEndTime = eventTimeNs;
-    }
-
-    // Close the current bucket.
-    int64_t conditionTrueDuration = mConditionTimer.newBucketStart(bucketEndTime);
-    bool isBucketLargeEnough = bucketEndTime - mCurrentBucketStartTimeNs >= mMinBucketSizeNs;
-    if (!isBucketLargeEnough) {
-        skipCurrentBucket(eventTimeNs, BucketDropReason::BUCKET_TOO_SMALL);
-    }
-    if (!mCurrentBucketIsSkipped) {
-        bool bucketHasData = false;
-        // The current bucket is large enough to keep.
-        for (const auto& slice : mCurrentSlicedBucket) {
-            ValueBucket bucket = buildPartialBucket(bucketEndTime, slice.second);
-            bucket.mConditionTrueNs = conditionTrueDuration;
-            // it will auto create new vector of ValuebucketInfo if the key is not found.
-            if (bucket.valueIndex.size() > 0) {
-                auto& bucketList = mPastBuckets[slice.first];
-                bucketList.push_back(bucket);
-                bucketHasData = true;
-            }
-        }
-        if (!bucketHasData) {
-            skipCurrentBucket(eventTimeNs, BucketDropReason::NO_DATA);
-        }
-    }
-
-    if (mCurrentBucketIsSkipped) {
-        mCurrentSkippedBucket.bucketStartTimeNs = mCurrentBucketStartTimeNs;
-        mCurrentSkippedBucket.bucketEndTimeNs = bucketEndTime;
-        mSkippedBuckets.emplace_back(mCurrentSkippedBucket);
-    }
-
-    // This means that the current bucket was not flushed before a forced bucket split.
-    // This can happen if an app update or a dump report with include_current_partial_bucket is
-    // requested before we get a chance to flush the bucket due to receiving new data, either from
-    // the statsd socket or the StatsPullerManager.
-    if (bucketEndTime < nextBucketStartTimeNs) {
-        SkippedBucket bucketInGap;
-        bucketInGap.bucketStartTimeNs = bucketEndTime;
-        bucketInGap.bucketEndTimeNs = nextBucketStartTimeNs;
-        bucketInGap.dropEvents.emplace_back(
-                buildDropEvent(eventTimeNs, BucketDropReason::NO_DATA));
-        mSkippedBuckets.emplace_back(bucketInGap);
-    }
-
-    appendToFullBucket(eventTimeNs > fullBucketEndTimeNs);
-    initCurrentSlicedBucket(nextBucketStartTimeNs);
-    // Update the condition timer again, in case we skipped buckets.
-    mConditionTimer.newBucketStart(nextBucketStartTimeNs);
-    mCurrentBucketNum += numBucketsForward;
-}
-
-ValueBucket ValueMetricProducer::buildPartialBucket(int64_t bucketEndTime,
-                                                    const std::vector<Interval>& intervals) {
-    ValueBucket bucket;
-    bucket.mBucketStartNs = mCurrentBucketStartTimeNs;
-    bucket.mBucketEndNs = bucketEndTime;
-    for (const auto& interval : intervals) {
-        if (interval.hasValue) {
-            // skip the output if the diff is zero
-            if (mSkipZeroDiffOutput && mUseDiff && interval.value.isZero()) {
-                continue;
-            }
-            bucket.valueIndex.push_back(interval.valueIndex);
-            if (mAggregationType != ValueMetric::AVG) {
-                bucket.values.push_back(interval.value);
-            } else {
-                double sum = interval.value.type == LONG ? (double)interval.value.long_value
-                                                         : interval.value.double_value;
-                bucket.values.push_back(Value((double)sum / interval.sampleSize));
-            }
-        }
-    }
-    return bucket;
-}
-
-void ValueMetricProducer::initCurrentSlicedBucket(int64_t nextBucketStartTimeNs) {
-    StatsdStats::getInstance().noteBucketCount(mMetricId);
-    // Cleanup data structure to aggregate values.
-    for (auto it = mCurrentSlicedBucket.begin(); it != mCurrentSlicedBucket.end();) {
-        bool obsolete = true;
-        for (auto& interval : it->second) {
-            interval.hasValue = false;
-            interval.sampleSize = 0;
-            if (interval.seenNewData) {
-                obsolete = false;
-            }
-            interval.seenNewData = false;
-        }
-
-        if (obsolete) {
-            it = mCurrentSlicedBucket.erase(it);
-        } else {
-            it++;
-        }
-        // TODO(b/157655103): remove mCurrentBaseInfo entries when obsolete
-    }
-
-    mCurrentBucketIsSkipped = false;
-    mCurrentSkippedBucket.reset();
-
-    // If we do not have a global base when the condition is true,
-    // we will have incomplete bucket for the next bucket.
-    if (mUseDiff && !mHasGlobalBase && mCondition) {
-        mCurrentBucketIsSkipped = false;
-    }
-    mCurrentBucketStartTimeNs = nextBucketStartTimeNs;
-    VLOG("metric %lld: new bucket start time: %lld", (long long)mMetricId,
-         (long long)mCurrentBucketStartTimeNs);
-}
-
-void ValueMetricProducer::appendToFullBucket(const bool isFullBucketReached) {
-    if (mCurrentBucketIsSkipped) {
-        if (isFullBucketReached) {
-            // If the bucket is invalid, we ignore the full bucket since it contains invalid data.
-            mCurrentFullBucket.clear();
-        }
-        // Current bucket is invalid, we do not add it to the full bucket.
-        return;
-    }
-
-    if (isFullBucketReached) {  // If full bucket, send to anomaly tracker.
-        // Accumulate partial buckets with current value and then send to anomaly tracker.
-        if (mCurrentFullBucket.size() > 0) {
-            for (const auto& slice : mCurrentSlicedBucket) {
-                if (hitFullBucketGuardRailLocked(slice.first)) {
-                    continue;
-                }
-                // TODO: fix this when anomaly can accept double values
-                auto& interval = slice.second[0];
-                if (interval.hasValue) {
-                    mCurrentFullBucket[slice.first] += interval.value.long_value;
-                }
-            }
-            for (const auto& slice : mCurrentFullBucket) {
-                for (auto& tracker : mAnomalyTrackers) {
-                    if (tracker != nullptr) {
-                        tracker->addPastBucket(slice.first, slice.second, mCurrentBucketNum);
-                    }
-                }
-            }
-            mCurrentFullBucket.clear();
-        } else {
-            // Skip aggregating the partial buckets since there's no previous partial bucket.
-            for (const auto& slice : mCurrentSlicedBucket) {
-                for (auto& tracker : mAnomalyTrackers) {
-                    if (tracker != nullptr) {
-                        // TODO: fix this when anomaly can accept double values
-                        auto& interval = slice.second[0];
-                        if (interval.hasValue) {
-                            tracker->addPastBucket(slice.first, interval.value.long_value,
-                                                   mCurrentBucketNum);
-                        }
-                    }
-                }
-            }
-        }
-    } else {
-        // Accumulate partial bucket.
-        for (const auto& slice : mCurrentSlicedBucket) {
-            // TODO: fix this when anomaly can accept double values
-            auto& interval = slice.second[0];
-            if (interval.hasValue) {
-                mCurrentFullBucket[slice.first] += interval.value.long_value;
-            }
-        }
-    }
-}
-
-size_t ValueMetricProducer::byteSizeLocked() const {
-    size_t totalSize = 0;
-    for (const auto& pair : mPastBuckets) {
-        totalSize += pair.second.size() * kBucketSize;
-    }
-    return totalSize;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.h b/cmds/statsd/src/metrics/ValueMetricProducer.h
deleted file mode 100644
index b359af7..0000000
--- a/cmds/statsd/src/metrics/ValueMetricProducer.h
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <gtest/gtest_prod.h>
-#include "anomaly/AnomalyTracker.h"
-#include "condition/ConditionTimer.h"
-#include "condition/ConditionTracker.h"
-#include "external/PullDataReceiver.h"
-#include "external/StatsPullerManager.h"
-#include "matchers/EventMatcherWizard.h"
-#include "stats_log_util.h"
-#include "MetricProducer.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-struct ValueBucket {
-    int64_t mBucketStartNs;
-    int64_t mBucketEndNs;
-    std::vector<int> valueIndex;
-    std::vector<Value> values;
-    // If the metric has no condition, then this field is just wasted.
-    // When we tune statsd memory usage in the future, this is a candidate to optimize.
-    int64_t mConditionTrueNs;
-};
-
-
-// Aggregates values within buckets.
-//
-// There are different events that might complete a bucket
-// - a condition change
-// - an app upgrade
-// - an alarm set to the end of the bucket
-class ValueMetricProducer : public virtual MetricProducer, public virtual PullDataReceiver {
-public:
-    ValueMetricProducer(
-            const ConfigKey& key, const ValueMetric& valueMetric, const int conditionIndex,
-            const vector<ConditionState>& initialConditionCache,
-            const sp<ConditionWizard>& conditionWizard, const int whatMatcherIndex,
-            const sp<EventMatcherWizard>& matcherWizard, const int pullTagId,
-            const int64_t timeBaseNs, const int64_t startTimeNs,
-            const sp<StatsPullerManager>& pullerManager,
-            const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap = {},
-            const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>&
-                    eventDeactivationMap = {},
-            const vector<int>& slicedStateAtoms = {},
-            const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap = {});
-
-    virtual ~ValueMetricProducer();
-
-    // Process data pulled on bucket boundary.
-    void onDataPulled(const std::vector<std::shared_ptr<LogEvent>>& data,
-                      bool pullSuccess, int64_t originalPullTimeNs) override;
-
-    // ValueMetric needs special logic if it's a pulled atom.
-    void notifyAppUpgrade(const int64_t& eventTimeNs) override {
-        std::lock_guard<std::mutex> lock(mMutex);
-        if (!mSplitBucketForAppUpgrade) {
-            return;
-        }
-        if (mIsPulled && mCondition == ConditionState::kTrue) {
-            pullAndMatchEventsLocked(eventTimeNs);
-        }
-        flushCurrentBucketLocked(eventTimeNs, eventTimeNs);
-    };
-
-    // ValueMetric needs special logic if it's a pulled atom.
-    void onStatsdInitCompleted(const int64_t& eventTimeNs) override {
-        std::lock_guard<std::mutex> lock(mMutex);
-        if (mIsPulled && mCondition == ConditionState::kTrue) {
-            pullAndMatchEventsLocked(eventTimeNs);
-        }
-        flushCurrentBucketLocked(eventTimeNs, eventTimeNs);
-    };
-
-    void onStateChanged(int64_t eventTimeNs, int32_t atomId, const HashableDimensionKey& primaryKey,
-                        const FieldValue& oldState, const FieldValue& newState) override;
-
-protected:
-    void onMatchedLogEventInternalLocked(
-            const size_t matcherIndex, const MetricDimensionKey& eventKey,
-            const ConditionKey& conditionKey, bool condition, const LogEvent& event,
-            const std::map<int, HashableDimensionKey>& statePrimaryKeys) override;
-
-private:
-    void onDumpReportLocked(const int64_t dumpTimeNs,
-                            const bool include_current_partial_bucket,
-                            const bool erase_data,
-                            const DumpLatency dumpLatency,
-                            std::set<string> *str_set,
-                            android::util::ProtoOutputStream* protoOutput) override;
-    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
-
-    // Internal interface to handle active state change.
-    void onActiveStateChangedLocked(const int64_t& eventTimeNs) override;
-
-    // Internal interface to handle condition change.
-    void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
-
-    // Internal interface to handle sliced condition change.
-    void onSlicedConditionMayChangeLocked(bool overallCondition, const int64_t eventTime) override;
-
-    // Internal function to calculate the current used bytes.
-    size_t byteSizeLocked() const override;
-
-    void dumpStatesLocked(FILE* out, bool verbose) const override;
-
-    // For pulled metrics, this method should only be called if a pull has be done. Else we will
-    // not have complete data for the bucket.
-    void flushIfNeededLocked(const int64_t& eventTime) override;
-
-    // For pulled metrics, this method should only be called if a pulled have be done. Else we will
-    // not have complete data for the bucket.
-    void flushCurrentBucketLocked(const int64_t& eventTimeNs,
-                                  const int64_t& nextBucketStartTimeNs) override;
-
-    void prepareFirstBucketLocked() override;
-
-    void dropDataLocked(const int64_t dropTimeNs) override;
-
-    // Calculate previous bucket end time based on current time.
-    int64_t calcPreviousBucketEndTime(const int64_t currentTimeNs);
-
-    // Calculate how many buckets are present between the current bucket and eventTimeNs.
-    int64_t calcBucketsForwardCount(const int64_t& eventTimeNs) const;
-
-    // Mark the data as invalid.
-    void invalidateCurrentBucket(const int64_t dropTimeNs, const BucketDropReason reason);
-
-    void invalidateCurrentBucketWithoutResetBase(const int64_t dropTimeNs,
-                                                 const BucketDropReason reason);
-
-    // Skips the current bucket without notifying StatsdStats of the skipped bucket.
-    // This should only be called from #flushCurrentBucketLocked. Otherwise, a future event that
-    // causes the bucket to be invalidated will not notify StatsdStats.
-    void skipCurrentBucket(const int64_t dropTimeNs, const BucketDropReason reason);
-
-    const int mWhatMatcherIndex;
-
-    sp<EventMatcherWizard> mEventMatcherWizard;
-
-    sp<StatsPullerManager> mPullerManager;
-
-    // Value fields for matching.
-    std::vector<Matcher> mFieldMatchers;
-
-    // Value fields for matching.
-    std::set<HashableDimensionKey> mMatchedMetricDimensionKeys;
-
-    // Holds the atom id, primary key pair from a state change.
-    pair<int32_t, HashableDimensionKey> mStateChangePrimaryKey;
-
-    // tagId for pulled data. -1 if this is not pulled
-    const int mPullTagId;
-
-    // if this is pulled metric
-    const bool mIsPulled;
-
-    // internal state of an ongoing aggregation bucket.
-    typedef struct {
-        // Index in multi value aggregation.
-        int valueIndex;
-        // Current value, depending on the aggregation type.
-        Value value;
-        // Number of samples collected.
-        int sampleSize;
-        // If this dimension has any non-tainted value. If not, don't report the
-        // dimension.
-        bool hasValue = false;
-        // Whether new data is seen in the bucket.
-        bool seenNewData = false;
-    } Interval;
-
-    typedef struct {
-        // Holds current base value of the dimension. Take diff and update if necessary.
-        Value base;
-        // Whether there is a base to diff to.
-        bool hasBase;
-        // Last seen state value(s).
-        HashableDimensionKey currentState;
-        // Whether this dimensions in what key has a current state key.
-        bool hasCurrentState;
-    } BaseInfo;
-
-    std::unordered_map<MetricDimensionKey, std::vector<Interval>> mCurrentSlicedBucket;
-
-    std::unordered_map<HashableDimensionKey, std::vector<BaseInfo>> mCurrentBaseInfo;
-
-    std::unordered_map<MetricDimensionKey, int64_t> mCurrentFullBucket;
-
-    // Save the past buckets and we can clear when the StatsLogReport is dumped.
-    std::unordered_map<MetricDimensionKey, std::vector<ValueBucket>> mPastBuckets;
-
-    const int64_t mMinBucketSizeNs;
-
-    // Util function to check whether the specified dimension hits the guardrail.
-    bool hitGuardRailLocked(const MetricDimensionKey& newKey);
-
-    bool hasReachedGuardRailLimit() const;
-
-    bool hitFullBucketGuardRailLocked(const MetricDimensionKey& newKey);
-
-    void pullAndMatchEventsLocked(const int64_t timestampNs);
-
-    void accumulateEvents(const std::vector<std::shared_ptr<LogEvent>>& allData,
-                          int64_t originalPullTimeNs, int64_t eventElapsedTimeNs);
-
-    ValueBucket buildPartialBucket(int64_t bucketEndTime,
-                                   const std::vector<Interval>& intervals);
-
-    void initCurrentSlicedBucket(int64_t nextBucketStartTimeNs);
-
-    void appendToFullBucket(const bool isFullBucketReached);
-
-    // Reset diff base and mHasGlobalBase
-    void resetBase();
-
-    static const size_t kBucketSize = sizeof(ValueBucket{});
-
-    const size_t mDimensionSoftLimit;
-
-    const size_t mDimensionHardLimit;
-
-    const bool mUseAbsoluteValueOnReset;
-
-    const ValueMetric::AggregationType mAggregationType;
-
-    const bool mUseDiff;
-
-    const ValueMetric::ValueDirection mValueDirection;
-
-    const bool mSkipZeroDiffOutput;
-
-    // If true, use a zero value as base to compute the diff.
-    // This is used for new keys which are present in the new data but was not
-    // present in the base data.
-    // The default base will only be used if we have a global base.
-    const bool mUseZeroDefaultBase;
-
-    // For pulled metrics, this is always set to true whenever a pull succeeds.
-    // It is set to false when a pull fails, or upon condition change to false.
-    // This is used to decide if we have the right base data to compute the
-    // diff against.
-    bool mHasGlobalBase;
-
-    // This is to track whether or not the bucket is skipped for any of the reasons listed in
-    // BucketDropReason, many of which make the bucket potentially invalid.
-    bool mCurrentBucketIsSkipped;
-
-    const int64_t mMaxPullDelayNs;
-
-    const bool mSplitBucketForAppUpgrade;
-
-    ConditionTimer mConditionTimer;
-
-    FRIEND_TEST(ValueMetricProducerTest, TestAnomalyDetection);
-    FRIEND_TEST(ValueMetricProducerTest, TestBaseSetOnConditionChange);
-    FRIEND_TEST(ValueMetricProducerTest, TestBucketBoundariesOnConditionChange);
-    FRIEND_TEST(ValueMetricProducerTest, TestBucketBoundaryNoCondition);
-    FRIEND_TEST(ValueMetricProducerTest, TestBucketBoundaryWithCondition);
-    FRIEND_TEST(ValueMetricProducerTest, TestBucketBoundaryWithCondition2);
-    FRIEND_TEST(ValueMetricProducerTest, TestBucketInvalidIfGlobalBaseIsNotSet);
-    FRIEND_TEST(ValueMetricProducerTest, TestCalcPreviousBucketEndTime);
-    FRIEND_TEST(ValueMetricProducerTest, TestDataIsNotUpdatedWhenNoConditionChanged);
-    FRIEND_TEST(ValueMetricProducerTest, TestEmptyDataResetsBase_onBucketBoundary);
-    FRIEND_TEST(ValueMetricProducerTest, TestEmptyDataResetsBase_onConditionChanged);
-    FRIEND_TEST(ValueMetricProducerTest, TestEmptyDataResetsBase_onDataPulled);
-    FRIEND_TEST(ValueMetricProducerTest, TestEventsWithNonSlicedCondition);
-    FRIEND_TEST(ValueMetricProducerTest, TestFirstBucket);
-    FRIEND_TEST(ValueMetricProducerTest, TestLateOnDataPulledWithDiff);
-    FRIEND_TEST(ValueMetricProducerTest, TestLateOnDataPulledWithoutDiff);
-    FRIEND_TEST(ValueMetricProducerTest, TestPartialResetOnBucketBoundaries);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledData_noDiff_bucketBoundaryFalse);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledData_noDiff_bucketBoundaryTrue);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledData_noDiff_withFailure);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledData_noDiff_withMultipleConditionChanges);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledData_noDiff_withoutCondition);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledEventsNoCondition);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledEventsTakeAbsoluteValueOnReset);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledEventsTakeZeroOnReset);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledEventsWithFiltering);
-    FRIEND_TEST(ValueMetricProducerTest, TestPulledWithAppUpgradeDisabled);
-    FRIEND_TEST(ValueMetricProducerTest, TestPushedAggregateAvg);
-    FRIEND_TEST(ValueMetricProducerTest, TestPushedAggregateMax);
-    FRIEND_TEST(ValueMetricProducerTest, TestPushedAggregateMin);
-    FRIEND_TEST(ValueMetricProducerTest, TestPushedAggregateSum);
-    FRIEND_TEST(ValueMetricProducerTest, TestPushedEventsWithCondition);
-    FRIEND_TEST(ValueMetricProducerTest, TestPushedEventsWithoutCondition);
-    FRIEND_TEST(ValueMetricProducerTest, TestResetBaseOnPullDelayExceeded);
-    FRIEND_TEST(ValueMetricProducerTest, TestResetBaseOnPullFailAfterConditionChange);
-    FRIEND_TEST(ValueMetricProducerTest, TestResetBaseOnPullFailAfterConditionChange_EndOfBucket);
-    FRIEND_TEST(ValueMetricProducerTest, TestResetBaseOnPullFailBeforeConditionChange);
-    FRIEND_TEST(ValueMetricProducerTest, TestResetBaseOnPullTooLate);
-    FRIEND_TEST(ValueMetricProducerTest, TestSkipZeroDiffOutput);
-    FRIEND_TEST(ValueMetricProducerTest, TestSkipZeroDiffOutputMultiValue);
-    FRIEND_TEST(ValueMetricProducerTest, TestSlicedState);
-    FRIEND_TEST(ValueMetricProducerTest, TestSlicedStateWithMap);
-    FRIEND_TEST(ValueMetricProducerTest, TestSlicedStateWithPrimaryField_WithDimensions);
-    FRIEND_TEST(ValueMetricProducerTest, TestSlicedStateWithCondition);
-    FRIEND_TEST(ValueMetricProducerTest, TestTrimUnusedDimensionKey);
-    FRIEND_TEST(ValueMetricProducerTest, TestUseZeroDefaultBase);
-    FRIEND_TEST(ValueMetricProducerTest, TestUseZeroDefaultBaseWithPullFailures);
-
-    FRIEND_TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenOneConditionFailed);
-    FRIEND_TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenInitialPullFailed);
-    FRIEND_TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenLastPullFailed);
-    FRIEND_TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenGuardRailHit);
-    FRIEND_TEST(ValueMetricProducerTest_BucketDrop,
-                TestInvalidBucketWhenAccumulateEventWrongBucket);
-
-    FRIEND_TEST(ValueMetricProducerTest_PartialBucket, TestBucketBoundariesOnPartialBucket);
-    FRIEND_TEST(ValueMetricProducerTest_PartialBucket, TestFullBucketResetWhenLastBucketInvalid);
-    FRIEND_TEST(ValueMetricProducerTest_PartialBucket, TestPartialBucketCreated);
-    FRIEND_TEST(ValueMetricProducerTest_PartialBucket, TestPushedEvents);
-    FRIEND_TEST(ValueMetricProducerTest_PartialBucket, TestPulledValue);
-    FRIEND_TEST(ValueMetricProducerTest_PartialBucket, TestPulledValueWhileConditionFalse);
-
-    friend class ValueMetricProducerTestHelper;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/duration_helper/DurationTracker.h b/cmds/statsd/src/metrics/duration_helper/DurationTracker.h
deleted file mode 100644
index 8d59d13..0000000
--- a/cmds/statsd/src/metrics/duration_helper/DurationTracker.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef DURATION_TRACKER_H
-#define DURATION_TRACKER_H
-
-#include "anomaly/DurationAnomalyTracker.h"
-#include "condition/ConditionWizard.h"
-#include "config/ConfigKey.h"
-#include "stats_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-enum DurationState {
-    kStopped = 0,  // The event is stopped.
-    kStarted = 1,  // The event is on going.
-    kPaused = 2,   // The event is started, but condition is false, clock is paused. When condition
-                   // turns to true, kPaused will become kStarted.
-};
-
-// Hold duration information for one atom level duration in current on-going bucket.
-struct DurationInfo {
-    DurationState state;
-
-    // the number of starts seen.
-    int32_t startCount;
-
-    // most recent start time.
-    int64_t lastStartTime;
-    // existing duration in current bucket.
-    int64_t lastDuration;
-    // cache the HashableDimensionKeys we need to query the condition for this duration event.
-    ConditionKey conditionKeys;
-
-    DurationInfo() : state(kStopped), startCount(0), lastStartTime(0), lastDuration(0){};
-};
-
-struct DurationBucket {
-    int64_t mBucketStartNs;
-    int64_t mBucketEndNs;
-    int64_t mDuration;
-};
-
-struct DurationValues {
-    // Recorded duration for current partial bucket.
-    int64_t mDuration;
-
-    // Sum of past partial bucket durations in current full bucket.
-    // Used for anomaly detection.
-    int64_t mDurationFullBucket;
-};
-
-class DurationTracker {
-public:
-    DurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey,
-                    sp<ConditionWizard> wizard, int conditionIndex, bool nesting,
-                    int64_t currentBucketStartNs, int64_t currentBucketNum, int64_t startTimeNs,
-                    int64_t bucketSizeNs, bool conditionSliced, bool fullLink,
-                    const std::vector<sp<DurationAnomalyTracker>>& anomalyTrackers)
-        : mConfigKey(key),
-          mTrackerId(id),
-          mEventKey(eventKey),
-          mWizard(wizard),
-          mConditionTrackerIndex(conditionIndex),
-          mBucketSizeNs(bucketSizeNs),
-          mNested(nesting),
-          mCurrentBucketStartTimeNs(currentBucketStartNs),
-          mDuration(0),
-          mCurrentBucketNum(currentBucketNum),
-          mStartTimeNs(startTimeNs),
-          mConditionSliced(conditionSliced),
-          mHasLinksToAllConditionDimensionsInTracker(fullLink),
-          mAnomalyTrackers(anomalyTrackers){};
-
-    virtual ~DurationTracker(){};
-
-    virtual void noteStart(const HashableDimensionKey& key, bool condition, const int64_t eventTime,
-                           const ConditionKey& conditionKey) = 0;
-    virtual void noteStop(const HashableDimensionKey& key, const int64_t eventTime,
-                          const bool stopAll) = 0;
-    virtual void noteStopAll(const int64_t eventTime) = 0;
-
-    virtual void onSlicedConditionMayChange(bool overallCondition, const int64_t timestamp) = 0;
-    virtual void onConditionChanged(bool condition, const int64_t timestamp) = 0;
-
-    virtual void onStateChanged(const int64_t timestamp, const int32_t atomId,
-                                const FieldValue& newState) = 0;
-
-    // Flush stale buckets if needed, and return true if the tracker has no on-going duration
-    // events, so that the owner can safely remove the tracker.
-    virtual bool flushIfNeeded(
-            int64_t timestampNs,
-            std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) = 0;
-
-    // Should only be called during an app upgrade or from this tracker's flushIfNeeded. If from
-    // an app upgrade, we assume that we're trying to form a partial bucket.
-    virtual bool flushCurrentBucket(
-            const int64_t& eventTimeNs,
-            std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) = 0;
-
-    // Predict the anomaly timestamp given the current status.
-    virtual int64_t predictAnomalyTimestampNs(const DurationAnomalyTracker& anomalyTracker,
-                                              const int64_t currentTimestamp) const = 0;
-    // Dump internal states for debugging
-    virtual void dumpStates(FILE* out, bool verbose) const = 0;
-
-    virtual int64_t getCurrentStateKeyDuration() const = 0;
-
-    virtual int64_t getCurrentStateKeyFullBucketDuration() const = 0;
-
-    // Replace old value with new value for the given state atom.
-    virtual void updateCurrentStateKey(const int32_t atomId, const FieldValue& newState) = 0;
-
-protected:
-    int64_t getCurrentBucketEndTimeNs() const {
-        return mStartTimeNs + (mCurrentBucketNum + 1) * mBucketSizeNs;
-    }
-
-    // Starts the anomaly alarm.
-    void startAnomalyAlarm(const int64_t eventTime) {
-        for (auto& anomalyTracker : mAnomalyTrackers) {
-            if (anomalyTracker != nullptr) {
-                const int64_t alarmTimestampNs =
-                    predictAnomalyTimestampNs(*anomalyTracker, eventTime);
-                if (alarmTimestampNs > 0) {
-                    anomalyTracker->startAlarm(mEventKey, alarmTimestampNs);
-                }
-            }
-        }
-    }
-
-    // Stops the anomaly alarm. If it should have already fired, declare the anomaly now.
-    void stopAnomalyAlarm(const int64_t timestamp) {
-        for (auto& anomalyTracker : mAnomalyTrackers) {
-            if (anomalyTracker != nullptr) {
-                anomalyTracker->stopAlarm(mEventKey, timestamp);
-            }
-        }
-    }
-
-    void addPastBucketToAnomalyTrackers(const MetricDimensionKey eventKey,
-                                        const int64_t& bucketValue, const int64_t& bucketNum) {
-        for (auto& anomalyTracker : mAnomalyTrackers) {
-            if (anomalyTracker != nullptr) {
-                anomalyTracker->addPastBucket(eventKey, bucketValue, bucketNum);
-            }
-        }
-    }
-
-    void detectAndDeclareAnomaly(const int64_t& timestamp, const int64_t& currBucketNum,
-                                 const int64_t& currentBucketValue) {
-        for (auto& anomalyTracker : mAnomalyTrackers) {
-            if (anomalyTracker != nullptr) {
-                anomalyTracker->detectAndDeclareAnomaly(timestamp, currBucketNum, mTrackerId,
-                                                        mEventKey, currentBucketValue);
-            }
-        }
-    }
-
-    // Convenience to compute the current bucket's end time, which is always aligned with the
-    // start time of the metric.
-    int64_t getCurrentBucketEndTimeNs() {
-        return mStartTimeNs + (mCurrentBucketNum + 1) * mBucketSizeNs;
-    }
-
-    void setEventKey(const MetricDimensionKey& eventKey) {
-        mEventKey = eventKey;
-    }
-
-    // A reference to the DurationMetricProducer's config key.
-    const ConfigKey& mConfigKey;
-
-    const int64_t mTrackerId;
-
-    MetricDimensionKey mEventKey;
-
-    sp<ConditionWizard> mWizard;
-
-    const int mConditionTrackerIndex;
-
-    const int64_t mBucketSizeNs;
-
-    const bool mNested;
-
-    int64_t mCurrentBucketStartTimeNs;
-
-    int64_t mDuration;  // current recorded duration result (for partial bucket)
-
-    // Recorded duration results for each state key in the current partial bucket.
-    std::unordered_map<HashableDimensionKey, DurationValues> mStateKeyDurationMap;
-
-    int64_t mCurrentBucketNum;
-
-    const int64_t mStartTimeNs;
-
-    const bool mConditionSliced;
-
-    bool mHasLinksToAllConditionDimensionsInTracker;
-
-    std::vector<sp<DurationAnomalyTracker>> mAnomalyTrackers;
-
-    FRIEND_TEST(OringDurationTrackerTest, TestPredictAnomalyTimestamp);
-    FRIEND_TEST(OringDurationTrackerTest, TestAnomalyDetectionExpiredAlarm);
-    FRIEND_TEST(OringDurationTrackerTest, TestAnomalyDetectionFiredAlarm);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // DURATION_TRACKER_H
diff --git a/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp b/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp
deleted file mode 100644
index ee4e167..0000000
--- a/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false
-
-#include "Log.h"
-#include "MaxDurationTracker.h"
-#include "guardrail/StatsdStats.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-MaxDurationTracker::MaxDurationTracker(const ConfigKey& key, const int64_t& id,
-                                       const MetricDimensionKey& eventKey,
-                                       sp<ConditionWizard> wizard, int conditionIndex, bool nesting,
-                                       int64_t currentBucketStartNs, int64_t currentBucketNum,
-                                       int64_t startTimeNs, int64_t bucketSizeNs,
-                                       bool conditionSliced, bool fullLink,
-                                       const vector<sp<DurationAnomalyTracker>>& anomalyTrackers)
-    : DurationTracker(key, id, eventKey, wizard, conditionIndex, nesting, currentBucketStartNs,
-                      currentBucketNum, startTimeNs, bucketSizeNs, conditionSliced, fullLink,
-                      anomalyTrackers) {
-}
-
-bool MaxDurationTracker::hitGuardRail(const HashableDimensionKey& newKey) {
-    // ===========GuardRail==============
-    if (mInfos.find(newKey) != mInfos.end()) {
-        // if the key existed, we are good!
-        return false;
-    }
-    // 1. Report the tuple count if the tuple count > soft limit
-    if (mInfos.size() > StatsdStats::kDimensionKeySizeSoftLimit - 1) {
-        size_t newTupleCount = mInfos.size() + 1;
-        StatsdStats::getInstance().noteMetricDimensionSize(mConfigKey, mTrackerId, newTupleCount);
-        // 2. Don't add more tuples, we are above the allowed threshold. Drop the data.
-        if (newTupleCount > StatsdStats::kDimensionKeySizeHardLimit) {
-            ALOGE("MaxDurTracker %lld dropping data for dimension key %s",
-                (long long)mTrackerId, newKey.toString().c_str());
-            return true;
-        }
-    }
-    return false;
-}
-
-void MaxDurationTracker::noteStart(const HashableDimensionKey& key, bool condition,
-                                   const int64_t eventTime, const ConditionKey& conditionKey) {
-    // this will construct a new DurationInfo if this key didn't exist.
-    if (hitGuardRail(key)) {
-        return;
-    }
-
-    DurationInfo& duration = mInfos[key];
-    if (mConditionSliced) {
-        duration.conditionKeys = conditionKey;
-    }
-    VLOG("MaxDuration: key %s start condition %d", key.toString().c_str(), condition);
-
-    switch (duration.state) {
-        case kStarted:
-            duration.startCount++;
-            break;
-        case kPaused:
-            duration.startCount++;
-            break;
-        case kStopped:
-            if (!condition) {
-                // event started, but we need to wait for the condition to become true.
-                duration.state = DurationState::kPaused;
-            } else {
-                duration.state = DurationState::kStarted;
-                duration.lastStartTime = eventTime;
-                startAnomalyAlarm(eventTime);
-            }
-            duration.startCount = 1;
-            break;
-    }
-}
-
-void MaxDurationTracker::noteStop(const HashableDimensionKey& key, const int64_t eventTime,
-                                  bool forceStop) {
-    VLOG("MaxDuration: key %s stop", key.toString().c_str());
-    if (mInfos.find(key) == mInfos.end()) {
-        // we didn't see a start event before. do nothing.
-        return;
-    }
-    DurationInfo& duration = mInfos[key];
-
-    switch (duration.state) {
-        case DurationState::kStopped:
-            // already stopped, do nothing.
-            break;
-        case DurationState::kStarted: {
-            duration.startCount--;
-            if (forceStop || !mNested || duration.startCount <= 0) {
-                stopAnomalyAlarm(eventTime);
-                duration.state = DurationState::kStopped;
-                int64_t durationTime = eventTime - duration.lastStartTime;
-                VLOG("Max, key %s, Stop %lld %lld %lld", key.toString().c_str(),
-                     (long long)duration.lastStartTime, (long long)eventTime,
-                     (long long)durationTime);
-                duration.lastDuration += durationTime;
-                if (anyStarted()) {
-                    // In case any other dimensions are still started, we need to keep the alarm
-                    // set.
-                    startAnomalyAlarm(eventTime);
-                }
-                VLOG("  record duration: %lld ", (long long)duration.lastDuration);
-            }
-            break;
-        }
-        case DurationState::kPaused: {
-            duration.startCount--;
-            if (forceStop || !mNested || duration.startCount <= 0) {
-                duration.state = DurationState::kStopped;
-            }
-            break;
-        }
-    }
-
-    if (duration.lastDuration > mDuration) {
-        mDuration = duration.lastDuration;
-        VLOG("Max: new max duration: %lld", (long long)mDuration);
-    }
-    // Once an atom duration ends, we erase it. Next time, if we see another atom event with the
-    // same name, they are still considered as different atom durations.
-    if (duration.state == DurationState::kStopped) {
-        mInfos.erase(key);
-    }
-}
-
-bool MaxDurationTracker::anyStarted() {
-    for (auto& pair : mInfos) {
-        if (pair.second.state == kStarted) {
-            return true;
-        }
-    }
-    return false;
-}
-
-void MaxDurationTracker::noteStopAll(const int64_t eventTime) {
-    std::set<HashableDimensionKey> keys;
-    for (const auto& pair : mInfos) {
-        keys.insert(pair.first);
-    }
-    for (auto& key : keys) {
-        noteStop(key, eventTime, true);
-    }
-}
-
-bool MaxDurationTracker::flushCurrentBucket(
-        const int64_t& eventTimeNs,
-        std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) {
-    VLOG("MaxDurationTracker flushing.....");
-
-    // adjust the bucket start time
-    int numBucketsForward = 0;
-    int64_t fullBucketEnd = getCurrentBucketEndTimeNs();
-    int64_t currentBucketEndTimeNs;
-    if (eventTimeNs >= fullBucketEnd) {
-        numBucketsForward = 1 + (eventTimeNs - fullBucketEnd) / mBucketSizeNs;
-        currentBucketEndTimeNs = fullBucketEnd;
-    } else {
-        // This must be a partial bucket.
-        currentBucketEndTimeNs = eventTimeNs;
-    }
-
-    bool hasPendingEvent =
-            false;  // has either a kStarted or kPaused event across bucket boundaries
-    // meaning we need to carry them over to the new bucket.
-    for (auto it = mInfos.begin(); it != mInfos.end();) {
-        if (it->second.state == DurationState::kStopped) {
-            // No need to keep buckets for events that were stopped before.
-            it = mInfos.erase(it);
-        } else {
-            ++it;
-            hasPendingEvent = true;
-        }
-    }
-
-    // mDuration is updated in noteStop to the maximum duration that ended in the current bucket.
-    if (mDuration != 0) {
-        DurationBucket info;
-        info.mBucketStartNs = mCurrentBucketStartTimeNs;
-        info.mBucketEndNs = currentBucketEndTimeNs;
-        info.mDuration = mDuration;
-        (*output)[mEventKey].push_back(info);
-        VLOG("  final duration for last bucket: %lld", (long long)mDuration);
-    }
-
-    if (numBucketsForward > 0) {
-        mCurrentBucketStartTimeNs = fullBucketEnd + (numBucketsForward - 1) * mBucketSizeNs;
-        mCurrentBucketNum += numBucketsForward;
-    } else {  // We must be forming a partial bucket.
-        mCurrentBucketStartTimeNs = eventTimeNs;
-    }
-
-    mDuration = 0;
-    // If this tracker has no pending events, tell owner to remove.
-    return !hasPendingEvent;
-}
-
-bool MaxDurationTracker::flushIfNeeded(
-        int64_t eventTimeNs, unordered_map<MetricDimensionKey, vector<DurationBucket>>* output) {
-    if (eventTimeNs < getCurrentBucketEndTimeNs()) {
-        return false;
-    }
-    return flushCurrentBucket(eventTimeNs, output);
-}
-
-void MaxDurationTracker::onSlicedConditionMayChange(bool overallCondition,
-                                                    const int64_t timestamp) {
-    // Now for each of the on-going event, check if the condition has changed for them.
-    for (auto& pair : mInfos) {
-        if (pair.second.state == kStopped) {
-            continue;
-        }
-        ConditionState conditionState = mWizard->query(
-            mConditionTrackerIndex, pair.second.conditionKeys,
-            !mHasLinksToAllConditionDimensionsInTracker);
-        bool conditionMet = (conditionState == ConditionState::kTrue);
-
-        VLOG("key: %s, condition: %d", pair.first.toString().c_str(), conditionMet);
-        noteConditionChanged(pair.first, conditionMet, timestamp);
-    }
-}
-
-void MaxDurationTracker::onStateChanged(const int64_t timestamp, const int32_t atomId,
-                                        const FieldValue& newState) {
-    ALOGE("MaxDurationTracker does not handle sliced state changes.");
-}
-
-void MaxDurationTracker::onConditionChanged(bool condition, const int64_t timestamp) {
-    for (auto& pair : mInfos) {
-        noteConditionChanged(pair.first, condition, timestamp);
-    }
-}
-
-void MaxDurationTracker::noteConditionChanged(const HashableDimensionKey& key, bool conditionMet,
-                                              const int64_t timestamp) {
-    auto it = mInfos.find(key);
-    if (it == mInfos.end()) {
-        return;
-    }
-
-    switch (it->second.state) {
-        case kStarted:
-            // If condition becomes false, kStarted -> kPaused. Record the current duration and
-            // stop anomaly alarm.
-            if (!conditionMet) {
-                stopAnomalyAlarm(timestamp);
-                it->second.state = DurationState::kPaused;
-                it->second.lastDuration += (timestamp - it->second.lastStartTime);
-                if (anyStarted()) {
-                    // In case any other dimensions are still started, we need to set the alarm.
-                    startAnomalyAlarm(timestamp);
-                }
-                VLOG("MaxDurationTracker Key: %s Started->Paused ", key.toString().c_str());
-            }
-            break;
-        case kStopped:
-            // Nothing to do if it's stopped.
-            break;
-        case kPaused:
-            // If condition becomes true, kPaused -> kStarted. and the start time is the condition
-            // change time.
-            if (conditionMet) {
-                it->second.state = DurationState::kStarted;
-                it->second.lastStartTime = timestamp;
-                startAnomalyAlarm(timestamp);
-                VLOG("MaxDurationTracker Key: %s Paused->Started", key.toString().c_str());
-            }
-            break;
-    }
-    // Note that we don't update mDuration here since it's only updated during noteStop.
-}
-
-int64_t MaxDurationTracker::predictAnomalyTimestampNs(const DurationAnomalyTracker& anomalyTracker,
-                                                      const int64_t currentTimestamp) const {
-    // The allowed time we can continue in the current state is the
-    // (anomaly threshold) - max(elapsed time of the started mInfos).
-    int64_t maxElapsed = 0;
-    for (auto it = mInfos.begin(); it != mInfos.end(); ++it) {
-        if (it->second.state == DurationState::kStarted) {
-            int64_t duration =
-                    it->second.lastDuration + (currentTimestamp - it->second.lastStartTime);
-            if (duration > maxElapsed) {
-                maxElapsed = duration;
-            }
-        }
-    }
-    int64_t anomalyTimeNs = currentTimestamp + anomalyTracker.getAnomalyThreshold() - maxElapsed;
-    int64_t refractoryEndNs = anomalyTracker.getRefractoryPeriodEndsSec(mEventKey) * NS_PER_SEC;
-    return std::max(anomalyTimeNs, refractoryEndNs);
-}
-
-void MaxDurationTracker::dumpStates(FILE* out, bool verbose) const {
-    fprintf(out, "\t\t sub-durations %lu\n", (unsigned long)mInfos.size());
-    fprintf(out, "\t\t current duration %lld\n", (long long)mDuration);
-}
-
-int64_t MaxDurationTracker::getCurrentStateKeyDuration() const {
-    ALOGE("MaxDurationTracker does not handle sliced state changes.");
-    return -1;
-}
-
-int64_t MaxDurationTracker::getCurrentStateKeyFullBucketDuration() const {
-    ALOGE("MaxDurationTracker does not handle sliced state changes.");
-    return -1;
-}
-
-void MaxDurationTracker::updateCurrentStateKey(const int32_t atomId, const FieldValue& newState) {
-    ALOGE("MaxDurationTracker does not handle sliced state changes.");
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.h b/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.h
deleted file mode 100644
index 2891c6e..0000000
--- a/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef MAX_DURATION_TRACKER_H
-#define MAX_DURATION_TRACKER_H
-
-#include "DurationTracker.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Tracks a pool of atom durations, and output the max duration for each bucket.
-// To get max duration, we need to keep track of each individual durations, and compare them when
-// they stop or bucket expires.
-class MaxDurationTracker : public DurationTracker {
-public:
-    MaxDurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey,
-                       sp<ConditionWizard> wizard, int conditionIndex,
-                       bool nesting,
-                       int64_t currentBucketStartNs, int64_t currentBucketNum,
-                       int64_t startTimeNs, int64_t bucketSizeNs, bool conditionSliced,
-                       bool fullLink,
-                       const std::vector<sp<DurationAnomalyTracker>>& anomalyTrackers);
-
-    MaxDurationTracker(const MaxDurationTracker& tracker) = default;
-
-    void noteStart(const HashableDimensionKey& key, bool condition, const int64_t eventTime,
-                   const ConditionKey& conditionKey) override;
-    void noteStop(const HashableDimensionKey& key, const int64_t eventTime,
-                  const bool stopAll) override;
-    void noteStopAll(const int64_t eventTime) override;
-
-    bool flushIfNeeded(
-            int64_t timestampNs,
-            std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override;
-    bool flushCurrentBucket(
-            const int64_t& eventTimeNs,
-            std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>*) override;
-
-    void onSlicedConditionMayChange(bool overallCondition, const int64_t timestamp) override;
-    void onConditionChanged(bool condition, const int64_t timestamp) override;
-
-    void onStateChanged(const int64_t timestamp, const int32_t atomId,
-                        const FieldValue& newState) override;
-
-    int64_t predictAnomalyTimestampNs(const DurationAnomalyTracker& anomalyTracker,
-                                      const int64_t currentTimestamp) const override;
-    void dumpStates(FILE* out, bool verbose) const override;
-
-    int64_t getCurrentStateKeyDuration() const override;
-
-    int64_t getCurrentStateKeyFullBucketDuration() const override;
-
-    void updateCurrentStateKey(const int32_t atomId, const FieldValue& newState);
-
-private:
-    // Returns true if at least one of the mInfos is started.
-    bool anyStarted();
-
-    std::unordered_map<HashableDimensionKey, DurationInfo> mInfos;
-
-    void noteConditionChanged(const HashableDimensionKey& key, bool conditionMet,
-                              const int64_t timestamp);
-
-    // return true if we should not allow newKey to be tracked because we are above the threshold
-    bool hitGuardRail(const HashableDimensionKey& newKey);
-
-    FRIEND_TEST(MaxDurationTrackerTest, TestSimpleMaxDuration);
-    FRIEND_TEST(MaxDurationTrackerTest, TestCrossBucketBoundary);
-    FRIEND_TEST(MaxDurationTrackerTest, TestMaxDurationWithCondition);
-    FRIEND_TEST(MaxDurationTrackerTest, TestStopAll);
-    FRIEND_TEST(MaxDurationTrackerTest, TestAnomalyDetection);
-    FRIEND_TEST(MaxDurationTrackerTest, TestAnomalyPredictedTimestamp);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // MAX_DURATION_TRACKER_H
diff --git a/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.cpp b/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.cpp
deleted file mode 100644
index 0d49bbc..0000000
--- a/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.cpp
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false
-#include "Log.h"
-#include "OringDurationTracker.h"
-#include "guardrail/StatsdStats.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::pair;
-
-OringDurationTracker::OringDurationTracker(
-        const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey,
-        sp<ConditionWizard> wizard, int conditionIndex, bool nesting, int64_t currentBucketStartNs,
-        int64_t currentBucketNum, int64_t startTimeNs, int64_t bucketSizeNs, bool conditionSliced,
-        bool fullLink, const vector<sp<DurationAnomalyTracker>>& anomalyTrackers)
-    : DurationTracker(key, id, eventKey, wizard, conditionIndex, nesting, currentBucketStartNs,
-                      currentBucketNum, startTimeNs, bucketSizeNs, conditionSliced, fullLink,
-                      anomalyTrackers),
-      mStarted(),
-      mPaused() {
-    mLastStartTime = 0;
-}
-
-bool OringDurationTracker::hitGuardRail(const HashableDimensionKey& newKey) {
-    // ===========GuardRail==============
-    // 1. Report the tuple count if the tuple count > soft limit
-    if (mConditionKeyMap.find(newKey) != mConditionKeyMap.end()) {
-        return false;
-    }
-    if (mConditionKeyMap.size() > StatsdStats::kDimensionKeySizeSoftLimit - 1) {
-        size_t newTupleCount = mConditionKeyMap.size() + 1;
-        StatsdStats::getInstance().noteMetricDimensionSize(mConfigKey, mTrackerId, newTupleCount);
-        // 2. Don't add more tuples, we are above the allowed threshold. Drop the data.
-        if (newTupleCount > StatsdStats::kDimensionKeySizeHardLimit) {
-            ALOGE("OringDurTracker %lld dropping data for dimension key %s",
-                (long long)mTrackerId, newKey.toString().c_str());
-            return true;
-        }
-    }
-    return false;
-}
-
-void OringDurationTracker::noteStart(const HashableDimensionKey& key, bool condition,
-                                     const int64_t eventTime, const ConditionKey& conditionKey) {
-    if (hitGuardRail(key)) {
-        return;
-    }
-    if (condition) {
-        if (mStarted.size() == 0) {
-            mLastStartTime = eventTime;
-            VLOG("record first start....");
-            startAnomalyAlarm(eventTime);
-        }
-        mStarted[key]++;
-    } else {
-        mPaused[key]++;
-    }
-
-    if (mConditionSliced && mConditionKeyMap.find(key) == mConditionKeyMap.end()) {
-        mConditionKeyMap[key] = conditionKey;
-    }
-    VLOG("Oring: %s start, condition %d", key.toString().c_str(), condition);
-}
-
-void OringDurationTracker::noteStop(const HashableDimensionKey& key, const int64_t timestamp,
-                                    const bool stopAll) {
-    VLOG("Oring: %s stop", key.toString().c_str());
-    auto it = mStarted.find(key);
-    if (it != mStarted.end()) {
-        (it->second)--;
-        if (stopAll || !mNested || it->second <= 0) {
-            mStarted.erase(it);
-            mConditionKeyMap.erase(key);
-        }
-        if (mStarted.empty()) {
-            mStateKeyDurationMap[mEventKey.getStateValuesKey()].mDuration +=
-                    (timestamp - mLastStartTime);
-            detectAndDeclareAnomaly(
-                    timestamp, mCurrentBucketNum,
-                    getCurrentStateKeyDuration() + getCurrentStateKeyFullBucketDuration());
-            VLOG("record duration %lld, total duration %lld for state key %s",
-                 (long long)timestamp - mLastStartTime, (long long)getCurrentStateKeyDuration(),
-                 mEventKey.getStateValuesKey().toString().c_str());
-        }
-    }
-
-    auto pausedIt = mPaused.find(key);
-    if (pausedIt != mPaused.end()) {
-        (pausedIt->second)--;
-        if (stopAll || !mNested || pausedIt->second <= 0) {
-            mPaused.erase(pausedIt);
-            mConditionKeyMap.erase(key);
-        }
-    }
-    if (mStarted.empty()) {
-        stopAnomalyAlarm(timestamp);
-    }
-}
-
-void OringDurationTracker::noteStopAll(const int64_t timestamp) {
-    if (!mStarted.empty()) {
-        mStateKeyDurationMap[mEventKey.getStateValuesKey()].mDuration +=
-                (timestamp - mLastStartTime);
-        VLOG("Oring Stop all: record duration %lld, total duration %lld for state key %s",
-             (long long)timestamp - mLastStartTime, (long long)getCurrentStateKeyDuration(),
-             mEventKey.getStateValuesKey().toString().c_str());
-        detectAndDeclareAnomaly(
-                timestamp, mCurrentBucketNum,
-                getCurrentStateKeyDuration() + getCurrentStateKeyFullBucketDuration());
-    }
-
-    stopAnomalyAlarm(timestamp);
-    mStarted.clear();
-    mPaused.clear();
-    mConditionKeyMap.clear();
-}
-
-bool OringDurationTracker::flushCurrentBucket(
-        const int64_t& eventTimeNs,
-        std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) {
-    VLOG("OringDurationTracker Flushing.............");
-
-    // Note that we have to mimic the bucket time changes we do in the
-    // MetricProducer#notifyAppUpgrade.
-
-    int numBucketsForward = 0;
-    int64_t fullBucketEnd = getCurrentBucketEndTimeNs();
-    int64_t currentBucketEndTimeNs;
-
-    if (eventTimeNs >= fullBucketEnd) {
-        numBucketsForward = 1 + (eventTimeNs - fullBucketEnd) / mBucketSizeNs;
-        currentBucketEndTimeNs = fullBucketEnd;
-    } else {
-        // This must be a partial bucket.
-        currentBucketEndTimeNs = eventTimeNs;
-    }
-
-    // Process the current bucket.
-    if (mStarted.size() > 0) {
-        // Calculate the duration for the current state key.
-        mStateKeyDurationMap[mEventKey.getStateValuesKey()].mDuration +=
-                (currentBucketEndTimeNs - mLastStartTime);
-    }
-    // Store DurationBucket info for each whatKey, stateKey pair.
-    // Note: The whatKey stored in mEventKey is constant for each DurationTracker, while the
-    // stateKey stored in mEventKey is only the current stateKey. mStateKeyDurationMap is used to
-    // store durations for each stateKey, so we need to flush the bucket by creating a
-    // DurationBucket for each stateKey.
-    for (auto& durationIt : mStateKeyDurationMap) {
-        if (durationIt.second.mDuration > 0) {
-            DurationBucket current_info;
-            current_info.mBucketStartNs = mCurrentBucketStartTimeNs;
-            current_info.mBucketEndNs = currentBucketEndTimeNs;
-            current_info.mDuration = durationIt.second.mDuration;
-            (*output)[MetricDimensionKey(mEventKey.getDimensionKeyInWhat(), durationIt.first)]
-                    .push_back(current_info);
-
-            durationIt.second.mDurationFullBucket += durationIt.second.mDuration;
-            VLOG("  duration: %lld", (long long)current_info.mDuration);
-        }
-
-        if (eventTimeNs > fullBucketEnd) {
-            // End of full bucket, can send to anomaly tracker now.
-            addPastBucketToAnomalyTrackers(
-                    MetricDimensionKey(mEventKey.getDimensionKeyInWhat(), durationIt.first),
-                    getCurrentStateKeyFullBucketDuration(), mCurrentBucketNum);
-            durationIt.second.mDurationFullBucket = 0;
-        }
-        durationIt.second.mDuration = 0;
-    }
-
-    if (mStarted.size() > 0) {
-        for (int i = 1; i < numBucketsForward; i++) {
-            DurationBucket info;
-            info.mBucketStartNs = fullBucketEnd + mBucketSizeNs * (i - 1);
-            info.mBucketEndNs = info.mBucketStartNs + mBucketSizeNs;
-            info.mDuration = mBucketSizeNs;
-            // Full duration buckets are attributed to the current stateKey.
-            (*output)[mEventKey].push_back(info);
-            // Safe to send these buckets to anomaly tracker since they must be full buckets.
-            // If it's a partial bucket, numBucketsForward would be 0.
-            addPastBucketToAnomalyTrackers(mEventKey, info.mDuration, mCurrentBucketNum + i);
-            VLOG("  add filling bucket with duration %lld", (long long)info.mDuration);
-        }
-    } else {
-        if (numBucketsForward >= 2) {
-            addPastBucketToAnomalyTrackers(mEventKey, 0, mCurrentBucketNum + numBucketsForward - 1);
-        }
-    }
-
-    if (numBucketsForward > 0) {
-        mCurrentBucketStartTimeNs = fullBucketEnd + (numBucketsForward - 1) * mBucketSizeNs;
-        mCurrentBucketNum += numBucketsForward;
-    } else {  // We must be forming a partial bucket.
-        mCurrentBucketStartTimeNs = eventTimeNs;
-    }
-    mLastStartTime = mCurrentBucketStartTimeNs;
-
-    // if all stopped, then tell owner it's safe to remove this tracker.
-    return mStarted.empty() && mPaused.empty();
-}
-
-bool OringDurationTracker::flushIfNeeded(
-        int64_t eventTimeNs, unordered_map<MetricDimensionKey, vector<DurationBucket>>* output) {
-    if (eventTimeNs < getCurrentBucketEndTimeNs()) {
-        return false;
-    }
-    return flushCurrentBucket(eventTimeNs, output);
-}
-
-void OringDurationTracker::onSlicedConditionMayChange(bool overallCondition,
-                                                      const int64_t timestamp) {
-    vector<pair<HashableDimensionKey, int>> startedToPaused;
-    vector<pair<HashableDimensionKey, int>> pausedToStarted;
-    if (!mStarted.empty()) {
-        for (auto it = mStarted.begin(); it != mStarted.end();) {
-            const auto& key = it->first;
-            const auto& condIt = mConditionKeyMap.find(key);
-            if (condIt == mConditionKeyMap.end()) {
-                VLOG("Key %s dont have condition key", key.toString().c_str());
-                ++it;
-                continue;
-            }
-            ConditionState conditionState =
-                mWizard->query(mConditionTrackerIndex, condIt->second,
-                               !mHasLinksToAllConditionDimensionsInTracker);
-            if (conditionState != ConditionState::kTrue) {
-                startedToPaused.push_back(*it);
-                it = mStarted.erase(it);
-                VLOG("Key %s started -> paused", key.toString().c_str());
-            } else {
-                ++it;
-            }
-        }
-
-        if (mStarted.empty()) {
-            mStateKeyDurationMap[mEventKey.getStateValuesKey()].mDuration +=
-                    (timestamp - mLastStartTime);
-            VLOG("record duration %lld, total duration %lld for state key %s",
-                 (long long)(timestamp - mLastStartTime), (long long)getCurrentStateKeyDuration(),
-                 mEventKey.getStateValuesKey().toString().c_str());
-            detectAndDeclareAnomaly(
-                    timestamp, mCurrentBucketNum,
-                    getCurrentStateKeyDuration() + getCurrentStateKeyFullBucketDuration());
-        }
-    }
-
-    if (!mPaused.empty()) {
-        for (auto it = mPaused.begin(); it != mPaused.end();) {
-            const auto& key = it->first;
-            if (mConditionKeyMap.find(key) == mConditionKeyMap.end()) {
-                VLOG("Key %s dont have condition key", key.toString().c_str());
-                ++it;
-                continue;
-            }
-            ConditionState conditionState =
-                mWizard->query(mConditionTrackerIndex, mConditionKeyMap[key],
-                               !mHasLinksToAllConditionDimensionsInTracker);
-            if (conditionState == ConditionState::kTrue) {
-                pausedToStarted.push_back(*it);
-                it = mPaused.erase(it);
-                VLOG("Key %s paused -> started", key.toString().c_str());
-            } else {
-                ++it;
-            }
-        }
-
-        if (mStarted.empty() && pausedToStarted.size() > 0) {
-            mLastStartTime = timestamp;
-        }
-    }
-
-    if (mStarted.empty() && !pausedToStarted.empty()) {
-        startAnomalyAlarm(timestamp);
-    }
-    mStarted.insert(pausedToStarted.begin(), pausedToStarted.end());
-    mPaused.insert(startedToPaused.begin(), startedToPaused.end());
-
-    if (mStarted.empty()) {
-        stopAnomalyAlarm(timestamp);
-    }
-}
-
-void OringDurationTracker::onConditionChanged(bool condition, const int64_t timestamp) {
-    if (condition) {
-        if (!mPaused.empty()) {
-            VLOG("Condition true, all started");
-            if (mStarted.empty()) {
-                mLastStartTime = timestamp;
-            }
-            if (mStarted.empty() && !mPaused.empty()) {
-                startAnomalyAlarm(timestamp);
-            }
-            mStarted.insert(mPaused.begin(), mPaused.end());
-            mPaused.clear();
-        }
-    } else {
-        if (!mStarted.empty()) {
-            VLOG("Condition false, all paused");
-            mStateKeyDurationMap[mEventKey.getStateValuesKey()].mDuration +=
-                    (timestamp - mLastStartTime);
-            mPaused.insert(mStarted.begin(), mStarted.end());
-            mStarted.clear();
-            detectAndDeclareAnomaly(
-                    timestamp, mCurrentBucketNum,
-                    getCurrentStateKeyDuration() + getCurrentStateKeyFullBucketDuration());
-        }
-    }
-    if (mStarted.empty()) {
-        stopAnomalyAlarm(timestamp);
-    }
-}
-
-void OringDurationTracker::onStateChanged(const int64_t timestamp, const int32_t atomId,
-                                          const FieldValue& newState) {
-    // Nothing needs to be done on a state change if we have not seen a start
-    // event, the metric is currently not active, or condition is false.
-    // For these cases, no keys are being tracked in mStarted, so update
-    // the current state key and return.
-    if (mStarted.empty()) {
-        updateCurrentStateKey(atomId, newState);
-        return;
-    }
-    // Add the current duration length to the previous state key and then update
-    // the last start time and current state key.
-    mStateKeyDurationMap[mEventKey.getStateValuesKey()].mDuration += (timestamp - mLastStartTime);
-    mLastStartTime = timestamp;
-    updateCurrentStateKey(atomId, newState);
-}
-
-int64_t OringDurationTracker::predictAnomalyTimestampNs(
-        const DurationAnomalyTracker& anomalyTracker, const int64_t eventTimestampNs) const {
-
-    // The anomaly threshold.
-    const int64_t thresholdNs = anomalyTracker.getAnomalyThreshold();
-
-    // The timestamp of the current bucket end.
-    const int64_t currentBucketEndNs = getCurrentBucketEndTimeNs();
-
-    // The past duration ns for the current bucket of the current stateKey.
-    int64_t currentStateBucketPastNs =
-            getCurrentStateKeyDuration() + getCurrentStateKeyFullBucketDuration();
-
-    // As we move into the future, old buckets get overwritten (so their old data is erased).
-    // Sum of past durations. Will change as we overwrite old buckets.
-    int64_t pastNs = currentStateBucketPastNs + anomalyTracker.getSumOverPastBuckets(mEventKey);
-
-    // The refractory period end timestamp for dimension mEventKey.
-    const int64_t refractoryPeriodEndNs =
-            anomalyTracker.getRefractoryPeriodEndsSec(mEventKey) * NS_PER_SEC;
-
-    // The anomaly should happen when accumulated wakelock duration is above the threshold and
-    // not within the refractory period.
-    int64_t anomalyTimestampNs =
-        std::max(eventTimestampNs + thresholdNs - pastNs, refractoryPeriodEndNs);
-    // If the predicted the anomaly timestamp is within the current bucket, return it directly.
-    if (anomalyTimestampNs <= currentBucketEndNs) {
-        return std::max(eventTimestampNs, anomalyTimestampNs);
-    }
-
-    // Remove the old bucket.
-    if (anomalyTracker.getNumOfPastBuckets() > 0) {
-        pastNs -= anomalyTracker.getPastBucketValue(
-                            mEventKey,
-                            mCurrentBucketNum - anomalyTracker.getNumOfPastBuckets());
-        // Add the remaining of the current bucket to the accumulated wakelock duration.
-        pastNs += (currentBucketEndNs - eventTimestampNs);
-    } else {
-        // The anomaly depends on only one bucket.
-        pastNs = 0;
-    }
-
-    // The anomaly will not happen in the current bucket. We need to iterate over the future buckets
-    // to predict the accumulated wakelock duration and determine the anomaly timestamp accordingly.
-    for (int futureBucketIdx = 1; futureBucketIdx <= anomalyTracker.getNumOfPastBuckets() + 1;
-            futureBucketIdx++) {
-        // The alarm candidate timestamp should meet two requirements:
-        // 1. the accumulated wakelock duration is above the threshold.
-        // 2. it is not within the refractory period.
-        // 3. the alarm timestamp falls in this bucket. Otherwise we need to flush the past buckets,
-        //    find the new alarm candidate timestamp and check these requirements again.
-        const int64_t bucketEndNs = currentBucketEndNs + futureBucketIdx * mBucketSizeNs;
-        int64_t anomalyTimestampNs =
-            std::max(bucketEndNs - mBucketSizeNs + thresholdNs - pastNs, refractoryPeriodEndNs);
-        if (anomalyTimestampNs <= bucketEndNs) {
-            return anomalyTimestampNs;
-        }
-        if (anomalyTracker.getNumOfPastBuckets() <= 0) {
-            continue;
-        }
-
-        // No valid alarm timestamp is found in this bucket. The clock moves to the end of the
-        // bucket. Update the pastNs.
-        pastNs += mBucketSizeNs;
-        // 1. If the oldest past bucket is still in the past bucket window, we could fetch the past
-        // bucket and erase it from pastNs.
-        // 2. If the oldest past bucket is the current bucket, we should compute the
-        //   wakelock duration in the current bucket and erase it from pastNs.
-        // 3. Otherwise all othe past buckets are ancient.
-        if (futureBucketIdx < anomalyTracker.getNumOfPastBuckets()) {
-            pastNs -= anomalyTracker.getPastBucketValue(
-                    mEventKey,
-                    mCurrentBucketNum - anomalyTracker.getNumOfPastBuckets() + futureBucketIdx);
-        } else if (futureBucketIdx == anomalyTracker.getNumOfPastBuckets()) {
-            pastNs -= (currentStateBucketPastNs + (currentBucketEndNs - eventTimestampNs));
-        }
-    }
-
-    return std::max(eventTimestampNs + thresholdNs, refractoryPeriodEndNs);
-}
-
-void OringDurationTracker::dumpStates(FILE* out, bool verbose) const {
-    fprintf(out, "\t\t started count %lu\n", (unsigned long)mStarted.size());
-    fprintf(out, "\t\t paused count %lu\n", (unsigned long)mPaused.size());
-    fprintf(out, "\t\t current duration %lld\n", (long long)getCurrentStateKeyDuration());
-}
-
-int64_t OringDurationTracker::getCurrentStateKeyDuration() const {
-    auto it = mStateKeyDurationMap.find(mEventKey.getStateValuesKey());
-    if (it == mStateKeyDurationMap.end()) {
-        return 0;
-    } else {
-        return it->second.mDuration;
-    }
-}
-
-int64_t OringDurationTracker::getCurrentStateKeyFullBucketDuration() const {
-    auto it = mStateKeyDurationMap.find(mEventKey.getStateValuesKey());
-    if (it == mStateKeyDurationMap.end()) {
-        return 0;
-    } else {
-        return it->second.mDurationFullBucket;
-    }
-}
-
-void OringDurationTracker::updateCurrentStateKey(const int32_t atomId, const FieldValue& newState) {
-    HashableDimensionKey* stateValuesKey = mEventKey.getMutableStateValuesKey();
-    for (size_t i = 0; i < stateValuesKey->getValues().size(); i++) {
-        if (stateValuesKey->getValues()[i].mField.getTag() == atomId) {
-            stateValuesKey->mutableValue(i)->mValue = newState.mValue;
-        }
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.h b/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.h
deleted file mode 100644
index bd8017a..0000000
--- a/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ORING_DURATION_TRACKER_H
-#define ORING_DURATION_TRACKER_H
-
-#include "DurationTracker.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Tracks the "Or'd" duration -- if 2 durations are overlapping, they won't be double counted.
-class OringDurationTracker : public DurationTracker {
-public:
-    OringDurationTracker(const ConfigKey& key, const int64_t& id,
-                         const MetricDimensionKey& eventKey, sp<ConditionWizard> wizard,
-                         int conditionIndex, bool nesting, int64_t currentBucketStartNs,
-                         int64_t currentBucketNum, int64_t startTimeNs, int64_t bucketSizeNs,
-                         bool conditionSliced, bool fullLink,
-                         const std::vector<sp<DurationAnomalyTracker>>& anomalyTrackers);
-
-    OringDurationTracker(const OringDurationTracker& tracker) = default;
-
-    void noteStart(const HashableDimensionKey& key, bool condition, const int64_t eventTime,
-                   const ConditionKey& conditionKey) override;
-    void noteStop(const HashableDimensionKey& key, const int64_t eventTime,
-                  const bool stopAll) override;
-    void noteStopAll(const int64_t eventTime) override;
-
-    void onSlicedConditionMayChange(bool overallCondition, const int64_t timestamp) override;
-    void onConditionChanged(bool condition, const int64_t timestamp) override;
-
-    void onStateChanged(const int64_t timestamp, const int32_t atomId,
-                        const FieldValue& newState) override;
-
-    bool flushCurrentBucket(
-            const int64_t& eventTimeNs,
-            std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override;
-    bool flushIfNeeded(
-            int64_t timestampNs,
-            std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override;
-
-    int64_t predictAnomalyTimestampNs(const DurationAnomalyTracker& anomalyTracker,
-                                      const int64_t currentTimestamp) const override;
-    void dumpStates(FILE* out, bool verbose) const override;
-
-    int64_t getCurrentStateKeyDuration() const override;
-
-    int64_t getCurrentStateKeyFullBucketDuration() const override;
-
-    void updateCurrentStateKey(const int32_t atomId, const FieldValue& newState);
-
-private:
-    // We don't need to keep track of individual durations. The information that's needed is:
-    // 1) which keys are started. We record the first start time.
-    // 2) which keys are paused (started but condition was false)
-    // 3) whenever a key stops, we remove it from the started set. And if the set becomes empty,
-    //    it means everything has stopped, we then record the end time.
-    std::unordered_map<HashableDimensionKey, int> mStarted;
-    std::unordered_map<HashableDimensionKey, int> mPaused;
-    int64_t mLastStartTime;
-    std::unordered_map<HashableDimensionKey, ConditionKey> mConditionKeyMap;
-
-    // return true if we should not allow newKey to be tracked because we are above the threshold
-    bool hitGuardRail(const HashableDimensionKey& newKey);
-
-    FRIEND_TEST(OringDurationTrackerTest, TestDurationOverlap);
-    FRIEND_TEST(OringDurationTrackerTest, TestCrossBucketBoundary);
-    FRIEND_TEST(OringDurationTrackerTest, TestDurationConditionChange);
-    FRIEND_TEST(OringDurationTrackerTest, TestPredictAnomalyTimestamp);
-    FRIEND_TEST(OringDurationTrackerTest, TestAnomalyDetectionExpiredAlarm);
-    FRIEND_TEST(OringDurationTrackerTest, TestAnomalyDetectionFiredAlarm);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // ORING_DURATION_TRACKER_H
diff --git a/cmds/statsd/src/metrics/metrics_manager_util.cpp b/cmds/statsd/src/metrics/metrics_manager_util.cpp
deleted file mode 100644
index 8917c36..0000000
--- a/cmds/statsd/src/metrics/metrics_manager_util.cpp
+++ /dev/null
@@ -1,983 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "metrics_manager_util.h"
-
-#include <inttypes.h>
-
-#include "FieldValue.h"
-#include "MetricProducer.h"
-#include "condition/CombinationConditionTracker.h"
-#include "condition/SimpleConditionTracker.h"
-#include "external/StatsPullerManager.h"
-#include "matchers/CombinationLogMatchingTracker.h"
-#include "matchers/EventMatcherWizard.h"
-#include "matchers/SimpleLogMatchingTracker.h"
-#include "metrics/CountMetricProducer.h"
-#include "metrics/DurationMetricProducer.h"
-#include "metrics/EventMetricProducer.h"
-#include "metrics/GaugeMetricProducer.h"
-#include "metrics/ValueMetricProducer.h"
-#include "state/StateManager.h"
-#include "stats_util.h"
-
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-namespace {
-
-bool hasLeafNode(const FieldMatcher& matcher) {
-    if (!matcher.has_field()) {
-        return false;
-    }
-    for (int i = 0; i < matcher.child_size(); ++i) {
-        if (hasLeafNode(matcher.child(i))) {
-            return true;
-        }
-    }
-    return true;
-}
-
-}  // namespace
-
-bool handleMetricWithLogTrackers(const int64_t what, const int metricIndex,
-                                 const bool usedForDimension,
-                                 const vector<sp<LogMatchingTracker>>& allAtomMatchers,
-                                 const unordered_map<int64_t, int>& logTrackerMap,
-                                 unordered_map<int, std::vector<int>>& trackerToMetricMap,
-                                 int& logTrackerIndex) {
-    auto logTrackerIt = logTrackerMap.find(what);
-    if (logTrackerIt == logTrackerMap.end()) {
-        ALOGW("cannot find the AtomMatcher \"%lld\" in config", (long long)what);
-        return false;
-    }
-    if (usedForDimension && allAtomMatchers[logTrackerIt->second]->getAtomIds().size() > 1) {
-        ALOGE("AtomMatcher \"%lld\" has more than one tag ids. When a metric has dimension, "
-              "the \"what\" can only about one atom type.",
-              (long long)what);
-        return false;
-    }
-    logTrackerIndex = logTrackerIt->second;
-    auto& metric_list = trackerToMetricMap[logTrackerIndex];
-    metric_list.push_back(metricIndex);
-    return true;
-}
-
-bool handlePullMetricTriggerWithLogTrackers(
-        const int64_t trigger, const int metricIndex,
-        const vector<sp<LogMatchingTracker>>& allAtomMatchers,
-        const unordered_map<int64_t, int>& logTrackerMap,
-        unordered_map<int, std::vector<int>>& trackerToMetricMap, int& logTrackerIndex) {
-    auto logTrackerIt = logTrackerMap.find(trigger);
-    if (logTrackerIt == logTrackerMap.end()) {
-        ALOGW("cannot find the AtomMatcher \"%lld\" in config", (long long)trigger);
-        return false;
-    }
-    if (allAtomMatchers[logTrackerIt->second]->getAtomIds().size() > 1) {
-        ALOGE("AtomMatcher \"%lld\" has more than one tag ids."
-              "Trigger can only be one atom type.",
-              (long long)trigger);
-        return false;
-    }
-    logTrackerIndex = logTrackerIt->second;
-    auto& metric_list = trackerToMetricMap[logTrackerIndex];
-    metric_list.push_back(metricIndex);
-    return true;
-}
-
-bool handleMetricWithConditions(
-        const int64_t condition, const int metricIndex,
-        const unordered_map<int64_t, int>& conditionTrackerMap,
-        const ::google::protobuf::RepeatedPtrField<::android::os::statsd::MetricConditionLink>&
-                links,
-        vector<sp<ConditionTracker>>& allConditionTrackers, int& conditionIndex,
-        unordered_map<int, std::vector<int>>& conditionToMetricMap) {
-    auto condition_it = conditionTrackerMap.find(condition);
-    if (condition_it == conditionTrackerMap.end()) {
-        ALOGW("cannot find Predicate \"%lld\" in the config", (long long)condition);
-        return false;
-    }
-
-    for (const auto& link : links) {
-        auto it = conditionTrackerMap.find(link.condition());
-        if (it == conditionTrackerMap.end()) {
-            ALOGW("cannot find Predicate \"%lld\" in the config", (long long)link.condition());
-            return false;
-        }
-        allConditionTrackers[condition_it->second]->setSliced(true);
-        allConditionTrackers[it->second]->setSliced(true);
-    }
-    conditionIndex = condition_it->second;
-
-    // will create new vector if not exist before.
-    auto& metricList = conditionToMetricMap[condition_it->second];
-    metricList.push_back(metricIndex);
-    return true;
-}
-
-// Initializes state data structures for a metric.
-// input:
-// [config]: the input config
-// [stateIds]: the slice_by_state ids for this metric
-// [stateAtomIdMap]: this map contains the mapping from all state ids to atom ids
-// [allStateGroupMaps]: this map contains the mapping from state ids and state
-//                      values to state group ids for all states
-// output:
-// [slicedStateAtoms]: a vector of atom ids of all the slice_by_states
-// [stateGroupMap]: this map should contain the mapping from states ids and state
-//                      values to state group ids for all states that this metric
-//                      is interested in
-bool handleMetricWithStates(
-        const StatsdConfig& config, const ::google::protobuf::RepeatedField<int64_t>& stateIds,
-        const unordered_map<int64_t, int>& stateAtomIdMap,
-        const unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps,
-        vector<int>& slicedStateAtoms,
-        unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap) {
-    for (const auto& stateId : stateIds) {
-        auto it = stateAtomIdMap.find(stateId);
-        if (it == stateAtomIdMap.end()) {
-            ALOGW("cannot find State %" PRId64 " in the config", stateId);
-            return false;
-        }
-        int atomId = it->second;
-        slicedStateAtoms.push_back(atomId);
-
-        auto stateIt = allStateGroupMaps.find(stateId);
-        if (stateIt != allStateGroupMaps.end()) {
-            stateGroupMap[atomId] = stateIt->second;
-        }
-    }
-    return true;
-}
-
-bool handleMetricWithStateLink(const FieldMatcher& stateMatcher,
-                               const vector<Matcher>& dimensionsInWhat) {
-    vector<Matcher> stateMatchers;
-    translateFieldMatcher(stateMatcher, &stateMatchers);
-
-    return subsetDimensions(stateMatchers, dimensionsInWhat);
-}
-
-// Validates a metricActivation and populates state.
-// EventActivationMap and EventDeactivationMap are supplied to a MetricProducer
-//      to provide the producer with state about its activators and deactivators.
-// Returns false if there are errors.
-bool handleMetricActivation(
-        const StatsdConfig& config,
-        const int64_t metricId,
-        const int metricIndex,
-        const unordered_map<int64_t, int>& metricToActivationMap,
-        const unordered_map<int64_t, int>& logTrackerMap,
-        unordered_map<int, vector<int>>& activationAtomTrackerToMetricMap,
-        unordered_map<int, vector<int>>& deactivationAtomTrackerToMetricMap,
-        vector<int>& metricsWithActivation,
-        unordered_map<int, shared_ptr<Activation>>& eventActivationMap,
-        unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap) {
-    // Check if metric has an associated activation
-    auto itr = metricToActivationMap.find(metricId);
-    if (itr == metricToActivationMap.end()) return true;
-
-    int activationIndex = itr->second;
-    const MetricActivation& metricActivation = config.metric_activation(activationIndex);
-
-    for (int i = 0; i < metricActivation.event_activation_size(); i++) {
-        const EventActivation& activation = metricActivation.event_activation(i);
-
-        auto itr = logTrackerMap.find(activation.atom_matcher_id());
-        if (itr == logTrackerMap.end()) {
-            ALOGE("Atom matcher not found for event activation.");
-            return false;
-        }
-
-        ActivationType activationType = (activation.has_activation_type()) ?
-                activation.activation_type() : metricActivation.activation_type();
-        std::shared_ptr<Activation> activationWrapper = std::make_shared<Activation>(
-                activationType, activation.ttl_seconds() * NS_PER_SEC);
-
-        int atomMatcherIndex = itr->second;
-        activationAtomTrackerToMetricMap[atomMatcherIndex].push_back(metricIndex);
-        eventActivationMap.emplace(atomMatcherIndex, activationWrapper);
-
-        if (activation.has_deactivation_atom_matcher_id()) {
-            itr = logTrackerMap.find(activation.deactivation_atom_matcher_id());
-            if (itr == logTrackerMap.end()) {
-                ALOGE("Atom matcher not found for event deactivation.");
-                return false;
-            }
-            int deactivationAtomMatcherIndex = itr->second;
-            deactivationAtomTrackerToMetricMap[deactivationAtomMatcherIndex].push_back(metricIndex);
-            eventDeactivationMap[deactivationAtomMatcherIndex].push_back(activationWrapper);
-        }
-    }
-
-    metricsWithActivation.push_back(metricIndex);
-    return true;
-}
-
-bool initLogTrackers(const StatsdConfig& config, const UidMap& uidMap,
-                     unordered_map<int64_t, int>& logTrackerMap,
-                     vector<sp<LogMatchingTracker>>& allAtomMatchers, set<int>& allTagIds) {
-    vector<AtomMatcher> matcherConfigs;
-    const int atomMatcherCount = config.atom_matcher_size();
-    matcherConfigs.reserve(atomMatcherCount);
-    allAtomMatchers.reserve(atomMatcherCount);
-
-    for (int i = 0; i < atomMatcherCount; i++) {
-        const AtomMatcher& logMatcher = config.atom_matcher(i);
-
-        int index = allAtomMatchers.size();
-        switch (logMatcher.contents_case()) {
-            case AtomMatcher::ContentsCase::kSimpleAtomMatcher:
-                allAtomMatchers.push_back(new SimpleLogMatchingTracker(
-                        logMatcher.id(), index, logMatcher.simple_atom_matcher(), uidMap));
-                break;
-            case AtomMatcher::ContentsCase::kCombination:
-                allAtomMatchers.push_back(
-                        new CombinationLogMatchingTracker(logMatcher.id(), index));
-                break;
-            default:
-                ALOGE("Matcher \"%lld\" malformed", (long long)logMatcher.id());
-                return false;
-                // continue;
-        }
-        if (logTrackerMap.find(logMatcher.id()) != logTrackerMap.end()) {
-            ALOGE("Duplicate AtomMatcher found!");
-            return false;
-        }
-        logTrackerMap[logMatcher.id()] = index;
-        matcherConfigs.push_back(logMatcher);
-    }
-
-    vector<bool> stackTracker2(allAtomMatchers.size(), false);
-    for (auto& matcher : allAtomMatchers) {
-        if (!matcher->init(matcherConfigs, allAtomMatchers, logTrackerMap, stackTracker2)) {
-            return false;
-        }
-        // Collect all the tag ids that are interesting. TagIds exist in leaf nodes only.
-        const set<int>& tagIds = matcher->getAtomIds();
-        allTagIds.insert(tagIds.begin(), tagIds.end());
-    }
-    return true;
-}
-
-bool initConditions(const ConfigKey& key, const StatsdConfig& config,
-                    const unordered_map<int64_t, int>& logTrackerMap,
-                    unordered_map<int64_t, int>& conditionTrackerMap,
-                    vector<sp<ConditionTracker>>& allConditionTrackers,
-                    unordered_map<int, std::vector<int>>& trackerToConditionMap,
-                    vector<ConditionState>& initialConditionCache) {
-    vector<Predicate> conditionConfigs;
-    const int conditionTrackerCount = config.predicate_size();
-    conditionConfigs.reserve(conditionTrackerCount);
-    allConditionTrackers.reserve(conditionTrackerCount);
-    initialConditionCache.reserve(conditionTrackerCount);
-    std::fill(initialConditionCache.begin(), initialConditionCache.end(), ConditionState::kUnknown);
-
-    for (int i = 0; i < conditionTrackerCount; i++) {
-        const Predicate& condition = config.predicate(i);
-        int index = allConditionTrackers.size();
-        switch (condition.contents_case()) {
-            case Predicate::ContentsCase::kSimplePredicate: {
-                allConditionTrackers.push_back(new SimpleConditionTracker(
-                        key, condition.id(), index, condition.simple_predicate(), logTrackerMap));
-                break;
-            }
-            case Predicate::ContentsCase::kCombination: {
-                allConditionTrackers.push_back(
-                        new CombinationConditionTracker(condition.id(), index));
-                break;
-            }
-            default:
-                ALOGE("Predicate \"%lld\" malformed", (long long)condition.id());
-                return false;
-        }
-        if (conditionTrackerMap.find(condition.id()) != conditionTrackerMap.end()) {
-            ALOGE("Duplicate Predicate found!");
-            return false;
-        }
-        conditionTrackerMap[condition.id()] = index;
-        conditionConfigs.push_back(condition);
-    }
-
-    vector<bool> stackTracker(allConditionTrackers.size(), false);
-    for (size_t i = 0; i < allConditionTrackers.size(); i++) {
-        auto& conditionTracker = allConditionTrackers[i];
-        if (!conditionTracker->init(conditionConfigs, allConditionTrackers, conditionTrackerMap,
-                                    stackTracker, initialConditionCache)) {
-            return false;
-        }
-        for (const int trackerIndex : conditionTracker->getLogTrackerIndex()) {
-            auto& conditionList = trackerToConditionMap[trackerIndex];
-            conditionList.push_back(i);
-        }
-    }
-    return true;
-}
-
-bool initStates(const StatsdConfig& config, unordered_map<int64_t, int>& stateAtomIdMap,
-                unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps) {
-    for (int i = 0; i < config.state_size(); i++) {
-        const State& state = config.state(i);
-        const int64_t stateId = state.id();
-        stateAtomIdMap[stateId] = state.atom_id();
-
-        const StateMap& stateMap = state.map();
-        for (auto group : stateMap.group()) {
-            for (auto value : group.value()) {
-                allStateGroupMaps[stateId][value] = group.group_id();
-            }
-        }
-    }
-
-    return true;
-}
-
-bool initMetrics(const ConfigKey& key, const StatsdConfig& config, const int64_t timeBaseTimeNs,
-                 const int64_t currentTimeNs, const sp<StatsPullerManager>& pullerManager,
-                 const unordered_map<int64_t, int>& logTrackerMap,
-                 const unordered_map<int64_t, int>& conditionTrackerMap,
-                 const vector<sp<LogMatchingTracker>>& allAtomMatchers,
-                 const unordered_map<int64_t, int>& stateAtomIdMap,
-                 const unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps,
-                 vector<sp<ConditionTracker>>& allConditionTrackers,
-                 const vector<ConditionState>& initialConditionCache,
-                 vector<sp<MetricProducer>>& allMetricProducers,
-                 unordered_map<int, vector<int>>& conditionToMetricMap,
-                 unordered_map<int, vector<int>>& trackerToMetricMap,
-                 unordered_map<int64_t, int>& metricMap, std::set<int64_t>& noReportMetricIds,
-                 unordered_map<int, vector<int>>& activationAtomTrackerToMetricMap,
-                 unordered_map<int, vector<int>>& deactivationAtomTrackerToMetricMap,
-                 vector<int>& metricsWithActivation) {
-    sp<ConditionWizard> wizard = new ConditionWizard(allConditionTrackers);
-    sp<EventMatcherWizard> matcherWizard = new EventMatcherWizard(allAtomMatchers);
-    const int allMetricsCount = config.count_metric_size() + config.duration_metric_size() +
-                                config.event_metric_size() + config.gauge_metric_size() +
-                                config.value_metric_size();
-    allMetricProducers.reserve(allMetricsCount);
-
-    // Construct map from metric id to metric activation index. The map will be used to determine
-    // the metric activation corresponding to a metric.
-    unordered_map<int64_t, int> metricToActivationMap;
-    for (int i = 0; i < config.metric_activation_size(); i++) {
-        const MetricActivation& metricActivation = config.metric_activation(i);
-        int64_t metricId = metricActivation.metric_id();
-        if (metricToActivationMap.find(metricId) != metricToActivationMap.end()) {
-            ALOGE("Metric %lld has multiple MetricActivations", (long long) metricId);
-            return false;
-        }
-        metricToActivationMap.insert({metricId, i});
-    }
-
-    // Build MetricProducers for each metric defined in config.
-    // build CountMetricProducer
-    for (int i = 0; i < config.count_metric_size(); i++) {
-        const CountMetric& metric = config.count_metric(i);
-        if (!metric.has_what()) {
-            ALOGW("cannot find \"what\" in CountMetric \"%lld\"", (long long)metric.id());
-            return false;
-        }
-
-        int metricIndex = allMetricProducers.size();
-        metricMap.insert({metric.id(), metricIndex});
-        int trackerIndex;
-        if (!handleMetricWithLogTrackers(metric.what(), metricIndex,
-                                         metric.has_dimensions_in_what(),
-                                         allAtomMatchers, logTrackerMap, trackerToMetricMap,
-                                         trackerIndex)) {
-            return false;
-        }
-
-        int conditionIndex = -1;
-        if (metric.has_condition()) {
-            if (!handleMetricWithConditions(metric.condition(), metricIndex, conditionTrackerMap,
-                                            metric.links(), allConditionTrackers, conditionIndex,
-                                            conditionToMetricMap)) {
-                return false;
-            }
-        } else {
-            if (metric.links_size() > 0) {
-                ALOGW("metrics has a MetricConditionLink but doesn't have a condition");
-                return false;
-            }
-        }
-
-        std::vector<int> slicedStateAtoms;
-        unordered_map<int, unordered_map<int, int64_t>> stateGroupMap;
-        if (metric.slice_by_state_size() > 0) {
-            if (!handleMetricWithStates(config, metric.slice_by_state(), stateAtomIdMap,
-                                        allStateGroupMaps, slicedStateAtoms, stateGroupMap)) {
-                return false;
-            }
-        } else {
-            if (metric.state_link_size() > 0) {
-                ALOGW("CountMetric has a MetricStateLink but doesn't have a slice_by_state");
-                return false;
-            }
-        }
-
-        unordered_map<int, shared_ptr<Activation>> eventActivationMap;
-        unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap;
-        bool success = handleMetricActivation(config, metric.id(), metricIndex,
-                metricToActivationMap, logTrackerMap, activationAtomTrackerToMetricMap,
-                deactivationAtomTrackerToMetricMap, metricsWithActivation, eventActivationMap,
-                eventDeactivationMap);
-        if (!success) return false;
-
-        sp<MetricProducer> countProducer =
-                new CountMetricProducer(key, metric, conditionIndex, initialConditionCache, wizard,
-                                        timeBaseTimeNs, currentTimeNs, eventActivationMap,
-                                        eventDeactivationMap, slicedStateAtoms, stateGroupMap);
-        allMetricProducers.push_back(countProducer);
-    }
-
-    // build DurationMetricProducer
-    for (int i = 0; i < config.duration_metric_size(); i++) {
-        int metricIndex = allMetricProducers.size();
-        const DurationMetric& metric = config.duration_metric(i);
-        metricMap.insert({metric.id(), metricIndex});
-
-        auto what_it = conditionTrackerMap.find(metric.what());
-        if (what_it == conditionTrackerMap.end()) {
-            ALOGE("DurationMetric's \"what\" is invalid");
-            return false;
-        }
-
-        const Predicate& durationWhat = config.predicate(what_it->second);
-
-        if (durationWhat.contents_case() != Predicate::ContentsCase::kSimplePredicate) {
-            ALOGE("DurationMetric's \"what\" must be a simple condition");
-            return false;
-        }
-
-        const auto& simplePredicate = durationWhat.simple_predicate();
-
-        bool nesting = simplePredicate.count_nesting();
-
-        int trackerIndices[3] = {-1, -1, -1};
-        if (!simplePredicate.has_start() ||
-            !handleMetricWithLogTrackers(simplePredicate.start(), metricIndex,
-                                         metric.has_dimensions_in_what(), allAtomMatchers,
-                                         logTrackerMap, trackerToMetricMap, trackerIndices[0])) {
-            ALOGE("Duration metrics must specify a valid the start event matcher");
-            return false;
-        }
-
-        if (simplePredicate.has_stop() &&
-            !handleMetricWithLogTrackers(simplePredicate.stop(), metricIndex,
-                                         metric.has_dimensions_in_what(), allAtomMatchers,
-                                         logTrackerMap, trackerToMetricMap, trackerIndices[1])) {
-            return false;
-        }
-
-        if (simplePredicate.has_stop_all() &&
-            !handleMetricWithLogTrackers(simplePredicate.stop_all(), metricIndex,
-                                         metric.has_dimensions_in_what(), allAtomMatchers,
-                                         logTrackerMap, trackerToMetricMap, trackerIndices[2])) {
-            return false;
-        }
-
-        FieldMatcher internalDimensions = simplePredicate.dimensions();
-
-        int conditionIndex = -1;
-
-        if (metric.has_condition()) {
-            bool good = handleMetricWithConditions(
-                    metric.condition(), metricIndex, conditionTrackerMap, metric.links(),
-                    allConditionTrackers, conditionIndex, conditionToMetricMap);
-            if (!good) {
-                return false;
-            }
-        } else {
-            if (metric.links_size() > 0) {
-                ALOGW("metrics has a MetricConditionLink but doesn't have a condition");
-                return false;
-            }
-        }
-
-        std::vector<int> slicedStateAtoms;
-        unordered_map<int, unordered_map<int, int64_t>> stateGroupMap;
-        if (metric.slice_by_state_size() > 0) {
-            if (metric.aggregation_type() == DurationMetric::MAX_SPARSE) {
-                ALOGE("DurationMetric with aggregation type MAX_SPARSE cannot be sliced by state");
-                return false;
-            }
-            if (!handleMetricWithStates(config, metric.slice_by_state(), stateAtomIdMap,
-                                        allStateGroupMaps, slicedStateAtoms, stateGroupMap)) {
-                return false;
-            }
-        } else {
-            if (metric.state_link_size() > 0) {
-                ALOGW("DurationMetric has a MetricStateLink but doesn't have a sliced state");
-                return false;
-            }
-        }
-
-        // Check that all metric state links are a subset of dimensions_in_what fields.
-        std::vector<Matcher> dimensionsInWhat;
-        translateFieldMatcher(metric.dimensions_in_what(), &dimensionsInWhat);
-        for (const auto& stateLink : metric.state_link()) {
-            if (!handleMetricWithStateLink(stateLink.fields_in_what(), dimensionsInWhat)) {
-                return false;
-            }
-        }
-
-        unordered_map<int, shared_ptr<Activation>> eventActivationMap;
-        unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap;
-        bool success = handleMetricActivation(config, metric.id(), metricIndex,
-                metricToActivationMap, logTrackerMap, activationAtomTrackerToMetricMap,
-                deactivationAtomTrackerToMetricMap, metricsWithActivation, eventActivationMap,
-                eventDeactivationMap);
-        if (!success) return false;
-
-        sp<MetricProducer> durationMetric = new DurationMetricProducer(
-                key, metric, conditionIndex, initialConditionCache, trackerIndices[0],
-                trackerIndices[1], trackerIndices[2], nesting, wizard, internalDimensions,
-                timeBaseTimeNs, currentTimeNs, eventActivationMap, eventDeactivationMap,
-                slicedStateAtoms, stateGroupMap);
-
-        allMetricProducers.push_back(durationMetric);
-    }
-
-    // build EventMetricProducer
-    for (int i = 0; i < config.event_metric_size(); i++) {
-        int metricIndex = allMetricProducers.size();
-        const EventMetric& metric = config.event_metric(i);
-        metricMap.insert({metric.id(), metricIndex});
-        if (!metric.has_id() || !metric.has_what()) {
-            ALOGW("cannot find the metric name or what in config");
-            return false;
-        }
-        int trackerIndex;
-        if (!handleMetricWithLogTrackers(metric.what(), metricIndex, false, allAtomMatchers,
-                                         logTrackerMap, trackerToMetricMap, trackerIndex)) {
-            return false;
-        }
-
-        int conditionIndex = -1;
-        if (metric.has_condition()) {
-            bool good = handleMetricWithConditions(
-                    metric.condition(), metricIndex, conditionTrackerMap, metric.links(),
-                    allConditionTrackers, conditionIndex, conditionToMetricMap);
-            if (!good) {
-                return false;
-            }
-        } else {
-            if (metric.links_size() > 0) {
-                ALOGW("metrics has a MetricConditionLink but doesn't have a condition");
-                return false;
-            }
-        }
-
-        unordered_map<int, shared_ptr<Activation>> eventActivationMap;
-        unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap;
-        bool success = handleMetricActivation(config, metric.id(), metricIndex,
-                metricToActivationMap, logTrackerMap, activationAtomTrackerToMetricMap,
-                deactivationAtomTrackerToMetricMap, metricsWithActivation, eventActivationMap,
-                eventDeactivationMap);
-        if (!success) return false;
-
-        sp<MetricProducer> eventMetric =
-                new EventMetricProducer(key, metric, conditionIndex, initialConditionCache, wizard,
-                                        timeBaseTimeNs, eventActivationMap, eventDeactivationMap);
-
-        allMetricProducers.push_back(eventMetric);
-    }
-
-    // build ValueMetricProducer
-    for (int i = 0; i < config.value_metric_size(); i++) {
-        const ValueMetric& metric = config.value_metric(i);
-        if (!metric.has_what()) {
-            ALOGW("cannot find \"what\" in ValueMetric \"%lld\"", (long long)metric.id());
-            return false;
-        }
-        if (!metric.has_value_field()) {
-            ALOGW("cannot find \"value_field\" in ValueMetric \"%lld\"", (long long)metric.id());
-            return false;
-        }
-        std::vector<Matcher> fieldMatchers;
-        translateFieldMatcher(metric.value_field(), &fieldMatchers);
-        if (fieldMatchers.size() < 1) {
-            ALOGW("incorrect \"value_field\" in ValueMetric \"%lld\"", (long long)metric.id());
-            return false;
-        }
-
-        int metricIndex = allMetricProducers.size();
-        metricMap.insert({metric.id(), metricIndex});
-        int trackerIndex;
-        if (!handleMetricWithLogTrackers(metric.what(), metricIndex,
-                                         metric.has_dimensions_in_what(),
-                                         allAtomMatchers, logTrackerMap, trackerToMetricMap,
-                                         trackerIndex)) {
-            return false;
-        }
-
-        sp<LogMatchingTracker> atomMatcher = allAtomMatchers.at(trackerIndex);
-        // If it is pulled atom, it should be simple matcher with one tagId.
-        if (atomMatcher->getAtomIds().size() != 1) {
-            return false;
-        }
-        int atomTagId = *(atomMatcher->getAtomIds().begin());
-        int pullTagId = pullerManager->PullerForMatcherExists(atomTagId) ? atomTagId : -1;
-
-        int conditionIndex = -1;
-        if (metric.has_condition()) {
-            bool good = handleMetricWithConditions(
-                    metric.condition(), metricIndex, conditionTrackerMap, metric.links(),
-                    allConditionTrackers, conditionIndex, conditionToMetricMap);
-            if (!good) {
-                return false;
-            }
-        } else {
-            if (metric.links_size() > 0) {
-                ALOGW("metrics has a MetricConditionLink but doesn't have a condition");
-                return false;
-            }
-        }
-
-        std::vector<int> slicedStateAtoms;
-        unordered_map<int, unordered_map<int, int64_t>> stateGroupMap;
-        if (metric.slice_by_state_size() > 0) {
-            if (!handleMetricWithStates(config, metric.slice_by_state(), stateAtomIdMap,
-                                        allStateGroupMaps, slicedStateAtoms, stateGroupMap)) {
-                return false;
-            }
-        } else {
-            if (metric.state_link_size() > 0) {
-                ALOGW("ValueMetric has a MetricStateLink but doesn't have a sliced state");
-                return false;
-            }
-        }
-
-        // Check that all metric state links are a subset of dimensions_in_what fields.
-        std::vector<Matcher> dimensionsInWhat;
-        translateFieldMatcher(metric.dimensions_in_what(), &dimensionsInWhat);
-        for (const auto& stateLink : metric.state_link()) {
-            if (!handleMetricWithStateLink(stateLink.fields_in_what(), dimensionsInWhat)) {
-                return false;
-            }
-        }
-
-        unordered_map<int, shared_ptr<Activation>> eventActivationMap;
-        unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap;
-        bool success = handleMetricActivation(
-                config, metric.id(), metricIndex, metricToActivationMap, logTrackerMap,
-                activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                metricsWithActivation, eventActivationMap, eventDeactivationMap);
-        if (!success) return false;
-
-        sp<MetricProducer> valueProducer = new ValueMetricProducer(
-                key, metric, conditionIndex, initialConditionCache, wizard, trackerIndex,
-                matcherWizard, pullTagId, timeBaseTimeNs, currentTimeNs, pullerManager,
-                eventActivationMap, eventDeactivationMap, slicedStateAtoms, stateGroupMap);
-        allMetricProducers.push_back(valueProducer);
-    }
-
-    // Gauge metrics.
-    for (int i = 0; i < config.gauge_metric_size(); i++) {
-        const GaugeMetric& metric = config.gauge_metric(i);
-        if (!metric.has_what()) {
-            ALOGW("cannot find \"what\" in GaugeMetric \"%lld\"", (long long)metric.id());
-            return false;
-        }
-
-        if ((!metric.gauge_fields_filter().has_include_all() ||
-             (metric.gauge_fields_filter().include_all() == false)) &&
-            !hasLeafNode(metric.gauge_fields_filter().fields())) {
-            ALOGW("Incorrect field filter setting in GaugeMetric %lld", (long long)metric.id());
-            return false;
-        }
-        if ((metric.gauge_fields_filter().has_include_all() &&
-             metric.gauge_fields_filter().include_all() == true) &&
-            hasLeafNode(metric.gauge_fields_filter().fields())) {
-            ALOGW("Incorrect field filter setting in GaugeMetric %lld", (long long)metric.id());
-            return false;
-        }
-
-        int metricIndex = allMetricProducers.size();
-        metricMap.insert({metric.id(), metricIndex});
-        int trackerIndex;
-        if (!handleMetricWithLogTrackers(metric.what(), metricIndex,
-                                         metric.has_dimensions_in_what(),
-                                         allAtomMatchers, logTrackerMap, trackerToMetricMap,
-                                         trackerIndex)) {
-            return false;
-        }
-
-        sp<LogMatchingTracker> atomMatcher = allAtomMatchers.at(trackerIndex);
-        // For GaugeMetric atom, it should be simple matcher with one tagId.
-        if (atomMatcher->getAtomIds().size() != 1) {
-            return false;
-        }
-        int atomTagId = *(atomMatcher->getAtomIds().begin());
-        int pullTagId = pullerManager->PullerForMatcherExists(atomTagId) ? atomTagId : -1;
-
-        int triggerTrackerIndex;
-        int triggerAtomId = -1;
-        if (metric.has_trigger_event()) {
-            if (pullTagId == -1) {
-                ALOGW("Pull atom not specified for trigger");
-                return false;
-            }
-            // event_trigger should be used with FIRST_N_SAMPLES
-            if (metric.sampling_type() != GaugeMetric::FIRST_N_SAMPLES) {
-                return false;
-            }
-            if (!handlePullMetricTriggerWithLogTrackers(metric.trigger_event(), metricIndex,
-                                                        allAtomMatchers, logTrackerMap,
-                                                        trackerToMetricMap, triggerTrackerIndex)) {
-                return false;
-            }
-            sp<LogMatchingTracker> triggerAtomMatcher = allAtomMatchers.at(triggerTrackerIndex);
-            triggerAtomId = *(triggerAtomMatcher->getAtomIds().begin());
-        }
-
-        if (!metric.has_trigger_event() && pullTagId != -1 &&
-            metric.sampling_type() == GaugeMetric::FIRST_N_SAMPLES) {
-            ALOGW("FIRST_N_SAMPLES is only for pushed event or pull_on_trigger");
-            return false;
-        }
-
-        int conditionIndex = -1;
-        if (metric.has_condition()) {
-            bool good = handleMetricWithConditions(
-                    metric.condition(), metricIndex, conditionTrackerMap, metric.links(),
-                    allConditionTrackers, conditionIndex, conditionToMetricMap);
-            if (!good) {
-                return false;
-            }
-        } else {
-            if (metric.links_size() > 0) {
-                ALOGW("metrics has a MetricConditionLink but doesn't have a condition");
-                return false;
-            }
-        }
-
-        unordered_map<int, shared_ptr<Activation>> eventActivationMap;
-        unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap;
-        bool success = handleMetricActivation(config, metric.id(), metricIndex,
-                metricToActivationMap, logTrackerMap, activationAtomTrackerToMetricMap,
-                deactivationAtomTrackerToMetricMap, metricsWithActivation, eventActivationMap,
-                eventDeactivationMap);
-        if (!success) return false;
-
-        sp<MetricProducer> gaugeProducer = new GaugeMetricProducer(
-                key, metric, conditionIndex, initialConditionCache, wizard, trackerIndex,
-                matcherWizard, pullTagId, triggerAtomId, atomTagId, timeBaseTimeNs, currentTimeNs,
-                pullerManager, eventActivationMap, eventDeactivationMap);
-        allMetricProducers.push_back(gaugeProducer);
-    }
-    for (int i = 0; i < config.no_report_metric_size(); ++i) {
-        const auto no_report_metric = config.no_report_metric(i);
-        if (metricMap.find(no_report_metric) == metricMap.end()) {
-            ALOGW("no_report_metric %" PRId64 " not exist", no_report_metric);
-            return false;
-        }
-        noReportMetricIds.insert(no_report_metric);
-    }
-
-    const set<int> whitelistedAtomIds(config.whitelisted_atom_ids().begin(),
-                                      config.whitelisted_atom_ids().end());
-    for (const auto& it : allMetricProducers) {
-        // Register metrics to StateTrackers
-        for (int atomId : it->getSlicedStateAtoms()) {
-            // Register listener for non-whitelisted atoms only. Using whitelisted atom as a sliced
-            // state atom is not allowed.
-            if (whitelistedAtomIds.find(atomId) == whitelistedAtomIds.end()) {
-                StateManager::getInstance().registerListener(atomId, it);
-            } else {
-                return false;
-            }
-        }
-    }
-    return true;
-}
-
-bool initAlerts(const StatsdConfig& config,
-                const unordered_map<int64_t, int>& metricProducerMap,
-                unordered_map<int64_t, int>& alertTrackerMap,
-                const sp<AlarmMonitor>& anomalyAlarmMonitor,
-                vector<sp<MetricProducer>>& allMetricProducers,
-                vector<sp<AnomalyTracker>>& allAnomalyTrackers) {
-    for (int i = 0; i < config.alert_size(); i++) {
-        const Alert& alert = config.alert(i);
-        const auto& itr = metricProducerMap.find(alert.metric_id());
-        if (itr == metricProducerMap.end()) {
-            ALOGW("alert \"%lld\" has unknown metric id: \"%lld\"", (long long)alert.id(),
-                  (long long)alert.metric_id());
-            return false;
-        }
-        if (!alert.has_trigger_if_sum_gt()) {
-            ALOGW("invalid alert: missing threshold");
-            return false;
-        }
-        if (alert.trigger_if_sum_gt() < 0 || alert.num_buckets() <= 0) {
-            ALOGW("invalid alert: threshold=%f num_buckets= %d",
-                  alert.trigger_if_sum_gt(), alert.num_buckets());
-            return false;
-        }
-        const int metricIndex = itr->second;
-        sp<MetricProducer> metric = allMetricProducers[metricIndex];
-        sp<AnomalyTracker> anomalyTracker = metric->addAnomalyTracker(alert, anomalyAlarmMonitor);
-        if (anomalyTracker == nullptr) {
-            // The ALOGW for this invalid alert was already displayed in addAnomalyTracker().
-            return false;
-        }
-        alertTrackerMap.insert(std::make_pair(alert.id(), allAnomalyTrackers.size()));
-        allAnomalyTrackers.push_back(anomalyTracker);
-    }
-    for (int i = 0; i < config.subscription_size(); ++i) {
-        const Subscription& subscription = config.subscription(i);
-        if (subscription.rule_type() != Subscription::ALERT) {
-            continue;
-        }
-        if (subscription.subscriber_information_case() ==
-            Subscription::SubscriberInformationCase::SUBSCRIBER_INFORMATION_NOT_SET) {
-            ALOGW("subscription \"%lld\" has no subscriber info.\"",
-                (long long)subscription.id());
-            return false;
-        }
-        const auto& itr = alertTrackerMap.find(subscription.rule_id());
-        if (itr == alertTrackerMap.end()) {
-            ALOGW("subscription \"%lld\" has unknown rule id: \"%lld\"",
-                (long long)subscription.id(), (long long)subscription.rule_id());
-            return false;
-        }
-        const int anomalyTrackerIndex = itr->second;
-        allAnomalyTrackers[anomalyTrackerIndex]->addSubscription(subscription);
-    }
-    return true;
-}
-
-bool initAlarms(const StatsdConfig& config, const ConfigKey& key,
-                const sp<AlarmMonitor>& periodicAlarmMonitor,
-                const int64_t timeBaseNs, const int64_t currentTimeNs,
-                vector<sp<AlarmTracker>>& allAlarmTrackers) {
-    unordered_map<int64_t, int> alarmTrackerMap;
-    int64_t startMillis = timeBaseNs / 1000 / 1000;
-    int64_t currentTimeMillis = currentTimeNs / 1000 /1000;
-    for (int i = 0; i < config.alarm_size(); i++) {
-        const Alarm& alarm = config.alarm(i);
-        if (alarm.offset_millis() <= 0) {
-            ALOGW("Alarm offset_millis should be larger than 0.");
-            return false;
-        }
-        if (alarm.period_millis() <= 0) {
-            ALOGW("Alarm period_millis should be larger than 0.");
-            return false;
-        }
-        alarmTrackerMap.insert(std::make_pair(alarm.id(), allAlarmTrackers.size()));
-        allAlarmTrackers.push_back(
-            new AlarmTracker(startMillis, currentTimeMillis,
-                             alarm, key, periodicAlarmMonitor));
-    }
-    for (int i = 0; i < config.subscription_size(); ++i) {
-        const Subscription& subscription = config.subscription(i);
-        if (subscription.rule_type() != Subscription::ALARM) {
-            continue;
-        }
-        if (subscription.subscriber_information_case() ==
-            Subscription::SubscriberInformationCase::SUBSCRIBER_INFORMATION_NOT_SET) {
-            ALOGW("subscription \"%lld\" has no subscriber info.\"",
-                (long long)subscription.id());
-            return false;
-        }
-        const auto& itr = alarmTrackerMap.find(subscription.rule_id());
-        if (itr == alarmTrackerMap.end()) {
-            ALOGW("subscription \"%lld\" has unknown rule id: \"%lld\"",
-                (long long)subscription.id(), (long long)subscription.rule_id());
-            return false;
-        }
-        const int trackerIndex = itr->second;
-        allAlarmTrackers[trackerIndex]->addSubscription(subscription);
-    }
-    return true;
-}
-
-bool initStatsdConfig(const ConfigKey& key, const StatsdConfig& config, UidMap& uidMap,
-                      const sp<StatsPullerManager>& pullerManager,
-                      const sp<AlarmMonitor>& anomalyAlarmMonitor,
-                      const sp<AlarmMonitor>& periodicAlarmMonitor, const int64_t timeBaseNs,
-                      const int64_t currentTimeNs, set<int>& allTagIds,
-                      vector<sp<LogMatchingTracker>>& allAtomMatchers,
-                      vector<sp<ConditionTracker>>& allConditionTrackers,
-                      vector<sp<MetricProducer>>& allMetricProducers,
-                      vector<sp<AnomalyTracker>>& allAnomalyTrackers,
-                      vector<sp<AlarmTracker>>& allPeriodicAlarmTrackers,
-                      unordered_map<int, std::vector<int>>& conditionToMetricMap,
-                      unordered_map<int, std::vector<int>>& trackerToMetricMap,
-                      unordered_map<int, std::vector<int>>& trackerToConditionMap,
-                      unordered_map<int, std::vector<int>>& activationAtomTrackerToMetricMap,
-                      unordered_map<int, std::vector<int>>& deactivationAtomTrackerToMetricMap,
-                      unordered_map<int64_t, int>& alertTrackerMap,
-                      vector<int>& metricsWithActivation,
-                      std::set<int64_t>& noReportMetricIds) {
-    unordered_map<int64_t, int> logTrackerMap;
-    unordered_map<int64_t, int> conditionTrackerMap;
-    vector<ConditionState> initialConditionCache;
-    unordered_map<int64_t, int> metricProducerMap;
-    unordered_map<int64_t, int> stateAtomIdMap;
-    unordered_map<int64_t, unordered_map<int, int64_t>> allStateGroupMaps;
-
-    if (!initLogTrackers(config, uidMap, logTrackerMap, allAtomMatchers, allTagIds)) {
-        ALOGE("initLogMatchingTrackers failed");
-        return false;
-    }
-    VLOG("initLogMatchingTrackers succeed...");
-
-    if (!initConditions(key, config, logTrackerMap, conditionTrackerMap, allConditionTrackers,
-                        trackerToConditionMap, initialConditionCache)) {
-        ALOGE("initConditionTrackers failed");
-        return false;
-    }
-
-    if (!initStates(config, stateAtomIdMap, allStateGroupMaps)) {
-        ALOGE("initStates failed");
-        return false;
-    }
-    if (!initMetrics(key, config, timeBaseNs, currentTimeNs, pullerManager, logTrackerMap,
-                     conditionTrackerMap, allAtomMatchers, stateAtomIdMap, allStateGroupMaps,
-                     allConditionTrackers, initialConditionCache, allMetricProducers,
-                     conditionToMetricMap, trackerToMetricMap, metricProducerMap, noReportMetricIds,
-                     activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                     metricsWithActivation)) {
-        ALOGE("initMetricProducers failed");
-        return false;
-    }
-    if (!initAlerts(config, metricProducerMap, alertTrackerMap, anomalyAlarmMonitor,
-                    allMetricProducers, allAnomalyTrackers)) {
-        ALOGE("initAlerts failed");
-        return false;
-    }
-    if (!initAlarms(config, key, periodicAlarmMonitor,
-                    timeBaseNs, currentTimeNs, allPeriodicAlarmTrackers)) {
-        ALOGE("initAlarms failed");
-        return false;
-    }
-
-    return true;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/metrics/metrics_manager_util.h b/cmds/statsd/src/metrics/metrics_manager_util.h
deleted file mode 100644
index 96b5c26..0000000
--- a/cmds/statsd/src/metrics/metrics_manager_util.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <set>
-#include <unordered_map>
-#include <vector>
-
-#include "../anomaly/AlarmTracker.h"
-#include "../condition/ConditionTracker.h"
-#include "../external/StatsPullerManager.h"
-#include "../matchers/LogMatchingTracker.h"
-#include "../metrics/MetricProducer.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Helper functions for MetricsManager to initialize from StatsdConfig.
-// *Note*: only initStatsdConfig() should be called from outside.
-// All other functions are intermediate
-// steps, created to make unit tests easier. And most of the parameters in these
-// functions are temporary objects in the initialization phase.
-
-// Initialize the LogMatchingTrackers.
-// input:
-// [key]: the config key that this config belongs to
-// [config]: the input StatsdConfig
-// output:
-// [logTrackerMap]: this map should contain matcher name to index mapping
-// [allAtomMatchers]: should store the sp to all the LogMatchingTracker
-// [allTagIds]: contains the set of all interesting tag ids to this config.
-bool initLogTrackers(const StatsdConfig& config,
-                     const UidMap& uidMap,
-                     std::unordered_map<int64_t, int>& logTrackerMap,
-                     std::vector<sp<LogMatchingTracker>>& allAtomMatchers,
-                     std::set<int>& allTagIds);
-
-// Initialize ConditionTrackers
-// input:
-// [key]: the config key that this config belongs to
-// [config]: the input config
-// [logTrackerMap]: LogMatchingTracker name to index mapping from previous step.
-// output:
-// [conditionTrackerMap]: this map should contain condition name to index mapping
-// [allConditionTrackers]: stores the sp to all the ConditionTrackers
-// [trackerToConditionMap]: contain the mapping from index of
-//                        log tracker to condition trackers that use the log tracker
-// [initialConditionCache]: stores the initial conditions for each ConditionTracker
-bool initConditions(const ConfigKey& key, const StatsdConfig& config,
-                    const std::unordered_map<int64_t, int>& logTrackerMap,
-                    std::unordered_map<int64_t, int>& conditionTrackerMap,
-                    std::vector<sp<ConditionTracker>>& allConditionTrackers,
-                    std::unordered_map<int, std::vector<int>>& trackerToConditionMap,
-                    std::unordered_map<int, std::vector<MetricConditionLink>>& eventConditionLinks,
-                    std::vector<ConditionState>& initialConditionCache);
-
-// Initialize State maps using State protos in the config. These maps will
-// eventually be passed to MetricProducers to initialize their state info.
-// input:
-// [config]: the input config
-// output:
-// [stateAtomIdMap]: this map should contain the mapping from state ids to atom ids
-// [allStateGroupMaps]: this map should contain the mapping from states ids and state
-//                      values to state group ids for all states
-bool initStates(const StatsdConfig& config, unordered_map<int64_t, int>& stateAtomIdMap,
-                unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps);
-
-// Initialize MetricProducers.
-// input:
-// [key]: the config key that this config belongs to
-// [config]: the input config
-// [timeBaseSec]: start time base for all metrics
-// [logTrackerMap]: LogMatchingTracker name to index mapping from previous step.
-// [conditionTrackerMap]: condition name to index mapping
-// [stateAtomIdMap]: contains the mapping from state ids to atom ids
-// [allStateGroupMaps]: contains the mapping from atom ids and state values to
-//                      state group ids for all states
-// output:
-// [allMetricProducers]: contains the list of sp to the MetricProducers created.
-// [conditionToMetricMap]: contains the mapping from condition tracker index to
-//                          the list of MetricProducer index
-// [trackerToMetricMap]: contains the mapping from log tracker to MetricProducer index.
-bool initMetrics(
-        const ConfigKey& key, const StatsdConfig& config, const int64_t timeBaseTimeNs,
-        const int64_t currentTimeNs, UidMap& uidMap, const sp<StatsPullerManager>& pullerManager,
-        const std::unordered_map<int64_t, int>& logTrackerMap,
-        const std::unordered_map<int64_t, int>& conditionTrackerMap,
-        const std::unordered_map<int, std::vector<MetricConditionLink>>& eventConditionLinks,
-        const vector<sp<LogMatchingTracker>>& allAtomMatchers,
-        const unordered_map<int64_t, int>& stateAtomIdMap,
-        const unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps,
-        vector<sp<ConditionTracker>>& allConditionTrackers,
-        const std::vector<ConditionState>& initialConditionCache,
-        std::vector<sp<MetricProducer>>& allMetricProducers,
-        std::unordered_map<int, std::vector<int>>& conditionToMetricMap,
-        std::unordered_map<int, std::vector<int>>& trackerToMetricMap,
-        std::set<int64_t>& noReportMetricIds,
-        std::unordered_map<int, std::vector<int>>& activationAtomTrackerToMetricMap,
-        std::unordered_map<int, std::vector<int>>& deactivationAtomTrackerToMetricMap,
-        std::vector<int>& metricsWithActivation);
-
-// Initialize MetricsManager from StatsdConfig.
-// Parameters are the members of MetricsManager. See MetricsManager for declaration.
-bool initStatsdConfig(const ConfigKey& key, const StatsdConfig& config, UidMap& uidMap,
-                      const sp<StatsPullerManager>& pullerManager,
-                      const sp<AlarmMonitor>& anomalyAlarmMonitor,
-                      const sp<AlarmMonitor>& periodicAlarmMonitor, const int64_t timeBaseNs,
-                      const int64_t currentTimeNs, std::set<int>& allTagIds,
-                      std::vector<sp<LogMatchingTracker>>& allAtomMatchers,
-                      std::vector<sp<ConditionTracker>>& allConditionTrackers,
-                      std::vector<sp<MetricProducer>>& allMetricProducers,
-                      vector<sp<AnomalyTracker>>& allAnomalyTrackers,
-                      vector<sp<AlarmTracker>>& allPeriodicAlarmTrackers,
-                      std::unordered_map<int, std::vector<int>>& conditionToMetricMap,
-                      std::unordered_map<int, std::vector<int>>& trackerToMetricMap,
-                      std::unordered_map<int, std::vector<int>>& trackerToConditionMap,
-                      unordered_map<int, std::vector<int>>& activationAtomTrackerToMetricMap,
-                      unordered_map<int, std::vector<int>>& deactivationAtomTrackerToMetricMap,
-                      std::unordered_map<int64_t, int>& alertTrackerMap,
-                      vector<int>& metricsWithActivation,
-                      std::set<int64_t>& noReportMetricIds);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/packages/PackageInfoListener.h b/cmds/statsd/src/packages/PackageInfoListener.h
deleted file mode 100644
index 6c50a8c..0000000
--- a/cmds/statsd/src/packages/PackageInfoListener.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef STATSD_PACKAGE_INFO_LISTENER_H
-#define STATSD_PACKAGE_INFO_LISTENER_H
-
-#include <string>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class PackageInfoListener : public virtual android::RefBase {
-public:
-    // Uid map will notify this listener that the app with apk name and uid has been upgraded to
-    // the specified version.
-    virtual void notifyAppUpgrade(const int64_t& eventTimeNs, const std::string& apk,
-                                  const int uid, const int64_t version) = 0;
-
-    // Notify interested listeners that the given apk and uid combination no longer exits.
-    virtual void notifyAppRemoved(const int64_t& eventTimeNs, const std::string& apk,
-                                  const int uid) = 0;
-
-    // Notify the listener that the UidMap snapshot is available.
-    virtual void onUidMapReceived(const int64_t& eventTimeNs) = 0;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // STATSD_PACKAGE_INFO_LISTENER_H
diff --git a/cmds/statsd/src/packages/UidMap.cpp b/cmds/statsd/src/packages/UidMap.cpp
deleted file mode 100644
index acf40c8..0000000
--- a/cmds/statsd/src/packages/UidMap.cpp
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, versionCode 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "hash.h"
-#include "stats_log_util.h"
-#include "guardrail/StatsdStats.h"
-#include "packages/UidMap.h"
-
-#include <inttypes.h>
-
-using namespace android;
-
-using android::base::StringPrintf;
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_FLOAT;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_UINT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::ProtoOutputStream;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const int FIELD_ID_SNAPSHOT_PACKAGE_NAME = 1;
-const int FIELD_ID_SNAPSHOT_PACKAGE_VERSION = 2;
-const int FIELD_ID_SNAPSHOT_PACKAGE_UID = 3;
-const int FIELD_ID_SNAPSHOT_PACKAGE_DELETED = 4;
-const int FIELD_ID_SNAPSHOT_PACKAGE_NAME_HASH = 5;
-const int FIELD_ID_SNAPSHOT_PACKAGE_VERSION_STRING = 6;
-const int FIELD_ID_SNAPSHOT_PACKAGE_VERSION_STRING_HASH = 7;
-const int FIELD_ID_SNAPSHOT_PACKAGE_INSTALLER = 8;
-const int FIELD_ID_SNAPSHOT_PACKAGE_INSTALLER_HASH = 9;
-const int FIELD_ID_SNAPSHOT_TIMESTAMP = 1;
-const int FIELD_ID_SNAPSHOT_PACKAGE_INFO = 2;
-const int FIELD_ID_SNAPSHOTS = 1;
-const int FIELD_ID_CHANGES = 2;
-const int FIELD_ID_CHANGE_DELETION = 1;
-const int FIELD_ID_CHANGE_TIMESTAMP = 2;
-const int FIELD_ID_CHANGE_PACKAGE = 3;
-const int FIELD_ID_CHANGE_UID = 4;
-const int FIELD_ID_CHANGE_NEW_VERSION = 5;
-const int FIELD_ID_CHANGE_PREV_VERSION = 6;
-const int FIELD_ID_CHANGE_PACKAGE_HASH = 7;
-const int FIELD_ID_CHANGE_NEW_VERSION_STRING = 8;
-const int FIELD_ID_CHANGE_PREV_VERSION_STRING = 9;
-const int FIELD_ID_CHANGE_NEW_VERSION_STRING_HASH = 10;
-const int FIELD_ID_CHANGE_PREV_VERSION_STRING_HASH = 11;
-
-UidMap::UidMap() : mBytesUsed(0) {}
-
-UidMap::~UidMap() {}
-
-sp<UidMap> UidMap::getInstance() {
-    static sp<UidMap> sInstance = new UidMap();
-    return sInstance;
-}
-
-bool UidMap::hasApp(int uid, const string& packageName) const {
-    lock_guard<mutex> lock(mMutex);
-
-    auto it = mMap.find(std::make_pair(uid, packageName));
-    return it != mMap.end() && !it->second.deleted;
-}
-
-string UidMap::normalizeAppName(const string& appName) const {
-    string normalizedName = appName;
-    std::transform(normalizedName.begin(), normalizedName.end(), normalizedName.begin(), ::tolower);
-    return normalizedName;
-}
-
-std::set<string> UidMap::getAppNamesFromUid(const int32_t& uid, bool returnNormalized) const {
-    lock_guard<mutex> lock(mMutex);
-    return getAppNamesFromUidLocked(uid,returnNormalized);
-}
-
-std::set<string> UidMap::getAppNamesFromUidLocked(const int32_t& uid, bool returnNormalized) const {
-    std::set<string> names;
-    for (const auto& kv : mMap) {
-        if (kv.first.first == uid && !kv.second.deleted) {
-            names.insert(returnNormalized ? normalizeAppName(kv.first.second) : kv.first.second);
-        }
-    }
-    return names;
-}
-
-int64_t UidMap::getAppVersion(int uid, const string& packageName) const {
-    lock_guard<mutex> lock(mMutex);
-
-    auto it = mMap.find(std::make_pair(uid, packageName));
-    if (it == mMap.end() || it->second.deleted) {
-        return 0;
-    }
-    return it->second.versionCode;
-}
-
-void UidMap::updateMap(const int64_t& timestamp, const vector<int32_t>& uid,
-                       const vector<int64_t>& versionCode, const vector<String16>& versionString,
-                       const vector<String16>& packageName, const vector<String16>& installer) {
-    wp<PackageInfoListener> broadcast = NULL;
-    {
-        lock_guard<mutex> lock(mMutex);  // Exclusively lock for updates.
-
-        std::unordered_map<std::pair<int, string>, AppData, PairHash> deletedApps;
-
-        // Copy all the deleted apps.
-        for (const auto& kv : mMap) {
-            if (kv.second.deleted) {
-                deletedApps[kv.first] = kv.second;
-            }
-        }
-
-        mMap.clear();
-        for (size_t j = 0; j < uid.size(); j++) {
-            string package = string(String8(packageName[j]).string());
-            mMap[std::make_pair(uid[j], package)] =
-                    AppData(versionCode[j], string(String8(versionString[j]).string()),
-                            string(String8(installer[j]).string()));
-        }
-
-        for (const auto& kv : deletedApps) {
-            auto mMapIt = mMap.find(kv.first);
-            if (mMapIt != mMap.end()) {
-                // Insert this deleted app back into the current map.
-                mMap[kv.first] = kv.second;
-            }
-        }
-
-        ensureBytesUsedBelowLimit();
-        StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
-        broadcast = mSubscriber;
-    }
-    // To avoid invoking callback while holding the internal lock. we get a copy of the listener
-    // and invoke the callback. It's still possible that after we copy the listener, it removes
-    // itself before we call it. It's then the listener's job to handle it (expect the callback to
-    // be called after listener is removed, and the listener should properly ignore it).
-    auto strongPtr = broadcast.promote();
-    if (strongPtr != NULL) {
-        strongPtr->onUidMapReceived(timestamp);
-    }
-}
-
-void UidMap::updateApp(const int64_t& timestamp, const String16& app_16, const int32_t& uid,
-                       const int64_t& versionCode, const String16& versionString,
-                       const String16& installer) {
-    wp<PackageInfoListener> broadcast = NULL;
-    string appName = string(String8(app_16).string());
-    {
-        lock_guard<mutex> lock(mMutex);
-        int32_t prevVersion = 0;
-        string prevVersionString = "";
-        string newVersionString = string(String8(versionString).string());
-        bool found = false;
-        auto it = mMap.find(std::make_pair(uid, appName));
-        if (it != mMap.end()) {
-            found = true;
-            prevVersion = it->second.versionCode;
-            prevVersionString = it->second.versionString;
-            it->second.versionCode = versionCode;
-            it->second.versionString = newVersionString;
-            it->second.installer = string(String8(installer).string());
-            it->second.deleted = false;
-        }
-        if (!found) {
-            // Otherwise, we need to add an app at this uid.
-            mMap[std::make_pair(uid, appName)] =
-                    AppData(versionCode, newVersionString, string(String8(installer).string()));
-        } else {
-            // Only notify the listeners if this is an app upgrade. If this app is being installed
-            // for the first time, then we don't notify the listeners.
-            // It's also OK to split again if we're forming a partial bucket after re-installing an
-            // app after deletion.
-            broadcast = mSubscriber;
-        }
-        mChanges.emplace_back(false, timestamp, appName, uid, versionCode, newVersionString,
-                              prevVersion, prevVersionString);
-        mBytesUsed += kBytesChangeRecord;
-        ensureBytesUsedBelowLimit();
-        StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
-        StatsdStats::getInstance().setUidMapChanges(mChanges.size());
-    }
-
-    auto strongPtr = broadcast.promote();
-    if (strongPtr != NULL) {
-        strongPtr->notifyAppUpgrade(timestamp, appName, uid, versionCode);
-    }
-}
-
-void UidMap::ensureBytesUsedBelowLimit() {
-    size_t limit;
-    if (maxBytesOverride <= 0) {
-        limit = StatsdStats::kMaxBytesUsedUidMap;
-    } else {
-        limit = maxBytesOverride;
-    }
-    while (mBytesUsed > limit) {
-        ALOGI("Bytes used %zu is above limit %zu, need to delete something", mBytesUsed, limit);
-        if (mChanges.size() > 0) {
-            mBytesUsed -= kBytesChangeRecord;
-            mChanges.pop_front();
-            StatsdStats::getInstance().noteUidMapDropped(1);
-        }
-    }
-}
-
-void UidMap::removeApp(const int64_t& timestamp, const String16& app_16, const int32_t& uid) {
-    wp<PackageInfoListener> broadcast = NULL;
-    string app = string(String8(app_16).string());
-    {
-        lock_guard<mutex> lock(mMutex);
-
-        int64_t prevVersion = 0;
-        string prevVersionString = "";
-        auto key = std::make_pair(uid, app);
-        auto it = mMap.find(key);
-        if (it != mMap.end() && !it->second.deleted) {
-            prevVersion = it->second.versionCode;
-            prevVersionString = it->second.versionString;
-            it->second.deleted = true;
-            mDeletedApps.push_back(key);
-        }
-        if (mDeletedApps.size() > StatsdStats::kMaxDeletedAppsInUidMap) {
-            // Delete the oldest one.
-            auto oldest = mDeletedApps.front();
-            mDeletedApps.pop_front();
-            mMap.erase(oldest);
-            StatsdStats::getInstance().noteUidMapAppDeletionDropped();
-        }
-        mChanges.emplace_back(true, timestamp, app, uid, 0, "", prevVersion, prevVersionString);
-        mBytesUsed += kBytesChangeRecord;
-        ensureBytesUsedBelowLimit();
-        StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
-        StatsdStats::getInstance().setUidMapChanges(mChanges.size());
-        broadcast = mSubscriber;
-    }
-
-    auto strongPtr = broadcast.promote();
-    if (strongPtr != NULL) {
-        strongPtr->notifyAppRemoved(timestamp, app, uid);
-    }
-}
-
-void UidMap::setListener(wp<PackageInfoListener> listener) {
-    lock_guard<mutex> lock(mMutex);  // Lock for updates
-    mSubscriber = listener;
-}
-
-void UidMap::assignIsolatedUid(int isolatedUid, int parentUid) {
-    lock_guard<mutex> lock(mIsolatedMutex);
-
-    mIsolatedUidMap[isolatedUid] = parentUid;
-}
-
-void UidMap::removeIsolatedUid(int isolatedUid) {
-    lock_guard<mutex> lock(mIsolatedMutex);
-
-    auto it = mIsolatedUidMap.find(isolatedUid);
-    if (it != mIsolatedUidMap.end()) {
-        mIsolatedUidMap.erase(it);
-    }
-}
-
-int UidMap::getHostUidOrSelf(int uid) const {
-    lock_guard<mutex> lock(mIsolatedMutex);
-
-    auto it = mIsolatedUidMap.find(uid);
-    if (it != mIsolatedUidMap.end()) {
-        return it->second;
-    }
-    return uid;
-}
-
-void UidMap::clearOutput() {
-    mChanges.clear();
-    // Also update the guardrail trackers.
-    StatsdStats::getInstance().setUidMapChanges(0);
-    mBytesUsed = 0;
-    StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
-}
-
-int64_t UidMap::getMinimumTimestampNs() {
-    int64_t m = 0;
-    for (const auto& kv : mLastUpdatePerConfigKey) {
-        if (m == 0) {
-            m = kv.second;
-        } else if (kv.second < m) {
-            m = kv.second;
-        }
-    }
-    return m;
-}
-
-size_t UidMap::getBytesUsed() const {
-    return mBytesUsed;
-}
-
-void UidMap::writeUidMapSnapshot(int64_t timestamp, bool includeVersionStrings,
-                                 bool includeInstaller, const std::set<int32_t>& interestingUids,
-                                 std::set<string>* str_set, ProtoOutputStream* proto) {
-    lock_guard<mutex> lock(mMutex);
-
-    writeUidMapSnapshotLocked(timestamp, includeVersionStrings, includeInstaller, interestingUids,
-                              str_set, proto);
-}
-
-void UidMap::writeUidMapSnapshotLocked(int64_t timestamp, bool includeVersionStrings,
-                                       bool includeInstaller,
-                                       const std::set<int32_t>& interestingUids,
-                                       std::set<string>* str_set, ProtoOutputStream* proto) {
-    proto->write(FIELD_TYPE_INT64 | FIELD_ID_SNAPSHOT_TIMESTAMP, (long long)timestamp);
-    for (const auto& kv : mMap) {
-        if (!interestingUids.empty() &&
-            interestingUids.find(kv.first.first) == interestingUids.end()) {
-            continue;
-        }
-        uint64_t token = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                      FIELD_ID_SNAPSHOT_PACKAGE_INFO);
-        if (str_set != nullptr) {
-            str_set->insert(kv.first.second);
-            proto->write(FIELD_TYPE_UINT64 | FIELD_ID_SNAPSHOT_PACKAGE_NAME_HASH,
-                         (long long)Hash64(kv.first.second));
-            if (includeVersionStrings) {
-                str_set->insert(kv.second.versionString);
-                proto->write(FIELD_TYPE_UINT64 | FIELD_ID_SNAPSHOT_PACKAGE_VERSION_STRING_HASH,
-                             (long long)Hash64(kv.second.versionString));
-            }
-            if (includeInstaller) {
-                str_set->insert(kv.second.installer);
-                proto->write(FIELD_TYPE_UINT64 | FIELD_ID_SNAPSHOT_PACKAGE_INSTALLER_HASH,
-                             (long long)Hash64(kv.second.installer));
-            }
-        } else {
-            proto->write(FIELD_TYPE_STRING | FIELD_ID_SNAPSHOT_PACKAGE_NAME, kv.first.second);
-            if (includeVersionStrings) {
-                proto->write(FIELD_TYPE_STRING | FIELD_ID_SNAPSHOT_PACKAGE_VERSION_STRING,
-                             kv.second.versionString);
-            }
-            if (includeInstaller) {
-                proto->write(FIELD_TYPE_STRING | FIELD_ID_SNAPSHOT_PACKAGE_INSTALLER,
-                             kv.second.installer);
-            }
-        }
-
-        proto->write(FIELD_TYPE_INT64 | FIELD_ID_SNAPSHOT_PACKAGE_VERSION,
-                     (long long)kv.second.versionCode);
-        proto->write(FIELD_TYPE_INT32 | FIELD_ID_SNAPSHOT_PACKAGE_UID, kv.first.first);
-        proto->write(FIELD_TYPE_BOOL | FIELD_ID_SNAPSHOT_PACKAGE_DELETED, kv.second.deleted);
-        proto->end(token);
-    }
-}
-
-void UidMap::appendUidMap(const int64_t& timestamp, const ConfigKey& key, std::set<string>* str_set,
-                          bool includeVersionStrings, bool includeInstaller,
-                          ProtoOutputStream* proto) {
-    lock_guard<mutex> lock(mMutex);  // Lock for updates
-
-    for (const ChangeRecord& record : mChanges) {
-        if (record.timestampNs > mLastUpdatePerConfigKey[key]) {
-            uint64_t changesToken =
-                    proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_CHANGES);
-            proto->write(FIELD_TYPE_BOOL | FIELD_ID_CHANGE_DELETION, (bool)record.deletion);
-            proto->write(FIELD_TYPE_INT64 | FIELD_ID_CHANGE_TIMESTAMP,
-                         (long long)record.timestampNs);
-            if (str_set != nullptr) {
-                str_set->insert(record.package);
-                proto->write(FIELD_TYPE_UINT64 | FIELD_ID_CHANGE_PACKAGE_HASH,
-                             (long long)Hash64(record.package));
-                if (includeVersionStrings) {
-                    str_set->insert(record.versionString);
-                    proto->write(FIELD_TYPE_UINT64 | FIELD_ID_CHANGE_NEW_VERSION_STRING_HASH,
-                                 (long long)Hash64(record.versionString));
-                    str_set->insert(record.prevVersionString);
-                    proto->write(FIELD_TYPE_UINT64 | FIELD_ID_CHANGE_PREV_VERSION_STRING_HASH,
-                                 (long long)Hash64(record.prevVersionString));
-                }
-            } else {
-                proto->write(FIELD_TYPE_STRING | FIELD_ID_CHANGE_PACKAGE, record.package);
-                if (includeVersionStrings) {
-                    proto->write(FIELD_TYPE_STRING | FIELD_ID_CHANGE_NEW_VERSION_STRING,
-                                 record.versionString);
-                    proto->write(FIELD_TYPE_STRING | FIELD_ID_CHANGE_PREV_VERSION_STRING,
-                                 record.prevVersionString);
-                }
-            }
-
-            proto->write(FIELD_TYPE_INT32 | FIELD_ID_CHANGE_UID, (int)record.uid);
-            proto->write(FIELD_TYPE_INT64 | FIELD_ID_CHANGE_NEW_VERSION, (long long)record.version);
-            proto->write(FIELD_TYPE_INT64 | FIELD_ID_CHANGE_PREV_VERSION,
-                         (long long)record.prevVersion);
-            proto->end(changesToken);
-        }
-    }
-
-    // Write snapshot from current uid map state.
-    uint64_t snapshotsToken =
-            proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_SNAPSHOTS);
-    writeUidMapSnapshotLocked(timestamp, includeVersionStrings, includeInstaller,
-                              std::set<int32_t>() /*empty uid set means including every uid*/,
-                              str_set, proto);
-    proto->end(snapshotsToken);
-
-    int64_t prevMin = getMinimumTimestampNs();
-    mLastUpdatePerConfigKey[key] = timestamp;
-    int64_t newMin = getMinimumTimestampNs();
-
-    if (newMin > prevMin) {  // Delete anything possible now that the minimum has
-                             // moved forward.
-        int64_t cutoff_nanos = newMin;
-        for (auto it_changes = mChanges.begin(); it_changes != mChanges.end();) {
-            if (it_changes->timestampNs < cutoff_nanos) {
-                mBytesUsed -= kBytesChangeRecord;
-                it_changes = mChanges.erase(it_changes);
-            } else {
-                ++it_changes;
-            }
-        }
-    }
-    StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
-    StatsdStats::getInstance().setUidMapChanges(mChanges.size());
-}
-
-void UidMap::printUidMap(int out) const {
-    lock_guard<mutex> lock(mMutex);
-
-    for (const auto& kv : mMap) {
-        if (!kv.second.deleted) {
-            dprintf(out, "%s, v%" PRId64 ", %s, %s (%i)\n", kv.first.second.c_str(),
-                    kv.second.versionCode, kv.second.versionString.c_str(),
-                    kv.second.installer.c_str(), kv.first.first);
-        }
-    }
-}
-
-void UidMap::OnConfigUpdated(const ConfigKey& key) {
-    mLastUpdatePerConfigKey[key] = -1;
-}
-
-void UidMap::OnConfigRemoved(const ConfigKey& key) {
-    mLastUpdatePerConfigKey.erase(key);
-}
-
-set<int32_t> UidMap::getAppUid(const string& package) const {
-    lock_guard<mutex> lock(mMutex);
-
-    set<int32_t> results;
-    for (const auto& kv : mMap) {
-        if (kv.first.second == package && !kv.second.deleted) {
-            results.insert(kv.first.first);
-        }
-    }
-    return results;
-}
-
-// Note not all the following AIDs are used as uids. Some are used only for gids.
-// It's ok to leave them in the map, but we won't ever see them in the log's uid field.
-// App's uid starts from 10000, and will not overlap with the following AIDs.
-const std::map<string, uint32_t> UidMap::sAidToUidMapping = {{"AID_ROOT", 0},
-                                                             {"AID_SYSTEM", 1000},
-                                                             {"AID_RADIO", 1001},
-                                                             {"AID_BLUETOOTH", 1002},
-                                                             {"AID_GRAPHICS", 1003},
-                                                             {"AID_INPUT", 1004},
-                                                             {"AID_AUDIO", 1005},
-                                                             {"AID_CAMERA", 1006},
-                                                             {"AID_LOG", 1007},
-                                                             {"AID_COMPASS", 1008},
-                                                             {"AID_MOUNT", 1009},
-                                                             {"AID_WIFI", 1010},
-                                                             {"AID_ADB", 1011},
-                                                             {"AID_INSTALL", 1012},
-                                                             {"AID_MEDIA", 1013},
-                                                             {"AID_DHCP", 1014},
-                                                             {"AID_SDCARD_RW", 1015},
-                                                             {"AID_VPN", 1016},
-                                                             {"AID_KEYSTORE", 1017},
-                                                             {"AID_USB", 1018},
-                                                             {"AID_DRM", 1019},
-                                                             {"AID_MDNSR", 1020},
-                                                             {"AID_GPS", 1021},
-                                                             // {"AID_UNUSED1", 1022},
-                                                             {"AID_MEDIA_RW", 1023},
-                                                             {"AID_MTP", 1024},
-                                                             // {"AID_UNUSED2", 1025},
-                                                             {"AID_DRMRPC", 1026},
-                                                             {"AID_NFC", 1027},
-                                                             {"AID_SDCARD_R", 1028},
-                                                             {"AID_CLAT", 1029},
-                                                             {"AID_LOOP_RADIO", 1030},
-                                                             {"AID_MEDIA_DRM", 1031},
-                                                             {"AID_PACKAGE_INFO", 1032},
-                                                             {"AID_SDCARD_PICS", 1033},
-                                                             {"AID_SDCARD_AV", 1034},
-                                                             {"AID_SDCARD_ALL", 1035},
-                                                             {"AID_LOGD", 1036},
-                                                             {"AID_SHARED_RELRO", 1037},
-                                                             {"AID_DBUS", 1038},
-                                                             {"AID_TLSDATE", 1039},
-                                                             {"AID_MEDIA_EX", 1040},
-                                                             {"AID_AUDIOSERVER", 1041},
-                                                             {"AID_METRICS_COLL", 1042},
-                                                             {"AID_METRICSD", 1043},
-                                                             {"AID_WEBSERV", 1044},
-                                                             {"AID_DEBUGGERD", 1045},
-                                                             {"AID_MEDIA_CODEC", 1046},
-                                                             {"AID_CAMERASERVER", 1047},
-                                                             {"AID_FIREWALL", 1048},
-                                                             {"AID_TRUNKS", 1049},
-                                                             {"AID_NVRAM", 1050},
-                                                             {"AID_DNS", 1051},
-                                                             {"AID_DNS_TETHER", 1052},
-                                                             {"AID_WEBVIEW_ZYGOTE", 1053},
-                                                             {"AID_VEHICLE_NETWORK", 1054},
-                                                             {"AID_MEDIA_AUDIO", 1055},
-                                                             {"AID_MEDIA_VIDEO", 1056},
-                                                             {"AID_MEDIA_IMAGE", 1057},
-                                                             {"AID_TOMBSTONED", 1058},
-                                                             {"AID_MEDIA_OBB", 1059},
-                                                             {"AID_ESE", 1060},
-                                                             {"AID_OTA_UPDATE", 1061},
-                                                             {"AID_AUTOMOTIVE_EVS", 1062},
-                                                             {"AID_LOWPAN", 1063},
-                                                             {"AID_HSM", 1064},
-                                                             {"AID_RESERVED_DISK", 1065},
-                                                             {"AID_STATSD", 1066},
-                                                             {"AID_INCIDENTD", 1067},
-                                                             {"AID_SECURE_ELEMENT", 1068},
-                                                             {"AID_LMKD", 1069},
-                                                             {"AID_LLKD", 1070},
-                                                             {"AID_IORAPD", 1071},
-                                                             {"AID_GPU_SERVICE", 1072},
-                                                             {"AID_NETWORK_STACK", 1073},
-                                                             {"AID_GSID", 1074},
-                                                             {"AID_FSVERITY_CERT", 1075},
-                                                             {"AID_CREDSTORE", 1076},
-                                                             {"AID_EXTERNAL_STORAGE", 1077},
-                                                             {"AID_EXT_DATA_RW", 1078},
-                                                             {"AID_EXT_OBB_RW", 1079},
-                                                             {"AID_CONTEXT_HUB", 1080},
-                                                             {"AID_SHELL", 2000},
-                                                             {"AID_CACHE", 2001},
-                                                             {"AID_DIAG", 2002}};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/packages/UidMap.h b/cmds/statsd/src/packages/UidMap.h
deleted file mode 100644
index 22250ae..0000000
--- a/cmds/statsd/src/packages/UidMap.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "config/ConfigKey.h"
-#include "config/ConfigListener.h"
-#include "packages/PackageInfoListener.h"
-#include "stats_util.h"
-
-#include <gtest/gtest_prod.h>
-#include <stdio.h>
-#include <utils/RefBase.h>
-#include <utils/String16.h>
-
-#include <list>
-#include <mutex>
-#include <set>
-#include <string>
-#include <unordered_map>
-
-using namespace android;
-using namespace std;
-
-using android::util::ProtoOutputStream;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-struct AppData {
-    int64_t versionCode;
-    string versionString;
-    string installer;
-    bool deleted;
-
-    // Empty constructor needed for unordered map.
-    AppData() {
-    }
-
-    AppData(const int64_t v, const string& versionString, const string& installer)
-        : versionCode(v), versionString(versionString), installer(installer), deleted(false){};
-};
-
-// When calling appendUidMap, we retrieve all the ChangeRecords since the last
-// timestamp we called appendUidMap for this configuration key.
-struct ChangeRecord {
-    const bool deletion;
-    const int64_t timestampNs;
-    const string package;
-    const int32_t uid;
-    const int64_t version;
-    const int64_t prevVersion;
-    const string versionString;
-    const string prevVersionString;
-
-    ChangeRecord(const bool isDeletion, const int64_t timestampNs, const string& package,
-                 const int32_t uid, const int64_t version, const string versionString,
-                 const int64_t prevVersion, const string prevVersionString)
-        : deletion(isDeletion),
-          timestampNs(timestampNs),
-          package(package),
-          uid(uid),
-          version(version),
-          prevVersion(prevVersion),
-          versionString(versionString),
-          prevVersionString(prevVersionString) {
-    }
-};
-
-const unsigned int kBytesChangeRecord = sizeof(struct ChangeRecord);
-
-// UidMap keeps track of what the corresponding app name (APK name) and version code for every uid
-// at any given moment. This map must be updated by StatsCompanionService.
-class UidMap : public virtual android::RefBase {
-public:
-    UidMap();
-    ~UidMap();
-    static const std::map<std::string, uint32_t> sAidToUidMapping;
-
-    static sp<UidMap> getInstance();
-    /*
-     * All three inputs must be the same size, and the jth element in each array refers to the same
-     * tuple, ie. uid[j] corresponds to packageName[j] with versionCode[j].
-     */
-    void updateMap(const int64_t& timestamp, const vector<int32_t>& uid,
-                   const vector<int64_t>& versionCode, const vector<String16>& versionString,
-                   const vector<String16>& packageName, const vector<String16>& installer);
-
-    void updateApp(const int64_t& timestamp, const String16& packageName, const int32_t& uid,
-                   const int64_t& versionCode, const String16& versionString,
-                   const String16& installer);
-    void removeApp(const int64_t& timestamp, const String16& packageName, const int32_t& uid);
-
-    // Returns true if the given uid contains the specified app (eg. com.google.android.gms).
-    bool hasApp(int uid, const string& packageName) const;
-
-    // Returns the app names from uid.
-    std::set<string> getAppNamesFromUid(const int32_t& uid, bool returnNormalized) const;
-
-    int64_t getAppVersion(int uid, const string& packageName) const;
-
-    // Helper for debugging contents of this uid map. Can be triggered with:
-    // adb shell cmd stats print-uid-map
-    void printUidMap(int outFd) const;
-
-    // Command for indicating to the map that StatsLogProcessor should be notified if an app is
-    // updated. This allows metric producers and managers to distinguish when the same uid or app
-    // represents a different version of an app.
-    void setListener(wp<PackageInfoListener> listener);
-
-    // Informs uid map that a config is added/updated. Used for keeping mConfigKeys up to date.
-    void OnConfigUpdated(const ConfigKey& key);
-
-    // Informs uid map that a config is removed. Used for keeping mConfigKeys up to date.
-    void OnConfigRemoved(const ConfigKey& key);
-
-    void assignIsolatedUid(int isolatedUid, int parentUid);
-    void removeIsolatedUid(int isolatedUid);
-
-    // Returns the host uid if it exists. Otherwise, returns the same uid that was passed-in.
-    virtual int getHostUidOrSelf(int uid) const;
-
-    // Gets all snapshots and changes that have occurred since the last output.
-    // If every config key has received a change or snapshot record, then this
-    // record is deleted.
-    void appendUidMap(const int64_t& timestamp, const ConfigKey& key, std::set<string>* str_set,
-                      bool includeVersionStrings, bool includeInstaller,
-                      ProtoOutputStream* proto);
-
-    // Forces the output to be cleared. We still generate a snapshot based on the current state.
-    // This results in extra data uploaded but helps us reconstruct the uid mapping on the server
-    // in case we lose a previous upload.
-    void clearOutput();
-
-    // Get currently cached value of memory used by UID map.
-    size_t getBytesUsed() const;
-
-    virtual std::set<int32_t> getAppUid(const string& package) const;
-
-    // Write current PackageInfoSnapshot to ProtoOutputStream.
-    // interestingUids: If not empty, only write the package info for these uids. If empty, write
-    //                  package info for all uids.
-    // str_set: if not null, add new string to the set and write str_hash to proto
-    //          if null, write string to proto.
-    void writeUidMapSnapshot(int64_t timestamp, bool includeVersionStrings, bool includeInstaller,
-                             const std::set<int32_t>& interestingUids, std::set<string>* str_set,
-                             ProtoOutputStream* proto);
-
-private:
-    std::set<string> getAppNamesFromUidLocked(const int32_t& uid, bool returnNormalized) const;
-    string normalizeAppName(const string& appName) const;
-
-    void writeUidMapSnapshotLocked(int64_t timestamp, bool includeVersionStrings,
-                                   bool includeInstaller, const std::set<int32_t>& interestingUids,
-                                   std::set<string>* str_set, ProtoOutputStream* proto);
-
-    mutable mutex mMutex;
-    mutable mutex mIsolatedMutex;
-
-    struct PairHash {
-        size_t operator()(std::pair<int, string> p) const noexcept {
-            std::hash<std::string> hash_fn;
-            return hash_fn(std::to_string(p.first) + p.second);
-        }
-    };
-    // Maps uid and package name to application data.
-    std::unordered_map<std::pair<int, string>, AppData, PairHash> mMap;
-
-    // Maps isolated uid to the parent uid. Any metrics for an isolated uid will instead contribute
-    // to the parent uid.
-    std::unordered_map<int, int> mIsolatedUidMap;
-
-    // Record the changes that can be provided with the uploads.
-    std::list<ChangeRecord> mChanges;
-
-    // Store which uid and apps represent deleted ones.
-    std::list<std::pair<int, string>> mDeletedApps;
-
-    // Notify StatsLogProcessor if there's an upgrade/removal in any app.
-    wp<PackageInfoListener> mSubscriber;
-
-    // Mapping of config keys we're aware of to the epoch time they last received an update. This
-    // lets us know it's safe to delete events older than the oldest update. The value is nanosec.
-    // Value of -1 denotes this config key has never received an upload.
-    std::unordered_map<ConfigKey, int64_t> mLastUpdatePerConfigKey;
-
-    // Returns the minimum value from mConfigKeys.
-    int64_t getMinimumTimestampNs();
-
-    // If our current used bytes is above the limit, then we clear out the earliest snapshot. If
-    // there are no more snapshots, then we clear out the earliest delta. We repeat the deletions
-    // until the memory consumed by mOutput is below the specified limit.
-    void ensureBytesUsedBelowLimit();
-
-    // Override used for testing the max memory allowed by uid map. 0 means we use the value
-    // specified in StatsdStats.h with the rest of the guardrails.
-    size_t maxBytesOverride = 0;
-
-    // Cache the size of mOutput;
-    size_t mBytesUsed;
-
-    // Allows unit-test to access private methods.
-    FRIEND_TEST(UidMapTest, TestClearingOutput);
-    FRIEND_TEST(UidMapTest, TestRemovedAppRetained);
-    FRIEND_TEST(UidMapTest, TestRemovedAppOverGuardrail);
-    FRIEND_TEST(UidMapTest, TestOutputIncludesAtLeastOneSnapshot);
-    FRIEND_TEST(UidMapTest, TestMemoryComputed);
-    FRIEND_TEST(UidMapTest, TestMemoryGuardrail);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/shell/ShellSubscriber.cpp b/cmds/statsd/src/shell/ShellSubscriber.cpp
deleted file mode 100644
index fd883c2..0000000
--- a/cmds/statsd/src/shell/ShellSubscriber.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "ShellSubscriber.h"
-
-#include <android-base/file.h>
-
-#include "matchers/matcher_util.h"
-#include "stats_log_util.h"
-
-using android::util::ProtoOutputStream;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const static int FIELD_ID_ATOM = 1;
-
-void ShellSubscriber::startNewSubscription(int in, int out, int timeoutSec) {
-    int myToken = claimToken();
-    VLOG("ShellSubscriber: new subscription %d has come in", myToken);
-    mSubscriptionShouldEnd.notify_one();
-
-    shared_ptr<SubscriptionInfo> mySubscriptionInfo = make_shared<SubscriptionInfo>(in, out);
-    if (!readConfig(mySubscriptionInfo)) return;
-
-    {
-        std::unique_lock<std::mutex> lock(mMutex);
-        mSubscriptionInfo = mySubscriptionInfo;
-        spawnHelperThread(myToken);
-        waitForSubscriptionToEndLocked(mySubscriptionInfo, myToken, lock, timeoutSec);
-
-        if (mSubscriptionInfo == mySubscriptionInfo) {
-            mSubscriptionInfo = nullptr;
-        }
-
-    }
-}
-
-void ShellSubscriber::spawnHelperThread(int myToken) {
-    std::thread t([this, myToken] { pullAndSendHeartbeats(myToken); });
-    t.detach();
-}
-
-void ShellSubscriber::waitForSubscriptionToEndLocked(shared_ptr<SubscriptionInfo> myInfo,
-                                                     int myToken,
-                                                     std::unique_lock<std::mutex>& lock,
-                                                     int timeoutSec) {
-    if (timeoutSec > 0) {
-        mSubscriptionShouldEnd.wait_for(lock, timeoutSec * 1s, [this, myToken, &myInfo] {
-            return mToken != myToken || !myInfo->mClientAlive;
-        });
-    } else {
-        mSubscriptionShouldEnd.wait(lock, [this, myToken, &myInfo] {
-            return mToken != myToken || !myInfo->mClientAlive;
-        });
-    }
-}
-
-// Atomically claim the next token. Token numbers denote subscriber ordering.
-int ShellSubscriber::claimToken() {
-    std::unique_lock<std::mutex> lock(mMutex);
-    int myToken = ++mToken;
-    return myToken;
-}
-
-// Read and parse single config. There should only one config per input.
-bool ShellSubscriber::readConfig(shared_ptr<SubscriptionInfo> subscriptionInfo) {
-    // Read the size of the config.
-    size_t bufferSize;
-    if (!android::base::ReadFully(subscriptionInfo->mInputFd, &bufferSize, sizeof(bufferSize))) {
-        return false;
-    }
-
-    // Read the config.
-    vector<uint8_t> buffer(bufferSize);
-    if (!android::base::ReadFully(subscriptionInfo->mInputFd, buffer.data(), bufferSize)) {
-        return false;
-    }
-
-    // Parse the config.
-    ShellSubscription config;
-    if (!config.ParseFromArray(buffer.data(), bufferSize)) {
-        return false;
-    }
-
-    // Update SubscriptionInfo with state from config
-    for (const auto& pushed : config.pushed()) {
-        subscriptionInfo->mPushedMatchers.push_back(pushed);
-    }
-
-    for (const auto& pulled : config.pulled()) {
-        vector<string> packages;
-        vector<int32_t> uids;
-        for (const string& pkg : pulled.packages()) {
-            auto it = UidMap::sAidToUidMapping.find(pkg);
-            if (it != UidMap::sAidToUidMapping.end()) {
-                uids.push_back(it->second);
-            } else {
-                packages.push_back(pkg);
-            }
-        }
-
-        subscriptionInfo->mPulledInfo.emplace_back(pulled.matcher(), pulled.freq_millis(), packages,
-                                                   uids);
-        VLOG("adding matcher for pulled atom %d", pulled.matcher().atom_id());
-    }
-
-    return true;
-}
-
-void ShellSubscriber::pullAndSendHeartbeats(int myToken) {
-    VLOG("ShellSubscriber: helper thread %d starting", myToken);
-    while (true) {
-        int64_t sleepTimeMs = INT_MAX;
-        {
-            std::lock_guard<std::mutex> lock(mMutex);
-            if (!mSubscriptionInfo || mToken != myToken) {
-                VLOG("ShellSubscriber: helper thread %d done!", myToken);
-                return;
-            }
-
-            int64_t nowMillis = getElapsedRealtimeMillis();
-            int64_t nowNanos = getElapsedRealtimeNs();
-            for (PullInfo& pullInfo : mSubscriptionInfo->mPulledInfo) {
-                if (pullInfo.mPrevPullElapsedRealtimeMs + pullInfo.mInterval >= nowMillis) {
-                    continue;
-                }
-
-                vector<int32_t> uids;
-                getUidsForPullAtom(&uids, pullInfo);
-
-                vector<std::shared_ptr<LogEvent>> data;
-                mPullerMgr->Pull(pullInfo.mPullerMatcher.atom_id(), uids, nowNanos, &data);
-                VLOG("Pulled %zu atoms with id %d", data.size(), pullInfo.mPullerMatcher.atom_id());
-                writePulledAtomsLocked(data, pullInfo.mPullerMatcher);
-
-                pullInfo.mPrevPullElapsedRealtimeMs = nowMillis;
-            }
-
-            // Send a heartbeat, consisting of a data size of 0, if perfd hasn't recently received
-            // data from statsd. When it receives the data size of 0, perfd will not expect any
-            // atoms and recheck whether the subscription should end.
-            if (nowMillis - mLastWriteMs > kMsBetweenHeartbeats) {
-                attemptWriteToPipeLocked(/*dataSize=*/0);
-            }
-
-            // Determine how long to sleep before doing more work.
-            for (PullInfo& pullInfo : mSubscriptionInfo->mPulledInfo) {
-                int64_t nextPullTime = pullInfo.mPrevPullElapsedRealtimeMs + pullInfo.mInterval;
-                int64_t timeBeforePull = nextPullTime - nowMillis; // guaranteed to be non-negative
-                if (timeBeforePull < sleepTimeMs) sleepTimeMs = timeBeforePull;
-            }
-            int64_t timeBeforeHeartbeat = (mLastWriteMs + kMsBetweenHeartbeats) - nowMillis;
-            if (timeBeforeHeartbeat < sleepTimeMs) sleepTimeMs = timeBeforeHeartbeat;
-        }
-
-        VLOG("ShellSubscriber: helper thread %d sleeping for %lld ms", myToken,
-             (long long)sleepTimeMs);
-        std::this_thread::sleep_for(std::chrono::milliseconds(sleepTimeMs));
-    }
-}
-
-void ShellSubscriber::getUidsForPullAtom(vector<int32_t>* uids, const PullInfo& pullInfo) {
-    uids->insert(uids->end(), pullInfo.mPullUids.begin(), pullInfo.mPullUids.end());
-    // This is slow. Consider storing the uids per app and listening to uidmap updates.
-    for (const string& pkg : pullInfo.mPullPackages) {
-        set<int32_t> uidsForPkg = mUidMap->getAppUid(pkg);
-        uids->insert(uids->end(), uidsForPkg.begin(), uidsForPkg.end());
-    }
-    uids->push_back(DEFAULT_PULL_UID);
-}
-
-void ShellSubscriber::writePulledAtomsLocked(const vector<std::shared_ptr<LogEvent>>& data,
-                                             const SimpleAtomMatcher& matcher) {
-    mProto.clear();
-    int count = 0;
-    for (const auto& event : data) {
-        if (matchesSimple(*mUidMap, matcher, *event)) {
-            count++;
-            uint64_t atomToken = mProto.start(util::FIELD_TYPE_MESSAGE |
-                                              util::FIELD_COUNT_REPEATED | FIELD_ID_ATOM);
-            event->ToProto(mProto);
-            mProto.end(atomToken);
-        }
-    }
-
-    if (count > 0) attemptWriteToPipeLocked(mProto.size());
-}
-
-void ShellSubscriber::onLogEvent(const LogEvent& event) {
-    std::lock_guard<std::mutex> lock(mMutex);
-    if (!mSubscriptionInfo) return;
-
-    mProto.clear();
-    for (const auto& matcher : mSubscriptionInfo->mPushedMatchers) {
-        if (matchesSimple(*mUidMap, matcher, event)) {
-            uint64_t atomToken = mProto.start(util::FIELD_TYPE_MESSAGE |
-                                              util::FIELD_COUNT_REPEATED | FIELD_ID_ATOM);
-            event.ToProto(mProto);
-            mProto.end(atomToken);
-            attemptWriteToPipeLocked(mProto.size());
-        }
-    }
-}
-
-// Tries to write the atom encoded in mProto to the pipe. If the write fails
-// because the read end of the pipe has closed, signals to other threads that
-// the subscription should end.
-void ShellSubscriber::attemptWriteToPipeLocked(size_t dataSize) {
-    // First, write the payload size.
-    if (!android::base::WriteFully(mSubscriptionInfo->mOutputFd, &dataSize, sizeof(dataSize))) {
-        mSubscriptionInfo->mClientAlive = false;
-        mSubscriptionShouldEnd.notify_one();
-        return;
-    }
-
-    // Then, write the payload if this is not just a heartbeat.
-    if (dataSize > 0 && !mProto.flush(mSubscriptionInfo->mOutputFd)) {
-        mSubscriptionInfo->mClientAlive = false;
-        mSubscriptionShouldEnd.notify_one();
-        return;
-    }
-
-    mLastWriteMs = getElapsedRealtimeMillis();
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/shell/ShellSubscriber.h b/cmds/statsd/src/shell/ShellSubscriber.h
deleted file mode 100644
index 4c05fa7..0000000
--- a/cmds/statsd/src/shell/ShellSubscriber.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <android/util/ProtoOutputStream.h>
-#include <private/android_filesystem_config.h>
-
-#include <condition_variable>
-#include <mutex>
-#include <thread>
-
-#include "external/StatsPullerManager.h"
-#include "frameworks/base/cmds/statsd/src/shell/shell_config.pb.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "logd/LogEvent.h"
-#include "packages/UidMap.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * Handles atoms subscription via shell cmd.
- *
- * A shell subscription lasts *until shell exits*. Unlike config based clients, a shell client
- * communicates with statsd via file descriptors. They can subscribe pushed and pulled atoms.
- * The atoms are sent back to the client in real time, as opposed to keeping the data in memory.
- * Shell clients do not subscribe aggregated metrics, as they are responsible for doing the
- * aggregation after receiving the atom events.
- *
- * Shell clients pass ShellSubscription in the proto binary format. Clients can update the
- * subscription by sending a new subscription. The new subscription would replace the old one.
- * Input data stream format is:
- *
- * |size_t|subscription proto|size_t|subscription proto|....
- *
- * statsd sends the events back in Atom proto binary format. Each Atom message is preceded
- * with sizeof(size_t) bytes indicating the size of the proto message payload.
- *
- * The stream would be in the following format:
- * |size_t|shellData proto|size_t|shellData proto|....
- *
- * Only one shell subscriber is allowed at a time because each shell subscriber blocks one thread
- * until it exits.
- */
-class ShellSubscriber : public virtual RefBase {
-public:
-    ShellSubscriber(sp<UidMap> uidMap, sp<StatsPullerManager> pullerMgr)
-        : mUidMap(uidMap), mPullerMgr(pullerMgr){};
-
-    void startNewSubscription(int inFd, int outFd, int timeoutSec);
-
-    void onLogEvent(const LogEvent& event);
-
-private:
-    struct PullInfo {
-        PullInfo(const SimpleAtomMatcher& matcher, int64_t interval,
-                 const std::vector<std::string>& packages, const std::vector<int32_t>& uids)
-            : mPullerMatcher(matcher),
-              mInterval(interval),
-              mPrevPullElapsedRealtimeMs(0),
-              mPullPackages(packages),
-              mPullUids(uids) {
-        }
-        SimpleAtomMatcher mPullerMatcher;
-        int64_t mInterval;
-        int64_t mPrevPullElapsedRealtimeMs;
-        std::vector<std::string> mPullPackages;
-        std::vector<int32_t> mPullUids;
-    };
-
-    struct SubscriptionInfo {
-        SubscriptionInfo(const int& inputFd, const int& outputFd)
-            : mInputFd(inputFd), mOutputFd(outputFd), mClientAlive(true) {
-        }
-
-        int mInputFd;
-        int mOutputFd;
-        std::vector<SimpleAtomMatcher> mPushedMatchers;
-        std::vector<PullInfo> mPulledInfo;
-        bool mClientAlive;
-    };
-
-    int claimToken();
-
-    bool readConfig(std::shared_ptr<SubscriptionInfo> subscriptionInfo);
-
-    void spawnHelperThread(int myToken);
-
-    void waitForSubscriptionToEndLocked(std::shared_ptr<SubscriptionInfo> myInfo,
-                                        int myToken,
-                                        std::unique_lock<std::mutex>& lock,
-                                        int timeoutSec);
-
-    // Helper thread that pulls atoms at a regular frequency and sends
-    // heartbeats to perfd if statsd hasn't recently sent any data. Statsd must
-    // send heartbeats for perfd to escape a blocking read call and recheck if
-    // the user has terminated the subscription.
-    void pullAndSendHeartbeats(int myToken);
-
-    void writePulledAtomsLocked(const vector<std::shared_ptr<LogEvent>>& data,
-                                const SimpleAtomMatcher& matcher);
-
-    void getUidsForPullAtom(vector<int32_t>* uids, const PullInfo& pullInfo);
-
-    void attemptWriteToPipeLocked(size_t dataSize);
-
-    sp<UidMap> mUidMap;
-
-    sp<StatsPullerManager> mPullerMgr;
-
-    android::util::ProtoOutputStream mProto;
-
-    mutable std::mutex mMutex;
-
-    std::condition_variable mSubscriptionShouldEnd;
-
-    std::shared_ptr<SubscriptionInfo> mSubscriptionInfo = nullptr;
-
-    int mToken = 0;
-
-    const int32_t DEFAULT_PULL_UID = AID_SYSTEM;
-
-    // Tracks when we last send data to perfd. We need that time to determine
-    // when next to send a heartbeat.
-    int64_t mLastWriteMs = 0;
-    const int64_t kMsBetweenHeartbeats = 1000;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/shell/shell_config.proto b/cmds/statsd/src/shell/shell_config.proto
deleted file mode 100644
index 07d0310..0000000
--- a/cmds/statsd/src/shell/shell_config.proto
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-
-option java_package = "com.android.os";
-option java_outer_classname = "ShellConfig";
-
-import "frameworks/base/cmds/statsd/src/statsd_config.proto";
-
-message PulledAtomSubscription {
-    optional SimpleAtomMatcher matcher = 1;
-
-    /* gap between two pulls in milliseconds */
-    optional int32 freq_millis = 2;
-
-    /* Packages that the pull is requested from */
-    repeated string packages = 3;
-}
-
-message ShellSubscription {
-    repeated SimpleAtomMatcher pushed = 1;
-    repeated PulledAtomSubscription pulled = 2;
-}
\ No newline at end of file
diff --git a/cmds/statsd/src/shell/shell_data.proto b/cmds/statsd/src/shell/shell_data.proto
deleted file mode 100644
index 236bdbd..0000000
--- a/cmds/statsd/src/shell/shell_data.proto
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-
-option java_package = "com.android.os.statsd";
-option java_outer_classname = "ShellDataProto";
-
-import "frameworks/base/cmds/statsd/src/atoms.proto";
-
-// The output of shell subscription, including both pulled and pushed subscriptions.
-message ShellData {
-    repeated Atom atom = 1;
-}
diff --git a/cmds/statsd/src/socket/StatsSocketListener.cpp b/cmds/statsd/src/socket/StatsSocketListener.cpp
deleted file mode 100755
index b877cc9..0000000
--- a/cmds/statsd/src/socket/StatsSocketListener.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <sys/cdefs.h>
-#include <sys/prctl.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <unistd.h>
-
-#include <cutils/sockets.h>
-
-#include "StatsSocketListener.h"
-#include "guardrail/StatsdStats.h"
-#include "stats_log_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-StatsSocketListener::StatsSocketListener(std::shared_ptr<LogEventQueue> queue)
-    : SocketListener(getLogSocket(), false /*start listen*/), mQueue(queue) {
-}
-
-StatsSocketListener::~StatsSocketListener() {
-}
-
-bool StatsSocketListener::onDataAvailable(SocketClient* cli) {
-    static bool name_set;
-    if (!name_set) {
-        prctl(PR_SET_NAME, "statsd.writer");
-        name_set = true;
-    }
-
-    // + 1 to ensure null terminator if MAX_PAYLOAD buffer is received
-    char buffer[sizeof(android_log_header_t) + LOGGER_ENTRY_MAX_PAYLOAD + 1];
-    struct iovec iov = {buffer, sizeof(buffer) - 1};
-
-    alignas(4) char control[CMSG_SPACE(sizeof(struct ucred))];
-    struct msghdr hdr = {
-            NULL, 0, &iov, 1, control, sizeof(control), 0,
-    };
-
-    int socket = cli->getSocket();
-
-    // To clear the entire buffer is secure/safe, but this contributes to 1.68%
-    // overhead under logging load. We are safe because we check counts, but
-    // still need to clear null terminator
-    // memset(buffer, 0, sizeof(buffer));
-    ssize_t n = recvmsg(socket, &hdr, 0);
-    if (n <= (ssize_t)(sizeof(android_log_header_t))) {
-        return false;
-    }
-
-    buffer[n] = 0;
-
-    struct ucred* cred = NULL;
-
-    struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr);
-    while (cmsg != NULL) {
-        if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDENTIALS) {
-            cred = (struct ucred*)CMSG_DATA(cmsg);
-            break;
-        }
-        cmsg = CMSG_NXTHDR(&hdr, cmsg);
-    }
-
-    struct ucred fake_cred;
-    if (cred == NULL) {
-        cred = &fake_cred;
-        cred->pid = 0;
-        cred->uid = DEFAULT_OVERFLOWUID;
-    }
-
-    uint8_t* ptr = ((uint8_t*)buffer) + sizeof(android_log_header_t);
-    n -= sizeof(android_log_header_t);
-
-    // When a log failed to write to statsd socket (e.g., due ot EBUSY), a special message would
-    // be sent to statsd when the socket communication becomes available again.
-    // The format is android_log_event_int_t with a single integer in the payload indicating the
-    // number of logs that failed. (*FORMAT MUST BE IN SYNC WITH system/core/libstats*)
-    // Note that all normal stats logs are in the format of event_list, so there won't be confusion.
-    //
-    // TODO(b/80538532): In addition to log it in StatsdStats, we should properly reset the config.
-    if (n == sizeof(android_log_event_long_t)) {
-        android_log_event_long_t* long_event = reinterpret_cast<android_log_event_long_t*>(ptr);
-        if (long_event->payload.type == EVENT_TYPE_LONG) {
-            int64_t composed_long = long_event->payload.data;
-
-            // format:
-            // |last_tag|dropped_count|
-            int32_t dropped_count = (int32_t)(0xffffffff & composed_long);
-            int32_t last_atom_tag = (int32_t)((0xffffffff00000000 & (uint64_t)composed_long) >> 32);
-
-            ALOGE("Found dropped events: %d error %d last atom tag %d from uid %d", dropped_count,
-                  long_event->header.tag, last_atom_tag, cred->uid);
-            StatsdStats::getInstance().noteLogLost((int32_t)getWallClockSec(), dropped_count,
-                                                   long_event->header.tag, last_atom_tag, cred->uid,
-                                                   cred->pid);
-            return true;
-        }
-    }
-
-    // move past the 4-byte StatsEventTag
-    uint8_t* msg = ptr + sizeof(uint32_t);
-    uint32_t len = n - sizeof(uint32_t);
-    uint32_t uid = cred->uid;
-    uint32_t pid = cred->pid;
-
-    int64_t oldestTimestamp;
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(uid, pid);
-    logEvent->parseBuffer(msg, len);
-
-    if (!mQueue->push(std::move(logEvent), &oldestTimestamp)) {
-        StatsdStats::getInstance().noteEventQueueOverflow(oldestTimestamp);
-    }
-
-    return true;
-}
-
-int StatsSocketListener::getLogSocket() {
-    static const char socketName[] = "statsdw";
-    int sock = android_get_control_socket(socketName);
-
-    if (sock < 0) {  // statsd started up in init.sh
-        sock = socket_local_server(socketName, ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_DGRAM);
-
-        int on = 1;
-        if (setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on))) {
-            return -1;
-        }
-    }
-    return sock;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/socket/StatsSocketListener.h b/cmds/statsd/src/socket/StatsSocketListener.h
deleted file mode 100644
index 2167a56..0000000
--- a/cmds/statsd/src/socket/StatsSocketListener.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-
-#include <sysutils/SocketListener.h>
-#include <utils/RefBase.h>
-#include "logd/LogEventQueue.h"
-
-// DEFAULT_OVERFLOWUID is defined in linux/highuid.h, which is not part of
-// the uapi headers for userspace to use.  This value is filled in on the
-// out-of-band socket credentials if the OS fails to find one available.
-// One of the causes of this is if SO_PASSCRED is set, all the packets before
-// that point will have this value.  We also use it in a fake credential if
-// no socket credentials are supplied.
-#ifndef DEFAULT_OVERFLOWUID
-#define DEFAULT_OVERFLOWUID 65534
-#endif
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class StatsSocketListener : public SocketListener, public virtual android::RefBase {
-public:
-    explicit StatsSocketListener(std::shared_ptr<LogEventQueue> queue);
-
-    virtual ~StatsSocketListener();
-
-protected:
-    virtual bool onDataAvailable(SocketClient* cli);
-
-private:
-    static int getLogSocket();
-    /**
-     * Who is going to get the events when they're read.
-     */
-    std::shared_ptr<LogEventQueue> mQueue;
-};
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/state/StateListener.h b/cmds/statsd/src/state/StateListener.h
deleted file mode 100644
index 6388001..0000000
--- a/cmds/statsd/src/state/StateListener.h
+++ /dev/null
@@ -1,54 +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.
- */
-#pragma once
-
-#include <utils/RefBase.h>
-
-#include "HashableDimensionKey.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class StateListener : public virtual RefBase {
-public:
-    StateListener(){};
-
-    virtual ~StateListener(){};
-
-    /**
-     * Interface for handling a state change.
-     *
-     * The old and new state values map to the original state values.
-     * StateTrackers only track the original state values and are unaware
-     * of higher-level state groups. MetricProducers hold information on
-     * state groups and are responsible for mapping original state values to
-     * the correct state group.
-     *
-     * [eventTimeNs]: Time of the state change log event.
-     * [atomId]: The id of the state atom
-     * [primaryKey]: The primary field values of the state atom
-     * [oldState]: Previous state value before state change
-     * [newState]: Current state value after state change
-     */
-    virtual void onStateChanged(const int64_t eventTimeNs, const int32_t atomId,
-                                const HashableDimensionKey& primaryKey, const FieldValue& oldState,
-                                const FieldValue& newState) = 0;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/state/StateManager.cpp b/cmds/statsd/src/state/StateManager.cpp
deleted file mode 100644
index c29afeb..0000000
--- a/cmds/statsd/src/state/StateManager.cpp
+++ /dev/null
@@ -1,112 +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.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "StateManager.h"
-
-#include <private/android_filesystem_config.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-StateManager::StateManager()
-    : mAllowedPkg({
-              "com.android.systemui",
-      }) {
-}
-
-StateManager& StateManager::getInstance() {
-    static StateManager sStateManager;
-    return sStateManager;
-}
-
-void StateManager::clear() {
-    mStateTrackers.clear();
-}
-
-void StateManager::onLogEvent(const LogEvent& event) {
-    // Only process state events from uids in AID_* and packages that are whitelisted in
-    // mAllowedPkg.
-    // Whitelisted AIDs are AID_ROOT and all AIDs in [1000, 2000)
-    if (event.GetUid() == AID_ROOT || (event.GetUid() >= 1000 && event.GetUid() < 2000) ||
-        mAllowedLogSources.find(event.GetUid()) != mAllowedLogSources.end()) {
-        if (mStateTrackers.find(event.GetTagId()) != mStateTrackers.end()) {
-            mStateTrackers[event.GetTagId()]->onLogEvent(event);
-        }
-    }
-}
-
-void StateManager::registerListener(const int32_t atomId, wp<StateListener> listener) {
-    // Check if state tracker already exists.
-    if (mStateTrackers.find(atomId) == mStateTrackers.end()) {
-        mStateTrackers[atomId] = new StateTracker(atomId);
-    }
-    mStateTrackers[atomId]->registerListener(listener);
-}
-
-void StateManager::unregisterListener(const int32_t atomId, wp<StateListener> listener) {
-    std::unique_lock<std::mutex> lock(mMutex);
-
-    // Hold the sp<> until the lock is released so that ~StateTracker() is
-    // not called while the lock is held.
-    sp<StateTracker> toRemove;
-
-    // Unregister listener from correct StateTracker
-    auto it = mStateTrackers.find(atomId);
-    if (it != mStateTrackers.end()) {
-        it->second->unregisterListener(listener);
-
-        // Remove the StateTracker if it has no listeners
-        if (it->second->getListenersCount() == 0) {
-            toRemove = it->second;
-            mStateTrackers.erase(it);
-        }
-    } else {
-        ALOGE("StateManager cannot unregister listener, StateTracker for atom %d does not exist",
-              atomId);
-    }
-    lock.unlock();
-}
-
-bool StateManager::getStateValue(const int32_t atomId, const HashableDimensionKey& key,
-                                 FieldValue* output) const {
-    auto it = mStateTrackers.find(atomId);
-    if (it != mStateTrackers.end()) {
-        return it->second->getStateValue(key, output);
-    }
-    return false;
-}
-
-void StateManager::updateLogSources(const sp<UidMap>& uidMap) {
-    mAllowedLogSources.clear();
-    for (const auto& pkg : mAllowedPkg) {
-        auto uids = uidMap->getAppUid(pkg);
-        mAllowedLogSources.insert(uids.begin(), uids.end());
-    }
-}
-
-void StateManager::notifyAppChanged(const string& apk, const sp<UidMap>& uidMap) {
-    if (mAllowedPkg.find(apk) != mAllowedPkg.end()) {
-        updateLogSources(uidMap);
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/state/StateManager.h b/cmds/statsd/src/state/StateManager.h
deleted file mode 100644
index 18c404c..0000000
--- a/cmds/statsd/src/state/StateManager.h
+++ /dev/null
@@ -1,103 +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.
- */
-#pragma once
-
-#include <inttypes.h>
-#include <utils/RefBase.h>
-
-#include <set>
-#include <string>
-#include <unordered_map>
-
-#include "HashableDimensionKey.h"
-#include "packages/UidMap.h"
-#include "state/StateListener.h"
-#include "state/StateTracker.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * This class is NOT thread safe.
- * It should only be used while StatsLogProcessor's lock is held.
- */
-class StateManager : public virtual RefBase {
-public:
-    StateManager();
-
-    ~StateManager(){};
-
-    // Returns a pointer to the single, shared StateManager object.
-    static StateManager& getInstance();
-
-    // Unregisters all listeners and removes all trackers from StateManager.
-    void clear();
-
-    // Notifies the correct StateTracker of an event.
-    void onLogEvent(const LogEvent& event);
-
-    // Notifies the StateTracker for the given atomId to register listener.
-    // If the correct StateTracker does not exist, a new StateTracker is created.
-    // Note: StateTrackers can be created for non-state atoms. They are essentially empty and
-    // do not perform any actions.
-    void registerListener(const int32_t atomId, wp<StateListener> listener);
-
-    // Notifies the correct StateTracker to unregister a listener
-    // and removes the tracker if it no longer has any listeners.
-    void unregisterListener(const int32_t atomId, wp<StateListener> listener);
-
-    // Returns true if the StateTracker exists and queries for the
-    // original state value mapped to the given query key. The state value is
-    // stored and output in a FieldValue class.
-    // Returns false if the StateTracker doesn't exist.
-    bool getStateValue(const int32_t atomId, const HashableDimensionKey& queryKey,
-                       FieldValue* output) const;
-
-    // Updates mAllowedLogSources with the latest uids for the packages that are allowed to log.
-    void updateLogSources(const sp<UidMap>& uidMap);
-
-    void notifyAppChanged(const string& apk, const sp<UidMap>& uidMap);
-
-    inline int getStateTrackersCount() const {
-        return mStateTrackers.size();
-    }
-
-    inline int getListenersCount(const int32_t atomId) const {
-        auto it = mStateTrackers.find(atomId);
-        if (it != mStateTrackers.end()) {
-            return it->second->getListenersCount();
-        }
-        return -1;
-    }
-
-private:
-    mutable std::mutex mMutex;
-
-    // Maps state atom ids to StateTrackers
-    std::unordered_map<int32_t, sp<StateTracker>> mStateTrackers;
-
-    // The package names that can log state events.
-    const std::set<std::string> mAllowedPkg;
-
-    // The combined uid sources (after translating pkg name to uid).
-    // State events from uids that are not in the list will be ignored to avoid state pollution.
-    std::set<int32_t> mAllowedLogSources;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/state/StateTracker.cpp b/cmds/statsd/src/state/StateTracker.cpp
deleted file mode 100644
index 41e525c..0000000
--- a/cmds/statsd/src/state/StateTracker.cpp
+++ /dev/null
@@ -1,190 +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.
- */
-
-#define DEBUG true  // STOPSHIP if true
-#include "Log.h"
-
-#include "stats_util.h"
-
-#include "StateTracker.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-StateTracker::StateTracker(const int32_t atomId) : mField(atomId, 0) {
-}
-
-void StateTracker::onLogEvent(const LogEvent& event) {
-    const int64_t eventTimeNs = event.GetElapsedTimestampNs();
-
-    // Parse event for primary field values i.e. primary key.
-    HashableDimensionKey primaryKey;
-    filterPrimaryKey(event.getValues(), &primaryKey);
-
-    FieldValue newState;
-    if (!getStateFieldValueFromLogEvent(event, &newState)) {
-        ALOGE("StateTracker error extracting state from log event. Missing exclusive state field.");
-        clearStateForPrimaryKey(eventTimeNs, primaryKey);
-        return;
-    }
-
-    mField.setField(newState.mField.getField());
-
-    if (newState.mValue.getType() != INT) {
-        ALOGE("StateTracker error extracting state from log event. Type: %d",
-              newState.mValue.getType());
-        clearStateForPrimaryKey(eventTimeNs, primaryKey);
-        return;
-    }
-
-    if (int resetState = event.getResetState(); resetState != -1) {
-        VLOG("StateTracker new reset state: %d", resetState);
-        const FieldValue resetStateFieldValue(mField, Value(resetState));
-        handleReset(eventTimeNs, resetStateFieldValue);
-        return;
-    }
-
-    const bool nested = newState.mAnnotations.isNested();
-    StateValueInfo* stateValueInfo = &mStateMap[primaryKey];
-    updateStateForPrimaryKey(eventTimeNs, primaryKey, newState, nested, stateValueInfo);
-}
-
-void StateTracker::registerListener(wp<StateListener> listener) {
-    mListeners.insert(listener);
-}
-
-void StateTracker::unregisterListener(wp<StateListener> listener) {
-    mListeners.erase(listener);
-}
-
-bool StateTracker::getStateValue(const HashableDimensionKey& queryKey, FieldValue* output) const {
-    output->mField = mField;
-
-    if (const auto it = mStateMap.find(queryKey); it != mStateMap.end()) {
-        output->mValue = it->second.state;
-        return true;
-    }
-
-    // Set the state value to kStateUnknown if query key is not found in state map.
-    output->mValue = kStateUnknown;
-    return false;
-}
-
-void StateTracker::handleReset(const int64_t eventTimeNs, const FieldValue& newState) {
-    VLOG("StateTracker handle reset");
-    for (auto& [primaryKey, stateValueInfo] : mStateMap) {
-        updateStateForPrimaryKey(eventTimeNs, primaryKey, newState,
-                                 false /* nested; treat this state change as not nested */,
-                                 &stateValueInfo);
-    }
-}
-
-void StateTracker::clearStateForPrimaryKey(const int64_t eventTimeNs,
-                                           const HashableDimensionKey& primaryKey) {
-    VLOG("StateTracker clear state for primary key");
-    const std::unordered_map<HashableDimensionKey, StateValueInfo>::iterator it =
-            mStateMap.find(primaryKey);
-
-    // If there is no entry for the primaryKey in mStateMap, then the state is already
-    // kStateUnknown.
-    const FieldValue state(mField, Value(kStateUnknown));
-    if (it != mStateMap.end()) {
-        updateStateForPrimaryKey(eventTimeNs, primaryKey, state,
-                                 false /* nested; treat this state change as not nested */,
-                                 &it->second);
-    }
-}
-
-void StateTracker::updateStateForPrimaryKey(const int64_t eventTimeNs,
-                                            const HashableDimensionKey& primaryKey,
-                                            const FieldValue& newState, const bool nested,
-                                            StateValueInfo* stateValueInfo) {
-    FieldValue oldState;
-    oldState.mField = mField;
-    oldState.mValue.setInt(stateValueInfo->state);
-    const int32_t oldStateValue = stateValueInfo->state;
-    const int32_t newStateValue = newState.mValue.int_value;
-
-    if (kStateUnknown == newStateValue) {
-        mStateMap.erase(primaryKey);
-    }
-
-    // Update state map for non-nested counting case.
-    // Every state event triggers a state overwrite.
-    if (!nested) {
-        stateValueInfo->state = newStateValue;
-        stateValueInfo->count = 1;
-
-        // Notify listeners if state has changed.
-        if (oldStateValue != newStateValue) {
-            notifyListeners(eventTimeNs, primaryKey, oldState, newState);
-        }
-        return;
-    }
-
-    // Update state map for nested counting case.
-    //
-    // Nested counting is only allowed for binary state events such as ON/OFF or
-    // ACQUIRE/RELEASE. For example, WakelockStateChanged might have the state
-    // events: ON, ON, OFF. The state will still be ON until we see the same
-    // number of OFF events as ON events.
-    //
-    // In atoms.proto, a state atom with nested counting enabled
-    // must only have 2 states. There is no enforcemnt here of this requirement.
-    // The atom must be logged correctly.
-    if (kStateUnknown == newStateValue) {
-        if (kStateUnknown != oldStateValue) {
-            notifyListeners(eventTimeNs, primaryKey, oldState, newState);
-        }
-    } else if (oldStateValue == kStateUnknown) {
-        stateValueInfo->state = newStateValue;
-        stateValueInfo->count = 1;
-        notifyListeners(eventTimeNs, primaryKey, oldState, newState);
-    } else if (oldStateValue == newStateValue) {
-        stateValueInfo->count++;
-    } else if (--stateValueInfo->count == 0) {
-        stateValueInfo->state = newStateValue;
-        stateValueInfo->count = 1;
-        notifyListeners(eventTimeNs, primaryKey, oldState, newState);
-    }
-}
-
-void StateTracker::notifyListeners(const int64_t eventTimeNs,
-                                   const HashableDimensionKey& primaryKey,
-                                   const FieldValue& oldState, const FieldValue& newState) {
-    for (auto l : mListeners) {
-        auto sl = l.promote();
-        if (sl != nullptr) {
-            sl->onStateChanged(eventTimeNs, mField.getTag(), primaryKey, oldState, newState);
-        }
-    }
-}
-
-bool getStateFieldValueFromLogEvent(const LogEvent& event, FieldValue* output) {
-    const int exclusiveStateFieldIndex = event.getExclusiveStateFieldIndex();
-    if (-1 == exclusiveStateFieldIndex) {
-        ALOGE("error extracting state from log event. Missing exclusive state field.");
-        return false;
-    }
-
-    *output = event.getValues()[exclusiveStateFieldIndex];
-    return true;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/state/StateTracker.h b/cmds/statsd/src/state/StateTracker.h
deleted file mode 100644
index abd579e..0000000
--- a/cmds/statsd/src/state/StateTracker.h
+++ /dev/null
@@ -1,94 +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.
- */
-#pragma once
-
-#include <utils/RefBase.h>
-#include "HashableDimensionKey.h"
-#include "logd/LogEvent.h"
-
-#include "state/StateListener.h"
-
-#include <unordered_map>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class StateTracker : public virtual RefBase {
-public:
-    StateTracker(const int32_t atomId);
-
-    virtual ~StateTracker(){};
-
-    // Updates state map and notifies all listeners if a state change occurs.
-    // Checks if a state change has occurred by getting the state value from
-    // the log event and comparing the old and new states.
-    void onLogEvent(const LogEvent& event);
-
-    // Adds new listeners to set of StateListeners. If a listener is already
-    // registered, it is ignored.
-    void registerListener(wp<StateListener> listener);
-
-    void unregisterListener(wp<StateListener> listener);
-
-    // The output is a FieldValue object that has mStateField as the field and
-    // the original state value (found using the given query key) as the value.
-    //
-    // If the key isn't mapped to a state or the key size doesn't match the
-    // number of primary fields, the output value is set to kStateUnknown.
-    bool getStateValue(const HashableDimensionKey& queryKey, FieldValue* output) const;
-
-    inline int getListenersCount() const {
-        return mListeners.size();
-    }
-
-    const static int kStateUnknown = -1;
-
-private:
-    struct StateValueInfo {
-        int32_t state = kStateUnknown;  // state value
-        int count = 0;                  // nested count (only used for binary states)
-    };
-
-    Field mField;
-
-    // Maps primary key to state value info
-    std::unordered_map<HashableDimensionKey, StateValueInfo> mStateMap;
-
-    // Set of all StateListeners (objects listening for state changes)
-    std::set<wp<StateListener>> mListeners;
-
-    // Reset all state values in map to the given state.
-    void handleReset(const int64_t eventTimeNs, const FieldValue& newState);
-
-    // Clears the state value mapped to the given primary key by setting it to kStateUnknown.
-    void clearStateForPrimaryKey(const int64_t eventTimeNs, const HashableDimensionKey& primaryKey);
-
-    // Update the StateMap based on the received state value.
-    void updateStateForPrimaryKey(const int64_t eventTimeNs, const HashableDimensionKey& primaryKey,
-                                  const FieldValue& newState, const bool nested,
-                                  StateValueInfo* stateValueInfo);
-
-    // Notify registered state listeners of state change.
-    void notifyListeners(const int64_t eventTimeNs, const HashableDimensionKey& primaryKey,
-                         const FieldValue& oldState, const FieldValue& newState);
-};
-
-bool getStateFieldValueFromLogEvent(const LogEvent& event, FieldValue* output);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/stats_log.proto b/cmds/statsd/src/stats_log.proto
deleted file mode 100644
index ddd2725..0000000
--- a/cmds/statsd/src/stats_log.proto
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-
-option java_package = "com.android.os";
-option java_outer_classname = "StatsLog";
-
-import "frameworks/base/cmds/statsd/src/atoms.proto";
-
-message DimensionsValue {
-  optional int32 field = 1;
-
-  oneof value {
-    string value_str = 2;
-    int32 value_int = 3;
-    int64 value_long = 4;
-    bool value_bool = 5;
-    float value_float = 6;
-    DimensionsValueTuple value_tuple = 7;
-    uint64 value_str_hash = 8;
-  }
-}
-
-message DimensionsValueTuple {
-  repeated DimensionsValue dimensions_value = 1;
-}
-
-message StateValue {
-  optional int32 atom_id = 1;
-
-  oneof contents {
-    int64 group_id = 2;
-    int32 value = 3;
-  }
-}
-
-message EventMetricData {
-  optional int64 elapsed_timestamp_nanos = 1;
-
-  optional Atom atom = 2;
-
-  optional int64 wall_clock_timestamp_nanos = 3 [deprecated = true];
-}
-
-message CountBucketInfo {
-  optional int64 start_bucket_elapsed_nanos = 1;
-
-  optional int64 end_bucket_elapsed_nanos = 2;
-
-  optional int64 count = 3;
-
-  optional int64 bucket_num = 4;
-
-  optional int64 start_bucket_elapsed_millis = 5;
-
-  optional int64 end_bucket_elapsed_millis = 6;
-}
-
-message CountMetricData {
-  optional DimensionsValue dimensions_in_what = 1;
-
-  repeated StateValue slice_by_state = 6;
-
-  repeated CountBucketInfo bucket_info = 3;
-
-  repeated DimensionsValue dimension_leaf_values_in_what = 4;
-
-  optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
-
-  repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
-}
-
-message DurationBucketInfo {
-  optional int64 start_bucket_elapsed_nanos = 1;
-
-  optional int64 end_bucket_elapsed_nanos = 2;
-
-  optional int64 duration_nanos = 3;
-
-  optional int64 bucket_num = 4;
-
-  optional int64 start_bucket_elapsed_millis = 5;
-
-  optional int64 end_bucket_elapsed_millis = 6;
-}
-
-message DurationMetricData {
-  optional DimensionsValue dimensions_in_what = 1;
-
-  repeated StateValue slice_by_state = 6;
-
-  repeated DurationBucketInfo bucket_info = 3;
-
-  repeated DimensionsValue dimension_leaf_values_in_what = 4;
-
-  optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
-
-  repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
-}
-
-message ValueBucketInfo {
-  optional int64 start_bucket_elapsed_nanos = 1;
-
-  optional int64 end_bucket_elapsed_nanos = 2;
-
-  optional int64 value = 3 [deprecated = true];
-
-  oneof single_value {
-      int64 value_long = 7 [deprecated = true];
-
-      double value_double = 8 [deprecated = true];
-  }
-
-  message Value {
-      optional int32 index = 1;
-      oneof value {
-          int64 value_long = 2;
-          double value_double = 3;
-      }
-  }
-
-  repeated Value values = 9;
-
-  optional int64 bucket_num = 4;
-
-  optional int64 start_bucket_elapsed_millis = 5;
-
-  optional int64 end_bucket_elapsed_millis = 6;
-
-  optional int64 condition_true_nanos = 10;
-}
-
-message ValueMetricData {
-  optional DimensionsValue dimensions_in_what = 1;
-
-  repeated StateValue slice_by_state = 6;
-
-  repeated ValueBucketInfo bucket_info = 3;
-
-  repeated DimensionsValue dimension_leaf_values_in_what = 4;
-
-  optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
-
-  repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
-}
-
-message GaugeBucketInfo {
-  optional int64 start_bucket_elapsed_nanos = 1;
-
-  optional int64 end_bucket_elapsed_nanos = 2;
-
-  repeated Atom atom = 3;
-
-  repeated int64 elapsed_timestamp_nanos = 4;
-
-  repeated int64 wall_clock_timestamp_nanos = 5 [deprecated = true];
-
-  optional int64 bucket_num = 6;
-
-  optional int64 start_bucket_elapsed_millis = 7;
-
-  optional int64 end_bucket_elapsed_millis = 8;
-}
-
-message GaugeMetricData {
-  optional DimensionsValue dimensions_in_what = 1;
-
-  // Currently unsupported
-  repeated StateValue slice_by_state = 6;
-
-  repeated GaugeBucketInfo bucket_info = 3;
-
-  repeated DimensionsValue dimension_leaf_values_in_what = 4;
-
-  optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
-
-  repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
-}
-
-message StatsLogReport {
-  optional int64 metric_id = 1;
-
-  // Fields 2 and 3 are reserved.
-
-  // Keep this in sync with BucketDropReason enum in MetricProducer.h.
-  enum BucketDropReason {
-      // For ValueMetric, a bucket is dropped during a dump report request iff
-      // current bucket should be included, a pull is needed (pulled metric and
-      // condition is true), and we are under fast time constraints.
-      DUMP_REPORT_REQUESTED = 1;
-      EVENT_IN_WRONG_BUCKET = 2;
-      CONDITION_UNKNOWN = 3;
-      PULL_FAILED = 4;
-      PULL_DELAYED = 5;
-      DIMENSION_GUARDRAIL_REACHED = 6;
-      MULTIPLE_BUCKETS_SKIPPED = 7;
-      // Not an invalid bucket case, but the bucket is dropped.
-      BUCKET_TOO_SMALL = 8;
-      // Not an invalid bucket case, but the bucket is skipped.
-      NO_DATA = 9;
-  };
-
-  message DropEvent {
-      optional BucketDropReason drop_reason = 1;
-
-      optional int64 drop_time_millis = 2;
-  }
-
-  message SkippedBuckets {
-      optional int64 start_bucket_elapsed_nanos = 1;
-
-      optional int64 end_bucket_elapsed_nanos = 2;
-
-      optional int64 start_bucket_elapsed_millis = 3;
-
-      optional int64 end_bucket_elapsed_millis = 4;
-
-      // The number of drop events is capped by StatsdStats::kMaxLoggedBucketDropEvents.
-      // The current maximum is 10 drop events.
-      repeated DropEvent drop_event = 5;
-  }
-
-  message EventMetricDataWrapper {
-    repeated EventMetricData data = 1;
-  }
-  message CountMetricDataWrapper {
-    repeated CountMetricData data = 1;
-  }
-  message DurationMetricDataWrapper {
-    repeated DurationMetricData data = 1;
-  }
-  message ValueMetricDataWrapper {
-    repeated ValueMetricData data = 1;
-    repeated SkippedBuckets skipped = 2;
-  }
-
-  message GaugeMetricDataWrapper {
-    repeated GaugeMetricData data = 1;
-    repeated SkippedBuckets skipped = 2;
-  }
-
-  oneof data {
-    EventMetricDataWrapper event_metrics = 4;
-    CountMetricDataWrapper count_metrics = 5;
-    DurationMetricDataWrapper duration_metrics = 6;
-    ValueMetricDataWrapper value_metrics = 7;
-    GaugeMetricDataWrapper gauge_metrics = 8;
-  }
-
-  optional int64 time_base_elapsed_nano_seconds = 9;
-
-  optional int64 bucket_size_nano_seconds = 10;
-
-  optional DimensionsValue dimensions_path_in_what = 11;
-
-  optional DimensionsValue dimensions_path_in_condition = 12 [deprecated = true];
-
-  // DO NOT USE field 13.
-
-  optional bool is_active = 14;
-}
-
-message UidMapping {
-    message PackageInfoSnapshot {
-        message PackageInfo {
-            optional string name = 1;
-
-            optional int64 version = 2;
-
-            optional int32 uid = 3;
-
-            optional bool deleted = 4;
-
-            optional uint64 name_hash = 5;
-
-            optional string version_string = 6;
-
-            optional uint64 version_string_hash = 7;
-
-            optional string installer = 8;
-
-            optional uint64 installer_hash = 9;
-        }
-        optional int64 elapsed_timestamp_nanos = 1;
-
-        repeated PackageInfo package_info = 2;
-    }
-    repeated PackageInfoSnapshot snapshots = 1;
-
-    message Change {
-        optional bool deletion = 1;
-
-        optional int64 elapsed_timestamp_nanos = 2;
-        optional string app = 3;
-        optional int32 uid = 4;
-
-        optional int64 new_version = 5;
-        optional int64 prev_version = 6;
-        optional uint64 app_hash = 7;
-        optional string new_version_string = 8;
-        optional string prev_version_string = 9;
-        optional uint64 new_version_string_hash = 10;
-        optional uint64 prev_version_string_hash = 11;
-    }
-    repeated Change changes = 2;
-}
-
-message ConfigMetricsReport {
-  repeated StatsLogReport metrics = 1;
-
-  optional UidMapping uid_map = 2;
-
-  optional int64 last_report_elapsed_nanos = 3;
-
-  optional int64 current_report_elapsed_nanos = 4;
-
-  optional int64 last_report_wall_clock_nanos = 5;
-
-  optional int64 current_report_wall_clock_nanos = 6;
-
-  message Annotation {
-      optional int64 field_int64 = 1;
-      optional int32 field_int32 = 2;
-  }
-  repeated Annotation annotation = 7;
-
-  enum DumpReportReason {
-      DEVICE_SHUTDOWN = 1;
-      CONFIG_UPDATED = 2;
-      CONFIG_REMOVED = 3;
-      GET_DATA_CALLED = 4;
-      ADB_DUMP = 5;
-      CONFIG_RESET = 6;
-      STATSCOMPANION_DIED = 7;
-      TERMINATION_SIGNAL_RECEIVED = 8;
-  }
-  optional DumpReportReason dump_report_reason = 8;
-
-  repeated string strings = 9;
-}
-
-message ConfigMetricsReportList {
-  message ConfigKey {
-    optional int32 uid = 1;
-    optional int64 id = 2;
-  }
-  optional ConfigKey config_key = 1;
-
-  repeated ConfigMetricsReport reports = 2;
-
-  reserved 10;
-}
-
-message StatsdStatsReport {
-    optional int32 stats_begin_time_sec = 1;
-
-    optional int32 stats_end_time_sec = 2;
-
-    message MatcherStats {
-        optional int64 id = 1;
-        optional int32 matched_times = 2;
-    }
-
-    message ConditionStats {
-        optional int64 id = 1;
-        optional int32 max_tuple_counts = 2;
-    }
-
-    message MetricStats {
-        optional int64 id = 1;
-        optional int32 max_tuple_counts = 2;
-    }
-
-    message AlertStats {
-        optional int64 id = 1;
-        optional int32 alerted_times = 2;
-    }
-
-    message ConfigStats {
-        optional int32 uid = 1;
-        optional int64 id = 2;
-        optional int32 creation_time_sec = 3;
-        optional int32 deletion_time_sec = 4;
-        optional int32 reset_time_sec = 19;
-        optional int32 metric_count = 5;
-        optional int32 condition_count = 6;
-        optional int32 matcher_count = 7;
-        optional int32 alert_count = 8;
-        optional bool is_valid = 9;
-        repeated int32 broadcast_sent_time_sec = 10;
-        repeated int32 data_drop_time_sec = 11;
-        repeated int64 data_drop_bytes = 21;
-        repeated int32 dump_report_time_sec = 12;
-        repeated int32 dump_report_data_size = 20;
-        repeated MatcherStats matcher_stats = 13;
-        repeated ConditionStats condition_stats = 14;
-        repeated MetricStats metric_stats = 15;
-        repeated AlertStats alert_stats = 16;
-        repeated MetricStats metric_dimension_in_condition_stats = 17 [deprecated = true];
-        message Annotation {
-            optional int64 field_int64 = 1;
-            optional int32 field_int32 = 2;
-        }
-        repeated Annotation annotation = 18;
-        repeated int32 activation_time_sec = 22;
-        repeated int32 deactivation_time_sec = 23;
-    }
-
-    repeated ConfigStats config_stats = 3;
-
-    message AtomStats {
-        optional int32 tag = 1;
-        optional int32 count = 2;
-        optional int32 error_count = 3;
-    }
-
-    repeated AtomStats atom_stats = 7;
-
-    message UidMapStats {
-        optional int32 changes = 1;
-        optional int32 bytes_used = 2;
-        optional int32 dropped_changes = 3;
-        optional int32 deleted_apps = 4;
-    }
-    optional UidMapStats uidmap_stats = 8;
-
-    message AnomalyAlarmStats {
-        optional int32 alarms_registered = 1;
-    }
-    optional AnomalyAlarmStats anomaly_alarm_stats = 9;
-
-    message PulledAtomStats {
-        optional int32 atom_id = 1;
-        optional int64 total_pull = 2;
-        optional int64 total_pull_from_cache = 3;
-        optional int64 min_pull_interval_sec = 4;
-        optional int64 average_pull_time_nanos = 5;
-        optional int64 max_pull_time_nanos = 6;
-        optional int64 average_pull_delay_nanos = 7;
-        optional int64 max_pull_delay_nanos = 8;
-        optional int64 data_error = 9;
-        optional int64 pull_timeout = 10;
-        optional int64 pull_exceed_max_delay = 11;
-        optional int64 pull_failed = 12;
-        optional int64 stats_companion_pull_failed = 13 [deprecated = true];
-        optional int64 stats_companion_pull_binder_transaction_failed = 14 [deprecated = true];
-        optional int64 empty_data = 15;
-        optional int64 registered_count = 16;
-        optional int64 unregistered_count = 17;
-        optional int32 atom_error_count = 18;
-        optional int64 binder_call_failed = 19;
-        optional int64 failed_uid_provider_not_found = 20;
-        optional int64 puller_not_found = 21;
-        message PullTimeoutMetadata {
-          optional int64 pull_timeout_uptime_millis = 1;
-          optional int64 pull_timeout_elapsed_millis = 2;
-        }
-        repeated PullTimeoutMetadata pull_atom_metadata = 22;
-    }
-    repeated PulledAtomStats pulled_atom_stats = 10;
-
-    message AtomMetricStats {
-      optional int64 metric_id = 1;
-      optional int64 hard_dimension_limit_reached = 2;
-      optional int64 late_log_event_skipped = 3;
-      optional int64 skipped_forward_buckets = 4;
-      optional int64 bad_value_type = 5;
-      optional int64 condition_change_in_next_bucket = 6;
-      optional int64 invalidated_bucket = 7;
-      optional int64 bucket_dropped = 8;
-      optional int64 min_bucket_boundary_delay_ns = 9;
-      optional int64 max_bucket_boundary_delay_ns = 10;
-      optional int64 bucket_unknown_condition = 11;
-      optional int64 bucket_count = 12;
-    }
-    repeated AtomMetricStats atom_metric_stats = 17;
-
-    message LoggerErrorStats {
-        optional int32 logger_disconnection_sec = 1;
-        optional int32 error_code = 2;
-    }
-    repeated LoggerErrorStats logger_error_stats = 11;
-
-    message PeriodicAlarmStats {
-        optional int32 alarms_registered = 1;
-    }
-    optional PeriodicAlarmStats periodic_alarm_stats = 12;
-
-    message  SkippedLogEventStats {
-        optional int32 tag = 1;
-        optional int64 elapsed_timestamp_nanos = 2;
-    }
-    repeated SkippedLogEventStats skipped_log_event_stats = 13;
-
-    repeated int64 log_loss_stats = 14;
-
-    repeated int32 system_restart_sec = 15;
-
-    message LogLossStats {
-        optional int32 detected_time_sec = 1;
-        optional int32 count = 2;
-        optional int32 last_error = 3;
-        optional int32 last_tag = 4;
-        optional int32 uid = 5;
-        optional int32 pid = 6;
-    }
-    repeated LogLossStats detected_log_loss = 16;
-
-    message EventQueueOverflow {
-        optional int32 count = 1;
-        optional int64 max_queue_history_ns = 2;
-        optional int64 min_queue_history_ns = 3;
-    }
-
-    optional EventQueueOverflow queue_overflow = 18;
-
-    message ActivationBroadcastGuardrail {
-        optional int32 uid = 1;
-        repeated int32 guardrail_met_sec = 2;
-    }
-
-    repeated ActivationBroadcastGuardrail activation_guardrail_stats = 19;
-}
-
-message AlertTriggerDetails {
-    message MetricValue {
-        optional int64 metric_id = 1;
-        optional DimensionsValue dimension_in_what = 2;
-        optional DimensionsValue dimension_in_condition = 3 [deprecated = true];
-        optional int64 value = 4;
-    }
-    oneof value {
-        MetricValue trigger_metric = 1;
-        EventMetricData trigger_event = 2;
-    }
-    optional UidMapping.PackageInfoSnapshot package_info = 3;
-}
diff --git a/cmds/statsd/src/stats_log_util.cpp b/cmds/statsd/src/stats_log_util.cpp
deleted file mode 100644
index 423bae8..0000000
--- a/cmds/statsd/src/stats_log_util.cpp
+++ /dev/null
@@ -1,609 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "hash.h"
-#include "stats_log_util.h"
-
-#include <aidl/android/os/IStatsCompanionService.h>
-#include <private/android_filesystem_config.h>
-#include <set>
-#include <utils/SystemClock.h>
-
-#include "statscompanion_util.h"
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_BOOL;
-using android::util::FIELD_TYPE_FIXED64;
-using android::util::FIELD_TYPE_FLOAT;
-using android::util::FIELD_TYPE_INT32;
-using android::util::FIELD_TYPE_INT64;
-using android::util::FIELD_TYPE_MESSAGE;
-using android::util::FIELD_TYPE_STRING;
-using android::util::FIELD_TYPE_UINT64;
-using android::util::ProtoOutputStream;
-
-using aidl::android::os::IStatsCompanionService;
-using std::shared_ptr;
-using std::string;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// for DimensionsValue Proto
-const int DIMENSIONS_VALUE_FIELD = 1;
-const int DIMENSIONS_VALUE_VALUE_STR = 2;
-const int DIMENSIONS_VALUE_VALUE_INT = 3;
-const int DIMENSIONS_VALUE_VALUE_LONG = 4;
-// const int DIMENSIONS_VALUE_VALUE_BOOL = 5; // logd doesn't have bool data type.
-const int DIMENSIONS_VALUE_VALUE_FLOAT = 6;
-const int DIMENSIONS_VALUE_VALUE_TUPLE = 7;
-const int DIMENSIONS_VALUE_VALUE_STR_HASH = 8;
-
-const int DIMENSIONS_VALUE_TUPLE_VALUE = 1;
-
-// for StateValue Proto
-const int STATE_VALUE_ATOM_ID = 1;
-const int STATE_VALUE_CONTENTS_GROUP_ID = 2;
-const int STATE_VALUE_CONTENTS_VALUE = 3;
-
-// for PulledAtomStats proto
-const int FIELD_ID_PULLED_ATOM_STATS = 10;
-const int FIELD_ID_PULL_ATOM_ID = 1;
-const int FIELD_ID_TOTAL_PULL = 2;
-const int FIELD_ID_TOTAL_PULL_FROM_CACHE = 3;
-const int FIELD_ID_MIN_PULL_INTERVAL_SEC = 4;
-const int FIELD_ID_AVERAGE_PULL_TIME_NANOS = 5;
-const int FIELD_ID_MAX_PULL_TIME_NANOS = 6;
-const int FIELD_ID_AVERAGE_PULL_DELAY_NANOS = 7;
-const int FIELD_ID_MAX_PULL_DELAY_NANOS = 8;
-const int FIELD_ID_DATA_ERROR = 9;
-const int FIELD_ID_PULL_TIMEOUT = 10;
-const int FIELD_ID_PULL_EXCEED_MAX_DELAY = 11;
-const int FIELD_ID_PULL_FAILED = 12;
-const int FIELD_ID_EMPTY_DATA = 15;
-const int FIELD_ID_PULL_REGISTERED_COUNT = 16;
-const int FIELD_ID_PULL_UNREGISTERED_COUNT = 17;
-const int FIELD_ID_ATOM_ERROR_COUNT = 18;
-const int FIELD_ID_BINDER_CALL_FAIL_COUNT = 19;
-const int FIELD_ID_PULL_UID_PROVIDER_NOT_FOUND = 20;
-const int FIELD_ID_PULLER_NOT_FOUND = 21;
-const int FIELD_ID_PULL_TIMEOUT_METADATA = 22;
-const int FIELD_ID_PULL_TIMEOUT_METADATA_UPTIME_MILLIS = 1;
-const int FIELD_ID_PULL_TIMEOUT_METADATA_ELAPSED_MILLIS = 2;
-
-// for AtomMetricStats proto
-const int FIELD_ID_ATOM_METRIC_STATS = 17;
-const int FIELD_ID_METRIC_ID = 1;
-const int FIELD_ID_HARD_DIMENSION_LIMIT_REACHED = 2;
-const int FIELD_ID_LATE_LOG_EVENT_SKIPPED = 3;
-const int FIELD_ID_SKIPPED_FORWARD_BUCKETS = 4;
-const int FIELD_ID_BAD_VALUE_TYPE = 5;
-const int FIELD_ID_CONDITION_CHANGE_IN_NEXT_BUCKET = 6;
-const int FIELD_ID_INVALIDATED_BUCKET = 7;
-const int FIELD_ID_BUCKET_DROPPED = 8;
-const int FIELD_ID_MIN_BUCKET_BOUNDARY_DELAY_NS = 9;
-const int FIELD_ID_MAX_BUCKET_BOUNDARY_DELAY_NS = 10;
-const int FIELD_ID_BUCKET_UNKNOWN_CONDITION = 11;
-const int FIELD_ID_BUCKET_COUNT = 12;
-
-namespace {
-
-void writeDimensionToProtoHelper(const std::vector<FieldValue>& dims, size_t* index, int depth,
-                                 int prefix, std::set<string> *str_set,
-                                 ProtoOutputStream* protoOutput) {
-    size_t count = dims.size();
-    while (*index < count) {
-        const auto& dim = dims[*index];
-        const int valueDepth = dim.mField.getDepth();
-        const int valuePrefix = dim.mField.getPrefix(depth);
-        const int fieldNum = dim.mField.getPosAtDepth(depth);
-        if (valueDepth > 2) {
-            ALOGE("Depth > 2 not supported");
-            return;
-        }
-
-        if (depth == valueDepth && valuePrefix == prefix) {
-            uint64_t token = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                 DIMENSIONS_VALUE_TUPLE_VALUE);
-            protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD, fieldNum);
-            switch (dim.mValue.getType()) {
-                case INT:
-                    protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_VALUE_INT,
-                                       dim.mValue.int_value);
-                    break;
-                case LONG:
-                    protoOutput->write(FIELD_TYPE_INT64 | DIMENSIONS_VALUE_VALUE_LONG,
-                                       (long long)dim.mValue.long_value);
-                    break;
-                case FLOAT:
-                    protoOutput->write(FIELD_TYPE_FLOAT | DIMENSIONS_VALUE_VALUE_FLOAT,
-                                       dim.mValue.float_value);
-                    break;
-                case STRING:
-                    if (str_set == nullptr) {
-                        protoOutput->write(FIELD_TYPE_STRING | DIMENSIONS_VALUE_VALUE_STR,
-                                           dim.mValue.str_value);
-                    } else {
-                        str_set->insert(dim.mValue.str_value);
-                        protoOutput->write(
-                                FIELD_TYPE_UINT64 | DIMENSIONS_VALUE_VALUE_STR_HASH,
-                                (long long)Hash64(dim.mValue.str_value));
-                    }
-                    break;
-                default:
-                    break;
-            }
-            if (token != 0) {
-                protoOutput->end(token);
-            }
-            (*index)++;
-        } else if (valueDepth > depth && valuePrefix == prefix) {
-            // Writing the sub tree
-            uint64_t dimensionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | DIMENSIONS_VALUE_TUPLE_VALUE);
-            protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD, fieldNum);
-            uint64_t tupleToken =
-                    protoOutput->start(FIELD_TYPE_MESSAGE | DIMENSIONS_VALUE_VALUE_TUPLE);
-            writeDimensionToProtoHelper(dims, index, valueDepth, dim.mField.getPrefix(valueDepth),
-                                        str_set, protoOutput);
-            protoOutput->end(tupleToken);
-            protoOutput->end(dimensionToken);
-        } else {
-            // Done with the prev sub tree
-            return;
-        }
-    }
-}
-
-void writeDimensionLeafToProtoHelper(const std::vector<FieldValue>& dims,
-                                     const int dimensionLeafField,
-                                     size_t* index, int depth,
-                                     int prefix, std::set<string> *str_set,
-                                     ProtoOutputStream* protoOutput) {
-    size_t count = dims.size();
-    while (*index < count) {
-        const auto& dim = dims[*index];
-        const int valueDepth = dim.mField.getDepth();
-        const int valuePrefix = dim.mField.getPrefix(depth);
-        if (valueDepth > 2) {
-            ALOGE("Depth > 2 not supported");
-            return;
-        }
-
-        if (depth == valueDepth && valuePrefix == prefix) {
-            uint64_t token = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                dimensionLeafField);
-            switch (dim.mValue.getType()) {
-                case INT:
-                    protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_VALUE_INT,
-                                       dim.mValue.int_value);
-                    break;
-                case LONG:
-                    protoOutput->write(FIELD_TYPE_INT64 | DIMENSIONS_VALUE_VALUE_LONG,
-                                       (long long)dim.mValue.long_value);
-                    break;
-                case FLOAT:
-                    protoOutput->write(FIELD_TYPE_FLOAT | DIMENSIONS_VALUE_VALUE_FLOAT,
-                                       dim.mValue.float_value);
-                    break;
-                case STRING:
-                    if (str_set == nullptr) {
-                        protoOutput->write(FIELD_TYPE_STRING | DIMENSIONS_VALUE_VALUE_STR,
-                                           dim.mValue.str_value);
-                    } else {
-                        str_set->insert(dim.mValue.str_value);
-                        protoOutput->write(
-                                FIELD_TYPE_UINT64 | DIMENSIONS_VALUE_VALUE_STR_HASH,
-                                (long long)Hash64(dim.mValue.str_value));
-                    }
-                    break;
-                default:
-                    break;
-            }
-            if (token != 0) {
-                protoOutput->end(token);
-            }
-            (*index)++;
-        } else if (valueDepth > depth && valuePrefix == prefix) {
-            writeDimensionLeafToProtoHelper(dims, dimensionLeafField,
-                                            index, valueDepth, dim.mField.getPrefix(valueDepth),
-                                            str_set, protoOutput);
-        } else {
-            // Done with the prev sub tree
-            return;
-        }
-    }
-}
-
-void writeDimensionPathToProtoHelper(const std::vector<Matcher>& fieldMatchers,
-                                     size_t* index, int depth, int prefix,
-                                     ProtoOutputStream* protoOutput) {
-    size_t count = fieldMatchers.size();
-    while (*index < count) {
-        const Field& field = fieldMatchers[*index].mMatcher;
-        const int valueDepth = field.getDepth();
-        const int valuePrefix = field.getPrefix(depth);
-        const int fieldNum = field.getPosAtDepth(depth);
-        if (valueDepth > 2) {
-            ALOGE("Depth > 2 not supported");
-            return;
-        }
-
-        if (depth == valueDepth && valuePrefix == prefix) {
-            uint64_t token = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
-                                                 DIMENSIONS_VALUE_TUPLE_VALUE);
-            protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD, fieldNum);
-            if (token != 0) {
-                protoOutput->end(token);
-            }
-            (*index)++;
-        } else if (valueDepth > depth && valuePrefix == prefix) {
-            // Writing the sub tree
-            uint64_t dimensionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | DIMENSIONS_VALUE_TUPLE_VALUE);
-            protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD, fieldNum);
-            uint64_t tupleToken =
-                    protoOutput->start(FIELD_TYPE_MESSAGE | DIMENSIONS_VALUE_VALUE_TUPLE);
-            writeDimensionPathToProtoHelper(fieldMatchers, index, valueDepth,
-                                            field.getPrefix(valueDepth), protoOutput);
-            protoOutput->end(tupleToken);
-            protoOutput->end(dimensionToken);
-        } else {
-            // Done with the prev sub tree
-            return;
-        }
-    }
-}
-
-}  // namespace
-
-void writeDimensionToProto(const HashableDimensionKey& dimension, std::set<string> *str_set,
-                           ProtoOutputStream* protoOutput) {
-    if (dimension.getValues().size() == 0) {
-        return;
-    }
-    protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD,
-                       dimension.getValues()[0].mField.getTag());
-    uint64_t topToken = protoOutput->start(FIELD_TYPE_MESSAGE | DIMENSIONS_VALUE_VALUE_TUPLE);
-    size_t index = 0;
-    writeDimensionToProtoHelper(dimension.getValues(), &index, 0, 0, str_set, protoOutput);
-    protoOutput->end(topToken);
-}
-
-void writeDimensionLeafNodesToProto(const HashableDimensionKey& dimension,
-                                    const int dimensionLeafFieldId,
-                                    std::set<string> *str_set,
-                                    ProtoOutputStream* protoOutput) {
-    if (dimension.getValues().size() == 0) {
-        return;
-    }
-    size_t index = 0;
-    writeDimensionLeafToProtoHelper(dimension.getValues(), dimensionLeafFieldId,
-                                    &index, 0, 0, str_set, protoOutput);
-}
-
-void writeDimensionPathToProto(const std::vector<Matcher>& fieldMatchers,
-                               ProtoOutputStream* protoOutput) {
-    if (fieldMatchers.size() == 0) {
-        return;
-    }
-    protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD,
-                       fieldMatchers[0].mMatcher.getTag());
-    uint64_t topToken = protoOutput->start(FIELD_TYPE_MESSAGE | DIMENSIONS_VALUE_VALUE_TUPLE);
-    size_t index = 0;
-    writeDimensionPathToProtoHelper(fieldMatchers, &index, 0, 0, protoOutput);
-    protoOutput->end(topToken);
-}
-
-// Supported Atoms format
-// XYZ_Atom {
-//     repeated SubMsg field_1 = 1;
-//     SubMsg2 field_2 = 2;
-//     int32/float/string/int63 field_3 = 3;
-// }
-// logd's msg format, doesn't allow us to distinguish between the 2 cases below
-// Case (1):
-// Atom {
-//   SubMsg {
-//     int i = 1;
-//     int j = 2;
-//   }
-//   repeated SubMsg
-// }
-//
-// and case (2):
-// Atom {
-//   SubMsg {
-//     repeated int i = 1;
-//     repeated int j = 2;
-//   }
-//   optional SubMsg = 1;
-// }
-//
-//
-void writeFieldValueTreeToStreamHelper(int tagId, const std::vector<FieldValue>& dims,
-                                       size_t* index, int depth, int prefix,
-                                       ProtoOutputStream* protoOutput) {
-    size_t count = dims.size();
-    while (*index < count) {
-        const auto& dim = dims[*index];
-        const int valueDepth = dim.mField.getDepth();
-        const int valuePrefix = dim.mField.getPrefix(depth);
-        const int fieldNum = dim.mField.getPosAtDepth(depth);
-        if (valueDepth > 2) {
-            ALOGE("Depth > 2 not supported");
-            return;
-        }
-
-        if (depth == valueDepth && valuePrefix == prefix) {
-            switch (dim.mValue.getType()) {
-                case INT:
-                    protoOutput->write(FIELD_TYPE_INT32 | fieldNum, dim.mValue.int_value);
-                    break;
-                case LONG:
-                    protoOutput->write(FIELD_TYPE_INT64 | fieldNum,
-                                       (long long)dim.mValue.long_value);
-                    break;
-                case FLOAT:
-                    protoOutput->write(FIELD_TYPE_FLOAT | fieldNum, dim.mValue.float_value);
-                    break;
-                case STRING: {
-                    protoOutput->write(FIELD_TYPE_STRING | fieldNum, dim.mValue.str_value);
-                    break;
-                }
-                case STORAGE:
-                    protoOutput->write(FIELD_TYPE_MESSAGE | fieldNum,
-                                       (const char*)dim.mValue.storage_value.data(),
-                                       dim.mValue.storage_value.size());
-                    break;
-                default:
-                    break;
-            }
-            (*index)++;
-        } else if (valueDepth > depth && valuePrefix == prefix) {
-            // Writing the sub tree
-            uint64_t msg_token = 0ULL;
-            if (valueDepth == depth + 2) {
-                msg_token =
-                        protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | fieldNum);
-            } else if (valueDepth == depth + 1) {
-                msg_token = protoOutput->start(FIELD_TYPE_MESSAGE | fieldNum);
-            }
-            // Directly jump to the leaf value because the repeated position field is implied
-            // by the position of the sub msg in the parent field.
-            writeFieldValueTreeToStreamHelper(tagId, dims, index, valueDepth,
-                                              dim.mField.getPrefix(valueDepth), protoOutput);
-            if (msg_token != 0) {
-                protoOutput->end(msg_token);
-            }
-        } else {
-            // Done with the prev sub tree
-            return;
-        }
-    }
-}
-
-void writeFieldValueTreeToStream(int tagId, const std::vector<FieldValue>& values,
-                                 util::ProtoOutputStream* protoOutput) {
-    uint64_t atomToken = protoOutput->start(FIELD_TYPE_MESSAGE | tagId);
-
-    size_t index = 0;
-    writeFieldValueTreeToStreamHelper(tagId, values, &index, 0, 0, protoOutput);
-    protoOutput->end(atomToken);
-}
-
-void writeStateToProto(const FieldValue& state, util::ProtoOutputStream* protoOutput) {
-    protoOutput->write(FIELD_TYPE_INT32 | STATE_VALUE_ATOM_ID, state.mField.getTag());
-
-    switch (state.mValue.getType()) {
-        case INT:
-            protoOutput->write(FIELD_TYPE_INT32 | STATE_VALUE_CONTENTS_VALUE,
-                               state.mValue.int_value);
-            break;
-        case LONG:
-            protoOutput->write(FIELD_TYPE_INT64 | STATE_VALUE_CONTENTS_GROUP_ID,
-                               state.mValue.long_value);
-            break;
-        default:
-            break;
-    }
-}
-
-int64_t TimeUnitToBucketSizeInMillisGuardrailed(int uid, TimeUnit unit) {
-    int64_t bucketSizeMillis = TimeUnitToBucketSizeInMillis(unit);
-    if (bucketSizeMillis > 1000 && bucketSizeMillis < 5 * 60 * 1000LL && uid != AID_SHELL &&
-        uid != AID_ROOT) {
-        bucketSizeMillis = 5 * 60 * 1000LL;
-    }
-    return bucketSizeMillis;
-}
-
-int64_t TimeUnitToBucketSizeInMillis(TimeUnit unit) {
-    switch (unit) {
-        case ONE_MINUTE:
-            return 60 * 1000LL;
-        case FIVE_MINUTES:
-            return 5 * 60 * 1000LL;
-        case TEN_MINUTES:
-            return 10 * 60 * 1000LL;
-        case THIRTY_MINUTES:
-            return 30 * 60 * 1000LL;
-        case ONE_HOUR:
-            return 60 * 60 * 1000LL;
-        case THREE_HOURS:
-            return 3 * 60 * 60 * 1000LL;
-        case SIX_HOURS:
-            return 6 * 60 * 60 * 1000LL;
-        case TWELVE_HOURS:
-            return 12 * 60 * 60 * 1000LL;
-        case ONE_DAY:
-            return 24 * 60 * 60 * 1000LL;
-        case ONE_WEEK:
-            return 7 * 24 * 60 * 60 * 1000LL;
-        case CTS:
-            return 1000;
-        case TIME_UNIT_UNSPECIFIED:
-        default:
-            return -1;
-    }
-}
-
-void writePullerStatsToStream(const std::pair<int, StatsdStats::PulledAtomStats>& pair,
-                              util::ProtoOutputStream* protoOutput) {
-    uint64_t token = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_PULLED_ATOM_STATS |
-                                         FIELD_COUNT_REPEATED);
-    protoOutput->write(FIELD_TYPE_INT32 | FIELD_ID_PULL_ATOM_ID, (int32_t)pair.first);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TOTAL_PULL, (long long)pair.second.totalPull);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TOTAL_PULL_FROM_CACHE,
-                       (long long)pair.second.totalPullFromCache);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_MIN_PULL_INTERVAL_SEC,
-                       (long long)pair.second.minPullIntervalSec);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_AVERAGE_PULL_TIME_NANOS,
-                       (long long)pair.second.avgPullTimeNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_MAX_PULL_TIME_NANOS,
-                       (long long)pair.second.maxPullTimeNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_AVERAGE_PULL_DELAY_NANOS,
-                       (long long)pair.second.avgPullDelayNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_MAX_PULL_DELAY_NANOS,
-                       (long long)pair.second.maxPullDelayNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_DATA_ERROR, (long long)pair.second.dataError);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULL_TIMEOUT,
-                       (long long)pair.second.pullTimeout);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULL_EXCEED_MAX_DELAY,
-                       (long long)pair.second.pullExceedMaxDelay);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULL_FAILED,
-                       (long long)pair.second.pullFailed);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_EMPTY_DATA,
-                       (long long)pair.second.emptyData);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULL_REGISTERED_COUNT,
-                       (long long) pair.second.registeredCount);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULL_UNREGISTERED_COUNT,
-                       (long long) pair.second.unregisteredCount);
-    protoOutput->write(FIELD_TYPE_INT32 | FIELD_ID_ATOM_ERROR_COUNT, pair.second.atomErrorCount);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BINDER_CALL_FAIL_COUNT,
-                       (long long)pair.second.binderCallFailCount);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULL_UID_PROVIDER_NOT_FOUND,
-                       (long long)pair.second.pullUidProviderNotFound);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULLER_NOT_FOUND,
-                       (long long)pair.second.pullerNotFound);
-    for (const auto& pullTimeoutMetadata : pair.second.pullTimeoutMetadata) {
-        uint64_t timeoutMetadataToken = protoOutput->start(FIELD_TYPE_MESSAGE |
-                                                           FIELD_ID_PULL_TIMEOUT_METADATA |
-                                                           FIELD_COUNT_REPEATED);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULL_TIMEOUT_METADATA_UPTIME_MILLIS,
-                           pullTimeoutMetadata.pullTimeoutUptimeMillis);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_PULL_TIMEOUT_METADATA_ELAPSED_MILLIS,
-                           pullTimeoutMetadata.pullTimeoutElapsedMillis);
-        protoOutput->end(timeoutMetadataToken);
-    }
-    protoOutput->end(token);
-}
-
-void writeAtomMetricStatsToStream(const std::pair<int64_t, StatsdStats::AtomMetricStats> &pair,
-                                  util::ProtoOutputStream *protoOutput) {
-    uint64_t token = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_ATOM_METRIC_STATS |
-                                        FIELD_COUNT_REPEATED);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_METRIC_ID, (long long)pair.first);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_HARD_DIMENSION_LIMIT_REACHED,
-                       (long long)pair.second.hardDimensionLimitReached);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_LATE_LOG_EVENT_SKIPPED,
-                       (long long)pair.second.lateLogEventSkipped);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_FORWARD_BUCKETS,
-                       (long long)pair.second.skippedForwardBuckets);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BAD_VALUE_TYPE,
-                       (long long)pair.second.badValueType);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_CONDITION_CHANGE_IN_NEXT_BUCKET,
-                       (long long)pair.second.conditionChangeInNextBucket);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_INVALIDATED_BUCKET,
-                       (long long)pair.second.invalidatedBucket);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_DROPPED,
-                       (long long)pair.second.bucketDropped);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_MIN_BUCKET_BOUNDARY_DELAY_NS,
-                       (long long)pair.second.minBucketBoundaryDelayNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_MAX_BUCKET_BOUNDARY_DELAY_NS,
-                       (long long)pair.second.maxBucketBoundaryDelayNs);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_UNKNOWN_CONDITION,
-                       (long long)pair.second.bucketUnknownCondition);
-    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_COUNT,
-                       (long long)pair.second.bucketCount);
-    protoOutput->end(token);
-}
-
-int64_t getElapsedRealtimeNs() {
-    return ::android::elapsedRealtimeNano();
-}
-
-int64_t getElapsedRealtimeSec() {
-    return ::android::elapsedRealtimeNano() / NS_PER_SEC;
-}
-
-int64_t getElapsedRealtimeMillis() {
-    return ::android::elapsedRealtime();
-}
-
-int64_t getSystemUptimeMillis() {
-    return ::android::uptimeMillis();
-}
-
-int64_t getWallClockNs() {
-    return time(nullptr) * NS_PER_SEC;
-}
-
-int64_t getWallClockSec() {
-    return time(nullptr);
-}
-
-int64_t getWallClockMillis() {
-    return time(nullptr) * MS_PER_SEC;
-}
-
-int64_t truncateTimestampIfNecessary(const LogEvent& event) {
-    if (event.shouldTruncateTimestamp() ||
-        (event.GetTagId() >= StatsdStats::kTimestampTruncationStartTag &&
-         event.GetTagId() <= StatsdStats::kTimestampTruncationEndTag)) {
-        return event.GetElapsedTimestampNs() / NS_PER_SEC / (5 * 60) * NS_PER_SEC * (5 * 60);
-    } else {
-        return event.GetElapsedTimestampNs();
-    }
-}
-
-int64_t NanoToMillis(const int64_t nano) {
-    return nano / 1000000;
-}
-
-int64_t MillisToNano(const int64_t millis) {
-    return millis * 1000000;
-}
-
-bool checkPermissionForIds(const char* permission, pid_t pid, uid_t uid) {
-    shared_ptr<IStatsCompanionService> scs = getStatsCompanionService();
-    if (scs == nullptr) {
-        return false;
-    }
-
-    bool success;
-    ::ndk::ScopedAStatus status = scs->checkPermission(string(permission), pid, uid, &success);
-    if (!status.isOk()) {
-        return false;
-    }
-
-    return success;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/stats_log_util.h b/cmds/statsd/src/stats_log_util.h
deleted file mode 100644
index 10e065e..0000000
--- a/cmds/statsd/src/stats_log_util.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <android/util/ProtoOutputStream.h>
-
-#include "FieldValue.h"
-#include "HashableDimensionKey.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "guardrail/StatsdStats.h"
-#include "logd/LogEvent.h"
-
-using android::util::ProtoOutputStream;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-void writeFieldValueTreeToStream(int tagId, const std::vector<FieldValue>& values,
-                                 ProtoOutputStream* protoOutput);
-void writeDimensionToProto(const HashableDimensionKey& dimension, std::set<string> *str_set,
-                           ProtoOutputStream* protoOutput);
-
-void writeDimensionLeafNodesToProto(const HashableDimensionKey& dimension,
-                                    const int dimensionLeafFieldId,
-                                    std::set<string> *str_set,
-                                    ProtoOutputStream* protoOutput);
-
-void writeDimensionPathToProto(const std::vector<Matcher>& fieldMatchers,
-                               ProtoOutputStream* protoOutput);
-
-void writeStateToProto(const FieldValue& state, ProtoOutputStream* protoOutput);
-
-// Convert the TimeUnit enum to the bucket size in millis with a guardrail on
-// bucket size.
-int64_t TimeUnitToBucketSizeInMillisGuardrailed(int uid, TimeUnit unit);
-
-// Convert the TimeUnit enum to the bucket size in millis.
-int64_t TimeUnitToBucketSizeInMillis(TimeUnit unit);
-
-// Gets the elapsed timestamp in ns.
-int64_t getElapsedRealtimeNs();
-
-// Gets the elapsed timestamp in millis.
-int64_t getElapsedRealtimeMillis();
-
-// Gets the elapsed timestamp in seconds.
-int64_t getElapsedRealtimeSec();
-
-// Gets the system uptime in millis.
-int64_t getSystemUptimeMillis();
-
-// Gets the wall clock timestamp in ns.
-int64_t getWallClockNs();
-
-// Gets the wall clock timestamp in millis.
-int64_t getWallClockMillis();
-
-// Gets the wall clock timestamp in seconds.
-int64_t getWallClockSec();
-
-int64_t NanoToMillis(const int64_t nano);
-
-int64_t MillisToNano(const int64_t millis);
-
-// Helper function to write PulledAtomStats to ProtoOutputStream
-void writePullerStatsToStream(const std::pair<int, StatsdStats::PulledAtomStats>& pair,
-                              ProtoOutputStream* protoOutput);
-
-// Helper function to write AtomMetricStats to ProtoOutputStream
-void writeAtomMetricStatsToStream(const std::pair<int64_t, StatsdStats::AtomMetricStats> &pair,
-                                  ProtoOutputStream *protoOutput);
-
-template<class T>
-bool parseProtoOutputStream(ProtoOutputStream& protoOutput, T* message) {
-    std::string pbBytes;
-    sp<android::util::ProtoReader> reader = protoOutput.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-         pbBytes.append(reinterpret_cast<const char*>(reader->readBuffer()), toRead);
-        reader->move(toRead);
-    }
-    return message->ParseFromArray(pbBytes.c_str(), pbBytes.size());
-}
-
-// Checks the truncate timestamp annotation as well as the restricted range of 300,000 - 304,999.
-// Returns the truncated timestamp to the nearest 5 minutes if needed.
-int64_t truncateTimestampIfNecessary(const LogEvent& event);
-
-// Checks permission for given pid and uid.
-bool checkPermissionForIds(const char* permission, pid_t pid, uid_t uid);
-
-inline bool isVendorPulledAtom(int atomId) {
-    return atomId >= StatsdStats::kVendorPulledAtomStartTag && atomId < StatsdStats::kMaxAtomTag;
-}
-
-inline bool isPulledAtom(int atomId) {
-    return atomId >= StatsdStats::kPullAtomStartTag && atomId < StatsdStats::kVendorAtomStartTag;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/stats_util.h b/cmds/statsd/src/stats_util.h
deleted file mode 100644
index cfc411f..0000000
--- a/cmds/statsd/src/stats_util.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "HashableDimensionKey.h"
-
-#include <unordered_map>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const HashableDimensionKey DEFAULT_DIMENSION_KEY = HashableDimensionKey();
-const MetricDimensionKey DEFAULT_METRIC_DIMENSION_KEY = MetricDimensionKey();
-
-typedef std::map<int64_t, HashableDimensionKey> ConditionKey;
-
-typedef std::unordered_map<MetricDimensionKey, int64_t> DimToValMap;
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/statscompanion_util.cpp b/cmds/statsd/src/statscompanion_util.cpp
deleted file mode 100644
index ce07ec0..0000000
--- a/cmds/statsd/src/statscompanion_util.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "statscompanion_util.h"
-#include <android/binder_auto_utils.h>
-#include <android/binder_manager.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-shared_ptr<IStatsCompanionService> getStatsCompanionService() {
-    ::ndk::SpAIBinder binder(AServiceManager_getService("statscompanion"));
-    return IStatsCompanionService::fromBinder(binder);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/statscompanion_util.h b/cmds/statsd/src/statscompanion_util.h
deleted file mode 100644
index e20c40b..0000000
--- a/cmds/statsd/src/statscompanion_util.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <aidl/android/os/IStatsCompanionService.h>
-
-using aidl::android::os::IStatsCompanionService;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/** Fetches and returns the StatsCompanionService. */
-shared_ptr<IStatsCompanionService> getStatsCompanionService();
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/statsd_config.proto b/cmds/statsd/src/statsd_config.proto
deleted file mode 100644
index acdffd3..0000000
--- a/cmds/statsd/src/statsd_config.proto
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-
-option java_package = "com.android.internal.os";
-option java_outer_classname = "StatsdConfigProto";
-
-enum Position {
-  POSITION_UNKNOWN = 0;
-
-  FIRST = 1;
-
-  LAST = 2;
-
-  ANY = 3;
-
-  ALL = 4;
-}
-
-enum TimeUnit {
-  TIME_UNIT_UNSPECIFIED = 0;
-  ONE_MINUTE = 1;  // WILL BE GUARDRAILED TO 5 MINS UNLESS UID = SHELL OR ROOT
-  FIVE_MINUTES = 2;
-  TEN_MINUTES = 3;
-  THIRTY_MINUTES = 4;
-  ONE_HOUR = 5;
-  THREE_HOURS = 6;
-  SIX_HOURS = 7;
-  TWELVE_HOURS = 8;
-  ONE_DAY = 9;
-  ONE_WEEK = 10;
-  CTS = 1000;
-}
-
-message FieldMatcher {
-  optional int32 field = 1;
-
-  optional Position position = 2;
-
-  repeated FieldMatcher child = 3;
-}
-
-message FieldValueMatcher {
-  optional int32 field = 1;
-
-  optional Position position = 2;
-
-  oneof value_matcher {
-    bool eq_bool = 3;
-    string eq_string = 4;
-    int64 eq_int = 5;
-
-    int64 lt_int = 6;
-    int64 gt_int = 7;
-    float lt_float = 8;
-    float gt_float = 9;
-
-    int64 lte_int = 10;
-    int64 gte_int = 11;
-
-    MessageMatcher matches_tuple = 12;
-
-    StringListMatcher eq_any_string = 13;
-    StringListMatcher neq_any_string = 14;
-  }
-}
-
-message MessageMatcher {
-  repeated FieldValueMatcher field_value_matcher = 1;
-}
-
-message StringListMatcher {
-    repeated string str_value = 1;
-}
-
-enum LogicalOperation {
-  LOGICAL_OPERATION_UNSPECIFIED = 0;
-  AND = 1;
-  OR = 2;
-  NOT = 3;
-  NAND = 4;
-  NOR = 5;
-}
-
-message SimpleAtomMatcher {
-  optional int32 atom_id = 1;
-
-  repeated FieldValueMatcher field_value_matcher = 2;
-}
-
-message AtomMatcher {
-  optional int64 id = 1;
-
-  message Combination {
-    optional LogicalOperation operation = 1;
-
-    repeated int64 matcher = 2;
-  }
-  oneof contents {
-    SimpleAtomMatcher simple_atom_matcher = 2;
-    Combination combination = 3;
-  }
-}
-
-message SimplePredicate {
-  optional int64 start = 1;
-
-  optional int64 stop = 2;
-
-  optional bool count_nesting = 3 [default = true];
-
-  optional int64 stop_all = 4;
-
-  enum InitialValue {
-    UNKNOWN = 0;
-    FALSE = 1;
-  }
-  optional InitialValue initial_value = 5 [default = UNKNOWN];
-
-  optional FieldMatcher dimensions = 6;
-}
-
-message Predicate {
-  optional int64 id = 1;
-
-  message Combination {
-    optional LogicalOperation operation = 1;
-
-    repeated int64 predicate = 2;
-  }
-
-  oneof contents {
-    SimplePredicate simple_predicate = 2;
-    Combination combination = 3;
-  }
-}
-
-message StateMap {
-  message StateGroup {
-    optional int64 group_id = 1;
-
-    repeated int32 value = 2;
-  }
-
-  repeated StateGroup group = 1;
-}
-
-message State {
-  optional int64 id = 1;
-
-  optional int32 atom_id = 2;
-
-  optional StateMap map = 3;
-}
-
-message MetricConditionLink {
-  optional int64 condition = 1;
-
-  optional FieldMatcher fields_in_what = 2;
-
-  optional FieldMatcher fields_in_condition = 3;
-}
-
-message MetricStateLink {
-  optional int32 state_atom_id = 1;
-
-  optional FieldMatcher fields_in_what = 2;
-
-  optional FieldMatcher fields_in_state = 3;
-}
-
-message FieldFilter {
-  optional bool include_all = 1 [default = false];
-  optional FieldMatcher fields = 2;
-}
-
-message EventMetric {
-  optional int64 id = 1;
-
-  optional int64 what = 2;
-
-  optional int64 condition = 3;
-
-  repeated MetricConditionLink links = 4;
-
-  reserved 100;
-  reserved 101;
-}
-
-message CountMetric {
-  optional int64 id = 1;
-
-  optional int64 what = 2;
-
-  optional int64 condition = 3;
-
-  optional FieldMatcher dimensions_in_what = 4;
-
-  repeated int64 slice_by_state = 8;
-
-  optional TimeUnit bucket = 5;
-
-  repeated MetricConditionLink links = 6;
-
-  repeated MetricStateLink state_link = 9;
-
-  optional FieldMatcher dimensions_in_condition = 7 [deprecated = true];
-
-  reserved 100;
-  reserved 101;
-}
-
-message DurationMetric {
-  optional int64 id = 1;
-
-  optional int64 what = 2;
-
-  optional int64 condition = 3;
-
-  repeated int64 slice_by_state = 9;
-
-  repeated MetricConditionLink links = 4;
-
-  repeated MetricStateLink state_link = 10;
-
-  enum AggregationType {
-    SUM = 1;
-
-    MAX_SPARSE = 2;
-  }
-  optional AggregationType aggregation_type = 5 [default = SUM];
-
-  optional FieldMatcher dimensions_in_what = 6;
-
-  optional TimeUnit bucket = 7;
-
-  optional FieldMatcher dimensions_in_condition = 8 [deprecated = true];
-
-  reserved 100;
-  reserved 101;
-}
-
-message GaugeMetric {
-  optional int64 id = 1;
-
-  optional int64 what = 2;
-
-  optional int64 trigger_event = 12;
-
-  optional FieldFilter gauge_fields_filter = 3;
-
-  optional int64 condition = 4;
-
-  optional FieldMatcher dimensions_in_what = 5;
-
-  optional FieldMatcher dimensions_in_condition = 8 [deprecated = true];
-
-  optional TimeUnit bucket = 6;
-
-  repeated MetricConditionLink links = 7;
-
-  enum SamplingType {
-    RANDOM_ONE_SAMPLE = 1;
-    ALL_CONDITION_CHANGES = 2 [deprecated = true];
-    CONDITION_CHANGE_TO_TRUE = 3;
-    FIRST_N_SAMPLES = 4;
-  }
-  optional SamplingType sampling_type = 9 [default = RANDOM_ONE_SAMPLE] ;
-
-  optional int64 min_bucket_size_nanos = 10;
-
-  optional int64 max_num_gauge_atoms_per_bucket = 11 [default = 10];
-
-  optional int32 max_pull_delay_sec = 13 [default = 30];
-
-  optional bool split_bucket_for_app_upgrade = 14 [default = true];
-
-  reserved 100;
-  reserved 101;
-}
-
-message ValueMetric {
-  optional int64 id = 1;
-
-  optional int64 what = 2;
-
-  optional FieldMatcher value_field = 3;
-
-  optional int64 condition = 4;
-
-  optional FieldMatcher dimensions_in_what = 5;
-
-  repeated int64 slice_by_state = 18;
-
-  optional TimeUnit bucket = 6;
-
-  repeated MetricConditionLink links = 7;
-
-  repeated MetricStateLink state_link = 19;
-
-  enum AggregationType {
-    SUM = 1;
-    MIN = 2;
-    MAX = 3;
-    AVG = 4;
-  }
-  optional AggregationType aggregation_type = 8 [default = SUM];
-
-  optional int64 min_bucket_size_nanos = 10;
-
-  optional bool use_absolute_value_on_reset = 11 [default = false];
-
-  optional bool use_diff = 12;
-
-  optional bool use_zero_default_base = 15 [default = false];
-
-  enum ValueDirection {
-      UNKNOWN = 0;
-      INCREASING = 1;
-      DECREASING = 2;
-      ANY = 3;
-  }
-  optional ValueDirection value_direction = 13 [default = INCREASING];
-
-  optional bool skip_zero_diff_output = 14 [default = true];
-
-  optional int32 max_pull_delay_sec = 16 [default = 30];
-
-  optional bool split_bucket_for_app_upgrade = 17 [default = true];
-
-  optional FieldMatcher dimensions_in_condition = 9 [deprecated = true];
-
-  reserved 100;
-  reserved 101;
-}
-
-message Alert {
-  optional int64 id = 1;
-
-  optional int64 metric_id = 2;
-
-  optional int32 num_buckets = 3;
-
-  optional int32 refractory_period_secs = 4;
-
-  optional double trigger_if_sum_gt = 5;
-}
-
-message Alarm {
-  optional int64 id = 1;
-
-  optional int64 offset_millis = 2;
-
-  optional int64 period_millis = 3;
-}
-
-message IncidentdDetails {
-  repeated int32 section = 1;
-
-  enum Destination {
-    AUTOMATIC = 0;
-    EXPLICIT = 1;
-  }
-  optional Destination dest = 2;
-
-  // Package name of the incident report receiver.
-  optional string receiver_pkg = 3;
-
-  // Class name of the incident report receiver.
-  optional string receiver_cls = 4;
-
-  optional string alert_description = 5;
-}
-
-message PerfettoDetails {
-  // The |trace_config| field is a proto-encoded message of type
-  // perfetto.protos.TraceConfig defined in
-  // //external/perfetto/protos/perfetto/config/. On device,
-  // statsd doesn't need to deserialize the message as it's just
-  // passed binary-encoded to the perfetto cmdline client.
-  optional bytes trace_config = 1;
-}
-
-message BroadcastSubscriberDetails {
-  optional int64 subscriber_id = 1;
-  repeated string cookie = 2;
-}
-
-message Subscription {
-  optional int64 id = 1;
-
-  enum RuleType {
-    RULE_TYPE_UNSPECIFIED = 0;
-    ALARM = 1;
-    ALERT = 2;
-  }
-  optional RuleType rule_type = 2;
-
-  optional int64 rule_id = 3;
-
-  oneof subscriber_information {
-    IncidentdDetails incidentd_details = 4;
-    PerfettoDetails perfetto_details = 5;
-    BroadcastSubscriberDetails broadcast_subscriber_details = 6;
-  }
-
-  optional float probability_of_informing = 7 [default = 1.1];
-
-  // This was used for perfprofd historically.
-  reserved 8;
-}
-
-enum ActivationType {
-  ACTIVATION_TYPE_UNKNOWN = 0;
-  ACTIVATE_IMMEDIATELY = 1;
-  ACTIVATE_ON_BOOT = 2;
-}
-
-message EventActivation {
-  optional int64 atom_matcher_id = 1;
-  optional int64 ttl_seconds = 2;
-  optional int64 deactivation_atom_matcher_id = 3;
-  optional ActivationType activation_type = 4;
-}
-
-message MetricActivation {
-  optional int64 metric_id = 1;
-
-  optional ActivationType activation_type = 3 [deprecated = true];
-
-  repeated EventActivation event_activation = 2;
-}
-
-message PullAtomPackages {
-    optional int32 atom_id = 1;
-
-    repeated string packages = 2;
-}
-
-message StatsdConfig {
-  optional int64 id = 1;
-
-  repeated EventMetric event_metric = 2;
-
-  repeated CountMetric count_metric = 3;
-
-  repeated ValueMetric value_metric = 4;
-
-  repeated GaugeMetric gauge_metric = 5;
-
-  repeated DurationMetric duration_metric = 6;
-
-  repeated AtomMatcher atom_matcher = 7;
-
-  repeated Predicate predicate = 8;
-
-  repeated Alert alert = 9;
-
-  repeated Alarm alarm = 10;
-
-  repeated Subscription subscription = 11;
-
-  repeated string allowed_log_source = 12;
-
-  repeated int64 no_report_metric = 13;
-
-  message Annotation {
-    optional int64 field_int64 = 1;
-    optional int32 field_int32 = 2;
-  }
-  repeated Annotation annotation = 14;
-
-  optional int64 ttl_in_seconds = 15;
-
-  optional bool hash_strings_in_metric_report = 16 [default = true];
-
-  repeated MetricActivation metric_activation = 17;
-
-  optional bool version_strings_in_metric_report = 18;
-
-  optional bool installer_in_metric_report = 19;
-
-  optional bool persist_locally = 20 [default = false];
-
-  repeated State state = 21;
-
-  repeated string default_pull_packages = 22;
-
-  repeated PullAtomPackages pull_atom_packages = 23;
-
-  repeated int32 whitelisted_atom_ids = 24;
-
-  // Field number 1000 is reserved for later use.
-  reserved 1000;
-}
diff --git a/cmds/statsd/src/statsd_metadata.proto b/cmds/statsd/src/statsd_metadata.proto
deleted file mode 100644
index 200b392..0000000
--- a/cmds/statsd/src/statsd_metadata.proto
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd.metadata;
-
-message ConfigKey {
-  optional int64 config_id = 1;
-  optional int32 uid = 2;
-}
-
-message Field {
-  optional int32 tag = 1;
-  optional int32 field = 2;
-}
-
-message FieldValue {
-  optional Field field = 1;
-  oneof value {
-    int32 value_int = 2;
-    int64 value_long = 3;
-    float value_float = 4;
-    double value_double = 5;
-    string value_str = 6;
-    bytes value_storage = 7;
-  }
-}
-
-message MetricDimensionKey {
-  repeated FieldValue dimension_key_in_what = 1;
-  repeated FieldValue state_values_key = 2;
-}
-
-message AlertDimensionKeyedData {
-  // The earliest time the alert can be fired again in wall clock time.
-  optional int32 last_refractory_ends_sec = 1;
-  optional MetricDimensionKey dimension_key = 2;
-}
-
-message AlertMetadata {
-  optional int64 alert_id = 1;
-  repeated AlertDimensionKeyedData alert_dim_keyed_data = 2;
-}
-
-// All metadata for a config in statsd
-message StatsMetadata {
-  optional ConfigKey config_key = 1;
-  repeated AlertMetadata alert_metadata = 2;
-}
-
-message StatsMetadataList {
-  repeated StatsMetadata stats_metadata = 1;
-}
\ No newline at end of file
diff --git a/cmds/statsd/src/storage/StorageManager.cpp b/cmds/statsd/src/storage/StorageManager.cpp
deleted file mode 100644
index dcfdfe3..0000000
--- a/cmds/statsd/src/storage/StorageManager.cpp
+++ /dev/null
@@ -1,781 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "android-base/stringprintf.h"
-#include "guardrail/StatsdStats.h"
-#include "storage/StorageManager.h"
-#include "stats_log_util.h"
-
-#include <android-base/file.h>
-#include <private/android_filesystem_config.h>
-#include <fstream>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using android::util::FIELD_COUNT_REPEATED;
-using android::util::FIELD_TYPE_MESSAGE;
-using std::map;
-
-/**
- * NOTE: these directories are protected by SELinux, any changes here must also update
- * the SELinux policies.
- */
-#define STATS_DATA_DIR "/data/misc/stats-data"
-#define STATS_SERVICE_DIR "/data/misc/stats-service"
-#define TRAIN_INFO_DIR "/data/misc/train-info"
-#define TRAIN_INFO_PATH "/data/misc/train-info/train-info.bin"
-
-// Magic word at the start of the train info file, change this if changing the file format
-const uint32_t TRAIN_INFO_FILE_MAGIC = 0xfb7447bf;
-
-// for ConfigMetricsReportList
-const int FIELD_ID_REPORTS = 2;
-
-std::mutex StorageManager::sTrainInfoMutex;
-
-using android::base::StringPrintf;
-using std::unique_ptr;
-
-struct FileName {
-    int64_t mTimestampSec;
-    int mUid;
-    int64_t mConfigId;
-    bool mIsHistory;
-    string getFullFileName(const char* path) {
-        return StringPrintf("%s/%lld_%d_%lld%s", path, (long long)mTimestampSec, (int)mUid,
-                            (long long)mConfigId, (mIsHistory ? "_history" : ""));
-    };
-};
-
-string StorageManager::getDataFileName(long wallClockSec, int uid, int64_t id) {
-    return StringPrintf("%s/%ld_%d_%lld", STATS_DATA_DIR, wallClockSec, uid,
-                        (long long)id);
-}
-
-string StorageManager::getDataHistoryFileName(long wallClockSec, int uid, int64_t id) {
-    return StringPrintf("%s/%ld_%d_%lld_history", STATS_DATA_DIR, wallClockSec, uid,
-                        (long long)id);
-}
-
-static string findTrainInfoFileNameLocked(const string& trainName) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(TRAIN_INFO_DIR), closedir);
-    if (dir == NULL) {
-        VLOG("Path %s does not exist", TRAIN_INFO_DIR);
-        return "";
-    }
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* fileName = de->d_name;
-        if (fileName[0] == '.') continue;
-
-        size_t fileNameLength = strlen(fileName);
-        if (fileNameLength >= trainName.length()) {
-            if (0 == strncmp(fileName + fileNameLength - trainName.length(), trainName.c_str(),
-                             trainName.length())) {
-              return string(fileName);
-            }
-        }
-    }
-
-    return "";
-}
-
-// Returns array of int64_t which contains timestamp in seconds, uid,
-// configID and whether the file is a local history file.
-static void parseFileName(char* name, FileName* output) {
-    int64_t result[3];
-    int index = 0;
-    char* substr = strtok(name, "_");
-    while (substr != nullptr && index < 3) {
-        result[index] = StrToInt64(substr);
-        index++;
-        substr = strtok(nullptr, "_");
-    }
-    // When index ends before hitting 3, file name is corrupted. We
-    // intentionally put -1 at index 0 to indicate the error to caller.
-    // TODO(b/110563137): consider removing files with unexpected name format.
-    if (index < 3) {
-        result[0] = -1;
-    }
-
-    output->mTimestampSec = result[0];
-    output->mUid = result[1];
-    output->mConfigId = result[2];
-    // check if the file is a local history.
-    output->mIsHistory = (substr != nullptr && strcmp("history", substr) == 0);
-}
-
-void StorageManager::writeFile(const char* file, const void* buffer, int numBytes) {
-    int fd = open(file, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
-    if (fd == -1) {
-        VLOG("Attempt to access %s but failed", file);
-        return;
-    }
-    trimToFit(STATS_SERVICE_DIR);
-    trimToFit(STATS_DATA_DIR);
-
-    if (android::base::WriteFully(fd, buffer, numBytes)) {
-        VLOG("Successfully wrote %s", file);
-    } else {
-        ALOGE("Failed to write %s", file);
-    }
-
-    int result = fchown(fd, AID_STATSD, AID_STATSD);
-    if (result) {
-        VLOG("Failed to chown %s to statsd", file);
-    }
-
-    close(fd);
-}
-
-bool StorageManager::writeTrainInfo(const InstallTrainInfo& trainInfo) {
-    std::lock_guard<std::mutex> lock(sTrainInfoMutex);
-
-    if (trainInfo.trainName.empty()) {
-      return false;
-    }
-    deleteSuffixedFiles(TRAIN_INFO_DIR, trainInfo.trainName.c_str());
-
-    std::string fileName =
-            StringPrintf("%s/%ld_%s", TRAIN_INFO_DIR, (long) getWallClockSec(),
-                         trainInfo.trainName.c_str());
-
-    int fd = open(fileName.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
-    if (fd == -1) {
-        VLOG("Attempt to access %s but failed", fileName.c_str());
-        return false;
-    }
-
-    size_t result;
-    // Write the magic word
-    result = write(fd, &TRAIN_INFO_FILE_MAGIC, sizeof(TRAIN_INFO_FILE_MAGIC));
-    if (result != sizeof(TRAIN_INFO_FILE_MAGIC)) {
-        VLOG("Failed to wrtie train info magic");
-        close(fd);
-        return false;
-    }
-
-    // Write the train version
-    const size_t trainVersionCodeByteCount = sizeof(trainInfo.trainVersionCode);
-    result = write(fd, &trainInfo.trainVersionCode, trainVersionCodeByteCount);
-    if (result != trainVersionCodeByteCount) {
-        VLOG("Failed to wrtie train version code");
-        close(fd);
-        return false;
-    }
-
-    // Write # of bytes in trainName to file
-    const size_t trainNameSize = trainInfo.trainName.size();
-    const size_t trainNameSizeByteCount = sizeof(trainNameSize);
-    result = write(fd, (uint8_t*)&trainNameSize, trainNameSizeByteCount);
-    if (result != trainNameSizeByteCount) {
-        VLOG("Failed to write train name size");
-        close(fd);
-        return false;
-    }
-
-    // Write trainName to file
-    result = write(fd, trainInfo.trainName.c_str(), trainNameSize);
-    if (result != trainNameSize) {
-        VLOG("Failed to write train name");
-        close(fd);
-        return false;
-    }
-
-    // Write status to file
-    const size_t statusByteCount = sizeof(trainInfo.status);
-    result = write(fd, (uint8_t*)&trainInfo.status, statusByteCount);
-    if (result != statusByteCount) {
-        VLOG("Failed to write status");
-        close(fd);
-        return false;
-    }
-
-    // Write experiment id count to file.
-    const size_t experimentIdsCount = trainInfo.experimentIds.size();
-    const size_t experimentIdsCountByteCount = sizeof(experimentIdsCount);
-    result = write(fd, (uint8_t*) &experimentIdsCount, experimentIdsCountByteCount);
-    if (result != experimentIdsCountByteCount) {
-        VLOG("Failed to write experiment id count");
-        close(fd);
-        return false;
-    }
-
-    // Write experimentIds to file
-    for (size_t i = 0; i < experimentIdsCount; i++) {
-        const int64_t experimentId = trainInfo.experimentIds[i];
-        const size_t experimentIdByteCount = sizeof(experimentId);
-        result = write(fd, &experimentId, experimentIdByteCount);
-        if (result == experimentIdByteCount) {
-            VLOG("Successfully wrote experiment IDs");
-        } else {
-            VLOG("Failed to write experiment ids");
-            close(fd);
-            return false;
-        }
-    }
-
-    // Write bools to file
-    const size_t boolByteCount = sizeof(trainInfo.requiresStaging);
-    result = write(fd, (uint8_t*)&trainInfo.requiresStaging, boolByteCount);
-    if (result != boolByteCount) {
-      VLOG("Failed to write requires staging");
-      close(fd);
-      return false;
-    }
-
-    result = write(fd, (uint8_t*)&trainInfo.rollbackEnabled, boolByteCount);
-    if (result != boolByteCount) {
-      VLOG("Failed to write rollback enabled");
-      close(fd);
-      return false;
-    }
-
-    result = write(fd, (uint8_t*)&trainInfo.requiresLowLatencyMonitor, boolByteCount);
-    if (result != boolByteCount) {
-      VLOG("Failed to write requires log latency monitor");
-      close(fd);
-      return false;
-    }
-
-    close(fd);
-    return true;
-}
-
-bool StorageManager::readTrainInfo(const std::string& trainName, InstallTrainInfo& trainInfo) {
-    std::lock_guard<std::mutex> lock(sTrainInfoMutex);
-    return readTrainInfoLocked(trainName, trainInfo);
-}
-
-bool StorageManager::readTrainInfoLocked(const std::string& trainName, InstallTrainInfo& trainInfo) {
-    trimToFit(TRAIN_INFO_DIR, /*parseTimestampOnly=*/ true);
-    string fileName = findTrainInfoFileNameLocked(trainName);
-    if (fileName.empty()) {
-        return false;
-    }
-    int fd = open(StringPrintf("%s/%s", TRAIN_INFO_DIR, fileName.c_str()).c_str(), O_RDONLY | O_CLOEXEC);
-    if (fd == -1) {
-        VLOG("Failed to open %s", fileName.c_str());
-        return false;
-    }
-
-    // Read the magic word
-    uint32_t magic;
-    size_t result = read(fd, &magic, sizeof(magic));
-    if (result != sizeof(magic)) {
-        VLOG("Failed to read train info magic");
-        close(fd);
-        return false;
-    }
-
-    if (magic != TRAIN_INFO_FILE_MAGIC) {
-        VLOG("Train info magic was 0x%08x, expected 0x%08x", magic, TRAIN_INFO_FILE_MAGIC);
-        close(fd);
-        return false;
-    }
-
-    // Read the train version code
-    const size_t trainVersionCodeByteCount(sizeof(trainInfo.trainVersionCode));
-    result = read(fd, &trainInfo.trainVersionCode, trainVersionCodeByteCount);
-    if (result != trainVersionCodeByteCount) {
-        VLOG("Failed to read train version code from train info file");
-        close(fd);
-        return false;
-    }
-
-    // Read # of bytes taken by trainName in the file.
-    size_t trainNameSize;
-    result = read(fd, &trainNameSize, sizeof(size_t));
-    if (result != sizeof(size_t)) {
-        VLOG("Failed to read train name size from train info file");
-        close(fd);
-        return false;
-    }
-
-    // Read trainName
-    trainInfo.trainName.resize(trainNameSize);
-    result = read(fd, trainInfo.trainName.data(), trainNameSize);
-    if (result != trainNameSize) {
-        VLOG("Failed to read train name from train info file");
-        close(fd);
-        return false;
-    }
-
-    // Read status
-    const size_t statusByteCount = sizeof(trainInfo.status);
-    result = read(fd, &trainInfo.status, statusByteCount);
-    if (result != statusByteCount) {
-        VLOG("Failed to read train status from train info file");
-        close(fd);
-        return false;
-    }
-
-    // Read experiment ids count.
-    size_t experimentIdsCount;
-    result = read(fd, &experimentIdsCount, sizeof(size_t));
-    if (result != sizeof(size_t)) {
-        VLOG("Failed to read train experiment id count from train info file");
-        close(fd);
-        return false;
-    }
-
-    // Read experimentIds
-    for (size_t i = 0; i < experimentIdsCount; i++) {
-        int64_t experimentId;
-        result = read(fd, &experimentId, sizeof(experimentId));
-        if (result != sizeof(experimentId)) {
-            VLOG("Failed to read train experiment id from train info file");
-            close(fd);
-            return false;
-        }
-        trainInfo.experimentIds.push_back(experimentId);
-    }
-
-    // Read bools
-    const size_t boolByteCount = sizeof(trainInfo.requiresStaging);
-    result = read(fd, &trainInfo.requiresStaging, boolByteCount);
-    if (result != boolByteCount) {
-        VLOG("Failed to read requires requires staging from train info file");
-        close(fd);
-        return false;
-    }
-
-    result = read(fd, &trainInfo.rollbackEnabled, boolByteCount);
-    if (result != boolByteCount) {
-        VLOG("Failed to read requires rollback enabled from train info file");
-        close(fd);
-        return false;
-    }
-
-    result = read(fd, &trainInfo.requiresLowLatencyMonitor, boolByteCount);
-    if (result != boolByteCount) {
-        VLOG("Failed to read requires requires low latency monitor from train info file");
-        close(fd);
-        return false;
-    }
-
-    // Expect to be at EOF.
-    char c;
-    result = read(fd, &c, 1);
-    if (result != 0) {
-        VLOG("Failed to read train info from file. Did not get expected EOF.");
-        close(fd);
-        return false;
-    }
-
-    VLOG("Read train info file successful");
-    close(fd);
-    return true;
-}
-
-vector<InstallTrainInfo> StorageManager::readAllTrainInfo() {
-    std::lock_guard<std::mutex> lock(sTrainInfoMutex);
-    vector<InstallTrainInfo> trainInfoList;
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(TRAIN_INFO_DIR), closedir);
-    if (dir == NULL) {
-        VLOG("Directory does not exist: %s", TRAIN_INFO_DIR);
-        return trainInfoList;
-    }
-
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') {
-            continue;
-        }
-
-        InstallTrainInfo trainInfo;
-        bool readSuccess = StorageManager::readTrainInfoLocked(name, trainInfo);
-        if (!readSuccess) {
-            continue;
-        }
-        trainInfoList.push_back(trainInfo);
-    }
-    return trainInfoList;
-}
-
-void StorageManager::deleteFile(const char* file) {
-    if (remove(file) != 0) {
-        VLOG("Attempt to delete %s but is not found", file);
-    } else {
-        VLOG("Successfully deleted %s", file);
-    }
-}
-
-void StorageManager::deleteAllFiles(const char* path) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir);
-    if (dir == NULL) {
-        VLOG("Directory does not exist: %s", path);
-        return;
-    }
-
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') continue;
-        deleteFile(StringPrintf("%s/%s", path, name).c_str());
-    }
-}
-
-void StorageManager::deleteSuffixedFiles(const char* path, const char* suffix) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir);
-    if (dir == NULL) {
-        VLOG("Directory does not exist: %s", path);
-        return;
-    }
-
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') {
-            continue;
-        }
-        size_t nameLen = strlen(name);
-        size_t suffixLen = strlen(suffix);
-        if (suffixLen <= nameLen && strncmp(name + nameLen - suffixLen, suffix, suffixLen) == 0) {
-            deleteFile(StringPrintf("%s/%s", path, name).c_str());
-        }
-    }
-}
-
-void StorageManager::sendBroadcast(const char* path,
-                                   const std::function<void(const ConfigKey&)>& sendBroadcast) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir);
-    if (dir == NULL) {
-        VLOG("no stats-data directory on disk");
-        return;
-    }
-
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') continue;
-        VLOG("file %s", name);
-
-        FileName output;
-        parseFileName(name, &output);
-        if (output.mTimestampSec == -1 || output.mIsHistory) continue;
-        sendBroadcast(ConfigKey((int)output.mUid, output.mConfigId));
-    }
-}
-
-bool StorageManager::hasConfigMetricsReport(const ConfigKey& key) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(STATS_DATA_DIR), closedir);
-    if (dir == NULL) {
-        VLOG("Path %s does not exist", STATS_DATA_DIR);
-        return false;
-    }
-
-    string suffix = StringPrintf("%d_%lld", key.GetUid(), (long long)key.GetId());
-
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') continue;
-
-        size_t nameLen = strlen(name);
-        size_t suffixLen = suffix.length();
-        if (suffixLen <= nameLen &&
-            strncmp(name + nameLen - suffixLen, suffix.c_str(), suffixLen) == 0) {
-            // Check again that the file name is parseable.
-            FileName output;
-            parseFileName(name, &output);
-            if (output.mTimestampSec == -1 || output.mIsHistory) continue;
-            return true;
-        }
-    }
-    return false;
-}
-
-void StorageManager::appendConfigMetricsReport(const ConfigKey& key, ProtoOutputStream* proto,
-                                               bool erase_data, bool isAdb) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(STATS_DATA_DIR), closedir);
-    if (dir == NULL) {
-        VLOG("Path %s does not exist", STATS_DATA_DIR);
-        return;
-    }
-
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        string fileName(name);
-        if (name[0] == '.') continue;
-        FileName output;
-        parseFileName(name, &output);
-
-        if (output.mTimestampSec == -1 || (output.mIsHistory && !isAdb) ||
-            output.mUid != key.GetUid() || output.mConfigId != key.GetId()) {
-            continue;
-        }
-
-        auto fullPathName = StringPrintf("%s/%s", STATS_DATA_DIR, fileName.c_str());
-        int fd = open(fullPathName.c_str(), O_RDONLY | O_CLOEXEC);
-        if (fd != -1) {
-            string content;
-            if (android::base::ReadFdToString(fd, &content)) {
-                proto->write(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_REPORTS,
-                             content.c_str(), content.size());
-            }
-            close(fd);
-        } else {
-            ALOGE("file cannot be opened");
-        }
-
-        if (erase_data) {
-            remove(fullPathName.c_str());
-        } else if (!output.mIsHistory && !isAdb) {
-            // This means a real data owner has called to get this data. But the config says it
-            // wants to keep a local history. So now this file must be renamed as a history file.
-            // So that next time, when owner calls getData() again, this data won't be uploaded
-            // again. rename returns 0 on success
-            if (rename(fullPathName.c_str(), (fullPathName + "_history").c_str())) {
-                ALOGE("Failed to rename file %s", fullPathName.c_str());
-            }
-        }
-    }
-}
-
-bool StorageManager::readFileToString(const char* file, string* content) {
-    int fd = open(file, O_RDONLY | O_CLOEXEC);
-    bool res = false;
-    if (fd != -1) {
-        if (android::base::ReadFdToString(fd, content)) {
-            res = true;
-        } else {
-            VLOG("Failed to read file %s\n", file);
-        }
-        close(fd);
-    }
-    return res;
-}
-
-void StorageManager::readConfigFromDisk(map<ConfigKey, StatsdConfig>& configsMap) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(STATS_SERVICE_DIR), closedir);
-    if (dir == NULL) {
-        VLOG("no default config on disk");
-        return;
-    }
-    trimToFit(STATS_SERVICE_DIR);
-
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') continue;
-
-        FileName output;
-        parseFileName(name, &output);
-        if (output.mTimestampSec == -1) continue;
-        string file_name = output.getFullFileName(STATS_SERVICE_DIR);
-        int fd = open(file_name.c_str(), O_RDONLY | O_CLOEXEC);
-        if (fd != -1) {
-            string content;
-            if (android::base::ReadFdToString(fd, &content)) {
-                StatsdConfig config;
-                if (config.ParseFromString(content)) {
-                    configsMap[ConfigKey(output.mUid, output.mConfigId)] = config;
-                    VLOG("map key uid=%lld|configID=%lld", (long long)output.mUid,
-                         (long long)output.mConfigId);
-                }
-            }
-            close(fd);
-        }
-    }
-}
-
-bool StorageManager::readConfigFromDisk(const ConfigKey& key, StatsdConfig* config) {
-    string content;
-    return config != nullptr &&
-        StorageManager::readConfigFromDisk(key, &content) && config->ParseFromString(content);
-}
-
-bool StorageManager::readConfigFromDisk(const ConfigKey& key, string* content) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(STATS_SERVICE_DIR),
-                                             closedir);
-    if (dir == NULL) {
-        VLOG("Directory does not exist: %s", STATS_SERVICE_DIR);
-        return false;
-    }
-
-    string suffix = StringPrintf("%d_%lld", key.GetUid(), (long long)key.GetId());
-    dirent* de;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') {
-            continue;
-        }
-        size_t nameLen = strlen(name);
-        size_t suffixLen = suffix.length();
-        // There can be at most one file that matches this suffix (config key).
-        if (suffixLen <= nameLen &&
-            strncmp(name + nameLen - suffixLen, suffix.c_str(), suffixLen) == 0) {
-            int fd = open(StringPrintf("%s/%s", STATS_SERVICE_DIR, name).c_str(),
-                                  O_RDONLY | O_CLOEXEC);
-            if (fd != -1) {
-                if (android::base::ReadFdToString(fd, content)) {
-                    return true;
-                }
-                close(fd);
-            }
-        }
-    }
-    return false;
-}
-
-bool StorageManager::hasIdenticalConfig(const ConfigKey& key,
-                                        const vector<uint8_t>& config) {
-    string content;
-    if (StorageManager::readConfigFromDisk(key, &content)) {
-        vector<uint8_t> vec(content.begin(), content.end());
-        if (vec == config) {
-            return true;
-        }
-    }
-    return false;
-}
-
-void StorageManager::sortFiles(vector<FileInfo>* fileNames) {
-    // Reverse sort to effectively remove from the back (oldest entries).
-    // This will sort files in reverse-chronological order. Local history files have lower
-    // priority than regular data files.
-    sort(fileNames->begin(), fileNames->end(), [](FileInfo& lhs, FileInfo& rhs) {
-        // first consider if the file is a local history
-        if (lhs.mIsHistory && !rhs.mIsHistory) {
-            return false;
-        } else if (rhs.mIsHistory && !lhs.mIsHistory) {
-            return true;
-        }
-
-        // then consider the age.
-        if (lhs.mFileAgeSec < rhs.mFileAgeSec) {
-            return true;
-        } else if (lhs.mFileAgeSec > rhs.mFileAgeSec) {
-            return false;
-        }
-
-        // then good luck.... use string::compare
-        return lhs.mFileName.compare(rhs.mFileName) > 0;
-    });
-}
-
-void StorageManager::trimToFit(const char* path, bool parseTimestampOnly) {
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir);
-    if (dir == NULL) {
-        VLOG("Path %s does not exist", path);
-        return;
-    }
-    dirent* de;
-    int totalFileSize = 0;
-    vector<FileInfo> fileNames;
-    auto nowSec = getWallClockSec();
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') continue;
-
-        FileName output;
-        string file_name;
-        if (parseTimestampOnly) {
-            file_name = StringPrintf("%s/%s", path, name);
-            output.mTimestampSec = StrToInt64(strtok(name, "_"));
-            output.mIsHistory = false;
-        } else {
-            parseFileName(name, &output);
-            file_name = output.getFullFileName(path);
-        }
-        if (output.mTimestampSec == -1) continue;
-
-        // Check for timestamp and delete if it's too old.
-        long fileAge = nowSec - output.mTimestampSec;
-        if (fileAge > StatsdStats::kMaxAgeSecond ||
-            (output.mIsHistory && fileAge > StatsdStats::kMaxLocalHistoryAgeSecond)) {
-            deleteFile(file_name.c_str());
-            continue;
-        }
-
-        ifstream file(file_name.c_str(), ifstream::in | ifstream::binary);
-        int fileSize = 0;
-        if (file.is_open()) {
-            file.seekg(0, ios::end);
-            fileSize = file.tellg();
-            file.close();
-            totalFileSize += fileSize;
-        }
-        fileNames.emplace_back(file_name, output.mIsHistory, fileSize, fileAge);
-    }
-
-    if (fileNames.size() > StatsdStats::kMaxFileNumber ||
-        totalFileSize > StatsdStats::kMaxFileSize) {
-        sortFiles(&fileNames);
-    }
-
-    // Start removing files from oldest to be under the limit.
-    while (fileNames.size() > 0 && (fileNames.size() > StatsdStats::kMaxFileNumber ||
-                                    totalFileSize > StatsdStats::kMaxFileSize)) {
-        totalFileSize -= fileNames.at(fileNames.size() - 1).mFileSizeBytes;
-        deleteFile(fileNames.at(fileNames.size() - 1).mFileName.c_str());
-        fileNames.pop_back();
-    }
-}
-
-void StorageManager::printStats(int outFd) {
-    printDirStats(outFd, STATS_SERVICE_DIR);
-    printDirStats(outFd, STATS_DATA_DIR);
-}
-
-void StorageManager::printDirStats(int outFd, const char* path) {
-    dprintf(outFd, "Printing stats of %s\n", path);
-    unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir);
-    if (dir == NULL) {
-        VLOG("Path %s does not exist", path);
-        return;
-    }
-    dirent* de;
-    int fileCount = 0;
-    int totalFileSize = 0;
-    while ((de = readdir(dir.get()))) {
-        char* name = de->d_name;
-        if (name[0] == '.') {
-            continue;
-        }
-        FileName output;
-        parseFileName(name, &output);
-        if (output.mTimestampSec == -1) continue;
-        dprintf(outFd, "\t #%d, Last updated: %lld, UID: %d, Config ID: %lld, %s", fileCount + 1,
-                (long long)output.mTimestampSec, output.mUid, (long long)output.mConfigId,
-                (output.mIsHistory ? "local history" : ""));
-        string file_name = output.getFullFileName(path);
-        ifstream file(file_name.c_str(), ifstream::in | ifstream::binary);
-        if (file.is_open()) {
-            file.seekg(0, ios::end);
-            int fileSize = file.tellg();
-            file.close();
-            dprintf(outFd, ", File Size: %d bytes", fileSize);
-            totalFileSize += fileSize;
-        }
-        dprintf(outFd, "\n");
-        fileCount++;
-    }
-    dprintf(outFd, "\tTotal number of files: %d, Total size of files: %d bytes.\n", fileCount,
-            totalFileSize);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/storage/StorageManager.h b/cmds/statsd/src/storage/StorageManager.h
deleted file mode 100644
index d59046d..0000000
--- a/cmds/statsd/src/storage/StorageManager.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef STORAGE_MANAGER_H
-#define STORAGE_MANAGER_H
-
-#include <android/util/ProtoOutputStream.h>
-#include <utils/Log.h>
-#include <utils/RefBase.h>
-
-#include "packages/UidMap.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using android::util::ProtoOutputStream;
-
-class StorageManager : public virtual RefBase {
-public:
-    struct FileInfo {
-        FileInfo(std::string name, bool isHistory, int fileSize, long fileAge)
-            : mFileName(name),
-              mIsHistory(isHistory),
-              mFileSizeBytes(fileSize),
-              mFileAgeSec(fileAge) {
-        }
-        std::string mFileName;
-        bool mIsHistory;
-        int mFileSizeBytes;
-        long mFileAgeSec;
-    };
-
-    /**
-     * Writes a given byte array as a file to the specified file path.
-     */
-    static void writeFile(const char* file, const void* buffer, int numBytes);
-
-    /**
-     * Writes train info.
-     */
-    static bool writeTrainInfo(const InstallTrainInfo& trainInfo);
-
-    /**
-     * Reads train info.
-     */
-    static bool readTrainInfo(const std::string& trainName, InstallTrainInfo& trainInfo);
-
-    /**
-     * Reads train info assuming lock is obtained.
-     */
-    static bool readTrainInfoLocked(const std::string& trainName, InstallTrainInfo& trainInfo);
-
-    /**
-     * Reads all train info and returns a vector of train info.
-     */
-    static vector<InstallTrainInfo> readAllTrainInfo();
-
-    /**
-     * Reads the file content to the buffer.
-     */
-    static bool readFileToString(const char* file, string* content);
-
-    /**
-     * Deletes a single file given a file name.
-     */
-    static void deleteFile(const char* file);
-
-    /**
-     * Deletes all files in a given directory.
-     */
-    static void deleteAllFiles(const char* path);
-
-    /**
-     * Deletes all files whose name matches with a provided suffix.
-     */
-    static void deleteSuffixedFiles(const char* path, const char* suffix);
-
-    /**
-     * Send broadcasts to relevant receiver for each data stored on disk.
-     */
-    static void sendBroadcast(const char* path,
-                              const std::function<void(const ConfigKey&)>& sendBroadcast);
-
-    /**
-     * Returns true if there's at least one report on disk.
-     */
-    static bool hasConfigMetricsReport(const ConfigKey& key);
-
-    /**
-     * Appends the ConfigMetricsReport found on disk to the specifid proto
-     * and, if erase_data, deletes it from disk.
-     *
-     * [isAdb]: if the caller is adb dump. This includes local adb dump or dumpsys by
-     * bugreport or incidentd. When true, we will append any local history data too.
-     *
-     * When
-     * erase_data=true, isAdb=true:   append history data to output, remove all data after read
-     * erase_data=false, isAdb=true:  append history data to output, keep data after read
-     * erase_data=true, isAdb=false:  do not append history data, and remove data after read
-     * erase_data=false, isAdb=false: do not append history data and *rename* all data files to
-     *                                history files.
-     */
-    static void appendConfigMetricsReport(const ConfigKey& key, ProtoOutputStream* proto,
-                                          bool erase_data, bool isAdb);
-
-    /**
-     * Call to load the saved configs from disk.
-     */
-    static void readConfigFromDisk(std::map<ConfigKey, StatsdConfig>& configsMap);
-
-    /**
-     * Call to load the specified config from disk. Returns false if the config file does not
-     * exist or error occurs when reading the file.
-     */
-    static bool readConfigFromDisk(const ConfigKey& key, StatsdConfig* config);
-    static bool readConfigFromDisk(const ConfigKey& key, string* config);
-
-    /**
-     * Trims files in the provided directory to limit the total size, number of
-     * files, accumulation of outdated files.
-     */
-    static void trimToFit(const char* dir, bool parseTimestampOnly = false);
-
-    /**
-     * Returns true if there already exists identical configuration on device.
-     */
-    static bool hasIdenticalConfig(const ConfigKey& key,
-                                   const vector<uint8_t>& config);
-
-    /**
-     * Prints disk usage statistics related to statsd.
-     */
-    static void printStats(int out);
-
-    static string getDataFileName(long wallClockSec, int uid, int64_t id);
-
-    static string getDataHistoryFileName(long wallClockSec, int uid, int64_t id);
-
-    static void sortFiles(vector<FileInfo>* fileNames);
-
-private:
-    /**
-     * Prints disk usage statistics about a directory related to statsd.
-     */
-    static void printDirStats(int out, const char* path);
-
-    static std::mutex sTrainInfoMutex;
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#endif  // STORAGE_MANAGER_H
diff --git a/cmds/statsd/src/subscriber/IncidentdReporter.cpp b/cmds/statsd/src/subscriber/IncidentdReporter.cpp
deleted file mode 100644
index 1d77513..0000000
--- a/cmds/statsd/src/subscriber/IncidentdReporter.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false
-#include "Log.h"
-
-#include "FieldValue.h"
-#include "IncidentdReporter.h"
-#include "packages/UidMap.h"
-#include "stats_log_util.h"
-
-#include <android/util/ProtoOutputStream.h>
-#include <incident/incident_report.h>
-
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using android::util::ProtoOutputStream;
-using std::vector;
-
-using util::FIELD_TYPE_INT32;
-using util::FIELD_TYPE_INT64;
-using util::FIELD_TYPE_MESSAGE;
-using util::FIELD_TYPE_STRING;
-
-// field ids in IncidentHeaderProto
-const int FIELD_ID_ALERT_ID = 1;
-const int FIELD_ID_REASON = 2;
-const int FIELD_ID_CONFIG_KEY = 3;
-const int FIELD_ID_CONFIG_KEY_UID = 1;
-const int FIELD_ID_CONFIG_KEY_ID = 2;
-
-const int FIELD_ID_TRIGGER_DETAILS = 4;
-const int FIELD_ID_TRIGGER_DETAILS_TRIGGER_METRIC = 1;
-const int FIELD_ID_METRIC_VALUE_METRIC_ID = 1;
-const int FIELD_ID_METRIC_VALUE_DIMENSION_IN_WHAT = 2;
-const int FIELD_ID_METRIC_VALUE_VALUE = 4;
-
-const int FIELD_ID_PACKAGE_INFO = 3;
-
-namespace {
-void getProtoData(const int64_t& rule_id, int64_t metricId, const MetricDimensionKey& dimensionKey,
-                  int64_t metricValue, const ConfigKey& configKey, const string& reason,
-                  vector<uint8_t>* protoData) {
-    ProtoOutputStream headerProto;
-    headerProto.write(FIELD_TYPE_INT64 | FIELD_ID_ALERT_ID, (long long)rule_id);
-    headerProto.write(FIELD_TYPE_STRING | FIELD_ID_REASON, reason);
-    uint64_t token =
-            headerProto.start(FIELD_TYPE_MESSAGE | FIELD_ID_CONFIG_KEY);
-    headerProto.write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_KEY_UID, configKey.GetUid());
-    headerProto.write(FIELD_TYPE_INT64 | FIELD_ID_CONFIG_KEY_ID, (long long)configKey.GetId());
-    headerProto.end(token);
-
-    token = headerProto.start(FIELD_TYPE_MESSAGE | FIELD_ID_TRIGGER_DETAILS);
-
-    // MetricValue trigger_metric = 1;
-    uint64_t metricToken =
-            headerProto.start(FIELD_TYPE_MESSAGE | FIELD_ID_TRIGGER_DETAILS_TRIGGER_METRIC);
-    // message MetricValue {
-    // optional int64 metric_id = 1;
-    headerProto.write(FIELD_TYPE_INT64 | FIELD_ID_METRIC_VALUE_METRIC_ID, (long long)metricId);
-    // optional DimensionsValue dimension_in_what = 2;
-    uint64_t dimToken =
-            headerProto.start(FIELD_TYPE_MESSAGE | FIELD_ID_METRIC_VALUE_DIMENSION_IN_WHAT);
-    writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), nullptr, &headerProto);
-    headerProto.end(dimToken);
-
-    // deprecated field
-    // optional DimensionsValue dimension_in_condition = 3;
-
-    // optional int64 value = 4;
-    headerProto.write(FIELD_TYPE_INT64 | FIELD_ID_METRIC_VALUE_VALUE, (long long)metricValue);
-
-    // }
-    headerProto.end(metricToken);
-
-    // write relevant uid package info
-    std::set<int32_t> uids;
-
-    for (const auto& dim : dimensionKey.getDimensionKeyInWhat().getValues()) {
-        int uid = getUidIfExists(dim);
-        // any uid <= 2000 are predefined AID_*
-        if (uid > 2000) {
-            uids.insert(uid);
-        }
-    }
-
-    if (!uids.empty()) {
-        uint64_t token = headerProto.start(FIELD_TYPE_MESSAGE | FIELD_ID_PACKAGE_INFO);
-        UidMap::getInstance()->writeUidMapSnapshot(getElapsedRealtimeNs(), true, true, uids,
-                                                   nullptr /*string set*/, &headerProto);
-        headerProto.end(token);
-    }
-
-    headerProto.end(token);
-
-    protoData->resize(headerProto.size());
-    size_t pos = 0;
-    sp<android::util::ProtoReader> reader = headerProto.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&((*protoData)[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-}
-}  // namespace
-
-bool GenerateIncidentReport(const IncidentdDetails& config, int64_t rule_id, int64_t metricId,
-                            const MetricDimensionKey& dimensionKey, int64_t metricValue,
-                            const ConfigKey& configKey) {
-    if (config.section_size() == 0) {
-        VLOG("The alert %lld contains zero section in config(%d,%lld)", (unsigned long long)rule_id,
-             configKey.GetUid(), (long long)configKey.GetId());
-        return false;
-    }
-
-    AIncidentReportArgs* args = AIncidentReportArgs_init();
-
-    vector<uint8_t> protoData;
-    getProtoData(rule_id, metricId, dimensionKey, metricValue, configKey,
-                 config.alert_description(), &protoData);
-    AIncidentReportArgs_addHeader(args, protoData.data(), protoData.size());
-
-    for (int i = 0; i < config.section_size(); i++) {
-        AIncidentReportArgs_addSection(args, config.section(i));
-    }
-
-    uint8_t dest;
-    switch (config.dest()) {
-        case IncidentdDetails_Destination_AUTOMATIC:
-            dest = INCIDENT_REPORT_PRIVACY_POLICY_AUTOMATIC;
-            break;
-        case IncidentdDetails_Destination_EXPLICIT:
-            dest = INCIDENT_REPORT_PRIVACY_POLICY_EXPLICIT;
-            break;
-        default:
-            dest = INCIDENT_REPORT_PRIVACY_POLICY_AUTOMATIC;
-    }
-    AIncidentReportArgs_setPrivacyPolicy(args, dest);
-
-    AIncidentReportArgs_setReceiverPackage(args, config.receiver_pkg().c_str());
-
-    AIncidentReportArgs_setReceiverClass(args, config.receiver_cls().c_str());
-
-    int err = AIncidentReportArgs_takeReport(args);
-    AIncidentReportArgs_delete(args);
-
-    return err == NO_ERROR;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/subscriber/IncidentdReporter.h b/cmds/statsd/src/subscriber/IncidentdReporter.h
deleted file mode 100644
index e78a4d9..0000000
--- a/cmds/statsd/src/subscriber/IncidentdReporter.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "HashableDimensionKey.h"
-#include "config/ConfigKey.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"  // Alert, IncidentdDetails
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * Calls incidentd to trigger an incident report and put in dropbox for uploading.
- */
-bool GenerateIncidentReport(const IncidentdDetails& config, int64_t rule_id, int64_t metricId,
-                            const MetricDimensionKey& dimensionKey, int64_t metricValue,
-                            const ConfigKey& configKey);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/subscriber/SubscriberReporter.cpp b/cmds/statsd/src/subscriber/SubscriberReporter.cpp
deleted file mode 100644
index c915ef3..0000000
--- a/cmds/statsd/src/subscriber/SubscriberReporter.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define DEBUG false  // STOPSHIP if true
-#include "Log.h"
-
-#include "SubscriberReporter.h"
-
-using std::lock_guard;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::vector;
-
-struct BroadcastSubscriberDeathCookie {
-    BroadcastSubscriberDeathCookie(const ConfigKey& configKey, int64_t subscriberId,
-                                   const shared_ptr<IPendingIntentRef>& pir):
-        mConfigKey(configKey),
-        mSubscriberId(subscriberId),
-        mPir(pir) {}
-
-    ConfigKey mConfigKey;
-    int64_t mSubscriberId;
-    shared_ptr<IPendingIntentRef> mPir;
-};
-
-void SubscriberReporter::broadcastSubscriberDied(void* cookie) {
-    auto cookie_ = static_cast<BroadcastSubscriberDeathCookie*>(cookie);
-    ConfigKey& configKey = cookie_->mConfigKey;
-    int64_t subscriberId = cookie_->mSubscriberId;
-    shared_ptr<IPendingIntentRef>& pir = cookie_->mPir;
-
-    SubscriberReporter& thiz = getInstance();
-
-    // Erase the mapping from a (config_key, subscriberId) to a pir if the
-    // mapping exists.
-    lock_guard<mutex> lock(thiz.mLock);
-    auto subscriberMapIt = thiz.mIntentMap.find(configKey);
-    if (subscriberMapIt != thiz.mIntentMap.end()) {
-        auto subscriberMap = subscriberMapIt->second;
-        auto pirIt = subscriberMap.find(subscriberId);
-        if (pirIt != subscriberMap.end() && pirIt->second == pir) {
-            subscriberMap.erase(subscriberId);
-            if (subscriberMap.empty()) {
-                thiz.mIntentMap.erase(configKey);
-            }
-        }
-    }
-
-    // The death recipient corresponding to this specific pir can never be
-    // triggered again, so free up resources.
-    delete cookie_;
-}
-
-SubscriberReporter::SubscriberReporter() :
-    mBroadcastSubscriberDeathRecipient(AIBinder_DeathRecipient_new(broadcastSubscriberDied)) {
-}
-
-void SubscriberReporter::setBroadcastSubscriber(const ConfigKey& configKey,
-                                                int64_t subscriberId,
-                                                const shared_ptr<IPendingIntentRef>& pir) {
-    VLOG("SubscriberReporter::setBroadcastSubscriber called.");
-    {
-        lock_guard<mutex> lock(mLock);
-        mIntentMap[configKey][subscriberId] = pir;
-    }
-    AIBinder_linkToDeath(pir->asBinder().get(), mBroadcastSubscriberDeathRecipient.get(),
-                         new BroadcastSubscriberDeathCookie(configKey, subscriberId, pir));
-}
-
-void SubscriberReporter::unsetBroadcastSubscriber(const ConfigKey& configKey,
-                                                  int64_t subscriberId) {
-    VLOG("SubscriberReporter::unsetBroadcastSubscriber called.");
-    lock_guard<mutex> lock(mLock);
-    auto subscriberMapIt = mIntentMap.find(configKey);
-    if (subscriberMapIt != mIntentMap.end()) {
-        subscriberMapIt->second.erase(subscriberId);
-        if (subscriberMapIt->second.empty()) {
-            mIntentMap.erase(configKey);
-        }
-    }
-}
-
-void SubscriberReporter::alertBroadcastSubscriber(const ConfigKey& configKey,
-                                                  const Subscription& subscription,
-                                                  const MetricDimensionKey& dimKey) const {
-    // Reminder about ids:
-    //  subscription id - name of the Subscription (that ties the Alert to the broadcast)
-    //  subscription rule_id - the name of the Alert (that triggers the broadcast)
-    //  subscriber_id - name of the PendingIntent to use to send the broadcast
-    //  config uid - the uid that uploaded the config (and therefore gave the PendingIntent,
-    //                 although the intent may be to broadcast to a different uid)
-    //  config id - the name of this config (for this particular uid)
-
-    VLOG("SubscriberReporter::alertBroadcastSubscriber called.");
-    lock_guard<mutex> lock(mLock);
-
-    if (!subscription.has_broadcast_subscriber_details()
-            || !subscription.broadcast_subscriber_details().has_subscriber_id()) {
-        ALOGE("Broadcast subscriber does not have an id.");
-        return;
-    }
-    int64_t subscriberId = subscription.broadcast_subscriber_details().subscriber_id();
-
-    vector<string> cookies;
-    cookies.reserve(subscription.broadcast_subscriber_details().cookie_size());
-    for (auto& cookie : subscription.broadcast_subscriber_details().cookie()) {
-        cookies.push_back(cookie);
-    }
-
-    auto it1 = mIntentMap.find(configKey);
-    if (it1 == mIntentMap.end()) {
-        ALOGW("Cannot inform subscriber for missing config key %s ", configKey.ToString().c_str());
-        return;
-    }
-    auto it2 = it1->second.find(subscriberId);
-    if (it2 == it1->second.end()) {
-        ALOGW("Cannot inform subscriber of config %s for missing subscriberId %lld ",
-                configKey.ToString().c_str(), (long long)subscriberId);
-        return;
-    }
-    sendBroadcastLocked(it2->second, configKey, subscription, cookies, dimKey);
-}
-
-void SubscriberReporter::sendBroadcastLocked(const shared_ptr<IPendingIntentRef>& pir,
-                                             const ConfigKey& configKey,
-                                             const Subscription& subscription,
-                                             const vector<string>& cookies,
-                                             const MetricDimensionKey& dimKey) const {
-    VLOG("SubscriberReporter::sendBroadcastLocked called.");
-    pir->sendSubscriberBroadcast(
-            configKey.GetUid(),
-            configKey.GetId(),
-            subscription.id(),
-            subscription.rule_id(),
-            cookies,
-            dimKey.getDimensionKeyInWhat().toStatsDimensionsValueParcel());
-}
-
-shared_ptr<IPendingIntentRef> SubscriberReporter::getBroadcastSubscriber(const ConfigKey& configKey,
-                                                                         int64_t subscriberId) {
-    lock_guard<mutex> lock(mLock);
-    auto subscriberMapIt = mIntentMap.find(configKey);
-    if (subscriberMapIt == mIntentMap.end()) {
-        return nullptr;
-    }
-    auto pirMapIt = subscriberMapIt->second.find(subscriberId);
-    if (pirMapIt == subscriberMapIt->second.end()) {
-        return nullptr;
-    }
-    return pirMapIt->second;
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/subscriber/SubscriberReporter.h b/cmds/statsd/src/subscriber/SubscriberReporter.h
deleted file mode 100644
index 4fe4281..0000000
--- a/cmds/statsd/src/subscriber/SubscriberReporter.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <aidl/android/os/IPendingIntentRef.h>
-#include <utils/RefBase.h>
-#include <utils/String16.h>
-
-#include "config/ConfigKey.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"  // subscription
-#include "HashableDimensionKey.h"
-
-#include <mutex>
-#include <unordered_map>
-#include <vector>
-
-using aidl::android::os::IPendingIntentRef;
-using std::mutex;
-using std::shared_ptr;
-using std::string;
-using std::unordered_map;
-using std::vector;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// Reports information to subscribers.
-// Single instance shared across the process. All methods are thread safe.
-class SubscriberReporter {
-public:
-    /** Get (singleton) instance of SubscriberReporter. */
-    static SubscriberReporter& getInstance() {
-        static SubscriberReporter subscriberReporter;
-        return subscriberReporter;
-    }
-
-    ~SubscriberReporter(){};
-    SubscriberReporter(SubscriberReporter const&) = delete;
-    void operator=(SubscriberReporter const&) = delete;
-
-    /**
-     * Stores the given intentSender, associating it with the given (configKey, subscriberId) pair.
-     */
-    void setBroadcastSubscriber(const ConfigKey& configKey,
-                                int64_t subscriberId,
-                                const shared_ptr<IPendingIntentRef>& pir);
-
-    /**
-     * Erases any intentSender information from the given (configKey, subscriberId) pair.
-     */
-    void unsetBroadcastSubscriber(const ConfigKey& configKey, int64_t subscriberId);
-
-    /**
-     * Sends a broadcast via the intentSender previously stored for the
-     * given (configKey, subscriberId) pair by setBroadcastSubscriber.
-     * Information about the subscriber, as well as information extracted from the dimKey, is sent.
-     */
-    void alertBroadcastSubscriber(const ConfigKey& configKey,
-                                  const Subscription& subscription,
-                                  const MetricDimensionKey& dimKey) const;
-
-    shared_ptr<IPendingIntentRef> getBroadcastSubscriber(const ConfigKey& configKey,
-                                                         int64_t subscriberId);
-
-private:
-    SubscriberReporter();
-
-    mutable mutex mLock;
-
-    /** Maps <ConfigKey, SubscriberId> -> IPendingIntentRef (which represents a PendingIntent). */
-    unordered_map<ConfigKey, unordered_map<int64_t, shared_ptr<IPendingIntentRef>>> mIntentMap;
-
-    /**
-     * Sends a broadcast via the given intentSender (using mStatsCompanionService), along
-     * with the information in the other parameters.
-     */
-    void sendBroadcastLocked(const shared_ptr<IPendingIntentRef>& pir,
-                             const ConfigKey& configKey,
-                             const Subscription& subscription,
-                             const vector<string>& cookies,
-                             const MetricDimensionKey& dimKey) const;
-
-    ::ndk::ScopedAIBinder_DeathRecipient mBroadcastSubscriberDeathRecipient;
-
-    /**
-     * Death recipient callback that is called when a broadcast subscriber dies.
-     * The cookie is a pointer to a BroadcastSubscriberDeathCookie.
-     */
-    static void broadcastSubscriberDied(void* cookie);
-};
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/uid_data.proto b/cmds/statsd/src/uid_data.proto
deleted file mode 100644
index a6fa26c..0000000
--- a/cmds/statsd/src/uid_data.proto
+++ /dev/null
@@ -1,36 +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.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-
-option java_package = "com.android.internal.os";
-option java_outer_classname = "UidDataProto";
-
-message ApplicationInfo {
-  optional int32 uid = 1;
-  optional int64 version = 2;
-  optional string version_string = 3;
-  optional string package_name = 4;
-  optional string installer = 5;
-}
-
-// StatsServiceCompanion uses the proto to supply statsd with uid-package
-// mapping updates.
-message UidData {
-  repeated ApplicationInfo app_info = 1;
-}
diff --git a/cmds/statsd/src/utils/MultiConditionTrigger.cpp b/cmds/statsd/src/utils/MultiConditionTrigger.cpp
deleted file mode 100644
index 43a6933..0000000
--- a/cmds/statsd/src/utils/MultiConditionTrigger.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define DEBUG false  // STOPSHIP if true
-
-#include "MultiConditionTrigger.h"
-
-#include <thread>
-
-using namespace std;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-MultiConditionTrigger::MultiConditionTrigger(const set<string>& conditionNames,
-                                             function<void()> trigger)
-    : mRemainingConditionNames(conditionNames),
-      mTrigger(trigger),
-      mCompleted(mRemainingConditionNames.empty()) {
-    if (mCompleted) {
-        thread executorThread([this] { mTrigger(); });
-        executorThread.detach();
-    }
-}
-
-void MultiConditionTrigger::markComplete(const string& conditionName) {
-    bool doTrigger = false;
-    {
-        lock_guard<mutex> lg(mMutex);
-        if (mCompleted) {
-            return;
-        }
-        mRemainingConditionNames.erase(conditionName);
-        mCompleted = mRemainingConditionNames.empty();
-        doTrigger = mCompleted;
-    }
-    if (doTrigger) {
-        std::thread executorThread([this] { mTrigger(); });
-        executorThread.detach();
-    }
-}
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/src/utils/MultiConditionTrigger.h b/cmds/statsd/src/utils/MultiConditionTrigger.h
deleted file mode 100644
index 51f6029..0000000
--- a/cmds/statsd/src/utils/MultiConditionTrigger.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-
-#include <gtest/gtest_prod.h>
-
-#include <mutex>
-#include <set>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * This class provides a utility to wait for a set of named conditions to occur.
- *
- * It will execute the trigger runnable in a detached thread once all conditions have been marked
- * true.
- */
-class MultiConditionTrigger {
-public:
-    explicit MultiConditionTrigger(const std::set<std::string>& conditionNames,
-                                   std::function<void()> trigger);
-
-    MultiConditionTrigger(const MultiConditionTrigger&) = delete;
-    MultiConditionTrigger& operator=(const MultiConditionTrigger&) = delete;
-
-    // Mark a specific condition as true. If this condition has called markComplete already or if
-    // the event was not specified in the constructor, the function is a no-op.
-    void markComplete(const std::string& eventName);
-
-private:
-    mutable std::mutex mMutex;
-    std::set<std::string> mRemainingConditionNames;
-    std::function<void()> mTrigger;
-    bool mCompleted;
-
-    FRIEND_TEST(MultiConditionTriggerTest, TestCountDownCalledBySameEventName);
-};
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/statsd_test.xml b/cmds/statsd/statsd_test.xml
deleted file mode 100644
index 8f9bb1c..0000000
--- a/cmds/statsd/statsd_test.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2020 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<configuration description="Runs statsd_test.">
-    <option name="test-suite-tag" value="apct" />
-    <option name="test-suite-tag" value="apct-native" />
-    <option name="test-suite-tag" value="mts" />
-
-    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
-
-    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
-       <option name="cleanup" value="true" />
-       <option name="push" value="statsd_test->/data/local/tmp/statsd_test" />
-       <option name="append-bitness" value="true" />
-    </target_preparer>
-
-    <test class="com.android.tradefed.testtype.GTest" >
-        <option name="native-test-device-path" value="/data/local/tmp" />
-        <option name="module-name" value="statsd_test" />
-    </test>
-
-    <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
-        <option name="mainline-module-package-name" value="com.google.android.os.statsd" />
-    </object>
-</configuration>
diff --git a/cmds/statsd/tests/AlarmMonitor_test.cpp b/cmds/statsd/tests/AlarmMonitor_test.cpp
deleted file mode 100644
index 1dc9795..0000000
--- a/cmds/statsd/tests/AlarmMonitor_test.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "anomaly/AlarmMonitor.h"
-
-#include <gtest/gtest.h>
-
-using namespace android::os::statsd;
-using std::shared_ptr;
-
-#ifdef __ANDROID__
-TEST(AlarmMonitor, popSoonerThan) {
-    std::string emptyMetricId;
-    std::string emptyDimensionId;
-    unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> set;
-    AlarmMonitor am(2,
-                    [](const shared_ptr<IStatsCompanionService>&, int64_t){},
-                    [](const shared_ptr<IStatsCompanionService>&){});
-
-    set = am.popSoonerThan(5);
-    EXPECT_TRUE(set.empty());
-
-    sp<const InternalAlarm> a = new InternalAlarm{10};
-    sp<const InternalAlarm> b = new InternalAlarm{20};
-    sp<const InternalAlarm> c = new InternalAlarm{20};
-    sp<const InternalAlarm> d = new InternalAlarm{30};
-    sp<const InternalAlarm> e = new InternalAlarm{40};
-    sp<const InternalAlarm> f = new InternalAlarm{50};
-
-    am.add(a);
-    am.add(b);
-    am.add(c);
-    am.add(d);
-    am.add(e);
-    am.add(f);
-
-    set = am.popSoonerThan(5);
-    EXPECT_TRUE(set.empty());
-
-    set = am.popSoonerThan(30);
-    ASSERT_EQ(4u, set.size());
-    EXPECT_EQ(1u, set.count(a));
-    EXPECT_EQ(1u, set.count(b));
-    EXPECT_EQ(1u, set.count(c));
-    EXPECT_EQ(1u, set.count(d));
-
-    set = am.popSoonerThan(60);
-    ASSERT_EQ(2u, set.size());
-    EXPECT_EQ(1u, set.count(e));
-    EXPECT_EQ(1u, set.count(f));
-
-    set = am.popSoonerThan(80);
-    ASSERT_EQ(0u, set.size());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/ConfigManager_test.cpp b/cmds/statsd/tests/ConfigManager_test.cpp
deleted file mode 100644
index 9455304..0000000
--- a/cmds/statsd/tests/ConfigManager_test.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/config/ConfigManager.h"
-#include "src/metrics/MetricsManager.h"
-#include "statsd_test_util.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include <stdio.h>
-#include <iostream>
-
-using namespace android;
-using namespace android::os::statsd;
-using namespace testing;
-using namespace std;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-static ostream& operator<<(ostream& os, const StatsdConfig& config) {
-    return os << "StatsdConfig{id=" << config.id() << "}";
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-/**
- * Mock ConfigListener
- */
-class MockListener : public ConfigListener {
-public:
-    MOCK_METHOD3(OnConfigUpdated, void(const int64_t timestampNs, const ConfigKey& key,
-                                       const StatsdConfig& config));
-    MOCK_METHOD1(OnConfigRemoved, void(const ConfigKey& key));
-};
-
-/**
- * Validate that the ConfigKey is the one we wanted.
- */
-MATCHER_P2(ConfigKeyEq, uid, id, "") {
-    return arg.GetUid() == uid && (long long)arg.GetId() == (long long)id;
-}
-
-/**
- * Validate that the StatsdConfig is the one we wanted.
- */
-MATCHER_P(StatsdConfigEq, id, 0) {
-    return (long long)arg.id() == (long long)id;
-}
-
-const int64_t testConfigId = 12345;
-
-/**
- * Test the addOrUpdate and remove methods
- */
-TEST(ConfigManagerTest, TestAddUpdateRemove) {
-    sp<MockListener> listener = new StrictMock<MockListener>();
-
-    sp<ConfigManager> manager = new ConfigManager();
-    manager->AddListener(listener);
-
-    StatsdConfig config91;
-    config91.set_id(91);
-    StatsdConfig config92;
-    config92.set_id(92);
-    StatsdConfig config93;
-    config93.set_id(93);
-    StatsdConfig config94;
-    config94.set_id(94);
-
-    {
-        InSequence s;
-
-        manager->StartupForTest();
-
-        // Add another one
-        EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("zzz")),
-            StatsdConfigEq(91)))
-                .RetiresOnSaturation();
-        manager->UpdateConfig(ConfigKey(1, StringToId("zzz")), config91);
-
-        // Update It
-        EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("zzz")),
-            StatsdConfigEq(92)))
-                .RetiresOnSaturation();
-        manager->UpdateConfig(ConfigKey(1, StringToId("zzz")), config92);
-
-        // Add one with the same uid but a different name
-        EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("yyy")),
-            StatsdConfigEq(93)))
-                .RetiresOnSaturation();
-        manager->UpdateConfig(ConfigKey(1, StringToId("yyy")), config93);
-
-        // Add one with the same name but a different uid
-        EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(2, StringToId("zzz")),
-            StatsdConfigEq(94)))
-                .RetiresOnSaturation();
-        manager->UpdateConfig(ConfigKey(2, StringToId("zzz")), config94);
-
-        // Remove (1,yyy)
-        EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(1, StringToId("yyy"))))
-                .RetiresOnSaturation();
-        manager->RemoveConfig(ConfigKey(1, StringToId("yyy")));
-
-        // Remove (2,zzz)
-        EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(2, StringToId("zzz"))))
-                .RetiresOnSaturation();
-        manager->RemoveConfig(ConfigKey(2, StringToId("zzz")));
-
-        // Remove (1,zzz)
-        EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(1, StringToId("zzz"))))
-                .RetiresOnSaturation();
-        manager->RemoveConfig(ConfigKey(1, StringToId("zzz")));
-
-        // Remove (2,zzz) again and we shouldn't get the callback
-        manager->RemoveConfig(ConfigKey(2, StringToId("zzz")));
-    }
-}
-
-/**
- * Test removing all of the configs for a uid.
- */
-TEST(ConfigManagerTest, TestRemoveUid) {
-    sp<MockListener> listener = new StrictMock<MockListener>();
-
-    sp<ConfigManager> manager = new ConfigManager();
-    manager->AddListener(listener);
-
-    StatsdConfig config;
-
-    EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, _, _)).Times(5);
-    EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(2, StringToId("xxx"))));
-    EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(2, StringToId("yyy"))));
-    EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(2, StringToId("zzz"))));
-
-    manager->StartupForTest();
-    manager->UpdateConfig(ConfigKey(1, StringToId("aaa")), config);
-    manager->UpdateConfig(ConfigKey(2, StringToId("xxx")), config);
-    manager->UpdateConfig(ConfigKey(2, StringToId("yyy")), config);
-    manager->UpdateConfig(ConfigKey(2, StringToId("zzz")), config);
-    manager->UpdateConfig(ConfigKey(3, StringToId("bbb")), config);
-
-    manager->RemoveConfigs(2);
-}
diff --git a/cmds/statsd/tests/FieldValue_test.cpp b/cmds/statsd/tests/FieldValue_test.cpp
deleted file mode 100644
index a21eb9b..0000000
--- a/cmds/statsd/tests/FieldValue_test.cpp
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <gtest/gtest.h>
-
-#include "frameworks/base/cmds/statsd/src/stats_log.pb.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "matchers/matcher_util.h"
-#include "src/logd/LogEvent.h"
-#include "stats_event.h"
-#include "stats_log_util.h"
-#include "stats_util.h"
-#include "subscriber/SubscriberReporter.h"
-#include "tests/statsd_test_util.h"
-
-#ifdef __ANDROID__
-
-using android::util::ProtoReader;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-// These constants must be kept in sync with those in StatsDimensionsValue.java.
-const static int STATS_DIMENSIONS_VALUE_STRING_TYPE = 2;
-const static int STATS_DIMENSIONS_VALUE_INT_TYPE = 3;
-const static int STATS_DIMENSIONS_VALUE_FLOAT_TYPE = 6;
-const static int STATS_DIMENSIONS_VALUE_TUPLE_TYPE = 7;
-
-namespace {
-void makeLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp,
-                  const vector<int>& attributionUids, const vector<string>& attributionTags,
-                  const string& name) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestamp);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_writeString(statsEvent, name.c_str());
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-void makeLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp,
-                  const vector<int>& attributionUids, const vector<string>& attributionTags,
-                  const int32_t value) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestamp);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_writeInt32(statsEvent, value);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-}  // anonymous namespace
-
-TEST(AtomMatcherTest, TestFieldTranslation) {
-    FieldMatcher matcher1;
-    matcher1.set_field(10);
-    FieldMatcher* child = matcher1.add_child();
-    child->set_field(1);
-    child->set_position(Position::ANY);
-
-    child = child->add_child();
-    child->set_field(1);
-
-    vector<Matcher> output;
-    translateFieldMatcher(matcher1, &output);
-
-    ASSERT_EQ((size_t)1, output.size());
-
-    const auto& matcher12 = output[0];
-    EXPECT_EQ((int32_t)10, matcher12.mMatcher.getTag());
-    EXPECT_EQ((int32_t)0x02010001, matcher12.mMatcher.getField());
-    EXPECT_EQ((int32_t)0xff7f007f, matcher12.mMask);
-}
-
-TEST(AtomMatcherTest, TestFieldTranslation_ALL) {
-    FieldMatcher matcher1;
-    matcher1.set_field(10);
-    FieldMatcher* child = matcher1.add_child();
-    child->set_field(1);
-    child->set_position(Position::ALL);
-
-    child = child->add_child();
-    child->set_field(1);
-
-    vector<Matcher> output;
-    translateFieldMatcher(matcher1, &output);
-
-    ASSERT_EQ((size_t)1, output.size());
-
-    const auto& matcher12 = output[0];
-    EXPECT_EQ((int32_t)10, matcher12.mMatcher.getTag());
-    EXPECT_EQ((int32_t)0x02010001, matcher12.mMatcher.getField());
-    EXPECT_EQ((int32_t)0xff7f7f7f, matcher12.mMask);
-}
-
-TEST(AtomMatcherTest, TestFilter_ALL) {
-    FieldMatcher matcher1;
-    matcher1.set_field(10);
-    FieldMatcher* child = matcher1.add_child();
-    child->set_field(1);
-    child->set_position(Position::ALL);
-
-    child->add_child()->set_field(1);
-    child->add_child()->set_field(2);
-
-    child = matcher1.add_child();
-    child->set_field(2);
-
-    vector<Matcher> matchers;
-    translateFieldMatcher(matcher1, &matchers);
-
-    std::vector<int> attributionUids = {1111, 2222, 3333};
-    std::vector<string> attributionTags = {"location1", "location2", "location3"};
-
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event, 10 /*atomId*/, 1012345, attributionUids, attributionTags, "some value");
-    HashableDimensionKey output;
-
-    filterValues(matchers, event.getValues(), &output);
-
-    ASSERT_EQ((size_t)7, output.getValues().size());
-    EXPECT_EQ((int32_t)0x02010101, output.getValues()[0].mField.getField());
-    EXPECT_EQ((int32_t)1111, output.getValues()[0].mValue.int_value);
-    EXPECT_EQ((int32_t)0x02010102, output.getValues()[1].mField.getField());
-    EXPECT_EQ("location1", output.getValues()[1].mValue.str_value);
-
-    EXPECT_EQ((int32_t)0x02010201, output.getValues()[2].mField.getField());
-    EXPECT_EQ((int32_t)2222, output.getValues()[2].mValue.int_value);
-    EXPECT_EQ((int32_t)0x02010202, output.getValues()[3].mField.getField());
-    EXPECT_EQ("location2", output.getValues()[3].mValue.str_value);
-
-    EXPECT_EQ((int32_t)0x02010301, output.getValues()[4].mField.getField());
-    EXPECT_EQ((int32_t)3333, output.getValues()[4].mValue.int_value);
-    EXPECT_EQ((int32_t)0x02010302, output.getValues()[5].mField.getField());
-    EXPECT_EQ("location3", output.getValues()[5].mValue.str_value);
-
-    EXPECT_EQ((int32_t)0x00020000, output.getValues()[6].mField.getField());
-    EXPECT_EQ("some value", output.getValues()[6].mValue.str_value);
-}
-
-TEST(AtomMatcherTest, TestSubDimension) {
-    HashableDimensionKey dim;
-
-    int pos1[] = {1, 1, 1};
-    int pos2[] = {1, 1, 2};
-    int pos3[] = {1, 1, 3};
-    int pos4[] = {2, 0, 0};
-    Field field1(10, pos1, 2);
-    Field field2(10, pos2, 2);
-
-    Field field3(10, pos3, 2);
-    Field field4(10, pos4, 0);
-
-    Value value1((int32_t)10025);
-    Value value2("tag");
-
-    Value value11((int32_t)10026);
-    Value value22("tag2");
-
-    dim.addValue(FieldValue(field1, value1));
-    dim.addValue(FieldValue(field2, value2));
-
-    HashableDimensionKey subDim1;
-    subDim1.addValue(FieldValue(field1, value1));
-
-    HashableDimensionKey subDim2;
-    subDim1.addValue(FieldValue(field2, value2));
-
-    EXPECT_TRUE(dim.contains(dim));
-    EXPECT_TRUE(dim.contains(subDim1));
-    EXPECT_TRUE(dim.contains(subDim2));
-
-    HashableDimensionKey subDim3;
-    subDim3.addValue(FieldValue(field1, value11));
-    EXPECT_FALSE(dim.contains(subDim3));
-
-    HashableDimensionKey subDim4;
-    // Empty dimension is always a sub dimension of other dimensions
-    EXPECT_TRUE(dim.contains(subDim4));
-}
-
-TEST(AtomMatcherTest, TestMetric2ConditionLink) {
-    std::vector<int> attributionUids = {1111, 2222, 3333};
-    std::vector<string> attributionTags = {"location1", "location2", "location3"};
-
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event, 10 /*atomId*/, 12345, attributionUids, attributionTags, "some value");
-
-    FieldMatcher whatMatcher;
-    whatMatcher.set_field(10);
-    FieldMatcher* child11 = whatMatcher.add_child();
-    child11->set_field(1);
-    child11->set_position(Position::ANY);
-    child11 = child11->add_child();
-    child11->set_field(1);
-
-    FieldMatcher conditionMatcher;
-    conditionMatcher.set_field(27);
-    FieldMatcher* child2 = conditionMatcher.add_child();
-    child2->set_field(2);
-    child2->set_position(Position::LAST);
-
-    child2 = child2->add_child();
-    child2->set_field(2);
-
-    Metric2Condition link;
-
-    translateFieldMatcher(whatMatcher, &link.metricFields);
-    translateFieldMatcher(conditionMatcher, &link.conditionFields);
-
-    ASSERT_EQ((size_t)1, link.metricFields.size());
-    EXPECT_EQ((int32_t)0x02010001, link.metricFields[0].mMatcher.getField());
-    EXPECT_EQ((int32_t)0xff7f007f, link.metricFields[0].mMask);
-    EXPECT_EQ((int32_t)10, link.metricFields[0].mMatcher.getTag());
-
-    ASSERT_EQ((size_t)1, link.conditionFields.size());
-    EXPECT_EQ((int32_t)0x02028002, link.conditionFields[0].mMatcher.getField());
-    EXPECT_EQ((int32_t)0xff7f807f, link.conditionFields[0].mMask);
-    EXPECT_EQ((int32_t)27, link.conditionFields[0].mMatcher.getTag());
-}
-
-TEST(AtomMatcherTest, TestWriteDimensionPath) {
-    for (auto position : {Position::ANY, Position::ALL, Position::FIRST, Position::LAST}) {
-        FieldMatcher matcher1;
-        matcher1.set_field(10);
-        FieldMatcher* child = matcher1.add_child();
-        child->set_field(2);
-        child->set_position(position);
-        child->add_child()->set_field(1);
-        child->add_child()->set_field(3);
-
-        child = matcher1.add_child();
-        child->set_field(4);
-
-        child = matcher1.add_child();
-        child->set_field(6);
-        child->add_child()->set_field(2);
-
-        vector<Matcher> matchers;
-        translateFieldMatcher(matcher1, &matchers);
-
-        android::util::ProtoOutputStream protoOut;
-        writeDimensionPathToProto(matchers, &protoOut);
-
-        vector<uint8_t> outData;
-        outData.resize(protoOut.size());
-        size_t pos = 0;
-        sp<ProtoReader> reader = protoOut.data();
-        while (reader->readBuffer() != NULL) {
-            size_t toRead = reader->currentToRead();
-            std::memcpy(&(outData[pos]), reader->readBuffer(), toRead);
-            pos += toRead;
-            reader->move(toRead);
-        }
-
-        DimensionsValue result;
-        ASSERT_EQ(true, result.ParseFromArray(&outData[0], outData.size()));
-
-        EXPECT_EQ(10, result.field());
-        EXPECT_EQ(DimensionsValue::ValueCase::kValueTuple, result.value_case());
-        ASSERT_EQ(3, result.value_tuple().dimensions_value_size());
-
-        const auto& dim1 = result.value_tuple().dimensions_value(0);
-        EXPECT_EQ(2, dim1.field());
-        ASSERT_EQ(2, dim1.value_tuple().dimensions_value_size());
-
-        const auto& dim11 = dim1.value_tuple().dimensions_value(0);
-        EXPECT_EQ(1, dim11.field());
-
-        const auto& dim12 = dim1.value_tuple().dimensions_value(1);
-        EXPECT_EQ(3, dim12.field());
-
-        const auto& dim2 = result.value_tuple().dimensions_value(1);
-        EXPECT_EQ(4, dim2.field());
-
-        const auto& dim3 = result.value_tuple().dimensions_value(2);
-        EXPECT_EQ(6, dim3.field());
-        ASSERT_EQ(1, dim3.value_tuple().dimensions_value_size());
-        const auto& dim31 = dim3.value_tuple().dimensions_value(0);
-        EXPECT_EQ(2, dim31.field());
-    }
-}
-
-void checkAttributionNodeInDimensionsValueParcel(StatsDimensionsValueParcel& attributionNodeParcel,
-                                                 int32_t nodeDepthInAttributionChain,
-                                                 int32_t uid, string tag) {
-    EXPECT_EQ(attributionNodeParcel.field, nodeDepthInAttributionChain /*position at depth 1*/);
-    ASSERT_EQ(attributionNodeParcel.valueType, STATS_DIMENSIONS_VALUE_TUPLE_TYPE);
-    ASSERT_EQ(attributionNodeParcel.tupleValue.size(), 2);
-
-    StatsDimensionsValueParcel uidParcel = attributionNodeParcel.tupleValue[0];
-    EXPECT_EQ(uidParcel.field, 1 /*position at depth 2*/);
-    EXPECT_EQ(uidParcel.valueType, STATS_DIMENSIONS_VALUE_INT_TYPE);
-    EXPECT_EQ(uidParcel.intValue, uid);
-
-    StatsDimensionsValueParcel tagParcel = attributionNodeParcel.tupleValue[1];
-    EXPECT_EQ(tagParcel.field, 2 /*position at depth 2*/);
-    EXPECT_EQ(tagParcel.valueType, STATS_DIMENSIONS_VALUE_STRING_TYPE);
-    EXPECT_EQ(tagParcel.stringValue, tag);
-}
-
-// Test conversion of a HashableDimensionKey into a StatsDimensionValueParcel
-TEST(AtomMatcherTest, TestSubscriberDimensionWrite) {
-    int atomId = 10;
-    // First four fields form an attribution chain
-    int pos1[] = {1, 1, 1};
-    int pos2[] = {1, 1, 2};
-    int pos3[] = {1, 2, 1};
-    int pos4[] = {1, 2, 2};
-    int pos5[] = {2, 1, 1};
-
-    Field field1(atomId, pos1, /*depth=*/2);
-    Field field2(atomId, pos2, /*depth=*/2);
-    Field field3(atomId, pos3, /*depth=*/2);
-    Field field4(atomId, pos4, /*depth=*/2);
-    Field field5(atomId, pos5, /*depth=*/0);
-
-    Value value1((int32_t)1);
-    Value value2("string2");
-    Value value3((int32_t)3);
-    Value value4("string4");
-    Value value5((float)5.0);
-
-    HashableDimensionKey dimensionKey;
-    dimensionKey.addValue(FieldValue(field1, value1));
-    dimensionKey.addValue(FieldValue(field2, value2));
-    dimensionKey.addValue(FieldValue(field3, value3));
-    dimensionKey.addValue(FieldValue(field4, value4));
-    dimensionKey.addValue(FieldValue(field5, value5));
-
-    StatsDimensionsValueParcel rootParcel = dimensionKey.toStatsDimensionsValueParcel();
-    EXPECT_EQ(rootParcel.field, atomId);
-    ASSERT_EQ(rootParcel.valueType, STATS_DIMENSIONS_VALUE_TUPLE_TYPE);
-    ASSERT_EQ(rootParcel.tupleValue.size(), 2);
-
-    // Check that attribution chain is populated correctly
-    StatsDimensionsValueParcel attributionChainParcel = rootParcel.tupleValue[0];
-    EXPECT_EQ(attributionChainParcel.field, 1 /*position at depth 0*/);
-    ASSERT_EQ(attributionChainParcel.valueType, STATS_DIMENSIONS_VALUE_TUPLE_TYPE);
-    ASSERT_EQ(attributionChainParcel.tupleValue.size(), 2);
-    checkAttributionNodeInDimensionsValueParcel(attributionChainParcel.tupleValue[0],
-                                                /*nodeDepthInAttributionChain=*/1,
-                                                value1.int_value, value2.str_value);
-    checkAttributionNodeInDimensionsValueParcel(attributionChainParcel.tupleValue[1],
-                                                /*nodeDepthInAttributionChain=*/2,
-                                                value3.int_value, value4.str_value);
-
-    // Check that the float is populated correctly
-    StatsDimensionsValueParcel floatParcel = rootParcel.tupleValue[1];
-    EXPECT_EQ(floatParcel.field, 2 /*position at depth 0*/);
-    EXPECT_EQ(floatParcel.valueType, STATS_DIMENSIONS_VALUE_FLOAT_TYPE);
-    EXPECT_EQ(floatParcel.floatValue, value5.float_value);
-}
-
-TEST(AtomMatcherTest, TestWriteDimensionToProto) {
-    HashableDimensionKey dim;
-    int pos1[] = {1, 1, 1};
-    int pos2[] = {1, 1, 2};
-    int pos3[] = {1, 1, 3};
-    int pos4[] = {2, 0, 0};
-    Field field1(10, pos1, 2);
-    Field field2(10, pos2, 2);
-    Field field3(10, pos3, 2);
-    Field field4(10, pos4, 0);
-
-    Value value1((int32_t)10025);
-    Value value2("tag");
-    Value value3((int32_t)987654);
-    Value value4((int32_t)99999);
-
-    dim.addValue(FieldValue(field1, value1));
-    dim.addValue(FieldValue(field2, value2));
-    dim.addValue(FieldValue(field3, value3));
-    dim.addValue(FieldValue(field4, value4));
-
-    android::util::ProtoOutputStream protoOut;
-    writeDimensionToProto(dim, nullptr /* include strings */, &protoOut);
-
-    vector<uint8_t> outData;
-    outData.resize(protoOut.size());
-    size_t pos = 0;
-    sp<ProtoReader> reader = protoOut.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&(outData[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-
-    DimensionsValue result;
-    ASSERT_EQ(true, result.ParseFromArray(&outData[0], outData.size()));
-    EXPECT_EQ(10, result.field());
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueTuple, result.value_case());
-    ASSERT_EQ(2, result.value_tuple().dimensions_value_size());
-
-    const auto& dim1 = result.value_tuple().dimensions_value(0);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueTuple, dim1.value_case());
-    ASSERT_EQ(3, dim1.value_tuple().dimensions_value_size());
-
-    const auto& dim11 = dim1.value_tuple().dimensions_value(0);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueInt, dim11.value_case());
-    EXPECT_EQ(10025, dim11.value_int());
-
-    const auto& dim12 = dim1.value_tuple().dimensions_value(1);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueStr, dim12.value_case());
-    EXPECT_EQ("tag", dim12.value_str());
-
-    const auto& dim13 = dim1.value_tuple().dimensions_value(2);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueInt, dim13.value_case());
-    EXPECT_EQ(987654, dim13.value_int());
-
-    const auto& dim2 = result.value_tuple().dimensions_value(1);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueInt, dim2.value_case());
-    EXPECT_EQ(99999, dim2.value_int());
-}
-
-TEST(AtomMatcherTest, TestWriteDimensionLeafNodesToProto) {
-    HashableDimensionKey dim;
-    int pos1[] = {1, 1, 1};
-    int pos2[] = {1, 1, 2};
-    int pos3[] = {1, 1, 3};
-    int pos4[] = {2, 0, 0};
-    Field field1(10, pos1, 2);
-    Field field2(10, pos2, 2);
-    Field field3(10, pos3, 2);
-    Field field4(10, pos4, 0);
-
-    Value value1((int32_t)10025);
-    Value value2("tag");
-    Value value3((int32_t)987654);
-    Value value4((int64_t)99999);
-
-    dim.addValue(FieldValue(field1, value1));
-    dim.addValue(FieldValue(field2, value2));
-    dim.addValue(FieldValue(field3, value3));
-    dim.addValue(FieldValue(field4, value4));
-
-    android::util::ProtoOutputStream protoOut;
-    writeDimensionLeafNodesToProto(dim, 1, nullptr /* include strings */, &protoOut);
-
-    vector<uint8_t> outData;
-    outData.resize(protoOut.size());
-    size_t pos = 0;
-    sp<ProtoReader> reader = protoOut.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&(outData[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-
-    DimensionsValueTuple result;
-    ASSERT_EQ(true, result.ParseFromArray(&outData[0], outData.size()));
-    ASSERT_EQ(4, result.dimensions_value_size());
-
-    const auto& dim1 = result.dimensions_value(0);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueInt, dim1.value_case());
-    EXPECT_EQ(10025, dim1.value_int());
-
-    const auto& dim2 = result.dimensions_value(1);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueStr, dim2.value_case());
-    EXPECT_EQ("tag", dim2.value_str());
-
-    const auto& dim3 = result.dimensions_value(2);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueInt, dim3.value_case());
-    EXPECT_EQ(987654, dim3.value_int());
-
-    const auto& dim4 = result.dimensions_value(3);
-    EXPECT_EQ(DimensionsValue::ValueCase::kValueLong, dim4.value_case());
-    EXPECT_EQ(99999, dim4.value_long());
-}
-
-TEST(AtomMatcherTest, TestWriteAtomToProto) {
-    std::vector<int> attributionUids = {1111, 2222};
-    std::vector<string> attributionTags = {"location1", "location2"};
-
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event, 4 /*atomId*/, 12345, attributionUids, attributionTags, 999);
-
-    android::util::ProtoOutputStream protoOutput;
-    writeFieldValueTreeToStream(event.GetTagId(), event.getValues(), &protoOutput);
-
-    vector<uint8_t> outData;
-    outData.resize(protoOutput.size());
-    size_t pos = 0;
-    sp<ProtoReader> reader = protoOutput.data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&(outData[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-
-    Atom result;
-    ASSERT_EQ(true, result.ParseFromArray(&outData[0], outData.size()));
-    EXPECT_EQ(Atom::PushedCase::kBleScanResultReceived, result.pushed_case());
-    const auto& atom = result.ble_scan_result_received();
-    ASSERT_EQ(2, atom.attribution_node_size());
-    EXPECT_EQ(1111, atom.attribution_node(0).uid());
-    EXPECT_EQ("location1", atom.attribution_node(0).tag());
-    EXPECT_EQ(2222, atom.attribution_node(1).uid());
-    EXPECT_EQ("location2", atom.attribution_node(1).tag());
-    EXPECT_EQ(999, atom.num_results());
-}
-
-/*
- * Test two Matchers is not a subset of one Matcher.
- * Test one Matcher is subset of two Matchers.
- */
-TEST(AtomMatcherTest, TestSubsetDimensions1) {
-    // Initialize first set of matchers
-    FieldMatcher matcher1;
-    matcher1.set_field(10);
-
-    FieldMatcher* child = matcher1.add_child();
-    child->set_field(1);
-    child->set_position(Position::ALL);
-    child->add_child()->set_field(1);
-    child->add_child()->set_field(2);
-
-    vector<Matcher> matchers1;
-    translateFieldMatcher(matcher1, &matchers1);
-    ASSERT_EQ(2, matchers1.size());
-
-    // Initialize second set of matchers
-    FieldMatcher matcher2;
-    matcher2.set_field(10);
-
-    child = matcher2.add_child();
-    child->set_field(1);
-    child->set_position(Position::ALL);
-    child->add_child()->set_field(1);
-
-    vector<Matcher> matchers2;
-    translateFieldMatcher(matcher2, &matchers2);
-    ASSERT_EQ(1, matchers2.size());
-
-    EXPECT_FALSE(subsetDimensions(matchers1, matchers2));
-    EXPECT_TRUE(subsetDimensions(matchers2, matchers1));
-}
-/*
- * Test not a subset with one matching Matcher, one non-matching Matcher.
- */
-TEST(AtomMatcherTest, TestSubsetDimensions2) {
-    // Initialize first set of matchers
-    FieldMatcher matcher1;
-    matcher1.set_field(10);
-
-    FieldMatcher* child = matcher1.add_child();
-    child->set_field(1);
-
-    child = matcher1.add_child();
-    child->set_field(2);
-
-    vector<Matcher> matchers1;
-    translateFieldMatcher(matcher1, &matchers1);
-
-    // Initialize second set of matchers
-    FieldMatcher matcher2;
-    matcher2.set_field(10);
-
-    child = matcher2.add_child();
-    child->set_field(1);
-
-    child = matcher2.add_child();
-    child->set_field(3);
-
-    vector<Matcher> matchers2;
-    translateFieldMatcher(matcher2, &matchers2);
-
-    EXPECT_FALSE(subsetDimensions(matchers1, matchers2));
-}
-
-/*
- * Test not a subset if parent field is not equal.
- */
-TEST(AtomMatcherTest, TestSubsetDimensions3) {
-    // Initialize first set of matchers
-    FieldMatcher matcher1;
-    matcher1.set_field(10);
-
-    FieldMatcher* child = matcher1.add_child();
-    child->set_field(1);
-
-    vector<Matcher> matchers1;
-    translateFieldMatcher(matcher1, &matchers1);
-
-    // Initialize second set of matchers
-    FieldMatcher matcher2;
-    matcher2.set_field(5);
-
-    child = matcher2.add_child();
-    child->set_field(1);
-
-    vector<Matcher> matchers2;
-    translateFieldMatcher(matcher2, &matchers2);
-
-    EXPECT_FALSE(subsetDimensions(matchers1, matchers2));
-}
-
-/*
- * Test is subset with two matching Matchers.
- */
-TEST(AtomMatcherTest, TestSubsetDimensions4) {
-    // Initialize first set of matchers
-    FieldMatcher matcher1;
-    matcher1.set_field(10);
-
-    FieldMatcher* child = matcher1.add_child();
-    child->set_field(1);
-
-    child = matcher1.add_child();
-    child->set_field(2);
-
-    vector<Matcher> matchers1;
-    translateFieldMatcher(matcher1, &matchers1);
-
-    // Initialize second set of matchers
-    FieldMatcher matcher2;
-    matcher2.set_field(10);
-
-    child = matcher2.add_child();
-    child->set_field(1);
-
-    child = matcher2.add_child();
-    child->set_field(2);
-
-    child = matcher2.add_child();
-    child->set_field(3);
-
-    vector<Matcher> matchers2;
-    translateFieldMatcher(matcher2, &matchers2);
-
-    EXPECT_TRUE(subsetDimensions(matchers1, matchers2));
-    EXPECT_FALSE(subsetDimensions(matchers2, matchers1));
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/HashableDimensionKey_test.cpp b/cmds/statsd/tests/HashableDimensionKey_test.cpp
deleted file mode 100644
index 29adcd0..0000000
--- a/cmds/statsd/tests/HashableDimensionKey_test.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "src/HashableDimensionKey.h"
-
-#include <gtest/gtest.h>
-
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "statsd_test_util.h"
-
-#ifdef __ANDROID__
-
-using android::util::ProtoReader;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * Test that #containsLinkedStateValues returns false when the whatKey is
- * smaller than the primaryKey.
- */
-TEST(HashableDimensionKeyTest, TestContainsLinkedStateValues_WhatKeyTooSmall) {
-    std::vector<Metric2State> mMetric2StateLinks;
-
-    int32_t uid1 = 1000;
-    HashableDimensionKey whatKey = DEFAULT_DIMENSION_KEY;
-    HashableDimensionKey primaryKey;
-    getUidProcessKey(uid1, &primaryKey);
-
-    EXPECT_FALSE(containsLinkedStateValues(whatKey, primaryKey, mMetric2StateLinks,
-                                           UID_PROCESS_STATE_ATOM_ID));
-}
-
-/**
- * Test that #containsLinkedStateValues returns false when the linked values
- * are not equal.
- */
-TEST(HashableDimensionKeyTest, TestContainsLinkedStateValues_UnequalLinkedValues) {
-    int stateAtomId = UID_PROCESS_STATE_ATOM_ID;
-
-    FieldMatcher whatMatcher;
-    whatMatcher.set_field(util::OVERLAY_STATE_CHANGED);
-    FieldMatcher* child11 = whatMatcher.add_child();
-    child11->set_field(1);
-
-    FieldMatcher stateMatcher;
-    stateMatcher.set_field(stateAtomId);
-    FieldMatcher* child21 = stateMatcher.add_child();
-    child21->set_field(1);
-
-    std::vector<Metric2State> mMetric2StateLinks;
-    Metric2State ms;
-    ms.stateAtomId = stateAtomId;
-    translateFieldMatcher(whatMatcher, &ms.metricFields);
-    translateFieldMatcher(stateMatcher, &ms.stateFields);
-    mMetric2StateLinks.push_back(ms);
-
-    int32_t uid1 = 1000;
-    int32_t uid2 = 1001;
-    HashableDimensionKey whatKey;
-    getOverlayKey(uid2, "package", &whatKey);
-    HashableDimensionKey primaryKey;
-    getUidProcessKey(uid1, &primaryKey);
-
-    EXPECT_FALSE(containsLinkedStateValues(whatKey, primaryKey, mMetric2StateLinks, stateAtomId));
-}
-
-/**
- * Test that #containsLinkedStateValues returns false when there is no link
- * between the key values.
- */
-TEST(HashableDimensionKeyTest, TestContainsLinkedStateValues_MissingMetric2StateLinks) {
-    int stateAtomId = UID_PROCESS_STATE_ATOM_ID;
-
-    std::vector<Metric2State> mMetric2StateLinks;
-
-    int32_t uid1 = 1000;
-    HashableDimensionKey whatKey;
-    getOverlayKey(uid1, "package", &whatKey);
-    HashableDimensionKey primaryKey;
-    getUidProcessKey(uid1, &primaryKey);
-
-    EXPECT_FALSE(containsLinkedStateValues(whatKey, primaryKey, mMetric2StateLinks, stateAtomId));
-}
-
-/**
- * Test that #containsLinkedStateValues returns true when the key values are
- * linked and equal.
- */
-TEST(HashableDimensionKeyTest, TestContainsLinkedStateValues_AllConditionsMet) {
-    int stateAtomId = UID_PROCESS_STATE_ATOM_ID;
-
-    FieldMatcher whatMatcher;
-    whatMatcher.set_field(util::OVERLAY_STATE_CHANGED);
-    FieldMatcher* child11 = whatMatcher.add_child();
-    child11->set_field(1);
-
-    FieldMatcher stateMatcher;
-    stateMatcher.set_field(stateAtomId);
-    FieldMatcher* child21 = stateMatcher.add_child();
-    child21->set_field(1);
-
-    std::vector<Metric2State> mMetric2StateLinks;
-    Metric2State ms;
-    ms.stateAtomId = stateAtomId;
-    translateFieldMatcher(whatMatcher, &ms.metricFields);
-    translateFieldMatcher(stateMatcher, &ms.stateFields);
-    mMetric2StateLinks.push_back(ms);
-
-    int32_t uid1 = 1000;
-    HashableDimensionKey whatKey;
-    getOverlayKey(uid1, "package", &whatKey);
-    HashableDimensionKey primaryKey;
-    getUidProcessKey(uid1, &primaryKey);
-
-    EXPECT_TRUE(containsLinkedStateValues(whatKey, primaryKey, mMetric2StateLinks, stateAtomId));
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/LogEntryMatcher_test.cpp b/cmds/statsd/tests/LogEntryMatcher_test.cpp
deleted file mode 100644
index 6264c07..0000000
--- a/cmds/statsd/tests/LogEntryMatcher_test.cpp
+++ /dev/null
@@ -1,809 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <gtest/gtest.h>
-#include <stdio.h>
-
-#include "annotations.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "matchers/matcher_util.h"
-#include "stats_event.h"
-#include "stats_log_util.h"
-#include "stats_util.h"
-#include "statsd_test_util.h"
-
-using namespace android::os::statsd;
-using std::unordered_map;
-using std::vector;
-
-const int32_t TAG_ID = 123;
-const int32_t TAG_ID_2 = 28;  // hardcoded tag of atom with uid field
-const int FIELD_ID_1 = 1;
-const int FIELD_ID_2 = 2;
-const int FIELD_ID_3 = 2;
-
-const int ATTRIBUTION_UID_FIELD_ID = 1;
-const int ATTRIBUTION_TAG_FIELD_ID = 2;
-
-
-#ifdef __ANDROID__
-
-namespace {
-
-void makeIntLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp,
-                     const int32_t value) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestamp);
-    AStatsEvent_writeInt32(statsEvent, value);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-void makeFloatLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp,
-                       const float floatValue) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestamp);
-    AStatsEvent_writeFloat(statsEvent, floatValue);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-void makeStringLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp,
-                        const string& name) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestamp);
-    AStatsEvent_writeString(statsEvent, name.c_str());
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-void makeIntWithBoolAnnotationLogEvent(LogEvent* logEvent, const int32_t atomId,
-                                       const int32_t field, const uint8_t annotationId,
-                                       const bool annotationValue) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_writeInt32(statsEvent, field);
-    AStatsEvent_addBoolAnnotation(statsEvent, annotationId, annotationValue);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-void makeAttributionLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp,
-                             const vector<int>& attributionUids,
-                             const vector<string>& attributionTags, const string& name) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestamp);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_writeString(statsEvent, name.c_str());
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-void makeBoolLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp,
-                      const bool bool1, const bool bool2) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestamp);
-
-    AStatsEvent_writeBool(statsEvent, bool1);
-    AStatsEvent_writeBool(statsEvent, bool2);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-}  // anonymous namespace
-
-TEST(AtomMatcherTest, TestSimpleMatcher) {
-    UidMap uidMap;
-
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeIntLogEvent(&event, TAG_ID, 0, 11);
-
-    // Test
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // Wrong tag id.
-    simpleMatcher->set_atom_id(TAG_ID + 1);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-}
-
-TEST(AtomMatcherTest, TestAttributionMatcher) {
-    UidMap uidMap;
-    std::vector<int> attributionUids = {1111, 2222, 3333};
-    std::vector<string> attributionTags = {"location1", "location2", "location3"};
-
-    // Set up the log event.
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeAttributionLogEvent(&event, TAG_ID, 0, attributionUids, attributionTags, "some value");
-
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-
-    // Match first node.
-    auto attributionMatcher = simpleMatcher->add_field_value_matcher();
-    attributionMatcher->set_field(FIELD_ID_1);
-    attributionMatcher->set_position(Position::FIRST);
-    attributionMatcher->mutable_matches_tuple()->add_field_value_matcher()->set_field(
-            ATTRIBUTION_TAG_FIELD_ID);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "tag");
-
-    auto fieldMatcher = simpleMatcher->add_field_value_matcher();
-    fieldMatcher->set_field(FIELD_ID_2);
-    fieldMatcher->set_eq_string("some value");
-
-    // Tag not matched.
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "location3");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "location1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // Match last node.
-    attributionMatcher->set_position(Position::LAST);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "location3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // Match any node.
-    attributionMatcher->set_position(Position::ANY);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "location1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "location2");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "location3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "location4");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // Attribution match but primitive field not match.
-    attributionMatcher->set_position(Position::ANY);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "location2");
-    fieldMatcher->set_eq_string("wrong value");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    fieldMatcher->set_eq_string("some value");
-
-    // Uid match.
-    attributionMatcher->set_position(Position::ANY);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_field(
-            ATTRIBUTION_UID_FIELD_ID);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg0");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    uidMap.updateMap(
-            1, {1111, 1111, 2222, 3333, 3333} /* uid list */, {1, 1, 2, 1, 2} /* version list */,
-            {android::String16("v1"), android::String16("v1"), android::String16("v2"),
-             android::String16("v1"), android::String16("v2")},
-            {android::String16("pkg0"), android::String16("pkg1"), android::String16("pkg1"),
-             android::String16("Pkg2"), android::String16("PkG3")} /* package name list */,
-            {android::String16(""), android::String16(""), android::String16(""),
-             android::String16(""), android::String16("")});
-
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg2");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg0");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    attributionMatcher->set_position(Position::FIRST);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg0");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg2");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    attributionMatcher->set_position(Position::LAST);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg0");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg2");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // Uid + tag.
-    attributionMatcher->set_position(Position::ANY);
-    attributionMatcher->mutable_matches_tuple()->add_field_value_matcher()->set_field(
-            ATTRIBUTION_TAG_FIELD_ID);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg0");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location2");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg2");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    attributionMatcher->set_position(Position::FIRST);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg0");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location2");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg2");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location3");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location3");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    attributionMatcher->set_position(Position::LAST);
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg0");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg1");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location2");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg2");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(0)->set_eq_string(
-            "pkg3");
-    attributionMatcher->mutable_matches_tuple()->mutable_field_value_matcher(1)->set_eq_string(
-            "location1");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-}
-
-TEST(AtomMatcherTest, TestUidFieldMatcher) {
-    UidMap uidMap;
-    uidMap.updateMap(
-            1, {1111, 1111, 2222, 3333, 3333} /* uid list */, {1, 1, 2, 1, 2} /* version list */,
-            {android::String16("v1"), android::String16("v1"), android::String16("v2"),
-             android::String16("v1"), android::String16("v2")},
-            {android::String16("pkg0"), android::String16("pkg1"), android::String16("pkg1"),
-             android::String16("Pkg2"), android::String16("PkG3")} /* package name list */,
-            {android::String16(""), android::String16(""), android::String16(""),
-             android::String16(""), android::String16("")});
-
-    // Set up matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-    simpleMatcher->add_field_value_matcher()->set_field(1);
-    simpleMatcher->mutable_field_value_matcher(0)->set_eq_string("pkg0");
-
-    // Make event without is_uid annotation.
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeIntLogEvent(&event1, TAG_ID, 0, 1111);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event1));
-
-    // Make event with is_uid annotation.
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeIntWithBoolAnnotationLogEvent(&event2, TAG_ID_2, 1111, ANNOTATION_ID_IS_UID, true);
-
-    // Event has is_uid annotation, so mapping from uid to package name occurs.
-    simpleMatcher->set_atom_id(TAG_ID_2);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event2));
-
-    // Event has is_uid annotation, but uid maps to different package name.
-    simpleMatcher->mutable_field_value_matcher(0)->set_eq_string("Pkg2");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event2));
-}
-
-TEST(AtomMatcherTest, TestNeqAnyStringMatcher) {
-    UidMap uidMap;
-    uidMap.updateMap(
-            1, {1111, 1111, 2222, 3333, 3333} /* uid list */, {1, 1, 2, 1, 2} /* version list */,
-            {android::String16("v1"), android::String16("v1"), android::String16("v2"),
-             android::String16("v1"), android::String16("v2")},
-            {android::String16("pkg0"), android::String16("pkg1"), android::String16("pkg1"),
-             android::String16("Pkg2"), android::String16("PkG3")} /* package name list */,
-            {android::String16(""), android::String16(""), android::String16(""),
-             android::String16(""), android::String16("")});
-
-    std::vector<int> attributionUids = {1111, 2222, 3333, 1066};
-    std::vector<string> attributionTags = {"location1", "location2", "location3", "location3"};
-
-    // Set up the event
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeAttributionLogEvent(&event, TAG_ID, 0, attributionUids, attributionTags, "some value");
-
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-
-    // Match first node.
-    auto attributionMatcher = simpleMatcher->add_field_value_matcher();
-    attributionMatcher->set_field(FIELD_ID_1);
-    attributionMatcher->set_position(Position::FIRST);
-    attributionMatcher->mutable_matches_tuple()->add_field_value_matcher()->set_field(
-            ATTRIBUTION_UID_FIELD_ID);
-    auto neqStringList = attributionMatcher->mutable_matches_tuple()
-                                 ->mutable_field_value_matcher(0)
-                                 ->mutable_neq_any_string();
-    neqStringList->add_str_value("pkg2");
-    neqStringList->add_str_value("pkg3");
-
-    auto fieldMatcher = simpleMatcher->add_field_value_matcher();
-    fieldMatcher->set_field(FIELD_ID_2);
-    fieldMatcher->set_eq_string("some value");
-
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    neqStringList->Clear();
-    neqStringList->add_str_value("pkg1");
-    neqStringList->add_str_value("pkg3");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    attributionMatcher->set_position(Position::ANY);
-    neqStringList->Clear();
-    neqStringList->add_str_value("maps.com");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    neqStringList->Clear();
-    neqStringList->add_str_value("PkG3");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    attributionMatcher->set_position(Position::LAST);
-    neqStringList->Clear();
-    neqStringList->add_str_value("AID_STATSD");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-}
-
-TEST(AtomMatcherTest, TestEqAnyStringMatcher) {
-    UidMap uidMap;
-    uidMap.updateMap(
-            1, {1111, 1111, 2222, 3333, 3333} /* uid list */, {1, 1, 2, 1, 2} /* version list */,
-            {android::String16("v1"), android::String16("v1"), android::String16("v2"),
-             android::String16("v1"), android::String16("v2")},
-            {android::String16("pkg0"), android::String16("pkg1"), android::String16("pkg1"),
-             android::String16("Pkg2"), android::String16("PkG3")} /* package name list */,
-            {android::String16(""), android::String16(""), android::String16(""),
-             android::String16(""), android::String16("")});
-
-    std::vector<int> attributionUids = {1067, 2222, 3333, 1066};
-    std::vector<string> attributionTags = {"location1", "location2", "location3", "location3"};
-
-    // Set up the event
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeAttributionLogEvent(&event, TAG_ID, 0, attributionUids, attributionTags, "some value");
-
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-
-    // Match first node.
-    auto attributionMatcher = simpleMatcher->add_field_value_matcher();
-    attributionMatcher->set_field(FIELD_ID_1);
-    attributionMatcher->set_position(Position::FIRST);
-    attributionMatcher->mutable_matches_tuple()->add_field_value_matcher()->set_field(
-            ATTRIBUTION_UID_FIELD_ID);
-    auto eqStringList = attributionMatcher->mutable_matches_tuple()
-                                ->mutable_field_value_matcher(0)
-                                ->mutable_eq_any_string();
-    eqStringList->add_str_value("AID_ROOT");
-    eqStringList->add_str_value("AID_INCIDENTD");
-
-    auto fieldMatcher = simpleMatcher->add_field_value_matcher();
-    fieldMatcher->set_field(FIELD_ID_2);
-    fieldMatcher->set_eq_string("some value");
-
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    attributionMatcher->set_position(Position::ANY);
-    eqStringList->Clear();
-    eqStringList->add_str_value("AID_STATSD");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    eqStringList->Clear();
-    eqStringList->add_str_value("pkg1");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    auto normalStringField = fieldMatcher->mutable_eq_any_string();
-    normalStringField->add_str_value("some value123");
-    normalStringField->add_str_value("some value");
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    normalStringField->Clear();
-    normalStringField->add_str_value("AID_STATSD");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    eqStringList->Clear();
-    eqStringList->add_str_value("maps.com");
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-}
-
-TEST(AtomMatcherTest, TestBoolMatcher) {
-    UidMap uidMap;
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-    auto keyValue1 = simpleMatcher->add_field_value_matcher();
-    keyValue1->set_field(FIELD_ID_1);
-    auto keyValue2 = simpleMatcher->add_field_value_matcher();
-    keyValue2->set_field(FIELD_ID_2);
-
-    // Set up the event
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeBoolLogEvent(&event, TAG_ID, 0, true, false);
-
-    // Test
-    keyValue1->set_eq_bool(true);
-    keyValue2->set_eq_bool(false);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    keyValue1->set_eq_bool(false);
-    keyValue2->set_eq_bool(false);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    keyValue1->set_eq_bool(false);
-    keyValue2->set_eq_bool(true);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    keyValue1->set_eq_bool(true);
-    keyValue2->set_eq_bool(true);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-}
-
-TEST(AtomMatcherTest, TestStringMatcher) {
-    UidMap uidMap;
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-    auto keyValue = simpleMatcher->add_field_value_matcher();
-    keyValue->set_field(FIELD_ID_1);
-    keyValue->set_eq_string("some value");
-
-    // Set up the event
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeStringLogEvent(&event, TAG_ID, 0, "some value");
-
-    // Test
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-}
-
-TEST(AtomMatcherTest, TestMultiFieldsMatcher) {
-    UidMap uidMap;
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-    auto keyValue1 = simpleMatcher->add_field_value_matcher();
-    keyValue1->set_field(FIELD_ID_1);
-    auto keyValue2 = simpleMatcher->add_field_value_matcher();
-    keyValue2->set_field(FIELD_ID_2);
-
-    // Set up the event
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    CreateTwoValueLogEvent(&event, TAG_ID, 0, 2, 3);
-
-    // Test
-    keyValue1->set_eq_int(2);
-    keyValue2->set_eq_int(3);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    keyValue1->set_eq_int(2);
-    keyValue2->set_eq_int(4);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    keyValue1->set_eq_int(4);
-    keyValue2->set_eq_int(3);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-}
-
-TEST(AtomMatcherTest, TestIntComparisonMatcher) {
-    UidMap uidMap;
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-
-    simpleMatcher->set_atom_id(TAG_ID);
-    auto keyValue = simpleMatcher->add_field_value_matcher();
-    keyValue->set_field(FIELD_ID_1);
-
-    // Set up the event
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    makeIntLogEvent(&event, TAG_ID, 0, 11);
-
-    // Test
-
-    // eq_int
-    keyValue->set_eq_int(10);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_eq_int(11);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_eq_int(12);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // lt_int
-    keyValue->set_lt_int(10);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_lt_int(11);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_lt_int(12);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // lte_int
-    keyValue->set_lte_int(10);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_lte_int(11);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_lte_int(12);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // gt_int
-    keyValue->set_gt_int(10);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_gt_int(11);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_gt_int(12);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-
-    // gte_int
-    keyValue->set_gte_int(10);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_gte_int(11);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event));
-    keyValue->set_gte_int(12);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event));
-}
-
-TEST(AtomMatcherTest, TestFloatComparisonMatcher) {
-    UidMap uidMap;
-    // Set up the matcher
-    AtomMatcher matcher;
-    auto simpleMatcher = matcher.mutable_simple_atom_matcher();
-    simpleMatcher->set_atom_id(TAG_ID);
-
-    auto keyValue = simpleMatcher->add_field_value_matcher();
-    keyValue->set_field(FIELD_ID_1);
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeFloatLogEvent(&event1, TAG_ID, 0, 10.1f);
-    keyValue->set_lt_float(10.0);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event1));
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeFloatLogEvent(&event2, TAG_ID, 0, 9.9f);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event2));
-
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    makeFloatLogEvent(&event3, TAG_ID, 0, 10.1f);
-    keyValue->set_gt_float(10.0);
-    EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event3));
-
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    makeFloatLogEvent(&event4, TAG_ID, 0, 9.9f);
-    EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event4));
-}
-
-// Helper for the composite matchers.
-void addSimpleMatcher(SimpleAtomMatcher* simpleMatcher, int tag, int key, int val) {
-    simpleMatcher->set_atom_id(tag);
-    auto keyValue = simpleMatcher->add_field_value_matcher();
-    keyValue->set_field(key);
-    keyValue->set_eq_int(val);
-}
-
-TEST(AtomMatcherTest, TestAndMatcher) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::AND;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-    children.push_back(2);
-
-    vector<MatchingState> matcherResults;
-    matcherResults.push_back(MatchingState::kMatched);
-    matcherResults.push_back(MatchingState::kNotMatched);
-    matcherResults.push_back(MatchingState::kMatched);
-
-    EXPECT_FALSE(combinationMatch(children, operation, matcherResults));
-
-    matcherResults.clear();
-    matcherResults.push_back(MatchingState::kMatched);
-    matcherResults.push_back(MatchingState::kMatched);
-    matcherResults.push_back(MatchingState::kMatched);
-
-    EXPECT_TRUE(combinationMatch(children, operation, matcherResults));
-}
-
-TEST(AtomMatcherTest, TestOrMatcher) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::OR;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-    children.push_back(2);
-
-    vector<MatchingState> matcherResults;
-    matcherResults.push_back(MatchingState::kMatched);
-    matcherResults.push_back(MatchingState::kNotMatched);
-    matcherResults.push_back(MatchingState::kMatched);
-
-    EXPECT_TRUE(combinationMatch(children, operation, matcherResults));
-
-    matcherResults.clear();
-    matcherResults.push_back(MatchingState::kNotMatched);
-    matcherResults.push_back(MatchingState::kNotMatched);
-    matcherResults.push_back(MatchingState::kNotMatched);
-
-    EXPECT_FALSE(combinationMatch(children, operation, matcherResults));
-}
-
-TEST(AtomMatcherTest, TestNotMatcher) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::NOT;
-
-    vector<int> children;
-    children.push_back(0);
-
-    vector<MatchingState> matcherResults;
-    matcherResults.push_back(MatchingState::kMatched);
-
-    EXPECT_FALSE(combinationMatch(children, operation, matcherResults));
-
-    matcherResults.clear();
-    matcherResults.push_back(MatchingState::kNotMatched);
-    EXPECT_TRUE(combinationMatch(children, operation, matcherResults));
-}
-
-TEST(AtomMatcherTest, TestNandMatcher) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::NAND;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-
-    vector<MatchingState> matcherResults;
-    matcherResults.push_back(MatchingState::kMatched);
-    matcherResults.push_back(MatchingState::kNotMatched);
-
-    EXPECT_TRUE(combinationMatch(children, operation, matcherResults));
-
-    matcherResults.clear();
-    matcherResults.push_back(MatchingState::kNotMatched);
-    matcherResults.push_back(MatchingState::kNotMatched);
-    EXPECT_TRUE(combinationMatch(children, operation, matcherResults));
-
-    matcherResults.clear();
-    matcherResults.push_back(MatchingState::kMatched);
-    matcherResults.push_back(MatchingState::kMatched);
-    EXPECT_FALSE(combinationMatch(children, operation, matcherResults));
-}
-
-TEST(AtomMatcherTest, TestNorMatcher) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::NOR;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-
-    vector<MatchingState> matcherResults;
-    matcherResults.push_back(MatchingState::kMatched);
-    matcherResults.push_back(MatchingState::kNotMatched);
-
-    EXPECT_FALSE(combinationMatch(children, operation, matcherResults));
-
-    matcherResults.clear();
-    matcherResults.push_back(MatchingState::kNotMatched);
-    matcherResults.push_back(MatchingState::kNotMatched);
-    EXPECT_TRUE(combinationMatch(children, operation, matcherResults));
-
-    matcherResults.clear();
-    matcherResults.push_back(MatchingState::kMatched);
-    matcherResults.push_back(MatchingState::kMatched);
-    EXPECT_FALSE(combinationMatch(children, operation, matcherResults));
-}
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/LogEvent_test.cpp b/cmds/statsd/tests/LogEvent_test.cpp
deleted file mode 100644
index 5c170c0..0000000
--- a/cmds/statsd/tests/LogEvent_test.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/logd/LogEvent.h"
-
-#include <gtest/gtest.h>
-
-#include "frameworks/base/cmds/statsd/src/atoms.pb.h"
-#include "frameworks/base/core/proto/android/stats/launcher/launcher.pb.h"
-#include "log/log_event_list.h"
-#include "stats_event.h"
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::string;
-using std::vector;
-using util::ProtoOutputStream;
-using util::ProtoReader;
-
-namespace {
-
-Field getField(int32_t tag, const vector<int32_t>& pos, int32_t depth, const vector<bool>& last) {
-    Field f(tag, (int32_t*)pos.data(), depth);
-
-    // For loop starts at 1 because the last field at depth 0 is not decorated.
-    for (int i = 1; i < depth; i++) {
-        if (last[i]) f.decorateLastPos(i);
-    }
-
-    return f;
-}
-
-void createIntWithBoolAnnotationLogEvent(LogEvent* logEvent, uint8_t annotationId,
-                                         bool annotationValue) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, /*atomId=*/100);
-    AStatsEvent_writeInt32(statsEvent, 10);
-    AStatsEvent_addBoolAnnotation(statsEvent, annotationId, annotationValue);
-    AStatsEvent_build(statsEvent);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(statsEvent, &size);
-    EXPECT_TRUE(logEvent->parseBuffer(buf, size));
-
-    AStatsEvent_release(statsEvent);
-}
-
-void createIntWithIntAnnotationLogEvent(LogEvent* logEvent, uint8_t annotationId,
-                                        int annotationValue) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, /*atomId=*/100);
-    AStatsEvent_writeInt32(statsEvent, 10);
-    AStatsEvent_addInt32Annotation(statsEvent, annotationId, annotationValue);
-    AStatsEvent_build(statsEvent);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(statsEvent, &size);
-    EXPECT_TRUE(logEvent->parseBuffer(buf, size));
-
-    AStatsEvent_release(statsEvent);
-}
-
-}  // anonymous namespace
-
-TEST(LogEventTest, TestPrimitiveParsing) {
-    AStatsEvent* event = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(event, 100);
-    AStatsEvent_writeInt32(event, 10);
-    AStatsEvent_writeInt64(event, 0x123456789);
-    AStatsEvent_writeFloat(event, 2.0);
-    AStatsEvent_writeBool(event, true);
-    AStatsEvent_build(event);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(event, &size);
-
-    LogEvent logEvent(/*uid=*/1000, /*pid=*/1001);
-    EXPECT_TRUE(logEvent.parseBuffer(buf, size));
-
-    EXPECT_EQ(100, logEvent.GetTagId());
-    EXPECT_EQ(1000, logEvent.GetUid());
-    EXPECT_EQ(1001, logEvent.GetPid());
-    EXPECT_FALSE(logEvent.hasAttributionChain());
-
-    const vector<FieldValue>& values = logEvent.getValues();
-    ASSERT_EQ(4, values.size());
-
-    const FieldValue& int32Item = values[0];
-    Field expectedField = getField(100, {1, 1, 1}, 0, {false, false, false});
-    EXPECT_EQ(expectedField, int32Item.mField);
-    EXPECT_EQ(Type::INT, int32Item.mValue.getType());
-    EXPECT_EQ(10, int32Item.mValue.int_value);
-
-    const FieldValue& int64Item = values[1];
-    expectedField = getField(100, {2, 1, 1}, 0, {false, false, false});
-    EXPECT_EQ(expectedField, int64Item.mField);
-    EXPECT_EQ(Type::LONG, int64Item.mValue.getType());
-    EXPECT_EQ(0x123456789, int64Item.mValue.long_value);
-
-    const FieldValue& floatItem = values[2];
-    expectedField = getField(100, {3, 1, 1}, 0, {false, false, false});
-    EXPECT_EQ(expectedField, floatItem.mField);
-    EXPECT_EQ(Type::FLOAT, floatItem.mValue.getType());
-    EXPECT_EQ(2.0, floatItem.mValue.float_value);
-
-    const FieldValue& boolItem = values[3];
-    expectedField = getField(100, {4, 1, 1}, 0, {true, false, false});
-    EXPECT_EQ(expectedField, boolItem.mField);
-    EXPECT_EQ(Type::INT, boolItem.mValue.getType());  // FieldValue does not support boolean type
-    EXPECT_EQ(1, boolItem.mValue.int_value);
-
-    AStatsEvent_release(event);
-}
-
-TEST(LogEventTest, TestStringAndByteArrayParsing) {
-    AStatsEvent* event = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(event, 100);
-    string str = "test";
-    AStatsEvent_writeString(event, str.c_str());
-    AStatsEvent_writeByteArray(event, (uint8_t*)str.c_str(), str.length());
-    AStatsEvent_build(event);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(event, &size);
-
-    LogEvent logEvent(/*uid=*/1000, /*pid=*/1001);
-    EXPECT_TRUE(logEvent.parseBuffer(buf, size));
-
-    EXPECT_EQ(100, logEvent.GetTagId());
-    EXPECT_EQ(1000, logEvent.GetUid());
-    EXPECT_EQ(1001, logEvent.GetPid());
-    EXPECT_FALSE(logEvent.hasAttributionChain());
-
-    const vector<FieldValue>& values = logEvent.getValues();
-    ASSERT_EQ(2, values.size());
-
-    const FieldValue& stringItem = values[0];
-    Field expectedField = getField(100, {1, 1, 1}, 0, {false, false, false});
-    EXPECT_EQ(expectedField, stringItem.mField);
-    EXPECT_EQ(Type::STRING, stringItem.mValue.getType());
-    EXPECT_EQ(str, stringItem.mValue.str_value);
-
-    const FieldValue& storageItem = values[1];
-    expectedField = getField(100, {2, 1, 1}, 0, {true, false, false});
-    EXPECT_EQ(expectedField, storageItem.mField);
-    EXPECT_EQ(Type::STORAGE, storageItem.mValue.getType());
-    vector<uint8_t> expectedValue = {'t', 'e', 's', 't'};
-    EXPECT_EQ(expectedValue, storageItem.mValue.storage_value);
-
-    AStatsEvent_release(event);
-}
-
-TEST(LogEventTest, TestEmptyString) {
-    AStatsEvent* event = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(event, 100);
-    string empty = "";
-    AStatsEvent_writeString(event, empty.c_str());
-    AStatsEvent_build(event);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(event, &size);
-
-    LogEvent logEvent(/*uid=*/1000, /*pid=*/1001);
-    EXPECT_TRUE(logEvent.parseBuffer(buf, size));
-
-    EXPECT_EQ(100, logEvent.GetTagId());
-    EXPECT_EQ(1000, logEvent.GetUid());
-    EXPECT_EQ(1001, logEvent.GetPid());
-    EXPECT_FALSE(logEvent.hasAttributionChain());
-
-    const vector<FieldValue>& values = logEvent.getValues();
-    ASSERT_EQ(1, values.size());
-
-    const FieldValue& item = values[0];
-    Field expectedField = getField(100, {1, 1, 1}, 0, {true, false, false});
-    EXPECT_EQ(expectedField, item.mField);
-    EXPECT_EQ(Type::STRING, item.mValue.getType());
-    EXPECT_EQ(empty, item.mValue.str_value);
-
-    AStatsEvent_release(event);
-}
-
-TEST(LogEventTest, TestByteArrayWithNullCharacter) {
-    AStatsEvent* event = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(event, 100);
-    uint8_t message[] = {'\t', 'e', '\0', 's', 't'};
-    AStatsEvent_writeByteArray(event, message, 5);
-    AStatsEvent_build(event);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(event, &size);
-
-    LogEvent logEvent(/*uid=*/1000, /*pid=*/1001);
-    EXPECT_TRUE(logEvent.parseBuffer(buf, size));
-
-    EXPECT_EQ(100, logEvent.GetTagId());
-    EXPECT_EQ(1000, logEvent.GetUid());
-    EXPECT_EQ(1001, logEvent.GetPid());
-
-    const vector<FieldValue>& values = logEvent.getValues();
-    ASSERT_EQ(1, values.size());
-
-    const FieldValue& item = values[0];
-    Field expectedField = getField(100, {1, 1, 1}, 0, {true, false, false});
-    EXPECT_EQ(expectedField, item.mField);
-    EXPECT_EQ(Type::STORAGE, item.mValue.getType());
-    vector<uint8_t> expectedValue(message, message + 5);
-    EXPECT_EQ(expectedValue, item.mValue.storage_value);
-
-    AStatsEvent_release(event);
-}
-
-TEST(LogEventTest, TestAttributionChain) {
-    AStatsEvent* event = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(event, 100);
-
-    string tag1 = "tag1";
-    string tag2 = "tag2";
-
-    uint32_t uids[] = {1001, 1002};
-    const char* tags[] = {tag1.c_str(), tag2.c_str()};
-
-    AStatsEvent_writeAttributionChain(event, uids, tags, 2);
-    AStatsEvent_build(event);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(event, &size);
-
-    LogEvent logEvent(/*uid=*/1000, /*pid=*/1001);
-    EXPECT_TRUE(logEvent.parseBuffer(buf, size));
-
-    EXPECT_EQ(100, logEvent.GetTagId());
-    EXPECT_EQ(1000, logEvent.GetUid());
-    EXPECT_EQ(1001, logEvent.GetPid());
-
-    const vector<FieldValue>& values = logEvent.getValues();
-    ASSERT_EQ(4, values.size());  // 2 per attribution node
-
-    std::pair<int, int> attrIndexRange;
-    EXPECT_TRUE(logEvent.hasAttributionChain(&attrIndexRange));
-    EXPECT_EQ(0, attrIndexRange.first);
-    EXPECT_EQ(3, attrIndexRange.second);
-
-    // Check first attribution node
-    const FieldValue& uid1Item = values[0];
-    Field expectedField = getField(100, {1, 1, 1}, 2, {true, false, false});
-    EXPECT_EQ(expectedField, uid1Item.mField);
-    EXPECT_EQ(Type::INT, uid1Item.mValue.getType());
-    EXPECT_EQ(1001, uid1Item.mValue.int_value);
-
-    const FieldValue& tag1Item = values[1];
-    expectedField = getField(100, {1, 1, 2}, 2, {true, false, true});
-    EXPECT_EQ(expectedField, tag1Item.mField);
-    EXPECT_EQ(Type::STRING, tag1Item.mValue.getType());
-    EXPECT_EQ(tag1, tag1Item.mValue.str_value);
-
-    // Check second attribution nodes
-    const FieldValue& uid2Item = values[2];
-    expectedField = getField(100, {1, 2, 1}, 2, {true, true, false});
-    EXPECT_EQ(expectedField, uid2Item.mField);
-    EXPECT_EQ(Type::INT, uid2Item.mValue.getType());
-    EXPECT_EQ(1002, uid2Item.mValue.int_value);
-
-    const FieldValue& tag2Item = values[3];
-    expectedField = getField(100, {1, 2, 2}, 2, {true, true, true});
-    EXPECT_EQ(expectedField, tag2Item.mField);
-    EXPECT_EQ(Type::STRING, tag2Item.mValue.getType());
-    EXPECT_EQ(tag2, tag2Item.mValue.str_value);
-
-    AStatsEvent_release(event);
-}
-
-TEST(LogEventTest, TestAnnotationIdIsUid) {
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    createIntWithBoolAnnotationLogEvent(&event, ANNOTATION_ID_IS_UID, true);
-
-    const vector<FieldValue>& values = event.getValues();
-    ASSERT_EQ(values.size(), 1);
-    EXPECT_EQ(event.getUidFieldIndex(), 0);
-}
-
-TEST(LogEventTest, TestAnnotationIdStateNested) {
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    createIntWithBoolAnnotationLogEvent(&event, ANNOTATION_ID_STATE_NESTED, true);
-
-    const vector<FieldValue>& values = event.getValues();
-    ASSERT_EQ(values.size(), 1);
-    EXPECT_TRUE(values[0].mAnnotations.isNested());
-}
-
-TEST(LogEventTest, TestPrimaryFieldAnnotation) {
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    createIntWithBoolAnnotationLogEvent(&event, ANNOTATION_ID_PRIMARY_FIELD, true);
-
-    const vector<FieldValue>& values = event.getValues();
-    ASSERT_EQ(values.size(), 1);
-    EXPECT_TRUE(values[0].mAnnotations.isPrimaryField());
-}
-
-TEST(LogEventTest, TestExclusiveStateAnnotation) {
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    createIntWithBoolAnnotationLogEvent(&event, ANNOTATION_ID_EXCLUSIVE_STATE, true);
-
-    const vector<FieldValue>& values = event.getValues();
-    ASSERT_EQ(values.size(), 1);
-    EXPECT_TRUE(values[0].mAnnotations.isExclusiveState());
-}
-
-TEST(LogEventTest, TestPrimaryFieldFirstUidAnnotation) {
-    // Event has 10 ints and then an attribution chain
-    int numInts = 10;
-    int firstUidInChainIndex = numInts;
-    string tag1 = "tag1";
-    string tag2 = "tag2";
-    uint32_t uids[] = {1001, 1002};
-    const char* tags[] = {tag1.c_str(), tag2.c_str()};
-
-    // Construct AStatsEvent
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, 100);
-    for (int i = 0; i < numInts; i++) {
-        AStatsEvent_writeInt32(statsEvent, 10);
-    }
-    AStatsEvent_writeAttributionChain(statsEvent, uids, tags, 2);
-    AStatsEvent_addBoolAnnotation(statsEvent, ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID, true);
-    AStatsEvent_build(statsEvent);
-
-    // Construct LogEvent
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(statsEvent, &size);
-    LogEvent logEvent(/*uid=*/0, /*pid=*/0);
-    EXPECT_TRUE(logEvent.parseBuffer(buf, size));
-    AStatsEvent_release(statsEvent);
-
-    // Check annotation
-    const vector<FieldValue>& values = logEvent.getValues();
-    ASSERT_EQ(values.size(), numInts + 4);
-    EXPECT_TRUE(values[firstUidInChainIndex].mAnnotations.isPrimaryField());
-}
-
-TEST(LogEventTest, TestResetStateAnnotation) {
-    int32_t resetState = 10;
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-    createIntWithIntAnnotationLogEvent(&event, ANNOTATION_ID_TRIGGER_STATE_RESET, resetState);
-
-    const vector<FieldValue>& values = event.getValues();
-    ASSERT_EQ(values.size(), 1);
-    EXPECT_EQ(event.getResetState(), resetState);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/LogReader_test.cpp b/cmds/statsd/tests/LogReader_test.cpp
deleted file mode 100644
index 7ce1d6a..0000000
--- a/cmds/statsd/tests/LogReader_test.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <gtest/gtest.h>
-
-#include <stdio.h>
-
-TEST(LogReaderTest, TestNothingAtAll) {
-    printf("yay!");
-}
diff --git a/cmds/statsd/tests/MetricsManager_test.cpp b/cmds/statsd/tests/MetricsManager_test.cpp
deleted file mode 100644
index 6259757..0000000
--- a/cmds/statsd/tests/MetricsManager_test.cpp
+++ /dev/null
@@ -1,799 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <gtest/gtest.h>
-#include <private/android_filesystem_config.h>
-#include <stdio.h>
-
-#include <set>
-#include <unordered_map>
-#include <vector>
-
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "metrics/metrics_test_helper.h"
-#include "src/condition/ConditionTracker.h"
-#include "src/matchers/LogMatchingTracker.h"
-#include "src/metrics/CountMetricProducer.h"
-#include "src/metrics/GaugeMetricProducer.h"
-#include "src/metrics/MetricProducer.h"
-#include "src/metrics/ValueMetricProducer.h"
-#include "src/metrics/metrics_manager_util.h"
-#include "src/state/StateManager.h"
-#include "statsd_test_util.h"
-
-using namespace testing;
-using android::sp;
-using android::os::statsd::Predicate;
-using std::map;
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-namespace {
-const ConfigKey kConfigKey(0, 12345);
-const long kAlertId = 3;
-
-const long timeBaseSec = 1000;
-
-StatsdConfig buildGoodConfig() {
-    StatsdConfig config;
-    config.set_id(12345);
-
-    AtomMatcher* eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_IS_ON"));
-
-    SimpleAtomMatcher* simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(2 /*SCREEN_STATE_CHANGE*/);
-    simpleAtomMatcher->add_field_value_matcher()->set_field(
-            1 /*SCREEN_STATE_CHANGE__DISPLAY_STATE*/);
-    simpleAtomMatcher->mutable_field_value_matcher(0)->set_eq_int(
-            2 /*SCREEN_STATE_CHANGE__DISPLAY_STATE__STATE_ON*/);
-
-    eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_IS_OFF"));
-
-    simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(2 /*SCREEN_STATE_CHANGE*/);
-    simpleAtomMatcher->add_field_value_matcher()->set_field(
-            1 /*SCREEN_STATE_CHANGE__DISPLAY_STATE*/);
-    simpleAtomMatcher->mutable_field_value_matcher(0)->set_eq_int(
-            1 /*SCREEN_STATE_CHANGE__DISPLAY_STATE__STATE_OFF*/);
-
-    eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_ON_OR_OFF"));
-
-    AtomMatcher_Combination* combination = eventMatcher->mutable_combination();
-    combination->set_operation(LogicalOperation::OR);
-    combination->add_matcher(StringToId("SCREEN_IS_ON"));
-    combination->add_matcher(StringToId("SCREEN_IS_OFF"));
-
-    CountMetric* metric = config.add_count_metric();
-    metric->set_id(3);
-    metric->set_what(StringToId("SCREEN_IS_ON"));
-    metric->set_bucket(ONE_MINUTE);
-    metric->mutable_dimensions_in_what()->set_field(2 /*SCREEN_STATE_CHANGE*/);
-    metric->mutable_dimensions_in_what()->add_child()->set_field(1);
-
-    config.add_no_report_metric(3);
-
-    auto alert = config.add_alert();
-    alert->set_id(kAlertId);
-    alert->set_metric_id(3);
-    alert->set_num_buckets(10);
-    alert->set_refractory_period_secs(100);
-    alert->set_trigger_if_sum_gt(100);
-    return config;
-}
-
-StatsdConfig buildCircleMatchers() {
-    StatsdConfig config;
-    config.set_id(12345);
-
-    AtomMatcher* eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_IS_ON"));
-
-    SimpleAtomMatcher* simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(2 /*SCREEN_STATE_CHANGE*/);
-    simpleAtomMatcher->add_field_value_matcher()->set_field(
-            1 /*SCREEN_STATE_CHANGE__DISPLAY_STATE*/);
-    simpleAtomMatcher->mutable_field_value_matcher(0)->set_eq_int(
-            2 /*SCREEN_STATE_CHANGE__DISPLAY_STATE__STATE_ON*/);
-
-    eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_ON_OR_OFF"));
-
-    AtomMatcher_Combination* combination = eventMatcher->mutable_combination();
-    combination->set_operation(LogicalOperation::OR);
-    combination->add_matcher(StringToId("SCREEN_IS_ON"));
-    // Circle dependency
-    combination->add_matcher(StringToId("SCREEN_ON_OR_OFF"));
-
-    return config;
-}
-
-StatsdConfig buildAlertWithUnknownMetric() {
-    StatsdConfig config;
-    config.set_id(12345);
-
-    AtomMatcher* eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_IS_ON"));
-
-    CountMetric* metric = config.add_count_metric();
-    metric->set_id(3);
-    metric->set_what(StringToId("SCREEN_IS_ON"));
-    metric->set_bucket(ONE_MINUTE);
-    metric->mutable_dimensions_in_what()->set_field(2 /*SCREEN_STATE_CHANGE*/);
-    metric->mutable_dimensions_in_what()->add_child()->set_field(1);
-
-    auto alert = config.add_alert();
-    alert->set_id(3);
-    alert->set_metric_id(2);
-    alert->set_num_buckets(10);
-    alert->set_refractory_period_secs(100);
-    alert->set_trigger_if_sum_gt(100);
-    return config;
-}
-
-StatsdConfig buildMissingMatchers() {
-    StatsdConfig config;
-    config.set_id(12345);
-
-    AtomMatcher* eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_IS_ON"));
-
-    SimpleAtomMatcher* simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(2 /*SCREEN_STATE_CHANGE*/);
-    simpleAtomMatcher->add_field_value_matcher()->set_field(
-            1 /*SCREEN_STATE_CHANGE__DISPLAY_STATE*/);
-    simpleAtomMatcher->mutable_field_value_matcher(0)->set_eq_int(
-            2 /*SCREEN_STATE_CHANGE__DISPLAY_STATE__STATE_ON*/);
-
-    eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_ON_OR_OFF"));
-
-    AtomMatcher_Combination* combination = eventMatcher->mutable_combination();
-    combination->set_operation(LogicalOperation::OR);
-    combination->add_matcher(StringToId("SCREEN_IS_ON"));
-    // undefined matcher
-    combination->add_matcher(StringToId("ABC"));
-
-    return config;
-}
-
-StatsdConfig buildMissingPredicate() {
-    StatsdConfig config;
-    config.set_id(12345);
-
-    CountMetric* metric = config.add_count_metric();
-    metric->set_id(3);
-    metric->set_what(StringToId("SCREEN_EVENT"));
-    metric->set_bucket(ONE_MINUTE);
-    metric->set_condition(StringToId("SOME_CONDITION"));
-
-    AtomMatcher* eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_EVENT"));
-
-    SimpleAtomMatcher* simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(2);
-
-    return config;
-}
-
-StatsdConfig buildDimensionMetricsWithMultiTags() {
-    StatsdConfig config;
-    config.set_id(12345);
-
-    AtomMatcher* eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("BATTERY_VERY_LOW"));
-    SimpleAtomMatcher* simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(2);
-
-    eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("BATTERY_VERY_VERY_LOW"));
-    simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(3);
-
-    eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("BATTERY_LOW"));
-
-    AtomMatcher_Combination* combination = eventMatcher->mutable_combination();
-    combination->set_operation(LogicalOperation::OR);
-    combination->add_matcher(StringToId("BATTERY_VERY_LOW"));
-    combination->add_matcher(StringToId("BATTERY_VERY_VERY_LOW"));
-
-    // Count process state changes, slice by uid, while SCREEN_IS_OFF
-    CountMetric* metric = config.add_count_metric();
-    metric->set_id(3);
-    metric->set_what(StringToId("BATTERY_LOW"));
-    metric->set_bucket(ONE_MINUTE);
-    // This case is interesting. We want to dimension across two atoms.
-    metric->mutable_dimensions_in_what()->add_child()->set_field(1);
-
-    auto alert = config.add_alert();
-    alert->set_id(kAlertId);
-    alert->set_metric_id(3);
-    alert->set_num_buckets(10);
-    alert->set_refractory_period_secs(100);
-    alert->set_trigger_if_sum_gt(100);
-    return config;
-}
-
-StatsdConfig buildCirclePredicates() {
-    StatsdConfig config;
-    config.set_id(12345);
-
-    AtomMatcher* eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_IS_ON"));
-
-    SimpleAtomMatcher* simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(2 /*SCREEN_STATE_CHANGE*/);
-    simpleAtomMatcher->add_field_value_matcher()->set_field(
-            1 /*SCREEN_STATE_CHANGE__DISPLAY_STATE*/);
-    simpleAtomMatcher->mutable_field_value_matcher(0)->set_eq_int(
-            2 /*SCREEN_STATE_CHANGE__DISPLAY_STATE__STATE_ON*/);
-
-    eventMatcher = config.add_atom_matcher();
-    eventMatcher->set_id(StringToId("SCREEN_IS_OFF"));
-
-    simpleAtomMatcher = eventMatcher->mutable_simple_atom_matcher();
-    simpleAtomMatcher->set_atom_id(2 /*SCREEN_STATE_CHANGE*/);
-    simpleAtomMatcher->add_field_value_matcher()->set_field(
-            1 /*SCREEN_STATE_CHANGE__DISPLAY_STATE*/);
-    simpleAtomMatcher->mutable_field_value_matcher(0)->set_eq_int(
-            1 /*SCREEN_STATE_CHANGE__DISPLAY_STATE__STATE_OFF*/);
-
-    auto condition = config.add_predicate();
-    condition->set_id(StringToId("SCREEN_IS_ON"));
-    SimplePredicate* simplePredicate = condition->mutable_simple_predicate();
-    simplePredicate->set_start(StringToId("SCREEN_IS_ON"));
-    simplePredicate->set_stop(StringToId("SCREEN_IS_OFF"));
-
-    condition = config.add_predicate();
-    condition->set_id(StringToId("SCREEN_IS_EITHER_ON_OFF"));
-
-    Predicate_Combination* combination = condition->mutable_combination();
-    combination->set_operation(LogicalOperation::OR);
-    combination->add_predicate(StringToId("SCREEN_IS_ON"));
-    combination->add_predicate(StringToId("SCREEN_IS_EITHER_ON_OFF"));
-
-    return config;
-}
-
-StatsdConfig buildConfigWithDifferentPredicates() {
-    StatsdConfig config;
-    config.set_id(12345);
-
-    auto pulledAtomMatcher =
-            CreateSimpleAtomMatcher("SUBSYSTEM_SLEEP", util::SUBSYSTEM_SLEEP_STATE);
-    *config.add_atom_matcher() = pulledAtomMatcher;
-    auto screenOnAtomMatcher = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = screenOnAtomMatcher;
-    auto screenOffAtomMatcher = CreateScreenTurnedOffAtomMatcher();
-    *config.add_atom_matcher() = screenOffAtomMatcher;
-    auto batteryNoneAtomMatcher = CreateBatteryStateNoneMatcher();
-    *config.add_atom_matcher() = batteryNoneAtomMatcher;
-    auto batteryUsbAtomMatcher = CreateBatteryStateUsbMatcher();
-    *config.add_atom_matcher() = batteryUsbAtomMatcher;
-
-    // Simple condition with InitialValue set to default (unknown).
-    auto screenOnUnknownPredicate = CreateScreenIsOnPredicate();
-    *config.add_predicate() = screenOnUnknownPredicate;
-
-    // Simple condition with InitialValue set to false.
-    auto screenOnFalsePredicate = config.add_predicate();
-    screenOnFalsePredicate->set_id(StringToId("ScreenIsOnInitialFalse"));
-    SimplePredicate* simpleScreenOnFalsePredicate =
-            screenOnFalsePredicate->mutable_simple_predicate();
-    simpleScreenOnFalsePredicate->set_start(screenOnAtomMatcher.id());
-    simpleScreenOnFalsePredicate->set_stop(screenOffAtomMatcher.id());
-    simpleScreenOnFalsePredicate->set_initial_value(SimplePredicate_InitialValue_FALSE);
-
-    // Simple condition with InitialValue set to false.
-    auto onBatteryFalsePredicate = config.add_predicate();
-    onBatteryFalsePredicate->set_id(StringToId("OnBatteryInitialFalse"));
-    SimplePredicate* simpleOnBatteryFalsePredicate =
-            onBatteryFalsePredicate->mutable_simple_predicate();
-    simpleOnBatteryFalsePredicate->set_start(batteryNoneAtomMatcher.id());
-    simpleOnBatteryFalsePredicate->set_stop(batteryUsbAtomMatcher.id());
-    simpleOnBatteryFalsePredicate->set_initial_value(SimplePredicate_InitialValue_FALSE);
-
-    // Combination condition with both simple condition InitialValues set to false.
-    auto screenOnFalseOnBatteryFalsePredicate = config.add_predicate();
-    screenOnFalseOnBatteryFalsePredicate->set_id(StringToId("ScreenOnFalseOnBatteryFalse"));
-    screenOnFalseOnBatteryFalsePredicate->mutable_combination()->set_operation(
-            LogicalOperation::AND);
-    addPredicateToPredicateCombination(*screenOnFalsePredicate,
-                                       screenOnFalseOnBatteryFalsePredicate);
-    addPredicateToPredicateCombination(*onBatteryFalsePredicate,
-                                       screenOnFalseOnBatteryFalsePredicate);
-
-    // Combination condition with one simple condition InitialValue set to unknown and one set to
-    // false.
-    auto screenOnUnknownOnBatteryFalsePredicate = config.add_predicate();
-    screenOnUnknownOnBatteryFalsePredicate->set_id(StringToId("ScreenOnUnknowneOnBatteryFalse"));
-    screenOnUnknownOnBatteryFalsePredicate->mutable_combination()->set_operation(
-            LogicalOperation::AND);
-    addPredicateToPredicateCombination(screenOnUnknownPredicate,
-                                       screenOnUnknownOnBatteryFalsePredicate);
-    addPredicateToPredicateCombination(*onBatteryFalsePredicate,
-                                       screenOnUnknownOnBatteryFalsePredicate);
-
-    // Simple condition metric with initial value false.
-    ValueMetric* metric1 = config.add_value_metric();
-    metric1->set_id(StringToId("ValueSubsystemSleepWhileScreenOnInitialFalse"));
-    metric1->set_what(pulledAtomMatcher.id());
-    *metric1->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    metric1->set_bucket(FIVE_MINUTES);
-    metric1->set_condition(screenOnFalsePredicate->id());
-
-    // Simple condition metric with initial value unknown.
-    ValueMetric* metric2 = config.add_value_metric();
-    metric2->set_id(StringToId("ValueSubsystemSleepWhileScreenOnInitialUnknown"));
-    metric2->set_what(pulledAtomMatcher.id());
-    *metric2->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    metric2->set_bucket(FIVE_MINUTES);
-    metric2->set_condition(screenOnUnknownPredicate.id());
-
-    // Combination condition metric with initial values false and false.
-    ValueMetric* metric3 = config.add_value_metric();
-    metric3->set_id(StringToId("ValueSubsystemSleepWhileScreenOnFalseDeviceUnpluggedFalse"));
-    metric3->set_what(pulledAtomMatcher.id());
-    *metric3->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    metric3->set_bucket(FIVE_MINUTES);
-    metric3->set_condition(screenOnFalseOnBatteryFalsePredicate->id());
-
-    // Combination condition metric with initial values unknown and false.
-    ValueMetric* metric4 = config.add_value_metric();
-    metric4->set_id(StringToId("ValueSubsystemSleepWhileScreenOnUnknownDeviceUnpluggedFalse"));
-    metric4->set_what(pulledAtomMatcher.id());
-    *metric4->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    metric4->set_bucket(FIVE_MINUTES);
-    metric4->set_condition(screenOnUnknownOnBatteryFalsePredicate->id());
-
-    return config;
-}
-
-bool isSubset(const set<int32_t>& set1, const set<int32_t>& set2) {
-    return std::includes(set2.begin(), set2.end(), set1.begin(), set1.end());
-}
-}  // anonymous namespace
-
-TEST(MetricsManagerTest, TestInitialConditions) {
-    UidMap uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    StatsdConfig config = buildConfigWithDifferentPredicates();
-    set<int> allTagIds;
-    vector<sp<LogMatchingTracker>> allAtomMatchers;
-    vector<sp<ConditionTracker>> allConditionTrackers;
-    vector<sp<MetricProducer>> allMetricProducers;
-    std::vector<sp<AnomalyTracker>> allAnomalyTrackers;
-    std::vector<sp<AlarmTracker>> allAlarmTrackers;
-    unordered_map<int, std::vector<int>> conditionToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToConditionMap;
-    unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap;
-    unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap;
-    unordered_map<int64_t, int> alertTrackerMap;
-    vector<int> metricsWithActivation;
-    std::set<int64_t> noReportMetricIds;
-
-    EXPECT_TRUE(initStatsdConfig(
-            kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor,
-            timeBaseSec, timeBaseSec, allTagIds, allAtomMatchers, allConditionTrackers,
-            allMetricProducers, allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap,
-            trackerToMetricMap, trackerToConditionMap, activationAtomTrackerToMetricMap,
-            deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation,
-            noReportMetricIds));
-    ASSERT_EQ(4u, allMetricProducers.size());
-    ASSERT_EQ(5u, allConditionTrackers.size());
-
-    ConditionKey queryKey;
-    vector<ConditionState> conditionCache(5, ConditionState::kNotEvaluated);
-
-    allConditionTrackers[3]->isConditionMet(queryKey, allConditionTrackers, false, conditionCache);
-    allConditionTrackers[4]->isConditionMet(queryKey, allConditionTrackers, false, conditionCache);
-    EXPECT_EQ(ConditionState::kUnknown, conditionCache[0]);
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[1]);
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[2]);
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[3]);
-    EXPECT_EQ(ConditionState::kUnknown, conditionCache[4]);
-
-    EXPECT_EQ(ConditionState::kFalse, allMetricProducers[0]->mCondition);
-    EXPECT_EQ(ConditionState::kUnknown, allMetricProducers[1]->mCondition);
-    EXPECT_EQ(ConditionState::kFalse, allMetricProducers[2]->mCondition);
-    EXPECT_EQ(ConditionState::kUnknown, allMetricProducers[3]->mCondition);
-}
-
-TEST(MetricsManagerTest, TestGoodConfig) {
-    UidMap uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    StatsdConfig config = buildGoodConfig();
-    set<int> allTagIds;
-    vector<sp<LogMatchingTracker>> allAtomMatchers;
-    vector<sp<ConditionTracker>> allConditionTrackers;
-    vector<sp<MetricProducer>> allMetricProducers;
-    std::vector<sp<AnomalyTracker>> allAnomalyTrackers;
-    std::vector<sp<AlarmTracker>> allAlarmTrackers;
-    unordered_map<int, std::vector<int>> conditionToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToConditionMap;
-    unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap;
-    unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap;
-    unordered_map<int64_t, int> alertTrackerMap;
-    vector<int> metricsWithActivation;
-    std::set<int64_t> noReportMetricIds;
-
-    EXPECT_TRUE(initStatsdConfig(kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor,
-                                 periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds,
-                                 allAtomMatchers, allConditionTrackers, allMetricProducers,
-                                 allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap,
-                                 trackerToMetricMap, trackerToConditionMap,
-                                 activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                                 alertTrackerMap, metricsWithActivation,
-                                 noReportMetricIds));
-    ASSERT_EQ(1u, allMetricProducers.size());
-    ASSERT_EQ(1u, allAnomalyTrackers.size());
-    ASSERT_EQ(1u, noReportMetricIds.size());
-    ASSERT_EQ(1u, alertTrackerMap.size());
-    EXPECT_NE(alertTrackerMap.find(kAlertId), alertTrackerMap.end());
-    EXPECT_EQ(alertTrackerMap.find(kAlertId)->second, 0);
-}
-
-TEST(MetricsManagerTest, TestDimensionMetricsWithMultiTags) {
-    UidMap uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    StatsdConfig config = buildDimensionMetricsWithMultiTags();
-    set<int> allTagIds;
-    vector<sp<LogMatchingTracker>> allAtomMatchers;
-    vector<sp<ConditionTracker>> allConditionTrackers;
-    vector<sp<MetricProducer>> allMetricProducers;
-    std::vector<sp<AnomalyTracker>> allAnomalyTrackers;
-    std::vector<sp<AlarmTracker>> allAlarmTrackers;
-    unordered_map<int, std::vector<int>> conditionToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToConditionMap;
-    unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap;
-    unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap;
-    unordered_map<int64_t, int> alertTrackerMap;
-    vector<int> metricsWithActivation;
-    std::set<int64_t> noReportMetricIds;
-
-    EXPECT_FALSE(initStatsdConfig(kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor,
-                                  periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds,
-                                  allAtomMatchers, allConditionTrackers, allMetricProducers,
-                                  allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap,
-                                  trackerToMetricMap, trackerToConditionMap,
-                                  activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                                  alertTrackerMap, metricsWithActivation,
-                                  noReportMetricIds));
-}
-
-TEST(MetricsManagerTest, TestCircleLogMatcherDependency) {
-    UidMap uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    StatsdConfig config = buildCircleMatchers();
-    set<int> allTagIds;
-    vector<sp<LogMatchingTracker>> allAtomMatchers;
-    vector<sp<ConditionTracker>> allConditionTrackers;
-    vector<sp<MetricProducer>> allMetricProducers;
-    std::vector<sp<AnomalyTracker>> allAnomalyTrackers;
-    std::vector<sp<AlarmTracker>> allAlarmTrackers;
-    unordered_map<int, std::vector<int>> conditionToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToConditionMap;
-    unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap;
-    unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap;
-    unordered_map<int64_t, int> alertTrackerMap;
-    vector<int> metricsWithActivation;
-    std::set<int64_t> noReportMetricIds;
-
-    EXPECT_FALSE(initStatsdConfig(kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor,
-                                  periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds,
-                                  allAtomMatchers, allConditionTrackers, allMetricProducers,
-                                  allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap,
-                                  trackerToMetricMap, trackerToConditionMap,
-                                  activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                                  alertTrackerMap, metricsWithActivation,
-                                  noReportMetricIds));
-}
-
-TEST(MetricsManagerTest, TestMissingMatchers) {
-    UidMap uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    StatsdConfig config = buildMissingMatchers();
-    set<int> allTagIds;
-    vector<sp<LogMatchingTracker>> allAtomMatchers;
-    vector<sp<ConditionTracker>> allConditionTrackers;
-    vector<sp<MetricProducer>> allMetricProducers;
-    std::vector<sp<AnomalyTracker>> allAnomalyTrackers;
-    std::vector<sp<AlarmTracker>> allAlarmTrackers;
-    unordered_map<int, std::vector<int>> conditionToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToConditionMap;
-    unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap;
-    unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap;
-    unordered_map<int64_t, int> alertTrackerMap;
-    vector<int> metricsWithActivation;
-    std::set<int64_t> noReportMetricIds;
-    EXPECT_FALSE(initStatsdConfig(kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor,
-                                  periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds,
-                                  allAtomMatchers, allConditionTrackers, allMetricProducers,
-                                  allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap,
-                                  trackerToMetricMap, trackerToConditionMap,
-                                  activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                                  alertTrackerMap, metricsWithActivation,
-                                  noReportMetricIds));
-}
-
-TEST(MetricsManagerTest, TestMissingPredicate) {
-    UidMap uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    StatsdConfig config = buildMissingPredicate();
-    set<int> allTagIds;
-    vector<sp<LogMatchingTracker>> allAtomMatchers;
-    vector<sp<ConditionTracker>> allConditionTrackers;
-    vector<sp<MetricProducer>> allMetricProducers;
-    std::vector<sp<AnomalyTracker>> allAnomalyTrackers;
-    std::vector<sp<AlarmTracker>> allAlarmTrackers;
-    unordered_map<int, std::vector<int>> conditionToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToConditionMap;
-    unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap;
-    unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap;
-    unordered_map<int64_t, int> alertTrackerMap;
-    vector<int> metricsWithActivation;
-    std::set<int64_t> noReportMetricIds;
-    EXPECT_FALSE(initStatsdConfig(kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor,
-                                  periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds,
-                                  allAtomMatchers, allConditionTrackers, allMetricProducers,
-                                  allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap,
-                                  trackerToMetricMap, trackerToConditionMap,
-                                  activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                                  alertTrackerMap, metricsWithActivation, noReportMetricIds));
-}
-
-TEST(MetricsManagerTest, TestCirclePredicateDependency) {
-    UidMap uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    StatsdConfig config = buildCirclePredicates();
-    set<int> allTagIds;
-    vector<sp<LogMatchingTracker>> allAtomMatchers;
-    vector<sp<ConditionTracker>> allConditionTrackers;
-    vector<sp<MetricProducer>> allMetricProducers;
-    std::vector<sp<AnomalyTracker>> allAnomalyTrackers;
-    std::vector<sp<AlarmTracker>> allAlarmTrackers;
-    unordered_map<int, std::vector<int>> conditionToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToConditionMap;
-    unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap;
-    unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap;
-    unordered_map<int64_t, int> alertTrackerMap;
-    vector<int> metricsWithActivation;
-    std::set<int64_t> noReportMetricIds;
-
-    EXPECT_FALSE(initStatsdConfig(kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor,
-                                  periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds,
-                                  allAtomMatchers, allConditionTrackers, allMetricProducers,
-                                  allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap,
-                                  trackerToMetricMap, trackerToConditionMap,
-                                  activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                                  alertTrackerMap, metricsWithActivation,
-                                  noReportMetricIds));
-}
-
-TEST(MetricsManagerTest, testAlertWithUnknownMetric) {
-    UidMap uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    StatsdConfig config = buildAlertWithUnknownMetric();
-    set<int> allTagIds;
-    vector<sp<LogMatchingTracker>> allAtomMatchers;
-    vector<sp<ConditionTracker>> allConditionTrackers;
-    vector<sp<MetricProducer>> allMetricProducers;
-    std::vector<sp<AnomalyTracker>> allAnomalyTrackers;
-    std::vector<sp<AlarmTracker>> allAlarmTrackers;
-    unordered_map<int, std::vector<int>> conditionToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToMetricMap;
-    unordered_map<int, std::vector<int>> trackerToConditionMap;
-    unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap;
-    unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap;
-    unordered_map<int64_t, int> alertTrackerMap;
-    vector<int> metricsWithActivation;
-    std::set<int64_t> noReportMetricIds;
-
-    EXPECT_FALSE(initStatsdConfig(kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor,
-                                  periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds,
-                                  allAtomMatchers, allConditionTrackers, allMetricProducers,
-                                  allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap,
-                                  trackerToMetricMap, trackerToConditionMap,
-                                  activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap,
-                                  alertTrackerMap, metricsWithActivation,
-                                  noReportMetricIds));
-}
-
-TEST(MetricsManagerTest, TestLogSources) {
-    string app1 = "app1";
-    set<int32_t> app1Uids = {1111, 11111};
-    string app2 = "app2";
-    set<int32_t> app2Uids = {2222};
-    string app3 = "app3";
-    set<int32_t> app3Uids = {3333, 1111};
-
-    map<string, set<int32_t>> pkgToUids;
-    pkgToUids[app1] = app1Uids;
-    pkgToUids[app2] = app2Uids;
-    pkgToUids[app3] = app3Uids;
-
-    int32_t atom1 = 10;
-    int32_t atom2 = 20;
-    int32_t atom3 = 30;
-    sp<MockUidMap> uidMap = new StrictMock<MockUidMap>();
-    EXPECT_CALL(*uidMap, getAppUid(_))
-            .Times(4)
-            .WillRepeatedly(Invoke([&pkgToUids](const string& pkg) {
-                const auto& it = pkgToUids.find(pkg);
-                if (it != pkgToUids.end()) {
-                    return it->second;
-                }
-                return set<int32_t>();
-            }));
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterPullUidProvider(kConfigKey, _)).Times(1);
-    EXPECT_CALL(*pullerManager, UnregisterPullUidProvider(kConfigKey, _)).Times(1);
-
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-
-    StatsdConfig config = buildGoodConfig();
-    config.add_allowed_log_source("AID_SYSTEM");
-    config.add_allowed_log_source(app1);
-    config.add_default_pull_packages("AID_SYSTEM");
-    config.add_default_pull_packages("AID_ROOT");
-
-    const set<int32_t> defaultPullUids = {AID_SYSTEM, AID_ROOT};
-
-    PullAtomPackages* pullAtomPackages = config.add_pull_atom_packages();
-    pullAtomPackages->set_atom_id(atom1);
-    pullAtomPackages->add_packages(app1);
-    pullAtomPackages->add_packages(app3);
-
-    pullAtomPackages = config.add_pull_atom_packages();
-    pullAtomPackages->set_atom_id(atom2);
-    pullAtomPackages->add_packages(app2);
-    pullAtomPackages->add_packages("AID_STATSD");
-
-    MetricsManager metricsManager(kConfigKey, config, timeBaseSec, timeBaseSec, uidMap,
-                                  pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor);
-
-    EXPECT_TRUE(metricsManager.isConfigValid());
-
-    ASSERT_EQ(metricsManager.mAllowedUid.size(), 1);
-    EXPECT_EQ(metricsManager.mAllowedUid[0], AID_SYSTEM);
-
-    ASSERT_EQ(metricsManager.mAllowedPkg.size(), 1);
-    EXPECT_EQ(metricsManager.mAllowedPkg[0], app1);
-
-    ASSERT_EQ(metricsManager.mAllowedLogSources.size(), 3);
-    EXPECT_TRUE(isSubset({AID_SYSTEM}, metricsManager.mAllowedLogSources));
-    EXPECT_TRUE(isSubset(app1Uids, metricsManager.mAllowedLogSources));
-
-    ASSERT_EQ(metricsManager.mDefaultPullUids.size(), 2);
-    EXPECT_TRUE(isSubset(defaultPullUids, metricsManager.mDefaultPullUids));
-    ;
-
-    vector<int32_t> atom1Uids = metricsManager.getPullAtomUids(atom1);
-    ASSERT_EQ(atom1Uids.size(), 5);
-    set<int32_t> expectedAtom1Uids;
-    expectedAtom1Uids.insert(defaultPullUids.begin(), defaultPullUids.end());
-    expectedAtom1Uids.insert(app1Uids.begin(), app1Uids.end());
-    expectedAtom1Uids.insert(app3Uids.begin(), app3Uids.end());
-    EXPECT_TRUE(isSubset(expectedAtom1Uids, set<int32_t>(atom1Uids.begin(), atom1Uids.end())));
-
-    vector<int32_t> atom2Uids = metricsManager.getPullAtomUids(atom2);
-    ASSERT_EQ(atom2Uids.size(), 4);
-    set<int32_t> expectedAtom2Uids;
-    expectedAtom1Uids.insert(defaultPullUids.begin(), defaultPullUids.end());
-    expectedAtom1Uids.insert(app2Uids.begin(), app2Uids.end());
-    expectedAtom1Uids.insert(AID_STATSD);
-    EXPECT_TRUE(isSubset(expectedAtom2Uids, set<int32_t>(atom2Uids.begin(), atom2Uids.end())));
-
-    vector<int32_t> atom3Uids = metricsManager.getPullAtomUids(atom3);
-    ASSERT_EQ(atom3Uids.size(), 2);
-    EXPECT_TRUE(isSubset(defaultPullUids, set<int32_t>(atom3Uids.begin(), atom3Uids.end())));
-}
-
-TEST(MetricsManagerTest, TestCheckLogCredentialsWhitelistedAtom) {
-    sp<UidMap> uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-
-    StatsdConfig config = buildGoodConfig();
-    config.add_whitelisted_atom_ids(3);
-    config.add_whitelisted_atom_ids(4);
-
-    MetricsManager metricsManager(kConfigKey, config, timeBaseSec, timeBaseSec, uidMap,
-                                  pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor);
-
-    LogEvent event(0 /* uid */, 0 /* pid */);
-    CreateNoValuesLogEvent(&event, 10 /* atom id */, 0 /* timestamp */);
-    EXPECT_FALSE(metricsManager.checkLogCredentials(event));
-
-    CreateNoValuesLogEvent(&event, 3 /* atom id */, 0 /* timestamp */);
-    EXPECT_TRUE(metricsManager.checkLogCredentials(event));
-
-    CreateNoValuesLogEvent(&event, 4 /* atom id */, 0 /* timestamp */);
-    EXPECT_TRUE(metricsManager.checkLogCredentials(event));
-}
-
-TEST(MetricsManagerTest, TestWhitelistedAtomStateTracker) {
-    sp<UidMap> uidMap;
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-
-    StatsdConfig config = buildGoodConfig();
-    config.add_allowed_log_source("AID_SYSTEM");
-    config.add_whitelisted_atom_ids(3);
-    config.add_whitelisted_atom_ids(4);
-
-    State state;
-    state.set_id(1);
-    state.set_atom_id(3);
-
-    *config.add_state() = state;
-
-    config.mutable_count_metric(0)->add_slice_by_state(state.id());
-
-    StateManager::getInstance().clear();
-
-    MetricsManager metricsManager(kConfigKey, config, timeBaseSec, timeBaseSec, uidMap,
-                                  pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor);
-
-    EXPECT_EQ(0, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_FALSE(metricsManager.isConfigValid());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/StatsLogProcessor_test.cpp b/cmds/statsd/tests/StatsLogProcessor_test.cpp
deleted file mode 100644
index 12cfcc7..0000000
--- a/cmds/statsd/tests/StatsLogProcessor_test.cpp
+++ /dev/null
@@ -1,1886 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "StatsLogProcessor.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-
-#include "StatsService.h"
-#include "config/ConfigKey.h"
-#include "frameworks/base/cmds/statsd/src/stats_log.pb.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "guardrail/StatsdStats.h"
-#include "logd/LogEvent.h"
-#include "packages/UidMap.h"
-#include "statslog_statsdtest.h"
-#include "storage/StorageManager.h"
-#include "tests/statsd_test_util.h"
-
-using namespace android;
-using namespace testing;
-using ::ndk::SharedRefBase;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using android::util::ProtoOutputStream;
-
-#ifdef __ANDROID__
-
-/**
- * Mock MetricsManager (ByteSize() is called).
- */
-class MockMetricsManager : public MetricsManager {
-public:
-    MockMetricsManager()
-        : MetricsManager(ConfigKey(1, 12345), StatsdConfig(), 1000, 1000, new UidMap(),
-                         new StatsPullerManager(),
-                         new AlarmMonitor(10,
-                                          [](const shared_ptr<IStatsCompanionService>&, int64_t) {},
-                                          [](const shared_ptr<IStatsCompanionService>&) {}),
-                         new AlarmMonitor(10,
-                                          [](const shared_ptr<IStatsCompanionService>&, int64_t) {},
-                                          [](const shared_ptr<IStatsCompanionService>&) {})) {
-    }
-
-    MOCK_METHOD0(byteSize, size_t());
-
-    MOCK_METHOD1(dropData, void(const int64_t dropTimeNs));
-};
-
-TEST(StatsLogProcessorTest, TestRateLimitByteSize) {
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> periodicAlarmMonitor;
-    // Construct the processor with a no-op sendBroadcast function that does nothing.
-    StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, 0,
-                        [](const ConfigKey& key) { return true; },
-                        [](const int&, const vector<int64_t>&) {return true;});
-
-    MockMetricsManager mockMetricsManager;
-
-    ConfigKey key(100, 12345);
-    // Expect only the first flush to trigger a check for byte size since the last two are
-    // rate-limited.
-    EXPECT_CALL(mockMetricsManager, byteSize()).Times(1);
-    p.flushIfNecessaryLocked(key, mockMetricsManager);
-    p.flushIfNecessaryLocked(key, mockMetricsManager);
-    p.flushIfNecessaryLocked(key, mockMetricsManager);
-}
-
-TEST(StatsLogProcessorTest, TestRateLimitBroadcast) {
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    int broadcastCount = 0;
-    StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) {
-                            broadcastCount++;
-                            return true;
-                        },
-                        [](const int&, const vector<int64_t>&) {return true;});
-
-    MockMetricsManager mockMetricsManager;
-
-    ConfigKey key(100, 12345);
-    EXPECT_CALL(mockMetricsManager, byteSize())
-            .Times(1)
-            .WillRepeatedly(::testing::Return(int(
-                    StatsdStats::kMaxMetricsBytesPerConfig * .95)));
-
-    // Expect only one broadcast despite always returning a size that should trigger broadcast.
-    p.flushIfNecessaryLocked(key, mockMetricsManager);
-    EXPECT_EQ(1, broadcastCount);
-
-    // b/73089712
-    // This next call to flush should not trigger a broadcast.
-    // p.mLastByteSizeTimes.clear();  // Force another check for byte size.
-    // p.flushIfNecessaryLocked(2, key, mockMetricsManager);
-    // EXPECT_EQ(1, broadcastCount);
-}
-
-TEST(StatsLogProcessorTest, TestDropWhenByteSizeTooLarge) {
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    int broadcastCount = 0;
-    StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) {
-                            broadcastCount++;
-                            return true;
-                        },
-                        [](const int&, const vector<int64_t>&) {return true;});
-
-    MockMetricsManager mockMetricsManager;
-
-    ConfigKey key(100, 12345);
-    EXPECT_CALL(mockMetricsManager, byteSize())
-            .Times(1)
-            .WillRepeatedly(::testing::Return(int(StatsdStats::kMaxMetricsBytesPerConfig * 1.2)));
-
-    EXPECT_CALL(mockMetricsManager, dropData(_)).Times(1);
-
-    // Expect to call the onDumpReport and skip the broadcast.
-    p.flushIfNecessaryLocked(key, mockMetricsManager);
-    EXPECT_EQ(0, broadcastCount);
-}
-
-StatsdConfig MakeConfig(bool includeMetric) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    if (includeMetric) {
-        auto appCrashMatcher = CreateProcessCrashAtomMatcher();
-        *config.add_atom_matcher() = appCrashMatcher;
-        auto countMetric = config.add_count_metric();
-        countMetric->set_id(StringToId("AppCrashes"));
-        countMetric->set_what(appCrashMatcher.id());
-        countMetric->set_bucket(FIVE_MINUTES);
-    }
-    return config;
-}
-
-TEST(StatsLogProcessorTest, TestUidMapHasSnapshot) {
-    // Setup simple config key corresponding to empty config.
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    m->updateMap(1, {1, 2}, {1, 2}, {String16("v1"), String16("v2")},
-                 {String16("p1"), String16("p2")}, {String16(""), String16("")});
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    int broadcastCount = 0;
-    StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) {
-                            broadcastCount++;
-                            return true;
-                        },
-                        [](const int&, const vector<int64_t>&) {return true;});
-    ConfigKey key(3, 4);
-    StatsdConfig config = MakeConfig(true);
-    p.OnConfigUpdated(0, key, config);
-
-    // Expect to get no metrics, but snapshot specified above in uidmap.
-    vector<uint8_t> bytes;
-    p.onDumpReport(key, 1, false, true, ADB_DUMP, FAST, &bytes);
-
-    ConfigMetricsReportList output;
-    output.ParseFromArray(bytes.data(), bytes.size());
-    EXPECT_TRUE(output.reports_size() > 0);
-    auto uidmap = output.reports(0).uid_map();
-    EXPECT_TRUE(uidmap.snapshots_size() > 0);
-    ASSERT_EQ(2, uidmap.snapshots(0).package_info_size());
-}
-
-TEST(StatsLogProcessorTest, TestEmptyConfigHasNoUidMap) {
-    // Setup simple config key corresponding to empty config.
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    m->updateMap(1, {1, 2}, {1, 2}, {String16("v1"), String16("v2")},
-                 {String16("p1"), String16("p2")}, {String16(""), String16("")});
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    int broadcastCount = 0;
-    StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) {
-                            broadcastCount++;
-                            return true;
-                        },
-                        [](const int&, const vector<int64_t>&) {return true;});
-    ConfigKey key(3, 4);
-    StatsdConfig config = MakeConfig(false);
-    p.OnConfigUpdated(0, key, config);
-
-    // Expect to get no metrics, but snapshot specified above in uidmap.
-    vector<uint8_t> bytes;
-    p.onDumpReport(key, 1, false, true, ADB_DUMP, FAST, &bytes);
-
-    ConfigMetricsReportList output;
-    output.ParseFromArray(bytes.data(), bytes.size());
-    EXPECT_TRUE(output.reports_size() > 0);
-    EXPECT_FALSE(output.reports(0).has_uid_map());
-}
-
-TEST(StatsLogProcessorTest, TestReportIncludesSubConfig) {
-    // Setup simple config key corresponding to empty config.
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    int broadcastCount = 0;
-    StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) {
-                            broadcastCount++;
-                            return true;
-                        },
-                        [](const int&, const vector<int64_t>&) {return true;});
-    ConfigKey key(3, 4);
-    StatsdConfig config;
-    auto annotation = config.add_annotation();
-    annotation->set_field_int64(1);
-    annotation->set_field_int32(2);
-    config.add_allowed_log_source("AID_ROOT");
-    p.OnConfigUpdated(1, key, config);
-
-    // Expect to get no metrics, but snapshot specified above in uidmap.
-    vector<uint8_t> bytes;
-    p.onDumpReport(key, 1, false, true, ADB_DUMP, FAST, &bytes);
-
-    ConfigMetricsReportList output;
-    output.ParseFromArray(bytes.data(), bytes.size());
-    EXPECT_TRUE(output.reports_size() > 0);
-    auto report = output.reports(0);
-    ASSERT_EQ(1, report.annotation_size());
-    EXPECT_EQ(1, report.annotation(0).field_int64());
-    EXPECT_EQ(2, report.annotation(0).field_int32());
-}
-
-TEST(StatsLogProcessorTest, TestOnDumpReportEraseData) {
-    // Setup a simple config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-    *config.add_atom_matcher() = wakelockAcquireMatcher;
-
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(123456);
-    countMetric->set_what(wakelockAcquireMatcher.id());
-    countMetric->set_bucket(FIVE_MINUTES);
-
-    ConfigKey cfgKey;
-    sp<StatsLogProcessor> processor = CreateStatsLogProcessor(1, 1, config, cfgKey);
-
-    std::vector<int> attributionUids = {111};
-    std::vector<string> attributionTags = {"App1"};
-    std::unique_ptr<LogEvent> event =
-            CreateAcquireWakelockEvent(2 /*timestamp*/, attributionUids, attributionTags, "wl1");
-    processor->OnLogEvent(event.get());
-
-    vector<uint8_t> bytes;
-    ConfigMetricsReportList output;
-
-    // Dump report WITHOUT erasing data.
-    processor->onDumpReport(cfgKey, 3, true, false /* Do NOT erase data. */, ADB_DUMP, FAST,
-                            &bytes);
-    output.ParseFromArray(bytes.data(), bytes.size());
-    ASSERT_EQ(output.reports_size(), 1);
-    ASSERT_EQ(output.reports(0).metrics_size(), 1);
-    ASSERT_EQ(output.reports(0).metrics(0).count_metrics().data_size(), 1);
-
-    // Dump report WITH erasing data. There should be data since we didn't previously erase it.
-    processor->onDumpReport(cfgKey, 4, true, true /* DO erase data. */, ADB_DUMP, FAST, &bytes);
-    output.ParseFromArray(bytes.data(), bytes.size());
-    ASSERT_EQ(output.reports_size(), 1);
-    ASSERT_EQ(output.reports(0).metrics_size(), 1);
-    ASSERT_EQ(output.reports(0).metrics(0).count_metrics().data_size(), 1);
-
-    // Dump report again. There should be no data since we erased it.
-    processor->onDumpReport(cfgKey, 5, true, true /* DO erase data. */, ADB_DUMP, FAST, &bytes);
-    output.ParseFromArray(bytes.data(), bytes.size());
-    // We don't care whether statsd has a report, as long as it has no count metrics in it.
-    bool noData = output.reports_size() == 0 || output.reports(0).metrics_size() == 0 ||
-                  output.reports(0).metrics(0).count_metrics().data_size() == 0;
-    EXPECT_TRUE(noData);
-}
-
-TEST(StatsLogProcessorTest, TestPullUidProviderSetOnConfigUpdate) {
-    // Setup simple config key corresponding to empty config.
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    StatsLogProcessor p(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-            [](const ConfigKey& key) { return true; },
-            [](const int&, const vector<int64_t>&) { return true; });
-    ConfigKey key(3, 4);
-    StatsdConfig config = MakeConfig(false);
-    p.OnConfigUpdated(0, key, config);
-    EXPECT_NE(pullerManager->mPullUidProviders.find(key), pullerManager->mPullUidProviders.end());
-
-    config.add_default_pull_packages("AID_STATSD");
-    p.OnConfigUpdated(5, key, config);
-    EXPECT_NE(pullerManager->mPullUidProviders.find(key), pullerManager->mPullUidProviders.end());
-
-    p.OnConfigRemoved(key);
-    EXPECT_EQ(pullerManager->mPullUidProviders.find(key), pullerManager->mPullUidProviders.end());
-}
-
-TEST(StatsLogProcessorTest, InvalidConfigRemoved) {
-    // Setup simple config key corresponding to empty config.
-    StatsdStats::getInstance().reset();
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    m->updateMap(1, {1, 2}, {1, 2}, {String16("v1"), String16("v2")},
-                 {String16("p1"), String16("p2")}, {String16(""), String16("")});
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [](const ConfigKey& key) { return true; },
-                        [](const int&, const vector<int64_t>&) {return true;});
-    ConfigKey key(3, 4);
-    StatsdConfig config = MakeConfig(true);
-    p.OnConfigUpdated(0, key, config);
-    EXPECT_EQ(1, p.mMetricsManagers.size());
-    EXPECT_NE(p.mMetricsManagers.find(key), p.mMetricsManagers.end());
-    // Cannot assert the size of mConfigStats since it is static and does not get cleared on reset.
-    EXPECT_NE(StatsdStats::getInstance().mConfigStats.end(),
-              StatsdStats::getInstance().mConfigStats.find(key));
-    EXPECT_EQ(0, StatsdStats::getInstance().mIceBox.size());
-
-    StatsdConfig invalidConfig = MakeConfig(true);
-    invalidConfig.clear_allowed_log_source();
-    p.OnConfigUpdated(0, key, invalidConfig);
-    EXPECT_EQ(0, p.mMetricsManagers.size());
-    // The current configs should not contain the invalid config.
-    EXPECT_EQ(StatsdStats::getInstance().mConfigStats.end(),
-              StatsdStats::getInstance().mConfigStats.find(key));
-    // Both "config" and "invalidConfig" should be in the icebox.
-    EXPECT_EQ(2, StatsdStats::getInstance().mIceBox.size());
-
-}
-
-
-TEST(StatsLogProcessorTest, TestActiveConfigMetricDiskWriteRead) {
-    int uid = 1111;
-
-    // Setup a simple config, no activation
-    StatsdConfig config1;
-    int64_t cfgId1 = 12341;
-    config1.set_id(cfgId1);
-    config1.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-    *config1.add_atom_matcher() = wakelockAcquireMatcher;
-
-    long metricId1 = 1234561;
-    long metricId2 = 1234562;
-    auto countMetric1 = config1.add_count_metric();
-    countMetric1->set_id(metricId1);
-    countMetric1->set_what(wakelockAcquireMatcher.id());
-    countMetric1->set_bucket(FIVE_MINUTES);
-
-    auto countMetric2 = config1.add_count_metric();
-    countMetric2->set_id(metricId2);
-    countMetric2->set_what(wakelockAcquireMatcher.id());
-    countMetric2->set_bucket(FIVE_MINUTES);
-
-    ConfigKey cfgKey1(uid, cfgId1);
-
-    // Add another config, with two metrics, one with activation
-    StatsdConfig config2;
-    int64_t cfgId2 = 12342;
-    config2.set_id(cfgId2);
-    config2.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    *config2.add_atom_matcher() = wakelockAcquireMatcher;
-
-    long metricId3 = 1234561;
-    long metricId4 = 1234562;
-
-    auto countMetric3 = config2.add_count_metric();
-    countMetric3->set_id(metricId3);
-    countMetric3->set_what(wakelockAcquireMatcher.id());
-    countMetric3->set_bucket(FIVE_MINUTES);
-
-    auto countMetric4 = config2.add_count_metric();
-    countMetric4->set_id(metricId4);
-    countMetric4->set_what(wakelockAcquireMatcher.id());
-    countMetric4->set_bucket(FIVE_MINUTES);
-
-    auto metric3Activation = config2.add_metric_activation();
-    metric3Activation->set_metric_id(metricId3);
-    metric3Activation->set_activation_type(ACTIVATE_IMMEDIATELY);
-    auto metric3ActivationTrigger = metric3Activation->add_event_activation();
-    metric3ActivationTrigger->set_atom_matcher_id(wakelockAcquireMatcher.id());
-    metric3ActivationTrigger->set_ttl_seconds(100);
-
-    ConfigKey cfgKey2(uid, cfgId2);
-
-    // Add another config, with two metrics, both with activations
-    StatsdConfig config3;
-    int64_t cfgId3 = 12343;
-    config3.set_id(cfgId3);
-    config3.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    *config3.add_atom_matcher() = wakelockAcquireMatcher;
-
-    long metricId5 = 1234565;
-    long metricId6 = 1234566;
-    auto countMetric5 = config3.add_count_metric();
-    countMetric5->set_id(metricId5);
-    countMetric5->set_what(wakelockAcquireMatcher.id());
-    countMetric5->set_bucket(FIVE_MINUTES);
-
-    auto countMetric6 = config3.add_count_metric();
-    countMetric6->set_id(metricId6);
-    countMetric6->set_what(wakelockAcquireMatcher.id());
-    countMetric6->set_bucket(FIVE_MINUTES);
-
-    auto metric5Activation = config3.add_metric_activation();
-    metric5Activation->set_metric_id(metricId5);
-    metric5Activation->set_activation_type(ACTIVATE_IMMEDIATELY);
-    auto metric5ActivationTrigger = metric5Activation->add_event_activation();
-    metric5ActivationTrigger->set_atom_matcher_id(wakelockAcquireMatcher.id());
-    metric5ActivationTrigger->set_ttl_seconds(100);
-
-    auto metric6Activation = config3.add_metric_activation();
-    metric6Activation->set_metric_id(metricId6);
-    metric6Activation->set_activation_type(ACTIVATE_IMMEDIATELY);
-    auto metric6ActivationTrigger = metric6Activation->add_event_activation();
-    metric6ActivationTrigger->set_atom_matcher_id(wakelockAcquireMatcher.id());
-    metric6ActivationTrigger->set_ttl_seconds(200);
-
-    ConfigKey cfgKey3(uid, cfgId3);
-
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    vector<int64_t> activeConfigsBroadcast;
-
-    long timeBase1 = 1;
-    int broadcastCount = 0;
-    StatsLogProcessor processor(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, timeBase1,
-            [](const ConfigKey& key) { return true; },
-            [&uid, &broadcastCount, &activeConfigsBroadcast](const int& broadcastUid,
-                                                             const vector<int64_t>& activeConfigs) {
-                broadcastCount++;
-                EXPECT_EQ(broadcastUid, uid);
-                activeConfigsBroadcast.clear();
-                activeConfigsBroadcast.insert(activeConfigsBroadcast.end(), activeConfigs.begin(),
-                                              activeConfigs.end());
-                return true;
-            });
-
-    processor.OnConfigUpdated(1, cfgKey1, config1);
-    processor.OnConfigUpdated(2, cfgKey2, config2);
-    processor.OnConfigUpdated(3, cfgKey3, config3);
-
-    ASSERT_EQ(3, processor.mMetricsManagers.size());
-
-    // Expect the first config and both metrics in it to be active.
-    auto it = processor.mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor.mMetricsManagers.end());
-    auto& metricsManager1 = it->second;
-    EXPECT_TRUE(metricsManager1->isActive());
-
-    auto metricIt = metricsManager1->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId1) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1->mAllMetricProducers.end());
-    auto& metricProducer1 = *metricIt;
-    EXPECT_TRUE(metricProducer1->isActive());
-
-    metricIt = metricsManager1->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId2) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1->mAllMetricProducers.end());
-    auto& metricProducer2 = *metricIt;
-    EXPECT_TRUE(metricProducer2->isActive());
-
-    // Expect config 2 to be active. Metric 3 shouldn't be active, metric 4 should be active.
-    it = processor.mMetricsManagers.find(cfgKey2);
-    EXPECT_TRUE(it != processor.mMetricsManagers.end());
-    auto& metricsManager2 = it->second;
-    EXPECT_TRUE(metricsManager2->isActive());
-
-    metricIt = metricsManager2->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager2->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId3) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager2->mAllMetricProducers.end());
-    auto& metricProducer3 = *metricIt;
-    EXPECT_FALSE(metricProducer3->isActive());
-
-    metricIt = metricsManager2->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager2->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId4) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager2->mAllMetricProducers.end());
-    auto& metricProducer4 = *metricIt;
-    EXPECT_TRUE(metricProducer4->isActive());
-
-    // Expect the third config and both metrics in it to be inactive.
-    it = processor.mMetricsManagers.find(cfgKey3);
-    EXPECT_TRUE(it != processor.mMetricsManagers.end());
-    auto& metricsManager3 = it->second;
-    EXPECT_FALSE(metricsManager3->isActive());
-
-    metricIt = metricsManager3->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager2->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId5) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager3->mAllMetricProducers.end());
-    auto& metricProducer5 = *metricIt;
-    EXPECT_FALSE(metricProducer5->isActive());
-
-    metricIt = metricsManager3->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager3->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId6) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager3->mAllMetricProducers.end());
-    auto& metricProducer6 = *metricIt;
-    EXPECT_FALSE(metricProducer6->isActive());
-
-    // No broadcast for active configs should have happened yet.
-    EXPECT_EQ(broadcastCount, 0);
-
-    // Activate all 3 metrics that were not active.
-    std::vector<int> attributionUids = {111};
-    std::vector<string> attributionTags = {"App1"};
-    std::unique_ptr<LogEvent> event =
-            CreateAcquireWakelockEvent(timeBase1 + 100, attributionUids, attributionTags, "wl1");
-    processor.OnLogEvent(event.get());
-
-    // Assert that all 3 configs are active.
-    EXPECT_TRUE(metricsManager1->isActive());
-    EXPECT_TRUE(metricsManager2->isActive());
-    EXPECT_TRUE(metricsManager3->isActive());
-
-    // A broadcast should have happened, and all 3 configs should be active in the broadcast.
-    EXPECT_EQ(broadcastCount, 1);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 3);
-    EXPECT_TRUE(std::find(activeConfigsBroadcast.begin(), activeConfigsBroadcast.end(), cfgId1) !=
-                activeConfigsBroadcast.end());
-    EXPECT_TRUE(std::find(activeConfigsBroadcast.begin(), activeConfigsBroadcast.end(), cfgId2) !=
-                activeConfigsBroadcast.end());
-    EXPECT_TRUE(std::find(activeConfigsBroadcast.begin(), activeConfigsBroadcast.end(), cfgId3) !=
-                activeConfigsBroadcast.end());
-
-    // When we shut down, metrics 3 & 5 have 100ns remaining, metric 6 has 100s + 100ns.
-    int64_t shutDownTime = timeBase1 + 100 * NS_PER_SEC;
-    processor.SaveActiveConfigsToDisk(shutDownTime);
-    const int64_t ttl3 = event->GetElapsedTimestampNs() +
-                         metric3ActivationTrigger->ttl_seconds() * NS_PER_SEC - shutDownTime;
-    const int64_t ttl5 = event->GetElapsedTimestampNs() +
-                         metric5ActivationTrigger->ttl_seconds() * NS_PER_SEC - shutDownTime;
-    const int64_t ttl6 = event->GetElapsedTimestampNs() +
-                         metric6ActivationTrigger->ttl_seconds() * NS_PER_SEC - shutDownTime;
-
-    // Create a second StatsLogProcessor and push the same 3 configs.
-    long timeBase2 = 1000;
-    sp<StatsLogProcessor> processor2 =
-            CreateStatsLogProcessor(timeBase2, timeBase2, config1, cfgKey1);
-    processor2->OnConfigUpdated(timeBase2, cfgKey2, config2);
-    processor2->OnConfigUpdated(timeBase2, cfgKey3, config3);
-
-    ASSERT_EQ(3, processor2->mMetricsManagers.size());
-
-    // First config and both metrics are active.
-    it = processor2->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor2->mMetricsManagers.end());
-    auto& metricsManager1001 = it->second;
-    EXPECT_TRUE(metricsManager1001->isActive());
-
-    metricIt = metricsManager1001->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1001->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId1) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1001->mAllMetricProducers.end());
-    auto& metricProducer1001 = *metricIt;
-    EXPECT_TRUE(metricProducer1001->isActive());
-
-    metricIt = metricsManager1001->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1001->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId2) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1001->mAllMetricProducers.end());
-    auto& metricProducer1002 = *metricIt;
-    EXPECT_TRUE(metricProducer1002->isActive());
-
-    // Second config is active. Metric 3 is inactive, metric 4 is active.
-    it = processor2->mMetricsManagers.find(cfgKey2);
-    EXPECT_TRUE(it != processor2->mMetricsManagers.end());
-    auto& metricsManager1002 = it->second;
-    EXPECT_TRUE(metricsManager1002->isActive());
-
-    metricIt = metricsManager1002->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1002->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId3) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1002->mAllMetricProducers.end());
-    auto& metricProducer1003 = *metricIt;
-    EXPECT_FALSE(metricProducer1003->isActive());
-
-    metricIt = metricsManager1002->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1002->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId4) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1002->mAllMetricProducers.end());
-    auto& metricProducer1004 = *metricIt;
-    EXPECT_TRUE(metricProducer1004->isActive());
-
-    // Config 3 is inactive. both metrics are inactive.
-    it = processor2->mMetricsManagers.find(cfgKey3);
-    EXPECT_TRUE(it != processor2->mMetricsManagers.end());
-    auto& metricsManager1003 = it->second;
-    EXPECT_FALSE(metricsManager1003->isActive());
-    ASSERT_EQ(2, metricsManager1003->mAllMetricProducers.size());
-
-    metricIt = metricsManager1003->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1002->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId5) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1003->mAllMetricProducers.end());
-    auto& metricProducer1005 = *metricIt;
-    EXPECT_FALSE(metricProducer1005->isActive());
-
-    metricIt = metricsManager1003->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1003->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId6) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1003->mAllMetricProducers.end());
-    auto& metricProducer1006 = *metricIt;
-    EXPECT_FALSE(metricProducer1006->isActive());
-
-    // Assert that all 3 metrics with activation are inactive and that the ttls were properly set.
-    EXPECT_FALSE(metricProducer1003->isActive());
-    const auto& activation1003 = metricProducer1003->mEventActivationMap.begin()->second;
-    EXPECT_EQ(100 * NS_PER_SEC, activation1003->ttl_ns);
-    EXPECT_EQ(0, activation1003->start_ns);
-    EXPECT_FALSE(metricProducer1005->isActive());
-    const auto& activation1005 = metricProducer1005->mEventActivationMap.begin()->second;
-    EXPECT_EQ(100 * NS_PER_SEC, activation1005->ttl_ns);
-    EXPECT_EQ(0, activation1005->start_ns);
-    EXPECT_FALSE(metricProducer1006->isActive());
-    const auto& activation1006 = metricProducer1006->mEventActivationMap.begin()->second;
-    EXPECT_EQ(200 * NS_PER_SEC, activation1006->ttl_ns);
-    EXPECT_EQ(0, activation1006->start_ns);
-
-    processor2->LoadActiveConfigsFromDisk();
-
-    // After loading activations from disk, assert that all 3 metrics are active.
-    EXPECT_TRUE(metricProducer1003->isActive());
-    EXPECT_EQ(timeBase2 + ttl3 - activation1003->ttl_ns, activation1003->start_ns);
-    EXPECT_TRUE(metricProducer1005->isActive());
-    EXPECT_EQ(timeBase2 + ttl5 - activation1005->ttl_ns, activation1005->start_ns);
-    EXPECT_TRUE(metricProducer1006->isActive());
-    EXPECT_EQ(timeBase2 + ttl6 - activation1006->ttl_ns, activation1003->start_ns);
-
-    // Make sure no more broadcasts have happened.
-    EXPECT_EQ(broadcastCount, 1);
-}
-
-TEST(StatsLogProcessorTest, TestActivationOnBoot) {
-    int uid = 1111;
-
-    StatsdConfig config1;
-    config1.set_id(12341);
-    config1.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-    *config1.add_atom_matcher() = wakelockAcquireMatcher;
-
-    long metricId1 = 1234561;
-    long metricId2 = 1234562;
-    auto countMetric1 = config1.add_count_metric();
-    countMetric1->set_id(metricId1);
-    countMetric1->set_what(wakelockAcquireMatcher.id());
-    countMetric1->set_bucket(FIVE_MINUTES);
-
-    auto countMetric2 = config1.add_count_metric();
-    countMetric2->set_id(metricId2);
-    countMetric2->set_what(wakelockAcquireMatcher.id());
-    countMetric2->set_bucket(FIVE_MINUTES);
-
-    auto metric1Activation = config1.add_metric_activation();
-    metric1Activation->set_metric_id(metricId1);
-    metric1Activation->set_activation_type(ACTIVATE_ON_BOOT);
-    auto metric1ActivationTrigger = metric1Activation->add_event_activation();
-    metric1ActivationTrigger->set_atom_matcher_id(wakelockAcquireMatcher.id());
-    metric1ActivationTrigger->set_ttl_seconds(100);
-
-    ConfigKey cfgKey1(uid, 12341);
-    long timeBase1 = 1;
-    sp<StatsLogProcessor> processor =
-            CreateStatsLogProcessor(timeBase1, timeBase1, config1, cfgKey1);
-
-    ASSERT_EQ(1, processor->mMetricsManagers.size());
-    auto it = processor->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor->mMetricsManagers.end());
-    auto& metricsManager1 = it->second;
-    EXPECT_TRUE(metricsManager1->isActive());
-
-    auto metricIt = metricsManager1->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId1) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1->mAllMetricProducers.end());
-    auto& metricProducer1 = *metricIt;
-    EXPECT_FALSE(metricProducer1->isActive());
-
-    metricIt = metricsManager1->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId2) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1->mAllMetricProducers.end());
-    auto& metricProducer2 = *metricIt;
-    EXPECT_TRUE(metricProducer2->isActive());
-
-    const auto& activation1 = metricProducer1->mEventActivationMap.begin()->second;
-    EXPECT_EQ(100 * NS_PER_SEC, activation1->ttl_ns);
-    EXPECT_EQ(0, activation1->start_ns);
-    EXPECT_EQ(kNotActive, activation1->state);
-
-    std::vector<int> attributionUids = {111};
-    std::vector<string> attributionTags = {"App1"};
-    std::unique_ptr<LogEvent> event =
-            CreateAcquireWakelockEvent(timeBase1 + 100, attributionUids, attributionTags, "wl1");
-    processor->OnLogEvent(event.get());
-
-    EXPECT_FALSE(metricProducer1->isActive());
-    EXPECT_EQ(0, activation1->start_ns);
-    EXPECT_EQ(kActiveOnBoot, activation1->state);
-
-    int64_t shutDownTime = timeBase1 + 100 * NS_PER_SEC;
-    processor->SaveActiveConfigsToDisk(shutDownTime);
-    EXPECT_FALSE(metricProducer1->isActive());
-    const int64_t ttl1 = metric1ActivationTrigger->ttl_seconds() * NS_PER_SEC;
-
-    long timeBase2 = 1000;
-    sp<StatsLogProcessor> processor2 =
-            CreateStatsLogProcessor(timeBase2, timeBase2, config1, cfgKey1);
-
-    ASSERT_EQ(1, processor2->mMetricsManagers.size());
-    it = processor2->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor2->mMetricsManagers.end());
-    auto& metricsManager1001 = it->second;
-    EXPECT_TRUE(metricsManager1001->isActive());
-
-    metricIt = metricsManager1001->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1001->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId1) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1001->mAllMetricProducers.end());
-    auto& metricProducer1001 = *metricIt;
-    EXPECT_FALSE(metricProducer1001->isActive());
-
-    metricIt = metricsManager1001->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1001->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId2) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1001->mAllMetricProducers.end());
-    auto& metricProducer1002 = *metricIt;
-    EXPECT_TRUE(metricProducer1002->isActive());
-
-    const auto& activation1001 = metricProducer1001->mEventActivationMap.begin()->second;
-    EXPECT_EQ(100 * NS_PER_SEC, activation1001->ttl_ns);
-    EXPECT_EQ(0, activation1001->start_ns);
-    EXPECT_EQ(kNotActive, activation1001->state);
-
-    processor2->LoadActiveConfigsFromDisk();
-
-    EXPECT_TRUE(metricProducer1001->isActive());
-    EXPECT_EQ(timeBase2 + ttl1 - activation1001->ttl_ns, activation1001->start_ns);
-    EXPECT_EQ(kActive, activation1001->state);
-}
-
-TEST(StatsLogProcessorTest, TestActivationOnBootMultipleActivations) {
-    int uid = 1111;
-
-    // Create config with 2 metrics:
-    // Metric 1: Activate on boot with 2 activations
-    // Metric 2: Always active
-    StatsdConfig config1;
-    config1.set_id(12341);
-    config1.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    *config1.add_atom_matcher() = wakelockAcquireMatcher;
-    *config1.add_atom_matcher() = screenOnMatcher;
-
-    long metricId1 = 1234561;
-    long metricId2 = 1234562;
-
-    auto countMetric1 = config1.add_count_metric();
-    countMetric1->set_id(metricId1);
-    countMetric1->set_what(wakelockAcquireMatcher.id());
-    countMetric1->set_bucket(FIVE_MINUTES);
-
-    auto countMetric2 = config1.add_count_metric();
-    countMetric2->set_id(metricId2);
-    countMetric2->set_what(wakelockAcquireMatcher.id());
-    countMetric2->set_bucket(FIVE_MINUTES);
-
-    auto metric1Activation = config1.add_metric_activation();
-    metric1Activation->set_metric_id(metricId1);
-    metric1Activation->set_activation_type(ACTIVATE_ON_BOOT);
-    auto metric1ActivationTrigger1 = metric1Activation->add_event_activation();
-    metric1ActivationTrigger1->set_atom_matcher_id(wakelockAcquireMatcher.id());
-    metric1ActivationTrigger1->set_ttl_seconds(100);
-    auto metric1ActivationTrigger2 = metric1Activation->add_event_activation();
-    metric1ActivationTrigger2->set_atom_matcher_id(screenOnMatcher.id());
-    metric1ActivationTrigger2->set_ttl_seconds(200);
-
-    ConfigKey cfgKey1(uid, 12341);
-    long timeBase1 = 1;
-    sp<StatsLogProcessor> processor =
-            CreateStatsLogProcessor(timeBase1, timeBase1, config1, cfgKey1);
-
-    // Metric 1 is not active.
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    ASSERT_EQ(1, processor->mMetricsManagers.size());
-    auto it = processor->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor->mMetricsManagers.end());
-    auto& metricsManager1 = it->second;
-    EXPECT_TRUE(metricsManager1->isActive());
-
-    auto metricIt = metricsManager1->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId1) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1->mAllMetricProducers.end());
-    auto& metricProducer1 = *metricIt;
-    EXPECT_FALSE(metricProducer1->isActive());
-
-    metricIt = metricsManager1->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId2) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1->mAllMetricProducers.end());
-    auto& metricProducer2 = *metricIt;
-    EXPECT_TRUE(metricProducer2->isActive());
-
-    int i = 0;
-    for (; i < metricsManager1->mAllAtomMatchers.size(); i++) {
-        if (metricsManager1->mAllAtomMatchers[i]->getId() ==
-            metric1ActivationTrigger1->atom_matcher_id()) {
-            break;
-        }
-    }
-    const auto& activation1 = metricProducer1->mEventActivationMap.at(i);
-    EXPECT_EQ(100 * NS_PER_SEC, activation1->ttl_ns);
-    EXPECT_EQ(0, activation1->start_ns);
-    EXPECT_EQ(kNotActive, activation1->state);
-
-    i = 0;
-    for (; i < metricsManager1->mAllAtomMatchers.size(); i++) {
-        if (metricsManager1->mAllAtomMatchers[i]->getId() ==
-            metric1ActivationTrigger2->atom_matcher_id()) {
-            break;
-        }
-    }
-    const auto& activation2 = metricProducer1->mEventActivationMap.at(i);
-    EXPECT_EQ(200 * NS_PER_SEC, activation2->ttl_ns);
-    EXPECT_EQ(0, activation2->start_ns);
-    EXPECT_EQ(kNotActive, activation2->state);
-    // }}}------------------------------------------------------------------------------
-
-    // Trigger Activation 1 for Metric 1
-    std::vector<int> attributionUids = {111};
-    std::vector<string> attributionTags = {"App1"};
-    std::unique_ptr<LogEvent> event =
-            CreateAcquireWakelockEvent(timeBase1 + 100, attributionUids, attributionTags, "wl1");
-    processor->OnLogEvent(event.get());
-
-    // Metric 1 is not active; Activation 1 set to kActiveOnBoot
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_FALSE(metricProducer1->isActive());
-    EXPECT_EQ(0, activation1->start_ns);
-    EXPECT_EQ(kActiveOnBoot, activation1->state);
-    EXPECT_EQ(0, activation2->start_ns);
-    EXPECT_EQ(kNotActive, activation2->state);
-
-    EXPECT_TRUE(metricProducer2->isActive());
-    // }}}-----------------------------------------------------------------------------
-
-    // Simulate shutdown by saving state to disk
-    int64_t shutDownTime = timeBase1 + 100 * NS_PER_SEC;
-    processor->SaveActiveConfigsToDisk(shutDownTime);
-    EXPECT_FALSE(metricProducer1->isActive());
-    int64_t ttl1 = metric1ActivationTrigger1->ttl_seconds() * NS_PER_SEC;
-
-    // Simulate device restarted state by creating new instance of StatsLogProcessor with the
-    // same config.
-    long timeBase2 = 1000;
-    sp<StatsLogProcessor> processor2 =
-            CreateStatsLogProcessor(timeBase2, timeBase2, config1, cfgKey1);
-
-    // Metric 1 is not active.
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    ASSERT_EQ(1, processor2->mMetricsManagers.size());
-    it = processor2->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor2->mMetricsManagers.end());
-    auto& metricsManager1001 = it->second;
-    EXPECT_TRUE(metricsManager1001->isActive());
-
-    metricIt = metricsManager1001->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1001->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId1) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1001->mAllMetricProducers.end());
-    auto& metricProducer1001 = *metricIt;
-    EXPECT_FALSE(metricProducer1001->isActive());
-
-    metricIt = metricsManager1001->mAllMetricProducers.begin();
-    for (; metricIt != metricsManager1001->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId2) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManager1001->mAllMetricProducers.end());
-    auto& metricProducer1002 = *metricIt;
-    EXPECT_TRUE(metricProducer1002->isActive());
-
-    i = 0;
-    for (; i < metricsManager1001->mAllAtomMatchers.size(); i++) {
-        if (metricsManager1001->mAllAtomMatchers[i]->getId() ==
-            metric1ActivationTrigger1->atom_matcher_id()) {
-            break;
-        }
-    }
-    const auto& activation1001_1 = metricProducer1001->mEventActivationMap.at(i);
-    EXPECT_EQ(100 * NS_PER_SEC, activation1001_1->ttl_ns);
-    EXPECT_EQ(0, activation1001_1->start_ns);
-    EXPECT_EQ(kNotActive, activation1001_1->state);
-
-    i = 0;
-    for (; i < metricsManager1001->mAllAtomMatchers.size(); i++) {
-        if (metricsManager1001->mAllAtomMatchers[i]->getId() ==
-            metric1ActivationTrigger2->atom_matcher_id()) {
-            break;
-        }
-    }
-
-    const auto& activation1001_2 = metricProducer1001->mEventActivationMap.at(i);
-    EXPECT_EQ(200 * NS_PER_SEC, activation1001_2->ttl_ns);
-    EXPECT_EQ(0, activation1001_2->start_ns);
-    EXPECT_EQ(kNotActive, activation1001_2->state);
-    // }}}-----------------------------------------------------------------------------------
-
-    // Load saved state from disk.
-    processor2->LoadActiveConfigsFromDisk();
-
-    // Metric 1 active; Activation 1 is active, Activation 2 is not active
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_TRUE(metricProducer1001->isActive());
-    EXPECT_EQ(timeBase2 + ttl1 - activation1001_1->ttl_ns, activation1001_1->start_ns);
-    EXPECT_EQ(kActive, activation1001_1->state);
-    EXPECT_EQ(0, activation1001_2->start_ns);
-    EXPECT_EQ(kNotActive, activation1001_2->state);
-
-    EXPECT_TRUE(metricProducer1002->isActive());
-    // }}}--------------------------------------------------------------------------------
-
-    // Trigger Activation 2 for Metric 1.
-    auto screenOnEvent =
-            CreateScreenStateChangedEvent(timeBase2 + 200, android::view::DISPLAY_STATE_ON);
-    processor2->OnLogEvent(screenOnEvent.get());
-
-    // Metric 1 active; Activation 1 is active, Activation 2 is set to kActiveOnBoot
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_TRUE(metricProducer1001->isActive());
-    EXPECT_EQ(timeBase2 + ttl1 - activation1001_1->ttl_ns, activation1001_1->start_ns);
-    EXPECT_EQ(kActive, activation1001_1->state);
-    EXPECT_EQ(0, activation1001_2->start_ns);
-    EXPECT_EQ(kActiveOnBoot, activation1001_2->state);
-
-    EXPECT_TRUE(metricProducer1002->isActive());
-    // }}}---------------------------------------------------------------------------
-
-    // Simulate shutdown by saving state to disk
-    shutDownTime = timeBase2 + 50 * NS_PER_SEC;
-    processor2->SaveActiveConfigsToDisk(shutDownTime);
-    EXPECT_TRUE(metricProducer1001->isActive());
-    EXPECT_TRUE(metricProducer1002->isActive());
-    ttl1 = timeBase2 + metric1ActivationTrigger1->ttl_seconds() * NS_PER_SEC - shutDownTime;
-    int64_t ttl2 = metric1ActivationTrigger2->ttl_seconds() * NS_PER_SEC;
-
-    // Simulate device restarted state by creating new instance of StatsLogProcessor with the
-    // same config.
-    long timeBase3 = timeBase2 + 120 * NS_PER_SEC;
-    sp<StatsLogProcessor> processor3 =
-            CreateStatsLogProcessor(timeBase3, timeBase3, config1, cfgKey1);
-
-    // Metric 1 is not active.
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    ASSERT_EQ(1, processor3->mMetricsManagers.size());
-    it = processor3->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor3->mMetricsManagers.end());
-    auto& metricsManagerTimeBase3 = it->second;
-    EXPECT_TRUE(metricsManagerTimeBase3->isActive());
-
-    metricIt = metricsManagerTimeBase3->mAllMetricProducers.begin();
-    for (; metricIt != metricsManagerTimeBase3->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId1) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManagerTimeBase3->mAllMetricProducers.end());
-    auto& metricProducerTimeBase3_1 = *metricIt;
-    EXPECT_FALSE(metricProducerTimeBase3_1->isActive());
-
-    metricIt = metricsManagerTimeBase3->mAllMetricProducers.begin();
-    for (; metricIt != metricsManagerTimeBase3->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId2) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManagerTimeBase3->mAllMetricProducers.end());
-    auto& metricProducerTimeBase3_2 = *metricIt;
-    EXPECT_TRUE(metricProducerTimeBase3_2->isActive());
-
-    i = 0;
-    for (; i < metricsManagerTimeBase3->mAllAtomMatchers.size(); i++) {
-        if (metricsManagerTimeBase3->mAllAtomMatchers[i]->getId() ==
-            metric1ActivationTrigger1->atom_matcher_id()) {
-            break;
-        }
-    }
-    const auto& activationTimeBase3_1 = metricProducerTimeBase3_1->mEventActivationMap.at(i);
-    EXPECT_EQ(100 * NS_PER_SEC, activationTimeBase3_1->ttl_ns);
-    EXPECT_EQ(0, activationTimeBase3_1->start_ns);
-    EXPECT_EQ(kNotActive, activationTimeBase3_1->state);
-
-    i = 0;
-    for (; i < metricsManagerTimeBase3->mAllAtomMatchers.size(); i++) {
-        if (metricsManagerTimeBase3->mAllAtomMatchers[i]->getId() ==
-            metric1ActivationTrigger2->atom_matcher_id()) {
-            break;
-        }
-    }
-
-    const auto& activationTimeBase3_2 = metricProducerTimeBase3_1->mEventActivationMap.at(i);
-    EXPECT_EQ(200 * NS_PER_SEC, activationTimeBase3_2->ttl_ns);
-    EXPECT_EQ(0, activationTimeBase3_2->start_ns);
-    EXPECT_EQ(kNotActive, activationTimeBase3_2->state);
-
-    EXPECT_TRUE(metricProducerTimeBase3_2->isActive());
-    // }}}----------------------------------------------------------------------------------
-
-    // Load saved state from disk.
-    processor3->LoadActiveConfigsFromDisk();
-
-    // Metric 1 active: Activation 1 is active, Activation 2 is active
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_TRUE(metricProducerTimeBase3_1->isActive());
-    EXPECT_EQ(timeBase3 + ttl1 - activationTimeBase3_1->ttl_ns, activationTimeBase3_1->start_ns);
-    EXPECT_EQ(kActive, activationTimeBase3_1->state);
-    EXPECT_EQ(timeBase3 + ttl2 - activationTimeBase3_2->ttl_ns, activationTimeBase3_2->start_ns);
-    EXPECT_EQ(kActive, activationTimeBase3_2->state);
-
-    EXPECT_TRUE(metricProducerTimeBase3_2->isActive());
-    // }}}-------------------------------------------------------------------------------
-
-    // Trigger Activation 2 for Metric 1 again.
-    screenOnEvent = CreateScreenStateChangedEvent(timeBase3 + 100 * NS_PER_SEC,
-                                                  android::view::DISPLAY_STATE_ON);
-    processor3->OnLogEvent(screenOnEvent.get());
-
-    // Metric 1 active; Activation 1 is not active, Activation 2 is set to active
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_TRUE(metricProducerTimeBase3_1->isActive());
-    EXPECT_EQ(kNotActive, activationTimeBase3_1->state);
-    EXPECT_EQ(timeBase3 + ttl2 - activationTimeBase3_2->ttl_ns, activationTimeBase3_2->start_ns);
-    EXPECT_EQ(kActive, activationTimeBase3_2->state);
-
-    EXPECT_TRUE(metricProducerTimeBase3_2->isActive());
-    // }}}---------------------------------------------------------------------------
-
-    // Simulate shutdown by saving state to disk.
-    shutDownTime = timeBase3 + 500 * NS_PER_SEC;
-    processor3->SaveActiveConfigsToDisk(shutDownTime);
-    EXPECT_TRUE(metricProducer1001->isActive());
-    EXPECT_TRUE(metricProducer1002->isActive());
-    ttl1 = timeBase3 + ttl1 - shutDownTime;
-    ttl2 = timeBase3 + metric1ActivationTrigger2->ttl_seconds() * NS_PER_SEC - shutDownTime;
-
-    // Simulate device restarted state by creating new instance of StatsLogProcessor with the
-    // same config.
-    long timeBase4 = timeBase3 + 600 * NS_PER_SEC;
-    sp<StatsLogProcessor> processor4 =
-            CreateStatsLogProcessor(timeBase4, timeBase4, config1, cfgKey1);
-
-    // Metric 1 is not active.
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    ASSERT_EQ(1, processor4->mMetricsManagers.size());
-    it = processor4->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor4->mMetricsManagers.end());
-    auto& metricsManagerTimeBase4 = it->second;
-    EXPECT_TRUE(metricsManagerTimeBase4->isActive());
-
-    metricIt = metricsManagerTimeBase4->mAllMetricProducers.begin();
-    for (; metricIt != metricsManagerTimeBase4->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId1) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManagerTimeBase4->mAllMetricProducers.end());
-    auto& metricProducerTimeBase4_1 = *metricIt;
-    EXPECT_FALSE(metricProducerTimeBase4_1->isActive());
-
-    metricIt = metricsManagerTimeBase4->mAllMetricProducers.begin();
-    for (; metricIt != metricsManagerTimeBase4->mAllMetricProducers.end(); metricIt++) {
-        if ((*metricIt)->getMetricId() == metricId2) {
-            break;
-        }
-    }
-    EXPECT_TRUE(metricIt != metricsManagerTimeBase4->mAllMetricProducers.end());
-    auto& metricProducerTimeBase4_2 = *metricIt;
-    EXPECT_TRUE(metricProducerTimeBase4_2->isActive());
-
-    i = 0;
-    for (; i < metricsManagerTimeBase4->mAllAtomMatchers.size(); i++) {
-        if (metricsManagerTimeBase4->mAllAtomMatchers[i]->getId() ==
-            metric1ActivationTrigger1->atom_matcher_id()) {
-            break;
-        }
-    }
-    const auto& activationTimeBase4_1 = metricProducerTimeBase4_1->mEventActivationMap.at(i);
-    EXPECT_EQ(100 * NS_PER_SEC, activationTimeBase4_1->ttl_ns);
-    EXPECT_EQ(0, activationTimeBase4_1->start_ns);
-    EXPECT_EQ(kNotActive, activationTimeBase4_1->state);
-
-    i = 0;
-    for (; i < metricsManagerTimeBase4->mAllAtomMatchers.size(); i++) {
-        if (metricsManagerTimeBase4->mAllAtomMatchers[i]->getId() ==
-            metric1ActivationTrigger2->atom_matcher_id()) {
-            break;
-        }
-    }
-
-    const auto& activationTimeBase4_2 = metricProducerTimeBase4_1->mEventActivationMap.at(i);
-    EXPECT_EQ(200 * NS_PER_SEC, activationTimeBase4_2->ttl_ns);
-    EXPECT_EQ(0, activationTimeBase4_2->start_ns);
-    EXPECT_EQ(kNotActive, activationTimeBase4_2->state);
-
-    EXPECT_TRUE(metricProducerTimeBase4_2->isActive());
-    // }}}----------------------------------------------------------------------------------
-
-    // Load saved state from disk.
-    processor4->LoadActiveConfigsFromDisk();
-
-    // Metric 1 active: Activation 1 is not active, Activation 2 is not active
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_FALSE(metricProducerTimeBase4_1->isActive());
-    EXPECT_EQ(kNotActive, activationTimeBase4_1->state);
-    EXPECT_EQ(kNotActive, activationTimeBase4_2->state);
-
-    EXPECT_TRUE(metricProducerTimeBase4_2->isActive());
-    // }}}-------------------------------------------------------------------------------
-}
-
-TEST(StatsLogProcessorTest, TestActivationOnBootMultipleActivationsDifferentActivationTypes) {
-    int uid = 1111;
-
-    // Create config with 2 metrics:
-    // Metric 1: Activate on boot with 2 activations
-    // Metric 2: Always active
-    StatsdConfig config1;
-    config1.set_id(12341);
-    config1.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    *config1.add_atom_matcher() = wakelockAcquireMatcher;
-    *config1.add_atom_matcher() = screenOnMatcher;
-
-    long metricId1 = 1234561;
-    long metricId2 = 1234562;
-
-    auto countMetric1 = config1.add_count_metric();
-    countMetric1->set_id(metricId1);
-    countMetric1->set_what(wakelockAcquireMatcher.id());
-    countMetric1->set_bucket(FIVE_MINUTES);
-
-    auto countMetric2 = config1.add_count_metric();
-    countMetric2->set_id(metricId2);
-    countMetric2->set_what(wakelockAcquireMatcher.id());
-    countMetric2->set_bucket(FIVE_MINUTES);
-
-    auto metric1Activation = config1.add_metric_activation();
-    metric1Activation->set_metric_id(metricId1);
-    metric1Activation->set_activation_type(ACTIVATE_ON_BOOT);
-    auto metric1ActivationTrigger1 = metric1Activation->add_event_activation();
-    metric1ActivationTrigger1->set_atom_matcher_id(wakelockAcquireMatcher.id());
-    metric1ActivationTrigger1->set_ttl_seconds(100);
-    auto metric1ActivationTrigger2 = metric1Activation->add_event_activation();
-    metric1ActivationTrigger2->set_atom_matcher_id(screenOnMatcher.id());
-    metric1ActivationTrigger2->set_ttl_seconds(200);
-    metric1ActivationTrigger2->set_activation_type(ACTIVATE_IMMEDIATELY);
-
-    ConfigKey cfgKey1(uid, 12341);
-    long timeBase1 = 1;
-    sp<StatsLogProcessor> processor1 =
-            CreateStatsLogProcessor(timeBase1, timeBase1, config1, cfgKey1);
-
-    // Metric 1 is not active.
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    ASSERT_EQ(1, processor1->mMetricsManagers.size());
-    auto it = processor1->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor1->mMetricsManagers.end());
-    auto& metricsManager1 = it->second;
-    EXPECT_TRUE(metricsManager1->isActive());
-
-    ASSERT_EQ(metricsManager1->mAllMetricProducers.size(), 2);
-    // We assume that the index of a MetricProducer within the mAllMetricProducers
-    // array follows the order in which metrics are added to the config.
-    auto& metricProducer1_1 = metricsManager1->mAllMetricProducers[0];
-    EXPECT_EQ(metricProducer1_1->getMetricId(), metricId1);
-    EXPECT_FALSE(metricProducer1_1->isActive());  // inactive due to associated MetricActivation
-
-    auto& metricProducer1_2 = metricsManager1->mAllMetricProducers[1];
-    EXPECT_EQ(metricProducer1_2->getMetricId(), metricId2);
-    EXPECT_TRUE(metricProducer1_2->isActive());
-
-    ASSERT_EQ(metricProducer1_1->mEventActivationMap.size(), 2);
-    // The key in mEventActivationMap is the index of the associated atom matcher. We assume
-    // that matchers are indexed in the order that they are added to the config.
-    const auto& activation1_1_1 = metricProducer1_1->mEventActivationMap.at(0);
-    EXPECT_EQ(100 * NS_PER_SEC, activation1_1_1->ttl_ns);
-    EXPECT_EQ(0, activation1_1_1->start_ns);
-    EXPECT_EQ(kNotActive, activation1_1_1->state);
-    EXPECT_EQ(ACTIVATE_ON_BOOT, activation1_1_1->activationType);
-
-    const auto& activation1_1_2 = metricProducer1_1->mEventActivationMap.at(1);
-    EXPECT_EQ(200 * NS_PER_SEC, activation1_1_2->ttl_ns);
-    EXPECT_EQ(0, activation1_1_2->start_ns);
-    EXPECT_EQ(kNotActive, activation1_1_2->state);
-    EXPECT_EQ(ACTIVATE_IMMEDIATELY, activation1_1_2->activationType);
-    // }}}------------------------------------------------------------------------------
-
-    // Trigger Activation 1 for Metric 1
-    std::vector<int> attributionUids = {111};
-    std::vector<string> attributionTags = {"App1"};
-    std::unique_ptr<LogEvent> event =
-            CreateAcquireWakelockEvent(timeBase1 + 100, attributionUids, attributionTags, "wl1");
-    processor1->OnLogEvent(event.get());
-
-    // Metric 1 is not active; Activation 1 set to kActiveOnBoot
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_FALSE(metricProducer1_1->isActive());
-    EXPECT_EQ(0, activation1_1_1->start_ns);
-    EXPECT_EQ(kActiveOnBoot, activation1_1_1->state);
-    EXPECT_EQ(0, activation1_1_2->start_ns);
-    EXPECT_EQ(kNotActive, activation1_1_2->state);
-
-    EXPECT_TRUE(metricProducer1_2->isActive());
-    // }}}-----------------------------------------------------------------------------
-
-    // Simulate shutdown by saving state to disk
-    int64_t shutDownTime = timeBase1 + 100 * NS_PER_SEC;
-    processor1->SaveActiveConfigsToDisk(shutDownTime);
-    EXPECT_FALSE(metricProducer1_1->isActive());
-
-    // Simulate device restarted state by creating new instance of StatsLogProcessor with the
-    // same config.
-    long timeBase2 = 1000;
-    sp<StatsLogProcessor> processor2 =
-            CreateStatsLogProcessor(timeBase2, timeBase2, config1, cfgKey1);
-
-    // Metric 1 is not active.
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    ASSERT_EQ(1, processor2->mMetricsManagers.size());
-    it = processor2->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor2->mMetricsManagers.end());
-    auto& metricsManager2 = it->second;
-    EXPECT_TRUE(metricsManager2->isActive());
-
-    ASSERT_EQ(metricsManager2->mAllMetricProducers.size(), 2);
-    // We assume that the index of a MetricProducer within the mAllMetricProducers
-    // array follows the order in which metrics are added to the config.
-    auto& metricProducer2_1 = metricsManager2->mAllMetricProducers[0];
-    EXPECT_EQ(metricProducer2_1->getMetricId(), metricId1);
-    EXPECT_FALSE(metricProducer2_1->isActive());
-
-    auto& metricProducer2_2 = metricsManager2->mAllMetricProducers[1];
-    EXPECT_EQ(metricProducer2_2->getMetricId(), metricId2);
-    EXPECT_TRUE(metricProducer2_2->isActive());
-
-    ASSERT_EQ(metricProducer2_1->mEventActivationMap.size(), 2);
-    // The key in mEventActivationMap is the index of the associated atom matcher. We assume
-    // that matchers are indexed in the order that they are added to the config.
-    const auto& activation2_1_1 = metricProducer2_1->mEventActivationMap.at(0);
-    EXPECT_EQ(100 * NS_PER_SEC, activation2_1_1->ttl_ns);
-    EXPECT_EQ(0, activation2_1_1->start_ns);
-    EXPECT_EQ(kNotActive, activation2_1_1->state);
-    EXPECT_EQ(ACTIVATE_ON_BOOT, activation2_1_1->activationType);
-
-    const auto& activation2_1_2 = metricProducer2_1->mEventActivationMap.at(1);
-    EXPECT_EQ(200 * NS_PER_SEC, activation2_1_2->ttl_ns);
-    EXPECT_EQ(0, activation2_1_2->start_ns);
-    EXPECT_EQ(kNotActive, activation2_1_2->state);
-    EXPECT_EQ(ACTIVATE_IMMEDIATELY, activation2_1_2->activationType);
-    // }}}-----------------------------------------------------------------------------------
-
-    // Load saved state from disk.
-    processor2->LoadActiveConfigsFromDisk();
-
-    // Metric 1 active; Activation 1 is active, Activation 2 is not active
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_TRUE(metricProducer2_1->isActive());
-    int64_t ttl1 = metric1ActivationTrigger1->ttl_seconds() * NS_PER_SEC;
-    EXPECT_EQ(timeBase2 + ttl1 - activation2_1_1->ttl_ns, activation2_1_1->start_ns);
-    EXPECT_EQ(kActive, activation2_1_1->state);
-    EXPECT_EQ(0, activation2_1_2->start_ns);
-    EXPECT_EQ(kNotActive, activation2_1_2->state);
-
-    EXPECT_TRUE(metricProducer2_2->isActive());
-    // }}}--------------------------------------------------------------------------------
-
-    // Trigger Activation 2 for Metric 1.
-    auto screenOnEvent =
-            CreateScreenStateChangedEvent(timeBase2 + 200, android::view::DISPLAY_STATE_ON);
-    processor2->OnLogEvent(screenOnEvent.get());
-
-    // Metric 1 active; Activation 1 is active, Activation 2 is active
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_TRUE(metricProducer2_1->isActive());
-    EXPECT_EQ(timeBase2 + ttl1 - activation2_1_1->ttl_ns, activation2_1_1->start_ns);
-    EXPECT_EQ(kActive, activation2_1_1->state);
-    EXPECT_EQ(screenOnEvent->GetElapsedTimestampNs(), activation2_1_2->start_ns);
-    EXPECT_EQ(kActive, activation2_1_2->state);
-
-    EXPECT_TRUE(metricProducer2_2->isActive());
-    // }}}---------------------------------------------------------------------------
-
-    // Simulate shutdown by saving state to disk
-    shutDownTime = timeBase2 + 50 * NS_PER_SEC;
-    processor2->SaveActiveConfigsToDisk(shutDownTime);
-    EXPECT_TRUE(metricProducer2_1->isActive());
-    EXPECT_TRUE(metricProducer2_2->isActive());
-    ttl1 -= shutDownTime - timeBase2;
-    int64_t ttl2 = metric1ActivationTrigger2->ttl_seconds() * NS_PER_SEC -
-                   (shutDownTime - screenOnEvent->GetElapsedTimestampNs());
-
-    // Simulate device restarted state by creating new instance of StatsLogProcessor with the
-    // same config.
-    long timeBase3 = timeBase2 + 120 * NS_PER_SEC;
-    sp<StatsLogProcessor> processor3 =
-            CreateStatsLogProcessor(timeBase3, timeBase3, config1, cfgKey1);
-
-    // Metric 1 is not active.
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    ASSERT_EQ(1, processor3->mMetricsManagers.size());
-    it = processor3->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor3->mMetricsManagers.end());
-    auto& metricsManager3 = it->second;
-    EXPECT_TRUE(metricsManager3->isActive());
-
-    ASSERT_EQ(metricsManager3->mAllMetricProducers.size(), 2);
-    // We assume that the index of a MetricProducer within the mAllMetricProducers
-    // array follows the order in which metrics are added to the config.
-    auto& metricProducer3_1 = metricsManager3->mAllMetricProducers[0];
-    EXPECT_EQ(metricProducer3_1->getMetricId(), metricId1);
-    EXPECT_FALSE(metricProducer3_1->isActive());
-
-    auto& metricProducer3_2 = metricsManager3->mAllMetricProducers[1];
-    EXPECT_EQ(metricProducer3_2->getMetricId(), metricId2);
-    EXPECT_TRUE(metricProducer3_2->isActive());
-
-    ASSERT_EQ(metricProducer3_1->mEventActivationMap.size(), 2);
-    // The key in mEventActivationMap is the index of the associated atom matcher. We assume
-    // that matchers are indexed in the order that they are added to the config.
-    const auto& activation3_1_1 = metricProducer3_1->mEventActivationMap.at(0);
-    EXPECT_EQ(100 * NS_PER_SEC, activation3_1_1->ttl_ns);
-    EXPECT_EQ(0, activation3_1_1->start_ns);
-    EXPECT_EQ(kNotActive, activation3_1_1->state);
-    EXPECT_EQ(ACTIVATE_ON_BOOT, activation3_1_1->activationType);
-
-    const auto& activation3_1_2 = metricProducer3_1->mEventActivationMap.at(1);
-    EXPECT_EQ(200 * NS_PER_SEC, activation3_1_2->ttl_ns);
-    EXPECT_EQ(0, activation3_1_2->start_ns);
-    EXPECT_EQ(kNotActive, activation3_1_2->state);
-    EXPECT_EQ(ACTIVATE_IMMEDIATELY, activation3_1_2->activationType);
-    // }}}----------------------------------------------------------------------------------
-
-    // Load saved state from disk.
-    processor3->LoadActiveConfigsFromDisk();
-
-    // Metric 1 active: Activation 1 is active, Activation 2 is active
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_TRUE(metricProducer3_1->isActive());
-    EXPECT_EQ(timeBase3 + ttl1 - activation3_1_1->ttl_ns, activation3_1_1->start_ns);
-    EXPECT_EQ(kActive, activation3_1_1->state);
-    EXPECT_EQ(timeBase3 + ttl2 - activation3_1_2->ttl_ns, activation3_1_2->start_ns);
-    EXPECT_EQ(kActive, activation3_1_2->state);
-
-    EXPECT_TRUE(metricProducer3_2->isActive());
-    // }}}-------------------------------------------------------------------------------
-
-    // Trigger Activation 2 for Metric 1 again.
-    screenOnEvent = CreateScreenStateChangedEvent(timeBase3 + 100 * NS_PER_SEC,
-                                                  android::view::DISPLAY_STATE_ON);
-    processor3->OnLogEvent(screenOnEvent.get());
-
-    // Metric 1 active; Activation 1 is inactive (above screenOnEvent causes ttl1 to expire),
-    //                  Activation 2 is set to active
-    // Metric 2 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_TRUE(metricProducer3_1->isActive());
-    EXPECT_EQ(kNotActive, activation3_1_1->state);
-    EXPECT_EQ(screenOnEvent->GetElapsedTimestampNs(), activation3_1_2->start_ns);
-    EXPECT_EQ(kActive, activation3_1_2->state);
-
-    EXPECT_TRUE(metricProducer3_2->isActive());
-    // }}}---------------------------------------------------------------------------
-}
-
-TEST(StatsLogProcessorTest, TestActivationsPersistAcrossSystemServerRestart) {
-    int uid = 9876;
-    long configId = 12341;
-
-    // Create config with 3 metrics:
-    // Metric 1: Activate on 2 activations, 1 on boot, 1 immediate.
-    // Metric 2: Activate on 2 activations, 1 on boot, 1 immediate.
-    // Metric 3: Always active
-    StatsdConfig config1;
-    config1.set_id(configId);
-    config1.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    auto jobStartMatcher = CreateStartScheduledJobAtomMatcher();
-    auto jobFinishMatcher = CreateFinishScheduledJobAtomMatcher();
-    *config1.add_atom_matcher() = wakelockAcquireMatcher;
-    *config1.add_atom_matcher() = screenOnMatcher;
-    *config1.add_atom_matcher() = jobStartMatcher;
-    *config1.add_atom_matcher() = jobFinishMatcher;
-
-    long metricId1 = 1234561;
-    long metricId2 = 1234562;
-    long metricId3 = 1234563;
-
-    auto countMetric1 = config1.add_count_metric();
-    countMetric1->set_id(metricId1);
-    countMetric1->set_what(wakelockAcquireMatcher.id());
-    countMetric1->set_bucket(FIVE_MINUTES);
-
-    auto countMetric2 = config1.add_count_metric();
-    countMetric2->set_id(metricId2);
-    countMetric2->set_what(wakelockAcquireMatcher.id());
-    countMetric2->set_bucket(FIVE_MINUTES);
-
-    auto countMetric3 = config1.add_count_metric();
-    countMetric3->set_id(metricId3);
-    countMetric3->set_what(wakelockAcquireMatcher.id());
-    countMetric3->set_bucket(FIVE_MINUTES);
-
-    // Metric 1 activates on boot for wakelock acquire, immediately for screen on.
-    auto metric1Activation = config1.add_metric_activation();
-    metric1Activation->set_metric_id(metricId1);
-    auto metric1ActivationTrigger1 = metric1Activation->add_event_activation();
-    metric1ActivationTrigger1->set_atom_matcher_id(wakelockAcquireMatcher.id());
-    metric1ActivationTrigger1->set_ttl_seconds(100);
-    metric1ActivationTrigger1->set_activation_type(ACTIVATE_ON_BOOT);
-    auto metric1ActivationTrigger2 = metric1Activation->add_event_activation();
-    metric1ActivationTrigger2->set_atom_matcher_id(screenOnMatcher.id());
-    metric1ActivationTrigger2->set_ttl_seconds(200);
-    metric1ActivationTrigger2->set_activation_type(ACTIVATE_IMMEDIATELY);
-
-    // Metric 2 activates on boot for scheduled job start, immediately for scheduled job finish.
-    auto metric2Activation = config1.add_metric_activation();
-    metric2Activation->set_metric_id(metricId2);
-    auto metric2ActivationTrigger1 = metric2Activation->add_event_activation();
-    metric2ActivationTrigger1->set_atom_matcher_id(jobStartMatcher.id());
-    metric2ActivationTrigger1->set_ttl_seconds(100);
-    metric2ActivationTrigger1->set_activation_type(ACTIVATE_ON_BOOT);
-    auto metric2ActivationTrigger2 = metric2Activation->add_event_activation();
-    metric2ActivationTrigger2->set_atom_matcher_id(jobFinishMatcher.id());
-    metric2ActivationTrigger2->set_ttl_seconds(200);
-    metric2ActivationTrigger2->set_activation_type(ACTIVATE_IMMEDIATELY);
-
-    // Send the config.
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    string serialized = config1.SerializeAsString();
-    service->addConfigurationChecked(uid, configId, {serialized.begin(), serialized.end()});
-
-    // Make sure the config is stored on disk. Otherwise, we will not reset on system server death.
-    StatsdConfig tmpConfig;
-    ConfigKey cfgKey1(uid, configId);
-    EXPECT_TRUE(StorageManager::readConfigFromDisk(cfgKey1, &tmpConfig));
-
-    // Metric 1 is not active.
-    // Metric 2 is not active.
-    // Metric 3 is active.
-    // {{{---------------------------------------------------------------------------
-    sp<StatsLogProcessor> processor = service->mProcessor;
-    ASSERT_EQ(1, processor->mMetricsManagers.size());
-    auto it = processor->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor->mMetricsManagers.end());
-    auto& metricsManager1 = it->second;
-    EXPECT_TRUE(metricsManager1->isActive());
-    ASSERT_EQ(3, metricsManager1->mAllMetricProducers.size());
-
-    auto& metricProducer1 = metricsManager1->mAllMetricProducers[0];
-    EXPECT_EQ(metricId1, metricProducer1->getMetricId());
-    EXPECT_FALSE(metricProducer1->isActive());
-
-    auto& metricProducer2 = metricsManager1->mAllMetricProducers[1];
-    EXPECT_EQ(metricId2, metricProducer2->getMetricId());
-    EXPECT_FALSE(metricProducer2->isActive());
-
-    auto& metricProducer3 = metricsManager1->mAllMetricProducers[2];
-    EXPECT_EQ(metricId3, metricProducer3->getMetricId());
-    EXPECT_TRUE(metricProducer3->isActive());
-
-    // Check event activations.
-    ASSERT_EQ(metricsManager1->mAllAtomMatchers.size(), 4);
-    EXPECT_EQ(metricsManager1->mAllAtomMatchers[0]->getId(),
-              metric1ActivationTrigger1->atom_matcher_id());
-    const auto& activation1 = metricProducer1->mEventActivationMap.at(0);
-    EXPECT_EQ(100 * NS_PER_SEC, activation1->ttl_ns);
-    EXPECT_EQ(0, activation1->start_ns);
-    EXPECT_EQ(kNotActive, activation1->state);
-    EXPECT_EQ(ACTIVATE_ON_BOOT, activation1->activationType);
-
-    EXPECT_EQ(metricsManager1->mAllAtomMatchers[1]->getId(),
-              metric1ActivationTrigger2->atom_matcher_id());
-    const auto& activation2 = metricProducer1->mEventActivationMap.at(1);
-    EXPECT_EQ(200 * NS_PER_SEC, activation2->ttl_ns);
-    EXPECT_EQ(0, activation2->start_ns);
-    EXPECT_EQ(kNotActive, activation2->state);
-    EXPECT_EQ(ACTIVATE_IMMEDIATELY, activation2->activationType);
-
-    EXPECT_EQ(metricsManager1->mAllAtomMatchers[2]->getId(),
-              metric2ActivationTrigger1->atom_matcher_id());
-    const auto& activation3 = metricProducer2->mEventActivationMap.at(2);
-    EXPECT_EQ(100 * NS_PER_SEC, activation3->ttl_ns);
-    EXPECT_EQ(0, activation3->start_ns);
-    EXPECT_EQ(kNotActive, activation3->state);
-    EXPECT_EQ(ACTIVATE_ON_BOOT, activation3->activationType);
-
-    EXPECT_EQ(metricsManager1->mAllAtomMatchers[3]->getId(),
-              metric2ActivationTrigger2->atom_matcher_id());
-    const auto& activation4 = metricProducer2->mEventActivationMap.at(3);
-    EXPECT_EQ(200 * NS_PER_SEC, activation4->ttl_ns);
-    EXPECT_EQ(0, activation4->start_ns);
-    EXPECT_EQ(kNotActive, activation4->state);
-    EXPECT_EQ(ACTIVATE_IMMEDIATELY, activation4->activationType);
-    // }}}------------------------------------------------------------------------------
-
-    // Trigger Activation 1 for Metric 1. Should activate on boot.
-    // Trigger Activation 4 for Metric 2. Should activate immediately.
-    int64_t configAddedTimeNs = metricsManager1->mLastReportTimeNs;
-    std::vector<int> attributionUids = {111};
-    std::vector<string> attributionTags = {"App1"};
-    std::unique_ptr<LogEvent> event1 = CreateAcquireWakelockEvent(
-            1 + configAddedTimeNs, attributionUids, attributionTags, "wl1");
-    processor->OnLogEvent(event1.get());
-
-    std::unique_ptr<LogEvent> event2 = CreateFinishScheduledJobEvent(
-            2 + configAddedTimeNs, attributionUids, attributionTags, "finish1");
-    processor->OnLogEvent(event2.get());
-
-    // Metric 1 is not active; Activation 1 set to kActiveOnBoot
-    // Metric 2 is active. Activation 4 set to kActive
-    // Metric 3 is active.
-    // {{{---------------------------------------------------------------------------
-    EXPECT_FALSE(metricProducer1->isActive());
-    EXPECT_EQ(0, activation1->start_ns);
-    EXPECT_EQ(kActiveOnBoot, activation1->state);
-    EXPECT_EQ(0, activation2->start_ns);
-    EXPECT_EQ(kNotActive, activation2->state);
-
-    EXPECT_TRUE(metricProducer2->isActive());
-    EXPECT_EQ(0, activation3->start_ns);
-    EXPECT_EQ(kNotActive, activation3->state);
-    EXPECT_EQ(2 + configAddedTimeNs, activation4->start_ns);
-    EXPECT_EQ(kActive, activation4->state);
-
-    EXPECT_TRUE(metricProducer3->isActive());
-    // }}}-----------------------------------------------------------------------------
-
-    // Can't fake time with StatsService.
-    // Lets get a time close to the system server death time and make sure it's sane.
-    int64_t approximateSystemServerDeath = getElapsedRealtimeNs();
-    EXPECT_TRUE(approximateSystemServerDeath > 2 + configAddedTimeNs);
-    EXPECT_TRUE(approximateSystemServerDeath < NS_PER_SEC + configAddedTimeNs);
-
-    // System server dies.
-    service->statsCompanionServiceDiedImpl();
-
-    // We should have a new metrics manager. Lets get it and ensure activation status is restored.
-    // {{{---------------------------------------------------------------------------
-    ASSERT_EQ(1, processor->mMetricsManagers.size());
-    it = processor->mMetricsManagers.find(cfgKey1);
-    EXPECT_TRUE(it != processor->mMetricsManagers.end());
-    auto& metricsManager2 = it->second;
-    EXPECT_TRUE(metricsManager2->isActive());
-    ASSERT_EQ(3, metricsManager2->mAllMetricProducers.size());
-
-    auto& metricProducer1001 = metricsManager2->mAllMetricProducers[0];
-    EXPECT_EQ(metricId1, metricProducer1001->getMetricId());
-    EXPECT_FALSE(metricProducer1001->isActive());
-
-    auto& metricProducer1002 = metricsManager2->mAllMetricProducers[1];
-    EXPECT_EQ(metricId2, metricProducer1002->getMetricId());
-    EXPECT_TRUE(metricProducer1002->isActive());
-
-    auto& metricProducer1003 = metricsManager2->mAllMetricProducers[2];
-    EXPECT_EQ(metricId3, metricProducer1003->getMetricId());
-    EXPECT_TRUE(metricProducer1003->isActive());
-
-    // Check event activations.
-    // Activation 1 is kActiveOnBoot.
-    // Activation 2 and 3 are not active.
-    // Activation 4 is active.
-    ASSERT_EQ(metricsManager2->mAllAtomMatchers.size(), 4);
-    EXPECT_EQ(metricsManager2->mAllAtomMatchers[0]->getId(),
-              metric1ActivationTrigger1->atom_matcher_id());
-    const auto& activation1001 = metricProducer1001->mEventActivationMap.at(0);
-    EXPECT_EQ(100 * NS_PER_SEC, activation1001->ttl_ns);
-    EXPECT_EQ(0, activation1001->start_ns);
-    EXPECT_EQ(kActiveOnBoot, activation1001->state);
-    EXPECT_EQ(ACTIVATE_ON_BOOT, activation1001->activationType);
-
-    EXPECT_EQ(metricsManager2->mAllAtomMatchers[1]->getId(),
-              metric1ActivationTrigger2->atom_matcher_id());
-    const auto& activation1002 = metricProducer1001->mEventActivationMap.at(1);
-    EXPECT_EQ(200 * NS_PER_SEC, activation1002->ttl_ns);
-    EXPECT_EQ(0, activation1002->start_ns);
-    EXPECT_EQ(kNotActive, activation1002->state);
-    EXPECT_EQ(ACTIVATE_IMMEDIATELY, activation1002->activationType);
-
-    EXPECT_EQ(metricsManager2->mAllAtomMatchers[2]->getId(),
-              metric2ActivationTrigger1->atom_matcher_id());
-    const auto& activation1003 = metricProducer1002->mEventActivationMap.at(2);
-    EXPECT_EQ(100 * NS_PER_SEC, activation1003->ttl_ns);
-    EXPECT_EQ(0, activation1003->start_ns);
-    EXPECT_EQ(kNotActive, activation1003->state);
-    EXPECT_EQ(ACTIVATE_ON_BOOT, activation1003->activationType);
-
-    EXPECT_EQ(metricsManager2->mAllAtomMatchers[3]->getId(),
-              metric2ActivationTrigger2->atom_matcher_id());
-    const auto& activation1004 = metricProducer1002->mEventActivationMap.at(3);
-    EXPECT_EQ(200 * NS_PER_SEC, activation1004->ttl_ns);
-    EXPECT_EQ(2 + configAddedTimeNs, activation1004->start_ns);
-    EXPECT_EQ(kActive, activation1004->state);
-    EXPECT_EQ(ACTIVATE_IMMEDIATELY, activation1004->activationType);
-    // }}}------------------------------------------------------------------------------
-
-    // Clear the data stored on disk as a result of the system server death.
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey1, configAddedTimeNs + NS_PER_SEC, false, true, ADB_DUMP, FAST,
-                            &buffer);
-}
-
-TEST(StatsLogProcessorTest_mapIsolatedUidToHostUid, LogHostUid) {
-    int hostUid = 20;
-    int isolatedUid = 30;
-    uint64_t eventTimeNs = 12355;
-    int atomId = 89;
-    int field1 = 90;
-    int field2 = 28;
-    sp<MockUidMap> mockUidMap = makeMockUidMapForOneHost(hostUid, {isolatedUid});
-    ConfigKey cfgKey;
-    StatsdConfig config = MakeConfig(false);
-    sp<StatsLogProcessor> processor =
-            CreateStatsLogProcessor(1, 1, config, cfgKey, nullptr, 0, mockUidMap);
-
-    shared_ptr<LogEvent> logEvent = makeUidLogEvent(atomId, eventTimeNs, hostUid, field1, field2);
-
-    processor->OnLogEvent(logEvent.get());
-
-    const vector<FieldValue>* actualFieldValues = &logEvent->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(field1, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(field2, actualFieldValues->at(2).mValue.int_value);
-}
-
-TEST(StatsLogProcessorTest_mapIsolatedUidToHostUid, LogIsolatedUid) {
-    int hostUid = 20;
-    int isolatedUid = 30;
-    uint64_t eventTimeNs = 12355;
-    int atomId = 89;
-    int field1 = 90;
-    int field2 = 28;
-    sp<MockUidMap> mockUidMap = makeMockUidMapForOneHost(hostUid, {isolatedUid});
-    ConfigKey cfgKey;
-    StatsdConfig config = MakeConfig(false);
-    sp<StatsLogProcessor> processor =
-            CreateStatsLogProcessor(1, 1, config, cfgKey, nullptr, 0, mockUidMap);
-
-    shared_ptr<LogEvent> logEvent =
-            makeUidLogEvent(atomId, eventTimeNs, isolatedUid, field1, field2);
-
-    processor->OnLogEvent(logEvent.get());
-
-    const vector<FieldValue>* actualFieldValues = &logEvent->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(field1, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(field2, actualFieldValues->at(2).mValue.int_value);
-}
-
-TEST(StatsLogProcessorTest_mapIsolatedUidToHostUid, LogHostUidAttributionChain) {
-    int hostUid = 20;
-    int isolatedUid = 30;
-    uint64_t eventTimeNs = 12355;
-    int atomId = 89;
-    int field1 = 90;
-    int field2 = 28;
-    sp<MockUidMap> mockUidMap = makeMockUidMapForOneHost(hostUid, {isolatedUid});
-    ConfigKey cfgKey;
-    StatsdConfig config = MakeConfig(false);
-    sp<StatsLogProcessor> processor =
-            CreateStatsLogProcessor(1, 1, config, cfgKey, nullptr, 0, mockUidMap);
-
-    shared_ptr<LogEvent> logEvent = makeAttributionLogEvent(atomId, eventTimeNs, {hostUid, 200},
-                                                            {"tag1", "tag2"}, field1, field2);
-
-    processor->OnLogEvent(logEvent.get());
-
-    const vector<FieldValue>* actualFieldValues = &logEvent->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(200, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(field1, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(field2, actualFieldValues->at(5).mValue.int_value);
-}
-
-TEST(StatsLogProcessorTest_mapIsolatedUidToHostUid, LogIsolatedUidAttributionChain) {
-    int hostUid = 20;
-    int isolatedUid = 30;
-    uint64_t eventTimeNs = 12355;
-    int atomId = 89;
-    int field1 = 90;
-    int field2 = 28;
-    sp<MockUidMap> mockUidMap = makeMockUidMapForOneHost(hostUid, {isolatedUid});
-    ConfigKey cfgKey;
-    StatsdConfig config = MakeConfig(false);
-    sp<StatsLogProcessor> processor =
-            CreateStatsLogProcessor(1, 1, config, cfgKey, nullptr, 0, mockUidMap);
-
-    shared_ptr<LogEvent> logEvent = makeAttributionLogEvent(atomId, eventTimeNs, {isolatedUid, 200},
-                                                            {"tag1", "tag2"}, field1, field2);
-
-    processor->OnLogEvent(logEvent.get());
-
-    const vector<FieldValue>* actualFieldValues = &logEvent->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(200, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(field1, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(field2, actualFieldValues->at(5).mValue.int_value);
-}
-
-TEST(StatsLogProcessorTest, TestDumpReportWithoutErasingDataDoesNotUpdateTimestamp) {
-    int hostUid = 20;
-    int isolatedUid = 30;
-    sp<MockUidMap> mockUidMap = makeMockUidMapForOneHost(hostUid, {isolatedUid});
-    ConfigKey key(3, 4);
-
-    // TODO: All tests should not persist state on disk. This removes any reports that were present.
-    ProtoOutputStream proto;
-    StorageManager::appendConfigMetricsReport(key, &proto, /*erase data=*/true, /*isAdb=*/false);
-
-    StatsdConfig config = MakeConfig(false);
-    sp<StatsLogProcessor> processor =
-            CreateStatsLogProcessor(1, 1, config, key, nullptr, 0, mockUidMap);
-    vector<uint8_t> bytes;
-
-    int64_t dumpTime1Ns = 1 * NS_PER_SEC;
-    processor->onDumpReport(key, dumpTime1Ns, false /* include_current_bucket */,
-            true /* erase_data */, ADB_DUMP, FAST, &bytes);
-
-    ConfigMetricsReportList output;
-    output.ParseFromArray(bytes.data(), bytes.size());
-    EXPECT_EQ(output.reports_size(), 1);
-    EXPECT_EQ(output.reports(0).current_report_elapsed_nanos(), dumpTime1Ns);
-
-    int64_t dumpTime2Ns = 5 * NS_PER_SEC;
-    processor->onDumpReport(key, dumpTime2Ns, false /* include_current_bucket */,
-            false /* erase_data */, ADB_DUMP, FAST, &bytes);
-
-    // Check that the dump report without clearing data is successful.
-    output.ParseFromArray(bytes.data(), bytes.size());
-    EXPECT_EQ(output.reports_size(), 1);
-    EXPECT_EQ(output.reports(0).current_report_elapsed_nanos(), dumpTime2Ns);
-    EXPECT_EQ(output.reports(0).last_report_elapsed_nanos(), dumpTime1Ns);
-
-    int64_t dumpTime3Ns = 10 * NS_PER_SEC;
-    processor->onDumpReport(key, dumpTime3Ns, false /* include_current_bucket */,
-            true /* erase_data */, ADB_DUMP, FAST, &bytes);
-
-    // Check that the previous dump report that didn't clear data did not overwrite the first dump's
-    // timestamps.
-    output.ParseFromArray(bytes.data(), bytes.size());
-    EXPECT_EQ(output.reports_size(), 1);
-    EXPECT_EQ(output.reports(0).current_report_elapsed_nanos(), dumpTime3Ns);
-    EXPECT_EQ(output.reports(0).last_report_elapsed_nanos(), dumpTime1Ns);
-
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/StatsService_test.cpp b/cmds/statsd/tests/StatsService_test.cpp
deleted file mode 100644
index cc38c4a..0000000
--- a/cmds/statsd/tests/StatsService_test.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "StatsService.h"
-#include "config/ConfigKey.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-
-#include <android/binder_interface_utils.h>
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include <stdio.h>
-
-using namespace android;
-using namespace testing;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using android::util::ProtoOutputStream;
-using ::ndk::SharedRefBase;
-
-#ifdef __ANDROID__
-
-TEST(StatsServiceTest, TestAddConfig_simple) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    StatsdConfig config;
-    config.set_id(12345);
-    string serialized = config.SerializeAsString();
-
-    EXPECT_TRUE(
-            service->addConfigurationChecked(123, 12345, {serialized.begin(), serialized.end()}));
-}
-
-TEST(StatsServiceTest, TestAddConfig_empty) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    string serialized = "";
-
-    EXPECT_TRUE(
-            service->addConfigurationChecked(123, 12345, {serialized.begin(), serialized.end()}));
-}
-
-TEST(StatsServiceTest, TestAddConfig_invalid) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    string serialized = "Invalid config!";
-
-    EXPECT_FALSE(
-            service->addConfigurationChecked(123, 12345, {serialized.begin(), serialized.end()}));
-}
-
-TEST(StatsServiceTest, TestGetUidFromArgs) {
-    Vector<String8> args;
-    args.push(String8("-1"));
-    args.push(String8("0"));
-    args.push(String8("1"));
-    args.push(String8("a1"));
-    args.push(String8(""));
-
-    int32_t uid;
-
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    service->mEngBuild = true;
-
-    // "-1"
-    EXPECT_FALSE(service->getUidFromArgs(args, 0, uid));
-
-    // "0"
-    EXPECT_TRUE(service->getUidFromArgs(args, 1, uid));
-    EXPECT_EQ(0, uid);
-
-    // "1"
-    EXPECT_TRUE(service->getUidFromArgs(args, 2, uid));
-    EXPECT_EQ(1, uid);
-
-    // "a1"
-    EXPECT_FALSE(service->getUidFromArgs(args, 3, uid));
-
-    // ""
-    EXPECT_FALSE(service->getUidFromArgs(args, 4, uid));
-
-    // For a non-userdebug, uid "1" cannot be impersonated.
-    service->mEngBuild = false;
-    EXPECT_FALSE(service->getUidFromArgs(args, 2, uid));
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/UidMap_test.cpp b/cmds/statsd/tests/UidMap_test.cpp
deleted file mode 100644
index 33bdc64..0000000
--- a/cmds/statsd/tests/UidMap_test.cpp
+++ /dev/null
@@ -1,426 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "packages/UidMap.h"
-#include "StatsLogProcessor.h"
-#include "config/ConfigKey.h"
-#include "guardrail/StatsdStats.h"
-#include "logd/LogEvent.h"
-#include "hash.h"
-#include "statslog_statsdtest.h"
-#include "statsd_test_util.h"
-
-#include <android/util/ProtoOutputStream.h>
-#include <gtest/gtest.h>
-
-#include <stdio.h>
-
-using namespace android;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using android::util::ProtoOutputStream;
-using android::util::ProtoReader;
-
-#ifdef __ANDROID__
-const string kApp1 = "app1.sharing.1";
-const string kApp2 = "app2.sharing.1";
-
-TEST(UidMapTest, TestIsolatedUID) {
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    // Construct the processor with a no-op sendBroadcast function that does nothing.
-    StatsLogProcessor p(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-            [](const ConfigKey& key) { return true; },
-            [](const int&, const vector<int64_t>&) { return true; });
-
-    std::unique_ptr<LogEvent> addEvent = CreateIsolatedUidChangedEvent(
-            1 /*timestamp*/, 100 /*hostUid*/, 101 /*isolatedUid*/, 1 /*is_create*/);
-    EXPECT_EQ(101, m->getHostUidOrSelf(101));
-    p.OnLogEvent(addEvent.get());
-    EXPECT_EQ(100, m->getHostUidOrSelf(101));
-
-    std::unique_ptr<LogEvent> removeEvent = CreateIsolatedUidChangedEvent(
-            1 /*timestamp*/, 100 /*hostUid*/, 101 /*isolatedUid*/, 0 /*is_create*/);
-    p.OnLogEvent(removeEvent.get());
-    EXPECT_EQ(101, m->getHostUidOrSelf(101));
-}
-
-TEST(UidMapTest, TestMatching) {
-    UidMap m;
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-    vector<String16> apps;
-    vector<String16> versionStrings;
-    vector<String16> installers;
-
-    uids.push_back(1000);
-    uids.push_back(1000);
-    versionStrings.push_back(String16("v1"));
-    versionStrings.push_back(String16("v1"));
-    installers.push_back(String16(""));
-    installers.push_back(String16(""));
-    apps.push_back(String16(kApp1.c_str()));
-    apps.push_back(String16(kApp2.c_str()));
-    versions.push_back(4);
-    versions.push_back(5);
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-    EXPECT_TRUE(m.hasApp(1000, kApp1));
-    EXPECT_TRUE(m.hasApp(1000, kApp2));
-    EXPECT_FALSE(m.hasApp(1000, "not.app"));
-
-    std::set<string> name_set = m.getAppNamesFromUid(1000u, true /* returnNormalized */);
-    ASSERT_EQ(name_set.size(), 2u);
-    EXPECT_TRUE(name_set.find(kApp1) != name_set.end());
-    EXPECT_TRUE(name_set.find(kApp2) != name_set.end());
-
-    name_set = m.getAppNamesFromUid(12345, true /* returnNormalized */);
-    EXPECT_TRUE(name_set.empty());
-}
-
-TEST(UidMapTest, TestAddAndRemove) {
-    UidMap m;
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-    vector<String16> apps;
-    vector<String16> versionStrings;
-    vector<String16> installers;
-
-    uids.push_back(1000);
-    uids.push_back(1000);
-    versionStrings.push_back(String16("v1"));
-    versionStrings.push_back(String16("v1"));
-    installers.push_back(String16(""));
-    installers.push_back(String16(""));
-    apps.push_back(String16(kApp1.c_str()));
-    apps.push_back(String16(kApp2.c_str()));
-    versions.push_back(4);
-    versions.push_back(5);
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-
-    std::set<string> name_set = m.getAppNamesFromUid(1000, true /* returnNormalized */);
-    ASSERT_EQ(name_set.size(), 2u);
-    EXPECT_TRUE(name_set.find(kApp1) != name_set.end());
-    EXPECT_TRUE(name_set.find(kApp2) != name_set.end());
-
-    // Update the app1 version.
-    m.updateApp(2, String16(kApp1.c_str()), 1000, 40, String16("v40"), String16(""));
-    EXPECT_EQ(40, m.getAppVersion(1000, kApp1));
-
-    name_set = m.getAppNamesFromUid(1000, true /* returnNormalized */);
-    ASSERT_EQ(name_set.size(), 2u);
-    EXPECT_TRUE(name_set.find(kApp1) != name_set.end());
-    EXPECT_TRUE(name_set.find(kApp2) != name_set.end());
-
-    m.removeApp(3, String16(kApp1.c_str()), 1000);
-    EXPECT_FALSE(m.hasApp(1000, kApp1));
-    EXPECT_TRUE(m.hasApp(1000, kApp2));
-    name_set = m.getAppNamesFromUid(1000, true /* returnNormalized */);
-    ASSERT_EQ(name_set.size(), 1u);
-    EXPECT_TRUE(name_set.find(kApp1) == name_set.end());
-    EXPECT_TRUE(name_set.find(kApp2) != name_set.end());
-
-    // Remove app2.
-    m.removeApp(4, String16(kApp2.c_str()), 1000);
-    EXPECT_FALSE(m.hasApp(1000, kApp1));
-    EXPECT_FALSE(m.hasApp(1000, kApp2));
-    name_set = m.getAppNamesFromUid(1000, true /* returnNormalized */);
-    EXPECT_TRUE(name_set.empty());
-}
-
-TEST(UidMapTest, TestUpdateApp) {
-    UidMap m;
-    m.updateMap(1, {1000, 1000}, {4, 5}, {String16("v4"), String16("v5")},
-                {String16(kApp1.c_str()), String16(kApp2.c_str())}, {String16(""), String16("")});
-    std::set<string> name_set = m.getAppNamesFromUid(1000, true /* returnNormalized */);
-    ASSERT_EQ(name_set.size(), 2u);
-    EXPECT_TRUE(name_set.find(kApp1) != name_set.end());
-    EXPECT_TRUE(name_set.find(kApp2) != name_set.end());
-
-    // Adds a new name for uid 1000.
-    m.updateApp(2, String16("NeW_aPP1_NAmE"), 1000, 40, String16("v40"), String16(""));
-    name_set = m.getAppNamesFromUid(1000, true /* returnNormalized */);
-    ASSERT_EQ(name_set.size(), 3u);
-    EXPECT_TRUE(name_set.find(kApp1) != name_set.end());
-    EXPECT_TRUE(name_set.find(kApp2) != name_set.end());
-    EXPECT_TRUE(name_set.find("NeW_aPP1_NAmE") == name_set.end());
-    EXPECT_TRUE(name_set.find("new_app1_name") != name_set.end());
-
-    // This name is also reused by another uid 2000.
-    m.updateApp(3, String16("NeW_aPP1_NAmE"), 2000, 1, String16("v1"), String16(""));
-    name_set = m.getAppNamesFromUid(2000, true /* returnNormalized */);
-    ASSERT_EQ(name_set.size(), 1u);
-    EXPECT_TRUE(name_set.find("NeW_aPP1_NAmE") == name_set.end());
-    EXPECT_TRUE(name_set.find("new_app1_name") != name_set.end());
-}
-
-static void protoOutputStreamToUidMapping(ProtoOutputStream* proto, UidMapping* results) {
-    vector<uint8_t> bytes;
-    bytes.resize(proto->size());
-    size_t pos = 0;
-    sp<ProtoReader> reader = proto->data();
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&((bytes)[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-    results->ParseFromArray(bytes.data(), bytes.size());
-}
-
-// Test that uid map returns at least one snapshot even if we already obtained
-// this snapshot from a previous call to getData.
-TEST(UidMapTest, TestOutputIncludesAtLeastOneSnapshot) {
-    UidMap m;
-    // Initialize single config key.
-    ConfigKey config1(1, StringToId("config1"));
-    m.OnConfigUpdated(config1);
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-    vector<String16> apps;
-    vector<String16> versionStrings;
-    vector<String16> installers;
-    uids.push_back(1000);
-    apps.push_back(String16(kApp2.c_str()));
-    versionStrings.push_back(String16("v1"));
-    installers.push_back(String16(""));
-    versions.push_back(5);
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-
-    // Set the last timestamp for this config key to be newer.
-    m.mLastUpdatePerConfigKey[config1] = 2;
-
-    ProtoOutputStream proto;
-    m.appendUidMap(3, config1, nullptr, true, true, &proto);
-
-    // Check there's still a uidmap attached this one.
-    UidMapping results;
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(1, results.snapshots_size());
-    EXPECT_EQ("v1", results.snapshots(0).package_info(0).version_string());
-}
-
-TEST(UidMapTest, TestRemovedAppRetained) {
-    UidMap m;
-    // Initialize single config key.
-    ConfigKey config1(1, StringToId("config1"));
-    m.OnConfigUpdated(config1);
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-    vector<String16> versionStrings;
-    vector<String16> installers;
-    vector<String16> apps;
-    uids.push_back(1000);
-    apps.push_back(String16(kApp2.c_str()));
-    versions.push_back(5);
-    versionStrings.push_back(String16("v5"));
-    installers.push_back(String16(""));
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-    m.removeApp(2, String16(kApp2.c_str()), 1000);
-
-    ProtoOutputStream proto;
-    m.appendUidMap(3, config1, nullptr, true, true, &proto);
-
-    // Snapshot should still contain this item as deleted.
-    UidMapping results;
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(1, results.snapshots(0).package_info_size());
-    EXPECT_EQ(true, results.snapshots(0).package_info(0).deleted());
-}
-
-TEST(UidMapTest, TestRemovedAppOverGuardrail) {
-    UidMap m;
-    // Initialize single config key.
-    ConfigKey config1(1, StringToId("config1"));
-    m.OnConfigUpdated(config1);
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-    vector<String16> versionStrings;
-    vector<String16> installers;
-    vector<String16> apps;
-    const int maxDeletedApps = StatsdStats::kMaxDeletedAppsInUidMap;
-    for (int j = 0; j < maxDeletedApps + 10; j++) {
-        uids.push_back(j);
-        apps.push_back(String16(kApp1.c_str()));
-        versions.push_back(j);
-        versionStrings.push_back(String16("v"));
-        installers.push_back(String16(""));
-    }
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-
-    // First, verify that we have the expected number of items.
-    UidMapping results;
-    ProtoOutputStream proto;
-    m.appendUidMap(3, config1, nullptr, true, true, &proto);
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(maxDeletedApps + 10, results.snapshots(0).package_info_size());
-
-    // Now remove all the apps.
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-    for (int j = 0; j < maxDeletedApps + 10; j++) {
-        m.removeApp(4, String16(kApp1.c_str()), j);
-    }
-
-    proto.clear();
-    m.appendUidMap(5, config1, nullptr, true, true, &proto);
-    // Snapshot drops the first nine items.
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(maxDeletedApps, results.snapshots(0).package_info_size());
-}
-
-TEST(UidMapTest, TestClearingOutput) {
-    UidMap m;
-
-    ConfigKey config1(1, StringToId("config1"));
-    ConfigKey config2(1, StringToId("config2"));
-
-    m.OnConfigUpdated(config1);
-
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-    vector<String16> versionStrings;
-    vector<String16> installers;
-    vector<String16> apps;
-    uids.push_back(1000);
-    uids.push_back(1000);
-    apps.push_back(String16(kApp1.c_str()));
-    apps.push_back(String16(kApp2.c_str()));
-    versions.push_back(4);
-    versions.push_back(5);
-    versionStrings.push_back(String16("v4"));
-    versionStrings.push_back(String16("v5"));
-    installers.push_back(String16(""));
-    installers.push_back(String16(""));
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-
-    ProtoOutputStream proto;
-    m.appendUidMap(2, config1, nullptr, true, true, &proto);
-    UidMapping results;
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(1, results.snapshots_size());
-
-    // We have to keep at least one snapshot in memory at all times.
-    proto.clear();
-    m.appendUidMap(2, config1, nullptr, true, true, &proto);
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(1, results.snapshots_size());
-
-    // Now add another configuration.
-    m.OnConfigUpdated(config2);
-    m.updateApp(5, String16(kApp1.c_str()), 1000, 40, String16("v40"), String16(""));
-    ASSERT_EQ(1U, m.mChanges.size());
-    proto.clear();
-    m.appendUidMap(6, config1, nullptr, true, true, &proto);
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(1, results.snapshots_size());
-    ASSERT_EQ(1, results.changes_size());
-    ASSERT_EQ(1U, m.mChanges.size());
-
-    // Add another delta update.
-    m.updateApp(7, String16(kApp2.c_str()), 1001, 41, String16("v41"), String16(""));
-    ASSERT_EQ(2U, m.mChanges.size());
-
-    // We still can't remove anything.
-    proto.clear();
-    m.appendUidMap(8, config1, nullptr, true, true, &proto);
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(1, results.snapshots_size());
-    ASSERT_EQ(1, results.changes_size());
-    ASSERT_EQ(2U, m.mChanges.size());
-
-    proto.clear();
-    m.appendUidMap(9, config2, nullptr, true, true, &proto);
-    protoOutputStreamToUidMapping(&proto, &results);
-    ASSERT_EQ(1, results.snapshots_size());
-    ASSERT_EQ(2, results.changes_size());
-    // At this point both should be cleared.
-    ASSERT_EQ(0U, m.mChanges.size());
-}
-
-TEST(UidMapTest, TestMemoryComputed) {
-    UidMap m;
-
-    ConfigKey config1(1, StringToId("config1"));
-    m.OnConfigUpdated(config1);
-
-    size_t startBytes = m.mBytesUsed;
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-    vector<String16> apps;
-    vector<String16> versionStrings;
-    vector<String16> installers;
-    uids.push_back(1000);
-    apps.push_back(String16(kApp1.c_str()));
-    versions.push_back(1);
-    versionStrings.push_back(String16("v1"));
-    installers.push_back(String16(""));
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-
-    m.updateApp(3, String16(kApp1.c_str()), 1000, 40, String16("v40"), String16(""));
-
-    ProtoOutputStream proto;
-    vector<uint8_t> bytes;
-    m.appendUidMap(2, config1, nullptr, true, true, &proto);
-    size_t prevBytes = m.mBytesUsed;
-
-    m.appendUidMap(4, config1, nullptr, true, true, &proto);
-    EXPECT_TRUE(m.mBytesUsed < prevBytes);
-}
-
-TEST(UidMapTest, TestMemoryGuardrail) {
-    UidMap m;
-    string buf;
-
-    ConfigKey config1(1, StringToId("config1"));
-    m.OnConfigUpdated(config1);
-
-    size_t startBytes = m.mBytesUsed;
-    vector<int32_t> uids;
-    vector<int64_t> versions;
-    vector<String16> versionStrings;
-    vector<String16> installers;
-    vector<String16> apps;
-    for (int i = 0; i < 100; i++) {
-        uids.push_back(1);
-        buf = "EXTREMELY_LONG_STRING_FOR_APP_TO_WASTE_MEMORY." + to_string(i);
-        apps.push_back(String16(buf.c_str()));
-        versions.push_back(1);
-        versionStrings.push_back(String16("v1"));
-        installers.push_back(String16(""));
-    }
-    m.updateMap(1, uids, versions, versionStrings, apps, installers);
-
-    m.updateApp(3, String16("EXTREMELY_LONG_STRING_FOR_APP_TO_WASTE_MEMORY.0"), 1000, 2,
-                String16("v2"), String16(""));
-    ASSERT_EQ(1U, m.mChanges.size());
-
-    // Now force deletion by limiting the memory to hold one delta change.
-    m.maxBytesOverride = 120; // Since the app string alone requires >45 characters.
-    m.updateApp(5, String16("EXTREMELY_LONG_STRING_FOR_APP_TO_WASTE_MEMORY.0"), 1000, 4,
-                String16("v4"), String16(""));
-    ASSERT_EQ(1U, m.mChanges.size());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/anomaly/AlarmTracker_test.cpp b/cmds/statsd/tests/anomaly/AlarmTracker_test.cpp
deleted file mode 100644
index 64ea219..0000000
--- a/cmds/statsd/tests/anomaly/AlarmTracker_test.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 "src/anomaly/AlarmTracker.h"
-
-#include <gtest/gtest.h>
-#include <log/log_time.h>
-#include <stdio.h>
-#include <vector>
-
-using namespace testing;
-using android::sp;
-using std::set;
-using std::shared_ptr;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const ConfigKey kConfigKey(0, 12345);
-
-TEST(AlarmTrackerTest, TestTriggerTimestamp) {
-    sp<AlarmMonitor> subscriberAlarmMonitor =
-        new AlarmMonitor(100,
-                         [](const shared_ptr<IStatsCompanionService>&, int64_t){},
-                         [](const shared_ptr<IStatsCompanionService>&){});
-    Alarm alarm;
-    alarm.set_offset_millis(15 * MS_PER_SEC);
-    alarm.set_period_millis(60 * 60 * MS_PER_SEC);  // 1hr
-    int64_t startMillis = 100000000 * MS_PER_SEC;
-    int64_t nextAlarmTime = startMillis / MS_PER_SEC + 15;
-    AlarmTracker tracker(startMillis, startMillis, alarm, kConfigKey, subscriberAlarmMonitor);
-
-    EXPECT_EQ(tracker.mAlarmSec, nextAlarmTime);
-
-    uint64_t currentTimeSec = startMillis / MS_PER_SEC + 10;
-    std::unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> firedAlarmSet =
-        subscriberAlarmMonitor->popSoonerThan(static_cast<uint32_t>(currentTimeSec));
-    EXPECT_TRUE(firedAlarmSet.empty());
-    tracker.informAlarmsFired(currentTimeSec * NS_PER_SEC, firedAlarmSet);
-    EXPECT_EQ(tracker.mAlarmSec, nextAlarmTime);
-    EXPECT_EQ(tracker.getAlarmTimestampSec(), nextAlarmTime);
-
-    currentTimeSec = startMillis / MS_PER_SEC + 7000;
-    nextAlarmTime = startMillis / MS_PER_SEC + 15 + 2 * 60 * 60;
-    firedAlarmSet = subscriberAlarmMonitor->popSoonerThan(static_cast<uint32_t>(currentTimeSec));
-    ASSERT_EQ(firedAlarmSet.size(), 1u);
-    tracker.informAlarmsFired(currentTimeSec * NS_PER_SEC, firedAlarmSet);
-    EXPECT_TRUE(firedAlarmSet.empty());
-    EXPECT_EQ(tracker.mAlarmSec, nextAlarmTime);
-    EXPECT_EQ(tracker.getAlarmTimestampSec(), nextAlarmTime);
-
-    // Alarm fires exactly on time.
-    currentTimeSec = startMillis / MS_PER_SEC + 15 + 2 * 60 * 60;
-    nextAlarmTime = startMillis / MS_PER_SEC + 15 + 3 * 60 * 60;
-    firedAlarmSet = subscriberAlarmMonitor->popSoonerThan(static_cast<uint32_t>(currentTimeSec));
-    ASSERT_EQ(firedAlarmSet.size(), 1u);
-    tracker.informAlarmsFired(currentTimeSec * NS_PER_SEC, firedAlarmSet);
-    EXPECT_TRUE(firedAlarmSet.empty());
-    EXPECT_EQ(tracker.mAlarmSec, nextAlarmTime);
-    EXPECT_EQ(tracker.getAlarmTimestampSec(), nextAlarmTime);
-
-    // Alarm fires exactly 1 period late.
-    currentTimeSec = startMillis / MS_PER_SEC + 15 + 4 * 60 * 60;
-    nextAlarmTime = startMillis / MS_PER_SEC + 15 + 5 * 60 * 60;
-    firedAlarmSet = subscriberAlarmMonitor->popSoonerThan(static_cast<uint32_t>(currentTimeSec));
-    ASSERT_EQ(firedAlarmSet.size(), 1u);
-    tracker.informAlarmsFired(currentTimeSec * NS_PER_SEC, firedAlarmSet);
-    EXPECT_TRUE(firedAlarmSet.empty());
-    EXPECT_EQ(tracker.mAlarmSec, nextAlarmTime);
-    EXPECT_EQ(tracker.getAlarmTimestampSec(), nextAlarmTime);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/anomaly/AnomalyTracker_test.cpp b/cmds/statsd/tests/anomaly/AnomalyTracker_test.cpp
deleted file mode 100644
index 0cc8af1..0000000
--- a/cmds/statsd/tests/anomaly/AnomalyTracker_test.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/anomaly/AnomalyTracker.h"
-
-#include <gtest/gtest.h>
-#include <math.h>
-#include <stdio.h>
-
-#include <vector>
-
-#include "tests/statsd_test_util.h"
-
-using namespace testing;
-using android::sp;
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const ConfigKey kConfigKey(0, 12345);
-
-MetricDimensionKey getMockMetricDimensionKey(int key, string value) {
-    int pos[] = {key, 0, 0};
-    HashableDimensionKey dim;
-    dim.addValue(FieldValue(Field(1, pos, 0), Value(value)));
-    return MetricDimensionKey(dim, DEFAULT_DIMENSION_KEY);
-}
-
-void AddValueToBucket(const std::vector<std::pair<MetricDimensionKey, long>>& key_value_pair_list,
-                      std::shared_ptr<DimToValMap> bucket) {
-    for (auto itr = key_value_pair_list.begin(); itr != key_value_pair_list.end(); itr++) {
-        (*bucket)[itr->first] += itr->second;
-    }
-}
-
-std::shared_ptr<DimToValMap> MockBucket(
-        const std::vector<std::pair<MetricDimensionKey, long>>& key_value_pair_list) {
-    std::shared_ptr<DimToValMap> bucket = std::make_shared<DimToValMap>();
-    AddValueToBucket(key_value_pair_list, bucket);
-    return bucket;
-}
-
-// Returns the value, for the given key, in that bucket, or 0 if not present.
-int64_t getBucketValue(const std::shared_ptr<DimToValMap>& bucket,
-                       const MetricDimensionKey& key) {
-    const auto& itr = bucket->find(key);
-    if (itr != bucket->end()) {
-        return itr->second;
-    }
-    return 0;
-}
-
-// Returns true if keys in trueList are detected as anomalies and keys in falseList are not.
-bool detectAnomaliesPass(AnomalyTracker& tracker,
-                         const int64_t& bucketNum,
-                         const std::shared_ptr<DimToValMap>& currentBucket,
-                         const std::set<const MetricDimensionKey>& trueList,
-                         const std::set<const MetricDimensionKey>& falseList) {
-    for (const MetricDimensionKey& key : trueList) {
-        if (!tracker.detectAnomaly(bucketNum, key, getBucketValue(currentBucket, key))) {
-            return false;
-        }
-    }
-    for (const MetricDimensionKey& key : falseList) {
-        if (tracker.detectAnomaly(bucketNum, key, getBucketValue(currentBucket, key))) {
-            return false;
-        }
-    }
-    return true;
-}
-
-// Calls tracker.detectAndDeclareAnomaly on each key in the bucket.
-void detectAndDeclareAnomalies(AnomalyTracker& tracker,
-                               const int64_t& bucketNum,
-                               const std::shared_ptr<DimToValMap>& bucket,
-                               const int64_t& eventTimestamp) {
-    for (const auto& kv : *bucket) {
-        tracker.detectAndDeclareAnomaly(eventTimestamp, bucketNum, 0 /*metric_id*/, kv.first,
-                                        kv.second);
-    }
-}
-
-// Asserts that the refractory time for each key in timestamps is the corresponding
-// timestamp (in ns) + refractoryPeriodSec.
-// If a timestamp value is negative, instead asserts that the refractory period is inapplicable
-// (either non-existant or already past).
-void checkRefractoryTimes(AnomalyTracker& tracker,
-                          const int64_t& currTimestampNs,
-                          const int32_t& refractoryPeriodSec,
-                          const std::unordered_map<MetricDimensionKey, int64_t>& timestamps) {
-    for (const auto& kv : timestamps) {
-        if (kv.second < 0) {
-            // Make sure that, if there is a refractory period, it is already past.
-            EXPECT_LT(tracker.getRefractoryPeriodEndsSec(kv.first) * NS_PER_SEC,
-                    (uint64_t)currTimestampNs)
-                    << "Failure was at currTimestampNs " << currTimestampNs;
-        } else {
-            EXPECT_EQ(tracker.getRefractoryPeriodEndsSec(kv.first),
-                      std::ceil(1.0 * kv.second / NS_PER_SEC) + refractoryPeriodSec)
-                      << "Failure was at currTimestampNs " << currTimestampNs;
-        }
-    }
-}
-
-TEST(AnomalyTrackerTest, TestConsecutiveBuckets) {
-    const int64_t bucketSizeNs = 30 * NS_PER_SEC;
-    const int32_t refractoryPeriodSec = 2 * bucketSizeNs / NS_PER_SEC;
-    Alert alert;
-    alert.set_num_buckets(3);
-    alert.set_refractory_period_secs(refractoryPeriodSec);
-    alert.set_trigger_if_sum_gt(2);
-
-    AnomalyTracker anomalyTracker(alert, kConfigKey);
-    MetricDimensionKey keyA = getMockMetricDimensionKey(1, "a");
-    MetricDimensionKey keyB = getMockMetricDimensionKey(1, "b");
-    MetricDimensionKey keyC = getMockMetricDimensionKey(1, "c");
-
-    int64_t eventTimestamp0 = 10 * NS_PER_SEC;
-    int64_t eventTimestamp1 = bucketSizeNs + 11 * NS_PER_SEC;
-    int64_t eventTimestamp2 = 2 * bucketSizeNs + 12 * NS_PER_SEC;
-    int64_t eventTimestamp3 = 3 * bucketSizeNs + 13 * NS_PER_SEC;
-    int64_t eventTimestamp4 = 4 * bucketSizeNs + 14 * NS_PER_SEC;
-    int64_t eventTimestamp5 = 5 * bucketSizeNs + 5 * NS_PER_SEC;
-    int64_t eventTimestamp6 = 6 * bucketSizeNs + 16 * NS_PER_SEC;
-
-    std::shared_ptr<DimToValMap> bucket0 = MockBucket({{keyA, 1}, {keyB, 2}, {keyC, 1}});
-    std::shared_ptr<DimToValMap> bucket1 = MockBucket({{keyA, 1}});
-    std::shared_ptr<DimToValMap> bucket2 = MockBucket({{keyB, 1}});
-    std::shared_ptr<DimToValMap> bucket3 = MockBucket({{keyA, 2}});
-    std::shared_ptr<DimToValMap> bucket4 = MockBucket({{keyB, 5}});
-    std::shared_ptr<DimToValMap> bucket5 = MockBucket({{keyA, 2}});
-    std::shared_ptr<DimToValMap> bucket6 = MockBucket({{keyA, 2}});
-
-    // Start time with no events.
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0u);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, -1LL);
-
-    // Event from bucket #0 occurs.
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 0, bucket0, {}, {keyA, keyB, keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 0, bucket0, eventTimestamp1);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp0, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, -1}, {keyC, -1}});
-
-    // Adds past bucket #0
-    anomalyTracker.addPastBucket(bucket0, 0);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 3u);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 1LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 0LL);
-
-    // Event from bucket #1 occurs.
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 1, bucket1, {}, {keyA, keyB, keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 1, bucket1, eventTimestamp1);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp1, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, -1}, {keyC, -1}});
-
-    // Adds past bucket #0 again. The sum does not change.
-    anomalyTracker.addPastBucket(bucket0, 0);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 3u);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 1LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 0LL);
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 1, bucket1, {}, {keyA, keyB, keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 1, bucket1, eventTimestamp1 + 1);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp1, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, -1}, {keyC, -1}});
-
-    // Adds past bucket #1.
-    anomalyTracker.addPastBucket(bucket1, 1);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 1L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 3UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-
-    // Event from bucket #2 occurs. New anomaly on keyB.
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 2, bucket2, {keyB}, {keyA, keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 2, bucket2, eventTimestamp2);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp2, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, eventTimestamp2}, {keyC, -1}});
-
-    // Adds past bucket #1 again. Nothing changes.
-    anomalyTracker.addPastBucket(bucket1, 1);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 1L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 3UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    // Event from bucket #2 occurs (again).
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 2, bucket2, {keyB}, {keyA, keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 2, bucket2, eventTimestamp2 + 1);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp2, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, eventTimestamp2}, {keyC, -1}});
-
-    // Adds past bucket #2.
-    anomalyTracker.addPastBucket(bucket2, 2);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 2L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 1LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 1LL);
-
-    // Event from bucket #3 occurs. New anomaly on keyA.
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 3, bucket3, {keyA}, {keyB, keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 3, bucket3, eventTimestamp3);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp3, refractoryPeriodSec,
-            {{keyA, eventTimestamp3}, {keyB, eventTimestamp2}, {keyC, -1}});
-
-    // Adds bucket #3.
-    anomalyTracker.addPastBucket(bucket3, 3L);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 3L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 1LL);
-
-    // Event from bucket #4 occurs. New anomaly on keyB.
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 4, bucket4, {keyB}, {keyA, keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 4, bucket4, eventTimestamp4);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp4, refractoryPeriodSec,
-            {{keyA, eventTimestamp3}, {keyB, eventTimestamp4}, {keyC, -1}});
-
-    // Adds bucket #4.
-    anomalyTracker.addPastBucket(bucket4, 4);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 4L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 5LL);
-
-    // Event from bucket #5 occurs. New anomaly on keyA, which is still in refractory.
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 5, bucket5, {keyA, keyB}, {keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 5, bucket5, eventTimestamp5);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp5, refractoryPeriodSec,
-            {{keyA, eventTimestamp3}, {keyB, eventTimestamp4}, {keyC, -1}});
-
-    // Adds bucket #5.
-    anomalyTracker.addPastBucket(bucket5, 5);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 5L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 5LL);
-
-    // Event from bucket #6 occurs. New anomaly on keyA, which is now out of refractory.
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 6, bucket6, {keyA, keyB}, {keyC}));
-    detectAndDeclareAnomalies(anomalyTracker, 6, bucket6, eventTimestamp6);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp6, refractoryPeriodSec,
-            {{keyA, eventTimestamp6}, {keyB, eventTimestamp4}, {keyC, -1}});
-}
-
-TEST(AnomalyTrackerTest, TestSparseBuckets) {
-    const int64_t bucketSizeNs = 30 * NS_PER_SEC;
-    const int32_t refractoryPeriodSec = 2 * bucketSizeNs / NS_PER_SEC;
-    Alert alert;
-    alert.set_num_buckets(3);
-    alert.set_refractory_period_secs(refractoryPeriodSec);
-    alert.set_trigger_if_sum_gt(2);
-
-    AnomalyTracker anomalyTracker(alert, kConfigKey);
-    MetricDimensionKey keyA = getMockMetricDimensionKey(1, "a");
-    MetricDimensionKey keyB = getMockMetricDimensionKey(1, "b");
-    MetricDimensionKey keyC = getMockMetricDimensionKey(1, "c");
-    MetricDimensionKey keyD = getMockMetricDimensionKey(1, "d");
-    MetricDimensionKey keyE = getMockMetricDimensionKey(1, "e");
-
-    std::shared_ptr<DimToValMap> bucket9 = MockBucket({{keyA, 1}, {keyB, 2}, {keyC, 1}});
-    std::shared_ptr<DimToValMap> bucket16 = MockBucket({{keyB, 4}});
-    std::shared_ptr<DimToValMap> bucket18 = MockBucket({{keyB, 1}, {keyC, 1}});
-    std::shared_ptr<DimToValMap> bucket20 = MockBucket({{keyB, 3}, {keyC, 1}});
-    std::shared_ptr<DimToValMap> bucket25 = MockBucket({{keyD, 1}});
-    std::shared_ptr<DimToValMap> bucket28 = MockBucket({{keyE, 2}});
-
-    int64_t eventTimestamp1 = bucketSizeNs * 8 + 1;
-    int64_t eventTimestamp2 = bucketSizeNs * 15 + 11;
-    int64_t eventTimestamp3 = bucketSizeNs * 17 + 1;
-    int64_t eventTimestamp4 = bucketSizeNs * 19 + 2;
-    int64_t eventTimestamp5 = bucketSizeNs * 24 + 3;
-    int64_t eventTimestamp6 = bucketSizeNs * 27 + 3;
-
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, -1LL);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0UL);
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 9, bucket9, {}, {keyA, keyB, keyC, keyD}));
-    detectAndDeclareAnomalies(anomalyTracker, 9, bucket9, eventTimestamp1);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp1, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, -1}, {keyC, -1}, {keyD, -1}, {keyE, -1}});
-
-    // Add past bucket #9
-    anomalyTracker.addPastBucket(bucket9, 9);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 9L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 3UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyA), 1LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 2LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 16, bucket16, {keyB}, {keyA, keyC, keyD}));
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0UL);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 15L);
-    detectAndDeclareAnomalies(anomalyTracker, 16, bucket16, eventTimestamp2);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0UL);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 15L);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp2, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, eventTimestamp2}, {keyC, -1}, {keyD, -1}, {keyE, -1}});
-
-    // Add past bucket #16
-    anomalyTracker.addPastBucket(bucket16, 16);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 16L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 1UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 4LL);
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 18, bucket18, {keyB}, {keyA, keyC, keyD}));
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 1UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 4LL);
-    // Within refractory period.
-    detectAndDeclareAnomalies(anomalyTracker, 18, bucket18, eventTimestamp3);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp3, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, eventTimestamp2}, {keyC, -1}, {keyD, -1}, {keyE, -1}});
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 1UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 4LL);
-
-    // Add past bucket #18
-    anomalyTracker.addPastBucket(bucket18, 18);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 18L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 1LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 20, bucket20, {keyB}, {keyA, keyC, keyD}));
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 19L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 1LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    detectAndDeclareAnomalies(anomalyTracker, 20, bucket20, eventTimestamp4);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp4, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, eventTimestamp4}, {keyC, -1}, {keyD, -1}, {keyE, -1}});
-
-    // Add bucket #18 again. Nothing changes.
-    anomalyTracker.addPastBucket(bucket18, 18);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 19L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 1LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 20, bucket20, {keyB}, {keyA, keyC, keyD}));
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 1LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    detectAndDeclareAnomalies(anomalyTracker, 20, bucket20, eventTimestamp4 + 1);
-    // Within refractory period.
-    checkRefractoryTimes(anomalyTracker, eventTimestamp4 + 1, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, eventTimestamp4}, {keyC, -1}, {keyD, -1}, {keyE, -1}});
-
-    // Add past bucket #20
-    anomalyTracker.addPastBucket(bucket20, 20);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 20L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 2UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyB), 3LL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyC), 1LL);
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 25, bucket25, {}, {keyA, keyB, keyC, keyD}));
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 24L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0UL);
-    detectAndDeclareAnomalies(anomalyTracker, 25, bucket25, eventTimestamp5);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp5, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, eventTimestamp4}, {keyC, -1}, {keyD, -1}, {keyE, -1}});
-
-    // Add past bucket #25
-    anomalyTracker.addPastBucket(bucket25, 25);
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 25L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 1UL);
-    EXPECT_EQ(anomalyTracker.getSumOverPastBuckets(keyD), 1LL);
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 28, bucket28, {},
-            {keyA, keyB, keyC, keyD, keyE}));
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 27L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0UL);
-    detectAndDeclareAnomalies(anomalyTracker, 28, bucket28, eventTimestamp6);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0UL);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp6, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, -1}, {keyC, -1}, {keyD, -1}, {keyE, -1}});
-
-    // Updates current bucket #28.
-    (*bucket28)[keyE] = 5;
-    EXPECT_TRUE(detectAnomaliesPass(anomalyTracker, 28, bucket28, {keyE},
-            {keyA, keyB, keyC, keyD}));
-    EXPECT_EQ(anomalyTracker.mMostRecentBucketNum, 27L);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0UL);
-    detectAndDeclareAnomalies(anomalyTracker, 28, bucket28, eventTimestamp6 + 7);
-    ASSERT_EQ(anomalyTracker.mSumOverPastBuckets.size(), 0UL);
-    checkRefractoryTimes(anomalyTracker, eventTimestamp6, refractoryPeriodSec,
-            {{keyA, -1}, {keyB, -1}, {keyC, -1}, {keyD, -1}, {keyE, eventTimestamp6 + 7}});
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/condition/CombinationConditionTracker_test.cpp b/cmds/statsd/tests/condition/CombinationConditionTracker_test.cpp
deleted file mode 100644
index 1d501fd..0000000
--- a/cmds/statsd/tests/condition/CombinationConditionTracker_test.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "condition/condition_util.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-
-#include <gtest/gtest.h>
-
-#include <stdio.h>
-#include <vector>
-
-using namespace android::os::statsd;
-using std::vector;
-
-#ifdef __ANDROID__
-
-TEST(ConditionTrackerTest, TestUnknownCondition) {
-    LogicalOperation operation = LogicalOperation::AND;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-    children.push_back(2);
-
-    vector<ConditionState> conditionResults;
-    conditionResults.push_back(ConditionState::kUnknown);
-    conditionResults.push_back(ConditionState::kFalse);
-    conditionResults.push_back(ConditionState::kTrue);
-
-    EXPECT_EQ(evaluateCombinationCondition(children, operation, conditionResults),
-              ConditionState::kUnknown);
-}
-
-TEST(ConditionTrackerTest, TestAndCondition) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::AND;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-    children.push_back(2);
-
-    vector<ConditionState> conditionResults;
-    conditionResults.push_back(ConditionState::kTrue);
-    conditionResults.push_back(ConditionState::kFalse);
-    conditionResults.push_back(ConditionState::kTrue);
-
-    EXPECT_FALSE(evaluateCombinationCondition(children, operation, conditionResults));
-
-    conditionResults.clear();
-    conditionResults.push_back(ConditionState::kTrue);
-    conditionResults.push_back(ConditionState::kTrue);
-    conditionResults.push_back(ConditionState::kTrue);
-
-    EXPECT_TRUE(evaluateCombinationCondition(children, operation, conditionResults));
-}
-
-TEST(ConditionTrackerTest, TestOrCondition) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::OR;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-    children.push_back(2);
-
-    vector<ConditionState> conditionResults;
-    conditionResults.push_back(ConditionState::kTrue);
-    conditionResults.push_back(ConditionState::kFalse);
-    conditionResults.push_back(ConditionState::kTrue);
-
-    EXPECT_TRUE(evaluateCombinationCondition(children, operation, conditionResults));
-
-    conditionResults.clear();
-    conditionResults.push_back(ConditionState::kFalse);
-    conditionResults.push_back(ConditionState::kFalse);
-    conditionResults.push_back(ConditionState::kFalse);
-
-    EXPECT_FALSE(evaluateCombinationCondition(children, operation, conditionResults));
-}
-
-TEST(ConditionTrackerTest, TestNotCondition) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::NOT;
-
-    vector<int> children;
-    children.push_back(0);
-
-    vector<ConditionState> conditionResults;
-    conditionResults.push_back(ConditionState::kTrue);
-
-    EXPECT_FALSE(evaluateCombinationCondition(children, operation, conditionResults));
-
-    conditionResults.clear();
-    conditionResults.push_back(ConditionState::kFalse);
-    EXPECT_TRUE(evaluateCombinationCondition(children, operation, conditionResults));
-
-    children.clear();
-    conditionResults.clear();
-    EXPECT_EQ(evaluateCombinationCondition(children, operation, conditionResults),
-              ConditionState::kUnknown);
-}
-
-TEST(ConditionTrackerTest, TestNandCondition) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::NAND;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-
-    vector<ConditionState> conditionResults;
-    conditionResults.push_back(ConditionState::kTrue);
-    conditionResults.push_back(ConditionState::kFalse);
-
-    EXPECT_TRUE(evaluateCombinationCondition(children, operation, conditionResults));
-
-    conditionResults.clear();
-    conditionResults.push_back(ConditionState::kFalse);
-    conditionResults.push_back(ConditionState::kFalse);
-    EXPECT_TRUE(evaluateCombinationCondition(children, operation, conditionResults));
-
-    conditionResults.clear();
-    conditionResults.push_back(ConditionState::kTrue);
-    conditionResults.push_back(ConditionState::kTrue);
-    EXPECT_FALSE(evaluateCombinationCondition(children, operation, conditionResults));
-}
-
-TEST(ConditionTrackerTest, TestNorCondition) {
-    // Set up the matcher
-    LogicalOperation operation = LogicalOperation::NOR;
-
-    vector<int> children;
-    children.push_back(0);
-    children.push_back(1);
-
-    vector<ConditionState> conditionResults;
-    conditionResults.push_back(ConditionState::kTrue);
-    conditionResults.push_back(ConditionState::kFalse);
-
-    EXPECT_FALSE(evaluateCombinationCondition(children, operation, conditionResults));
-
-    conditionResults.clear();
-    conditionResults.push_back(ConditionState::kFalse);
-    conditionResults.push_back(ConditionState::kFalse);
-    EXPECT_TRUE(evaluateCombinationCondition(children, operation, conditionResults));
-
-    conditionResults.clear();
-    conditionResults.push_back(ConditionState::kTrue);
-    conditionResults.push_back(ConditionState::kTrue);
-    EXPECT_FALSE(evaluateCombinationCondition(children, operation, conditionResults));
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/condition/ConditionTimer_test.cpp b/cmds/statsd/tests/condition/ConditionTimer_test.cpp
deleted file mode 100644
index ea02cd3..0000000
--- a/cmds/statsd/tests/condition/ConditionTimer_test.cpp
+++ /dev/null
@@ -1,68 +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.
-
-#include "src/condition/ConditionTimer.h"
-
-#include <gtest/gtest.h>
-#include <stdio.h>
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-static int64_t time_base = 10;
-static int64_t ct_start_time = 200;
-
-TEST(ConditionTimerTest, TestTimer_Inital_False) {
-    ConditionTimer timer(false, time_base);
-    EXPECT_EQ(false, timer.mCondition);
-    EXPECT_EQ(0, timer.mTimerNs);
-
-    EXPECT_EQ(0, timer.newBucketStart(ct_start_time));
-    EXPECT_EQ(0, timer.mTimerNs);
-
-    timer.onConditionChanged(true, ct_start_time + 5);
-    EXPECT_EQ(ct_start_time + 5, timer.mLastConditionTrueTimestampNs);
-    EXPECT_EQ(true, timer.mCondition);
-
-    EXPECT_EQ(95, timer.newBucketStart(ct_start_time + 100));
-    EXPECT_EQ(ct_start_time + 100, timer.mLastConditionTrueTimestampNs);
-    EXPECT_EQ(true, timer.mCondition);
-}
-
-TEST(ConditionTimerTest, TestTimer_Inital_True) {
-    ConditionTimer timer(true, time_base);
-    EXPECT_EQ(true, timer.mCondition);
-    EXPECT_EQ(0, timer.mTimerNs);
-
-    EXPECT_EQ(ct_start_time - time_base, timer.newBucketStart(ct_start_time));
-    EXPECT_EQ(true, timer.mCondition);
-    EXPECT_EQ(0, timer.mTimerNs);
-    EXPECT_EQ(ct_start_time, timer.mLastConditionTrueTimestampNs);
-
-    timer.onConditionChanged(false, ct_start_time + 5);
-    EXPECT_EQ(5, timer.mTimerNs);
-
-    EXPECT_EQ(5, timer.newBucketStart(ct_start_time + 100));
-    EXPECT_EQ(0, timer.mTimerNs);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/condition/SimpleConditionTracker_test.cpp b/cmds/statsd/tests/condition/SimpleConditionTracker_test.cpp
deleted file mode 100644
index 07b5311b..0000000
--- a/cmds/statsd/tests/condition/SimpleConditionTracker_test.cpp
+++ /dev/null
@@ -1,739 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/condition/SimpleConditionTracker.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-#include <vector>
-#include <numeric>
-
-using std::map;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-namespace {
-
-const ConfigKey kConfigKey(0, 12345);
-
-const int ATTRIBUTION_NODE_FIELD_ID = 1;
-const int ATTRIBUTION_UID_FIELD_ID = 1;
-const int TAG_ID = 1;
-
-SimplePredicate getWakeLockHeldCondition(bool countNesting, bool defaultFalse,
-                                         bool outputSlicedUid, Position position) {
-    SimplePredicate simplePredicate;
-    simplePredicate.set_start(StringToId("WAKE_LOCK_ACQUIRE"));
-    simplePredicate.set_stop(StringToId("WAKE_LOCK_RELEASE"));
-    simplePredicate.set_stop_all(StringToId("RELEASE_ALL"));
-    if (outputSlicedUid) {
-        simplePredicate.mutable_dimensions()->set_field(TAG_ID);
-        simplePredicate.mutable_dimensions()->add_child()->set_field(ATTRIBUTION_NODE_FIELD_ID);
-        simplePredicate.mutable_dimensions()->mutable_child(0)->set_position(position);
-        simplePredicate.mutable_dimensions()->mutable_child(0)->add_child()->set_field(
-            ATTRIBUTION_UID_FIELD_ID);
-    }
-
-    simplePredicate.set_count_nesting(countNesting);
-    simplePredicate.set_initial_value(defaultFalse ? SimplePredicate_InitialValue_FALSE
-                                                       : SimplePredicate_InitialValue_UNKNOWN);
-    return simplePredicate;
-}
-
-void makeWakeLockEvent(LogEvent* logEvent, uint32_t atomId, uint64_t timestamp,
-                       const vector<int>& uids, const string& wl, int acquire) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestamp);
-
-    vector<std::string> tags(uids.size()); // vector of empty strings
-    writeAttribution(statsEvent, uids, tags);
-
-    AStatsEvent_writeString(statsEvent, wl.c_str());
-    AStatsEvent_writeInt32(statsEvent, acquire);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-} // anonymous namespace
-
-
-std::map<int64_t, HashableDimensionKey> getWakeLockQueryKey(
-    const Position position,
-    const std::vector<int> &uids, const string& conditionName) {
-    std::map<int64_t, HashableDimensionKey> outputKeyMap;
-    std::vector<int> uid_indexes;
-    int pos[] = {1, 1, 1};
-    int depth = 2;
-    Field field(1, pos, depth);
-    switch(position) {
-        case Position::FIRST:
-            uid_indexes.push_back(0);
-            break;
-        case Position::LAST:
-            uid_indexes.push_back(uids.size() - 1);
-            field.setField(0x02018001);
-            break;
-        case Position::ANY:
-            uid_indexes.resize(uids.size());
-            std::iota(uid_indexes.begin(), uid_indexes.end(), 0);
-            field.setField(0x02010001);
-            break;
-        default:
-            break;
-    }
-
-    for (const int idx : uid_indexes) {
-        Value value((int32_t)uids[idx]);
-        HashableDimensionKey dim;
-        dim.addValue(FieldValue(field, value));
-        outputKeyMap[StringToId(conditionName)] = dim;
-    }
-    return outputKeyMap;
-}
-
-TEST(SimpleConditionTrackerTest, TestNonSlicedInitialValueFalse) {
-    SimplePredicate simplePredicate;
-    simplePredicate.set_start(StringToId("SCREEN_TURNED_ON"));
-    simplePredicate.set_stop(StringToId("SCREEN_TURNED_OFF"));
-    simplePredicate.set_count_nesting(false);
-    simplePredicate.set_initial_value(SimplePredicate_InitialValue_FALSE);
-
-    unordered_map<int64_t, int> trackerNameIndexMap;
-    trackerNameIndexMap[StringToId("SCREEN_TURNED_ON")] = 0;
-    trackerNameIndexMap[StringToId("SCREEN_TURNED_OFF")] = 1;
-
-    SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"),
-                                            0 /*tracker index*/, simplePredicate,
-                                            trackerNameIndexMap);
-
-    ConditionKey queryKey;
-    vector<sp<ConditionTracker>> allPredicates;
-    vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated);
-
-    // Check that initial condition is false.
-    conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache);
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-
-    vector<MatchingState> matcherState;
-    vector<bool> changedCache(1, false);
-
-    // Matched stop event.
-    // Check that condition is still false.
-    unique_ptr<LogEvent> screenOffEvent =
-            CreateScreenStateChangedEvent(/*timestamp=*/50, android::view::DISPLAY_STATE_OFF);
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);  // On matcher not matched
-    matcherState.push_back(MatchingState::kMatched);     // Off matcher matched
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    conditionTracker.evaluateCondition(*screenOffEvent, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-    EXPECT_FALSE(changedCache[0]);
-
-    // Matched start event.
-    // Check that condition has changed to true.
-    unique_ptr<LogEvent> screenOnEvent =
-            CreateScreenStateChangedEvent(/*timestamp=*/100, android::view::DISPLAY_STATE_ON);
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kMatched);     // On matcher matched
-    matcherState.push_back(MatchingState::kNotMatched);  // Off matcher not matched
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-    conditionTracker.evaluateCondition(*screenOnEvent, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-    EXPECT_TRUE(changedCache[0]);
-}
-
-TEST(SimpleConditionTrackerTest, TestNonSlicedInitialValueUnknown) {
-    SimplePredicate simplePredicate;
-    simplePredicate.set_start(StringToId("SCREEN_TURNED_ON"));
-    simplePredicate.set_stop(StringToId("SCREEN_TURNED_OFF"));
-    simplePredicate.set_count_nesting(false);
-    simplePredicate.set_initial_value(SimplePredicate_InitialValue_UNKNOWN);
-
-    unordered_map<int64_t, int> trackerNameIndexMap;
-    trackerNameIndexMap[StringToId("SCREEN_TURNED_ON")] = 0;
-    trackerNameIndexMap[StringToId("SCREEN_TURNED_OFF")] = 1;
-
-    SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"),
-                                            0 /*tracker index*/, simplePredicate,
-                                            trackerNameIndexMap);
-
-    ConditionKey queryKey;
-    vector<sp<ConditionTracker>> allPredicates;
-    vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated);
-
-    // Check that initial condition is unknown.
-    conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache);
-    EXPECT_EQ(ConditionState::kUnknown, conditionCache[0]);
-
-    vector<MatchingState> matcherState;
-    vector<bool> changedCache(1, false);
-
-    // Matched stop event.
-    // Check that condition is changed to false.
-    unique_ptr<LogEvent> screenOffEvent =
-            CreateScreenStateChangedEvent(/*timestamp=*/50, android::view::DISPLAY_STATE_OFF);
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);  // On matcher not matched
-    matcherState.push_back(MatchingState::kMatched);     // Off matcher matched
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    conditionTracker.evaluateCondition(*screenOffEvent, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-    EXPECT_TRUE(changedCache[0]);
-
-    // Matched start event.
-    // Check that condition has changed to true.
-    unique_ptr<LogEvent> screenOnEvent =
-            CreateScreenStateChangedEvent(/*timestamp=*/100, android::view::DISPLAY_STATE_ON);
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kMatched);     // On matcher matched
-    matcherState.push_back(MatchingState::kNotMatched);  // Off matcher not matched
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-    conditionTracker.evaluateCondition(*screenOnEvent, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-    EXPECT_TRUE(changedCache[0]);
-}
-
-TEST(SimpleConditionTrackerTest, TestNonSlicedCondition) {
-    SimplePredicate simplePredicate;
-    simplePredicate.set_start(StringToId("SCREEN_TURNED_ON"));
-    simplePredicate.set_stop(StringToId("SCREEN_TURNED_OFF"));
-    simplePredicate.set_count_nesting(false);
-    simplePredicate.set_initial_value(SimplePredicate_InitialValue_UNKNOWN);
-
-    unordered_map<int64_t, int> trackerNameIndexMap;
-    trackerNameIndexMap[StringToId("SCREEN_TURNED_ON")] = 0;
-    trackerNameIndexMap[StringToId("SCREEN_TURNED_OFF")] = 1;
-
-    SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"), 0 /*tracker index*/,
-                                            simplePredicate, trackerNameIndexMap);
-    EXPECT_FALSE(conditionTracker.isSliced());
-
-    // This event is not accessed in this test besides dimensions which is why this is okay.
-    // This is technically an invalid LogEvent because we do not call parseBuffer.
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-
-    vector<MatchingState> matcherState;
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kNotMatched);
-
-    vector<sp<ConditionTracker>> allPredicates;
-    vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated);
-    vector<bool> changedCache(1, false);
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    // not matched start or stop. condition doesn't change
-    EXPECT_EQ(ConditionState::kUnknown, conditionCache[0]);
-    EXPECT_FALSE(changedCache[0]);
-
-    // prepare a case for match start.
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kMatched);
-    matcherState.push_back(MatchingState::kNotMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    // now condition should change to true.
-    EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-    EXPECT_TRUE(changedCache[0]);
-
-    // match nothing.
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kNotMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-    EXPECT_FALSE(changedCache[0]);
-
-    // the case for match stop.
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-
-    // condition changes to false.
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-    EXPECT_TRUE(changedCache[0]);
-
-    // match stop again.
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    // condition should still be false. not changed.
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-    EXPECT_FALSE(changedCache[0]);
-}
-
-TEST(SimpleConditionTrackerTest, TestNonSlicedConditionNestCounting) {
-    std::vector<sp<ConditionTracker>> allConditions;
-    SimplePredicate simplePredicate;
-    simplePredicate.set_start(StringToId("SCREEN_TURNED_ON"));
-    simplePredicate.set_stop(StringToId("SCREEN_TURNED_OFF"));
-    simplePredicate.set_count_nesting(true);
-
-    unordered_map<int64_t, int> trackerNameIndexMap;
-    trackerNameIndexMap[StringToId("SCREEN_TURNED_ON")] = 0;
-    trackerNameIndexMap[StringToId("SCREEN_TURNED_OFF")] = 1;
-
-    SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"),
-                                            0 /*condition tracker index*/, simplePredicate,
-                                            trackerNameIndexMap);
-    EXPECT_FALSE(conditionTracker.isSliced());
-
-    // This event is not accessed in this test besides dimensions which is why this is okay.
-    // This is technically an invalid LogEvent because we do not call parseBuffer.
-    LogEvent event(/*uid=*/0, /*pid=*/0);
-
-    // one matched start
-    vector<MatchingState> matcherState;
-    matcherState.push_back(MatchingState::kMatched);
-    matcherState.push_back(MatchingState::kNotMatched);
-    vector<sp<ConditionTracker>> allPredicates;
-    vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated);
-    vector<bool> changedCache(1, false);
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-
-    EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-    EXPECT_TRUE(changedCache[0]);
-
-    // prepare for another matched start.
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kMatched);
-    matcherState.push_back(MatchingState::kNotMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-
-    EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-    EXPECT_FALSE(changedCache[0]);
-
-    // ONE MATCHED STOP
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    // result should still be true
-    EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-    EXPECT_FALSE(changedCache[0]);
-
-    // ANOTHER MATCHED STOP
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-
-    conditionTracker.evaluateCondition(event, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-    EXPECT_TRUE(changedCache[0]);
-}
-
-TEST(SimpleConditionTrackerTest, TestSlicedCondition) {
-    std::vector<sp<ConditionTracker>> allConditions;
-    for (Position position : {Position::FIRST, Position::LAST}) {
-        SimplePredicate simplePredicate = getWakeLockHeldCondition(
-                true /*nesting*/, true /*default to false*/, true /*output slice by uid*/,
-                position);
-        string conditionName = "WL_HELD_BY_UID2";
-
-        unordered_map<int64_t, int> trackerNameIndexMap;
-        trackerNameIndexMap[StringToId("WAKE_LOCK_ACQUIRE")] = 0;
-        trackerNameIndexMap[StringToId("WAKE_LOCK_RELEASE")] = 1;
-        trackerNameIndexMap[StringToId("RELEASE_ALL")] = 2;
-
-        SimpleConditionTracker conditionTracker(kConfigKey, StringToId(conditionName),
-                                                0 /*condition tracker index*/, simplePredicate,
-                                                trackerNameIndexMap);
-
-        std::vector<int> uids = {111, 222, 333};
-
-        LogEvent event1(/*uid=*/0, /*pid=*/0);
-        makeWakeLockEvent(&event1, /*atomId=*/1, /*timestamp=*/0, uids, "wl1", /*acquire=*/1);
-
-        // one matched start
-        vector<MatchingState> matcherState;
-        matcherState.push_back(MatchingState::kMatched);
-        matcherState.push_back(MatchingState::kNotMatched);
-        matcherState.push_back(MatchingState::kNotMatched);
-        vector<sp<ConditionTracker>> allPredicates;
-        vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated);
-        vector<bool> changedCache(1, false);
-
-        conditionTracker.evaluateCondition(event1, matcherState, allPredicates, conditionCache,
-                                           changedCache);
-
-        if (position == Position::FIRST || position == Position::LAST) {
-            ASSERT_EQ(1UL, conditionTracker.mSlicedConditionState.size());
-        } else {
-            ASSERT_EQ(uids.size(), conditionTracker.mSlicedConditionState.size());
-        }
-        EXPECT_TRUE(changedCache[0]);
-        if (position == Position::FIRST || position == Position::LAST) {
-            ASSERT_EQ(conditionTracker.getChangedToTrueDimensions(allConditions)->size(), 1u);
-            EXPECT_TRUE(conditionTracker.getChangedToFalseDimensions(allConditions)->empty());
-        } else {
-            EXPECT_EQ(conditionTracker.getChangedToTrueDimensions(allConditions)->size(),
-                      uids.size());
-        }
-
-        // Now test query
-        const auto queryKey = getWakeLockQueryKey(position, uids, conditionName);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-
-        conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache);
-        EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-
-        // another wake lock acquired by this uid
-        LogEvent event2(/*uid=*/0, /*pid=*/0);
-        makeWakeLockEvent(&event2, /*atomId=*/1, /*timestamp=*/0, uids, "wl2", /*acquire=*/1);
-        matcherState.clear();
-        matcherState.push_back(MatchingState::kMatched);
-        matcherState.push_back(MatchingState::kNotMatched);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        changedCache[0] = false;
-        conditionTracker.evaluateCondition(event2, matcherState, allPredicates, conditionCache,
-                                           changedCache);
-        EXPECT_FALSE(changedCache[0]);
-        if (position == Position::FIRST || position == Position::LAST) {
-            ASSERT_EQ(1UL, conditionTracker.mSlicedConditionState.size());
-        } else {
-            ASSERT_EQ(uids.size(), conditionTracker.mSlicedConditionState.size());
-        }
-        EXPECT_TRUE(conditionTracker.getChangedToTrueDimensions(allConditions)->empty());
-        EXPECT_TRUE(conditionTracker.getChangedToFalseDimensions(allConditions)->empty());
-
-
-        // wake lock 1 release
-        LogEvent event3(/*uid=*/0, /*pid=*/0);
-        makeWakeLockEvent(&event3, /*atomId=*/1, /*timestamp=*/0, uids, "wl1", /*acquire=*/0);
-        matcherState.clear();
-        matcherState.push_back(MatchingState::kNotMatched);
-        matcherState.push_back(MatchingState::kMatched);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        changedCache[0] = false;
-        conditionTracker.evaluateCondition(event3, matcherState, allPredicates, conditionCache,
-                                           changedCache);
-        // nothing changes, because wake lock 2 is still held for this uid
-        EXPECT_FALSE(changedCache[0]);
-        if (position == Position::FIRST || position == Position::LAST) {
-            ASSERT_EQ(1UL, conditionTracker.mSlicedConditionState.size());
-        } else {
-            ASSERT_EQ(uids.size(), conditionTracker.mSlicedConditionState.size());
-        }
-        EXPECT_TRUE(conditionTracker.getChangedToTrueDimensions(allConditions)->empty());
-        EXPECT_TRUE(conditionTracker.getChangedToFalseDimensions(allConditions)->empty());
-
-        LogEvent event4(/*uid=*/0, /*pid=*/0);
-        makeWakeLockEvent(&event4, /*atomId=*/1, /*timestamp=*/0, uids, "wl2", /*acquire=*/0);
-        matcherState.clear();
-        matcherState.push_back(MatchingState::kNotMatched);
-        matcherState.push_back(MatchingState::kMatched);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        changedCache[0] = false;
-        conditionTracker.evaluateCondition(event4, matcherState, allPredicates, conditionCache,
-                                           changedCache);
-        ASSERT_EQ(0UL, conditionTracker.mSlicedConditionState.size());
-        EXPECT_TRUE(changedCache[0]);
-        if (position == Position::FIRST || position == Position::LAST) {
-            ASSERT_EQ(conditionTracker.getChangedToFalseDimensions(allConditions)->size(), 1u);
-            EXPECT_TRUE(conditionTracker.getChangedToTrueDimensions(allConditions)->empty());
-        } else {
-            EXPECT_EQ(conditionTracker.getChangedToFalseDimensions(allConditions)->size(),
-                      uids.size());
-        }
-
-        // query again
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache);
-        EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-    }
-
-}
-
-TEST(SimpleConditionTrackerTest, TestSlicedWithNoOutputDim) {
-    std::vector<sp<ConditionTracker>> allConditions;
-
-    SimplePredicate simplePredicate =
-            getWakeLockHeldCondition(true /*nesting*/, true /*default to false*/,
-                                     false /*slice output by uid*/, Position::ANY /* position */);
-    string conditionName = "WL_HELD";
-
-    unordered_map<int64_t, int> trackerNameIndexMap;
-    trackerNameIndexMap[StringToId("WAKE_LOCK_ACQUIRE")] = 0;
-    trackerNameIndexMap[StringToId("WAKE_LOCK_RELEASE")] = 1;
-    trackerNameIndexMap[StringToId("RELEASE_ALL")] = 2;
-
-    SimpleConditionTracker conditionTracker(kConfigKey, StringToId(conditionName),
-                                            0 /*condition tracker index*/, simplePredicate,
-                                            trackerNameIndexMap);
-
-    EXPECT_FALSE(conditionTracker.isSliced());
-
-    std::vector<int> uids1 = {111, 1111, 11111};
-    string uid1_wl1 = "wl1_1";
-    std::vector<int> uids2 = {222, 2222, 22222};
-    string uid2_wl1 = "wl2_1";
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeWakeLockEvent(&event1, /*atomId=*/1, /*timestamp=*/0, uids1, uid1_wl1, /*acquire=*/1);
-
-    // one matched start for uid1
-    vector<MatchingState> matcherState;
-    matcherState.push_back(MatchingState::kMatched);
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kNotMatched);
-    vector<sp<ConditionTracker>> allPredicates;
-    vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated);
-    vector<bool> changedCache(1, false);
-
-    conditionTracker.evaluateCondition(event1, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-
-    ASSERT_EQ(1UL, conditionTracker.mSlicedConditionState.size());
-    EXPECT_TRUE(changedCache[0]);
-
-    // Now test query
-    ConditionKey queryKey;
-    conditionCache[0] = ConditionState::kNotEvaluated;
-
-    conditionTracker.isConditionMet(queryKey, allPredicates, true, conditionCache);
-    EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-
-    // another wake lock acquired by this uid
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeWakeLockEvent(&event2, /*atomId=*/1, /*timestamp=*/0, uids2, uid2_wl1, /*acquire=*/1);
-
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kMatched);
-    matcherState.push_back(MatchingState::kNotMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-    conditionTracker.evaluateCondition(event2, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    EXPECT_FALSE(changedCache[0]);
-
-    // uid1 wake lock 1 release
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    makeWakeLockEvent(&event3, /*atomId=*/1, /*timestamp=*/0, uids1, uid1_wl1,
-                      /*release=*/0);  // now release it.
-
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-    conditionTracker.evaluateCondition(event3, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    // nothing changes, because uid2 is still holding wl.
-    EXPECT_FALSE(changedCache[0]);
-
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    makeWakeLockEvent(&event4, /*atomId=*/1, /*timestamp=*/0, uids2, uid2_wl1,
-                      /*acquire=*/0);  // now release it.
-    matcherState.clear();
-    matcherState.push_back(MatchingState::kNotMatched);
-    matcherState.push_back(MatchingState::kMatched);
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    changedCache[0] = false;
-    conditionTracker.evaluateCondition(event4, matcherState, allPredicates, conditionCache,
-                                       changedCache);
-    ASSERT_EQ(0UL, conditionTracker.mSlicedConditionState.size());
-    EXPECT_TRUE(changedCache[0]);
-
-    // query again
-    conditionCache[0] = ConditionState::kNotEvaluated;
-    conditionTracker.isConditionMet(queryKey, allPredicates, true, conditionCache);
-    EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-}
-
-TEST(SimpleConditionTrackerTest, TestStopAll) {
-    std::vector<sp<ConditionTracker>> allConditions;
-    for (Position position : {Position::FIRST, Position::LAST}) {
-        SimplePredicate simplePredicate =
-                getWakeLockHeldCondition(true /*nesting*/, true /*default to false*/,
-                                         true /*output slice by uid*/, position);
-        string conditionName = "WL_HELD_BY_UID3";
-
-        unordered_map<int64_t, int> trackerNameIndexMap;
-        trackerNameIndexMap[StringToId("WAKE_LOCK_ACQUIRE")] = 0;
-        trackerNameIndexMap[StringToId("WAKE_LOCK_RELEASE")] = 1;
-        trackerNameIndexMap[StringToId("RELEASE_ALL")] = 2;
-
-        SimpleConditionTracker conditionTracker(kConfigKey, StringToId(conditionName),
-                                                0 /*condition tracker index*/, simplePredicate,
-                                                trackerNameIndexMap);
-
-        std::vector<int> uids1 = {111, 1111, 11111};
-        std::vector<int> uids2 = {222, 2222, 22222};
-
-        LogEvent event1(/*uid=*/0, /*pid=*/0);
-        makeWakeLockEvent(&event1, /*atomId=*/1, /*timestamp=*/0, uids1, "wl1", /*acquire=*/1);
-
-        // one matched start
-        vector<MatchingState> matcherState;
-        matcherState.push_back(MatchingState::kMatched);
-        matcherState.push_back(MatchingState::kNotMatched);
-        matcherState.push_back(MatchingState::kNotMatched);
-        vector<sp<ConditionTracker>> allPredicates;
-        vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated);
-        vector<bool> changedCache(1, false);
-
-        conditionTracker.evaluateCondition(event1, matcherState, allPredicates, conditionCache,
-                                           changedCache);
-        if (position == Position::FIRST || position == Position::LAST) {
-            ASSERT_EQ(1UL, conditionTracker.mSlicedConditionState.size());
-        } else {
-            ASSERT_EQ(uids1.size(), conditionTracker.mSlicedConditionState.size());
-        }
-        EXPECT_TRUE(changedCache[0]);
-        {
-            if (position == Position::FIRST || position == Position::LAST) {
-                ASSERT_EQ(1UL, conditionTracker.getChangedToTrueDimensions(allConditions)->size());
-                EXPECT_TRUE(conditionTracker.getChangedToFalseDimensions(allConditions)->empty());
-            } else {
-                EXPECT_EQ(uids1.size(),
-                          conditionTracker.getChangedToTrueDimensions(allConditions)->size());
-                EXPECT_TRUE(conditionTracker.getChangedToFalseDimensions(allConditions)->empty());
-            }
-        }
-
-        // Now test query
-        const auto queryKey = getWakeLockQueryKey(position, uids1, conditionName);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-
-        conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache);
-        EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-
-        // another wake lock acquired by uid2
-        LogEvent event2(/*uid=*/0, /*pid=*/0);
-        makeWakeLockEvent(&event2, /*atomId=*/1, /*timestamp=*/0, uids2, "wl2", /*acquire=*/1);
-
-        matcherState.clear();
-        matcherState.push_back(MatchingState::kMatched);
-        matcherState.push_back(MatchingState::kNotMatched);
-        matcherState.push_back(MatchingState::kNotMatched);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        changedCache[0] = false;
-        conditionTracker.evaluateCondition(event2, matcherState, allPredicates, conditionCache,
-                                           changedCache);
-        if (position == Position::FIRST || position == Position::LAST) {
-            ASSERT_EQ(2UL, conditionTracker.mSlicedConditionState.size());
-        } else {
-            ASSERT_EQ(uids1.size() + uids2.size(), conditionTracker.mSlicedConditionState.size());
-        }
-        EXPECT_TRUE(changedCache[0]);
-        {
-            if (position == Position::FIRST || position == Position::LAST) {
-                ASSERT_EQ(1UL, conditionTracker.getChangedToTrueDimensions(allConditions)->size());
-                EXPECT_TRUE(conditionTracker.getChangedToFalseDimensions(allConditions)->empty());
-            } else {
-                EXPECT_EQ(uids2.size(),
-                          conditionTracker.getChangedToTrueDimensions(allConditions)->size());
-                EXPECT_TRUE(conditionTracker.getChangedToFalseDimensions(allConditions)->empty());
-            }
-        }
-
-        // TEST QUERY
-        const auto queryKey2 = getWakeLockQueryKey(position, uids2, conditionName);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache);
-
-        EXPECT_EQ(ConditionState::kTrue, conditionCache[0]);
-
-        // stop all event
-        LogEvent event3(/*uid=*/0, /*pid=*/0);
-        makeWakeLockEvent(&event3, /*atomId=*/1, /*timestamp=*/0, uids2, "wl2", /*acquire=*/1);
-
-        matcherState.clear();
-        matcherState.push_back(MatchingState::kNotMatched);
-        matcherState.push_back(MatchingState::kNotMatched);
-        matcherState.push_back(MatchingState::kMatched);
-
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        changedCache[0] = false;
-        conditionTracker.evaluateCondition(event3, matcherState, allPredicates, conditionCache,
-                                           changedCache);
-        EXPECT_TRUE(changedCache[0]);
-        ASSERT_EQ(0UL, conditionTracker.mSlicedConditionState.size());
-        {
-            if (position == Position::FIRST || position == Position::LAST) {
-                ASSERT_EQ(2UL, conditionTracker.getChangedToFalseDimensions(allConditions)->size());
-                EXPECT_TRUE(conditionTracker.getChangedToTrueDimensions(allConditions)->empty());
-            } else {
-                EXPECT_EQ(uids1.size() + uids2.size(),
-                          conditionTracker.getChangedToFalseDimensions(allConditions)->size());
-                EXPECT_TRUE(conditionTracker.getChangedToTrueDimensions(allConditions)->empty());
-            }
-        }
-
-        // TEST QUERY
-        const auto queryKey3 = getWakeLockQueryKey(position, uids1, conditionName);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache);
-        EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-
-        // TEST QUERY
-        const auto queryKey4 = getWakeLockQueryKey(position, uids2, conditionName);
-        conditionCache[0] = ConditionState::kNotEvaluated;
-        conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache);
-        EXPECT_EQ(ConditionState::kFalse, conditionCache[0]);
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/e2e/Alarm_e2e_test.cpp b/cmds/statsd/tests/e2e/Alarm_e2e_test.cpp
deleted file mode 100644
index 93b2783..0000000
--- a/cmds/statsd/tests/e2e/Alarm_e2e_test.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <gtest/gtest.h>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-StatsdConfig CreateStatsdConfig() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-
-    auto alarm = config.add_alarm();
-    alarm->set_id(123456);
-    alarm->set_offset_millis(TimeUnitToBucketSizeInMillis(TEN_MINUTES));
-    alarm->set_period_millis(TimeUnitToBucketSizeInMillis(ONE_HOUR));
-
-    alarm = config.add_alarm();
-    alarm->set_id(654321);
-    alarm->set_offset_millis(TimeUnitToBucketSizeInMillis(FIVE_MINUTES));
-    alarm->set_period_millis(TimeUnitToBucketSizeInMillis(THIRTY_MINUTES));
-    return config;
-}
-
-}  // namespace
-
-TEST(AlarmE2eTest, TestMultipleAlarms) {
-    auto config = CreateStatsdConfig();
-    int64_t bucketStartTimeNs = 10000000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(2u, processor->mMetricsManagers.begin()->second->mAllPeriodicAlarmTrackers.size());
-
-    auto alarmTracker1 = processor->mMetricsManagers.begin()->second->mAllPeriodicAlarmTrackers[0];
-    auto alarmTracker2 = processor->mMetricsManagers.begin()->second->mAllPeriodicAlarmTrackers[1];
-
-    int64_t alarmTimestampSec0 = bucketStartTimeNs / NS_PER_SEC + 10 * 60;
-    int64_t alarmTimestampSec1 = bucketStartTimeNs / NS_PER_SEC + 5 * 60;
-    EXPECT_EQ(alarmTimestampSec0, alarmTracker1->getAlarmTimestampSec());
-    EXPECT_EQ(alarmTimestampSec1, alarmTracker2->getAlarmTimestampSec());
-
-    // Alarm fired.
-    const int64_t alarmFiredTimestampSec0 = alarmTimestampSec1 + 5;
-    auto alarmSet = processor->getPeriodicAlarmMonitor()->popSoonerThan(
-            static_cast<uint32_t>(alarmFiredTimestampSec0));
-    ASSERT_EQ(1u, alarmSet.size());
-    processor->onPeriodicAlarmFired(alarmFiredTimestampSec0 * NS_PER_SEC, alarmSet);
-    EXPECT_EQ(alarmTimestampSec0, alarmTracker1->getAlarmTimestampSec());
-    EXPECT_EQ(alarmTimestampSec1 + 30 * 60, alarmTracker2->getAlarmTimestampSec());
-
-    // Alarms fired very late.
-    const int64_t alarmFiredTimestampSec1 = alarmTimestampSec0 + 2 * 60 * 60 + 125;
-    alarmSet = processor->getPeriodicAlarmMonitor()->popSoonerThan(
-            static_cast<uint32_t>(alarmFiredTimestampSec1));
-    ASSERT_EQ(2u, alarmSet.size());
-    processor->onPeriodicAlarmFired(alarmFiredTimestampSec1 * NS_PER_SEC, alarmSet);
-    EXPECT_EQ(alarmTimestampSec0 + 60 * 60 * 3, alarmTracker1->getAlarmTimestampSec());
-    EXPECT_EQ(alarmTimestampSec1 + 30 * 60 * 5, alarmTracker2->getAlarmTimestampSec());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/Anomaly_count_e2e_test.cpp b/cmds/statsd/tests/e2e/Anomaly_count_e2e_test.cpp
deleted file mode 100644
index af9436b..0000000
--- a/cmds/statsd/tests/e2e/Anomaly_count_e2e_test.cpp
+++ /dev/null
@@ -1,390 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 <gtest/gtest.h>
-
-#include "frameworks/base/cmds/statsd/src/statsd_metadata.pb.h"
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-StatsdConfig CreateStatsdConfig(int num_buckets, int threshold, int refractory_period_sec) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-
-    *config.add_atom_matcher() = wakelockAcquireMatcher;
-
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(123456);
-    countMetric->set_what(wakelockAcquireMatcher.id());
-    *countMetric->mutable_dimensions_in_what() = CreateAttributionUidDimensions(
-            util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    countMetric->set_bucket(FIVE_MINUTES);
-
-    auto alert = config.add_alert();
-    alert->set_id(StringToId("alert"));
-    alert->set_metric_id(123456);
-    alert->set_num_buckets(num_buckets);
-    alert->set_refractory_period_secs(refractory_period_sec);
-    alert->set_trigger_if_sum_gt(threshold);
-    return config;
-}
-
-}  // namespace
-
-TEST(AnomalyDetectionE2eTest, TestSlicedCountMetric_single_bucket) {
-    const int num_buckets = 1;
-    const int threshold = 3;
-    const int refractory_period_sec = 10;
-    auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec);
-    const uint64_t alert_id = config.alert(0).id();
-
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(1u, processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers.size());
-
-    sp<AnomalyTracker> anomalyTracker =
-            processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers[0];
-
-    std::vector<int> attributionUids1 = {111};
-    std::vector<string> attributionTags1 = {"App1"};
-    std::vector<int> attributionUids2 = {111, 222};
-    std::vector<string> attributionTags2 = {"App1", "GMSCoreModule1"};
-    std::vector<int> attributionUids3 = {111, 333};
-    std::vector<string> attributionTags3 = {"App1", "App3"};
-    std::vector<int> attributionUids4 = {222, 333};
-    std::vector<string> attributionTags4 = {"GMSCoreModule1", "App3"};
-    std::vector<int> attributionUids5 = {222};
-    std::vector<string> attributionTags5 = {"GMSCoreModule1"};
-
-    FieldValue fieldValue1(Field(util::WAKELOCK_STATE_CHANGED, (int32_t)0x02010101),
-                           Value((int32_t)111));
-    HashableDimensionKey whatKey1({fieldValue1});
-    MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY);
-
-    FieldValue fieldValue2(Field(util::WAKELOCK_STATE_CHANGED, (int32_t)0x02010101),
-                           Value((int32_t)222));
-    HashableDimensionKey whatKey2({fieldValue2});
-    MetricDimensionKey dimensionKey2(whatKey2, DEFAULT_DIMENSION_KEY);
-
-    auto event = CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids1,
-                                            attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids4, attributionTags4,
-                                       "wl2");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 3, attributionUids2, attributionTags2,
-                                       "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 3, attributionUids5, attributionTags5,
-                                       "wl2");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 4, attributionUids3, attributionTags3,
-                                       "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 4, attributionUids5, attributionTags5,
-                                       "wl2");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-
-    // Fired alarm and refractory period end timestamp updated.
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 5, attributionUids1, attributionTags1,
-                                       "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + bucketStartTimeNs / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 100, attributionUids1, attributionTags1,
-                                       "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + bucketStartTimeNs / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs - 1, attributionUids1,
-                                       attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs - 1) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 1, attributionUids1,
-                                       attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs - 1) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 1, attributionUids4,
-                                       attributionTags4, "wl2");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 2, attributionUids5,
-                                       attributionTags5, "wl2");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 3, attributionUids5,
-                                       attributionTags5, "wl2");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 4, attributionUids5,
-                                       attributionTags5, "wl2");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + 4) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-}
-
-TEST(AnomalyDetectionE2eTest, TestSlicedCountMetric_multiple_buckets) {
-    const int num_buckets = 3;
-    const int threshold = 3;
-    const int refractory_period_sec = 10;
-    auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec);
-    const uint64_t alert_id = config.alert(0).id();
-
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(1u, processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers.size());
-
-    sp<AnomalyTracker> anomalyTracker =
-            processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers[0];
-
-    std::vector<int> attributionUids1 = {111};
-    std::vector<string> attributionTags1 = {"App1"};
-    std::vector<int> attributionUids2 = {111, 222};
-    std::vector<string> attributionTags2 = {"App1", "GMSCoreModule1"};
-
-    FieldValue fieldValue1(Field(util::WAKELOCK_STATE_CHANGED, (int32_t)0x02010101),
-                           Value((int32_t)111));
-    HashableDimensionKey whatKey1({fieldValue1});
-    MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY);
-
-    auto event = CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids1,
-                                            attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 3, attributionUids2, attributionTags2,
-                                       "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Fired alarm and refractory period end timestamp updated.
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 4, attributionUids1, attributionTags1,
-                                       "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 1, attributionUids1,
-                                       attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + 1) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 2, attributionUids2,
-                                       attributionTags2, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + 1) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs + 1, attributionUids2,
-                                       attributionTags2, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + 1) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs + 2, attributionUids2,
-                                       attributionTags2, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + 3 * bucketSizeNs + 2) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-}
-
-TEST(AnomalyDetectionE2eTest, TestCountMetric_save_refractory_to_disk_no_data_written) {
-    const int num_buckets = 1;
-    const int threshold = 0;
-    const int refractory_period_sec = 86400 * 365; // 1 year
-    auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec);
-    const int64_t alert_id = config.alert(0).id();
-
-    int64_t bucketStartTimeNs = 10000000000;
-
-    int configUid = 2000;
-    int64_t configId = 1000;
-    ConfigKey cfgKey(configUid, configId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(1u, processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers.size());
-
-    metadata::StatsMetadataList result;
-    int64_t mockWallClockNs = 1584991200 * NS_PER_SEC;
-    int64_t mockElapsedTimeNs = bucketStartTimeNs + 5000 * NS_PER_SEC;
-    processor->WriteMetadataToProto(mockWallClockNs, mockElapsedTimeNs, &result);
-
-    ASSERT_EQ(result.stats_metadata_size(), 0);
-}
-
-TEST(AnomalyDetectionE2eTest, TestCountMetric_save_refractory_to_disk) {
-    const int num_buckets = 1;
-    const int threshold = 0;
-    const int refractory_period_sec = 86400 * 365; // 1 year
-    auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec);
-    const int64_t alert_id = config.alert(0).id();
-
-    int64_t bucketStartTimeNs = 10000000000;
-
-    int configUid = 2000;
-    int64_t configId = 1000;
-    ConfigKey cfgKey(configUid, configId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(1u, processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers.size());
-
-    sp<AnomalyTracker> anomalyTracker =
-            processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers[0];
-
-    std::vector<int> attributionUids1 = {111};
-    std::vector<string> attributionTags1 = {"App1"};
-    std::vector<int> attributionUids2 = {111, 222};
-    std::vector<string> attributionTags2 = {"App1", "GMSCoreModule1"};
-
-    FieldValue fieldValue1(Field(util::WAKELOCK_STATE_CHANGED, (int32_t)0x02010101),
-                           Value((int32_t)111));
-    HashableDimensionKey whatKey1({fieldValue1});
-    MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY);
-
-    auto event = CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids1,
-                                            attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + 2) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    metadata::StatsMetadataList result;
-    int64_t mockWallClockNs = 1584991200 * NS_PER_SEC;
-    int64_t mockElapsedTimeNs = bucketStartTimeNs + 5000 * NS_PER_SEC;
-    processor->WriteMetadataToProto(mockWallClockNs, mockElapsedTimeNs, &result);
-
-    metadata::StatsMetadata statsMetadata = result.stats_metadata(0);
-    ASSERT_EQ(result.stats_metadata_size(), 1);
-    EXPECT_EQ(statsMetadata.config_key().config_id(), configId);
-    EXPECT_EQ(statsMetadata.config_key().uid(), configUid);
-
-    metadata::AlertMetadata alertMetadata = statsMetadata.alert_metadata(0);
-    ASSERT_EQ(statsMetadata.alert_metadata_size(), 1);
-    EXPECT_EQ(alertMetadata.alert_id(), alert_id);
-    metadata::AlertDimensionKeyedData keyedData = alertMetadata.alert_dim_keyed_data(0);
-    ASSERT_EQ(alertMetadata.alert_dim_keyed_data_size(), 1);
-    EXPECT_EQ(keyedData.last_refractory_ends_sec(),
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1) -
-              mockElapsedTimeNs / NS_PER_SEC +
-              mockWallClockNs / NS_PER_SEC);
-
-    metadata::MetricDimensionKey metadataDimKey = keyedData.dimension_key();
-    metadata::FieldValue dimKeyInWhat = metadataDimKey.dimension_key_in_what(0);
-    EXPECT_EQ(dimKeyInWhat.field().tag(), fieldValue1.mField.getTag());
-    EXPECT_EQ(dimKeyInWhat.field().field(), fieldValue1.mField.getField());
-    EXPECT_EQ(dimKeyInWhat.value_int(), fieldValue1.mValue.int_value);
-}
-
-TEST(AnomalyDetectionE2eTest, TestCountMetric_load_refractory_from_disk) {
-    const int num_buckets = 1;
-    const int threshold = 0;
-    const int refractory_period_sec = 86400 * 365; // 1 year
-    auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec);
-    const int64_t alert_id = config.alert(0).id();
-
-    int64_t bucketStartTimeNs = 10000000000;
-
-    int configUid = 2000;
-    int64_t configId = 1000;
-    ConfigKey cfgKey(configUid, configId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(1u, processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers.size());
-
-    sp<AnomalyTracker> anomalyTracker =
-            processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers[0];
-
-    std::vector<int> attributionUids1 = {111};
-    std::vector<string> attributionTags1 = {"App1"};
-    std::vector<int> attributionUids2 = {111, 222};
-    std::vector<string> attributionTags2 = {"App1", "GMSCoreModule1"};
-
-    FieldValue fieldValue1(Field(util::WAKELOCK_STATE_CHANGED, (int32_t)0x02010101),
-                           Value((int32_t)111));
-    HashableDimensionKey whatKey1({fieldValue1});
-    MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY);
-
-    auto event = CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids1,
-                                            attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + 2) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    int64_t mockWallClockNs = 1584991200 * NS_PER_SEC;
-    int64_t mockElapsedTimeNs = bucketStartTimeNs + 5000 * NS_PER_SEC;
-    processor->SaveMetadataToDisk(mockWallClockNs, mockElapsedTimeNs);
-
-    auto processor2 = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    int64_t mockElapsedTimeSinceBoot = 10 * NS_PER_SEC;
-    processor2->LoadMetadataFromDisk(mockWallClockNs, mockElapsedTimeSinceBoot);
-
-    sp<AnomalyTracker> anomalyTracker2 =
-                processor2->mMetricsManagers.begin()->second->mAllAnomalyTrackers[0];
-    EXPECT_EQ(anomalyTracker2->getRefractoryPeriodEndsSec(dimensionKey1) -
-              mockElapsedTimeSinceBoot / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1) -
-              mockElapsedTimeNs / NS_PER_SEC);
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/Anomaly_duration_sum_e2e_test.cpp b/cmds/statsd/tests/e2e/Anomaly_duration_sum_e2e_test.cpp
deleted file mode 100644
index 70e7365..0000000
--- a/cmds/statsd/tests/e2e/Anomaly_duration_sum_e2e_test.cpp
+++ /dev/null
@@ -1,527 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 <android/binder_ibinder.h>
-#include <android/binder_interface_utils.h>
-#include <gtest/gtest.h>
-
-#include <vector>
-
-#include "src/StatsLogProcessor.h"
-#include "src/StatsService.h"
-#include "src/anomaly/DurationAnomalyTracker.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-using ::ndk::SharedRefBase;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-const int kConfigKey = 789130124;
-const int kCallingUid = 0;
-
-StatsdConfig CreateStatsdConfig(int num_buckets,
-                                uint64_t threshold_ns,
-                                DurationMetric::AggregationType aggregationType,
-                                bool nesting) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-    *config.add_atom_matcher() = CreateAcquireWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateReleaseWakelockAtomMatcher();
-
-    auto screenIsOffPredicate = CreateScreenIsOffPredicate();
-    *config.add_predicate() = screenIsOffPredicate;
-
-    auto holdingWakelockPredicate = CreateHoldingWakelockPredicate();
-    FieldMatcher dimensions = CreateAttributionUidDimensions(
-            util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    dimensions.add_child()->set_field(3);  // The wakelock tag is set in field 3 of the wakelock.
-    *holdingWakelockPredicate.mutable_simple_predicate()->mutable_dimensions() = dimensions;
-    holdingWakelockPredicate.mutable_simple_predicate()->set_count_nesting(nesting);
-    *config.add_predicate() = holdingWakelockPredicate;
-
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("WakelockDuration"));
-    durationMetric->set_what(holdingWakelockPredicate.id());
-    durationMetric->set_condition(screenIsOffPredicate.id());
-    durationMetric->set_aggregation_type(aggregationType);
-    *durationMetric->mutable_dimensions_in_what() =
-        CreateAttributionUidDimensions(util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    auto alert = config.add_alert();
-    alert->set_id(StringToId("alert"));
-    alert->set_metric_id(StringToId("WakelockDuration"));
-    alert->set_num_buckets(num_buckets);
-    alert->set_refractory_period_secs(2);
-    alert->set_trigger_if_sum_gt(threshold_ns);
-    return config;
-}
-
-std::vector<int> attributionUids1 = {111, 222};
-std::vector<string> attributionTags1 = {"App1", "GMSCoreModule1"};
-
-std::vector<int> attributionUids2 = {111, 222};
-std::vector<string> attributionTags2 = {"App2", "GMSCoreModule1"};
-
-std::vector<int> attributionUids3 = {222};
-std::vector<string> attributionTags3 = {"GMSCoreModule1"};
-
-MetricDimensionKey dimensionKey1(
-        HashableDimensionKey({FieldValue(Field(util::WAKELOCK_STATE_CHANGED,
-                                               (int32_t)0x02010101),
-                                         Value((int32_t)111))}),
-        DEFAULT_DIMENSION_KEY);
-
-MetricDimensionKey dimensionKey2(
-    HashableDimensionKey({FieldValue(Field(util::WAKELOCK_STATE_CHANGED,
-                                           (int32_t)0x02010101), Value((int32_t)222))}),
-    DEFAULT_DIMENSION_KEY);
-
-void sendConfig(shared_ptr<StatsService>& service, const StatsdConfig& config) {
-    string str;
-    config.SerializeToString(&str);
-    std::vector<uint8_t> configAsVec(str.begin(), str.end());
-    service->addConfiguration(kConfigKey, configAsVec, kCallingUid);
-}
-
-}  // namespace
-
-TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_single_bucket) {
-    const int num_buckets = 1;
-    const uint64_t threshold_ns = NS_PER_SEC;
-    auto config = CreateStatsdConfig(num_buckets, threshold_ns, DurationMetric::SUM, true);
-    const uint64_t alert_id = config.alert(0).id();
-    const uint32_t refractory_period_sec = config.alert(0).refractory_period_secs();
-
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    sendConfig(service, config);
-
-    auto processor = service->mProcessor;
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(1u, processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers.size());
-
-    int64_t bucketStartTimeNs = processor->mTimeBaseNs;
-    int64_t roundedBucketStartTimeNs = bucketStartTimeNs / NS_PER_SEC * NS_PER_SEC;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1e6;
-
-    sp<AnomalyTracker> anomalyTracker =
-            processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers[0];
-
-    auto screen_on_event = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 1, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    auto screen_off_event = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 10, android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screen_on_event.get());
-    processor->OnLogEvent(screen_off_event.get());
-
-    // Acquire wakelock wl1.
-    auto acquire_event = CreateAcquireWakelockEvent(bucketStartTimeNs + 11, attributionUids1,
-                                                    attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((bucketStartTimeNs + 11 + threshold_ns) / NS_PER_SEC + 1,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Release wakelock wl1. No anomaly detected. Alarm cancelled at the "release" event.
-    auto release_event = CreateReleaseWakelockEvent(bucketStartTimeNs + 101, attributionUids1,
-                                                    attributionTags1, "wl1");
-    processor->OnLogEvent(release_event.get());
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Acquire wakelock wl1 within bucket #0.
-    acquire_event = CreateAcquireWakelockEvent(bucketStartTimeNs + 110, attributionUids2,
-                                               attributionTags2, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((bucketStartTimeNs + 110 + threshold_ns - 90) / NS_PER_SEC + 1,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Release wakelock wl1. One anomaly detected.
-    release_event = CreateReleaseWakelockEvent(bucketStartTimeNs + NS_PER_SEC + 109,
-                                               attributionUids2, attributionTags2, "wl1");
-    processor->OnLogEvent(release_event.get());
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + NS_PER_SEC + 109) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Acquire wakelock wl1.
-    acquire_event = CreateAcquireWakelockEvent(bucketStartTimeNs + NS_PER_SEC + 112,
-                                               attributionUids1, attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    // Wakelock has been hold longer than the threshold in bucket #0. The alarm is set at the
-    // end of the refractory period.
-    const int64_t alarmFiredTimestampSec0 = anomalyTracker->getAlarmTimestampSec(dimensionKey1);
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + NS_PER_SEC + 109) / NS_PER_SEC + 1,
-              (uint32_t)alarmFiredTimestampSec0);
-    EXPECT_EQ(alarmFiredTimestampSec0,
-              processor->getAnomalyAlarmMonitor()->getRegisteredAlarmTimeSec());
-
-    // Anomaly alarm fired.
-    auto alarmTriggerEvent = CreateBatterySaverOnEvent(alarmFiredTimestampSec0 * NS_PER_SEC);
-    processor->OnLogEvent(alarmTriggerEvent.get(), alarmFiredTimestampSec0 * NS_PER_SEC);
-
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(refractory_period_sec + alarmFiredTimestampSec0,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Release wakelock wl1.
-    release_event =
-            CreateReleaseWakelockEvent(alarmFiredTimestampSec0 * NS_PER_SEC + NS_PER_SEC + 1,
-                                       attributionUids1, attributionTags1, "wl1");
-    processor->OnLogEvent(release_event.get());
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    // Within refractory period. No more anomaly detected.
-    EXPECT_EQ(refractory_period_sec + alarmFiredTimestampSec0,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Acquire wakelock wl1.
-    acquire_event = CreateAcquireWakelockEvent(
-            roundedBucketStartTimeNs + bucketSizeNs - 5 * NS_PER_SEC - 11, attributionUids2,
-            attributionTags2, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    const int64_t alarmFiredTimestampSec1 = anomalyTracker->getAlarmTimestampSec(dimensionKey1);
-    EXPECT_EQ((bucketStartTimeNs + bucketSizeNs - 5 * NS_PER_SEC) / NS_PER_SEC,
-              (uint64_t)alarmFiredTimestampSec1);
-
-    // Release wakelock wl1.
-    int64_t release_event_time = roundedBucketStartTimeNs + bucketSizeNs - 4 * NS_PER_SEC - 10;
-    release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids2,
-                                               attributionTags2, "wl1");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(refractory_period_sec + (release_event_time) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    auto alarmSet = processor->getAnomalyAlarmMonitor()->popSoonerThan(
-            static_cast<uint32_t>(alarmFiredTimestampSec1));
-    ASSERT_EQ(0u, alarmSet.size());
-
-    // Acquire wakelock wl1 near the end of bucket #0.
-    acquire_event = CreateAcquireWakelockEvent(roundedBucketStartTimeNs + bucketSizeNs - 2,
-                                               attributionUids1, attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((bucketStartTimeNs + bucketSizeNs) / NS_PER_SEC,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-
-    // Release the event at early bucket #1.
-    release_event_time = roundedBucketStartTimeNs + bucketSizeNs + NS_PER_SEC - 1;
-    release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids1,
-                                               attributionTags1, "wl1");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    // Anomaly detected when stopping the alarm. The refractory period does not change.
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + NS_PER_SEC) / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Condition changes to false.
-    screen_on_event =
-            CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * bucketSizeNs + 20,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screen_on_event.get());
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + NS_PER_SEC) / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-
-    acquire_event = CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 30,
-                                               attributionUids2, attributionTags2, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    // The condition is false. Do not start the alarm.
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + NS_PER_SEC) / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Condition turns true.
-    screen_off_event =
-            CreateScreenStateChangedEvent(roundedBucketStartTimeNs + 2 * bucketSizeNs + NS_PER_SEC,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screen_off_event.get());
-    EXPECT_EQ((bucketStartTimeNs + 2 * bucketSizeNs + NS_PER_SEC + threshold_ns) / NS_PER_SEC,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-
-    // Condition turns to false.
-    int64_t condition_false_time = bucketStartTimeNs + 2 * bucketSizeNs + 2 * NS_PER_SEC + 1;
-    screen_on_event = CreateScreenStateChangedEvent(
-            condition_false_time, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screen_on_event.get(), condition_false_time);
-    // Condition turns to false. Cancelled the alarm.
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    //  Detected one anomaly.
-    EXPECT_EQ(refractory_period_sec +
-                      (bucketStartTimeNs + 2 * bucketSizeNs + 2 * NS_PER_SEC + 1) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Condition turns to true again.
-    screen_off_event =
-            CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * bucketSizeNs + 2 * NS_PER_SEC + 2,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screen_off_event.get());
-    EXPECT_EQ((bucketStartTimeNs + 2 * bucketSizeNs) / NS_PER_SEC + 2 + 2 + 1,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-
-    release_event_time = roundedBucketStartTimeNs + 2 * bucketSizeNs + 5 * NS_PER_SEC;
-    release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids2,
-                                               attributionTags2, "wl1");
-    processor->OnLogEvent(release_event.get());
-    EXPECT_EQ(refractory_period_sec + (release_event_time) / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-}
-
-TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_multiple_buckets) {
-    const int num_buckets = 3;
-    const uint64_t threshold_ns = NS_PER_SEC;
-    auto config = CreateStatsdConfig(num_buckets, threshold_ns, DurationMetric::SUM, true);
-    const uint64_t alert_id = config.alert(0).id();
-    const uint32_t refractory_period_sec = config.alert(0).refractory_period_secs();
-
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    sendConfig(service, config);
-
-    auto processor = service->mProcessor;
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(1u, processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers.size());
-
-    int64_t bucketStartTimeNs = processor->mTimeBaseNs;
-    int64_t roundedBucketStartTimeNs = bucketStartTimeNs / NS_PER_SEC * NS_PER_SEC;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1e6;
-
-    sp<AnomalyTracker> anomalyTracker =
-            processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers[0];
-
-    auto screen_off_event = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 1, android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screen_off_event.get());
-
-    // Acquire wakelock "wc1" in bucket #0.
-    auto acquire_event =
-            CreateAcquireWakelockEvent(roundedBucketStartTimeNs + bucketSizeNs - NS_PER_SEC / 2 - 1,
-                                       attributionUids1, attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((roundedBucketStartTimeNs + bucketSizeNs) / NS_PER_SEC + 1,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Release wakelock "wc1" in bucket #0.
-    int64_t release_event_time = roundedBucketStartTimeNs + bucketSizeNs - 1;
-    auto release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids1,
-                                                    attributionTags1, "wl1");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Acquire wakelock "wc1" in bucket #1.
-    acquire_event =
-            CreateAcquireWakelockEvent(roundedBucketStartTimeNs + bucketSizeNs + NS_PER_SEC + 1,
-                                       attributionUids2, attributionTags2, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((bucketStartTimeNs + bucketSizeNs + NS_PER_SEC) / NS_PER_SEC + 1,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    release_event_time = roundedBucketStartTimeNs + bucketSizeNs + NS_PER_SEC + 100;
-    release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids2,
-                                               attributionTags2, "wl1");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Acquire wakelock "wc2" in bucket #2.
-    acquire_event =
-            CreateAcquireWakelockEvent(roundedBucketStartTimeNs + 2 * bucketSizeNs + NS_PER_SEC + 1,
-                                       attributionUids3, attributionTags3, "wl2");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((bucketStartTimeNs + 2 * bucketSizeNs) / NS_PER_SEC + 3,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey2));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-
-    // Release wakelock "wc2" in bucket #2.
-    release_event_time = roundedBucketStartTimeNs + 2 * bucketSizeNs + 3 * NS_PER_SEC;
-    release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids3,
-                                               attributionTags3, "wl2");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey2));
-    EXPECT_EQ(refractory_period_sec + (release_event_time) / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey2));
-
-    // Acquire wakelock "wc1" in bucket #2.
-    acquire_event =
-            CreateAcquireWakelockEvent(roundedBucketStartTimeNs + 2 * bucketSizeNs + 3 * NS_PER_SEC,
-                                       attributionUids2, attributionTags2, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((roundedBucketStartTimeNs + 2 * bucketSizeNs) / NS_PER_SEC + 3 + 1,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Release wakelock "wc1" in bucket #2.
-    release_event_time = roundedBucketStartTimeNs + 2 * bucketSizeNs + 3.5 * NS_PER_SEC;
-    release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids2,
-                                               attributionTags2, "wl1");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(refractory_period_sec + (release_event_time) / NS_PER_SEC + 1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    acquire_event = CreateAcquireWakelockEvent(roundedBucketStartTimeNs + 6 * bucketSizeNs + 4,
-                                               attributionUids3, attributionTags3, "wl2");
-    processor->OnLogEvent(acquire_event.get());
-    acquire_event = CreateAcquireWakelockEvent(roundedBucketStartTimeNs + 6 * bucketSizeNs + 5,
-                                               attributionUids1, attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((roundedBucketStartTimeNs + 6 * bucketSizeNs) / NS_PER_SEC + 2,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ((roundedBucketStartTimeNs + 6 * bucketSizeNs) / NS_PER_SEC + 2,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey2));
-
-    release_event_time = roundedBucketStartTimeNs + 6 * bucketSizeNs + NS_PER_SEC + 2;
-    release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids3,
-                                               attributionTags3, "wl2");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    release_event = CreateReleaseWakelockEvent(release_event_time + 4, attributionUids1,
-                                               attributionTags1, "wl1");
-    processor->OnLogEvent(release_event.get(), release_event_time + 4);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey2));
-    // The buckets are not messed up across dimensions. Only one dimension has anomaly triggered.
-    EXPECT_EQ(refractory_period_sec +
-                      (int64_t)(roundedBucketStartTimeNs + 6 * bucketSizeNs + NS_PER_SEC) /
-                              NS_PER_SEC +
-                      1,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-}
-
-TEST(AnomalyDetectionE2eTest, TestDurationMetric_SUM_long_refractory_period) {
-    const int num_buckets = 2;
-    const uint64_t threshold_ns = 3 * NS_PER_SEC;
-    auto config = CreateStatsdConfig(num_buckets, threshold_ns, DurationMetric::SUM, false);
-    const uint64_t alert_id = config.alert(0).id();
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1e6;
-    const uint32_t refractory_period_sec = 3 * bucketSizeNs / NS_PER_SEC;
-    config.mutable_alert(0)->set_refractory_period_secs(refractory_period_sec);
-
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    sendConfig(service, config);
-
-    auto processor = service->mProcessor;
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    ASSERT_EQ(1u, processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers.size());
-
-    int64_t bucketStartTimeNs = processor->mTimeBaseNs;
-    int64_t roundedBucketStartTimeNs = bucketStartTimeNs / NS_PER_SEC * NS_PER_SEC;
-
-    sp<AnomalyTracker> anomalyTracker =
-            processor->mMetricsManagers.begin()->second->mAllAnomalyTrackers[0];
-
-    auto screen_off_event = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 1, android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screen_off_event.get());
-
-    // Acquire wakelock "wc1" in bucket #0.
-    auto acquire_event = CreateAcquireWakelockEvent(roundedBucketStartTimeNs + bucketSizeNs - 100,
-                                                    attributionUids1, attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((roundedBucketStartTimeNs + bucketSizeNs) / NS_PER_SEC + 3,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Acquire the wakelock "wc1" again.
-    acquire_event =
-            CreateAcquireWakelockEvent(roundedBucketStartTimeNs + bucketSizeNs + 2 * NS_PER_SEC + 1,
-                                       attributionUids1, attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    // The alarm does not change.
-    EXPECT_EQ((roundedBucketStartTimeNs + bucketSizeNs) / NS_PER_SEC + 3,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(0u, anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // Anomaly alarm fired late.
-    const int64_t firedAlarmTimestampNs = roundedBucketStartTimeNs + 2 * bucketSizeNs - NS_PER_SEC;
-    auto alarmTriggerEvent = CreateBatterySaverOnEvent(firedAlarmTimestampNs);
-    processor->OnLogEvent(alarmTriggerEvent.get(), firedAlarmTimestampNs);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(refractory_period_sec + firedAlarmTimestampNs / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    acquire_event = CreateAcquireWakelockEvent(roundedBucketStartTimeNs + 2 * bucketSizeNs - 100,
-                                               attributionUids1, attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    EXPECT_EQ(refractory_period_sec + firedAlarmTimestampNs / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    int64_t release_event_time = bucketStartTimeNs + 2 * bucketSizeNs + 1;
-    auto release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids1,
-                                                    attributionTags1, "wl1");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-    // Within the refractory period. No anomaly.
-    EXPECT_EQ(refractory_period_sec + firedAlarmTimestampNs / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    // A new wakelock, but still within refractory period.
-    acquire_event = CreateAcquireWakelockEvent(
-            roundedBucketStartTimeNs + 2 * bucketSizeNs + 10 * NS_PER_SEC, attributionUids1,
-            attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ(refractory_period_sec + firedAlarmTimestampNs / NS_PER_SEC,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-
-    release_event =
-            CreateReleaseWakelockEvent(roundedBucketStartTimeNs + 3 * bucketSizeNs - NS_PER_SEC,
-                                       attributionUids1, attributionTags1, "wl1");
-    // Still in the refractory period. No anomaly.
-    processor->OnLogEvent(release_event.get());
-    EXPECT_EQ(refractory_period_sec + firedAlarmTimestampNs / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(dimensionKey1));
-
-    acquire_event = CreateAcquireWakelockEvent(
-            roundedBucketStartTimeNs + 5 * bucketSizeNs - 2 * NS_PER_SEC - 5, attributionUids1,
-            attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((roundedBucketStartTimeNs + 5 * bucketSizeNs) / NS_PER_SEC + 1,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-
-    release_event_time = roundedBucketStartTimeNs + 5 * bucketSizeNs - 2 * NS_PER_SEC - 4;
-    release_event = CreateReleaseWakelockEvent(release_event_time, attributionUids1,
-                                               attributionTags1, "wl1");
-    processor->OnLogEvent(release_event.get(), release_event_time);
-    EXPECT_EQ(0u, anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-
-    acquire_event = CreateAcquireWakelockEvent(
-            roundedBucketStartTimeNs + 5 * bucketSizeNs - 2 * NS_PER_SEC - 3, attributionUids1,
-            attributionTags1, "wl1");
-    processor->OnLogEvent(acquire_event.get());
-    EXPECT_EQ((roundedBucketStartTimeNs + 5 * bucketSizeNs) / NS_PER_SEC + 1,
-              anomalyTracker->getAlarmTimestampSec(dimensionKey1));
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/Attribution_e2e_test.cpp b/cmds/statsd/tests/e2e/Attribution_e2e_test.cpp
deleted file mode 100644
index 4c2caa9..0000000
--- a/cmds/statsd/tests/e2e/Attribution_e2e_test.cpp
+++ /dev/null
@@ -1,375 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <gtest/gtest.h>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-#include <iostream>
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-StatsdConfig CreateStatsdConfig(const Position position) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-    auto attributionNodeMatcher =
-        wakelockAcquireMatcher.mutable_simple_atom_matcher()->add_field_value_matcher();
-    attributionNodeMatcher->set_field(1);
-    attributionNodeMatcher->set_position(Position::ANY);
-    auto uidMatcher = attributionNodeMatcher->mutable_matches_tuple()->add_field_value_matcher();
-    uidMatcher->set_field(1);  // uid field.
-    uidMatcher->set_eq_string("com.android.gmscore");
-
-    *config.add_atom_matcher() = wakelockAcquireMatcher;
-
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(123456);
-    countMetric->set_what(wakelockAcquireMatcher.id());
-    *countMetric->mutable_dimensions_in_what() =
-        CreateAttributionUidAndTagDimensions(
-            util::WAKELOCK_STATE_CHANGED, {position});
-    countMetric->set_bucket(FIVE_MINUTES);
-    return config;
-}
-
-// GMS core node is in the middle.
-std::vector<int> attributionUids1 = {111, 222, 333};
-std::vector<string> attributionTags1 = {"App1", "GMSCoreModule1", "App3"};
-
-// GMS core node is the last one.
-std::vector<int> attributionUids2 = {111, 333, 222};
-std::vector<string> attributionTags2 = {"App1", "App3", "GMSCoreModule1"};
-
-// GMS core node is the first one.
-std::vector<int> attributionUids3 = {222, 333};
-std::vector<string> attributionTags3 = {"GMSCoreModule1", "App3"};
-
-// Single GMS core node.
-std::vector<int> attributionUids4 = {222};
-std::vector<string> attributionTags4 = {"GMSCoreModule1"};
-
-// GMS core has another uid.
-std::vector<int> attributionUids5 = {111, 444, 333};
-std::vector<string> attributionTags5 = {"App1", "GMSCoreModule2", "App3"};
-
-// Multiple GMS core nodes.
-std::vector<int> attributionUids6 = {444, 222};
-std::vector<string> attributionTags6 = {"GMSCoreModule2", "GMSCoreModule1"};
-
-// No GMS core nodes
-std::vector<int> attributionUids7 = {111, 333};
-std::vector<string> attributionTags7 = {"App1", "App3"};
-
-std::vector<int> attributionUids8 = {111};
-std::vector<string> attributionTags8 = {"App1"};
-
-// GMS core node with isolated uid.
-const int isolatedUid = 666;
-std::vector<int> attributionUids9 = {isolatedUid};
-std::vector<string> attributionTags9 = {"GMSCoreModule3"};
-
-std::vector<int> attributionUids10 = {isolatedUid};
-std::vector<string> attributionTags10 = {"GMSCoreModule1"};
-
-}  // namespace
-
-TEST(AttributionE2eTest, TestAttributionMatchAndSliceByFirstUid) {
-    auto config = CreateStatsdConfig(Position::FIRST);
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-
-    // Here it assumes that GMS core has two uids.
-    processor->getUidMap()->updateMap(
-            1, {222, 444, 111, 333}, {1, 1, 2, 2},
-            {String16("v1"), String16("v1"), String16("v2"), String16("v2")},
-            {String16("com.android.gmscore"), String16("com.android.gmscore"), String16("app1"),
-             String16("APP3")},
-            {String16(""), String16(""), String16(""), String16("")});
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-    // Events 1~4 are in the 1st bucket.
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids1,
-                                                attributionTags1, "wl1"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 200, attributionUids2,
-                                                attributionTags2, "wl1"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs - 1,
-                                                attributionUids3, attributionTags3, "wl1"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs, attributionUids4,
-                                                attributionTags4, "wl1"));
-
-    // Events 5~8 are in the 3rd bucket.
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 1,
-                                                attributionUids5, attributionTags5, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 100,
-                                                attributionUids6, attributionTags6, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs - 2,
-                                                attributionUids7, attributionTags7, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs,
-                                                attributionUids8, attributionTags8, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs + 1,
-                                                attributionUids9, attributionTags9, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs + 100,
-                                                attributionUids9, attributionTags9, "wl2"));
-    events.push_back(CreateIsolatedUidChangedEvent(bucketStartTimeNs + 3 * bucketSizeNs - 1, 222,
-                                                   isolatedUid, true /*is_create*/));
-    events.push_back(CreateIsolatedUidChangedEvent(bucketStartTimeNs + 3 * bucketSizeNs + 10, 222,
-                                                   isolatedUid, false /*is_create*/));
-
-    sortLogEventsByTimestamp(&events);
-
-    for (const auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 4 * bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(countMetrics.data_size(), 4);
-
-    auto data = countMetrics.data(0);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(),
-                                          util::WAKELOCK_STATE_CHANGED, 111, "App1");
-    ASSERT_EQ(data.bucket_info_size(), 2);
-    EXPECT_EQ(data.bucket_info(0).count(), 2);
-    EXPECT_EQ(data.bucket_info(0).start_bucket_elapsed_nanos(), bucketStartTimeNs);
-    EXPECT_EQ(data.bucket_info(0).end_bucket_elapsed_nanos(), bucketStartTimeNs + bucketSizeNs);
-    EXPECT_EQ(data.bucket_info(1).count(), 1);
-    EXPECT_EQ(data.bucket_info(1).start_bucket_elapsed_nanos(),
-              bucketStartTimeNs + 2 * bucketSizeNs);
-    EXPECT_EQ(data.bucket_info(1).end_bucket_elapsed_nanos(), bucketStartTimeNs + 3 * bucketSizeNs);
-
-    data = countMetrics.data(1);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(),
-                                          util::WAKELOCK_STATE_CHANGED, 222,
-                                          "GMSCoreModule1");
-    ASSERT_EQ(data.bucket_info_size(), 2);
-    EXPECT_EQ(data.bucket_info(0).count(), 1);
-    EXPECT_EQ(data.bucket_info(0).start_bucket_elapsed_nanos(), bucketStartTimeNs);
-    EXPECT_EQ(data.bucket_info(0).end_bucket_elapsed_nanos(), bucketStartTimeNs + bucketSizeNs);
-    EXPECT_EQ(data.bucket_info(1).count(), 1);
-    EXPECT_EQ(data.bucket_info(1).start_bucket_elapsed_nanos(), bucketStartTimeNs + bucketSizeNs);
-    EXPECT_EQ(data.bucket_info(1).end_bucket_elapsed_nanos(), bucketStartTimeNs + 2 * bucketSizeNs);
-
-    data = countMetrics.data(2);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(),
-                                          util::WAKELOCK_STATE_CHANGED, 222,
-                                          "GMSCoreModule3");
-    ASSERT_EQ(data.bucket_info_size(), 1);
-    EXPECT_EQ(data.bucket_info(0).count(), 1);
-    EXPECT_EQ(data.bucket_info(0).start_bucket_elapsed_nanos(),
-              bucketStartTimeNs + 3 * bucketSizeNs);
-    EXPECT_EQ(data.bucket_info(0).end_bucket_elapsed_nanos(), bucketStartTimeNs + 4 * bucketSizeNs);
-
-    data = countMetrics.data(3);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(),
-                                          util::WAKELOCK_STATE_CHANGED, 444,
-                                          "GMSCoreModule2");
-    ASSERT_EQ(data.bucket_info_size(), 1);
-    EXPECT_EQ(data.bucket_info(0).count(), 1);
-    EXPECT_EQ(data.bucket_info(0).start_bucket_elapsed_nanos(),
-              bucketStartTimeNs + 2 * bucketSizeNs);
-    EXPECT_EQ(data.bucket_info(0).end_bucket_elapsed_nanos(), bucketStartTimeNs + 3 * bucketSizeNs);
-}
-
-TEST(AttributionE2eTest, TestAttributionMatchAndSliceByChain) {
-    auto config = CreateStatsdConfig(Position::ALL);
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-
-    // Here it assumes that GMS core has two uids.
-    processor->getUidMap()->updateMap(
-            1, {222, 444, 111, 333}, {1, 1, 2, 2},
-            {String16("v1"), String16("v1"), String16("v2"), String16("v2")},
-            {String16("com.android.gmscore"), String16("com.android.gmscore"), String16("app1"),
-             String16("APP3")},
-            {String16(""), String16(""), String16(""), String16("")});
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-    // Events 1~4 are in the 1st bucket.
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids1,
-                                                attributionTags1, "wl1"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 200, attributionUids2,
-                                                attributionTags2, "wl1"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs - 1,
-                                                attributionUids3, attributionTags3, "wl1"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs, attributionUids4,
-                                                attributionTags4, "wl1"));
-
-    // Events 5~8 are in the 3rd bucket.
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 1,
-                                                attributionUids5, attributionTags5, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 100,
-                                                attributionUids6, attributionTags6, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs - 2,
-                                                attributionUids7, attributionTags7, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs,
-                                                attributionUids8, attributionTags8, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs + 1,
-                                                attributionUids10, attributionTags10, "wl2"));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs + 100,
-                                                attributionUids10, attributionTags10, "wl2"));
-    events.push_back(CreateIsolatedUidChangedEvent(bucketStartTimeNs + 3 * bucketSizeNs - 1, 222,
-                                                   isolatedUid, true /*is_create*/));
-    events.push_back(CreateIsolatedUidChangedEvent(bucketStartTimeNs + 3 * bucketSizeNs + 10, 222,
-                                                   isolatedUid, false /*is_create*/));
-
-    sortLogEventsByTimestamp(&events);
-
-    for (const auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 4 * bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(countMetrics.data_size(), 6);
-
-    auto data = countMetrics.data(0);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(),
-                                          util::WAKELOCK_STATE_CHANGED, 222,
-                                          "GMSCoreModule1");
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(1, data.bucket_info(1).count());
-    EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs,
-              data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + 4 * bucketSizeNs, data.bucket_info(1).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(1);
-    ValidateUidDimension(data.dimensions_in_what(), 0, util::WAKELOCK_STATE_CHANGED, 222);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 0,
-                                          util::WAKELOCK_STATE_CHANGED, 222,
-                                          "GMSCoreModule1");
-    ValidateUidDimension(data.dimensions_in_what(), 1, util::WAKELOCK_STATE_CHANGED, 333);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 1,
-                                          util::WAKELOCK_STATE_CHANGED, 333, "App3");
-    ASSERT_EQ(data.bucket_info_size(), 1);
-    EXPECT_EQ(data.bucket_info(0).count(), 1);
-    EXPECT_EQ(data.bucket_info(0).start_bucket_elapsed_nanos(), bucketStartTimeNs);
-    EXPECT_EQ(data.bucket_info(0).end_bucket_elapsed_nanos(), bucketStartTimeNs + bucketSizeNs);
-
-    data = countMetrics.data(2);
-    ValidateUidDimension(data.dimensions_in_what(), 0, util::WAKELOCK_STATE_CHANGED, 444);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 0,
-                                          util::WAKELOCK_STATE_CHANGED, 444,
-                                          "GMSCoreModule2");
-    ValidateUidDimension(data.dimensions_in_what(), 1, util::WAKELOCK_STATE_CHANGED, 222);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 1,
-                                          util::WAKELOCK_STATE_CHANGED, 222,
-                                          "GMSCoreModule1");
-    ASSERT_EQ(data.bucket_info_size(), 1);
-    EXPECT_EQ(data.bucket_info(0).count(), 1);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(3);
-    ValidateUidDimension(data.dimensions_in_what(), 0, util::WAKELOCK_STATE_CHANGED, 111);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 0,
-                                          util::WAKELOCK_STATE_CHANGED, 111, "App1");
-    ValidateUidDimension(data.dimensions_in_what(), 1, util::WAKELOCK_STATE_CHANGED, 222);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 1,
-                                          util::WAKELOCK_STATE_CHANGED, 222,
-                                          "GMSCoreModule1");
-    ValidateUidDimension(data.dimensions_in_what(), 2, util::WAKELOCK_STATE_CHANGED, 333);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 2,
-                                          util::WAKELOCK_STATE_CHANGED, 333, "App3");
-    ASSERT_EQ(data.bucket_info_size(), 1);
-    EXPECT_EQ(data.bucket_info(0).count(), 1);
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(4);
-    ValidateUidDimension(data.dimensions_in_what(), 0, util::WAKELOCK_STATE_CHANGED, 111);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 0,
-                                          util::WAKELOCK_STATE_CHANGED, 111, "App1");
-    ValidateUidDimension(data.dimensions_in_what(), 1, util::WAKELOCK_STATE_CHANGED, 333);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 1,
-                                          util::WAKELOCK_STATE_CHANGED, 333, "App3");
-    ValidateUidDimension(data.dimensions_in_what(), 2, util::WAKELOCK_STATE_CHANGED, 222);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 2,
-                                          util::WAKELOCK_STATE_CHANGED, 222,
-                                          "GMSCoreModule1");
-    ASSERT_EQ(data.bucket_info_size(), 1);
-    EXPECT_EQ(data.bucket_info(0).count(), 1);
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(5);
-    ValidateUidDimension(data.dimensions_in_what(), 0, util::WAKELOCK_STATE_CHANGED, 111);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 0,
-                                          util::WAKELOCK_STATE_CHANGED, 111, "App1");
-    ValidateUidDimension(data.dimensions_in_what(), 1, util::WAKELOCK_STATE_CHANGED, 444);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 1,
-                                          util::WAKELOCK_STATE_CHANGED, 444,
-                                          "GMSCoreModule2");
-    ValidateUidDimension(data.dimensions_in_what(), 2, util::WAKELOCK_STATE_CHANGED, 333);
-    ValidateAttributionUidAndTagDimension(data.dimensions_in_what(), 2,
-                                          util::WAKELOCK_STATE_CHANGED, 333, "App3");
-    ASSERT_EQ(data.bucket_info_size(), 1);
-    EXPECT_EQ(data.bucket_info(0).count(), 1);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/ConfigTtl_e2e_test.cpp b/cmds/statsd/tests/e2e/ConfigTtl_e2e_test.cpp
deleted file mode 100644
index 0bce0ba..0000000
--- a/cmds/statsd/tests/e2e/ConfigTtl_e2e_test.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 <gtest/gtest.h>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-StatsdConfig CreateStatsdConfig(int num_buckets, int threshold) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    auto wakelockAcquireMatcher = CreateAcquireWakelockAtomMatcher();
-
-    *config.add_atom_matcher() = wakelockAcquireMatcher;
-
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(123456);
-    countMetric->set_what(wakelockAcquireMatcher.id());
-    *countMetric->mutable_dimensions_in_what() = CreateAttributionUidDimensions(
-            util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    countMetric->set_bucket(FIVE_MINUTES);
-
-    auto alert = config.add_alert();
-    alert->set_id(StringToId("alert"));
-    alert->set_metric_id(123456);
-    alert->set_num_buckets(num_buckets);
-    alert->set_refractory_period_secs(10);
-    alert->set_trigger_if_sum_gt(threshold);
-
-    // Two hours
-    config.set_ttl_in_seconds(2 * 3600);
-    return config;
-}
-
-}  // namespace
-
-TEST(ConfigTtlE2eTest, TestCountMetric) {
-    const int num_buckets = 1;
-    const int threshold = 3;
-    auto config = CreateStatsdConfig(num_buckets, threshold);
-    const uint64_t alert_id = config.alert(0).id();
-    const uint32_t refractory_period_sec = config.alert(0).refractory_period_secs();
-
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-
-    std::vector<int> attributionUids1 = {111};
-    std::vector<string> attributionTags1 = {"App1"};
-
-    FieldValue fieldValue1(Field(util::WAKELOCK_STATE_CHANGED, (int32_t)0x02010101),
-                           Value((int32_t)111));
-    HashableDimensionKey whatKey1({fieldValue1});
-    MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY);
-
-    FieldValue fieldValue2(Field(util::WAKELOCK_STATE_CHANGED, (int32_t)0x02010101),
-                           Value((int32_t)222));
-    HashableDimensionKey whatKey2({fieldValue2});
-    MetricDimensionKey dimensionKey2(whatKey2, DEFAULT_DIMENSION_KEY);
-
-    auto event = CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids1,
-                                            attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 2, attributionUids1,
-                                       attributionTags1, "wl2");
-    processor->OnLogEvent(event.get());
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + 25 * bucketSizeNs + 2, attributionUids1,
-                                       attributionTags1, "wl1");
-    processor->OnLogEvent(event.get());
-
-    EXPECT_EQ((int64_t)(bucketStartTimeNs + 25 * bucketSizeNs + 2 + 2 * 3600 * NS_PER_SEC),
-              processor->mMetricsManagers.begin()->second->getTtlEndNs());
-
-    // Clear the data stored on disk as a result of the ttl.
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 25 * bucketSizeNs + 3, false, true,
-                            ADB_DUMP, FAST, &buffer);
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/CountMetric_e2e_test.cpp b/cmds/statsd/tests/e2e/CountMetric_e2e_test.cpp
deleted file mode 100644
index 04eb400..0000000
--- a/cmds/statsd/tests/e2e/CountMetric_e2e_test.cpp
+++ /dev/null
@@ -1,901 +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.
- */
-
-#include <gtest/gtest.h>
-
-#include "src/StatsLogProcessor.h"
-#include "src/state/StateManager.h"
-#include "src/state/StateTracker.h"
-#include "tests/statsd_test_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-/**
- * Tests the initial condition and condition after the first log events for
- * count metrics with either a combination condition or simple condition.
- *
- * Metrics should be initialized with condition kUnknown (given that the
- * predicate is using the default InitialValue of UNKNOWN). The condition should
- * be updated to either kFalse or kTrue if a condition event is logged for all
- * children conditions.
- */
-TEST(CountMetricE2eTest, TestInitialConditionChanges) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");     // LogEvent defaults to UID of root.
-    config.add_default_pull_packages("AID_ROOT");  // Fake puller is registered with root.
-
-    auto syncStartMatcher = CreateSyncStartAtomMatcher();
-    *config.add_atom_matcher() = syncStartMatcher;
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-    *config.add_atom_matcher() = CreateBatteryStateNoneMatcher();
-    *config.add_atom_matcher() = CreateBatteryStateUsbMatcher();
-
-    auto screenOnPredicate = CreateScreenIsOnPredicate();
-    *config.add_predicate() = screenOnPredicate;
-
-    auto deviceUnpluggedPredicate = CreateDeviceUnpluggedPredicate();
-    *config.add_predicate() = deviceUnpluggedPredicate;
-
-    auto screenOnOnBatteryPredicate = config.add_predicate();
-    screenOnOnBatteryPredicate->set_id(StringToId("screenOnOnBatteryPredicate"));
-    screenOnOnBatteryPredicate->mutable_combination()->set_operation(LogicalOperation::AND);
-    addPredicateToPredicateCombination(screenOnPredicate, screenOnOnBatteryPredicate);
-    addPredicateToPredicateCombination(deviceUnpluggedPredicate, screenOnOnBatteryPredicate);
-
-    // CountSyncStartWhileScreenOnOnBattery (CombinationCondition)
-    CountMetric* countMetric1 = config.add_count_metric();
-    countMetric1->set_id(StringToId("CountSyncStartWhileScreenOnOnBattery"));
-    countMetric1->set_what(syncStartMatcher.id());
-    countMetric1->set_condition(screenOnOnBatteryPredicate->id());
-    countMetric1->set_bucket(FIVE_MINUTES);
-
-    // CountSyncStartWhileOnBattery (SimpleCondition)
-    CountMetric* countMetric2 = config.add_count_metric();
-    countMetric2->set_id(StringToId("CountSyncStartWhileOnBatterySliceScreen"));
-    countMetric2->set_what(syncStartMatcher.id());
-    countMetric2->set_condition(deviceUnpluggedPredicate.id());
-    countMetric2->set_bucket(FIVE_MINUTES);
-
-    const uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    const uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000LL;
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    EXPECT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    EXPECT_EQ(2, metricsManager->mAllMetricProducers.size());
-
-    sp<MetricProducer> metricProducer1 = metricsManager->mAllMetricProducers[0];
-    sp<MetricProducer> metricProducer2 = metricsManager->mAllMetricProducers[1];
-
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer2->mCondition);
-
-    auto screenOnEvent =
-            CreateScreenStateChangedEvent(bucketStartTimeNs + 30, android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer2->mCondition);
-
-    auto pluggedUsbEvent = CreateBatteryStateChangedEvent(
-            bucketStartTimeNs + 50, BatteryPluggedStateEnum::BATTERY_PLUGGED_USB);
-    processor->OnLogEvent(pluggedUsbEvent.get());
-    EXPECT_EQ(ConditionState::kFalse, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kFalse, metricProducer2->mCondition);
-
-    auto pluggedNoneEvent = CreateBatteryStateChangedEvent(
-            bucketStartTimeNs + 70, BatteryPluggedStateEnum::BATTERY_PLUGGED_NONE);
-    processor->OnLogEvent(pluggedNoneEvent.get());
-    EXPECT_EQ(ConditionState::kTrue, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kTrue, metricProducer2->mCondition);
-}
-
-/**
-* Test a count metric that has one slice_by_state with no primary fields.
-*
-* Once the CountMetricProducer is initialized, it has one atom id in
-* mSlicedStateAtoms and no entries in mStateGroupMap.
-
-* One StateTracker tracks the state atom, and it has one listener which is the
-* CountMetricProducer that was initialized.
-*/
-TEST(CountMetricE2eTest, TestSlicedState) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto syncStartMatcher = CreateSyncStartAtomMatcher();
-    *config.add_atom_matcher() = syncStartMatcher;
-
-    auto state = CreateScreenState();
-    *config.add_state() = state;
-
-    // Create count metric that slices by screen state.
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(syncStartMatcher.id());
-    countMetric->set_bucket(TimeUnit::FIVE_MINUTES);
-    countMetric->add_slice_by_state(state.id());
-
-    // Initialize StatsLogProcessor.
-    const uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    const uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000LL;
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    // Check that CountMetricProducer was initialized correctly.
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    ASSERT_EQ(metricProducer->mSlicedStateAtoms.size(), 1);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(0), SCREEN_STATE_ATOM_ID);
-    ASSERT_EQ(metricProducer->mStateGroupMap.size(), 0);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-
-    /*
-               bucket #1                      bucket #2
-    |     1     2     3     4     5     6     7     8     9     10 (minutes)
-    |-----------------------------|-----------------------------|--
-            x                x         x    x        x      x       (syncStartEvents)
-          |                                       |                 (ScreenIsOnEvent)
-                   |     |                                          (ScreenIsOffEvent)
-                                                        |           (ScreenDozeEvent)
-    */
-    // Initialize log events - first bucket.
-    std::vector<int> attributionUids1 = {123};
-    std::vector<string> attributionTags1 = {"App1"};
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 50 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 1:00
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 75 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 1:25
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 150 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 2:40
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 200 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 3:30
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 250 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 4:20
-
-    // Initialize log events - second bucket.
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 350 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 6:00
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 400 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 6:50
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 450 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 7:40
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 475 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 8:05
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 500 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_UNKNOWN));  // 8:30
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 520 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 8:50
-
-    // Send log events to StatsLogProcessor.
-    for (auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    // Check dump report.
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs * 2 + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_count_metrics());
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(3, countMetrics.data_size());
-
-    // For each CountMetricData, check StateValue info is correct and buckets
-    // have correct counts.
-    auto data = countMetrics.data(0);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_UNKNOWN,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-
-    data = countMetrics.data(1);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_OFF, data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(2, data.bucket_info(1).count());
-
-    data = countMetrics.data(2);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON, data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(1, data.bucket_info(1).count());
-}
-
-/**
- * Test a count metric that has one slice_by_state with a mapping and no
- * primary fields.
- *
- * Once the CountMetricProducer is initialized, it has one atom id in
- * mSlicedStateAtoms and has one entry per state value in mStateGroupMap.
- *
- * One StateTracker tracks the state atom, and it has one listener which is the
- * CountMetricProducer that was initialized.
- */
-TEST(CountMetricE2eTest, TestSlicedStateWithMap) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto syncStartMatcher = CreateSyncStartAtomMatcher();
-    *config.add_atom_matcher() = syncStartMatcher;
-
-    int64_t screenOnId = 4444;
-    int64_t screenOffId = 9876;
-    auto state = CreateScreenStateWithOnOffMap(screenOnId, screenOffId);
-    *config.add_state() = state;
-
-    // Create count metric that slices by screen state with on/off map.
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(syncStartMatcher.id());
-    countMetric->set_bucket(TimeUnit::FIVE_MINUTES);
-    countMetric->add_slice_by_state(state.id());
-
-    // Initialize StatsLogProcessor.
-    const uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    const uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000LL;
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-
-    // Check that CountMetricProducer was initialized correctly.
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    ASSERT_EQ(metricProducer->mSlicedStateAtoms.size(), 1);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(0), SCREEN_STATE_ATOM_ID);
-    ASSERT_EQ(metricProducer->mStateGroupMap.size(), 1);
-
-    StateMap map = state.map();
-    for (auto group : map.group()) {
-        for (auto value : group.value()) {
-            EXPECT_EQ(metricProducer->mStateGroupMap.at(SCREEN_STATE_ATOM_ID).at(value),
-                      group.group_id());
-        }
-    }
-
-    /*
-               bucket #1                      bucket #2
-    |     1     2     3     4     5     6     7     8     9     10 (minutes)
-    |-----------------------------|-----------------------------|--
-      x   x     x       x    x   x      x         x         x       (syncStartEvents)
-     -----------------------------------------------------------SCREEN_OFF events
-             |                  |                                   (ScreenStateOffEvent = 1)
-       |                  |                                         (ScreenStateDozeEvent = 3)
-                                                |                   (ScreenStateDozeSuspendEvent =
-    4)
-     -----------------------------------------------------------SCREEN_ON events
-                   |                                       |        (ScreenStateOnEvent = 2)
-                      |                                             (ScreenStateVrEvent = 5)
-                                            |                       (ScreenStateOnSuspendEvent = 6)
-    */
-    // Initialize log events - first bucket.
-    std::vector<int> attributionUids1 = {123};
-    std::vector<string> attributionTags1 = {"App1"};
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 20 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 0:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 30 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE));  // 0:40
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 60 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 1:10
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 90 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 1:40
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 120 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 2:10
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 150 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 2:40
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 180 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_VR));  // 3:10
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 200 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 3:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 210 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE));  // 3:40
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 250 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 4:20
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 280 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 4:50
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 285 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 4:55
-
-    // Initialize log events - second bucket.
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 360 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 6:10
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 390 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON_SUSPEND));  // 6:40
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 430 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE_SUSPEND));  // 7:20
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 440 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 7:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 540 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 9:10
-    events.push_back(CreateSyncStartEvent(bucketStartTimeNs + 570 * NS_PER_SEC, attributionUids1,
-                                          attributionTags1, "sync_name"));  // 9:40
-
-    // Send log events to StatsLogProcessor.
-    for (auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    // Check dump report.
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs * 2 + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_count_metrics());
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(3, countMetrics.data_size());
-
-    // For each CountMetricData, check StateValue info is correct and buckets
-    // have correct counts.
-    auto data = countMetrics.data(0);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-
-    data = countMetrics.data(1);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOnId, data.slice_by_state(0).group_id());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(1, data.bucket_info(1).count());
-
-    data = countMetrics.data(2);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOffId, data.slice_by_state(0).group_id());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(4, data.bucket_info(0).count());
-    EXPECT_EQ(2, data.bucket_info(1).count());
-}
-
-/**
-* Test a count metric that has one slice_by_state with a primary field.
-
-* Once the CountMetricProducer is initialized, it should have one
-* MetricStateLink stored. State querying using a non-empty primary key
-* should also work as intended.
-*/
-TEST(CountMetricE2eTest, TestSlicedStateWithPrimaryFields) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto appCrashMatcher =
-            CreateSimpleAtomMatcher("APP_CRASH_OCCURRED", util::APP_CRASH_OCCURRED);
-    *config.add_atom_matcher() = appCrashMatcher;
-
-    auto state = CreateUidProcessState();
-    *config.add_state() = state;
-
-    // Create count metric that slices by uid process state.
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(appCrashMatcher.id());
-    countMetric->set_bucket(TimeUnit::FIVE_MINUTES);
-    countMetric->add_slice_by_state(state.id());
-    MetricStateLink* stateLink = countMetric->add_state_link();
-    stateLink->set_state_atom_id(UID_PROCESS_STATE_ATOM_ID);
-    auto fieldsInWhat = stateLink->mutable_fields_in_what();
-    *fieldsInWhat = CreateDimensions(util::APP_CRASH_OCCURRED, {1 /*uid*/});
-    auto fieldsInState = stateLink->mutable_fields_in_state();
-    *fieldsInState = CreateDimensions(UID_PROCESS_STATE_ATOM_ID, {1 /*uid*/});
-
-    // Initialize StatsLogProcessor.
-    const uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    const uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000LL;
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(UID_PROCESS_STATE_ATOM_ID));
-
-    // Check that CountMetricProducer was initialized correctly.
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    ASSERT_EQ(metricProducer->mSlicedStateAtoms.size(), 1);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(0), UID_PROCESS_STATE_ATOM_ID);
-    ASSERT_EQ(metricProducer->mStateGroupMap.size(), 0);
-    ASSERT_EQ(metricProducer->mMetric2StateLinks.size(), 1);
-
-    /*
-    NOTE: "1" or "2" represents the uid associated with the state/app crash event
-               bucket #1               bucket #2
-    |    1    2    3    4    5    6    7    8    9    10
-    |------------------------|-------------------------|--
-      1  1    1      1   1  2     1        1        2    (AppCrashEvents)
-     -----------------------------------------------------PROCESS STATE events
-           1               2                             (TopEvent = 1002)
-                       1             1                   (ForegroundServiceEvent = 1003)
-                                         2               (ImportantBackgroundEvent = 1006)
-       1          1                               1      (ImportantForegroundEvent = 1005)
-
-    Based on the diagram above, an AppCrashEvent querying for process state value would return:
-    - StateTracker::kStateUnknown
-    - Important foreground
-    - Top
-    - Important foreground
-    - Foreground service
-    - Top (both the app crash and state still have matching uid = 2)
-
-    - Foreground service
-    - Foreground service
-    - Important background
-    */
-    // Initialize log events - first bucket.
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 20 * NS_PER_SEC, 1 /*uid*/));  // 0:30
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 30 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND));  // 0:40
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 60 * NS_PER_SEC, 1 /*uid*/));  // 1:10
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 90 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_TOP));  // 1:40
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 120 * NS_PER_SEC, 1 /*uid*/));  // 2:10
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 150 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND));  // 2:40
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 200 * NS_PER_SEC, 1 /*uid*/));  // 3:30
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 210 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_FOREGROUND_SERVICE));  // 3:40
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 250 * NS_PER_SEC, 1 /*uid*/));  // 4:20
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 280 * NS_PER_SEC, 2 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_TOP));  // 4:50
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 285 * NS_PER_SEC, 2 /*uid*/));  // 4:55
-
-    // Initialize log events - second bucket.
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 360 * NS_PER_SEC, 1 /*uid*/));  // 6:10
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 390 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_FOREGROUND_SERVICE));  // 6:40
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 430 * NS_PER_SEC, 2 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND));  // 7:20
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 440 * NS_PER_SEC, 1 /*uid*/));  // 7:30
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 540 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND));  // 9:10
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 570 * NS_PER_SEC, 2 /*uid*/));  // 9:40
-
-    // Send log events to StatsLogProcessor.
-    for (auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    // Check dump report.
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs * 2 + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_count_metrics());
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(5, countMetrics.data_size());
-
-    // For each CountMetricData, check StateValue info is correct and buckets
-    // have correct counts.
-    auto data = countMetrics.data(0);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-
-    data = countMetrics.data(1);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_TOP, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(2, data.bucket_info(0).count());
-
-    data = countMetrics.data(2);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_FOREGROUND_SERVICE, data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(2, data.bucket_info(1).count());
-
-    data = countMetrics.data(3);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(2, data.bucket_info(0).count());
-
-    data = countMetrics.data(4);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-}
-
-TEST(CountMetricE2eTest, TestMultipleSlicedStates) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto appCrashMatcher =
-            CreateSimpleAtomMatcher("APP_CRASH_OCCURRED", util::APP_CRASH_OCCURRED);
-    *config.add_atom_matcher() = appCrashMatcher;
-
-    int64_t screenOnId = 4444;
-    int64_t screenOffId = 9876;
-    auto state1 = CreateScreenStateWithOnOffMap(screenOnId, screenOffId);
-    *config.add_state() = state1;
-    auto state2 = CreateUidProcessState();
-    *config.add_state() = state2;
-
-    // Create count metric that slices by screen state with on/off map and
-    // slices by uid process state.
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(appCrashMatcher.id());
-    countMetric->set_bucket(TimeUnit::FIVE_MINUTES);
-    countMetric->add_slice_by_state(state1.id());
-    countMetric->add_slice_by_state(state2.id());
-    MetricStateLink* stateLink = countMetric->add_state_link();
-    stateLink->set_state_atom_id(UID_PROCESS_STATE_ATOM_ID);
-    auto fieldsInWhat = stateLink->mutable_fields_in_what();
-    *fieldsInWhat = CreateDimensions(util::APP_CRASH_OCCURRED, {1 /*uid*/});
-    auto fieldsInState = stateLink->mutable_fields_in_state();
-    *fieldsInState = CreateDimensions(UID_PROCESS_STATE_ATOM_ID, {1 /*uid*/});
-
-    // Initialize StatsLogProcessor.
-    const uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    const uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000LL;
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    // Check that StateTrackers were properly initialized.
-    EXPECT_EQ(2, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(UID_PROCESS_STATE_ATOM_ID));
-
-    // Check that CountMetricProducer was initialized correctly.
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    ASSERT_EQ(metricProducer->mSlicedStateAtoms.size(), 2);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(0), SCREEN_STATE_ATOM_ID);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(1), UID_PROCESS_STATE_ATOM_ID);
-    ASSERT_EQ(metricProducer->mStateGroupMap.size(), 1);
-    ASSERT_EQ(metricProducer->mMetric2StateLinks.size(), 1);
-
-    StateMap map = state1.map();
-    for (auto group : map.group()) {
-        for (auto value : group.value()) {
-            EXPECT_EQ(metricProducer->mStateGroupMap.at(SCREEN_STATE_ATOM_ID).at(value),
-                      group.group_id());
-        }
-    }
-
-    /*
-                 bucket #1                      bucket #2
-      |    1    2    3    4    5    6    7    8    9    10 (minutes)
-      |------------------------|------------------------|--
-        1  1    1     1    1  2     1        1         2   (AppCrashEvents)
-       ---------------------------------------------------SCREEN_OFF events
-             |                              |              (ScreenOffEvent = 1)
-         |              |                                  (ScreenDozeEvent = 3)
-       ---------------------------------------------------SCREEN_ON events
-                   |                              |        (ScreenOnEvent = 2)
-                                        |                  (ScreenOnSuspendEvent = 6)
-       ---------------------------------------------------PROCESS STATE events
-             1               2                             (TopEvent = 1002)
-                                      1                    (ForegroundServiceEvent = 1003)
-                                            2              (ImportantBackgroundEvent = 1006)
-       1          1                                   1    (ImportantForegroundEvent = 1005)
-
-       Based on the diagram above, Screen State / Process State pairs for each
-       AppCrashEvent are:
-       - StateTracker::kStateUnknown / important foreground
-       - off / important foreground
-       - off / Top
-       - on / important foreground
-       - off / important foreground
-       - off / top
-
-       - off / important foreground
-       - off / foreground service
-       - on / important background
-
-      */
-    // Initialize log events - first bucket.
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 5 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND));  // 0:15
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 20 * NS_PER_SEC, 1 /*uid*/));  // 0:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 30 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE));  // 0:40
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 60 * NS_PER_SEC, 1 /*uid*/));  // 1:10
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 90 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_TOP));  // 1:40
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 90 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 1:40
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 120 * NS_PER_SEC, 1 /*uid*/));  // 2:10
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 150 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND));  // 2:40
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 160 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 2:50
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 200 * NS_PER_SEC, 1 /*uid*/));  // 3:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 210 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE));  // 3:40
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 250 * NS_PER_SEC, 1 /*uid*/));  // 4:20
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 280 * NS_PER_SEC, 2 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_TOP));  // 4:50
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 285 * NS_PER_SEC, 2 /*uid*/));  // 4:55
-
-    // Initialize log events - second bucket.
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 360 * NS_PER_SEC, 1 /*uid*/));  // 6:10
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 380 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_FOREGROUND_SERVICE));  // 6:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 390 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON_SUSPEND));  // 6:40
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 420 * NS_PER_SEC, 2 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND));  // 7:10
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 440 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 7:30
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 450 * NS_PER_SEC, 1 /*uid*/));  // 7:40
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 520 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 8:50
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 540 * NS_PER_SEC, 1 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND));  // 9:10
-    events.push_back(
-            CreateAppCrashOccurredEvent(bucketStartTimeNs + 570 * NS_PER_SEC, 2 /*uid*/));  // 9:40
-
-    // Send log events to StatsLogProcessor.
-    for (auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    // Check dump report.
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs * 2 + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_count_metrics());
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(6, countMetrics.data_size());
-
-    // For each CountMetricData, check StateValue info is correct and buckets
-    // have correct counts.
-    auto data = countMetrics.data(0);
-    ASSERT_EQ(2, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1, data.slice_by_state(0).value());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(1).atom_id());
-    EXPECT_TRUE(data.slice_by_state(1).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND, data.slice_by_state(1).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-
-    data = countMetrics.data(1);
-    ASSERT_EQ(2, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOnId, data.slice_by_state(0).group_id());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(1).atom_id());
-    EXPECT_TRUE(data.slice_by_state(1).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND, data.slice_by_state(1).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-
-    data = countMetrics.data(2);
-    ASSERT_EQ(2, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOnId, data.slice_by_state(0).group_id());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(1).atom_id());
-    EXPECT_TRUE(data.slice_by_state(1).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND, data.slice_by_state(1).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-
-    data = countMetrics.data(3);
-    ASSERT_EQ(2, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOffId, data.slice_by_state(0).group_id());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(1).atom_id());
-    EXPECT_TRUE(data.slice_by_state(1).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_TOP, data.slice_by_state(1).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(2, data.bucket_info(0).count());
-
-    data = countMetrics.data(4);
-    ASSERT_EQ(2, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOffId, data.slice_by_state(0).group_id());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(1).atom_id());
-    EXPECT_TRUE(data.slice_by_state(1).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_FOREGROUND_SERVICE, data.slice_by_state(1).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-
-    data = countMetrics.data(5);
-    ASSERT_EQ(2, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOffId, data.slice_by_state(0).group_id());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(1).atom_id());
-    EXPECT_TRUE(data.slice_by_state(1).has_value());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND, data.slice_by_state(1).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(2, data.bucket_info(0).count());
-    EXPECT_EQ(1, data.bucket_info(1).count());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/e2e/DurationMetric_e2e_test.cpp b/cmds/statsd/tests/e2e/DurationMetric_e2e_test.cpp
deleted file mode 100644
index 4efb038..0000000
--- a/cmds/statsd/tests/e2e/DurationMetric_e2e_test.cpp
+++ /dev/null
@@ -1,1473 +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.
-
-#include <gtest/gtest.h>
-
-#include <vector>
-
-#include "src/StatsLogProcessor.h"
-#include "src/state/StateTracker.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-TEST(DurationMetricE2eTest, TestOneBucket) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    auto screenOffMatcher = CreateScreenTurnedOffAtomMatcher();
-    *config.add_atom_matcher() = screenOnMatcher;
-    *config.add_atom_matcher() = screenOffMatcher;
-
-    auto durationPredicate = CreateScreenIsOnPredicate();
-    *config.add_predicate() = durationPredicate;
-
-    int64_t metricId = 123456;
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(metricId);
-    durationMetric->set_what(durationPredicate.id());
-    durationMetric->set_bucket(FIVE_MINUTES);
-    durationMetric->set_aggregation_type(DurationMetric_AggregationType_SUM);
-
-    const int64_t baseTimeNs = 0;                                   // 0:00
-    const int64_t configAddedTimeNs = baseTimeNs + 1 * NS_PER_SEC;  // 0:01
-    const int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000LL * 1000LL;
-
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey);
-
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-
-    std::unique_ptr<LogEvent> event;
-
-    // Screen is off at start of bucket.
-    event = CreateScreenStateChangedEvent(configAddedTimeNs,
-                                          android::view::DISPLAY_STATE_OFF);  // 0:01
-    processor->OnLogEvent(event.get());
-
-    // Turn screen on.
-    const int64_t durationStartNs = configAddedTimeNs + 10 * NS_PER_SEC;  // 0:11
-    event = CreateScreenStateChangedEvent(durationStartNs, android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(event.get());
-
-    // Turn off screen 30 seconds after turning on.
-    const int64_t durationEndNs = durationStartNs + 30 * NS_PER_SEC;  // 0:41
-    event = CreateScreenStateChangedEvent(durationEndNs, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(event.get());
-
-    event = CreateScreenBrightnessChangedEvent(durationEndNs + 1 * NS_PER_SEC, 64);  // 0:42
-    processor->OnLogEvent(event.get());
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + bucketSizeNs + 1 * NS_PER_SEC, false, true,
-                            ADB_DUMP, FAST, &buffer);  // 5:01
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_EQ(metricId, reports.reports(0).metrics(0).metric_id());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_duration_metrics());
-
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(1, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(durationEndNs - durationStartNs, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(configAddedTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestTwoBuckets) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    auto screenOffMatcher = CreateScreenTurnedOffAtomMatcher();
-    *config.add_atom_matcher() = screenOnMatcher;
-    *config.add_atom_matcher() = screenOffMatcher;
-
-    auto durationPredicate = CreateScreenIsOnPredicate();
-    *config.add_predicate() = durationPredicate;
-
-    int64_t metricId = 123456;
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(metricId);
-    durationMetric->set_what(durationPredicate.id());
-    durationMetric->set_bucket(FIVE_MINUTES);
-    durationMetric->set_aggregation_type(DurationMetric_AggregationType_SUM);
-
-    const int64_t baseTimeNs = 0;                                   // 0:00
-    const int64_t configAddedTimeNs = baseTimeNs + 1 * NS_PER_SEC;  // 0:01
-    const int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000LL * 1000LL;
-
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey);
-
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-
-    std::unique_ptr<LogEvent> event;
-
-    // Screen is off at start of bucket.
-    event = CreateScreenStateChangedEvent(configAddedTimeNs,
-                                          android::view::DISPLAY_STATE_OFF);  // 0:01
-    processor->OnLogEvent(event.get());
-
-    // Turn screen on.
-    const int64_t durationStartNs = configAddedTimeNs + 10 * NS_PER_SEC;  // 0:11
-    event = CreateScreenStateChangedEvent(durationStartNs, android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(event.get());
-
-    // Turn off screen 30 seconds after turning on.
-    const int64_t durationEndNs = durationStartNs + 30 * NS_PER_SEC;  // 0:41
-    event = CreateScreenStateChangedEvent(durationEndNs, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(event.get());
-
-    event = CreateScreenBrightnessChangedEvent(durationEndNs + 1 * NS_PER_SEC, 64);  // 0:42
-    processor->OnLogEvent(event.get());
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 2 * bucketSizeNs + 1 * NS_PER_SEC, false,
-                            true, ADB_DUMP, FAST, &buffer);  // 10:01
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_EQ(metricId, reports.reports(0).metrics(0).metric_id());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_duration_metrics());
-
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(1, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    ASSERT_EQ(1, data.bucket_info_size());
-
-    auto bucketInfo = data.bucket_info(0);
-    EXPECT_EQ(0, bucketInfo.bucket_num());
-    EXPECT_EQ(durationEndNs - durationStartNs, bucketInfo.duration_nanos());
-    EXPECT_EQ(configAddedTimeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestWithActivation) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    auto screenOffMatcher = CreateScreenTurnedOffAtomMatcher();
-    auto crashMatcher = CreateProcessCrashAtomMatcher();
-    *config.add_atom_matcher() = screenOnMatcher;
-    *config.add_atom_matcher() = screenOffMatcher;
-    *config.add_atom_matcher() = crashMatcher;
-
-    auto durationPredicate = CreateScreenIsOnPredicate();
-    *config.add_predicate() = durationPredicate;
-
-    int64_t metricId = 123456;
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(metricId);
-    durationMetric->set_what(durationPredicate.id());
-    durationMetric->set_bucket(FIVE_MINUTES);
-    durationMetric->set_aggregation_type(DurationMetric_AggregationType_SUM);
-
-    auto metric_activation1 = config.add_metric_activation();
-    metric_activation1->set_metric_id(metricId);
-    auto event_activation1 = metric_activation1->add_event_activation();
-    event_activation1->set_atom_matcher_id(crashMatcher.id());
-    event_activation1->set_ttl_seconds(30);  // 30 secs.
-
-    const int64_t bucketStartTimeNs = 10000000000;
-    const int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000LL * 1000LL;
-
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    vector<int64_t> activeConfigsBroadcast;
-
-    int broadcastCount = 0;
-    StatsLogProcessor processor(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, bucketStartTimeNs,
-            [](const ConfigKey& key) { return true; },
-            [&uid, &broadcastCount, &activeConfigsBroadcast](const int& broadcastUid,
-                                                             const vector<int64_t>& activeConfigs) {
-                broadcastCount++;
-                EXPECT_EQ(broadcastUid, uid);
-                activeConfigsBroadcast.clear();
-                activeConfigsBroadcast.insert(activeConfigsBroadcast.end(), activeConfigs.begin(),
-                                              activeConfigs.end());
-                return true;
-            });
-
-    processor.OnConfigUpdated(bucketStartTimeNs, cfgKey, config);  // 0:00
-
-    ASSERT_EQ(processor.mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor.mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    ASSERT_EQ(eventActivationMap.size(), 1u);
-    EXPECT_TRUE(eventActivationMap.find(2) != eventActivationMap.end());
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    std::unique_ptr<LogEvent> event;
-
-    // Turn screen off.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * NS_PER_SEC,
-                                          android::view::DISPLAY_STATE_OFF);  // 0:02
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 2 * NS_PER_SEC);
-
-    // Turn screen on.
-    const int64_t durationStartNs = bucketStartTimeNs + 5 * NS_PER_SEC;  // 0:05
-    event = CreateScreenStateChangedEvent(durationStartNs, android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), durationStartNs);
-
-    // Activate metric.
-    const int64_t activationStartNs = bucketStartTimeNs + 5 * NS_PER_SEC;  // 0:10
-    const int64_t activationEndNs =
-            activationStartNs + event_activation1->ttl_seconds() * NS_PER_SEC;  // 0:40
-    event = CreateAppCrashEvent(activationStartNs, 111);
-    processor.OnLogEvent(event.get(), activationStartNs);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 1);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, activationStartNs);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    // Expire activation.
-    const int64_t expirationNs = activationEndNs + 7 * NS_PER_SEC;
-    event = CreateScreenBrightnessChangedEvent(expirationNs, 64);  // 0:47
-    processor.OnLogEvent(event.get(), expirationNs);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 2);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    ASSERT_EQ(eventActivationMap.size(), 1u);
-    EXPECT_TRUE(eventActivationMap.find(2) != eventActivationMap.end());
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, activationStartNs);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    // Turn off screen 10 seconds after activation expiration.
-    const int64_t durationEndNs = activationEndNs + 10 * NS_PER_SEC;  // 0:50
-    event = CreateScreenStateChangedEvent(durationEndNs, android::view::DISPLAY_STATE_OFF);
-    processor.OnLogEvent(event.get(), durationEndNs);
-
-    // Turn screen on.
-    const int64_t duration2StartNs = durationEndNs + 5 * NS_PER_SEC;  // 0:55
-    event = CreateScreenStateChangedEvent(duration2StartNs, android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), duration2StartNs);
-
-    // Turn off screen.
-    const int64_t duration2EndNs = duration2StartNs + 10 * NS_PER_SEC;  // 1:05
-    event = CreateScreenStateChangedEvent(duration2EndNs, android::view::DISPLAY_STATE_OFF);
-    processor.OnLogEvent(event.get(), duration2EndNs);
-
-    // Activate metric.
-    const int64_t activation2StartNs = duration2EndNs + 5 * NS_PER_SEC;  // 1:10
-    const int64_t activation2EndNs =
-            activation2StartNs + event_activation1->ttl_seconds() * NS_PER_SEC;  // 1:40
-    event = CreateAppCrashEvent(activation2StartNs, 211);
-    processor.OnLogEvent(event.get(), activation2StartNs);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, activation2StartNs);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor.onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1 * NS_PER_SEC, false, true,
-                           ADB_DUMP, FAST, &buffer);  // 5:01
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_EQ(metricId, reports.reports(0).metrics(0).metric_id());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_duration_metrics());
-
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(1, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    ASSERT_EQ(1, data.bucket_info_size());
-
-    auto bucketInfo = data.bucket_info(0);
-    EXPECT_EQ(0, bucketInfo.bucket_num());
-    EXPECT_EQ(bucketStartTimeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(expirationNs, bucketInfo.end_bucket_elapsed_nanos());
-    EXPECT_EQ(expirationNs - durationStartNs, bucketInfo.duration_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestWithCondition) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    *config.add_atom_matcher() = CreateAcquireWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateReleaseWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateMoveToBackgroundAtomMatcher();
-    *config.add_atom_matcher() = CreateMoveToForegroundAtomMatcher();
-
-    auto holdingWakelockPredicate = CreateHoldingWakelockPredicate();
-    *config.add_predicate() = holdingWakelockPredicate;
-
-    auto isInBackgroundPredicate = CreateIsInBackgroundPredicate();
-    *config.add_predicate() = isInBackgroundPredicate;
-
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("WakelockDuration"));
-    durationMetric->set_what(holdingWakelockPredicate.id());
-    durationMetric->set_condition(isInBackgroundPredicate.id());
-    durationMetric->set_aggregation_type(DurationMetric::SUM);
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    ConfigKey cfgKey;
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_TRUE(eventActivationMap.empty());
-
-    int appUid = 123;
-    vector<int> attributionUids1 = {appUid};
-    vector<string> attributionTags1 = {"App1"};
-
-    auto event = CreateAcquireWakelockEvent(bucketStartTimeNs + 10 * NS_PER_SEC, attributionUids1,
-                                            attributionTags1,
-                                            "wl1");  // 0:10
-    processor->OnLogEvent(event.get());
-
-    event = CreateMoveToBackgroundEvent(bucketStartTimeNs + 22 * NS_PER_SEC, appUid);  // 0:22
-    processor->OnLogEvent(event.get());
-
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + (3 * 60 + 15) * NS_PER_SEC,
-                                        appUid);  // 3:15
-    processor->OnLogEvent(event.get());
-
-    event = CreateReleaseWakelockEvent(bucketStartTimeNs + 4 * 60 * NS_PER_SEC, attributionUids1,
-                                       attributionTags1,
-                                       "wl1");  // 4:00
-    processor->OnLogEvent(event.get());
-
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(1, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-
-    // Validate bucket info.
-    ASSERT_EQ(1, data.bucket_info_size());
-
-    auto bucketInfo = data.bucket_info(0);
-    EXPECT_EQ(bucketStartTimeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos());
-    EXPECT_EQ((2 * 60 + 53) * NS_PER_SEC, bucketInfo.duration_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestWithSlicedCondition) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateAcquireWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateReleaseWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateMoveToBackgroundAtomMatcher();
-    *config.add_atom_matcher() = CreateMoveToForegroundAtomMatcher();
-
-    auto holdingWakelockPredicate = CreateHoldingWakelockPredicate();
-    // The predicate is dimensioning by first attribution node by uid.
-    FieldMatcher dimensions = CreateAttributionUidDimensions(util::WAKELOCK_STATE_CHANGED,
-                                                             {Position::FIRST});
-    *holdingWakelockPredicate.mutable_simple_predicate()->mutable_dimensions() = dimensions;
-    *config.add_predicate() = holdingWakelockPredicate;
-
-    auto isInBackgroundPredicate = CreateIsInBackgroundPredicate();
-    *isInBackgroundPredicate.mutable_simple_predicate()->mutable_dimensions() =
-            CreateDimensions(util::ACTIVITY_FOREGROUND_STATE_CHANGED, {Position::FIRST});
-    *config.add_predicate() = isInBackgroundPredicate;
-
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("WakelockDuration"));
-    durationMetric->set_what(holdingWakelockPredicate.id());
-    durationMetric->set_condition(isInBackgroundPredicate.id());
-    durationMetric->set_aggregation_type(DurationMetric::SUM);
-    // The metric is dimensioning by first attribution node and only by uid.
-    *durationMetric->mutable_dimensions_in_what() = CreateAttributionUidDimensions(
-            util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    // Links between wakelock state atom and condition of app is in background.
-    auto links = durationMetric->add_links();
-    links->set_condition(isInBackgroundPredicate.id());
-    auto dimensionWhat = links->mutable_fields_in_what();
-    dimensionWhat->set_field(util::WAKELOCK_STATE_CHANGED);
-    dimensionWhat->add_child()->set_field(1);  // uid field.
-    *links->mutable_fields_in_condition() = CreateAttributionUidDimensions(
-            util::ACTIVITY_FOREGROUND_STATE_CHANGED, {Position::FIRST});
-
-    ConfigKey cfgKey;
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_TRUE(eventActivationMap.empty());
-
-    int appUid = 123;
-    std::vector<int> attributionUids1 = {appUid};
-    std::vector<string> attributionTags1 = {"App1"};
-
-    auto event = CreateAcquireWakelockEvent(bucketStartTimeNs + 10 * NS_PER_SEC, attributionUids1,
-                                            attributionTags1, "wl1");  // 0:10
-    processor->OnLogEvent(event.get());
-
-    event = CreateMoveToBackgroundEvent(bucketStartTimeNs + 22 * NS_PER_SEC, appUid);  // 0:22
-    processor->OnLogEvent(event.get());
-
-    event = CreateReleaseWakelockEvent(bucketStartTimeNs + 60 * NS_PER_SEC, attributionUids1,
-                                       attributionTags1, "wl1");  // 1:00
-    processor->OnLogEvent(event.get());
-
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + (3 * 60 + 15) * NS_PER_SEC,
-                                        appUid);  // 3:15
-    processor->OnLogEvent(event.get());
-
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(1, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    // Validate dimension value.
-    ValidateAttributionUidDimension(data.dimensions_in_what(),
-                                    util::WAKELOCK_STATE_CHANGED, appUid);
-    // Validate bucket info.
-    ASSERT_EQ(1, data.bucket_info_size());
-
-    auto bucketInfo = data.bucket_info(0);
-    EXPECT_EQ(bucketStartTimeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos());
-    EXPECT_EQ(38 * NS_PER_SEC, bucketInfo.duration_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestWithActivationAndSlicedCondition) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateAcquireWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateReleaseWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateMoveToBackgroundAtomMatcher();
-    *config.add_atom_matcher() = CreateMoveToForegroundAtomMatcher();
-    *config.add_atom_matcher() = screenOnMatcher;
-
-    auto holdingWakelockPredicate = CreateHoldingWakelockPredicate();
-    // The predicate is dimensioning by first attribution node by uid.
-    FieldMatcher dimensions = CreateAttributionUidDimensions(util::WAKELOCK_STATE_CHANGED,
-                                                             {Position::FIRST});
-    *holdingWakelockPredicate.mutable_simple_predicate()->mutable_dimensions() = dimensions;
-    *config.add_predicate() = holdingWakelockPredicate;
-
-    auto isInBackgroundPredicate = CreateIsInBackgroundPredicate();
-    *isInBackgroundPredicate.mutable_simple_predicate()->mutable_dimensions() =
-            CreateDimensions(util::ACTIVITY_FOREGROUND_STATE_CHANGED, {Position::FIRST});
-    *config.add_predicate() = isInBackgroundPredicate;
-
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("WakelockDuration"));
-    durationMetric->set_what(holdingWakelockPredicate.id());
-    durationMetric->set_condition(isInBackgroundPredicate.id());
-    durationMetric->set_aggregation_type(DurationMetric::SUM);
-    // The metric is dimensioning by first attribution node and only by uid.
-    *durationMetric->mutable_dimensions_in_what() = CreateAttributionUidDimensions(
-            util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    // Links between wakelock state atom and condition of app is in background.
-    auto links = durationMetric->add_links();
-    links->set_condition(isInBackgroundPredicate.id());
-    auto dimensionWhat = links->mutable_fields_in_what();
-    dimensionWhat->set_field(util::WAKELOCK_STATE_CHANGED);
-    dimensionWhat->add_child()->set_field(1);  // uid field.
-    *links->mutable_fields_in_condition() = CreateAttributionUidDimensions(
-            util::ACTIVITY_FOREGROUND_STATE_CHANGED, {Position::FIRST});
-
-    auto metric_activation1 = config.add_metric_activation();
-    metric_activation1->set_metric_id(durationMetric->id());
-    auto event_activation1 = metric_activation1->add_event_activation();
-    event_activation1->set_atom_matcher_id(screenOnMatcher.id());
-    event_activation1->set_ttl_seconds(60 * 2);  // 2 minutes.
-
-    ConfigKey cfgKey;
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    ASSERT_EQ(eventActivationMap.size(), 1u);
-    EXPECT_TRUE(eventActivationMap.find(4) != eventActivationMap.end());
-    EXPECT_EQ(eventActivationMap[4]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[4]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[4]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    int appUid = 123;
-    std::vector<int> attributionUids1 = {appUid};
-    std::vector<string> attributionTags1 = {"App1"};
-
-    auto event = CreateAcquireWakelockEvent(bucketStartTimeNs + 10 * NS_PER_SEC, attributionUids1,
-                                            attributionTags1, "wl1");  // 0:10
-    processor->OnLogEvent(event.get());
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[4]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[4]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[4]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    event = CreateMoveToBackgroundEvent(bucketStartTimeNs + 22 * NS_PER_SEC, appUid);  // 0:22
-    processor->OnLogEvent(event.get());
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[4]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[4]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[4]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    const int64_t durationStartNs = bucketStartTimeNs + 30 * NS_PER_SEC;  // 0:30
-    event = CreateScreenStateChangedEvent(durationStartNs, android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(event.get());
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[4]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[4]->start_ns, durationStartNs);
-    EXPECT_EQ(eventActivationMap[4]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    const int64_t durationEndNs =
-            durationStartNs + (event_activation1->ttl_seconds() + 30) * NS_PER_SEC;  // 3:00
-    event = CreateAppCrashEvent(durationEndNs, 333);
-    processor->OnLogEvent(event.get());
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[4]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[4]->start_ns, durationStartNs);
-    EXPECT_EQ(eventActivationMap[4]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + (3 * 60 + 15) * NS_PER_SEC,
-                                        appUid);  // 3:15
-    processor->OnLogEvent(event.get());
-
-    event = CreateReleaseWakelockEvent(bucketStartTimeNs + (4 * 60 + 17) * NS_PER_SEC,
-                                       attributionUids1, attributionTags1, "wl1");  // 4:17
-    processor->OnLogEvent(event.get());
-
-    event = CreateMoveToBackgroundEvent(bucketStartTimeNs + (4 * 60 + 20) * NS_PER_SEC,
-                                        appUid);  // 4:20
-    processor->OnLogEvent(event.get());
-
-    event = CreateAcquireWakelockEvent(bucketStartTimeNs + (4 * 60 + 25) * NS_PER_SEC,
-                                       attributionUids1, attributionTags1, "wl1");  // 4:25
-    processor->OnLogEvent(event.get());
-
-    const int64_t duration2StartNs = bucketStartTimeNs + (4 * 60 + 30) * NS_PER_SEC;  // 4:30
-    event = CreateScreenStateChangedEvent(duration2StartNs, android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(event.get());
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[4]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[4]->start_ns, duration2StartNs);
-    EXPECT_EQ(eventActivationMap[4]->ttl_ns, event_activation1->ttl_seconds() * NS_PER_SEC);
-
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(1, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    // Validate dimension value.
-    ValidateAttributionUidDimension(data.dimensions_in_what(),
-                                    util::WAKELOCK_STATE_CHANGED, appUid);
-    // Validate bucket info.
-    ASSERT_EQ(2, data.bucket_info_size());
-
-    auto bucketInfo = data.bucket_info(0);
-    EXPECT_EQ(bucketStartTimeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(durationEndNs, bucketInfo.end_bucket_elapsed_nanos());
-    EXPECT_EQ(durationEndNs - durationStartNs, bucketInfo.duration_nanos());
-
-    bucketInfo = data.bucket_info(1);
-    EXPECT_EQ(durationEndNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs - duration2StartNs, bucketInfo.duration_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestWithSlicedState) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    *config.add_atom_matcher() = CreateBatterySaverModeStartAtomMatcher();
-    *config.add_atom_matcher() = CreateBatterySaverModeStopAtomMatcher();
-
-    auto batterySaverModePredicate = CreateBatterySaverModePredicate();
-    *config.add_predicate() = batterySaverModePredicate;
-
-    auto screenState = CreateScreenState();
-    *config.add_state() = screenState;
-
-    // Create duration metric that slices by screen state.
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("DurationBatterySaverModeSliceScreen"));
-    durationMetric->set_what(batterySaverModePredicate.id());
-    durationMetric->add_slice_by_state(screenState.id());
-    durationMetric->set_aggregation_type(DurationMetric::SUM);
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    // Initialize StatsLogProcessor.
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    EXPECT_TRUE(metricsManager->isActive());
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    EXPECT_TRUE(metricProducer->mIsActive);
-    ASSERT_EQ(metricProducer->mSlicedStateAtoms.size(), 1);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(0), SCREEN_STATE_ATOM_ID);
-    ASSERT_EQ(metricProducer->mStateGroupMap.size(), 0);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-
-    /*
-               bucket #1                      bucket #2
-    |     1     2     3     4     5     6     7     8     9     10 (minutes)
-    |-----------------------------|-----------------------------|--
-        ON              OFF     ON                                  (BatterySaverMode)
-      |          |                   |                              (ScreenIsOnEvent)
-           |                  |                                     (ScreenIsOffEvent)
-              |                                                     (ScreenDozeEvent)
-    */
-    // Initialize log events.
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 10 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));                       // 0:20
-    events.push_back(CreateBatterySaverOnEvent(bucketStartTimeNs + 20 * NS_PER_SEC));  // 0:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 50 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 1:00
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 80 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE));  // 1:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 120 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));                         // 2:10
-    events.push_back(CreateBatterySaverOffEvent(bucketStartTimeNs + 200 * NS_PER_SEC));  // 3:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 250 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));                       // 4:20
-    events.push_back(CreateBatterySaverOnEvent(bucketStartTimeNs + 280 * NS_PER_SEC));  // 4:50
-
-    // Bucket boundary.
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 310 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 5:20
-
-    // Send log events to StatsLogProcessor.
-    for (auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    // Check dump report.
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 360 * NS_PER_SEC,
-                            true /* include current partial bucket */, true, ADB_DUMP, FAST,
-                            &buffer);  // 6:10
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_duration_metrics());
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(3, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_OFF, data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(50 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(1).duration_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(370 * NS_PER_SEC, data.bucket_info(1).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(1);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON, data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(110 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(50 * NS_PER_SEC, data.bucket_info(1).duration_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(370 * NS_PER_SEC, data.bucket_info(1).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(2);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_DOZE, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(40 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestWithConditionAndSlicedState) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    *config.add_atom_matcher() = CreateBatterySaverModeStartAtomMatcher();
-    *config.add_atom_matcher() = CreateBatterySaverModeStopAtomMatcher();
-    *config.add_atom_matcher() = CreateBatteryStateNoneMatcher();
-    *config.add_atom_matcher() = CreateBatteryStateUsbMatcher();
-
-    auto batterySaverModePredicate = CreateBatterySaverModePredicate();
-    *config.add_predicate() = batterySaverModePredicate;
-
-    auto deviceUnpluggedPredicate = CreateDeviceUnpluggedPredicate();
-    *config.add_predicate() = deviceUnpluggedPredicate;
-
-    auto screenState = CreateScreenState();
-    *config.add_state() = screenState;
-
-    // Create duration metric that has a condition and slices by screen state.
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("DurationBatterySaverModeOnBatterySliceScreen"));
-    durationMetric->set_what(batterySaverModePredicate.id());
-    durationMetric->set_condition(deviceUnpluggedPredicate.id());
-    durationMetric->add_slice_by_state(screenState.id());
-    durationMetric->set_aggregation_type(DurationMetric::SUM);
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    // Initialize StatsLogProcessor.
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    EXPECT_TRUE(metricsManager->isActive());
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    EXPECT_TRUE(metricProducer->mIsActive);
-    ASSERT_EQ(metricProducer->mSlicedStateAtoms.size(), 1);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(0), SCREEN_STATE_ATOM_ID);
-    ASSERT_EQ(metricProducer->mStateGroupMap.size(), 0);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-
-    /*
-               bucket #1                      bucket #2
-    |       1       2       3       4       5     6     7     8  (minutes)
-    |---------------------------------------|------------------
-             ON                          OFF    ON             (BatterySaverMode)
-                  T            F    T                          (DeviceUnpluggedPredicate)
-         |              |              |                       (ScreenIsOnEvent)
-                |           |                       |          (ScreenIsOffEvent)
-                                |                              (ScreenDozeEvent)
-    */
-    // Initialize log events.
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 20 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));                       // 0:30
-    events.push_back(CreateBatterySaverOnEvent(bucketStartTimeNs + 60 * NS_PER_SEC));  // 1:10
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 80 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 1:30
-    events.push_back(
-            CreateBatteryStateChangedEvent(bucketStartTimeNs + 110 * NS_PER_SEC,
-                                           BatteryPluggedStateEnum::BATTERY_PLUGGED_NONE));  // 2:00
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 145 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 2:35
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 170 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 3:00
-    events.push_back(
-            CreateBatteryStateChangedEvent(bucketStartTimeNs + 180 * NS_PER_SEC,
-                                           BatteryPluggedStateEnum::BATTERY_PLUGGED_USB));  // 3:10
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 200 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE));  // 3:30
-    events.push_back(
-            CreateBatteryStateChangedEvent(bucketStartTimeNs + 230 * NS_PER_SEC,
-                                           BatteryPluggedStateEnum::BATTERY_PLUGGED_NONE));  // 4:00
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 260 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));                         // 4:30
-    events.push_back(CreateBatterySaverOffEvent(bucketStartTimeNs + 280 * NS_PER_SEC));  // 4:50
-
-    // Bucket boundary.
-    events.push_back(CreateBatterySaverOnEvent(bucketStartTimeNs + 320 * NS_PER_SEC));  // 5:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 380 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 6:30
-
-    // Send log events to StatsLogProcessor.
-    for (auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    // Check dump report.
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 410 * NS_PER_SEC,
-                            true /* include current partial bucket */, true, ADB_DUMP, FAST,
-                            &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_duration_metrics());
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(3, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_OFF, data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(45 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(30 * NS_PER_SEC, data.bucket_info(1).duration_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(420 * NS_PER_SEC, data.bucket_info(1).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(1);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON, data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(45 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(60 * NS_PER_SEC, data.bucket_info(1).duration_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(420 * NS_PER_SEC, data.bucket_info(1).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(2);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_DOZE, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(30 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestWithSlicedStateMapped) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    *config.add_atom_matcher() = CreateBatterySaverModeStartAtomMatcher();
-    *config.add_atom_matcher() = CreateBatterySaverModeStopAtomMatcher();
-
-    auto batterySaverModePredicate = CreateBatterySaverModePredicate();
-    *config.add_predicate() = batterySaverModePredicate;
-
-    int64_t screenOnId = 4444;
-    int64_t screenOffId = 9876;
-    auto screenStateWithMap = CreateScreenStateWithOnOffMap(screenOnId, screenOffId);
-    *config.add_state() = screenStateWithMap;
-
-    // Create duration metric that slices by mapped screen state.
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("DurationBatterySaverModeSliceScreenMapped"));
-    durationMetric->set_what(batterySaverModePredicate.id());
-    durationMetric->add_slice_by_state(screenStateWithMap.id());
-    durationMetric->set_aggregation_type(DurationMetric::SUM);
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    // Initialize StatsLogProcessor.
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    EXPECT_TRUE(metricsManager->isActive());
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    EXPECT_TRUE(metricProducer->mIsActive);
-    ASSERT_EQ(metricProducer->mSlicedStateAtoms.size(), 1);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(0), SCREEN_STATE_ATOM_ID);
-    ASSERT_EQ(metricProducer->mStateGroupMap.size(), 1);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-
-    /*
-               bucket #1                      bucket #2
-    |     1     2     3     4     5     6     7     8     9     10 (minutes)
-    |-----------------------------|-----------------------------|--
-        ON              OFF     ON                                  (BatterySaverMode)
-     ---------------------------------------------------------SCREEN_OFF events
-           |                  |                                  (ScreenStateOffEvent = 1)
-              |                                                  (ScreenStateDozeEvent = 3)
-                                                |                (ScreenStateDozeSuspendEvent = 4)
-     ---------------------------------------------------------SCREEN_ON events
-      |          |                   |                           (ScreenStateOnEvent = 2)
-                      |                                          (ScreenStateVrEvent = 5)
-                                            |                    (ScreenStateOnSuspendEvent = 6)
-    */
-    // Initialize log events.
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 10 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));                       // 0:20
-    events.push_back(CreateBatterySaverOnEvent(bucketStartTimeNs + 20 * NS_PER_SEC));  // 0:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 70 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));  // 1:20
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 100 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE));  // 1:50
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 120 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 2:10
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 170 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_VR));                         // 3:00
-    events.push_back(CreateBatterySaverOffEvent(bucketStartTimeNs + 200 * NS_PER_SEC));  // 3:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 250 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_OFF));                       // 4:20
-    events.push_back(CreateBatterySaverOnEvent(bucketStartTimeNs + 280 * NS_PER_SEC));  // 4:50
-
-    // Bucket boundary 5:10.
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 320 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON));  // 5:30
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 390 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON_SUSPEND));  // 6:40
-    events.push_back(CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 430 * NS_PER_SEC,
-            android::view::DisplayStateEnum::DISPLAY_STATE_DOZE_SUSPEND));  // 7:20
-    // Send log events to StatsLogProcessor.
-    for (auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    // Check dump report.
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 490 * NS_PER_SEC,
-                            true /* include current partial bucket */, true, ADB_DUMP, FAST,
-                            &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_duration_metrics());
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(2, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOnId, data.slice_by_state(0).group_id());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(130 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(110 * NS_PER_SEC, data.bucket_info(1).duration_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(500 * NS_PER_SEC, data.bucket_info(1).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(1);
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOffId, data.slice_by_state(0).group_id());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(70 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(80 * NS_PER_SEC, data.bucket_info(1).duration_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(500 * NS_PER_SEC, data.bucket_info(1).end_bucket_elapsed_nanos());
-}
-
-TEST(DurationMetricE2eTest, TestSlicedStatePrimaryFieldsNotSubsetDimInWhat) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    *config.add_atom_matcher() = CreateAcquireWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateReleaseWakelockAtomMatcher();
-
-    auto holdingWakelockPredicate = CreateHoldingWakelockPredicate();
-    *config.add_predicate() = holdingWakelockPredicate;
-
-    auto uidProcessState = CreateUidProcessState();
-    *config.add_state() = uidProcessState;
-
-    // Create duration metric that slices by uid process state.
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("DurationHoldingWakelockSliceUidProcessState"));
-    durationMetric->set_what(holdingWakelockPredicate.id());
-    durationMetric->add_slice_by_state(uidProcessState.id());
-    durationMetric->set_aggregation_type(DurationMetric::SUM);
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    // The state has only one primary field (uid).
-    auto stateLink = durationMetric->add_state_link();
-    stateLink->set_state_atom_id(UID_PROCESS_STATE_ATOM_ID);
-    auto fieldsInWhat = stateLink->mutable_fields_in_what();
-    *fieldsInWhat = CreateAttributionUidDimensions(util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    auto fieldsInState = stateLink->mutable_fields_in_state();
-    *fieldsInState = CreateDimensions(UID_PROCESS_STATE_ATOM_ID, {1 /* uid */});
-
-    // Initialize StatsLogProcessor.
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    // This config is rejected because the dimension in what fields are not a superset of the sliced
-    // state primary fields.
-    ASSERT_EQ(processor->mMetricsManagers.size(), 0);
-}
-
-TEST(DurationMetricE2eTest, TestWithSlicedStatePrimaryFieldsSubset) {
-    // Initialize config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    *config.add_atom_matcher() = CreateAcquireWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateReleaseWakelockAtomMatcher();
-
-    auto holdingWakelockPredicate = CreateHoldingWakelockPredicate();
-    *config.add_predicate() = holdingWakelockPredicate;
-
-    auto uidProcessState = CreateUidProcessState();
-    *config.add_state() = uidProcessState;
-
-    // Create duration metric that slices by uid process state.
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("DurationPartialWakelockPerTagUidSliceProcessState"));
-    durationMetric->set_what(holdingWakelockPredicate.id());
-    durationMetric->add_slice_by_state(uidProcessState.id());
-    durationMetric->set_aggregation_type(DurationMetric::SUM);
-    durationMetric->set_bucket(FIVE_MINUTES);
-
-    // The metric is dimensioning by first uid of attribution node and tag.
-    *durationMetric->mutable_dimensions_in_what() = CreateAttributionUidAndOtherDimensions(
-            util::WAKELOCK_STATE_CHANGED, {Position::FIRST}, {3 /* tag */});
-    // The state has only one primary field (uid).
-    auto stateLink = durationMetric->add_state_link();
-    stateLink->set_state_atom_id(UID_PROCESS_STATE_ATOM_ID);
-    auto fieldsInWhat = stateLink->mutable_fields_in_what();
-    *fieldsInWhat = CreateAttributionUidDimensions(util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    auto fieldsInState = stateLink->mutable_fields_in_state();
-    *fieldsInState = CreateDimensions(UID_PROCESS_STATE_ATOM_ID, {1 /* uid */});
-
-    // Initialize StatsLogProcessor.
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    EXPECT_TRUE(metricsManager->isActive());
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    EXPECT_TRUE(metricProducer->mIsActive);
-    ASSERT_EQ(metricProducer->mSlicedStateAtoms.size(), 1);
-    EXPECT_EQ(metricProducer->mSlicedStateAtoms.at(0), UID_PROCESS_STATE_ATOM_ID);
-    ASSERT_EQ(metricProducer->mStateGroupMap.size(), 0);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(UID_PROCESS_STATE_ATOM_ID));
-
-    // Initialize log events.
-    int appUid1 = 1001;
-    int appUid2 = 1002;
-    std::vector<int> attributionUids1 = {appUid1};
-    std::vector<string> attributionTags1 = {"App1"};
-
-    std::vector<int> attributionUids2 = {appUid2};
-    std::vector<string> attributionTags2 = {"App2"};
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 10 * NS_PER_SEC, appUid1,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND));  // 0:20
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 20 * NS_PER_SEC,
-                                                attributionUids1, attributionTags1,
-                                                "wakelock1"));  // 0:30
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 25 * NS_PER_SEC,
-                                                attributionUids1, attributionTags1,
-                                                "wakelock2"));  // 0:35
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 30 * NS_PER_SEC,
-                                                attributionUids2, attributionTags2,
-                                                "wakelock1"));  // 0:40
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 35 * NS_PER_SEC,
-                                                attributionUids2, attributionTags2,
-                                                "wakelock2"));  // 0:45
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 50 * NS_PER_SEC, appUid2,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND));  // 1:00
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 60 * NS_PER_SEC, appUid1,
-            android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND));  // 1:10
-    events.push_back(CreateReleaseWakelockEvent(bucketStartTimeNs + 100 * NS_PER_SEC,
-                                                attributionUids2, attributionTags2,
-                                                "wakelock1"));  // 1:50
-    events.push_back(CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 120 * NS_PER_SEC, appUid2,
-            android::app::ProcessStateEnum::PROCESS_STATE_FOREGROUND_SERVICE));  // 2:10
-    events.push_back(CreateReleaseWakelockEvent(bucketStartTimeNs + 200 * NS_PER_SEC,
-                                                attributionUids1, attributionTags1,
-                                                "wakelock2"));  // 3:30
-
-    // Send log events to StatsLogProcessor.
-    for (auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    // Check dump report.
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 320 * NS_PER_SEC,
-                            true /* include current partial bucket */, true, ADB_DUMP, FAST,
-                            &buffer);
-    ASSERT_GT(buffer.size(), 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    EXPECT_TRUE(reports.reports(0).metrics(0).has_duration_metrics());
-    StatsLogReport::DurationMetricDataWrapper durationMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).duration_metrics(),
-                                    &durationMetrics);
-    ASSERT_EQ(9, durationMetrics.data_size());
-
-    DurationMetricData data = durationMetrics.data(0);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid1,
-                                                  "wakelock1");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(40 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(1);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid1,
-                                                  "wakelock1");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(240 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(20 * NS_PER_SEC, data.bucket_info(1).duration_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(330 * NS_PER_SEC, data.bucket_info(1).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(2);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid1,
-                                                  "wakelock2");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(35 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(3);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid1,
-                                                  "wakelock2");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(140 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(4);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid2,
-                                                  "wakelock1");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1 /* StateTracker:: kStateUnknown */, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(20 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(5);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid2,
-                                                  "wakelock1");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(50 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(6);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid2,
-                                                  "wakelock2");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1 /* StateTracker:: kStateUnknown */, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(15 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(7);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid2,
-                                                  "wakelock2");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_FOREGROUND_SERVICE,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(180 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(20 * NS_PER_SEC, data.bucket_info(1).duration_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(330 * NS_PER_SEC, data.bucket_info(1).end_bucket_elapsed_nanos());
-
-    data = durationMetrics.data(8);
-    ValidateWakelockAttributionUidAndTagDimension(data.dimensions_in_what(), 10, appUid2,
-                                                  "wakelock2");
-    ASSERT_EQ(1, data.slice_by_state_size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(70 * NS_PER_SEC, data.bucket_info(0).duration_nanos());
-    EXPECT_EQ(10 * NS_PER_SEC, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(310 * NS_PER_SEC, data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/GaugeMetric_e2e_pull_test.cpp b/cmds/statsd/tests/e2e/GaugeMetric_e2e_pull_test.cpp
deleted file mode 100644
index 1be2612..0000000
--- a/cmds/statsd/tests/e2e/GaugeMetric_e2e_pull_test.cpp
+++ /dev/null
@@ -1,624 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <android/binder_interface_utils.h>
-#include <gtest/gtest.h>
-
-#include <vector>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-using ::ndk::SharedRefBase;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-const int64_t metricId = 123456;
-const int32_t ATOM_TAG = util::SUBSYSTEM_SLEEP_STATE;
-
-StatsdConfig CreateStatsdConfig(const GaugeMetric::SamplingType sampling_type,
-                                bool useCondition = true) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    config.add_default_pull_packages("AID_ROOT");  // Fake puller is registered with root.
-    auto atomMatcher = CreateSimpleAtomMatcher("TestMatcher", ATOM_TAG);
-    *config.add_atom_matcher() = atomMatcher;
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-
-    auto screenIsOffPredicate = CreateScreenIsOffPredicate();
-    *config.add_predicate() = screenIsOffPredicate;
-
-    auto gaugeMetric = config.add_gauge_metric();
-    gaugeMetric->set_id(metricId);
-    gaugeMetric->set_what(atomMatcher.id());
-    if (useCondition) {
-        gaugeMetric->set_condition(screenIsOffPredicate.id());
-    }
-    gaugeMetric->set_sampling_type(sampling_type);
-    gaugeMetric->mutable_gauge_fields_filter()->set_include_all(true);
-    *gaugeMetric->mutable_dimensions_in_what() =
-            CreateDimensions(ATOM_TAG, {1 /* subsystem name */});
-    gaugeMetric->set_bucket(FIVE_MINUTES);
-    gaugeMetric->set_max_pull_delay_sec(INT_MAX);
-    config.set_hash_strings_in_metric_report(false);
-
-    return config;
-}
-
-}  // namespaces
-
-TEST(GaugeMetricE2eTest, TestRandomSamplePulledEvents) {
-    auto config = CreateStatsdConfig(GaugeMetric::RANDOM_ONE_SAMPLE);
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor =
-            CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                    SharedRefBase::make<FakeSubsystemSleepCallback>(), ATOM_TAG);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    processor->mPullerManager->ForceClearPullerCache();
-
-    int startBucketNum = processor->mMetricsManagers.begin()
-                                 ->second->mAllMetricProducers[0]
-                                 ->getCurrentBucketNum();
-    EXPECT_GT(startBucketNum, (int64_t)0);
-
-    // When creating the config, the gauge metric producer should register the alarm at the
-    // end of the current bucket.
-    ASSERT_EQ((size_t)1, processor->mPullerManager->mReceivers.size());
-    EXPECT_EQ(bucketSizeNs,
-              processor->mPullerManager->mReceivers.begin()->second.front().intervalNs);
-    int64_t& nextPullTimeNs =
-            processor->mPullerManager->mReceivers.begin()->second.front().nextPullTimeNs;
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, nextPullTimeNs);
-
-    auto screenOffEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 55, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    // Pulling alarm arrives on time and reset the sequential pulling alarm.
-    processor->informPullAlarmFired(nextPullTimeNs + 1);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 2 * bucketSizeNs, nextPullTimeNs);
-
-    auto screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 10,
-                                                       android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 100,
-                                                   android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    processor->informPullAlarmFired(nextPullTimeNs + 1);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 3 * bucketSizeNs, nextPullTimeNs);
-
-    processor->informPullAlarmFired(nextPullTimeNs + 1);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 4 * bucketSizeNs, nextPullTimeNs);
-
-    screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 3 * bucketSizeNs + 2,
-                                                  android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    processor->informPullAlarmFired(nextPullTimeNs + 3);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 5 * bucketSizeNs, nextPullTimeNs);
-
-    screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 5 * bucketSizeNs + 1,
-                                                   android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    processor->informPullAlarmFired(nextPullTimeNs + 2);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 6 * bucketSizeNs, nextPullTimeNs);
-
-    processor->informPullAlarmFired(nextPullTimeNs + 2);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
-                            ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).gauge_metrics(), &gaugeMetrics);
-    ASSERT_GT((int)gaugeMetrics.data_size(), 1);
-
-    auto data = gaugeMetrics.data(0);
-    EXPECT_EQ(ATOM_TAG, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* subsystem name field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_FALSE(data.dimensions_in_what().value_tuple().dimensions_value(0).value_str().empty());
-    ASSERT_EQ(6, data.bucket_info_size());
-
-    ASSERT_EQ(1, data.bucket_info(0).atom_size());
-    ASSERT_EQ(1, data.bucket_info(0).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(configAddedTimeNs + 55, data.bucket_info(0).elapsed_timestamp_nanos(0));
-    ASSERT_EQ(0, data.bucket_info(0).wall_clock_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 2 * bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(0).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(0).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(1).atom_size());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs + 1, data.bucket_info(1).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs + 1, data.bucket_info(1).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, data.bucket_info(1).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(1).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(1).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(2).atom_size());
-    ASSERT_EQ(1, data.bucket_info(2).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs + 1, data.bucket_info(2).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, data.bucket_info(2).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs, data.bucket_info(2).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(2).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(2).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(3).atom_size());
-    ASSERT_EQ(1, data.bucket_info(3).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs + 1, data.bucket_info(3).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs, data.bucket_info(3).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 6 * bucketSizeNs, data.bucket_info(3).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(3).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(3).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(4).atom_size());
-    ASSERT_EQ(1, data.bucket_info(4).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 7 * bucketSizeNs + 1, data.bucket_info(4).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 7 * bucketSizeNs, data.bucket_info(4).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 8 * bucketSizeNs, data.bucket_info(4).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(4).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(4).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(5).atom_size());
-    ASSERT_EQ(1, data.bucket_info(5).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 8 * bucketSizeNs + 2, data.bucket_info(5).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 8 * bucketSizeNs, data.bucket_info(5).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 9 * bucketSizeNs, data.bucket_info(5).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(5).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(5).atom(0).subsystem_sleep_state().time_millis(), 0);
-}
-
-TEST(GaugeMetricE2eTest, TestConditionChangeToTrueSamplePulledEvents) {
-    auto config = CreateStatsdConfig(GaugeMetric::CONDITION_CHANGE_TO_TRUE);
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor =
-            CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                    SharedRefBase::make<FakeSubsystemSleepCallback>(), ATOM_TAG);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    processor->mPullerManager->ForceClearPullerCache();
-
-    int startBucketNum = processor->mMetricsManagers.begin()
-                                 ->second->mAllMetricProducers[0]
-                                 ->getCurrentBucketNum();
-    EXPECT_GT(startBucketNum, (int64_t)0);
-
-    auto screenOffEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 55, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    auto screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 10,
-                                                       android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 100,
-                                                   android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 3 * bucketSizeNs + 2,
-                                                  android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 5 * bucketSizeNs + 1,
-                                                   android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-    screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 5 * bucketSizeNs + 3,
-                                                  android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-    screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 5 * bucketSizeNs + 10,
-                                                   android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 8 * bucketSizeNs + 10, false, true,
-                            ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).gauge_metrics(), &gaugeMetrics);
-    ASSERT_GT((int)gaugeMetrics.data_size(), 1);
-
-    auto data = gaugeMetrics.data(0);
-    EXPECT_EQ(ATOM_TAG, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* subsystem name field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_FALSE(data.dimensions_in_what().value_tuple().dimensions_value(0).value_str().empty());
-    ASSERT_EQ(3, data.bucket_info_size());
-
-    ASSERT_EQ(1, data.bucket_info(0).atom_size());
-    ASSERT_EQ(1, data.bucket_info(0).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(configAddedTimeNs + 55, data.bucket_info(0).elapsed_timestamp_nanos(0));
-    ASSERT_EQ(0, data.bucket_info(0).wall_clock_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 2 * bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(0).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(0).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(1).atom_size());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs + 100, data.bucket_info(1).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(configAddedTimeNs + 55, data.bucket_info(0).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, data.bucket_info(1).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(1).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(1).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(2, data.bucket_info(2).atom_size());
-    ASSERT_EQ(2, data.bucket_info(2).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 7 * bucketSizeNs + 1, data.bucket_info(2).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 7 * bucketSizeNs + 10, data.bucket_info(2).elapsed_timestamp_nanos(1));
-    EXPECT_EQ(baseTimeNs + 7 * bucketSizeNs, data.bucket_info(2).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 8 * bucketSizeNs, data.bucket_info(2).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(2).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(2).atom(0).subsystem_sleep_state().time_millis(), 0);
-    EXPECT_TRUE(data.bucket_info(2).atom(1).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(2).atom(1).subsystem_sleep_state().time_millis(), 0);
-}
-
-TEST(GaugeMetricE2eTest, TestRandomSamplePulledEvent_LateAlarm) {
-    auto config = CreateStatsdConfig(GaugeMetric::RANDOM_ONE_SAMPLE);
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor =
-            CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                    SharedRefBase::make<FakeSubsystemSleepCallback>(), ATOM_TAG);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    processor->mPullerManager->ForceClearPullerCache();
-
-    int startBucketNum = processor->mMetricsManagers.begin()
-                                 ->second->mAllMetricProducers[0]
-                                 ->getCurrentBucketNum();
-    EXPECT_GT(startBucketNum, (int64_t)0);
-
-    // When creating the config, the gauge metric producer should register the alarm at the
-    // end of the current bucket.
-    ASSERT_EQ((size_t)1, processor->mPullerManager->mReceivers.size());
-    EXPECT_EQ(bucketSizeNs,
-              processor->mPullerManager->mReceivers.begin()->second.front().intervalNs);
-    int64_t& nextPullTimeNs =
-            processor->mPullerManager->mReceivers.begin()->second.front().nextPullTimeNs;
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, nextPullTimeNs);
-
-    auto screenOffEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 55, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    auto screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 10,
-                                                       android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    // Pulling alarm arrives one bucket size late.
-    processor->informPullAlarmFired(nextPullTimeNs + bucketSizeNs);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 3 * bucketSizeNs, nextPullTimeNs);
-
-    screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 3 * bucketSizeNs + 11,
-                                                   android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    // Pulling alarm arrives more than one bucket size late.
-    processor->informPullAlarmFired(nextPullTimeNs + bucketSizeNs + 12);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 5 * bucketSizeNs, nextPullTimeNs);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
-                            ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).gauge_metrics(), &gaugeMetrics);
-    ASSERT_GT((int)gaugeMetrics.data_size(), 1);
-
-    auto data = gaugeMetrics.data(0);
-    EXPECT_EQ(ATOM_TAG, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* subsystem name field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_FALSE(data.dimensions_in_what().value_tuple().dimensions_value(0).value_str().empty());
-    ASSERT_EQ(3, data.bucket_info_size());
-
-    ASSERT_EQ(1, data.bucket_info(0).atom_size());
-    ASSERT_EQ(1, data.bucket_info(0).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(configAddedTimeNs + 55, data.bucket_info(0).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 2 * bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(0).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(0).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(1).atom_size());
-    EXPECT_EQ(configAddedTimeNs + 3 * bucketSizeNs + 11,
-              data.bucket_info(1).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(configAddedTimeNs + 55, data.bucket_info(0).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 6 * bucketSizeNs, data.bucket_info(1).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(1).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(1).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(2).atom_size());
-    ASSERT_EQ(1, data.bucket_info(2).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 6 * bucketSizeNs + 12, data.bucket_info(2).elapsed_timestamp_nanos(0));
-    EXPECT_EQ(baseTimeNs + 6 * bucketSizeNs, data.bucket_info(2).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 7 * bucketSizeNs, data.bucket_info(2).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(2).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(2).atom(0).subsystem_sleep_state().time_millis(), 0);
-}
-
-TEST(GaugeMetricE2eTest, TestRandomSamplePulledEventsWithActivation) {
-    auto config = CreateStatsdConfig(GaugeMetric::RANDOM_ONE_SAMPLE, /*useCondition=*/false);
-
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000;
-
-    auto batterySaverStartMatcher = CreateBatterySaverModeStartAtomMatcher();
-    *config.add_atom_matcher() = batterySaverStartMatcher;
-    const int64_t ttlNs = 2 * bucketSizeNs;  // Two buckets.
-    auto metric_activation = config.add_metric_activation();
-    metric_activation->set_metric_id(metricId);
-    metric_activation->set_activation_type(ACTIVATE_IMMEDIATELY);
-    auto event_activation = metric_activation->add_event_activation();
-    event_activation->set_atom_matcher_id(batterySaverStartMatcher.id());
-    event_activation->set_ttl_seconds(ttlNs / 1000000000);
-
-    ConfigKey cfgKey;
-    auto processor =
-            CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                    SharedRefBase::make<FakeSubsystemSleepCallback>(), ATOM_TAG);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    processor->mPullerManager->ForceClearPullerCache();
-
-    int startBucketNum = processor->mMetricsManagers.begin()
-                                 ->second->mAllMetricProducers[0]
-                                 ->getCurrentBucketNum();
-    EXPECT_GT(startBucketNum, (int64_t)0);
-    EXPECT_FALSE(processor->mMetricsManagers.begin()->second->mAllMetricProducers[0]->isActive());
-
-    // When creating the config, the gauge metric producer should register the alarm at the
-    // end of the current bucket.
-    ASSERT_EQ((size_t)1, processor->mPullerManager->mReceivers.size());
-    EXPECT_EQ(bucketSizeNs,
-              processor->mPullerManager->mReceivers.begin()->second.front().intervalNs);
-    int64_t& nextPullTimeNs =
-            processor->mPullerManager->mReceivers.begin()->second.front().nextPullTimeNs;
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, nextPullTimeNs);
-
-    // Pulling alarm arrives on time and reset the sequential pulling alarm.
-    // Event should not be kept.
-    processor->informPullAlarmFired(nextPullTimeNs + 1);  // 15 mins + 1 ns.
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 2 * bucketSizeNs, nextPullTimeNs);
-    EXPECT_FALSE(processor->mMetricsManagers.begin()->second->mAllMetricProducers[0]->isActive());
-
-    // Activate the metric. A pull occurs upon activation.
-    const int64_t activationNs = configAddedTimeNs + bucketSizeNs + (2 * 1000 * 1000);  // 2 millis.
-    auto batterySaverOnEvent = CreateBatterySaverOnEvent(activationNs);
-    processor->OnLogEvent(batterySaverOnEvent.get());  // 15 mins + 2 ms.
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->mAllMetricProducers[0]->isActive());
-
-    // This event should be kept. 2 total.
-    processor->informPullAlarmFired(nextPullTimeNs + 1);  // 20 mins + 1 ns.
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 3 * bucketSizeNs, nextPullTimeNs);
-
-    // This event should be kept. 3 total.
-    processor->informPullAlarmFired(nextPullTimeNs + 2);  // 25 mins + 2 ns.
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 4 * bucketSizeNs, nextPullTimeNs);
-
-    // Create random event to deactivate metric.
-    auto deactivationEvent = CreateScreenBrightnessChangedEvent(activationNs + ttlNs + 1, 50);
-    processor->OnLogEvent(deactivationEvent.get());
-    EXPECT_FALSE(processor->mMetricsManagers.begin()->second->mAllMetricProducers[0]->isActive());
-
-    // Event should not be kept. 3 total.
-    processor->informPullAlarmFired(nextPullTimeNs + 3);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 5 * bucketSizeNs, nextPullTimeNs);
-
-    processor->informPullAlarmFired(nextPullTimeNs + 2);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
-                            ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).gauge_metrics(), &gaugeMetrics);
-    ASSERT_GT((int)gaugeMetrics.data_size(), 0);
-
-    auto data = gaugeMetrics.data(0);
-    EXPECT_EQ(ATOM_TAG, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* subsystem name field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_FALSE(data.dimensions_in_what().value_tuple().dimensions_value(0).value_str().empty());
-    ASSERT_EQ(3, data.bucket_info_size());
-
-    auto bucketInfo = data.bucket_info(0);
-    ASSERT_EQ(1, bucketInfo.atom_size());
-    ASSERT_EQ(1, bucketInfo.elapsed_timestamp_nanos_size());
-    EXPECT_EQ(activationNs, bucketInfo.elapsed_timestamp_nanos(0));
-    ASSERT_EQ(0, bucketInfo.wall_clock_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos());
-    EXPECT_TRUE(bucketInfo.atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(bucketInfo.atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    bucketInfo = data.bucket_info(1);
-    ASSERT_EQ(1, bucketInfo.atom_size());
-    ASSERT_EQ(1, bucketInfo.elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs + 1, bucketInfo.elapsed_timestamp_nanos(0));
-    ASSERT_EQ(0, bucketInfo.wall_clock_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos());
-    EXPECT_TRUE(bucketInfo.atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(bucketInfo.atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    bucketInfo = data.bucket_info(2);
-    ASSERT_EQ(1, bucketInfo.atom_size());
-    ASSERT_EQ(1, bucketInfo.elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs + 2, bucketInfo.elapsed_timestamp_nanos(0));
-    ASSERT_EQ(0, bucketInfo.wall_clock_timestamp_nanos_size());
-    EXPECT_EQ(MillisToNano(NanoToMillis(baseTimeNs + 5 * bucketSizeNs)),
-              bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(MillisToNano(NanoToMillis(activationNs + ttlNs + 1)),
-              bucketInfo.end_bucket_elapsed_nanos());
-    EXPECT_TRUE(bucketInfo.atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(bucketInfo.atom(0).subsystem_sleep_state().time_millis(), 0);
-}
-
-TEST(GaugeMetricE2eTest, TestRandomSamplePulledEventsNoCondition) {
-    auto config = CreateStatsdConfig(GaugeMetric::RANDOM_ONE_SAMPLE, /*useCondition=*/false);
-
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs =
-        TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                             SharedRefBase::make<FakeSubsystemSleepCallback>(),
-                                             ATOM_TAG);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    processor->mPullerManager->ForceClearPullerCache();
-
-    int startBucketNum = processor->mMetricsManagers.begin()->second->
-            mAllMetricProducers[0]->getCurrentBucketNum();
-    EXPECT_GT(startBucketNum, (int64_t)0);
-
-    // When creating the config, the gauge metric producer should register the alarm at the
-    // end of the current bucket.
-    ASSERT_EQ((size_t)1, processor->mPullerManager->mReceivers.size());
-    EXPECT_EQ(bucketSizeNs,
-              processor->mPullerManager->mReceivers.begin()->second.front().intervalNs);
-    int64_t& nextPullTimeNs =
-            processor->mPullerManager->mReceivers.begin()->second.front().nextPullTimeNs;
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, nextPullTimeNs);
-
-    // Pulling alarm arrives on time and reset the sequential pulling alarm.
-    processor->informPullAlarmFired(nextPullTimeNs + 1);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 2 * bucketSizeNs, nextPullTimeNs);
-
-    processor->informPullAlarmFired(nextPullTimeNs + 4);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 3 * bucketSizeNs,
-              nextPullTimeNs);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
-                            ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
-    sortMetricDataByDimensionsValue(
-            reports.reports(0).metrics(0).gauge_metrics(), &gaugeMetrics);
-    ASSERT_GT((int)gaugeMetrics.data_size(), 0);
-
-    auto data = gaugeMetrics.data(0);
-    EXPECT_EQ(ATOM_TAG, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* subsystem name field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_FALSE(data.dimensions_in_what().value_tuple().dimensions_value(0).value_str().empty());
-    ASSERT_EQ(3, data.bucket_info_size());
-
-    ASSERT_EQ(1, data.bucket_info(0).atom_size());
-    ASSERT_EQ(1, data.bucket_info(0).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(configAddedTimeNs, data.bucket_info(0).elapsed_timestamp_nanos(0));
-    ASSERT_EQ(0, data.bucket_info(0).wall_clock_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 2 * bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(0).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(0).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(1).atom_size());
-    ASSERT_EQ(1, data.bucket_info(1).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs + 1, data.bucket_info(1).elapsed_timestamp_nanos(0));
-    ASSERT_EQ(0, data.bucket_info(1).wall_clock_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, data.bucket_info(1).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(1).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(1).atom(0).subsystem_sleep_state().time_millis(), 0);
-
-    ASSERT_EQ(1, data.bucket_info(2).atom_size());
-    ASSERT_EQ(1, data.bucket_info(2).elapsed_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs + 4, data.bucket_info(2).elapsed_timestamp_nanos(0));
-    ASSERT_EQ(0, data.bucket_info(2).wall_clock_timestamp_nanos_size());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, data.bucket_info(2).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs, data.bucket_info(2).end_bucket_elapsed_nanos());
-    EXPECT_TRUE(data.bucket_info(2).atom(0).subsystem_sleep_state().subsystem_name().empty());
-    EXPECT_GT(data.bucket_info(2).atom(0).subsystem_sleep_state().time_millis(), 0);
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/GaugeMetric_e2e_push_test.cpp b/cmds/statsd/tests/e2e/GaugeMetric_e2e_push_test.cpp
deleted file mode 100644
index a40a948..0000000
--- a/cmds/statsd/tests/e2e/GaugeMetric_e2e_push_test.cpp
+++ /dev/null
@@ -1,295 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <gtest/gtest.h>
-
-#include <vector>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-StatsdConfig CreateStatsdConfigForPushedEvent(const GaugeMetric::SamplingType sampling_type) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    *config.add_atom_matcher() = CreateMoveToBackgroundAtomMatcher();
-    *config.add_atom_matcher() = CreateMoveToForegroundAtomMatcher();
-
-    auto atomMatcher = CreateSimpleAtomMatcher("", util::APP_START_OCCURRED);
-    *config.add_atom_matcher() = atomMatcher;
-
-    auto isInBackgroundPredicate = CreateIsInBackgroundPredicate();
-    *isInBackgroundPredicate.mutable_simple_predicate()->mutable_dimensions() =
-        CreateDimensions(util::ACTIVITY_FOREGROUND_STATE_CHANGED, {1 /* uid field */ });
-    *config.add_predicate() = isInBackgroundPredicate;
-
-    auto gaugeMetric = config.add_gauge_metric();
-    gaugeMetric->set_id(123456);
-    gaugeMetric->set_what(atomMatcher.id());
-    gaugeMetric->set_condition(isInBackgroundPredicate.id());
-    gaugeMetric->mutable_gauge_fields_filter()->set_include_all(false);
-    gaugeMetric->set_sampling_type(sampling_type);
-    auto fieldMatcher = gaugeMetric->mutable_gauge_fields_filter()->mutable_fields();
-    fieldMatcher->set_field(util::APP_START_OCCURRED);
-    fieldMatcher->add_child()->set_field(3);  // type (enum)
-    fieldMatcher->add_child()->set_field(4);  // activity_name(str)
-    fieldMatcher->add_child()->set_field(7);  // activity_start_msec(int64)
-    *gaugeMetric->mutable_dimensions_in_what() =
-        CreateDimensions(util::APP_START_OCCURRED, {1 /* uid field */ });
-    gaugeMetric->set_bucket(FIVE_MINUTES);
-
-    auto links = gaugeMetric->add_links();
-    links->set_condition(isInBackgroundPredicate.id());
-    auto dimensionWhat = links->mutable_fields_in_what();
-    dimensionWhat->set_field(util::APP_START_OCCURRED);
-    dimensionWhat->add_child()->set_field(1);  // uid field.
-    auto dimensionCondition = links->mutable_fields_in_condition();
-    dimensionCondition->set_field(util::ACTIVITY_FOREGROUND_STATE_CHANGED);
-    dimensionCondition->add_child()->set_field(1);  // uid field.
-    return config;
-}
-
-std::unique_ptr<LogEvent> CreateAppStartOccurredEvent(
-        uint64_t timestampNs, const int uid, const string& pkg_name,
-        AppStartOccurred::TransitionType type, const string& activity_name,
-        const string& calling_pkg_name, const bool is_instant_app, int64_t activity_start_msec) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::APP_START_OCCURRED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_writeString(statsEvent, pkg_name.c_str());
-    AStatsEvent_writeInt32(statsEvent, type);
-    AStatsEvent_writeString(statsEvent, activity_name.c_str());
-    AStatsEvent_writeString(statsEvent, calling_pkg_name.c_str());
-    AStatsEvent_writeInt32(statsEvent, is_instant_app);
-    AStatsEvent_writeInt32(statsEvent, activity_start_msec);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-}  // namespace
-
-TEST(GaugeMetricE2eTest, TestMultipleFieldsForPushedEvent) {
-    for (const auto& sampling_type :
-         {GaugeMetric::FIRST_N_SAMPLES, GaugeMetric::RANDOM_ONE_SAMPLE}) {
-        auto config = CreateStatsdConfigForPushedEvent(sampling_type);
-        int64_t bucketStartTimeNs = 10000000000;
-        int64_t bucketSizeNs =
-                TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000;
-
-        ConfigKey cfgKey;
-        auto processor =
-                CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-        ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-        EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-
-        int appUid1 = 123;
-        int appUid2 = 456;
-        std::vector<std::unique_ptr<LogEvent>> events;
-        events.push_back(CreateMoveToBackgroundEvent(bucketStartTimeNs + 15, appUid1));
-        events.push_back(
-                CreateMoveToForegroundEvent(bucketStartTimeNs + bucketSizeNs + 250, appUid1));
-        events.push_back(
-                CreateMoveToBackgroundEvent(bucketStartTimeNs + bucketSizeNs + 350, appUid1));
-        events.push_back(
-                CreateMoveToForegroundEvent(bucketStartTimeNs + 2 * bucketSizeNs + 100, appUid1));
-
-        events.push_back(CreateAppStartOccurredEvent(
-                bucketStartTimeNs + 10, appUid1, "app1", AppStartOccurred::WARM, "activity_name1",
-                "calling_pkg_name1", true /*is_instant_app*/, 101 /*activity_start_msec*/));
-        events.push_back(CreateAppStartOccurredEvent(
-                bucketStartTimeNs + 20, appUid1, "app1", AppStartOccurred::HOT, "activity_name2",
-                "calling_pkg_name2", true /*is_instant_app*/, 102 /*activity_start_msec*/));
-        events.push_back(CreateAppStartOccurredEvent(
-                bucketStartTimeNs + 30, appUid1, "app1", AppStartOccurred::COLD, "activity_name3",
-                "calling_pkg_name3", true /*is_instant_app*/, 103 /*activity_start_msec*/));
-        events.push_back(CreateAppStartOccurredEvent(
-                bucketStartTimeNs + bucketSizeNs + 30, appUid1, "app1", AppStartOccurred::WARM,
-                "activity_name4", "calling_pkg_name4", true /*is_instant_app*/,
-                104 /*activity_start_msec*/));
-        events.push_back(CreateAppStartOccurredEvent(
-                bucketStartTimeNs + 2 * bucketSizeNs, appUid1, "app1", AppStartOccurred::COLD,
-                "activity_name5", "calling_pkg_name5", true /*is_instant_app*/,
-                105 /*activity_start_msec*/));
-        events.push_back(CreateAppStartOccurredEvent(
-                bucketStartTimeNs + 2 * bucketSizeNs + 10, appUid1, "app1", AppStartOccurred::HOT,
-                "activity_name6", "calling_pkg_name6", false /*is_instant_app*/,
-                106 /*activity_start_msec*/));
-
-        events.push_back(
-                CreateMoveToBackgroundEvent(bucketStartTimeNs + bucketSizeNs + 10, appUid2));
-        events.push_back(CreateAppStartOccurredEvent(
-                bucketStartTimeNs + 2 * bucketSizeNs + 10, appUid2, "app2", AppStartOccurred::COLD,
-                "activity_name7", "calling_pkg_name7", true /*is_instant_app*/,
-                201 /*activity_start_msec*/));
-
-        sortLogEventsByTimestamp(&events);
-
-        for (const auto& event : events) {
-            processor->OnLogEvent(event.get());
-        }
-        ConfigMetricsReportList reports;
-        vector<uint8_t> buffer;
-        processor->onDumpReport(cfgKey, bucketStartTimeNs + 3 * bucketSizeNs, false, true, ADB_DUMP,
-                                FAST, &buffer);
-        EXPECT_TRUE(buffer.size() > 0);
-        EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-        backfillDimensionPath(&reports);
-        backfillStringInReport(&reports);
-        backfillStartEndTimestamp(&reports);
-        ASSERT_EQ(1, reports.reports_size());
-        ASSERT_EQ(1, reports.reports(0).metrics_size());
-        StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
-        sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).gauge_metrics(),
-                                        &gaugeMetrics);
-        ASSERT_EQ(2, gaugeMetrics.data_size());
-
-        auto data = gaugeMetrics.data(0);
-        EXPECT_EQ(util::APP_START_OCCURRED, data.dimensions_in_what().field());
-        ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-        EXPECT_EQ(1 /* uid field */,
-                  data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-        EXPECT_EQ(appUid1, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-        ASSERT_EQ(3, data.bucket_info_size());
-        if (sampling_type == GaugeMetric::FIRST_N_SAMPLES) {
-            ASSERT_EQ(2, data.bucket_info(0).atom_size());
-            ASSERT_EQ(2, data.bucket_info(0).elapsed_timestamp_nanos_size());
-            ASSERT_EQ(0, data.bucket_info(0).wall_clock_timestamp_nanos_size());
-            EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-            EXPECT_EQ(bucketStartTimeNs + bucketSizeNs,
-                      data.bucket_info(0).end_bucket_elapsed_nanos());
-            EXPECT_EQ(AppStartOccurred::HOT,
-                      data.bucket_info(0).atom(0).app_start_occurred().type());
-            EXPECT_EQ("activity_name2",
-                      data.bucket_info(0).atom(0).app_start_occurred().activity_name());
-            EXPECT_EQ(102L,
-                      data.bucket_info(0).atom(0).app_start_occurred().activity_start_millis());
-            EXPECT_EQ(AppStartOccurred::COLD,
-                      data.bucket_info(0).atom(1).app_start_occurred().type());
-            EXPECT_EQ("activity_name3",
-                      data.bucket_info(0).atom(1).app_start_occurred().activity_name());
-            EXPECT_EQ(103L,
-                      data.bucket_info(0).atom(1).app_start_occurred().activity_start_millis());
-
-            ASSERT_EQ(1, data.bucket_info(1).atom_size());
-            ASSERT_EQ(1, data.bucket_info(1).elapsed_timestamp_nanos_size());
-            EXPECT_EQ(bucketStartTimeNs + bucketSizeNs,
-                      data.bucket_info(1).start_bucket_elapsed_nanos());
-            EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-                      data.bucket_info(1).end_bucket_elapsed_nanos());
-            EXPECT_EQ(AppStartOccurred::WARM,
-                      data.bucket_info(1).atom(0).app_start_occurred().type());
-            EXPECT_EQ("activity_name4",
-                      data.bucket_info(1).atom(0).app_start_occurred().activity_name());
-            EXPECT_EQ(104L,
-                      data.bucket_info(1).atom(0).app_start_occurred().activity_start_millis());
-
-            ASSERT_EQ(2, data.bucket_info(2).atom_size());
-            ASSERT_EQ(2, data.bucket_info(2).elapsed_timestamp_nanos_size());
-            EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-                      data.bucket_info(2).start_bucket_elapsed_nanos());
-            EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs,
-                      data.bucket_info(2).end_bucket_elapsed_nanos());
-            EXPECT_EQ(AppStartOccurred::COLD,
-                      data.bucket_info(2).atom(0).app_start_occurred().type());
-            EXPECT_EQ("activity_name5",
-                      data.bucket_info(2).atom(0).app_start_occurred().activity_name());
-            EXPECT_EQ(105L,
-                      data.bucket_info(2).atom(0).app_start_occurred().activity_start_millis());
-            EXPECT_EQ(AppStartOccurred::HOT,
-                      data.bucket_info(2).atom(1).app_start_occurred().type());
-            EXPECT_EQ("activity_name6",
-                      data.bucket_info(2).atom(1).app_start_occurred().activity_name());
-            EXPECT_EQ(106L,
-                      data.bucket_info(2).atom(1).app_start_occurred().activity_start_millis());
-        } else {
-            ASSERT_EQ(1, data.bucket_info(0).atom_size());
-            ASSERT_EQ(1, data.bucket_info(0).elapsed_timestamp_nanos_size());
-            EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-            EXPECT_EQ(bucketStartTimeNs + bucketSizeNs,
-                      data.bucket_info(0).end_bucket_elapsed_nanos());
-            EXPECT_EQ(AppStartOccurred::HOT,
-                      data.bucket_info(0).atom(0).app_start_occurred().type());
-            EXPECT_EQ("activity_name2",
-                      data.bucket_info(0).atom(0).app_start_occurred().activity_name());
-            EXPECT_EQ(102L,
-                      data.bucket_info(0).atom(0).app_start_occurred().activity_start_millis());
-
-            ASSERT_EQ(1, data.bucket_info(1).atom_size());
-            ASSERT_EQ(1, data.bucket_info(1).elapsed_timestamp_nanos_size());
-            EXPECT_EQ(bucketStartTimeNs + bucketSizeNs,
-                      data.bucket_info(1).start_bucket_elapsed_nanos());
-            EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-                      data.bucket_info(1).end_bucket_elapsed_nanos());
-            EXPECT_EQ(AppStartOccurred::WARM,
-                      data.bucket_info(1).atom(0).app_start_occurred().type());
-            EXPECT_EQ("activity_name4",
-                      data.bucket_info(1).atom(0).app_start_occurred().activity_name());
-            EXPECT_EQ(104L,
-                      data.bucket_info(1).atom(0).app_start_occurred().activity_start_millis());
-
-            ASSERT_EQ(1, data.bucket_info(2).atom_size());
-            ASSERT_EQ(1, data.bucket_info(2).elapsed_timestamp_nanos_size());
-            EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-                      data.bucket_info(2).start_bucket_elapsed_nanos());
-            EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs,
-                      data.bucket_info(2).end_bucket_elapsed_nanos());
-            EXPECT_EQ(AppStartOccurred::COLD,
-                      data.bucket_info(2).atom(0).app_start_occurred().type());
-            EXPECT_EQ("activity_name5",
-                      data.bucket_info(2).atom(0).app_start_occurred().activity_name());
-            EXPECT_EQ(105L,
-                      data.bucket_info(2).atom(0).app_start_occurred().activity_start_millis());
-        }
-
-        data = gaugeMetrics.data(1);
-
-        EXPECT_EQ(data.dimensions_in_what().field(), util::APP_START_OCCURRED);
-        ASSERT_EQ(data.dimensions_in_what().value_tuple().dimensions_value_size(), 1);
-        EXPECT_EQ(1 /* uid field */,
-                  data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-        EXPECT_EQ(appUid2, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-        ASSERT_EQ(1, data.bucket_info_size());
-        ASSERT_EQ(1, data.bucket_info(0).atom_size());
-        ASSERT_EQ(1, data.bucket_info(0).elapsed_timestamp_nanos_size());
-        EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-                  data.bucket_info(0).start_bucket_elapsed_nanos());
-        EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs,
-                  data.bucket_info(0).end_bucket_elapsed_nanos());
-        EXPECT_EQ(AppStartOccurred::COLD, data.bucket_info(0).atom(0).app_start_occurred().type());
-        EXPECT_EQ("activity_name7",
-                  data.bucket_info(0).atom(0).app_start_occurred().activity_name());
-        EXPECT_EQ(201L, data.bucket_info(0).atom(0).app_start_occurred().activity_start_millis());
-    }
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/MetricActivation_e2e_test.cpp b/cmds/statsd/tests/e2e/MetricActivation_e2e_test.cpp
deleted file mode 100644
index e320419..0000000
--- a/cmds/statsd/tests/e2e/MetricActivation_e2e_test.cpp
+++ /dev/null
@@ -1,1833 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 <gtest/gtest.h>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-StatsdConfig CreateStatsdConfig() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    auto saverModeMatcher = CreateBatterySaverModeStartAtomMatcher();
-    auto crashMatcher = CreateProcessCrashAtomMatcher();
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-
-    *config.add_atom_matcher() = saverModeMatcher;
-    *config.add_atom_matcher() = crashMatcher;
-    *config.add_atom_matcher() = screenOnMatcher;
-
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(crashMatcher.id());
-    countMetric->set_bucket(FIVE_MINUTES);
-    countMetric->mutable_dimensions_in_what()->set_field(
-        util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    countMetric->mutable_dimensions_in_what()->add_child()->set_field(1);  // uid field
-
-    auto metric_activation1 = config.add_metric_activation();
-    metric_activation1->set_metric_id(metricId);
-    auto event_activation1 = metric_activation1->add_event_activation();
-    event_activation1->set_atom_matcher_id(saverModeMatcher.id());
-    event_activation1->set_ttl_seconds(60 * 6);  // 6 minutes
-    auto event_activation2 = metric_activation1->add_event_activation();
-    event_activation2->set_atom_matcher_id(screenOnMatcher.id());
-    event_activation2->set_ttl_seconds(60 * 2);  // 2 minutes
-
-    return config;
-}
-
-StatsdConfig CreateStatsdConfigWithOneDeactivation() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    auto saverModeMatcher = CreateBatterySaverModeStartAtomMatcher();
-    auto crashMatcher = CreateProcessCrashAtomMatcher();
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    auto brightnessChangedMatcher = CreateScreenBrightnessChangedAtomMatcher();
-
-    *config.add_atom_matcher() = saverModeMatcher;
-    *config.add_atom_matcher() = crashMatcher;
-    *config.add_atom_matcher() = screenOnMatcher;
-    *config.add_atom_matcher() = brightnessChangedMatcher;
-
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(crashMatcher.id());
-    countMetric->set_bucket(FIVE_MINUTES);
-    countMetric->mutable_dimensions_in_what()->set_field(
-        util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    countMetric->mutable_dimensions_in_what()->add_child()->set_field(1);  // uid field
-
-    auto metric_activation1 = config.add_metric_activation();
-    metric_activation1->set_metric_id(metricId);
-    auto event_activation1 = metric_activation1->add_event_activation();
-    event_activation1->set_atom_matcher_id(saverModeMatcher.id());
-    event_activation1->set_ttl_seconds(60 * 6);  // 6 minutes
-    event_activation1->set_deactivation_atom_matcher_id(brightnessChangedMatcher.id());
-    auto event_activation2 = metric_activation1->add_event_activation();
-    event_activation2->set_atom_matcher_id(screenOnMatcher.id());
-    event_activation2->set_ttl_seconds(60 * 2);  // 2 minutes
-
-    return config;
-}
-
-StatsdConfig CreateStatsdConfigWithTwoDeactivations() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    auto saverModeMatcher = CreateBatterySaverModeStartAtomMatcher();
-    auto crashMatcher = CreateProcessCrashAtomMatcher();
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    auto brightnessChangedMatcher = CreateScreenBrightnessChangedAtomMatcher();
-    auto brightnessChangedMatcher2 = CreateScreenBrightnessChangedAtomMatcher();
-    brightnessChangedMatcher2.set_id(StringToId("ScreenBrightnessChanged2"));
-
-    *config.add_atom_matcher() = saverModeMatcher;
-    *config.add_atom_matcher() = crashMatcher;
-    *config.add_atom_matcher() = screenOnMatcher;
-    *config.add_atom_matcher() = brightnessChangedMatcher;
-    *config.add_atom_matcher() = brightnessChangedMatcher2;
-
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(crashMatcher.id());
-    countMetric->set_bucket(FIVE_MINUTES);
-    countMetric->mutable_dimensions_in_what()->set_field(
-        util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    countMetric->mutable_dimensions_in_what()->add_child()->set_field(1);  // uid field
-
-    auto metric_activation1 = config.add_metric_activation();
-    metric_activation1->set_metric_id(metricId);
-    auto event_activation1 = metric_activation1->add_event_activation();
-    event_activation1->set_atom_matcher_id(saverModeMatcher.id());
-    event_activation1->set_ttl_seconds(60 * 6);  // 6 minutes
-    event_activation1->set_deactivation_atom_matcher_id(brightnessChangedMatcher.id());
-    auto event_activation2 = metric_activation1->add_event_activation();
-    event_activation2->set_atom_matcher_id(screenOnMatcher.id());
-    event_activation2->set_ttl_seconds(60 * 2);  // 2 minutes
-    event_activation2->set_deactivation_atom_matcher_id(brightnessChangedMatcher2.id());
-
-    return config;
-}
-
-StatsdConfig CreateStatsdConfigWithSameDeactivations() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    auto saverModeMatcher = CreateBatterySaverModeStartAtomMatcher();
-    auto crashMatcher = CreateProcessCrashAtomMatcher();
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    auto brightnessChangedMatcher = CreateScreenBrightnessChangedAtomMatcher();
-
-    *config.add_atom_matcher() = saverModeMatcher;
-    *config.add_atom_matcher() = crashMatcher;
-    *config.add_atom_matcher() = screenOnMatcher;
-    *config.add_atom_matcher() = brightnessChangedMatcher;
-
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(crashMatcher.id());
-    countMetric->set_bucket(FIVE_MINUTES);
-    countMetric->mutable_dimensions_in_what()->set_field(
-        util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    countMetric->mutable_dimensions_in_what()->add_child()->set_field(1);  // uid field
-
-    auto metric_activation1 = config.add_metric_activation();
-    metric_activation1->set_metric_id(metricId);
-    auto event_activation1 = metric_activation1->add_event_activation();
-    event_activation1->set_atom_matcher_id(saverModeMatcher.id());
-    event_activation1->set_ttl_seconds(60 * 6);  // 6 minutes
-    event_activation1->set_deactivation_atom_matcher_id(brightnessChangedMatcher.id());
-    auto event_activation2 = metric_activation1->add_event_activation();
-    event_activation2->set_atom_matcher_id(screenOnMatcher.id());
-    event_activation2->set_ttl_seconds(60 * 2);  // 2 minutes
-    event_activation2->set_deactivation_atom_matcher_id(brightnessChangedMatcher.id());
-
-    return config;
-}
-
-StatsdConfig CreateStatsdConfigWithTwoMetricsTwoDeactivations() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    auto saverModeMatcher = CreateBatterySaverModeStartAtomMatcher();
-    auto crashMatcher = CreateProcessCrashAtomMatcher();
-    auto foregroundMatcher = CreateMoveToForegroundAtomMatcher();
-    auto screenOnMatcher = CreateScreenTurnedOnAtomMatcher();
-    auto brightnessChangedMatcher = CreateScreenBrightnessChangedAtomMatcher();
-    auto brightnessChangedMatcher2 = CreateScreenBrightnessChangedAtomMatcher();
-    brightnessChangedMatcher2.set_id(StringToId("ScreenBrightnessChanged2"));
-
-    *config.add_atom_matcher() = saverModeMatcher;
-    *config.add_atom_matcher() = crashMatcher;
-    *config.add_atom_matcher() = screenOnMatcher;
-    *config.add_atom_matcher() = brightnessChangedMatcher;
-    *config.add_atom_matcher() = brightnessChangedMatcher2;
-    *config.add_atom_matcher() = foregroundMatcher;
-
-    int64_t metricId = 123456;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(metricId);
-    countMetric->set_what(crashMatcher.id());
-    countMetric->set_bucket(FIVE_MINUTES);
-    countMetric->mutable_dimensions_in_what()->set_field(
-        util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    countMetric->mutable_dimensions_in_what()->add_child()->set_field(1);  // uid field
-
-    int64_t metricId2 = 234567;
-    countMetric = config.add_count_metric();
-    countMetric->set_id(metricId2);
-    countMetric->set_what(foregroundMatcher.id());
-    countMetric->set_bucket(FIVE_MINUTES);
-    countMetric->mutable_dimensions_in_what()->set_field(
-        util::ACTIVITY_FOREGROUND_STATE_CHANGED);
-    countMetric->mutable_dimensions_in_what()->add_child()->set_field(1);  // uid field
-
-    auto metric_activation1 = config.add_metric_activation();
-    metric_activation1->set_metric_id(metricId);
-    auto event_activation1 = metric_activation1->add_event_activation();
-    event_activation1->set_atom_matcher_id(saverModeMatcher.id());
-    event_activation1->set_ttl_seconds(60 * 6);  // 6 minutes
-    event_activation1->set_deactivation_atom_matcher_id(brightnessChangedMatcher.id());
-    auto event_activation2 = metric_activation1->add_event_activation();
-    event_activation2->set_atom_matcher_id(screenOnMatcher.id());
-    event_activation2->set_ttl_seconds(60 * 2);  // 2 minutes
-    event_activation2->set_deactivation_atom_matcher_id(brightnessChangedMatcher2.id());
-
-    metric_activation1 = config.add_metric_activation();
-    metric_activation1->set_metric_id(metricId2);
-    event_activation1 = metric_activation1->add_event_activation();
-    event_activation1->set_atom_matcher_id(saverModeMatcher.id());
-    event_activation1->set_ttl_seconds(60 * 6);  // 6 minutes
-    event_activation1->set_deactivation_atom_matcher_id(brightnessChangedMatcher.id());
-    event_activation2 = metric_activation1->add_event_activation();
-    event_activation2->set_atom_matcher_id(screenOnMatcher.id());
-    event_activation2->set_ttl_seconds(60 * 2);  // 2 minutes
-    event_activation2->set_deactivation_atom_matcher_id(brightnessChangedMatcher2.id());
-
-    return config;
-}
-
-}  // namespace
-
-TEST(MetricActivationE2eTest, TestCountMetric) {
-    auto config = CreateStatsdConfig();
-
-    int64_t bucketStartTimeNs = NS_PER_SEC * 10;  // 10 secs
-    int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000LL * 1000LL;
-
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    vector<int64_t> activeConfigsBroadcast;
-
-    long timeBase1 = 1;
-    int broadcastCount = 0;
-    StatsLogProcessor processor(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, bucketStartTimeNs,
-            [](const ConfigKey& key) { return true; },
-            [&uid, &broadcastCount, &activeConfigsBroadcast](const int& broadcastUid,
-                                                             const vector<int64_t>& activeConfigs) {
-                broadcastCount++;
-                EXPECT_EQ(broadcastUid, uid);
-                activeConfigsBroadcast.clear();
-                activeConfigsBroadcast.insert(activeConfigsBroadcast.end(), activeConfigs.begin(),
-                                              activeConfigs.end());
-                return true;
-            });
-
-    processor.OnConfigUpdated(bucketStartTimeNs, cfgKey, config);
-
-    ASSERT_EQ(processor.mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor.mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // Two activations: one is triggered by battery saver mode (tracker index 0), the other is
-    // triggered by screen on event (tracker index 2).
-    ASSERT_EQ(eventActivationMap.size(), 2u);
-    EXPECT_TRUE(eventActivationMap.find(0) != eventActivationMap.end());
-    EXPECT_TRUE(eventActivationMap.find(2) != eventActivationMap.end());
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-
-    std::unique_ptr<LogEvent> event;
-
-    event = CreateAppCrashEvent(bucketStartTimeNs + 5, 111);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 5);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 0);
-
-    // Activated by battery save mode.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + 10);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 1);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-
-    // First processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + 15, 222);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 15);
-
-    // Activated by screen on event.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + 20, android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 20);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-
-    // 2nd processed event.
-    // The activation by screen_on event expires, but the one by battery save mode is still active.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25, 333);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    // No new broadcast since the config should still be active.
-    EXPECT_EQ(broadcastCount, 1);
-
-    // 3rd processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25, 444);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25);
-
-    // All activations expired.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 8, 555);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 8);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // New broadcast since the config is no longer active.
-    EXPECT_EQ(broadcastCount, 2);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-
-    // Re-activate metric via screen on.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10,
-                                          android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-
-    // 4th processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1, 666);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor.onDumpReport(cfgKey, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 1, false, true,
-                           ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(4, countMetrics.data_size());
-
-    auto data = countMetrics.data(0);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(222, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(1);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(333, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(2);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(444, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    // Partial bucket as metric is deactivated.
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 8,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(3);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(666, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-TEST(MetricActivationE2eTest, TestCountMetricWithOneDeactivation) {
-    auto config = CreateStatsdConfigWithOneDeactivation();
-
-    int64_t bucketStartTimeNs = NS_PER_SEC * 10;  // 10 secs
-    int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000LL * 1000LL;
-
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    vector<int64_t> activeConfigsBroadcast;
-
-    long timeBase1 = 1;
-    int broadcastCount = 0;
-    StatsLogProcessor processor(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, bucketStartTimeNs,
-            [](const ConfigKey& key) { return true; },
-            [&uid, &broadcastCount, &activeConfigsBroadcast](const int& broadcastUid,
-                                                             const vector<int64_t>& activeConfigs) {
-                broadcastCount++;
-                EXPECT_EQ(broadcastUid, uid);
-                activeConfigsBroadcast.clear();
-                activeConfigsBroadcast.insert(activeConfigsBroadcast.end(), activeConfigs.begin(),
-                                              activeConfigs.end());
-                return true;
-            });
-
-    processor.OnConfigUpdated(bucketStartTimeNs, cfgKey, config);
-
-    ASSERT_EQ(processor.mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor.mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-    auto& eventDeactivationMap = metricProducer->mEventDeactivationMap;
-
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // Two activations: one is triggered by battery saver mode (tracker index 0), the other is
-    // triggered by screen on event (tracker index 2).
-    ASSERT_EQ(eventActivationMap.size(), 2u);
-    EXPECT_TRUE(eventActivationMap.find(0) != eventActivationMap.end());
-    EXPECT_TRUE(eventActivationMap.find(2) != eventActivationMap.end());
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    ASSERT_EQ(eventDeactivationMap.size(), 1u);
-    EXPECT_TRUE(eventDeactivationMap.find(3) != eventDeactivationMap.end());
-    ASSERT_EQ(eventDeactivationMap[3].size(), 1u);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    std::unique_ptr<LogEvent> event;
-
-    event = CreateAppCrashEvent(bucketStartTimeNs + 5, 111);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 5);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 0);
-
-    // Activated by battery save mode.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + 10);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 1);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    // First processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + 15, 222);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 15);
-
-    // Activated by screen on event.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + 20, android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 20);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    // 2nd processed event.
-    // The activation by screen_on event expires, but the one by battery save mode is still active.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25, 333);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    // No new broadcast since the config should still be active.
-    EXPECT_EQ(broadcastCount, 1);
-
-    // 3rd processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25, 444);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25);
-
-    // All activations expired.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 8, 555);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 8);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // New broadcast since the config is no longer active.
-    EXPECT_EQ(broadcastCount, 2);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    // Re-activate metric via screen on.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10,
-                                          android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    // 4th processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1, 666);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1);
-
-    // Re-enable battery saver mode activation.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    // 5th processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 40, 777);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 40);
-
-    // Cancel battery saver mode activation.
-    event = CreateScreenBrightnessChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 60, 64);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 60);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    // Screen-on activation expired.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 13, 888);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 13);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // New broadcast since the config is no longer active.
-    EXPECT_EQ(broadcastCount, 4);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 14 + 1, 999);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 14 + 1);
-
-    // Re-enable battery saver mode activation.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 5);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    // Cancel battery saver mode activation.
-    event = CreateScreenBrightnessChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 16, 140);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 16);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 6);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor.onDumpReport(cfgKey, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 1, false, true,
-                           ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(5, countMetrics.data_size());
-
-    auto data = countMetrics.data(0);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(222, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(1);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(333, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(2);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(444, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    // Partial bucket as metric is deactivated.
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 8,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(3);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(666, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 13,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(4);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(777, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 13,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-TEST(MetricActivationE2eTest, TestCountMetricWithTwoDeactivations) {
-    auto config = CreateStatsdConfigWithTwoDeactivations();
-
-    int64_t bucketStartTimeNs = NS_PER_SEC * 10;  // 10 secs
-    int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000LL * 1000LL;
-
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    vector<int64_t> activeConfigsBroadcast;
-
-    long timeBase1 = 1;
-    int broadcastCount = 0;
-    StatsLogProcessor processor(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, bucketStartTimeNs,
-            [](const ConfigKey& key) { return true; },
-            [&uid, &broadcastCount, &activeConfigsBroadcast](const int& broadcastUid,
-                                                             const vector<int64_t>& activeConfigs) {
-                broadcastCount++;
-                EXPECT_EQ(broadcastUid, uid);
-                activeConfigsBroadcast.clear();
-                activeConfigsBroadcast.insert(activeConfigsBroadcast.end(), activeConfigs.begin(),
-                                              activeConfigs.end());
-                return true;
-            });
-
-    processor.OnConfigUpdated(bucketStartTimeNs, cfgKey, config);
-
-    ASSERT_EQ(processor.mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor.mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-    auto& eventDeactivationMap = metricProducer->mEventDeactivationMap;
-
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // Two activations: one is triggered by battery saver mode (tracker index 0), the other is
-    // triggered by screen on event (tracker index 2).
-    ASSERT_EQ(eventActivationMap.size(), 2u);
-    EXPECT_TRUE(eventActivationMap.find(0) != eventActivationMap.end());
-    EXPECT_TRUE(eventActivationMap.find(2) != eventActivationMap.end());
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    ASSERT_EQ(eventDeactivationMap.size(), 2u);
-    EXPECT_TRUE(eventDeactivationMap.find(3) != eventDeactivationMap.end());
-    EXPECT_TRUE(eventDeactivationMap.find(4) != eventDeactivationMap.end());
-    ASSERT_EQ(eventDeactivationMap[3].size(), 1u);
-    ASSERT_EQ(eventDeactivationMap[4].size(), 1u);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    std::unique_ptr<LogEvent> event;
-
-    event = CreateAppCrashEvent(bucketStartTimeNs + 5, 111);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 5);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 0);
-
-    // Activated by battery save mode.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + 10);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 1);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    // First processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + 15, 222);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 15);
-
-    // Activated by screen on event.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + 20, android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 20);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    // 2nd processed event.
-    // The activation by screen_on event expires, but the one by battery save mode is still active.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25, 333);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    // No new broadcast since the config should still be active.
-    EXPECT_EQ(broadcastCount, 1);
-
-    // 3rd processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25, 444);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25);
-
-    // All activations expired.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 8, 555);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 8);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // New broadcast since the config is no longer active.
-    EXPECT_EQ(broadcastCount, 2);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    // Re-activate metric via screen on.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10,
-                                          android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    // 4th processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1, 666);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1);
-
-    // Re-enable battery saver mode activation.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    // 5th processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 40, 777);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 40);
-
-    // Cancel battery saver mode and screen on activation.
-    event = CreateScreenBrightnessChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 60, 64);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 60);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // New broadcast since the config is no longer active.
-    EXPECT_EQ(broadcastCount, 4);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    // Screen-on activation expired.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 13, 888);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 13);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 4);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 14 + 1, 999);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 14 + 1);
-
-    // Re-enable battery saver mode activation.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 5);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    // Cancel battery saver mode and screen on activation.
-    event = CreateScreenBrightnessChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 16, 140);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 16);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 6);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor.onDumpReport(cfgKey, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 1, false, true,
-                           ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(5, countMetrics.data_size());
-
-    auto data = countMetrics.data(0);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(222, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(1);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(333, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(2);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(444, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    // Partial bucket as metric is deactivated.
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 8,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(3);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(666, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 11,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(4);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(777, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 11,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-TEST(MetricActivationE2eTest, TestCountMetricWithSameDeactivation) {
-    auto config = CreateStatsdConfigWithSameDeactivations();
-
-    int64_t bucketStartTimeNs = NS_PER_SEC * 10;  // 10 secs
-    int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000LL * 1000LL;
-
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    vector<int64_t> activeConfigsBroadcast;
-
-    long timeBase1 = 1;
-    int broadcastCount = 0;
-    StatsLogProcessor processor(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, bucketStartTimeNs,
-            [](const ConfigKey& key) { return true; },
-            [&uid, &broadcastCount, &activeConfigsBroadcast](const int& broadcastUid,
-                                                             const vector<int64_t>& activeConfigs) {
-                broadcastCount++;
-                EXPECT_EQ(broadcastUid, uid);
-                activeConfigsBroadcast.clear();
-                activeConfigsBroadcast.insert(activeConfigsBroadcast.end(), activeConfigs.begin(),
-                                              activeConfigs.end());
-                return true;
-            });
-
-    processor.OnConfigUpdated(bucketStartTimeNs, cfgKey, config);
-
-    ASSERT_EQ(processor.mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor.mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 1);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-    auto& eventDeactivationMap = metricProducer->mEventDeactivationMap;
-
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // Two activations: one is triggered by battery saver mode (tracker index 0), the other is
-    // triggered by screen on event (tracker index 2).
-    ASSERT_EQ(eventActivationMap.size(), 2u);
-    EXPECT_TRUE(eventActivationMap.find(0) != eventActivationMap.end());
-    EXPECT_TRUE(eventActivationMap.find(2) != eventActivationMap.end());
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    ASSERT_EQ(eventDeactivationMap.size(), 1u);
-    EXPECT_TRUE(eventDeactivationMap.find(3) != eventDeactivationMap.end());
-    ASSERT_EQ(eventDeactivationMap[3].size(), 2u);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[3][1], eventActivationMap[2]);
-    EXPECT_EQ(broadcastCount, 0);
-
-    std::unique_ptr<LogEvent> event;
-
-    // Event that should be ignored.
-    event = CreateAppCrashEvent(bucketStartTimeNs + 1, 111);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 1);
-
-    // Activate metric via screen on for 2 minutes.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + 10, android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 1);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 10);
-
-    // 1st processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + 15, 222);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 15);
-
-    // Enable battery saver mode activation for 5 minutes.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + NS_PER_SEC * 60 + 10);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 1);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 + 10);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 10);
-
-    // 2nd processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 + 40, 333);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 + 40);
-
-    // Cancel battery saver mode and screen on activation.
-    int64_t firstDeactivation = bucketStartTimeNs + NS_PER_SEC * 61;
-    event = CreateScreenBrightnessChangedEvent(firstDeactivation, 64);
-    processor.OnLogEvent(event.get(), firstDeactivation);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    // New broadcast since the config is no longer active.
-    EXPECT_EQ(broadcastCount, 2);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-
-    // Should be ignored
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 61 + 80, 444);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 61 + 80);
-
-    // Re-enable battery saver mode activation.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 15);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 15);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 15);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-
-    // 3rd processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 80, 555);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 80);
-
-    // Cancel battery saver mode activation.
-    int64_t secondDeactivation = bucketStartTimeNs + NS_PER_SEC * 60 * 13;
-    event = CreateScreenBrightnessChangedEvent(secondDeactivation, 140);
-    processor.OnLogEvent(event.get(), secondDeactivation);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(broadcastCount, 4);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-
-    // Should be ignored.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 13 + 80, 666);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 13 + 80);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor.onDumpReport(cfgKey, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 1, false, true,
-                           ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(3, countMetrics.data_size());
-
-    auto data = countMetrics.data(0);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(222, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(firstDeactivation, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(1);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(333, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(firstDeactivation, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(2);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(555, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    // Partial bucket as metric is deactivated.
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(secondDeactivation, data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-TEST(MetricActivationE2eTest, TestCountMetricWithTwoMetricsTwoDeactivations) {
-    auto config = CreateStatsdConfigWithTwoMetricsTwoDeactivations();
-
-    int64_t bucketStartTimeNs = NS_PER_SEC * 10;  // 10 secs
-    int64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000LL * 1000LL;
-
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    sp<UidMap> m = new UidMap();
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    sp<AlarmMonitor> anomalyAlarmMonitor;
-    sp<AlarmMonitor> subscriberAlarmMonitor;
-    vector<int64_t> activeConfigsBroadcast;
-
-    long timeBase1 = 1;
-    int broadcastCount = 0;
-    StatsLogProcessor processor(
-            m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, bucketStartTimeNs,
-            [](const ConfigKey& key) { return true; },
-            [&uid, &broadcastCount, &activeConfigsBroadcast](const int& broadcastUid,
-                                                             const vector<int64_t>& activeConfigs) {
-                broadcastCount++;
-                EXPECT_EQ(broadcastUid, uid);
-                activeConfigsBroadcast.clear();
-                activeConfigsBroadcast.insert(activeConfigsBroadcast.end(), activeConfigs.begin(),
-                                              activeConfigs.end());
-                return true;
-            });
-
-    processor.OnConfigUpdated(bucketStartTimeNs, cfgKey, config);
-
-    ASSERT_EQ(processor.mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor.mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(metricsManager->mAllMetricProducers.size(), 2);
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    auto& eventActivationMap = metricProducer->mEventActivationMap;
-    auto& eventDeactivationMap = metricProducer->mEventDeactivationMap;
-    sp<MetricProducer> metricProducer2 = metricsManager->mAllMetricProducers[1];
-    auto& eventActivationMap2 = metricProducer2->mEventActivationMap;
-    auto& eventDeactivationMap2 = metricProducer2->mEventDeactivationMap;
-
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_FALSE(metricProducer2->mIsActive);
-    // Two activations: one is triggered by battery saver mode (tracker index 0), the other is
-    // triggered by screen on event (tracker index 2).
-    ASSERT_EQ(eventActivationMap.size(), 2u);
-    EXPECT_TRUE(eventActivationMap.find(0) != eventActivationMap.end());
-    EXPECT_TRUE(eventActivationMap.find(2) != eventActivationMap.end());
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    ASSERT_EQ(eventDeactivationMap.size(), 2u);
-    EXPECT_TRUE(eventDeactivationMap.find(3) != eventDeactivationMap.end());
-    EXPECT_TRUE(eventDeactivationMap.find(4) != eventDeactivationMap.end());
-    ASSERT_EQ(eventDeactivationMap[3].size(), 1u);
-    ASSERT_EQ(eventDeactivationMap[4].size(), 1u);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-
-    ASSERT_EQ(eventActivationMap2.size(), 2u);
-    EXPECT_TRUE(eventActivationMap2.find(0) != eventActivationMap2.end());
-    EXPECT_TRUE(eventActivationMap2.find(2) != eventActivationMap2.end());
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    ASSERT_EQ(eventDeactivationMap2.size(), 2u);
-    EXPECT_TRUE(eventDeactivationMap2.find(3) != eventDeactivationMap2.end());
-    EXPECT_TRUE(eventDeactivationMap2.find(4) != eventDeactivationMap2.end());
-    ASSERT_EQ(eventDeactivationMap[3].size(), 1u);
-    ASSERT_EQ(eventDeactivationMap[4].size(), 1u);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    std::unique_ptr<LogEvent> event;
-
-    event = CreateAppCrashEvent(bucketStartTimeNs + 5, 111);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 5);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + 5, 1111);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 5);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_FALSE(metricProducer2->mIsActive);
-    EXPECT_EQ(broadcastCount, 0);
-
-    // Activated by battery save mode.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + 10);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_EQ(broadcastCount, 1);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_TRUE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, 0);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    // First processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + 15, 222);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 15);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + 15, 2222);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 15);
-
-    // Activated by screen on event.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + 20, android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + 20);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_TRUE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    // 2nd processed event.
-    // The activation by screen_on event expires, but the one by battery save mode is still active.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25, 333);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25, 3333);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 2 + 25);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_TRUE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-    // No new broadcast since the config should still be active.
-    EXPECT_EQ(broadcastCount, 1);
-
-    // 3rd processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25, 444);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25, 4444);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 5 + 25);
-
-    // All activations expired.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 8, 555);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 8);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 8, 5555);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 8);
-    EXPECT_FALSE(metricsManager->isActive());
-    // New broadcast since the config is no longer active.
-    EXPECT_EQ(broadcastCount, 2);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_FALSE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + 20);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    // Re-activate metric via screen on.
-    event = CreateScreenStateChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10,
-                                          android::view::DISPLAY_STATE_ON);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_TRUE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + 10);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    // 4th processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1, 666);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1, 6666);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 1);
-
-    // Re-enable battery saver mode activation.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_EQ(broadcastCount, 3);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_TRUE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    // 5th processed event.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 40, 777);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 40);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 40, 7777);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 40);
-
-    // Cancel battery saver mode and screen on activation.
-    event = CreateScreenBrightnessChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 60, 64);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 60);
-    EXPECT_FALSE(metricsManager->isActive());
-    // New broadcast since the config is no longer active.
-    EXPECT_EQ(broadcastCount, 4);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_FALSE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    // Screen-on activation expired.
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 13, 888);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 13);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 13, 8888);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 13);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_EQ(broadcastCount, 4);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_FALSE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 11 + 15);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    event = CreateAppCrashEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 14 + 1, 999);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 14 + 1);
-    event = CreateMoveToForegroundEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 14 + 1, 9999);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 14 + 1);
-
-    // Re-enable battery saver mode activation.
-    event = CreateBatterySaverOnEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_TRUE(metricsManager->isActive());
-    EXPECT_EQ(broadcastCount, 5);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 1);
-    EXPECT_EQ(activeConfigsBroadcast[0], cfgId);
-    EXPECT_TRUE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_TRUE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    // Cancel battery saver mode and screen on activation.
-    event = CreateScreenBrightnessChangedEvent(bucketStartTimeNs + NS_PER_SEC * 60 * 16, 140);
-    processor.OnLogEvent(event.get(), bucketStartTimeNs + NS_PER_SEC * 60 * 16);
-    EXPECT_FALSE(metricsManager->isActive());
-    EXPECT_EQ(broadcastCount, 6);
-    ASSERT_EQ(activeConfigsBroadcast.size(), 0);
-    EXPECT_FALSE(metricProducer->mIsActive);
-    EXPECT_EQ(eventActivationMap[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_EQ(eventActivationMap[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap[3][0], eventActivationMap[0]);
-    EXPECT_EQ(eventDeactivationMap[4][0], eventActivationMap[2]);
-    EXPECT_FALSE(metricProducer2->mIsActive);
-    EXPECT_EQ(eventActivationMap2[0]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[0]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 15);
-    EXPECT_EQ(eventActivationMap2[0]->ttl_ns, 60 * 6 * NS_PER_SEC);
-    EXPECT_EQ(eventActivationMap2[2]->state, ActivationState::kNotActive);
-    EXPECT_EQ(eventActivationMap2[2]->start_ns, bucketStartTimeNs + NS_PER_SEC * 60 * 10 + 10);
-    EXPECT_EQ(eventActivationMap2[2]->ttl_ns, 60 * 2 * NS_PER_SEC);
-    EXPECT_EQ(eventDeactivationMap2[3][0], eventActivationMap2[0]);
-    EXPECT_EQ(eventDeactivationMap2[4][0], eventActivationMap2[2]);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor.onDumpReport(cfgKey, bucketStartTimeNs + NS_PER_SEC * 60 * 15 + 1, false, true,
-                           ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(2, reports.reports(0).metrics_size());
-
-    StatsLogReport::CountMetricDataWrapper countMetrics;
-
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).count_metrics(), &countMetrics);
-    ASSERT_EQ(5, countMetrics.data_size());
-
-    auto data = countMetrics.data(0);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(222, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(1);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(333, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(2);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(444, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    // Partial bucket as metric is deactivated.
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 8,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(3);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(666, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 11,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(4);
-    EXPECT_EQ(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(777, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 11,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    countMetrics.clear_data();
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(1).count_metrics(), &countMetrics);
-    ASSERT_EQ(5, countMetrics.data_size());
-
-    data = countMetrics.data(0);
-    EXPECT_EQ(util::ACTIVITY_FOREGROUND_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(2222, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(1);
-    EXPECT_EQ(util::ACTIVITY_FOREGROUND_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(3333, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(2);
-    EXPECT_EQ(util::ACTIVITY_FOREGROUND_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(4444, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    // Partial bucket as metric is deactivated.
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 8,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(3);
-    EXPECT_EQ(util::ACTIVITY_FOREGROUND_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(6666, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 11,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-
-    data = countMetrics.data(4);
-    EXPECT_EQ(util::ACTIVITY_FOREGROUND_STATE_CHANGED, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* uid field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(7777, data.dimensions_in_what().value_tuple().dimensions_value(0).value_int());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(1, data.bucket_info(0).count());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(bucketStartTimeNs + NS_PER_SEC * 60 * 11,
-              data.bucket_info(0).end_bucket_elapsed_nanos());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp b/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp
deleted file mode 100644
index 5e77ee0..0000000
--- a/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp
+++ /dev/null
@@ -1,348 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <gtest/gtest.h>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-namespace {
-
-StatsdConfig CreateStatsdConfig() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-
-    *config.add_atom_matcher() = CreateSyncStartAtomMatcher();
-    *config.add_atom_matcher() = CreateSyncEndAtomMatcher();
-
-    *config.add_atom_matcher() = CreateMoveToBackgroundAtomMatcher();
-    *config.add_atom_matcher() = CreateMoveToForegroundAtomMatcher();
-
-    auto appCrashMatcher = CreateProcessCrashAtomMatcher();
-    *config.add_atom_matcher() = appCrashMatcher;
-
-    auto screenIsOffPredicate = CreateScreenIsOffPredicate();
-
-    auto isSyncingPredicate = CreateIsSyncingPredicate();
-    auto syncDimension = isSyncingPredicate.mutable_simple_predicate()->mutable_dimensions();
-    *syncDimension = CreateAttributionUidDimensions(
-        util::SYNC_STATE_CHANGED, {Position::FIRST});
-    syncDimension->add_child()->set_field(2 /* name field*/);
-
-    auto isInBackgroundPredicate = CreateIsInBackgroundPredicate();
-    *isInBackgroundPredicate.mutable_simple_predicate()->mutable_dimensions() =
-        CreateDimensions(util::ACTIVITY_FOREGROUND_STATE_CHANGED, {1 /* uid field */ });
-
-    *config.add_predicate() = screenIsOffPredicate;
-    *config.add_predicate() = isSyncingPredicate;
-    *config.add_predicate() = isInBackgroundPredicate;
-
-    auto combinationPredicate = config.add_predicate();
-    combinationPredicate->set_id(StringToId("combinationPredicate"));
-    combinationPredicate->mutable_combination()->set_operation(LogicalOperation::AND);
-    addPredicateToPredicateCombination(screenIsOffPredicate, combinationPredicate);
-    addPredicateToPredicateCombination(isSyncingPredicate, combinationPredicate);
-    addPredicateToPredicateCombination(isInBackgroundPredicate, combinationPredicate);
-
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(StringToId("AppCrashes"));
-    countMetric->set_what(appCrashMatcher.id());
-    countMetric->set_condition(combinationPredicate->id());
-    // The metric is dimensioning by uid only.
-    *countMetric->mutable_dimensions_in_what() =
-        CreateDimensions(util::PROCESS_LIFE_CYCLE_STATE_CHANGED, {1});
-    countMetric->set_bucket(FIVE_MINUTES);
-
-    // Links between crash atom and condition of app is in syncing.
-    auto links = countMetric->add_links();
-    links->set_condition(isSyncingPredicate.id());
-    auto dimensionWhat = links->mutable_fields_in_what();
-    dimensionWhat->set_field(util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    dimensionWhat->add_child()->set_field(1);  // uid field.
-    *links->mutable_fields_in_condition() = CreateAttributionUidDimensions(
-            util::SYNC_STATE_CHANGED, {Position::FIRST});
-
-    // Links between crash atom and condition of app is in background.
-    links = countMetric->add_links();
-    links->set_condition(isInBackgroundPredicate.id());
-    dimensionWhat = links->mutable_fields_in_what();
-    dimensionWhat->set_field(util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    dimensionWhat->add_child()->set_field(1);  // uid field.
-    auto dimensionCondition = links->mutable_fields_in_condition();
-    dimensionCondition->set_field(util::ACTIVITY_FOREGROUND_STATE_CHANGED);
-    dimensionCondition->add_child()->set_field(1);  // uid field.
-    return config;
-}
-}  // namespace
-
-// If we want to test multiple dump data, we must do it in separate tests, because in the e2e tests,
-// we should use the real API which will clear the data after dump data is called.
-TEST(MetricConditionLinkE2eTest, TestMultiplePredicatesAndLinks1) {
-    auto config = CreateStatsdConfig();
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000LL;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-
-    int appUid = 123;
-    auto crashEvent1 = CreateAppCrashEvent(bucketStartTimeNs + 1, appUid);
-    auto crashEvent2 = CreateAppCrashEvent(bucketStartTimeNs + 201, appUid);
-    auto crashEvent3 = CreateAppCrashEvent(bucketStartTimeNs + 2 * bucketSizeNs - 101, appUid);
-
-    auto crashEvent4 = CreateAppCrashEvent(bucketStartTimeNs + 51, appUid);
-    auto crashEvent5 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 299, appUid);
-    auto crashEvent6 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 2001, appUid);
-
-    auto crashEvent7 = CreateAppCrashEvent(bucketStartTimeNs + 16, appUid);
-    auto crashEvent8 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 249, appUid);
-
-    auto crashEvent9 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 351, appUid);
-    auto crashEvent10 = CreateAppCrashEvent(bucketStartTimeNs + 2 * bucketSizeNs - 2, appUid);
-
-    auto screenTurnedOnEvent = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 2, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    auto screenTurnedOffEvent = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 200, android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    auto screenTurnedOnEvent2 =
-            CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * bucketSizeNs - 100,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-
-    std::vector<int> attributionUids = {appUid, appUid + 1};
-    std::vector<string> attributionTags = {"App1", "GMSCoreModule1"};
-
-    auto syncOnEvent1 = CreateSyncStartEvent(bucketStartTimeNs + 50, attributionUids,
-                                             attributionTags, "ReadEmail");
-    auto syncOffEvent1 = CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 300, attributionUids,
-                                            attributionTags, "ReadEmail");
-    auto syncOnEvent2 = CreateSyncStartEvent(bucketStartTimeNs + bucketSizeNs + 2000,
-                                             attributionUids, attributionTags, "ReadDoc");
-
-    auto moveToBackgroundEvent1 = CreateMoveToBackgroundEvent(bucketStartTimeNs + 15, appUid);
-    auto moveToForegroundEvent1 =
-            CreateMoveToForegroundEvent(bucketStartTimeNs + bucketSizeNs + 250, appUid);
-
-    auto moveToBackgroundEvent2 =
-            CreateMoveToBackgroundEvent(bucketStartTimeNs + bucketSizeNs + 350, appUid);
-    auto moveToForegroundEvent2 =
-            CreateMoveToForegroundEvent(bucketStartTimeNs + 2 * bucketSizeNs - 1, appUid);
-
-    /*
-                    bucket #1                               bucket #2
-
-
-       |      |   |  |                      |   |          |        |   |   |     (crashEvents)
-    |-------------------------------------|-----------------------------------|---------
-
-             |                                           |                        (MoveToBkground)
-
-                                             |                               |    (MoveToForeground)
-
-                |                                                 |                (SyncIsOn)
-                                                  |                                (SyncIsOff)
-          |                                                               |        (ScreenIsOn)
-                   |                                                               (ScreenIsOff)
-    */
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(std::move(crashEvent1));
-    events.push_back(std::move(crashEvent2));
-    events.push_back(std::move(crashEvent3));
-    events.push_back(std::move(crashEvent4));
-    events.push_back(std::move(crashEvent5));
-    events.push_back(std::move(crashEvent6));
-    events.push_back(std::move(crashEvent7));
-    events.push_back(std::move(crashEvent8));
-    events.push_back(std::move(crashEvent9));
-    events.push_back(std::move(crashEvent10));
-    events.push_back(std::move(screenTurnedOnEvent));
-    events.push_back(std::move(screenTurnedOffEvent));
-    events.push_back(std::move(screenTurnedOnEvent2));
-    events.push_back(std::move(syncOnEvent1));
-    events.push_back(std::move(syncOffEvent1));
-    events.push_back(std::move(syncOnEvent2));
-    events.push_back(std::move(moveToBackgroundEvent1));
-    events.push_back(std::move(moveToForegroundEvent1));
-    events.push_back(std::move(moveToBackgroundEvent2));
-    events.push_back(std::move(moveToForegroundEvent2));
-
-    sortLogEventsByTimestamp(&events);
-
-    for (const auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).count_metrics().data_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).count_metrics().data(0).bucket_info_size(), 1);
-    EXPECT_EQ(reports.reports(0).metrics(0).count_metrics().data(0).bucket_info(0).count(), 1);
-    auto data = reports.reports(0).metrics(0).count_metrics().data(0);
-    // Validate dimension value.
-    EXPECT_EQ(data.dimensions_in_what().field(), util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    ASSERT_EQ(data.dimensions_in_what().value_tuple().dimensions_value_size(), 1);
-    // Uid field.
-    EXPECT_EQ(data.dimensions_in_what().value_tuple().dimensions_value(0).field(), 1);
-    EXPECT_EQ(data.dimensions_in_what().value_tuple().dimensions_value(0).value_int(), appUid);
-}
-
-TEST(MetricConditionLinkE2eTest, TestMultiplePredicatesAndLinks2) {
-    auto config = CreateStatsdConfig();
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000LL;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-
-    int appUid = 123;
-    auto crashEvent1 = CreateAppCrashEvent(bucketStartTimeNs + 1, appUid);
-    auto crashEvent2 = CreateAppCrashEvent(bucketStartTimeNs + 201, appUid);
-    auto crashEvent3 = CreateAppCrashEvent(bucketStartTimeNs + 2 * bucketSizeNs - 101, appUid);
-
-    auto crashEvent4 = CreateAppCrashEvent(bucketStartTimeNs + 51, appUid);
-    auto crashEvent5 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 299, appUid);
-    auto crashEvent6 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 2001, appUid);
-
-    auto crashEvent7 = CreateAppCrashEvent(bucketStartTimeNs + 16, appUid);
-    auto crashEvent8 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 249, appUid);
-
-    auto crashEvent9 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 351, appUid);
-    auto crashEvent10 = CreateAppCrashEvent(bucketStartTimeNs + 2 * bucketSizeNs - 2, appUid);
-
-    auto screenTurnedOnEvent = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 2, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    auto screenTurnedOffEvent = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 200, android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    auto screenTurnedOnEvent2 =
-            CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * bucketSizeNs - 100,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-
-    std::vector<int> attributionUids = {appUid, appUid + 1};
-    std::vector<string> attributionTags = {"App1", "GMSCoreModule1"};
-
-    auto syncOnEvent1 = CreateSyncStartEvent(bucketStartTimeNs + 50, attributionUids,
-                                             attributionTags, "ReadEmail");
-    auto syncOffEvent1 = CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 300, attributionUids,
-                                            attributionTags, "ReadEmail");
-    auto syncOnEvent2 = CreateSyncStartEvent(bucketStartTimeNs + bucketSizeNs + 2000,
-                                             attributionUids, attributionTags, "ReadDoc");
-
-    auto moveToBackgroundEvent1 = CreateMoveToBackgroundEvent(bucketStartTimeNs + 15, appUid);
-    auto moveToForegroundEvent1 =
-            CreateMoveToForegroundEvent(bucketStartTimeNs + bucketSizeNs + 250, appUid);
-
-    auto moveToBackgroundEvent2 =
-            CreateMoveToBackgroundEvent(bucketStartTimeNs + bucketSizeNs + 350, appUid);
-    auto moveToForegroundEvent2 =
-            CreateMoveToForegroundEvent(bucketStartTimeNs + 2 * bucketSizeNs - 1, appUid);
-
-    /*
-                    bucket #1                               bucket #2
-
-
-       |      |   |  |                      |   |          |        |   |   |     (crashEvents)
-    |-------------------------------------|-----------------------------------|---------
-
-             |                                           |                        (MoveToBkground)
-
-                                             |                               |    (MoveToForeground)
-
-                |                                                 |                (SyncIsOn)
-                                                  |                                (SyncIsOff)
-          |                                                               |        (ScreenIsOn)
-                   |                                                               (ScreenIsOff)
-    */
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(std::move(crashEvent1));
-    events.push_back(std::move(crashEvent2));
-    events.push_back(std::move(crashEvent3));
-    events.push_back(std::move(crashEvent4));
-    events.push_back(std::move(crashEvent5));
-    events.push_back(std::move(crashEvent6));
-    events.push_back(std::move(crashEvent7));
-    events.push_back(std::move(crashEvent8));
-    events.push_back(std::move(crashEvent9));
-    events.push_back(std::move(crashEvent10));
-    events.push_back(std::move(screenTurnedOnEvent));
-    events.push_back(std::move(screenTurnedOffEvent));
-    events.push_back(std::move(screenTurnedOnEvent2));
-    events.push_back(std::move(syncOnEvent1));
-    events.push_back(std::move(syncOffEvent1));
-    events.push_back(std::move(syncOnEvent2));
-    events.push_back(std::move(moveToBackgroundEvent1));
-    events.push_back(std::move(moveToForegroundEvent1));
-    events.push_back(std::move(moveToBackgroundEvent2));
-    events.push_back(std::move(moveToForegroundEvent2));
-
-    sortLogEventsByTimestamp(&events);
-
-    for (const auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).count_metrics().data_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).count_metrics().data(0).bucket_info_size(), 2);
-    EXPECT_EQ(reports.reports(0).metrics(0).count_metrics().data(0).bucket_info(0).count(), 1);
-    EXPECT_EQ(reports.reports(0).metrics(0).count_metrics().data(0).bucket_info(1).count(), 3);
-    auto data = reports.reports(0).metrics(0).count_metrics().data(0);
-    // Validate dimension value.
-    EXPECT_EQ(data.dimensions_in_what().field(), util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    ASSERT_EQ(data.dimensions_in_what().value_tuple().dimensions_value_size(), 1);
-    // Uid field.
-    EXPECT_EQ(data.dimensions_in_what().value_tuple().dimensions_value(0).field(), 1);
-    EXPECT_EQ(data.dimensions_in_what().value_tuple().dimensions_value(0).value_int(), appUid);
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp b/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp
deleted file mode 100644
index c03b925..0000000
--- a/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <android/binder_ibinder.h>
-#include <android/binder_interface_utils.h>
-#include <gtest/gtest.h>
-
-#include <vector>
-
-#include "src/StatsLogProcessor.h"
-#include "src/StatsService.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-using::ndk::SharedRefBase;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-namespace {
-const string kApp1 = "app1.sharing.1";
-const int kConfigKey = 789130123;  // Randomly chosen to avoid collisions with existing configs.
-const int kCallingUid = 0; // Randomly chosen
-
-void SendConfig(shared_ptr<StatsService>& service, const StatsdConfig& config) {
-    string str;
-    config.SerializeToString(&str);
-    std::vector<uint8_t> configAsVec(str.begin(), str.end());
-    service->addConfiguration(kConfigKey, configAsVec, kCallingUid);
-}
-
-ConfigMetricsReport GetReports(sp<StatsLogProcessor> processor, int64_t timestamp,
-                               bool include_current = false) {
-    vector<uint8_t> output;
-    ConfigKey configKey(AIBinder_getCallingUid(), kConfigKey);
-    processor->onDumpReport(configKey, timestamp, include_current /* include_current_bucket*/,
-                            true /* erase_data */, ADB_DUMP, NO_TIME_CONSTRAINTS, &output);
-    ConfigMetricsReportList reports;
-    reports.ParseFromArray(output.data(), output.size());
-    EXPECT_EQ(1, reports.reports_size());
-    return reports.reports(kCallingUid);
-}
-
-StatsdConfig MakeConfig() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto appCrashMatcher = CreateProcessCrashAtomMatcher();
-    *config.add_atom_matcher() = appCrashMatcher;
-    auto countMetric = config.add_count_metric();
-    countMetric->set_id(StringToId("AppCrashes"));
-    countMetric->set_what(appCrashMatcher.id());
-    countMetric->set_bucket(FIVE_MINUTES);
-    return config;
-}
-
-StatsdConfig MakeValueMetricConfig(int64_t minTime) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    config.add_default_pull_packages("AID_ROOT");  // Fake puller is registered with root.
-
-    auto pulledAtomMatcher =
-            CreateSimpleAtomMatcher("TestMatcher", util::SUBSYSTEM_SLEEP_STATE);
-    *config.add_atom_matcher() = pulledAtomMatcher;
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-
-    auto valueMetric = config.add_value_metric();
-    valueMetric->set_id(123456);
-    valueMetric->set_what(pulledAtomMatcher.id());
-    *valueMetric->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    *valueMetric->mutable_dimensions_in_what() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {1 /* subsystem name */});
-    valueMetric->set_bucket(FIVE_MINUTES);
-    valueMetric->set_min_bucket_size_nanos(minTime);
-    valueMetric->set_use_absolute_value_on_reset(true);
-    valueMetric->set_skip_zero_diff_output(false);
-    return config;
-}
-
-StatsdConfig MakeGaugeMetricConfig(int64_t minTime) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-    config.add_default_pull_packages("AID_ROOT");  // Fake puller is registered with root.
-
-    auto pulledAtomMatcher =
-                CreateSimpleAtomMatcher("TestMatcher", util::SUBSYSTEM_SLEEP_STATE);
-    *config.add_atom_matcher() = pulledAtomMatcher;
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-
-    auto gaugeMetric = config.add_gauge_metric();
-    gaugeMetric->set_id(123456);
-    gaugeMetric->set_what(pulledAtomMatcher.id());
-    gaugeMetric->mutable_gauge_fields_filter()->set_include_all(true);
-    *gaugeMetric->mutable_dimensions_in_what() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {1 /* subsystem name */});
-    gaugeMetric->set_bucket(FIVE_MINUTES);
-    gaugeMetric->set_min_bucket_size_nanos(minTime);
-    return config;
-}
-}  // anonymous namespace
-
-TEST(PartialBucketE2eTest, TestCountMetricWithoutSplit) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    SendConfig(service, MakeConfig());
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 1, 100).get());
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 2, 100).get());
-
-    ConfigMetricsReport report = GetReports(service->mProcessor, start + 3);
-    // Expect no metrics since the bucket has not finished yet.
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(0, report.metrics(0).count_metrics().data_size());
-}
-
-TEST(PartialBucketE2eTest, TestCountMetricNoSplitOnNewApp) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    SendConfig(service, MakeConfig());
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    // Force the uidmap to update at timestamp 2.
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 1, 100).get());
-    // This is a new installation, so there shouldn't be a split (should be same as the without
-    // split case).
-    service->mUidMap->updateApp(start + 2, String16(kApp1.c_str()), 1, 2, String16("v2"),
-                                String16(""));
-    // Goes into the second bucket.
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 3, 100).get());
-
-    ConfigMetricsReport report = GetReports(service->mProcessor, start + 4);
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(0, report.metrics(0).count_metrics().data_size());
-}
-
-TEST(PartialBucketE2eTest, TestCountMetricSplitOnUpgrade) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    SendConfig(service, MakeConfig());
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-    service->mUidMap->updateMap(start, {1}, {1}, {String16("v1")}, {String16(kApp1.c_str())},
-                                {String16("")});
-
-    // Force the uidmap to update at timestamp 2.
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 1, 100).get());
-    service->mUidMap->updateApp(start + 2, String16(kApp1.c_str()), 1, 2, String16("v2"),
-                                String16(""));
-    // Goes into the second bucket.
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 3, 100).get());
-
-    ConfigMetricsReport report = GetReports(service->mProcessor, start + 4);
-    backfillStartEndTimestamp(&report);
-
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(1, report.metrics(0).count_metrics().data_size());
-    ASSERT_EQ(1, report.metrics(0).count_metrics().data(0).bucket_info_size());
-    EXPECT_TRUE(report.metrics(0)
-                        .count_metrics()
-                        .data(0)
-                        .bucket_info(0)
-                        .has_start_bucket_elapsed_nanos());
-    EXPECT_TRUE(report.metrics(0)
-                        .count_metrics()
-                        .data(0)
-                        .bucket_info(0)
-                        .has_end_bucket_elapsed_nanos());
-    EXPECT_EQ(1, report.metrics(0).count_metrics().data(0).bucket_info(0).count());
-}
-
-TEST(PartialBucketE2eTest, TestCountMetricSplitOnRemoval) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    SendConfig(service, MakeConfig());
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-    service->mUidMap->updateMap(start, {1}, {1}, {String16("v1")}, {String16(kApp1.c_str())},
-                                {String16("")});
-
-    // Force the uidmap to update at timestamp 2.
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 1, 100).get());
-    service->mUidMap->removeApp(start + 2, String16(kApp1.c_str()), 1);
-    // Goes into the second bucket.
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 3, 100).get());
-
-    ConfigMetricsReport report = GetReports(service->mProcessor, start + 4);
-    backfillStartEndTimestamp(&report);
-
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(1, report.metrics(0).count_metrics().data_size());
-    ASSERT_EQ(1, report.metrics(0).count_metrics().data(0).bucket_info_size());
-    EXPECT_TRUE(report.metrics(0)
-                        .count_metrics()
-                        .data(0)
-                        .bucket_info(0)
-                        .has_start_bucket_elapsed_nanos());
-    EXPECT_TRUE(report.metrics(0)
-                        .count_metrics()
-                        .data(0)
-                        .bucket_info(0)
-                        .has_end_bucket_elapsed_nanos());
-    EXPECT_EQ(1, report.metrics(0).count_metrics().data(0).bucket_info(0).count());
-}
-
-TEST(PartialBucketE2eTest, TestCountMetricSplitOnBoot) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    SendConfig(service, MakeConfig());
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    // Goes into the first bucket
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + NS_PER_SEC, 100).get());
-    int64_t bootCompleteTimeNs = start + 2 * NS_PER_SEC;
-    service->mProcessor->onStatsdInitCompleted(bootCompleteTimeNs);
-    // Goes into the second bucket.
-    service->mProcessor->OnLogEvent(CreateAppCrashEvent(start + 3 * NS_PER_SEC, 100).get());
-
-    ConfigMetricsReport report = GetReports(service->mProcessor, start + 4 * NS_PER_SEC);
-    backfillStartEndTimestamp(&report);
-
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(1, report.metrics(0).count_metrics().data_size());
-    ASSERT_EQ(1, report.metrics(0).count_metrics().data(0).bucket_info_size());
-    EXPECT_TRUE(report.metrics(0)
-                        .count_metrics()
-                        .data(0)
-                        .bucket_info(0)
-                        .has_start_bucket_elapsed_nanos());
-    EXPECT_EQ(MillisToNano(NanoToMillis(bootCompleteTimeNs)),
-              report.metrics(0).count_metrics().data(0).bucket_info(0).end_bucket_elapsed_nanos());
-    EXPECT_EQ(1, report.metrics(0).count_metrics().data(0).bucket_info(0).count());
-}
-
-TEST(PartialBucketE2eTest, TestValueMetricWithoutMinPartialBucket) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    service->mPullerManager->RegisterPullAtomCallback(
-            /*uid=*/0, util::SUBSYSTEM_SLEEP_STATE, NS_PER_SEC, NS_PER_SEC * 10, {},
-            SharedRefBase::make<FakeSubsystemSleepCallback>());
-    // Partial buckets don't occur when app is first installed.
-    service->mUidMap->updateApp(1, String16(kApp1.c_str()), 1, 1, String16("v1"), String16(""));
-    SendConfig(service, MakeValueMetricConfig(0));
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    service->mProcessor->informPullAlarmFired(5 * 60 * NS_PER_SEC + start);
-    int64_t appUpgradeTimeNs = 5 * 60 * NS_PER_SEC + start + 2 * NS_PER_SEC;
-    service->mUidMap->updateApp(appUpgradeTimeNs, String16(kApp1.c_str()), 1, 2, String16("v2"),
-                                String16(""));
-
-    ConfigMetricsReport report =
-            GetReports(service->mProcessor, 5 * 60 * NS_PER_SEC + start + 100 * NS_PER_SEC);
-    backfillStartEndTimestamp(&report);
-
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(0, report.metrics(0).value_metrics().skipped_size());
-
-    // The fake subsystem state sleep puller returns two atoms.
-    ASSERT_EQ(2, report.metrics(0).value_metrics().data_size());
-    ASSERT_EQ(2, report.metrics(0).value_metrics().data(0).bucket_info_size());
-    EXPECT_EQ(MillisToNano(NanoToMillis(appUpgradeTimeNs)),
-              report.metrics(0).value_metrics().data(0).bucket_info(1).end_bucket_elapsed_nanos());
-}
-
-TEST(PartialBucketE2eTest, TestValueMetricWithMinPartialBucket) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    service->mPullerManager->RegisterPullAtomCallback(
-            /*uid=*/0, util::SUBSYSTEM_SLEEP_STATE, NS_PER_SEC, NS_PER_SEC * 10, {},
-            SharedRefBase::make<FakeSubsystemSleepCallback>());
-    // Partial buckets don't occur when app is first installed.
-    service->mUidMap->updateApp(1, String16(kApp1.c_str()), 1, 1, String16("v1"), String16(""));
-    SendConfig(service, MakeValueMetricConfig(60 * NS_PER_SEC /* One minute */));
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    const int64_t endSkipped = 5 * 60 * NS_PER_SEC + start + 2 * NS_PER_SEC;
-    service->mProcessor->informPullAlarmFired(5 * 60 * NS_PER_SEC + start);
-    service->mUidMap->updateApp(endSkipped, String16(kApp1.c_str()), 1, 2, String16("v2"),
-                               String16(""));
-
-    ConfigMetricsReport report =
-            GetReports(service->mProcessor, 5 * 60 * NS_PER_SEC + start + 100 * NS_PER_SEC);
-    backfillStartEndTimestamp(&report);
-
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(1, report.metrics(0).value_metrics().skipped_size());
-    EXPECT_TRUE(report.metrics(0).value_metrics().skipped(0).has_start_bucket_elapsed_nanos());
-    // Can't test the start time since it will be based on the actual time when the pulling occurs.
-    EXPECT_EQ(MillisToNano(NanoToMillis(endSkipped)),
-              report.metrics(0).value_metrics().skipped(0).end_bucket_elapsed_nanos());
-
-    ASSERT_EQ(2, report.metrics(0).value_metrics().data_size());
-    ASSERT_EQ(1, report.metrics(0).value_metrics().data(0).bucket_info_size());
-}
-
-TEST(PartialBucketE2eTest, TestValueMetricOnBootWithoutMinPartialBucket) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    // Initial pull will fail since puller is not registered.
-    SendConfig(service, MakeValueMetricConfig(0));
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    service->mPullerManager->RegisterPullAtomCallback(
-            /*uid=*/0, util::SUBSYSTEM_SLEEP_STATE, NS_PER_SEC, NS_PER_SEC * 10, {},
-            SharedRefBase::make<FakeSubsystemSleepCallback>());
-
-    int64_t bootCompleteTimeNs = start + NS_PER_SEC;
-    service->mProcessor->onStatsdInitCompleted(bootCompleteTimeNs);
-
-    service->mProcessor->informPullAlarmFired(5 * 60 * NS_PER_SEC + start);
-
-    ConfigMetricsReport report = GetReports(service->mProcessor, 5 * 60 * NS_PER_SEC + start + 100);
-    backfillStartEndTimestamp(&report);
-
-    // First bucket is dropped due to the initial pull failing
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(1, report.metrics(0).value_metrics().skipped_size());
-    EXPECT_EQ(MillisToNano(NanoToMillis(bootCompleteTimeNs)),
-              report.metrics(0).value_metrics().skipped(0).end_bucket_elapsed_nanos());
-
-    // The fake subsystem state sleep puller returns two atoms.
-    ASSERT_EQ(2, report.metrics(0).value_metrics().data_size());
-    ASSERT_EQ(1, report.metrics(0).value_metrics().data(0).bucket_info_size());
-    EXPECT_EQ(
-            MillisToNano(NanoToMillis(bootCompleteTimeNs)),
-            report.metrics(0).value_metrics().data(0).bucket_info(0).start_bucket_elapsed_nanos());
-}
-
-TEST(PartialBucketE2eTest, TestGaugeMetricWithoutMinPartialBucket) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    service->mPullerManager->RegisterPullAtomCallback(
-            /*uid=*/0, util::SUBSYSTEM_SLEEP_STATE, NS_PER_SEC, NS_PER_SEC * 10, {},
-            SharedRefBase::make<FakeSubsystemSleepCallback>());
-    // Partial buckets don't occur when app is first installed.
-    service->mUidMap->updateApp(1, String16(kApp1.c_str()), 1, 1, String16("v1"), String16(""));
-    SendConfig(service, MakeGaugeMetricConfig(0));
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    service->mProcessor->informPullAlarmFired(5 * 60 * NS_PER_SEC + start);
-    service->mUidMap->updateApp(5 * 60 * NS_PER_SEC + start + 2, String16(kApp1.c_str()), 1, 2,
-                               String16("v2"), String16(""));
-
-    ConfigMetricsReport report = GetReports(service->mProcessor, 5 * 60 * NS_PER_SEC + start + 100);
-    backfillStartEndTimestamp(&report);
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(0, report.metrics(0).gauge_metrics().skipped_size());
-    // The fake subsystem state sleep puller returns two atoms.
-    ASSERT_EQ(2, report.metrics(0).gauge_metrics().data_size());
-    ASSERT_EQ(2, report.metrics(0).gauge_metrics().data(0).bucket_info_size());
-}
-
-TEST(PartialBucketE2eTest, TestGaugeMetricWithMinPartialBucket) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    // Partial buckets don't occur when app is first installed.
-    service->mUidMap->updateApp(1, String16(kApp1.c_str()), 1, 1, String16("v1"), String16(""));
-    service->mPullerManager->RegisterPullAtomCallback(
-            /*uid=*/0, util::SUBSYSTEM_SLEEP_STATE, NS_PER_SEC, NS_PER_SEC * 10, {},
-            SharedRefBase::make<FakeSubsystemSleepCallback>());
-    SendConfig(service, MakeGaugeMetricConfig(60 * NS_PER_SEC /* One minute */));
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    const int64_t endSkipped = 5 * 60 * NS_PER_SEC + start + 2;
-    service->mProcessor->informPullAlarmFired(5 * 60 * NS_PER_SEC + start);
-    service->mUidMap->updateApp(endSkipped, String16(kApp1.c_str()), 1, 2, String16("v2"),
-                                String16(""));
-
-    ConfigMetricsReport report =
-            GetReports(service->mProcessor, 5 * 60 * NS_PER_SEC + start + 100 * NS_PER_SEC);
-    backfillStartEndTimestamp(&report);
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(1, report.metrics(0).gauge_metrics().skipped_size());
-    // Can't test the start time since it will be based on the actual time when the pulling occurs.
-    EXPECT_TRUE(report.metrics(0).gauge_metrics().skipped(0).has_start_bucket_elapsed_nanos());
-    EXPECT_EQ(MillisToNano(NanoToMillis(endSkipped)),
-              report.metrics(0).gauge_metrics().skipped(0).end_bucket_elapsed_nanos());
-    ASSERT_EQ(2, report.metrics(0).gauge_metrics().data_size());
-    ASSERT_EQ(1, report.metrics(0).gauge_metrics().data(0).bucket_info_size());
-}
-
-TEST(PartialBucketE2eTest, TestGaugeMetricOnBootWithoutMinPartialBucket) {
-    shared_ptr<StatsService> service = SharedRefBase::make<StatsService>(nullptr, nullptr);
-    // Initial pull will fail since puller hasn't been registered.
-    SendConfig(service, MakeGaugeMetricConfig(0));
-    int64_t start = getElapsedRealtimeNs();  // This is the start-time the metrics producers are
-                                             // initialized with.
-
-    service->mPullerManager->RegisterPullAtomCallback(
-            /*uid=*/0, util::SUBSYSTEM_SLEEP_STATE, NS_PER_SEC, NS_PER_SEC * 10, {},
-            SharedRefBase::make<FakeSubsystemSleepCallback>());
-
-    int64_t bootCompleteTimeNs = start + NS_PER_SEC;
-    service->mProcessor->onStatsdInitCompleted(bootCompleteTimeNs);
-
-    service->mProcessor->informPullAlarmFired(5 * 60 * NS_PER_SEC + start);
-
-    ConfigMetricsReport report = GetReports(service->mProcessor, 5 * 60 * NS_PER_SEC + start + 100);
-    backfillStartEndTimestamp(&report);
-
-    ASSERT_EQ(1, report.metrics_size());
-    ASSERT_EQ(0, report.metrics(0).gauge_metrics().skipped_size());
-    // The fake subsystem state sleep puller returns two atoms.
-    ASSERT_EQ(2, report.metrics(0).gauge_metrics().data_size());
-    // No data in the first bucket, so nothing is reported
-    ASSERT_EQ(1, report.metrics(0).gauge_metrics().data(0).bucket_info_size());
-    EXPECT_EQ(
-            MillisToNano(NanoToMillis(bootCompleteTimeNs)),
-            report.metrics(0).gauge_metrics().data(0).bucket_info(0).start_bucket_elapsed_nanos());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/ValueMetric_pull_e2e_test.cpp b/cmds/statsd/tests/e2e/ValueMetric_pull_e2e_test.cpp
deleted file mode 100644
index 4d39282..0000000
--- a/cmds/statsd/tests/e2e/ValueMetric_pull_e2e_test.cpp
+++ /dev/null
@@ -1,679 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <android/binder_interface_utils.h>
-#include <gtest/gtest.h>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-#include <vector>
-
-using ::ndk::SharedRefBase;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-const int64_t metricId = 123456;
-
-StatsdConfig CreateStatsdConfig(bool useCondition = true) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    config.add_default_pull_packages("AID_ROOT");  // Fake puller is registered with root.
-    auto pulledAtomMatcher =
-            CreateSimpleAtomMatcher("TestMatcher", util::SUBSYSTEM_SLEEP_STATE);
-    *config.add_atom_matcher() = pulledAtomMatcher;
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-
-    auto screenIsOffPredicate = CreateScreenIsOffPredicate();
-    *config.add_predicate() = screenIsOffPredicate;
-
-    auto valueMetric = config.add_value_metric();
-    valueMetric->set_id(metricId);
-    valueMetric->set_what(pulledAtomMatcher.id());
-    if (useCondition) {
-        valueMetric->set_condition(screenIsOffPredicate.id());
-    }
-    *valueMetric->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    *valueMetric->mutable_dimensions_in_what() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {1 /* subsystem name */});
-    valueMetric->set_bucket(FIVE_MINUTES);
-    valueMetric->set_use_absolute_value_on_reset(true);
-    valueMetric->set_skip_zero_diff_output(false);
-    valueMetric->set_max_pull_delay_sec(INT_MAX);
-    return config;
-}
-
-StatsdConfig CreateStatsdConfigWithStates() {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");     // LogEvent defaults to UID of root.
-    config.add_default_pull_packages("AID_ROOT");  // Fake puller is registered with root.
-
-    auto pulledAtomMatcher = CreateSimpleAtomMatcher("TestMatcher", util::SUBSYSTEM_SLEEP_STATE);
-    *config.add_atom_matcher() = pulledAtomMatcher;
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-    *config.add_atom_matcher() = CreateBatteryStateNoneMatcher();
-    *config.add_atom_matcher() = CreateBatteryStateUsbMatcher();
-
-    auto screenOnPredicate = CreateScreenIsOnPredicate();
-    *config.add_predicate() = screenOnPredicate;
-
-    auto screenOffPredicate = CreateScreenIsOffPredicate();
-    *config.add_predicate() = screenOffPredicate;
-
-    auto deviceUnpluggedPredicate = CreateDeviceUnpluggedPredicate();
-    *config.add_predicate() = deviceUnpluggedPredicate;
-
-    auto screenOnOnBatteryPredicate = config.add_predicate();
-    screenOnOnBatteryPredicate->set_id(StringToId("screenOnOnBatteryPredicate"));
-    screenOnOnBatteryPredicate->mutable_combination()->set_operation(LogicalOperation::AND);
-    addPredicateToPredicateCombination(screenOnPredicate, screenOnOnBatteryPredicate);
-    addPredicateToPredicateCombination(deviceUnpluggedPredicate, screenOnOnBatteryPredicate);
-
-    auto screenOffOnBatteryPredicate = config.add_predicate();
-    screenOffOnBatteryPredicate->set_id(StringToId("ScreenOffOnBattery"));
-    screenOffOnBatteryPredicate->mutable_combination()->set_operation(LogicalOperation::AND);
-    addPredicateToPredicateCombination(screenOffPredicate, screenOffOnBatteryPredicate);
-    addPredicateToPredicateCombination(deviceUnpluggedPredicate, screenOffOnBatteryPredicate);
-
-    const State screenState =
-            CreateScreenStateWithSimpleOnOffMap(/*screen on id=*/321, /*screen off id=*/123);
-    *config.add_state() = screenState;
-
-    // ValueMetricSubsystemSleepWhileScreenOnOnBattery
-    auto valueMetric1 = config.add_value_metric();
-    valueMetric1->set_id(metricId);
-    valueMetric1->set_what(pulledAtomMatcher.id());
-    valueMetric1->set_condition(screenOnOnBatteryPredicate->id());
-    *valueMetric1->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    valueMetric1->set_bucket(FIVE_MINUTES);
-    valueMetric1->set_use_absolute_value_on_reset(true);
-    valueMetric1->set_skip_zero_diff_output(false);
-    valueMetric1->set_max_pull_delay_sec(INT_MAX);
-
-    // ValueMetricSubsystemSleepWhileScreenOffOnBattery
-    ValueMetric* valueMetric2 = config.add_value_metric();
-    valueMetric2->set_id(StringToId("ValueMetricSubsystemSleepWhileScreenOffOnBattery"));
-    valueMetric2->set_what(pulledAtomMatcher.id());
-    valueMetric2->set_condition(screenOffOnBatteryPredicate->id());
-    *valueMetric2->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    valueMetric2->set_bucket(FIVE_MINUTES);
-    valueMetric2->set_use_absolute_value_on_reset(true);
-    valueMetric2->set_skip_zero_diff_output(false);
-    valueMetric2->set_max_pull_delay_sec(INT_MAX);
-
-    // ValueMetricSubsystemSleepWhileOnBatterySliceScreen
-    ValueMetric* valueMetric3 = config.add_value_metric();
-    valueMetric3->set_id(StringToId("ValueMetricSubsystemSleepWhileOnBatterySliceScreen"));
-    valueMetric3->set_what(pulledAtomMatcher.id());
-    valueMetric3->set_condition(deviceUnpluggedPredicate.id());
-    *valueMetric3->mutable_value_field() =
-            CreateDimensions(util::SUBSYSTEM_SLEEP_STATE, {4 /* time sleeping field */});
-    valueMetric3->add_slice_by_state(screenState.id());
-    valueMetric3->set_bucket(FIVE_MINUTES);
-    valueMetric3->set_use_absolute_value_on_reset(true);
-    valueMetric3->set_skip_zero_diff_output(false);
-    valueMetric3->set_max_pull_delay_sec(INT_MAX);
-    return config;
-}
-
-}  // namespace
-
-/**
- * Tests the initial condition and condition after the first log events for
- * value metrics with either a combination condition or simple condition.
- *
- * Metrics should be initialized with condition kUnknown (given that the
- * predicate is using the default InitialValue of UNKNOWN). The condition should
- * be updated to either kFalse or kTrue if a condition event is logged for all
- * children conditions.
- */
-TEST(ValueMetricE2eTest, TestInitialConditionChanges) {
-    StatsdConfig config = CreateStatsdConfigWithStates();
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.value_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    int32_t tagId = util::SUBSYSTEM_SLEEP_STATE;
-    auto processor =
-            CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                    SharedRefBase::make<FakeSubsystemSleepCallback>(), tagId);
-
-    EXPECT_EQ(processor->mMetricsManagers.size(), 1u);
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    EXPECT_EQ(3, metricsManager->mAllMetricProducers.size());
-
-    // Combination condition metric - screen on and device unplugged
-    sp<MetricProducer> metricProducer1 = metricsManager->mAllMetricProducers[0];
-    // Simple condition metric - device unplugged
-    sp<MetricProducer> metricProducer2 = metricsManager->mAllMetricProducers[2];
-
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer2->mCondition);
-
-    auto screenOnEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 30, android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer2->mCondition);
-
-    auto screenOffEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 40, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kUnknown, metricProducer2->mCondition);
-
-    auto pluggedUsbEvent = CreateBatteryStateChangedEvent(
-            configAddedTimeNs + 50, BatteryPluggedStateEnum::BATTERY_PLUGGED_USB);
-    processor->OnLogEvent(pluggedUsbEvent.get());
-    EXPECT_EQ(ConditionState::kFalse, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kFalse, metricProducer2->mCondition);
-
-    auto pluggedNoneEvent = CreateBatteryStateChangedEvent(
-            configAddedTimeNs + 70, BatteryPluggedStateEnum::BATTERY_PLUGGED_NONE);
-    processor->OnLogEvent(pluggedNoneEvent.get());
-    EXPECT_EQ(ConditionState::kFalse, metricProducer1->mCondition);
-    EXPECT_EQ(ConditionState::kTrue, metricProducer2->mCondition);
-}
-
-TEST(ValueMetricE2eTest, TestPulledEvents) {
-    auto config = CreateStatsdConfig();
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.value_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                             SharedRefBase::make<FakeSubsystemSleepCallback>(),
-                                             util::SUBSYSTEM_SLEEP_STATE);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    processor->mPullerManager->ForceClearPullerCache();
-
-    int startBucketNum = processor->mMetricsManagers.begin()
-                                 ->second->mAllMetricProducers[0]
-                                 ->getCurrentBucketNum();
-    EXPECT_GT(startBucketNum, (int64_t)0);
-
-    // When creating the config, the value metric producer should register the alarm at the
-    // end of the current bucket.
-    ASSERT_EQ((size_t)1, processor->mPullerManager->mReceivers.size());
-    EXPECT_EQ(bucketSizeNs,
-              processor->mPullerManager->mReceivers.begin()->second.front().intervalNs);
-    int64_t& expectedPullTimeNs =
-            processor->mPullerManager->mReceivers.begin()->second.front().nextPullTimeNs;
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, expectedPullTimeNs);
-
-    auto screenOffEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 55, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    auto screenOnEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 65, android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    screenOffEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 75, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    // Pulling alarm arrives on time and reset the sequential pulling alarm.
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 2 * bucketSizeNs, expectedPullTimeNs);
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);
-
-    screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 2 * bucketSizeNs + 15,
-                                                  android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);
-
-    screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 4 * bucketSizeNs + 11,
-                                                   android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
-                            ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::ValueMetricDataWrapper valueMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).value_metrics(), &valueMetrics);
-    ASSERT_GT((int)valueMetrics.data_size(), 1);
-
-    auto data = valueMetrics.data(0);
-    EXPECT_EQ(util::SUBSYSTEM_SLEEP_STATE, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* subsystem name field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_FALSE(data.dimensions_in_what().value_tuple().dimensions_value(0).value_str().empty());
-    // We have 4 buckets, the first one was incomplete since the condition was unknown.
-    ASSERT_EQ(4, data.bucket_info_size());
-
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, data.bucket_info(0).values_size());
-
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs, data.bucket_info(1).end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, data.bucket_info(1).values_size());
-
-    EXPECT_EQ(baseTimeNs + 6 * bucketSizeNs, data.bucket_info(2).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 7 * bucketSizeNs, data.bucket_info(2).end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, data.bucket_info(2).values_size());
-
-    EXPECT_EQ(baseTimeNs + 7 * bucketSizeNs, data.bucket_info(3).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 8 * bucketSizeNs, data.bucket_info(3).end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, data.bucket_info(3).values_size());
-}
-
-TEST(ValueMetricE2eTest, TestPulledEvents_LateAlarm) {
-    auto config = CreateStatsdConfig();
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    // 10 mins == 2 bucket durations.
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.value_metric(0).bucket()) * 1000000;
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                             SharedRefBase::make<FakeSubsystemSleepCallback>(),
-                                             util::SUBSYSTEM_SLEEP_STATE);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    processor->mPullerManager->ForceClearPullerCache();
-
-    int startBucketNum = processor->mMetricsManagers.begin()
-                                 ->second->mAllMetricProducers[0]
-                                 ->getCurrentBucketNum();
-    EXPECT_GT(startBucketNum, (int64_t)0);
-
-    // When creating the config, the value metric producer should register the alarm at the
-    // end of the current bucket.
-    ASSERT_EQ((size_t)1, processor->mPullerManager->mReceivers.size());
-    EXPECT_EQ(bucketSizeNs,
-              processor->mPullerManager->mReceivers.begin()->second.front().intervalNs);
-    int64_t& expectedPullTimeNs =
-            processor->mPullerManager->mReceivers.begin()->second.front().nextPullTimeNs;
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, expectedPullTimeNs);
-
-    // Screen off/on/off events.
-    auto screenOffEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 55, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    auto screenOnEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 65, android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    screenOffEvent =
-            CreateScreenStateChangedEvent(configAddedTimeNs + 75, android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    // Pulling alarm arrives late by 2 buckets and 1 ns. 2 buckets late is too far away in the
-    // future, data will be skipped.
-    processor->informPullAlarmFired(expectedPullTimeNs + 2 * bucketSizeNs + 1);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 4 * bucketSizeNs, expectedPullTimeNs);
-
-    // This screen state change will start a new bucket.
-    screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 4 * bucketSizeNs + 65,
-                                                  android::view::DISPLAY_STATE_ON);
-    processor->OnLogEvent(screenOnEvent.get());
-
-    // The alarm is delayed but we already created a bucket thanks to the screen state condition.
-    // This bucket does not have to be skipped since the alarm arrives in time for the next bucket.
-    processor->informPullAlarmFired(expectedPullTimeNs + bucketSizeNs + 21);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 6 * bucketSizeNs, expectedPullTimeNs);
-
-    screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 6 * bucketSizeNs + 31,
-                                                   android::view::DISPLAY_STATE_OFF);
-    processor->OnLogEvent(screenOffEvent.get());
-
-    processor->informPullAlarmFired(expectedPullTimeNs + bucketSizeNs + 21);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 8 * bucketSizeNs, expectedPullTimeNs);
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 9 * bucketSizeNs, expectedPullTimeNs);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 9 * bucketSizeNs + 10, false, true,
-                            ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::ValueMetricDataWrapper valueMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).value_metrics(), &valueMetrics);
-    ASSERT_GT((int)valueMetrics.data_size(), 1);
-
-    auto data = valueMetrics.data(0);
-    EXPECT_EQ(util::SUBSYSTEM_SLEEP_STATE, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* subsystem name field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_FALSE(data.dimensions_in_what().value_tuple().dimensions_value(0).value_str().empty());
-    ASSERT_EQ(3, data.bucket_info_size());
-
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 6 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, data.bucket_info(0).values_size());
-
-    EXPECT_EQ(baseTimeNs + 8 * bucketSizeNs, data.bucket_info(1).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 9 * bucketSizeNs, data.bucket_info(1).end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, data.bucket_info(1).values_size());
-
-    EXPECT_EQ(baseTimeNs + 9 * bucketSizeNs, data.bucket_info(2).start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 10 * bucketSizeNs, data.bucket_info(2).end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, data.bucket_info(2).values_size());
-}
-
-TEST(ValueMetricE2eTest, TestPulledEvents_WithActivation) {
-    auto config = CreateStatsdConfig(false);
-    int64_t baseTimeNs = getElapsedRealtimeNs();
-    int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.value_metric(0).bucket()) * 1000000;
-
-    auto batterySaverStartMatcher = CreateBatterySaverModeStartAtomMatcher();
-    *config.add_atom_matcher() = batterySaverStartMatcher;
-    const int64_t ttlNs = 2 * bucketSizeNs;  // Two buckets.
-    auto metric_activation = config.add_metric_activation();
-    metric_activation->set_metric_id(metricId);
-    metric_activation->set_activation_type(ACTIVATE_IMMEDIATELY);
-    auto event_activation = metric_activation->add_event_activation();
-    event_activation->set_atom_matcher_id(batterySaverStartMatcher.id());
-    event_activation->set_ttl_seconds(ttlNs / 1000000000);
-
-    ConfigKey cfgKey;
-    auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey,
-                                             SharedRefBase::make<FakeSubsystemSleepCallback>(),
-                                             util::SUBSYSTEM_SLEEP_STATE);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    processor->mPullerManager->ForceClearPullerCache();
-
-    int startBucketNum = processor->mMetricsManagers.begin()
-                                 ->second->mAllMetricProducers[0]
-                                 ->getCurrentBucketNum();
-    EXPECT_GT(startBucketNum, (int64_t)0);
-    EXPECT_FALSE(processor->mMetricsManagers.begin()->second->mAllMetricProducers[0]->isActive());
-
-    // When creating the config, the value metric producer should register the alarm at the
-    // end of the current bucket.
-    ASSERT_EQ((size_t)1, processor->mPullerManager->mReceivers.size());
-    EXPECT_EQ(bucketSizeNs,
-              processor->mPullerManager->mReceivers.begin()->second.front().intervalNs);
-    int64_t& expectedPullTimeNs =
-            processor->mPullerManager->mReceivers.begin()->second.front().nextPullTimeNs;
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, expectedPullTimeNs);
-
-    // Pulling alarm arrives on time and reset the sequential pulling alarm.
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);  // 15 mins + 1 ns.
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 2 * bucketSizeNs, expectedPullTimeNs);
-    EXPECT_FALSE(processor->mMetricsManagers.begin()->second->mAllMetricProducers[0]->isActive());
-
-    // Activate the metric. A pull occurs here
-    const int64_t activationNs = configAddedTimeNs + bucketSizeNs + (2 * 1000 * 1000);  // 2 millis.
-    auto batterySaverOnEvent = CreateBatterySaverOnEvent(activationNs);
-    processor->OnLogEvent(batterySaverOnEvent.get());  // 15 mins + 2 ms.
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->mAllMetricProducers[0]->isActive());
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 1);  // 20 mins + 1 ns.
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 3 * bucketSizeNs, expectedPullTimeNs);
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 2);  // 25 mins + 2 ns.
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 4 * bucketSizeNs, expectedPullTimeNs);
-
-    // Create random event to deactivate metric.
-    auto deactivationEvent = CreateScreenBrightnessChangedEvent(activationNs + ttlNs + 1, 50);
-    processor->OnLogEvent(deactivationEvent.get());
-    EXPECT_FALSE(processor->mMetricsManagers.begin()->second->mAllMetricProducers[0]->isActive());
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 3);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 5 * bucketSizeNs, expectedPullTimeNs);
-
-    processor->informPullAlarmFired(expectedPullTimeNs + 4);
-    EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 6 * bucketSizeNs, expectedPullTimeNs);
-
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
-                            ADB_DUMP, FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(1, reports.reports_size());
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    StatsLogReport::ValueMetricDataWrapper valueMetrics;
-    sortMetricDataByDimensionsValue(reports.reports(0).metrics(0).value_metrics(), &valueMetrics);
-    ASSERT_GT((int)valueMetrics.data_size(), 0);
-
-    auto data = valueMetrics.data(0);
-    EXPECT_EQ(util::SUBSYSTEM_SLEEP_STATE, data.dimensions_in_what().field());
-    ASSERT_EQ(1, data.dimensions_in_what().value_tuple().dimensions_value_size());
-    EXPECT_EQ(1 /* subsystem name field */,
-              data.dimensions_in_what().value_tuple().dimensions_value(0).field());
-    EXPECT_FALSE(data.dimensions_in_what().value_tuple().dimensions_value(0).value_str().empty());
-    // We have 2 full buckets, the two surrounding the activation are dropped.
-    ASSERT_EQ(2, data.bucket_info_size());
-
-    auto bucketInfo = data.bucket_info(0);
-    EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, bucketInfo.values_size());
-
-    bucketInfo = data.bucket_info(1);
-    EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, bucketInfo.start_bucket_elapsed_nanos());
-    EXPECT_EQ(baseTimeNs + 5 * bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos());
-    ASSERT_EQ(1, bucketInfo.values_size());
-}
-
-/**
- * Test initialization of a simple value metric that is sliced by a state.
- *
- * ValueCpuUserTimePerScreenState
- */
-TEST(ValueMetricE2eTest, TestInitWithSlicedState) {
-    // Create config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto pulledAtomMatcher =
-            CreateSimpleAtomMatcher("TestMatcher", util::SUBSYSTEM_SLEEP_STATE);
-    *config.add_atom_matcher() = pulledAtomMatcher;
-
-    auto screenState = CreateScreenState();
-    *config.add_state() = screenState;
-
-    // Create value metric that slices by screen state without a map.
-    int64_t metricId = 123456;
-    auto valueMetric = config.add_value_metric();
-    valueMetric->set_id(metricId);
-    valueMetric->set_bucket(TimeUnit::FIVE_MINUTES);
-    valueMetric->set_what(pulledAtomMatcher.id());
-    *valueMetric->mutable_value_field() =
-            CreateDimensions(util::CPU_TIME_PER_UID, {2 /* user_time_micros */});
-    valueMetric->add_slice_by_state(screenState.id());
-    valueMetric->set_max_pull_delay_sec(INT_MAX);
-
-    // Initialize StatsLogProcessor.
-    const uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    const uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.value_metric(0).bucket()) * 1000000LL;
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-
-    // Check that ValueMetricProducer was initialized correctly.
-    ASSERT_EQ(1U, processor->mMetricsManagers.size());
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(1, metricsManager->mAllMetricProducers.size());
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    ASSERT_EQ(1, metricProducer->mSlicedStateAtoms.size());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, metricProducer->mSlicedStateAtoms.at(0));
-    ASSERT_EQ(0, metricProducer->mStateGroupMap.size());
-}
-
-/**
- * Test initialization of a value metric that is sliced by state and has
- * dimensions_in_what.
- *
- * ValueCpuUserTimePerUidPerUidProcessState
- */
-TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithDimensions) {
-    // Create config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto cpuTimePerUidMatcher =
-            CreateSimpleAtomMatcher("CpuTimePerUidMatcher", util::CPU_TIME_PER_UID);
-    *config.add_atom_matcher() = cpuTimePerUidMatcher;
-
-    auto uidProcessState = CreateUidProcessState();
-    *config.add_state() = uidProcessState;
-
-    // Create value metric that slices by screen state with a complete map.
-    int64_t metricId = 123456;
-    auto valueMetric = config.add_value_metric();
-    valueMetric->set_id(metricId);
-    valueMetric->set_bucket(TimeUnit::FIVE_MINUTES);
-    valueMetric->set_what(cpuTimePerUidMatcher.id());
-    *valueMetric->mutable_value_field() =
-            CreateDimensions(util::CPU_TIME_PER_UID, {2 /* user_time_micros */});
-    *valueMetric->mutable_dimensions_in_what() =
-            CreateDimensions(util::CPU_TIME_PER_UID, {1 /* uid */});
-    valueMetric->add_slice_by_state(uidProcessState.id());
-    MetricStateLink* stateLink = valueMetric->add_state_link();
-    stateLink->set_state_atom_id(UID_PROCESS_STATE_ATOM_ID);
-    auto fieldsInWhat = stateLink->mutable_fields_in_what();
-    *fieldsInWhat = CreateDimensions(util::CPU_TIME_PER_UID, {1 /* uid */});
-    auto fieldsInState = stateLink->mutable_fields_in_state();
-    *fieldsInState = CreateDimensions(UID_PROCESS_STATE_ATOM_ID, {1 /* uid */});
-    valueMetric->set_max_pull_delay_sec(INT_MAX);
-
-    // Initialize StatsLogProcessor.
-    const uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    // Check that StateTrackers were initialized correctly.
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(UID_PROCESS_STATE_ATOM_ID));
-
-    // Check that ValueMetricProducer was initialized correctly.
-    ASSERT_EQ(1U, processor->mMetricsManagers.size());
-    sp<MetricsManager> metricsManager = processor->mMetricsManagers.begin()->second;
-    EXPECT_TRUE(metricsManager->isConfigValid());
-    ASSERT_EQ(1, metricsManager->mAllMetricProducers.size());
-    sp<MetricProducer> metricProducer = metricsManager->mAllMetricProducers[0];
-    ASSERT_EQ(1, metricProducer->mSlicedStateAtoms.size());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, metricProducer->mSlicedStateAtoms.at(0));
-    ASSERT_EQ(0, metricProducer->mStateGroupMap.size());
-}
-
-/**
- * Test initialization of a value metric that is sliced by state and has
- * dimensions_in_what.
- *
- * ValueCpuUserTimePerUidPerUidProcessState
- */
-TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithIncorrectDimensions) {
-    // Create config.
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT");  // LogEvent defaults to UID of root.
-
-    auto cpuTimePerUidMatcher =
-            CreateSimpleAtomMatcher("CpuTimePerUidMatcher", util::CPU_TIME_PER_UID);
-    *config.add_atom_matcher() = cpuTimePerUidMatcher;
-
-    auto uidProcessState = CreateUidProcessState();
-    *config.add_state() = uidProcessState;
-
-    // Create value metric that slices by screen state with a complete map.
-    int64_t metricId = 123456;
-    auto valueMetric = config.add_value_metric();
-    valueMetric->set_id(metricId);
-    valueMetric->set_bucket(TimeUnit::FIVE_MINUTES);
-    valueMetric->set_what(cpuTimePerUidMatcher.id());
-    *valueMetric->mutable_value_field() =
-            CreateDimensions(util::CPU_TIME_PER_UID, {2 /* user_time_micros */});
-    valueMetric->add_slice_by_state(uidProcessState.id());
-    MetricStateLink* stateLink = valueMetric->add_state_link();
-    stateLink->set_state_atom_id(UID_PROCESS_STATE_ATOM_ID);
-    auto fieldsInWhat = stateLink->mutable_fields_in_what();
-    *fieldsInWhat = CreateDimensions(util::CPU_TIME_PER_UID, {1 /* uid */});
-    auto fieldsInState = stateLink->mutable_fields_in_state();
-    *fieldsInState = CreateDimensions(UID_PROCESS_STATE_ATOM_ID, {1 /* uid */});
-    valueMetric->set_max_pull_delay_sec(INT_MAX);
-
-    // Initialize StatsLogProcessor.
-    const uint64_t bucketStartTimeNs = 10000000000;  // 0:10
-    int uid = 12345;
-    int64_t cfgId = 98765;
-    ConfigKey cfgKey(uid, cfgId);
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-
-    // No StateTrackers are initialized.
-    EXPECT_EQ(0, StateManager::getInstance().getStateTrackersCount());
-
-    // Config initialization fails.
-    ASSERT_EQ(0, processor->mMetricsManagers.size());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp b/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
deleted file mode 100644
index 52bc222..0000000
--- a/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
+++ /dev/null
@@ -1,355 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <gtest/gtest.h>
-
-#include "src/StatsLogProcessor.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#ifdef __ANDROID__
-
-namespace {
-
-StatsdConfig CreateStatsdConfig(DurationMetric::AggregationType aggregationType) {
-    StatsdConfig config;
-    config.add_allowed_log_source("AID_ROOT"); // LogEvent defaults to UID of root.
-    *config.add_atom_matcher() = CreateScreenTurnedOnAtomMatcher();
-    *config.add_atom_matcher() = CreateScreenTurnedOffAtomMatcher();
-    *config.add_atom_matcher() = CreateAcquireWakelockAtomMatcher();
-    *config.add_atom_matcher() = CreateReleaseWakelockAtomMatcher();
-
-    auto screenIsOffPredicate = CreateScreenIsOffPredicate();
-    *config.add_predicate() = screenIsOffPredicate;
-
-    auto holdingWakelockPredicate = CreateHoldingWakelockPredicate();
-    // The predicate is dimensioning by any attribution node and both by uid and tag.
-    FieldMatcher dimensions = CreateAttributionUidAndTagDimensions(
-            util::WAKELOCK_STATE_CHANGED, {Position::FIRST, Position::LAST});
-    // Also slice by the wakelock tag
-    dimensions.add_child()->set_field(3);  // The wakelock tag is set in field 3 of the wakelock.
-    *holdingWakelockPredicate.mutable_simple_predicate()->mutable_dimensions() = dimensions;
-    *config.add_predicate() = holdingWakelockPredicate;
-
-    auto durationMetric = config.add_duration_metric();
-    durationMetric->set_id(StringToId("WakelockDuration"));
-    durationMetric->set_what(holdingWakelockPredicate.id());
-    durationMetric->set_condition(screenIsOffPredicate.id());
-    durationMetric->set_aggregation_type(aggregationType);
-    // The metric is dimensioning by first attribution node and only by uid.
-    *durationMetric->mutable_dimensions_in_what() =
-        CreateAttributionUidDimensions(
-            util::WAKELOCK_STATE_CHANGED, {Position::FIRST});
-    durationMetric->set_bucket(FIVE_MINUTES);
-    return config;
-}
-
-std::vector<int> attributionUids1 = {111, 222, 222};
-std::vector<string> attributionTags1 = {"App1", "GMSCoreModule1", "GMSCoreModule2"};
-
-std::vector<int> attributionUids2 = {111, 222, 222};
-std::vector<string> attributionTags2 = {"App2", "GMSCoreModule1", "GMSCoreModule2"};
-
-/*
-Events:
-Screen off is met from (200ns,1 min+500ns].
-Acquire event for wl1 from 2ns to 1min+2ns
-Acquire event for wl2 from 1min-10ns to 2min-15ns
-*/
-void FeedEvents(StatsdConfig config, sp<StatsLogProcessor> processor) {
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-
-    auto screenTurnedOnEvent = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 1, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    auto screenTurnedOffEvent = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 200, android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    auto screenTurnedOnEvent2 =
-            CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 500,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-
-    auto acquireEvent1 = CreateAcquireWakelockEvent(bucketStartTimeNs + 2, attributionUids1,
-                                                    attributionTags1, "wl1");
-    auto releaseEvent1 = CreateReleaseWakelockEvent(bucketStartTimeNs + bucketSizeNs + 2,
-                                                    attributionUids1, attributionTags1, "wl1");
-    auto acquireEvent2 = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs - 10,
-                                                    attributionUids2, attributionTags2, "wl2");
-    auto releaseEvent2 = CreateReleaseWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs - 15,
-                                                    attributionUids2, attributionTags2, "wl2");
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-
-    events.push_back(std::move(screenTurnedOnEvent));
-    events.push_back(std::move(screenTurnedOffEvent));
-    events.push_back(std::move(screenTurnedOnEvent2));
-    events.push_back(std::move(acquireEvent1));
-    events.push_back(std::move(acquireEvent2));
-    events.push_back(std::move(releaseEvent1));
-    events.push_back(std::move(releaseEvent2));
-
-    sortLogEventsByTimestamp(&events);
-
-    for (const auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-}
-
-}  // namespace
-
-TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForSumDuration1) {
-    ConfigKey cfgKey;
-    auto config = CreateStatsdConfig(DurationMetric::SUM);
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    FeedEvents(config, processor);
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-    // Only 1 dimension output. The tag dimension in the predicate has been aggregated.
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
-
-    auto data = reports.reports(0).metrics(0).duration_metrics().data(0);
-    // Validate dimension value.
-    ValidateAttributionUidDimension(data.dimensions_in_what(),
-                                    util::WAKELOCK_STATE_CHANGED, 111);
-    // Validate bucket info.
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data(0).bucket_info_size(), 1);
-    data = reports.reports(0).metrics(0).duration_metrics().data(0);
-    // The wakelock holding interval starts from the screen off event and to the end of the 1st
-    // bucket.
-    EXPECT_EQ((unsigned long long)data.bucket_info(0).duration_nanos(), bucketSizeNs - 200);
-}
-
-TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForSumDuration2) {
-    ConfigKey cfgKey;
-    auto config = CreateStatsdConfig(DurationMetric::SUM);
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    FeedEvents(config, processor);
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
-    // Dump the report after the end of 2nd bucket.
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data(0).bucket_info_size(), 2);
-    auto data = reports.reports(0).metrics(0).duration_metrics().data(0);
-    // Validate dimension value.
-    ValidateAttributionUidDimension(data.dimensions_in_what(),
-                                    util::WAKELOCK_STATE_CHANGED, 111);
-    // Two output buckets.
-    // The wakelock holding interval in the 1st bucket starts from the screen off event and to
-    // the end of the 1st bucket.
-    EXPECT_EQ((unsigned long long)data.bucket_info(0).duration_nanos(),
-              bucketStartTimeNs + bucketSizeNs - (bucketStartTimeNs + 200));
-    // The wakelock holding interval in the 2nd bucket starts at the beginning of the bucket and
-    // ends at the second screen on event.
-    EXPECT_EQ((unsigned long long)data.bucket_info(1).duration_nanos(), 500UL);
-}
-
-TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForSumDuration3) {
-    ConfigKey cfgKey;
-    auto config = CreateStatsdConfig(DurationMetric::SUM);
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    FeedEvents(config, processor);
-    vector<uint8_t> buffer;
-    ConfigMetricsReportList reports;
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(
-            CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * bucketSizeNs + 90,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_OFF));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 100,
-                                                attributionUids1, attributionTags1, "wl3"));
-    events.push_back(CreateReleaseWakelockEvent(bucketStartTimeNs + 5 * bucketSizeNs + 100,
-                                                attributionUids1, attributionTags1, "wl3"));
-    sortLogEventsByTimestamp(&events);
-    for (const auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 6 * bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data(0).bucket_info_size(), 6);
-    auto data = reports.reports(0).metrics(0).duration_metrics().data(0);
-    ValidateAttributionUidDimension(data.dimensions_in_what(),
-                                    util::WAKELOCK_STATE_CHANGED, 111);
-    // The last wakelock holding spans 4 buckets.
-    EXPECT_EQ((unsigned long long)data.bucket_info(2).duration_nanos(), bucketSizeNs - 100);
-    EXPECT_EQ((unsigned long long)data.bucket_info(3).duration_nanos(), bucketSizeNs);
-    EXPECT_EQ((unsigned long long)data.bucket_info(4).duration_nanos(), bucketSizeNs);
-    EXPECT_EQ((unsigned long long)data.bucket_info(5).duration_nanos(), 100UL);
-}
-
-TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForMaxDuration1) {
-    ConfigKey cfgKey;
-    auto config = CreateStatsdConfig(DurationMetric::MAX_SPARSE);
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    FeedEvents(config, processor);
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-
-    ASSERT_EQ(reports.reports_size(), 1);
-
-    // When using ProtoOutputStream, if nothing written to a sub msg, it won't be treated as
-    // one. It was previsouly 1 because we had a fake onDumpReport which calls add_metric() by
-    // itself.
-    ASSERT_EQ(1, reports.reports(0).metrics_size());
-    ASSERT_EQ(0, reports.reports(0).metrics(0).duration_metrics().data_size());
-}
-
-TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForMaxDuration2) {
-    ConfigKey cfgKey;
-    auto config = CreateStatsdConfig(DurationMetric::MAX_SPARSE);
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    FeedEvents(config, processor);
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
-    // Dump the report after the end of 2nd bucket. One dimension with one bucket.
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data(0).bucket_info_size(), 1);
-    auto data = reports.reports(0).metrics(0).duration_metrics().data(0);
-    // Validate dimension value.
-    ValidateAttributionUidDimension(data.dimensions_in_what(),
-                                    util::WAKELOCK_STATE_CHANGED, 111);
-    // The max is acquire event for wl1 to screen off start.
-    EXPECT_EQ((unsigned long long)data.bucket_info(0).duration_nanos(), bucketSizeNs + 2 - 200);
-}
-
-TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensionsForMaxDuration3) {
-    ConfigKey cfgKey;
-    auto config = CreateStatsdConfig(DurationMetric::MAX_SPARSE);
-    uint64_t bucketStartTimeNs = 10000000000;
-    uint64_t bucketSizeNs =
-            TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1000000LL;
-    auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey);
-    ASSERT_EQ(processor->mMetricsManagers.size(), 1u);
-    EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
-    FeedEvents(config, processor);
-    ConfigMetricsReportList reports;
-    vector<uint8_t> buffer;
-
-    std::vector<std::unique_ptr<LogEvent>> events;
-    events.push_back(
-            CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * bucketSizeNs + 90,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_OFF));
-    events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 100,
-                                                attributionUids1, attributionTags1, "wl3"));
-    events.push_back(CreateReleaseWakelockEvent(bucketStartTimeNs + 5 * bucketSizeNs + 100,
-                                                attributionUids1, attributionTags1, "wl3"));
-    sortLogEventsByTimestamp(&events);
-    for (const auto& event : events) {
-        processor->OnLogEvent(event.get());
-    }
-
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 6 * bucketSizeNs + 1, false, true, ADB_DUMP,
-                            FAST, &buffer);
-    EXPECT_TRUE(buffer.size() > 0);
-    EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
-    backfillDimensionPath(&reports);
-    backfillStringInReport(&reports);
-    backfillStartEndTimestamp(&reports);
-    ASSERT_EQ(reports.reports_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
-    ASSERT_EQ(reports.reports(0).metrics(0).duration_metrics().data(0).bucket_info_size(), 2);
-    auto data = reports.reports(0).metrics(0).duration_metrics().data(0);
-    ValidateAttributionUidDimension(data.dimensions_in_what(),
-                                    util::WAKELOCK_STATE_CHANGED, 111);
-    // The last wakelock holding spans 4 buckets.
-    EXPECT_EQ((unsigned long long)data.bucket_info(1).duration_nanos(), 3 * bucketSizeNs);
-    EXPECT_EQ((unsigned long long)data.bucket_info(1).start_bucket_elapsed_nanos(),
-              bucketStartTimeNs + 5 * bucketSizeNs);
-    EXPECT_EQ((unsigned long long)data.bucket_info(1).end_bucket_elapsed_nanos(),
-              bucketStartTimeNs + 6 * bucketSizeNs);
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/external/StatsCallbackPuller_test.cpp b/cmds/statsd/tests/external/StatsCallbackPuller_test.cpp
deleted file mode 100644
index 85a6088..0000000
--- a/cmds/statsd/tests/external/StatsCallbackPuller_test.cpp
+++ /dev/null
@@ -1,219 +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.
-
-#include "src/external/StatsCallbackPuller.h"
-
-#include <aidl/android/os/BnPullAtomCallback.h>
-#include <aidl/android/os/IPullAtomResultReceiver.h>
-#include <aidl/android/util/StatsEventParcel.h>
-#include <android/binder_interface_utils.h>
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-
-#include <chrono>
-#include <thread>
-#include <vector>
-
-#include "../metrics/metrics_test_helper.h"
-#include "src/stats_log_util.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using namespace testing;
-using Status = ::ndk::ScopedAStatus;
-using aidl::android::os::BnPullAtomCallback;
-using aidl::android::os::IPullAtomResultReceiver;
-using aidl::android::util::StatsEventParcel;
-using ::ndk::SharedRefBase;
-using std::make_shared;
-using std::shared_ptr;
-using std::vector;
-using std::this_thread::sleep_for;
-using testing::Contains;
-
-namespace {
-int pullTagId = -12;
-bool pullSuccess;
-vector<int64_t> values;
-int64_t pullDelayNs;
-int64_t pullTimeoutNs;
-int64_t pullCoolDownNs;
-std::thread pullThread;
-
-AStatsEvent* createSimpleEvent(int64_t value) {
-    AStatsEvent* event = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(event, pullTagId);
-    AStatsEvent_writeInt64(event, value);
-    AStatsEvent_build(event);
-    return event;
-}
-
-void executePull(const shared_ptr<IPullAtomResultReceiver>& resultReceiver) {
-    // Convert stats_events into StatsEventParcels.
-    vector<StatsEventParcel> parcels;
-    for (int i = 0; i < values.size(); i++) {
-        AStatsEvent* event = createSimpleEvent(values[i]);
-        size_t size;
-        uint8_t* buffer = AStatsEvent_getBuffer(event, &size);
-
-        StatsEventParcel p;
-        // vector.assign() creates a copy, but this is inevitable unless
-        // stats_event.h/c uses a vector as opposed to a buffer.
-        p.buffer.assign(buffer, buffer + size);
-        parcels.push_back(std::move(p));
-        AStatsEvent_release(event);
-    }
-
-    sleep_for(std::chrono::nanoseconds(pullDelayNs));
-    resultReceiver->pullFinished(pullTagId, pullSuccess, parcels);
-}
-
-class FakePullAtomCallback : public BnPullAtomCallback {
-public:
-    Status onPullAtom(int atomTag,
-                      const shared_ptr<IPullAtomResultReceiver>& resultReceiver) override {
-        // Force pull to happen in separate thread to simulate binder.
-        pullThread = std::thread(executePull, resultReceiver);
-        return Status::ok();
-    }
-};
-
-class StatsCallbackPullerTest : public ::testing::Test {
-public:
-    StatsCallbackPullerTest() {
-    }
-
-    void SetUp() override {
-        pullSuccess = false;
-        pullDelayNs = 0;
-        values.clear();
-        pullTimeoutNs = 10000000000LL;  // 10 seconds.
-        pullCoolDownNs = 1000000000;    // 1 second.
-    }
-
-    void TearDown() override {
-        if (pullThread.joinable()) {
-            pullThread.join();
-        }
-        values.clear();
-    }
-};
-}  // Anonymous namespace.
-
-TEST_F(StatsCallbackPullerTest, PullSuccess) {
-    shared_ptr<FakePullAtomCallback> cb = SharedRefBase::make<FakePullAtomCallback>();
-    int64_t value = 43;
-    pullSuccess = true;
-    values.push_back(value);
-
-    StatsCallbackPuller puller(pullTagId, cb, pullCoolDownNs, pullTimeoutNs, {});
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    int64_t startTimeNs = getElapsedRealtimeNs();
-    EXPECT_TRUE(puller.PullInternal(&dataHolder));
-    int64_t endTimeNs = getElapsedRealtimeNs();
-
-    ASSERT_EQ(1, dataHolder.size());
-    EXPECT_EQ(pullTagId, dataHolder[0]->GetTagId());
-    EXPECT_LT(startTimeNs, dataHolder[0]->GetElapsedTimestampNs());
-    EXPECT_GT(endTimeNs, dataHolder[0]->GetElapsedTimestampNs());
-    ASSERT_EQ(1, dataHolder[0]->size());
-    EXPECT_EQ(value, dataHolder[0]->getValues()[0].mValue.int_value);
-}
-
-TEST_F(StatsCallbackPullerTest, PullFail) {
-    shared_ptr<FakePullAtomCallback> cb = SharedRefBase::make<FakePullAtomCallback>();
-    pullSuccess = false;
-    int64_t value = 1234;
-    values.push_back(value);
-
-    StatsCallbackPuller puller(pullTagId, cb, pullCoolDownNs, pullTimeoutNs, {});
-
-    vector<shared_ptr<LogEvent>> dataHolder;
-    EXPECT_FALSE(puller.PullInternal(&dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-TEST_F(StatsCallbackPullerTest, PullTimeout) {
-    shared_ptr<FakePullAtomCallback> cb = SharedRefBase::make<FakePullAtomCallback>();
-    pullSuccess = true;
-    pullDelayNs = MillisToNano(5);  // 5ms.
-    pullTimeoutNs = 10000;    // 10 microseconds.
-    int64_t value = 4321;
-    values.push_back(value);
-
-    StatsCallbackPuller puller(pullTagId, cb, pullCoolDownNs, pullTimeoutNs, {});
-
-    vector<shared_ptr<LogEvent>> dataHolder;
-    int64_t startTimeNs = getElapsedRealtimeNs();
-    // Returns true to let StatsPuller code evaluate the timeout.
-    EXPECT_TRUE(puller.PullInternal(&dataHolder));
-    int64_t endTimeNs = getElapsedRealtimeNs();
-    int64_t actualPullDurationNs = endTimeNs - startTimeNs;
-
-    // Pull should take at least the timeout amount of time, but should stop early because the delay
-    // is bigger.
-    EXPECT_LT(pullTimeoutNs, actualPullDurationNs);
-    EXPECT_GT(pullDelayNs, actualPullDurationNs);
-    ASSERT_EQ(0, dataHolder.size());
-
-    // Let the pull return and make sure that the dataHolder is not modified.
-    pullThread.join();
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-// Register a puller and ensure that the timeout logic works.
-TEST_F(StatsCallbackPullerTest, RegisterAndTimeout) {
-    shared_ptr<FakePullAtomCallback> cb = SharedRefBase::make<FakePullAtomCallback>();
-    pullSuccess = true;
-    pullDelayNs = MillisToNano(5);  // 5 ms.
-    pullTimeoutNs = 10000;    // 10 microsseconds.
-    int64_t value = 4321;
-    int32_t uid = 123;
-    values.push_back(value);
-
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    pullerManager->RegisterPullAtomCallback(uid, pullTagId, pullCoolDownNs, pullTimeoutNs,
-                                            vector<int32_t>(), cb);
-    vector<shared_ptr<LogEvent>> dataHolder;
-    int64_t startTimeNs = getElapsedRealtimeNs();
-    // Returns false, since StatsPuller code will evaluate the timeout.
-    EXPECT_FALSE(pullerManager->Pull(pullTagId, {uid}, startTimeNs, &dataHolder));
-    int64_t endTimeNs = getElapsedRealtimeNs();
-    int64_t actualPullDurationNs = endTimeNs - startTimeNs;
-
-    // Pull should take at least the timeout amount of time, but should stop early because the delay
-    // is bigger. Make sure that the time is closer to the timeout, than to the intended delay.
-    EXPECT_LT(pullTimeoutNs, actualPullDurationNs);
-    EXPECT_GT(pullDelayNs / 5, actualPullDurationNs);
-    ASSERT_EQ(0, dataHolder.size());
-
-    // Let the pull return and make sure that the dataHolder is not modified.
-    pullThread.join();
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/external/StatsPullerManager_test.cpp b/cmds/statsd/tests/external/StatsPullerManager_test.cpp
deleted file mode 100644
index c76e85e..0000000
--- a/cmds/statsd/tests/external/StatsPullerManager_test.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright (C) 2020 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 "src/external/StatsPullerManager.h"
-
-#include <aidl/android/os/IPullAtomResultReceiver.h>
-#include <aidl/android/util/StatsEventParcel.h>
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-using aidl::android::util::StatsEventParcel;
-using ::ndk::SharedRefBase;
-using std::make_shared;
-using std::shared_ptr;
-using std::vector;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-namespace {
-
-int pullTagId1 = 10101;
-int pullTagId2 = 10102;
-int uid1 = 9999;
-int uid2 = 8888;
-ConfigKey configKey(50, 12345);
-ConfigKey badConfigKey(60, 54321);
-int unregisteredUid = 98765;
-int64_t coolDownNs = NS_PER_SEC;
-int64_t timeoutNs = NS_PER_SEC / 2;
-
-AStatsEvent* createSimpleEvent(int32_t atomId, int32_t value) {
-    AStatsEvent* event = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(event, atomId);
-    AStatsEvent_writeInt32(event, value);
-    AStatsEvent_build(event);
-    return event;
-}
-
-class FakePullAtomCallback : public BnPullAtomCallback {
-public:
-    FakePullAtomCallback(int32_t uid) : mUid(uid){};
-    Status onPullAtom(int atomTag,
-                      const shared_ptr<IPullAtomResultReceiver>& resultReceiver) override {
-        vector<StatsEventParcel> parcels;
-        AStatsEvent* event = createSimpleEvent(atomTag, mUid);
-        size_t size;
-        uint8_t* buffer = AStatsEvent_getBuffer(event, &size);
-
-        StatsEventParcel p;
-        // vector.assign() creates a copy, but this is inevitable unless
-        // stats_event.h/c uses a vector as opposed to a buffer.
-        p.buffer.assign(buffer, buffer + size);
-        parcels.push_back(std::move(p));
-        AStatsEvent_release(event);
-        resultReceiver->pullFinished(atomTag, /*success*/ true, parcels);
-        return Status::ok();
-    }
-    int32_t mUid;
-};
-
-class FakePullUidProvider : public PullUidProvider {
-public:
-    vector<int32_t> getPullAtomUids(int atomId) override {
-        if (atomId == pullTagId1) {
-            return {uid2, uid1};
-        } else if (atomId == pullTagId2) {
-            return {uid2};
-        }
-        return {};
-    }
-};
-
-sp<StatsPullerManager> createPullerManagerAndRegister() {
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    shared_ptr<FakePullAtomCallback> cb1 = SharedRefBase::make<FakePullAtomCallback>(uid1);
-    pullerManager->RegisterPullAtomCallback(uid1, pullTagId1, coolDownNs, timeoutNs, {}, cb1, true);
-    shared_ptr<FakePullAtomCallback> cb2 = SharedRefBase::make<FakePullAtomCallback>(uid2);
-    pullerManager->RegisterPullAtomCallback(uid2, pullTagId1, coolDownNs, timeoutNs, {}, cb2, true);
-    pullerManager->RegisterPullAtomCallback(uid1, pullTagId2, coolDownNs, timeoutNs, {}, cb1, true);
-    return pullerManager;
-}
-}  // anonymous namespace
-
-TEST(StatsPullerManagerTest, TestPullInvalidUid) {
-    sp<StatsPullerManager> pullerManager = createPullerManagerAndRegister();
-
-    vector<shared_ptr<LogEvent>> data;
-    EXPECT_FALSE(pullerManager->Pull(pullTagId1, {unregisteredUid}, /*timestamp =*/1, &data, true));
-}
-
-TEST(StatsPullerManagerTest, TestPullChoosesCorrectUid) {
-    sp<StatsPullerManager> pullerManager = createPullerManagerAndRegister();
-
-    vector<shared_ptr<LogEvent>> data;
-    EXPECT_TRUE(pullerManager->Pull(pullTagId1, {uid1}, /*timestamp =*/1, &data, true));
-    ASSERT_EQ(data.size(), 1);
-    EXPECT_EQ(data[0]->GetTagId(), pullTagId1);
-    ASSERT_EQ(data[0]->getValues().size(), 1);
-    EXPECT_EQ(data[0]->getValues()[0].mValue.int_value, uid1);
-}
-
-TEST(StatsPullerManagerTest, TestPullInvalidConfigKey) {
-    sp<StatsPullerManager> pullerManager = createPullerManagerAndRegister();
-    sp<FakePullUidProvider> uidProvider = new FakePullUidProvider();
-    pullerManager->RegisterPullUidProvider(configKey, uidProvider);
-
-    vector<shared_ptr<LogEvent>> data;
-    EXPECT_FALSE(pullerManager->Pull(pullTagId1, badConfigKey, /*timestamp =*/1, &data, true));
-}
-
-TEST(StatsPullerManagerTest, TestPullConfigKeyGood) {
-    sp<StatsPullerManager> pullerManager = createPullerManagerAndRegister();
-    sp<FakePullUidProvider> uidProvider = new FakePullUidProvider();
-    pullerManager->RegisterPullUidProvider(configKey, uidProvider);
-
-    vector<shared_ptr<LogEvent>> data;
-    EXPECT_TRUE(pullerManager->Pull(pullTagId1, configKey, /*timestamp =*/1, &data, true));
-    EXPECT_EQ(data[0]->GetTagId(), pullTagId1);
-    ASSERT_EQ(data[0]->getValues().size(), 1);
-    EXPECT_EQ(data[0]->getValues()[0].mValue.int_value, uid2);
-}
-
-TEST(StatsPullerManagerTest, TestPullConfigKeyNoPullerWithUid) {
-    sp<StatsPullerManager> pullerManager = createPullerManagerAndRegister();
-    sp<FakePullUidProvider> uidProvider = new FakePullUidProvider();
-    pullerManager->RegisterPullUidProvider(configKey, uidProvider);
-
-    vector<shared_ptr<LogEvent>> data;
-    EXPECT_FALSE(pullerManager->Pull(pullTagId2, configKey, /*timestamp =*/1, &data, true));
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
\ No newline at end of file
diff --git a/cmds/statsd/tests/external/StatsPuller_test.cpp b/cmds/statsd/tests/external/StatsPuller_test.cpp
deleted file mode 100644
index 55a9036..0000000
--- a/cmds/statsd/tests/external/StatsPuller_test.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 <stdio.h>
-
-#include <chrono>
-#include <thread>
-#include <vector>
-
-#include "../metrics/metrics_test_helper.h"
-#include "src/stats_log_util.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using namespace testing;
-using std::make_shared;
-using std::shared_ptr;
-using std::vector;
-using std::this_thread::sleep_for;
-using testing::Contains;
-
-namespace {
-int pullTagId = 10014;
-
-bool pullSuccess;
-vector<std::shared_ptr<LogEvent>> pullData;
-long pullDelayNs;
-
-class FakePuller : public StatsPuller {
-public:
-    FakePuller()
-        : StatsPuller(pullTagId, /*coolDownNs=*/MillisToNano(10), /*timeoutNs=*/MillisToNano(5)){};
-
-private:
-    bool PullInternal(vector<std::shared_ptr<LogEvent>>* data) override {
-        (*data) = pullData;
-        sleep_for(std::chrono::nanoseconds(pullDelayNs));
-        return pullSuccess;
-    }
-};
-
-FakePuller puller;
-
-std::unique_ptr<LogEvent> createSimpleEvent(int64_t eventTimeNs, int64_t value) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, pullTagId);
-    AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs);
-    AStatsEvent_writeInt64(statsEvent, value);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-class StatsPullerTest : public ::testing::Test {
-public:
-    StatsPullerTest() {
-    }
-
-    void SetUp() override {
-        puller.ForceClearCache();
-        pullSuccess = false;
-        pullDelayNs = 0;
-        pullData.clear();
-    }
-};
-
-}  // Anonymous namespace.
-
-TEST_F(StatsPullerTest, PullSuccess) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-
-    pullSuccess = true;
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_TRUE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(1, dataHolder.size());
-    EXPECT_EQ(pullTagId, dataHolder[0]->GetTagId());
-    EXPECT_EQ(1111L, dataHolder[0]->GetElapsedTimestampNs());
-    ASSERT_EQ(1, dataHolder[0]->size());
-    EXPECT_EQ(33, dataHolder[0]->getValues()[0].mValue.int_value);
-
-    sleep_for(std::chrono::milliseconds(11));
-
-    pullData.clear();
-    pullData.push_back(createSimpleEvent(2222L, 44));
-
-    pullSuccess = true;
-
-    EXPECT_TRUE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(1, dataHolder.size());
-    EXPECT_EQ(pullTagId, dataHolder[0]->GetTagId());
-    EXPECT_EQ(2222L, dataHolder[0]->GetElapsedTimestampNs());
-    ASSERT_EQ(1, dataHolder[0]->size());
-    EXPECT_EQ(44, dataHolder[0]->getValues()[0].mValue.int_value);
-}
-
-TEST_F(StatsPullerTest, PullFailAfterSuccess) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-
-    pullSuccess = true;
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_TRUE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(1, dataHolder.size());
-    EXPECT_EQ(pullTagId, dataHolder[0]->GetTagId());
-    EXPECT_EQ(1111L, dataHolder[0]->GetElapsedTimestampNs());
-    ASSERT_EQ(1, dataHolder[0]->size());
-    EXPECT_EQ(33, dataHolder[0]->getValues()[0].mValue.int_value);
-
-    sleep_for(std::chrono::milliseconds(11));
-
-    pullData.clear();
-    pullData.push_back(createSimpleEvent(2222L, 44));
-
-    pullSuccess = false;
-    dataHolder.clear();
-    EXPECT_FALSE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-
-    // Fails due to hitting the cool down.
-    pullSuccess = true;
-    dataHolder.clear();
-    EXPECT_FALSE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-// Test pull takes longer than timeout, 2nd pull happens shorter than cooldown
-TEST_F(StatsPullerTest, PullTakeTooLongAndPullFast) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-    pullSuccess = true;
-    // timeout is 5ms
-    pullDelayNs = MillisToNano(6);
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_FALSE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-
-    pullData.clear();
-    pullData.push_back(createSimpleEvent(2222L, 44));
-    pullDelayNs = 0;
-
-    pullSuccess = true;
-    dataHolder.clear();
-    EXPECT_FALSE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-TEST_F(StatsPullerTest, PullFail) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-
-    pullSuccess = false;
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_FALSE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-TEST_F(StatsPullerTest, PullTakeTooLong) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-
-    pullSuccess = true;
-    pullDelayNs = MillisToNano(6);
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_FALSE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-TEST_F(StatsPullerTest, PullTooFast) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-
-    pullSuccess = true;
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_TRUE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(1, dataHolder.size());
-    EXPECT_EQ(pullTagId, dataHolder[0]->GetTagId());
-    EXPECT_EQ(1111L, dataHolder[0]->GetElapsedTimestampNs());
-    ASSERT_EQ(1, dataHolder[0]->size());
-    EXPECT_EQ(33, dataHolder[0]->getValues()[0].mValue.int_value);
-
-    pullData.clear();
-    pullData.push_back(createSimpleEvent(2222L, 44));
-
-    pullSuccess = true;
-
-    dataHolder.clear();
-    EXPECT_TRUE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(1, dataHolder.size());
-    EXPECT_EQ(pullTagId, dataHolder[0]->GetTagId());
-    EXPECT_EQ(1111L, dataHolder[0]->GetElapsedTimestampNs());
-    ASSERT_EQ(1, dataHolder[0]->size());
-    EXPECT_EQ(33, dataHolder[0]->getValues()[0].mValue.int_value);
-}
-
-TEST_F(StatsPullerTest, PullFailsAndTooFast) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-
-    pullSuccess = false;
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_FALSE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-
-    pullData.clear();
-    pullData.push_back(createSimpleEvent(2222L, 44));
-
-    pullSuccess = true;
-
-    EXPECT_FALSE(puller.Pull(getElapsedRealtimeNs(), &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-TEST_F(StatsPullerTest, PullSameEventTime) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-
-    pullSuccess = true;
-    int64_t eventTimeNs = getElapsedRealtimeNs();
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_TRUE(puller.Pull(eventTimeNs, &dataHolder));
-    ASSERT_EQ(1, dataHolder.size());
-    EXPECT_EQ(pullTagId, dataHolder[0]->GetTagId());
-    EXPECT_EQ(1111L, dataHolder[0]->GetElapsedTimestampNs());
-    ASSERT_EQ(1, dataHolder[0]->size());
-    EXPECT_EQ(33, dataHolder[0]->getValues()[0].mValue.int_value);
-
-    pullData.clear();
-    pullData.push_back(createSimpleEvent(2222L, 44));
-
-    // Sleep to ensure the cool down expires.
-    sleep_for(std::chrono::milliseconds(11));
-    pullSuccess = true;
-
-    dataHolder.clear();
-    EXPECT_TRUE(puller.Pull(eventTimeNs, &dataHolder));
-    ASSERT_EQ(1, dataHolder.size());
-    EXPECT_EQ(pullTagId, dataHolder[0]->GetTagId());
-    EXPECT_EQ(1111L, dataHolder[0]->GetElapsedTimestampNs());
-    ASSERT_EQ(1, dataHolder[0]->size());
-    EXPECT_EQ(33, dataHolder[0]->getValues()[0].mValue.int_value);
-}
-
-// Test pull takes longer than timeout, 2nd pull happens at same event time
-TEST_F(StatsPullerTest, PullTakeTooLongAndPullSameEventTime) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-    pullSuccess = true;
-    int64_t eventTimeNs = getElapsedRealtimeNs();
-    // timeout is 5ms
-    pullDelayNs = MillisToNano(6);
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_FALSE(puller.Pull(eventTimeNs, &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-
-    // Sleep to ensure the cool down expires. 6ms is taken by the delay, so only 5 is needed here.
-    sleep_for(std::chrono::milliseconds(5));
-
-    pullData.clear();
-    pullData.push_back(createSimpleEvent(2222L, 44));
-    pullDelayNs = 0;
-
-    pullSuccess = true;
-    dataHolder.clear();
-    EXPECT_FALSE(puller.Pull(eventTimeNs, &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-TEST_F(StatsPullerTest, PullFailsAndPullSameEventTime) {
-    pullData.push_back(createSimpleEvent(1111L, 33));
-
-    pullSuccess = false;
-    int64_t eventTimeNs = getElapsedRealtimeNs();
-
-    vector<std::shared_ptr<LogEvent>> dataHolder;
-    EXPECT_FALSE(puller.Pull(eventTimeNs, &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-
-    // Sleep to ensure the cool down expires.
-    sleep_for(std::chrono::milliseconds(11));
-
-    pullData.clear();
-    pullData.push_back(createSimpleEvent(2222L, 44));
-
-    pullSuccess = true;
-
-    EXPECT_FALSE(puller.Pull(eventTimeNs, &dataHolder));
-    ASSERT_EQ(0, dataHolder.size());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/external/puller_util_test.cpp b/cmds/statsd/tests/external/puller_util_test.cpp
deleted file mode 100644
index a21dc87..0000000
--- a/cmds/statsd/tests/external/puller_util_test.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 "external/puller_util.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-
-#include <vector>
-
-#include "../metrics/metrics_test_helper.h"
-#include "FieldValue.h"
-#include "annotations.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using namespace testing;
-using std::shared_ptr;
-using std::vector;
-/*
- * Test merge isolated and host uid
- */
-namespace {
-const int uidAtomTagId = 100;
-const vector<int> additiveFields = {3};
-const int nonUidAtomTagId = 200;
-const int timestamp = 1234;
-const int isolatedUid1 = 30;
-const int isolatedUid2 = 40;
-const int isolatedNonAdditiveData = 32;
-const int isolatedAdditiveData = 31;
-const int hostUid = 20;
-const int hostNonAdditiveData = 22;
-const int hostAdditiveData = 21;
-const int attributionAtomTagId = 300;
-
-sp<MockUidMap> makeMockUidMap() {
-    return makeMockUidMapForOneHost(hostUid, {isolatedUid1, isolatedUid2});
-}
-
-}  // anonymous namespace
-
-TEST(PullerUtilTest, MergeNoDimension) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 30->22->31
-            makeUidLogEvent(uidAtomTagId, timestamp, isolatedUid1, hostNonAdditiveData,
-                            isolatedAdditiveData),
-
-            // 20->22->21
-            makeUidLogEvent(uidAtomTagId, timestamp, hostUid, hostNonAdditiveData,
-                            hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, uidAtomTagId, additiveFields);
-
-    ASSERT_EQ(1, (int)data.size());
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData + hostAdditiveData, actualFieldValues->at(2).mValue.int_value);
-}
-
-TEST(PullerUtilTest, MergeWithDimension) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 30->32->31
-            makeUidLogEvent(uidAtomTagId, timestamp, isolatedUid1, isolatedNonAdditiveData,
-                            isolatedAdditiveData),
-
-            // 20->32->21
-            makeUidLogEvent(uidAtomTagId, timestamp, hostUid, isolatedNonAdditiveData,
-                            hostAdditiveData),
-
-            // 20->22->21
-            makeUidLogEvent(uidAtomTagId, timestamp, hostUid, hostNonAdditiveData,
-                            hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, uidAtomTagId, additiveFields);
-
-    ASSERT_EQ(2, (int)data.size());
-
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData, actualFieldValues->at(2).mValue.int_value);
-
-    actualFieldValues = &data[1]->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData + isolatedAdditiveData, actualFieldValues->at(2).mValue.int_value);
-}
-
-TEST(PullerUtilTest, NoMergeHostUidOnly) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 20->32->31
-            makeUidLogEvent(uidAtomTagId, timestamp, hostUid, isolatedNonAdditiveData,
-                            isolatedAdditiveData),
-
-            // 20->22->21
-            makeUidLogEvent(uidAtomTagId, timestamp, hostUid, hostNonAdditiveData,
-                            hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, uidAtomTagId, additiveFields);
-
-    ASSERT_EQ(2, (int)data.size());
-
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData, actualFieldValues->at(2).mValue.int_value);
-
-    actualFieldValues = &data[1]->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData, actualFieldValues->at(2).mValue.int_value);
-}
-
-TEST(PullerUtilTest, IsolatedUidOnly) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 30->32->31
-            makeUidLogEvent(uidAtomTagId, timestamp, isolatedUid1, isolatedNonAdditiveData,
-                            isolatedAdditiveData),
-
-            // 30->22->21
-            makeUidLogEvent(uidAtomTagId, timestamp, isolatedUid1, hostNonAdditiveData,
-                            hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, uidAtomTagId, additiveFields);
-
-    ASSERT_EQ(2, (int)data.size());
-
-    // 20->32->31
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData, actualFieldValues->at(2).mValue.int_value);
-
-    // 20->22->21
-    actualFieldValues = &data[1]->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData, actualFieldValues->at(2).mValue.int_value);
-}
-
-TEST(PullerUtilTest, MultipleIsolatedUidToOneHostUid) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 30->32->31
-            makeUidLogEvent(uidAtomTagId, timestamp, isolatedUid1, isolatedNonAdditiveData,
-                            isolatedAdditiveData),
-
-            // 31->32->21
-            makeUidLogEvent(uidAtomTagId, timestamp, isolatedUid2, isolatedNonAdditiveData,
-                            hostAdditiveData),
-
-            // 20->32->21
-            makeUidLogEvent(uidAtomTagId, timestamp, hostUid, isolatedNonAdditiveData,
-                            hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, uidAtomTagId, additiveFields);
-
-    ASSERT_EQ(1, (int)data.size());
-
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(3, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(1).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData + hostAdditiveData + hostAdditiveData,
-              actualFieldValues->at(2).mValue.int_value);
-}
-
-TEST(PullerUtilTest, NoNeedToMerge) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 32->31
-            CreateTwoValueLogEvent(nonUidAtomTagId, timestamp, isolatedNonAdditiveData,
-                                   isolatedAdditiveData),
-
-            // 22->21
-            CreateTwoValueLogEvent(nonUidAtomTagId, timestamp, hostNonAdditiveData,
-                                   hostAdditiveData),
-
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, nonUidAtomTagId, {} /*no additive fields*/);
-
-    ASSERT_EQ(2, (int)data.size());
-
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(2, actualFieldValues->size());
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData, actualFieldValues->at(1).mValue.int_value);
-
-    actualFieldValues = &data[1]->getValues();
-    ASSERT_EQ(2, actualFieldValues->size());
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData, actualFieldValues->at(1).mValue.int_value);
-}
-
-TEST(PullerUtilTest, MergeNoDimensionAttributionChain) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 30->tag1->400->tag2->22->31
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {isolatedUid1, 400},
-                                    {"tag1", "tag2"}, hostNonAdditiveData, isolatedAdditiveData),
-
-            // 20->tag1->400->tag2->22->21
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {hostUid, 400},
-                                    {"tag1", "tag2"}, hostNonAdditiveData, hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, attributionAtomTagId, additiveFields);
-
-    ASSERT_EQ(1, (int)data.size());
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(400, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData + hostAdditiveData, actualFieldValues->at(5).mValue.int_value);
-}
-
-TEST(PullerUtilTest, MergeWithDimensionAttributionChain) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 200->tag1->30->tag2->32->31
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {200, isolatedUid1},
-                                    {"tag1", "tag2"}, isolatedNonAdditiveData,
-                                    isolatedAdditiveData),
-
-            // 200->tag1->20->tag2->32->21
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {200, hostUid},
-                                    {"tag1", "tag2"}, isolatedNonAdditiveData, hostAdditiveData),
-
-            // 200->tag1->20->tag2->22->21
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {200, hostUid},
-                                    {"tag1", "tag2"}, hostNonAdditiveData, hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, attributionAtomTagId, additiveFields);
-
-    ASSERT_EQ(2, (int)data.size());
-
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(200, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(hostUid, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData, actualFieldValues->at(5).mValue.int_value);
-
-    actualFieldValues = &data[1]->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(200, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(hostUid, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData + isolatedAdditiveData, actualFieldValues->at(5).mValue.int_value);
-}
-
-TEST(PullerUtilTest, NoMergeHostUidOnlyAttributionChain) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 20->tag1->400->tag2->32->31
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {hostUid, 400},
-                                    {"tag1", "tag2"}, isolatedNonAdditiveData,
-                                    isolatedAdditiveData),
-
-            // 20->tag1->400->tag2->22->21
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {hostUid, 400},
-                                    {"tag1", "tag2"}, hostNonAdditiveData, hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, attributionAtomTagId, additiveFields);
-
-    ASSERT_EQ(2, (int)data.size());
-
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(400, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData, actualFieldValues->at(5).mValue.int_value);
-
-    actualFieldValues = &data[1]->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(400, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData, actualFieldValues->at(5).mValue.int_value);
-}
-
-TEST(PullerUtilTest, IsolatedUidOnlyAttributionChain) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 30->tag1->400->tag2->32->31
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {isolatedUid1, 400},
-                                    {"tag1", "tag2"}, isolatedNonAdditiveData,
-                                    isolatedAdditiveData),
-
-            // 30->tag1->400->tag2->22->21
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {isolatedUid1, 400},
-                                    {"tag1", "tag2"}, hostNonAdditiveData, hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, attributionAtomTagId, additiveFields);
-
-    ASSERT_EQ(2, (int)data.size());
-
-    // 20->tag1->400->tag2->32->31
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(400, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(hostNonAdditiveData, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(hostAdditiveData, actualFieldValues->at(5).mValue.int_value);
-
-    // 20->tag1->400->tag2->22->21
-    actualFieldValues = &data[1]->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(400, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData, actualFieldValues->at(5).mValue.int_value);
-}
-
-TEST(PullerUtilTest, MultipleIsolatedUidToOneHostUidAttributionChain) {
-    vector<shared_ptr<LogEvent>> data = {
-            // 30->tag1->400->tag2->32->31
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {isolatedUid1, 400},
-                                    {"tag1", "tag2"}, isolatedNonAdditiveData,
-                                    isolatedAdditiveData),
-
-            // 31->tag1->400->tag2->32->21
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {isolatedUid2, 400},
-                                    {"tag1", "tag2"}, isolatedNonAdditiveData, hostAdditiveData),
-
-            // 20->tag1->400->tag2->32->21
-            makeAttributionLogEvent(attributionAtomTagId, timestamp, {hostUid, 400},
-                                    {"tag1", "tag2"}, isolatedNonAdditiveData, hostAdditiveData),
-    };
-
-    sp<MockUidMap> uidMap = makeMockUidMap();
-    mapAndMergeIsolatedUidsToHostUid(data, uidMap, attributionAtomTagId, additiveFields);
-
-    ASSERT_EQ(1, (int)data.size());
-
-    const vector<FieldValue>* actualFieldValues = &data[0]->getValues();
-    ASSERT_EQ(6, actualFieldValues->size());
-    EXPECT_EQ(hostUid, actualFieldValues->at(0).mValue.int_value);
-    EXPECT_EQ("tag1", actualFieldValues->at(1).mValue.str_value);
-    EXPECT_EQ(400, actualFieldValues->at(2).mValue.int_value);
-    EXPECT_EQ("tag2", actualFieldValues->at(3).mValue.str_value);
-    EXPECT_EQ(isolatedNonAdditiveData, actualFieldValues->at(4).mValue.int_value);
-    EXPECT_EQ(isolatedAdditiveData + hostAdditiveData + hostAdditiveData,
-              actualFieldValues->at(5).mValue.int_value);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/guardrail/StatsdStats_test.cpp b/cmds/statsd/tests/guardrail/StatsdStats_test.cpp
deleted file mode 100644
index 428c46f..0000000
--- a/cmds/statsd/tests/guardrail/StatsdStats_test.cpp
+++ /dev/null
@@ -1,544 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/guardrail/StatsdStats.h"
-#include "statslog_statsdtest.h"
-#include "tests/statsd_test_util.h"
-
-#include <gtest/gtest.h>
-#include <vector>
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using std::vector;
-
-TEST(StatsdStatsTest, TestValidConfigAdd) {
-    StatsdStats stats;
-    ConfigKey key(0, 12345);
-    const int metricsCount = 10;
-    const int conditionsCount = 20;
-    const int matchersCount = 30;
-    const int alertsCount = 10;
-    stats.noteConfigReceived(key, metricsCount, conditionsCount, matchersCount, alertsCount, {},
-                             true /*valid config*/);
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false /*reset stats*/);
-
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-    ASSERT_EQ(1, report.config_stats_size());
-    const auto& configReport = report.config_stats(0);
-    EXPECT_EQ(0, configReport.uid());
-    EXPECT_EQ(12345, configReport.id());
-    EXPECT_EQ(metricsCount, configReport.metric_count());
-    EXPECT_EQ(conditionsCount, configReport.condition_count());
-    EXPECT_EQ(matchersCount, configReport.matcher_count());
-    EXPECT_EQ(alertsCount, configReport.alert_count());
-    EXPECT_EQ(true, configReport.is_valid());
-    EXPECT_FALSE(configReport.has_deletion_time_sec());
-}
-
-TEST(StatsdStatsTest, TestInvalidConfigAdd) {
-    StatsdStats stats;
-    ConfigKey key(0, 12345);
-    const int metricsCount = 10;
-    const int conditionsCount = 20;
-    const int matchersCount = 30;
-    const int alertsCount = 10;
-    stats.noteConfigReceived(key, metricsCount, conditionsCount, matchersCount, alertsCount, {},
-                             false /*bad config*/);
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-    ASSERT_EQ(1, report.config_stats_size());
-    const auto& configReport = report.config_stats(0);
-    // The invalid config should be put into icebox with a deletion time.
-    EXPECT_TRUE(configReport.has_deletion_time_sec());
-}
-
-TEST(StatsdStatsTest, TestConfigRemove) {
-    StatsdStats stats;
-    ConfigKey key(0, 12345);
-    const int metricsCount = 10;
-    const int conditionsCount = 20;
-    const int matchersCount = 30;
-    const int alertsCount = 10;
-    stats.noteConfigReceived(key, metricsCount, conditionsCount, matchersCount, alertsCount, {},
-                             true);
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-    ASSERT_EQ(1, report.config_stats_size());
-    const auto& configReport = report.config_stats(0);
-    EXPECT_FALSE(configReport.has_deletion_time_sec());
-
-    stats.noteConfigRemoved(key);
-    stats.dumpStats(&output, false);
-    good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-    ASSERT_EQ(1, report.config_stats_size());
-    const auto& configReport2 = report.config_stats(0);
-    EXPECT_TRUE(configReport2.has_deletion_time_sec());
-}
-
-TEST(StatsdStatsTest, TestSubStats) {
-    StatsdStats stats;
-    ConfigKey key(0, 12345);
-    stats.noteConfigReceived(key, 2, 3, 4, 5, {std::make_pair(123, 456)}, true);
-
-    stats.noteMatcherMatched(key, StringToId("matcher1"));
-    stats.noteMatcherMatched(key, StringToId("matcher1"));
-    stats.noteMatcherMatched(key, StringToId("matcher2"));
-
-    stats.noteConditionDimensionSize(key, StringToId("condition1"), 250);
-    stats.noteConditionDimensionSize(key, StringToId("condition1"), 240);
-
-    stats.noteMetricDimensionSize(key, StringToId("metric1"), 201);
-    stats.noteMetricDimensionSize(key, StringToId("metric1"), 202);
-
-    stats.noteAnomalyDeclared(key, StringToId("alert1"));
-    stats.noteAnomalyDeclared(key, StringToId("alert1"));
-    stats.noteAnomalyDeclared(key, StringToId("alert2"));
-
-    // broadcast-> 2
-    stats.noteBroadcastSent(key);
-    stats.noteBroadcastSent(key);
-
-    // data drop -> 1
-    stats.noteDataDropped(key, 123);
-
-    // dump report -> 3
-    stats.noteMetricsReportSent(key, 0);
-    stats.noteMetricsReportSent(key, 0);
-    stats.noteMetricsReportSent(key, 0);
-
-    // activation_time_sec -> 2
-    stats.noteActiveStatusChanged(key, true);
-    stats.noteActiveStatusChanged(key, true);
-
-    // deactivation_time_sec -> 1
-    stats.noteActiveStatusChanged(key, false);
-
-    vector<uint8_t> output;
-    stats.dumpStats(&output, true);  // Dump and reset stats
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-    ASSERT_EQ(1, report.config_stats_size());
-    const auto& configReport = report.config_stats(0);
-    ASSERT_EQ(2, configReport.broadcast_sent_time_sec_size());
-    ASSERT_EQ(1, configReport.data_drop_time_sec_size());
-    ASSERT_EQ(1, configReport.data_drop_bytes_size());
-    EXPECT_EQ(123, configReport.data_drop_bytes(0));
-    ASSERT_EQ(3, configReport.dump_report_time_sec_size());
-    ASSERT_EQ(3, configReport.dump_report_data_size_size());
-    ASSERT_EQ(2, configReport.activation_time_sec_size());
-    ASSERT_EQ(1, configReport.deactivation_time_sec_size());
-    ASSERT_EQ(1, configReport.annotation_size());
-    EXPECT_EQ(123, configReport.annotation(0).field_int64());
-    EXPECT_EQ(456, configReport.annotation(0).field_int32());
-
-    ASSERT_EQ(2, configReport.matcher_stats_size());
-    // matcher1 is the first in the list
-    if (configReport.matcher_stats(0).id() == StringToId("matcher1")) {
-        EXPECT_EQ(2, configReport.matcher_stats(0).matched_times());
-        EXPECT_EQ(1, configReport.matcher_stats(1).matched_times());
-        EXPECT_EQ(StringToId("matcher2"), configReport.matcher_stats(1).id());
-    } else {
-        // matcher1 is the second in the list.
-        EXPECT_EQ(1, configReport.matcher_stats(0).matched_times());
-        EXPECT_EQ(StringToId("matcher2"), configReport.matcher_stats(0).id());
-
-        EXPECT_EQ(2, configReport.matcher_stats(1).matched_times());
-        EXPECT_EQ(StringToId("matcher1"), configReport.matcher_stats(1).id());
-    }
-
-    ASSERT_EQ(2, configReport.alert_stats_size());
-    bool alert1first = configReport.alert_stats(0).id() == StringToId("alert1");
-    EXPECT_EQ(StringToId("alert1"), configReport.alert_stats(alert1first ? 0 : 1).id());
-    EXPECT_EQ(2, configReport.alert_stats(alert1first ? 0 : 1).alerted_times());
-    EXPECT_EQ(StringToId("alert2"), configReport.alert_stats(alert1first ? 1 : 0).id());
-    EXPECT_EQ(1, configReport.alert_stats(alert1first ? 1 : 0).alerted_times());
-
-    ASSERT_EQ(1, configReport.condition_stats_size());
-    EXPECT_EQ(StringToId("condition1"), configReport.condition_stats(0).id());
-    EXPECT_EQ(250, configReport.condition_stats(0).max_tuple_counts());
-
-    ASSERT_EQ(1, configReport.metric_stats_size());
-    EXPECT_EQ(StringToId("metric1"), configReport.metric_stats(0).id());
-    EXPECT_EQ(202, configReport.metric_stats(0).max_tuple_counts());
-
-    // after resetting the stats, some new events come
-    stats.noteMatcherMatched(key, StringToId("matcher99"));
-    stats.noteConditionDimensionSize(key, StringToId("condition99"), 300);
-    stats.noteMetricDimensionSize(key, StringToId("metric99tion99"), 270);
-    stats.noteAnomalyDeclared(key, StringToId("alert99"));
-
-    // now the config stats should only contain the stats about the new event.
-    stats.dumpStats(&output, false);
-    good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-    ASSERT_EQ(1, report.config_stats_size());
-    const auto& configReport2 = report.config_stats(0);
-    ASSERT_EQ(1, configReport2.matcher_stats_size());
-    EXPECT_EQ(StringToId("matcher99"), configReport2.matcher_stats(0).id());
-    EXPECT_EQ(1, configReport2.matcher_stats(0).matched_times());
-
-    ASSERT_EQ(1, configReport2.condition_stats_size());
-    EXPECT_EQ(StringToId("condition99"), configReport2.condition_stats(0).id());
-    EXPECT_EQ(300, configReport2.condition_stats(0).max_tuple_counts());
-
-    ASSERT_EQ(1, configReport2.metric_stats_size());
-    EXPECT_EQ(StringToId("metric99tion99"), configReport2.metric_stats(0).id());
-    EXPECT_EQ(270, configReport2.metric_stats(0).max_tuple_counts());
-
-    ASSERT_EQ(1, configReport2.alert_stats_size());
-    EXPECT_EQ(StringToId("alert99"), configReport2.alert_stats(0).id());
-    EXPECT_EQ(1, configReport2.alert_stats(0).alerted_times());
-}
-
-TEST(StatsdStatsTest, TestAtomLog) {
-    StatsdStats stats;
-    time_t now = time(nullptr);
-    // old event, we get it from the stats buffer. should be ignored.
-    stats.noteAtomLogged(util::SENSOR_STATE_CHANGED, 1000);
-
-    stats.noteAtomLogged(util::SENSOR_STATE_CHANGED, now + 1);
-    stats.noteAtomLogged(util::SENSOR_STATE_CHANGED, now + 2);
-    stats.noteAtomLogged(util::APP_CRASH_OCCURRED, now + 3);
-
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-
-    ASSERT_EQ(2, report.atom_stats_size());
-    bool sensorAtomGood = false;
-    bool dropboxAtomGood = false;
-
-    for (const auto& atomStats : report.atom_stats()) {
-        if (atomStats.tag() == util::SENSOR_STATE_CHANGED && atomStats.count() == 3) {
-            sensorAtomGood = true;
-        }
-        if (atomStats.tag() == util::APP_CRASH_OCCURRED && atomStats.count() == 1) {
-            dropboxAtomGood = true;
-        }
-    }
-
-    EXPECT_TRUE(dropboxAtomGood);
-    EXPECT_TRUE(sensorAtomGood);
-}
-
-TEST(StatsdStatsTest, TestNonPlatformAtomLog) {
-    StatsdStats stats;
-    time_t now = time(nullptr);
-    int newAtom1 = StatsdStats::kMaxPushedAtomId + 1;
-    int newAtom2 = StatsdStats::kMaxPushedAtomId + 2;
-
-    stats.noteAtomLogged(newAtom1, now + 1);
-    stats.noteAtomLogged(newAtom1, now + 2);
-    stats.noteAtomLogged(newAtom2, now + 3);
-
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-
-    ASSERT_EQ(2, report.atom_stats_size());
-    bool newAtom1Good = false;
-    bool newAtom2Good = false;
-
-    for (const auto& atomStats : report.atom_stats()) {
-        if (atomStats.tag() == newAtom1 && atomStats.count() == 2) {
-            newAtom1Good = true;
-        }
-        if (atomStats.tag() == newAtom2 && atomStats.count() == 1) {
-            newAtom2Good = true;
-        }
-    }
-
-    EXPECT_TRUE(newAtom1Good);
-    EXPECT_TRUE(newAtom2Good);
-}
-
-TEST(StatsdStatsTest, TestPullAtomStats) {
-    StatsdStats stats;
-
-    stats.updateMinPullIntervalSec(util::DISK_SPACE, 3333L);
-    stats.updateMinPullIntervalSec(util::DISK_SPACE, 2222L);
-    stats.updateMinPullIntervalSec(util::DISK_SPACE, 4444L);
-
-    stats.notePull(util::DISK_SPACE);
-    stats.notePullTime(util::DISK_SPACE, 1111L);
-    stats.notePullDelay(util::DISK_SPACE, 1111L);
-    stats.notePull(util::DISK_SPACE);
-    stats.notePullTime(util::DISK_SPACE, 3333L);
-    stats.notePullDelay(util::DISK_SPACE, 3335L);
-    stats.notePull(util::DISK_SPACE);
-    stats.notePullFromCache(util::DISK_SPACE);
-    stats.notePullerCallbackRegistrationChanged(util::DISK_SPACE, true);
-    stats.notePullerCallbackRegistrationChanged(util::DISK_SPACE, false);
-    stats.notePullerCallbackRegistrationChanged(util::DISK_SPACE, true);
-    stats.notePullBinderCallFailed(util::DISK_SPACE);
-    stats.notePullUidProviderNotFound(util::DISK_SPACE);
-    stats.notePullerNotFound(util::DISK_SPACE);
-    stats.notePullerNotFound(util::DISK_SPACE);
-    stats.notePullTimeout(util::DISK_SPACE, 3000L, 6000L);
-    stats.notePullTimeout(util::DISK_SPACE, 4000L, 7000L);
-
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-
-    ASSERT_EQ(1, report.pulled_atom_stats_size());
-
-    EXPECT_EQ(util::DISK_SPACE, report.pulled_atom_stats(0).atom_id());
-    EXPECT_EQ(3, report.pulled_atom_stats(0).total_pull());
-    EXPECT_EQ(1, report.pulled_atom_stats(0).total_pull_from_cache());
-    EXPECT_EQ(2222L, report.pulled_atom_stats(0).min_pull_interval_sec());
-    EXPECT_EQ(2222L, report.pulled_atom_stats(0).average_pull_time_nanos());
-    EXPECT_EQ(3333L, report.pulled_atom_stats(0).max_pull_time_nanos());
-    EXPECT_EQ(2223L, report.pulled_atom_stats(0).average_pull_delay_nanos());
-    EXPECT_EQ(3335L, report.pulled_atom_stats(0).max_pull_delay_nanos());
-    EXPECT_EQ(2L, report.pulled_atom_stats(0).registered_count());
-    EXPECT_EQ(1L, report.pulled_atom_stats(0).unregistered_count());
-    EXPECT_EQ(1L, report.pulled_atom_stats(0).binder_call_failed());
-    EXPECT_EQ(1L, report.pulled_atom_stats(0).failed_uid_provider_not_found());
-    EXPECT_EQ(2L, report.pulled_atom_stats(0).puller_not_found());
-    ASSERT_EQ(2, report.pulled_atom_stats(0).pull_atom_metadata_size());
-    EXPECT_EQ(3000L, report.pulled_atom_stats(0).pull_atom_metadata(0).pull_timeout_uptime_millis());
-    EXPECT_EQ(4000L, report.pulled_atom_stats(0).pull_atom_metadata(1).pull_timeout_uptime_millis());
-    EXPECT_EQ(6000L, report.pulled_atom_stats(0).pull_atom_metadata(0)
-            .pull_timeout_elapsed_millis());
-    EXPECT_EQ(7000L, report.pulled_atom_stats(0).pull_atom_metadata(1)
-            .pull_timeout_elapsed_millis());
-}
-
-TEST(StatsdStatsTest, TestAtomMetricsStats) {
-    StatsdStats stats;
-    time_t now = time(nullptr);
-    // old event, we get it from the stats buffer. should be ignored.
-    stats.noteBucketDropped(1000L);
-
-    stats.noteBucketBoundaryDelayNs(1000L, -1L);
-    stats.noteBucketBoundaryDelayNs(1000L, -10L);
-    stats.noteBucketBoundaryDelayNs(1000L, 2L);
-
-    stats.noteBucketBoundaryDelayNs(1001L, 1L);
-
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-
-    ASSERT_EQ(2, report.atom_metric_stats().size());
-
-    auto atomStats = report.atom_metric_stats(0);
-    EXPECT_EQ(1000L, atomStats.metric_id());
-    EXPECT_EQ(1L, atomStats.bucket_dropped());
-    EXPECT_EQ(-10L, atomStats.min_bucket_boundary_delay_ns());
-    EXPECT_EQ(2L, atomStats.max_bucket_boundary_delay_ns());
-
-    auto atomStats2 = report.atom_metric_stats(1);
-    EXPECT_EQ(1001L, atomStats2.metric_id());
-    EXPECT_EQ(0L, atomStats2.bucket_dropped());
-    EXPECT_EQ(0L, atomStats2.min_bucket_boundary_delay_ns());
-    EXPECT_EQ(1L, atomStats2.max_bucket_boundary_delay_ns());
-}
-
-TEST(StatsdStatsTest, TestAnomalyMonitor) {
-    StatsdStats stats;
-    stats.noteRegisteredAnomalyAlarmChanged();
-    stats.noteRegisteredAnomalyAlarmChanged();
-
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    bool good = report.ParseFromArray(&output[0], output.size());
-    EXPECT_TRUE(good);
-
-    EXPECT_EQ(2, report.anomaly_alarm_stats().alarms_registered());
-}
-
-TEST(StatsdStatsTest, TestTimestampThreshold) {
-    StatsdStats stats;
-    vector<int32_t> timestamps;
-    for (int i = 0; i < StatsdStats::kMaxTimestampCount; i++) {
-        timestamps.push_back(i);
-    }
-    ConfigKey key(0, 12345);
-    stats.noteConfigReceived(key, 2, 3, 4, 5, {}, true);
-
-    for (int i = 0; i < StatsdStats::kMaxTimestampCount; i++) {
-        stats.noteDataDropped(key, timestamps[i]);
-        stats.noteBroadcastSent(key, timestamps[i]);
-        stats.noteMetricsReportSent(key, 0, timestamps[i]);
-        stats.noteActiveStatusChanged(key, true, timestamps[i]);
-        stats.noteActiveStatusChanged(key, false, timestamps[i]);
-    }
-
-    int32_t newTimestamp = 10000;
-
-    // now it should trigger removing oldest timestamp
-    stats.noteDataDropped(key, 123, 10000);
-    stats.noteBroadcastSent(key, 10000);
-    stats.noteMetricsReportSent(key, 0, 10000);
-    stats.noteActiveStatusChanged(key, true, 10000);
-    stats.noteActiveStatusChanged(key, false, 10000);
-
-    EXPECT_TRUE(stats.mConfigStats.find(key) != stats.mConfigStats.end());
-    const auto& configStats = stats.mConfigStats[key];
-
-    size_t maxCount = StatsdStats::kMaxTimestampCount;
-    ASSERT_EQ(maxCount, configStats->broadcast_sent_time_sec.size());
-    ASSERT_EQ(maxCount, configStats->data_drop_time_sec.size());
-    ASSERT_EQ(maxCount, configStats->dump_report_stats.size());
-    ASSERT_EQ(maxCount, configStats->activation_time_sec.size());
-    ASSERT_EQ(maxCount, configStats->deactivation_time_sec.size());
-
-    // the oldest timestamp is the second timestamp in history
-    EXPECT_EQ(1, configStats->broadcast_sent_time_sec.front());
-    EXPECT_EQ(1, configStats->data_drop_bytes.front());
-    EXPECT_EQ(1, configStats->dump_report_stats.front().first);
-    EXPECT_EQ(1, configStats->activation_time_sec.front());
-    EXPECT_EQ(1, configStats->deactivation_time_sec.front());
-
-    // the last timestamp is the newest timestamp.
-    EXPECT_EQ(newTimestamp, configStats->broadcast_sent_time_sec.back());
-    EXPECT_EQ(newTimestamp, configStats->data_drop_time_sec.back());
-    EXPECT_EQ(123, configStats->data_drop_bytes.back());
-    EXPECT_EQ(newTimestamp, configStats->dump_report_stats.back().first);
-    EXPECT_EQ(newTimestamp, configStats->activation_time_sec.back());
-    EXPECT_EQ(newTimestamp, configStats->deactivation_time_sec.back());
-}
-
-TEST(StatsdStatsTest, TestSystemServerCrash) {
-    StatsdStats stats;
-    vector<int32_t> timestamps;
-    for (int i = 0; i < StatsdStats::kMaxSystemServerRestarts; i++) {
-        timestamps.push_back(i);
-        stats.noteSystemServerRestart(timestamps[i]);
-    }
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    EXPECT_TRUE(report.ParseFromArray(&output[0], output.size()));
-    const int maxCount = StatsdStats::kMaxSystemServerRestarts;
-    ASSERT_EQ(maxCount, (int)report.system_restart_sec_size());
-
-    stats.noteSystemServerRestart(StatsdStats::kMaxSystemServerRestarts + 1);
-    output.clear();
-    stats.dumpStats(&output, false);
-    EXPECT_TRUE(report.ParseFromArray(&output[0], output.size()));
-    ASSERT_EQ(maxCount, (int)report.system_restart_sec_size());
-    EXPECT_EQ(StatsdStats::kMaxSystemServerRestarts + 1, report.system_restart_sec(maxCount - 1));
-}
-
-TEST(StatsdStatsTest, TestActivationBroadcastGuardrailHit) {
-    StatsdStats stats;
-    int uid1 = 1;
-    int uid2 = 2;
-    stats.noteActivationBroadcastGuardrailHit(uid1, 10);
-    stats.noteActivationBroadcastGuardrailHit(uid1, 20);
-
-    // Test that we only keep 20 timestamps.
-    for (int i = 0; i < 100; i++) {
-        stats.noteActivationBroadcastGuardrailHit(uid2, i);
-    }
-
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    EXPECT_TRUE(report.ParseFromArray(&output[0], output.size()));
-
-    ASSERT_EQ(2, report.activation_guardrail_stats_size());
-    bool uid1Good = false;
-    bool uid2Good = false;
-    for (const auto& guardrailTimes : report.activation_guardrail_stats()) {
-        if (uid1 == guardrailTimes.uid()) {
-            uid1Good = true;
-            ASSERT_EQ(2, guardrailTimes.guardrail_met_sec_size());
-            EXPECT_EQ(10, guardrailTimes.guardrail_met_sec(0));
-            EXPECT_EQ(20, guardrailTimes.guardrail_met_sec(1));
-        } else if (uid2 == guardrailTimes.uid()) {
-            int maxCount = StatsdStats::kMaxTimestampCount;
-            uid2Good = true;
-            ASSERT_EQ(maxCount, guardrailTimes.guardrail_met_sec_size());
-            for (int i = 0; i < maxCount; i++) {
-                EXPECT_EQ(100 - maxCount + i, guardrailTimes.guardrail_met_sec(i));
-            }
-        } else {
-            FAIL() << "Unexpected uid.";
-        }
-    }
-    EXPECT_TRUE(uid1Good);
-    EXPECT_TRUE(uid2Good);
-}
-
-TEST(StatsdStatsTest, TestAtomErrorStats) {
-    StatsdStats stats;
-
-    int pushAtomTag = 100;
-    int pullAtomTag = 1000;
-    int numErrors = 10;
-
-    for (int i = 0; i < numErrors; i++) {
-        // We must call noteAtomLogged as well because only those pushed atoms
-        // that have been logged will have stats printed about them in the
-        // proto.
-        stats.noteAtomLogged(pushAtomTag, /*timeSec=*/0);
-        stats.noteAtomError(pushAtomTag, /*pull=*/false);
-
-        stats.noteAtomError(pullAtomTag, /*pull=*/true);
-    }
-
-    vector<uint8_t> output;
-    stats.dumpStats(&output, false);
-    StatsdStatsReport report;
-    EXPECT_TRUE(report.ParseFromArray(&output[0], output.size()));
-
-    // Check error count = numErrors for push atom
-    ASSERT_EQ(1, report.atom_stats_size());
-    const auto& pushedAtomStats = report.atom_stats(0);
-    EXPECT_EQ(pushAtomTag, pushedAtomStats.tag());
-    EXPECT_EQ(numErrors, pushedAtomStats.error_count());
-
-    // Check error count = numErrors for pull atom
-    ASSERT_EQ(1, report.pulled_atom_stats_size());
-    const auto& pulledAtomStats = report.pulled_atom_stats(0);
-    EXPECT_EQ(pullAtomTag, pulledAtomStats.atom_id());
-    EXPECT_EQ(numErrors, pulledAtomStats.atom_error_count());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/indexed_priority_queue_test.cpp b/cmds/statsd/tests/indexed_priority_queue_test.cpp
deleted file mode 100644
index 3a65456..0000000
--- a/cmds/statsd/tests/indexed_priority_queue_test.cpp
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "src/anomaly/indexed_priority_queue.h"
-
-#include <gtest/gtest.h>
-
-using namespace android::os::statsd;
-
-/** struct for template in indexed_priority_queue */
-struct AATest : public RefBase {
-    AATest(uint32_t val, std::string a, std::string b) : val(val), a(a), b(b) {
-    }
-
-    const int val;
-    const std::string a;
-    const std::string b;
-
-    struct Smaller {
-        bool operator()(const sp<const AATest> a, const sp<const AATest> b) const {
-            return (a->val < b->val);
-        }
-    };
-};
-
-#ifdef __ANDROID__
-TEST(indexed_priority_queue, empty_and_size) {
-    std::string emptyMetricId;
-    std::string emptyDimensionId;
-    indexed_priority_queue<AATest, AATest::Smaller> ipq;
-    sp<const AATest> aa4 = new AATest{4, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa8 = new AATest{8, emptyMetricId, emptyDimensionId};
-
-    ASSERT_EQ(0u, ipq.size());
-    EXPECT_TRUE(ipq.empty());
-
-    ipq.push(aa4);
-    ASSERT_EQ(1u, ipq.size());
-    EXPECT_FALSE(ipq.empty());
-
-    ipq.push(aa8);
-    ASSERT_EQ(2u, ipq.size());
-    EXPECT_FALSE(ipq.empty());
-
-    ipq.remove(aa4);
-    ASSERT_EQ(1u, ipq.size());
-    EXPECT_FALSE(ipq.empty());
-
-    ipq.remove(aa8);
-    ASSERT_EQ(0u, ipq.size());
-    EXPECT_TRUE(ipq.empty());
-}
-
-TEST(indexed_priority_queue, top) {
-    std::string emptyMetricId;
-    std::string emptyDimensionId;
-    indexed_priority_queue<AATest, AATest::Smaller> ipq;
-    sp<const AATest> aa2 = new AATest{2, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa4 = new AATest{4, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa8 = new AATest{8, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa12 = new AATest{12, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa16 = new AATest{16, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa20 = new AATest{20, emptyMetricId, emptyDimensionId};
-
-    EXPECT_EQ(ipq.top(), nullptr);
-
-    // add 8, 4, 12
-    ipq.push(aa8);
-    EXPECT_EQ(ipq.top(), aa8);
-
-    ipq.push(aa12);
-    EXPECT_EQ(ipq.top(), aa8);
-
-    ipq.push(aa4);
-    EXPECT_EQ(ipq.top(), aa4);
-
-    // remove 12, 4
-    ipq.remove(aa12);
-    EXPECT_EQ(ipq.top(), aa4);
-
-    ipq.remove(aa4);
-    EXPECT_EQ(ipq.top(), aa8);
-
-    // add 16, 2, 20
-    ipq.push(aa16);
-    EXPECT_EQ(ipq.top(), aa8);
-
-    ipq.push(aa2);
-    EXPECT_EQ(ipq.top(), aa2);
-
-    ipq.push(aa20);
-    EXPECT_EQ(ipq.top(), aa2);
-
-    // remove 2, 20, 16, 8
-    ipq.remove(aa2);
-    EXPECT_EQ(ipq.top(), aa8);
-
-    ipq.remove(aa20);
-    EXPECT_EQ(ipq.top(), aa8);
-
-    ipq.remove(aa16);
-    EXPECT_EQ(ipq.top(), aa8);
-
-    ipq.remove(aa8);
-    EXPECT_EQ(ipq.top(), nullptr);
-}
-
-TEST(indexed_priority_queue, push_same_aa) {
-    std::string emptyMetricId;
-    std::string emptyDimensionId;
-    indexed_priority_queue<AATest, AATest::Smaller> ipq;
-    sp<const AATest> aa4_a = new AATest{4, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa4_b = new AATest{4, emptyMetricId, emptyDimensionId};
-
-    ipq.push(aa4_a);
-    ASSERT_EQ(1u, ipq.size());
-    EXPECT_TRUE(ipq.contains(aa4_a));
-    EXPECT_FALSE(ipq.contains(aa4_b));
-
-    ipq.push(aa4_a);
-    ASSERT_EQ(1u, ipq.size());
-    EXPECT_TRUE(ipq.contains(aa4_a));
-    EXPECT_FALSE(ipq.contains(aa4_b));
-
-    ipq.push(aa4_b);
-    ASSERT_EQ(2u, ipq.size());
-    EXPECT_TRUE(ipq.contains(aa4_a));
-    EXPECT_TRUE(ipq.contains(aa4_b));
-}
-
-TEST(indexed_priority_queue, remove_nonexistant) {
-    std::string emptyMetricId;
-    std::string emptyDimensionId;
-    indexed_priority_queue<AATest, AATest::Smaller> ipq;
-    sp<const AATest> aa4 = new AATest{4, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa5 = new AATest{5, emptyMetricId, emptyDimensionId};
-
-    ipq.push(aa4);
-    ipq.remove(aa5);
-    ASSERT_EQ(1u, ipq.size());
-    EXPECT_TRUE(ipq.contains(aa4));
-    EXPECT_FALSE(ipq.contains(aa5));
-}
-
-TEST(indexed_priority_queue, remove_same_aa) {
-    indexed_priority_queue<AATest, AATest::Smaller> ipq;
-    std::string emptyMetricId;
-    std::string emptyDimensionId;
-    sp<const AATest> aa4_a = new AATest{4, emptyMetricId, emptyDimensionId};
-    sp<const AATest> aa4_b = new AATest{4, emptyMetricId, emptyDimensionId};
-
-    ipq.push(aa4_a);
-    ipq.push(aa4_b);
-    ASSERT_EQ(2u, ipq.size());
-    EXPECT_TRUE(ipq.contains(aa4_a));
-    EXPECT_TRUE(ipq.contains(aa4_b));
-
-    ipq.remove(aa4_b);
-    ASSERT_EQ(1u, ipq.size());
-    EXPECT_TRUE(ipq.contains(aa4_a));
-    EXPECT_FALSE(ipq.contains(aa4_b));
-
-    ipq.remove(aa4_a);
-    ASSERT_EQ(0u, ipq.size());
-    EXPECT_FALSE(ipq.contains(aa4_a));
-    EXPECT_FALSE(ipq.contains(aa4_b));
-}
-
-TEST(indexed_priority_queue, nulls) {
-    indexed_priority_queue<AATest, AATest::Smaller> ipq;
-
-    EXPECT_TRUE(ipq.empty());
-    EXPECT_FALSE(ipq.contains(nullptr));
-
-    ipq.push(nullptr);
-    EXPECT_TRUE(ipq.empty());
-    EXPECT_FALSE(ipq.contains(nullptr));
-
-    ipq.remove(nullptr);
-    EXPECT_TRUE(ipq.empty());
-    EXPECT_FALSE(ipq.contains(nullptr));
-}
-
-TEST(indexed_priority_queue, pop) {
-    indexed_priority_queue<AATest, AATest::Smaller> ipq;
-    std::string emptyMetricId;
-    std::string emptyDimensionId;
-    sp<const AATest> a = new AATest{1, emptyMetricId, emptyDimensionId};
-    sp<const AATest> b = new AATest{2, emptyMetricId, emptyDimensionId};
-    sp<const AATest> c = new AATest{3, emptyMetricId, emptyDimensionId};
-
-    ipq.push(c);
-    ipq.push(b);
-    ipq.push(a);
-    ASSERT_EQ(3u, ipq.size());
-
-    ipq.pop();
-    ASSERT_EQ(2u, ipq.size());
-    EXPECT_FALSE(ipq.contains(a));
-    EXPECT_TRUE(ipq.contains(b));
-    EXPECT_TRUE(ipq.contains(c));
-
-    ipq.pop();
-    ASSERT_EQ(1u, ipq.size());
-    EXPECT_FALSE(ipq.contains(a));
-    EXPECT_FALSE(ipq.contains(b));
-    EXPECT_TRUE(ipq.contains(c));
-
-    ipq.pop();
-    ASSERT_EQ(0u, ipq.size());
-    EXPECT_FALSE(ipq.contains(a));
-    EXPECT_FALSE(ipq.contains(b));
-    EXPECT_FALSE(ipq.contains(c));
-    EXPECT_TRUE(ipq.empty());
-
-    ipq.pop(); // pop an empty queue
-    EXPECT_TRUE(ipq.empty());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/log_event/LogEventQueue_test.cpp b/cmds/statsd/tests/log_event/LogEventQueue_test.cpp
deleted file mode 100644
index a15f95b..0000000
--- a/cmds/statsd/tests/log_event/LogEventQueue_test.cpp
+++ /dev/null
@@ -1,115 +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.
-
-#include "logd/LogEventQueue.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-
-#include <thread>
-
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using namespace android;
-using namespace testing;
-
-using std::unique_ptr;
-
-namespace {
-
-std::unique_ptr<LogEvent> makeLogEvent(uint64_t timestampNs) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, 10);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-} // anonymous namespace
-
-#ifdef __ANDROID__
-TEST(LogEventQueue_test, TestGoodConsumer) {
-    LogEventQueue queue(50);
-    int64_t timeBaseNs = 100;
-    std::thread writer([&queue, timeBaseNs] {
-        for (int i = 0; i < 100; i++) {
-            int64_t oldestEventNs;
-            bool success = queue.push(makeLogEvent(timeBaseNs + i * 1000), &oldestEventNs);
-            EXPECT_TRUE(success);
-            std::this_thread::sleep_for(std::chrono::milliseconds(1));
-        }
-    });
-
-    std::thread reader([&queue, timeBaseNs] {
-        for (int i = 0; i < 100; i++) {
-            auto event = queue.waitPop();
-            EXPECT_TRUE(event != nullptr);
-            // All events are in right order.
-            EXPECT_EQ(timeBaseNs + i * 1000, event->GetElapsedTimestampNs());
-        }
-    });
-
-    reader.join();
-    writer.join();
-}
-
-TEST(LogEventQueue_test, TestSlowConsumer) {
-    LogEventQueue queue(50);
-    int64_t timeBaseNs = 100;
-    std::thread writer([&queue, timeBaseNs] {
-        int failure_count = 0;
-        int64_t oldestEventNs;
-        for (int i = 0; i < 100; i++) {
-            bool success = queue.push(makeLogEvent(timeBaseNs + i * 1000), &oldestEventNs);
-            if (!success) failure_count++;
-            std::this_thread::sleep_for(std::chrono::milliseconds(1));
-        }
-
-        // There is some remote chance that reader thread not get chance to run before writer thread
-        // ends. That's why the following comparison is not "==".
-        // There will be at least 45 events lost due to overflow.
-        EXPECT_TRUE(failure_count >= 45);
-        // The oldest event must be at least the 6th event.
-        EXPECT_TRUE(oldestEventNs <= (100 + 5 * 1000));
-    });
-
-    std::thread reader([&queue, timeBaseNs] {
-        // The consumer quickly processed 5 events, then it got stuck (not reading anymore).
-        for (int i = 0; i < 5; i++) {
-            auto event = queue.waitPop();
-            EXPECT_TRUE(event != nullptr);
-            // All events are in right order.
-            EXPECT_EQ(timeBaseNs + i * 1000, event->GetElapsedTimestampNs());
-        }
-    });
-
-    reader.join();
-    writer.join();
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/metadata_util_test.cpp b/cmds/statsd/tests/metadata_util_test.cpp
deleted file mode 100644
index 7707890..0000000
--- a/cmds/statsd/tests/metadata_util_test.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 <gtest/gtest.h>
-
-#include "metadata_util.h"
-#include "tests/statsd_test_util.h"
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-TEST(MetadataUtilTest, TestWriteAndReadMetricDimensionKey) {
-    HashableDimensionKey dim;
-    HashableDimensionKey dim2;
-    int pos1[] = {1, 1, 1};
-    int pos2[] = {1, 1, 2};
-    int pos3[] = {1, 1, 3};
-    int pos4[] = {2, 0, 0};
-    Field field1(10, pos1, 2);
-    Field field2(10, pos2, 2);
-    Field field3(10, pos3, 2);
-    Field field4(10, pos4, 0);
-
-    Value value1((int32_t)10025);
-    Value value2("tag");
-    Value value3((int32_t)987654);
-    Value value4((int32_t)99999);
-
-    dim.addValue(FieldValue(field1, value1));
-    dim.addValue(FieldValue(field2, value2));
-    dim.addValue(FieldValue(field3, value3));
-    dim.addValue(FieldValue(field4, value4));
-
-    dim2.addValue(FieldValue(field1, value1));
-    dim2.addValue(FieldValue(field2, value2));
-
-    MetricDimensionKey dimKey(dim, dim2);
-
-    metadata::MetricDimensionKey metadataDimKey;
-    writeMetricDimensionKeyToMetadataDimensionKey(dimKey, &metadataDimKey);
-
-    MetricDimensionKey loadedDimKey = loadMetricDimensionKeyFromProto(metadataDimKey);
-
-    ASSERT_EQ(loadedDimKey, dimKey);
-    ASSERT_EQ(std::hash<MetricDimensionKey>{}(loadedDimKey),
-            std::hash<MetricDimensionKey>{}(dimKey));
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/metrics/CountMetricProducer_test.cpp b/cmds/statsd/tests/metrics/CountMetricProducer_test.cpp
deleted file mode 100644
index bb8e7bf..0000000
--- a/cmds/statsd/tests/metrics/CountMetricProducer_test.cpp
+++ /dev/null
@@ -1,476 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/metrics/CountMetricProducer.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <math.h>
-#include <stdio.h>
-
-#include <vector>
-
-#include "metrics_test_helper.h"
-#include "src/stats_log_util.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-using namespace testing;
-using android::sp;
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-
-namespace {
-const ConfigKey kConfigKey(0, 12345);
-
-void makeLogEvent(LogEvent* logEvent, int64_t timestampNs, int atomId) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-void makeLogEvent(LogEvent* logEvent, int64_t timestampNs, int atomId, string uid) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-    AStatsEvent_writeString(statsEvent, uid.c_str());
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-}  // namespace
-
-// Setup for parameterized tests.
-class CountMetricProducerTest_PartialBucket : public TestWithParam<BucketSplitEvent> {};
-
-INSTANTIATE_TEST_SUITE_P(CountMetricProducerTest_PartialBucket,
-                         CountMetricProducerTest_PartialBucket,
-                         testing::Values(APP_UPGRADE, BOOT_COMPLETE));
-
-TEST(CountMetricProducerTest, TestFirstBucket) {
-    CountMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2);
-    EXPECT_EQ(600500000000, countProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(10, countProducer.mCurrentBucketNum);
-    EXPECT_EQ(660000000005, countProducer.getCurrentBucketEndTimeNs());
-}
-
-TEST(CountMetricProducerTest, TestNonDimensionalEvents) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
-    int tagId = 1;
-
-    CountMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, bucketStartTimeNs, bucketStartTimeNs);
-
-    // 2 events in bucket 1.
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, tagId);
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + 2, tagId);
-
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // Flushes at event #2.
-    countProducer.flushIfNeededLocked(bucketStartTimeNs + 2);
-    ASSERT_EQ(0UL, countProducer.mPastBuckets.size());
-
-    // Flushes.
-    countProducer.flushIfNeededLocked(bucketStartTimeNs + bucketSizeNs + 1);
-    ASSERT_EQ(1UL, countProducer.mPastBuckets.size());
-    EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) !=
-                countProducer.mPastBuckets.end());
-    const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(1UL, buckets.size());
-    EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs);
-    EXPECT_EQ(2LL, buckets[0].mCount);
-
-    // 1 matched event happens in bucket 2.
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event3, bucketStartTimeNs + bucketSizeNs + 2, tagId);
-
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-
-    countProducer.flushIfNeededLocked(bucketStartTimeNs + 2 * bucketSizeNs + 1);
-    ASSERT_EQ(1UL, countProducer.mPastBuckets.size());
-    EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) !=
-                countProducer.mPastBuckets.end());
-    ASSERT_EQ(2UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    const auto& bucketInfo2 = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][1];
-    EXPECT_EQ(bucket2StartTimeNs, bucketInfo2.mBucketStartNs);
-    EXPECT_EQ(bucket2StartTimeNs + bucketSizeNs, bucketInfo2.mBucketEndNs);
-    EXPECT_EQ(1LL, bucketInfo2.mCount);
-
-    // nothing happens in bucket 3. we should not record anything for bucket 3.
-    countProducer.flushIfNeededLocked(bucketStartTimeNs + 3 * bucketSizeNs + 1);
-    ASSERT_EQ(1UL, countProducer.mPastBuckets.size());
-    EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) !=
-                countProducer.mPastBuckets.end());
-    const auto& buckets3 = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(2UL, buckets3.size());
-}
-
-TEST(CountMetricProducerTest, TestEventsWithNonSlicedCondition) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-
-    CountMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_condition(StringToId("SCREEN_ON"));
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    CountMetricProducer countProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard,
-                                      bucketStartTimeNs, bucketStartTimeNs);
-
-    countProducer.onConditionChanged(true, bucketStartTimeNs);
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, /*atomId=*/1);
-    countProducer.onMatchedLogEvent(1 /*matcher index*/, event1);
-
-    ASSERT_EQ(0UL, countProducer.mPastBuckets.size());
-
-    countProducer.onConditionChanged(false /*new condition*/, bucketStartTimeNs + 2);
-
-    // Upon this match event, the matched event1 is flushed.
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + 10, /*atomId=*/1);
-    countProducer.onMatchedLogEvent(1 /*matcher index*/, event2);
-    ASSERT_EQ(0UL, countProducer.mPastBuckets.size());
-
-    countProducer.flushIfNeededLocked(bucketStartTimeNs + bucketSizeNs + 1);
-    ASSERT_EQ(1UL, countProducer.mPastBuckets.size());
-    EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) !=
-                countProducer.mPastBuckets.end());
-
-    const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(1UL, buckets.size());
-    const auto& bucketInfo = buckets[0];
-    EXPECT_EQ(bucketStartTimeNs, bucketInfo.mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, bucketInfo.mBucketEndNs);
-    EXPECT_EQ(1LL, bucketInfo.mCount);
-}
-
-TEST(CountMetricProducerTest, TestEventsWithSlicedCondition) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-
-    int tagId = 1;
-    int conditionTagId = 2;
-
-    CountMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_condition(StringToId("APP_IN_BACKGROUND_PER_UID_AND_SCREEN_ON"));
-    MetricConditionLink* link = metric.add_links();
-    link->set_condition(StringToId("APP_IN_BACKGROUND_PER_UID"));
-    buildSimpleAtomFieldMatcher(tagId, 1, link->mutable_fields_in_what());
-    buildSimpleAtomFieldMatcher(conditionTagId, 2, link->mutable_fields_in_condition());
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, tagId, /*uid=*/"111");
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + 10, tagId, /*uid=*/"222");
-
-    ConditionKey key1;
-    key1[StringToId("APP_IN_BACKGROUND_PER_UID")] = {
-            getMockedDimensionKey(conditionTagId, 2, "111")};
-
-    ConditionKey key2;
-    key2[StringToId("APP_IN_BACKGROUND_PER_UID")] = {
-            getMockedDimensionKey(conditionTagId, 2, "222")};
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    EXPECT_CALL(*wizard, query(_, key1, _)).WillOnce(Return(ConditionState::kFalse));
-
-    EXPECT_CALL(*wizard, query(_, key2, _)).WillOnce(Return(ConditionState::kTrue));
-
-    CountMetricProducer countProducer(kConfigKey, metric, 0 /*condition tracker index*/,
-                                      {ConditionState::kUnknown}, wizard, bucketStartTimeNs,
-                                      bucketStartTimeNs);
-
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    countProducer.flushIfNeededLocked(bucketStartTimeNs + 1);
-    ASSERT_EQ(0UL, countProducer.mPastBuckets.size());
-
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-    countProducer.flushIfNeededLocked(bucketStartTimeNs + bucketSizeNs + 1);
-    ASSERT_EQ(1UL, countProducer.mPastBuckets.size());
-    EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) !=
-                countProducer.mPastBuckets.end());
-    const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(1UL, buckets.size());
-    const auto& bucketInfo = buckets[0];
-    EXPECT_EQ(bucketStartTimeNs, bucketInfo.mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, bucketInfo.mBucketEndNs);
-    EXPECT_EQ(1LL, bucketInfo.mCount);
-}
-
-TEST_P(CountMetricProducerTest_PartialBucket, TestSplitInCurrentBucket) {
-    sp<AlarmMonitor> alarmMonitor;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int64_t eventTimeNs = bucketStartTimeNs + 15 * NS_PER_SEC;
-
-    int tagId = 1;
-    int conditionTagId = 2;
-
-    CountMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    Alert alert;
-    alert.set_num_buckets(3);
-    alert.set_trigger_if_sum_gt(2);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    CountMetricProducer countProducer(kConfigKey, metric, -1 /* no condition */, {}, wizard,
-                                      bucketStartTimeNs, bucketStartTimeNs);
-
-    sp<AnomalyTracker> anomalyTracker = countProducer.addAnomalyTracker(alert, alarmMonitor);
-    EXPECT_TRUE(anomalyTracker != nullptr);
-
-    // Bucket is not flushed yet.
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, tagId, /*uid=*/"111");
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    ASSERT_EQ(0UL, countProducer.mPastBuckets.size());
-    EXPECT_EQ(0, anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-
-    // App upgrade or boot complete forces bucket flush.
-    // Check that there's a past bucket and the bucket end is not adjusted.
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            countProducer.notifyAppUpgrade(eventTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            countProducer.onStatsdInitCompleted(eventTimeNs);
-            break;
-    }
-    ASSERT_EQ(1UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(bucketStartTimeNs,
-              countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketStartNs);
-    EXPECT_EQ(eventTimeNs,
-              countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketEndNs);
-    EXPECT_EQ(0, countProducer.getCurrentBucketNum());
-    EXPECT_EQ(eventTimeNs, countProducer.mCurrentBucketStartTimeNs);
-    // Anomaly tracker only contains full buckets.
-    EXPECT_EQ(0, anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-
-    int64_t lastEndTimeNs = countProducer.getCurrentBucketEndTimeNs();
-    // Next event occurs in same bucket as partial bucket created.
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + 59 * NS_PER_SEC + 10, tagId, /*uid=*/"222");
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-    ASSERT_EQ(1UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(eventTimeNs, countProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(0, countProducer.getCurrentBucketNum());
-    EXPECT_EQ(0, anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-
-    // Third event in following bucket.
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event3, bucketStartTimeNs + 62 * NS_PER_SEC + 10, tagId, /*uid=*/"333");
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-    ASSERT_EQ(2UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(lastEndTimeNs, countProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(1, countProducer.getCurrentBucketNum());
-    EXPECT_EQ(2, anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-}
-
-TEST_P(CountMetricProducerTest_PartialBucket, TestSplitInNextBucket) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int64_t eventTimeNs = bucketStartTimeNs + 65 * NS_PER_SEC;
-
-    int tagId = 1;
-    int conditionTagId = 2;
-
-    CountMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    CountMetricProducer countProducer(kConfigKey, metric, -1 /* no condition */, {}, wizard,
-                                      bucketStartTimeNs, bucketStartTimeNs);
-
-    // Bucket is flushed yet.
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, tagId, /*uid=*/"111");
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    ASSERT_EQ(0UL, countProducer.mPastBuckets.size());
-
-    // App upgrade or boot complete forces bucket flush.
-    // Check that there's a past bucket and the bucket end is not adjusted since the upgrade
-    // occurred after the bucket end time.
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            countProducer.notifyAppUpgrade(eventTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            countProducer.onStatsdInitCompleted(eventTimeNs);
-            break;
-    }
-    ASSERT_EQ(1UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(bucketStartTimeNs,
-              countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs,
-              countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketEndNs);
-    EXPECT_EQ(eventTimeNs, countProducer.mCurrentBucketStartTimeNs);
-
-    // Next event occurs in same bucket as partial bucket created.
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + 70 * NS_PER_SEC + 10, tagId, /*uid=*/"222");
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-    ASSERT_EQ(1UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-
-    // Third event in following bucket.
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event3, bucketStartTimeNs + 121 * NS_PER_SEC + 10, tagId, /*uid=*/"333");
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-    ASSERT_EQ(2UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ((int64_t)eventTimeNs,
-              countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][1].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs,
-              countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][1].mBucketEndNs);
-}
-
-TEST(CountMetricProducerTest, TestAnomalyDetectionUnSliced) {
-    sp<AlarmMonitor> alarmMonitor;
-    Alert alert;
-    alert.set_id(11);
-    alert.set_metric_id(1);
-    alert.set_trigger_if_sum_gt(2);
-    alert.set_num_buckets(2);
-    const int32_t refPeriodSec = 1;
-    alert.set_refractory_period_secs(refPeriodSec);
-
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
-
-    CountMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, bucketStartTimeNs, bucketStartTimeNs);
-
-    sp<AnomalyTracker> anomalyTracker = countProducer.addAnomalyTracker(alert, alarmMonitor);
-
-    int tagId = 1;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, tagId);
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + 2, tagId);
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event3, bucketStartTimeNs + 2 * bucketSizeNs + 1, tagId);
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event4, bucketStartTimeNs + 3 * bucketSizeNs + 1, tagId);
-    LogEvent event5(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event5, bucketStartTimeNs + 3 * bucketSizeNs + 2, tagId);
-    LogEvent event6(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event6, bucketStartTimeNs + 3 * bucketSizeNs + 3, tagId);
-    LogEvent event7(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event7, bucketStartTimeNs + 3 * bucketSizeNs + 2 * NS_PER_SEC, tagId);
-
-    // Two events in bucket #0.
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    ASSERT_EQ(1UL, countProducer.mCurrentSlicedCounter->size());
-    EXPECT_EQ(2L, countProducer.mCurrentSlicedCounter->begin()->second);
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY), 0U);
-
-    // One event in bucket #2. No alarm as bucket #0 is trashed out.
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-    ASSERT_EQ(1UL, countProducer.mCurrentSlicedCounter->size());
-    EXPECT_EQ(1L, countProducer.mCurrentSlicedCounter->begin()->second);
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY), 0U);
-
-    // Two events in bucket #3.
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event4);
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event5);
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event6);
-    ASSERT_EQ(1UL, countProducer.mCurrentSlicedCounter->size());
-    EXPECT_EQ(3L, countProducer.mCurrentSlicedCounter->begin()->second);
-    // Anomaly at event 6 is within refractory period. The alarm is at event 5 timestamp not event 6
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY),
-              std::ceil(1.0 * event5.GetElapsedTimestampNs() / NS_PER_SEC + refPeriodSec));
-
-    countProducer.onMatchedLogEvent(1 /*log matcher index*/, event7);
-    ASSERT_EQ(1UL, countProducer.mCurrentSlicedCounter->size());
-    EXPECT_EQ(4L, countProducer.mCurrentSlicedCounter->begin()->second);
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY),
-              std::ceil(1.0 * event7.GetElapsedTimestampNs() / NS_PER_SEC + refPeriodSec));
-}
-
-TEST(CountMetricProducerTest, TestOneWeekTimeUnit) {
-    CountMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_WEEK);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    int64_t oneDayNs = 24 * 60 * 60 * 1e9;
-    int64_t fiveWeeksNs = 5 * 7 * oneDayNs;
-
-    CountMetricProducer countProducer(kConfigKey, metric, -1 /* meaning no condition */, {}, wizard,
-                                      oneDayNs, fiveWeeksNs);
-
-    int64_t fiveWeeksOneDayNs = fiveWeeksNs + oneDayNs;
-
-    EXPECT_EQ(fiveWeeksNs, countProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(4, countProducer.mCurrentBucketNum);
-    EXPECT_EQ(fiveWeeksOneDayNs, countProducer.getCurrentBucketEndTimeNs());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/metrics/DurationMetricProducer_test.cpp b/cmds/statsd/tests/metrics/DurationMetricProducer_test.cpp
deleted file mode 100644
index 05cfa37b..0000000
--- a/cmds/statsd/tests/metrics/DurationMetricProducer_test.cpp
+++ /dev/null
@@ -1,515 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/metrics/DurationMetricProducer.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-
-#include <set>
-#include <unordered_map>
-#include <vector>
-
-#include "metrics_test_helper.h"
-#include "src/condition/ConditionWizard.h"
-#include "src/stats_log_util.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-using namespace android::os::statsd;
-using namespace testing;
-using android::sp;
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-
-namespace {
-
-const ConfigKey kConfigKey(0, 12345);
-void makeLogEvent(LogEvent* logEvent, int64_t timestampNs, int atomId) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-}  // namespace
-
-// Setup for parameterized tests.
-class DurationMetricProducerTest_PartialBucket : public TestWithParam<BucketSplitEvent> {};
-
-INSTANTIATE_TEST_SUITE_P(DurationMetricProducerTest_PartialBucket,
-                         DurationMetricProducerTest_PartialBucket,
-                         testing::Values(APP_UPGRADE, BOOT_COMPLETE));
-
-TEST(DurationMetricTrackerTest, TestFirstBucket) {
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_SUM);
-
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(kConfigKey, metric, -1 /*no condition*/, {},
-                                            1 /* start index */, 2 /* stop index */,
-                                            3 /* stop_all index */, false /*nesting*/, wizard,
-                                            dimensions, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2);
-
-    EXPECT_EQ(600500000000, durationProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(10, durationProducer.mCurrentBucketNum);
-    EXPECT_EQ(660000000005, durationProducer.getCurrentBucketEndTimeNs());
-}
-
-TEST(DurationMetricTrackerTest, TestNoCondition) {
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_SUM);
-
-    int tagId = 1;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, tagId);
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + bucketSizeNs + 2, tagId);
-
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(kConfigKey, metric, -1 /*no condition*/, {},
-                                            1 /* start index */, 2 /* stop index */,
-                                            3 /* stop_all index */, false /*nesting*/, wizard,
-                                            dimensions, bucketStartTimeNs, bucketStartTimeNs);
-
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event1);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event2);
-    durationProducer.flushIfNeededLocked(bucketStartTimeNs + 2 * bucketSizeNs + 1);
-    ASSERT_EQ(1UL, durationProducer.mPastBuckets.size());
-    EXPECT_TRUE(durationProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) !=
-                durationProducer.mPastBuckets.end());
-    const auto& buckets = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(2UL, buckets.size());
-    EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs);
-    EXPECT_EQ(bucketSizeNs - 1LL, buckets[0].mDuration);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[1].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[1].mBucketEndNs);
-    EXPECT_EQ(2LL, buckets[1].mDuration);
-}
-
-TEST(DurationMetricTrackerTest, TestNonSlicedCondition) {
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_SUM);
-
-    int tagId = 1;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, tagId);
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + 2, tagId);
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event3, bucketStartTimeNs + bucketSizeNs + 1, tagId);
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event4, bucketStartTimeNs + bucketSizeNs + 3, tagId);
-
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(
-            kConfigKey, metric, 0 /* condition index */, {ConditionState::kUnknown},
-            1 /* start index */, 2 /* stop index */, 3 /* stop_all index */, false /*nesting*/,
-            wizard, dimensions, bucketStartTimeNs, bucketStartTimeNs);
-    durationProducer.mCondition = ConditionState::kFalse;
-
-    EXPECT_FALSE(durationProducer.mCondition);
-    EXPECT_FALSE(durationProducer.isConditionSliced());
-
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event1);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event2);
-    durationProducer.flushIfNeededLocked(bucketStartTimeNs + bucketSizeNs + 1);
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets.size());
-
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event3);
-    durationProducer.onConditionChanged(true /* condition */, bucketStartTimeNs + bucketSizeNs + 2);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event4);
-    durationProducer.flushIfNeededLocked(bucketStartTimeNs + 2 * bucketSizeNs + 1);
-    ASSERT_EQ(1UL, durationProducer.mPastBuckets.size());
-    EXPECT_TRUE(durationProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) !=
-                durationProducer.mPastBuckets.end());
-    const auto& buckets2 = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(1UL, buckets2.size());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets2[0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets2[0].mBucketEndNs);
-    EXPECT_EQ(1LL, buckets2[0].mDuration);
-}
-
-TEST(DurationMetricTrackerTest, TestNonSlicedConditionUnknownState) {
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_SUM);
-
-    int tagId = 1;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, bucketStartTimeNs + 1, tagId);
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, bucketStartTimeNs + 2, tagId);
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event3, bucketStartTimeNs + bucketSizeNs + 1, tagId);
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event4, bucketStartTimeNs + bucketSizeNs + 3, tagId);
-
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(
-            kConfigKey, metric, 0 /* condition index */, {ConditionState::kUnknown},
-            1 /* start index */, 2 /* stop index */, 3 /* stop_all index */, false /*nesting*/,
-            wizard, dimensions, bucketStartTimeNs, bucketStartTimeNs);
-
-    EXPECT_EQ(ConditionState::kUnknown, durationProducer.mCondition);
-    EXPECT_FALSE(durationProducer.isConditionSliced());
-
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event1);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event2);
-    durationProducer.flushIfNeededLocked(bucketStartTimeNs + bucketSizeNs + 1);
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets.size());
-
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event3);
-    durationProducer.onConditionChanged(true /* condition */, bucketStartTimeNs + bucketSizeNs + 2);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event4);
-    durationProducer.flushIfNeededLocked(bucketStartTimeNs + 2 * bucketSizeNs + 1);
-    ASSERT_EQ(1UL, durationProducer.mPastBuckets.size());
-    const auto& buckets2 = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(1UL, buckets2.size());
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets2[0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets2[0].mBucketEndNs);
-    EXPECT_EQ(1LL, buckets2[0].mDuration);
-}
-
-TEST_P(DurationMetricProducerTest_PartialBucket, TestSumDuration) {
-    /**
-     * The duration starts from the first bucket, through the two partial buckets (10-70sec),
-     * another bucket, and ends at the beginning of the next full bucket.
-     * Expected buckets:
-     *  - [10,25]: 14 secs
-     *  - [25,70]: All 45 secs
-     *  - [70,130]: All 60 secs
-     *  - [130, 210]: Only 5 secs (event ended at 135sec)
-     */
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int tagId = 1;
-
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_SUM);
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {},
-                                            1 /* start index */, 2 /* stop index */,
-                                            3 /* stop_all index */, false /*nesting*/, wizard,
-                                            dimensions, bucketStartTimeNs, bucketStartTimeNs);
-
-    int64_t startTimeNs = bucketStartTimeNs + 1 * NS_PER_SEC;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, startTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event1);
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets.size());
-    EXPECT_EQ(bucketStartTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-
-    int64_t partialBucketSplitTimeNs = bucketStartTimeNs + 15 * NS_PER_SEC;
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            durationProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            durationProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    ASSERT_EQ(1UL, durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    std::vector<DurationBucket> buckets =
-            durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs);
-    EXPECT_EQ(partialBucketSplitTimeNs, buckets[0].mBucketEndNs);
-    EXPECT_EQ(partialBucketSplitTimeNs - startTimeNs, buckets[0].mDuration);
-    EXPECT_EQ(partialBucketSplitTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(0, durationProducer.getCurrentBucketNum());
-
-    // We skip ahead one bucket, so we fill in the first two partial buckets and one full bucket.
-    int64_t endTimeNs = startTimeNs + 125 * NS_PER_SEC;
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, endTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event2);
-    buckets = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(3UL, buckets.size());
-    EXPECT_EQ(partialBucketSplitTimeNs, buckets[1].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[1].mBucketEndNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs - partialBucketSplitTimeNs, buckets[1].mDuration);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[2].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[2].mBucketEndNs);
-    EXPECT_EQ(bucketSizeNs, buckets[2].mDuration);
-}
-
-TEST_P(DurationMetricProducerTest_PartialBucket, TestSumDurationWithSplitInFollowingBucket) {
-    /**
-     * Expected buckets (start at 11s, upgrade at 75s, end at 135s):
-     *  - [10,70]: 59 secs
-     *  - [70,75]: 5 sec
-     *  - [75,130]: 55 secs
-     */
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int tagId = 1;
-
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_SUM);
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {},
-                                            1 /* start index */, 2 /* stop index */,
-                                            3 /* stop_all index */, false /*nesting*/, wizard,
-                                            dimensions, bucketStartTimeNs, bucketStartTimeNs);
-
-    int64_t startTimeNs = bucketStartTimeNs + 1 * NS_PER_SEC;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, startTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event1);
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets.size());
-    EXPECT_EQ(bucketStartTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-
-    int64_t partialBucketSplitTimeNs = bucketStartTimeNs + 65 * NS_PER_SEC;
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            durationProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            durationProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    ASSERT_EQ(2UL, durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    std::vector<DurationBucket> buckets =
-            durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs - startTimeNs, buckets[0].mDuration);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[1].mBucketStartNs);
-    EXPECT_EQ(partialBucketSplitTimeNs, buckets[1].mBucketEndNs);
-    EXPECT_EQ(partialBucketSplitTimeNs - (bucketStartTimeNs + bucketSizeNs), buckets[1].mDuration);
-    EXPECT_EQ(partialBucketSplitTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(1, durationProducer.getCurrentBucketNum());
-
-    // We skip ahead one bucket, so we fill in the first two partial buckets and one full bucket.
-    int64_t endTimeNs = startTimeNs + 125 * NS_PER_SEC;
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, endTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event2);
-    buckets = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(3UL, buckets.size());
-    EXPECT_EQ(partialBucketSplitTimeNs, buckets[2].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[2].mBucketEndNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs - partialBucketSplitTimeNs,
-              buckets[2].mDuration);
-}
-
-TEST_P(DurationMetricProducerTest_PartialBucket, TestSumDurationAnomaly) {
-    sp<AlarmMonitor> alarmMonitor;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int tagId = 1;
-
-    // Setup metric with alert.
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_SUM);
-    Alert alert;
-    alert.set_num_buckets(3);
-    alert.set_trigger_if_sum_gt(2);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {},
-                                            1 /* start index */, 2 /* stop index */,
-                                            3 /* stop_all index */, false /*nesting*/, wizard,
-                                            dimensions, bucketStartTimeNs, bucketStartTimeNs);
-
-    sp<AnomalyTracker> anomalyTracker = durationProducer.addAnomalyTracker(alert, alarmMonitor);
-    EXPECT_TRUE(anomalyTracker != nullptr);
-
-    int64_t startTimeNs = bucketStartTimeNs + 1;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, startTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event1);
-
-    int64_t partialBucketSplitTimeNs = bucketStartTimeNs + 15 * NS_PER_SEC;
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            durationProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            durationProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-
-    // We skip ahead one bucket, so we fill in the first two partial buckets and one full bucket.
-    int64_t endTimeNs = startTimeNs + 65 * NS_PER_SEC;
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, endTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event2);
-
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs - startTimeNs,
-              anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-}
-
-TEST_P(DurationMetricProducerTest_PartialBucket, TestMaxDuration) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int tagId = 1;
-
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_MAX_SPARSE);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {},
-                                            1 /* start index */, 2 /* stop index */,
-                                            3 /* stop_all index */, false /*nesting*/, wizard,
-                                            dimensions, bucketStartTimeNs, bucketStartTimeNs);
-
-    int64_t startTimeNs = bucketStartTimeNs + 1;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, startTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event1);
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets.size());
-    EXPECT_EQ(bucketStartTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-
-    int64_t partialBucketSplitTimeNs = bucketStartTimeNs + 15 * NS_PER_SEC;
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            durationProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            durationProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(partialBucketSplitTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(0, durationProducer.getCurrentBucketNum());
-
-    // We skip ahead one bucket, so we fill in the first two partial buckets and one full bucket.
-    int64_t endTimeNs = startTimeNs + 125 * NS_PER_SEC;
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, endTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event2);
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-
-    durationProducer.flushIfNeededLocked(bucketStartTimeNs + 3 * bucketSizeNs + 1);
-    std::vector<DurationBucket> buckets =
-            durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(1UL, buckets.size());
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs, buckets[0].mBucketEndNs);
-    EXPECT_EQ(endTimeNs - startTimeNs, buckets[0].mDuration);
-}
-
-TEST_P(DurationMetricProducerTest_PartialBucket, TestMaxDurationWithSplitInNextBucket) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-    int tagId = 1;
-
-    DurationMetric metric;
-    metric.set_id(1);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_aggregation_type(DurationMetric_AggregationType_MAX_SPARSE);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    FieldMatcher dimensions;
-
-    DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {},
-                                            1 /* start index */, 2 /* stop index */,
-                                            3 /* stop_all index */, false /*nesting*/, wizard,
-                                            dimensions, bucketStartTimeNs, bucketStartTimeNs);
-
-    int64_t startTimeNs = bucketStartTimeNs + 1;
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, startTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(1 /* start index*/, event1);
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets.size());
-    EXPECT_EQ(bucketStartTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-
-    int64_t partialBucketSplitTimeNs = bucketStartTimeNs + 65 * NS_PER_SEC;
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            durationProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            durationProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(partialBucketSplitTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(1, durationProducer.getCurrentBucketNum());
-
-    // Stop occurs in the same partial bucket as created for the app upgrade.
-    int64_t endTimeNs = startTimeNs + 115 * NS_PER_SEC;
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, endTimeNs, tagId);
-    durationProducer.onMatchedLogEvent(2 /* stop index*/, event2);
-    ASSERT_EQ(0UL, durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(partialBucketSplitTimeNs, durationProducer.mCurrentBucketStartTimeNs);
-
-    durationProducer.flushIfNeededLocked(bucketStartTimeNs + 2 * bucketSizeNs + 1);
-    std::vector<DurationBucket> buckets =
-            durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY];
-    ASSERT_EQ(1UL, buckets.size());
-    EXPECT_EQ(partialBucketSplitTimeNs, buckets[0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[0].mBucketEndNs);
-    EXPECT_EQ(endTimeNs - startTimeNs, buckets[0].mDuration);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/metrics/EventMetricProducer_test.cpp b/cmds/statsd/tests/metrics/EventMetricProducer_test.cpp
deleted file mode 100644
index dfbb9da..0000000
--- a/cmds/statsd/tests/metrics/EventMetricProducer_test.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/metrics/EventMetricProducer.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-
-#include <vector>
-
-#include "metrics_test_helper.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-using namespace testing;
-using android::sp;
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const ConfigKey kConfigKey(0, 12345);
-
-namespace {
-void makeLogEvent(LogEvent* logEvent, int32_t atomId, int64_t timestampNs, string str) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-    AStatsEvent_writeString(statsEvent, str.c_str());
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-}  // anonymous namespace
-
-TEST(EventMetricProducerTest, TestNoCondition) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-
-    EventMetric metric;
-    metric.set_id(1);
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateNoValuesLogEvent(&event1, 1 /*tagId*/, bucketStartTimeNs + 1);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateNoValuesLogEvent(&event2, 1 /*tagId*/, bucketStartTimeNs + 2);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, bucketStartTimeNs);
-
-    eventProducer.onMatchedLogEvent(1 /*matcher index*/, event1);
-    eventProducer.onMatchedLogEvent(1 /*matcher index*/, event2);
-
-    // Check dump report content.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    eventProducer.onDumpReport(bucketStartTimeNs + 20, true /*include current partial bucket*/,
-                               true /*erase data*/, FAST, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_event_metrics());
-    ASSERT_EQ(2, report.event_metrics().data_size());
-    EXPECT_EQ(bucketStartTimeNs + 1, report.event_metrics().data(0).elapsed_timestamp_nanos());
-    EXPECT_EQ(bucketStartTimeNs + 2, report.event_metrics().data(1).elapsed_timestamp_nanos());
-}
-
-TEST(EventMetricProducerTest, TestEventsWithNonSlicedCondition) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-
-    EventMetric metric;
-    metric.set_id(1);
-    metric.set_condition(StringToId("SCREEN_ON"));
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateNoValuesLogEvent(&event1, 1 /*tagId*/, bucketStartTimeNs + 1);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateNoValuesLogEvent(&event2, 1 /*tagId*/, bucketStartTimeNs + 10);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    EventMetricProducer eventProducer(kConfigKey, metric, 0 /*condition index*/,
-                                      {ConditionState::kUnknown}, wizard, bucketStartTimeNs);
-
-    eventProducer.onConditionChanged(true /*condition*/, bucketStartTimeNs);
-    eventProducer.onMatchedLogEvent(1 /*matcher index*/, event1);
-
-    eventProducer.onConditionChanged(false /*condition*/, bucketStartTimeNs + 2);
-
-    eventProducer.onMatchedLogEvent(1 /*matcher index*/, event2);
-
-    // Check dump report content.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    eventProducer.onDumpReport(bucketStartTimeNs + 20, true /*include current partial bucket*/,
-                               true /*erase data*/, FAST, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_event_metrics());
-    ASSERT_EQ(1, report.event_metrics().data_size());
-    EXPECT_EQ(bucketStartTimeNs + 1, report.event_metrics().data(0).elapsed_timestamp_nanos());
-}
-
-TEST(EventMetricProducerTest, TestEventsWithSlicedCondition) {
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-
-    int tagId = 1;
-    int conditionTagId = 2;
-
-    EventMetric metric;
-    metric.set_id(1);
-    metric.set_condition(StringToId("APP_IN_BACKGROUND_PER_UID_AND_SCREEN_ON"));
-    MetricConditionLink* link = metric.add_links();
-    link->set_condition(StringToId("APP_IN_BACKGROUND_PER_UID"));
-    buildSimpleAtomFieldMatcher(tagId, 1, link->mutable_fields_in_what());
-    buildSimpleAtomFieldMatcher(conditionTagId, 2, link->mutable_fields_in_condition());
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event1, 1 /*tagId*/, bucketStartTimeNs + 1, "111");
-    ConditionKey key1;
-    key1[StringToId("APP_IN_BACKGROUND_PER_UID")] = {
-            getMockedDimensionKey(conditionTagId, 2, "111")};
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    makeLogEvent(&event2, 1 /*tagId*/, bucketStartTimeNs + 10, "222");
-    ConditionKey key2;
-    key2[StringToId("APP_IN_BACKGROUND_PER_UID")] = {
-            getMockedDimensionKey(conditionTagId, 2, "222")};
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    // Condition is false for first event.
-    EXPECT_CALL(*wizard, query(_, key1, _)).WillOnce(Return(ConditionState::kFalse));
-    // Condition is true for second event.
-    EXPECT_CALL(*wizard, query(_, key2, _)).WillOnce(Return(ConditionState::kTrue));
-
-    EventMetricProducer eventProducer(kConfigKey, metric, 0 /*condition index*/,
-                                      {ConditionState::kUnknown}, wizard, bucketStartTimeNs);
-
-    eventProducer.onMatchedLogEvent(1 /*matcher index*/, event1);
-    eventProducer.onMatchedLogEvent(1 /*matcher index*/, event2);
-
-    // Check dump report content.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    eventProducer.onDumpReport(bucketStartTimeNs + 20, true /*include current partial bucket*/,
-                               true /*erase data*/, FAST, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_event_metrics());
-    ASSERT_EQ(1, report.event_metrics().data_size());
-    EXPECT_EQ(bucketStartTimeNs + 10, report.event_metrics().data(0).elapsed_timestamp_nanos());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp b/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp
deleted file mode 100644
index 5997bed..0000000
--- a/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp
+++ /dev/null
@@ -1,865 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/metrics/GaugeMetricProducer.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <math.h>
-#include <stdio.h>
-
-#include <vector>
-
-#include "logd/LogEvent.h"
-#include "metrics_test_helper.h"
-#include "src/matchers/SimpleLogMatchingTracker.h"
-#include "src/metrics/MetricProducer.h"
-#include "src/stats_log_util.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-using namespace testing;
-using android::sp;
-using std::set;
-using std::unordered_map;
-using std::vector;
-using std::make_shared;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-namespace {
-
-const ConfigKey kConfigKey(0, 12345);
-const int tagId = 1;
-const int64_t metricId = 123;
-const int64_t atomMatcherId = 678;
-const int logEventMatcherIndex = 0;
-const int64_t bucketStartTimeNs = 10 * NS_PER_SEC;
-const int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-const int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
-const int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
-const int64_t bucket4StartTimeNs = bucketStartTimeNs + 3 * bucketSizeNs;
-const int64_t partialBucketSplitTimeNs = bucketStartTimeNs + 15 * NS_PER_SEC;
-
-shared_ptr<LogEvent> makeLogEvent(int32_t atomId, int64_t timestampNs, int32_t value1, string str1,
-                                  int32_t value2) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    AStatsEvent_writeInt32(statsEvent, value1);
-    AStatsEvent_writeString(statsEvent, str1.c_str());
-    AStatsEvent_writeInt32(statsEvent, value2);
-
-    shared_ptr<LogEvent> logEvent = std::make_shared<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-}  // anonymous namespace
-
-// Setup for parameterized tests.
-class GaugeMetricProducerTest_PartialBucket : public TestWithParam<BucketSplitEvent> {};
-
-INSTANTIATE_TEST_SUITE_P(GaugeMetricProducerTest_PartialBucket,
-                         GaugeMetricProducerTest_PartialBucket,
-                         testing::Values(APP_UPGRADE, BOOT_COMPLETE));
-
-/*
- * Tests that the first bucket works correctly
- */
-TEST(GaugeMetricProducerTest, TestFirstBucket) {
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.mutable_gauge_fields_filter()->set_include_all(false);
-    auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields();
-    gaugeFieldMatcher->set_field(tagId);
-    gaugeFieldMatcher->add_child()->set_field(1);
-    gaugeFieldMatcher->add_child()->set_field(3);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard = new EventMatcherWizard({
-        new SimpleLogMatchingTracker(atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    // statsd started long ago.
-    // The metric starts in the middle of the bucket
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, -1, -1,
-                                      tagId, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2, pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    EXPECT_EQ(600500000000, gaugeProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(10, gaugeProducer.mCurrentBucketNum);
-    EXPECT_EQ(660000000005, gaugeProducer.getCurrentBucketEndTimeNs());
-}
-
-TEST(GaugeMetricProducerTest, TestPulledEventsNoCondition) {
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.mutable_gauge_fields_filter()->set_include_all(false);
-    metric.set_max_pull_delay_sec(INT_MAX);
-    auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields();
-    gaugeFieldMatcher->set_field(tagId);
-    gaugeFieldMatcher->add_child()->set_field(1);
-    gaugeFieldMatcher->add_child()->set_field(3);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(makeLogEvent(tagId, eventTimeNs + 10, 3, "some value", 11));
-                return true;
-            }));
-
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, tagId, -1,
-                                      tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(makeLogEvent(tagId, bucket2StartTimeNs + 1, 10, "some value", 11));
-
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    auto it = gaugeProducer.mCurrentSlicedBucket->begin()->second.front().mFields->begin();
-    EXPECT_EQ(INT, it->mValue.getType());
-    EXPECT_EQ(10, it->mValue.int_value);
-    it++;
-    EXPECT_EQ(11, it->mValue.int_value);
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size());
-    EXPECT_EQ(3, gaugeProducer.mPastBuckets.begin()
-                         ->second.back()
-                         .mGaugeAtoms.front()
-                         .mFields->begin()
-                         ->mValue.int_value);
-
-    allData.clear();
-    allData.push_back(makeLogEvent(tagId, bucket3StartTimeNs + 10, 24, "some value", 25));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    it = gaugeProducer.mCurrentSlicedBucket->begin()->second.front().mFields->begin();
-    EXPECT_EQ(INT, it->mValue.getType());
-    EXPECT_EQ(24, it->mValue.int_value);
-    it++;
-    EXPECT_EQ(INT, it->mValue.getType());
-    EXPECT_EQ(25, it->mValue.int_value);
-    // One dimension.
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size());
-    ASSERT_EQ(2UL, gaugeProducer.mPastBuckets.begin()->second.size());
-    it = gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.front().mFields->begin();
-    EXPECT_EQ(INT, it->mValue.getType());
-    EXPECT_EQ(10L, it->mValue.int_value);
-    it++;
-    EXPECT_EQ(INT, it->mValue.getType());
-    EXPECT_EQ(11L, it->mValue.int_value);
-
-    gaugeProducer.flushIfNeededLocked(bucket4StartTimeNs);
-    ASSERT_EQ(0UL, gaugeProducer.mCurrentSlicedBucket->size());
-    // One dimension.
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size());
-    ASSERT_EQ(3UL, gaugeProducer.mPastBuckets.begin()->second.size());
-    it = gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.front().mFields->begin();
-    EXPECT_EQ(INT, it->mValue.getType());
-    EXPECT_EQ(24L, it->mValue.int_value);
-    it++;
-    EXPECT_EQ(INT, it->mValue.getType());
-    EXPECT_EQ(25L, it->mValue.int_value);
-}
-
-TEST_P(GaugeMetricProducerTest_PartialBucket, TestPushedEvents) {
-    sp<AlarmMonitor> alarmMonitor;
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.mutable_gauge_fields_filter()->set_include_all(true);
-
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(metricId);
-    alert.set_trigger_if_sum_gt(25);
-    alert.set_num_buckets(100);
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard,
-                                      -1 /* -1 means no pulling */, -1, tagId, bucketStartTimeNs,
-                                      bucketStartTimeNs, pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    sp<AnomalyTracker> anomalyTracker = gaugeProducer.addAnomalyTracker(alert, alarmMonitor);
-    EXPECT_TRUE(anomalyTracker != nullptr);
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateTwoValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 1, 10);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    EXPECT_EQ(1UL, (*gaugeProducer.mCurrentSlicedBucket).count(DEFAULT_METRIC_DIMENSION_KEY));
-
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            gaugeProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            gaugeProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    EXPECT_EQ(0UL, (*gaugeProducer.mCurrentSlicedBucket).count(DEFAULT_METRIC_DIMENSION_KEY));
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(bucketStartTimeNs,
-              gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketStartNs);
-    EXPECT_EQ(partialBucketSplitTimeNs,
-              gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketEndNs);
-    EXPECT_EQ(0L, gaugeProducer.mCurrentBucketNum);
-    EXPECT_EQ(partialBucketSplitTimeNs, gaugeProducer.mCurrentBucketStartTimeNs);
-    // Partial buckets are not sent to anomaly tracker.
-    EXPECT_EQ(0, anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-
-    // Create an event in the same partial bucket.
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateTwoValueLogEvent(&event2, tagId, bucketStartTimeNs + 59 * NS_PER_SEC, 1, 10);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-    EXPECT_EQ(0L, gaugeProducer.mCurrentBucketNum);
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(bucketStartTimeNs,
-              gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketStartNs);
-    EXPECT_EQ(partialBucketSplitTimeNs,
-              gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketEndNs);
-    EXPECT_EQ((int64_t)partialBucketSplitTimeNs, gaugeProducer.mCurrentBucketStartTimeNs);
-    // Partial buckets are not sent to anomaly tracker.
-    EXPECT_EQ(0, anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-
-    // Next event should trigger creation of new bucket and send previous full bucket to anomaly
-    // tracker.
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    CreateTwoValueLogEvent(&event3, tagId, bucketStartTimeNs + 65 * NS_PER_SEC, 1, 10);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-    EXPECT_EQ(1L, gaugeProducer.mCurrentBucketNum);
-    ASSERT_EQ(2UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ((int64_t)bucketStartTimeNs + bucketSizeNs, gaugeProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(1, anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-
-    // Next event should trigger creation of new bucket.
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    CreateTwoValueLogEvent(&event4, tagId, bucketStartTimeNs + 125 * NS_PER_SEC, 1, 10);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, event4);
-    EXPECT_EQ(2L, gaugeProducer.mCurrentBucketNum);
-    ASSERT_EQ(3UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(2, anomalyTracker->getSumOverPastBuckets(DEFAULT_METRIC_DIMENSION_KEY));
-}
-
-TEST_P(GaugeMetricProducerTest_PartialBucket, TestPulled) {
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_max_pull_delay_sec(INT_MAX);
-    auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields();
-    gaugeFieldMatcher->set_field(tagId);
-    gaugeFieldMatcher->add_child()->set_field(2);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            .WillOnce(Return(false))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, partialBucketSplitTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, eventTimeNs, 2));
-                return true;
-            }));
-
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, tagId, -1,
-                                      tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 1));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucketStartTimeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(1, gaugeProducer.mCurrentSlicedBucket->begin()
-                         ->second.front()
-                         .mFields->begin()
-                         ->mValue.int_value);
-
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            gaugeProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            gaugeProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(bucketStartTimeNs,
-              gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketStartNs);
-    EXPECT_EQ(partialBucketSplitTimeNs,
-              gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketEndNs);
-    EXPECT_EQ(0L, gaugeProducer.mCurrentBucketNum);
-    EXPECT_EQ(partialBucketSplitTimeNs, gaugeProducer.mCurrentBucketStartTimeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(2, gaugeProducer.mCurrentSlicedBucket->begin()
-                         ->second.front()
-                         .mFields->begin()
-                         ->mValue.int_value);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + bucketSizeNs + 1, 3));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucketStartTimeNs + bucketSizeNs);
-    ASSERT_EQ(2UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(3, gaugeProducer.mCurrentSlicedBucket->begin()
-                         ->second.front()
-                         .mFields->begin()
-                         ->mValue.int_value);
-}
-
-TEST(GaugeMetricProducerTest, TestPulledWithAppUpgradeDisabled) {
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_max_pull_delay_sec(INT_MAX);
-    metric.set_split_bucket_for_app_upgrade(false);
-    auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields();
-    gaugeFieldMatcher->set_field(tagId);
-    gaugeFieldMatcher->add_child()->set_field(2);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Return(false));
-
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, tagId, -1,
-                                      tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 1));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucketStartTimeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(1, gaugeProducer.mCurrentSlicedBucket->begin()
-                         ->second.front()
-                         .mFields->begin()
-                         ->mValue.int_value);
-
-    gaugeProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-    ASSERT_EQ(0UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(0L, gaugeProducer.mCurrentBucketNum);
-    EXPECT_EQ(bucketStartTimeNs, gaugeProducer.mCurrentBucketStartTimeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(1, gaugeProducer.mCurrentSlicedBucket->begin()
-                         ->second.front()
-                         .mFields->begin()
-                         ->mValue.int_value);
-}
-
-TEST(GaugeMetricProducerTest, TestPulledEventsWithCondition) {
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_max_pull_delay_sec(INT_MAX);
-    auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields();
-    gaugeFieldMatcher->set_field(tagId);
-    gaugeFieldMatcher->add_child()->set_field(2);
-    metric.set_condition(StringToId("SCREEN_ON"));
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    int64_t conditionChangeNs = bucketStartTimeNs + 8;
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, conditionChangeNs, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, eventTimeNs + 10, 100));
-                return true;
-            }));
-
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, 0 /*condition index*/,
-                                      {ConditionState::kUnknown}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, tagId, -1, tagId, bucketStartTimeNs,
-                                      bucketStartTimeNs, pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    gaugeProducer.onConditionChanged(true, conditionChangeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(100, gaugeProducer.mCurrentSlicedBucket->begin()
-                           ->second.front()
-                           .mFields->begin()
-                           ->mValue.int_value);
-    ASSERT_EQ(0UL, gaugeProducer.mPastBuckets.size());
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 110));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(110, gaugeProducer.mCurrentSlicedBucket->begin()
-                           ->second.front()
-                           .mFields->begin()
-                           ->mValue.int_value);
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size());
-    EXPECT_EQ(100, gaugeProducer.mPastBuckets.begin()
-                           ->second.back()
-                           .mGaugeAtoms.front()
-                           .mFields->begin()
-                           ->mValue.int_value);
-
-    gaugeProducer.onConditionChanged(false, bucket2StartTimeNs + 10);
-    gaugeProducer.flushIfNeededLocked(bucket3StartTimeNs + 10);
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size());
-    ASSERT_EQ(2UL, gaugeProducer.mPastBuckets.begin()->second.size());
-    EXPECT_EQ(110L, gaugeProducer.mPastBuckets.begin()
-                            ->second.back()
-                            .mGaugeAtoms.front()
-                            .mFields->begin()
-                            ->mValue.int_value);
-}
-
-TEST(GaugeMetricProducerTest, TestPulledEventsWithSlicedCondition) {
-    const int conditionTag = 65;
-    GaugeMetric metric;
-    metric.set_id(1111111);
-    metric.set_bucket(ONE_MINUTE);
-    metric.mutable_gauge_fields_filter()->set_include_all(true);
-    metric.set_condition(StringToId("APP_DIED"));
-    metric.set_max_pull_delay_sec(INT_MAX);
-    auto dim = metric.mutable_dimensions_in_what();
-    dim->set_field(tagId);
-    dim->add_child()->set_field(1);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    EXPECT_CALL(*wizard, query(_, _, _))
-            .WillRepeatedly(
-                    Invoke([](const int conditionIndex, const ConditionKey& conditionParameters,
-                              const bool isPartialLink) {
-                        int pos[] = {1, 0, 0};
-                        Field f(conditionTag, pos, 0);
-                        HashableDimensionKey key;
-                        key.mutableValues()->emplace_back(f, Value((int32_t)1000000));
-
-                        return ConditionState::kTrue;
-                    }));
-
-    int64_t sliceConditionChangeNs = bucketStartTimeNs + 8;
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, sliceConditionChangeNs, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, eventTimeNs + 10, 1000, 100));
-                return true;
-            }));
-
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, 0 /*condition index*/,
-                                      {ConditionState::kUnknown}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, tagId, -1, tagId, bucketStartTimeNs,
-                                      bucketStartTimeNs, pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    gaugeProducer.onSlicedConditionMayChange(true, sliceConditionChangeNs);
-
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    const auto& key = gaugeProducer.mCurrentSlicedBucket->begin()->first;
-    ASSERT_EQ(1UL, key.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1000, key.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-
-    ASSERT_EQ(0UL, gaugeProducer.mPastBuckets.size());
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 1000, 110));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size());
-}
-
-TEST(GaugeMetricProducerTest, TestPulledEventsAnomalyDetection) {
-    sp<AlarmMonitor> alarmMonitor;
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Return(false));
-
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_max_pull_delay_sec(INT_MAX);
-    auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields();
-    gaugeFieldMatcher->set_field(tagId);
-    gaugeFieldMatcher->add_child()->set_field(2);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, tagId, -1,
-                                      tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(metricId);
-    alert.set_trigger_if_sum_gt(25);
-    alert.set_num_buckets(2);
-    const int32_t refPeriodSec = 60;
-    alert.set_refractory_period_secs(refPeriodSec);
-    sp<AnomalyTracker> anomalyTracker = gaugeProducer.addAnomalyTracker(alert, alarmMonitor);
-
-    int tagId = 1;
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 13));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucketStartTimeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(13L, gaugeProducer.mCurrentSlicedBucket->begin()
-                           ->second.front()
-                           .mFields->begin()
-                           ->mValue.int_value);
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY), 0U);
-
-    std::shared_ptr<LogEvent> event2 =
-            CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + bucketSizeNs + 20, 15);
-
-    allData.clear();
-    allData.push_back(event2);
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucketStartTimeNs + bucketSizeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(15L, gaugeProducer.mCurrentSlicedBucket->begin()
-                           ->second.front()
-                           .mFields->begin()
-                           ->mValue.int_value);
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY),
-              std::ceil(1.0 * event2->GetElapsedTimestampNs() / NS_PER_SEC) + refPeriodSec);
-
-    allData.clear();
-    allData.push_back(
-            CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 2 * bucketSizeNs + 10, 26));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs + 2 * bucketSizeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_EQ(26L, gaugeProducer.mCurrentSlicedBucket->begin()
-                           ->second.front()
-                           .mFields->begin()
-                           ->mValue.int_value);
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY),
-              std::ceil(1.0 * event2->GetElapsedTimestampNs() / NS_PER_SEC + refPeriodSec));
-
-    // This event does not have the gauge field. Thus the current bucket value is 0.
-    allData.clear();
-    allData.push_back(CreateNoValuesLogEvent(tagId, bucketStartTimeNs + 3 * bucketSizeNs + 10));
-    gaugeProducer.onDataPulled(allData, /** succeed */ true, bucketStartTimeNs + 3 * bucketSizeNs);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    EXPECT_TRUE(gaugeProducer.mCurrentSlicedBucket->begin()->second.front().mFields->empty());
-}
-
-TEST(GaugeMetricProducerTest, TestPullOnTrigger) {
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_sampling_type(GaugeMetric::FIRST_N_SAMPLES);
-    metric.mutable_gauge_fields_filter()->set_include_all(false);
-    metric.set_max_pull_delay_sec(INT_MAX);
-    auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields();
-    gaugeFieldMatcher->set_field(tagId);
-    gaugeFieldMatcher->add_child()->set_field(1);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, eventTimeNs, 4));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 20);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, eventTimeNs, 5));
-                return true;
-            }))
-            .WillOnce(Return(true));
-
-    int triggerId = 5;
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, tagId,
-                                      triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    ASSERT_EQ(0UL, gaugeProducer.mCurrentSlicedBucket->size());
-
-    LogEvent triggerEvent(/*uid=*/0, /*pid=*/0);
-    CreateNoValuesLogEvent(&triggerEvent, triggerId, bucketStartTimeNs + 10);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, triggerEvent);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->begin()->second.size());
-    triggerEvent.setElapsedTimestampNs(bucketStartTimeNs + 20);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, triggerEvent);
-    ASSERT_EQ(2UL, gaugeProducer.mCurrentSlicedBucket->begin()->second.size());
-    triggerEvent.setElapsedTimestampNs(bucket2StartTimeNs + 1);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, triggerEvent);
-
-    ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size());
-    ASSERT_EQ(2UL, gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.size());
-    EXPECT_EQ(4, gaugeProducer.mPastBuckets.begin()
-                         ->second.back()
-                         .mGaugeAtoms[0]
-                         .mFields->begin()
-                         ->mValue.int_value);
-    EXPECT_EQ(5, gaugeProducer.mPastBuckets.begin()
-                         ->second.back()
-                         .mGaugeAtoms[1]
-                         .mFields->begin()
-                         ->mValue.int_value);
-}
-
-TEST(GaugeMetricProducerTest, TestRemoveDimensionInOutput) {
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(ONE_MINUTE);
-    metric.set_sampling_type(GaugeMetric::FIRST_N_SAMPLES);
-    metric.mutable_gauge_fields_filter()->set_include_all(true);
-    metric.set_max_pull_delay_sec(INT_MAX);
-    auto dimensionMatcher = metric.mutable_dimensions_in_what();
-    // use field 1 as dimension.
-    dimensionMatcher->set_field(tagId);
-    dimensionMatcher->add_child()->set_field(1);
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 3);
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, eventTimeNs, 3, 4));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, eventTimeNs, 4, 5));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 20);
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, eventTimeNs, 4, 6));
-                return true;
-            }))
-            .WillOnce(Return(true));
-
-    int triggerId = 5;
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, tagId,
-                                      triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    LogEvent triggerEvent(/*uid=*/0, /*pid=*/0);
-    CreateNoValuesLogEvent(&triggerEvent, triggerId, bucketStartTimeNs + 3);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, triggerEvent);
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
-    triggerEvent.setElapsedTimestampNs(bucketStartTimeNs + 10);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, triggerEvent);
-    ASSERT_EQ(2UL, gaugeProducer.mCurrentSlicedBucket->size());
-    ASSERT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->begin()->second.size());
-    triggerEvent.setElapsedTimestampNs(bucketStartTimeNs + 20);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, triggerEvent);
-    ASSERT_EQ(2UL, gaugeProducer.mCurrentSlicedBucket->begin()->second.size());
-    triggerEvent.setElapsedTimestampNs(bucket2StartTimeNs + 1);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, triggerEvent);
-
-    ASSERT_EQ(2UL, gaugeProducer.mPastBuckets.size());
-    auto bucketIt = gaugeProducer.mPastBuckets.begin();
-    ASSERT_EQ(1UL, bucketIt->second.back().mGaugeAtoms.size());
-    EXPECT_EQ(3, bucketIt->first.getDimensionKeyInWhat().getValues().begin()->mValue.int_value);
-    EXPECT_EQ(4, bucketIt->second.back().mGaugeAtoms[0].mFields->begin()->mValue.int_value);
-    bucketIt++;
-    ASSERT_EQ(2UL, bucketIt->second.back().mGaugeAtoms.size());
-    EXPECT_EQ(4, bucketIt->first.getDimensionKeyInWhat().getValues().begin()->mValue.int_value);
-    EXPECT_EQ(5, bucketIt->second.back().mGaugeAtoms[0].mFields->begin()->mValue.int_value);
-    EXPECT_EQ(6, bucketIt->second.back().mGaugeAtoms[1].mFields->begin()->mValue.int_value);
-}
-
-/*
- * Test that BUCKET_TOO_SMALL dump reason is logged when a flushed bucket size
- * is smaller than the "min_bucket_size_nanos" specified in the metric config.
- */
-TEST(GaugeMetricProducerTest_BucketDrop, TestBucketDropWhenBucketTooSmall) {
-    GaugeMetric metric;
-    metric.set_id(metricId);
-    metric.set_bucket(FIVE_MINUTES);
-    metric.set_sampling_type(GaugeMetric::FIRST_N_SAMPLES);
-    metric.set_min_bucket_size_nanos(10000000000);  // 10 seconds
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 3, _, _))
-            // Bucket start.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, eventTimeNs, 10));
-                return true;
-            }));
-
-    int triggerId = 5;
-    GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, tagId,
-                                      triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    gaugeProducer.prepareFirstBucket();
-
-    LogEvent triggerEvent(/*uid=*/0, /*pid=*/0);
-    CreateNoValuesLogEvent(&triggerEvent, triggerId, bucketStartTimeNs + 3);
-    gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, triggerEvent);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    gaugeProducer.onDumpReport(bucketStartTimeNs + 9000000, true /* include recent buckets */, true,
-                               FAST /* dump_latency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_gauge_metrics());
-    ASSERT_EQ(0, report.gauge_metrics().data_size());
-    ASSERT_EQ(1, report.gauge_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.gauge_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 9000000),
-              report.gauge_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.gauge_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.gauge_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::BUCKET_TOO_SMALL, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 9000000), dropEvent.drop_time_millis());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/metrics/MaxDurationTracker_test.cpp b/cmds/statsd/tests/metrics/MaxDurationTracker_test.cpp
deleted file mode 100644
index fda3daa..0000000
--- a/cmds/statsd/tests/metrics/MaxDurationTracker_test.cpp
+++ /dev/null
@@ -1,424 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/metrics/duration_helper/MaxDurationTracker.h"
-#include "src/condition/ConditionWizard.h"
-#include "metrics_test_helper.h"
-#include "tests/statsd_test_util.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-#include <set>
-#include <unordered_map>
-#include <vector>
-
-using namespace android::os::statsd;
-using namespace testing;
-using android::sp;
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const ConfigKey kConfigKey(0, 12345);
-
-const int TagId = 1;
-
-const HashableDimensionKey eventKey = getMockedDimensionKey(TagId, 0, "1");
-const HashableDimensionKey conditionKey = getMockedDimensionKey(TagId, 4, "1");
-const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1");
-const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2");
-const int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-
-TEST(MaxDurationTrackerTest, TestSimpleMaxDuration) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1");
-    const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1");
-    const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2");
-
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucketNum = 0;
-
-    int64_t metricId = 1;
-    MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs,
-                               bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {});
-
-    tracker.noteStart(key1, true, bucketStartTimeNs, ConditionKey());
-    // Event starts again. This would not change anything as it already starts.
-    tracker.noteStart(key1, true, bucketStartTimeNs + 3, ConditionKey());
-    // Stopped.
-    tracker.noteStop(key1, bucketStartTimeNs + 10, false);
-
-    // Another event starts in this bucket.
-    tracker.noteStart(key2, true, bucketStartTimeNs + 20, ConditionKey());
-    tracker.noteStop(key2, bucketStartTimeNs + 40, false /*stop all*/);
-
-    tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(20LL, buckets[eventKey][0].mDuration);
-}
-
-TEST(MaxDurationTrackerTest, TestStopAll) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1");
-    const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1");
-    const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2");
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucketNum = 0;
-
-    int64_t metricId = 1;
-    MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs,
-                               bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {});
-
-    tracker.noteStart(key1, true, bucketStartTimeNs + 1, ConditionKey());
-
-    // Another event starts in this bucket.
-    tracker.noteStart(key2, true, bucketStartTimeNs + 20, ConditionKey());
-    tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 40, &buckets);
-    tracker.noteStopAll(bucketStartTimeNs + bucketSizeNs + 40);
-    EXPECT_TRUE(tracker.mInfos.empty());
-    EXPECT_TRUE(buckets.find(eventKey) == buckets.end());
-
-    tracker.flushIfNeeded(bucketStartTimeNs + 3 * bucketSizeNs + 40, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(bucketSizeNs + 40 - 1, buckets[eventKey][0].mDuration);
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[eventKey][0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[eventKey][0].mBucketEndNs);
-}
-
-TEST(MaxDurationTrackerTest, TestCrossBucketBoundary) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1");
-    const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1");
-    const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucketNum = 0;
-
-    int64_t metricId = 1;
-    MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs,
-                               bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {});
-
-    // The event starts.
-    tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 1, ConditionKey());
-
-    // Starts again. Does not DEFAULT_DIMENSION_KEY anything.
-    tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + bucketSizeNs + 1,
-                      ConditionKey());
-
-    // The event stops at early 4th bucket.
-    // Notestop is called from DurationMetricProducer's onMatchedLogEvent, which calls
-    // flushIfneeded.
-    tracker.flushIfNeeded(bucketStartTimeNs + (3 * bucketSizeNs) + 20, &buckets);
-    tracker.noteStop(DEFAULT_DIMENSION_KEY, bucketStartTimeNs + (3 * bucketSizeNs) + 20,
-                     false /*stop all*/);
-    EXPECT_TRUE(buckets.find(eventKey) == buckets.end());
-
-    tracker.flushIfNeeded(bucketStartTimeNs + 4 * bucketSizeNs, &buckets);
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ((3 * bucketSizeNs) + 20 - 1, buckets[eventKey][0].mDuration);
-    EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs, buckets[eventKey][0].mBucketStartNs);
-    EXPECT_EQ(bucketStartTimeNs + 4 * bucketSizeNs, buckets[eventKey][0].mBucketEndNs);
-}
-
-TEST(MaxDurationTrackerTest, TestCrossBucketBoundary_nested) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1");
-    const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1");
-    const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucketNum = 0;
-
-    int64_t metricId = 1;
-    MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, true, bucketStartTimeNs,
-                               bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {});
-
-    // 2 starts
-    tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 1, ConditionKey());
-    tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 10, ConditionKey());
-    // one stop
-    tracker.noteStop(DEFAULT_DIMENSION_KEY, bucketStartTimeNs + 20, false /*stop all*/);
-
-    tracker.flushIfNeeded(bucketStartTimeNs + (2 * bucketSizeNs) + 1, &buckets);
-    // Because of nesting, still not stopped.
-    EXPECT_TRUE(buckets.find(eventKey) == buckets.end());
-
-    // real stop now.
-    tracker.noteStop(DEFAULT_DIMENSION_KEY,
-                     bucketStartTimeNs + (2 * bucketSizeNs) + 5, false);
-    tracker.flushIfNeeded(bucketStartTimeNs + (3 * bucketSizeNs) + 1, &buckets);
-
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(2 * bucketSizeNs + 5 - 1, buckets[eventKey][0].mDuration);
-}
-
-TEST(MaxDurationTrackerTest, TestMaxDurationWithCondition) {
-    const HashableDimensionKey conditionDimKey = key1;
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    ConditionKey conditionKey1;
-    MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 1, "1");
-    conditionKey1[StringToId("APP_BACKGROUND")] = conditionDimKey;
-
-    /**
-    Start in first bucket, stop in second bucket. Condition turns on and off in the first bucket
-    and again turns on and off in the second bucket.
-    */
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1 * NS_PER_SEC;
-    int64_t conditionStarts1 = bucketStartTimeNs + 11 * NS_PER_SEC;
-    int64_t conditionStops1 = bucketStartTimeNs + 14 * NS_PER_SEC;
-    int64_t conditionStarts2 = bucketStartTimeNs + bucketSizeNs + 5 * NS_PER_SEC;
-    int64_t conditionStops2 = conditionStarts2 + 10 * NS_PER_SEC;
-    int64_t eventStopTimeNs = conditionStops2 + 8 * NS_PER_SEC;
-
-    int64_t metricId = 1;
-    MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs,
-                               0, bucketStartTimeNs, bucketSizeNs, true, false, {});
-    EXPECT_TRUE(tracker.mAnomalyTrackers.empty());
-
-    tracker.noteStart(key1, false, eventStartTimeNs, conditionKey1);
-    tracker.noteConditionChanged(key1, true, conditionStarts1);
-    tracker.noteConditionChanged(key1, false, conditionStops1);
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-    tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets);
-    ASSERT_EQ(0U, buckets.size());
-
-    tracker.noteConditionChanged(key1, true, conditionStarts2);
-    tracker.noteConditionChanged(key1, false, conditionStops2);
-    tracker.noteStop(key1, eventStopTimeNs, false);
-    tracker.flushIfNeeded(bucketStartTimeNs + 2 * bucketSizeNs + 1, &buckets);
-    ASSERT_EQ(1U, buckets.size());
-    vector<DurationBucket> item = buckets.begin()->second;
-    ASSERT_EQ(1UL, item.size());
-    EXPECT_EQ((int64_t)(13LL * NS_PER_SEC), item[0].mDuration);
-}
-
-TEST(MaxDurationTrackerTest, TestAnomalyDetection) {
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    ConditionKey conditionKey1;
-    MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 2, "maps");
-    conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey;
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = 13000000000;
-    int64_t durationTimeNs = 2 * 1000;
-
-    int64_t metricId = 1;
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(1);
-    alert.set_trigger_if_sum_gt(40 * NS_PER_SEC);
-    alert.set_num_buckets(2);
-    const int32_t refPeriodSec = 45;
-    alert.set_refractory_period_secs(refPeriodSec);
-    sp<AlarmMonitor> alarmMonitor;
-    sp<DurationAnomalyTracker> anomalyTracker =
-        new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor);
-    MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs,
-                               bucketNum, bucketStartTimeNs, bucketSizeNs, true, false,
-                               {anomalyTracker});
-
-    tracker.noteStart(key1, true, eventStartTimeNs, conditionKey1);
-    sp<const InternalAlarm> alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ((long long)(53ULL * NS_PER_SEC), (long long)(alarm->timestampSec * NS_PER_SEC));
-
-    // Remove the anomaly alarm when the duration is no longer fully met.
-    tracker.noteConditionChanged(key1, false, eventStartTimeNs + 15 * NS_PER_SEC);
-    ASSERT_EQ(0U, anomalyTracker->mAlarms.size());
-
-    // Since the condition was off for 10 seconds, the anomaly should trigger 10 sec later.
-    tracker.noteConditionChanged(key1, true, eventStartTimeNs + 25 * NS_PER_SEC);
-    ASSERT_EQ(1U, anomalyTracker->mAlarms.size());
-    alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ((long long)(63ULL * NS_PER_SEC), (long long)(alarm->timestampSec * NS_PER_SEC));
-}
-
-// This tests that we correctly compute the predicted time of an anomaly assuming that the current
-// state continues forward as-is.
-TEST(MaxDurationTrackerTest, TestAnomalyPredictedTimestamp) {
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    ConditionKey conditionKey1;
-    MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 2, "maps");
-    conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey;
-    ConditionKey conditionKey2;
-    conditionKey2[StringToId("APP_BACKGROUND")] = getMockedDimensionKey(TagId, 4, "2");
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    /**
-     * Suppose we have two sub-dimensions that we're taking the MAX over. In the first of these
-     * nested dimensions, we enter the pause state after 3 seconds. When we resume, the second
-     * dimension has already been running for 4 seconds. Thus, we have 40-4=36 seconds remaining
-     * before we trigger the anomaly.
-     */
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 5 * NS_PER_SEC;  // Condition is off at start.
-    int64_t conditionStarts1 = bucketStartTimeNs + 11 * NS_PER_SEC;
-    int64_t conditionStops1 = bucketStartTimeNs + 14 * NS_PER_SEC;
-    int64_t conditionStarts2 = bucketStartTimeNs + 20 * NS_PER_SEC;
-    int64_t eventStartTimeNs2 = conditionStarts2 - 4 * NS_PER_SEC;
-
-    int64_t metricId = 1;
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(1);
-    alert.set_trigger_if_sum_gt(40 * NS_PER_SEC);
-    alert.set_num_buckets(2);
-    const int32_t refPeriodSec = 45;
-    alert.set_refractory_period_secs(refPeriodSec);
-    sp<AlarmMonitor> alarmMonitor;
-    sp<DurationAnomalyTracker> anomalyTracker =
-        new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor);
-    MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs,
-                               bucketNum, bucketStartTimeNs, bucketSizeNs, true, false,
-                               {anomalyTracker});
-
-    tracker.noteStart(key1, false, eventStartTimeNs, conditionKey1);
-    tracker.noteConditionChanged(key1, true, conditionStarts1);
-    tracker.noteConditionChanged(key1, false, conditionStops1);
-    tracker.noteStart(key2, true, eventStartTimeNs2, conditionKey2);  // Condition is on already.
-    tracker.noteConditionChanged(key1, true, conditionStarts2);
-    ASSERT_EQ(1U, anomalyTracker->mAlarms.size());
-    auto alarm = anomalyTracker->mAlarms.begin()->second;
-    int64_t anomalyFireTimeSec = alarm->timestampSec;
-    EXPECT_EQ(conditionStarts2 + 36 * NS_PER_SEC,
-            (long long)anomalyFireTimeSec * NS_PER_SEC);
-
-    // Now we test the calculation now that there's a refractory period.
-    // At the correct time, declare the anomaly. This will set a refractory period. Make sure it
-    // gets correctly taken into account in future predictAnomalyTimestampNs calculations.
-    std::unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> firedAlarms({alarm});
-    anomalyTracker->informAlarmsFired(anomalyFireTimeSec * NS_PER_SEC, firedAlarms);
-    ASSERT_EQ(0u, anomalyTracker->mAlarms.size());
-    int64_t refractoryPeriodEndsSec = anomalyFireTimeSec + refPeriodSec;
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), refractoryPeriodEndsSec);
-
-    // Now stop and start again. Make sure the new predictAnomalyTimestampNs takes into account
-    // the refractory period correctly.
-    int64_t eventStopTimeNs = anomalyFireTimeSec * NS_PER_SEC + 10;
-    tracker.noteStop(key1, eventStopTimeNs, false);
-    tracker.noteStop(key2, eventStopTimeNs, false);
-    tracker.noteStart(key1, true, eventStopTimeNs + 1000000, conditionKey1);
-    // Anomaly is ongoing, but we're still in the refractory period.
-    ASSERT_EQ(1U, anomalyTracker->mAlarms.size());
-    alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ(refractoryPeriodEndsSec, (long long)(alarm->timestampSec));
-
-    // Makes sure it is correct after the refractory period is over.
-    tracker.noteStop(key1, eventStopTimeNs + 2000000, false);
-    int64_t justBeforeRefPeriodNs = (refractoryPeriodEndsSec - 2) * NS_PER_SEC;
-    tracker.noteStart(key1, true, justBeforeRefPeriodNs, conditionKey1);
-    alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ(justBeforeRefPeriodNs + 40 * NS_PER_SEC,
-                (unsigned long long)(alarm->timestampSec * NS_PER_SEC));
-}
-
-// Suppose that within one tracker there are two dimensions A and B.
-// Suppose A starts, then B starts, and then A stops. We still need to set an anomaly based on the
-// elapsed duration of B.
-TEST(MaxDurationTrackerTest, TestAnomalyPredictedTimestamp_UpdatedOnStop) {
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    ConditionKey conditionKey1;
-    MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 2, "maps");
-    conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey;
-    ConditionKey conditionKey2;
-    conditionKey2[StringToId("APP_BACKGROUND")] = getMockedDimensionKey(TagId, 4, "2");
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    /**
-     * Suppose we have two sub-dimensions that we're taking the MAX over. In the first of these
-     * nested dimensions, are started for 8 seconds. When we stop, the other nested dimension has
-     * been started for 5 seconds. So we can only allow 35 more seconds from now.
-     */
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs1 = bucketStartTimeNs + 5 * NS_PER_SEC;  // Condition is off at start.
-    int64_t eventStopTimeNs1 = bucketStartTimeNs + 13 * NS_PER_SEC;
-    int64_t eventStartTimeNs2 = bucketStartTimeNs + 8 * NS_PER_SEC;
-
-    int64_t metricId = 1;
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(1);
-    alert.set_trigger_if_sum_gt(40 * NS_PER_SEC);
-    alert.set_num_buckets(2);
-    const int32_t refPeriodSec = 45;
-    alert.set_refractory_period_secs(refPeriodSec);
-    sp<AlarmMonitor> alarmMonitor;
-    sp<DurationAnomalyTracker> anomalyTracker =
-        new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor);
-    MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs,
-                               bucketNum, bucketStartTimeNs, bucketSizeNs, true, false,
-                               {anomalyTracker});
-
-    tracker.noteStart(key1, true, eventStartTimeNs1, conditionKey1);
-    tracker.noteStart(key2, true, eventStartTimeNs2, conditionKey2);
-    tracker.noteStop(key1, eventStopTimeNs1, false);
-    ASSERT_EQ(1U, anomalyTracker->mAlarms.size());
-    auto alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ(eventStopTimeNs1 + 35 * NS_PER_SEC,
-              (unsigned long long)(alarm->timestampSec * NS_PER_SEC));
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/metrics/OringDurationTracker_test.cpp b/cmds/statsd/tests/metrics/OringDurationTracker_test.cpp
deleted file mode 100644
index 1d6f7de..0000000
--- a/cmds/statsd/tests/metrics/OringDurationTracker_test.cpp
+++ /dev/null
@@ -1,576 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/metrics/duration_helper/OringDurationTracker.h"
-#include "src/condition/ConditionWizard.h"
-#include "metrics_test_helper.h"
-#include "tests/statsd_test_util.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <math.h>
-#include <stdio.h>
-#include <set>
-#include <unordered_map>
-#include <vector>
-
-using namespace testing;
-using android::sp;
-using std::set;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-namespace android {
-namespace os {
-namespace statsd {
-
-const ConfigKey kConfigKey(0, 12345);
-const int TagId = 1;
-const int64_t metricId = 123;
-const HashableDimensionKey eventKey = getMockedDimensionKey(TagId, 0, "event");
-
-const HashableDimensionKey kConditionKey1 = getMockedDimensionKey(TagId, 1, "maps");
-const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-const int64_t bucketSizeNs = 30 * NS_PER_SEC;
-
-TEST(OringDurationTrackerTest, TestDurationOverlap) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-    int64_t durationTimeNs = 2 * 1000;
-
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false,
-                                 bucketStartTimeNs, bucketNum, bucketStartTimeNs, bucketSizeNs,
-                                 false, false, {});
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey());
-    EXPECT_EQ((long long)eventStartTimeNs, tracker.mLastStartTime);
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs + 10, ConditionKey());  // overlapping wl
-    EXPECT_EQ((long long)eventStartTimeNs, tracker.mLastStartTime);
-
-    tracker.noteStop(kEventKey1, eventStartTimeNs + durationTimeNs, false);
-    tracker.flushIfNeeded(eventStartTimeNs + bucketSizeNs + 1, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(durationTimeNs, buckets[eventKey][0].mDuration);
-}
-
-TEST(OringDurationTrackerTest, TestDurationNested) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs,
-                                 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {});
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey());
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs + 10, ConditionKey());  // overlapping wl
-
-    tracker.noteStop(kEventKey1, eventStartTimeNs + 2000, false);
-    tracker.noteStop(kEventKey1, eventStartTimeNs + 2003, false);
-
-    tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(2003LL, buckets[eventKey][0].mDuration);
-}
-
-TEST(OringDurationTrackerTest, TestStopAll) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const std::vector<HashableDimensionKey> kConditionKey1 =
-        {getMockedDimensionKey(TagId, 1, "maps")};
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs,
-                                 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {});
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey());
-    tracker.noteStart(kEventKey2, true, eventStartTimeNs + 10, ConditionKey());  // overlapping wl
-
-    tracker.noteStopAll(eventStartTimeNs + 2003);
-
-    tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(2003LL, buckets[eventKey][0].mDuration);
-}
-
-TEST(OringDurationTrackerTest, TestCrossBucketBoundary) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-    int64_t durationTimeNs = 2 * 1000;
-
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs,
-                                 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {});
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey());
-    EXPECT_EQ((long long)eventStartTimeNs, tracker.mLastStartTime);
-    tracker.flushIfNeeded(eventStartTimeNs + 2 * bucketSizeNs, &buckets);
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs + 2 * bucketSizeNs, ConditionKey());
-    EXPECT_EQ((long long)(bucketStartTimeNs + 2 * bucketSizeNs), tracker.mLastStartTime);
-
-    ASSERT_EQ(2u, buckets[eventKey].size());
-    EXPECT_EQ(bucketSizeNs - 1, buckets[eventKey][0].mDuration);
-    EXPECT_EQ(bucketSizeNs, buckets[eventKey][1].mDuration);
-
-    tracker.noteStop(kEventKey1, eventStartTimeNs + 2 * bucketSizeNs + 10, false);
-    tracker.noteStop(kEventKey1, eventStartTimeNs + 2 * bucketSizeNs + 12, false);
-    tracker.flushIfNeeded(eventStartTimeNs + 2 * bucketSizeNs + 12, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(2u, buckets[eventKey].size());
-    EXPECT_EQ(bucketSizeNs - 1, buckets[eventKey][0].mDuration);
-    EXPECT_EQ(bucketSizeNs, buckets[eventKey][1].mDuration);
-}
-
-TEST(OringDurationTrackerTest, TestDurationConditionChange) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    ConditionKey key1;
-    key1[StringToId("APP_BACKGROUND")] = kConditionKey1;
-
-    EXPECT_CALL(*wizard, query(_, key1, _))  // #4
-            .WillOnce(Return(ConditionState::kFalse));
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-    int64_t durationTimeNs = 2 * 1000;
-
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false,
-                                 bucketStartTimeNs, bucketNum, bucketStartTimeNs, bucketSizeNs,
-                                 true, false, {});
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs, key1);
-
-    tracker.onSlicedConditionMayChange(true, eventStartTimeNs + 5);
-
-    tracker.noteStop(kEventKey1, eventStartTimeNs + durationTimeNs, false);
-
-    tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(5LL, buckets[eventKey][0].mDuration);
-}
-
-TEST(OringDurationTrackerTest, TestDurationConditionChange2) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    ConditionKey key1;
-    key1[StringToId("APP_BACKGROUND")] = kConditionKey1;
-
-    EXPECT_CALL(*wizard, query(_, key1, _))
-            .Times(2)
-            .WillOnce(Return(ConditionState::kFalse))
-            .WillOnce(Return(ConditionState::kTrue));
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-    int64_t durationTimeNs = 2 * 1000;
-
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false,
-                                 bucketStartTimeNs, bucketNum, bucketStartTimeNs, bucketSizeNs,
-                                 true, false, {});
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs, key1);
-    // condition to false; record duration 5n
-    tracker.onSlicedConditionMayChange(true, eventStartTimeNs + 5);
-    // condition to true.
-    tracker.onSlicedConditionMayChange(true, eventStartTimeNs + 1000);
-    // 2nd duration: 1000ns
-    tracker.noteStop(kEventKey1, eventStartTimeNs + durationTimeNs, false);
-
-    tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(1005LL, buckets[eventKey][0].mDuration);
-}
-
-TEST(OringDurationTrackerTest, TestDurationConditionChangeNested) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    ConditionKey key1;
-    key1[StringToId("APP_BACKGROUND")] = kConditionKey1;
-
-    EXPECT_CALL(*wizard, query(_, key1, _))  // #4
-            .WillOnce(Return(ConditionState::kFalse));
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-
-    int64_t bucketStartTimeNs = 10000000000;
-    int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + 1;
-
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs,
-                                 bucketNum, bucketStartTimeNs, bucketSizeNs, true, false, {});
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs, key1);
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs + 2, key1);
-
-    tracker.noteStop(kEventKey1, eventStartTimeNs + 3, false);
-
-    tracker.onSlicedConditionMayChange(true, eventStartTimeNs + 15);
-
-    tracker.noteStop(kEventKey1, eventStartTimeNs + 2003, false);
-
-    tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets);
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(15LL, buckets[eventKey][0].mDuration);
-}
-
-TEST(OringDurationTrackerTest, TestPredictAnomalyTimestamp) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(1);
-    alert.set_trigger_if_sum_gt(40 * NS_PER_SEC);
-    alert.set_num_buckets(2);
-    alert.set_refractory_period_secs(1);
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    int64_t bucketStartTimeNs = 10 * NS_PER_SEC;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + NS_PER_SEC + 1;
-
-    sp<AlarmMonitor> alarmMonitor;
-    sp<DurationAnomalyTracker> anomalyTracker =
-        new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor);
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs,
-                                 bucketNum, bucketStartTimeNs, bucketSizeNs, true, false,
-                                 {anomalyTracker});
-
-    // Nothing in the past bucket.
-    tracker.noteStart(DEFAULT_DIMENSION_KEY, true, eventStartTimeNs, ConditionKey());
-    EXPECT_EQ((long long)(alert.trigger_if_sum_gt() + eventStartTimeNs),
-              tracker.predictAnomalyTimestampNs(*anomalyTracker, eventStartTimeNs));
-
-    tracker.noteStop(DEFAULT_DIMENSION_KEY, eventStartTimeNs + 3, false);
-    ASSERT_EQ(0u, buckets[eventKey].size());
-
-    int64_t event1StartTimeNs = eventStartTimeNs + 10;
-    tracker.noteStart(kEventKey1, true, event1StartTimeNs, ConditionKey());
-    // No past buckets. The anomaly will happen in bucket #0.
-    EXPECT_EQ((long long)(event1StartTimeNs + alert.trigger_if_sum_gt() - 3),
-              tracker.predictAnomalyTimestampNs(*anomalyTracker, event1StartTimeNs));
-
-    int64_t event1StopTimeNs = eventStartTimeNs + bucketSizeNs + 10;
-    tracker.flushIfNeeded(event1StopTimeNs, &buckets);
-    tracker.noteStop(kEventKey1, event1StopTimeNs, false);
-
-    EXPECT_TRUE(buckets.find(eventKey) != buckets.end());
-    ASSERT_EQ(1u, buckets[eventKey].size());
-    EXPECT_EQ(3LL + bucketStartTimeNs + bucketSizeNs - eventStartTimeNs - 10,
-              buckets[eventKey][0].mDuration);
-
-    const int64_t bucket0Duration = 3ULL + bucketStartTimeNs + bucketSizeNs - eventStartTimeNs - 10;
-    const int64_t bucket1Duration = eventStartTimeNs + 10 - bucketStartTimeNs;
-
-    // One past buckets. The anomaly will happen in bucket #1.
-    int64_t event2StartTimeNs = eventStartTimeNs + bucketSizeNs + 15;
-    tracker.noteStart(kEventKey1, true, event2StartTimeNs, ConditionKey());
-    EXPECT_EQ((long long)(event2StartTimeNs + alert.trigger_if_sum_gt() - bucket0Duration -
-                          bucket1Duration),
-              tracker.predictAnomalyTimestampNs(*anomalyTracker, event2StartTimeNs));
-    tracker.noteStop(kEventKey1, event2StartTimeNs + 1, false);
-
-    // Only one past buckets is applicable. Bucket +0 should be trashed. The anomaly will happen in
-    // bucket #2.
-    int64_t event3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs - 9 * NS_PER_SEC;
-    tracker.noteStart(kEventKey1, true, event3StartTimeNs, ConditionKey());
-    EXPECT_EQ((long long)(event3StartTimeNs + alert.trigger_if_sum_gt() - bucket1Duration - 1LL),
-              tracker.predictAnomalyTimestampNs(*anomalyTracker, event3StartTimeNs));
-}
-
-TEST(OringDurationTrackerTest, TestPredictAnomalyTimestamp2) {
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(1);
-    alert.set_trigger_if_sum_gt(5 * NS_PER_SEC);
-    alert.set_num_buckets(1);
-    alert.set_refractory_period_secs(20);
-
-    int64_t bucketStartTimeNs = 10 * NS_PER_SEC;
-    int64_t bucketNum = 0;
-
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<AlarmMonitor> alarmMonitor;
-    sp<DurationAnomalyTracker> anomalyTracker =
-        new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor);
-    OringDurationTracker tracker(kConfigKey, metricId, DEFAULT_METRIC_DIMENSION_KEY, wizard, 1,
-
-                                 true, bucketStartTimeNs, bucketNum, bucketStartTimeNs,
-                                 bucketSizeNs, true, false, {anomalyTracker});
-
-    int64_t eventStartTimeNs = bucketStartTimeNs + 9 * NS_PER_SEC;
-    tracker.noteStart(DEFAULT_DIMENSION_KEY, true, eventStartTimeNs, ConditionKey());
-    // Anomaly happens in the bucket #1.
-    EXPECT_EQ((long long)(bucketStartTimeNs + 14 * NS_PER_SEC),
-              tracker.predictAnomalyTimestampNs(*anomalyTracker, eventStartTimeNs));
-
-    tracker.noteStop(DEFAULT_DIMENSION_KEY, bucketStartTimeNs + 14 * NS_PER_SEC, false);
-
-    EXPECT_EQ((long long)(bucketStartTimeNs + 34 * NS_PER_SEC) / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY));
-
-    int64_t event2StartTimeNs = bucketStartTimeNs + 22 * NS_PER_SEC;
-    EXPECT_EQ((long long)(bucketStartTimeNs + 34 * NS_PER_SEC) / NS_PER_SEC,
-              anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY));
-    EXPECT_EQ((long long)(bucketStartTimeNs + 35 * NS_PER_SEC),
-              tracker.predictAnomalyTimestampNs(*anomalyTracker, event2StartTimeNs));
-}
-
-TEST(OringDurationTrackerTest, TestPredictAnomalyTimestamp3) {
-    // Test the cases where the refractory period is smaller than the bucket size, longer than
-    // the bucket size, and longer than 2x of the anomaly detection window.
-    for (int j = 0; j < 3; j++) {
-        int64_t thresholdNs = j * bucketSizeNs + 5 * NS_PER_SEC;
-        for (int i = 0; i <= 7; ++i) {
-
-            Alert alert;
-            alert.set_id(101);
-            alert.set_metric_id(1);
-            alert.set_trigger_if_sum_gt(thresholdNs);
-            alert.set_num_buckets(3);
-            alert.set_refractory_period_secs(
-                bucketSizeNs / NS_PER_SEC / 2 + i * bucketSizeNs / NS_PER_SEC);
-
-            int64_t bucketStartTimeNs = 10 * NS_PER_SEC;
-            int64_t bucketNum = 101;
-
-            sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-            sp<AlarmMonitor> alarmMonitor;
-            sp<DurationAnomalyTracker> anomalyTracker =
-                new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor);
-            OringDurationTracker tracker(kConfigKey, metricId, DEFAULT_METRIC_DIMENSION_KEY, wizard,
-                                         1, true, bucketStartTimeNs, bucketNum, bucketStartTimeNs,
-                                         bucketSizeNs, true, false, {anomalyTracker});
-
-            int64_t eventStartTimeNs = bucketStartTimeNs + 9 * NS_PER_SEC;
-            tracker.noteStart(DEFAULT_DIMENSION_KEY, true, eventStartTimeNs, ConditionKey());
-            EXPECT_EQ((long long)(eventStartTimeNs + thresholdNs),
-                      tracker.predictAnomalyTimestampNs(*anomalyTracker, eventStartTimeNs));
-            int64_t eventStopTimeNs = eventStartTimeNs + thresholdNs + NS_PER_SEC;
-            tracker.noteStop(DEFAULT_DIMENSION_KEY, eventStopTimeNs, false);
-
-            int64_t refractoryPeriodEndSec =
-                anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY);
-            EXPECT_EQ(eventStopTimeNs / (int64_t)NS_PER_SEC + alert.refractory_period_secs(),
-                       refractoryPeriodEndSec);
-
-            // Acquire and release a wakelock in the next bucket.
-            int64_t event2StartTimeNs = eventStopTimeNs + bucketSizeNs;
-            tracker.noteStart(DEFAULT_DIMENSION_KEY, true, event2StartTimeNs, ConditionKey());
-            int64_t event2StopTimeNs = event2StartTimeNs + 4 * NS_PER_SEC;
-            tracker.noteStop(DEFAULT_DIMENSION_KEY, event2StopTimeNs, false);
-
-            // Test the alarm prediction works well when seeing another wakelock start event.
-            for (int k = 0; k <= 2; ++k) {
-                int64_t event3StartTimeNs = event2StopTimeNs + NS_PER_SEC + k * bucketSizeNs;
-                int64_t alarmTimestampNs =
-                    tracker.predictAnomalyTimestampNs(*anomalyTracker, event3StartTimeNs);
-                EXPECT_GT(alarmTimestampNs, 0u);
-                EXPECT_GE(alarmTimestampNs, event3StartTimeNs);
-                EXPECT_GE(alarmTimestampNs, refractoryPeriodEndSec *(int64_t) NS_PER_SEC);
-            }
-        }
-    }
-}
-
-TEST(OringDurationTrackerTest, TestAnomalyDetectionExpiredAlarm) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(1);
-    alert.set_trigger_if_sum_gt(40 * NS_PER_SEC);
-    alert.set_num_buckets(2);
-    const int32_t refPeriodSec = 45;
-    alert.set_refractory_period_secs(refPeriodSec);
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-
-    int64_t bucketStartTimeNs = 10 * NS_PER_SEC;
-    int64_t bucketNum = 0;
-    int64_t eventStartTimeNs = bucketStartTimeNs + NS_PER_SEC + 1;
-
-    sp<AlarmMonitor> alarmMonitor;
-    sp<DurationAnomalyTracker> anomalyTracker =
-        new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor);
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true /*nesting*/,
-                                 bucketStartTimeNs, bucketNum, bucketStartTimeNs, bucketSizeNs,
-                                 false, false, {anomalyTracker});
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey());
-    tracker.noteStop(kEventKey1, eventStartTimeNs + 10, false);
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), 0U);
-    EXPECT_TRUE(tracker.mStarted.empty());
-    EXPECT_EQ(10LL, tracker.mStateKeyDurationMap[DEFAULT_DIMENSION_KEY].mDuration);  // 10ns
-
-    ASSERT_EQ(0u, tracker.mStarted.size());
-
-    tracker.noteStart(kEventKey1, true, eventStartTimeNs + 20, ConditionKey());
-    ASSERT_EQ(1u, anomalyTracker->mAlarms.size());
-    EXPECT_EQ((long long)(52ULL * NS_PER_SEC),  // (10s + 1s + 1ns + 20ns) - 10ns + 40s, rounded up
-              (long long)(anomalyTracker->mAlarms.begin()->second->timestampSec * NS_PER_SEC));
-    // The alarm is set to fire at 52s, and when it does, an anomaly would be declared. However,
-    // because this is a unit test, the alarm won't actually fire at all. Since the alarm fails
-    // to fire in time, the anomaly is instead caught when noteStop is called, at around 71s.
-    tracker.flushIfNeeded(eventStartTimeNs + 2 * bucketSizeNs + 25, &buckets);
-    tracker.noteStop(kEventKey1, eventStartTimeNs + 2 * bucketSizeNs + 25, false);
-    EXPECT_EQ(anomalyTracker->getSumOverPastBuckets(eventKey), (long long)(bucketSizeNs));
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey),
-              std::ceil((eventStartTimeNs + 2 * bucketSizeNs + 25.0) / NS_PER_SEC + refPeriodSec));
-}
-
-TEST(OringDurationTrackerTest, TestAnomalyDetectionFiredAlarm) {
-    const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event");
-
-    const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
-    const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(1);
-    alert.set_trigger_if_sum_gt(40 * NS_PER_SEC);
-    alert.set_num_buckets(2);
-    const int32_t refPeriodSec = 45;
-    alert.set_refractory_period_secs(refPeriodSec);
-
-    unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets;
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    ConditionKey conkey;
-    conkey[StringToId("APP_BACKGROUND")] = kConditionKey1;
-    int64_t bucketStartTimeNs = 10 * NS_PER_SEC;
-    int64_t bucketSizeNs = 30 * NS_PER_SEC;
-
-    sp<AlarmMonitor> alarmMonitor;
-    sp<DurationAnomalyTracker> anomalyTracker =
-        new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor);
-    OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true /*nesting*/,
-                                 bucketStartTimeNs, 0, bucketStartTimeNs, bucketSizeNs, false,
-                                 false, {anomalyTracker});
-
-    tracker.noteStart(kEventKey1, true, 15 * NS_PER_SEC, conkey);  // start key1
-    ASSERT_EQ(1u, anomalyTracker->mAlarms.size());
-    sp<const InternalAlarm> alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ((long long)(55ULL * NS_PER_SEC), (long long)(alarm->timestampSec * NS_PER_SEC));
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), 0U);
-
-    tracker.noteStop(kEventKey1, 17 * NS_PER_SEC, false); // stop key1 (2 seconds later)
-    ASSERT_EQ(0u, anomalyTracker->mAlarms.size());
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), 0U);
-
-    tracker.noteStart(kEventKey1, true, 22 * NS_PER_SEC, conkey);  // start key1 again
-    ASSERT_EQ(1u, anomalyTracker->mAlarms.size());
-    alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ((long long)(60ULL * NS_PER_SEC), (long long)(alarm->timestampSec * NS_PER_SEC));
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), 0U);
-
-    tracker.noteStart(kEventKey2, true, 32 * NS_PER_SEC, conkey);  // start key2
-    ASSERT_EQ(1u, anomalyTracker->mAlarms.size());
-    alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ((long long)(60ULL * NS_PER_SEC), (long long)(alarm->timestampSec * NS_PER_SEC));
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), 0U);
-
-    tracker.noteStop(kEventKey1, 47 * NS_PER_SEC, false); // stop key1
-    ASSERT_EQ(1u, anomalyTracker->mAlarms.size());
-    alarm = anomalyTracker->mAlarms.begin()->second;
-    EXPECT_EQ((long long)(60ULL * NS_PER_SEC), (long long)(alarm->timestampSec * NS_PER_SEC));
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), 0U);
-
-    // Now, at 60s, which is 38s after key1 started again, we have reached 40s of 'on' time.
-    std::unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> firedAlarms({alarm});
-    anomalyTracker->informAlarmsFired(62 * NS_PER_SEC, firedAlarms);
-    ASSERT_EQ(0u, anomalyTracker->mAlarms.size());
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), 62U + refPeriodSec);
-
-    tracker.noteStop(kEventKey2, 69 * NS_PER_SEC, false); // stop key2
-    ASSERT_EQ(0u, anomalyTracker->mAlarms.size());
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(eventKey), 62U + refPeriodSec);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/metrics/ValueMetricProducer_test.cpp b/cmds/statsd/tests/metrics/ValueMetricProducer_test.cpp
deleted file mode 100644
index 5666501..0000000
--- a/cmds/statsd/tests/metrics/ValueMetricProducer_test.cpp
+++ /dev/null
@@ -1,5061 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "src/metrics/ValueMetricProducer.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <math.h>
-#include <stdio.h>
-
-#include <vector>
-
-#include "metrics_test_helper.h"
-#include "src/matchers/SimpleLogMatchingTracker.h"
-#include "src/metrics/MetricProducer.h"
-#include "src/stats_log_util.h"
-#include "tests/statsd_test_util.h"
-
-using namespace testing;
-using android::sp;
-using std::make_shared;
-using std::set;
-using std::shared_ptr;
-using std::unordered_map;
-using std::vector;
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-namespace {
-
-const ConfigKey kConfigKey(0, 12345);
-const int tagId = 1;
-const int64_t metricId = 123;
-const int64_t atomMatcherId = 678;
-const int logEventMatcherIndex = 0;
-const int64_t bucketStartTimeNs = 10000000000;
-const int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL;
-const int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
-const int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
-const int64_t bucket4StartTimeNs = bucketStartTimeNs + 3 * bucketSizeNs;
-const int64_t bucket5StartTimeNs = bucketStartTimeNs + 4 * bucketSizeNs;
-const int64_t bucket6StartTimeNs = bucketStartTimeNs + 5 * bucketSizeNs;
-double epsilon = 0.001;
-
-static void assertPastBucketValuesSingleKey(
-        const std::unordered_map<MetricDimensionKey, std::vector<ValueBucket>>& mPastBuckets,
-        const std::initializer_list<int>& expectedValuesList,
-        const std::initializer_list<int64_t>& expectedDurationNsList,
-        const std::initializer_list<int64_t>& expectedStartTimeNsList,
-        const std::initializer_list<int64_t>& expectedEndTimeNsList) {
-    vector<int> expectedValues(expectedValuesList);
-    vector<int64_t> expectedDurationNs(expectedDurationNsList);
-    vector<int64_t> expectedStartTimeNs(expectedStartTimeNsList);
-    vector<int64_t> expectedEndTimeNs(expectedEndTimeNsList);
-
-    ASSERT_EQ(expectedValues.size(), expectedDurationNs.size());
-    ASSERT_EQ(expectedValues.size(), expectedStartTimeNs.size());
-    ASSERT_EQ(expectedValues.size(), expectedEndTimeNs.size());
-
-    if (expectedValues.size() == 0) {
-        ASSERT_EQ(0, mPastBuckets.size());
-        return;
-    }
-
-    ASSERT_EQ(1, mPastBuckets.size());
-    ASSERT_EQ(expectedValues.size(), mPastBuckets.begin()->second.size());
-
-    const vector<ValueBucket>& buckets = mPastBuckets.begin()->second;
-    for (int i = 0; i < expectedValues.size(); i++) {
-        EXPECT_EQ(expectedValues[i], buckets[i].values[0].long_value)
-                << "Values differ at index " << i;
-        EXPECT_EQ(expectedDurationNs[i], buckets[i].mConditionTrueNs)
-                << "Condition duration value differ at index " << i;
-        EXPECT_EQ(expectedStartTimeNs[i], buckets[i].mBucketStartNs)
-                << "Start time differs at index " << i;
-        EXPECT_EQ(expectedEndTimeNs[i], buckets[i].mBucketEndNs)
-                << "End time differs at index " << i;
-    }
-}
-
-}  // anonymous namespace
-
-class ValueMetricProducerTestHelper {
-public:
-    static sp<ValueMetricProducer> createValueProducerNoConditions(
-            sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric) {
-        UidMap uidMap;
-        SimpleAtomMatcher atomMatcher;
-        atomMatcher.set_atom_id(tagId);
-        sp<EventMatcherWizard> eventMatcherWizard =
-                new EventMatcherWizard({new SimpleLogMatchingTracker(
-                        atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-        sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-        EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _))
-                .WillOnce(Return());
-        EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _))
-                .WillRepeatedly(Return());
-
-        sp<ValueMetricProducer> valueProducer =
-                new ValueMetricProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                        wizard, logEventMatcherIndex, eventMatcherWizard, tagId,
-                                        bucketStartTimeNs, bucketStartTimeNs, pullerManager);
-        valueProducer->prepareFirstBucket();
-        return valueProducer;
-    }
-
-    static sp<ValueMetricProducer> createValueProducerWithCondition(
-            sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric,
-            ConditionState conditionAfterFirstBucketPrepared) {
-        UidMap uidMap;
-        SimpleAtomMatcher atomMatcher;
-        atomMatcher.set_atom_id(tagId);
-        sp<EventMatcherWizard> eventMatcherWizard =
-                new EventMatcherWizard({new SimpleLogMatchingTracker(
-                        atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-        sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-        EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _))
-                .WillOnce(Return());
-        EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _))
-                .WillRepeatedly(Return());
-
-        sp<ValueMetricProducer> valueProducer = new ValueMetricProducer(
-                kConfigKey, metric, 0 /*condition index*/, {ConditionState::kUnknown}, wizard,
-                logEventMatcherIndex, eventMatcherWizard, tagId, bucketStartTimeNs,
-                bucketStartTimeNs, pullerManager);
-        valueProducer->prepareFirstBucket();
-        valueProducer->mCondition = conditionAfterFirstBucketPrepared;
-        return valueProducer;
-    }
-
-    static sp<ValueMetricProducer> createValueProducerWithState(
-            sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric,
-            vector<int32_t> slicedStateAtoms,
-            unordered_map<int, unordered_map<int, int64_t>> stateGroupMap) {
-        UidMap uidMap;
-        SimpleAtomMatcher atomMatcher;
-        atomMatcher.set_atom_id(tagId);
-        sp<EventMatcherWizard> eventMatcherWizard =
-                new EventMatcherWizard({new SimpleLogMatchingTracker(
-                        atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-        sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-        EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _))
-                .WillOnce(Return());
-        EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _))
-                .WillRepeatedly(Return());
-
-        sp<ValueMetricProducer> valueProducer = new ValueMetricProducer(
-                kConfigKey, metric, -1 /* no condition */, {}, wizard, logEventMatcherIndex,
-                eventMatcherWizard, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager, {},
-                {}, slicedStateAtoms, stateGroupMap);
-        valueProducer->prepareFirstBucket();
-        return valueProducer;
-    }
-
-    static sp<ValueMetricProducer> createValueProducerWithConditionAndState(
-            sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric,
-            vector<int32_t> slicedStateAtoms,
-            unordered_map<int, unordered_map<int, int64_t>> stateGroupMap,
-            ConditionState conditionAfterFirstBucketPrepared) {
-        UidMap uidMap;
-        SimpleAtomMatcher atomMatcher;
-        atomMatcher.set_atom_id(tagId);
-        sp<EventMatcherWizard> eventMatcherWizard =
-                new EventMatcherWizard({new SimpleLogMatchingTracker(
-                        atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-        sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-        EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _))
-                .WillOnce(Return());
-        EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _))
-                .WillRepeatedly(Return());
-
-        sp<ValueMetricProducer> valueProducer = new ValueMetricProducer(
-                kConfigKey, metric, 0 /* condition tracker index */, {ConditionState::kUnknown},
-                wizard, logEventMatcherIndex, eventMatcherWizard, tagId, bucketStartTimeNs,
-                bucketStartTimeNs, pullerManager, {}, {}, slicedStateAtoms, stateGroupMap);
-        valueProducer->prepareFirstBucket();
-        valueProducer->mCondition = conditionAfterFirstBucketPrepared;
-        return valueProducer;
-    }
-
-    static ValueMetric createMetric() {
-        ValueMetric metric;
-        metric.set_id(metricId);
-        metric.set_bucket(ONE_MINUTE);
-        metric.mutable_value_field()->set_field(tagId);
-        metric.mutable_value_field()->add_child()->set_field(2);
-        metric.set_max_pull_delay_sec(INT_MAX);
-        return metric;
-    }
-
-    static ValueMetric createMetricWithCondition() {
-        ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-        metric.set_condition(StringToId("SCREEN_ON"));
-        return metric;
-    }
-
-    static ValueMetric createMetricWithState(string state) {
-        ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-        metric.add_slice_by_state(StringToId(state));
-        return metric;
-    }
-
-    static ValueMetric createMetricWithConditionAndState(string state) {
-        ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-        metric.set_condition(StringToId("SCREEN_ON"));
-        metric.add_slice_by_state(StringToId(state));
-        return metric;
-    }
-};
-
-// Setup for parameterized tests.
-class ValueMetricProducerTest_PartialBucket : public TestWithParam<BucketSplitEvent> {};
-
-INSTANTIATE_TEST_SUITE_P(ValueMetricProducerTest_PartialBucket,
-                         ValueMetricProducerTest_PartialBucket,
-                         testing::Values(APP_UPGRADE, BOOT_COMPLETE));
-
-/*
- * Tests that the first bucket works correctly
- */
-TEST(ValueMetricProducerTest, TestCalcPreviousBucketEndTime) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    int64_t startTimeBase = 11;
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    // statsd started long ago.
-    // The metric starts in the middle of the bucket
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, -1,
-                                      startTimeBase, 22, pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    EXPECT_EQ(startTimeBase, valueProducer.calcPreviousBucketEndTime(60 * NS_PER_SEC + 10));
-    EXPECT_EQ(startTimeBase, valueProducer.calcPreviousBucketEndTime(60 * NS_PER_SEC + 10));
-    EXPECT_EQ(60 * NS_PER_SEC + startTimeBase,
-              valueProducer.calcPreviousBucketEndTime(2 * 60 * NS_PER_SEC));
-    EXPECT_EQ(2 * 60 * NS_PER_SEC + startTimeBase,
-              valueProducer.calcPreviousBucketEndTime(3 * 60 * NS_PER_SEC));
-}
-
-/*
- * Tests that the first bucket works correctly
- */
-TEST(ValueMetricProducerTest, TestFirstBucket) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    // statsd started long ago.
-    // The metric starts in the middle of the bucket
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard, -1, 5,
-                                      600 * NS_PER_SEC + NS_PER_SEC / 2, pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    EXPECT_EQ(600500000000, valueProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(10, valueProducer.mCurrentBucketNum);
-    EXPECT_EQ(660000000005, valueProducer.getCurrentBucketEndTimeNs());
-}
-
-/*
- * Tests pulled atoms with no conditions
- */
-TEST(ValueMetricProducerTest, TestPulledEventsNoCondition) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 3));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 11));
-
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(11, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(8, curInterval.value.long_value);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    EXPECT_EQ(8, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs + 1, 23));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(23, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(12, curInterval.value.long_value);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    ASSERT_EQ(2UL, valueProducer->mPastBuckets.begin()->second.size());
-    EXPECT_EQ(8, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs);
-    EXPECT_EQ(12, valueProducer->mPastBuckets.begin()->second.back().values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second.back().mConditionTrueNs);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket4StartTimeNs + 1, 36));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket4StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(36, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(13, curInterval.value.long_value);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    ASSERT_EQ(3UL, valueProducer->mPastBuckets.begin()->second.size());
-    EXPECT_EQ(8, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs);
-    EXPECT_EQ(12, valueProducer->mPastBuckets.begin()->second[1].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[1].mConditionTrueNs);
-    EXPECT_EQ(13, valueProducer->mPastBuckets.begin()->second[2].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[2].mConditionTrueNs);
-}
-
-TEST_P(ValueMetricProducerTest_PartialBucket, TestPartialBucketCreated) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    int64_t partialBucketSplitTimeNs = bucket2StartTimeNs + 2;
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Initialize bucket.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 1));
-                return true;
-            }))
-            // Partial bucket.
-            .WillOnce(Invoke([partialBucketSplitTimeNs](
-                                     int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                     vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, partialBucketSplitTimeNs);
-                data->clear();
-                data->push_back(
-                        CreateRepeatedValueLogEvent(tagId, partialBucketSplitTimeNs + 8, 5));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    // First bucket ends.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 10, 2));
-    valueProducer->onDataPulled(allData, /** success */ true, bucket2StartTimeNs);
-
-    // Partial buckets created in 2nd bucket.
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            valueProducer->notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            valueProducer->onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    EXPECT_EQ(partialBucketSplitTimeNs, valueProducer->mCurrentBucketStartTimeNs);
-    EXPECT_EQ(1, valueProducer->getCurrentBucketNum());
-
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {1, 3},
-                                    {bucketSizeNs, partialBucketSplitTimeNs - bucket2StartTimeNs},
-                                    {bucketStartTimeNs, bucket2StartTimeNs},
-                                    {bucket2StartTimeNs, partialBucketSplitTimeNs});
-}
-
-/*
- * Tests pulled atoms with filtering
- */
-TEST(ValueMetricProducerTest, TestPulledEventsWithFiltering) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    auto keyValue = atomMatcher.add_field_value_matcher();
-    keyValue->set_field(1);
-    keyValue->set_eq_int(3);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, bucketStartTimeNs, 3, 3));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer = new ValueMetricProducer(
-            kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, wizard, logEventMatcherIndex,
-            eventMatcherWizard, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager);
-    valueProducer->prepareFirstBucket();
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 3, 11));
-
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(11, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(8, curInterval.value.long_value);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    EXPECT_EQ(8, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs);
-
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket3StartTimeNs + 1, 4, 23));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    // No new data seen, so data has been cleared.
-    ASSERT_EQ(0UL, valueProducer->mCurrentSlicedBucket.size());
-
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(11, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(8, curInterval.value.long_value);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    EXPECT_EQ(8, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs);
-
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket4StartTimeNs + 1, 3, 36));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket4StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-
-    // the base was reset
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(36, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.begin()->second.size());
-    EXPECT_EQ(8, valueProducer->mPastBuckets.begin()->second.back().values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second.back().mConditionTrueNs);
-}
-
-/*
- * Tests pulled atoms with no conditions and take absolute value after reset
- */
-TEST(ValueMetricProducerTest, TestPulledEventsTakeAbsoluteValueOnReset) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_use_absolute_value_on_reset(true);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Return(true));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 11));
-
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(11, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs + 1, 10));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(10, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(10, curInterval.value.long_value);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    EXPECT_EQ(10, valueProducer->mPastBuckets.begin()->second.back().values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second.back().mConditionTrueNs);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket4StartTimeNs + 1, 36));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket4StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(36, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(26, curInterval.value.long_value);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    ASSERT_EQ(2UL, valueProducer->mPastBuckets.begin()->second.size());
-    EXPECT_EQ(10, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs);
-    EXPECT_EQ(26, valueProducer->mPastBuckets.begin()->second[1].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[1].mConditionTrueNs);
-}
-
-/*
- * Tests pulled atoms with no conditions and take zero value after reset
- */
-TEST(ValueMetricProducerTest, TestPulledEventsTakeZeroOnReset) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Return(false));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 11));
-
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(11, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs + 1, 10));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(10, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket4StartTimeNs + 1, 36));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket4StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(36, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(26, curInterval.value.long_value);
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    EXPECT_EQ(26, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs);
-}
-
-/*
- * Test pulled event with non sliced condition.
- */
-TEST(ValueMetricProducerTest, TestEventsWithNonSlicedCondition) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 8);  // First condition change.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 100));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 1);  // Second condition change.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 130));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket3StartTimeNs + 1);  // Third condition change.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs + 1, 180));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    // startUpdated:false sum:0 start:100
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(100, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 110));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {10}, {bucketSizeNs - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(110, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(10, curInterval.value.long_value);
-
-    valueProducer->onConditionChanged(false, bucket2StartTimeNs + 1);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {10}, {bucketSizeNs - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(20, curInterval.value.long_value);
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-
-    valueProducer->onConditionChanged(true, bucket3StartTimeNs + 1);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {10, 20}, {bucketSizeNs - 8, 1},
-                                    {bucketStartTimeNs, bucket2StartTimeNs},
-                                    {bucket2StartTimeNs, bucket3StartTimeNs});
-}
-
-TEST_P(ValueMetricProducerTest_PartialBucket, TestPushedEvents) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 10);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-
-    int64_t partialBucketSplitTimeNs = bucketStartTimeNs + 150;
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            valueProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            valueProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {10},
-                                    {partialBucketSplitTimeNs - bucketStartTimeNs},
-                                    {bucketStartTimeNs}, {partialBucketSplitTimeNs});
-    EXPECT_EQ(partialBucketSplitTimeNs, valueProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(0, valueProducer.getCurrentBucketNum());
-
-    // Event arrives after the bucket split.
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 59 * NS_PER_SEC, 20);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {10},
-                                    {partialBucketSplitTimeNs - bucketStartTimeNs},
-                                    {bucketStartTimeNs}, {partialBucketSplitTimeNs});
-    EXPECT_EQ(partialBucketSplitTimeNs, valueProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(0, valueProducer.getCurrentBucketNum());
-
-    // Next value should create a new bucket.
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event3, tagId, bucket2StartTimeNs + 5 * NS_PER_SEC, 10);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {10, 20},
-                                    {partialBucketSplitTimeNs - bucketStartTimeNs,
-                                     bucket2StartTimeNs - partialBucketSplitTimeNs},
-                                    {bucketStartTimeNs, partialBucketSplitTimeNs},
-                                    {partialBucketSplitTimeNs, bucket2StartTimeNs});
-    EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, valueProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(1, valueProducer.getCurrentBucketNum());
-}
-
-TEST_P(ValueMetricProducerTest_PartialBucket, TestPulledValue) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    int64_t partialBucketSplitTimeNs = bucket2StartTimeNs + 150;
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            .WillOnce(Return(true))
-            .WillOnce(Invoke([partialBucketSplitTimeNs](
-                                     int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                     vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, partialBucketSplitTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, partialBucketSplitTimeNs, 120));
-                return true;
-            }));
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, tagId, bucketStartTimeNs,
-                                      bucketStartTimeNs, pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 100));
-
-    valueProducer.onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            valueProducer.notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            valueProducer.onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    EXPECT_EQ(partialBucketSplitTimeNs, valueProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(1, valueProducer.getCurrentBucketNum());
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {20}, {150}, {bucket2StartTimeNs},
-                                    {partialBucketSplitTimeNs});
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs + 1, 150));
-    valueProducer.onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    EXPECT_EQ(bucket3StartTimeNs, valueProducer.mCurrentBucketStartTimeNs);
-    EXPECT_EQ(2, valueProducer.getCurrentBucketNum());
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {20, 30}, {150, bucketSizeNs - 150},
-                                    {bucket2StartTimeNs, partialBucketSplitTimeNs},
-                                    {partialBucketSplitTimeNs, bucket3StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestPulledWithAppUpgradeDisabled) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_split_bucket_for_app_upgrade(false);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Return(true));
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, tagId, bucketStartTimeNs,
-                                      bucketStartTimeNs, pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 100));
-
-    valueProducer.onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-
-    valueProducer.notifyAppUpgrade(bucket2StartTimeNs + 150);
-    ASSERT_EQ(0UL, valueProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size());
-    EXPECT_EQ(bucket2StartTimeNs, valueProducer.mCurrentBucketStartTimeNs);
-}
-
-TEST_P(ValueMetricProducerTest_PartialBucket, TestPulledValueWhileConditionFalse) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 1);  // Condition change to true time.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 100));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs,
-                          bucket2StartTimeNs - 100);  // Condition change to false time.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs - 100, 120));
-                return true;
-            }));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 1);
-
-    valueProducer->onConditionChanged(false, bucket2StartTimeNs - 100);
-    EXPECT_FALSE(valueProducer->mCondition);
-
-    int64_t partialBucketSplitTimeNs = bucket2StartTimeNs - 50;
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            valueProducer->notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            valueProducer->onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    // Expect one full buckets already done and starting a partial bucket.
-    EXPECT_EQ(partialBucketSplitTimeNs, valueProducer->mCurrentBucketStartTimeNs);
-    EXPECT_EQ(0, valueProducer->getCurrentBucketNum());
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {20},
-                                    {(bucket2StartTimeNs - 100) - (bucketStartTimeNs + 1)},
-                                    {bucketStartTimeNs}, {partialBucketSplitTimeNs});
-    EXPECT_FALSE(valueProducer->mCondition);
-}
-
-TEST(ValueMetricProducerTest, TestPushedEventsWithoutCondition) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 10);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 20, 20);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(10, curInterval.value.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(30, curInterval.value.long_value);
-
-    valueProducer.flushIfNeededLocked(bucket2StartTimeNs);
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {30}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestPushedEventsWithCondition) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard,
-                                      logEventMatcherIndex, eventMatcherWizard, -1,
-                                      bucketStartTimeNs, bucketStartTimeNs, pullerManager);
-    valueProducer.prepareFirstBucket();
-    valueProducer.mCondition = ConditionState::kFalse;
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 10);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    // has 1 slice
-    ASSERT_EQ(0UL, valueProducer.mCurrentSlicedBucket.size());
-
-    valueProducer.onConditionChangedLocked(true, bucketStartTimeNs + 15);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 20, 20);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(20, curInterval.value.long_value);
-
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event3, tagId, bucketStartTimeNs + 30, 30);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(50, curInterval.value.long_value);
-
-    valueProducer.onConditionChangedLocked(false, bucketStartTimeNs + 35);
-
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event4, tagId, bucketStartTimeNs + 40, 40);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event4);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(50, curInterval.value.long_value);
-
-    valueProducer.flushIfNeededLocked(bucket2StartTimeNs);
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {50}, {20}, {bucketStartTimeNs},
-                                    {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestAnomalyDetection) {
-    sp<AlarmMonitor> alarmMonitor;
-    Alert alert;
-    alert.set_id(101);
-    alert.set_metric_id(metricId);
-    alert.set_trigger_if_sum_gt(130);
-    alert.set_num_buckets(2);
-    const int32_t refPeriodSec = 3;
-    alert.set_refractory_period_secs(refPeriodSec);
-
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {},
-                                      wizard, logEventMatcherIndex, eventMatcherWizard,
-                                      -1 /*not pulled*/, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    sp<AnomalyTracker> anomalyTracker = valueProducer.addAnomalyTracker(alert, alarmMonitor);
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 1 * NS_PER_SEC, 10);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 2 + NS_PER_SEC, 20);
-
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event3, tagId,
-                                bucketStartTimeNs + 2 * bucketSizeNs + 1 * NS_PER_SEC, 130);
-
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event4, tagId,
-                                bucketStartTimeNs + 3 * bucketSizeNs + 1 * NS_PER_SEC, 1);
-
-    LogEvent event5(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event5, tagId,
-                                bucketStartTimeNs + 3 * bucketSizeNs + 2 * NS_PER_SEC, 150);
-
-    LogEvent event6(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event6, tagId,
-                                bucketStartTimeNs + 3 * bucketSizeNs + 10 * NS_PER_SEC, 160);
-
-    // Two events in bucket #0.
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-    // Value sum == 30 <= 130.
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY), 0U);
-
-    // One event in bucket #2. No alarm as bucket #0 is trashed out.
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-    // Value sum == 130 <= 130.
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY), 0U);
-
-    // Three events in bucket #3.
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event4);
-    // Anomaly at event 4 since Value sum == 131 > 130!
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY),
-              std::ceil(1.0 * event4.GetElapsedTimestampNs() / NS_PER_SEC + refPeriodSec));
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event5);
-    // Event 5 is within 3 sec refractory period. Thus last alarm timestamp is still event4.
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY),
-              std::ceil(1.0 * event4.GetElapsedTimestampNs() / NS_PER_SEC + refPeriodSec));
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event6);
-    // Anomaly at event 6 since Value sum == 160 > 130 and after refractory period.
-    EXPECT_EQ(anomalyTracker->getRefractoryPeriodEndsSec(DEFAULT_METRIC_DIMENSION_KEY),
-              std::ceil(1.0 * event6.GetElapsedTimestampNs() / NS_PER_SEC + refPeriodSec));
-}
-
-// Test value metric no condition, the pull on bucket boundary come in time and too late
-TEST(ValueMetricProducerTest, TestBucketBoundaryNoCondition) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Return(true));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    vector<shared_ptr<LogEvent>> allData;
-    // pull 1
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 11));
-
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-
-    // startUpdated:true sum:0 start:11
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(11, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    // pull 2 at correct time
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs + 1, 23));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    // tartUpdated:false sum:12
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(23, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {12}, {bucketSizeNs},
-                                    {bucket2StartTimeNs}, {bucket3StartTimeNs});
-
-    // pull 3 come late.
-    // The previous bucket gets closed with error. (Has start value 23, no ending)
-    // Another bucket gets closed with error. (No start, but ending with 36)
-    // The new bucket is back to normal.
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket6StartTimeNs + 1, 36));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket6StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    // startUpdated:false sum:12
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(36, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {12}, {bucketSizeNs},
-                                    {bucket2StartTimeNs}, {bucket3StartTimeNs});
-    // The 1st bucket is dropped because of no data
-    // The 3rd bucket is dropped due to multiple buckets being skipped.
-    ASSERT_EQ(2, valueProducer->mSkippedBuckets.size());
-
-    EXPECT_EQ(bucketStartTimeNs, valueProducer->mSkippedBuckets[0].bucketStartTimeNs);
-    EXPECT_EQ(bucket2StartTimeNs, valueProducer->mSkippedBuckets[0].bucketEndTimeNs);
-    ASSERT_EQ(1, valueProducer->mSkippedBuckets[0].dropEvents.size());
-    EXPECT_EQ(NO_DATA, valueProducer->mSkippedBuckets[0].dropEvents[0].reason);
-    EXPECT_EQ(bucket2StartTimeNs, valueProducer->mSkippedBuckets[0].dropEvents[0].dropTimeNs);
-
-    EXPECT_EQ(bucket3StartTimeNs, valueProducer->mSkippedBuckets[1].bucketStartTimeNs);
-    EXPECT_EQ(bucket6StartTimeNs, valueProducer->mSkippedBuckets[1].bucketEndTimeNs);
-    ASSERT_EQ(1, valueProducer->mSkippedBuckets[1].dropEvents.size());
-    EXPECT_EQ(MULTIPLE_BUCKETS_SKIPPED, valueProducer->mSkippedBuckets[1].dropEvents[0].reason);
-    EXPECT_EQ(bucket6StartTimeNs, valueProducer->mSkippedBuckets[1].dropEvents[0].dropTimeNs);
-}
-
-/*
- * Test pulled event with non sliced condition. The pull on boundary come late because the alarm
- * was delivered late.
- */
-TEST(ValueMetricProducerTest, TestBucketBoundaryWithCondition) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // condition becomes true
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 8);  // First condition change.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 100));
-                return true;
-            }))
-            // condition becomes false
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 1);  // Second condition change.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 120));
-                return true;
-            }));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(100, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    // pull on bucket boundary come late, condition change happens before it
-    valueProducer->onConditionChanged(false, bucket2StartTimeNs + 1);
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {20}, {bucketSizeNs - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-
-    // Now the alarm is delivered.
-    // since the condition turned to off before this pull finish, it has no effect
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 30, 110));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {20}, {bucketSizeNs - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-}
-
-/*
- * Test pulled event with non sliced condition. The pull on boundary come late, after the condition
- * change to false, and then true again. This is due to alarm delivered late.
- */
-TEST(ValueMetricProducerTest, TestBucketBoundaryWithCondition2) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // condition becomes true
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 8);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 100));
-                return true;
-            }))
-            // condition becomes false
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 1);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 120));
-                return true;
-            }))
-            // condition becomes true again
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 25);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 25, 130));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    // startUpdated:false sum:0 start:100
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(100, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    // pull on bucket boundary come late, condition change happens before it
-    valueProducer->onConditionChanged(false, bucket2StartTimeNs + 1);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {20}, {bucketSizeNs - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-
-    // condition changed to true again, before the pull alarm is delivered
-    valueProducer->onConditionChanged(true, bucket2StartTimeNs + 25);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {20}, {bucketSizeNs - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(130, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-
-    // Now the alarm is delivered, but it is considered late, the data will be used
-    // for the new bucket since it was just pulled.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 50, 140));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs + 50);
-
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(140, curBaseInfo.base.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(10, curInterval.value.long_value);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {20}, {bucketSizeNs - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs, 160));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    assertPastBucketValuesSingleKey(
-            valueProducer->mPastBuckets, {20, 30}, {bucketSizeNs - 8, bucketSizeNs - 24},
-            {bucketStartTimeNs, bucket2StartTimeNs}, {bucket2StartTimeNs, bucket3StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestPushedAggregateMin) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_aggregation_type(ValueMetric::MIN);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 10);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 20, 20);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(10, curInterval.value.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(10, curInterval.value.long_value);
-
-    valueProducer.flushIfNeededLocked(bucket2StartTimeNs);
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {10}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestPushedAggregateMax) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_aggregation_type(ValueMetric::MAX);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 10);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(10, curInterval.value.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 20, 20);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(20, curInterval.value.long_value);
-
-    valueProducer.flushIfNeededLocked(bucket2StartTimeNs);
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {20}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestPushedAggregateAvg) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_aggregation_type(ValueMetric::AVG);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 10);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 20, 15);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval;
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(10, curInterval.value.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(1, curInterval.sampleSize);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(25, curInterval.value.long_value);
-    EXPECT_EQ(2, curInterval.sampleSize);
-
-    valueProducer.flushIfNeededLocked(bucket2StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer.mPastBuckets.size());
-    ASSERT_EQ(1UL, valueProducer.mPastBuckets.begin()->second.size());
-
-    EXPECT_TRUE(std::abs(valueProducer.mPastBuckets.begin()->second.back().values[0].double_value -
-                         12.5) < epsilon);
-}
-
-TEST(ValueMetricProducerTest, TestPushedAggregateSum) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_aggregation_type(ValueMetric::SUM);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 10);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 20, 15);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(10, curInterval.value.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(25, curInterval.value.long_value);
-
-    valueProducer.flushIfNeededLocked(bucket2StartTimeNs);
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {25}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestSkipZeroDiffOutput) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_aggregation_type(ValueMetric::MIN);
-    metric.set_use_diff(true);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 10);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(10, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event2, tagId, bucketStartTimeNs + 15, 15);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(5, curInterval.value.long_value);
-
-    // no change in data.
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event3, tagId, bucket2StartTimeNs + 10, 15);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(15, curBaseInfo.base.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(0, curInterval.value.long_value);
-
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(&event4, tagId, bucket2StartTimeNs + 15, 15);
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event4);
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(15, curBaseInfo.base.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(0, curInterval.value.long_value);
-
-    valueProducer.flushIfNeededLocked(bucket3StartTimeNs);
-    assertPastBucketValuesSingleKey(valueProducer.mPastBuckets, {5}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestSkipZeroDiffOutputMultiValue) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.mutable_value_field()->add_child()->set_field(3);
-    metric.set_aggregation_type(ValueMetric::MIN);
-    metric.set_use_diff(true);
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs,
-                                      pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    LogEvent event1(/*uid=*/0, /*pid=*/0);
-    CreateThreeValueLogEvent(&event1, tagId, bucketStartTimeNs + 10, 1, 10, 20);
-
-    LogEvent event2(/*uid=*/0, /*pid=*/0);
-    CreateThreeValueLogEvent(&event2, tagId, bucketStartTimeNs + 15, 1, 15, 22);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event1);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(10, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[1];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(20, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event2);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(5, curInterval.value.long_value);
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[1];
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[1];
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(2, curInterval.value.long_value);
-
-    // no change in first value field
-    LogEvent event3(/*uid=*/0, /*pid=*/0);
-    CreateThreeValueLogEvent(&event3, tagId, bucket2StartTimeNs + 10, 1, 15, 25);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event3);
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[0];
-
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(15, curBaseInfo.base.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[1];
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[1];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(25, curBaseInfo.base.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-
-    LogEvent event4(/*uid=*/0, /*pid=*/0);
-    CreateThreeValueLogEvent(&event4, tagId, bucket2StartTimeNs + 15, 1, 15, 29);
-
-    valueProducer.onMatchedLogEvent(1 /*log matcher index*/, event4);
-    ASSERT_EQ(1UL, valueProducer.mCurrentSlicedBucket.size());
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(15, curBaseInfo.base.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-    curInterval = valueProducer.mCurrentSlicedBucket.begin()->second[1];
-    curBaseInfo = valueProducer.mCurrentBaseInfo.begin()->second[1];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(29, curBaseInfo.base.long_value);
-    EXPECT_EQ(true, curInterval.hasValue);
-
-    valueProducer.flushIfNeededLocked(bucket3StartTimeNs);
-
-    ASSERT_EQ(1UL, valueProducer.mPastBuckets.size());
-    ASSERT_EQ(2UL, valueProducer.mPastBuckets.begin()->second.size());
-    ASSERT_EQ(2UL, valueProducer.mPastBuckets.begin()->second[0].values.size());
-    ASSERT_EQ(1UL, valueProducer.mPastBuckets.begin()->second[1].values.size());
-
-    EXPECT_EQ(bucketSizeNs, valueProducer.mPastBuckets.begin()->second[0].mConditionTrueNs);
-    EXPECT_EQ(5, valueProducer.mPastBuckets.begin()->second[0].values[0].long_value);
-    EXPECT_EQ(0, valueProducer.mPastBuckets.begin()->second[0].valueIndex[0]);
-    EXPECT_EQ(2, valueProducer.mPastBuckets.begin()->second[0].values[1].long_value);
-    EXPECT_EQ(1, valueProducer.mPastBuckets.begin()->second[0].valueIndex[1]);
-
-    EXPECT_EQ(bucketSizeNs, valueProducer.mPastBuckets.begin()->second[1].mConditionTrueNs);
-    EXPECT_EQ(3, valueProducer.mPastBuckets.begin()->second[1].values[0].long_value);
-    EXPECT_EQ(1, valueProducer.mPastBuckets.begin()->second[1].valueIndex[0]);
-}
-
-/*
- * Tests zero default base.
- */
-TEST(ValueMetricProducerTest, TestUseZeroDefaultBase) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.mutable_dimensions_in_what()->set_field(tagId);
-    metric.mutable_dimensions_in_what()->add_child()->set_field(1);
-    metric.set_use_zero_default_base(true);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, bucketStartTimeNs, 1, 3));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    auto iter = valueProducer->mCurrentSlicedBucket.begin();
-    auto& interval1 = iter->second[0];
-    auto iterBase = valueProducer->mCurrentBaseInfo.begin();
-    auto& baseInfo1 = iterBase->second[0];
-    EXPECT_EQ(1, iter->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    EXPECT_EQ(true, baseInfo1.hasBase);
-    EXPECT_EQ(3, baseInfo1.base.long_value);
-    EXPECT_EQ(false, interval1.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-    vector<shared_ptr<LogEvent>> allData;
-
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 2, 4));
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 1, 11));
-
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    EXPECT_EQ(true, baseInfo1.hasBase);
-    EXPECT_EQ(11, baseInfo1.base.long_value);
-    EXPECT_EQ(false, interval1.hasValue);
-    EXPECT_EQ(8, interval1.value.long_value);
-
-    auto it = valueProducer->mCurrentSlicedBucket.begin();
-    for (; it != valueProducer->mCurrentSlicedBucket.end(); it++) {
-        if (it != iter) {
-            break;
-        }
-    }
-    auto itBase = valueProducer->mCurrentBaseInfo.begin();
-    for (; itBase != valueProducer->mCurrentBaseInfo.end(); it++) {
-        if (itBase != iterBase) {
-            break;
-        }
-    }
-    EXPECT_TRUE(it != iter);
-    EXPECT_TRUE(itBase != iterBase);
-    auto& interval2 = it->second[0];
-    auto& baseInfo2 = itBase->second[0];
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    EXPECT_EQ(true, baseInfo2.hasBase);
-    EXPECT_EQ(4, baseInfo2.base.long_value);
-    EXPECT_EQ(false, interval2.hasValue);
-    EXPECT_EQ(4, interval2.value.long_value);
-
-    ASSERT_EQ(2UL, valueProducer->mPastBuckets.size());
-    auto iterator = valueProducer->mPastBuckets.begin();
-    EXPECT_EQ(bucketSizeNs, iterator->second[0].mConditionTrueNs);
-    EXPECT_EQ(8, iterator->second[0].values[0].long_value);
-    iterator++;
-    EXPECT_EQ(bucketSizeNs, iterator->second[0].mConditionTrueNs);
-    EXPECT_EQ(4, iterator->second[0].values[0].long_value);
-}
-
-/*
- * Tests using zero default base with failed pull.
- */
-TEST(ValueMetricProducerTest, TestUseZeroDefaultBaseWithPullFailures) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.mutable_dimensions_in_what()->set_field(tagId);
-    metric.mutable_dimensions_in_what()->add_child()->set_field(1);
-    metric.set_use_zero_default_base(true);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, bucketStartTimeNs, 1, 3));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    const auto& it = valueProducer->mCurrentSlicedBucket.begin();
-    ValueMetricProducer::Interval& interval1 = it->second[0];
-    ValueMetricProducer::BaseInfo& baseInfo1 =
-            valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat())->second[0];
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    EXPECT_EQ(true, baseInfo1.hasBase);
-    EXPECT_EQ(3, baseInfo1.base.long_value);
-    EXPECT_EQ(false, interval1.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-    vector<shared_ptr<LogEvent>> allData;
-
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 2, 4));
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 1, 11));
-
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    EXPECT_EQ(true, baseInfo1.hasBase);
-    EXPECT_EQ(11, baseInfo1.base.long_value);
-    EXPECT_EQ(false, interval1.hasValue);
-    EXPECT_EQ(8, interval1.value.long_value);
-
-    auto it2 = valueProducer->mCurrentSlicedBucket.begin();
-    for (; it2 != valueProducer->mCurrentSlicedBucket.end(); it2++) {
-        if (it2 != it) {
-            break;
-        }
-    }
-    EXPECT_TRUE(it2 != it);
-    ValueMetricProducer::Interval& interval2 = it2->second[0];
-    ValueMetricProducer::BaseInfo& baseInfo2 =
-            valueProducer->mCurrentBaseInfo.find(it2->first.getDimensionKeyInWhat())->second[0];
-    EXPECT_EQ(2, it2->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    EXPECT_EQ(true, baseInfo2.hasBase);
-    EXPECT_EQ(4, baseInfo2.base.long_value);
-    EXPECT_EQ(false, interval2.hasValue);
-    EXPECT_EQ(4, interval2.value.long_value);
-    ASSERT_EQ(2UL, valueProducer->mPastBuckets.size());
-
-    // next pull somehow did not happen, skip to end of bucket 3
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket4StartTimeNs + 1, 2, 5));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket4StartTimeNs);
-
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    EXPECT_EQ(true, baseInfo2.hasBase);
-    EXPECT_EQ(5, baseInfo2.base.long_value);
-    EXPECT_EQ(false, interval2.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-    ASSERT_EQ(2UL, valueProducer->mPastBuckets.size());
-
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket5StartTimeNs + 1, 2, 13));
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket5StartTimeNs + 1, 1, 5));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket5StartTimeNs);
-
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    // Get new references now that entries have been deleted from the map
-    const auto& it3 = valueProducer->mCurrentSlicedBucket.begin();
-    const auto& it4 = std::next(valueProducer->mCurrentSlicedBucket.begin());
-    ASSERT_EQ(it3->second.size(), 1);
-    ASSERT_EQ(it4->second.size(), 1);
-    ValueMetricProducer::Interval& interval3 = it3->second[0];
-    ValueMetricProducer::Interval& interval4 = it4->second[0];
-    ValueMetricProducer::BaseInfo& baseInfo3 =
-            valueProducer->mCurrentBaseInfo.find(it3->first.getDimensionKeyInWhat())->second[0];
-    ValueMetricProducer::BaseInfo& baseInfo4 =
-            valueProducer->mCurrentBaseInfo.find(it4->first.getDimensionKeyInWhat())->second[0];
-
-    EXPECT_EQ(true, baseInfo3.hasBase);
-    EXPECT_EQ(5, baseInfo3.base.long_value);
-    EXPECT_EQ(false, interval3.hasValue);
-    EXPECT_EQ(5, interval3.value.long_value);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-
-    EXPECT_EQ(true, baseInfo4.hasBase);
-    EXPECT_EQ(13, baseInfo4.base.long_value);
-    EXPECT_EQ(false, interval4.hasValue);
-    EXPECT_EQ(8, interval4.value.long_value);
-
-    ASSERT_EQ(2UL, valueProducer->mPastBuckets.size());
-}
-
-/*
- * Tests trim unused dimension key if no new data is seen in an entire bucket.
- */
-TEST(ValueMetricProducerTest, TestTrimUnusedDimensionKey) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.mutable_dimensions_in_what()->set_field(tagId);
-    metric.mutable_dimensions_in_what()->add_child()->set_field(1);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, bucketStartTimeNs, 1, 3));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    auto iter = valueProducer->mCurrentSlicedBucket.begin();
-    auto& interval1 = iter->second[0];
-    auto iterBase = valueProducer->mCurrentBaseInfo.begin();
-    auto& baseInfo1 = iterBase->second[0];
-    EXPECT_EQ(1, iter->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    EXPECT_EQ(true, baseInfo1.hasBase);
-    EXPECT_EQ(3, baseInfo1.base.long_value);
-    EXPECT_EQ(false, interval1.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 2, 4));
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 1, 11));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    EXPECT_EQ(true, baseInfo1.hasBase);
-    EXPECT_EQ(11, baseInfo1.base.long_value);
-    EXPECT_EQ(false, interval1.hasValue);
-    EXPECT_EQ(8, interval1.value.long_value);
-    EXPECT_FALSE(interval1.seenNewData);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {8}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-
-    auto it = valueProducer->mCurrentSlicedBucket.begin();
-    for (; it != valueProducer->mCurrentSlicedBucket.end(); it++) {
-        if (it != iter) {
-            break;
-        }
-    }
-    auto itBase = valueProducer->mCurrentBaseInfo.begin();
-    for (; itBase != valueProducer->mCurrentBaseInfo.end(); it++) {
-        if (itBase != iterBase) {
-            break;
-        }
-    }
-    EXPECT_TRUE(it != iter);
-    EXPECT_TRUE(itBase != iterBase);
-    auto interval2 = it->second[0];
-    auto baseInfo2 = itBase->second[0];
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    EXPECT_EQ(true, baseInfo2.hasBase);
-    EXPECT_EQ(4, baseInfo2.base.long_value);
-    EXPECT_EQ(false, interval2.hasValue);
-    EXPECT_FALSE(interval2.seenNewData);
-
-    // next pull somehow did not happen, skip to end of bucket 3
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket4StartTimeNs + 1, 2, 5));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket4StartTimeNs);
-    // Only one interval left. One was trimmed.
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    interval2 = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    baseInfo2 = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    EXPECT_EQ(true, baseInfo2.hasBase);
-    EXPECT_EQ(5, baseInfo2.base.long_value);
-    EXPECT_EQ(false, interval2.hasValue);
-    EXPECT_FALSE(interval2.seenNewData);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {8}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket5StartTimeNs + 1, 2, 14));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket5StartTimeNs);
-
-    interval2 = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    baseInfo2 = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, baseInfo2.hasBase);
-    EXPECT_EQ(14, baseInfo2.base.long_value);
-    EXPECT_EQ(false, interval2.hasValue);
-    EXPECT_FALSE(interval2.seenNewData);
-    ASSERT_EQ(2UL, valueProducer->mPastBuckets.size());
-    auto iterator = valueProducer->mPastBuckets.begin();
-    EXPECT_EQ(bucket4StartTimeNs, iterator->second[0].mBucketStartNs);
-    EXPECT_EQ(bucket5StartTimeNs, iterator->second[0].mBucketEndNs);
-    EXPECT_EQ(9, iterator->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, iterator->second[0].mConditionTrueNs);
-    iterator++;
-    EXPECT_EQ(bucketStartTimeNs, iterator->second[0].mBucketStartNs);
-    EXPECT_EQ(bucket2StartTimeNs, iterator->second[0].mBucketEndNs);
-    EXPECT_EQ(8, iterator->second[0].values[0].long_value);
-    EXPECT_EQ(bucketSizeNs, iterator->second[0].mConditionTrueNs);
-}
-
-TEST(ValueMetricProducerTest, TestResetBaseOnPullFailAfterConditionChange_EndOfBucket) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    // Used by onConditionChanged.
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 8, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 100));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo& curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(100, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-
-    vector<shared_ptr<LogEvent>> allData;
-    valueProducer->onDataPulled(allData, /** succeed */ false, bucket2StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(false, valueProducer->mHasGlobalBase);
-}
-
-TEST(ValueMetricProducerTest, TestResetBaseOnPullFailAfterConditionChange) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 8);  // Condition change to true.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 100));
-                return true;
-            }))
-            .WillOnce(Return(false));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo& curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(100, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 20);
-
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, valueProducer->mHasGlobalBase);
-}
-
-TEST(ValueMetricProducerTest, TestResetBaseOnPullFailBeforeConditionChange) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 50));
-                return false;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 1);  // Condition change to false.
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 100));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Don't directly set mCondition; the real code never does that. Go through regular code path
-    // to avoid unexpected behaviors.
-    // valueProducer->mCondition = ConditionState::kTrue;
-    valueProducer->onConditionChanged(true, bucketStartTimeNs);
-
-    ASSERT_EQ(0UL, valueProducer->mCurrentSlicedBucket.size());
-
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 1);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(false, valueProducer->mHasGlobalBase);
-}
-
-TEST(ValueMetricProducerTest, TestResetBaseOnPullDelayExceeded) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_condition(StringToId("SCREEN_ON"));
-    metric.set_max_pull_delay_sec(0);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 1, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 120));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Max delay is set to 0 so pull will exceed max delay.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 1);
-    ASSERT_EQ(0UL, valueProducer->mCurrentSlicedBucket.size());
-}
-
-TEST(ValueMetricProducerTest, TestResetBaseOnPullTooLate) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillRepeatedly(Return());
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard,
-                                      logEventMatcherIndex, eventMatcherWizard, tagId,
-                                      bucket2StartTimeNs, bucket2StartTimeNs, pullerManager);
-    valueProducer.prepareFirstBucket();
-    valueProducer.mCondition = ConditionState::kFalse;
-
-    // Event should be skipped since it is from previous bucket.
-    // Pull should not be called.
-    valueProducer.onConditionChanged(true, bucketStartTimeNs);
-    ASSERT_EQ(0UL, valueProducer.mCurrentSlicedBucket.size());
-}
-
-TEST(ValueMetricProducerTest, TestBaseSetOnConditionChange) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 1, _, _))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 100));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-    valueProducer->mHasGlobalBase = false;
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 1);
-    valueProducer->mHasGlobalBase = true;
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(100, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-}
-
-/*
- * Tests that a bucket is marked invalid when a condition change pull fails.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenOneConditionFailed) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // First onConditionChanged
-            .WillOnce(Return(false))
-            // Second onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 3);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 130));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kTrue);
-
-    // Bucket start.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 110));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucketStartTimeNs);
-
-    // This will fail and should invalidate the whole bucket since we do not have all the data
-    // needed to compute the metric value when the screen was on.
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 2);
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 3);
-
-    // Bucket end.
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 140));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    valueProducer->flushIfNeededLocked(bucket2StartTimeNs + 1);
-
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-    // Contains base from last pull which was successful.
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(140, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucket2StartTimeNs + 10, false /* include partial bucket */, true,
-                                FAST /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 2), dropEvent.drop_time_millis());
-}
-
-/*
- * Tests that a bucket is marked invalid when the guardrail is hit.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenGuardRailHit) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.mutable_dimensions_in_what()->set_field(tagId);
-    metric.mutable_dimensions_in_what()->add_child()->set_field(1);
-    metric.set_condition(StringToId("SCREEN_ON"));
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 2, _, _))
-            // First onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                for (int i = 0; i < 2000; i++) {
-                    data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, i));
-                }
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 2);
-    EXPECT_EQ(true, valueProducer->mCurrentBucketIsSkipped);
-    ASSERT_EQ(0UL, valueProducer->mCurrentSlicedBucket.size());
-    ASSERT_EQ(0UL, valueProducer->mSkippedBuckets.size());
-
-    // Bucket 2 start.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 1, 1, 10));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    // First bucket added to mSkippedBuckets after flush.
-    ASSERT_EQ(1UL, valueProducer->mSkippedBuckets.size());
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucket2StartTimeNs + 10000, false /* include recent buckets */,
-                                true, FAST /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::DIMENSION_GUARDRAIL_REACHED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 2), dropEvent.drop_time_millis());
-}
-
-/*
- * Tests that a bucket is marked invalid when the bucket's initial pull fails.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenInitialPullFailed) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // First onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 2);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 120));
-                return true;
-            }))
-            // Second onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 3);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 130));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kTrue);
-
-    // Bucket start.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 110));
-    valueProducer->onDataPulled(allData, /** succeed */ false, bucketStartTimeNs);
-
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 2);
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 3);
-
-    // Bucket end.
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 140));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    valueProducer->flushIfNeededLocked(bucket2StartTimeNs + 1);
-
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-    // Contains base from last pull which was successful.
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(140, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucket2StartTimeNs + 10000, false /* include recent buckets */,
-                                true, FAST /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 2), dropEvent.drop_time_millis());
-}
-
-/*
- * Tests that a bucket is marked invalid when the bucket's final pull fails
- * (i.e. failed pull on bucket boundary).
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenLastPullFailed) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // First onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 2);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 120));
-                return true;
-            }))
-            // Second onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 3);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 8, 130));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kTrue);
-
-    // Bucket start.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, 110));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucketStartTimeNs);
-
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 2);
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 3);
-
-    // Bucket end.
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 140));
-    valueProducer->onDataPulled(allData, /** succeed */ false, bucket2StartTimeNs);
-
-    valueProducer->flushIfNeededLocked(bucket2StartTimeNs + 1);
-
-    ASSERT_EQ(0UL, valueProducer->mPastBuckets.size());
-    // Last pull failed so base has been reset.
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(false, valueProducer->mHasGlobalBase);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucket2StartTimeNs + 10000, false /* include recent buckets */,
-                                true, FAST /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs), dropEvent.drop_time_millis());
-}
-
-TEST(ValueMetricProducerTest, TestEmptyDataResetsBase_onDataPulled) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            // Start bucket.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 3));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    // Bucket 2 start.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 110));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-
-    // Bucket 3 empty.
-    allData.clear();
-    allData.push_back(CreateNoValuesLogEvent(tagId, bucket3StartTimeNs + 1));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket3StartTimeNs);
-    // Data has been trimmed.
-    ASSERT_EQ(0UL, valueProducer->mCurrentSlicedBucket.size());
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-}
-
-TEST(ValueMetricProducerTest, TestEmptyDataResetsBase_onConditionChanged) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // First onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 3));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 10);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-
-    // Empty pull.
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 10);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(false, valueProducer->mHasGlobalBase);
-}
-
-TEST(ValueMetricProducerTest, TestEmptyDataResetsBase_onBucketBoundary) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // First onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 1));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 11);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 2));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 12);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 5));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 10);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 11);
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 12);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval& curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-
-    // End of bucket
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    // Data is empty, base should be reset.
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(5, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-
-    ASSERT_EQ(1UL, valueProducer->mPastBuckets.size());
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {1}, {bucketSizeNs - 12 + 1},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestPartialResetOnBucketBoundaries) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.mutable_dimensions_in_what()->set_field(tagId);
-    metric.mutable_dimensions_in_what()->add_child()->set_field(1);
-    metric.set_condition(StringToId("SCREEN_ON"));
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 10, _, _))
-            // First onConditionChanged
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 1));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 10);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-
-    // End of bucket
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 2));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    // Key 1 should be reset since in not present in the most pull.
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    auto iterator = valueProducer->mCurrentSlicedBucket.begin();
-    auto baseInfoIter = valueProducer->mCurrentBaseInfo.begin();
-    EXPECT_EQ(true, baseInfoIter->second[0].hasBase);
-    EXPECT_EQ(2, baseInfoIter->second[0].base.long_value);
-    EXPECT_EQ(false, iterator->second[0].hasValue);
-    iterator++;
-    baseInfoIter++;
-    EXPECT_EQ(false, baseInfoIter->second[0].hasBase);
-    EXPECT_EQ(1, baseInfoIter->second[0].base.long_value);
-    EXPECT_EQ(false, iterator->second[0].hasValue);
-
-    EXPECT_EQ(true, valueProducer->mHasGlobalBase);
-}
-
-TEST_P(ValueMetricProducerTest_PartialBucket, TestFullBucketResetWhenLastBucketInvalid) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    int64_t partialBucketSplitTimeNs = bucketStartTimeNs + bucketSizeNs / 2;
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Initialization.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 1));
-                return true;
-            }))
-            // notifyAppUpgrade.
-            .WillOnce(Invoke([partialBucketSplitTimeNs](
-                                     int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                     vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, partialBucketSplitTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, partialBucketSplitTimeNs, 10));
-                return true;
-            }));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-    ASSERT_EQ(0UL, valueProducer->mCurrentFullBucket.size());
-
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            valueProducer->notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            valueProducer->onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-    EXPECT_EQ(partialBucketSplitTimeNs, valueProducer->mCurrentBucketStartTimeNs);
-    EXPECT_EQ(0, valueProducer->getCurrentBucketNum());
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {9},
-                                    {partialBucketSplitTimeNs - bucketStartTimeNs},
-                                    {bucketStartTimeNs}, {partialBucketSplitTimeNs});
-    ASSERT_EQ(1UL, valueProducer->mCurrentFullBucket.size());
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs + 1, 4));
-    // Pull fails and arrives late.
-    valueProducer->onDataPulled(allData, /** fails */ false, bucket3StartTimeNs + 1);
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {9},
-                                    {partialBucketSplitTimeNs - bucketStartTimeNs},
-                                    {bucketStartTimeNs}, {partialBucketSplitTimeNs});
-    ASSERT_EQ(1, valueProducer->mSkippedBuckets.size());
-    ASSERT_EQ(2, valueProducer->mSkippedBuckets[0].dropEvents.size());
-    EXPECT_EQ(PULL_FAILED, valueProducer->mSkippedBuckets[0].dropEvents[0].reason);
-    EXPECT_EQ(MULTIPLE_BUCKETS_SKIPPED, valueProducer->mSkippedBuckets[0].dropEvents[1].reason);
-    EXPECT_EQ(partialBucketSplitTimeNs, valueProducer->mSkippedBuckets[0].bucketStartTimeNs);
-    EXPECT_EQ(bucket3StartTimeNs, valueProducer->mSkippedBuckets[0].bucketEndTimeNs);
-    ASSERT_EQ(0UL, valueProducer->mCurrentFullBucket.size());
-}
-
-TEST(ValueMetricProducerTest, TestBucketBoundariesOnConditionChange) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Second onConditionChanged.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 10, 5));
-                return true;
-            }))
-            // Third onConditionChanged.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket3StartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs + 10, 7));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(
-                    pullerManager, metric, ConditionState::kUnknown);
-
-    valueProducer->onConditionChanged(false, bucketStartTimeNs);
-    ASSERT_EQ(0UL, valueProducer->mCurrentSlicedBucket.size());
-
-    // End of first bucket
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 4));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs + 1);
-    ASSERT_EQ(0UL, valueProducer->mCurrentSlicedBucket.size());
-
-    valueProducer->onConditionChanged(true, bucket2StartTimeNs + 10);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    auto curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    auto curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curBaseInfo.hasBase);
-    EXPECT_EQ(5, curBaseInfo.base.long_value);
-    EXPECT_EQ(false, curInterval.hasValue);
-
-    valueProducer->onConditionChanged(false, bucket3StartTimeNs + 10);
-
-    // Bucket should have been completed.
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {2}, {bucketSizeNs - 10},
-                                    {bucket2StartTimeNs}, {bucket3StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestLateOnDataPulledWithoutDiff) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_use_diff(false);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 30, 10));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucketStartTimeNs + 30);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs, 20));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    // Bucket should have been completed.
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {30}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestLateOnDataPulledWithDiff) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            // Initialization.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 1));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 30, 10));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucketStartTimeNs + 30);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs, 20));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    // Bucket should have been completed.
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {19}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST_P(ValueMetricProducerTest_PartialBucket, TestBucketBoundariesOnPartialBucket) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    int64_t partialBucketSplitTimeNs = bucket2StartTimeNs + 2;
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Initialization.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 1));
-                return true;
-            }))
-            // notifyAppUpgrade.
-            .WillOnce(Invoke([partialBucketSplitTimeNs](
-                                     int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                     vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, partialBucketSplitTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, partialBucketSplitTimeNs, 10));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    switch (GetParam()) {
-        case APP_UPGRADE:
-            valueProducer->notifyAppUpgrade(partialBucketSplitTimeNs);
-            break;
-        case BOOT_COMPLETE:
-            valueProducer->onStatsdInitCompleted(partialBucketSplitTimeNs);
-            break;
-    }
-
-    // Bucket should have been completed.
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {9}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestDataIsNotUpdatedWhenNoConditionChanged) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // First on condition changed.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 8);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 1));
-                return true;
-            }))
-            // Second on condition changed.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 3));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 10);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 12);
-
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    auto curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    auto curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(2, curInterval.value.long_value);
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 10));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs + 1);
-
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {2}, {2}, {bucketStartTimeNs},
-                                    {bucket2StartTimeNs});
-}
-
-// TODO: b/145705635 fix or delete this test
-TEST(ValueMetricProducerTest, TestBucketInvalidIfGlobalBaseIsNotSet) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // First condition change.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 1));
-                return true;
-            }))
-            // 2nd condition change.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 8);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs, 1));
-                return true;
-            }))
-            // 3rd condition change.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs, 1));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-    valueProducer->onConditionChanged(true, bucket2StartTimeNs + 10);
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 3, 10));
-    valueProducer->onDataPulled(allData, /** succeed */ false, bucketStartTimeNs + 3);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs, 20));
-    valueProducer->onDataPulled(allData, /** succeed */ false, bucket2StartTimeNs);
-
-    valueProducer->onConditionChanged(false, bucket2StartTimeNs + 8);
-    valueProducer->onConditionChanged(true, bucket2StartTimeNs + 10);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket3StartTimeNs, 30));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    // There was not global base available so all buckets are invalid.
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {}, {}, {}, {});
-}
-
-TEST(ValueMetricProducerTest, TestPullNeededFastDump) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillRepeatedly(Return());
-
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            // Initial pull.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateThreeValueLogEvent(tagId, bucketStartTimeNs, tagId, 1, 1));
-                return true;
-            }));
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, tagId, bucketStartTimeNs,
-                                      bucketStartTimeNs, pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer.onDumpReport(bucketStartTimeNs + 10, true /* include recent buckets */, true,
-                               FAST, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    // Bucket is invalid since we did not pull when dump report was called.
-    ASSERT_EQ(0, report.value_metrics().data_size());
-}
-
-TEST(ValueMetricProducerTest, TestFastDumpWithoutCurrentBucket) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillRepeatedly(Return());
-
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _, _))
-            // Initial pull.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateThreeValueLogEvent(tagId, bucketStartTimeNs, tagId, 1, 1));
-                return true;
-            }));
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, tagId, bucketStartTimeNs,
-                                      bucketStartTimeNs, pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateThreeValueLogEvent(tagId, bucket2StartTimeNs + 1, tagId, 2, 2));
-    valueProducer.onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer.onDumpReport(bucket4StartTimeNs, false /* include recent buckets */, true, FAST,
-                               &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    // Previous bucket is part of the report.
-    ASSERT_EQ(1, report.value_metrics().data_size());
-    EXPECT_EQ(0, report.value_metrics().data(0).bucket_info(0).bucket_num());
-}
-
-TEST(ValueMetricProducerTest, TestPullNeededNoTimeConstraints) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-
-    UidMap uidMap;
-    SimpleAtomMatcher atomMatcher;
-    atomMatcher.set_atom_id(tagId);
-    sp<EventMatcherWizard> eventMatcherWizard =
-            new EventMatcherWizard({new SimpleLogMatchingTracker(
-                    atomMatcherId, logEventMatcherIndex, atomMatcher, uidMap)});
-    sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return());
-    EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillRepeatedly(Return());
-
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Initial pull.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(CreateThreeValueLogEvent(tagId, bucketStartTimeNs, tagId, 1, 1));
-                return true;
-            }))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(
-                        CreateThreeValueLogEvent(tagId, bucketStartTimeNs + 10, tagId, 3, 3));
-                return true;
-            }));
-
-    ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex,
-                                      eventMatcherWizard, tagId, bucketStartTimeNs,
-                                      bucketStartTimeNs, pullerManager);
-    valueProducer.prepareFirstBucket();
-
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer.onDumpReport(bucketStartTimeNs + 10, true /* include recent buckets */, true,
-                               NO_TIME_CONSTRAINTS, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    ASSERT_EQ(1, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().data(0).bucket_info_size());
-    EXPECT_EQ(2, report.value_metrics().data(0).bucket_info(0).values(0).value_long());
-}
-
-TEST(ValueMetricProducerTest, TestPulledData_noDiff_withoutCondition) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetric();
-    metric.set_use_diff(false);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerNoConditions(pullerManager, metric);
-
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 30, 10));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs + 30);
-
-    // Bucket should have been completed.
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {10}, {bucketSizeNs},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-}
-
-TEST(ValueMetricProducerTest, TestPulledData_noDiff_withMultipleConditionChanges) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-    metric.set_use_diff(false);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // condition becomes true
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 8);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 30, 10));
-                return true;
-            }))
-            // condition becomes false
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 50);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 50, 20));
-                return true;
-            }));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 50);
-    // has one slice
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(true, curInterval.hasValue);
-    EXPECT_EQ(20, curInterval.value.long_value);
-
-    // Now the alarm is delivered. Condition is off though.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 30, 110));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {20}, {50 - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-    curInterval = valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-}
-
-TEST(ValueMetricProducerTest, TestPulledData_noDiff_bucketBoundaryTrue) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-    metric.set_use_diff(false);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 8, _, _))
-            // condition becomes true
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 30, 10));
-                return true;
-            }));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-
-    // Now the alarm is delivered. Condition is off though.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 30, 30));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {30}, {bucketSizeNs - 8},
-                                    {bucketStartTimeNs}, {bucket2StartTimeNs});
-    ValueMetricProducer::Interval curInterval =
-            valueProducer->mCurrentSlicedBucket.begin()->second[0];
-    ValueMetricProducer::BaseInfo curBaseInfo = valueProducer->mCurrentBaseInfo.begin()->second[0];
-    EXPECT_EQ(false, curBaseInfo.hasBase);
-    EXPECT_EQ(false, curInterval.hasValue);
-}
-
-TEST(ValueMetricProducerTest, TestPulledData_noDiff_bucketBoundaryFalse) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-    metric.set_use_diff(false);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Now the alarm is delivered. Condition is off though.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 30, 30));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    // Condition was always false.
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {}, {}, {}, {});
-}
-
-TEST(ValueMetricProducerTest, TestPulledData_noDiff_withFailure) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-    metric.set_use_diff(false);
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // condition becomes true
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 8);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 30, 10));
-                return true;
-            }))
-            .WillOnce(Return(false));
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 8);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 50);
-
-    // Now the alarm is delivered. Condition is off though.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 30, 30));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    // No buckets, we had a failure.
-    assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {}, {}, {}, {});
-}
-
-/*
- * Test that DUMP_REPORT_REQUESTED dump reason is logged.
- *
- * For the bucket to be marked invalid during a dump report requested,
- * three things must be true:
- * - we want to include the current partial bucket
- * - we need a pull (metric is pulled and condition is true)
- * - the dump latency must be FAST
- */
-
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenDumpReportRequested) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 20, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 20, 10));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Condition change event.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 20);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucketStartTimeNs + 40, true /* include recent buckets */, true,
-                                FAST /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 40),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::DUMP_REPORT_REQUESTED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 40), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that EVENT_IN_WRONG_BUCKET dump reason is logged for a late condition
- * change event (i.e. the condition change occurs in the wrong bucket).
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenConditionEventWrongBucket) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 50, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 50, 10));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Condition change event.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 50);
-
-    // Bucket boundary pull.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs, 15));
-    valueProducer->onDataPulled(allData, /** succeeds */ true, bucket2StartTimeNs + 1);
-
-    // Late condition change event.
-    valueProducer->onConditionChanged(false, bucket2StartTimeNs - 100);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucket2StartTimeNs + 100, true /* include recent buckets */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(1, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs + 100),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(2, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::EVENT_IN_WRONG_BUCKET, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs - 100), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(1);
-    EXPECT_EQ(BucketDropReason::CONDITION_UNKNOWN, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs + 100), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that EVENT_IN_WRONG_BUCKET dump reason is logged for a late accumulate
- * event (i.e. the accumulate events call occurs in the wrong bucket).
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenAccumulateEventWrongBucket) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 50);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 50, 10));
-                return true;
-            }))
-            // Dump report requested.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 100);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 100, 15));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Condition change event.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 50);
-
-    // Bucket boundary pull.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs, 15));
-    valueProducer->onDataPulled(allData, /** succeeds */ true, bucket2StartTimeNs + 1);
-
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs - 100, 20));
-
-    // Late accumulateEvents event.
-    valueProducer->accumulateEvents(allData, bucket2StartTimeNs - 100, bucket2StartTimeNs - 100);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucket2StartTimeNs + 100, true /* include recent buckets */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(1, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs + 100),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::EVENT_IN_WRONG_BUCKET, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs - 100), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that CONDITION_UNKNOWN dump reason is logged due to an unknown condition
- * when a metric is initialized.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenConditionUnknown) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 50);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 50, 10));
-                return true;
-            }))
-            // Dump report requested.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10000);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 100, 15));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(
-                    pullerManager, metric, ConditionState::kUnknown);
-
-    // Condition change event.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 50);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucketStartTimeNs + 10000;
-    valueProducer->onDumpReport(dumpReportTimeNs, true /* include recent buckets */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::CONDITION_UNKNOWN, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that PULL_FAILED dump reason is logged due to a pull failure in
- * #pullAndMatchEventsLocked.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenPullFailed) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 50);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 50, 10));
-                return true;
-            }))
-            // Dump report requested, pull fails.
-            .WillOnce(Return(false));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Condition change event.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 50);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucketStartTimeNs + 10000;
-    valueProducer->onDumpReport(dumpReportTimeNs, true /* include recent buckets */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that MULTIPLE_BUCKETS_SKIPPED dump reason is logged when a log event
- * skips over more than one bucket.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestInvalidBucketWhenMultipleBucketsSkipped) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 10, 10));
-                return true;
-            }))
-            // Dump report requested.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket4StartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucket4StartTimeNs + 1000, 15));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Condition change event.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 10);
-
-    // Condition change event that skips forward by three buckets.
-    valueProducer->onConditionChanged(false, bucket4StartTimeNs + 10);
-
-    int64_t dumpTimeNs = bucket4StartTimeNs + 1000;
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(dumpTimeNs, true /* include current buckets */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(2, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucket4StartTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::MULTIPLE_BUCKETS_SKIPPED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucket4StartTimeNs + 10), dropEvent.drop_time_millis());
-
-    // This bucket is skipped because a dumpReport with include current buckets is called.
-    // This creates a new bucket from bucket4StartTimeNs to dumpTimeNs in which we have no data
-    // since the condition is false for the entire bucket interval.
-    EXPECT_EQ(NanoToMillis(bucket4StartTimeNs),
-              report.value_metrics().skipped(1).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(dumpTimeNs),
-              report.value_metrics().skipped(1).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(1).drop_event_size());
-
-    dropEvent = report.value_metrics().skipped(1).drop_event(0);
-    EXPECT_EQ(BucketDropReason::NO_DATA, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(dumpTimeNs), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that BUCKET_TOO_SMALL dump reason is logged when a flushed bucket size
- * is smaller than the "min_bucket_size_nanos" specified in the metric config.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestBucketDropWhenBucketTooSmall) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-    metric.set_min_bucket_size_nanos(10000000000);  // 10 seconds
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 10, 10));
-                return true;
-            }))
-            // Dump report requested.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 9000000);
-                data->clear();
-                data->push_back(
-                        CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 9000000, 15));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Condition change event.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 10);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucketStartTimeNs + 9000000;
-    valueProducer->onDumpReport(dumpReportTimeNs, true /* include recent buckets */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::BUCKET_TOO_SMALL, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that NO_DATA dump reason is logged when a flushed bucket contains no data.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestBucketDropWhenDataUnavailable) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(
-                    pullerManager, metric, ConditionState::kFalse);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucketStartTimeNs + 10000000000; // 10 seconds
-    valueProducer->onDumpReport(dumpReportTimeNs, true /* include current bucket */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::NO_DATA, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that all buckets are dropped due to condition unknown until the first onConditionChanged.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestConditionUnknownMultipleBuckets) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 10 * NS_PER_SEC);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(
-                        tagId, bucket2StartTimeNs + 10 * NS_PER_SEC, 10));
-                return true;
-            }))
-            // Dump report requested.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 15 * NS_PER_SEC);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(
-                        tagId, bucket2StartTimeNs + 15 * NS_PER_SEC, 15));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(
-                    pullerManager, metric, ConditionState::kUnknown);
-
-    // Bucket should be dropped because of condition unknown.
-    int64_t appUpgradeTimeNs = bucketStartTimeNs + 5 * NS_PER_SEC;
-    valueProducer->notifyAppUpgrade(appUpgradeTimeNs);
-
-    // Bucket also dropped due to condition unknown
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1, 3));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    // This bucket is also dropped due to condition unknown.
-    int64_t conditionChangeTimeNs = bucket2StartTimeNs + 10 * NS_PER_SEC;
-    valueProducer->onConditionChanged(true, conditionChangeTimeNs);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucket2StartTimeNs + 15 * NS_PER_SEC; // 15 seconds
-    valueProducer->onDumpReport(dumpReportTimeNs, true /* include current bucket */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(3, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(appUpgradeTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::CONDITION_UNKNOWN, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(appUpgradeTimeNs), dropEvent.drop_time_millis());
-
-    EXPECT_EQ(NanoToMillis(appUpgradeTimeNs),
-              report.value_metrics().skipped(1).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(1).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(1).drop_event_size());
-
-    dropEvent = report.value_metrics().skipped(1).drop_event(0);
-    EXPECT_EQ(BucketDropReason::CONDITION_UNKNOWN, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs), dropEvent.drop_time_millis());
-
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(2).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs),
-              report.value_metrics().skipped(2).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(2).drop_event_size());
-
-    dropEvent = report.value_metrics().skipped(2).drop_event(0);
-    EXPECT_EQ(BucketDropReason::CONDITION_UNKNOWN, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(conditionChangeTimeNs), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that a skipped bucket is logged when a forced bucket split occurs when the previous bucket
- * was not flushed in time.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestBucketDropWhenForceBucketSplitBeforeBucketFlush) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 10, 10));
-                return true;
-            }))
-            // App Update.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 1000);
-                data->clear();
-                data->push_back(
-                        CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs + 1000, 15));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(pullerManager, metric,
-                                                                            ConditionState::kFalse);
-
-    // Condition changed event
-    int64_t conditionChangeTimeNs = bucketStartTimeNs + 10;
-    valueProducer->onConditionChanged(true, conditionChangeTimeNs);
-
-    // App update event.
-    int64_t appUpdateTimeNs = bucket2StartTimeNs + 1000;
-    valueProducer->notifyAppUpgrade(appUpdateTimeNs);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucket2StartTimeNs + 10000000000; // 10 seconds
-    valueProducer->onDumpReport(dumpReportTimeNs, false /* include current buckets */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(1, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    ASSERT_EQ(1, report.value_metrics().data(0).bucket_info_size());
-    auto data = report.value_metrics().data(0);
-    ASSERT_EQ(0, data.bucket_info(0).bucket_num());
-    EXPECT_EQ(5, data.bucket_info(0).values(0).value_long());
-
-    EXPECT_EQ(NanoToMillis(bucket2StartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(appUpdateTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::NO_DATA, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(appUpdateTimeNs), dropEvent.drop_time_millis());
-}
-
-/*
- * Test multiple bucket drop events in the same bucket.
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestMultipleBucketDropEvents) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs + 10, _, _))
-            // Condition change to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 10, 10));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(
-                    pullerManager, metric, ConditionState::kUnknown);
-
-    // Condition change event.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 10);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucketStartTimeNs + 1000;
-    valueProducer->onDumpReport(dumpReportTimeNs, true /* include recent buckets */, true,
-                                FAST /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(2, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::CONDITION_UNKNOWN, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 10), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(1);
-    EXPECT_EQ(BucketDropReason::DUMP_REPORT_REQUESTED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs), dropEvent.drop_time_millis());
-}
-
-/*
- * Test that the number of logged bucket drop events is capped at the maximum.
- * The maximum is currently 10 and is set in MetricProducer::maxDropEventsReached().
- */
-TEST(ValueMetricProducerTest_BucketDrop, TestMaxBucketDropEvents) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // First condition change event.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                for (int i = 0; i < 2000; i++) {
-                    data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 1, i));
-                }
-                return true;
-            }))
-            .WillOnce(Return(false))
-            .WillOnce(Return(false))
-            .WillOnce(Return(false))
-            .WillOnce(Return(false))
-            .WillOnce(Return(false))
-            .WillOnce(Return(false))
-            .WillOnce(Return(false))
-            .WillOnce(Return(false))
-            .WillOnce(Return(false))
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 220);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 220, 10));
-                return true;
-            }));
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(
-                    pullerManager, metric, ConditionState::kUnknown);
-
-    // First condition change event causes guardrail to be reached.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 10);
-
-    // 2-10 condition change events result in failed pulls.
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 30);
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 50);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 70);
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 90);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 100);
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 150);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 170);
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 190);
-    valueProducer->onConditionChanged(false, bucketStartTimeNs + 200);
-
-    // Condition change event 11
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 220);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucketStartTimeNs + 1000;
-    // Because we already have 10 dump events in the current bucket,
-    // this case should not be added to the list of dump events.
-    valueProducer->onDumpReport(bucketStartTimeNs + 1000, true /* include recent buckets */, true,
-                                FAST /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(dumpReportTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(10, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::CONDITION_UNKNOWN, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 10), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(1);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 30), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(2);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 50), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(3);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 70), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(4);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 90), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(5);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 100), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(6);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 150), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(7);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 170), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(8);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 190), dropEvent.drop_time_millis());
-
-    dropEvent = report.value_metrics().skipped(0).drop_event(9);
-    EXPECT_EQ(BucketDropReason::PULL_FAILED, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs + 200), dropEvent.drop_time_millis());
-}
-
-/*
- * Test metric with a simple sliced state
- * - Increasing values
- * - Using diff
- * - Second field is value field
- */
-TEST(ValueMetricProducerTest, TestSlicedState) {
-    // Set up ValueMetricProducer.
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithState("SCREEN_STATE");
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // ValueMetricProducer initialized.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 3));
-                return true;
-            }))
-            // Screen state change to ON.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 5);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 5, 5));
-                return true;
-            }))
-            // Screen state change to OFF.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 10);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 10, 9));
-                return true;
-            }))
-            // Screen state change to ON.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 15);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 15, 21));
-                return true;
-            }))
-            // Dump report requested.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 50);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 50, 30));
-                return true;
-            }));
-
-    StateManager::getInstance().clear();
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithState(
-                    pullerManager, metric, {util::SCREEN_STATE_CHANGED}, {});
-    EXPECT_EQ(1, valueProducer->mSlicedStateAtoms.size());
-
-    // Set up StateManager and check that StateTrackers are initialized.
-    StateManager::getInstance().registerListener(SCREEN_STATE_ATOM_ID, valueProducer);
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-
-    // Bucket status after metric initialized.
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    auto it = valueProducer->mCurrentSlicedBucket.begin();
-    auto itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(3, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{}, kStateUnknown}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Bucket status after screen state change kStateUnknown->ON.
-    auto screenEvent = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 5, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    StateManager::getInstance().onLogEvent(*screenEvent);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(5, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{}, kStateUnknown}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Bucket status after screen state change ON->OFF.
-    screenEvent = CreateScreenStateChangedEvent(bucketStartTimeNs + 10,
-                                                android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    StateManager::getInstance().onLogEvent(*screenEvent);
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(9, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_OFF,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{}, ON}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(4, it->second[0].value.long_value);
-    // Value for dimension, state key {{}, kStateUnknown}
-    it++;
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Bucket status after screen state change OFF->ON.
-    screenEvent = CreateScreenStateChangedEvent(bucketStartTimeNs + 15,
-                                                android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    StateManager::getInstance().onLogEvent(*screenEvent);
-    ASSERT_EQ(3UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(21, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{}, OFF}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_OFF,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(12, it->second[0].value.long_value);
-    // Value for dimension, state key {{}, ON}
-    it++;
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(4, it->second[0].value.long_value);
-    // Value for dimension, state key {{}, kStateUnknown}
-    it++;
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Start dump report and check output.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucketStartTimeNs + 50, true /* include recent buckets */, true,
-                                NO_TIME_CONSTRAINTS, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(3, report.value_metrics().data_size());
-
-    auto data = report.value_metrics().data(0);
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(2, report.value_metrics().data(0).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */, data.slice_by_state(0).value());
-
-    data = report.value_metrics().data(1);
-    ASSERT_EQ(1, report.value_metrics().data(1).bucket_info_size());
-    EXPECT_EQ(13, report.value_metrics().data(1).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON, data.slice_by_state(0).value());
-
-    data = report.value_metrics().data(2);
-    ASSERT_EQ(1, report.value_metrics().data(2).bucket_info_size());
-    EXPECT_EQ(12, report.value_metrics().data(2).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_OFF, data.slice_by_state(0).value());
-}
-
-/*
- * Test metric with sliced state with map
- * - Increasing values
- * - Using diff
- * - Second field is value field
- */
-TEST(ValueMetricProducerTest, TestSlicedStateWithMap) {
-    // Set up ValueMetricProducer.
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithState("SCREEN_STATE_ONOFF");
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // ValueMetricProducer initialized.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs, 3));
-                return true;
-            }))
-            // Screen state change to ON.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 5);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 5, 5));
-                return true;
-            }))
-            // Screen state change to VR has no pull because it is in the same
-            // state group as ON.
-
-            // Screen state change to ON has no pull because it is in the same
-            // state group as VR.
-
-            // Screen state change to OFF.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 15);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 15, 21));
-                return true;
-            }))
-            // Dump report requested.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 50);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 50, 30));
-                return true;
-            }));
-
-    const StateMap& stateMap =
-            CreateScreenStateOnOffMap(/*screen on id=*/321, /*screen off id=*/123);
-    const StateMap_StateGroup screenOnGroup = stateMap.group(0);
-    const StateMap_StateGroup screenOffGroup = stateMap.group(1);
-
-    unordered_map<int, unordered_map<int, int64_t>> stateGroupMap;
-    for (auto group : stateMap.group()) {
-        for (auto value : group.value()) {
-            stateGroupMap[SCREEN_STATE_ATOM_ID][value] = group.group_id();
-        }
-    }
-
-    StateManager::getInstance().clear();
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithState(
-                    pullerManager, metric, {util::SCREEN_STATE_CHANGED}, stateGroupMap);
-
-    // Set up StateManager and check that StateTrackers are initialized.
-    StateManager::getInstance().registerListener(SCREEN_STATE_ATOM_ID, valueProducer);
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(SCREEN_STATE_ATOM_ID));
-
-    // Bucket status after metric initialized.
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    auto it = valueProducer->mCurrentSlicedBucket.begin();
-    auto itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(3, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{}, {kStateUnknown}}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Bucket status after screen state change kStateUnknown->ON.
-    auto screenEvent = CreateScreenStateChangedEvent(
-            bucketStartTimeNs + 5, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    StateManager::getInstance().onLogEvent(*screenEvent);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(5, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(screenOnGroup.group_id(),
-              itBase->second[0].currentState.getValues()[0].mValue.long_value);
-    // Value for dimension, state key {{}, kStateUnknown}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Bucket status after screen state change ON->VR.
-    // Both ON and VR are in the same state group, so the base should not change.
-    screenEvent = CreateScreenStateChangedEvent(bucketStartTimeNs + 10,
-                                                android::view::DisplayStateEnum::DISPLAY_STATE_VR);
-    StateManager::getInstance().onLogEvent(*screenEvent);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(5, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(screenOnGroup.group_id(),
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{}, kStateUnknown}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Bucket status after screen state change VR->ON.
-    // Both ON and VR are in the same state group, so the base should not change.
-    screenEvent = CreateScreenStateChangedEvent(bucketStartTimeNs + 12,
-                                                android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    StateManager::getInstance().onLogEvent(*screenEvent);
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(5, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(screenOnGroup.group_id(),
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{}, kStateUnknown}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Bucket status after screen state change VR->OFF.
-    screenEvent = CreateScreenStateChangedEvent(bucketStartTimeNs + 15,
-                                                android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    StateManager::getInstance().onLogEvent(*screenEvent);
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(21, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(screenOffGroup.group_id(),
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{}, ON GROUP}
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(screenOnGroup.group_id(),
-              it->first.getStateValuesKey().getValues()[0].mValue.long_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(16, it->second[0].value.long_value);
-    // Value for dimension, state key {{}, kStateUnknown}
-    it++;
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Start dump report and check output.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucketStartTimeNs + 50, true /* include recent buckets */, true,
-                                NO_TIME_CONSTRAINTS, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(3, report.value_metrics().data_size());
-
-    auto data = report.value_metrics().data(0);
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(2, report.value_metrics().data(0).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1 /*StateTracker::kStateUnknown*/, data.slice_by_state(0).value());
-
-    data = report.value_metrics().data(1);
-    ASSERT_EQ(1, report.value_metrics().data(1).bucket_info_size());
-    EXPECT_EQ(16, report.value_metrics().data(1).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOnGroup.group_id(), data.slice_by_state(0).group_id());
-
-    data = report.value_metrics().data(2);
-    ASSERT_EQ(1, report.value_metrics().data(2).bucket_info_size());
-    EXPECT_EQ(9, report.value_metrics().data(2).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(SCREEN_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_group_id());
-    EXPECT_EQ(screenOffGroup.group_id(), data.slice_by_state(0).group_id());
-}
-
-/*
- * Test metric that slices by state with a primary field and has dimensions
- * - Increasing values
- * - Using diff
- * - Second field is value field
- */
-TEST(ValueMetricProducerTest, TestSlicedStateWithPrimaryField_WithDimensions) {
-    // Set up ValueMetricProducer.
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithState("UID_PROCESS_STATE");
-    metric.mutable_dimensions_in_what()->set_field(tagId);
-    metric.mutable_dimensions_in_what()->add_child()->set_field(1);
-
-    MetricStateLink* stateLink = metric.add_state_link();
-    stateLink->set_state_atom_id(UID_PROCESS_STATE_ATOM_ID);
-    auto fieldsInWhat = stateLink->mutable_fields_in_what();
-    *fieldsInWhat = CreateDimensions(tagId, {1 /* uid */});
-    auto fieldsInState = stateLink->mutable_fields_in_state();
-    *fieldsInState = CreateDimensions(UID_PROCESS_STATE_ATOM_ID, {1 /* uid */});
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // ValueMetricProducer initialized.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs);
-                data->clear();
-                data->push_back(CreateTwoValueLogEvent(tagId, bucketStartTimeNs, 2 /*uid*/, 7));
-                data->push_back(CreateTwoValueLogEvent(tagId, bucketStartTimeNs, 1 /*uid*/, 3));
-                return true;
-            }))
-            // Uid 1 process state change from kStateUnknown -> Foreground
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 20);
-                data->clear();
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucketStartTimeNs + 20, 1 /*uid*/, 6));
-
-                // This event should be skipped.
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucketStartTimeNs + 20, 2 /*uid*/, 8));
-                return true;
-            }))
-            // Uid 2 process state change from kStateUnknown -> Background
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 40);
-                data->clear();
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucketStartTimeNs + 40, 2 /*uid*/, 9));
-
-                // This event should be skipped.
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucketStartTimeNs + 40, 1 /*uid*/, 12));
-                return true;
-            }))
-            // Uid 1 process state change from Foreground -> Background
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 20);
-                data->clear();
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 20, 1 /*uid*/, 13));
-
-                // This event should be skipped.
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 20, 2 /*uid*/, 11));
-                return true;
-            }))
-            // Uid 1 process state change from Background -> Foreground
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 40);
-                data->clear();
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 40, 1 /*uid*/, 17));
-
-                // This event should be skipped.
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 40, 2 /*uid */, 15));
-                return true;
-            }))
-            // Dump report pull.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 50);
-                data->clear();
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 50, 2 /*uid*/, 20));
-                data->push_back(
-                        CreateTwoValueLogEvent(tagId, bucket2StartTimeNs + 50, 1 /*uid*/, 21));
-                return true;
-            }));
-
-    StateManager::getInstance().clear();
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithState(
-                    pullerManager, metric, {UID_PROCESS_STATE_ATOM_ID}, {});
-
-    // Set up StateManager and check that StateTrackers are initialized.
-    StateManager::getInstance().registerListener(UID_PROCESS_STATE_ATOM_ID, valueProducer);
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(UID_PROCESS_STATE_ATOM_ID));
-
-    // Bucket status after metric initialized.
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {uid 1}.
-    auto it = valueProducer->mCurrentSlicedBucket.begin();
-    auto itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(3, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{uid 1}, kStateUnknown}
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-    // Base for dimension key {uid 2}
-    it++;
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(7, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for dimension, state key {{uid 2}, kStateUnknown}
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Bucket status after uid 1 process state change kStateUnknown -> Foreground.
-    auto uidProcessEvent = CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 20, 1 /* uid */, android::app::PROCESS_STATE_IMPORTANT_FOREGROUND);
-    StateManager::getInstance().onLogEvent(*uidProcessEvent);
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {uid 1}.
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(6, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 1, kStateUnknown}.
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(3, it->second[0].value.long_value);
-
-    // Base for dimension key {uid 2}
-    it++;
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(7, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 2, kStateUnknown}
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1, it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Bucket status after uid 2 process state change kStateUnknown -> Background.
-    uidProcessEvent = CreateUidProcessStateChangedEvent(
-            bucketStartTimeNs + 40, 2 /* uid */, android::app::PROCESS_STATE_IMPORTANT_BACKGROUND);
-    StateManager::getInstance().onLogEvent(*uidProcessEvent);
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {uid 1}.
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(6, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 1, kStateUnknown}.
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1, it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(3, it->second[0].value.long_value);
-
-    // Base for dimension key {uid 2}
-    it++;
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(9, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 2, kStateUnknown}
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1, it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Pull at end of first bucket.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs, 1 /*uid*/, 10));
-    allData.push_back(CreateTwoValueLogEvent(tagId, bucket2StartTimeNs, 2 /*uid*/, 15));
-    valueProducer->onDataPulled(allData, /** succeeds */ true, bucket2StartTimeNs + 1);
-
-    // Buckets flushed after end of first bucket.
-    // None of the buckets should have a value.
-    ASSERT_EQ(4UL, valueProducer->mCurrentSlicedBucket.size());
-    ASSERT_EQ(4UL, valueProducer->mPastBuckets.size());
-    ASSERT_EQ(2UL, valueProducer->mCurrentBaseInfo.size());
-    // Base for dimension key {uid 2}.
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(15, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 2, BACKGROUND}.
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Base for dimension key {uid 1}
-    it++;
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(10, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 1, kStateUnknown}
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* kStateTracker::kUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Value for key {uid 1, FOREGROUND}
-    it++;
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Value for key {uid 2, kStateUnknown}
-    it++;
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* kStateTracker::kUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Bucket status after uid 1 process state change from Foreground -> Background.
-    uidProcessEvent = CreateUidProcessStateChangedEvent(
-            bucket2StartTimeNs + 20, 1 /* uid */, android::app::PROCESS_STATE_IMPORTANT_BACKGROUND);
-    StateManager::getInstance().onLogEvent(*uidProcessEvent);
-
-    ASSERT_EQ(4UL, valueProducer->mCurrentSlicedBucket.size());
-    ASSERT_EQ(4UL, valueProducer->mPastBuckets.size());
-    ASSERT_EQ(2UL, valueProducer->mCurrentBaseInfo.size());
-    // Base for dimension key {uid 2}.
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(15, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 2, BACKGROUND}.
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-    // Base for dimension key {uid 1}
-    it++;
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(13, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 1, kStateUnknown}
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-    // Value for key {uid 1, FOREGROUND}
-    it++;
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(3, it->second[0].value.long_value);
-    // Value for key {uid 2, kStateUnknown}
-    it++;
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Bucket status after uid 1 process state change Background->Foreground.
-    uidProcessEvent = CreateUidProcessStateChangedEvent(
-            bucket2StartTimeNs + 40, 1 /* uid */, android::app::PROCESS_STATE_IMPORTANT_FOREGROUND);
-    StateManager::getInstance().onLogEvent(*uidProcessEvent);
-
-    ASSERT_EQ(5UL, valueProducer->mCurrentSlicedBucket.size());
-    ASSERT_EQ(2UL, valueProducer->mCurrentBaseInfo.size());
-    // Base for dimension key {uid 2}
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(15, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 2, BACKGROUND}
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Base for dimension key {uid 1}
-    it++;
-    itBase = valueProducer->mCurrentBaseInfo.find(it->first.getDimensionKeyInWhat());
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(17, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {uid 1, kStateUnknown}
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Value for key {uid 1, BACKGROUND}
-    it++;
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(4, it->second[0].value.long_value);
-
-    // Value for key {uid 1, FOREGROUND}
-    it++;
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(1, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(android::app::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(3, it->second[0].value.long_value);
-
-    // Value for key {uid 2, kStateUnknown}
-    it++;
-    ASSERT_EQ(1, it->first.getDimensionKeyInWhat().getValues().size());
-    EXPECT_EQ(2, it->first.getDimensionKeyInWhat().getValues()[0].mValue.int_value);
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /* StateTracker::kStateUnknown */,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-
-    // Start dump report and check output.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucket2StartTimeNs + 50, true /* include recent buckets */, true,
-                                NO_TIME_CONSTRAINTS, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(5, report.value_metrics().data_size());
-
-    auto data = report.value_metrics().data(0);
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(4, report.value_metrics().data(0).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              data.slice_by_state(0).value());
-
-    data = report.value_metrics().data(1);
-    ASSERT_EQ(1, report.value_metrics().data(1).bucket_info_size());
-    EXPECT_EQ(2, report.value_metrics().data(1).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1 /*StateTracker::kStateUnknown*/, data.slice_by_state(0).value());
-
-    data = report.value_metrics().data(2);
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_FOREGROUND,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(2, report.value_metrics().data(2).bucket_info_size());
-    EXPECT_EQ(4, report.value_metrics().data(2).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(7, report.value_metrics().data(2).bucket_info(1).values(0).value_long());
-
-    data = report.value_metrics().data(3);
-    ASSERT_EQ(1, report.value_metrics().data(3).bucket_info_size());
-    EXPECT_EQ(3, report.value_metrics().data(3).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(-1 /*StateTracker::kStateUnknown*/, data.slice_by_state(0).value());
-
-    data = report.value_metrics().data(4);
-    EXPECT_EQ(UID_PROCESS_STATE_ATOM_ID, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_IMPORTANT_BACKGROUND,
-              data.slice_by_state(0).value());
-    ASSERT_EQ(2, report.value_metrics().data(4).bucket_info_size());
-    EXPECT_EQ(6, report.value_metrics().data(4).bucket_info(0).values(0).value_long());
-    EXPECT_EQ(5, report.value_metrics().data(4).bucket_info(1).values(0).value_long());
-}
-
-TEST(ValueMetricProducerTest, TestSlicedStateWithCondition) {
-    // Set up ValueMetricProducer.
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithConditionAndState(
-            "BATTERY_SAVER_MODE_STATE");
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _, _))
-            // Condition changed to true.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 20 * NS_PER_SEC);
-                data->clear();
-                data->push_back(
-                        CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 20 * NS_PER_SEC, 3));
-                return true;
-            }))
-            // Battery saver mode state changed to OFF.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucketStartTimeNs + 30 * NS_PER_SEC);
-                data->clear();
-                data->push_back(
-                        CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 30 * NS_PER_SEC, 5));
-                return true;
-            }))
-            // Condition changed to false.
-            .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs,
-                                vector<std::shared_ptr<LogEvent>>* data, bool) {
-                EXPECT_EQ(eventTimeNs, bucket2StartTimeNs + 10 * NS_PER_SEC);
-                data->clear();
-                data->push_back(CreateRepeatedValueLogEvent(
-                        tagId, bucket2StartTimeNs + 10 * NS_PER_SEC, 15));
-                return true;
-            }));
-
-    StateManager::getInstance().clear();
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithConditionAndState(
-                    pullerManager, metric, {util::BATTERY_SAVER_MODE_STATE_CHANGED}, {},
-                    ConditionState::kFalse);
-    EXPECT_EQ(1, valueProducer->mSlicedStateAtoms.size());
-
-    // Set up StateManager and check that StateTrackers are initialized.
-    StateManager::getInstance().registerListener(util::BATTERY_SAVER_MODE_STATE_CHANGED,
-                                                 valueProducer);
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getListenersCount(
-                         util::BATTERY_SAVER_MODE_STATE_CHANGED));
-
-    // Bucket status after battery saver mode ON event.
-    // Condition is false so we do nothing.
-    unique_ptr<LogEvent> batterySaverOnEvent =
-            CreateBatterySaverOnEvent(/*timestamp=*/bucketStartTimeNs + 10 * NS_PER_SEC);
-    StateManager::getInstance().onLogEvent(*batterySaverOnEvent);
-    EXPECT_EQ(0UL, valueProducer->mCurrentSlicedBucket.size());
-    EXPECT_EQ(0UL, valueProducer->mCurrentBaseInfo.size());
-
-    // Bucket status after condition change to true.
-    valueProducer->onConditionChanged(true, bucketStartTimeNs + 20 * NS_PER_SEC);
-    // Base for dimension key {}
-    ASSERT_EQ(1UL, valueProducer->mCurrentBaseInfo.size());
-    std::unordered_map<HashableDimensionKey, std::vector<ValueMetricProducer::BaseInfo>>::iterator
-            itBase = valueProducer->mCurrentBaseInfo.find(DEFAULT_DIMENSION_KEY);
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(3, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(BatterySaverModeStateChanged::ON,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {{}, -1}
-    ASSERT_EQ(1UL, valueProducer->mCurrentSlicedBucket.size());
-    std::unordered_map<MetricDimensionKey, std::vector<ValueMetricProducer::Interval>>::iterator
-            it = valueProducer->mCurrentSlicedBucket.begin();
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(-1 /*StateTracker::kUnknown*/,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_FALSE(it->second[0].hasValue);
-
-    // Bucket status after battery saver mode OFF event.
-    unique_ptr<LogEvent> batterySaverOffEvent =
-            CreateBatterySaverOffEvent(/*timestamp=*/bucketStartTimeNs + 30 * NS_PER_SEC);
-    StateManager::getInstance().onLogEvent(*batterySaverOffEvent);
-    // Base for dimension key {}
-    ASSERT_EQ(1UL, valueProducer->mCurrentBaseInfo.size());
-    itBase = valueProducer->mCurrentBaseInfo.find(DEFAULT_DIMENSION_KEY);
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(5, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(BatterySaverModeStateChanged::OFF,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {{}, ON}
-    ASSERT_EQ(2UL, valueProducer->mCurrentSlicedBucket.size());
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(BatterySaverModeStateChanged::ON,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(2, it->second[0].value.long_value);
-
-    // Pull at end of first bucket.
-    vector<shared_ptr<LogEvent>> allData;
-    allData.clear();
-    allData.push_back(CreateRepeatedValueLogEvent(tagId, bucket2StartTimeNs, 11));
-    valueProducer->onDataPulled(allData, /** succeed */ true, bucket2StartTimeNs);
-
-    EXPECT_EQ(2UL, valueProducer->mPastBuckets.size());
-    EXPECT_EQ(3UL, valueProducer->mCurrentSlicedBucket.size());
-    // Base for dimension key {}
-    ASSERT_EQ(1UL, valueProducer->mCurrentBaseInfo.size());
-    itBase = valueProducer->mCurrentBaseInfo.find(DEFAULT_DIMENSION_KEY);
-    EXPECT_TRUE(itBase->second[0].hasBase);
-    EXPECT_EQ(11, itBase->second[0].base.long_value);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(BatterySaverModeStateChanged::OFF,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-
-    // Bucket 2 status after condition change to false.
-    valueProducer->onConditionChanged(false, bucket2StartTimeNs + 10 * NS_PER_SEC);
-    // Base for dimension key {}
-    ASSERT_EQ(1UL, valueProducer->mCurrentBaseInfo.size());
-    itBase = valueProducer->mCurrentBaseInfo.find(DEFAULT_DIMENSION_KEY);
-    EXPECT_FALSE(itBase->second[0].hasBase);
-    EXPECT_TRUE(itBase->second[0].hasCurrentState);
-    ASSERT_EQ(1, itBase->second[0].currentState.getValues().size());
-    EXPECT_EQ(BatterySaverModeStateChanged::OFF,
-              itBase->second[0].currentState.getValues()[0].mValue.int_value);
-    // Value for key {{}, OFF}
-    ASSERT_EQ(3UL, valueProducer->mCurrentSlicedBucket.size());
-    it = valueProducer->mCurrentSlicedBucket.begin();
-    EXPECT_EQ(0, it->first.getDimensionKeyInWhat().getValues().size());
-    ASSERT_EQ(1, it->first.getStateValuesKey().getValues().size());
-    EXPECT_EQ(BatterySaverModeStateChanged::OFF,
-              it->first.getStateValuesKey().getValues()[0].mValue.int_value);
-    EXPECT_TRUE(it->second[0].hasValue);
-    EXPECT_EQ(4, it->second[0].value.long_value);
-
-    // Start dump report and check output.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    valueProducer->onDumpReport(bucket2StartTimeNs + 50 * NS_PER_SEC,
-                                true /* include recent buckets */, true, NO_TIME_CONSTRAINTS,
-                                &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(2, report.value_metrics().data_size());
-
-    ValueMetricData data = report.value_metrics().data(0);
-    EXPECT_EQ(util::BATTERY_SAVER_MODE_STATE_CHANGED, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(BatterySaverModeStateChanged::ON, data.slice_by_state(0).value());
-    ASSERT_EQ(1, data.bucket_info_size());
-    EXPECT_EQ(2, data.bucket_info(0).values(0).value_long());
-
-    data = report.value_metrics().data(1);
-    EXPECT_EQ(util::BATTERY_SAVER_MODE_STATE_CHANGED, data.slice_by_state(0).atom_id());
-    EXPECT_TRUE(data.slice_by_state(0).has_value());
-    EXPECT_EQ(BatterySaverModeStateChanged::OFF, data.slice_by_state(0).value());
-    ASSERT_EQ(2, data.bucket_info_size());
-    EXPECT_EQ(6, data.bucket_info(0).values(0).value_long());
-    EXPECT_EQ(4, data.bucket_info(1).values(0).value_long());
-}
-
-/*
- * Test bucket splits when condition is unknown.
- */
-TEST(ValueMetricProducerTest, TestForcedBucketSplitWhenConditionUnknownSkipsBucket) {
-    ValueMetric metric = ValueMetricProducerTestHelper::createMetricWithCondition();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-
-    sp<ValueMetricProducer> valueProducer =
-            ValueMetricProducerTestHelper::createValueProducerWithCondition(
-                    pullerManager, metric,
-                    ConditionState::kUnknown);
-
-    // App update event.
-    int64_t appUpdateTimeNs = bucketStartTimeNs + 1000;
-    valueProducer->notifyAppUpgrade(appUpdateTimeNs);
-
-    // Check dump report.
-    ProtoOutputStream output;
-    std::set<string> strSet;
-    int64_t dumpReportTimeNs = bucketStartTimeNs + 10000000000; // 10 seconds
-    valueProducer->onDumpReport(dumpReportTimeNs, false /* include current buckets */, true,
-                                NO_TIME_CONSTRAINTS /* dumpLatency */, &strSet, &output);
-
-    StatsLogReport report = outputStreamToProto(&output);
-    EXPECT_TRUE(report.has_value_metrics());
-    ASSERT_EQ(0, report.value_metrics().data_size());
-    ASSERT_EQ(1, report.value_metrics().skipped_size());
-
-    EXPECT_EQ(NanoToMillis(bucketStartTimeNs),
-              report.value_metrics().skipped(0).start_bucket_elapsed_millis());
-    EXPECT_EQ(NanoToMillis(appUpdateTimeNs),
-              report.value_metrics().skipped(0).end_bucket_elapsed_millis());
-    ASSERT_EQ(1, report.value_metrics().skipped(0).drop_event_size());
-
-    auto dropEvent = report.value_metrics().skipped(0).drop_event(0);
-    EXPECT_EQ(BucketDropReason::CONDITION_UNKNOWN, dropEvent.drop_reason());
-    EXPECT_EQ(NanoToMillis(appUpdateTimeNs), dropEvent.drop_time_millis());
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/metrics/metrics_test_helper.cpp b/cmds/statsd/tests/metrics/metrics_test_helper.cpp
deleted file mode 100644
index 108df04b..0000000
--- a/cmds/statsd/tests/metrics/metrics_test_helper.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "metrics_test_helper.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-HashableDimensionKey getMockedDimensionKey(int tagId, int key, string value) {
-    HashableDimensionKey dimension;
-    int pos[] = {key, 0, 0};
-    dimension.addValue(FieldValue(Field(tagId, pos, 0), Value(value)));
-
-    return dimension;
-}
-
-HashableDimensionKey getMockedDimensionKeyLongValue(int tagId, int key, int64_t value) {
-    HashableDimensionKey dimension;
-    int pos[] = {key, 0, 0};
-    dimension.addValue(FieldValue(Field(tagId, pos, 0), Value(value)));
-
-    return dimension;
-}
-
-MetricDimensionKey getMockedMetricDimensionKey(int tagId, int key, string value) {
-    return MetricDimensionKey(getMockedDimensionKey(tagId, key, value), DEFAULT_DIMENSION_KEY);
-}
-
-MetricDimensionKey getMockedStateDimensionKey(int tagId, int key, int64_t value) {
-    return MetricDimensionKey(DEFAULT_DIMENSION_KEY,
-                              getMockedDimensionKeyLongValue(tagId, key, value));
-}
-
-void buildSimpleAtomFieldMatcher(const int tagId, FieldMatcher* matcher) {
-    matcher->set_field(tagId);
-}
-
-void buildSimpleAtomFieldMatcher(const int tagId, const int fieldNum, FieldMatcher* matcher) {
-    matcher->set_field(tagId);
-    matcher->add_child()->set_field(fieldNum);
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/metrics/metrics_test_helper.h b/cmds/statsd/tests/metrics/metrics_test_helper.h
deleted file mode 100644
index eeb38a4..0000000
--- a/cmds/statsd/tests/metrics/metrics_test_helper.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-#pragma once
-
-#include "src/condition/ConditionWizard.h"
-#include "src/external/StatsPullerManager.h"
-#include "src/packages/UidMap.h"
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-class MockConditionWizard : public ConditionWizard {
-public:
-    MOCK_METHOD3(query,
-                 ConditionState(const int conditionIndex, const ConditionKey& conditionParameters,
-                                const bool isPartialLink));
-};
-
-class MockStatsPullerManager : public StatsPullerManager {
-public:
-    MOCK_METHOD5(RegisterReceiver,
-                 void(int tagId, const ConfigKey& key, wp<PullDataReceiver> receiver,
-                      int64_t nextPulltimeNs, int64_t intervalNs));
-    MOCK_METHOD3(UnRegisterReceiver,
-                 void(int tagId, const ConfigKey& key, wp<PullDataReceiver> receiver));
-    MOCK_METHOD5(Pull, bool(const int pullCode, const ConfigKey& key, const int64_t eventTimeNs,
-                            vector<std::shared_ptr<LogEvent>>* data, bool useUids));
-    MOCK_METHOD5(Pull,
-                 bool(const int pullCode, const vector<int32_t>& uids, const int64_t eventTimeNs,
-                      vector<std::shared_ptr<LogEvent>>* data, bool useUids));
-    MOCK_METHOD2(RegisterPullUidProvider,
-                 void(const ConfigKey& configKey, wp<PullUidProvider> provider));
-    MOCK_METHOD2(UnregisterPullUidProvider,
-                 void(const ConfigKey& configKey, wp<PullUidProvider> provider));
-};
-
-HashableDimensionKey getMockedDimensionKey(int tagId, int key, std::string value);
-MetricDimensionKey getMockedMetricDimensionKey(int tagId, int key, std::string value);
-
-HashableDimensionKey getMockedDimensionKeyLongValue(int tagId, int key, int64_t value);
-MetricDimensionKey getMockedStateDimensionKey(int tagId, int key, int64_t value);
-
-// Utils to build FieldMatcher proto for simple one-depth atoms.
-void buildSimpleAtomFieldMatcher(const int tagId, const int atomFieldNum, FieldMatcher* matcher);
-void buildSimpleAtomFieldMatcher(const int tagId, FieldMatcher* matcher);
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/shell/ShellSubscriber_test.cpp b/cmds/statsd/tests/shell/ShellSubscriber_test.cpp
deleted file mode 100644
index e384b6a..0000000
--- a/cmds/statsd/tests/shell/ShellSubscriber_test.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 "src/shell/ShellSubscriber.h"
-
-#include <gtest/gtest.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include <vector>
-
-#include "frameworks/base/cmds/statsd/src/atoms.pb.h"
-#include "frameworks/base/cmds/statsd/src/shell/shell_config.pb.h"
-#include "frameworks/base/cmds/statsd/src/shell/shell_data.pb.h"
-#include "stats_event.h"
-#include "tests/metrics/metrics_test_helper.h"
-#include "tests/statsd_test_util.h"
-
-using namespace android::os::statsd;
-using android::sp;
-using std::vector;
-using testing::_;
-using testing::Invoke;
-using testing::NaggyMock;
-using testing::StrictMock;
-
-#ifdef __ANDROID__
-
-void runShellTest(ShellSubscription config, sp<MockUidMap> uidMap,
-                  sp<MockStatsPullerManager> pullerManager,
-                  const vector<std::shared_ptr<LogEvent>>& pushedEvents,
-                  const ShellData& expectedData) {
-    // set up 2 pipes for read/write config and data
-    int fds_config[2];
-    ASSERT_EQ(0, pipe(fds_config));
-
-    int fds_data[2];
-    ASSERT_EQ(0, pipe(fds_data));
-
-    size_t bufferSize = config.ByteSize();
-    // write the config to pipe, first write size of the config
-    write(fds_config[1], &bufferSize, sizeof(bufferSize));
-    // then write config itself
-    vector<uint8_t> buffer(bufferSize);
-    config.SerializeToArray(&buffer[0], bufferSize);
-    write(fds_config[1], buffer.data(), bufferSize);
-    close(fds_config[1]);
-
-    sp<ShellSubscriber> shellClient = new ShellSubscriber(uidMap, pullerManager);
-
-    // mimic a binder thread that a shell subscriber runs on. it would block.
-    std::thread reader([&shellClient, &fds_config, &fds_data] {
-        shellClient->startNewSubscription(fds_config[0], fds_data[1], /*timeoutSec=*/-1);
-    });
-    reader.detach();
-
-    // let the shell subscriber to receive the config from pipe.
-    std::this_thread::sleep_for(100ms);
-
-    if (pushedEvents.size() > 0) {
-        // send a log event that matches the config.
-        std::thread log_reader([&shellClient, &pushedEvents] {
-            for (const auto& event : pushedEvents) {
-                shellClient->onLogEvent(*event);
-            }
-        });
-
-        log_reader.detach();
-
-        if (log_reader.joinable()) {
-            log_reader.join();
-        }
-    }
-
-    // wait for the data to be written.
-    std::this_thread::sleep_for(100ms);
-
-    // Because we might receive heartbeats from statsd, consisting of data sizes
-    // of 0, encapsulate reads within a while loop.
-    bool readAtom = false;
-    while (!readAtom) {
-        // Read the atom size.
-        size_t dataSize = 0;
-        read(fds_data[0], &dataSize, sizeof(dataSize));
-        if (dataSize == 0) continue;
-        EXPECT_EQ(expectedData.ByteSize(), int(dataSize));
-
-        // Read that much data in proto binary format.
-        vector<uint8_t> dataBuffer(dataSize);
-        EXPECT_EQ((int)dataSize, read(fds_data[0], dataBuffer.data(), dataSize));
-
-        // Make sure the received bytes can be parsed to an atom.
-        ShellData receivedAtom;
-        EXPECT_TRUE(receivedAtom.ParseFromArray(dataBuffer.data(), dataSize) != 0);
-
-        // Serialize the expected atom to byte array and compare to make sure
-        // they are the same.
-        vector<uint8_t> expectedAtomBuffer(expectedData.ByteSize());
-        expectedData.SerializeToArray(expectedAtomBuffer.data(), expectedData.ByteSize());
-        EXPECT_EQ(expectedAtomBuffer, dataBuffer);
-
-        readAtom = true;
-    }
-
-    close(fds_data[0]);
-    if (reader.joinable()) {
-        reader.join();
-    }
-}
-
-TEST(ShellSubscriberTest, testPushedSubscription) {
-    sp<MockUidMap> uidMap = new NaggyMock<MockUidMap>();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    vector<std::shared_ptr<LogEvent>> pushedList;
-
-    // Create the LogEvent from an AStatsEvent
-    std::unique_ptr<LogEvent> logEvent = CreateScreenStateChangedEvent(
-            1000 /*timestamp*/, ::android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    pushedList.push_back(std::move(logEvent));
-
-    // create a simple config to get screen events
-    ShellSubscription config;
-    config.add_pushed()->set_atom_id(29);
-
-    // this is the expected screen event atom.
-    ShellData shellData;
-    shellData.add_atom()->mutable_screen_state_changed()->set_state(
-            ::android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-
-    runShellTest(config, uidMap, pullerManager, pushedList, shellData);
-}
-
-namespace {
-
-int kUid1 = 1000;
-int kUid2 = 2000;
-
-int kCpuTime1 = 100;
-int kCpuTime2 = 200;
-
-ShellData getExpectedShellData() {
-    ShellData shellData;
-    auto* atom1 = shellData.add_atom()->mutable_cpu_active_time();
-    atom1->set_uid(kUid1);
-    atom1->set_time_millis(kCpuTime1);
-
-    auto* atom2 = shellData.add_atom()->mutable_cpu_active_time();
-    atom2->set_uid(kUid2);
-    atom2->set_time_millis(kCpuTime2);
-
-    return shellData;
-}
-
-ShellSubscription getPulledConfig() {
-    ShellSubscription config;
-    auto* pull_config = config.add_pulled();
-    pull_config->mutable_matcher()->set_atom_id(10016);
-    pull_config->set_freq_millis(2000);
-    return config;
-}
-
-shared_ptr<LogEvent> makeCpuActiveTimeAtom(int32_t uid, int64_t timeMillis) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, 10016);
-    AStatsEvent_overwriteTimestamp(statsEvent, 1111L);
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_writeInt64(statsEvent, timeMillis);
-
-    std::shared_ptr<LogEvent> logEvent = std::make_shared<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-}  // namespace
-
-TEST(ShellSubscriberTest, testPulledSubscription) {
-    sp<MockUidMap> uidMap = new NaggyMock<MockUidMap>();
-
-    sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
-    const vector<int32_t> uids = {AID_SYSTEM};
-    EXPECT_CALL(*pullerManager, Pull(10016, uids, _, _, _))
-            .WillRepeatedly(Invoke([](int tagId, const vector<int32_t>&, const int64_t,
-                                      vector<std::shared_ptr<LogEvent>>* data, bool) {
-                data->clear();
-                data->push_back(makeCpuActiveTimeAtom(/*uid=*/kUid1, /*timeMillis=*/kCpuTime1));
-                data->push_back(makeCpuActiveTimeAtom(/*uid=*/kUid2, /*timeMillis=*/kCpuTime2));
-                return true;
-            }));
-    runShellTest(getPulledConfig(), uidMap, pullerManager, vector<std::shared_ptr<LogEvent>>(),
-                 getExpectedShellData());
-}
-
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/state/StateTracker_test.cpp b/cmds/statsd/tests/state/StateTracker_test.cpp
deleted file mode 100644
index 6516c15..0000000
--- a/cmds/statsd/tests/state/StateTracker_test.cpp
+++ /dev/null
@@ -1,571 +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.
- */
-#include "state/StateTracker.h"
-
-#include <gtest/gtest.h>
-#include <private/android_filesystem_config.h>
-
-#include "state/StateListener.h"
-#include "state/StateManager.h"
-#include "state/StateTracker.h"
-#include "stats_event.h"
-#include "tests/statsd_test_util.h"
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-const int32_t timestampNs = 1000;
-
-/**
- * Mock StateListener class for testing.
- * Stores primary key and state pairs.
- */
-class TestStateListener : public virtual StateListener {
-public:
-    TestStateListener(){};
-
-    virtual ~TestStateListener(){};
-
-    struct Update {
-        Update(const HashableDimensionKey& key, int state) : mKey(key), mState(state){};
-        HashableDimensionKey mKey;
-        int mState;
-    };
-
-    std::vector<Update> updates;
-
-    void onStateChanged(const int64_t eventTimeNs, const int32_t atomId,
-                        const HashableDimensionKey& primaryKey, const FieldValue& oldState,
-                        const FieldValue& newState) {
-        updates.emplace_back(primaryKey, newState.mValue.int_value);
-    }
-};
-
-int getStateInt(StateManager& mgr, int atomId, const HashableDimensionKey& queryKey) {
-    FieldValue output;
-    mgr.getStateValue(atomId, queryKey, &output);
-    return output.mValue.int_value;
-}
-
-// START: build event functions.
-// Incorrect event - missing fields
-std::unique_ptr<LogEvent> buildIncorrectOverlayEvent(int uid, const std::string& packageName,
-                                                     int state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::OVERLAY_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, 1000);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_writeString(statsEvent, packageName.c_str());
-    // Missing field 3 - using_alert_window.
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-// Incorrect event - exclusive state has wrong type
-std::unique_ptr<LogEvent> buildOverlayEventBadStateType(int uid, const std::string& packageName) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::OVERLAY_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, 1000);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_writeString(statsEvent, packageName.c_str());
-    AStatsEvent_writeInt32(statsEvent, true);       // using_alert_window
-    AStatsEvent_writeString(statsEvent, "string");  // exclusive state: string instead of int
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-// END: build event functions.
-
-TEST(StateListenerTest, TestStateListenerWeakPointer) {
-    sp<TestStateListener> listener = new TestStateListener();
-    wp<TestStateListener> wListener = listener;
-    listener = nullptr;  // let go of listener
-    EXPECT_TRUE(wListener.promote() == nullptr);
-}
-
-TEST(StateManagerTest, TestStateManagerGetInstance) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    StateManager& mgr = StateManager::getInstance();
-    mgr.clear();
-
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1);
-    EXPECT_EQ(1, mgr.getStateTrackersCount());
-    EXPECT_EQ(1, StateManager::getInstance().getStateTrackersCount());
-}
-
-TEST(StateManagerTest, TestOnLogEvent) {
-    sp<MockUidMap> uidMap = makeMockUidMapForPackage("com.android.systemui", {10111});
-    sp<TestStateListener> listener1 = new TestStateListener();
-    StateManager mgr;
-    mgr.updateLogSources(uidMap);
-    // Add StateTracker by registering a listener.
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1);
-
-    // log event using AID_ROOT
-    std::unique_ptr<LogEvent> event = CreateScreenStateChangedEvent(
-            timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    mgr.onLogEvent(*event);
-
-    // check StateTracker was updated by querying for state
-    HashableDimensionKey queryKey = DEFAULT_DIMENSION_KEY;
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
-              getStateInt(mgr, util::SCREEN_STATE_CHANGED, queryKey));
-
-    // log event using mocked uid
-    event = CreateScreenStateChangedEvent(
-            timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_OFF, 10111);
-    mgr.onLogEvent(*event);
-
-    // check StateTracker was updated by querying for state
-    queryKey = DEFAULT_DIMENSION_KEY;
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_OFF,
-              getStateInt(mgr, util::SCREEN_STATE_CHANGED, queryKey));
-
-    // log event using non-whitelisted uid
-    event = CreateScreenStateChangedEvent(timestampNs,
-                                          android::view::DisplayStateEnum::DISPLAY_STATE_ON, 10112);
-    mgr.onLogEvent(*event);
-
-    // check StateTracker was NOT updated by querying for state
-    queryKey = DEFAULT_DIMENSION_KEY;
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_OFF,
-              getStateInt(mgr, util::SCREEN_STATE_CHANGED, queryKey));
-
-    // log event using AID_SYSTEM
-    event = CreateScreenStateChangedEvent(
-            timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_ON, AID_SYSTEM);
-    mgr.onLogEvent(*event);
-
-    // check StateTracker was updated by querying for state
-    queryKey = DEFAULT_DIMENSION_KEY;
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
-              getStateInt(mgr, util::SCREEN_STATE_CHANGED, queryKey));
-}
-
-/**
- * Test registering listeners to StateTrackers
- *
- * - StateManager will create a new StateTracker if it doesn't already exist
- * and then register the listener to the StateTracker.
- * - If a listener is already registered to a StateTracker, it is not added again.
- * - StateTrackers are only created for atoms that are state atoms.
- */
-TEST(StateTrackerTest, TestRegisterListener) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    sp<TestStateListener> listener2 = new TestStateListener();
-    StateManager mgr;
-
-    // Register listener to non-existing StateTracker
-    EXPECT_EQ(0, mgr.getStateTrackersCount());
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1);
-    EXPECT_EQ(1, mgr.getStateTrackersCount());
-    EXPECT_EQ(1, mgr.getListenersCount(util::SCREEN_STATE_CHANGED));
-
-    // Register listener to existing StateTracker
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener2);
-    EXPECT_EQ(1, mgr.getStateTrackersCount());
-    EXPECT_EQ(2, mgr.getListenersCount(util::SCREEN_STATE_CHANGED));
-
-    // Register already registered listener to existing StateTracker
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener2);
-    EXPECT_EQ(1, mgr.getStateTrackersCount());
-    EXPECT_EQ(2, mgr.getListenersCount(util::SCREEN_STATE_CHANGED));
-
-    // Register listener to non-state atom
-    mgr.registerListener(util::BATTERY_LEVEL_CHANGED, listener2);
-    EXPECT_EQ(2, mgr.getStateTrackersCount());
-}
-
-/**
- * Test unregistering listeners from StateTrackers
- *
- * - StateManager will unregister listeners from a StateTracker only if the
- * StateTracker exists and the listener is registered to the StateTracker.
- * - Once all listeners are removed from a StateTracker, the StateTracker
- * is also removed.
- */
-TEST(StateTrackerTest, TestUnregisterListener) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    sp<TestStateListener> listener2 = new TestStateListener();
-    StateManager mgr;
-
-    // Unregister listener from non-existing StateTracker
-    EXPECT_EQ(0, mgr.getStateTrackersCount());
-    mgr.unregisterListener(util::SCREEN_STATE_CHANGED, listener1);
-    EXPECT_EQ(0, mgr.getStateTrackersCount());
-    EXPECT_EQ(-1, mgr.getListenersCount(util::SCREEN_STATE_CHANGED));
-
-    // Unregister non-registered listener from existing StateTracker
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1);
-    EXPECT_EQ(1, mgr.getStateTrackersCount());
-    EXPECT_EQ(1, mgr.getListenersCount(util::SCREEN_STATE_CHANGED));
-    mgr.unregisterListener(util::SCREEN_STATE_CHANGED, listener2);
-    EXPECT_EQ(1, mgr.getStateTrackersCount());
-    EXPECT_EQ(1, mgr.getListenersCount(util::SCREEN_STATE_CHANGED));
-
-    // Unregister second-to-last listener from StateTracker
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener2);
-    mgr.unregisterListener(util::SCREEN_STATE_CHANGED, listener1);
-    EXPECT_EQ(1, mgr.getStateTrackersCount());
-    EXPECT_EQ(1, mgr.getListenersCount(util::SCREEN_STATE_CHANGED));
-
-    // Unregister last listener from StateTracker
-    mgr.unregisterListener(util::SCREEN_STATE_CHANGED, listener2);
-    EXPECT_EQ(0, mgr.getStateTrackersCount());
-    EXPECT_EQ(-1, mgr.getListenersCount(util::SCREEN_STATE_CHANGED));
-}
-
-/**
- * Test a binary state atom with nested counting.
- *
- * To go from an "ON" state to an "OFF" state with nested counting, we must see
- * an equal number of "OFF" events as "ON" events.
- * For example, ACQUIRE, ACQUIRE, RELEASE will still be in the ACQUIRE state.
- * ACQUIRE, ACQUIRE, RELEASE, RELEASE will be in the RELEASE state.
- */
-TEST(StateTrackerTest, TestStateChangeNested) {
-    sp<TestStateListener> listener = new TestStateListener();
-    StateManager mgr;
-    mgr.registerListener(util::WAKELOCK_STATE_CHANGED, listener);
-
-    std::vector<int> attributionUids1 = {1000};
-    std::vector<string> attributionTags1 = {"tag"};
-
-    std::unique_ptr<LogEvent> event1 = CreateAcquireWakelockEvent(timestampNs, attributionUids1,
-                                                                  attributionTags1, "wakelockName");
-    mgr.onLogEvent(*event1);
-    ASSERT_EQ(1, listener->updates.size());
-    EXPECT_EQ(1000, listener->updates[0].mKey.getValues()[0].mValue.int_value);
-    EXPECT_EQ(1, listener->updates[0].mState);
-    listener->updates.clear();
-
-    std::unique_ptr<LogEvent> event2 = CreateAcquireWakelockEvent(
-            timestampNs + 1000, attributionUids1, attributionTags1, "wakelockName");
-    mgr.onLogEvent(*event2);
-    ASSERT_EQ(0, listener->updates.size());
-
-    std::unique_ptr<LogEvent> event3 = CreateReleaseWakelockEvent(
-            timestampNs + 2000, attributionUids1, attributionTags1, "wakelockName");
-    mgr.onLogEvent(*event3);
-    ASSERT_EQ(0, listener->updates.size());
-
-    std::unique_ptr<LogEvent> event4 = CreateReleaseWakelockEvent(
-            timestampNs + 3000, attributionUids1, attributionTags1, "wakelockName");
-    mgr.onLogEvent(*event4);
-    ASSERT_EQ(1, listener->updates.size());
-    EXPECT_EQ(1000, listener->updates[0].mKey.getValues()[0].mValue.int_value);
-    EXPECT_EQ(0, listener->updates[0].mState);
-}
-
-/**
- * Test a state atom with a reset state.
- *
- * If the reset state value is seen, every state in the map is set to the default
- * state and every listener is notified.
- */
-TEST(StateTrackerTest, TestStateChangeReset) {
-    sp<TestStateListener> listener = new TestStateListener();
-    StateManager mgr;
-    mgr.registerListener(util::BLE_SCAN_STATE_CHANGED, listener);
-
-    std::vector<int> attributionUids1 = {1000};
-    std::vector<string> attributionTags1 = {"tag1"};
-    std::vector<int> attributionUids2 = {2000};
-
-    std::unique_ptr<LogEvent> event1 =
-            CreateBleScanStateChangedEvent(timestampNs, attributionUids1, attributionTags1,
-                                           BleScanStateChanged::ON, false, false, false);
-    mgr.onLogEvent(*event1);
-    ASSERT_EQ(1, listener->updates.size());
-    EXPECT_EQ(1000, listener->updates[0].mKey.getValues()[0].mValue.int_value);
-    EXPECT_EQ(BleScanStateChanged::ON, listener->updates[0].mState);
-    FieldValue stateFieldValue;
-    mgr.getStateValue(util::BLE_SCAN_STATE_CHANGED, listener->updates[0].mKey, &stateFieldValue);
-    EXPECT_EQ(BleScanStateChanged::ON, stateFieldValue.mValue.int_value);
-    listener->updates.clear();
-
-    std::unique_ptr<LogEvent> event2 =
-            CreateBleScanStateChangedEvent(timestampNs + 1000, attributionUids2, attributionTags1,
-                                           BleScanStateChanged::ON, false, false, false);
-    mgr.onLogEvent(*event2);
-    ASSERT_EQ(1, listener->updates.size());
-    EXPECT_EQ(2000, listener->updates[0].mKey.getValues()[0].mValue.int_value);
-    EXPECT_EQ(BleScanStateChanged::ON, listener->updates[0].mState);
-    mgr.getStateValue(util::BLE_SCAN_STATE_CHANGED, listener->updates[0].mKey, &stateFieldValue);
-    EXPECT_EQ(BleScanStateChanged::ON, stateFieldValue.mValue.int_value);
-    listener->updates.clear();
-
-    std::unique_ptr<LogEvent> event3 =
-            CreateBleScanStateChangedEvent(timestampNs + 2000, attributionUids2, attributionTags1,
-                                           BleScanStateChanged::RESET, false, false, false);
-    mgr.onLogEvent(*event3);
-    ASSERT_EQ(2, listener->updates.size());
-    for (const TestStateListener::Update& update : listener->updates) {
-        EXPECT_EQ(BleScanStateChanged::OFF, update.mState);
-
-        mgr.getStateValue(util::BLE_SCAN_STATE_CHANGED, update.mKey, &stateFieldValue);
-        EXPECT_EQ(BleScanStateChanged::OFF, stateFieldValue.mValue.int_value);
-    }
-}
-
-/**
- * Test StateManager's onLogEvent and StateListener's onStateChanged correctly
- * updates listener for states without primary keys.
- */
-TEST(StateTrackerTest, TestStateChangeNoPrimaryFields) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    StateManager mgr;
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1);
-
-    // log event
-    std::unique_ptr<LogEvent> event = CreateScreenStateChangedEvent(
-            timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    mgr.onLogEvent(*event);
-
-    // check listener was updated
-    ASSERT_EQ(1, listener1->updates.size());
-    EXPECT_EQ(DEFAULT_DIMENSION_KEY, listener1->updates[0].mKey);
-    EXPECT_EQ(2, listener1->updates[0].mState);
-
-    // check StateTracker was updated by querying for state
-    HashableDimensionKey queryKey = DEFAULT_DIMENSION_KEY;
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
-              getStateInt(mgr, util::SCREEN_STATE_CHANGED, queryKey));
-}
-
-/**
- * Test StateManager's onLogEvent and StateListener's onStateChanged correctly
- * updates listener for states with one primary key.
- */
-TEST(StateTrackerTest, TestStateChangeOnePrimaryField) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    StateManager mgr;
-    mgr.registerListener(util::UID_PROCESS_STATE_CHANGED, listener1);
-
-    // log event
-    std::unique_ptr<LogEvent> event = CreateUidProcessStateChangedEvent(
-            timestampNs, 1000 /*uid*/, android::app::ProcessStateEnum::PROCESS_STATE_TOP);
-    mgr.onLogEvent(*event);
-
-    // check listener was updated
-    ASSERT_EQ(1, listener1->updates.size());
-    EXPECT_EQ(1000, listener1->updates[0].mKey.getValues()[0].mValue.int_value);
-    EXPECT_EQ(1002, listener1->updates[0].mState);
-
-    // check StateTracker was updated by querying for state
-    HashableDimensionKey queryKey;
-    getUidProcessKey(1000 /* uid */, &queryKey);
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_TOP,
-              getStateInt(mgr, util::UID_PROCESS_STATE_CHANGED, queryKey));
-}
-
-TEST(StateTrackerTest, TestStateChangePrimaryFieldAttrChain) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    StateManager mgr;
-    mgr.registerListener(util::WAKELOCK_STATE_CHANGED, listener1);
-
-    // Log event.
-    std::vector<int> attributionUids = {1001};
-    std::vector<string> attributionTags = {"tag1"};
-
-    std::unique_ptr<LogEvent> event = CreateAcquireWakelockEvent(timestampNs, attributionUids,
-                                                                 attributionTags, "wakelockName");
-    mgr.onLogEvent(*event);
-    EXPECT_EQ(1, mgr.getStateTrackersCount());
-    EXPECT_EQ(1, mgr.getListenersCount(util::WAKELOCK_STATE_CHANGED));
-
-    // Check listener was updated.
-    ASSERT_EQ(1, listener1->updates.size());
-    ASSERT_EQ(3, listener1->updates[0].mKey.getValues().size());
-    EXPECT_EQ(1001, listener1->updates[0].mKey.getValues()[0].mValue.int_value);
-    EXPECT_EQ(1, listener1->updates[0].mKey.getValues()[1].mValue.int_value);
-    EXPECT_EQ("wakelockName", listener1->updates[0].mKey.getValues()[2].mValue.str_value);
-    EXPECT_EQ(WakelockStateChanged::ACQUIRE, listener1->updates[0].mState);
-
-    // Check StateTracker was updated by querying for state.
-    HashableDimensionKey queryKey;
-    getPartialWakelockKey(1001 /* uid */, "wakelockName", &queryKey);
-    EXPECT_EQ(WakelockStateChanged::ACQUIRE,
-              getStateInt(mgr, util::WAKELOCK_STATE_CHANGED, queryKey));
-
-    // No state stored for this query key.
-    HashableDimensionKey queryKey2;
-    getPartialWakelockKey(1002 /* uid */, "tag1", &queryKey2);
-    EXPECT_EQ(-1 /*StateTracker::kStateUnknown*/,
-              getStateInt(mgr, util::WAKELOCK_STATE_CHANGED, queryKey2));
-
-    // Partial query fails.
-    HashableDimensionKey queryKey3;
-    getPartialWakelockKey(1001 /* uid */, &queryKey3);
-    EXPECT_EQ(-1 /*StateTracker::kStateUnknown*/,
-              getStateInt(mgr, util::WAKELOCK_STATE_CHANGED, queryKey3));
-}
-
-/**
- * Test StateManager's onLogEvent and StateListener's onStateChanged correctly
- * updates listener for states with multiple primary keys.
- */
-TEST(StateTrackerTest, TestStateChangeMultiplePrimaryFields) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    StateManager mgr;
-    mgr.registerListener(util::OVERLAY_STATE_CHANGED, listener1);
-
-    // log event
-    std::unique_ptr<LogEvent> event = CreateOverlayStateChangedEvent(
-            timestampNs, 1000 /* uid */, "package1", true /*using_alert_window*/,
-            OverlayStateChanged::ENTERED);
-    mgr.onLogEvent(*event);
-
-    // check listener was updated
-    ASSERT_EQ(1, listener1->updates.size());
-    EXPECT_EQ(1000, listener1->updates[0].mKey.getValues()[0].mValue.int_value);
-    EXPECT_EQ(1, listener1->updates[0].mState);
-
-    // check StateTracker was updated by querying for state
-    HashableDimensionKey queryKey;
-    getOverlayKey(1000 /* uid */, "package1", &queryKey);
-    EXPECT_EQ(OverlayStateChanged::ENTERED,
-              getStateInt(mgr, util::OVERLAY_STATE_CHANGED, queryKey));
-}
-
-/**
- * Test StateManager's onLogEvent and StateListener's onStateChanged
- * when there is an error extracting state from log event. Listener is not
- * updated of state change.
- */
-TEST(StateTrackerTest, TestStateChangeEventError) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    StateManager mgr;
-    mgr.registerListener(util::OVERLAY_STATE_CHANGED, listener1);
-
-    // log event
-    std::shared_ptr<LogEvent> event1 =
-            buildIncorrectOverlayEvent(1000 /* uid */, "package1", 1 /* state */);
-    std::shared_ptr<LogEvent> event2 = buildOverlayEventBadStateType(1001 /* uid */, "package2");
-
-    // check listener was updated
-    mgr.onLogEvent(*event1);
-    ASSERT_EQ(0, listener1->updates.size());
-    mgr.onLogEvent(*event2);
-    ASSERT_EQ(0, listener1->updates.size());
-}
-
-TEST(StateTrackerTest, TestStateQuery) {
-    sp<TestStateListener> listener1 = new TestStateListener();
-    sp<TestStateListener> listener2 = new TestStateListener();
-    sp<TestStateListener> listener3 = new TestStateListener();
-    sp<TestStateListener> listener4 = new TestStateListener();
-    StateManager mgr;
-    mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1);
-    mgr.registerListener(util::UID_PROCESS_STATE_CHANGED, listener2);
-    mgr.registerListener(util::OVERLAY_STATE_CHANGED, listener3);
-    mgr.registerListener(util::WAKELOCK_STATE_CHANGED, listener4);
-
-    std::unique_ptr<LogEvent> event1 = CreateUidProcessStateChangedEvent(
-            timestampNs, 1000 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_TOP);  //  state value: 1002
-    std::unique_ptr<LogEvent> event2 = CreateUidProcessStateChangedEvent(
-            timestampNs + 1000, 1001 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_FOREGROUND_SERVICE);  //  state value:
-                                                                                //  1003
-    std::unique_ptr<LogEvent> event3 = CreateUidProcessStateChangedEvent(
-            timestampNs + 2000, 1002 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_PERSISTENT);  //  state value: 1000
-    std::unique_ptr<LogEvent> event4 = CreateUidProcessStateChangedEvent(
-            timestampNs + 3000, 1001 /*uid*/,
-            android::app::ProcessStateEnum::PROCESS_STATE_TOP);  //  state value: 1002
-    std::unique_ptr<LogEvent> event5 = CreateScreenStateChangedEvent(
-            timestampNs + 4000, android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    std::unique_ptr<LogEvent> event6 = CreateOverlayStateChangedEvent(
-            timestampNs + 5000, 1000 /*uid*/, "package1", true /*using_alert_window*/,
-            OverlayStateChanged::ENTERED);
-    std::unique_ptr<LogEvent> event7 = CreateOverlayStateChangedEvent(
-            timestampNs + 6000, 1000 /*uid*/, "package2", true /*using_alert_window*/,
-            OverlayStateChanged::EXITED);
-
-    std::vector<int> attributionUids = {1005};
-    std::vector<string> attributionTags = {"tag"};
-
-    std::unique_ptr<LogEvent> event8 = CreateAcquireWakelockEvent(
-            timestampNs + 7000, attributionUids, attributionTags, "wakelock1");
-    std::unique_ptr<LogEvent> event9 = CreateReleaseWakelockEvent(
-            timestampNs + 8000, attributionUids, attributionTags, "wakelock2");
-
-    mgr.onLogEvent(*event1);
-    mgr.onLogEvent(*event2);
-    mgr.onLogEvent(*event3);
-    mgr.onLogEvent(*event5);
-    mgr.onLogEvent(*event5);
-    mgr.onLogEvent(*event6);
-    mgr.onLogEvent(*event7);
-    mgr.onLogEvent(*event8);
-    mgr.onLogEvent(*event9);
-
-    // Query for UidProcessState of uid 1001
-    HashableDimensionKey queryKey1;
-    getUidProcessKey(1001, &queryKey1);
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_FOREGROUND_SERVICE,
-              getStateInt(mgr, util::UID_PROCESS_STATE_CHANGED, queryKey1));
-
-    // Query for UidProcessState of uid 1004 - not in state map
-    HashableDimensionKey queryKey2;
-    getUidProcessKey(1004, &queryKey2);
-    EXPECT_EQ(-1, getStateInt(mgr, util::UID_PROCESS_STATE_CHANGED,
-                              queryKey2));  // default state
-
-    // Query for UidProcessState of uid 1001 - after change in state
-    mgr.onLogEvent(*event4);
-    EXPECT_EQ(android::app::ProcessStateEnum::PROCESS_STATE_TOP,
-              getStateInt(mgr, util::UID_PROCESS_STATE_CHANGED, queryKey1));
-
-    // Query for ScreenState
-    EXPECT_EQ(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
-              getStateInt(mgr, util::SCREEN_STATE_CHANGED, DEFAULT_DIMENSION_KEY));
-
-    // Query for OverlayState of uid 1000, package name "package2"
-    HashableDimensionKey queryKey3;
-    getOverlayKey(1000, "package2", &queryKey3);
-    EXPECT_EQ(OverlayStateChanged::EXITED,
-              getStateInt(mgr, util::OVERLAY_STATE_CHANGED, queryKey3));
-
-    // Query for WakelockState of uid 1005, tag 2
-    HashableDimensionKey queryKey4;
-    getPartialWakelockKey(1005, "wakelock2", &queryKey4);
-    EXPECT_EQ(WakelockStateChanged::RELEASE,
-              getStateInt(mgr, util::WAKELOCK_STATE_CHANGED, queryKey4));
-
-    // Query for WakelockState of uid 1005, tag 1
-    HashableDimensionKey queryKey5;
-    getPartialWakelockKey(1005, "wakelock1", &queryKey5);
-    EXPECT_EQ(WakelockStateChanged::ACQUIRE,
-              getStateInt(mgr, util::WAKELOCK_STATE_CHANGED, queryKey5));
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/statsd_test_util.cpp b/cmds/statsd/tests/statsd_test_util.cpp
deleted file mode 100644
index cee8372..0000000
--- a/cmds/statsd/tests/statsd_test_util.cpp
+++ /dev/null
@@ -1,1393 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "statsd_test_util.h"
-
-#include <aidl/android/util/StatsEventParcel.h>
-#include "stats_event.h"
-
-using aidl::android::util::StatsEventParcel;
-using std::shared_ptr;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-StatsLogReport outputStreamToProto(ProtoOutputStream* proto) {
-    vector<uint8_t> bytes;
-    bytes.resize(proto->size());
-    size_t pos = 0;
-    sp<ProtoReader> reader = proto->data();
-
-    while (reader->readBuffer() != NULL) {
-        size_t toRead = reader->currentToRead();
-        std::memcpy(&((bytes)[pos]), reader->readBuffer(), toRead);
-        pos += toRead;
-        reader->move(toRead);
-    }
-
-    StatsLogReport report;
-    report.ParseFromArray(bytes.data(), bytes.size());
-    return report;
-}
-
-AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(atomId);
-    return atom_matcher;
-}
-
-AtomMatcher CreateTemperatureAtomMatcher() {
-    return CreateSimpleAtomMatcher("TemperatureMatcher", util::TEMPERATURE);
-}
-
-AtomMatcher CreateScheduledJobStateChangedAtomMatcher(const string& name,
-                                                      ScheduledJobStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::SCHEDULED_JOB_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(3);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateStartScheduledJobAtomMatcher() {
-    return CreateScheduledJobStateChangedAtomMatcher("ScheduledJobStart",
-                                                     ScheduledJobStateChanged::STARTED);
-}
-
-AtomMatcher CreateFinishScheduledJobAtomMatcher() {
-    return CreateScheduledJobStateChangedAtomMatcher("ScheduledJobFinish",
-                                                     ScheduledJobStateChanged::FINISHED);
-}
-
-AtomMatcher CreateScreenBrightnessChangedAtomMatcher() {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId("ScreenBrightnessChanged"));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::SCREEN_BRIGHTNESS_CHANGED);
-    return atom_matcher;
-}
-
-AtomMatcher CreateUidProcessStateChangedAtomMatcher() {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId("UidProcessStateChanged"));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::UID_PROCESS_STATE_CHANGED);
-    return atom_matcher;
-}
-
-AtomMatcher CreateWakelockStateChangedAtomMatcher(const string& name,
-                                                  WakelockStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::WAKELOCK_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(4);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateAcquireWakelockAtomMatcher() {
-    return CreateWakelockStateChangedAtomMatcher("AcquireWakelock", WakelockStateChanged::ACQUIRE);
-}
-
-AtomMatcher CreateReleaseWakelockAtomMatcher() {
-    return CreateWakelockStateChangedAtomMatcher("ReleaseWakelock", WakelockStateChanged::RELEASE);
-}
-
-AtomMatcher CreateBatterySaverModeStateChangedAtomMatcher(
-    const string& name, BatterySaverModeStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::BATTERY_SAVER_MODE_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(1);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateBatterySaverModeStartAtomMatcher() {
-    return CreateBatterySaverModeStateChangedAtomMatcher(
-        "BatterySaverModeStart", BatterySaverModeStateChanged::ON);
-}
-
-
-AtomMatcher CreateBatterySaverModeStopAtomMatcher() {
-    return CreateBatterySaverModeStateChangedAtomMatcher(
-        "BatterySaverModeStop", BatterySaverModeStateChanged::OFF);
-}
-
-AtomMatcher CreateBatteryStateChangedAtomMatcher(const string& name,
-                                                 BatteryPluggedStateEnum state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::PLUGGED_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(1);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateBatteryStateNoneMatcher() {
-    return CreateBatteryStateChangedAtomMatcher("BatteryPluggedNone",
-                                                BatteryPluggedStateEnum::BATTERY_PLUGGED_NONE);
-}
-
-AtomMatcher CreateBatteryStateUsbMatcher() {
-    return CreateBatteryStateChangedAtomMatcher("BatteryPluggedUsb",
-                                                BatteryPluggedStateEnum::BATTERY_PLUGGED_USB);
-}
-
-AtomMatcher CreateScreenStateChangedAtomMatcher(
-    const string& name, android::view::DisplayStateEnum state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::SCREEN_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(1);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateScreenTurnedOnAtomMatcher() {
-    return CreateScreenStateChangedAtomMatcher("ScreenTurnedOn",
-            android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-}
-
-AtomMatcher CreateScreenTurnedOffAtomMatcher() {
-    return CreateScreenStateChangedAtomMatcher("ScreenTurnedOff",
-            ::android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-}
-
-AtomMatcher CreateSyncStateChangedAtomMatcher(
-    const string& name, SyncStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::SYNC_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(3);  // State field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateSyncStartAtomMatcher() {
-    return CreateSyncStateChangedAtomMatcher("SyncStart", SyncStateChanged::ON);
-}
-
-AtomMatcher CreateSyncEndAtomMatcher() {
-    return CreateSyncStateChangedAtomMatcher("SyncEnd", SyncStateChanged::OFF);
-}
-
-AtomMatcher CreateActivityForegroundStateChangedAtomMatcher(
-    const string& name, ActivityForegroundStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::ACTIVITY_FOREGROUND_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(4);  // Activity field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateMoveToBackgroundAtomMatcher() {
-    return CreateActivityForegroundStateChangedAtomMatcher(
-        "Background", ActivityForegroundStateChanged::BACKGROUND);
-}
-
-AtomMatcher CreateMoveToForegroundAtomMatcher() {
-    return CreateActivityForegroundStateChangedAtomMatcher(
-        "Foreground", ActivityForegroundStateChanged::FOREGROUND);
-}
-
-AtomMatcher CreateProcessLifeCycleStateChangedAtomMatcher(
-    const string& name, ProcessLifeCycleStateChanged::State state) {
-    AtomMatcher atom_matcher;
-    atom_matcher.set_id(StringToId(name));
-    auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
-    simple_atom_matcher->set_atom_id(util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    auto field_value_matcher = simple_atom_matcher->add_field_value_matcher();
-    field_value_matcher->set_field(3);  // Process state field.
-    field_value_matcher->set_eq_int(state);
-    return atom_matcher;
-}
-
-AtomMatcher CreateProcessCrashAtomMatcher() {
-    return CreateProcessLifeCycleStateChangedAtomMatcher(
-        "Crashed", ProcessLifeCycleStateChanged::CRASHED);
-}
-
-Predicate CreateScheduledJobPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("ScheduledJobRunningPredicate"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("ScheduledJobStart"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("ScheduledJobFinish"));
-    return predicate;
-}
-
-Predicate CreateBatterySaverModePredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("BatterySaverIsOn"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("BatterySaverModeStart"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("BatterySaverModeStop"));
-    return predicate;
-}
-
-Predicate CreateDeviceUnpluggedPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("DeviceUnplugged"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("BatteryPluggedNone"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("BatteryPluggedUsb"));
-    return predicate;
-}
-
-Predicate CreateScreenIsOnPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("ScreenIsOn"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("ScreenTurnedOn"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("ScreenTurnedOff"));
-    return predicate;
-}
-
-Predicate CreateScreenIsOffPredicate() {
-    Predicate predicate;
-    predicate.set_id(1111123);
-    predicate.mutable_simple_predicate()->set_start(StringToId("ScreenTurnedOff"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("ScreenTurnedOn"));
-    return predicate;
-}
-
-Predicate CreateHoldingWakelockPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("HoldingWakelock"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("AcquireWakelock"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("ReleaseWakelock"));
-    return predicate;
-}
-
-Predicate CreateIsSyncingPredicate() {
-    Predicate predicate;
-    predicate.set_id(33333333333333);
-    predicate.mutable_simple_predicate()->set_start(StringToId("SyncStart"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("SyncEnd"));
-    return predicate;
-}
-
-Predicate CreateIsInBackgroundPredicate() {
-    Predicate predicate;
-    predicate.set_id(StringToId("IsInBackground"));
-    predicate.mutable_simple_predicate()->set_start(StringToId("Background"));
-    predicate.mutable_simple_predicate()->set_stop(StringToId("Foreground"));
-    return predicate;
-}
-
-State CreateScreenState() {
-    State state;
-    state.set_id(StringToId("ScreenState"));
-    state.set_atom_id(util::SCREEN_STATE_CHANGED);
-    return state;
-}
-
-State CreateUidProcessState() {
-    State state;
-    state.set_id(StringToId("UidProcessState"));
-    state.set_atom_id(util::UID_PROCESS_STATE_CHANGED);
-    return state;
-}
-
-State CreateOverlayState() {
-    State state;
-    state.set_id(StringToId("OverlayState"));
-    state.set_atom_id(util::OVERLAY_STATE_CHANGED);
-    return state;
-}
-
-State CreateScreenStateWithOnOffMap(int64_t screenOnId, int64_t screenOffId) {
-    State state;
-    state.set_id(StringToId("ScreenStateOnOff"));
-    state.set_atom_id(util::SCREEN_STATE_CHANGED);
-
-    auto map = CreateScreenStateOnOffMap(screenOnId, screenOffId);
-    *state.mutable_map() = map;
-
-    return state;
-}
-
-State CreateScreenStateWithSimpleOnOffMap(int64_t screenOnId, int64_t screenOffId) {
-    State state;
-    state.set_id(StringToId("ScreenStateSimpleOnOff"));
-    state.set_atom_id(util::SCREEN_STATE_CHANGED);
-
-    auto map = CreateScreenStateSimpleOnOffMap(screenOnId, screenOffId);
-    *state.mutable_map() = map;
-
-    return state;
-}
-
-StateMap_StateGroup CreateScreenStateOnGroup(int64_t screenOnId) {
-    StateMap_StateGroup group;
-    group.set_group_id(screenOnId);
-    group.add_value(android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    group.add_value(android::view::DisplayStateEnum::DISPLAY_STATE_VR);
-    group.add_value(android::view::DisplayStateEnum::DISPLAY_STATE_ON_SUSPEND);
-    return group;
-}
-
-StateMap_StateGroup CreateScreenStateOffGroup(int64_t screenOffId) {
-    StateMap_StateGroup group;
-    group.set_group_id(screenOffId);
-    group.add_value(android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    group.add_value(android::view::DisplayStateEnum::DISPLAY_STATE_DOZE);
-    group.add_value(android::view::DisplayStateEnum::DISPLAY_STATE_DOZE_SUSPEND);
-    return group;
-}
-
-StateMap_StateGroup CreateScreenStateSimpleOnGroup(int64_t screenOnId) {
-    StateMap_StateGroup group;
-    group.set_group_id(screenOnId);
-    group.add_value(android::view::DisplayStateEnum::DISPLAY_STATE_ON);
-    return group;
-}
-
-StateMap_StateGroup CreateScreenStateSimpleOffGroup(int64_t screenOffId) {
-    StateMap_StateGroup group;
-    group.set_group_id(screenOffId);
-    group.add_value(android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
-    return group;
-}
-
-StateMap CreateScreenStateOnOffMap(int64_t screenOnId, int64_t screenOffId) {
-    StateMap map;
-    *map.add_group() = CreateScreenStateOnGroup(screenOnId);
-    *map.add_group() = CreateScreenStateOffGroup(screenOffId);
-    return map;
-}
-
-StateMap CreateScreenStateSimpleOnOffMap(int64_t screenOnId, int64_t screenOffId) {
-    StateMap map;
-    *map.add_group() = CreateScreenStateSimpleOnGroup(screenOnId);
-    *map.add_group() = CreateScreenStateSimpleOffGroup(screenOffId);
-    return map;
-}
-
-void addPredicateToPredicateCombination(const Predicate& predicate,
-                                        Predicate* combinationPredicate) {
-    combinationPredicate->mutable_combination()->add_predicate(predicate.id());
-}
-
-FieldMatcher CreateAttributionUidDimensions(const int atomId,
-                                            const std::vector<Position>& positions) {
-    FieldMatcher dimensions;
-    dimensions.set_field(atomId);
-    for (const auto position : positions) {
-        auto child = dimensions.add_child();
-        child->set_field(1);
-        child->set_position(position);
-        child->add_child()->set_field(1);
-    }
-    return dimensions;
-}
-
-FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId,
-                                                 const std::vector<Position>& positions) {
-    FieldMatcher dimensions;
-    dimensions.set_field(atomId);
-    for (const auto position : positions) {
-        auto child = dimensions.add_child();
-        child->set_field(1);
-        child->set_position(position);
-        child->add_child()->set_field(1);
-        child->add_child()->set_field(2);
-    }
-    return dimensions;
-}
-
-FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields) {
-    FieldMatcher dimensions;
-    dimensions.set_field(atomId);
-    for (const int field : fields) {
-        dimensions.add_child()->set_field(field);
-    }
-    return dimensions;
-}
-
-FieldMatcher CreateAttributionUidAndOtherDimensions(const int atomId,
-                                                    const std::vector<Position>& positions,
-                                                    const std::vector<int>& fields) {
-    FieldMatcher dimensions = CreateAttributionUidDimensions(atomId, positions);
-
-    for (const int field : fields) {
-        dimensions.add_child()->set_field(field);
-    }
-    return dimensions;
-}
-
-// START: get primary key functions
-void getUidProcessKey(int uid, HashableDimensionKey* key) {
-    int pos1[] = {1, 0, 0};
-    Field field1(27 /* atom id */, pos1, 0 /* depth */);
-    Value value1((int32_t)uid);
-
-    key->addValue(FieldValue(field1, value1));
-}
-
-void getOverlayKey(int uid, string packageName, HashableDimensionKey* key) {
-    int pos1[] = {1, 0, 0};
-    int pos2[] = {2, 0, 0};
-
-    Field field1(59 /* atom id */, pos1, 0 /* depth */);
-    Field field2(59 /* atom id */, pos2, 0 /* depth */);
-
-    Value value1((int32_t)uid);
-    Value value2(packageName);
-
-    key->addValue(FieldValue(field1, value1));
-    key->addValue(FieldValue(field2, value2));
-}
-
-void getPartialWakelockKey(int uid, const std::string& tag, HashableDimensionKey* key) {
-    int pos1[] = {1, 1, 1};
-    int pos3[] = {2, 0, 0};
-    int pos4[] = {3, 0, 0};
-
-    Field field1(10 /* atom id */, pos1, 2 /* depth */);
-
-    Field field3(10 /* atom id */, pos3, 0 /* depth */);
-    Field field4(10 /* atom id */, pos4, 0 /* depth */);
-
-    Value value1((int32_t)uid);
-    Value value3((int32_t)1 /*partial*/);
-    Value value4(tag);
-
-    key->addValue(FieldValue(field1, value1));
-    key->addValue(FieldValue(field3, value3));
-    key->addValue(FieldValue(field4, value4));
-}
-
-void getPartialWakelockKey(int uid, HashableDimensionKey* key) {
-    int pos1[] = {1, 1, 1};
-    int pos3[] = {2, 0, 0};
-
-    Field field1(10 /* atom id */, pos1, 2 /* depth */);
-    Field field3(10 /* atom id */, pos3, 0 /* depth */);
-
-    Value value1((int32_t)uid);
-    Value value3((int32_t)1 /*partial*/);
-
-    key->addValue(FieldValue(field1, value1));
-    key->addValue(FieldValue(field3, value3));
-}
-// END: get primary key functions
-
-void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids,
-                      const vector<string>& attributionTags) {
-    vector<const char*> cTags(attributionTags.size());
-    for (int i = 0; i < cTags.size(); i++) {
-        cTags[i] = attributionTags[i].c_str();
-    }
-
-    AStatsEvent_writeAttributionChain(statsEvent,
-                                      reinterpret_cast<const uint32_t*>(attributionUids.data()),
-                                      cTags.data(), attributionUids.size());
-}
-
-void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent) {
-    AStatsEvent_build(statsEvent);
-
-    size_t size;
-    uint8_t* buf = AStatsEvent_getBuffer(statsEvent, &size);
-    logEvent->parseBuffer(buf, size);
-
-    AStatsEvent_release(statsEvent);
-}
-
-void CreateTwoValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs, int32_t value1,
-                            int32_t value2) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs);
-
-    AStatsEvent_writeInt32(statsEvent, value1);
-    AStatsEvent_writeInt32(statsEvent, value2);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-shared_ptr<LogEvent> CreateTwoValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value1,
-                                            int32_t value2) {
-    shared_ptr<LogEvent> logEvent = std::make_shared<LogEvent>(/*uid=*/0, /*pid=*/0);
-    CreateTwoValueLogEvent(logEvent.get(), atomId, eventTimeNs, value1, value2);
-    return logEvent;
-}
-
-void CreateThreeValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs, int32_t value1,
-                              int32_t value2, int32_t value3) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs);
-
-    AStatsEvent_writeInt32(statsEvent, value1);
-    AStatsEvent_writeInt32(statsEvent, value2);
-    AStatsEvent_writeInt32(statsEvent, value3);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-shared_ptr<LogEvent> CreateThreeValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value1,
-                                              int32_t value2, int32_t value3) {
-    shared_ptr<LogEvent> logEvent = std::make_shared<LogEvent>(/*uid=*/0, /*pid=*/0);
-    CreateThreeValueLogEvent(logEvent.get(), atomId, eventTimeNs, value1, value2, value3);
-    return logEvent;
-}
-
-void CreateRepeatedValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs,
-                                 int32_t value) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs);
-
-    AStatsEvent_writeInt32(statsEvent, value);
-    AStatsEvent_writeInt32(statsEvent, value);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-shared_ptr<LogEvent> CreateRepeatedValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value) {
-    shared_ptr<LogEvent> logEvent = std::make_shared<LogEvent>(/*uid=*/0, /*pid=*/0);
-    CreateRepeatedValueLogEvent(logEvent.get(), atomId, eventTimeNs, value);
-    return logEvent;
-}
-
-void CreateNoValuesLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs);
-
-    parseStatsEventToLogEvent(statsEvent, logEvent);
-}
-
-shared_ptr<LogEvent> CreateNoValuesLogEvent(int atomId, int64_t eventTimeNs) {
-    shared_ptr<LogEvent> logEvent = std::make_shared<LogEvent>(/*uid=*/0, /*pid=*/0);
-    CreateNoValuesLogEvent(logEvent.get(), atomId, eventTimeNs);
-    return logEvent;
-}
-
-shared_ptr<LogEvent> makeUidLogEvent(int atomId, int64_t eventTimeNs, int uid, int data1,
-                                     int data2) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_addBoolAnnotation(statsEvent, ANNOTATION_ID_IS_UID, true);
-    AStatsEvent_writeInt32(statsEvent, data1);
-    AStatsEvent_writeInt32(statsEvent, data2);
-
-    shared_ptr<LogEvent> logEvent = std::make_shared<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-shared_ptr<LogEvent> makeAttributionLogEvent(int atomId, int64_t eventTimeNs,
-                                             const vector<int>& uids, const vector<string>& tags,
-                                             int data1, int data2) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, atomId);
-    AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs);
-
-    writeAttribution(statsEvent, uids, tags);
-    AStatsEvent_writeInt32(statsEvent, data1);
-    AStatsEvent_writeInt32(statsEvent, data2);
-
-    shared_ptr<LogEvent> logEvent = std::make_shared<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-sp<MockUidMap> makeMockUidMapForOneHost(int hostUid, const vector<int>& isolatedUids) {
-    sp<MockUidMap> uidMap = new NaggyMock<MockUidMap>();
-    EXPECT_CALL(*uidMap, getHostUidOrSelf(_)).WillRepeatedly(ReturnArg<0>());
-    for (const int isolatedUid : isolatedUids) {
-        EXPECT_CALL(*uidMap, getHostUidOrSelf(isolatedUid)).WillRepeatedly(Return(hostUid));
-    }
-
-    return uidMap;
-}
-
-sp<MockUidMap> makeMockUidMapForPackage(const string& pkg, const set<int32_t>& uids) {
-    sp<MockUidMap> uidMap = new StrictMock<MockUidMap>();
-    EXPECT_CALL(*uidMap, getAppUid(_)).Times(AnyNumber());
-    EXPECT_CALL(*uidMap, getAppUid(pkg)).WillRepeatedly(Return(uids));
-
-    return uidMap;
-}
-
-std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(uint64_t timestampNs,
-                                                        const android::view::DisplayStateEnum state,
-                                                        int loggerUid) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::SCREEN_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-    AStatsEvent_writeInt32(statsEvent, state);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_EXCLUSIVE_STATE, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_STATE_NESTED, false);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(loggerUid, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateBatterySaverOnEvent(uint64_t timestampNs) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::BATTERY_SAVER_MODE_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-    AStatsEvent_writeInt32(statsEvent, BatterySaverModeStateChanged::ON);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_EXCLUSIVE_STATE, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_STATE_NESTED, false);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateBatterySaverOffEvent(uint64_t timestampNs) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::BATTERY_SAVER_MODE_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-    AStatsEvent_writeInt32(statsEvent, BatterySaverModeStateChanged::OFF);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_EXCLUSIVE_STATE, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_STATE_NESTED, false);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateBatteryStateChangedEvent(const uint64_t timestampNs, const BatteryPluggedStateEnum state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::PLUGGED_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateScreenBrightnessChangedEvent(uint64_t timestampNs, int level) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::SCREEN_BRIGHTNESS_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-    AStatsEvent_writeInt32(statsEvent, level);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateScheduledJobStateChangedEvent(
-        const vector<int>& attributionUids, const vector<string>& attributionTags,
-        const string& jobName, const ScheduledJobStateChanged::State state, uint64_t timestampNs) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::SCHEDULED_JOB_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_writeString(statsEvent, jobName.c_str());
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateStartScheduledJobEvent(uint64_t timestampNs,
-                                                       const vector<int>& attributionUids,
-                                                       const vector<string>& attributionTags,
-                                                       const string& jobName) {
-    return CreateScheduledJobStateChangedEvent(attributionUids, attributionTags, jobName,
-                                               ScheduledJobStateChanged::STARTED, timestampNs);
-}
-
-// Create log event when scheduled job finishes.
-std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent(uint64_t timestampNs,
-                                                        const vector<int>& attributionUids,
-                                                        const vector<string>& attributionTags,
-                                                        const string& jobName) {
-    return CreateScheduledJobStateChangedEvent(attributionUids, attributionTags, jobName,
-                                               ScheduledJobStateChanged::FINISHED, timestampNs);
-}
-
-std::unique_ptr<LogEvent> CreateWakelockStateChangedEvent(uint64_t timestampNs,
-                                                          const vector<int>& attributionUids,
-                                                          const vector<string>& attributionTags,
-                                                          const string& wakelockName,
-                                                          const WakelockStateChanged::State state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::WAKELOCK_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID, true);
-    AStatsEvent_writeInt32(statsEvent, android::os::WakeLockLevelEnum::PARTIAL_WAKE_LOCK);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD, true);
-    AStatsEvent_writeString(statsEvent, wakelockName.c_str());
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD, true);
-    AStatsEvent_writeInt32(statsEvent, state);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_EXCLUSIVE_STATE, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_STATE_NESTED, true);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateAcquireWakelockEvent(uint64_t timestampNs,
-                                                     const vector<int>& attributionUids,
-                                                     const vector<string>& attributionTags,
-                                                     const string& wakelockName) {
-    return CreateWakelockStateChangedEvent(timestampNs, attributionUids, attributionTags,
-                                           wakelockName, WakelockStateChanged::ACQUIRE);
-}
-
-std::unique_ptr<LogEvent> CreateReleaseWakelockEvent(uint64_t timestampNs,
-                                                     const vector<int>& attributionUids,
-                                                     const vector<string>& attributionTags,
-                                                     const string& wakelockName) {
-    return CreateWakelockStateChangedEvent(timestampNs, attributionUids, attributionTags,
-                                           wakelockName, WakelockStateChanged::RELEASE);
-}
-
-std::unique_ptr<LogEvent> CreateActivityForegroundStateChangedEvent(
-        uint64_t timestampNs, const int uid, const ActivityForegroundStateChanged::State state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::ACTIVITY_FOREGROUND_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_writeString(statsEvent, "pkg_name");
-    AStatsEvent_writeString(statsEvent, "class_name");
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateMoveToBackgroundEvent(uint64_t timestampNs, const int uid) {
-    return CreateActivityForegroundStateChangedEvent(timestampNs, uid,
-                                                     ActivityForegroundStateChanged::BACKGROUND);
-}
-
-std::unique_ptr<LogEvent> CreateMoveToForegroundEvent(uint64_t timestampNs, const int uid) {
-    return CreateActivityForegroundStateChangedEvent(timestampNs, uid,
-                                                     ActivityForegroundStateChanged::FOREGROUND);
-}
-
-std::unique_ptr<LogEvent> CreateSyncStateChangedEvent(uint64_t timestampNs,
-                                                      const vector<int>& attributionUids,
-                                                      const vector<string>& attributionTags,
-                                                      const string& name,
-                                                      const SyncStateChanged::State state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::SYNC_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_writeString(statsEvent, name.c_str());
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateSyncStartEvent(uint64_t timestampNs,
-                                               const vector<int>& attributionUids,
-                                               const vector<string>& attributionTags,
-                                               const string& name) {
-    return CreateSyncStateChangedEvent(timestampNs, attributionUids, attributionTags, name,
-                                       SyncStateChanged::ON);
-}
-
-std::unique_ptr<LogEvent> CreateSyncEndEvent(uint64_t timestampNs,
-                                             const vector<int>& attributionUids,
-                                             const vector<string>& attributionTags,
-                                             const string& name) {
-    return CreateSyncStateChangedEvent(timestampNs, attributionUids, attributionTags, name,
-                                       SyncStateChanged::OFF);
-}
-
-std::unique_ptr<LogEvent> CreateProcessLifeCycleStateChangedEvent(
-        uint64_t timestampNs, const int uid, const ProcessLifeCycleStateChanged::State state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::PROCESS_LIFE_CYCLE_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_writeString(statsEvent, "");
-    AStatsEvent_writeInt32(statsEvent, state);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateAppCrashEvent(uint64_t timestampNs, const int uid) {
-    return CreateProcessLifeCycleStateChangedEvent(timestampNs, uid,
-                                                   ProcessLifeCycleStateChanged::CRASHED);
-}
-
-std::unique_ptr<LogEvent> CreateAppCrashOccurredEvent(uint64_t timestampNs, const int uid) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::APP_CRASH_OCCURRED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_writeString(statsEvent, "eventType");
-    AStatsEvent_writeString(statsEvent, "processName");
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateIsolatedUidChangedEvent(uint64_t timestampNs, int hostUid,
-                                                        int isolatedUid, bool is_create) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::ISOLATED_UID_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    AStatsEvent_writeInt32(statsEvent, hostUid);
-    AStatsEvent_writeInt32(statsEvent, isolatedUid);
-    AStatsEvent_writeInt32(statsEvent, is_create);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateUidProcessStateChangedEvent(
-        uint64_t timestampNs, int uid, const android::app::ProcessStateEnum state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::UID_PROCESS_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_IS_UID, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD, true);
-    AStatsEvent_writeInt32(statsEvent, state);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_EXCLUSIVE_STATE, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_STATE_NESTED, false);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateBleScanStateChangedEvent(uint64_t timestampNs,
-                                                         const vector<int>& attributionUids,
-                                                         const vector<string>& attributionTags,
-                                                         const BleScanStateChanged::State state,
-                                                         const bool filtered, const bool firstMatch,
-                                                         const bool opportunistic) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::BLE_SCAN_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    writeAttribution(statsEvent, attributionUids, attributionTags);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID, true);
-    AStatsEvent_writeInt32(statsEvent, state);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_EXCLUSIVE_STATE, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_STATE_NESTED, true);
-    if (state == util::BLE_SCAN_STATE_CHANGED__STATE__RESET) {
-        AStatsEvent_addInt32Annotation(statsEvent, ANNOTATION_ID_TRIGGER_STATE_RESET,
-                                       util::BLE_SCAN_STATE_CHANGED__STATE__OFF);
-    }
-    AStatsEvent_writeBool(statsEvent, filtered);  // filtered
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD, true);
-    AStatsEvent_writeBool(statsEvent, firstMatch);  // first match
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD, true);
-    AStatsEvent_writeBool(statsEvent, opportunistic);  // opportunistic
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD, true);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-std::unique_ptr<LogEvent> CreateOverlayStateChangedEvent(int64_t timestampNs, const int32_t uid,
-                                                         const string& packageName,
-                                                         const bool usingAlertWindow,
-                                                         const OverlayStateChanged::State state) {
-    AStatsEvent* statsEvent = AStatsEvent_obtain();
-    AStatsEvent_setAtomId(statsEvent, util::OVERLAY_STATE_CHANGED);
-    AStatsEvent_overwriteTimestamp(statsEvent, timestampNs);
-
-    AStatsEvent_writeInt32(statsEvent, uid);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_IS_UID, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD, true);
-    AStatsEvent_writeString(statsEvent, packageName.c_str());
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_PRIMARY_FIELD, true);
-    AStatsEvent_writeBool(statsEvent, usingAlertWindow);
-    AStatsEvent_writeInt32(statsEvent, state);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_EXCLUSIVE_STATE, true);
-    AStatsEvent_addBoolAnnotation(statsEvent, util::ANNOTATION_ID_STATE_NESTED, false);
-
-    std::unique_ptr<LogEvent> logEvent = std::make_unique<LogEvent>(/*uid=*/0, /*pid=*/0);
-    parseStatsEventToLogEvent(statsEvent, logEvent.get());
-    return logEvent;
-}
-
-sp<StatsLogProcessor> CreateStatsLogProcessor(const int64_t timeBaseNs, const int64_t currentTimeNs,
-                                              const StatsdConfig& config, const ConfigKey& key,
-                                              const shared_ptr<IPullAtomCallback>& puller,
-                                              const int32_t atomTag, const sp<UidMap> uidMap) {
-    sp<StatsPullerManager> pullerManager = new StatsPullerManager();
-    if (puller != nullptr) {
-        pullerManager->RegisterPullAtomCallback(/*uid=*/0, atomTag, NS_PER_SEC, NS_PER_SEC * 10, {},
-                                                puller);
-    }
-    sp<AlarmMonitor> anomalyAlarmMonitor =
-        new AlarmMonitor(1,
-                         [](const shared_ptr<IStatsCompanionService>&, int64_t){},
-                         [](const shared_ptr<IStatsCompanionService>&){});
-    sp<AlarmMonitor> periodicAlarmMonitor =
-        new AlarmMonitor(1,
-                         [](const shared_ptr<IStatsCompanionService>&, int64_t){},
-                         [](const shared_ptr<IStatsCompanionService>&){});
-    sp<StatsLogProcessor> processor =
-            new StatsLogProcessor(uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor,
-                                  timeBaseNs, [](const ConfigKey&) { return true; },
-                                  [](const int&, const vector<int64_t>&) {return true;});
-    processor->OnConfigUpdated(currentTimeNs, key, config);
-    return processor;
-}
-
-void sortLogEventsByTimestamp(std::vector<std::unique_ptr<LogEvent>> *events) {
-  std::sort(events->begin(), events->end(),
-            [](const std::unique_ptr<LogEvent>& a, const std::unique_ptr<LogEvent>& b) {
-              return a->GetElapsedTimestampNs() < b->GetElapsedTimestampNs();
-            });
-}
-
-int64_t StringToId(const string& str) {
-    return static_cast<int64_t>(std::hash<std::string>()(str));
-}
-
-void ValidateWakelockAttributionUidAndTagDimension(const DimensionsValue& value, const int atomId,
-                                                   const int uid, const string& tag) {
-    EXPECT_EQ(value.field(), atomId);
-    ASSERT_EQ(value.value_tuple().dimensions_value_size(), 2);
-    // Attribution field.
-    EXPECT_EQ(value.value_tuple().dimensions_value(0).field(), 1);
-    // Uid field.
-    ASSERT_EQ(value.value_tuple().dimensions_value(0).value_tuple().dimensions_value_size(), 1);
-    EXPECT_EQ(value.value_tuple().dimensions_value(0).value_tuple().dimensions_value(0).field(), 1);
-    EXPECT_EQ(value.value_tuple().dimensions_value(0).value_tuple().dimensions_value(0).value_int(),
-              uid);
-    // Tag field.
-    EXPECT_EQ(value.value_tuple().dimensions_value(1).field(), 3);
-    EXPECT_EQ(value.value_tuple().dimensions_value(1).value_str(), tag);
-}
-
-void ValidateAttributionUidDimension(const DimensionsValue& value, int atomId, int uid) {
-    EXPECT_EQ(value.field(), atomId);
-    ASSERT_EQ(value.value_tuple().dimensions_value_size(), 1);
-    // Attribution field.
-    EXPECT_EQ(value.value_tuple().dimensions_value(0).field(), 1);
-    // Uid only.
-    EXPECT_EQ(value.value_tuple().dimensions_value(0)
-        .value_tuple().dimensions_value_size(), 1);
-    EXPECT_EQ(value.value_tuple().dimensions_value(0)
-        .value_tuple().dimensions_value(0).field(), 1);
-    EXPECT_EQ(value.value_tuple().dimensions_value(0)
-        .value_tuple().dimensions_value(0).value_int(), uid);
-}
-
-void ValidateUidDimension(const DimensionsValue& value, int node_idx, int atomId, int uid) {
-    EXPECT_EQ(value.field(), atomId);
-    ASSERT_GT(value.value_tuple().dimensions_value_size(), node_idx);
-    // Attribution field.
-    EXPECT_EQ(value.value_tuple().dimensions_value(node_idx).field(), 1);
-    EXPECT_EQ(value.value_tuple().dimensions_value(node_idx)
-        .value_tuple().dimensions_value(0).field(), 1);
-    EXPECT_EQ(value.value_tuple().dimensions_value(node_idx)
-        .value_tuple().dimensions_value(0).value_int(), uid);
-}
-
-void ValidateAttributionUidAndTagDimension(
-    const DimensionsValue& value, int node_idx, int atomId, int uid, const std::string& tag) {
-    EXPECT_EQ(value.field(), atomId);
-    ASSERT_GT(value.value_tuple().dimensions_value_size(), node_idx);
-    // Attribution field.
-    EXPECT_EQ(1, value.value_tuple().dimensions_value(node_idx).field());
-    // Uid only.
-    EXPECT_EQ(2, value.value_tuple().dimensions_value(node_idx)
-        .value_tuple().dimensions_value_size());
-    EXPECT_EQ(1, value.value_tuple().dimensions_value(node_idx)
-        .value_tuple().dimensions_value(0).field());
-    EXPECT_EQ(uid, value.value_tuple().dimensions_value(node_idx)
-        .value_tuple().dimensions_value(0).value_int());
-    EXPECT_EQ(2, value.value_tuple().dimensions_value(node_idx)
-        .value_tuple().dimensions_value(1).field());
-    EXPECT_EQ(tag, value.value_tuple().dimensions_value(node_idx)
-        .value_tuple().dimensions_value(1).value_str());
-}
-
-void ValidateAttributionUidAndTagDimension(
-    const DimensionsValue& value, int atomId, int uid, const std::string& tag) {
-    EXPECT_EQ(value.field(), atomId);
-    ASSERT_EQ(1, value.value_tuple().dimensions_value_size());
-    // Attribution field.
-    EXPECT_EQ(1, value.value_tuple().dimensions_value(0).field());
-    // Uid only.
-    EXPECT_EQ(value.value_tuple().dimensions_value(0)
-        .value_tuple().dimensions_value_size(), 2);
-    EXPECT_EQ(value.value_tuple().dimensions_value(0)
-        .value_tuple().dimensions_value(0).field(), 1);
-    EXPECT_EQ(value.value_tuple().dimensions_value(0)
-        .value_tuple().dimensions_value(0).value_int(), uid);
-    EXPECT_EQ(value.value_tuple().dimensions_value(0)
-        .value_tuple().dimensions_value(1).field(), 2);
-    EXPECT_EQ(value.value_tuple().dimensions_value(0)
-        .value_tuple().dimensions_value(1).value_str(), tag);
-}
-
-bool EqualsTo(const DimensionsValue& s1, const DimensionsValue& s2) {
-    if (s1.field() != s2.field()) {
-        return false;
-    }
-    if (s1.value_case() != s2.value_case()) {
-        return false;
-    }
-    switch (s1.value_case()) {
-        case DimensionsValue::ValueCase::kValueStr:
-            return (s1.value_str() == s2.value_str());
-        case DimensionsValue::ValueCase::kValueInt:
-            return s1.value_int() == s2.value_int();
-        case DimensionsValue::ValueCase::kValueLong:
-            return s1.value_long() == s2.value_long();
-        case DimensionsValue::ValueCase::kValueBool:
-            return s1.value_bool() == s2.value_bool();
-        case DimensionsValue::ValueCase::kValueFloat:
-            return s1.value_float() == s2.value_float();
-        case DimensionsValue::ValueCase::kValueTuple: {
-            if (s1.value_tuple().dimensions_value_size() !=
-                s2.value_tuple().dimensions_value_size()) {
-                return false;
-            }
-            bool allMatched = true;
-            for (int i = 0; allMatched && i < s1.value_tuple().dimensions_value_size(); ++i) {
-                allMatched &= EqualsTo(s1.value_tuple().dimensions_value(i),
-                                       s2.value_tuple().dimensions_value(i));
-            }
-            return allMatched;
-        }
-        case DimensionsValue::ValueCase::VALUE_NOT_SET:
-        default:
-            return true;
-    }
-}
-
-bool LessThan(const google::protobuf::RepeatedPtrField<StateValue>& s1,
-              const google::protobuf::RepeatedPtrField<StateValue>& s2) {
-    if (s1.size() != s2.size()) {
-        return s1.size() < s2.size();
-    }
-    for (int i = 0; i < s1.size(); i++) {
-        const StateValue& state1 = s1[i];
-        const StateValue& state2 = s2[i];
-        if (state1.atom_id() != state2.atom_id()) {
-            return state1.atom_id() < state2.atom_id();
-        }
-        if (state1.value() != state2.value()) {
-            return state1.value() < state2.value();
-        }
-        if (state1.group_id() != state2.group_id()) {
-            return state1.group_id() < state2.group_id();
-        }
-    }
-    return false;
-}
-
-bool LessThan(const DimensionsValue& s1, const DimensionsValue& s2) {
-    if (s1.field() != s2.field()) {
-        return s1.field() < s2.field();
-    }
-    if (s1.value_case() != s2.value_case()) {
-        return s1.value_case() < s2.value_case();
-    }
-    switch (s1.value_case()) {
-        case DimensionsValue::ValueCase::kValueStr:
-            return s1.value_str() < s2.value_str();
-        case DimensionsValue::ValueCase::kValueInt:
-            return s1.value_int() < s2.value_int();
-        case DimensionsValue::ValueCase::kValueLong:
-            return s1.value_long() < s2.value_long();
-        case DimensionsValue::ValueCase::kValueBool:
-            return (int)s1.value_bool() < (int)s2.value_bool();
-        case DimensionsValue::ValueCase::kValueFloat:
-            return s1.value_float() < s2.value_float();
-        case DimensionsValue::ValueCase::kValueTuple: {
-            if (s1.value_tuple().dimensions_value_size() !=
-                s2.value_tuple().dimensions_value_size()) {
-                return s1.value_tuple().dimensions_value_size() <
-                       s2.value_tuple().dimensions_value_size();
-            }
-            for (int i = 0; i < s1.value_tuple().dimensions_value_size(); ++i) {
-                if (EqualsTo(s1.value_tuple().dimensions_value(i),
-                             s2.value_tuple().dimensions_value(i))) {
-                    continue;
-                } else {
-                    return LessThan(s1.value_tuple().dimensions_value(i),
-                                    s2.value_tuple().dimensions_value(i));
-                }
-            }
-            return false;
-        }
-        case DimensionsValue::ValueCase::VALUE_NOT_SET:
-        default:
-            return false;
-    }
-}
-
-bool LessThan(const DimensionsPair& s1, const DimensionsPair& s2) {
-    if (LessThan(s1.dimInWhat, s2.dimInWhat)) {
-        return true;
-    } else if (LessThan(s2.dimInWhat, s1.dimInWhat)) {
-        return false;
-    }
-
-    return LessThan(s1.stateValues, s2.stateValues);
-}
-
-void backfillStringInDimension(const std::map<uint64_t, string>& str_map,
-                               DimensionsValue* dimension) {
-    if (dimension->has_value_str_hash()) {
-        auto it = str_map.find((uint64_t)(dimension->value_str_hash()));
-        if (it != str_map.end()) {
-            dimension->clear_value_str_hash();
-            dimension->set_value_str(it->second);
-        } else {
-            ALOGE("Can not find the string hash: %llu",
-                (unsigned long long)dimension->value_str_hash());
-        }
-    } else if (dimension->has_value_tuple()) {
-        auto value_tuple = dimension->mutable_value_tuple();
-        for (int i = 0; i < value_tuple->dimensions_value_size(); ++i) {
-            backfillStringInDimension(str_map, value_tuple->mutable_dimensions_value(i));
-        }
-    }
-}
-
-void backfillStringInReport(ConfigMetricsReport *config_report) {
-    std::map<uint64_t, string> str_map;
-    for (const auto& str : config_report->strings()) {
-        uint64_t hash = Hash64(str);
-        if (str_map.find(hash) != str_map.end()) {
-            ALOGE("String hash conflicts: %s %s", str.c_str(), str_map[hash].c_str());
-        }
-        str_map[hash] = str;
-    }
-    for (int i = 0; i < config_report->metrics_size(); ++i) {
-        auto metric_report = config_report->mutable_metrics(i);
-        if (metric_report->has_count_metrics()) {
-            backfillStringInDimension(str_map, metric_report->mutable_count_metrics());
-        } else if (metric_report->has_duration_metrics()) {
-            backfillStringInDimension(str_map, metric_report->mutable_duration_metrics());
-        } else if (metric_report->has_gauge_metrics()) {
-            backfillStringInDimension(str_map, metric_report->mutable_gauge_metrics());
-        } else if (metric_report->has_value_metrics()) {
-            backfillStringInDimension(str_map, metric_report->mutable_value_metrics());
-        }
-    }
-    // Backfill the package names.
-    for (int i = 0 ; i < config_report->uid_map().snapshots_size(); ++i) {
-        auto snapshot = config_report->mutable_uid_map()->mutable_snapshots(i);
-        for (int j = 0 ; j < snapshot->package_info_size(); ++j) {
-            auto package_info = snapshot->mutable_package_info(j);
-            if (package_info->has_name_hash()) {
-                auto it = str_map.find((uint64_t)(package_info->name_hash()));
-                if (it != str_map.end()) {
-                    package_info->clear_name_hash();
-                    package_info->set_name(it->second);
-                } else {
-                    ALOGE("Can not find the string package name hash: %llu",
-                        (unsigned long long)package_info->name_hash());
-                }
-
-            }
-        }
-    }
-    // Backfill the app name in app changes.
-    for (int i = 0 ; i < config_report->uid_map().changes_size(); ++i) {
-        auto change = config_report->mutable_uid_map()->mutable_changes(i);
-        if (change->has_app_hash()) {
-            auto it = str_map.find((uint64_t)(change->app_hash()));
-            if (it != str_map.end()) {
-                change->clear_app_hash();
-                change->set_app(it->second);
-            } else {
-                ALOGE("Can not find the string change app name hash: %llu",
-                    (unsigned long long)change->app_hash());
-            }
-        }
-    }
-}
-
-void backfillStringInReport(ConfigMetricsReportList *config_report_list) {
-    for (int i = 0; i < config_report_list->reports_size(); ++i) {
-        backfillStringInReport(config_report_list->mutable_reports(i));
-    }
-}
-
-bool backfillDimensionPath(const DimensionsValue& path,
-                           const google::protobuf::RepeatedPtrField<DimensionsValue>& leafValues,
-                           int* leafIndex,
-                           DimensionsValue* dimension) {
-    dimension->set_field(path.field());
-    if (path.has_value_tuple()) {
-        for (int i = 0; i < path.value_tuple().dimensions_value_size(); ++i) {
-            if (!backfillDimensionPath(
-                path.value_tuple().dimensions_value(i), leafValues, leafIndex,
-                dimension->mutable_value_tuple()->add_dimensions_value())) {
-                return false;
-            }
-        }
-    } else {
-        if (*leafIndex < 0 || *leafIndex >= leafValues.size()) {
-            return false;
-        }
-        dimension->MergeFrom(leafValues.Get(*leafIndex));
-        (*leafIndex)++;
-    }
-    return true;
-}
-
-bool backfillDimensionPath(const DimensionsValue& path,
-                           const google::protobuf::RepeatedPtrField<DimensionsValue>& leafValues,
-                           DimensionsValue* dimension) {
-    int leafIndex = 0;
-    return backfillDimensionPath(path, leafValues, &leafIndex, dimension);
-}
-
-void backfillDimensionPath(ConfigMetricsReportList *config_report_list) {
-    for (int i = 0; i < config_report_list->reports_size(); ++i) {
-        auto report = config_report_list->mutable_reports(i);
-        for (int j = 0; j < report->metrics_size(); ++j) {
-            auto metric_report = report->mutable_metrics(j);
-            if (metric_report->has_dimensions_path_in_what() ||
-                metric_report->has_dimensions_path_in_condition()) {
-                auto whatPath = metric_report->dimensions_path_in_what();
-                auto conditionPath = metric_report->dimensions_path_in_condition();
-                if (metric_report->has_count_metrics()) {
-                    backfillDimensionPath(whatPath, conditionPath,
-                                          metric_report->mutable_count_metrics());
-                } else if (metric_report->has_duration_metrics()) {
-                    backfillDimensionPath(whatPath, conditionPath,
-                                          metric_report->mutable_duration_metrics());
-                } else if (metric_report->has_gauge_metrics()) {
-                    backfillDimensionPath(whatPath, conditionPath,
-                                          metric_report->mutable_gauge_metrics());
-                } else if (metric_report->has_value_metrics()) {
-                    backfillDimensionPath(whatPath, conditionPath,
-                                          metric_report->mutable_value_metrics());
-                }
-                metric_report->clear_dimensions_path_in_what();
-                metric_report->clear_dimensions_path_in_condition();
-            }
-        }
-    }
-}
-
-void backfillStartEndTimestamp(StatsLogReport *report) {
-    const int64_t timeBaseNs = report->time_base_elapsed_nano_seconds();
-    const int64_t bucketSizeNs = report->bucket_size_nano_seconds();
-    if (report->has_count_metrics()) {
-        backfillStartEndTimestampForMetrics(
-            timeBaseNs, bucketSizeNs, report->mutable_count_metrics());
-    } else if (report->has_duration_metrics()) {
-        backfillStartEndTimestampForMetrics(
-            timeBaseNs, bucketSizeNs, report->mutable_duration_metrics());
-    } else if (report->has_gauge_metrics()) {
-        backfillStartEndTimestampForMetrics(
-            timeBaseNs, bucketSizeNs, report->mutable_gauge_metrics());
-        if (report->gauge_metrics().skipped_size() > 0) {
-            backfillStartEndTimestampForSkippedBuckets(
-                timeBaseNs, report->mutable_gauge_metrics());
-        }
-    } else if (report->has_value_metrics()) {
-        backfillStartEndTimestampForMetrics(
-            timeBaseNs, bucketSizeNs, report->mutable_value_metrics());
-        if (report->value_metrics().skipped_size() > 0) {
-            backfillStartEndTimestampForSkippedBuckets(
-                timeBaseNs, report->mutable_value_metrics());
-        }
-    }
-}
-
-void backfillStartEndTimestamp(ConfigMetricsReport *config_report) {
-    for (int j = 0; j < config_report->metrics_size(); ++j) {
-        backfillStartEndTimestamp(config_report->mutable_metrics(j));
-    }
-}
-
-void backfillStartEndTimestamp(ConfigMetricsReportList *config_report_list) {
-    for (int i = 0; i < config_report_list->reports_size(); ++i) {
-        backfillStartEndTimestamp(config_report_list->mutable_reports(i));
-    }
-}
-
-Status FakeSubsystemSleepCallback::onPullAtom(int atomTag,
-        const shared_ptr<IPullAtomResultReceiver>& resultReceiver) {
-    // Convert stats_events into StatsEventParcels.
-    std::vector<StatsEventParcel> parcels;
-    for (int i = 1; i < 3; i++) {
-        AStatsEvent* event = AStatsEvent_obtain();
-        AStatsEvent_setAtomId(event, atomTag);
-        std::string subsystemName = "subsystem_name_";
-        subsystemName = subsystemName + std::to_string(i);
-        AStatsEvent_writeString(event, subsystemName.c_str());
-        AStatsEvent_writeString(event, "subsystem_subname foo");
-        AStatsEvent_writeInt64(event, /*count= */ i);
-        AStatsEvent_writeInt64(event, /*time_millis= */ i * 100);
-        AStatsEvent_build(event);
-        size_t size;
-        uint8_t* buffer = AStatsEvent_getBuffer(event, &size);
-
-        StatsEventParcel p;
-        // vector.assign() creates a copy, but this is inevitable unless
-        // stats_event.h/c uses a vector as opposed to a buffer.
-        p.buffer.assign(buffer, buffer + size);
-        parcels.push_back(std::move(p));
-        AStatsEvent_release(event);
-    }
-    resultReceiver->pullFinished(atomTag, /*success=*/true, parcels);
-    return Status::ok();
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/statsd_test_util.h b/cmds/statsd/tests/statsd_test_util.h
deleted file mode 100644
index 3dcf4ec..0000000
--- a/cmds/statsd/tests/statsd_test_util.h
+++ /dev/null
@@ -1,479 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#pragma once
-
-#include <aidl/android/os/BnPullAtomCallback.h>
-#include <aidl/android/os/IPullAtomCallback.h>
-#include <aidl/android/os/IPullAtomResultReceiver.h>
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include "frameworks/base/cmds/statsd/src/stats_log.pb.h"
-#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
-#include "src/StatsLogProcessor.h"
-#include "src/hash.h"
-#include "src/logd/LogEvent.h"
-#include "src/packages/UidMap.h"
-#include "src/stats_log_util.h"
-#include "stats_event.h"
-#include "statslog_statsdtest.h"
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using namespace testing;
-using ::aidl::android::os::BnPullAtomCallback;
-using ::aidl::android::os::IPullAtomCallback;
-using ::aidl::android::os::IPullAtomResultReceiver;
-using android::util::ProtoReader;
-using google::protobuf::RepeatedPtrField;
-using Status = ::ndk::ScopedAStatus;
-
-const int SCREEN_STATE_ATOM_ID = util::SCREEN_STATE_CHANGED;
-const int UID_PROCESS_STATE_ATOM_ID = util::UID_PROCESS_STATE_CHANGED;
-
-enum BucketSplitEvent { APP_UPGRADE, BOOT_COMPLETE };
-
-class MockUidMap : public UidMap {
-public:
-    MOCK_METHOD(int, getHostUidOrSelf, (int uid), (const));
-    MOCK_METHOD(std::set<int32_t>, getAppUid, (const string& package), (const));
-};
-
-// Converts a ProtoOutputStream to a StatsLogReport proto.
-StatsLogReport outputStreamToProto(ProtoOutputStream* proto);
-
-// Create AtomMatcher proto to simply match a specific atom type.
-AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId);
-
-// Create AtomMatcher proto for temperature atom.
-AtomMatcher CreateTemperatureAtomMatcher();
-
-// Create AtomMatcher proto for scheduled job state changed.
-AtomMatcher CreateScheduledJobStateChangedAtomMatcher();
-
-// Create AtomMatcher proto for starting a scheduled job.
-AtomMatcher CreateStartScheduledJobAtomMatcher();
-
-// Create AtomMatcher proto for a scheduled job is done.
-AtomMatcher CreateFinishScheduledJobAtomMatcher();
-
-// Create AtomMatcher proto for screen brightness state changed.
-AtomMatcher CreateScreenBrightnessChangedAtomMatcher();
-
-// Create AtomMatcher proto for starting battery save mode.
-AtomMatcher CreateBatterySaverModeStartAtomMatcher();
-
-// Create AtomMatcher proto for stopping battery save mode.
-AtomMatcher CreateBatterySaverModeStopAtomMatcher();
-
-// Create AtomMatcher proto for battery state none mode.
-AtomMatcher CreateBatteryStateNoneMatcher();
-
-// Create AtomMatcher proto for battery state usb mode.
-AtomMatcher CreateBatteryStateUsbMatcher();
-
-// Create AtomMatcher proto for process state changed.
-AtomMatcher CreateUidProcessStateChangedAtomMatcher();
-
-// Create AtomMatcher proto for acquiring wakelock.
-AtomMatcher CreateAcquireWakelockAtomMatcher();
-
-// Create AtomMatcher proto for releasing wakelock.
-AtomMatcher CreateReleaseWakelockAtomMatcher() ;
-
-// Create AtomMatcher proto for screen turned on.
-AtomMatcher CreateScreenTurnedOnAtomMatcher();
-
-// Create AtomMatcher proto for screen turned off.
-AtomMatcher CreateScreenTurnedOffAtomMatcher();
-
-// Create AtomMatcher proto for app sync turned on.
-AtomMatcher CreateSyncStartAtomMatcher();
-
-// Create AtomMatcher proto for app sync turned off.
-AtomMatcher CreateSyncEndAtomMatcher();
-
-// Create AtomMatcher proto for app sync moves to background.
-AtomMatcher CreateMoveToBackgroundAtomMatcher();
-
-// Create AtomMatcher proto for app sync moves to foreground.
-AtomMatcher CreateMoveToForegroundAtomMatcher();
-
-// Create AtomMatcher proto for process crashes
-AtomMatcher CreateProcessCrashAtomMatcher() ;
-
-// Create Predicate proto for screen is on.
-Predicate CreateScreenIsOnPredicate();
-
-// Create Predicate proto for screen is off.
-Predicate CreateScreenIsOffPredicate();
-
-// Create Predicate proto for a running scheduled job.
-Predicate CreateScheduledJobPredicate();
-
-// Create Predicate proto for battery saver mode.
-Predicate CreateBatterySaverModePredicate();
-
-// Create Predicate proto for device unplogged mode.
-Predicate CreateDeviceUnpluggedPredicate();
-
-// Create Predicate proto for holding wakelock.
-Predicate CreateHoldingWakelockPredicate();
-
-// Create a Predicate proto for app syncing.
-Predicate CreateIsSyncingPredicate();
-
-// Create a Predicate proto for app is in background.
-Predicate CreateIsInBackgroundPredicate();
-
-// Create State proto for screen state atom.
-State CreateScreenState();
-
-// Create State proto for uid process state atom.
-State CreateUidProcessState();
-
-// Create State proto for overlay state atom.
-State CreateOverlayState();
-
-// Create State proto for screen state atom with on/off map.
-State CreateScreenStateWithOnOffMap(int64_t screenOnId, int64_t screenOffId);
-
-// Create State proto for screen state atom with simple on/off map.
-State CreateScreenStateWithSimpleOnOffMap(int64_t screenOnId, int64_t screenOffId);
-
-// Create StateGroup proto for ScreenState ON group
-StateMap_StateGroup CreateScreenStateOnGroup(int64_t screenOnId);
-
-// Create StateGroup proto for ScreenState OFF group
-StateMap_StateGroup CreateScreenStateOffGroup(int64_t screenOffId);
-
-// Create StateGroup proto for simple ScreenState ON group
-StateMap_StateGroup CreateScreenStateSimpleOnGroup(int64_t screenOnId);
-
-// Create StateGroup proto for simple ScreenState OFF group
-StateMap_StateGroup CreateScreenStateSimpleOffGroup(int64_t screenOffId);
-
-// Create StateMap proto for ScreenState ON/OFF map
-StateMap CreateScreenStateOnOffMap(int64_t screenOnId, int64_t screenOffId);
-
-// Create StateMap proto for simple ScreenState ON/OFF map
-StateMap CreateScreenStateSimpleOnOffMap(int64_t screenOnId, int64_t screenOffId);
-
-// Add a predicate to the predicate combination.
-void addPredicateToPredicateCombination(const Predicate& predicate, Predicate* combination);
-
-// Create dimensions from primitive fields.
-FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields);
-
-// Create dimensions by attribution uid and tag.
-FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId,
-                                                  const std::vector<Position>& positions);
-
-// Create dimensions by attribution uid only.
-FieldMatcher CreateAttributionUidDimensions(const int atomId,
-                                            const std::vector<Position>& positions);
-
-FieldMatcher CreateAttributionUidAndOtherDimensions(const int atomId,
-                                                    const std::vector<Position>& positions,
-                                                    const std::vector<int>& fields);
-
-// START: get primary key functions
-// These functions take in atom field information and create FieldValues which are stored in the
-// given HashableDimensionKey.
-void getUidProcessKey(int uid, HashableDimensionKey* key);
-
-void getOverlayKey(int uid, string packageName, HashableDimensionKey* key);
-
-void getPartialWakelockKey(int uid, const std::string& tag, HashableDimensionKey* key);
-
-void getPartialWakelockKey(int uid, HashableDimensionKey* key);
-// END: get primary key functions
-
-void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids,
-                      const vector<string>& attributionTags);
-
-// Builds statsEvent to get buffer that is parsed into logEvent then releases statsEvent.
-void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent);
-
-shared_ptr<LogEvent> CreateTwoValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value1,
-                                            int32_t value2);
-
-void CreateTwoValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs, int32_t value1,
-                            int32_t value2);
-
-shared_ptr<LogEvent> CreateThreeValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value1,
-                                              int32_t value2, int32_t value3);
-
-void CreateThreeValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs, int32_t value1,
-                              int32_t value2, int32_t value3);
-
-// The repeated value log event helpers create a log event with two int fields, both
-// set to the same value. This is useful for testing metrics that are only interested
-// in the value of the second field but still need the first field to be populated.
-std::shared_ptr<LogEvent> CreateRepeatedValueLogEvent(int atomId, int64_t eventTimeNs,
-                                                      int32_t value);
-
-void CreateRepeatedValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs,
-                                 int32_t value);
-
-std::shared_ptr<LogEvent> CreateNoValuesLogEvent(int atomId, int64_t eventTimeNs);
-
-void CreateNoValuesLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs);
-
-std::shared_ptr<LogEvent> makeUidLogEvent(int atomId, int64_t eventTimeNs, int uid, int data1,
-                                          int data2);
-
-std::shared_ptr<LogEvent> makeAttributionLogEvent(int atomId, int64_t eventTimeNs,
-                                                  const vector<int>& uids,
-                                                  const vector<string>& tags, int data1, int data2);
-
-sp<MockUidMap> makeMockUidMapForOneHost(int hostUid, const vector<int>& isolatedUids);
-
-sp<MockUidMap> makeMockUidMapForPackage(const string& pkg, const set<int32_t>& uids);
-
-// Create log event for screen state changed.
-std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(uint64_t timestampNs,
-                                                        const android::view::DisplayStateEnum state,
-                                                        int loggerUid = 0);
-
-// Create log event for screen brightness state changed.
-std::unique_ptr<LogEvent> CreateScreenBrightnessChangedEvent(uint64_t timestampNs, int level);
-
-// Create log event when scheduled job starts.
-std::unique_ptr<LogEvent> CreateStartScheduledJobEvent(uint64_t timestampNs,
-                                                       const vector<int>& attributionUids,
-                                                       const vector<string>& attributionTags,
-                                                       const string& jobName);
-
-// Create log event when scheduled job finishes.
-std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent(uint64_t timestampNs,
-                                                        const vector<int>& attributionUids,
-                                                        const vector<string>& attributionTags,
-                                                        const string& jobName);
-
-// Create log event when battery saver starts.
-std::unique_ptr<LogEvent> CreateBatterySaverOnEvent(uint64_t timestampNs);
-// Create log event when battery saver stops.
-std::unique_ptr<LogEvent> CreateBatterySaverOffEvent(uint64_t timestampNs);
-
-// Create log event when battery state changes.
-std::unique_ptr<LogEvent> CreateBatteryStateChangedEvent(const uint64_t timestampNs, const BatteryPluggedStateEnum state);
-
-// Create log event for app moving to background.
-std::unique_ptr<LogEvent> CreateMoveToBackgroundEvent(uint64_t timestampNs, const int uid);
-
-// Create log event for app moving to foreground.
-std::unique_ptr<LogEvent> CreateMoveToForegroundEvent(uint64_t timestampNs, const int uid);
-
-// Create log event when the app sync starts.
-std::unique_ptr<LogEvent> CreateSyncStartEvent(uint64_t timestampNs, const vector<int>& uids,
-                                               const vector<string>& tags, const string& name);
-
-// Create log event when the app sync ends.
-std::unique_ptr<LogEvent> CreateSyncEndEvent(uint64_t timestampNs, const vector<int>& uids,
-                                             const vector<string>& tags, const string& name);
-
-// Create log event when the app sync ends.
-std::unique_ptr<LogEvent> CreateAppCrashEvent(uint64_t timestampNs, const int uid);
-
-// Create log event for an app crash.
-std::unique_ptr<LogEvent> CreateAppCrashOccurredEvent(uint64_t timestampNs, const int uid);
-
-// Create log event for acquiring wakelock.
-std::unique_ptr<LogEvent> CreateAcquireWakelockEvent(uint64_t timestampNs, const vector<int>& uids,
-                                                     const vector<string>& tags,
-                                                     const string& wakelockName);
-
-// Create log event for releasing wakelock.
-std::unique_ptr<LogEvent> CreateReleaseWakelockEvent(uint64_t timestampNs, const vector<int>& uids,
-                                                     const vector<string>& tags,
-                                                     const string& wakelockName);
-
-// Create log event for releasing wakelock.
-std::unique_ptr<LogEvent> CreateIsolatedUidChangedEvent(uint64_t timestampNs, int hostUid,
-                                                        int isolatedUid, bool is_create);
-
-// Create log event for uid process state change.
-std::unique_ptr<LogEvent> CreateUidProcessStateChangedEvent(
-        uint64_t timestampNs, int uid, const android::app::ProcessStateEnum state);
-
-std::unique_ptr<LogEvent> CreateBleScanStateChangedEvent(uint64_t timestampNs,
-                                                         const vector<int>& attributionUids,
-                                                         const vector<string>& attributionTags,
-                                                         const BleScanStateChanged::State state,
-                                                         const bool filtered, const bool firstMatch,
-                                                         const bool opportunistic);
-
-std::unique_ptr<LogEvent> CreateOverlayStateChangedEvent(int64_t timestampNs, const int32_t uid,
-                                                         const string& packageName,
-                                                         const bool usingAlertWindow,
-                                                         const OverlayStateChanged::State state);
-
-// Create a statsd log event processor upon the start time in seconds, config and key.
-sp<StatsLogProcessor> CreateStatsLogProcessor(const int64_t timeBaseNs, const int64_t currentTimeNs,
-                                              const StatsdConfig& config, const ConfigKey& key,
-                                              const shared_ptr<IPullAtomCallback>& puller = nullptr,
-                                              const int32_t atomTag = 0 /*for puller only*/,
-                                              const sp<UidMap> = new UidMap());
-
-// Util function to sort the log events by timestamp.
-void sortLogEventsByTimestamp(std::vector<std::unique_ptr<LogEvent>> *events);
-
-int64_t StringToId(const string& str);
-
-void ValidateWakelockAttributionUidAndTagDimension(const DimensionsValue& value, const int atomId,
-                                                   const int uid, const string& tag);
-void ValidateUidDimension(const DimensionsValue& value, int node_idx, int atomId, int uid);
-void ValidateAttributionUidDimension(const DimensionsValue& value, int atomId, int uid);
-void ValidateAttributionUidAndTagDimension(
-    const DimensionsValue& value, int atomId, int uid, const std::string& tag);
-void ValidateAttributionUidAndTagDimension(
-    const DimensionsValue& value, int node_idx, int atomId, int uid, const std::string& tag);
-
-struct DimensionsPair {
-    DimensionsPair(DimensionsValue m1, google::protobuf::RepeatedPtrField<StateValue> m2)
-        : dimInWhat(m1), stateValues(m2){};
-
-    DimensionsValue dimInWhat;
-    google::protobuf::RepeatedPtrField<StateValue> stateValues;
-};
-
-bool LessThan(const StateValue& s1, const StateValue& s2);
-bool LessThan(const DimensionsValue& s1, const DimensionsValue& s2);
-bool LessThan(const DimensionsPair& s1, const DimensionsPair& s2);
-
-
-void backfillStartEndTimestamp(ConfigMetricsReport *config_report);
-void backfillStartEndTimestamp(ConfigMetricsReportList *config_report_list);
-
-void backfillStringInReport(ConfigMetricsReportList *config_report_list);
-void backfillStringInDimension(const std::map<uint64_t, string>& str_map,
-                               DimensionsValue* dimension);
-
-template <typename T>
-void backfillStringInDimension(const std::map<uint64_t, string>& str_map,
-                               T* metrics) {
-    for (int i = 0; i < metrics->data_size(); ++i) {
-        auto data = metrics->mutable_data(i);
-        if (data->has_dimensions_in_what()) {
-            backfillStringInDimension(str_map, data->mutable_dimensions_in_what());
-        }
-        if (data->has_dimensions_in_condition()) {
-            backfillStringInDimension(str_map, data->mutable_dimensions_in_condition());
-        }
-    }
-}
-
-void backfillDimensionPath(ConfigMetricsReportList* config_report_list);
-
-bool backfillDimensionPath(const DimensionsValue& path,
-                           const google::protobuf::RepeatedPtrField<DimensionsValue>& leafValues,
-                           DimensionsValue* dimension);
-
-class FakeSubsystemSleepCallback : public BnPullAtomCallback {
-public:
-    Status onPullAtom(int atomTag,
-                      const shared_ptr<IPullAtomResultReceiver>& resultReceiver) override;
-};
-
-template <typename T>
-void backfillDimensionPath(const DimensionsValue& whatPath,
-                           const DimensionsValue& conditionPath,
-                           T* metricData) {
-    for (int i = 0; i < metricData->data_size(); ++i) {
-        auto data = metricData->mutable_data(i);
-        if (data->dimension_leaf_values_in_what_size() > 0) {
-            backfillDimensionPath(whatPath, data->dimension_leaf_values_in_what(),
-                                  data->mutable_dimensions_in_what());
-            data->clear_dimension_leaf_values_in_what();
-        }
-        if (data->dimension_leaf_values_in_condition_size() > 0) {
-            backfillDimensionPath(conditionPath, data->dimension_leaf_values_in_condition(),
-                                  data->mutable_dimensions_in_condition());
-            data->clear_dimension_leaf_values_in_condition();
-        }
-    }
-}
-
-struct DimensionCompare {
-    bool operator()(const DimensionsPair& s1, const DimensionsPair& s2) const {
-        return LessThan(s1, s2);
-    }
-};
-
-template <typename T>
-void sortMetricDataByDimensionsValue(const T& metricData, T* sortedMetricData) {
-    std::map<DimensionsPair, int, DimensionCompare> dimensionIndexMap;
-    for (int i = 0; i < metricData.data_size(); ++i) {
-        dimensionIndexMap.insert(
-                std::make_pair(DimensionsPair(metricData.data(i).dimensions_in_what(),
-                                              metricData.data(i).slice_by_state()),
-                               i));
-    }
-    for (const auto& itr : dimensionIndexMap) {
-        *sortedMetricData->add_data() = metricData.data(itr.second);
-    }
-}
-
-template <typename T>
-void backfillStartEndTimestampForFullBucket(
-    const int64_t timeBaseNs, const int64_t bucketSizeNs, T* bucket) {
-    bucket->set_start_bucket_elapsed_nanos(timeBaseNs + bucketSizeNs * bucket->bucket_num());
-    bucket->set_end_bucket_elapsed_nanos(
-        timeBaseNs + bucketSizeNs * bucket->bucket_num() + bucketSizeNs);
-    bucket->clear_bucket_num();
-}
-
-template <typename T>
-void backfillStartEndTimestampForPartialBucket(const int64_t timeBaseNs, T* bucket) {
-    if (bucket->has_start_bucket_elapsed_millis()) {
-        bucket->set_start_bucket_elapsed_nanos(
-            MillisToNano(bucket->start_bucket_elapsed_millis()));
-        bucket->clear_start_bucket_elapsed_millis();
-    }
-    if (bucket->has_end_bucket_elapsed_millis()) {
-        bucket->set_end_bucket_elapsed_nanos(
-            MillisToNano(bucket->end_bucket_elapsed_millis()));
-        bucket->clear_end_bucket_elapsed_millis();
-    }
-}
-
-template <typename T>
-void backfillStartEndTimestampForMetrics(const int64_t timeBaseNs, const int64_t bucketSizeNs,
-                                         T* metrics) {
-    for (int i = 0; i < metrics->data_size(); ++i) {
-        auto data = metrics->mutable_data(i);
-        for (int j = 0; j < data->bucket_info_size(); ++j) {
-            auto bucket = data->mutable_bucket_info(j);
-            if (bucket->has_bucket_num()) {
-                backfillStartEndTimestampForFullBucket(timeBaseNs, bucketSizeNs, bucket);
-            } else {
-                backfillStartEndTimestampForPartialBucket(timeBaseNs, bucket);
-            }
-        }
-    }
-}
-
-template <typename T>
-void backfillStartEndTimestampForSkippedBuckets(const int64_t timeBaseNs, T* metrics) {
-    for (int i = 0; i < metrics->skipped_size(); ++i) {
-        backfillStartEndTimestampForPartialBucket(timeBaseNs, metrics->mutable_skipped(i));
-    }
-}
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
diff --git a/cmds/statsd/tests/storage/StorageManager_test.cpp b/cmds/statsd/tests/storage/StorageManager_test.cpp
deleted file mode 100644
index 74eafbf..0000000
--- a/cmds/statsd/tests/storage/StorageManager_test.cpp
+++ /dev/null
@@ -1,204 +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.
-
-#include <android-base/unique_fd.h>
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <stdio.h>
-#include "src/storage/StorageManager.h"
-
-#ifdef __ANDROID__
-
-namespace android {
-namespace os {
-namespace statsd {
-
-using namespace testing;
-using std::make_shared;
-using std::shared_ptr;
-using std::vector;
-using testing::Contains;
-
-TEST(StorageManagerTest, TrainInfoReadWriteTest) {
-    InstallTrainInfo trainInfo;
-    trainInfo.trainVersionCode = 12345;
-    trainInfo.trainName = "This is a train name #)$(&&$";
-    trainInfo.status = 1;
-    const char* expIds = "test_ids";
-    trainInfo.experimentIds.assign(expIds, expIds + strlen(expIds));
-
-    bool result;
-
-    result = StorageManager::writeTrainInfo(trainInfo);
-
-    EXPECT_TRUE(result);
-
-    InstallTrainInfo trainInfoResult;
-    result = StorageManager::readTrainInfo(trainInfo.trainName, trainInfoResult);
-    EXPECT_TRUE(result);
-
-    EXPECT_EQ(trainInfo.trainVersionCode, trainInfoResult.trainVersionCode);
-    ASSERT_EQ(trainInfo.trainName.size(), trainInfoResult.trainName.size());
-    EXPECT_EQ(trainInfo.trainName, trainInfoResult.trainName);
-    EXPECT_EQ(trainInfo.status, trainInfoResult.status);
-    ASSERT_EQ(trainInfo.experimentIds.size(), trainInfoResult.experimentIds.size());
-    EXPECT_EQ(trainInfo.experimentIds, trainInfoResult.experimentIds);
-}
-
-TEST(StorageManagerTest, TrainInfoReadWriteTrainNameSizeOneTest) {
-    InstallTrainInfo trainInfo;
-    trainInfo.trainVersionCode = 12345;
-    trainInfo.trainName = "{";
-    trainInfo.status = 1;
-    const char* expIds = "test_ids";
-    trainInfo.experimentIds.assign(expIds, expIds + strlen(expIds));
-
-    bool result;
-
-    result = StorageManager::writeTrainInfo(trainInfo);
-
-    EXPECT_TRUE(result);
-
-    InstallTrainInfo trainInfoResult;
-    result = StorageManager::readTrainInfo(trainInfo.trainName, trainInfoResult);
-    EXPECT_TRUE(result);
-
-    EXPECT_EQ(trainInfo.trainVersionCode, trainInfoResult.trainVersionCode);
-    ASSERT_EQ(trainInfo.trainName.size(), trainInfoResult.trainName.size());
-    EXPECT_EQ(trainInfo.trainName, trainInfoResult.trainName);
-    EXPECT_EQ(trainInfo.status, trainInfoResult.status);
-    ASSERT_EQ(trainInfo.experimentIds.size(), trainInfoResult.experimentIds.size());
-    EXPECT_EQ(trainInfo.experimentIds, trainInfoResult.experimentIds);
-}
-
-TEST(StorageManagerTest, SortFileTest) {
-    vector<StorageManager::FileInfo> list;
-    // assume now sec is 500
-    list.emplace_back("200_5000_123454", false, 20, 300);
-    list.emplace_back("300_2000_123454_history", true, 30, 200);
-    list.emplace_back("400_100009_123454_history", true, 40, 100);
-    list.emplace_back("100_2000_123454", false, 50, 400);
-
-    StorageManager::sortFiles(&list);
-    EXPECT_EQ("200_5000_123454", list[0].mFileName);
-    EXPECT_EQ("100_2000_123454", list[1].mFileName);
-    EXPECT_EQ("400_100009_123454_history", list[2].mFileName);
-    EXPECT_EQ("300_2000_123454_history", list[3].mFileName);
-}
-
-const string testDir = "/data/misc/stats-data/";
-const string file1 = testDir + "2557169347_1066_1";
-const string file2 = testDir + "2557169349_1066_1";
-const string file1_history = file1 + "_history";
-const string file2_history = file2 + "_history";
-
-bool prepareLocalHistoryTestFiles() {
-    android::base::unique_fd fd(TEMP_FAILURE_RETRY(
-            open(file1.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR)));
-    if (fd != -1) {
-        dprintf(fd, "content");
-    } else {
-        return false;
-    }
-
-    android::base::unique_fd fd2(TEMP_FAILURE_RETRY(
-            open(file2.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR)));
-    if (fd2 != -1) {
-        dprintf(fd2, "content");
-    } else {
-        return false;
-    }
-    return true;
-}
-
-void clearLocalHistoryTestFiles() {
-    TEMP_FAILURE_RETRY(remove(file1.c_str()));
-    TEMP_FAILURE_RETRY(remove(file2.c_str()));
-    TEMP_FAILURE_RETRY(remove(file1_history.c_str()));
-    TEMP_FAILURE_RETRY(remove(file2_history.c_str()));
-}
-
-bool fileExist(string name) {
-    android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(name.c_str(), O_RDONLY | O_CLOEXEC)));
-    return fd != -1;
-}
-
-/* The following AppendConfigReportTests test the 4 combinations of [whether erase data] [whether
- * the caller is adb] */
-TEST(StorageManagerTest, AppendConfigReportTest1) {
-    EXPECT_TRUE(prepareLocalHistoryTestFiles());
-
-    ProtoOutputStream out;
-    StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/,
-                                              false /*isAdb?*/);
-
-    EXPECT_FALSE(fileExist(file1));
-    EXPECT_FALSE(fileExist(file2));
-
-    EXPECT_TRUE(fileExist(file1_history));
-    EXPECT_TRUE(fileExist(file2_history));
-    clearLocalHistoryTestFiles();
-}
-
-TEST(StorageManagerTest, AppendConfigReportTest2) {
-    EXPECT_TRUE(prepareLocalHistoryTestFiles());
-
-    ProtoOutputStream out;
-    StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/,
-                                              false /*isAdb?*/);
-
-    EXPECT_FALSE(fileExist(file1));
-    EXPECT_FALSE(fileExist(file2));
-    EXPECT_FALSE(fileExist(file1_history));
-    EXPECT_FALSE(fileExist(file2_history));
-
-    clearLocalHistoryTestFiles();
-}
-
-TEST(StorageManagerTest, AppendConfigReportTest3) {
-    EXPECT_TRUE(prepareLocalHistoryTestFiles());
-
-    ProtoOutputStream out;
-    StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/,
-                                              true /*isAdb?*/);
-
-    EXPECT_TRUE(fileExist(file1));
-    EXPECT_TRUE(fileExist(file2));
-    EXPECT_FALSE(fileExist(file1_history));
-    EXPECT_FALSE(fileExist(file2_history));
-
-    clearLocalHistoryTestFiles();
-}
-
-TEST(StorageManagerTest, AppendConfigReportTest4) {
-    EXPECT_TRUE(prepareLocalHistoryTestFiles());
-
-    ProtoOutputStream out;
-    StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/,
-                                              true /*isAdb?*/);
-
-    EXPECT_FALSE(fileExist(file1));
-    EXPECT_FALSE(fileExist(file2));
-    EXPECT_FALSE(fileExist(file1_history));
-    EXPECT_FALSE(fileExist(file2_history));
-
-    clearLocalHistoryTestFiles();
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tests/utils/MultiConditionTrigger_test.cpp b/cmds/statsd/tests/utils/MultiConditionTrigger_test.cpp
deleted file mode 100644
index 32cecd3..0000000
--- a/cmds/statsd/tests/utils/MultiConditionTrigger_test.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "utils/MultiConditionTrigger.h"
-
-#include <gtest/gtest.h>
-
-#include <chrono>
-#include <set>
-#include <thread>
-#include <vector>
-
-#ifdef __ANDROID__
-
-using namespace std;
-using std::this_thread::sleep_for;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-TEST(MultiConditionTrigger, TestMultipleConditions) {
-    int numConditions = 5;
-    string t1 = "t1", t2 = "t2", t3 = "t3", t4 = "t4", t5 = "t5";
-    set<string> conditionNames = {t1, t2, t3, t4, t5};
-
-    mutex lock;
-    condition_variable cv;
-    bool triggerCalled = false;
-
-    // Mark done as true and notify in the done.
-    MultiConditionTrigger trigger(conditionNames, [&lock, &cv, &triggerCalled] {
-        {
-            lock_guard lg(lock);
-            triggerCalled = true;
-        }
-        cv.notify_all();
-    });
-
-    vector<thread> threads;
-    vector<int> done(numConditions, 0);
-
-    int i = 0;
-    for (const string& conditionName : conditionNames) {
-        threads.emplace_back([&done, &conditionName, &trigger, i] {
-            sleep_for(chrono::milliseconds(3));
-            done[i] = 1;
-            trigger.markComplete(conditionName);
-        });
-        i++;
-    }
-
-    unique_lock<mutex> unique_lk(lock);
-    cv.wait(unique_lk, [&triggerCalled] {
-        return triggerCalled;
-    });
-
-    for (i = 0; i < numConditions; i++) {
-        EXPECT_EQ(done[i], 1);
-    }
-
-    for (i = 0; i < numConditions; i++) {
-        threads[i].join();
-    }
-}
-
-TEST(MultiConditionTrigger, TestNoConditions) {
-    mutex lock;
-    condition_variable cv;
-    bool triggerCalled = false;
-
-    MultiConditionTrigger trigger({}, [&lock, &cv, &triggerCalled] {
-        {
-            lock_guard lg(lock);
-            triggerCalled = true;
-        }
-        cv.notify_all();
-    });
-
-    unique_lock<mutex> unique_lk(lock);
-    cv.wait(unique_lk, [&triggerCalled] { return triggerCalled; });
-    EXPECT_TRUE(triggerCalled);
-    // Ensure that trigger occurs immediately if no events need to be completed.
-}
-
-TEST(MultiConditionTrigger, TestMarkCompleteCalledBySameCondition) {
-    string t1 = "t1", t2 = "t2";
-    set<string> conditionNames = {t1, t2};
-
-    mutex lock;
-    condition_variable cv;
-    bool triggerCalled = false;
-
-    MultiConditionTrigger trigger(conditionNames, [&lock, &cv, &triggerCalled] {
-        {
-            lock_guard lg(lock);
-            triggerCalled = true;
-        }
-        cv.notify_all();
-    });
-
-    trigger.markComplete(t1);
-    trigger.markComplete(t1);
-
-    // Ensure that the trigger still hasn't fired.
-    {
-        lock_guard lg(lock);
-        EXPECT_FALSE(triggerCalled);
-    }
-
-    trigger.markComplete(t2);
-    unique_lock<mutex> unique_lk(lock);
-    cv.wait(unique_lk, [&triggerCalled] { return triggerCalled; });
-    EXPECT_TRUE(triggerCalled);
-}
-
-TEST(MultiConditionTrigger, TestTriggerOnlyCalledOnce) {
-    string t1 = "t1";
-    set<string> conditionNames = {t1};
-
-    mutex lock;
-    condition_variable cv;
-    bool triggerCalled = false;
-    int triggerCount = 0;
-
-    MultiConditionTrigger trigger(conditionNames, [&lock, &cv, &triggerCalled, &triggerCount] {
-        {
-            lock_guard lg(lock);
-            triggerCount++;
-            triggerCalled = true;
-        }
-        cv.notify_all();
-    });
-
-    trigger.markComplete(t1);
-
-    // Ensure that the trigger fired.
-    {
-        unique_lock<mutex> unique_lk(lock);
-        cv.wait(unique_lk, [&triggerCalled] { return triggerCalled; });
-        EXPECT_TRUE(triggerCalled);
-        EXPECT_EQ(triggerCount, 1);
-        triggerCalled = false;
-    }
-
-    trigger.markComplete(t1);
-
-    // Ensure that the trigger does not fire again.
-    {
-        unique_lock<mutex> unique_lk(lock);
-        cv.wait_for(unique_lk, chrono::milliseconds(5), [&triggerCalled] { return triggerCalled; });
-        EXPECT_FALSE(triggerCalled);
-        EXPECT_EQ(triggerCount, 1);
-    }
-}
-
-}  // namespace statsd
-}  // namespace os
-}  // namespace android
-#else
-GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
diff --git a/cmds/statsd/tools/localtools/Android.bp b/cmds/statsd/tools/localtools/Android.bp
deleted file mode 100644
index 69a43a8..0000000
--- a/cmds/statsd/tools/localtools/Android.bp
+++ /dev/null
@@ -1,46 +0,0 @@
-java_binary_host {
-    name: "statsd_localdrive",
-    manifest: "localdrive_manifest.txt",
-    srcs: [
-        "src/com/android/statsd/shelltools/localdrive/*.java",
-        "src/com/android/statsd/shelltools/Utils.java",
-    ],
-    static_libs: [
-        "platformprotos",
-        "guava",
-    ],
-}
-
-java_library_host {
-    name: "statsd_testdrive_lib",
-    srcs: [
-        "src/com/android/statsd/shelltools/testdrive/*.java",
-        "src/com/android/statsd/shelltools/Utils.java",
-    ],
-    static_libs: [
-        "platformprotos",
-        "guava",
-    ],
-}
-
-
-java_binary_host {
-    name: "statsd_testdrive",
-    manifest: "testdrive_manifest.txt",
-    static_libs: [
-        "statsd_testdrive_lib",
-    ],
-}
-
-java_test_host {
-    name: "statsd_testdrive_test",
-    test_suites: ["general-tests"],
-    srcs: ["test/com/android/statsd/shelltools/testdrive/*.java"],
-    static_libs: [
-        "statsd_testdrive_lib",
-        "junit",
-        "platformprotos",
-        "guava",
-    ],
-}
-
diff --git a/cmds/statsd/tools/localtools/TEST_MAPPING b/cmds/statsd/tools/localtools/TEST_MAPPING
deleted file mode 100644
index 7c8a3db..0000000
--- a/cmds/statsd/tools/localtools/TEST_MAPPING
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "presubmit": [
-    {
-      "name": "statsd_testdrive_test",
-      "host": true
-    }
-  ]
-}
diff --git a/cmds/statsd/tools/localtools/localdrive_manifest.txt b/cmds/statsd/tools/localtools/localdrive_manifest.txt
deleted file mode 100644
index 035cea1..0000000
--- a/cmds/statsd/tools/localtools/localdrive_manifest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Main-class: com.android.statsd.shelltools.localdrive.LocalDrive
diff --git a/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/Utils.java b/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/Utils.java
deleted file mode 100644
index 6a74480..0000000
--- a/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/Utils.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.statsd.shelltools;
-
-import com.android.os.StatsLog.ConfigMetricsReportList;
-
-import com.google.common.io.Files;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.ConsoleHandler;
-import java.util.logging.Formatter;
-import java.util.logging.Level;
-import java.util.logging.LogRecord;
-import java.util.logging.Logger;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Utilities for local use of statsd.
- */
-public class Utils {
-
-    public static final String CMD_DUMP_REPORT = "cmd stats dump-report";
-    public static final String CMD_LOG_APP_BREADCRUMB = "cmd stats log-app-breadcrumb";
-    public static final String CMD_REMOVE_CONFIG = "cmd stats config remove";
-    public static final String CMD_UPDATE_CONFIG = "cmd stats config update";
-
-    public static final String SHELL_UID = "2000"; // Use shell, even if rooted.
-
-    /**
-     * Runs adb shell command with output directed to outputFile if non-null.
-     */
-    public static void runCommand(File outputFile, Logger logger, String... commands)
-            throws IOException, InterruptedException {
-        ProcessBuilder pb = new ProcessBuilder(commands);
-        if (outputFile != null && outputFile.exists() && outputFile.canWrite()) {
-            pb.redirectOutput(outputFile);
-        }
-        Process process = pb.start();
-
-        // Capture any errors
-        StringBuilder err = new StringBuilder();
-        BufferedReader br = new BufferedReader(new InputStreamReader(process.getErrorStream()));
-        for (String line = br.readLine(); line != null; line = br.readLine()) {
-            err.append(line).append('\n');
-        }
-        logger.severe(err.toString());
-
-        // Check result
-        if (process.waitFor() == 0) {
-            logger.fine("Adb command successful.");
-        } else {
-            logger.severe("Abnormal adb shell termination for: " + String.join(",", commands));
-            throw new RuntimeException("Error running adb command: " + err.toString());
-        }
-    }
-
-    /**
-     * Dumps the report from the device and converts it to a ConfigMetricsReportList.
-     * Erases the data if clearData is true.
-     * @param configId id of the config
-     * @param clearData whether to erase the report data from statsd after getting the report.
-     * @param useShellUid Pulls data for the {@link SHELL_UID} instead of the caller's uid.
-     * @param logger Logger to log error messages
-     * @return
-     * @throws IOException
-     * @throws InterruptedException
-     */
-    public static ConfigMetricsReportList getReportList(long configId, boolean clearData,
-            boolean useShellUid, Logger logger, String deviceSerial)
-            throws IOException, InterruptedException {
-        try {
-            File outputFile = File.createTempFile("statsdret", ".bin");
-            outputFile.deleteOnExit();
-            runCommand(
-                    outputFile,
-                    logger,
-                    "adb",
-                    "-s",
-                    deviceSerial,
-                    "shell",
-                    CMD_DUMP_REPORT,
-                    useShellUid ? SHELL_UID : "",
-                    String.valueOf(configId),
-                    clearData ? "" : "--keep_data",
-                    "--include_current_bucket",
-                    "--proto");
-            ConfigMetricsReportList reportList =
-                    ConfigMetricsReportList.parseFrom(new FileInputStream(outputFile));
-            return reportList;
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-            logger.severe("Failed to fetch and parse the statsd output report. "
-                            + "Perhaps there is not a valid statsd config for the requested "
-                            + (useShellUid ? ("uid=" + SHELL_UID + ", ") : "")
-                            + "configId=" + configId
-                            + ".");
-            throw (e);
-        }
-    }
-
-    /**
-     * Logs an AppBreadcrumbReported atom.
-     * @param label which label to log for the app breadcrumb atom.
-     * @param state which state to log for the app breadcrumb atom.
-     * @param logger Logger to log error messages
-     *
-     * @throws IOException
-     * @throws InterruptedException
-     */
-    public static void logAppBreadcrumb(int label, int state, Logger logger, String deviceSerial)
-            throws IOException, InterruptedException {
-        runCommand(
-                null,
-                logger,
-                "adb",
-                "-s",
-                deviceSerial,
-                "shell",
-                CMD_LOG_APP_BREADCRUMB,
-                String.valueOf(label),
-                String.valueOf(state));
-    }
-    public static void setUpLogger(Logger logger, boolean debug) {
-        ConsoleHandler handler = new ConsoleHandler();
-        handler.setFormatter(new LocalToolsFormatter());
-        logger.setUseParentHandlers(false);
-        if (debug) {
-            handler.setLevel(Level.ALL);
-            logger.setLevel(Level.ALL);
-        }
-        logger.addHandler(handler);
-    }
-
-    /**
-     * Attempt to determine whether tool will work with this statsd, i.e. whether statsd is
-     * minCodename or higher.
-     * Algorithm: true if (sdk >= minSdk) || (sdk == minSdk-1 && codeName.startsWith(minCodeName))
-     * If all else fails, assume it will work (letting future commands deal with any errors).
-     */
-    public static boolean isAcceptableStatsd(Logger logger, int minSdk, String minCodename,
-            String deviceSerial) {
-        BufferedReader in = null;
-        try {
-            File outFileSdk = File.createTempFile("shelltools_sdk", "tmp");
-            outFileSdk.deleteOnExit();
-            runCommand(outFileSdk, logger,
-                    "adb", "-s", deviceSerial, "shell", "getprop", "ro.build.version.sdk");
-            in = new BufferedReader(new InputStreamReader(new FileInputStream(outFileSdk)));
-            // If NullPointerException/NumberFormatException/etc., just catch and return true.
-            int sdk = Integer.parseInt(in.readLine().trim());
-            if (sdk >= minSdk) {
-                return true;
-            } else if (sdk == minSdk - 1) { // Could be minSdk-1, or could be minSdk development.
-                in.close();
-                File outFileCode = File.createTempFile("shelltools_codename", "tmp");
-                outFileCode.deleteOnExit();
-                runCommand(outFileCode, logger,
-                        "adb", "-s", deviceSerial, "shell", "getprop", "ro.build.version.codename");
-                in = new BufferedReader(new InputStreamReader(new FileInputStream(outFileCode)));
-                return in.readLine().startsWith(minCodename);
-            } else {
-                return false;
-            }
-        } catch (Exception e) {
-            logger.fine("Could not determine whether statsd version is compatibile "
-                    + "with tool: " + e.toString());
-        } finally {
-            try {
-                if (in != null) {
-                    in.close();
-                }
-            } catch (IOException e) {
-                logger.fine("Could not close temporary file: " + e.toString());
-            }
-        }
-        // Could not determine whether statsd is acceptable version.
-        // Just assume it is; if it isn't, we'll just get future errors via adb and deal with them.
-        return true;
-    }
-
-    public static class LocalToolsFormatter extends Formatter {
-        public String format(LogRecord record) {
-            return record.getMessage() + "\n";
-        }
-    }
-
-    /**
-     * Parse the result of "adb devices" to return the list of connected devices.
-     * @param logger Logger to log error messages
-     * @return List of the serial numbers of the connected devices.
-     */
-    public static List<String> getDeviceSerials(Logger logger) {
-        try {
-            ArrayList<String> devices = new ArrayList<>();
-            File outFile = File.createTempFile("device_serial", "tmp");
-            outFile.deleteOnExit();
-            Utils.runCommand(outFile, logger, "adb", "devices");
-            List<String> outputLines = Files.readLines(outFile, Charset.defaultCharset());
-            Pattern regex = Pattern.compile("^(.*)\tdevice$");
-            for (String line : outputLines) {
-                Matcher m = regex.matcher(line);
-                if (m.find()) {
-                    devices.add(m.group(1));
-                }
-            }
-            return devices;
-        } catch (Exception ex) {
-            logger.log(Level.SEVERE, "Failed to list connected devices: " + ex.getMessage());
-        }
-        return null;
-    }
-
-    /**
-     * Returns ANDROID_SERIAL environment variable, or null if that is undefined or unavailable.
-     * @param logger Destination of error messages.
-     * @return String value of ANDROID_SERIAL environment variable, or null.
-     */
-    public static String getDefaultDevice(Logger logger) {
-        try {
-            return System.getenv("ANDROID_SERIAL");
-        } catch (Exception ex) {
-            logger.log(Level.SEVERE, "Failed to check ANDROID_SERIAL environment variable.",
-                    ex);
-        }
-        return null;
-    }
-
-    /**
-     * Returns the device to use if one can be deduced, or null.
-     * @param device Command-line specified device, or null.
-     * @param connectedDevices List of all connected devices.
-     * @param defaultDevice Environment-variable specified device, or null.
-     * @param logger Destination of error messages.
-     * @return Device to use, or null.
-     */
-    public static String chooseDevice(String device, List<String> connectedDevices,
-            String defaultDevice, Logger logger) {
-        if (connectedDevices == null || connectedDevices.isEmpty()) {
-            logger.severe("No connected device.");
-            return null;
-        }
-        if (device != null) {
-            if (connectedDevices.contains(device)) {
-                return device;
-            }
-            logger.severe("Device not connected: " + device);
-            return null;
-        }
-        if (connectedDevices.size() == 1) {
-            return connectedDevices.get(0);
-        }
-        if (defaultDevice != null) {
-            if (connectedDevices.contains(defaultDevice)) {
-                return defaultDevice;
-            } else {
-                logger.severe("ANDROID_SERIAL device is not connected: " + defaultDevice);
-                return null;
-            }
-        }
-        logger.severe("More than one device is connected. Choose one"
-                + " with -s DEVICE_SERIAL or environment variable ANDROID_SERIAL.");
-        return null;
-    }
-}
diff --git a/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/localdrive/LocalDrive.java b/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/localdrive/LocalDrive.java
deleted file mode 100644
index ec3c7df..0000000
--- a/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/localdrive/LocalDrive.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.statsd.shelltools.localdrive;
-
-import com.android.internal.os.StatsdConfigProto.StatsdConfig;
-import com.android.os.StatsLog.ConfigMetricsReport;
-import com.android.os.StatsLog.ConfigMetricsReportList;
-import com.android.statsd.shelltools.Utils;
-
-import com.google.common.io.Files;
-import com.google.protobuf.TextFormat;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * Tool for using statsd locally. Can upload a config and get the data. Handles
- * both binary and human-readable protos.
- * To make: make statsd_localdrive
- * To run: statsd_localdrive     (i.e.  ./out/host/linux-x86/bin/statsd_localdrive)
- */
-public class LocalDrive {
-    private static final boolean DEBUG = false;
-
-    public static final int MIN_SDK = 29;
-    public static final String MIN_CODENAME = "Q";
-
-    public static final long DEFAULT_CONFIG_ID = 56789;
-
-    public static final String BINARY_FLAG = "--binary";
-    public static final String CLEAR_DATA = "--clear";
-    public static final String NO_UID_MAP_FLAG = "--no-uid-map";
-
-    public static final String HELP_STRING =
-        "Usage:\n\n" +
-
-        "statsd_localdrive [-s DEVICE_SERIAL] upload CONFIG_FILE [CONFIG_ID] [--binary]\n" +
-        "  Uploads the given statsd config file (in binary or human-readable-text format).\n" +
-        "  If a config with this id already exists, removes it first.\n" +
-        "    CONFIG_FILE    Location of config file on host.\n" +
-        "    CONFIG_ID      Long ID to associate with this config. If absent, uses "
-                                                                + DEFAULT_CONFIG_ID + ".\n" +
-        "    --binary       Config is in binary format; otherwise, assumed human-readable text.\n" +
-        // Similar to: adb shell cmd stats config update SHELL_UID CONFIG_ID
-        "\n" +
-
-        "statsd_localdrive [-s DEVICE_SERIAL] update CONFIG_FILE [CONFIG_ID] [--binary]\n" +
-        "  Same as upload, but does not remove the old config first (if it already exists).\n" +
-        // Similar to: adb shell cmd stats config update SHELL_UID CONFIG_ID
-        "\n" +
-
-        "statsd_localdrive [-s DEVICE_SERIAL] get-data [CONFIG_ID] [--clear] [--binary] [--no-uid-map]\n" +
-        "  Prints the output statslog data (in binary or human-readable-text format).\n" +
-        "    CONFIG_ID      Long ID of the config. If absent, uses " + DEFAULT_CONFIG_ID + ".\n" +
-        "    --binary       Output should be in binary, instead of default human-readable text.\n" +
-        "                       Binary output can be redirected as usual (e.g. > FILENAME).\n" +
-        "    --no-uid-map   Do not include the uid-map (the very lengthy uid<-->pkgName map).\n" +
-        "    --clear        Erase the data from statsd afterwards. Does not remove the config.\n" +
-        // Similar to: adb shell cmd stats dump-report SHELL_UID CONFIG_ID [--keep_data]
-        //                                                      --include_current_bucket --proto
-        "\n" +
-
-        "statsd_localdrive [-s DEVICE_SERIAL] remove [CONFIG_ID]\n" +
-        "  Removes the config.\n" +
-        "    CONFIG_ID      Long ID of the config. If absent, uses " + DEFAULT_CONFIG_ID + ".\n" +
-        // Equivalent to: adb shell cmd stats config remove SHELL_UID CONFIG_ID
-        "\n" +
-
-        "statsd_localdrive [-s DEVICE_SERIAL] clear [CONFIG_ID]\n" +
-        "  Clears the data associated with the config.\n" +
-        "    CONFIG_ID      Long ID of the config. If absent, uses " + DEFAULT_CONFIG_ID + ".\n" +
-        // Similar to: adb shell cmd stats dump-report SHELL_UID CONFIG_ID
-        //                                                      --include_current_bucket --proto
-        "";
-
-
-    private static final Logger sLogger = Logger.getLogger(LocalDrive.class.getName());
-
-    /** Usage: make statsd_localdrive && statsd_localdrive */
-    public static void main(String[] args) {
-        Utils.setUpLogger(sLogger, DEBUG);
-        if (args.length == 0) {
-            printHelp();
-            return;
-        }
-
-        int remainingArgsLength = args.length;
-        String deviceSerial = null;
-        if (args[0].equals("-s")) {
-            if (args.length == 1) {
-                printHelp();
-            }
-            deviceSerial = args[1];
-            remainingArgsLength -= 2;
-        }
-
-        List<String> connectedDevices = Utils.getDeviceSerials(sLogger);
-        deviceSerial = Utils.chooseDevice(deviceSerial, connectedDevices,
-                Utils.getDefaultDevice(sLogger), sLogger);
-        if (deviceSerial == null) {
-            return;
-        }
-
-        if (!Utils.isAcceptableStatsd(sLogger, MIN_SDK, MIN_CODENAME, deviceSerial)) {
-            sLogger.severe("LocalDrive only works with statsd versions for Android "
-                    + MIN_CODENAME + " or higher.");
-            return;
-        }
-
-        int idx = args.length - remainingArgsLength;
-        if (remainingArgsLength > 0) {
-            switch (args[idx]) {
-                case "clear":
-                    cmdClear(args, idx, deviceSerial);
-                    return;
-                case "get-data":
-                    cmdGetData(args, idx, deviceSerial);
-                    return;
-                case "remove":
-                    cmdRemove(args, idx);
-                    return;
-                case "update":
-                    cmdUpdate(args, idx, deviceSerial);
-                    return;
-                case "upload":
-                    cmdUpload(args, idx, deviceSerial);
-                    return;
-            }
-        }
-        printHelp();
-    }
-
-    private static void printHelp() {
-        sLogger.info(HELP_STRING);
-    }
-
-    // upload CONFIG_FILE [CONFIG_ID] [--binary]
-    private static boolean cmdUpload(String[] args, int idx, String deviceSerial) {
-        return updateConfig(args, idx, true, deviceSerial);
-    }
-
-    // update CONFIG_FILE [CONFIG_ID] [--binary]
-    private static boolean cmdUpdate(String[] args, int idx, String deviceSerial) {
-        return updateConfig(args, idx, false, deviceSerial);
-    }
-
-    private static boolean updateConfig(String[] args, int idx, boolean removeOldConfig,
-            String deviceSerial) {
-        int argCount = args.length - 1 - idx; // Used up one for upload/update.
-
-        // Get CONFIG_FILE
-        if (argCount < 1) {
-            sLogger.severe("No config file provided.");
-            printHelp();
-            return false;
-        }
-        final String origConfigLocation = args[idx + 1];
-        if (!new File(origConfigLocation).exists()) {
-            sLogger.severe("Error - Cannot find the provided config file: " + origConfigLocation);
-            return false;
-        }
-        argCount--;
-
-        // Get --binary
-        boolean binary = contains(args, idx + 2, BINARY_FLAG);
-        if (binary) argCount --;
-
-        // Get CONFIG_ID
-        long configId;
-        try {
-            configId = getConfigId(argCount < 1, args, idx + 2);
-        } catch (NumberFormatException e) {
-            sLogger.severe("Invalid config id provided.");
-            printHelp();
-            return false;
-        }
-        sLogger.fine(String.format("updateConfig with %s %d %b %b",
-                origConfigLocation, configId, binary, removeOldConfig));
-
-        // Remove the old config.
-        if (removeOldConfig) {
-            try {
-                Utils.runCommand(null, sLogger, "adb", "shell", Utils.CMD_REMOVE_CONFIG,
-                        Utils.SHELL_UID, String.valueOf(configId));
-                Utils.getReportList(configId, true /* clearData */, true /* SHELL_UID */, sLogger,
-                        deviceSerial);
-            } catch (InterruptedException | IOException e) {
-                sLogger.severe("Failed to remove config: " + e.getMessage());
-                return false;
-            }
-        }
-
-        // Upload the config.
-        String configLocation;
-        if (binary) {
-            configLocation = origConfigLocation;
-        } else {
-            StatsdConfig.Builder builder = StatsdConfig.newBuilder();
-            try {
-                TextFormat.merge(new FileReader(origConfigLocation), builder);
-            } catch (IOException e) {
-                sLogger.severe("Failed to read config file " + origConfigLocation + ": "
-                        + e.getMessage());
-                return false;
-            }
-
-            try {
-                File tempConfigFile = File.createTempFile("statsdconfig", ".config");
-                tempConfigFile.deleteOnExit();
-                Files.write(builder.build().toByteArray(), tempConfigFile);
-                configLocation = tempConfigFile.getAbsolutePath();
-            } catch (IOException e) {
-                sLogger.severe("Failed to write temp config file: " + e.getMessage());
-                return false;
-            }
-        }
-        String remotePath = "/data/local/tmp/statsdconfig.config";
-        try {
-            Utils.runCommand(null, sLogger, "adb", "push", configLocation, remotePath);
-            Utils.runCommand(null, sLogger, "adb", "shell", "cat", remotePath, "|",
-                    Utils.CMD_UPDATE_CONFIG, Utils.SHELL_UID, String.valueOf(configId));
-        } catch (InterruptedException | IOException e) {
-            sLogger.severe("Failed to update config: " + e.getMessage());
-            return false;
-        }
-        return true;
-    }
-
-    // get-data [CONFIG_ID] [--clear] [--binary] [--no-uid-map]
-    private static boolean cmdGetData(String[] args, int idx, String deviceSerial) {
-        boolean binary = contains(args, idx + 1, BINARY_FLAG);
-        boolean noUidMap = contains(args, idx + 1, NO_UID_MAP_FLAG);
-        boolean clearData = contains(args, idx + 1, CLEAR_DATA);
-
-        // Get CONFIG_ID
-        int argCount = args.length - 1 - idx; // Used up one for get-data.
-        if (binary) argCount--;
-        if (noUidMap) argCount--;
-        if (clearData) argCount--;
-        long configId;
-        try {
-            configId = getConfigId(argCount < 1, args, idx + 1);
-        } catch (NumberFormatException e) {
-            sLogger.severe("Invalid config id provided.");
-            printHelp();
-            return false;
-        }
-        sLogger.fine(String.format("cmdGetData with %d %b %b %b",
-                configId, clearData, binary, noUidMap));
-
-        // Get the StatsLog
-        // Even if the args request no modifications, we still parse it to make sure it's valid.
-        ConfigMetricsReportList reportList;
-        try {
-            reportList = Utils.getReportList(configId, clearData, true /* SHELL_UID */, sLogger,
-                    deviceSerial);
-        } catch (IOException | InterruptedException e) {
-            sLogger.severe("Failed to get report list: " + e.getMessage());
-            return false;
-        }
-        if (noUidMap) {
-            ConfigMetricsReportList.Builder builder
-                    = ConfigMetricsReportList.newBuilder(reportList);
-            // Clear the reports, then add them back without their UidMap.
-            builder.clearReports();
-            for (ConfigMetricsReport report : reportList.getReportsList()) {
-                builder.addReports(ConfigMetricsReport.newBuilder(report).clearUidMap());
-            }
-            reportList = builder.build();
-        }
-
-        if (!binary) {
-            sLogger.info(reportList.toString());
-        } else {
-            try {
-                System.out.write(reportList.toByteArray());
-            } catch (IOException e) {
-                sLogger.severe("Failed to output binary statslog proto: "
-                        + e.getMessage());
-                return false;
-            }
-        }
-        return true;
-    }
-
-    // clear [CONFIG_ID]
-    private static boolean cmdClear(String[] args, int idx, String deviceSerial) {
-        // Get CONFIG_ID
-        long configId;
-        try {
-            configId = getConfigId(false, args, idx + 1);
-        } catch (NumberFormatException e) {
-            sLogger.severe("Invalid config id provided.");
-            printHelp();
-            return false;
-        }
-        sLogger.fine(String.format("cmdClear with %d", configId));
-
-        try {
-            Utils.getReportList(configId, true /* clearData */, true /* SHELL_UID */, sLogger,
-                    deviceSerial);
-        } catch (IOException | InterruptedException e) {
-            sLogger.severe("Failed to get report list: " + e.getMessage());
-            return false;
-        }
-        return true;
-    }
-
-    // remove [CONFIG_ID]
-    private static boolean cmdRemove(String[] args, int idx) {
-        // Get CONFIG_ID
-        long configId;
-        try {
-            configId = getConfigId(false, args, idx + 1);
-        } catch (NumberFormatException e) {
-            sLogger.severe("Invalid config id provided.");
-            printHelp();
-            return false;
-        }
-        sLogger.fine(String.format("cmdRemove with %d", configId));
-
-        try {
-            Utils.runCommand(null, sLogger, "adb", "shell", Utils.CMD_REMOVE_CONFIG,
-                    Utils.SHELL_UID, String.valueOf(configId));
-        } catch (InterruptedException | IOException e) {
-            sLogger.severe("Failed to remove config: " + e.getMessage());
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Searches through the array to see if it contains (precisely) the given value, starting
-     * at the given firstIdx.
-     */
-    private static boolean contains(String[] array, int firstIdx, String value) {
-        if (value == null) return false;
-        if (firstIdx < 0) return false;
-        for (int i = firstIdx; i < array.length; i++) {
-            if (value.equals(array[i])) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Gets the config id from args[idx], or returns DEFAULT_CONFIG_ID if args[idx] does not exist.
-     * If justUseDefault, overrides and just uses DEFAULT_CONFIG_ID instead.
-     */
-    private static long getConfigId(boolean justUseDefault, String[] args, int idx)
-            throws NumberFormatException {
-        if (justUseDefault || args.length <= idx || idx < 0) {
-            return DEFAULT_CONFIG_ID;
-        }
-        try {
-            return Long.valueOf(args[idx]);
-        } catch (NumberFormatException e) {
-            sLogger.severe("Bad config id provided: " + args[idx]);
-            throw e;
-        }
-    }
-}
diff --git a/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/testdrive/TestDrive.java b/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/testdrive/TestDrive.java
deleted file mode 100644
index 51bcad1..0000000
--- a/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/testdrive/TestDrive.java
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.statsd.shelltools.testdrive;
-
-import com.android.internal.os.StatsdConfigProto;
-import com.android.internal.os.StatsdConfigProto.AtomMatcher;
-import com.android.internal.os.StatsdConfigProto.EventMetric;
-import com.android.internal.os.StatsdConfigProto.FieldFilter;
-import com.android.internal.os.StatsdConfigProto.GaugeMetric;
-import com.android.internal.os.StatsdConfigProto.PullAtomPackages;
-import com.android.internal.os.StatsdConfigProto.SimpleAtomMatcher;
-import com.android.internal.os.StatsdConfigProto.StatsdConfig;
-import com.android.internal.os.StatsdConfigProto.TimeUnit;
-import com.android.os.AtomsProto.Atom;
-import com.android.os.StatsLog;
-import com.android.os.StatsLog.ConfigMetricsReport;
-import com.android.os.StatsLog.ConfigMetricsReportList;
-import com.android.os.StatsLog.StatsLogReport;
-import com.android.statsd.shelltools.Utils;
-
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.io.Files;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-public class TestDrive {
-
-    private static final int METRIC_ID_BASE = 1111;
-    private static final long ATOM_MATCHER_ID_BASE = 1234567;
-    private static final long APP_BREADCRUMB_MATCHER_ID = 1111111;
-    private static final int PULL_ATOM_START = 10000;
-    private static final int MAX_PLATFORM_ATOM_TAG = 100000;
-    private static final int VENDOR_PULLED_ATOM_START_TAG = 150000;
-    private static final long CONFIG_ID = 54321;
-    private static final String[] ALLOWED_LOG_SOURCES = {
-            "AID_GRAPHICS",
-            "AID_INCIDENTD",
-            "AID_STATSD",
-            "AID_RADIO",
-            "com.android.systemui",
-            "com.android.vending",
-            "AID_SYSTEM",
-            "AID_ROOT",
-            "AID_BLUETOOTH",
-            "AID_LMKD",
-            "com.android.managedprovisioning",
-            "AID_MEDIA",
-            "AID_NETWORK_STACK",
-            "com.google.android.providers.media.module",
-    };
-    private static final String[] DEFAULT_PULL_SOURCES = {
-            "AID_SYSTEM",
-            "AID_RADIO"
-    };
-    private static final Logger LOGGER = Logger.getLogger(TestDrive.class.getName());
-
-    @VisibleForTesting
-    String mDeviceSerial = null;
-    @VisibleForTesting
-    Dumper mDumper = new BasicDumper();
-
-    public static void main(String[] args) {
-        final Configuration configuration = new Configuration();
-        final TestDrive testDrive = new TestDrive();
-        Utils.setUpLogger(LOGGER, false);
-
-        if (!testDrive.processArgs(configuration, args,
-                Utils.getDeviceSerials(LOGGER), Utils.getDefaultDevice(LOGGER))) {
-            return;
-        }
-
-        final ConfigMetricsReportList reports = testDrive.testDriveAndGetReports(
-                configuration.createConfig(), configuration.hasPulledAtoms(),
-                configuration.hasPushedAtoms());
-        if (reports != null) {
-            configuration.dumpMetrics(reports, testDrive.mDumper);
-        }
-    }
-
-    boolean processArgs(Configuration configuration, String[] args, List<String> connectedDevices,
-            String defaultDevice) {
-        if (args.length < 1) {
-            LOGGER.severe("Usage: ./test_drive [-one] "
-                    + "[-p additional_allowed_package] "
-                    + "[-s DEVICE_SERIAL_NUMBER] "
-                    + "<atomId1> <atomId2> ... <atomIdN>");
-            return false;
-        }
-
-        int first_arg = 0;
-        // Consume all flags, which must precede all atoms
-        for (; first_arg < args.length; ++first_arg) {
-            String arg = args[first_arg];
-            int remaining_args = args.length - first_arg;
-            if (remaining_args >= 2 && arg.equals("-one")) {
-                LOGGER.info("Creating one event metric to catch all pushed atoms.");
-                configuration.mOnePushedAtomEvent = true;
-            } else if (remaining_args >= 2 && arg.equals("-terse")) {
-                LOGGER.info("Terse output format.");
-                mDumper = new TerseDumper();
-            } else if (remaining_args >= 3 && arg.equals("-p")) {
-                configuration.mAdditionalAllowedPackage = args[++first_arg];
-            } else if (remaining_args >= 3 && arg.equals("-s")) {
-                mDeviceSerial = args[++first_arg];
-            } else {
-                break;  // Found the atom list
-            }
-        }
-
-        mDeviceSerial = Utils.chooseDevice(mDeviceSerial, connectedDevices, defaultDevice, LOGGER);
-        if (mDeviceSerial == null) {
-            return false;
-        }
-
-        for ( ; first_arg < args.length; ++first_arg) {
-            String atom = args[first_arg];
-            try {
-                configuration.addAtom(Integer.valueOf(atom));
-            } catch (NumberFormatException e) {
-                LOGGER.severe("Bad atom id provided: " + atom);
-            }
-        }
-
-        return configuration.hasPulledAtoms() || configuration.hasPushedAtoms();
-    }
-
-    private ConfigMetricsReportList testDriveAndGetReports(StatsdConfig config,
-            boolean hasPulledAtoms, boolean hasPushedAtoms) {
-        if (config == null) {
-            LOGGER.severe("Failed to create valid config.");
-            return null;
-        }
-
-        String remoteConfigPath = null;
-        try {
-            remoteConfigPath = pushConfig(config, mDeviceSerial);
-            LOGGER.info("Pushed the following config to statsd on device '" + mDeviceSerial
-                    + "':");
-            LOGGER.info(config.toString());
-            if (hasPushedAtoms) {
-                LOGGER.info("Now please play with the device to trigger the event.");
-            }
-            if (!hasPulledAtoms) {
-                LOGGER.info(
-                        "All events should be dumped after 1 min ...");
-                Thread.sleep(60_000);
-            } else {
-                LOGGER.info("All events should be dumped after 1.5 minutes ...");
-                Thread.sleep(15_000);
-                Utils.logAppBreadcrumb(0, 0, LOGGER, mDeviceSerial);
-                Thread.sleep(75_000);
-            }
-            return Utils.getReportList(CONFIG_ID, true, false, LOGGER,
-                    mDeviceSerial);
-        } catch (Exception e) {
-            LOGGER.log(Level.SEVERE, "Failed to test drive: " + e.getMessage(), e);
-        } finally {
-            removeConfig(mDeviceSerial);
-            if (remoteConfigPath != null) {
-                try {
-                    Utils.runCommand(null, LOGGER,
-                            "adb", "-s", mDeviceSerial, "shell", "rm",
-                            remoteConfigPath);
-                } catch (Exception e) {
-                    LOGGER.log(Level.WARNING,
-                            "Unable to remove remote config file: " + remoteConfigPath, e);
-                }
-            }
-        }
-        return null;
-    }
-
-    static class Configuration {
-        boolean mOnePushedAtomEvent = false;
-        @VisibleForTesting
-        Set<Integer> mPushedAtoms = new TreeSet<>();
-        @VisibleForTesting
-        Set<Integer> mPulledAtoms = new TreeSet<>();
-        @VisibleForTesting
-        String mAdditionalAllowedPackage = null;
-        private final Set<Long> mTrackedMetrics = new HashSet<>();
-
-        private void dumpMetrics(ConfigMetricsReportList reportList, Dumper dumper) {
-            // We may get multiple reports. Take the last one.
-            ConfigMetricsReport report = reportList.getReports(reportList.getReportsCount() - 1);
-            for (StatsLogReport statsLog : report.getMetricsList()) {
-                if (isTrackedMetric(statsLog.getMetricId())) {
-                    dumper.dump(statsLog);
-                }
-            }
-        }
-
-        boolean isTrackedMetric(long metricId) {
-            return mTrackedMetrics.contains(metricId);
-        }
-
-        static boolean isPulledAtom(int atomId) {
-            return atomId >= PULL_ATOM_START && atomId <= MAX_PLATFORM_ATOM_TAG
-                    || atomId >= VENDOR_PULLED_ATOM_START_TAG;
-        }
-
-        void addAtom(Integer atom) {
-            if (Atom.getDescriptor().findFieldByNumber(atom) == null) {
-                LOGGER.severe("No such atom found: " + atom);
-                return;
-            }
-            if (isPulledAtom(atom)) {
-                mPulledAtoms.add(atom);
-            } else {
-                mPushedAtoms.add(atom);
-            }
-        }
-
-        private boolean hasPulledAtoms() {
-            return !mPulledAtoms.isEmpty();
-        }
-
-        private boolean hasPushedAtoms() {
-            return !mPushedAtoms.isEmpty();
-        }
-
-        StatsdConfig createConfig() {
-            long metricId = METRIC_ID_BASE;
-            long atomMatcherId = ATOM_MATCHER_ID_BASE;
-
-            StatsdConfig.Builder builder = baseBuilder();
-
-            if (hasPulledAtoms()) {
-                builder.addAtomMatcher(
-                        createAtomMatcher(
-                                Atom.APP_BREADCRUMB_REPORTED_FIELD_NUMBER,
-                                APP_BREADCRUMB_MATCHER_ID));
-            }
-
-            for (int atomId : mPulledAtoms) {
-                builder.addAtomMatcher(createAtomMatcher(atomId, atomMatcherId));
-                GaugeMetric.Builder gaugeMetricBuilder = GaugeMetric.newBuilder();
-                gaugeMetricBuilder
-                        .setId(metricId)
-                        .setWhat(atomMatcherId)
-                        .setTriggerEvent(APP_BREADCRUMB_MATCHER_ID)
-                        .setGaugeFieldsFilter(FieldFilter.newBuilder().setIncludeAll(true).build())
-                        .setBucket(TimeUnit.ONE_MINUTE)
-                        .setSamplingType(GaugeMetric.SamplingType.FIRST_N_SAMPLES)
-                        .setMaxNumGaugeAtomsPerBucket(100);
-                builder.addGaugeMetric(gaugeMetricBuilder.build());
-                atomMatcherId++;
-                mTrackedMetrics.add(metricId++);
-            }
-
-            // A simple atom matcher for each pushed atom.
-            List<AtomMatcher> simpleAtomMatchers = new ArrayList<>();
-            for (int atomId : mPushedAtoms) {
-                final AtomMatcher atomMatcher = createAtomMatcher(atomId, atomMatcherId++);
-                simpleAtomMatchers.add(atomMatcher);
-                builder.addAtomMatcher(atomMatcher);
-            }
-
-            if (mOnePushedAtomEvent) {
-                // Create a union event metric, using an matcher that matches all pulled atoms.
-                AtomMatcher unionAtomMatcher = createUnionMatcher(simpleAtomMatchers,
-                        atomMatcherId);
-                builder.addAtomMatcher(unionAtomMatcher);
-                EventMetric.Builder eventMetricBuilder = EventMetric.newBuilder();
-                eventMetricBuilder.setId(metricId).setWhat(unionAtomMatcher.getId());
-                builder.addEventMetric(eventMetricBuilder.build());
-                mTrackedMetrics.add(metricId++);
-            } else {
-                // Create multiple event metrics, one per pulled atom.
-                for (AtomMatcher atomMatcher : simpleAtomMatchers) {
-                    EventMetric.Builder eventMetricBuilder = EventMetric.newBuilder();
-                    eventMetricBuilder
-                            .setId(metricId)
-                            .setWhat(atomMatcher.getId());
-                    builder.addEventMetric(eventMetricBuilder.build());
-                    mTrackedMetrics.add(metricId++);
-                }
-            }
-
-            return builder.build();
-        }
-
-        private static AtomMatcher createAtomMatcher(int atomId, long matcherId) {
-            AtomMatcher.Builder atomMatcherBuilder = AtomMatcher.newBuilder();
-            atomMatcherBuilder
-                    .setId(matcherId)
-                    .setSimpleAtomMatcher(SimpleAtomMatcher.newBuilder().setAtomId(atomId));
-            return atomMatcherBuilder.build();
-        }
-
-        private AtomMatcher createUnionMatcher(List<AtomMatcher> simpleAtomMatchers,
-                long atomMatcherId) {
-            AtomMatcher.Combination.Builder combinationBuilder =
-                    AtomMatcher.Combination.newBuilder();
-            combinationBuilder.setOperation(StatsdConfigProto.LogicalOperation.OR);
-            for (AtomMatcher matcher : simpleAtomMatchers) {
-                combinationBuilder.addMatcher(matcher.getId());
-            }
-            AtomMatcher.Builder atomMatcherBuilder = AtomMatcher.newBuilder();
-            atomMatcherBuilder.setId(atomMatcherId).setCombination(combinationBuilder.build());
-            return atomMatcherBuilder.build();
-        }
-
-        private StatsdConfig.Builder baseBuilder() {
-            ArrayList<String> allowedSources = new ArrayList<>();
-            Collections.addAll(allowedSources, ALLOWED_LOG_SOURCES);
-            if (mAdditionalAllowedPackage != null) {
-                allowedSources.add(mAdditionalAllowedPackage);
-            }
-            return StatsdConfig.newBuilder()
-                    .addAllAllowedLogSource(allowedSources)
-                    .addAllDefaultPullPackages(Arrays.asList(DEFAULT_PULL_SOURCES))
-                    .addPullAtomPackages(PullAtomPackages.newBuilder()
-                            .setAtomId(Atom.GPU_STATS_GLOBAL_INFO_FIELD_NUMBER)
-                            .addPackages("AID_GPU_SERVICE"))
-                    .addPullAtomPackages(PullAtomPackages.newBuilder()
-                            .setAtomId(Atom.GPU_STATS_APP_INFO_FIELD_NUMBER)
-                            .addPackages("AID_GPU_SERVICE"))
-                    .addPullAtomPackages(PullAtomPackages.newBuilder()
-                            .setAtomId(Atom.TRAIN_INFO_FIELD_NUMBER)
-                            .addPackages("AID_STATSD"))
-                    .addPullAtomPackages(PullAtomPackages.newBuilder()
-                            .setAtomId(Atom.GENERAL_EXTERNAL_STORAGE_ACCESS_STATS_FIELD_NUMBER)
-                            .addPackages("com.google.android.providers.media.module"))
-                    .setHashStringsInMetricReport(false);
-        }
-    }
-
-    interface Dumper {
-        void dump(StatsLogReport report);
-    }
-
-    static class BasicDumper implements Dumper {
-        @Override
-        public void dump(StatsLogReport report) {
-            System.out.println(report.toString());
-        }
-    }
-
-    static class TerseDumper extends BasicDumper {
-        @Override
-        public void dump(StatsLogReport report) {
-            if (report.hasGaugeMetrics()) {
-                dumpGaugeMetrics(report);
-            }
-            if (report.hasEventMetrics()) {
-                dumpEventMetrics(report);
-            }
-        }
-        void dumpEventMetrics(StatsLogReport report) {
-            final List<StatsLog.EventMetricData> data = report.getEventMetrics().getDataList();
-            if (data.isEmpty()) {
-                return;
-            }
-            long firstTimestampNanos = data.get(0).getElapsedTimestampNanos();
-            for (StatsLog.EventMetricData event : data) {
-                final double deltaSec = (event.getElapsedTimestampNanos() - firstTimestampNanos)
-                        / 1e9;
-                System.out.println(
-                        String.format("+%.3fs: %s", deltaSec, event.getAtom().toString()));
-            }
-        }
-        void dumpGaugeMetrics(StatsLogReport report) {
-            final List<StatsLog.GaugeMetricData> data = report.getGaugeMetrics().getDataList();
-            if (data.isEmpty()) {
-                return;
-            }
-            for (StatsLog.GaugeMetricData gauge : data) {
-                System.out.println(gauge.toString());
-            }
-        }
-    }
-
-    private static String pushConfig(StatsdConfig config, String deviceSerial)
-            throws IOException, InterruptedException {
-        File configFile = File.createTempFile("statsdconfig", ".config");
-        configFile.deleteOnExit();
-        Files.write(config.toByteArray(), configFile);
-        String remotePath = "/data/local/tmp/" + configFile.getName();
-        Utils.runCommand(null, LOGGER, "adb", "-s", deviceSerial,
-                "push", configFile.getAbsolutePath(), remotePath);
-        Utils.runCommand(null, LOGGER, "adb", "-s", deviceSerial,
-                "shell", "cat", remotePath, "|", Utils.CMD_UPDATE_CONFIG,
-                String.valueOf(CONFIG_ID));
-        return remotePath;
-    }
-
-    private static void removeConfig(String deviceSerial) {
-        try {
-            Utils.runCommand(null, LOGGER, "adb", "-s", deviceSerial,
-                    "shell", Utils.CMD_REMOVE_CONFIG, String.valueOf(CONFIG_ID));
-        } catch (Exception e) {
-            LOGGER.severe("Failed to remove config: " + e.getMessage());
-        }
-    }
-}
diff --git a/cmds/statsd/tools/localtools/test/com/android/statsd/shelltools/testdrive/ConfigurationTest.java b/cmds/statsd/tools/localtools/test/com/android/statsd/shelltools/testdrive/ConfigurationTest.java
deleted file mode 100644
index b1cc60f..0000000
--- a/cmds/statsd/tools/localtools/test/com/android/statsd/shelltools/testdrive/ConfigurationTest.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.statsd.shelltools.testdrive;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import com.android.internal.os.StatsdConfigProto;
-import com.android.internal.os.StatsdConfigProto.StatsdConfig;
-import com.android.os.AtomsProto;
-
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Tests for {@link TestDrive}
- */
-public class ConfigurationTest {
-
-    private StatsdConfigProto.AtomMatcher findAndRemoveAtomMatcherById(
-            List<StatsdConfigProto.AtomMatcher> atomMatchers, long id) {
-        int numMatches = 0;
-        StatsdConfigProto.AtomMatcher match = null;
-        for (StatsdConfigProto.AtomMatcher atomMatcher : atomMatchers) {
-            if (id == atomMatcher.getId()) {
-                ++numMatches;
-                match = atomMatcher;
-            }
-        }
-        if (numMatches == 1) {
-            atomMatchers.remove(match);
-            return match;
-        }
-        return null;  // Too many, or not found
-    }
-
-    private final TestDrive.Configuration mConfiguration = new TestDrive.Configuration();
-
-    @Test
-    public void testOnePushed() {
-        final int atom = 90;
-        assertFalse(TestDrive.Configuration.isPulledAtom(atom));
-        mConfiguration.addAtom(atom);
-        StatsdConfig config = mConfiguration.createConfig();
-
-        //event_metric {
-        //  id: 1111
-        //  what: 1234567
-        //}
-        //atom_matcher {
-        //  id: 1234567
-        //  simple_atom_matcher {
-        //    atom_id: 90
-        //  }
-        //}
-
-        assertEquals(1, config.getEventMetricCount());
-        assertEquals(0, config.getGaugeMetricCount());
-
-        assertTrue(mConfiguration.isTrackedMetric(config.getEventMetric(0).getId()));
-
-        final List<StatsdConfigProto.AtomMatcher> atomMatchers =
-                new ArrayList<>(config.getAtomMatcherList());
-        assertEquals(atom,
-                findAndRemoveAtomMatcherById(atomMatchers, config.getEventMetric(0).getWhat())
-                        .getSimpleAtomMatcher().getAtomId());
-        assertEquals(0, atomMatchers.size());
-    }
-
-    @Test
-    public void testOnePulled() {
-        final int atom = 10022;
-        assertTrue(TestDrive.Configuration.isPulledAtom(atom));
-        mConfiguration.addAtom(atom);
-        StatsdConfig config = mConfiguration.createConfig();
-
-        //gauge_metric {
-        //  id: 1111
-        //  what: 1234567
-        //  gauge_fields_filter {
-        //    include_all: true
-        //  }
-        //  bucket: ONE_MINUTE
-        //  sampling_type: FIRST_N_SAMPLES
-        //  max_num_gauge_atoms_per_bucket: 100
-        //  trigger_event: 1111111
-        //}
-        //atom_matcher {
-        //  id: 1111111
-        //  simple_atom_matcher {
-        //    atom_id: 47
-        //  }
-        //}
-        //atom_matcher {
-        //  id: 1234567
-        //  simple_atom_matcher {
-        //    atom_id: 10022
-        //  }
-        //}
-
-        assertEquals(0, config.getEventMetricCount());
-        assertEquals(1, config.getGaugeMetricCount());
-
-        assertTrue(mConfiguration.isTrackedMetric(config.getGaugeMetric(0).getId()));
-
-        final StatsdConfigProto.GaugeMetric gaugeMetric = config.getGaugeMetric(0);
-        assertTrue(gaugeMetric.getGaugeFieldsFilter().getIncludeAll());
-
-        final List<StatsdConfigProto.AtomMatcher> atomMatchers =
-                new ArrayList<>(config.getAtomMatcherList());
-        assertEquals(atom,
-                findAndRemoveAtomMatcherById(atomMatchers, gaugeMetric.getWhat())
-                        .getSimpleAtomMatcher().getAtomId());
-        assertEquals(AtomsProto.Atom.APP_BREADCRUMB_REPORTED_FIELD_NUMBER,
-                findAndRemoveAtomMatcherById(atomMatchers, gaugeMetric.getTriggerEvent())
-                        .getSimpleAtomMatcher().getAtomId());
-        assertEquals(0, atomMatchers.size());
-    }
-
-    @Test
-    public void testOnePulledTwoPushed() {
-        final int pulledAtom = 10022;
-        assertTrue(TestDrive.Configuration.isPulledAtom(pulledAtom));
-        mConfiguration.addAtom(pulledAtom);
-
-        Integer[] pushedAtoms = new Integer[]{244, 245};
-        for (int atom : pushedAtoms) {
-            assertFalse(TestDrive.Configuration.isPulledAtom(atom));
-            mConfiguration.addAtom(atom);
-        }
-        StatsdConfig config = mConfiguration.createConfig();
-
-        //  event_metric {
-        //    id: 1111
-        //    what: 1234567
-        //  }
-        //  event_metric {
-        //    id: 1112
-        //    what: 1234568
-        //  }
-        //  gauge_metric {
-        //    id: 1114
-        //    what: 1234570
-        //    gauge_fields_filter {
-        //      include_all: true
-        //    }
-        //    bucket: ONE_MINUTE
-        //    sampling_type: FIRST_N_SAMPLES
-        //    max_num_gauge_atoms_per_bucket: 100
-        //    trigger_event: 1111111
-        //  }
-        //  atom_matcher {
-        //    id: 1111111
-        //    simple_atom_matcher {
-        //      atom_id: 47
-        //    }
-        //  }
-        //  atom_matcher {
-        //    id: 1234567
-        //    simple_atom_matcher {
-        //      atom_id: 244
-        //    }
-        //  }
-        //  atom_matcher {
-        //    id: 1234568
-        //    simple_atom_matcher {
-        //      atom_id: 245
-        //    }
-        //  }
-        //  atom_matcher {
-        //    id: 1234570
-        //    simple_atom_matcher {
-        //      atom_id: 10022
-        //    }
-        //  }
-
-        assertEquals(2, config.getEventMetricCount());
-        assertEquals(1, config.getGaugeMetricCount());
-
-        final StatsdConfigProto.GaugeMetric gaugeMetric = config.getGaugeMetric(0);
-        assertTrue(mConfiguration.isTrackedMetric(gaugeMetric.getId()));
-        assertTrue(gaugeMetric.getGaugeFieldsFilter().getIncludeAll());
-        for (StatsdConfigProto.EventMetric eventMetric : config.getEventMetricList()) {
-            assertTrue(mConfiguration.isTrackedMetric(eventMetric.getId()));
-        }
-
-        final List<StatsdConfigProto.AtomMatcher> atomMatchers =
-                new ArrayList<>(config.getAtomMatcherList());
-
-        assertEquals(pulledAtom, findAndRemoveAtomMatcherById(atomMatchers, gaugeMetric.getWhat())
-                .getSimpleAtomMatcher().getAtomId());
-        assertEquals(AtomsProto.Atom.APP_BREADCRUMB_REPORTED_FIELD_NUMBER,
-                findAndRemoveAtomMatcherById(atomMatchers, gaugeMetric.getTriggerEvent())
-                        .getSimpleAtomMatcher().getAtomId());
-
-        Integer[] actualAtoms = new Integer[]{
-                findAndRemoveAtomMatcherById(atomMatchers, config.getEventMetric(0).getWhat())
-                        .getSimpleAtomMatcher().getAtomId(),
-                findAndRemoveAtomMatcherById(atomMatchers, config.getEventMetric(1).getWhat())
-                        .getSimpleAtomMatcher().getAtomId()};
-        Arrays.sort(actualAtoms);
-        assertArrayEquals(pushedAtoms, actualAtoms);
-
-        assertEquals(0, atomMatchers.size());
-    }
-
-    @Test
-    public void testOnePulledTwoPushedTogether() {
-        mConfiguration.mOnePushedAtomEvent = true;  // Use one event grabbing all pushed atoms
-
-        final int pulledAtom = 10022;
-        assertTrue(TestDrive.Configuration.isPulledAtom(pulledAtom));
-        mConfiguration.addAtom(pulledAtom);
-
-        Integer[] pushedAtoms = new Integer[]{244, 245};
-        for (int atom : pushedAtoms) {
-            assertFalse(TestDrive.Configuration.isPulledAtom(atom));
-            mConfiguration.addAtom(atom);
-        }
-        StatsdConfig config = mConfiguration.createConfig();
-
-        //    event_metric {
-        //      id: 1112
-        //      what: 1234570
-        //    }
-        //    gauge_metric {
-        //      id: 1111
-        //      what: 1234567
-        //      gauge_fields_filter {
-        //        include_all: true
-        //      }
-        //      bucket: ONE_MINUTE
-        //      sampling_type: FIRST_N_SAMPLES
-        //      max_num_gauge_atoms_per_bucket: 100
-        //      trigger_event: 1111111
-        //    }
-        //    atom_matcher {
-        //      id: 1111111
-        //      simple_atom_matcher {
-        //        atom_id: 47
-        //      }
-        //    }
-        //    atom_matcher {
-        //      id: 1234567
-        //      simple_atom_matcher {
-        //        atom_id: 10022
-        //      }
-        //    }
-        //    atom_matcher {
-        //      id: 1234568
-        //      simple_atom_matcher {
-        //        atom_id: 244
-        //      }
-        //    }
-        //    atom_matcher {
-        //      id: 1234569
-        //      simple_atom_matcher {
-        //        atom_id: 245
-        //      }
-        //    }
-        //    atom_matcher {
-        //      id: 1234570
-        //      combination {
-        //        operation: OR
-        //        matcher: 1234568
-        //        matcher: 1234569
-        //      }
-        //    }
-
-        assertEquals(1, config.getEventMetricCount());
-        assertEquals(1, config.getGaugeMetricCount());
-
-        final StatsdConfigProto.GaugeMetric gaugeMetric = config.getGaugeMetric(0);
-        assertTrue(mConfiguration.isTrackedMetric(gaugeMetric.getId()));
-        assertTrue(gaugeMetric.getGaugeFieldsFilter().getIncludeAll());
-
-        StatsdConfigProto.EventMetric eventMetric = config.getEventMetric(0);
-        assertTrue(mConfiguration.isTrackedMetric(eventMetric.getId()));
-
-        final List<StatsdConfigProto.AtomMatcher> atomMatchers =
-                new ArrayList<>(config.getAtomMatcherList());
-
-        assertEquals(pulledAtom, findAndRemoveAtomMatcherById(atomMatchers, gaugeMetric.getWhat())
-                .getSimpleAtomMatcher().getAtomId());
-        assertEquals(AtomsProto.Atom.APP_BREADCRUMB_REPORTED_FIELD_NUMBER,
-                findAndRemoveAtomMatcherById(atomMatchers, gaugeMetric.getTriggerEvent())
-                        .getSimpleAtomMatcher().getAtomId());
-
-        StatsdConfigProto.AtomMatcher unionMatcher = findAndRemoveAtomMatcherById(atomMatchers,
-                eventMetric.getWhat());
-        assertNotNull(unionMatcher.getCombination());
-        assertEquals(2, unionMatcher.getCombination().getMatcherCount());
-
-        Integer[] actualAtoms = new Integer[]{
-              findAndRemoveAtomMatcherById(atomMatchers,
-                      unionMatcher.getCombination().getMatcher(0))
-                      .getSimpleAtomMatcher().getAtomId(),
-                findAndRemoveAtomMatcherById(atomMatchers,
-                        unionMatcher.getCombination().getMatcher(1))
-                        .getSimpleAtomMatcher().getAtomId()};
-        Arrays.sort(actualAtoms);
-        assertArrayEquals(pushedAtoms, actualAtoms);
-
-        assertEquals(0, atomMatchers.size());
-    }
-}
diff --git a/cmds/statsd/tools/localtools/test/com/android/statsd/shelltools/testdrive/TestDriveTest.java b/cmds/statsd/tools/localtools/test/com/android/statsd/shelltools/testdrive/TestDriveTest.java
deleted file mode 100644
index 363fac0..0000000
--- a/cmds/statsd/tools/localtools/test/com/android/statsd/shelltools/testdrive/TestDriveTest.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.statsd.shelltools.testdrive;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Tests for {@link TestDrive}
- */
-@RunWith(Parameterized.class)
-public class TestDriveTest {
-    /**
-     * Expected results of a single iteration of the paramerized test.
-     */
-    static class Expect {
-        public boolean success;
-        public Integer[] atoms;
-        public boolean onePushedAtomEvent = false;
-        public String extraPackage = null;
-        public String target;
-        public boolean terse = false;
-
-        static Expect success(Integer... atoms) {
-            return new Expect(true, atoms,
-                    TARGET);
-        }
-        Expect(boolean success, Integer[] atoms, String target) {
-            this.success = success;
-            this.atoms = atoms;
-            this.target = target;
-        }
-        static final Expect FAILURE = new Expect(false, null, null);
-        Expect onePushedAtomEvent() {
-            this.onePushedAtomEvent = true;
-            return this;
-        }
-        Expect extraPackage() {
-            this.extraPackage = TestDriveTest.PACKAGE;
-            return this;
-        }
-        Expect terse() {
-            this.terse = true;
-            return this;
-        }
-    }
-
-    @Parameterized.Parameter(0)
-    public String[] mArgs;
-
-    @Parameterized.Parameter(1)
-    public List<String> mConnectedDevices;
-
-    @Parameterized.Parameter(2)
-    public String mDefaultDevice;
-
-    @Parameterized.Parameter(3)
-    public Expect mExpect;
-
-    private static final String TARGET = "target";
-    private static final List<String> TARGET_AND_OTHER = Arrays.asList("otherDevice",
-            TARGET);
-    private static final List<String> TWO_OTHER_DEVICES = Arrays.asList(
-            "other1", "other2");
-    private static final List<String> TARGET_ONLY = Collections.singletonList(TARGET);
-    private static final List<String> NOT_TARGET = Collections.singletonList("other");
-    private static final List<String> NO_DEVICES = Collections.emptyList();
-    private static final String PACKAGE = "extraPackage";
-
-    @Parameterized.Parameters
-    public static Collection<Object[]> data() {
-        return Arrays.asList(
-                new Object[]{new String[]{}, null, null,
-                        Expect.FAILURE},  // Usage explanation
-                new Object[]{new String[]{"244", "245"}, null, null,
-                        Expect.FAILURE},  // Failure looking up connected devices
-                new Object[]{new String[]{"244", "245"}, NO_DEVICES, null,
-                        Expect.FAILURE},  // No connected devices
-                new Object[]{new String[]{"-s", TARGET, "244", "245"}, NOT_TARGET, null,
-                        Expect.FAILURE},  // Wrong device connected
-                new Object[]{new String[]{"244", "245"}, TWO_OTHER_DEVICES, null,
-                        Expect.FAILURE},  // Wrong devices connected
-                new Object[]{new String[]{"244", "245"}, TARGET_ONLY, null,
-                        Expect.success(244, 245)},  // If only one device connected, guess that one
-                new Object[]{new String[]{"244", "not_an_atom"}, TARGET_ONLY, null,
-                        Expect.success(244)},  // Ignore non-atoms
-                new Object[]{new String[]{"not_an_atom"}, TARGET_ONLY, null,
-                        Expect.FAILURE},  // Require at least one atom
-                new Object[]{new String[]{"244", "245"}, TWO_OTHER_DEVICES, TARGET,
-                        Expect.FAILURE},  // ANDROID_SERIAL specifies non-connected target
-                new Object[]{new String[]{"244", "245"}, TARGET_AND_OTHER, TARGET,
-                        Expect.success(244, 245)},  // ANDROID_SERIAL specifies a valid target
-                new Object[]{new String[]{"244", "245"}, TARGET_AND_OTHER, null,
-                        Expect.FAILURE},  // Two connected devices, no indication of which to use
-                new Object[]{new String[]{"-one", "244", "245"}, TARGET_ONLY, null,
-                        Expect.success(244, 245).onePushedAtomEvent()},
-                new Object[]{new String[]{"-terse", "-one", "244", "245"}, TARGET_ONLY, null,
-                        Expect.success(244, 245).onePushedAtomEvent().terse()},
-                new Object[]{new String[]{"-one", "-terse", "244", "245"}, TARGET_ONLY, null,
-                        Expect.success(244, 245).onePushedAtomEvent().terse()},
-                new Object[]{new String[]{"-p", PACKAGE, "244", "245"}, TARGET_ONLY, null,
-                        Expect.success(244, 245).extraPackage()},
-                new Object[]{new String[]{"-p", PACKAGE, "-one", "244", "245"}, TARGET_ONLY, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent()},
-                new Object[]{new String[]{"-one", "-p", PACKAGE, "244", "245"}, TARGET_ONLY, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent()},
-                new Object[]{new String[]{"-s", TARGET, "-one", "-p", PACKAGE, "244", "245"},
-                        TARGET_AND_OTHER, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent()},
-                new Object[]{new String[]{"-one", "-s", TARGET, "-p", PACKAGE, "244", "245"},
-                        TARGET_AND_OTHER, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent()},
-                new Object[]{new String[]{"-one", "-p", PACKAGE, "-s", TARGET, "244", "245"},
-                        TARGET_AND_OTHER, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent()},
-                new Object[]{new String[]{"-terse", "-one", "-p", PACKAGE, "-s", TARGET,
-                        "244", "245"},
-                        TARGET_AND_OTHER, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent().terse()},
-                new Object[]{new String[]{"-one", "-terse", "-p", PACKAGE, "-s", TARGET,
-                        "244", "245"},
-                        TARGET_AND_OTHER, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent().terse()},
-                new Object[]{new String[]{"-one", "-p", PACKAGE, "-terse", "-s", TARGET,
-                        "244", "245"},
-                        TARGET_AND_OTHER, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent().terse()},
-                new Object[]{new String[]{"-one", "-p", PACKAGE, "-s", TARGET, "-terse",
-                        "244", "245"},
-                        TARGET_AND_OTHER, null,
-                        Expect.success(244, 245).extraPackage().onePushedAtomEvent().terse()}
-        );
-    }
-
-    private final TestDrive.Configuration mConfiguration = new TestDrive.Configuration();
-    private final TestDrive mTestDrive = new TestDrive();
-
-    private static Integer[] collectAtoms(TestDrive.Configuration configuration) {
-        Integer[] result = new Integer[configuration.mPulledAtoms.size()
-                + configuration.mPushedAtoms.size()];
-        int result_index = 0;
-        for (Integer atom : configuration.mPushedAtoms) {
-            result[result_index++] = atom;
-        }
-        for (Integer atom : configuration.mPulledAtoms) {
-            result[result_index++] = atom;
-        }
-        Arrays.sort(result);
-        return result;
-    }
-
-    @Test
-    public void testProcessArgs() {
-        boolean result = mTestDrive.processArgs(mConfiguration, mArgs, mConnectedDevices,
-                mDefaultDevice);
-        if (mExpect.success) {
-            assertTrue(result);
-            assertArrayEquals(mExpect.atoms, collectAtoms(mConfiguration));
-            assertEquals(mExpect.onePushedAtomEvent, mConfiguration.mOnePushedAtomEvent);
-            assertEquals(mExpect.target, mTestDrive.mDeviceSerial);
-            if (mExpect.terse) {
-                assertEquals(TestDrive.TerseDumper.class, mTestDrive.mDumper.getClass());
-            } else {
-                assertEquals(TestDrive.BasicDumper.class, mTestDrive.mDumper.getClass());
-            }
-        } else {
-            assertFalse(result);
-        }
-    }
-}
diff --git a/cmds/statsd/tools/localtools/testdrive_manifest.txt b/cmds/statsd/tools/localtools/testdrive_manifest.txt
deleted file mode 100644
index 625ebfa..0000000
--- a/cmds/statsd/tools/localtools/testdrive_manifest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Main-class: com.android.statsd.shelltools.testdrive.TestDrive
diff --git a/cmds/telecom/OWNERS b/cmds/telecom/OWNERS
new file mode 100644
index 0000000..2f813e6
--- /dev/null
+++ b/cmds/telecom/OWNERS
@@ -0,0 +1 @@
+include /telecomm/OWNERS
diff --git a/cmds/uinput/OWNERS b/cmds/uinput/OWNERS
new file mode 100644
index 0000000..d701f23
--- /dev/null
+++ b/cmds/uinput/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/hardware/input/OWNERS
diff --git a/cmds/wm/OWNERS b/cmds/wm/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/cmds/wm/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/config/OWNERS b/config/OWNERS
index 3d4924d..d59c6f2 100644
--- a/config/OWNERS
+++ b/config/OWNERS
@@ -1,4 +1,7 @@
+include /ZYGOTE_OWNERS
+
 # compat-team@ for changes to hiddenapi files
+
 per-file hiddenapi-* = andreionea@google.com, mathewi@google.com, satayev@google.com
 
 # Escalations:
diff --git a/core/api/OWNERS b/core/api/OWNERS
new file mode 100644
index 0000000..0b95c51
--- /dev/null
+++ b/core/api/OWNERS
@@ -0,0 +1,2 @@
+# API changes are managed via Prolog rules, not OWNERS
+*
diff --git a/core/api/current.txt b/core/api/current.txt
index 0bbe939..1ef98be 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -9051,6 +9051,15 @@
     field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppSdpSettings> CREATOR;
   }
 
+  public final class BluetoothLeAudio implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile {
+    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public void close();
+    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) protected void finalize();
+    method @NonNull public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
+    method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice);
+    method @NonNull public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]);
+    field public static final String ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED = "android.bluetooth.action.LE_AUDIO_CONNECTION_STATE_CHANGED";
+  }
+
   public final class BluetoothManager {
     method public android.bluetooth.BluetoothAdapter getAdapter();
     method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(int);
@@ -18310,4812 +18319,6 @@
 
 }
 
-package android.icu.lang {
-
-  public final class UCharacter implements android.icu.lang.UCharacterEnums.ECharacterCategory android.icu.lang.UCharacterEnums.ECharacterDirection {
-    method public static int charCount(int);
-    method public static int codePointAt(CharSequence, int);
-    method public static int codePointAt(char[], int);
-    method public static int codePointAt(char[], int, int);
-    method public static int codePointBefore(CharSequence, int);
-    method public static int codePointBefore(char[], int);
-    method public static int codePointBefore(char[], int, int);
-    method public static int codePointCount(CharSequence, int, int);
-    method public static int codePointCount(char[], int, int);
-    method public static int digit(int, int);
-    method public static int digit(int);
-    method public static int foldCase(int, boolean);
-    method public static String foldCase(String, boolean);
-    method public static int foldCase(int, int);
-    method public static String foldCase(String, int);
-    method public static char forDigit(int, int);
-    method public static android.icu.util.VersionInfo getAge(int);
-    method public static int getBidiPairedBracket(int);
-    method public static int getCharFromExtendedName(String);
-    method public static int getCharFromName(String);
-    method public static int getCharFromNameAlias(String);
-    method public static int getCodePoint(char, char);
-    method public static int getCodePoint(char);
-    method public static int getCombiningClass(int);
-    method public static int getDirection(int);
-    method public static byte getDirectionality(int);
-    method public static String getExtendedName(int);
-    method public static android.icu.util.ValueIterator getExtendedNameIterator();
-    method public static int getHanNumericValue(int);
-    method public static int getIntPropertyMaxValue(int);
-    method public static int getIntPropertyMinValue(int);
-    method public static int getIntPropertyValue(int, int);
-    method public static int getMirror(int);
-    method public static String getName(int);
-    method public static String getName(String, String);
-    method public static String getNameAlias(int);
-    method public static android.icu.util.ValueIterator getNameIterator();
-    method public static int getNumericValue(int);
-    method public static int getPropertyEnum(CharSequence);
-    method public static String getPropertyName(int, int);
-    method public static int getPropertyValueEnum(int, CharSequence);
-    method public static String getPropertyValueName(int, int, int);
-    method public static int getType(int);
-    method public static android.icu.util.RangeValueIterator getTypeIterator();
-    method public static double getUnicodeNumericValue(int);
-    method public static android.icu.util.VersionInfo getUnicodeVersion();
-    method public static boolean hasBinaryProperty(int, int);
-    method public static boolean isBMP(int);
-    method public static boolean isBaseForm(int);
-    method public static boolean isDefined(int);
-    method public static boolean isDigit(int);
-    method public static boolean isHighSurrogate(char);
-    method public static boolean isISOControl(int);
-    method public static boolean isIdentifierIgnorable(int);
-    method public static boolean isJavaIdentifierPart(int);
-    method public static boolean isJavaIdentifierStart(int);
-    method public static boolean isLegal(int);
-    method public static boolean isLegal(String);
-    method public static boolean isLetter(int);
-    method public static boolean isLetterOrDigit(int);
-    method public static boolean isLowSurrogate(char);
-    method public static boolean isLowerCase(int);
-    method public static boolean isMirrored(int);
-    method public static boolean isPrintable(int);
-    method public static boolean isSpaceChar(int);
-    method public static boolean isSupplementary(int);
-    method public static boolean isSupplementaryCodePoint(int);
-    method public static boolean isSurrogatePair(char, char);
-    method public static boolean isTitleCase(int);
-    method public static boolean isUAlphabetic(int);
-    method public static boolean isULowercase(int);
-    method public static boolean isUUppercase(int);
-    method public static boolean isUWhiteSpace(int);
-    method public static boolean isUnicodeIdentifierPart(int);
-    method public static boolean isUnicodeIdentifierStart(int);
-    method public static boolean isUpperCase(int);
-    method public static boolean isValidCodePoint(int);
-    method public static boolean isWhitespace(int);
-    method public static int offsetByCodePoints(CharSequence, int, int);
-    method public static int offsetByCodePoints(char[], int, int, int, int);
-    method public static int toChars(int, char[], int);
-    method public static char[] toChars(int);
-    method public static int toCodePoint(char, char);
-    method public static int toLowerCase(int);
-    method public static String toLowerCase(String);
-    method public static String toLowerCase(java.util.Locale, String);
-    method public static String toLowerCase(android.icu.util.ULocale, String);
-    method public static String toString(int);
-    method public static int toTitleCase(int);
-    method public static String toTitleCase(String, android.icu.text.BreakIterator);
-    method public static String toTitleCase(java.util.Locale, String, android.icu.text.BreakIterator);
-    method public static String toTitleCase(android.icu.util.ULocale, String, android.icu.text.BreakIterator);
-    method public static String toTitleCase(android.icu.util.ULocale, String, android.icu.text.BreakIterator, int);
-    method public static String toTitleCase(java.util.Locale, String, android.icu.text.BreakIterator, int);
-    method public static int toUpperCase(int);
-    method public static String toUpperCase(String);
-    method public static String toUpperCase(java.util.Locale, String);
-    method public static String toUpperCase(android.icu.util.ULocale, String);
-    field public static final int FOLD_CASE_DEFAULT = 0; // 0x0
-    field public static final int FOLD_CASE_EXCLUDE_SPECIAL_I = 1; // 0x1
-    field public static final int MAX_CODE_POINT = 1114111; // 0x10ffff
-    field public static final char MAX_HIGH_SURROGATE = 56319; // 0xdbff '\udbff'
-    field public static final char MAX_LOW_SURROGATE = 57343; // 0xdfff '\udfff'
-    field public static final int MAX_RADIX = 36; // 0x24
-    field public static final char MAX_SURROGATE = 57343; // 0xdfff '\udfff'
-    field public static final int MAX_VALUE = 1114111; // 0x10ffff
-    field public static final int MIN_CODE_POINT = 0; // 0x0
-    field public static final char MIN_HIGH_SURROGATE = 55296; // 0xd800 '\ud800'
-    field public static final char MIN_LOW_SURROGATE = 56320; // 0xdc00 '\udc00'
-    field public static final int MIN_RADIX = 2; // 0x2
-    field public static final int MIN_SUPPLEMENTARY_CODE_POINT = 65536; // 0x10000
-    field public static final char MIN_SURROGATE = 55296; // 0xd800 '\ud800'
-    field public static final int MIN_VALUE = 0; // 0x0
-    field public static final double NO_NUMERIC_VALUE = -1.23456789E8;
-    field public static final int REPLACEMENT_CHAR = 65533; // 0xfffd
-    field public static final int SUPPLEMENTARY_MIN_VALUE = 65536; // 0x10000
-    field public static final int TITLECASE_NO_BREAK_ADJUSTMENT = 512; // 0x200
-    field public static final int TITLECASE_NO_LOWERCASE = 256; // 0x100
-  }
-
-  public static interface UCharacter.BidiPairedBracketType {
-    field public static final int CLOSE = 2; // 0x2
-    field public static final int NONE = 0; // 0x0
-    field public static final int OPEN = 1; // 0x1
-  }
-
-  public static interface UCharacter.DecompositionType {
-    field public static final int CANONICAL = 1; // 0x1
-    field public static final int CIRCLE = 3; // 0x3
-    field public static final int COMPAT = 2; // 0x2
-    field public static final int FINAL = 4; // 0x4
-    field public static final int FONT = 5; // 0x5
-    field public static final int FRACTION = 6; // 0x6
-    field public static final int INITIAL = 7; // 0x7
-    field public static final int ISOLATED = 8; // 0x8
-    field public static final int MEDIAL = 9; // 0x9
-    field public static final int NARROW = 10; // 0xa
-    field public static final int NOBREAK = 11; // 0xb
-    field public static final int NONE = 0; // 0x0
-    field public static final int SMALL = 12; // 0xc
-    field public static final int SQUARE = 13; // 0xd
-    field public static final int SUB = 14; // 0xe
-    field public static final int SUPER = 15; // 0xf
-    field public static final int VERTICAL = 16; // 0x10
-    field public static final int WIDE = 17; // 0x11
-  }
-
-  public static interface UCharacter.EastAsianWidth {
-    field public static final int AMBIGUOUS = 1; // 0x1
-    field public static final int FULLWIDTH = 3; // 0x3
-    field public static final int HALFWIDTH = 2; // 0x2
-    field public static final int NARROW = 4; // 0x4
-    field public static final int NEUTRAL = 0; // 0x0
-    field public static final int WIDE = 5; // 0x5
-  }
-
-  public static interface UCharacter.GraphemeClusterBreak {
-    field public static final int CONTROL = 1; // 0x1
-    field public static final int CR = 2; // 0x2
-    field public static final int EXTEND = 3; // 0x3
-    field public static final int E_BASE = 13; // 0xd
-    field public static final int E_BASE_GAZ = 14; // 0xe
-    field public static final int E_MODIFIER = 15; // 0xf
-    field public static final int GLUE_AFTER_ZWJ = 16; // 0x10
-    field public static final int L = 4; // 0x4
-    field public static final int LF = 5; // 0x5
-    field public static final int LV = 6; // 0x6
-    field public static final int LVT = 7; // 0x7
-    field public static final int OTHER = 0; // 0x0
-    field public static final int PREPEND = 11; // 0xb
-    field public static final int REGIONAL_INDICATOR = 12; // 0xc
-    field public static final int SPACING_MARK = 10; // 0xa
-    field public static final int T = 8; // 0x8
-    field public static final int V = 9; // 0x9
-    field public static final int ZWJ = 17; // 0x11
-  }
-
-  public static interface UCharacter.HangulSyllableType {
-    field public static final int LEADING_JAMO = 1; // 0x1
-    field public static final int LVT_SYLLABLE = 5; // 0x5
-    field public static final int LV_SYLLABLE = 4; // 0x4
-    field public static final int NOT_APPLICABLE = 0; // 0x0
-    field public static final int TRAILING_JAMO = 3; // 0x3
-    field public static final int VOWEL_JAMO = 2; // 0x2
-  }
-
-  public static interface UCharacter.IndicPositionalCategory {
-    field public static final int BOTTOM = 1; // 0x1
-    field public static final int BOTTOM_AND_LEFT = 2; // 0x2
-    field public static final int BOTTOM_AND_RIGHT = 3; // 0x3
-    field public static final int LEFT = 4; // 0x4
-    field public static final int LEFT_AND_RIGHT = 5; // 0x5
-    field public static final int NA = 0; // 0x0
-    field public static final int OVERSTRUCK = 6; // 0x6
-    field public static final int RIGHT = 7; // 0x7
-    field public static final int TOP = 8; // 0x8
-    field public static final int TOP_AND_BOTTOM = 9; // 0x9
-    field public static final int TOP_AND_BOTTOM_AND_LEFT = 15; // 0xf
-    field public static final int TOP_AND_BOTTOM_AND_RIGHT = 10; // 0xa
-    field public static final int TOP_AND_LEFT = 11; // 0xb
-    field public static final int TOP_AND_LEFT_AND_RIGHT = 12; // 0xc
-    field public static final int TOP_AND_RIGHT = 13; // 0xd
-    field public static final int VISUAL_ORDER_LEFT = 14; // 0xe
-  }
-
-  public static interface UCharacter.IndicSyllabicCategory {
-    field public static final int AVAGRAHA = 1; // 0x1
-    field public static final int BINDU = 2; // 0x2
-    field public static final int BRAHMI_JOINING_NUMBER = 3; // 0x3
-    field public static final int CANTILLATION_MARK = 4; // 0x4
-    field public static final int CONSONANT = 5; // 0x5
-    field public static final int CONSONANT_DEAD = 6; // 0x6
-    field public static final int CONSONANT_FINAL = 7; // 0x7
-    field public static final int CONSONANT_HEAD_LETTER = 8; // 0x8
-    field public static final int CONSONANT_INITIAL_POSTFIXED = 9; // 0x9
-    field public static final int CONSONANT_KILLER = 10; // 0xa
-    field public static final int CONSONANT_MEDIAL = 11; // 0xb
-    field public static final int CONSONANT_PLACEHOLDER = 12; // 0xc
-    field public static final int CONSONANT_PRECEDING_REPHA = 13; // 0xd
-    field public static final int CONSONANT_PREFIXED = 14; // 0xe
-    field public static final int CONSONANT_SUBJOINED = 15; // 0xf
-    field public static final int CONSONANT_SUCCEEDING_REPHA = 16; // 0x10
-    field public static final int CONSONANT_WITH_STACKER = 17; // 0x11
-    field public static final int GEMINATION_MARK = 18; // 0x12
-    field public static final int INVISIBLE_STACKER = 19; // 0x13
-    field public static final int JOINER = 20; // 0x14
-    field public static final int MODIFYING_LETTER = 21; // 0x15
-    field public static final int NON_JOINER = 22; // 0x16
-    field public static final int NUKTA = 23; // 0x17
-    field public static final int NUMBER = 24; // 0x18
-    field public static final int NUMBER_JOINER = 25; // 0x19
-    field public static final int OTHER = 0; // 0x0
-    field public static final int PURE_KILLER = 26; // 0x1a
-    field public static final int REGISTER_SHIFTER = 27; // 0x1b
-    field public static final int SYLLABLE_MODIFIER = 28; // 0x1c
-    field public static final int TONE_LETTER = 29; // 0x1d
-    field public static final int TONE_MARK = 30; // 0x1e
-    field public static final int VIRAMA = 31; // 0x1f
-    field public static final int VISARGA = 32; // 0x20
-    field public static final int VOWEL = 33; // 0x21
-    field public static final int VOWEL_DEPENDENT = 34; // 0x22
-    field public static final int VOWEL_INDEPENDENT = 35; // 0x23
-  }
-
-  public static interface UCharacter.JoiningGroup {
-    field public static final int AFRICAN_FEH = 86; // 0x56
-    field public static final int AFRICAN_NOON = 87; // 0x57
-    field public static final int AFRICAN_QAF = 88; // 0x58
-    field public static final int AIN = 1; // 0x1
-    field public static final int ALAPH = 2; // 0x2
-    field public static final int ALEF = 3; // 0x3
-    field public static final int BEH = 4; // 0x4
-    field public static final int BETH = 5; // 0x5
-    field public static final int BURUSHASKI_YEH_BARREE = 54; // 0x36
-    field public static final int DAL = 6; // 0x6
-    field public static final int DALATH_RISH = 7; // 0x7
-    field public static final int E = 8; // 0x8
-    field public static final int FARSI_YEH = 55; // 0x37
-    field public static final int FE = 51; // 0x33
-    field public static final int FEH = 9; // 0x9
-    field public static final int FINAL_SEMKATH = 10; // 0xa
-    field public static final int GAF = 11; // 0xb
-    field public static final int GAMAL = 12; // 0xc
-    field public static final int HAH = 13; // 0xd
-    field public static final int HAMZA_ON_HEH_GOAL = 14; // 0xe
-    field public static final int HANIFI_ROHINGYA_KINNA_YA = 100; // 0x64
-    field public static final int HANIFI_ROHINGYA_PA = 101; // 0x65
-    field public static final int HE = 15; // 0xf
-    field public static final int HEH = 16; // 0x10
-    field public static final int HEH_GOAL = 17; // 0x11
-    field public static final int HETH = 18; // 0x12
-    field public static final int KAF = 19; // 0x13
-    field public static final int KAPH = 20; // 0x14
-    field public static final int KHAPH = 52; // 0x34
-    field public static final int KNOTTED_HEH = 21; // 0x15
-    field public static final int LAM = 22; // 0x16
-    field public static final int LAMADH = 23; // 0x17
-    field public static final int MALAYALAM_BHA = 89; // 0x59
-    field public static final int MALAYALAM_JA = 90; // 0x5a
-    field public static final int MALAYALAM_LLA = 91; // 0x5b
-    field public static final int MALAYALAM_LLLA = 92; // 0x5c
-    field public static final int MALAYALAM_NGA = 93; // 0x5d
-    field public static final int MALAYALAM_NNA = 94; // 0x5e
-    field public static final int MALAYALAM_NNNA = 95; // 0x5f
-    field public static final int MALAYALAM_NYA = 96; // 0x60
-    field public static final int MALAYALAM_RA = 97; // 0x61
-    field public static final int MALAYALAM_SSA = 98; // 0x62
-    field public static final int MALAYALAM_TTA = 99; // 0x63
-    field public static final int MANICHAEAN_ALEPH = 58; // 0x3a
-    field public static final int MANICHAEAN_AYIN = 59; // 0x3b
-    field public static final int MANICHAEAN_BETH = 60; // 0x3c
-    field public static final int MANICHAEAN_DALETH = 61; // 0x3d
-    field public static final int MANICHAEAN_DHAMEDH = 62; // 0x3e
-    field public static final int MANICHAEAN_FIVE = 63; // 0x3f
-    field public static final int MANICHAEAN_GIMEL = 64; // 0x40
-    field public static final int MANICHAEAN_HETH = 65; // 0x41
-    field public static final int MANICHAEAN_HUNDRED = 66; // 0x42
-    field public static final int MANICHAEAN_KAPH = 67; // 0x43
-    field public static final int MANICHAEAN_LAMEDH = 68; // 0x44
-    field public static final int MANICHAEAN_MEM = 69; // 0x45
-    field public static final int MANICHAEAN_NUN = 70; // 0x46
-    field public static final int MANICHAEAN_ONE = 71; // 0x47
-    field public static final int MANICHAEAN_PE = 72; // 0x48
-    field public static final int MANICHAEAN_QOPH = 73; // 0x49
-    field public static final int MANICHAEAN_RESH = 74; // 0x4a
-    field public static final int MANICHAEAN_SADHE = 75; // 0x4b
-    field public static final int MANICHAEAN_SAMEKH = 76; // 0x4c
-    field public static final int MANICHAEAN_TAW = 77; // 0x4d
-    field public static final int MANICHAEAN_TEN = 78; // 0x4e
-    field public static final int MANICHAEAN_TETH = 79; // 0x4f
-    field public static final int MANICHAEAN_THAMEDH = 80; // 0x50
-    field public static final int MANICHAEAN_TWENTY = 81; // 0x51
-    field public static final int MANICHAEAN_WAW = 82; // 0x52
-    field public static final int MANICHAEAN_YODH = 83; // 0x53
-    field public static final int MANICHAEAN_ZAYIN = 84; // 0x54
-    field public static final int MEEM = 24; // 0x18
-    field public static final int MIM = 25; // 0x19
-    field public static final int NOON = 26; // 0x1a
-    field public static final int NO_JOINING_GROUP = 0; // 0x0
-    field public static final int NUN = 27; // 0x1b
-    field public static final int NYA = 56; // 0x38
-    field public static final int PE = 28; // 0x1c
-    field public static final int QAF = 29; // 0x1d
-    field public static final int QAPH = 30; // 0x1e
-    field public static final int REH = 31; // 0x1f
-    field public static final int REVERSED_PE = 32; // 0x20
-    field public static final int ROHINGYA_YEH = 57; // 0x39
-    field public static final int SAD = 33; // 0x21
-    field public static final int SADHE = 34; // 0x22
-    field public static final int SEEN = 35; // 0x23
-    field public static final int SEMKATH = 36; // 0x24
-    field public static final int SHIN = 37; // 0x25
-    field public static final int STRAIGHT_WAW = 85; // 0x55
-    field public static final int SWASH_KAF = 38; // 0x26
-    field public static final int SYRIAC_WAW = 39; // 0x27
-    field public static final int TAH = 40; // 0x28
-    field public static final int TAW = 41; // 0x29
-    field public static final int TEH_MARBUTA = 42; // 0x2a
-    field public static final int TEH_MARBUTA_GOAL = 14; // 0xe
-    field public static final int TETH = 43; // 0x2b
-    field public static final int WAW = 44; // 0x2c
-    field public static final int YEH = 45; // 0x2d
-    field public static final int YEH_BARREE = 46; // 0x2e
-    field public static final int YEH_WITH_TAIL = 47; // 0x2f
-    field public static final int YUDH = 48; // 0x30
-    field public static final int YUDH_HE = 49; // 0x31
-    field public static final int ZAIN = 50; // 0x32
-    field public static final int ZHAIN = 53; // 0x35
-  }
-
-  public static interface UCharacter.JoiningType {
-    field public static final int DUAL_JOINING = 2; // 0x2
-    field public static final int JOIN_CAUSING = 1; // 0x1
-    field public static final int LEFT_JOINING = 3; // 0x3
-    field public static final int NON_JOINING = 0; // 0x0
-    field public static final int RIGHT_JOINING = 4; // 0x4
-    field public static final int TRANSPARENT = 5; // 0x5
-  }
-
-  public static interface UCharacter.LineBreak {
-    field public static final int ALPHABETIC = 2; // 0x2
-    field public static final int AMBIGUOUS = 1; // 0x1
-    field public static final int BREAK_AFTER = 4; // 0x4
-    field public static final int BREAK_BEFORE = 5; // 0x5
-    field public static final int BREAK_BOTH = 3; // 0x3
-    field public static final int BREAK_SYMBOLS = 27; // 0x1b
-    field public static final int CARRIAGE_RETURN = 10; // 0xa
-    field public static final int CLOSE_PARENTHESIS = 36; // 0x24
-    field public static final int CLOSE_PUNCTUATION = 8; // 0x8
-    field public static final int COMBINING_MARK = 9; // 0x9
-    field public static final int COMPLEX_CONTEXT = 24; // 0x18
-    field public static final int CONDITIONAL_JAPANESE_STARTER = 37; // 0x25
-    field public static final int CONTINGENT_BREAK = 7; // 0x7
-    field public static final int EXCLAMATION = 11; // 0xb
-    field public static final int E_BASE = 40; // 0x28
-    field public static final int E_MODIFIER = 41; // 0x29
-    field public static final int GLUE = 12; // 0xc
-    field public static final int H2 = 31; // 0x1f
-    field public static final int H3 = 32; // 0x20
-    field public static final int HEBREW_LETTER = 38; // 0x26
-    field public static final int HYPHEN = 13; // 0xd
-    field public static final int IDEOGRAPHIC = 14; // 0xe
-    field public static final int INFIX_NUMERIC = 16; // 0x10
-    field public static final int INSEPARABLE = 15; // 0xf
-    field public static final int INSEPERABLE = 15; // 0xf
-    field public static final int JL = 33; // 0x21
-    field public static final int JT = 34; // 0x22
-    field public static final int JV = 35; // 0x23
-    field public static final int LINE_FEED = 17; // 0x11
-    field public static final int MANDATORY_BREAK = 6; // 0x6
-    field public static final int NEXT_LINE = 29; // 0x1d
-    field public static final int NONSTARTER = 18; // 0x12
-    field public static final int NUMERIC = 19; // 0x13
-    field public static final int OPEN_PUNCTUATION = 20; // 0x14
-    field public static final int POSTFIX_NUMERIC = 21; // 0x15
-    field public static final int PREFIX_NUMERIC = 22; // 0x16
-    field public static final int QUOTATION = 23; // 0x17
-    field public static final int REGIONAL_INDICATOR = 39; // 0x27
-    field public static final int SPACE = 26; // 0x1a
-    field public static final int SURROGATE = 25; // 0x19
-    field public static final int UNKNOWN = 0; // 0x0
-    field public static final int WORD_JOINER = 30; // 0x1e
-    field public static final int ZWJ = 42; // 0x2a
-    field public static final int ZWSPACE = 28; // 0x1c
-  }
-
-  public static interface UCharacter.NumericType {
-    field public static final int DECIMAL = 1; // 0x1
-    field public static final int DIGIT = 2; // 0x2
-    field public static final int NONE = 0; // 0x0
-    field public static final int NUMERIC = 3; // 0x3
-  }
-
-  public static interface UCharacter.SentenceBreak {
-    field public static final int ATERM = 1; // 0x1
-    field public static final int CLOSE = 2; // 0x2
-    field public static final int CR = 11; // 0xb
-    field public static final int EXTEND = 12; // 0xc
-    field public static final int FORMAT = 3; // 0x3
-    field public static final int LF = 13; // 0xd
-    field public static final int LOWER = 4; // 0x4
-    field public static final int NUMERIC = 5; // 0x5
-    field public static final int OLETTER = 6; // 0x6
-    field public static final int OTHER = 0; // 0x0
-    field public static final int SCONTINUE = 14; // 0xe
-    field public static final int SEP = 7; // 0x7
-    field public static final int SP = 8; // 0x8
-    field public static final int STERM = 9; // 0x9
-    field public static final int UPPER = 10; // 0xa
-  }
-
-  public static final class UCharacter.UnicodeBlock extends java.lang.Character.Subset {
-    method public static android.icu.lang.UCharacter.UnicodeBlock forName(String);
-    method public int getID();
-    method public static android.icu.lang.UCharacter.UnicodeBlock getInstance(int);
-    method public static android.icu.lang.UCharacter.UnicodeBlock of(int);
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ADLAM;
-    field public static final int ADLAM_ID = 263; // 0x107
-    field public static final android.icu.lang.UCharacter.UnicodeBlock AEGEAN_NUMBERS;
-    field public static final int AEGEAN_NUMBERS_ID = 119; // 0x77
-    field public static final android.icu.lang.UCharacter.UnicodeBlock AHOM;
-    field public static final int AHOM_ID = 253; // 0xfd
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ALCHEMICAL_SYMBOLS;
-    field public static final int ALCHEMICAL_SYMBOLS_ID = 208; // 0xd0
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ALPHABETIC_PRESENTATION_FORMS;
-    field public static final int ALPHABETIC_PRESENTATION_FORMS_ID = 80; // 0x50
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ANATOLIAN_HIEROGLYPHS;
-    field public static final int ANATOLIAN_HIEROGLYPHS_ID = 254; // 0xfe
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ANCIENT_GREEK_MUSICAL_NOTATION;
-    field public static final int ANCIENT_GREEK_MUSICAL_NOTATION_ID = 126; // 0x7e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ANCIENT_GREEK_NUMBERS;
-    field public static final int ANCIENT_GREEK_NUMBERS_ID = 127; // 0x7f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ANCIENT_SYMBOLS;
-    field public static final int ANCIENT_SYMBOLS_ID = 165; // 0xa5
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_EXTENDED_A;
-    field public static final int ARABIC_EXTENDED_A_ID = 210; // 0xd2
-    field public static final int ARABIC_ID = 12; // 0xc
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS;
-    field public static final int ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS_ID = 211; // 0xd3
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_PRESENTATION_FORMS_A;
-    field public static final int ARABIC_PRESENTATION_FORMS_A_ID = 81; // 0x51
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_PRESENTATION_FORMS_B;
-    field public static final int ARABIC_PRESENTATION_FORMS_B_ID = 85; // 0x55
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_SUPPLEMENT;
-    field public static final int ARABIC_SUPPLEMENT_ID = 128; // 0x80
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ARMENIAN;
-    field public static final int ARMENIAN_ID = 10; // 0xa
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ARROWS;
-    field public static final int ARROWS_ID = 46; // 0x2e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock AVESTAN;
-    field public static final int AVESTAN_ID = 188; // 0xbc
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BALINESE;
-    field public static final int BALINESE_ID = 147; // 0x93
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BAMUM;
-    field public static final int BAMUM_ID = 177; // 0xb1
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BAMUM_SUPPLEMENT;
-    field public static final int BAMUM_SUPPLEMENT_ID = 202; // 0xca
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BASIC_LATIN;
-    field public static final int BASIC_LATIN_ID = 1; // 0x1
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BASSA_VAH;
-    field public static final int BASSA_VAH_ID = 221; // 0xdd
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BATAK;
-    field public static final int BATAK_ID = 199; // 0xc7
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BENGALI;
-    field public static final int BENGALI_ID = 16; // 0x10
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BHAIKSUKI;
-    field public static final int BHAIKSUKI_ID = 264; // 0x108
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BLOCK_ELEMENTS;
-    field public static final int BLOCK_ELEMENTS_ID = 53; // 0x35
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BOPOMOFO;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BOPOMOFO_EXTENDED;
-    field public static final int BOPOMOFO_EXTENDED_ID = 67; // 0x43
-    field public static final int BOPOMOFO_ID = 64; // 0x40
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BOX_DRAWING;
-    field public static final int BOX_DRAWING_ID = 52; // 0x34
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BRAHMI;
-    field public static final int BRAHMI_ID = 201; // 0xc9
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BRAILLE_PATTERNS;
-    field public static final int BRAILLE_PATTERNS_ID = 57; // 0x39
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BUGINESE;
-    field public static final int BUGINESE_ID = 129; // 0x81
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BUHID;
-    field public static final int BUHID_ID = 100; // 0x64
-    field public static final android.icu.lang.UCharacter.UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS;
-    field public static final int BYZANTINE_MUSICAL_SYMBOLS_ID = 91; // 0x5b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CARIAN;
-    field public static final int CARIAN_ID = 168; // 0xa8
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CAUCASIAN_ALBANIAN;
-    field public static final int CAUCASIAN_ALBANIAN_ID = 222; // 0xde
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CHAKMA;
-    field public static final int CHAKMA_ID = 212; // 0xd4
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CHAM;
-    field public static final int CHAM_ID = 164; // 0xa4
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CHEROKEE;
-    field public static final int CHEROKEE_ID = 32; // 0x20
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CHEROKEE_SUPPLEMENT;
-    field public static final int CHEROKEE_SUPPLEMENT_ID = 255; // 0xff
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CHESS_SYMBOLS;
-    field public static final int CHESS_SYMBOLS_ID = 281; // 0x119
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CHORASMIAN;
-    field public static final int CHORASMIAN_ID = 301; // 0x12d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_COMPATIBILITY;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_COMPATIBILITY_FORMS;
-    field public static final int CJK_COMPATIBILITY_FORMS_ID = 83; // 0x53
-    field public static final int CJK_COMPATIBILITY_ID = 69; // 0x45
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS;
-    field public static final int CJK_COMPATIBILITY_IDEOGRAPHS_ID = 79; // 0x4f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT;
-    field public static final int CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT_ID = 95; // 0x5f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_RADICALS_SUPPLEMENT;
-    field public static final int CJK_RADICALS_SUPPLEMENT_ID = 58; // 0x3a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_STROKES;
-    field public static final int CJK_STROKES_ID = 130; // 0x82
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION;
-    field public static final int CJK_SYMBOLS_AND_PUNCTUATION_ID = 61; // 0x3d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A;
-    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A_ID = 70; // 0x46
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B;
-    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B_ID = 94; // 0x5e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C;
-    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C_ID = 197; // 0xc5
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D;
-    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D_ID = 209; // 0xd1
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E;
-    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E_ID = 256; // 0x100
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F;
-    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F_ID = 274; // 0x112
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G;
-    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G_ID = 302; // 0x12e
-    field public static final int CJK_UNIFIED_IDEOGRAPHS_ID = 71; // 0x47
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_DIACRITICAL_MARKS;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_DIACRITICAL_MARKS_EXTENDED;
-    field public static final int COMBINING_DIACRITICAL_MARKS_EXTENDED_ID = 224; // 0xe0
-    field public static final int COMBINING_DIACRITICAL_MARKS_ID = 7; // 0x7
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_DIACRITICAL_MARKS_SUPPLEMENT;
-    field public static final int COMBINING_DIACRITICAL_MARKS_SUPPLEMENT_ID = 131; // 0x83
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_HALF_MARKS;
-    field public static final int COMBINING_HALF_MARKS_ID = 82; // 0x52
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS;
-    field public static final int COMBINING_MARKS_FOR_SYMBOLS_ID = 43; // 0x2b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COMMON_INDIC_NUMBER_FORMS;
-    field public static final int COMMON_INDIC_NUMBER_FORMS_ID = 178; // 0xb2
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CONTROL_PICTURES;
-    field public static final int CONTROL_PICTURES_ID = 49; // 0x31
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COPTIC;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COPTIC_EPACT_NUMBERS;
-    field public static final int COPTIC_EPACT_NUMBERS_ID = 223; // 0xdf
-    field public static final int COPTIC_ID = 132; // 0x84
-    field public static final android.icu.lang.UCharacter.UnicodeBlock COUNTING_ROD_NUMERALS;
-    field public static final int COUNTING_ROD_NUMERALS_ID = 154; // 0x9a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CUNEIFORM;
-    field public static final int CUNEIFORM_ID = 152; // 0x98
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CUNEIFORM_NUMBERS_AND_PUNCTUATION;
-    field public static final int CUNEIFORM_NUMBERS_AND_PUNCTUATION_ID = 153; // 0x99
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CURRENCY_SYMBOLS;
-    field public static final int CURRENCY_SYMBOLS_ID = 42; // 0x2a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CYPRIOT_SYLLABARY;
-    field public static final int CYPRIOT_SYLLABARY_ID = 123; // 0x7b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_EXTENDED_A;
-    field public static final int CYRILLIC_EXTENDED_A_ID = 158; // 0x9e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_EXTENDED_B;
-    field public static final int CYRILLIC_EXTENDED_B_ID = 160; // 0xa0
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_EXTENDED_C;
-    field public static final int CYRILLIC_EXTENDED_C_ID = 265; // 0x109
-    field public static final int CYRILLIC_ID = 9; // 0x9
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_SUPPLEMENT;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_SUPPLEMENTARY;
-    field public static final int CYRILLIC_SUPPLEMENTARY_ID = 97; // 0x61
-    field public static final int CYRILLIC_SUPPLEMENT_ID = 97; // 0x61
-    field public static final android.icu.lang.UCharacter.UnicodeBlock DESERET;
-    field public static final int DESERET_ID = 90; // 0x5a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock DEVANAGARI;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock DEVANAGARI_EXTENDED;
-    field public static final int DEVANAGARI_EXTENDED_ID = 179; // 0xb3
-    field public static final int DEVANAGARI_ID = 15; // 0xf
-    field public static final android.icu.lang.UCharacter.UnicodeBlock DINGBATS;
-    field public static final int DINGBATS_ID = 56; // 0x38
-    field public static final android.icu.lang.UCharacter.UnicodeBlock DIVES_AKURU;
-    field public static final int DIVES_AKURU_ID = 303; // 0x12f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock DOGRA;
-    field public static final int DOGRA_ID = 282; // 0x11a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock DOMINO_TILES;
-    field public static final int DOMINO_TILES_ID = 171; // 0xab
-    field public static final android.icu.lang.UCharacter.UnicodeBlock DUPLOYAN;
-    field public static final int DUPLOYAN_ID = 225; // 0xe1
-    field public static final android.icu.lang.UCharacter.UnicodeBlock EARLY_DYNASTIC_CUNEIFORM;
-    field public static final int EARLY_DYNASTIC_CUNEIFORM_ID = 257; // 0x101
-    field public static final android.icu.lang.UCharacter.UnicodeBlock EGYPTIAN_HIEROGLYPHS;
-    field public static final int EGYPTIAN_HIEROGLYPHS_ID = 194; // 0xc2
-    field public static final android.icu.lang.UCharacter.UnicodeBlock EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS;
-    field public static final int EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS_ID = 292; // 0x124
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ELBASAN;
-    field public static final int ELBASAN_ID = 226; // 0xe2
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ELYMAIC;
-    field public static final int ELYMAIC_ID = 293; // 0x125
-    field public static final android.icu.lang.UCharacter.UnicodeBlock EMOTICONS;
-    field public static final int EMOTICONS_ID = 206; // 0xce
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ENCLOSED_ALPHANUMERICS;
-    field public static final int ENCLOSED_ALPHANUMERICS_ID = 51; // 0x33
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ENCLOSED_ALPHANUMERIC_SUPPLEMENT;
-    field public static final int ENCLOSED_ALPHANUMERIC_SUPPLEMENT_ID = 195; // 0xc3
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS;
-    field public static final int ENCLOSED_CJK_LETTERS_AND_MONTHS_ID = 68; // 0x44
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ENCLOSED_IDEOGRAPHIC_SUPPLEMENT;
-    field public static final int ENCLOSED_IDEOGRAPHIC_SUPPLEMENT_ID = 196; // 0xc4
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ETHIOPIC;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ETHIOPIC_EXTENDED;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ETHIOPIC_EXTENDED_A;
-    field public static final int ETHIOPIC_EXTENDED_A_ID = 200; // 0xc8
-    field public static final int ETHIOPIC_EXTENDED_ID = 133; // 0x85
-    field public static final int ETHIOPIC_ID = 31; // 0x1f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ETHIOPIC_SUPPLEMENT;
-    field public static final int ETHIOPIC_SUPPLEMENT_ID = 134; // 0x86
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GENERAL_PUNCTUATION;
-    field public static final int GENERAL_PUNCTUATION_ID = 40; // 0x28
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GEOMETRIC_SHAPES;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GEOMETRIC_SHAPES_EXTENDED;
-    field public static final int GEOMETRIC_SHAPES_EXTENDED_ID = 227; // 0xe3
-    field public static final int GEOMETRIC_SHAPES_ID = 54; // 0x36
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GEORGIAN;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GEORGIAN_EXTENDED;
-    field public static final int GEORGIAN_EXTENDED_ID = 283; // 0x11b
-    field public static final int GEORGIAN_ID = 29; // 0x1d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GEORGIAN_SUPPLEMENT;
-    field public static final int GEORGIAN_SUPPLEMENT_ID = 135; // 0x87
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GLAGOLITIC;
-    field public static final int GLAGOLITIC_ID = 136; // 0x88
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GLAGOLITIC_SUPPLEMENT;
-    field public static final int GLAGOLITIC_SUPPLEMENT_ID = 266; // 0x10a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GOTHIC;
-    field public static final int GOTHIC_ID = 89; // 0x59
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GRANTHA;
-    field public static final int GRANTHA_ID = 228; // 0xe4
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GREEK;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GREEK_EXTENDED;
-    field public static final int GREEK_EXTENDED_ID = 39; // 0x27
-    field public static final int GREEK_ID = 8; // 0x8
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GUJARATI;
-    field public static final int GUJARATI_ID = 18; // 0x12
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GUNJALA_GONDI;
-    field public static final int GUNJALA_GONDI_ID = 284; // 0x11c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock GURMUKHI;
-    field public static final int GURMUKHI_ID = 17; // 0x11
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS;
-    field public static final int HALFWIDTH_AND_FULLWIDTH_FORMS_ID = 87; // 0x57
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_COMPATIBILITY_JAMO;
-    field public static final int HANGUL_COMPATIBILITY_JAMO_ID = 65; // 0x41
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_JAMO;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_JAMO_EXTENDED_A;
-    field public static final int HANGUL_JAMO_EXTENDED_A_ID = 180; // 0xb4
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_JAMO_EXTENDED_B;
-    field public static final int HANGUL_JAMO_EXTENDED_B_ID = 185; // 0xb9
-    field public static final int HANGUL_JAMO_ID = 30; // 0x1e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_SYLLABLES;
-    field public static final int HANGUL_SYLLABLES_ID = 74; // 0x4a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HANIFI_ROHINGYA;
-    field public static final int HANIFI_ROHINGYA_ID = 285; // 0x11d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HANUNOO;
-    field public static final int HANUNOO_ID = 99; // 0x63
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HATRAN;
-    field public static final int HATRAN_ID = 258; // 0x102
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HEBREW;
-    field public static final int HEBREW_ID = 11; // 0xb
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HIGH_PRIVATE_USE_SURROGATES;
-    field public static final int HIGH_PRIVATE_USE_SURROGATES_ID = 76; // 0x4c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HIGH_SURROGATES;
-    field public static final int HIGH_SURROGATES_ID = 75; // 0x4b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock HIRAGANA;
-    field public static final int HIRAGANA_ID = 62; // 0x3e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS;
-    field public static final int IDEOGRAPHIC_DESCRIPTION_CHARACTERS_ID = 60; // 0x3c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION;
-    field public static final int IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION_ID = 267; // 0x10b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock IMPERIAL_ARAMAIC;
-    field public static final int IMPERIAL_ARAMAIC_ID = 186; // 0xba
-    field public static final android.icu.lang.UCharacter.UnicodeBlock INDIC_SIYAQ_NUMBERS;
-    field public static final int INDIC_SIYAQ_NUMBERS_ID = 286; // 0x11e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock INSCRIPTIONAL_PAHLAVI;
-    field public static final int INSCRIPTIONAL_PAHLAVI_ID = 190; // 0xbe
-    field public static final android.icu.lang.UCharacter.UnicodeBlock INSCRIPTIONAL_PARTHIAN;
-    field public static final int INSCRIPTIONAL_PARTHIAN_ID = 189; // 0xbd
-    field public static final android.icu.lang.UCharacter.UnicodeBlock INVALID_CODE;
-    field public static final int INVALID_CODE_ID = -1; // 0xffffffff
-    field public static final android.icu.lang.UCharacter.UnicodeBlock IPA_EXTENSIONS;
-    field public static final int IPA_EXTENSIONS_ID = 5; // 0x5
-    field public static final android.icu.lang.UCharacter.UnicodeBlock JAVANESE;
-    field public static final int JAVANESE_ID = 181; // 0xb5
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KAITHI;
-    field public static final int KAITHI_ID = 193; // 0xc1
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KANA_EXTENDED_A;
-    field public static final int KANA_EXTENDED_A_ID = 275; // 0x113
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KANA_SUPPLEMENT;
-    field public static final int KANA_SUPPLEMENT_ID = 203; // 0xcb
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KANBUN;
-    field public static final int KANBUN_ID = 66; // 0x42
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KANGXI_RADICALS;
-    field public static final int KANGXI_RADICALS_ID = 59; // 0x3b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KANNADA;
-    field public static final int KANNADA_ID = 22; // 0x16
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KATAKANA;
-    field public static final int KATAKANA_ID = 63; // 0x3f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS;
-    field public static final int KATAKANA_PHONETIC_EXTENSIONS_ID = 107; // 0x6b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KAYAH_LI;
-    field public static final int KAYAH_LI_ID = 162; // 0xa2
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KHAROSHTHI;
-    field public static final int KHAROSHTHI_ID = 137; // 0x89
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KHITAN_SMALL_SCRIPT;
-    field public static final int KHITAN_SMALL_SCRIPT_ID = 304; // 0x130
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KHMER;
-    field public static final int KHMER_ID = 36; // 0x24
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KHMER_SYMBOLS;
-    field public static final int KHMER_SYMBOLS_ID = 113; // 0x71
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KHOJKI;
-    field public static final int KHOJKI_ID = 229; // 0xe5
-    field public static final android.icu.lang.UCharacter.UnicodeBlock KHUDAWADI;
-    field public static final int KHUDAWADI_ID = 230; // 0xe6
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LAO;
-    field public static final int LAO_ID = 26; // 0x1a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_1_SUPPLEMENT;
-    field public static final int LATIN_1_SUPPLEMENT_ID = 2; // 0x2
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_A;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_ADDITIONAL;
-    field public static final int LATIN_EXTENDED_ADDITIONAL_ID = 38; // 0x26
-    field public static final int LATIN_EXTENDED_A_ID = 3; // 0x3
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_B;
-    field public static final int LATIN_EXTENDED_B_ID = 4; // 0x4
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_C;
-    field public static final int LATIN_EXTENDED_C_ID = 148; // 0x94
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_D;
-    field public static final int LATIN_EXTENDED_D_ID = 149; // 0x95
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_E;
-    field public static final int LATIN_EXTENDED_E_ID = 231; // 0xe7
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LEPCHA;
-    field public static final int LEPCHA_ID = 156; // 0x9c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LETTERLIKE_SYMBOLS;
-    field public static final int LETTERLIKE_SYMBOLS_ID = 44; // 0x2c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LIMBU;
-    field public static final int LIMBU_ID = 111; // 0x6f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LINEAR_A;
-    field public static final int LINEAR_A_ID = 232; // 0xe8
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LINEAR_B_IDEOGRAMS;
-    field public static final int LINEAR_B_IDEOGRAMS_ID = 118; // 0x76
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LINEAR_B_SYLLABARY;
-    field public static final int LINEAR_B_SYLLABARY_ID = 117; // 0x75
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LISU;
-    field public static final int LISU_ID = 176; // 0xb0
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LISU_SUPPLEMENT;
-    field public static final int LISU_SUPPLEMENT_ID = 305; // 0x131
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LOW_SURROGATES;
-    field public static final int LOW_SURROGATES_ID = 77; // 0x4d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LYCIAN;
-    field public static final int LYCIAN_ID = 167; // 0xa7
-    field public static final android.icu.lang.UCharacter.UnicodeBlock LYDIAN;
-    field public static final int LYDIAN_ID = 169; // 0xa9
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MAHAJANI;
-    field public static final int MAHAJANI_ID = 233; // 0xe9
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MAHJONG_TILES;
-    field public static final int MAHJONG_TILES_ID = 170; // 0xaa
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MAKASAR;
-    field public static final int MAKASAR_ID = 287; // 0x11f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MALAYALAM;
-    field public static final int MALAYALAM_ID = 23; // 0x17
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MANDAIC;
-    field public static final int MANDAIC_ID = 198; // 0xc6
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MANICHAEAN;
-    field public static final int MANICHAEAN_ID = 234; // 0xea
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MARCHEN;
-    field public static final int MARCHEN_ID = 268; // 0x10c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MASARAM_GONDI;
-    field public static final int MASARAM_GONDI_ID = 276; // 0x114
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS;
-    field public static final int MATHEMATICAL_ALPHANUMERIC_SYMBOLS_ID = 93; // 0x5d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MATHEMATICAL_OPERATORS;
-    field public static final int MATHEMATICAL_OPERATORS_ID = 47; // 0x2f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MAYAN_NUMERALS;
-    field public static final int MAYAN_NUMERALS_ID = 288; // 0x120
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MEDEFAIDRIN;
-    field public static final int MEDEFAIDRIN_ID = 289; // 0x121
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MEETEI_MAYEK;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MEETEI_MAYEK_EXTENSIONS;
-    field public static final int MEETEI_MAYEK_EXTENSIONS_ID = 213; // 0xd5
-    field public static final int MEETEI_MAYEK_ID = 184; // 0xb8
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MENDE_KIKAKUI;
-    field public static final int MENDE_KIKAKUI_ID = 235; // 0xeb
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MEROITIC_CURSIVE;
-    field public static final int MEROITIC_CURSIVE_ID = 214; // 0xd6
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MEROITIC_HIEROGLYPHS;
-    field public static final int MEROITIC_HIEROGLYPHS_ID = 215; // 0xd7
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MIAO;
-    field public static final int MIAO_ID = 216; // 0xd8
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A;
-    field public static final int MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A_ID = 102; // 0x66
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B;
-    field public static final int MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B_ID = 105; // 0x69
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_SYMBOLS;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS;
-    field public static final int MISCELLANEOUS_SYMBOLS_AND_ARROWS_ID = 115; // 0x73
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS;
-    field public static final int MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS_ID = 205; // 0xcd
-    field public static final int MISCELLANEOUS_SYMBOLS_ID = 55; // 0x37
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_TECHNICAL;
-    field public static final int MISCELLANEOUS_TECHNICAL_ID = 48; // 0x30
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MODI;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MODIFIER_TONE_LETTERS;
-    field public static final int MODIFIER_TONE_LETTERS_ID = 138; // 0x8a
-    field public static final int MODI_ID = 236; // 0xec
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MONGOLIAN;
-    field public static final int MONGOLIAN_ID = 37; // 0x25
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MONGOLIAN_SUPPLEMENT;
-    field public static final int MONGOLIAN_SUPPLEMENT_ID = 269; // 0x10d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MRO;
-    field public static final int MRO_ID = 237; // 0xed
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MULTANI;
-    field public static final int MULTANI_ID = 259; // 0x103
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MUSICAL_SYMBOLS;
-    field public static final int MUSICAL_SYMBOLS_ID = 92; // 0x5c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MYANMAR;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MYANMAR_EXTENDED_A;
-    field public static final int MYANMAR_EXTENDED_A_ID = 182; // 0xb6
-    field public static final android.icu.lang.UCharacter.UnicodeBlock MYANMAR_EXTENDED_B;
-    field public static final int MYANMAR_EXTENDED_B_ID = 238; // 0xee
-    field public static final int MYANMAR_ID = 28; // 0x1c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NABATAEAN;
-    field public static final int NABATAEAN_ID = 239; // 0xef
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NANDINAGARI;
-    field public static final int NANDINAGARI_ID = 294; // 0x126
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NEWA;
-    field public static final int NEWA_ID = 270; // 0x10e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NEW_TAI_LUE;
-    field public static final int NEW_TAI_LUE_ID = 139; // 0x8b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NKO;
-    field public static final int NKO_ID = 146; // 0x92
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NO_BLOCK;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NUMBER_FORMS;
-    field public static final int NUMBER_FORMS_ID = 45; // 0x2d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NUSHU;
-    field public static final int NUSHU_ID = 277; // 0x115
-    field public static final android.icu.lang.UCharacter.UnicodeBlock NYIAKENG_PUACHUE_HMONG;
-    field public static final int NYIAKENG_PUACHUE_HMONG_ID = 295; // 0x127
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OGHAM;
-    field public static final int OGHAM_ID = 34; // 0x22
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_HUNGARIAN;
-    field public static final int OLD_HUNGARIAN_ID = 260; // 0x104
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_ITALIC;
-    field public static final int OLD_ITALIC_ID = 88; // 0x58
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_NORTH_ARABIAN;
-    field public static final int OLD_NORTH_ARABIAN_ID = 240; // 0xf0
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_PERMIC;
-    field public static final int OLD_PERMIC_ID = 241; // 0xf1
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_PERSIAN;
-    field public static final int OLD_PERSIAN_ID = 140; // 0x8c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_SOGDIAN;
-    field public static final int OLD_SOGDIAN_ID = 290; // 0x122
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_SOUTH_ARABIAN;
-    field public static final int OLD_SOUTH_ARABIAN_ID = 187; // 0xbb
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_TURKIC;
-    field public static final int OLD_TURKIC_ID = 191; // 0xbf
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OL_CHIKI;
-    field public static final int OL_CHIKI_ID = 157; // 0x9d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OPTICAL_CHARACTER_RECOGNITION;
-    field public static final int OPTICAL_CHARACTER_RECOGNITION_ID = 50; // 0x32
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ORIYA;
-    field public static final int ORIYA_ID = 19; // 0x13
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ORNAMENTAL_DINGBATS;
-    field public static final int ORNAMENTAL_DINGBATS_ID = 242; // 0xf2
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OSAGE;
-    field public static final int OSAGE_ID = 271; // 0x10f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OSMANYA;
-    field public static final int OSMANYA_ID = 122; // 0x7a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock OTTOMAN_SIYAQ_NUMBERS;
-    field public static final int OTTOMAN_SIYAQ_NUMBERS_ID = 296; // 0x128
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PAHAWH_HMONG;
-    field public static final int PAHAWH_HMONG_ID = 243; // 0xf3
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PALMYRENE;
-    field public static final int PALMYRENE_ID = 244; // 0xf4
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PAU_CIN_HAU;
-    field public static final int PAU_CIN_HAU_ID = 245; // 0xf5
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PHAGS_PA;
-    field public static final int PHAGS_PA_ID = 150; // 0x96
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PHAISTOS_DISC;
-    field public static final int PHAISTOS_DISC_ID = 166; // 0xa6
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PHOENICIAN;
-    field public static final int PHOENICIAN_ID = 151; // 0x97
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PHONETIC_EXTENSIONS;
-    field public static final int PHONETIC_EXTENSIONS_ID = 114; // 0x72
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PHONETIC_EXTENSIONS_SUPPLEMENT;
-    field public static final int PHONETIC_EXTENSIONS_SUPPLEMENT_ID = 141; // 0x8d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PLAYING_CARDS;
-    field public static final int PLAYING_CARDS_ID = 204; // 0xcc
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PRIVATE_USE;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PRIVATE_USE_AREA;
-    field public static final int PRIVATE_USE_AREA_ID = 78; // 0x4e
-    field public static final int PRIVATE_USE_ID = 78; // 0x4e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock PSALTER_PAHLAVI;
-    field public static final int PSALTER_PAHLAVI_ID = 246; // 0xf6
-    field public static final android.icu.lang.UCharacter.UnicodeBlock REJANG;
-    field public static final int REJANG_ID = 163; // 0xa3
-    field public static final android.icu.lang.UCharacter.UnicodeBlock RUMI_NUMERAL_SYMBOLS;
-    field public static final int RUMI_NUMERAL_SYMBOLS_ID = 192; // 0xc0
-    field public static final android.icu.lang.UCharacter.UnicodeBlock RUNIC;
-    field public static final int RUNIC_ID = 35; // 0x23
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SAMARITAN;
-    field public static final int SAMARITAN_ID = 172; // 0xac
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SAURASHTRA;
-    field public static final int SAURASHTRA_ID = 161; // 0xa1
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SHARADA;
-    field public static final int SHARADA_ID = 217; // 0xd9
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SHAVIAN;
-    field public static final int SHAVIAN_ID = 121; // 0x79
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SHORTHAND_FORMAT_CONTROLS;
-    field public static final int SHORTHAND_FORMAT_CONTROLS_ID = 247; // 0xf7
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SIDDHAM;
-    field public static final int SIDDHAM_ID = 248; // 0xf8
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SINHALA;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SINHALA_ARCHAIC_NUMBERS;
-    field public static final int SINHALA_ARCHAIC_NUMBERS_ID = 249; // 0xf9
-    field public static final int SINHALA_ID = 24; // 0x18
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SMALL_FORM_VARIANTS;
-    field public static final int SMALL_FORM_VARIANTS_ID = 84; // 0x54
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SMALL_KANA_EXTENSION;
-    field public static final int SMALL_KANA_EXTENSION_ID = 297; // 0x129
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SOGDIAN;
-    field public static final int SOGDIAN_ID = 291; // 0x123
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SORA_SOMPENG;
-    field public static final int SORA_SOMPENG_ID = 218; // 0xda
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SOYOMBO;
-    field public static final int SOYOMBO_ID = 278; // 0x116
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SPACING_MODIFIER_LETTERS;
-    field public static final int SPACING_MODIFIER_LETTERS_ID = 6; // 0x6
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SPECIALS;
-    field public static final int SPECIALS_ID = 86; // 0x56
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUNDANESE;
-    field public static final int SUNDANESE_ID = 155; // 0x9b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUNDANESE_SUPPLEMENT;
-    field public static final int SUNDANESE_SUPPLEMENT_ID = 219; // 0xdb
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS;
-    field public static final int SUPERSCRIPTS_AND_SUBSCRIPTS_ID = 41; // 0x29
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_ARROWS_A;
-    field public static final int SUPPLEMENTAL_ARROWS_A_ID = 103; // 0x67
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_ARROWS_B;
-    field public static final int SUPPLEMENTAL_ARROWS_B_ID = 104; // 0x68
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_ARROWS_C;
-    field public static final int SUPPLEMENTAL_ARROWS_C_ID = 250; // 0xfa
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS;
-    field public static final int SUPPLEMENTAL_MATHEMATICAL_OPERATORS_ID = 106; // 0x6a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_PUNCTUATION;
-    field public static final int SUPPLEMENTAL_PUNCTUATION_ID = 142; // 0x8e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS;
-    field public static final int SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS_ID = 261; // 0x105
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A;
-    field public static final int SUPPLEMENTARY_PRIVATE_USE_AREA_A_ID = 109; // 0x6d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B;
-    field public static final int SUPPLEMENTARY_PRIVATE_USE_AREA_B_ID = 110; // 0x6e
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SUTTON_SIGNWRITING;
-    field public static final int SUTTON_SIGNWRITING_ID = 262; // 0x106
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SYLOTI_NAGRI;
-    field public static final int SYLOTI_NAGRI_ID = 143; // 0x8f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A;
-    field public static final int SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A_ID = 298; // 0x12a
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SYMBOLS_FOR_LEGACY_COMPUTING;
-    field public static final int SYMBOLS_FOR_LEGACY_COMPUTING_ID = 306; // 0x132
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SYRIAC;
-    field public static final int SYRIAC_ID = 13; // 0xd
-    field public static final android.icu.lang.UCharacter.UnicodeBlock SYRIAC_SUPPLEMENT;
-    field public static final int SYRIAC_SUPPLEMENT_ID = 279; // 0x117
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAGALOG;
-    field public static final int TAGALOG_ID = 98; // 0x62
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAGBANWA;
-    field public static final int TAGBANWA_ID = 101; // 0x65
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAGS;
-    field public static final int TAGS_ID = 96; // 0x60
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAI_LE;
-    field public static final int TAI_LE_ID = 112; // 0x70
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAI_THAM;
-    field public static final int TAI_THAM_ID = 174; // 0xae
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAI_VIET;
-    field public static final int TAI_VIET_ID = 183; // 0xb7
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAI_XUAN_JING_SYMBOLS;
-    field public static final int TAI_XUAN_JING_SYMBOLS_ID = 124; // 0x7c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAKRI;
-    field public static final int TAKRI_ID = 220; // 0xdc
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAMIL;
-    field public static final int TAMIL_ID = 20; // 0x14
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TAMIL_SUPPLEMENT;
-    field public static final int TAMIL_SUPPLEMENT_ID = 299; // 0x12b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TANGUT;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TANGUT_COMPONENTS;
-    field public static final int TANGUT_COMPONENTS_ID = 273; // 0x111
-    field public static final int TANGUT_ID = 272; // 0x110
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TANGUT_SUPPLEMENT;
-    field public static final int TANGUT_SUPPLEMENT_ID = 307; // 0x133
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TELUGU;
-    field public static final int TELUGU_ID = 21; // 0x15
-    field public static final android.icu.lang.UCharacter.UnicodeBlock THAANA;
-    field public static final int THAANA_ID = 14; // 0xe
-    field public static final android.icu.lang.UCharacter.UnicodeBlock THAI;
-    field public static final int THAI_ID = 25; // 0x19
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TIBETAN;
-    field public static final int TIBETAN_ID = 27; // 0x1b
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TIFINAGH;
-    field public static final int TIFINAGH_ID = 144; // 0x90
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TIRHUTA;
-    field public static final int TIRHUTA_ID = 251; // 0xfb
-    field public static final android.icu.lang.UCharacter.UnicodeBlock TRANSPORT_AND_MAP_SYMBOLS;
-    field public static final int TRANSPORT_AND_MAP_SYMBOLS_ID = 207; // 0xcf
-    field public static final android.icu.lang.UCharacter.UnicodeBlock UGARITIC;
-    field public static final int UGARITIC_ID = 120; // 0x78
-    field public static final android.icu.lang.UCharacter.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS;
-    field public static final android.icu.lang.UCharacter.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED;
-    field public static final int UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_ID = 173; // 0xad
-    field public static final int UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_ID = 33; // 0x21
-    field public static final android.icu.lang.UCharacter.UnicodeBlock VAI;
-    field public static final int VAI_ID = 159; // 0x9f
-    field public static final android.icu.lang.UCharacter.UnicodeBlock VARIATION_SELECTORS;
-    field public static final int VARIATION_SELECTORS_ID = 108; // 0x6c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT;
-    field public static final int VARIATION_SELECTORS_SUPPLEMENT_ID = 125; // 0x7d
-    field public static final android.icu.lang.UCharacter.UnicodeBlock VEDIC_EXTENSIONS;
-    field public static final int VEDIC_EXTENSIONS_ID = 175; // 0xaf
-    field public static final android.icu.lang.UCharacter.UnicodeBlock VERTICAL_FORMS;
-    field public static final int VERTICAL_FORMS_ID = 145; // 0x91
-    field public static final android.icu.lang.UCharacter.UnicodeBlock WANCHO;
-    field public static final int WANCHO_ID = 300; // 0x12c
-    field public static final android.icu.lang.UCharacter.UnicodeBlock WARANG_CITI;
-    field public static final int WARANG_CITI_ID = 252; // 0xfc
-    field public static final android.icu.lang.UCharacter.UnicodeBlock YEZIDI;
-    field public static final int YEZIDI_ID = 308; // 0x134
-    field public static final android.icu.lang.UCharacter.UnicodeBlock YIJING_HEXAGRAM_SYMBOLS;
-    field public static final int YIJING_HEXAGRAM_SYMBOLS_ID = 116; // 0x74
-    field public static final android.icu.lang.UCharacter.UnicodeBlock YI_RADICALS;
-    field public static final int YI_RADICALS_ID = 73; // 0x49
-    field public static final android.icu.lang.UCharacter.UnicodeBlock YI_SYLLABLES;
-    field public static final int YI_SYLLABLES_ID = 72; // 0x48
-    field public static final android.icu.lang.UCharacter.UnicodeBlock ZANABAZAR_SQUARE;
-    field public static final int ZANABAZAR_SQUARE_ID = 280; // 0x118
-  }
-
-  public static interface UCharacter.VerticalOrientation {
-    field public static final int ROTATED = 0; // 0x0
-    field public static final int TRANSFORMED_ROTATED = 1; // 0x1
-    field public static final int TRANSFORMED_UPRIGHT = 2; // 0x2
-    field public static final int UPRIGHT = 3; // 0x3
-  }
-
-  public static interface UCharacter.WordBreak {
-    field public static final int ALETTER = 1; // 0x1
-    field public static final int CR = 8; // 0x8
-    field public static final int DOUBLE_QUOTE = 16; // 0x10
-    field public static final int EXTEND = 9; // 0x9
-    field public static final int EXTENDNUMLET = 7; // 0x7
-    field public static final int E_BASE = 17; // 0x11
-    field public static final int E_BASE_GAZ = 18; // 0x12
-    field public static final int E_MODIFIER = 19; // 0x13
-    field public static final int FORMAT = 2; // 0x2
-    field public static final int GLUE_AFTER_ZWJ = 20; // 0x14
-    field public static final int HEBREW_LETTER = 14; // 0xe
-    field public static final int KATAKANA = 3; // 0x3
-    field public static final int LF = 10; // 0xa
-    field public static final int MIDLETTER = 4; // 0x4
-    field public static final int MIDNUM = 5; // 0x5
-    field public static final int MIDNUMLET = 11; // 0xb
-    field public static final int NEWLINE = 12; // 0xc
-    field public static final int NUMERIC = 6; // 0x6
-    field public static final int OTHER = 0; // 0x0
-    field public static final int REGIONAL_INDICATOR = 13; // 0xd
-    field public static final int SINGLE_QUOTE = 15; // 0xf
-    field public static final int WSEGSPACE = 22; // 0x16
-    field public static final int ZWJ = 21; // 0x15
-  }
-
-  public final class UCharacterCategory implements android.icu.lang.UCharacterEnums.ECharacterCategory {
-    method public static String toString(int);
-  }
-
-  public final class UCharacterDirection implements android.icu.lang.UCharacterEnums.ECharacterDirection {
-    method public static String toString(int);
-  }
-
-  public class UCharacterEnums {
-  }
-
-  public static interface UCharacterEnums.ECharacterCategory {
-    field public static final byte COMBINING_SPACING_MARK = 8; // 0x8
-    field public static final byte CONNECTOR_PUNCTUATION = 22; // 0x16
-    field public static final byte CONTROL = 15; // 0xf
-    field public static final byte CURRENCY_SYMBOL = 25; // 0x19
-    field public static final byte DASH_PUNCTUATION = 19; // 0x13
-    field public static final byte DECIMAL_DIGIT_NUMBER = 9; // 0x9
-    field public static final byte ENCLOSING_MARK = 7; // 0x7
-    field public static final byte END_PUNCTUATION = 21; // 0x15
-    field public static final byte FINAL_PUNCTUATION = 29; // 0x1d
-    field public static final byte FINAL_QUOTE_PUNCTUATION = 29; // 0x1d
-    field public static final byte FORMAT = 16; // 0x10
-    field public static final byte GENERAL_OTHER_TYPES = 0; // 0x0
-    field public static final byte INITIAL_PUNCTUATION = 28; // 0x1c
-    field public static final byte INITIAL_QUOTE_PUNCTUATION = 28; // 0x1c
-    field public static final byte LETTER_NUMBER = 10; // 0xa
-    field public static final byte LINE_SEPARATOR = 13; // 0xd
-    field public static final byte LOWERCASE_LETTER = 2; // 0x2
-    field public static final byte MATH_SYMBOL = 24; // 0x18
-    field public static final byte MODIFIER_LETTER = 4; // 0x4
-    field public static final byte MODIFIER_SYMBOL = 26; // 0x1a
-    field public static final byte NON_SPACING_MARK = 6; // 0x6
-    field public static final byte OTHER_LETTER = 5; // 0x5
-    field public static final byte OTHER_NUMBER = 11; // 0xb
-    field public static final byte OTHER_PUNCTUATION = 23; // 0x17
-    field public static final byte OTHER_SYMBOL = 27; // 0x1b
-    field public static final byte PARAGRAPH_SEPARATOR = 14; // 0xe
-    field public static final byte PRIVATE_USE = 17; // 0x11
-    field public static final byte SPACE_SEPARATOR = 12; // 0xc
-    field public static final byte START_PUNCTUATION = 20; // 0x14
-    field public static final byte SURROGATE = 18; // 0x12
-    field public static final byte TITLECASE_LETTER = 3; // 0x3
-    field public static final byte UNASSIGNED = 0; // 0x0
-    field public static final byte UPPERCASE_LETTER = 1; // 0x1
-  }
-
-  public static interface UCharacterEnums.ECharacterDirection {
-    field public static final int ARABIC_NUMBER = 5; // 0x5
-    field public static final int BLOCK_SEPARATOR = 7; // 0x7
-    field public static final int BOUNDARY_NEUTRAL = 18; // 0x12
-    field public static final int COMMON_NUMBER_SEPARATOR = 6; // 0x6
-    field public static final byte DIRECTIONALITY_ARABIC_NUMBER = 5; // 0x5
-    field public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = 18; // 0x12
-    field public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 6; // 0x6
-    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = 2; // 0x2
-    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 3; // 0x3
-    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 4; // 0x4
-    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = 0; // 0x0
-    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 11; // 0xb
-    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 12; // 0xc
-    field public static final byte DIRECTIONALITY_NONSPACING_MARK = 17; // 0x11
-    field public static final byte DIRECTIONALITY_OTHER_NEUTRALS = 10; // 0xa
-    field public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 7; // 0x7
-    field public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 16; // 0x10
-    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = 1; // 0x1
-    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 13; // 0xd
-    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 14; // 0xe
-    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 15; // 0xf
-    field public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = 8; // 0x8
-    field public static final byte DIRECTIONALITY_UNDEFINED = -1; // 0xffffffff
-    field public static final byte DIRECTIONALITY_WHITESPACE = 9; // 0x9
-    field public static final int DIR_NON_SPACING_MARK = 17; // 0x11
-    field public static final int EUROPEAN_NUMBER = 2; // 0x2
-    field public static final int EUROPEAN_NUMBER_SEPARATOR = 3; // 0x3
-    field public static final int EUROPEAN_NUMBER_TERMINATOR = 4; // 0x4
-    field public static final byte FIRST_STRONG_ISOLATE = 19; // 0x13
-    field public static final int LEFT_TO_RIGHT = 0; // 0x0
-    field public static final int LEFT_TO_RIGHT_EMBEDDING = 11; // 0xb
-    field public static final byte LEFT_TO_RIGHT_ISOLATE = 20; // 0x14
-    field public static final int LEFT_TO_RIGHT_OVERRIDE = 12; // 0xc
-    field public static final int OTHER_NEUTRAL = 10; // 0xa
-    field public static final int POP_DIRECTIONAL_FORMAT = 16; // 0x10
-    field public static final byte POP_DIRECTIONAL_ISOLATE = 22; // 0x16
-    field public static final int RIGHT_TO_LEFT = 1; // 0x1
-    field public static final int RIGHT_TO_LEFT_ARABIC = 13; // 0xd
-    field public static final int RIGHT_TO_LEFT_EMBEDDING = 14; // 0xe
-    field public static final byte RIGHT_TO_LEFT_ISOLATE = 21; // 0x15
-    field public static final int RIGHT_TO_LEFT_OVERRIDE = 15; // 0xf
-    field public static final int SEGMENT_SEPARATOR = 8; // 0x8
-    field public static final int WHITE_SPACE_NEUTRAL = 9; // 0x9
-  }
-
-  public interface UProperty {
-    field public static final int AGE = 16384; // 0x4000
-    field public static final int ALPHABETIC = 0; // 0x0
-    field public static final int ASCII_HEX_DIGIT = 1; // 0x1
-    field public static final int BIDI_CLASS = 4096; // 0x1000
-    field public static final int BIDI_CONTROL = 2; // 0x2
-    field public static final int BIDI_MIRRORED = 3; // 0x3
-    field public static final int BIDI_MIRRORING_GLYPH = 16385; // 0x4001
-    field public static final int BIDI_PAIRED_BRACKET = 16397; // 0x400d
-    field public static final int BIDI_PAIRED_BRACKET_TYPE = 4117; // 0x1015
-    field public static final int BINARY_START = 0; // 0x0
-    field public static final int BLOCK = 4097; // 0x1001
-    field public static final int CANONICAL_COMBINING_CLASS = 4098; // 0x1002
-    field public static final int CASED = 49; // 0x31
-    field public static final int CASE_FOLDING = 16386; // 0x4002
-    field public static final int CASE_IGNORABLE = 50; // 0x32
-    field public static final int CASE_SENSITIVE = 34; // 0x22
-    field public static final int CHANGES_WHEN_CASEFOLDED = 54; // 0x36
-    field public static final int CHANGES_WHEN_CASEMAPPED = 55; // 0x37
-    field public static final int CHANGES_WHEN_LOWERCASED = 51; // 0x33
-    field public static final int CHANGES_WHEN_NFKC_CASEFOLDED = 56; // 0x38
-    field public static final int CHANGES_WHEN_TITLECASED = 53; // 0x35
-    field public static final int CHANGES_WHEN_UPPERCASED = 52; // 0x34
-    field public static final int DASH = 4; // 0x4
-    field public static final int DECOMPOSITION_TYPE = 4099; // 0x1003
-    field public static final int DEFAULT_IGNORABLE_CODE_POINT = 5; // 0x5
-    field public static final int DEPRECATED = 6; // 0x6
-    field public static final int DIACRITIC = 7; // 0x7
-    field public static final int DOUBLE_START = 12288; // 0x3000
-    field public static final int EAST_ASIAN_WIDTH = 4100; // 0x1004
-    field public static final int EMOJI = 57; // 0x39
-    field public static final int EMOJI_COMPONENT = 61; // 0x3d
-    field public static final int EMOJI_MODIFIER = 59; // 0x3b
-    field public static final int EMOJI_MODIFIER_BASE = 60; // 0x3c
-    field public static final int EMOJI_PRESENTATION = 58; // 0x3a
-    field public static final int EXTENDED_PICTOGRAPHIC = 64; // 0x40
-    field public static final int EXTENDER = 8; // 0x8
-    field public static final int FULL_COMPOSITION_EXCLUSION = 9; // 0x9
-    field public static final int GENERAL_CATEGORY = 4101; // 0x1005
-    field public static final int GENERAL_CATEGORY_MASK = 8192; // 0x2000
-    field public static final int GRAPHEME_BASE = 10; // 0xa
-    field public static final int GRAPHEME_CLUSTER_BREAK = 4114; // 0x1012
-    field public static final int GRAPHEME_EXTEND = 11; // 0xb
-    field public static final int GRAPHEME_LINK = 12; // 0xc
-    field public static final int HANGUL_SYLLABLE_TYPE = 4107; // 0x100b
-    field public static final int HEX_DIGIT = 13; // 0xd
-    field public static final int HYPHEN = 14; // 0xe
-    field public static final int IDEOGRAPHIC = 17; // 0x11
-    field public static final int IDS_BINARY_OPERATOR = 18; // 0x12
-    field public static final int IDS_TRINARY_OPERATOR = 19; // 0x13
-    field public static final int ID_CONTINUE = 15; // 0xf
-    field public static final int ID_START = 16; // 0x10
-    field public static final int INDIC_POSITIONAL_CATEGORY = 4118; // 0x1016
-    field public static final int INDIC_SYLLABIC_CATEGORY = 4119; // 0x1017
-    field public static final int INT_START = 4096; // 0x1000
-    field public static final int JOINING_GROUP = 4102; // 0x1006
-    field public static final int JOINING_TYPE = 4103; // 0x1007
-    field public static final int JOIN_CONTROL = 20; // 0x14
-    field public static final int LEAD_CANONICAL_COMBINING_CLASS = 4112; // 0x1010
-    field public static final int LINE_BREAK = 4104; // 0x1008
-    field public static final int LOGICAL_ORDER_EXCEPTION = 21; // 0x15
-    field public static final int LOWERCASE = 22; // 0x16
-    field public static final int LOWERCASE_MAPPING = 16388; // 0x4004
-    field public static final int MASK_START = 8192; // 0x2000
-    field public static final int MATH = 23; // 0x17
-    field public static final int NAME = 16389; // 0x4005
-    field public static final int NFC_INERT = 39; // 0x27
-    field public static final int NFC_QUICK_CHECK = 4110; // 0x100e
-    field public static final int NFD_INERT = 37; // 0x25
-    field public static final int NFD_QUICK_CHECK = 4108; // 0x100c
-    field public static final int NFKC_INERT = 40; // 0x28
-    field public static final int NFKC_QUICK_CHECK = 4111; // 0x100f
-    field public static final int NFKD_INERT = 38; // 0x26
-    field public static final int NFKD_QUICK_CHECK = 4109; // 0x100d
-    field public static final int NONCHARACTER_CODE_POINT = 24; // 0x18
-    field public static final int NUMERIC_TYPE = 4105; // 0x1009
-    field public static final int NUMERIC_VALUE = 12288; // 0x3000
-    field public static final int OTHER_PROPERTY_START = 28672; // 0x7000
-    field public static final int PATTERN_SYNTAX = 42; // 0x2a
-    field public static final int PATTERN_WHITE_SPACE = 43; // 0x2b
-    field public static final int POSIX_ALNUM = 44; // 0x2c
-    field public static final int POSIX_BLANK = 45; // 0x2d
-    field public static final int POSIX_GRAPH = 46; // 0x2e
-    field public static final int POSIX_PRINT = 47; // 0x2f
-    field public static final int POSIX_XDIGIT = 48; // 0x30
-    field public static final int PREPENDED_CONCATENATION_MARK = 63; // 0x3f
-    field public static final int QUOTATION_MARK = 25; // 0x19
-    field public static final int RADICAL = 26; // 0x1a
-    field public static final int REGIONAL_INDICATOR = 62; // 0x3e
-    field public static final int SCRIPT = 4106; // 0x100a
-    field public static final int SCRIPT_EXTENSIONS = 28672; // 0x7000
-    field public static final int SEGMENT_STARTER = 41; // 0x29
-    field public static final int SENTENCE_BREAK = 4115; // 0x1013
-    field public static final int SIMPLE_CASE_FOLDING = 16390; // 0x4006
-    field public static final int SIMPLE_LOWERCASE_MAPPING = 16391; // 0x4007
-    field public static final int SIMPLE_TITLECASE_MAPPING = 16392; // 0x4008
-    field public static final int SIMPLE_UPPERCASE_MAPPING = 16393; // 0x4009
-    field public static final int SOFT_DOTTED = 27; // 0x1b
-    field public static final int STRING_START = 16384; // 0x4000
-    field public static final int S_TERM = 35; // 0x23
-    field public static final int TERMINAL_PUNCTUATION = 28; // 0x1c
-    field public static final int TITLECASE_MAPPING = 16394; // 0x400a
-    field public static final int TRAIL_CANONICAL_COMBINING_CLASS = 4113; // 0x1011
-    field public static final int UNIFIED_IDEOGRAPH = 29; // 0x1d
-    field public static final int UPPERCASE = 30; // 0x1e
-    field public static final int UPPERCASE_MAPPING = 16396; // 0x400c
-    field public static final int VARIATION_SELECTOR = 36; // 0x24
-    field public static final int VERTICAL_ORIENTATION = 4120; // 0x1018
-    field public static final int WHITE_SPACE = 31; // 0x1f
-    field public static final int WORD_BREAK = 4116; // 0x1014
-    field public static final int XID_CONTINUE = 32; // 0x20
-    field public static final int XID_START = 33; // 0x21
-  }
-
-  public static interface UProperty.NameChoice {
-    field public static final int LONG = 1; // 0x1
-    field public static final int SHORT = 0; // 0x0
-  }
-
-  public final class UScript {
-    method public static boolean breaksBetweenLetters(int);
-    method public static int[] getCode(java.util.Locale);
-    method public static int[] getCode(android.icu.util.ULocale);
-    method public static int[] getCode(String);
-    method public static int getCodeFromName(String);
-    method public static String getName(int);
-    method public static String getSampleString(int);
-    method public static int getScript(int);
-    method public static int getScriptExtensions(int, java.util.BitSet);
-    method public static String getShortName(int);
-    method public static android.icu.lang.UScript.ScriptUsage getUsage(int);
-    method public static boolean hasScript(int, int);
-    method public static boolean isCased(int);
-    method public static boolean isRightToLeft(int);
-    field public static final int ADLAM = 167; // 0xa7
-    field public static final int AFAKA = 147; // 0x93
-    field public static final int AHOM = 161; // 0xa1
-    field public static final int ANATOLIAN_HIEROGLYPHS = 156; // 0x9c
-    field public static final int ARABIC = 2; // 0x2
-    field public static final int ARMENIAN = 3; // 0x3
-    field public static final int AVESTAN = 117; // 0x75
-    field public static final int BALINESE = 62; // 0x3e
-    field public static final int BAMUM = 130; // 0x82
-    field public static final int BASSA_VAH = 134; // 0x86
-    field public static final int BATAK = 63; // 0x3f
-    field public static final int BENGALI = 4; // 0x4
-    field public static final int BHAIKSUKI = 168; // 0xa8
-    field public static final int BLISSYMBOLS = 64; // 0x40
-    field public static final int BOOK_PAHLAVI = 124; // 0x7c
-    field public static final int BOPOMOFO = 5; // 0x5
-    field public static final int BRAHMI = 65; // 0x41
-    field public static final int BRAILLE = 46; // 0x2e
-    field public static final int BUGINESE = 55; // 0x37
-    field public static final int BUHID = 44; // 0x2c
-    field public static final int CANADIAN_ABORIGINAL = 40; // 0x28
-    field public static final int CARIAN = 104; // 0x68
-    field public static final int CAUCASIAN_ALBANIAN = 159; // 0x9f
-    field public static final int CHAKMA = 118; // 0x76
-    field public static final int CHAM = 66; // 0x42
-    field public static final int CHEROKEE = 6; // 0x6
-    field public static final int CHORASMIAN = 189; // 0xbd
-    field public static final int CIRTH = 67; // 0x43
-    field public static final int COMMON = 0; // 0x0
-    field public static final int COPTIC = 7; // 0x7
-    field public static final int CUNEIFORM = 101; // 0x65
-    field public static final int CYPRIOT = 47; // 0x2f
-    field public static final int CYRILLIC = 8; // 0x8
-    field public static final int DEMOTIC_EGYPTIAN = 69; // 0x45
-    field public static final int DESERET = 9; // 0x9
-    field public static final int DEVANAGARI = 10; // 0xa
-    field public static final int DIVES_AKURU = 190; // 0xbe
-    field public static final int DOGRA = 178; // 0xb2
-    field public static final int DUPLOYAN = 135; // 0x87
-    field public static final int EASTERN_SYRIAC = 97; // 0x61
-    field public static final int EGYPTIAN_HIEROGLYPHS = 71; // 0x47
-    field public static final int ELBASAN = 136; // 0x88
-    field public static final int ELYMAIC = 185; // 0xb9
-    field public static final int ESTRANGELO_SYRIAC = 95; // 0x5f
-    field public static final int ETHIOPIC = 11; // 0xb
-    field public static final int GEORGIAN = 12; // 0xc
-    field public static final int GLAGOLITIC = 56; // 0x38
-    field public static final int GOTHIC = 13; // 0xd
-    field public static final int GRANTHA = 137; // 0x89
-    field public static final int GREEK = 14; // 0xe
-    field public static final int GUJARATI = 15; // 0xf
-    field public static final int GUNJALA_GONDI = 179; // 0xb3
-    field public static final int GURMUKHI = 16; // 0x10
-    field public static final int HAN = 17; // 0x11
-    field public static final int HANGUL = 18; // 0x12
-    field public static final int HANIFI_ROHINGYA = 182; // 0xb6
-    field public static final int HANUNOO = 43; // 0x2b
-    field public static final int HAN_WITH_BOPOMOFO = 172; // 0xac
-    field public static final int HARAPPAN_INDUS = 77; // 0x4d
-    field public static final int HATRAN = 162; // 0xa2
-    field public static final int HEBREW = 19; // 0x13
-    field public static final int HIERATIC_EGYPTIAN = 70; // 0x46
-    field public static final int HIRAGANA = 20; // 0x14
-    field public static final int IMPERIAL_ARAMAIC = 116; // 0x74
-    field public static final int INHERITED = 1; // 0x1
-    field public static final int INSCRIPTIONAL_PAHLAVI = 122; // 0x7a
-    field public static final int INSCRIPTIONAL_PARTHIAN = 125; // 0x7d
-    field public static final int INVALID_CODE = -1; // 0xffffffff
-    field public static final int JAMO = 173; // 0xad
-    field public static final int JAPANESE = 105; // 0x69
-    field public static final int JAVANESE = 78; // 0x4e
-    field public static final int JURCHEN = 148; // 0x94
-    field public static final int KAITHI = 120; // 0x78
-    field public static final int KANNADA = 21; // 0x15
-    field public static final int KATAKANA = 22; // 0x16
-    field public static final int KATAKANA_OR_HIRAGANA = 54; // 0x36
-    field public static final int KAYAH_LI = 79; // 0x4f
-    field public static final int KHAROSHTHI = 57; // 0x39
-    field public static final int KHITAN_SMALL_SCRIPT = 191; // 0xbf
-    field public static final int KHMER = 23; // 0x17
-    field public static final int KHOJKI = 157; // 0x9d
-    field public static final int KHUDAWADI = 145; // 0x91
-    field public static final int KHUTSURI = 72; // 0x48
-    field public static final int KOREAN = 119; // 0x77
-    field public static final int KPELLE = 138; // 0x8a
-    field public static final int LANNA = 106; // 0x6a
-    field public static final int LAO = 24; // 0x18
-    field public static final int LATIN = 25; // 0x19
-    field public static final int LATIN_FRAKTUR = 80; // 0x50
-    field public static final int LATIN_GAELIC = 81; // 0x51
-    field public static final int LEPCHA = 82; // 0x52
-    field public static final int LIMBU = 48; // 0x30
-    field public static final int LINEAR_A = 83; // 0x53
-    field public static final int LINEAR_B = 49; // 0x31
-    field public static final int LISU = 131; // 0x83
-    field public static final int LOMA = 139; // 0x8b
-    field public static final int LYCIAN = 107; // 0x6b
-    field public static final int LYDIAN = 108; // 0x6c
-    field public static final int MAHAJANI = 160; // 0xa0
-    field public static final int MAKASAR = 180; // 0xb4
-    field public static final int MALAYALAM = 26; // 0x1a
-    field public static final int MANDAEAN = 84; // 0x54
-    field public static final int MANDAIC = 84; // 0x54
-    field public static final int MANICHAEAN = 121; // 0x79
-    field public static final int MARCHEN = 169; // 0xa9
-    field public static final int MASARAM_GONDI = 175; // 0xaf
-    field public static final int MATHEMATICAL_NOTATION = 128; // 0x80
-    field public static final int MAYAN_HIEROGLYPHS = 85; // 0x55
-    field public static final int MEDEFAIDRIN = 181; // 0xb5
-    field public static final int MEITEI_MAYEK = 115; // 0x73
-    field public static final int MENDE = 140; // 0x8c
-    field public static final int MEROITIC = 86; // 0x56
-    field public static final int MEROITIC_CURSIVE = 141; // 0x8d
-    field public static final int MEROITIC_HIEROGLYPHS = 86; // 0x56
-    field public static final int MIAO = 92; // 0x5c
-    field public static final int MODI = 163; // 0xa3
-    field public static final int MONGOLIAN = 27; // 0x1b
-    field public static final int MOON = 114; // 0x72
-    field public static final int MRO = 149; // 0x95
-    field public static final int MULTANI = 164; // 0xa4
-    field public static final int MYANMAR = 28; // 0x1c
-    field public static final int NABATAEAN = 143; // 0x8f
-    field public static final int NAKHI_GEBA = 132; // 0x84
-    field public static final int NANDINAGARI = 187; // 0xbb
-    field public static final int NEWA = 170; // 0xaa
-    field public static final int NEW_TAI_LUE = 59; // 0x3b
-    field public static final int NKO = 87; // 0x57
-    field public static final int NUSHU = 150; // 0x96
-    field public static final int NYIAKENG_PUACHUE_HMONG = 186; // 0xba
-    field public static final int OGHAM = 29; // 0x1d
-    field public static final int OLD_CHURCH_SLAVONIC_CYRILLIC = 68; // 0x44
-    field public static final int OLD_HUNGARIAN = 76; // 0x4c
-    field public static final int OLD_ITALIC = 30; // 0x1e
-    field public static final int OLD_NORTH_ARABIAN = 142; // 0x8e
-    field public static final int OLD_PERMIC = 89; // 0x59
-    field public static final int OLD_PERSIAN = 61; // 0x3d
-    field public static final int OLD_SOGDIAN = 184; // 0xb8
-    field public static final int OLD_SOUTH_ARABIAN = 133; // 0x85
-    field public static final int OL_CHIKI = 109; // 0x6d
-    field public static final int ORIYA = 31; // 0x1f
-    field public static final int ORKHON = 88; // 0x58
-    field public static final int OSAGE = 171; // 0xab
-    field public static final int OSMANYA = 50; // 0x32
-    field public static final int PAHAWH_HMONG = 75; // 0x4b
-    field public static final int PALMYRENE = 144; // 0x90
-    field public static final int PAU_CIN_HAU = 165; // 0xa5
-    field public static final int PHAGS_PA = 90; // 0x5a
-    field public static final int PHOENICIAN = 91; // 0x5b
-    field public static final int PHONETIC_POLLARD = 92; // 0x5c
-    field public static final int PSALTER_PAHLAVI = 123; // 0x7b
-    field public static final int REJANG = 110; // 0x6e
-    field public static final int RONGORONGO = 93; // 0x5d
-    field public static final int RUNIC = 32; // 0x20
-    field public static final int SAMARITAN = 126; // 0x7e
-    field public static final int SARATI = 94; // 0x5e
-    field public static final int SAURASHTRA = 111; // 0x6f
-    field public static final int SHARADA = 151; // 0x97
-    field public static final int SHAVIAN = 51; // 0x33
-    field public static final int SIDDHAM = 166; // 0xa6
-    field public static final int SIGN_WRITING = 112; // 0x70
-    field public static final int SIMPLIFIED_HAN = 73; // 0x49
-    field public static final int SINDHI = 145; // 0x91
-    field public static final int SINHALA = 33; // 0x21
-    field public static final int SOGDIAN = 183; // 0xb7
-    field public static final int SORA_SOMPENG = 152; // 0x98
-    field public static final int SOYOMBO = 176; // 0xb0
-    field public static final int SUNDANESE = 113; // 0x71
-    field public static final int SYLOTI_NAGRI = 58; // 0x3a
-    field public static final int SYMBOLS = 129; // 0x81
-    field public static final int SYMBOLS_EMOJI = 174; // 0xae
-    field public static final int SYRIAC = 34; // 0x22
-    field public static final int TAGALOG = 42; // 0x2a
-    field public static final int TAGBANWA = 45; // 0x2d
-    field public static final int TAI_LE = 52; // 0x34
-    field public static final int TAI_VIET = 127; // 0x7f
-    field public static final int TAKRI = 153; // 0x99
-    field public static final int TAMIL = 35; // 0x23
-    field public static final int TANGUT = 154; // 0x9a
-    field public static final int TELUGU = 36; // 0x24
-    field public static final int TENGWAR = 98; // 0x62
-    field public static final int THAANA = 37; // 0x25
-    field public static final int THAI = 38; // 0x26
-    field public static final int TIBETAN = 39; // 0x27
-    field public static final int TIFINAGH = 60; // 0x3c
-    field public static final int TIRHUTA = 158; // 0x9e
-    field public static final int TRADITIONAL_HAN = 74; // 0x4a
-    field public static final int UCAS = 40; // 0x28
-    field public static final int UGARITIC = 53; // 0x35
-    field public static final int UNKNOWN = 103; // 0x67
-    field public static final int UNWRITTEN_LANGUAGES = 102; // 0x66
-    field public static final int VAI = 99; // 0x63
-    field public static final int VISIBLE_SPEECH = 100; // 0x64
-    field public static final int WANCHO = 188; // 0xbc
-    field public static final int WARANG_CITI = 146; // 0x92
-    field public static final int WESTERN_SYRIAC = 96; // 0x60
-    field public static final int WOLEAI = 155; // 0x9b
-    field public static final int YEZIDI = 192; // 0xc0
-    field public static final int YI = 41; // 0x29
-    field public static final int ZANABAZAR_SQUARE = 177; // 0xb1
-  }
-
-  public enum UScript.ScriptUsage {
-    enum_constant public static final android.icu.lang.UScript.ScriptUsage ASPIRATIONAL;
-    enum_constant public static final android.icu.lang.UScript.ScriptUsage EXCLUDED;
-    enum_constant public static final android.icu.lang.UScript.ScriptUsage LIMITED_USE;
-    enum_constant public static final android.icu.lang.UScript.ScriptUsage NOT_ENCODED;
-    enum_constant public static final android.icu.lang.UScript.ScriptUsage RECOMMENDED;
-    enum_constant public static final android.icu.lang.UScript.ScriptUsage UNKNOWN;
-  }
-
-}
-
-package android.icu.math {
-
-  public class BigDecimal extends java.lang.Number implements java.lang.Comparable<android.icu.math.BigDecimal> java.io.Serializable {
-    ctor public BigDecimal(java.math.BigDecimal);
-    ctor public BigDecimal(java.math.BigInteger);
-    ctor public BigDecimal(java.math.BigInteger, int);
-    ctor public BigDecimal(char[]);
-    ctor public BigDecimal(char[], int, int);
-    ctor public BigDecimal(double);
-    ctor public BigDecimal(int);
-    ctor public BigDecimal(long);
-    ctor public BigDecimal(String);
-    method public android.icu.math.BigDecimal abs();
-    method public android.icu.math.BigDecimal abs(android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal add(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal add(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public byte byteValueExact();
-    method public int compareTo(android.icu.math.BigDecimal);
-    method public int compareTo(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal divide(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal divide(android.icu.math.BigDecimal, int);
-    method public android.icu.math.BigDecimal divide(android.icu.math.BigDecimal, int, int);
-    method public android.icu.math.BigDecimal divide(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal divideInteger(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal divideInteger(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public double doubleValue();
-    method public float floatValue();
-    method public String format(int, int);
-    method public String format(int, int, int, int, int, int);
-    method public int intValue();
-    method public int intValueExact();
-    method public long longValue();
-    method public long longValueExact();
-    method public android.icu.math.BigDecimal max(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal max(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal min(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal min(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal movePointLeft(int);
-    method public android.icu.math.BigDecimal movePointRight(int);
-    method public android.icu.math.BigDecimal multiply(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal multiply(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal negate();
-    method public android.icu.math.BigDecimal negate(android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal plus();
-    method public android.icu.math.BigDecimal plus(android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal pow(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal pow(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public android.icu.math.BigDecimal remainder(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal remainder(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public int scale();
-    method public android.icu.math.BigDecimal setScale(int);
-    method public android.icu.math.BigDecimal setScale(int, int);
-    method public short shortValueExact();
-    method public int signum();
-    method public android.icu.math.BigDecimal subtract(android.icu.math.BigDecimal);
-    method public android.icu.math.BigDecimal subtract(android.icu.math.BigDecimal, android.icu.math.MathContext);
-    method public java.math.BigDecimal toBigDecimal();
-    method public java.math.BigInteger toBigInteger();
-    method public java.math.BigInteger toBigIntegerExact();
-    method public char[] toCharArray();
-    method public java.math.BigInteger unscaledValue();
-    method public static android.icu.math.BigDecimal valueOf(double);
-    method public static android.icu.math.BigDecimal valueOf(long);
-    method public static android.icu.math.BigDecimal valueOf(long, int);
-    field public static final android.icu.math.BigDecimal ONE;
-    field public static final int ROUND_CEILING = 2; // 0x2
-    field public static final int ROUND_DOWN = 1; // 0x1
-    field public static final int ROUND_FLOOR = 3; // 0x3
-    field public static final int ROUND_HALF_DOWN = 5; // 0x5
-    field public static final int ROUND_HALF_EVEN = 6; // 0x6
-    field public static final int ROUND_HALF_UP = 4; // 0x4
-    field public static final int ROUND_UNNECESSARY = 7; // 0x7
-    field public static final int ROUND_UP = 0; // 0x0
-    field public static final android.icu.math.BigDecimal TEN;
-    field public static final android.icu.math.BigDecimal ZERO;
-  }
-
-  public final class MathContext implements java.io.Serializable {
-    ctor public MathContext(int);
-    ctor public MathContext(int, int);
-    ctor public MathContext(int, int, boolean);
-    ctor public MathContext(int, int, boolean, int);
-    method public int getDigits();
-    method public int getForm();
-    method public boolean getLostDigits();
-    method public int getRoundingMode();
-    field public static final android.icu.math.MathContext DEFAULT;
-    field public static final int ENGINEERING = 2; // 0x2
-    field public static final int PLAIN = 0; // 0x0
-    field public static final int ROUND_CEILING = 2; // 0x2
-    field public static final int ROUND_DOWN = 1; // 0x1
-    field public static final int ROUND_FLOOR = 3; // 0x3
-    field public static final int ROUND_HALF_DOWN = 5; // 0x5
-    field public static final int ROUND_HALF_EVEN = 6; // 0x6
-    field public static final int ROUND_HALF_UP = 4; // 0x4
-    field public static final int ROUND_UNNECESSARY = 7; // 0x7
-    field public static final int ROUND_UP = 0; // 0x0
-    field public static final int SCIENTIFIC = 1; // 0x1
-  }
-
-}
-
-package android.icu.number {
-
-  public class CompactNotation extends android.icu.number.Notation {
-  }
-
-  public abstract class CurrencyPrecision extends android.icu.number.Precision {
-    method public android.icu.number.Precision withCurrency(android.icu.util.Currency);
-  }
-
-  public class FormattedNumber implements java.lang.CharSequence {
-    method public char charAt(int);
-    method public int length();
-    method public CharSequence subSequence(int, int);
-    method public java.math.BigDecimal toBigDecimal();
-    method public java.text.AttributedCharacterIterator toCharacterIterator();
-  }
-
-  public class FormattedNumberRange implements java.lang.CharSequence {
-    method public char charAt(int);
-    method public java.math.BigDecimal getFirstBigDecimal();
-    method public android.icu.number.NumberRangeFormatter.RangeIdentityResult getIdentityResult();
-    method public java.math.BigDecimal getSecondBigDecimal();
-    method public int length();
-    method public CharSequence subSequence(int, int);
-    method public java.text.AttributedCharacterIterator toCharacterIterator();
-  }
-
-  public abstract class FractionPrecision extends android.icu.number.Precision {
-    method public android.icu.number.Precision withMaxDigits(int);
-    method public android.icu.number.Precision withMinDigits(int);
-  }
-
-  public class IntegerWidth {
-    method public android.icu.number.IntegerWidth truncateAt(int);
-    method public static android.icu.number.IntegerWidth zeroFillTo(int);
-  }
-
-  public class LocalizedNumberFormatter extends android.icu.number.NumberFormatterSettings<android.icu.number.LocalizedNumberFormatter> {
-    method public android.icu.number.FormattedNumber format(long);
-    method public android.icu.number.FormattedNumber format(double);
-    method public android.icu.number.FormattedNumber format(Number);
-    method public android.icu.number.FormattedNumber format(android.icu.util.Measure);
-    method public java.text.Format toFormat();
-  }
-
-  public class LocalizedNumberRangeFormatter extends android.icu.number.NumberRangeFormatterSettings<android.icu.number.LocalizedNumberRangeFormatter> {
-    method public android.icu.number.FormattedNumberRange formatRange(int, int);
-    method public android.icu.number.FormattedNumberRange formatRange(double, double);
-    method public android.icu.number.FormattedNumberRange formatRange(Number, Number);
-  }
-
-  public class Notation {
-    method public static android.icu.number.CompactNotation compactLong();
-    method public static android.icu.number.CompactNotation compactShort();
-    method public static android.icu.number.ScientificNotation engineering();
-    method public static android.icu.number.ScientificNotation scientific();
-    method public static android.icu.number.SimpleNotation simple();
-  }
-
-  public final class NumberFormatter {
-    method public static android.icu.number.UnlocalizedNumberFormatter with();
-    method public static android.icu.number.LocalizedNumberFormatter withLocale(java.util.Locale);
-    method public static android.icu.number.LocalizedNumberFormatter withLocale(android.icu.util.ULocale);
-  }
-
-  public enum NumberFormatter.DecimalSeparatorDisplay {
-    enum_constant public static final android.icu.number.NumberFormatter.DecimalSeparatorDisplay ALWAYS;
-    enum_constant public static final android.icu.number.NumberFormatter.DecimalSeparatorDisplay AUTO;
-  }
-
-  public enum NumberFormatter.GroupingStrategy {
-    enum_constant public static final android.icu.number.NumberFormatter.GroupingStrategy AUTO;
-    enum_constant public static final android.icu.number.NumberFormatter.GroupingStrategy MIN2;
-    enum_constant public static final android.icu.number.NumberFormatter.GroupingStrategy OFF;
-    enum_constant public static final android.icu.number.NumberFormatter.GroupingStrategy ON_ALIGNED;
-    enum_constant public static final android.icu.number.NumberFormatter.GroupingStrategy THOUSANDS;
-  }
-
-  public enum NumberFormatter.SignDisplay {
-    enum_constant public static final android.icu.number.NumberFormatter.SignDisplay ACCOUNTING;
-    enum_constant public static final android.icu.number.NumberFormatter.SignDisplay ACCOUNTING_ALWAYS;
-    enum_constant public static final android.icu.number.NumberFormatter.SignDisplay ACCOUNTING_EXCEPT_ZERO;
-    enum_constant public static final android.icu.number.NumberFormatter.SignDisplay ALWAYS;
-    enum_constant public static final android.icu.number.NumberFormatter.SignDisplay AUTO;
-    enum_constant public static final android.icu.number.NumberFormatter.SignDisplay EXCEPT_ZERO;
-    enum_constant public static final android.icu.number.NumberFormatter.SignDisplay NEVER;
-  }
-
-  public enum NumberFormatter.UnitWidth {
-    enum_constant public static final android.icu.number.NumberFormatter.UnitWidth FULL_NAME;
-    enum_constant public static final android.icu.number.NumberFormatter.UnitWidth HIDDEN;
-    enum_constant public static final android.icu.number.NumberFormatter.UnitWidth ISO_CODE;
-    enum_constant public static final android.icu.number.NumberFormatter.UnitWidth NARROW;
-    enum_constant public static final android.icu.number.NumberFormatter.UnitWidth SHORT;
-  }
-
-  public abstract class NumberFormatterSettings<T extends android.icu.number.NumberFormatterSettings<?>> {
-    method public T decimal(android.icu.number.NumberFormatter.DecimalSeparatorDisplay);
-    method public T grouping(android.icu.number.NumberFormatter.GroupingStrategy);
-    method public T integerWidth(android.icu.number.IntegerWidth);
-    method public T notation(android.icu.number.Notation);
-    method public T perUnit(android.icu.util.MeasureUnit);
-    method public T precision(android.icu.number.Precision);
-    method public T roundingMode(java.math.RoundingMode);
-    method public T scale(android.icu.number.Scale);
-    method public T sign(android.icu.number.NumberFormatter.SignDisplay);
-    method public T symbols(android.icu.text.DecimalFormatSymbols);
-    method public T symbols(android.icu.text.NumberingSystem);
-    method public T unit(android.icu.util.MeasureUnit);
-    method public T unitWidth(android.icu.number.NumberFormatter.UnitWidth);
-  }
-
-  public abstract class NumberRangeFormatter {
-    method public static android.icu.number.UnlocalizedNumberRangeFormatter with();
-    method public static android.icu.number.LocalizedNumberRangeFormatter withLocale(java.util.Locale);
-    method public static android.icu.number.LocalizedNumberRangeFormatter withLocale(android.icu.util.ULocale);
-  }
-
-  public enum NumberRangeFormatter.RangeCollapse {
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeCollapse ALL;
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeCollapse AUTO;
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeCollapse NONE;
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeCollapse UNIT;
-  }
-
-  public enum NumberRangeFormatter.RangeIdentityFallback {
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeIdentityFallback APPROXIMATELY;
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeIdentityFallback APPROXIMATELY_OR_SINGLE_VALUE;
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeIdentityFallback RANGE;
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeIdentityFallback SINGLE_VALUE;
-  }
-
-  public enum NumberRangeFormatter.RangeIdentityResult {
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeIdentityResult EQUAL_AFTER_ROUNDING;
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeIdentityResult EQUAL_BEFORE_ROUNDING;
-    enum_constant public static final android.icu.number.NumberRangeFormatter.RangeIdentityResult NOT_EQUAL;
-  }
-
-  public abstract class NumberRangeFormatterSettings<T extends android.icu.number.NumberRangeFormatterSettings<?>> {
-    method public T collapse(android.icu.number.NumberRangeFormatter.RangeCollapse);
-    method public T identityFallback(android.icu.number.NumberRangeFormatter.RangeIdentityFallback);
-    method public T numberFormatterBoth(android.icu.number.UnlocalizedNumberFormatter);
-    method public T numberFormatterFirst(android.icu.number.UnlocalizedNumberFormatter);
-    method public T numberFormatterSecond(android.icu.number.UnlocalizedNumberFormatter);
-  }
-
-  public abstract class Precision {
-    method public static android.icu.number.CurrencyPrecision currency(android.icu.util.Currency.CurrencyUsage);
-    method public static android.icu.number.FractionPrecision fixedFraction(int);
-    method public static android.icu.number.Precision fixedSignificantDigits(int);
-    method public static android.icu.number.Precision increment(java.math.BigDecimal);
-    method public static android.icu.number.FractionPrecision integer();
-    method public static android.icu.number.FractionPrecision maxFraction(int);
-    method public static android.icu.number.Precision maxSignificantDigits(int);
-    method public static android.icu.number.FractionPrecision minFraction(int);
-    method public static android.icu.number.FractionPrecision minMaxFraction(int, int);
-    method public static android.icu.number.Precision minMaxSignificantDigits(int, int);
-    method public static android.icu.number.Precision minSignificantDigits(int);
-    method public static android.icu.number.Precision unlimited();
-  }
-
-  public class Scale {
-    method public static android.icu.number.Scale byBigDecimal(java.math.BigDecimal);
-    method public static android.icu.number.Scale byDouble(double);
-    method public static android.icu.number.Scale byDoubleAndPowerOfTen(double, int);
-    method public static android.icu.number.Scale none();
-    method public static android.icu.number.Scale powerOfTen(int);
-  }
-
-  public class ScientificNotation extends android.icu.number.Notation {
-    method public android.icu.number.ScientificNotation withExponentSignDisplay(android.icu.number.NumberFormatter.SignDisplay);
-    method public android.icu.number.ScientificNotation withMinExponentDigits(int);
-  }
-
-  public class SimpleNotation extends android.icu.number.Notation {
-  }
-
-  public class UnlocalizedNumberFormatter extends android.icu.number.NumberFormatterSettings<android.icu.number.UnlocalizedNumberFormatter> {
-    method public android.icu.number.LocalizedNumberFormatter locale(java.util.Locale);
-    method public android.icu.number.LocalizedNumberFormatter locale(android.icu.util.ULocale);
-  }
-
-  public class UnlocalizedNumberRangeFormatter extends android.icu.number.NumberRangeFormatterSettings<android.icu.number.UnlocalizedNumberRangeFormatter> {
-    method public android.icu.number.LocalizedNumberRangeFormatter locale(java.util.Locale);
-    method public android.icu.number.LocalizedNumberRangeFormatter locale(android.icu.util.ULocale);
-  }
-
-}
-
-package android.icu.text {
-
-  public final class AlphabeticIndex<V> implements java.lang.Iterable<android.icu.text.AlphabeticIndex.Bucket<V>> {
-    ctor public AlphabeticIndex(android.icu.util.ULocale);
-    ctor public AlphabeticIndex(java.util.Locale);
-    ctor public AlphabeticIndex(android.icu.text.RuleBasedCollator);
-    method public android.icu.text.AlphabeticIndex<V> addLabels(android.icu.text.UnicodeSet);
-    method public android.icu.text.AlphabeticIndex<V> addLabels(android.icu.util.ULocale...);
-    method public android.icu.text.AlphabeticIndex<V> addLabels(java.util.Locale...);
-    method public android.icu.text.AlphabeticIndex<V> addRecord(CharSequence, V);
-    method public android.icu.text.AlphabeticIndex.ImmutableIndex<V> buildImmutableIndex();
-    method public android.icu.text.AlphabeticIndex<V> clearRecords();
-    method public int getBucketCount();
-    method public int getBucketIndex(CharSequence);
-    method public java.util.List<java.lang.String> getBucketLabels();
-    method public android.icu.text.RuleBasedCollator getCollator();
-    method public String getInflowLabel();
-    method public int getMaxLabelCount();
-    method public String getOverflowLabel();
-    method public int getRecordCount();
-    method public String getUnderflowLabel();
-    method public java.util.Iterator<android.icu.text.AlphabeticIndex.Bucket<V>> iterator();
-    method public android.icu.text.AlphabeticIndex<V> setInflowLabel(String);
-    method public android.icu.text.AlphabeticIndex<V> setMaxLabelCount(int);
-    method public android.icu.text.AlphabeticIndex<V> setOverflowLabel(String);
-    method public android.icu.text.AlphabeticIndex<V> setUnderflowLabel(String);
-  }
-
-  public static class AlphabeticIndex.Bucket<V> implements java.lang.Iterable<android.icu.text.AlphabeticIndex.Record<V>> {
-    method public String getLabel();
-    method public android.icu.text.AlphabeticIndex.Bucket.LabelType getLabelType();
-    method public java.util.Iterator<android.icu.text.AlphabeticIndex.Record<V>> iterator();
-    method public int size();
-  }
-
-  public enum AlphabeticIndex.Bucket.LabelType {
-    enum_constant public static final android.icu.text.AlphabeticIndex.Bucket.LabelType INFLOW;
-    enum_constant public static final android.icu.text.AlphabeticIndex.Bucket.LabelType NORMAL;
-    enum_constant public static final android.icu.text.AlphabeticIndex.Bucket.LabelType OVERFLOW;
-    enum_constant public static final android.icu.text.AlphabeticIndex.Bucket.LabelType UNDERFLOW;
-  }
-
-  public static final class AlphabeticIndex.ImmutableIndex<V> implements java.lang.Iterable<android.icu.text.AlphabeticIndex.Bucket<V>> {
-    method public android.icu.text.AlphabeticIndex.Bucket<V> getBucket(int);
-    method public int getBucketCount();
-    method public int getBucketIndex(CharSequence);
-    method public java.util.Iterator<android.icu.text.AlphabeticIndex.Bucket<V>> iterator();
-  }
-
-  public static class AlphabeticIndex.Record<V> {
-    method public V getData();
-    method public CharSequence getName();
-  }
-
-  public class Bidi {
-    ctor public Bidi();
-    ctor public Bidi(int, int);
-    ctor public Bidi(String, int);
-    ctor public Bidi(java.text.AttributedCharacterIterator);
-    ctor public Bidi(char[], int, byte[], int, int, int);
-    method public boolean baseIsLeftToRight();
-    method public int countParagraphs();
-    method public int countRuns();
-    method public android.icu.text.Bidi createLineBidi(int, int);
-    method public static byte getBaseDirection(CharSequence);
-    method public int getBaseLevel();
-    method public android.icu.text.BidiClassifier getCustomClassifier();
-    method public int getCustomizedClass(int);
-    method public byte getDirection();
-    method public int getLength();
-    method public byte getLevelAt(int);
-    method public byte[] getLevels();
-    method public int getLogicalIndex(int);
-    method public int[] getLogicalMap();
-    method public android.icu.text.BidiRun getLogicalRun(int);
-    method public byte getParaLevel();
-    method public android.icu.text.BidiRun getParagraph(int);
-    method public android.icu.text.BidiRun getParagraphByIndex(int);
-    method public int getParagraphIndex(int);
-    method public int getProcessedLength();
-    method public int getReorderingMode();
-    method public int getReorderingOptions();
-    method public int getResultLength();
-    method public int getRunCount();
-    method public int getRunLevel(int);
-    method public int getRunLimit(int);
-    method public int getRunStart(int);
-    method public char[] getText();
-    method public String getTextAsString();
-    method public int getVisualIndex(int);
-    method public int[] getVisualMap();
-    method public android.icu.text.BidiRun getVisualRun(int);
-    method public static int[] invertMap(int[]);
-    method public boolean isInverse();
-    method public boolean isLeftToRight();
-    method public boolean isMixed();
-    method public boolean isOrderParagraphsLTR();
-    method public boolean isRightToLeft();
-    method public void orderParagraphsLTR(boolean);
-    method public static int[] reorderLogical(byte[]);
-    method public static int[] reorderVisual(byte[]);
-    method public static void reorderVisually(byte[], int, Object[], int, int);
-    method public static boolean requiresBidi(char[], int, int);
-    method public void setContext(String, String);
-    method public void setCustomClassifier(android.icu.text.BidiClassifier);
-    method public void setInverse(boolean);
-    method public android.icu.text.Bidi setLine(int, int);
-    method public void setPara(String, byte, byte[]);
-    method public void setPara(char[], byte, byte[]);
-    method public void setPara(java.text.AttributedCharacterIterator);
-    method public void setReorderingMode(int);
-    method public void setReorderingOptions(int);
-    method public String writeReordered(int);
-    method public static String writeReverse(String, int);
-    field public static final int DIRECTION_DEFAULT_LEFT_TO_RIGHT = 126; // 0x7e
-    field public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT = 127; // 0x7f
-    field public static final int DIRECTION_LEFT_TO_RIGHT = 0; // 0x0
-    field public static final int DIRECTION_RIGHT_TO_LEFT = 1; // 0x1
-    field public static final short DO_MIRRORING = 2; // 0x2
-    field public static final short INSERT_LRM_FOR_NUMERIC = 4; // 0x4
-    field public static final short KEEP_BASE_COMBINING = 1; // 0x1
-    field public static final byte LEVEL_DEFAULT_LTR = 126; // 0x7e
-    field public static final byte LEVEL_DEFAULT_RTL = 127; // 0x7f
-    field public static final byte LEVEL_OVERRIDE = -128; // 0xffffff80
-    field public static final byte LTR = 0; // 0x0
-    field public static final int MAP_NOWHERE = -1; // 0xffffffff
-    field public static final byte MAX_EXPLICIT_LEVEL = 125; // 0x7d
-    field public static final byte MIXED = 2; // 0x2
-    field public static final byte NEUTRAL = 3; // 0x3
-    field public static final int OPTION_DEFAULT = 0; // 0x0
-    field public static final int OPTION_INSERT_MARKS = 1; // 0x1
-    field public static final int OPTION_REMOVE_CONTROLS = 2; // 0x2
-    field public static final int OPTION_STREAMING = 4; // 0x4
-    field public static final short OUTPUT_REVERSE = 16; // 0x10
-    field public static final short REMOVE_BIDI_CONTROLS = 8; // 0x8
-    field public static final short REORDER_DEFAULT = 0; // 0x0
-    field public static final short REORDER_GROUP_NUMBERS_WITH_R = 2; // 0x2
-    field public static final short REORDER_INVERSE_FOR_NUMBERS_SPECIAL = 6; // 0x6
-    field public static final short REORDER_INVERSE_LIKE_DIRECT = 5; // 0x5
-    field public static final short REORDER_INVERSE_NUMBERS_AS_L = 4; // 0x4
-    field public static final short REORDER_NUMBERS_SPECIAL = 1; // 0x1
-    field public static final short REORDER_RUNS_ONLY = 3; // 0x3
-    field public static final byte RTL = 1; // 0x1
-  }
-
-  public class BidiClassifier {
-    ctor public BidiClassifier(Object);
-    method public int classify(int);
-    method public Object getContext();
-    method public void setContext(Object);
-  }
-
-  public class BidiRun {
-    method public byte getDirection();
-    method public byte getEmbeddingLevel();
-    method public int getLength();
-    method public int getLimit();
-    method public int getStart();
-    method public boolean isEvenRun();
-    method public boolean isOddRun();
-  }
-
-  public abstract class BreakIterator implements java.lang.Cloneable {
-    ctor protected BreakIterator();
-    method public Object clone();
-    method public abstract int current();
-    method public abstract int first();
-    method public abstract int following(int);
-    method public static java.util.Locale[] getAvailableLocales();
-    method public static android.icu.text.BreakIterator getCharacterInstance();
-    method public static android.icu.text.BreakIterator getCharacterInstance(java.util.Locale);
-    method public static android.icu.text.BreakIterator getCharacterInstance(android.icu.util.ULocale);
-    method public static android.icu.text.BreakIterator getLineInstance();
-    method public static android.icu.text.BreakIterator getLineInstance(java.util.Locale);
-    method public static android.icu.text.BreakIterator getLineInstance(android.icu.util.ULocale);
-    method public int getRuleStatus();
-    method public int getRuleStatusVec(int[]);
-    method public static android.icu.text.BreakIterator getSentenceInstance();
-    method public static android.icu.text.BreakIterator getSentenceInstance(java.util.Locale);
-    method public static android.icu.text.BreakIterator getSentenceInstance(android.icu.util.ULocale);
-    method public abstract java.text.CharacterIterator getText();
-    method @Deprecated public static android.icu.text.BreakIterator getTitleInstance();
-    method @Deprecated public static android.icu.text.BreakIterator getTitleInstance(java.util.Locale);
-    method @Deprecated public static android.icu.text.BreakIterator getTitleInstance(android.icu.util.ULocale);
-    method public static android.icu.text.BreakIterator getWordInstance();
-    method public static android.icu.text.BreakIterator getWordInstance(java.util.Locale);
-    method public static android.icu.text.BreakIterator getWordInstance(android.icu.util.ULocale);
-    method public boolean isBoundary(int);
-    method public abstract int last();
-    method public abstract int next(int);
-    method public abstract int next();
-    method public int preceding(int);
-    method public abstract int previous();
-    method public void setText(String);
-    method public void setText(CharSequence);
-    method public abstract void setText(java.text.CharacterIterator);
-    field public static final int DONE = -1; // 0xffffffff
-    field public static final int KIND_CHARACTER = 0; // 0x0
-    field public static final int KIND_LINE = 2; // 0x2
-    field public static final int KIND_SENTENCE = 3; // 0x3
-    field @Deprecated public static final int KIND_TITLE = 4; // 0x4
-    field public static final int KIND_WORD = 1; // 0x1
-    field public static final int WORD_IDEO = 400; // 0x190
-    field public static final int WORD_IDEO_LIMIT = 500; // 0x1f4
-    field public static final int WORD_KANA = 300; // 0x12c
-    field public static final int WORD_KANA_LIMIT = 400; // 0x190
-    field public static final int WORD_LETTER = 200; // 0xc8
-    field public static final int WORD_LETTER_LIMIT = 300; // 0x12c
-    field public static final int WORD_NONE = 0; // 0x0
-    field public static final int WORD_NONE_LIMIT = 100; // 0x64
-    field public static final int WORD_NUMBER = 100; // 0x64
-    field public static final int WORD_NUMBER_LIMIT = 200; // 0xc8
-  }
-
-  public abstract class CaseMap {
-    method public static android.icu.text.CaseMap.Fold fold();
-    method public abstract android.icu.text.CaseMap omitUnchangedText();
-    method public static android.icu.text.CaseMap.Lower toLower();
-    method public static android.icu.text.CaseMap.Title toTitle();
-    method public static android.icu.text.CaseMap.Upper toUpper();
-  }
-
-  public static final class CaseMap.Fold extends android.icu.text.CaseMap {
-    method public String apply(CharSequence);
-    method public <A extends java.lang.Appendable> A apply(CharSequence, A, android.icu.text.Edits);
-    method public android.icu.text.CaseMap.Fold omitUnchangedText();
-    method public android.icu.text.CaseMap.Fold turkic();
-  }
-
-  public static final class CaseMap.Lower extends android.icu.text.CaseMap {
-    method public String apply(java.util.Locale, CharSequence);
-    method public <A extends java.lang.Appendable> A apply(java.util.Locale, CharSequence, A, android.icu.text.Edits);
-    method public android.icu.text.CaseMap.Lower omitUnchangedText();
-  }
-
-  public static final class CaseMap.Title extends android.icu.text.CaseMap {
-    method public android.icu.text.CaseMap.Title adjustToCased();
-    method public String apply(java.util.Locale, android.icu.text.BreakIterator, CharSequence);
-    method public <A extends java.lang.Appendable> A apply(java.util.Locale, android.icu.text.BreakIterator, CharSequence, A, android.icu.text.Edits);
-    method public android.icu.text.CaseMap.Title noBreakAdjustment();
-    method public android.icu.text.CaseMap.Title noLowercase();
-    method public android.icu.text.CaseMap.Title omitUnchangedText();
-    method public android.icu.text.CaseMap.Title sentences();
-    method public android.icu.text.CaseMap.Title wholeString();
-  }
-
-  public static final class CaseMap.Upper extends android.icu.text.CaseMap {
-    method public String apply(java.util.Locale, CharSequence);
-    method public <A extends java.lang.Appendable> A apply(java.util.Locale, CharSequence, A, android.icu.text.Edits);
-    method public android.icu.text.CaseMap.Upper omitUnchangedText();
-  }
-
-  public final class CollationElementIterator {
-    method public int getMaxExpansion(int);
-    method public int getOffset();
-    method public int next();
-    method public int previous();
-    method public static int primaryOrder(int);
-    method public void reset();
-    method public static int secondaryOrder(int);
-    method public void setOffset(int);
-    method public void setText(String);
-    method public void setText(android.icu.text.UCharacterIterator);
-    method public void setText(java.text.CharacterIterator);
-    method public static int tertiaryOrder(int);
-    field public static final int IGNORABLE = 0; // 0x0
-    field public static final int NULLORDER = -1; // 0xffffffff
-  }
-
-  public final class CollationKey implements java.lang.Comparable<android.icu.text.CollationKey> {
-    ctor public CollationKey(String, byte[]);
-    method public int compareTo(android.icu.text.CollationKey);
-    method public boolean equals(android.icu.text.CollationKey);
-    method public android.icu.text.CollationKey getBound(int, int);
-    method public String getSourceString();
-    method public android.icu.text.CollationKey merge(android.icu.text.CollationKey);
-    method public byte[] toByteArray();
-  }
-
-  public static final class CollationKey.BoundMode {
-    field public static final int LOWER = 0; // 0x0
-    field public static final int UPPER = 1; // 0x1
-    field public static final int UPPER_LONG = 2; // 0x2
-  }
-
-  public abstract class Collator implements java.lang.Cloneable java.util.Comparator<java.lang.Object> android.icu.util.Freezable<android.icu.text.Collator> {
-    ctor protected Collator();
-    method public Object clone() throws java.lang.CloneNotSupportedException;
-    method public android.icu.text.Collator cloneAsThawed();
-    method public abstract int compare(String, String);
-    method public int compare(Object, Object);
-    method public boolean equals(String, String);
-    method public android.icu.text.Collator freeze();
-    method public static java.util.Locale[] getAvailableLocales();
-    method public static final android.icu.util.ULocale[] getAvailableULocales();
-    method public abstract android.icu.text.CollationKey getCollationKey(String);
-    method public int getDecomposition();
-    method public static String getDisplayName(java.util.Locale, java.util.Locale);
-    method public static String getDisplayName(android.icu.util.ULocale, android.icu.util.ULocale);
-    method public static String getDisplayName(java.util.Locale);
-    method public static String getDisplayName(android.icu.util.ULocale);
-    method public static int[] getEquivalentReorderCodes(int);
-    method public static final android.icu.util.ULocale getFunctionalEquivalent(String, android.icu.util.ULocale, boolean[]);
-    method public static final android.icu.util.ULocale getFunctionalEquivalent(String, android.icu.util.ULocale);
-    method public static final android.icu.text.Collator getInstance();
-    method public static final android.icu.text.Collator getInstance(android.icu.util.ULocale);
-    method public static final android.icu.text.Collator getInstance(java.util.Locale);
-    method public static final String[] getKeywordValues(String);
-    method public static final String[] getKeywordValuesForLocale(String, android.icu.util.ULocale, boolean);
-    method public static final String[] getKeywords();
-    method public int getMaxVariable();
-    method public int[] getReorderCodes();
-    method public int getStrength();
-    method public android.icu.text.UnicodeSet getTailoredSet();
-    method public abstract android.icu.util.VersionInfo getUCAVersion();
-    method public abstract int getVariableTop();
-    method public abstract android.icu.util.VersionInfo getVersion();
-    method public boolean isFrozen();
-    method public void setDecomposition(int);
-    method public android.icu.text.Collator setMaxVariable(int);
-    method public void setReorderCodes(int...);
-    method public void setStrength(int);
-    field public static final int CANONICAL_DECOMPOSITION = 17; // 0x11
-    field public static final int FULL_DECOMPOSITION = 15; // 0xf
-    field public static final int IDENTICAL = 15; // 0xf
-    field public static final int NO_DECOMPOSITION = 16; // 0x10
-    field public static final int PRIMARY = 0; // 0x0
-    field public static final int QUATERNARY = 3; // 0x3
-    field public static final int SECONDARY = 1; // 0x1
-    field public static final int TERTIARY = 2; // 0x2
-  }
-
-  public static interface Collator.ReorderCodes {
-    field public static final int CURRENCY = 4099; // 0x1003
-    field public static final int DEFAULT = -1; // 0xffffffff
-    field public static final int DIGIT = 4100; // 0x1004
-    field public static final int FIRST = 4096; // 0x1000
-    field public static final int NONE = 103; // 0x67
-    field public static final int OTHERS = 103; // 0x67
-    field public static final int PUNCTUATION = 4097; // 0x1001
-    field public static final int SPACE = 4096; // 0x1000
-    field public static final int SYMBOL = 4098; // 0x1002
-  }
-
-  public class CompactDecimalFormat extends android.icu.text.DecimalFormat {
-    method public static android.icu.text.CompactDecimalFormat getInstance(android.icu.util.ULocale, android.icu.text.CompactDecimalFormat.CompactStyle);
-    method public static android.icu.text.CompactDecimalFormat getInstance(java.util.Locale, android.icu.text.CompactDecimalFormat.CompactStyle);
-  }
-
-  public enum CompactDecimalFormat.CompactStyle {
-    enum_constant public static final android.icu.text.CompactDecimalFormat.CompactStyle LONG;
-    enum_constant public static final android.icu.text.CompactDecimalFormat.CompactStyle SHORT;
-  }
-
-  public class CurrencyPluralInfo implements java.lang.Cloneable java.io.Serializable {
-    ctor public CurrencyPluralInfo();
-    ctor public CurrencyPluralInfo(java.util.Locale);
-    ctor public CurrencyPluralInfo(android.icu.util.ULocale);
-    method public Object clone();
-    method public String getCurrencyPluralPattern(String);
-    method public static android.icu.text.CurrencyPluralInfo getInstance();
-    method public static android.icu.text.CurrencyPluralInfo getInstance(java.util.Locale);
-    method public static android.icu.text.CurrencyPluralInfo getInstance(android.icu.util.ULocale);
-    method public android.icu.util.ULocale getLocale();
-    method public android.icu.text.PluralRules getPluralRules();
-    method public void setCurrencyPluralPattern(String, String);
-    method public void setLocale(android.icu.util.ULocale);
-    method public void setPluralRules(String);
-  }
-
-  public abstract class DateFormat extends android.icu.text.UFormat {
-    ctor protected DateFormat();
-    method public final StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public abstract StringBuffer format(android.icu.util.Calendar, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(java.util.Date, StringBuffer, java.text.FieldPosition);
-    method public final String format(java.util.Date);
-    method public static java.util.Locale[] getAvailableLocales();
-    method public boolean getBooleanAttribute(android.icu.text.DateFormat.BooleanAttribute);
-    method public android.icu.util.Calendar getCalendar();
-    method public android.icu.text.DisplayContext getContext(android.icu.text.DisplayContext.Type);
-    method public static final android.icu.text.DateFormat getDateInstance();
-    method public static final android.icu.text.DateFormat getDateInstance(int);
-    method public static final android.icu.text.DateFormat getDateInstance(int, java.util.Locale);
-    method public static final android.icu.text.DateFormat getDateInstance(int, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getDateInstance(android.icu.util.Calendar, int, java.util.Locale);
-    method public static final android.icu.text.DateFormat getDateInstance(android.icu.util.Calendar, int, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getDateInstance(android.icu.util.Calendar, int);
-    method public static final android.icu.text.DateFormat getDateTimeInstance();
-    method public static final android.icu.text.DateFormat getDateTimeInstance(int, int);
-    method public static final android.icu.text.DateFormat getDateTimeInstance(int, int, java.util.Locale);
-    method public static final android.icu.text.DateFormat getDateTimeInstance(int, int, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getDateTimeInstance(android.icu.util.Calendar, int, int, java.util.Locale);
-    method public static final android.icu.text.DateFormat getDateTimeInstance(android.icu.util.Calendar, int, int, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getDateTimeInstance(android.icu.util.Calendar, int, int);
-    method public static final android.icu.text.DateFormat getInstance();
-    method public static final android.icu.text.DateFormat getInstance(android.icu.util.Calendar, java.util.Locale);
-    method public static final android.icu.text.DateFormat getInstance(android.icu.util.Calendar);
-    method public static final android.icu.text.DateFormat getInstanceForSkeleton(String);
-    method public static final android.icu.text.DateFormat getInstanceForSkeleton(String, java.util.Locale);
-    method public static final android.icu.text.DateFormat getInstanceForSkeleton(String, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getInstanceForSkeleton(android.icu.util.Calendar, String, java.util.Locale);
-    method public static final android.icu.text.DateFormat getInstanceForSkeleton(android.icu.util.Calendar, String, android.icu.util.ULocale);
-    method public android.icu.text.NumberFormat getNumberFormat();
-    method public static final android.icu.text.DateFormat getPatternInstance(String);
-    method public static final android.icu.text.DateFormat getPatternInstance(String, java.util.Locale);
-    method public static final android.icu.text.DateFormat getPatternInstance(String, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getPatternInstance(android.icu.util.Calendar, String, java.util.Locale);
-    method public static final android.icu.text.DateFormat getPatternInstance(android.icu.util.Calendar, String, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getTimeInstance();
-    method public static final android.icu.text.DateFormat getTimeInstance(int);
-    method public static final android.icu.text.DateFormat getTimeInstance(int, java.util.Locale);
-    method public static final android.icu.text.DateFormat getTimeInstance(int, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getTimeInstance(android.icu.util.Calendar, int, java.util.Locale);
-    method public static final android.icu.text.DateFormat getTimeInstance(android.icu.util.Calendar, int, android.icu.util.ULocale);
-    method public static final android.icu.text.DateFormat getTimeInstance(android.icu.util.Calendar, int);
-    method public android.icu.util.TimeZone getTimeZone();
-    method public boolean isCalendarLenient();
-    method public boolean isLenient();
-    method public java.util.Date parse(String) throws java.text.ParseException;
-    method public abstract void parse(String, android.icu.util.Calendar, java.text.ParsePosition);
-    method public java.util.Date parse(String, java.text.ParsePosition);
-    method public Object parseObject(String, java.text.ParsePosition);
-    method public android.icu.text.DateFormat setBooleanAttribute(android.icu.text.DateFormat.BooleanAttribute, boolean);
-    method public void setCalendar(android.icu.util.Calendar);
-    method public void setCalendarLenient(boolean);
-    method public void setContext(android.icu.text.DisplayContext);
-    method public void setLenient(boolean);
-    method public void setNumberFormat(android.icu.text.NumberFormat);
-    method public void setTimeZone(android.icu.util.TimeZone);
-    field public static final String ABBR_GENERIC_TZ = "v";
-    field public static final String ABBR_MONTH = "MMM";
-    field public static final String ABBR_MONTH_DAY = "MMMd";
-    field public static final String ABBR_MONTH_WEEKDAY_DAY = "MMMEd";
-    field public static final String ABBR_QUARTER = "QQQ";
-    field public static final String ABBR_SPECIFIC_TZ = "z";
-    field public static final String ABBR_UTC_TZ = "ZZZZ";
-    field public static final String ABBR_WEEKDAY = "E";
-    field public static final int AM_PM_FIELD = 14; // 0xe
-    field public static final int AM_PM_MIDNIGHT_NOON_FIELD = 35; // 0x23
-    field public static final int DATE_FIELD = 3; // 0x3
-    field public static final String DAY = "d";
-    field public static final int DAY_OF_WEEK_FIELD = 9; // 0x9
-    field public static final int DAY_OF_WEEK_IN_MONTH_FIELD = 11; // 0xb
-    field public static final int DAY_OF_YEAR_FIELD = 10; // 0xa
-    field public static final int DEFAULT = 2; // 0x2
-    field public static final int DOW_LOCAL_FIELD = 19; // 0x13
-    field public static final int ERA_FIELD = 0; // 0x0
-    field public static final int EXTENDED_YEAR_FIELD = 20; // 0x14
-    field public static final int FLEXIBLE_DAY_PERIOD_FIELD = 36; // 0x24
-    field public static final int FRACTIONAL_SECOND_FIELD = 8; // 0x8
-    field public static final int FULL = 0; // 0x0
-    field public static final String GENERIC_TZ = "vvvv";
-    field public static final String HOUR = "j";
-    field public static final int HOUR0_FIELD = 16; // 0x10
-    field public static final int HOUR1_FIELD = 15; // 0xf
-    field public static final String HOUR24 = "H";
-    field public static final String HOUR24_MINUTE = "Hm";
-    field public static final String HOUR24_MINUTE_SECOND = "Hms";
-    field public static final String HOUR_MINUTE = "jm";
-    field public static final String HOUR_MINUTE_SECOND = "jms";
-    field public static final int HOUR_OF_DAY0_FIELD = 5; // 0x5
-    field public static final int HOUR_OF_DAY1_FIELD = 4; // 0x4
-    field public static final int JULIAN_DAY_FIELD = 21; // 0x15
-    field public static final String LOCATION_TZ = "VVVV";
-    field public static final int LONG = 1; // 0x1
-    field public static final int MEDIUM = 2; // 0x2
-    field public static final int MILLISECONDS_IN_DAY_FIELD = 22; // 0x16
-    field public static final int MILLISECOND_FIELD = 8; // 0x8
-    field public static final String MINUTE = "m";
-    field public static final int MINUTE_FIELD = 6; // 0x6
-    field public static final String MINUTE_SECOND = "ms";
-    field public static final String MONTH = "MMMM";
-    field public static final String MONTH_DAY = "MMMMd";
-    field public static final int MONTH_FIELD = 2; // 0x2
-    field public static final String MONTH_WEEKDAY_DAY = "MMMMEEEEd";
-    field public static final int NONE = -1; // 0xffffffff
-    field public static final String NUM_MONTH = "M";
-    field public static final String NUM_MONTH_DAY = "Md";
-    field public static final String NUM_MONTH_WEEKDAY_DAY = "MEd";
-    field public static final String QUARTER = "QQQQ";
-    field public static final int QUARTER_FIELD = 27; // 0x1b
-    field public static final int RELATIVE = 128; // 0x80
-    field public static final int RELATIVE_DEFAULT = 130; // 0x82
-    field public static final int RELATIVE_FULL = 128; // 0x80
-    field public static final int RELATIVE_LONG = 129; // 0x81
-    field public static final int RELATIVE_MEDIUM = 130; // 0x82
-    field public static final int RELATIVE_SHORT = 131; // 0x83
-    field public static final String SECOND = "s";
-    field public static final int SECOND_FIELD = 7; // 0x7
-    field public static final int SHORT = 3; // 0x3
-    field public static final String SPECIFIC_TZ = "zzzz";
-    field public static final int STANDALONE_DAY_FIELD = 25; // 0x19
-    field public static final int STANDALONE_MONTH_FIELD = 26; // 0x1a
-    field public static final int STANDALONE_QUARTER_FIELD = 28; // 0x1c
-    field public static final int TIMEZONE_FIELD = 17; // 0x11
-    field public static final int TIMEZONE_GENERIC_FIELD = 24; // 0x18
-    field public static final int TIMEZONE_ISO_FIELD = 32; // 0x20
-    field public static final int TIMEZONE_ISO_LOCAL_FIELD = 33; // 0x21
-    field public static final int TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD = 31; // 0x1f
-    field public static final int TIMEZONE_RFC_FIELD = 23; // 0x17
-    field public static final int TIMEZONE_SPECIAL_FIELD = 29; // 0x1d
-    field public static final String WEEKDAY = "EEEE";
-    field public static final int WEEK_OF_MONTH_FIELD = 13; // 0xd
-    field public static final int WEEK_OF_YEAR_FIELD = 12; // 0xc
-    field public static final String YEAR = "y";
-    field public static final String YEAR_ABBR_MONTH = "yMMM";
-    field public static final String YEAR_ABBR_MONTH_DAY = "yMMMd";
-    field public static final String YEAR_ABBR_MONTH_WEEKDAY_DAY = "yMMMEd";
-    field public static final String YEAR_ABBR_QUARTER = "yQQQ";
-    field public static final int YEAR_FIELD = 1; // 0x1
-    field public static final String YEAR_MONTH = "yMMMM";
-    field public static final String YEAR_MONTH_DAY = "yMMMMd";
-    field public static final String YEAR_MONTH_WEEKDAY_DAY = "yMMMMEEEEd";
-    field public static final int YEAR_NAME_FIELD = 30; // 0x1e
-    field public static final String YEAR_NUM_MONTH = "yM";
-    field public static final String YEAR_NUM_MONTH_DAY = "yMd";
-    field public static final String YEAR_NUM_MONTH_WEEKDAY_DAY = "yMEd";
-    field public static final String YEAR_QUARTER = "yQQQQ";
-    field public static final int YEAR_WOY_FIELD = 18; // 0x12
-    field protected android.icu.util.Calendar calendar;
-    field protected android.icu.text.NumberFormat numberFormat;
-  }
-
-  public enum DateFormat.BooleanAttribute {
-    enum_constant public static final android.icu.text.DateFormat.BooleanAttribute PARSE_ALLOW_NUMERIC;
-    enum_constant public static final android.icu.text.DateFormat.BooleanAttribute PARSE_ALLOW_WHITESPACE;
-    enum_constant public static final android.icu.text.DateFormat.BooleanAttribute PARSE_MULTIPLE_PATTERNS_FOR_MATCH;
-    enum_constant public static final android.icu.text.DateFormat.BooleanAttribute PARSE_PARTIAL_LITERAL_MATCH;
-  }
-
-  public static class DateFormat.Field extends java.text.Format.Field {
-    ctor protected DateFormat.Field(String, int);
-    method public int getCalendarField();
-    method public static android.icu.text.DateFormat.Field ofCalendarField(int);
-    field public static final android.icu.text.DateFormat.Field AM_PM;
-    field public static final android.icu.text.DateFormat.Field AM_PM_MIDNIGHT_NOON;
-    field public static final android.icu.text.DateFormat.Field DAY_OF_MONTH;
-    field public static final android.icu.text.DateFormat.Field DAY_OF_WEEK;
-    field public static final android.icu.text.DateFormat.Field DAY_OF_WEEK_IN_MONTH;
-    field public static final android.icu.text.DateFormat.Field DAY_OF_YEAR;
-    field public static final android.icu.text.DateFormat.Field DOW_LOCAL;
-    field public static final android.icu.text.DateFormat.Field ERA;
-    field public static final android.icu.text.DateFormat.Field EXTENDED_YEAR;
-    field public static final android.icu.text.DateFormat.Field FLEXIBLE_DAY_PERIOD;
-    field public static final android.icu.text.DateFormat.Field HOUR0;
-    field public static final android.icu.text.DateFormat.Field HOUR1;
-    field public static final android.icu.text.DateFormat.Field HOUR_OF_DAY0;
-    field public static final android.icu.text.DateFormat.Field HOUR_OF_DAY1;
-    field public static final android.icu.text.DateFormat.Field JULIAN_DAY;
-    field public static final android.icu.text.DateFormat.Field MILLISECOND;
-    field public static final android.icu.text.DateFormat.Field MILLISECONDS_IN_DAY;
-    field public static final android.icu.text.DateFormat.Field MINUTE;
-    field public static final android.icu.text.DateFormat.Field MONTH;
-    field public static final android.icu.text.DateFormat.Field QUARTER;
-    field public static final android.icu.text.DateFormat.Field SECOND;
-    field public static final android.icu.text.DateFormat.Field TIME_ZONE;
-    field public static final android.icu.text.DateFormat.Field WEEK_OF_MONTH;
-    field public static final android.icu.text.DateFormat.Field WEEK_OF_YEAR;
-    field public static final android.icu.text.DateFormat.Field YEAR;
-    field public static final android.icu.text.DateFormat.Field YEAR_WOY;
-  }
-
-  public class DateFormatSymbols implements java.lang.Cloneable java.io.Serializable {
-    ctor public DateFormatSymbols();
-    ctor public DateFormatSymbols(java.util.Locale);
-    ctor public DateFormatSymbols(android.icu.util.ULocale);
-    ctor public DateFormatSymbols(android.icu.util.Calendar, java.util.Locale);
-    ctor public DateFormatSymbols(android.icu.util.Calendar, android.icu.util.ULocale);
-    ctor public DateFormatSymbols(Class<? extends android.icu.util.Calendar>, java.util.Locale);
-    ctor public DateFormatSymbols(Class<? extends android.icu.util.Calendar>, android.icu.util.ULocale);
-    ctor public DateFormatSymbols(java.util.ResourceBundle, java.util.Locale);
-    ctor public DateFormatSymbols(java.util.ResourceBundle, android.icu.util.ULocale);
-    method public Object clone();
-    method public String[] getAmPmStrings();
-    method public static java.util.Locale[] getAvailableLocales();
-    method public String[] getEraNames();
-    method public String[] getEras();
-    method public static android.icu.text.DateFormatSymbols getInstance();
-    method public static android.icu.text.DateFormatSymbols getInstance(java.util.Locale);
-    method public static android.icu.text.DateFormatSymbols getInstance(android.icu.util.ULocale);
-    method public String getLocalPatternChars();
-    method public String[] getMonths();
-    method public String[] getMonths(int, int);
-    method public String[] getQuarters(int, int);
-    method public String[] getShortMonths();
-    method public String[] getShortWeekdays();
-    method public String[] getWeekdays();
-    method public String[] getWeekdays(int, int);
-    method public String[] getYearNames(int, int);
-    method public String[] getZodiacNames(int, int);
-    method public String[][] getZoneStrings();
-    method protected void initializeData(android.icu.util.ULocale, String);
-    method public void setAmPmStrings(String[]);
-    method public void setEraNames(String[]);
-    method public void setEras(String[]);
-    method public void setLocalPatternChars(String);
-    method public void setMonths(String[]);
-    method public void setMonths(String[], int, int);
-    method public void setQuarters(String[], int, int);
-    method public void setShortMonths(String[]);
-    method public void setShortWeekdays(String[]);
-    method public void setWeekdays(String[], int, int);
-    method public void setWeekdays(String[]);
-    method public void setYearNames(String[], int, int);
-    method public void setZodiacNames(String[], int, int);
-    method public void setZoneStrings(String[][]);
-    field public static final int ABBREVIATED = 0; // 0x0
-    field public static final int FORMAT = 0; // 0x0
-    field public static final int NARROW = 2; // 0x2
-    field public static final int SHORT = 3; // 0x3
-    field public static final int STANDALONE = 1; // 0x1
-    field public static final int WIDE = 1; // 0x1
-  }
-
-  public class DateIntervalFormat extends android.icu.text.UFormat {
-    method public final StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public final StringBuffer format(android.icu.util.DateInterval, StringBuffer, java.text.FieldPosition);
-    method public final StringBuffer format(android.icu.util.Calendar, android.icu.util.Calendar, StringBuffer, java.text.FieldPosition);
-    method public android.icu.text.DateFormat getDateFormat();
-    method public android.icu.text.DateIntervalInfo getDateIntervalInfo();
-    method public static final android.icu.text.DateIntervalFormat getInstance(String);
-    method public static final android.icu.text.DateIntervalFormat getInstance(String, java.util.Locale);
-    method public static final android.icu.text.DateIntervalFormat getInstance(String, android.icu.util.ULocale);
-    method public static final android.icu.text.DateIntervalFormat getInstance(String, android.icu.text.DateIntervalInfo);
-    method public static final android.icu.text.DateIntervalFormat getInstance(String, java.util.Locale, android.icu.text.DateIntervalInfo);
-    method public static final android.icu.text.DateIntervalFormat getInstance(String, android.icu.util.ULocale, android.icu.text.DateIntervalInfo);
-    method public android.icu.util.TimeZone getTimeZone();
-    method @Deprecated public Object parseObject(String, java.text.ParsePosition);
-    method public void setDateIntervalInfo(android.icu.text.DateIntervalInfo);
-    method public void setTimeZone(android.icu.util.TimeZone);
-  }
-
-  public class DateIntervalInfo implements java.lang.Cloneable android.icu.util.Freezable<android.icu.text.DateIntervalInfo> java.io.Serializable {
-    ctor public DateIntervalInfo(android.icu.util.ULocale);
-    ctor public DateIntervalInfo(java.util.Locale);
-    method public Object clone();
-    method public android.icu.text.DateIntervalInfo cloneAsThawed();
-    method public android.icu.text.DateIntervalInfo freeze();
-    method public boolean getDefaultOrder();
-    method public String getFallbackIntervalPattern();
-    method public android.icu.text.DateIntervalInfo.PatternInfo getIntervalPattern(String, int);
-    method public boolean isFrozen();
-    method public void setFallbackIntervalPattern(String);
-    method public void setIntervalPattern(String, int, String);
-  }
-
-  public static final class DateIntervalInfo.PatternInfo implements java.lang.Cloneable java.io.Serializable {
-    ctor public DateIntervalInfo.PatternInfo(String, String, boolean);
-    method public boolean firstDateInPtnIsLaterDate();
-    method public String getFirstPart();
-    method public String getSecondPart();
-  }
-
-  public class DateTimePatternGenerator implements java.lang.Cloneable android.icu.util.Freezable<android.icu.text.DateTimePatternGenerator> {
-    ctor protected DateTimePatternGenerator();
-    method public android.icu.text.DateTimePatternGenerator addPattern(String, boolean, android.icu.text.DateTimePatternGenerator.PatternInfo);
-    method public Object clone();
-    method public android.icu.text.DateTimePatternGenerator cloneAsThawed();
-    method public android.icu.text.DateTimePatternGenerator freeze();
-    method public String getAppendItemFormat(int);
-    method public String getAppendItemName(int);
-    method public String getBaseSkeleton(String);
-    method public java.util.Set<java.lang.String> getBaseSkeletons(java.util.Set<java.lang.String>);
-    method public String getBestPattern(String);
-    method public String getBestPattern(String, int);
-    method public String getDateTimeFormat();
-    method public String getDecimal();
-    method public static android.icu.text.DateTimePatternGenerator getEmptyInstance();
-    method public String getFieldDisplayName(int, android.icu.text.DateTimePatternGenerator.DisplayWidth);
-    method public static android.icu.text.DateTimePatternGenerator getInstance();
-    method public static android.icu.text.DateTimePatternGenerator getInstance(android.icu.util.ULocale);
-    method public static android.icu.text.DateTimePatternGenerator getInstance(java.util.Locale);
-    method public String getSkeleton(String);
-    method public java.util.Map<java.lang.String,java.lang.String> getSkeletons(java.util.Map<java.lang.String,java.lang.String>);
-    method public boolean isFrozen();
-    method public String replaceFieldTypes(String, String);
-    method public String replaceFieldTypes(String, String, int);
-    method public void setAppendItemFormat(int, String);
-    method public void setAppendItemName(int, String);
-    method public void setDateTimeFormat(String);
-    method public void setDecimal(String);
-    field public static final int DAY = 7; // 0x7
-    field public static final int DAYPERIOD = 10; // 0xa
-    field public static final int DAY_OF_WEEK_IN_MONTH = 9; // 0x9
-    field public static final int DAY_OF_YEAR = 8; // 0x8
-    field public static final int ERA = 0; // 0x0
-    field public static final int FRACTIONAL_SECOND = 14; // 0xe
-    field public static final int HOUR = 11; // 0xb
-    field public static final int MATCH_ALL_FIELDS_LENGTH = 65535; // 0xffff
-    field public static final int MATCH_HOUR_FIELD_LENGTH = 2048; // 0x800
-    field public static final int MATCH_NO_OPTIONS = 0; // 0x0
-    field public static final int MINUTE = 12; // 0xc
-    field public static final int MONTH = 3; // 0x3
-    field public static final int QUARTER = 2; // 0x2
-    field public static final int SECOND = 13; // 0xd
-    field public static final int WEEKDAY = 6; // 0x6
-    field public static final int WEEK_OF_MONTH = 5; // 0x5
-    field public static final int WEEK_OF_YEAR = 4; // 0x4
-    field public static final int YEAR = 1; // 0x1
-    field public static final int ZONE = 15; // 0xf
-  }
-
-  public enum DateTimePatternGenerator.DisplayWidth {
-    enum_constant public static final android.icu.text.DateTimePatternGenerator.DisplayWidth ABBREVIATED;
-    enum_constant public static final android.icu.text.DateTimePatternGenerator.DisplayWidth NARROW;
-    enum_constant public static final android.icu.text.DateTimePatternGenerator.DisplayWidth WIDE;
-  }
-
-  public static final class DateTimePatternGenerator.PatternInfo {
-    ctor public DateTimePatternGenerator.PatternInfo();
-    field public static final int BASE_CONFLICT = 1; // 0x1
-    field public static final int CONFLICT = 2; // 0x2
-    field public static final int OK = 0; // 0x0
-    field public String conflictingPattern;
-    field public int status;
-  }
-
-  public class DecimalFormat extends android.icu.text.NumberFormat {
-    ctor public DecimalFormat();
-    ctor public DecimalFormat(String);
-    ctor public DecimalFormat(String, android.icu.text.DecimalFormatSymbols);
-    ctor public DecimalFormat(String, android.icu.text.DecimalFormatSymbols, android.icu.text.CurrencyPluralInfo, int);
-    method public void applyLocalizedPattern(String);
-    method public void applyPattern(String);
-    method public boolean areSignificantDigitsUsed();
-    method public StringBuffer format(double, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(long, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(java.math.BigInteger, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(java.math.BigDecimal, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(android.icu.math.BigDecimal, StringBuffer, java.text.FieldPosition);
-    method public android.icu.text.CurrencyPluralInfo getCurrencyPluralInfo();
-    method public android.icu.util.Currency.CurrencyUsage getCurrencyUsage();
-    method public android.icu.text.DecimalFormatSymbols getDecimalFormatSymbols();
-    method public int getFormatWidth();
-    method public int getGroupingSize();
-    method public java.math.MathContext getMathContext();
-    method public android.icu.math.MathContext getMathContextICU();
-    method public int getMaximumSignificantDigits();
-    method public byte getMinimumExponentDigits();
-    method public int getMinimumSignificantDigits();
-    method public int getMultiplier();
-    method public String getNegativePrefix();
-    method public String getNegativeSuffix();
-    method public char getPadCharacter();
-    method public int getPadPosition();
-    method @Deprecated public int getParseMaxDigits();
-    method public String getPositivePrefix();
-    method public String getPositiveSuffix();
-    method public java.math.BigDecimal getRoundingIncrement();
-    method public int getSecondaryGroupingSize();
-    method public boolean isDecimalPatternMatchRequired();
-    method public boolean isDecimalSeparatorAlwaysShown();
-    method public boolean isExponentSignAlwaysShown();
-    method public boolean isParseBigDecimal();
-    method public boolean isScientificNotation();
-    method public Number parse(String, java.text.ParsePosition);
-    method public void setCurrencyPluralInfo(android.icu.text.CurrencyPluralInfo);
-    method public void setCurrencyUsage(android.icu.util.Currency.CurrencyUsage);
-    method public void setDecimalFormatSymbols(android.icu.text.DecimalFormatSymbols);
-    method public void setDecimalPatternMatchRequired(boolean);
-    method public void setDecimalSeparatorAlwaysShown(boolean);
-    method public void setExponentSignAlwaysShown(boolean);
-    method public void setFormatWidth(int);
-    method public void setGroupingSize(int);
-    method public void setMathContext(java.math.MathContext);
-    method public void setMathContextICU(android.icu.math.MathContext);
-    method public void setMaximumSignificantDigits(int);
-    method public void setMinimumExponentDigits(byte);
-    method public void setMinimumSignificantDigits(int);
-    method public void setMultiplier(int);
-    method public void setNegativePrefix(String);
-    method public void setNegativeSuffix(String);
-    method public void setPadCharacter(char);
-    method public void setPadPosition(int);
-    method public void setParseBigDecimal(boolean);
-    method @Deprecated public void setParseMaxDigits(int);
-    method public void setPositivePrefix(String);
-    method public void setPositiveSuffix(String);
-    method public void setRoundingIncrement(java.math.BigDecimal);
-    method public void setRoundingIncrement(android.icu.math.BigDecimal);
-    method public void setRoundingIncrement(double);
-    method public void setScientificNotation(boolean);
-    method public void setSecondaryGroupingSize(int);
-    method public void setSignificantDigitsUsed(boolean);
-    method public String toLocalizedPattern();
-    method public String toPattern();
-    field public static final int PAD_AFTER_PREFIX = 1; // 0x1
-    field public static final int PAD_AFTER_SUFFIX = 3; // 0x3
-    field public static final int PAD_BEFORE_PREFIX = 0; // 0x0
-    field public static final int PAD_BEFORE_SUFFIX = 2; // 0x2
-  }
-
-  public class DecimalFormatSymbols implements java.lang.Cloneable java.io.Serializable {
-    ctor public DecimalFormatSymbols();
-    ctor public DecimalFormatSymbols(java.util.Locale);
-    ctor public DecimalFormatSymbols(android.icu.util.ULocale);
-    method public Object clone();
-    method public static android.icu.text.DecimalFormatSymbols forNumberingSystem(java.util.Locale, android.icu.text.NumberingSystem);
-    method public static android.icu.text.DecimalFormatSymbols forNumberingSystem(android.icu.util.ULocale, android.icu.text.NumberingSystem);
-    method public static java.util.Locale[] getAvailableLocales();
-    method public android.icu.util.Currency getCurrency();
-    method public String getCurrencySymbol();
-    method public char getDecimalSeparator();
-    method public String getDecimalSeparatorString();
-    method public char getDigit();
-    method public String[] getDigitStrings();
-    method public char[] getDigits();
-    method public String getExponentMultiplicationSign();
-    method public String getExponentSeparator();
-    method public char getGroupingSeparator();
-    method public String getGroupingSeparatorString();
-    method public String getInfinity();
-    method public static android.icu.text.DecimalFormatSymbols getInstance();
-    method public static android.icu.text.DecimalFormatSymbols getInstance(java.util.Locale);
-    method public static android.icu.text.DecimalFormatSymbols getInstance(android.icu.util.ULocale);
-    method public String getInternationalCurrencySymbol();
-    method public java.util.Locale getLocale();
-    method public char getMinusSign();
-    method public String getMinusSignString();
-    method public char getMonetaryDecimalSeparator();
-    method public String getMonetaryDecimalSeparatorString();
-    method public char getMonetaryGroupingSeparator();
-    method public String getMonetaryGroupingSeparatorString();
-    method public String getNaN();
-    method public char getPadEscape();
-    method public String getPatternForCurrencySpacing(int, boolean);
-    method public char getPatternSeparator();
-    method public char getPerMill();
-    method public String getPerMillString();
-    method public char getPercent();
-    method public String getPercentString();
-    method public char getPlusSign();
-    method public String getPlusSignString();
-    method public char getSignificantDigit();
-    method public android.icu.util.ULocale getULocale();
-    method public char getZeroDigit();
-    method public void setCurrency(android.icu.util.Currency);
-    method public void setCurrencySymbol(String);
-    method public void setDecimalSeparator(char);
-    method public void setDecimalSeparatorString(String);
-    method public void setDigit(char);
-    method public void setDigitStrings(String[]);
-    method public void setExponentMultiplicationSign(String);
-    method public void setExponentSeparator(String);
-    method public void setGroupingSeparator(char);
-    method public void setGroupingSeparatorString(String);
-    method public void setInfinity(String);
-    method public void setInternationalCurrencySymbol(String);
-    method public void setMinusSign(char);
-    method public void setMinusSignString(String);
-    method public void setMonetaryDecimalSeparator(char);
-    method public void setMonetaryDecimalSeparatorString(String);
-    method public void setMonetaryGroupingSeparator(char);
-    method public void setMonetaryGroupingSeparatorString(String);
-    method public void setNaN(String);
-    method public void setPadEscape(char);
-    method public void setPatternForCurrencySpacing(int, boolean, String);
-    method public void setPatternSeparator(char);
-    method public void setPerMill(char);
-    method public void setPerMillString(String);
-    method public void setPercent(char);
-    method public void setPercentString(String);
-    method public void setPlusSign(char);
-    method public void setPlusSignString(String);
-    method public void setSignificantDigit(char);
-    method public void setZeroDigit(char);
-    field public static final int CURRENCY_SPC_CURRENCY_MATCH = 0; // 0x0
-    field public static final int CURRENCY_SPC_INSERT = 2; // 0x2
-    field public static final int CURRENCY_SPC_SURROUNDING_MATCH = 1; // 0x1
-  }
-
-  public enum DisplayContext {
-    method public android.icu.text.DisplayContext.Type type();
-    method public int value();
-    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE;
-    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE;
-    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_FOR_STANDALONE;
-    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_FOR_UI_LIST_OR_MENU;
-    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_NONE;
-    enum_constant public static final android.icu.text.DisplayContext DIALECT_NAMES;
-    enum_constant public static final android.icu.text.DisplayContext LENGTH_FULL;
-    enum_constant public static final android.icu.text.DisplayContext LENGTH_SHORT;
-    enum_constant public static final android.icu.text.DisplayContext NO_SUBSTITUTE;
-    enum_constant public static final android.icu.text.DisplayContext STANDARD_NAMES;
-    enum_constant public static final android.icu.text.DisplayContext SUBSTITUTE;
-  }
-
-  public enum DisplayContext.Type {
-    enum_constant public static final android.icu.text.DisplayContext.Type CAPITALIZATION;
-    enum_constant public static final android.icu.text.DisplayContext.Type DIALECT_HANDLING;
-    enum_constant public static final android.icu.text.DisplayContext.Type DISPLAY_LENGTH;
-    enum_constant public static final android.icu.text.DisplayContext.Type SUBSTITUTE_HANDLING;
-  }
-
-  public final class Edits {
-    ctor public Edits();
-    method public void addReplace(int, int);
-    method public void addUnchanged(int);
-    method public android.icu.text.Edits.Iterator getCoarseChangesIterator();
-    method public android.icu.text.Edits.Iterator getCoarseIterator();
-    method public android.icu.text.Edits.Iterator getFineChangesIterator();
-    method public android.icu.text.Edits.Iterator getFineIterator();
-    method public boolean hasChanges();
-    method public int lengthDelta();
-    method public android.icu.text.Edits mergeAndAppend(android.icu.text.Edits, android.icu.text.Edits);
-    method public int numberOfChanges();
-    method public void reset();
-  }
-
-  public static final class Edits.Iterator {
-    method public int destinationIndex();
-    method public int destinationIndexFromSourceIndex(int);
-    method public boolean findDestinationIndex(int);
-    method public boolean findSourceIndex(int);
-    method public boolean hasChange();
-    method public int newLength();
-    method public boolean next();
-    method public int oldLength();
-    method public int replacementIndex();
-    method public int sourceIndex();
-    method public int sourceIndexFromDestinationIndex(int);
-  }
-
-  public abstract class IDNA {
-    method public static android.icu.text.IDNA getUTS46Instance(int);
-    method public abstract StringBuilder labelToASCII(CharSequence, StringBuilder, android.icu.text.IDNA.Info);
-    method public abstract StringBuilder labelToUnicode(CharSequence, StringBuilder, android.icu.text.IDNA.Info);
-    method public abstract StringBuilder nameToASCII(CharSequence, StringBuilder, android.icu.text.IDNA.Info);
-    method public abstract StringBuilder nameToUnicode(CharSequence, StringBuilder, android.icu.text.IDNA.Info);
-    field public static final int CHECK_BIDI = 4; // 0x4
-    field public static final int CHECK_CONTEXTJ = 8; // 0x8
-    field public static final int CHECK_CONTEXTO = 64; // 0x40
-    field public static final int DEFAULT = 0; // 0x0
-    field public static final int NONTRANSITIONAL_TO_ASCII = 16; // 0x10
-    field public static final int NONTRANSITIONAL_TO_UNICODE = 32; // 0x20
-    field public static final int USE_STD3_RULES = 2; // 0x2
-  }
-
-  public enum IDNA.Error {
-    enum_constant public static final android.icu.text.IDNA.Error BIDI;
-    enum_constant public static final android.icu.text.IDNA.Error CONTEXTJ;
-    enum_constant public static final android.icu.text.IDNA.Error CONTEXTO_DIGITS;
-    enum_constant public static final android.icu.text.IDNA.Error CONTEXTO_PUNCTUATION;
-    enum_constant public static final android.icu.text.IDNA.Error DISALLOWED;
-    enum_constant public static final android.icu.text.IDNA.Error DOMAIN_NAME_TOO_LONG;
-    enum_constant public static final android.icu.text.IDNA.Error EMPTY_LABEL;
-    enum_constant public static final android.icu.text.IDNA.Error HYPHEN_3_4;
-    enum_constant public static final android.icu.text.IDNA.Error INVALID_ACE_LABEL;
-    enum_constant public static final android.icu.text.IDNA.Error LABEL_HAS_DOT;
-    enum_constant public static final android.icu.text.IDNA.Error LABEL_TOO_LONG;
-    enum_constant public static final android.icu.text.IDNA.Error LEADING_COMBINING_MARK;
-    enum_constant public static final android.icu.text.IDNA.Error LEADING_HYPHEN;
-    enum_constant public static final android.icu.text.IDNA.Error PUNYCODE;
-    enum_constant public static final android.icu.text.IDNA.Error TRAILING_HYPHEN;
-  }
-
-  public static final class IDNA.Info {
-    ctor public IDNA.Info();
-    method public java.util.Set<android.icu.text.IDNA.Error> getErrors();
-    method public boolean hasErrors();
-    method public boolean isTransitionalDifferent();
-  }
-
-  public final class ListFormatter {
-    method public String format(java.lang.Object...);
-    method public String format(java.util.Collection<?>);
-    method public static android.icu.text.ListFormatter getInstance(android.icu.util.ULocale);
-    method public static android.icu.text.ListFormatter getInstance(java.util.Locale);
-    method public static android.icu.text.ListFormatter getInstance();
-    method public String getPatternForNumItems(int);
-  }
-
-  public abstract class LocaleDisplayNames {
-    method public abstract android.icu.text.DisplayContext getContext(android.icu.text.DisplayContext.Type);
-    method public abstract android.icu.text.LocaleDisplayNames.DialectHandling getDialectHandling();
-    method public static android.icu.text.LocaleDisplayNames getInstance(android.icu.util.ULocale);
-    method public static android.icu.text.LocaleDisplayNames getInstance(java.util.Locale);
-    method public static android.icu.text.LocaleDisplayNames getInstance(android.icu.util.ULocale, android.icu.text.LocaleDisplayNames.DialectHandling);
-    method public static android.icu.text.LocaleDisplayNames getInstance(android.icu.util.ULocale, android.icu.text.DisplayContext...);
-    method public static android.icu.text.LocaleDisplayNames getInstance(java.util.Locale, android.icu.text.DisplayContext...);
-    method public abstract android.icu.util.ULocale getLocale();
-    method public java.util.List<android.icu.text.LocaleDisplayNames.UiListItem> getUiList(java.util.Set<android.icu.util.ULocale>, boolean, java.util.Comparator<java.lang.Object>);
-    method public abstract java.util.List<android.icu.text.LocaleDisplayNames.UiListItem> getUiListCompareWholeItems(java.util.Set<android.icu.util.ULocale>, java.util.Comparator<android.icu.text.LocaleDisplayNames.UiListItem>);
-    method public abstract String keyDisplayName(String);
-    method public abstract String keyValueDisplayName(String, String);
-    method public abstract String languageDisplayName(String);
-    method public abstract String localeDisplayName(android.icu.util.ULocale);
-    method public abstract String localeDisplayName(java.util.Locale);
-    method public abstract String localeDisplayName(String);
-    method public abstract String regionDisplayName(String);
-    method public abstract String scriptDisplayName(String);
-    method public abstract String scriptDisplayName(int);
-    method public abstract String variantDisplayName(String);
-  }
-
-  public enum LocaleDisplayNames.DialectHandling {
-    enum_constant public static final android.icu.text.LocaleDisplayNames.DialectHandling DIALECT_NAMES;
-    enum_constant public static final android.icu.text.LocaleDisplayNames.DialectHandling STANDARD_NAMES;
-  }
-
-  public static class LocaleDisplayNames.UiListItem {
-    ctor public LocaleDisplayNames.UiListItem(android.icu.util.ULocale, android.icu.util.ULocale, String, String);
-    method public static java.util.Comparator<android.icu.text.LocaleDisplayNames.UiListItem> getComparator(java.util.Comparator<java.lang.Object>, boolean);
-    field public final android.icu.util.ULocale minimized;
-    field public final android.icu.util.ULocale modified;
-    field public final String nameInDisplayLocale;
-    field public final String nameInSelf;
-  }
-
-  public class MeasureFormat extends android.icu.text.UFormat {
-    method public final boolean equals(Object);
-    method public StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public StringBuilder formatMeasurePerUnit(android.icu.util.Measure, android.icu.util.MeasureUnit, StringBuilder, java.text.FieldPosition);
-    method public final String formatMeasures(android.icu.util.Measure...);
-    method public StringBuilder formatMeasures(StringBuilder, java.text.FieldPosition, android.icu.util.Measure...);
-    method public static android.icu.text.MeasureFormat getCurrencyFormat(android.icu.util.ULocale);
-    method public static android.icu.text.MeasureFormat getCurrencyFormat(java.util.Locale);
-    method public static android.icu.text.MeasureFormat getCurrencyFormat();
-    method public static android.icu.text.MeasureFormat getInstance(android.icu.util.ULocale, android.icu.text.MeasureFormat.FormatWidth);
-    method public static android.icu.text.MeasureFormat getInstance(java.util.Locale, android.icu.text.MeasureFormat.FormatWidth);
-    method public static android.icu.text.MeasureFormat getInstance(android.icu.util.ULocale, android.icu.text.MeasureFormat.FormatWidth, android.icu.text.NumberFormat);
-    method public static android.icu.text.MeasureFormat getInstance(java.util.Locale, android.icu.text.MeasureFormat.FormatWidth, android.icu.text.NumberFormat);
-    method public final android.icu.util.ULocale getLocale();
-    method public android.icu.text.NumberFormat getNumberFormat();
-    method public String getUnitDisplayName(android.icu.util.MeasureUnit);
-    method public android.icu.text.MeasureFormat.FormatWidth getWidth();
-    method public final int hashCode();
-    method public android.icu.util.Measure parseObject(String, java.text.ParsePosition);
-  }
-
-  public enum MeasureFormat.FormatWidth {
-    enum_constant public static final android.icu.text.MeasureFormat.FormatWidth NARROW;
-    enum_constant public static final android.icu.text.MeasureFormat.FormatWidth NUMERIC;
-    enum_constant public static final android.icu.text.MeasureFormat.FormatWidth SHORT;
-    enum_constant public static final android.icu.text.MeasureFormat.FormatWidth WIDE;
-  }
-
-  public class MessageFormat extends android.icu.text.UFormat {
-    ctor public MessageFormat(String);
-    ctor public MessageFormat(String, java.util.Locale);
-    ctor public MessageFormat(String, android.icu.util.ULocale);
-    method public void applyPattern(String);
-    method public void applyPattern(String, android.icu.text.MessagePattern.ApostropheMode);
-    method public static String autoQuoteApostrophe(String);
-    method public final StringBuffer format(Object[], StringBuffer, java.text.FieldPosition);
-    method public final StringBuffer format(java.util.Map<java.lang.String,java.lang.Object>, StringBuffer, java.text.FieldPosition);
-    method public static String format(String, java.lang.Object...);
-    method public static String format(String, java.util.Map<java.lang.String,java.lang.Object>);
-    method public final StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public android.icu.text.MessagePattern.ApostropheMode getApostropheMode();
-    method public java.util.Set<java.lang.String> getArgumentNames();
-    method public java.text.Format getFormatByArgumentName(String);
-    method public java.text.Format[] getFormats();
-    method public java.text.Format[] getFormatsByArgumentIndex();
-    method public java.util.Locale getLocale();
-    method public android.icu.util.ULocale getULocale();
-    method public Object[] parse(String, java.text.ParsePosition);
-    method public Object[] parse(String) throws java.text.ParseException;
-    method public Object parseObject(String, java.text.ParsePosition);
-    method public java.util.Map<java.lang.String,java.lang.Object> parseToMap(String, java.text.ParsePosition);
-    method public java.util.Map<java.lang.String,java.lang.Object> parseToMap(String) throws java.text.ParseException;
-    method public void setFormat(int, java.text.Format);
-    method public void setFormatByArgumentIndex(int, java.text.Format);
-    method public void setFormatByArgumentName(String, java.text.Format);
-    method public void setFormats(java.text.Format[]);
-    method public void setFormatsByArgumentIndex(java.text.Format[]);
-    method public void setFormatsByArgumentName(java.util.Map<java.lang.String,java.text.Format>);
-    method public void setLocale(java.util.Locale);
-    method public void setLocale(android.icu.util.ULocale);
-    method public String toPattern();
-    method public boolean usesNamedArguments();
-  }
-
-  public static class MessageFormat.Field extends java.text.Format.Field {
-    ctor protected MessageFormat.Field(String);
-    field public static final android.icu.text.MessageFormat.Field ARGUMENT;
-  }
-
-  public final class MessagePattern implements java.lang.Cloneable android.icu.util.Freezable<android.icu.text.MessagePattern> {
-    ctor public MessagePattern();
-    ctor public MessagePattern(android.icu.text.MessagePattern.ApostropheMode);
-    ctor public MessagePattern(String);
-    method public String autoQuoteApostropheDeep();
-    method public void clear();
-    method public void clearPatternAndSetApostropheMode(android.icu.text.MessagePattern.ApostropheMode);
-    method public Object clone();
-    method public android.icu.text.MessagePattern cloneAsThawed();
-    method public int countParts();
-    method public android.icu.text.MessagePattern freeze();
-    method public android.icu.text.MessagePattern.ApostropheMode getApostropheMode();
-    method public int getLimitPartIndex(int);
-    method public double getNumericValue(android.icu.text.MessagePattern.Part);
-    method public android.icu.text.MessagePattern.Part getPart(int);
-    method public android.icu.text.MessagePattern.Part.Type getPartType(int);
-    method public int getPatternIndex(int);
-    method public String getPatternString();
-    method public double getPluralOffset(int);
-    method public String getSubstring(android.icu.text.MessagePattern.Part);
-    method public boolean hasNamedArguments();
-    method public boolean hasNumberedArguments();
-    method public boolean isFrozen();
-    method public android.icu.text.MessagePattern parse(String);
-    method public android.icu.text.MessagePattern parseChoiceStyle(String);
-    method public android.icu.text.MessagePattern parsePluralStyle(String);
-    method public android.icu.text.MessagePattern parseSelectStyle(String);
-    method public boolean partSubstringMatches(android.icu.text.MessagePattern.Part, String);
-    method public static int validateArgumentName(String);
-    field public static final int ARG_NAME_NOT_NUMBER = -1; // 0xffffffff
-    field public static final int ARG_NAME_NOT_VALID = -2; // 0xfffffffe
-    field public static final double NO_NUMERIC_VALUE = -1.23456789E8;
-  }
-
-  public enum MessagePattern.ApostropheMode {
-    enum_constant public static final android.icu.text.MessagePattern.ApostropheMode DOUBLE_OPTIONAL;
-    enum_constant public static final android.icu.text.MessagePattern.ApostropheMode DOUBLE_REQUIRED;
-  }
-
-  public enum MessagePattern.ArgType {
-    method public boolean hasPluralStyle();
-    enum_constant public static final android.icu.text.MessagePattern.ArgType CHOICE;
-    enum_constant public static final android.icu.text.MessagePattern.ArgType NONE;
-    enum_constant public static final android.icu.text.MessagePattern.ArgType PLURAL;
-    enum_constant public static final android.icu.text.MessagePattern.ArgType SELECT;
-    enum_constant public static final android.icu.text.MessagePattern.ArgType SELECTORDINAL;
-    enum_constant public static final android.icu.text.MessagePattern.ArgType SIMPLE;
-  }
-
-  public static final class MessagePattern.Part {
-    method public android.icu.text.MessagePattern.ArgType getArgType();
-    method public int getIndex();
-    method public int getLength();
-    method public int getLimit();
-    method public android.icu.text.MessagePattern.Part.Type getType();
-    method public int getValue();
-  }
-
-  public enum MessagePattern.Part.Type {
-    method public boolean hasNumericValue();
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_DOUBLE;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_INT;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_LIMIT;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_NAME;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_NUMBER;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_SELECTOR;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_START;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_STYLE;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_TYPE;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type INSERT_CHAR;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type MSG_LIMIT;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type MSG_START;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type REPLACE_NUMBER;
-    enum_constant public static final android.icu.text.MessagePattern.Part.Type SKIP_SYNTAX;
-  }
-
-  public final class Normalizer implements java.lang.Cloneable {
-    method @Deprecated public Object clone();
-    method public static int compare(char[], int, int, char[], int, int, int);
-    method public static int compare(String, String, int);
-    method public static int compare(char[], char[], int);
-    method public static int compare(int, int, int);
-    method public static int compare(int, String, int);
-    field public static final int COMPARE_CODE_POINT_ORDER = 32768; // 0x8000
-    field public static final int COMPARE_IGNORE_CASE = 65536; // 0x10000
-    field public static final int FOLD_CASE_DEFAULT = 0; // 0x0
-    field public static final int FOLD_CASE_EXCLUDE_SPECIAL_I = 1; // 0x1
-    field public static final int INPUT_IS_FCD = 131072; // 0x20000
-    field public static final android.icu.text.Normalizer.QuickCheckResult MAYBE;
-    field public static final android.icu.text.Normalizer.QuickCheckResult NO;
-    field public static final android.icu.text.Normalizer.QuickCheckResult YES;
-  }
-
-  public static final class Normalizer.QuickCheckResult {
-  }
-
-  public abstract class Normalizer2 {
-    method public abstract StringBuilder append(StringBuilder, CharSequence);
-    method public int composePair(int, int);
-    method public int getCombiningClass(int);
-    method public abstract String getDecomposition(int);
-    method public static android.icu.text.Normalizer2 getInstance(java.io.InputStream, String, android.icu.text.Normalizer2.Mode);
-    method public static android.icu.text.Normalizer2 getNFCInstance();
-    method public static android.icu.text.Normalizer2 getNFDInstance();
-    method public static android.icu.text.Normalizer2 getNFKCCasefoldInstance();
-    method public static android.icu.text.Normalizer2 getNFKCInstance();
-    method public static android.icu.text.Normalizer2 getNFKDInstance();
-    method public String getRawDecomposition(int);
-    method public abstract boolean hasBoundaryAfter(int);
-    method public abstract boolean hasBoundaryBefore(int);
-    method public abstract boolean isInert(int);
-    method public abstract boolean isNormalized(CharSequence);
-    method public String normalize(CharSequence);
-    method public abstract StringBuilder normalize(CharSequence, StringBuilder);
-    method public abstract Appendable normalize(CharSequence, Appendable);
-    method public abstract StringBuilder normalizeSecondAndAppend(StringBuilder, CharSequence);
-    method public abstract android.icu.text.Normalizer.QuickCheckResult quickCheck(CharSequence);
-    method public abstract int spanQuickCheckYes(CharSequence);
-  }
-
-  public enum Normalizer2.Mode {
-    enum_constant public static final android.icu.text.Normalizer2.Mode COMPOSE;
-    enum_constant public static final android.icu.text.Normalizer2.Mode COMPOSE_CONTIGUOUS;
-    enum_constant public static final android.icu.text.Normalizer2.Mode DECOMPOSE;
-    enum_constant public static final android.icu.text.Normalizer2.Mode FCD;
-  }
-
-  public abstract class NumberFormat extends android.icu.text.UFormat {
-    ctor public NumberFormat();
-    method public StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public final String format(double);
-    method public final String format(long);
-    method public final String format(java.math.BigInteger);
-    method public final String format(java.math.BigDecimal);
-    method public final String format(android.icu.math.BigDecimal);
-    method public final String format(android.icu.util.CurrencyAmount);
-    method public abstract StringBuffer format(double, StringBuffer, java.text.FieldPosition);
-    method public abstract StringBuffer format(long, StringBuffer, java.text.FieldPosition);
-    method public abstract StringBuffer format(java.math.BigInteger, StringBuffer, java.text.FieldPosition);
-    method public abstract StringBuffer format(java.math.BigDecimal, StringBuffer, java.text.FieldPosition);
-    method public abstract StringBuffer format(android.icu.math.BigDecimal, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(android.icu.util.CurrencyAmount, StringBuffer, java.text.FieldPosition);
-    method public static java.util.Locale[] getAvailableLocales();
-    method public android.icu.text.DisplayContext getContext(android.icu.text.DisplayContext.Type);
-    method public android.icu.util.Currency getCurrency();
-    method public static final android.icu.text.NumberFormat getCurrencyInstance();
-    method public static android.icu.text.NumberFormat getCurrencyInstance(java.util.Locale);
-    method public static android.icu.text.NumberFormat getCurrencyInstance(android.icu.util.ULocale);
-    method public static final android.icu.text.NumberFormat getInstance();
-    method public static android.icu.text.NumberFormat getInstance(java.util.Locale);
-    method public static android.icu.text.NumberFormat getInstance(android.icu.util.ULocale);
-    method public static final android.icu.text.NumberFormat getInstance(int);
-    method public static android.icu.text.NumberFormat getInstance(java.util.Locale, int);
-    method public static android.icu.text.NumberFormat getInstance(android.icu.util.ULocale, int);
-    method public static final android.icu.text.NumberFormat getIntegerInstance();
-    method public static android.icu.text.NumberFormat getIntegerInstance(java.util.Locale);
-    method public static android.icu.text.NumberFormat getIntegerInstance(android.icu.util.ULocale);
-    method public int getMaximumFractionDigits();
-    method public int getMaximumIntegerDigits();
-    method public int getMinimumFractionDigits();
-    method public int getMinimumIntegerDigits();
-    method public static final android.icu.text.NumberFormat getNumberInstance();
-    method public static android.icu.text.NumberFormat getNumberInstance(java.util.Locale);
-    method public static android.icu.text.NumberFormat getNumberInstance(android.icu.util.ULocale);
-    method protected static String getPattern(android.icu.util.ULocale, int);
-    method public static final android.icu.text.NumberFormat getPercentInstance();
-    method public static android.icu.text.NumberFormat getPercentInstance(java.util.Locale);
-    method public static android.icu.text.NumberFormat getPercentInstance(android.icu.util.ULocale);
-    method public int getRoundingMode();
-    method public static final android.icu.text.NumberFormat getScientificInstance();
-    method public static android.icu.text.NumberFormat getScientificInstance(java.util.Locale);
-    method public static android.icu.text.NumberFormat getScientificInstance(android.icu.util.ULocale);
-    method public boolean isGroupingUsed();
-    method public boolean isParseIntegerOnly();
-    method public boolean isParseStrict();
-    method public abstract Number parse(String, java.text.ParsePosition);
-    method public Number parse(String) throws java.text.ParseException;
-    method public android.icu.util.CurrencyAmount parseCurrency(CharSequence, java.text.ParsePosition);
-    method public final Object parseObject(String, java.text.ParsePosition);
-    method public void setContext(android.icu.text.DisplayContext);
-    method public void setCurrency(android.icu.util.Currency);
-    method public void setGroupingUsed(boolean);
-    method public void setMaximumFractionDigits(int);
-    method public void setMaximumIntegerDigits(int);
-    method public void setMinimumFractionDigits(int);
-    method public void setMinimumIntegerDigits(int);
-    method public void setParseIntegerOnly(boolean);
-    method public void setParseStrict(boolean);
-    method public void setRoundingMode(int);
-    field public static final int ACCOUNTINGCURRENCYSTYLE = 7; // 0x7
-    field public static final int CASHCURRENCYSTYLE = 8; // 0x8
-    field public static final int CURRENCYSTYLE = 1; // 0x1
-    field public static final int FRACTION_FIELD = 1; // 0x1
-    field public static final int INTEGERSTYLE = 4; // 0x4
-    field public static final int INTEGER_FIELD = 0; // 0x0
-    field public static final int ISOCURRENCYSTYLE = 5; // 0x5
-    field public static final int NUMBERSTYLE = 0; // 0x0
-    field public static final int PERCENTSTYLE = 2; // 0x2
-    field public static final int PLURALCURRENCYSTYLE = 6; // 0x6
-    field public static final int SCIENTIFICSTYLE = 3; // 0x3
-    field public static final int STANDARDCURRENCYSTYLE = 9; // 0x9
-  }
-
-  public static class NumberFormat.Field extends java.text.Format.Field {
-    ctor protected NumberFormat.Field(String);
-    field public static final android.icu.text.NumberFormat.Field CURRENCY;
-    field public static final android.icu.text.NumberFormat.Field DECIMAL_SEPARATOR;
-    field public static final android.icu.text.NumberFormat.Field EXPONENT;
-    field public static final android.icu.text.NumberFormat.Field EXPONENT_SIGN;
-    field public static final android.icu.text.NumberFormat.Field EXPONENT_SYMBOL;
-    field public static final android.icu.text.NumberFormat.Field FRACTION;
-    field public static final android.icu.text.NumberFormat.Field GROUPING_SEPARATOR;
-    field public static final android.icu.text.NumberFormat.Field INTEGER;
-    field public static final android.icu.text.NumberFormat.Field PERCENT;
-    field public static final android.icu.text.NumberFormat.Field PERMILLE;
-    field public static final android.icu.text.NumberFormat.Field SIGN;
-  }
-
-  public class NumberingSystem {
-    ctor public NumberingSystem();
-    method public static String[] getAvailableNames();
-    method public String getDescription();
-    method public static android.icu.text.NumberingSystem getInstance(int, boolean, String);
-    method public static android.icu.text.NumberingSystem getInstance(java.util.Locale);
-    method public static android.icu.text.NumberingSystem getInstance(android.icu.util.ULocale);
-    method public static android.icu.text.NumberingSystem getInstance();
-    method public static android.icu.text.NumberingSystem getInstanceByName(String);
-    method public String getName();
-    method public int getRadix();
-    method public boolean isAlgorithmic();
-    method public static boolean isValidDigitString(String);
-    field public static final android.icu.text.NumberingSystem LATIN;
-  }
-
-  public class PluralFormat extends android.icu.text.UFormat {
-    ctor public PluralFormat();
-    ctor public PluralFormat(android.icu.util.ULocale);
-    ctor public PluralFormat(java.util.Locale);
-    ctor public PluralFormat(android.icu.text.PluralRules);
-    ctor public PluralFormat(android.icu.util.ULocale, android.icu.text.PluralRules);
-    ctor public PluralFormat(java.util.Locale, android.icu.text.PluralRules);
-    ctor public PluralFormat(android.icu.util.ULocale, android.icu.text.PluralRules.PluralType);
-    ctor public PluralFormat(java.util.Locale, android.icu.text.PluralRules.PluralType);
-    ctor public PluralFormat(String);
-    ctor public PluralFormat(android.icu.util.ULocale, String);
-    ctor public PluralFormat(android.icu.text.PluralRules, String);
-    ctor public PluralFormat(android.icu.util.ULocale, android.icu.text.PluralRules, String);
-    ctor public PluralFormat(android.icu.util.ULocale, android.icu.text.PluralRules.PluralType, String);
-    method public void applyPattern(String);
-    method public boolean equals(android.icu.text.PluralFormat);
-    method public final String format(double);
-    method public StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public Number parse(String, java.text.ParsePosition);
-    method public Object parseObject(String, java.text.ParsePosition);
-    method public void setNumberFormat(android.icu.text.NumberFormat);
-    method public String toPattern();
-  }
-
-  public class PluralRules implements java.io.Serializable {
-    method public static android.icu.text.PluralRules createRules(String);
-    method public boolean equals(android.icu.text.PluralRules);
-    method public static android.icu.text.PluralRules forLocale(android.icu.util.ULocale);
-    method public static android.icu.text.PluralRules forLocale(java.util.Locale);
-    method public static android.icu.text.PluralRules forLocale(android.icu.util.ULocale, android.icu.text.PluralRules.PluralType);
-    method public static android.icu.text.PluralRules forLocale(java.util.Locale, android.icu.text.PluralRules.PluralType);
-    method public java.util.Collection<java.lang.Double> getAllKeywordValues(String);
-    method public java.util.Set<java.lang.String> getKeywords();
-    method public java.util.Collection<java.lang.Double> getSamples(String);
-    method public double getUniqueKeywordValue(String);
-    method public static android.icu.text.PluralRules parseDescription(String) throws java.text.ParseException;
-    method public String select(double);
-    field public static final android.icu.text.PluralRules DEFAULT;
-    field public static final String KEYWORD_FEW = "few";
-    field public static final String KEYWORD_MANY = "many";
-    field public static final String KEYWORD_ONE = "one";
-    field public static final String KEYWORD_OTHER = "other";
-    field public static final String KEYWORD_TWO = "two";
-    field public static final String KEYWORD_ZERO = "zero";
-    field public static final double NO_UNIQUE_VALUE = -0.00123456777;
-  }
-
-  public enum PluralRules.PluralType {
-    enum_constant public static final android.icu.text.PluralRules.PluralType CARDINAL;
-    enum_constant public static final android.icu.text.PluralRules.PluralType ORDINAL;
-  }
-
-  public final class RelativeDateTimeFormatter {
-    method public String combineDateAndTime(String, String);
-    method public String format(double, android.icu.text.RelativeDateTimeFormatter.Direction, android.icu.text.RelativeDateTimeFormatter.RelativeUnit);
-    method public String format(android.icu.text.RelativeDateTimeFormatter.Direction, android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit);
-    method public String format(double, android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit);
-    method public String formatNumeric(double, android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit);
-    method public android.icu.text.DisplayContext getCapitalizationContext();
-    method public android.icu.text.RelativeDateTimeFormatter.Style getFormatStyle();
-    method public static android.icu.text.RelativeDateTimeFormatter getInstance();
-    method public static android.icu.text.RelativeDateTimeFormatter getInstance(android.icu.util.ULocale);
-    method public static android.icu.text.RelativeDateTimeFormatter getInstance(java.util.Locale);
-    method public static android.icu.text.RelativeDateTimeFormatter getInstance(android.icu.util.ULocale, android.icu.text.NumberFormat);
-    method public static android.icu.text.RelativeDateTimeFormatter getInstance(android.icu.util.ULocale, android.icu.text.NumberFormat, android.icu.text.RelativeDateTimeFormatter.Style, android.icu.text.DisplayContext);
-    method public static android.icu.text.RelativeDateTimeFormatter getInstance(java.util.Locale, android.icu.text.NumberFormat);
-    method public android.icu.text.NumberFormat getNumberFormat();
-  }
-
-  public enum RelativeDateTimeFormatter.AbsoluteUnit {
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit DAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit FRIDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit MONDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit MONTH;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit NOW;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit SATURDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit SUNDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit THURSDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit TUESDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit WEDNESDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit WEEK;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit YEAR;
-  }
-
-  public enum RelativeDateTimeFormatter.Direction {
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction LAST;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction LAST_2;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction NEXT;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction NEXT_2;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction PLAIN;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction THIS;
-  }
-
-  public enum RelativeDateTimeFormatter.RelativeDateTimeUnit {
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit DAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit FRIDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit HOUR;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit MINUTE;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit MONDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit MONTH;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit QUARTER;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit SATURDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit SECOND;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit SUNDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit THURSDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit TUESDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit WEDNESDAY;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit WEEK;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeUnit YEAR;
-  }
-
-  public enum RelativeDateTimeFormatter.RelativeUnit {
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit DAYS;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit HOURS;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit MINUTES;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit MONTHS;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit SECONDS;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit WEEKS;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit YEARS;
-  }
-
-  public enum RelativeDateTimeFormatter.Style {
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Style LONG;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Style NARROW;
-    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Style SHORT;
-  }
-
-  public interface Replaceable {
-    method public int char32At(int);
-    method public char charAt(int);
-    method public void copy(int, int, int);
-    method public void getChars(int, int, char[], int);
-    method public boolean hasMetaData();
-    method public int length();
-    method public void replace(int, int, String);
-    method public void replace(int, int, char[], int, int);
-  }
-
-  public final class RuleBasedCollator extends android.icu.text.Collator {
-    ctor public RuleBasedCollator(String) throws java.lang.Exception;
-    method public android.icu.text.RuleBasedCollator cloneAsThawed();
-    method public int compare(String, String);
-    method public android.icu.text.CollationElementIterator getCollationElementIterator(String);
-    method public android.icu.text.CollationElementIterator getCollationElementIterator(java.text.CharacterIterator);
-    method public android.icu.text.CollationElementIterator getCollationElementIterator(android.icu.text.UCharacterIterator);
-    method public android.icu.text.CollationKey getCollationKey(String);
-    method public void getContractionsAndExpansions(android.icu.text.UnicodeSet, android.icu.text.UnicodeSet, boolean) throws java.lang.Exception;
-    method public boolean getNumericCollation();
-    method public String getRules();
-    method public String getRules(boolean);
-    method public android.icu.util.VersionInfo getUCAVersion();
-    method public int getVariableTop();
-    method public android.icu.util.VersionInfo getVersion();
-    method public boolean isAlternateHandlingShifted();
-    method public boolean isCaseLevel();
-    method public boolean isFrenchCollation();
-    method public boolean isLowerCaseFirst();
-    method public boolean isUpperCaseFirst();
-    method public void setAlternateHandlingDefault();
-    method public void setAlternateHandlingShifted(boolean);
-    method public void setCaseFirstDefault();
-    method public void setCaseLevel(boolean);
-    method public void setCaseLevelDefault();
-    method public void setDecompositionDefault();
-    method public void setFrenchCollation(boolean);
-    method public void setFrenchCollationDefault();
-    method public void setLowerCaseFirst(boolean);
-    method public android.icu.text.RuleBasedCollator setMaxVariable(int);
-    method public void setNumericCollation(boolean);
-    method public void setNumericCollationDefault();
-    method public void setStrengthDefault();
-    method public void setUpperCaseFirst(boolean);
-  }
-
-  public final class ScientificNumberFormatter {
-    method public String format(Object);
-    method public static android.icu.text.ScientificNumberFormatter getMarkupInstance(android.icu.util.ULocale, String, String);
-    method public static android.icu.text.ScientificNumberFormatter getMarkupInstance(android.icu.text.DecimalFormat, String, String);
-    method public static android.icu.text.ScientificNumberFormatter getSuperscriptInstance(android.icu.util.ULocale);
-    method public static android.icu.text.ScientificNumberFormatter getSuperscriptInstance(android.icu.text.DecimalFormat);
-  }
-
-  public abstract class SearchIterator {
-    ctor protected SearchIterator(java.text.CharacterIterator, android.icu.text.BreakIterator);
-    method public final int first();
-    method public final int following(int);
-    method public android.icu.text.BreakIterator getBreakIterator();
-    method public android.icu.text.SearchIterator.ElementComparisonType getElementComparisonType();
-    method public abstract int getIndex();
-    method public int getMatchLength();
-    method public int getMatchStart();
-    method public String getMatchedText();
-    method public java.text.CharacterIterator getTarget();
-    method protected abstract int handleNext(int);
-    method protected abstract int handlePrevious(int);
-    method public boolean isOverlapping();
-    method public final int last();
-    method public int next();
-    method public final int preceding(int);
-    method public int previous();
-    method public void reset();
-    method public void setBreakIterator(android.icu.text.BreakIterator);
-    method public void setElementComparisonType(android.icu.text.SearchIterator.ElementComparisonType);
-    method public void setIndex(int);
-    method protected void setMatchLength(int);
-    method public void setOverlapping(boolean);
-    method public void setTarget(java.text.CharacterIterator);
-    field public static final int DONE = -1; // 0xffffffff
-    field protected android.icu.text.BreakIterator breakIterator;
-    field protected int matchLength;
-    field protected java.text.CharacterIterator targetText;
-  }
-
-  public enum SearchIterator.ElementComparisonType {
-    enum_constant public static final android.icu.text.SearchIterator.ElementComparisonType ANY_BASE_WEIGHT_IS_WILDCARD;
-    enum_constant public static final android.icu.text.SearchIterator.ElementComparisonType PATTERN_BASE_WEIGHT_IS_WILDCARD;
-    enum_constant public static final android.icu.text.SearchIterator.ElementComparisonType STANDARD_ELEMENT_COMPARISON;
-  }
-
-  public class SelectFormat extends java.text.Format {
-    ctor public SelectFormat(String);
-    method public void applyPattern(String);
-    method public final String format(String);
-    method public StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public Object parseObject(String, java.text.ParsePosition);
-    method public String toPattern();
-  }
-
-  public class SimpleDateFormat extends android.icu.text.DateFormat {
-    ctor public SimpleDateFormat();
-    ctor public SimpleDateFormat(String);
-    ctor public SimpleDateFormat(String, java.util.Locale);
-    ctor public SimpleDateFormat(String, android.icu.util.ULocale);
-    ctor public SimpleDateFormat(String, String, android.icu.util.ULocale);
-    ctor public SimpleDateFormat(String, android.icu.text.DateFormatSymbols);
-    method public void applyLocalizedPattern(String);
-    method public void applyPattern(String);
-    method public StringBuffer format(android.icu.util.Calendar, StringBuffer, java.text.FieldPosition);
-    method public java.util.Date get2DigitYearStart();
-    method public android.icu.text.DateFormatSymbols getDateFormatSymbols();
-    method public android.icu.text.NumberFormat getNumberFormat(char);
-    method protected android.icu.text.DateFormatSymbols getSymbols();
-    method public android.icu.text.TimeZoneFormat getTimeZoneFormat();
-    method protected int matchQuarterString(String, int, int, String[], android.icu.util.Calendar);
-    method protected int matchString(String, int, int, String[], android.icu.util.Calendar);
-    method public void parse(String, android.icu.util.Calendar, java.text.ParsePosition);
-    method protected android.icu.text.DateFormat.Field patternCharToDateFormatField(char);
-    method public void set2DigitYearStart(java.util.Date);
-    method public void setDateFormatSymbols(android.icu.text.DateFormatSymbols);
-    method public void setNumberFormat(String, android.icu.text.NumberFormat);
-    method public void setTimeZoneFormat(android.icu.text.TimeZoneFormat);
-    method protected String subFormat(char, int, int, java.text.FieldPosition, android.icu.text.DateFormatSymbols, android.icu.util.Calendar) throws java.lang.IllegalArgumentException;
-    method protected int subParse(String, int, char, int, boolean, boolean, boolean[], android.icu.util.Calendar);
-    method public String toLocalizedPattern();
-    method public String toPattern();
-    method protected String zeroPaddingNumber(long, int, int);
-  }
-
-  public class StringPrepParseException extends java.text.ParseException {
-    ctor public StringPrepParseException(String, int);
-    ctor public StringPrepParseException(String, int, String, int);
-    ctor public StringPrepParseException(String, int, String, int, int);
-    method public int getError();
-    field public static final int ACE_PREFIX_ERROR = 6; // 0x6
-    field public static final int BUFFER_OVERFLOW_ERROR = 9; // 0x9
-    field public static final int CHECK_BIDI_ERROR = 4; // 0x4
-    field public static final int DOMAIN_NAME_TOO_LONG_ERROR = 11; // 0xb
-    field public static final int ILLEGAL_CHAR_FOUND = 1; // 0x1
-    field public static final int INVALID_CHAR_FOUND = 0; // 0x0
-    field public static final int LABEL_TOO_LONG_ERROR = 8; // 0x8
-    field public static final int PROHIBITED_ERROR = 2; // 0x2
-    field public static final int STD3_ASCII_RULES_ERROR = 5; // 0x5
-    field public static final int UNASSIGNED_ERROR = 3; // 0x3
-    field public static final int VERIFICATION_ERROR = 7; // 0x7
-    field public static final int ZERO_LENGTH_LABEL = 10; // 0xa
-  }
-
-  public final class StringSearch extends android.icu.text.SearchIterator {
-    ctor public StringSearch(String, java.text.CharacterIterator, android.icu.text.RuleBasedCollator, android.icu.text.BreakIterator);
-    ctor public StringSearch(String, java.text.CharacterIterator, android.icu.text.RuleBasedCollator);
-    ctor public StringSearch(String, java.text.CharacterIterator, java.util.Locale);
-    ctor public StringSearch(String, java.text.CharacterIterator, android.icu.util.ULocale);
-    ctor public StringSearch(String, String);
-    method public android.icu.text.RuleBasedCollator getCollator();
-    method public int getIndex();
-    method public String getPattern();
-    method protected int handleNext(int);
-    method protected int handlePrevious(int);
-    method public boolean isCanonical();
-    method public void setCanonical(boolean);
-    method public void setCollator(android.icu.text.RuleBasedCollator);
-    method public void setPattern(String);
-  }
-
-  public interface SymbolTable {
-    method public char[] lookup(String);
-    method public android.icu.text.UnicodeMatcher lookupMatcher(int);
-    method public String parseReference(String, java.text.ParsePosition, int);
-    field public static final char SYMBOL_REF = 36; // 0x0024 '$'
-  }
-
-  public class TimeZoneFormat extends android.icu.text.UFormat implements android.icu.util.Freezable<android.icu.text.TimeZoneFormat> java.io.Serializable {
-    ctor protected TimeZoneFormat(android.icu.util.ULocale);
-    method public android.icu.text.TimeZoneFormat cloneAsThawed();
-    method public final String format(android.icu.text.TimeZoneFormat.Style, android.icu.util.TimeZone, long);
-    method public String format(android.icu.text.TimeZoneFormat.Style, android.icu.util.TimeZone, long, android.icu.util.Output<android.icu.text.TimeZoneFormat.TimeType>);
-    method public StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public final String formatOffsetISO8601Basic(int, boolean, boolean, boolean);
-    method public final String formatOffsetISO8601Extended(int, boolean, boolean, boolean);
-    method public String formatOffsetLocalizedGMT(int);
-    method public String formatOffsetShortLocalizedGMT(int);
-    method public android.icu.text.TimeZoneFormat freeze();
-    method public java.util.EnumSet<android.icu.text.TimeZoneFormat.ParseOption> getDefaultParseOptions();
-    method public String getGMTOffsetDigits();
-    method public String getGMTOffsetPattern(android.icu.text.TimeZoneFormat.GMTOffsetPatternType);
-    method public String getGMTPattern();
-    method public String getGMTZeroFormat();
-    method public static android.icu.text.TimeZoneFormat getInstance(android.icu.util.ULocale);
-    method public static android.icu.text.TimeZoneFormat getInstance(java.util.Locale);
-    method public android.icu.text.TimeZoneNames getTimeZoneNames();
-    method public boolean isFrozen();
-    method public android.icu.util.TimeZone parse(android.icu.text.TimeZoneFormat.Style, String, java.text.ParsePosition, java.util.EnumSet<android.icu.text.TimeZoneFormat.ParseOption>, android.icu.util.Output<android.icu.text.TimeZoneFormat.TimeType>);
-    method public android.icu.util.TimeZone parse(android.icu.text.TimeZoneFormat.Style, String, java.text.ParsePosition, android.icu.util.Output<android.icu.text.TimeZoneFormat.TimeType>);
-    method public final android.icu.util.TimeZone parse(String, java.text.ParsePosition);
-    method public final android.icu.util.TimeZone parse(String) throws java.text.ParseException;
-    method public Object parseObject(String, java.text.ParsePosition);
-    method public final int parseOffsetISO8601(String, java.text.ParsePosition);
-    method public int parseOffsetLocalizedGMT(String, java.text.ParsePosition);
-    method public int parseOffsetShortLocalizedGMT(String, java.text.ParsePosition);
-    method public android.icu.text.TimeZoneFormat setDefaultParseOptions(java.util.EnumSet<android.icu.text.TimeZoneFormat.ParseOption>);
-    method public android.icu.text.TimeZoneFormat setGMTOffsetDigits(String);
-    method public android.icu.text.TimeZoneFormat setGMTOffsetPattern(android.icu.text.TimeZoneFormat.GMTOffsetPatternType, String);
-    method public android.icu.text.TimeZoneFormat setGMTPattern(String);
-    method public android.icu.text.TimeZoneFormat setGMTZeroFormat(String);
-    method public android.icu.text.TimeZoneFormat setTimeZoneNames(android.icu.text.TimeZoneNames);
-  }
-
-  public enum TimeZoneFormat.GMTOffsetPatternType {
-    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType NEGATIVE_H;
-    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType NEGATIVE_HM;
-    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType NEGATIVE_HMS;
-    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType POSITIVE_H;
-    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType POSITIVE_HM;
-    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType POSITIVE_HMS;
-  }
-
-  public enum TimeZoneFormat.ParseOption {
-    enum_constant public static final android.icu.text.TimeZoneFormat.ParseOption ALL_STYLES;
-    enum_constant public static final android.icu.text.TimeZoneFormat.ParseOption TZ_DATABASE_ABBREVIATIONS;
-  }
-
-  public enum TimeZoneFormat.Style {
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style EXEMPLAR_LOCATION;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style GENERIC_LOCATION;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style GENERIC_LONG;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style GENERIC_SHORT;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_FIXED;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_FULL;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_LOCAL_FIXED;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_LOCAL_FULL;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_LOCAL_SHORT;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_SHORT;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_EXTENDED_FIXED;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_EXTENDED_FULL;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_EXTENDED_LOCAL_FIXED;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_EXTENDED_LOCAL_FULL;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style LOCALIZED_GMT;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style LOCALIZED_GMT_SHORT;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style SPECIFIC_LONG;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style SPECIFIC_SHORT;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ZONE_ID;
-    enum_constant public static final android.icu.text.TimeZoneFormat.Style ZONE_ID_SHORT;
-  }
-
-  public enum TimeZoneFormat.TimeType {
-    enum_constant public static final android.icu.text.TimeZoneFormat.TimeType DAYLIGHT;
-    enum_constant public static final android.icu.text.TimeZoneFormat.TimeType STANDARD;
-    enum_constant public static final android.icu.text.TimeZoneFormat.TimeType UNKNOWN;
-  }
-
-  public abstract class TimeZoneNames implements java.io.Serializable {
-    method public abstract java.util.Set<java.lang.String> getAvailableMetaZoneIDs();
-    method public abstract java.util.Set<java.lang.String> getAvailableMetaZoneIDs(String);
-    method public final String getDisplayName(String, android.icu.text.TimeZoneNames.NameType, long);
-    method public String getExemplarLocationName(String);
-    method public static android.icu.text.TimeZoneNames getInstance(android.icu.util.ULocale);
-    method public static android.icu.text.TimeZoneNames getInstance(java.util.Locale);
-    method public abstract String getMetaZoneDisplayName(String, android.icu.text.TimeZoneNames.NameType);
-    method public abstract String getMetaZoneID(String, long);
-    method public abstract String getReferenceZoneID(String, String);
-    method public static android.icu.text.TimeZoneNames getTZDBInstance(android.icu.util.ULocale);
-    method public abstract String getTimeZoneDisplayName(String, android.icu.text.TimeZoneNames.NameType);
-  }
-
-  public enum TimeZoneNames.NameType {
-    enum_constant public static final android.icu.text.TimeZoneNames.NameType EXEMPLAR_LOCATION;
-    enum_constant public static final android.icu.text.TimeZoneNames.NameType LONG_DAYLIGHT;
-    enum_constant public static final android.icu.text.TimeZoneNames.NameType LONG_GENERIC;
-    enum_constant public static final android.icu.text.TimeZoneNames.NameType LONG_STANDARD;
-    enum_constant public static final android.icu.text.TimeZoneNames.NameType SHORT_DAYLIGHT;
-    enum_constant public static final android.icu.text.TimeZoneNames.NameType SHORT_GENERIC;
-    enum_constant public static final android.icu.text.TimeZoneNames.NameType SHORT_STANDARD;
-  }
-
-  public abstract class Transliterator {
-    method public static final android.icu.text.Transliterator createFromRules(String, String, int);
-    method public void filteredTransliterate(android.icu.text.Replaceable, android.icu.text.Transliterator.Position, boolean);
-    method public final void finishTransliteration(android.icu.text.Replaceable, android.icu.text.Transliterator.Position);
-    method public static final java.util.Enumeration<java.lang.String> getAvailableIDs();
-    method public static final java.util.Enumeration<java.lang.String> getAvailableSources();
-    method public static final java.util.Enumeration<java.lang.String> getAvailableTargets(String);
-    method public static final java.util.Enumeration<java.lang.String> getAvailableVariants(String, String);
-    method public static final String getDisplayName(String);
-    method public static String getDisplayName(String, java.util.Locale);
-    method public static String getDisplayName(String, android.icu.util.ULocale);
-    method public android.icu.text.Transliterator[] getElements();
-    method public final android.icu.text.UnicodeFilter getFilter();
-    method public final String getID();
-    method public static final android.icu.text.Transliterator getInstance(String);
-    method public static android.icu.text.Transliterator getInstance(String, int);
-    method public final android.icu.text.Transliterator getInverse();
-    method public final int getMaximumContextLength();
-    method public final android.icu.text.UnicodeSet getSourceSet();
-    method public android.icu.text.UnicodeSet getTargetSet();
-    method public void setFilter(android.icu.text.UnicodeFilter);
-    method public String toRules(boolean);
-    method public final int transliterate(android.icu.text.Replaceable, int, int);
-    method public final void transliterate(android.icu.text.Replaceable);
-    method public final String transliterate(String);
-    method public final void transliterate(android.icu.text.Replaceable, android.icu.text.Transliterator.Position, String);
-    method public final void transliterate(android.icu.text.Replaceable, android.icu.text.Transliterator.Position, int);
-    method public final void transliterate(android.icu.text.Replaceable, android.icu.text.Transliterator.Position);
-    field public static final int FORWARD = 0; // 0x0
-    field public static final int REVERSE = 1; // 0x1
-  }
-
-  public static class Transliterator.Position {
-    ctor public Transliterator.Position();
-    ctor public Transliterator.Position(int, int, int);
-    ctor public Transliterator.Position(int, int, int, int);
-    ctor public Transliterator.Position(android.icu.text.Transliterator.Position);
-    method public void set(android.icu.text.Transliterator.Position);
-    method public final void validate(int);
-    field public int contextLimit;
-    field public int contextStart;
-    field public int limit;
-    field public int start;
-  }
-
-  public abstract class UCharacterIterator implements java.lang.Cloneable {
-    ctor protected UCharacterIterator();
-    method public Object clone() throws java.lang.CloneNotSupportedException;
-    method public abstract int current();
-    method public int currentCodePoint();
-    method public java.text.CharacterIterator getCharacterIterator();
-    method public abstract int getIndex();
-    method public static final android.icu.text.UCharacterIterator getInstance(android.icu.text.Replaceable);
-    method public static final android.icu.text.UCharacterIterator getInstance(String);
-    method public static final android.icu.text.UCharacterIterator getInstance(char[]);
-    method public static final android.icu.text.UCharacterIterator getInstance(char[], int, int);
-    method public static final android.icu.text.UCharacterIterator getInstance(StringBuffer);
-    method public static final android.icu.text.UCharacterIterator getInstance(java.text.CharacterIterator);
-    method public abstract int getLength();
-    method public abstract int getText(char[], int);
-    method public final int getText(char[]);
-    method public String getText();
-    method public int moveCodePointIndex(int);
-    method public int moveIndex(int);
-    method public abstract int next();
-    method public int nextCodePoint();
-    method public abstract int previous();
-    method public int previousCodePoint();
-    method public abstract void setIndex(int);
-    method public void setToLimit();
-    method public void setToStart();
-    field public static final int DONE = -1; // 0xffffffff
-  }
-
-  public abstract class UFormat extends java.text.Format {
-    ctor public UFormat();
-  }
-
-  public abstract class UnicodeFilter implements android.icu.text.UnicodeMatcher {
-    method public abstract boolean contains(int);
-    method public int matches(android.icu.text.Replaceable, int[], int, boolean);
-  }
-
-  public interface UnicodeMatcher {
-    method public void addMatchSetTo(android.icu.text.UnicodeSet);
-    method public int matches(android.icu.text.Replaceable, int[], int, boolean);
-    method public boolean matchesIndexValue(int);
-    method public String toPattern(boolean);
-    field public static final char ETHER = 65535; // 0xffff '\uffff'
-    field public static final int U_MATCH = 2; // 0x2
-    field public static final int U_MISMATCH = 0; // 0x0
-    field public static final int U_PARTIAL_MATCH = 1; // 0x1
-  }
-
-  public class UnicodeSet extends android.icu.text.UnicodeFilter implements java.lang.Comparable<android.icu.text.UnicodeSet> android.icu.util.Freezable<android.icu.text.UnicodeSet> java.lang.Iterable<java.lang.String> {
-    ctor public UnicodeSet();
-    ctor public UnicodeSet(android.icu.text.UnicodeSet);
-    ctor public UnicodeSet(int, int);
-    ctor public UnicodeSet(int...);
-    ctor public UnicodeSet(String);
-    ctor public UnicodeSet(String, boolean);
-    ctor public UnicodeSet(String, int);
-    ctor public UnicodeSet(String, java.text.ParsePosition, android.icu.text.SymbolTable);
-    ctor public UnicodeSet(String, java.text.ParsePosition, android.icu.text.SymbolTable, int);
-    method public StringBuffer _generatePattern(StringBuffer, boolean);
-    method public StringBuffer _generatePattern(StringBuffer, boolean, boolean);
-    method public android.icu.text.UnicodeSet add(int, int);
-    method public final android.icu.text.UnicodeSet add(int);
-    method public final android.icu.text.UnicodeSet add(CharSequence);
-    method public android.icu.text.UnicodeSet add(Iterable<?>);
-    method public android.icu.text.UnicodeSet addAll(int, int);
-    method public final android.icu.text.UnicodeSet addAll(CharSequence);
-    method public android.icu.text.UnicodeSet addAll(android.icu.text.UnicodeSet);
-    method public android.icu.text.UnicodeSet addAll(Iterable<?>);
-    method public <T extends java.lang.CharSequence> android.icu.text.UnicodeSet addAll(T...);
-    method public <T extends java.util.Collection<java.lang.String>> T addAllTo(T);
-    method public void addMatchSetTo(android.icu.text.UnicodeSet);
-    method public android.icu.text.UnicodeSet applyIntPropertyValue(int, int);
-    method public final android.icu.text.UnicodeSet applyPattern(String);
-    method public android.icu.text.UnicodeSet applyPattern(String, boolean);
-    method public android.icu.text.UnicodeSet applyPattern(String, int);
-    method public android.icu.text.UnicodeSet applyPropertyAlias(String, String);
-    method public android.icu.text.UnicodeSet applyPropertyAlias(String, String, android.icu.text.SymbolTable);
-    method public int charAt(int);
-    method public android.icu.text.UnicodeSet clear();
-    method public Object clone();
-    method public android.icu.text.UnicodeSet cloneAsThawed();
-    method public android.icu.text.UnicodeSet closeOver(int);
-    method public android.icu.text.UnicodeSet compact();
-    method public int compareTo(android.icu.text.UnicodeSet);
-    method public int compareTo(android.icu.text.UnicodeSet, android.icu.text.UnicodeSet.ComparisonStyle);
-    method public int compareTo(Iterable<java.lang.String>);
-    method public android.icu.text.UnicodeSet complement(int, int);
-    method public final android.icu.text.UnicodeSet complement(int);
-    method public android.icu.text.UnicodeSet complement();
-    method public final android.icu.text.UnicodeSet complement(CharSequence);
-    method public final android.icu.text.UnicodeSet complementAll(CharSequence);
-    method public android.icu.text.UnicodeSet complementAll(android.icu.text.UnicodeSet);
-    method public boolean contains(int);
-    method public boolean contains(int, int);
-    method public final boolean contains(CharSequence);
-    method public boolean containsAll(android.icu.text.UnicodeSet);
-    method public boolean containsAll(String);
-    method public <T extends java.lang.CharSequence> boolean containsAll(Iterable<T>);
-    method public boolean containsNone(int, int);
-    method public boolean containsNone(android.icu.text.UnicodeSet);
-    method public boolean containsNone(CharSequence);
-    method public <T extends java.lang.CharSequence> boolean containsNone(Iterable<T>);
-    method public final boolean containsSome(int, int);
-    method public final boolean containsSome(android.icu.text.UnicodeSet);
-    method public final boolean containsSome(CharSequence);
-    method public final <T extends java.lang.CharSequence> boolean containsSome(Iterable<T>);
-    method public android.icu.text.UnicodeSet freeze();
-    method public static android.icu.text.UnicodeSet from(CharSequence);
-    method public static android.icu.text.UnicodeSet fromAll(CharSequence);
-    method public int getRangeCount();
-    method public int getRangeEnd(int);
-    method public int getRangeStart(int);
-    method public int indexOf(int);
-    method public boolean isEmpty();
-    method public boolean isFrozen();
-    method public java.util.Iterator<java.lang.String> iterator();
-    method public boolean matchesIndexValue(int);
-    method public Iterable<android.icu.text.UnicodeSet.EntryRange> ranges();
-    method public android.icu.text.UnicodeSet remove(int, int);
-    method public final android.icu.text.UnicodeSet remove(int);
-    method public final android.icu.text.UnicodeSet remove(CharSequence);
-    method public final android.icu.text.UnicodeSet removeAll(CharSequence);
-    method public android.icu.text.UnicodeSet removeAll(android.icu.text.UnicodeSet);
-    method public <T extends java.lang.CharSequence> android.icu.text.UnicodeSet removeAll(Iterable<T>);
-    method public final android.icu.text.UnicodeSet removeAllStrings();
-    method public android.icu.text.UnicodeSet retain(int, int);
-    method public final android.icu.text.UnicodeSet retain(int);
-    method public final android.icu.text.UnicodeSet retain(CharSequence);
-    method public final android.icu.text.UnicodeSet retainAll(CharSequence);
-    method public android.icu.text.UnicodeSet retainAll(android.icu.text.UnicodeSet);
-    method public <T extends java.lang.CharSequence> android.icu.text.UnicodeSet retainAll(Iterable<T>);
-    method public android.icu.text.UnicodeSet set(int, int);
-    method public android.icu.text.UnicodeSet set(android.icu.text.UnicodeSet);
-    method public int size();
-    method public int span(CharSequence, android.icu.text.UnicodeSet.SpanCondition);
-    method public int span(CharSequence, int, android.icu.text.UnicodeSet.SpanCondition);
-    method public int spanBack(CharSequence, android.icu.text.UnicodeSet.SpanCondition);
-    method public int spanBack(CharSequence, int, android.icu.text.UnicodeSet.SpanCondition);
-    method public java.util.Collection<java.lang.String> strings();
-    method public String toPattern(boolean);
-    field public static final int ADD_CASE_MAPPINGS = 4; // 0x4
-    field public static final android.icu.text.UnicodeSet ALL_CODE_POINTS;
-    field public static final int CASE = 2; // 0x2
-    field public static final int CASE_INSENSITIVE = 2; // 0x2
-    field public static final android.icu.text.UnicodeSet EMPTY;
-    field public static final int IGNORE_SPACE = 1; // 0x1
-    field public static final int MAX_VALUE = 1114111; // 0x10ffff
-    field public static final int MIN_VALUE = 0; // 0x0
-  }
-
-  public enum UnicodeSet.ComparisonStyle {
-    enum_constant public static final android.icu.text.UnicodeSet.ComparisonStyle LEXICOGRAPHIC;
-    enum_constant public static final android.icu.text.UnicodeSet.ComparisonStyle LONGER_FIRST;
-    enum_constant public static final android.icu.text.UnicodeSet.ComparisonStyle SHORTER_FIRST;
-  }
-
-  public static class UnicodeSet.EntryRange {
-    field public int codepoint;
-    field public int codepointEnd;
-  }
-
-  public enum UnicodeSet.SpanCondition {
-    enum_constant public static final android.icu.text.UnicodeSet.SpanCondition CONDITION_COUNT;
-    enum_constant public static final android.icu.text.UnicodeSet.SpanCondition CONTAINED;
-    enum_constant public static final android.icu.text.UnicodeSet.SpanCondition NOT_CONTAINED;
-    enum_constant public static final android.icu.text.UnicodeSet.SpanCondition SIMPLE;
-  }
-
-  public class UnicodeSetIterator {
-    ctor public UnicodeSetIterator(android.icu.text.UnicodeSet);
-    ctor public UnicodeSetIterator();
-    method public String getString();
-    method public boolean next();
-    method public boolean nextRange();
-    method public void reset(android.icu.text.UnicodeSet);
-    method public void reset();
-    field public static int IS_STRING;
-    field public int codepoint;
-    field public int codepointEnd;
-    field public String string;
-  }
-
-  public class UnicodeSetSpanner {
-    ctor public UnicodeSetSpanner(android.icu.text.UnicodeSet);
-    method public int countIn(CharSequence);
-    method public int countIn(CharSequence, android.icu.text.UnicodeSetSpanner.CountMethod);
-    method public int countIn(CharSequence, android.icu.text.UnicodeSetSpanner.CountMethod, android.icu.text.UnicodeSet.SpanCondition);
-    method public String deleteFrom(CharSequence);
-    method public String deleteFrom(CharSequence, android.icu.text.UnicodeSet.SpanCondition);
-    method public android.icu.text.UnicodeSet getUnicodeSet();
-    method public String replaceFrom(CharSequence, CharSequence);
-    method public String replaceFrom(CharSequence, CharSequence, android.icu.text.UnicodeSetSpanner.CountMethod);
-    method public String replaceFrom(CharSequence, CharSequence, android.icu.text.UnicodeSetSpanner.CountMethod, android.icu.text.UnicodeSet.SpanCondition);
-    method public CharSequence trim(CharSequence);
-    method public CharSequence trim(CharSequence, android.icu.text.UnicodeSetSpanner.TrimOption);
-    method public CharSequence trim(CharSequence, android.icu.text.UnicodeSetSpanner.TrimOption, android.icu.text.UnicodeSet.SpanCondition);
-  }
-
-  public enum UnicodeSetSpanner.CountMethod {
-    enum_constant public static final android.icu.text.UnicodeSetSpanner.CountMethod MIN_ELEMENTS;
-    enum_constant public static final android.icu.text.UnicodeSetSpanner.CountMethod WHOLE_SPAN;
-  }
-
-  public enum UnicodeSetSpanner.TrimOption {
-    enum_constant public static final android.icu.text.UnicodeSetSpanner.TrimOption BOTH;
-    enum_constant public static final android.icu.text.UnicodeSetSpanner.TrimOption LEADING;
-    enum_constant public static final android.icu.text.UnicodeSetSpanner.TrimOption TRAILING;
-  }
-
-}
-
-package android.icu.util {
-
-  public class BuddhistCalendar extends android.icu.util.GregorianCalendar {
-    ctor public BuddhistCalendar();
-    ctor public BuddhistCalendar(android.icu.util.TimeZone);
-    ctor public BuddhistCalendar(java.util.Locale);
-    ctor public BuddhistCalendar(android.icu.util.ULocale);
-    ctor public BuddhistCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public BuddhistCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public BuddhistCalendar(java.util.Date);
-    ctor public BuddhistCalendar(int, int, int);
-    ctor public BuddhistCalendar(int, int, int, int, int, int);
-    field public static final int BE = 0; // 0x0
-  }
-
-  public abstract class Calendar implements java.lang.Cloneable java.lang.Comparable<android.icu.util.Calendar> java.io.Serializable {
-    ctor protected Calendar();
-    ctor protected Calendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor protected Calendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    method public void add(int, int);
-    method public boolean after(Object);
-    method public boolean before(Object);
-    method public final void clear();
-    method public final void clear(int);
-    method public Object clone();
-    method public int compareTo(android.icu.util.Calendar);
-    method protected void complete();
-    method protected void computeFields();
-    method protected final void computeGregorianFields(int);
-    method protected int computeGregorianMonthStart(int, int);
-    method protected int computeJulianDay();
-    method @Deprecated protected int computeMillisInDay();
-    method protected void computeTime();
-    method @Deprecated protected int computeZoneOffset(long, int);
-    method public int fieldDifference(java.util.Date, int);
-    method protected String fieldName(int);
-    method protected static final long floorDivide(long, long);
-    method protected static final int floorDivide(int, int);
-    method protected static final int floorDivide(int, int, int[]);
-    method protected static final int floorDivide(long, int, int[]);
-    method public final int get(int);
-    method public int getActualMaximum(int);
-    method public int getActualMinimum(int);
-    method public static java.util.Locale[] getAvailableLocales();
-    method public android.icu.text.DateFormat getDateTimeFormat(int, int, java.util.Locale);
-    method public android.icu.text.DateFormat getDateTimeFormat(int, int, android.icu.util.ULocale);
-    method public String getDisplayName(java.util.Locale);
-    method public String getDisplayName(android.icu.util.ULocale);
-    method public final int getFieldCount();
-    method protected int[][][] getFieldResolutionTable();
-    method public int getFirstDayOfWeek();
-    method public final int getGreatestMinimum(int);
-    method protected final int getGregorianDayOfMonth();
-    method protected final int getGregorianDayOfYear();
-    method protected final int getGregorianMonth();
-    method protected final int getGregorianYear();
-    method public static android.icu.util.Calendar getInstance();
-    method public static android.icu.util.Calendar getInstance(android.icu.util.TimeZone);
-    method public static android.icu.util.Calendar getInstance(java.util.Locale);
-    method public static android.icu.util.Calendar getInstance(android.icu.util.ULocale);
-    method public static android.icu.util.Calendar getInstance(android.icu.util.TimeZone, java.util.Locale);
-    method public static android.icu.util.Calendar getInstance(android.icu.util.TimeZone, android.icu.util.ULocale);
-    method public static final String[] getKeywordValuesForLocale(String, android.icu.util.ULocale, boolean);
-    method public final int getLeastMaximum(int);
-    method protected int getLimit(int, int);
-    method public final int getMaximum(int);
-    method public int getMinimalDaysInFirstWeek();
-    method public final int getMinimum(int);
-    method public int getRepeatedWallTimeOption();
-    method public int getSkippedWallTimeOption();
-    method protected final int getStamp(int);
-    method public final java.util.Date getTime();
-    method public long getTimeInMillis();
-    method public android.icu.util.TimeZone getTimeZone();
-    method public String getType();
-    method public android.icu.util.Calendar.WeekData getWeekData();
-    method public static android.icu.util.Calendar.WeekData getWeekDataForRegion(String);
-    method protected static final int gregorianMonthLength(int, int);
-    method protected static final int gregorianPreviousMonthLength(int, int);
-    method protected void handleComputeFields(int);
-    method protected int handleComputeJulianDay(int);
-    method protected abstract int handleComputeMonthStart(int, int, boolean);
-    method protected int[] handleCreateFields();
-    method protected android.icu.text.DateFormat handleGetDateFormat(String, java.util.Locale);
-    method protected android.icu.text.DateFormat handleGetDateFormat(String, String, java.util.Locale);
-    method protected android.icu.text.DateFormat handleGetDateFormat(String, android.icu.util.ULocale);
-    method protected abstract int handleGetExtendedYear();
-    method protected abstract int handleGetLimit(int, int);
-    method protected int handleGetMonthLength(int, int);
-    method protected int handleGetYearLength(int);
-    method protected final int internalGet(int);
-    method protected final int internalGet(int, int);
-    method protected final long internalGetTimeInMillis();
-    method protected final void internalSet(int, int);
-    method public boolean isEquivalentTo(android.icu.util.Calendar);
-    method protected static final boolean isGregorianLeapYear(int);
-    method public boolean isLenient();
-    method public final boolean isSet(int);
-    method public boolean isWeekend(java.util.Date);
-    method public boolean isWeekend();
-    method protected static final int julianDayToDayOfWeek(int);
-    method protected static final long julianDayToMillis(int);
-    method protected static final int millisToJulianDay(long);
-    method protected int newerField(int, int);
-    method protected int newestStamp(int, int, int);
-    method protected void pinField(int);
-    method protected void prepareGetActual(int, boolean);
-    method protected int resolveFields(int[][][]);
-    method public final void roll(int, boolean);
-    method public void roll(int, int);
-    method public final void set(int, int);
-    method public final void set(int, int, int);
-    method public final void set(int, int, int, int, int);
-    method public final void set(int, int, int, int, int, int);
-    method public void setFirstDayOfWeek(int);
-    method public void setLenient(boolean);
-    method public void setMinimalDaysInFirstWeek(int);
-    method public void setRepeatedWallTimeOption(int);
-    method public void setSkippedWallTimeOption(int);
-    method public final void setTime(java.util.Date);
-    method public void setTimeInMillis(long);
-    method public void setTimeZone(android.icu.util.TimeZone);
-    method public android.icu.util.Calendar setWeekData(android.icu.util.Calendar.WeekData);
-    method protected void validateField(int);
-    method protected final void validateField(int, int, int);
-    method protected void validateFields();
-    method protected int weekNumber(int, int, int);
-    method protected final int weekNumber(int, int);
-    field public static final int AM = 0; // 0x0
-    field public static final int AM_PM = 9; // 0x9
-    field public static final int APRIL = 3; // 0x3
-    field public static final int AUGUST = 7; // 0x7
-    field @Deprecated protected static final int BASE_FIELD_COUNT = 23; // 0x17
-    field public static final int DATE = 5; // 0x5
-    field public static final int DAY_OF_MONTH = 5; // 0x5
-    field public static final int DAY_OF_WEEK = 7; // 0x7
-    field public static final int DAY_OF_WEEK_IN_MONTH = 8; // 0x8
-    field public static final int DAY_OF_YEAR = 6; // 0x6
-    field public static final int DECEMBER = 11; // 0xb
-    field public static final int DOW_LOCAL = 18; // 0x12
-    field public static final int DST_OFFSET = 16; // 0x10
-    field protected static final int EPOCH_JULIAN_DAY = 2440588; // 0x253d8c
-    field public static final int ERA = 0; // 0x0
-    field public static final int EXTENDED_YEAR = 19; // 0x13
-    field public static final int FEBRUARY = 1; // 0x1
-    field public static final int FRIDAY = 6; // 0x6
-    field protected static final int GREATEST_MINIMUM = 1; // 0x1
-    field public static final int HOUR = 10; // 0xa
-    field public static final int HOUR_OF_DAY = 11; // 0xb
-    field protected static final int INTERNALLY_SET = 1; // 0x1
-    field public static final int IS_LEAP_MONTH = 22; // 0x16
-    field public static final int JANUARY = 0; // 0x0
-    field protected static final int JAN_1_1_JULIAN_DAY = 1721426; // 0x1a4452
-    field public static final int JULIAN_DAY = 20; // 0x14
-    field public static final int JULY = 6; // 0x6
-    field public static final int JUNE = 5; // 0x5
-    field protected static final int LEAST_MAXIMUM = 2; // 0x2
-    field public static final int MARCH = 2; // 0x2
-    field protected static final int MAXIMUM = 3; // 0x3
-    field protected static final java.util.Date MAX_DATE;
-    field @Deprecated protected static final int MAX_FIELD_COUNT = 32; // 0x20
-    field protected static final int MAX_JULIAN = 2130706432; // 0x7f000000
-    field protected static final long MAX_MILLIS = 183882168921600000L; // 0x28d47dbbf19b000L
-    field public static final int MAY = 4; // 0x4
-    field public static final int MILLISECOND = 14; // 0xe
-    field public static final int MILLISECONDS_IN_DAY = 21; // 0x15
-    field protected static final int MINIMUM = 0; // 0x0
-    field protected static final int MINIMUM_USER_STAMP = 2; // 0x2
-    field public static final int MINUTE = 12; // 0xc
-    field protected static final java.util.Date MIN_DATE;
-    field protected static final int MIN_JULIAN = -2130706432; // 0x81000000
-    field protected static final long MIN_MILLIS = -184303902528000000L; // 0xfd713893bf19b000L
-    field public static final int MONDAY = 2; // 0x2
-    field public static final int MONTH = 2; // 0x2
-    field public static final int NOVEMBER = 10; // 0xa
-    field public static final int OCTOBER = 9; // 0x9
-    field protected static final long ONE_DAY = 86400000L; // 0x5265c00L
-    field protected static final int ONE_HOUR = 3600000; // 0x36ee80
-    field protected static final int ONE_MINUTE = 60000; // 0xea60
-    field protected static final int ONE_SECOND = 1000; // 0x3e8
-    field protected static final long ONE_WEEK = 604800000L; // 0x240c8400L
-    field public static final int PM = 1; // 0x1
-    field protected static final int RESOLVE_REMAP = 32; // 0x20
-    field public static final int SATURDAY = 7; // 0x7
-    field public static final int SECOND = 13; // 0xd
-    field public static final int SEPTEMBER = 8; // 0x8
-    field public static final int SUNDAY = 1; // 0x1
-    field public static final int THURSDAY = 5; // 0x5
-    field public static final int TUESDAY = 3; // 0x3
-    field public static final int UNDECIMBER = 12; // 0xc
-    field protected static final int UNSET = 0; // 0x0
-    field public static final int WALLTIME_FIRST = 1; // 0x1
-    field public static final int WALLTIME_LAST = 0; // 0x0
-    field public static final int WALLTIME_NEXT_VALID = 2; // 0x2
-    field public static final int WEDNESDAY = 4; // 0x4
-    field public static final int WEEK_OF_MONTH = 4; // 0x4
-    field public static final int WEEK_OF_YEAR = 3; // 0x3
-    field public static final int YEAR = 1; // 0x1
-    field public static final int YEAR_WOY = 17; // 0x11
-    field public static final int ZONE_OFFSET = 15; // 0xf
-  }
-
-  public static final class Calendar.WeekData {
-    ctor public Calendar.WeekData(int, int, int, int, int, int);
-    field public final int firstDayOfWeek;
-    field public final int minimalDaysInFirstWeek;
-    field public final int weekendCease;
-    field public final int weekendCeaseMillis;
-    field public final int weekendOnset;
-    field public final int weekendOnsetMillis;
-  }
-
-  public class ChineseCalendar extends android.icu.util.Calendar {
-    ctor public ChineseCalendar();
-    ctor public ChineseCalendar(java.util.Date);
-    ctor public ChineseCalendar(int, int, int, int);
-    ctor public ChineseCalendar(int, int, int, int, int, int, int);
-    ctor public ChineseCalendar(int, int, int, int, int);
-    ctor public ChineseCalendar(int, int, int, int, int, int, int, int);
-    ctor public ChineseCalendar(java.util.Locale);
-    ctor public ChineseCalendar(android.icu.util.TimeZone);
-    ctor public ChineseCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public ChineseCalendar(android.icu.util.ULocale);
-    ctor public ChineseCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    method protected int handleComputeMonthStart(int, int, boolean);
-    method protected android.icu.text.DateFormat handleGetDateFormat(String, String, android.icu.util.ULocale);
-    method protected int handleGetExtendedYear();
-    method protected int handleGetLimit(int, int);
-  }
-
-  public final class CopticCalendar extends android.icu.util.Calendar {
-    ctor public CopticCalendar();
-    ctor public CopticCalendar(android.icu.util.TimeZone);
-    ctor public CopticCalendar(java.util.Locale);
-    ctor public CopticCalendar(android.icu.util.ULocale);
-    ctor public CopticCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public CopticCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public CopticCalendar(int, int, int);
-    ctor public CopticCalendar(java.util.Date);
-    ctor public CopticCalendar(int, int, int, int, int, int);
-    method @Deprecated protected void handleComputeFields(int);
-    method protected int handleComputeMonthStart(int, int, boolean);
-    method @Deprecated protected int handleGetExtendedYear();
-    method protected int handleGetLimit(int, int);
-    field public static final int AMSHIR = 5; // 0x5
-    field public static final int BABA = 1; // 0x1
-    field public static final int BARAMHAT = 6; // 0x6
-    field public static final int BARAMOUDA = 7; // 0x7
-    field public static final int BASHANS = 8; // 0x8
-    field public static final int EPEP = 10; // 0xa
-    field public static final int HATOR = 2; // 0x2
-    field public static final int KIAHK = 3; // 0x3
-    field public static final int MESRA = 11; // 0xb
-    field public static final int NASIE = 12; // 0xc
-    field public static final int PAONA = 9; // 0x9
-    field public static final int TOBA = 4; // 0x4
-    field public static final int TOUT = 0; // 0x0
-  }
-
-  public class Currency extends android.icu.util.MeasureUnit {
-    ctor protected Currency(String);
-    method public static android.icu.util.Currency fromJavaCurrency(java.util.Currency);
-    method public static java.util.Set<android.icu.util.Currency> getAvailableCurrencies();
-    method public static String[] getAvailableCurrencyCodes(android.icu.util.ULocale, java.util.Date);
-    method public static String[] getAvailableCurrencyCodes(java.util.Locale, java.util.Date);
-    method public static java.util.Locale[] getAvailableLocales();
-    method public static android.icu.util.ULocale[] getAvailableULocales();
-    method public String getCurrencyCode();
-    method public int getDefaultFractionDigits();
-    method public int getDefaultFractionDigits(android.icu.util.Currency.CurrencyUsage);
-    method public String getDisplayName();
-    method public String getDisplayName(java.util.Locale);
-    method public static android.icu.util.Currency getInstance(java.util.Locale);
-    method public static android.icu.util.Currency getInstance(android.icu.util.ULocale);
-    method public static android.icu.util.Currency getInstance(String);
-    method public static final String[] getKeywordValuesForLocale(String, android.icu.util.ULocale, boolean);
-    method public String getName(java.util.Locale, int, boolean[]);
-    method public String getName(android.icu.util.ULocale, int, boolean[]);
-    method public String getName(java.util.Locale, int, String, boolean[]);
-    method public String getName(android.icu.util.ULocale, int, String, boolean[]);
-    method public int getNumericCode();
-    method public double getRoundingIncrement();
-    method public double getRoundingIncrement(android.icu.util.Currency.CurrencyUsage);
-    method public String getSymbol();
-    method public String getSymbol(java.util.Locale);
-    method public String getSymbol(android.icu.util.ULocale);
-    method public static boolean isAvailable(String, java.util.Date, java.util.Date);
-    method public java.util.Currency toJavaCurrency();
-    field public static final int LONG_NAME = 1; // 0x1
-    field public static final int NARROW_SYMBOL_NAME = 3; // 0x3
-    field public static final int PLURAL_LONG_NAME = 2; // 0x2
-    field public static final int SYMBOL_NAME = 0; // 0x0
-  }
-
-  public enum Currency.CurrencyUsage {
-    enum_constant public static final android.icu.util.Currency.CurrencyUsage CASH;
-    enum_constant public static final android.icu.util.Currency.CurrencyUsage STANDARD;
-  }
-
-  public class CurrencyAmount extends android.icu.util.Measure {
-    ctor public CurrencyAmount(Number, android.icu.util.Currency);
-    ctor public CurrencyAmount(double, android.icu.util.Currency);
-    ctor public CurrencyAmount(Number, java.util.Currency);
-    ctor public CurrencyAmount(double, java.util.Currency);
-    method public android.icu.util.Currency getCurrency();
-  }
-
-  public final class DateInterval implements java.io.Serializable {
-    ctor public DateInterval(long, long);
-    method public long getFromDate();
-    method public long getToDate();
-  }
-
-  public final class EthiopicCalendar extends android.icu.util.Calendar {
-    ctor public EthiopicCalendar();
-    ctor public EthiopicCalendar(android.icu.util.TimeZone);
-    ctor public EthiopicCalendar(java.util.Locale);
-    ctor public EthiopicCalendar(android.icu.util.ULocale);
-    ctor public EthiopicCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public EthiopicCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public EthiopicCalendar(int, int, int);
-    ctor public EthiopicCalendar(java.util.Date);
-    ctor public EthiopicCalendar(int, int, int, int, int, int);
-    method @Deprecated protected void handleComputeFields(int);
-    method protected int handleComputeMonthStart(int, int, boolean);
-    method @Deprecated protected int handleGetExtendedYear();
-    method @Deprecated protected int handleGetLimit(int, int);
-    method public boolean isAmeteAlemEra();
-    method public void setAmeteAlemEra(boolean);
-    field public static final int GENBOT = 8; // 0x8
-    field public static final int HAMLE = 10; // 0xa
-    field public static final int HEDAR = 2; // 0x2
-    field public static final int MEGABIT = 6; // 0x6
-    field public static final int MESKEREM = 0; // 0x0
-    field public static final int MIAZIA = 7; // 0x7
-    field public static final int NEHASSE = 11; // 0xb
-    field public static final int PAGUMEN = 12; // 0xc
-    field public static final int SENE = 9; // 0x9
-    field public static final int TAHSAS = 3; // 0x3
-    field public static final int TEKEMT = 1; // 0x1
-    field public static final int TER = 4; // 0x4
-    field public static final int YEKATIT = 5; // 0x5
-  }
-
-  public interface Freezable<T> extends java.lang.Cloneable {
-    method public T cloneAsThawed();
-    method public T freeze();
-    method public boolean isFrozen();
-  }
-
-  public class GregorianCalendar extends android.icu.util.Calendar {
-    ctor public GregorianCalendar();
-    ctor public GregorianCalendar(android.icu.util.TimeZone);
-    ctor public GregorianCalendar(java.util.Locale);
-    ctor public GregorianCalendar(android.icu.util.ULocale);
-    ctor public GregorianCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public GregorianCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public GregorianCalendar(int, int, int);
-    ctor public GregorianCalendar(int, int, int, int, int);
-    ctor public GregorianCalendar(int, int, int, int, int, int);
-    method public final java.util.Date getGregorianChange();
-    method protected int handleComputeMonthStart(int, int, boolean);
-    method protected int handleGetExtendedYear();
-    method protected int handleGetLimit(int, int);
-    method public boolean isLeapYear(int);
-    method public void setGregorianChange(java.util.Date);
-    field public static final int AD = 1; // 0x1
-    field public static final int BC = 0; // 0x0
-    field protected transient boolean invertGregorian;
-    field protected transient boolean isGregorian;
-  }
-
-  public class HebrewCalendar extends android.icu.util.Calendar {
-    ctor public HebrewCalendar();
-    ctor public HebrewCalendar(android.icu.util.TimeZone);
-    ctor public HebrewCalendar(java.util.Locale);
-    ctor public HebrewCalendar(android.icu.util.ULocale);
-    ctor public HebrewCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public HebrewCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public HebrewCalendar(int, int, int);
-    ctor public HebrewCalendar(java.util.Date);
-    ctor public HebrewCalendar(int, int, int, int, int, int);
-    method protected int handleComputeMonthStart(int, int, boolean);
-    method protected int handleGetExtendedYear();
-    method protected int handleGetLimit(int, int);
-    method @Deprecated protected void validateField(int);
-    field public static final int ADAR = 6; // 0x6
-    field public static final int ADAR_1 = 5; // 0x5
-    field public static final int AV = 11; // 0xb
-    field public static final int ELUL = 12; // 0xc
-    field public static final int HESHVAN = 1; // 0x1
-    field public static final int IYAR = 8; // 0x8
-    field public static final int KISLEV = 2; // 0x2
-    field public static final int NISAN = 7; // 0x7
-    field public static final int SHEVAT = 4; // 0x4
-    field public static final int SIVAN = 9; // 0x9
-    field public static final int TAMUZ = 10; // 0xa
-    field public static final int TEVET = 3; // 0x3
-    field public static final int TISHRI = 0; // 0x0
-  }
-
-  public class ICUUncheckedIOException extends java.lang.RuntimeException {
-    ctor public ICUUncheckedIOException();
-    ctor public ICUUncheckedIOException(String);
-    ctor public ICUUncheckedIOException(Throwable);
-    ctor public ICUUncheckedIOException(String, Throwable);
-  }
-
-  public class IllformedLocaleException extends java.lang.RuntimeException {
-    ctor public IllformedLocaleException();
-    ctor public IllformedLocaleException(String);
-    ctor public IllformedLocaleException(String, int);
-    method public int getErrorIndex();
-  }
-
-  public class IndianCalendar extends android.icu.util.Calendar {
-    ctor public IndianCalendar();
-    ctor public IndianCalendar(android.icu.util.TimeZone);
-    ctor public IndianCalendar(java.util.Locale);
-    ctor public IndianCalendar(android.icu.util.ULocale);
-    ctor public IndianCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public IndianCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public IndianCalendar(java.util.Date);
-    ctor public IndianCalendar(int, int, int);
-    ctor public IndianCalendar(int, int, int, int, int, int);
-    method protected int handleComputeMonthStart(int, int, boolean);
-    method protected int handleGetExtendedYear();
-    method protected int handleGetLimit(int, int);
-    field public static final int AGRAHAYANA = 8; // 0x8
-    field public static final int ASADHA = 3; // 0x3
-    field public static final int ASVINA = 6; // 0x6
-    field public static final int BHADRA = 5; // 0x5
-    field public static final int CHAITRA = 0; // 0x0
-    field public static final int IE = 0; // 0x0
-    field public static final int JYAISTHA = 2; // 0x2
-    field public static final int KARTIKA = 7; // 0x7
-    field public static final int MAGHA = 10; // 0xa
-    field public static final int PAUSA = 9; // 0x9
-    field public static final int PHALGUNA = 11; // 0xb
-    field public static final int SRAVANA = 4; // 0x4
-    field public static final int VAISAKHA = 1; // 0x1
-  }
-
-  public class IslamicCalendar extends android.icu.util.Calendar {
-    ctor public IslamicCalendar();
-    ctor public IslamicCalendar(android.icu.util.TimeZone);
-    ctor public IslamicCalendar(java.util.Locale);
-    ctor public IslamicCalendar(android.icu.util.ULocale);
-    ctor public IslamicCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public IslamicCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public IslamicCalendar(java.util.Date);
-    ctor public IslamicCalendar(int, int, int);
-    ctor public IslamicCalendar(int, int, int, int, int, int);
-    method public android.icu.util.IslamicCalendar.CalculationType getCalculationType();
-    method protected int handleComputeMonthStart(int, int, boolean);
-    method protected int handleGetExtendedYear();
-    method protected int handleGetLimit(int, int);
-    method public void setCalculationType(android.icu.util.IslamicCalendar.CalculationType);
-    field public static final int DHU_AL_HIJJAH = 11; // 0xb
-    field public static final int DHU_AL_QIDAH = 10; // 0xa
-    field public static final int JUMADA_1 = 4; // 0x4
-    field public static final int JUMADA_2 = 5; // 0x5
-    field public static final int MUHARRAM = 0; // 0x0
-    field public static final int RABI_1 = 2; // 0x2
-    field public static final int RABI_2 = 3; // 0x3
-    field public static final int RAJAB = 6; // 0x6
-    field public static final int RAMADAN = 8; // 0x8
-    field public static final int SAFAR = 1; // 0x1
-    field public static final int SHABAN = 7; // 0x7
-    field public static final int SHAWWAL = 9; // 0x9
-  }
-
-  public enum IslamicCalendar.CalculationType {
-    enum_constant public static final android.icu.util.IslamicCalendar.CalculationType ISLAMIC;
-    enum_constant public static final android.icu.util.IslamicCalendar.CalculationType ISLAMIC_CIVIL;
-    enum_constant public static final android.icu.util.IslamicCalendar.CalculationType ISLAMIC_TBLA;
-    enum_constant public static final android.icu.util.IslamicCalendar.CalculationType ISLAMIC_UMALQURA;
-  }
-
-  public class JapaneseCalendar extends android.icu.util.GregorianCalendar {
-    ctor public JapaneseCalendar();
-    ctor public JapaneseCalendar(android.icu.util.TimeZone);
-    ctor public JapaneseCalendar(java.util.Locale);
-    ctor public JapaneseCalendar(android.icu.util.ULocale);
-    ctor public JapaneseCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public JapaneseCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public JapaneseCalendar(java.util.Date);
-    ctor public JapaneseCalendar(int, int, int, int);
-    ctor public JapaneseCalendar(int, int, int);
-    ctor public JapaneseCalendar(int, int, int, int, int, int);
-    field public static final int HEISEI;
-    field public static final int MEIJI;
-    field public static final int REIWA;
-    field public static final int SHOWA;
-    field public static final int TAISHO;
-  }
-
-  public final class LocaleData {
-    method public static android.icu.util.VersionInfo getCLDRVersion();
-    method public String getDelimiter(int);
-    method public static android.icu.util.LocaleData getInstance(android.icu.util.ULocale);
-    method public static android.icu.util.LocaleData getInstance();
-    method public static android.icu.util.LocaleData.MeasurementSystem getMeasurementSystem(android.icu.util.ULocale);
-    method public boolean getNoSubstitute();
-    method public static android.icu.util.LocaleData.PaperSize getPaperSize(android.icu.util.ULocale);
-    method public void setNoSubstitute(boolean);
-    field public static final int ALT_QUOTATION_END = 3; // 0x3
-    field public static final int ALT_QUOTATION_START = 2; // 0x2
-    field public static final int QUOTATION_END = 1; // 0x1
-    field public static final int QUOTATION_START = 0; // 0x0
-  }
-
-  public static final class LocaleData.MeasurementSystem {
-    field public static final android.icu.util.LocaleData.MeasurementSystem SI;
-    field public static final android.icu.util.LocaleData.MeasurementSystem UK;
-    field public static final android.icu.util.LocaleData.MeasurementSystem US;
-  }
-
-  public static final class LocaleData.PaperSize {
-    method public int getHeight();
-    method public int getWidth();
-  }
-
-  public class Measure {
-    ctor public Measure(Number, android.icu.util.MeasureUnit);
-    method public Number getNumber();
-    method public android.icu.util.MeasureUnit getUnit();
-  }
-
-  public class MeasureUnit implements java.io.Serializable {
-    method public static java.util.Set<android.icu.util.MeasureUnit> getAvailable(String);
-    method public static java.util.Set<android.icu.util.MeasureUnit> getAvailable();
-    method public static java.util.Set<java.lang.String> getAvailableTypes();
-    method public String getSubtype();
-    method public String getType();
-    field public static final android.icu.util.MeasureUnit ACRE;
-    field public static final android.icu.util.MeasureUnit ACRE_FOOT;
-    field public static final android.icu.util.MeasureUnit AMPERE;
-    field public static final android.icu.util.MeasureUnit ARC_MINUTE;
-    field public static final android.icu.util.MeasureUnit ARC_SECOND;
-    field public static final android.icu.util.MeasureUnit ASTRONOMICAL_UNIT;
-    field public static final android.icu.util.MeasureUnit ATMOSPHERE;
-    field public static final android.icu.util.MeasureUnit BIT;
-    field public static final android.icu.util.MeasureUnit BUSHEL;
-    field public static final android.icu.util.MeasureUnit BYTE;
-    field public static final android.icu.util.MeasureUnit CALORIE;
-    field public static final android.icu.util.MeasureUnit CARAT;
-    field public static final android.icu.util.MeasureUnit CELSIUS;
-    field public static final android.icu.util.MeasureUnit CENTILITER;
-    field public static final android.icu.util.MeasureUnit CENTIMETER;
-    field public static final android.icu.util.MeasureUnit CENTURY;
-    field public static final android.icu.util.MeasureUnit CUBIC_CENTIMETER;
-    field public static final android.icu.util.MeasureUnit CUBIC_FOOT;
-    field public static final android.icu.util.MeasureUnit CUBIC_INCH;
-    field public static final android.icu.util.MeasureUnit CUBIC_KILOMETER;
-    field public static final android.icu.util.MeasureUnit CUBIC_METER;
-    field public static final android.icu.util.MeasureUnit CUBIC_MILE;
-    field public static final android.icu.util.MeasureUnit CUBIC_YARD;
-    field public static final android.icu.util.MeasureUnit CUP;
-    field public static final android.icu.util.MeasureUnit CUP_METRIC;
-    field public static final android.icu.util.TimeUnit DAY;
-    field public static final android.icu.util.MeasureUnit DECILITER;
-    field public static final android.icu.util.MeasureUnit DECIMETER;
-    field public static final android.icu.util.MeasureUnit DEGREE;
-    field public static final android.icu.util.MeasureUnit FAHRENHEIT;
-    field public static final android.icu.util.MeasureUnit FATHOM;
-    field public static final android.icu.util.MeasureUnit FLUID_OUNCE;
-    field public static final android.icu.util.MeasureUnit FOODCALORIE;
-    field public static final android.icu.util.MeasureUnit FOOT;
-    field public static final android.icu.util.MeasureUnit FURLONG;
-    field public static final android.icu.util.MeasureUnit GALLON;
-    field public static final android.icu.util.MeasureUnit GALLON_IMPERIAL;
-    field public static final android.icu.util.MeasureUnit GENERIC_TEMPERATURE;
-    field public static final android.icu.util.MeasureUnit GIGABIT;
-    field public static final android.icu.util.MeasureUnit GIGABYTE;
-    field public static final android.icu.util.MeasureUnit GIGAHERTZ;
-    field public static final android.icu.util.MeasureUnit GIGAWATT;
-    field public static final android.icu.util.MeasureUnit GRAM;
-    field public static final android.icu.util.MeasureUnit G_FORCE;
-    field public static final android.icu.util.MeasureUnit HECTARE;
-    field public static final android.icu.util.MeasureUnit HECTOLITER;
-    field public static final android.icu.util.MeasureUnit HECTOPASCAL;
-    field public static final android.icu.util.MeasureUnit HERTZ;
-    field public static final android.icu.util.MeasureUnit HORSEPOWER;
-    field public static final android.icu.util.TimeUnit HOUR;
-    field public static final android.icu.util.MeasureUnit INCH;
-    field public static final android.icu.util.MeasureUnit INCH_HG;
-    field public static final android.icu.util.MeasureUnit JOULE;
-    field public static final android.icu.util.MeasureUnit KARAT;
-    field public static final android.icu.util.MeasureUnit KELVIN;
-    field public static final android.icu.util.MeasureUnit KILOBIT;
-    field public static final android.icu.util.MeasureUnit KILOBYTE;
-    field public static final android.icu.util.MeasureUnit KILOCALORIE;
-    field public static final android.icu.util.MeasureUnit KILOGRAM;
-    field public static final android.icu.util.MeasureUnit KILOHERTZ;
-    field public static final android.icu.util.MeasureUnit KILOJOULE;
-    field public static final android.icu.util.MeasureUnit KILOMETER;
-    field public static final android.icu.util.MeasureUnit KILOMETER_PER_HOUR;
-    field public static final android.icu.util.MeasureUnit KILOWATT;
-    field public static final android.icu.util.MeasureUnit KILOWATT_HOUR;
-    field public static final android.icu.util.MeasureUnit KNOT;
-    field public static final android.icu.util.MeasureUnit LIGHT_YEAR;
-    field public static final android.icu.util.MeasureUnit LITER;
-    field public static final android.icu.util.MeasureUnit LITER_PER_100KILOMETERS;
-    field public static final android.icu.util.MeasureUnit LITER_PER_KILOMETER;
-    field public static final android.icu.util.MeasureUnit LUX;
-    field public static final android.icu.util.MeasureUnit MEGABIT;
-    field public static final android.icu.util.MeasureUnit MEGABYTE;
-    field public static final android.icu.util.MeasureUnit MEGAHERTZ;
-    field public static final android.icu.util.MeasureUnit MEGALITER;
-    field public static final android.icu.util.MeasureUnit MEGAWATT;
-    field public static final android.icu.util.MeasureUnit METER;
-    field public static final android.icu.util.MeasureUnit METER_PER_SECOND;
-    field public static final android.icu.util.MeasureUnit METER_PER_SECOND_SQUARED;
-    field public static final android.icu.util.MeasureUnit METRIC_TON;
-    field public static final android.icu.util.MeasureUnit MICROGRAM;
-    field public static final android.icu.util.MeasureUnit MICROMETER;
-    field public static final android.icu.util.MeasureUnit MICROSECOND;
-    field public static final android.icu.util.MeasureUnit MILE;
-    field public static final android.icu.util.MeasureUnit MILE_PER_GALLON;
-    field public static final android.icu.util.MeasureUnit MILE_PER_GALLON_IMPERIAL;
-    field public static final android.icu.util.MeasureUnit MILE_PER_HOUR;
-    field public static final android.icu.util.MeasureUnit MILE_SCANDINAVIAN;
-    field public static final android.icu.util.MeasureUnit MILLIAMPERE;
-    field public static final android.icu.util.MeasureUnit MILLIBAR;
-    field public static final android.icu.util.MeasureUnit MILLIGRAM;
-    field public static final android.icu.util.MeasureUnit MILLIGRAM_PER_DECILITER;
-    field public static final android.icu.util.MeasureUnit MILLILITER;
-    field public static final android.icu.util.MeasureUnit MILLIMETER;
-    field public static final android.icu.util.MeasureUnit MILLIMETER_OF_MERCURY;
-    field public static final android.icu.util.MeasureUnit MILLIMOLE_PER_LITER;
-    field public static final android.icu.util.MeasureUnit MILLISECOND;
-    field public static final android.icu.util.MeasureUnit MILLIWATT;
-    field public static final android.icu.util.TimeUnit MINUTE;
-    field public static final android.icu.util.TimeUnit MONTH;
-    field public static final android.icu.util.MeasureUnit NANOMETER;
-    field public static final android.icu.util.MeasureUnit NANOSECOND;
-    field public static final android.icu.util.MeasureUnit NAUTICAL_MILE;
-    field public static final android.icu.util.MeasureUnit OHM;
-    field public static final android.icu.util.MeasureUnit OUNCE;
-    field public static final android.icu.util.MeasureUnit OUNCE_TROY;
-    field public static final android.icu.util.MeasureUnit PARSEC;
-    field public static final android.icu.util.MeasureUnit PART_PER_MILLION;
-    field public static final android.icu.util.MeasureUnit PERCENT;
-    field public static final android.icu.util.MeasureUnit PERMILLE;
-    field public static final android.icu.util.MeasureUnit PETABYTE;
-    field public static final android.icu.util.MeasureUnit PICOMETER;
-    field public static final android.icu.util.MeasureUnit PINT;
-    field public static final android.icu.util.MeasureUnit PINT_METRIC;
-    field public static final android.icu.util.MeasureUnit POINT;
-    field public static final android.icu.util.MeasureUnit POUND;
-    field public static final android.icu.util.MeasureUnit POUND_PER_SQUARE_INCH;
-    field public static final android.icu.util.MeasureUnit QUART;
-    field public static final android.icu.util.MeasureUnit RADIAN;
-    field public static final android.icu.util.MeasureUnit REVOLUTION_ANGLE;
-    field public static final android.icu.util.TimeUnit SECOND;
-    field public static final android.icu.util.MeasureUnit SQUARE_CENTIMETER;
-    field public static final android.icu.util.MeasureUnit SQUARE_FOOT;
-    field public static final android.icu.util.MeasureUnit SQUARE_INCH;
-    field public static final android.icu.util.MeasureUnit SQUARE_KILOMETER;
-    field public static final android.icu.util.MeasureUnit SQUARE_METER;
-    field public static final android.icu.util.MeasureUnit SQUARE_MILE;
-    field public static final android.icu.util.MeasureUnit SQUARE_YARD;
-    field public static final android.icu.util.MeasureUnit STONE;
-    field public static final android.icu.util.MeasureUnit TABLESPOON;
-    field public static final android.icu.util.MeasureUnit TEASPOON;
-    field public static final android.icu.util.MeasureUnit TERABIT;
-    field public static final android.icu.util.MeasureUnit TERABYTE;
-    field public static final android.icu.util.MeasureUnit TON;
-    field public static final android.icu.util.MeasureUnit VOLT;
-    field public static final android.icu.util.MeasureUnit WATT;
-    field public static final android.icu.util.TimeUnit WEEK;
-    field public static final android.icu.util.MeasureUnit YARD;
-    field public static final android.icu.util.TimeUnit YEAR;
-  }
-
-  public class Output<T> {
-    ctor public Output();
-    ctor public Output(T);
-    field public T value;
-  }
-
-  public interface RangeValueIterator {
-    method public boolean next(android.icu.util.RangeValueIterator.Element);
-    method public void reset();
-  }
-
-  public static class RangeValueIterator.Element {
-    ctor public RangeValueIterator.Element();
-    field public int limit;
-    field public int start;
-    field public int value;
-  }
-
-  public class TaiwanCalendar extends android.icu.util.GregorianCalendar {
-    ctor public TaiwanCalendar();
-    ctor public TaiwanCalendar(android.icu.util.TimeZone);
-    ctor public TaiwanCalendar(java.util.Locale);
-    ctor public TaiwanCalendar(android.icu.util.ULocale);
-    ctor public TaiwanCalendar(android.icu.util.TimeZone, java.util.Locale);
-    ctor public TaiwanCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
-    ctor public TaiwanCalendar(java.util.Date);
-    ctor public TaiwanCalendar(int, int, int);
-    ctor public TaiwanCalendar(int, int, int, int, int, int);
-    field public static final int BEFORE_MINGUO = 0; // 0x0
-    field public static final int MINGUO = 1; // 0x1
-  }
-
-  public class TimeUnit extends android.icu.util.MeasureUnit {
-    method public static android.icu.util.TimeUnit[] values();
-  }
-
-  public abstract class TimeZone implements java.lang.Cloneable android.icu.util.Freezable<android.icu.util.TimeZone> java.io.Serializable {
-    ctor public TimeZone();
-    method public Object clone();
-    method public android.icu.util.TimeZone cloneAsThawed();
-    method public static int countEquivalentIDs(String);
-    method public android.icu.util.TimeZone freeze();
-    method public static java.util.Set<java.lang.String> getAvailableIDs(android.icu.util.TimeZone.SystemTimeZoneType, String, Integer);
-    method public static String[] getAvailableIDs(int);
-    method public static String[] getAvailableIDs(String);
-    method public static String[] getAvailableIDs();
-    method public static String getCanonicalID(String);
-    method public static String getCanonicalID(String, boolean[]);
-    method public int getDSTSavings();
-    method public static android.icu.util.TimeZone getDefault();
-    method public final String getDisplayName();
-    method public final String getDisplayName(java.util.Locale);
-    method public final String getDisplayName(android.icu.util.ULocale);
-    method public final String getDisplayName(boolean, int);
-    method public String getDisplayName(boolean, int, java.util.Locale);
-    method public String getDisplayName(boolean, int, android.icu.util.ULocale);
-    method public static String getEquivalentID(String, int);
-    method public static android.icu.util.TimeZone getFrozenTimeZone(String);
-    method public String getID();
-    method public static String getIDForWindowsID(String, String);
-    method public abstract int getOffset(int, int, int, int, int, int);
-    method public int getOffset(long);
-    method public void getOffset(long, boolean, int[]);
-    method public abstract int getRawOffset();
-    method public static String getRegion(String);
-    method public static String getTZDataVersion();
-    method public static android.icu.util.TimeZone getTimeZone(String);
-    method public static android.icu.util.TimeZone getTimeZone(String, int);
-    method public static String getWindowsID(String);
-    method public boolean hasSameRules(android.icu.util.TimeZone);
-    method public abstract boolean inDaylightTime(java.util.Date);
-    method public boolean isFrozen();
-    method public boolean observesDaylightTime();
-    method public void setID(String);
-    method public abstract void setRawOffset(int);
-    method public abstract boolean useDaylightTime();
-    field public static final int GENERIC_LOCATION = 7; // 0x7
-    field public static final android.icu.util.TimeZone GMT_ZONE;
-    field public static final int LONG = 1; // 0x1
-    field public static final int LONG_GENERIC = 3; // 0x3
-    field public static final int LONG_GMT = 5; // 0x5
-    field public static final int SHORT = 0; // 0x0
-    field public static final int SHORT_COMMONLY_USED = 6; // 0x6
-    field public static final int SHORT_GENERIC = 2; // 0x2
-    field public static final int SHORT_GMT = 4; // 0x4
-    field public static final int TIMEZONE_ICU = 0; // 0x0
-    field public static final int TIMEZONE_JDK = 1; // 0x1
-    field public static final android.icu.util.TimeZone UNKNOWN_ZONE;
-    field public static final String UNKNOWN_ZONE_ID = "Etc/Unknown";
-  }
-
-  public enum TimeZone.SystemTimeZoneType {
-    enum_constant public static final android.icu.util.TimeZone.SystemTimeZoneType ANY;
-    enum_constant public static final android.icu.util.TimeZone.SystemTimeZoneType CANONICAL;
-    enum_constant public static final android.icu.util.TimeZone.SystemTimeZoneType CANONICAL_LOCATION;
-  }
-
-  public final class ULocale implements java.lang.Comparable<android.icu.util.ULocale> java.io.Serializable {
-    ctor public ULocale(String);
-    ctor public ULocale(String, String);
-    ctor public ULocale(String, String, String);
-    method public static android.icu.util.ULocale acceptLanguage(String, android.icu.util.ULocale[], boolean[]);
-    method public static android.icu.util.ULocale acceptLanguage(android.icu.util.ULocale[], android.icu.util.ULocale[], boolean[]);
-    method public static android.icu.util.ULocale acceptLanguage(String, boolean[]);
-    method public static android.icu.util.ULocale acceptLanguage(android.icu.util.ULocale[], boolean[]);
-    method public static android.icu.util.ULocale addLikelySubtags(android.icu.util.ULocale);
-    method public static String canonicalize(String);
-    method public Object clone();
-    method public int compareTo(android.icu.util.ULocale);
-    method public static android.icu.util.ULocale createCanonical(String);
-    method public static android.icu.util.ULocale forLanguageTag(String);
-    method public static android.icu.util.ULocale forLocale(java.util.Locale);
-    method public static android.icu.util.ULocale[] getAvailableLocales();
-    method public String getBaseName();
-    method public static String getBaseName(String);
-    method public String getCharacterOrientation();
-    method public String getCountry();
-    method public static String getCountry(String);
-    method public static android.icu.util.ULocale getDefault();
-    method public static android.icu.util.ULocale getDefault(android.icu.util.ULocale.Category);
-    method public String getDisplayCountry();
-    method public String getDisplayCountry(android.icu.util.ULocale);
-    method public static String getDisplayCountry(String, String);
-    method public static String getDisplayCountry(String, android.icu.util.ULocale);
-    method public static String getDisplayKeyword(String);
-    method public static String getDisplayKeyword(String, String);
-    method public static String getDisplayKeyword(String, android.icu.util.ULocale);
-    method public String getDisplayKeywordValue(String);
-    method public String getDisplayKeywordValue(String, android.icu.util.ULocale);
-    method public static String getDisplayKeywordValue(String, String, String);
-    method public static String getDisplayKeywordValue(String, String, android.icu.util.ULocale);
-    method public String getDisplayLanguage();
-    method public String getDisplayLanguage(android.icu.util.ULocale);
-    method public static String getDisplayLanguage(String, String);
-    method public static String getDisplayLanguage(String, android.icu.util.ULocale);
-    method public String getDisplayLanguageWithDialect();
-    method public String getDisplayLanguageWithDialect(android.icu.util.ULocale);
-    method public static String getDisplayLanguageWithDialect(String, String);
-    method public static String getDisplayLanguageWithDialect(String, android.icu.util.ULocale);
-    method public String getDisplayName();
-    method public String getDisplayName(android.icu.util.ULocale);
-    method public static String getDisplayName(String, String);
-    method public static String getDisplayName(String, android.icu.util.ULocale);
-    method public String getDisplayNameWithDialect();
-    method public String getDisplayNameWithDialect(android.icu.util.ULocale);
-    method public static String getDisplayNameWithDialect(String, String);
-    method public static String getDisplayNameWithDialect(String, android.icu.util.ULocale);
-    method public String getDisplayScript();
-    method public String getDisplayScript(android.icu.util.ULocale);
-    method public static String getDisplayScript(String, String);
-    method public static String getDisplayScript(String, android.icu.util.ULocale);
-    method public String getDisplayVariant();
-    method public String getDisplayVariant(android.icu.util.ULocale);
-    method public static String getDisplayVariant(String, String);
-    method public static String getDisplayVariant(String, android.icu.util.ULocale);
-    method public String getExtension(char);
-    method public java.util.Set<java.lang.Character> getExtensionKeys();
-    method public static String getFallback(String);
-    method public android.icu.util.ULocale getFallback();
-    method public String getISO3Country();
-    method public static String getISO3Country(String);
-    method public String getISO3Language();
-    method public static String getISO3Language(String);
-    method public static String[] getISOCountries();
-    method public static String[] getISOLanguages();
-    method public String getKeywordValue(String);
-    method public static String getKeywordValue(String, String);
-    method public java.util.Iterator<java.lang.String> getKeywords();
-    method public static java.util.Iterator<java.lang.String> getKeywords(String);
-    method public String getLanguage();
-    method public static String getLanguage(String);
-    method public String getLineOrientation();
-    method public String getName();
-    method public static String getName(String);
-    method public String getScript();
-    method public static String getScript(String);
-    method public java.util.Set<java.lang.String> getUnicodeLocaleAttributes();
-    method public java.util.Set<java.lang.String> getUnicodeLocaleKeys();
-    method public String getUnicodeLocaleType(String);
-    method public String getVariant();
-    method public static String getVariant(String);
-    method public boolean isRightToLeft();
-    method public static android.icu.util.ULocale minimizeSubtags(android.icu.util.ULocale);
-    method public android.icu.util.ULocale setKeywordValue(String, String);
-    method public static String setKeywordValue(String, String, String);
-    method public String toLanguageTag();
-    method public static String toLegacyKey(String);
-    method public static String toLegacyType(String, String);
-    method public java.util.Locale toLocale();
-    method public static String toUnicodeLocaleKey(String);
-    method public static String toUnicodeLocaleType(String, String);
-    field public static final android.icu.util.ULocale CANADA;
-    field public static final android.icu.util.ULocale CANADA_FRENCH;
-    field public static final android.icu.util.ULocale CHINA;
-    field public static final android.icu.util.ULocale CHINESE;
-    field public static final android.icu.util.ULocale ENGLISH;
-    field public static final android.icu.util.ULocale FRANCE;
-    field public static final android.icu.util.ULocale FRENCH;
-    field public static final android.icu.util.ULocale GERMAN;
-    field public static final android.icu.util.ULocale GERMANY;
-    field public static final android.icu.util.ULocale ITALIAN;
-    field public static final android.icu.util.ULocale ITALY;
-    field public static final android.icu.util.ULocale JAPAN;
-    field public static final android.icu.util.ULocale JAPANESE;
-    field public static final android.icu.util.ULocale KOREA;
-    field public static final android.icu.util.ULocale KOREAN;
-    field public static final android.icu.util.ULocale PRC;
-    field public static final char PRIVATE_USE_EXTENSION = 120; // 0x0078 'x'
-    field public static final android.icu.util.ULocale ROOT;
-    field public static final android.icu.util.ULocale SIMPLIFIED_CHINESE;
-    field public static final android.icu.util.ULocale TAIWAN;
-    field public static final android.icu.util.ULocale TRADITIONAL_CHINESE;
-    field public static final android.icu.util.ULocale UK;
-    field public static final char UNICODE_LOCALE_EXTENSION = 117; // 0x0075 'u'
-    field public static final android.icu.util.ULocale US;
-  }
-
-  public static final class ULocale.Builder {
-    ctor public ULocale.Builder();
-    method public android.icu.util.ULocale.Builder addUnicodeLocaleAttribute(String);
-    method public android.icu.util.ULocale build();
-    method public android.icu.util.ULocale.Builder clear();
-    method public android.icu.util.ULocale.Builder clearExtensions();
-    method public android.icu.util.ULocale.Builder removeUnicodeLocaleAttribute(String);
-    method public android.icu.util.ULocale.Builder setExtension(char, String);
-    method public android.icu.util.ULocale.Builder setLanguage(String);
-    method public android.icu.util.ULocale.Builder setLanguageTag(String);
-    method public android.icu.util.ULocale.Builder setLocale(android.icu.util.ULocale);
-    method public android.icu.util.ULocale.Builder setRegion(String);
-    method public android.icu.util.ULocale.Builder setScript(String);
-    method public android.icu.util.ULocale.Builder setUnicodeLocaleKeyword(String, String);
-    method public android.icu.util.ULocale.Builder setVariant(String);
-  }
-
-  public enum ULocale.Category {
-    enum_constant public static final android.icu.util.ULocale.Category DISPLAY;
-    enum_constant public static final android.icu.util.ULocale.Category FORMAT;
-  }
-
-  public final class UniversalTimeScale {
-    method public static android.icu.math.BigDecimal bigDecimalFrom(double, int);
-    method public static android.icu.math.BigDecimal bigDecimalFrom(long, int);
-    method public static android.icu.math.BigDecimal bigDecimalFrom(android.icu.math.BigDecimal, int);
-    method public static long from(long, int);
-    method public static long getTimeScaleValue(int, int);
-    method public static android.icu.math.BigDecimal toBigDecimal(long, int);
-    method public static android.icu.math.BigDecimal toBigDecimal(android.icu.math.BigDecimal, int);
-    method public static long toLong(long, int);
-    field public static final int DB2_TIME = 8; // 0x8
-    field public static final int DOTNET_DATE_TIME = 4; // 0x4
-    field public static final int EPOCH_OFFSET_PLUS_1_VALUE = 6; // 0x6
-    field public static final int EPOCH_OFFSET_VALUE = 1; // 0x1
-    field public static final int EXCEL_TIME = 7; // 0x7
-    field public static final int FROM_MAX_VALUE = 3; // 0x3
-    field public static final int FROM_MIN_VALUE = 2; // 0x2
-    field public static final int ICU4C_TIME = 2; // 0x2
-    field public static final int JAVA_TIME = 0; // 0x0
-    field public static final int MAC_OLD_TIME = 5; // 0x5
-    field public static final int MAC_TIME = 6; // 0x6
-    field @Deprecated public static final int MAX_SCALE = 10; // 0xa
-    field public static final int TO_MAX_VALUE = 5; // 0x5
-    field public static final int TO_MIN_VALUE = 4; // 0x4
-    field public static final int UNITS_VALUE = 0; // 0x0
-    field public static final int UNIX_MICROSECONDS_TIME = 9; // 0x9
-    field public static final int UNIX_TIME = 1; // 0x1
-    field public static final int WINDOWS_FILE_TIME = 3; // 0x3
-  }
-
-  public interface ValueIterator {
-    method public boolean next(android.icu.util.ValueIterator.Element);
-    method public void reset();
-    method public void setRange(int, int);
-  }
-
-  public static final class ValueIterator.Element {
-    ctor public ValueIterator.Element();
-    field public int integer;
-    field public Object value;
-  }
-
-  public final class VersionInfo implements java.lang.Comparable<android.icu.util.VersionInfo> {
-    method public int compareTo(android.icu.util.VersionInfo);
-    method public static android.icu.util.VersionInfo getInstance(String);
-    method public static android.icu.util.VersionInfo getInstance(int, int, int, int);
-    method public static android.icu.util.VersionInfo getInstance(int, int, int);
-    method public static android.icu.util.VersionInfo getInstance(int, int);
-    method public static android.icu.util.VersionInfo getInstance(int);
-    method public int getMajor();
-    method public int getMicro();
-    method public int getMilli();
-    method public int getMinor();
-    field public static final android.icu.util.VersionInfo ICU_VERSION;
-    field public static final android.icu.util.VersionInfo UCOL_BUILDER_VERSION;
-    field public static final android.icu.util.VersionInfo UCOL_RUNTIME_VERSION;
-    field public static final android.icu.util.VersionInfo UNICODE_10_0;
-    field public static final android.icu.util.VersionInfo UNICODE_11_0;
-    field public static final android.icu.util.VersionInfo UNICODE_12_0;
-    field public static final android.icu.util.VersionInfo UNICODE_12_1;
-    field public static final android.icu.util.VersionInfo UNICODE_13_0;
-    field public static final android.icu.util.VersionInfo UNICODE_1_0;
-    field public static final android.icu.util.VersionInfo UNICODE_1_0_1;
-    field public static final android.icu.util.VersionInfo UNICODE_1_1_0;
-    field public static final android.icu.util.VersionInfo UNICODE_1_1_5;
-    field public static final android.icu.util.VersionInfo UNICODE_2_0;
-    field public static final android.icu.util.VersionInfo UNICODE_2_1_2;
-    field public static final android.icu.util.VersionInfo UNICODE_2_1_5;
-    field public static final android.icu.util.VersionInfo UNICODE_2_1_8;
-    field public static final android.icu.util.VersionInfo UNICODE_2_1_9;
-    field public static final android.icu.util.VersionInfo UNICODE_3_0;
-    field public static final android.icu.util.VersionInfo UNICODE_3_0_1;
-    field public static final android.icu.util.VersionInfo UNICODE_3_1_0;
-    field public static final android.icu.util.VersionInfo UNICODE_3_1_1;
-    field public static final android.icu.util.VersionInfo UNICODE_3_2;
-    field public static final android.icu.util.VersionInfo UNICODE_4_0;
-    field public static final android.icu.util.VersionInfo UNICODE_4_0_1;
-    field public static final android.icu.util.VersionInfo UNICODE_4_1;
-    field public static final android.icu.util.VersionInfo UNICODE_5_0;
-    field public static final android.icu.util.VersionInfo UNICODE_5_1;
-    field public static final android.icu.util.VersionInfo UNICODE_5_2;
-    field public static final android.icu.util.VersionInfo UNICODE_6_0;
-    field public static final android.icu.util.VersionInfo UNICODE_6_1;
-    field public static final android.icu.util.VersionInfo UNICODE_6_2;
-    field public static final android.icu.util.VersionInfo UNICODE_6_3;
-    field public static final android.icu.util.VersionInfo UNICODE_7_0;
-    field public static final android.icu.util.VersionInfo UNICODE_8_0;
-    field public static final android.icu.util.VersionInfo UNICODE_9_0;
-  }
-
-}
-
 package android.inputmethodservice {
 
   public abstract class AbstractInputMethodService extends android.app.Service implements android.view.KeyEvent.Callback {
@@ -30273,6 +25476,7 @@
     method public static long getMobileRxPackets();
     method public static long getMobileTxBytes();
     method public static long getMobileTxPackets();
+    method public static long getRxBytes(@NonNull String);
     method public static long getRxPackets(@NonNull String);
     method public static int getThreadStatsTag();
     method public static int getThreadStatsUid();
@@ -30280,6 +25484,7 @@
     method public static long getTotalRxPackets();
     method public static long getTotalTxBytes();
     method public static long getTotalTxPackets();
+    method public static long getTxBytes(@NonNull String);
     method public static long getTxPackets(@NonNull String);
     method public static long getUidRxBytes(int);
     method public static long getUidRxPackets(int);
@@ -34383,6 +29588,7 @@
     field public static final String ID;
     field public static final String MANUFACTURER;
     field public static final String MODEL;
+    field @NonNull public static final String ODM_SKU;
     field public static final String PRODUCT;
     field @Deprecated public static final String RADIO;
     field @Deprecated public static final String SERIAL;
@@ -34450,6 +29656,7 @@
     field public static final int P = 28; // 0x1c
     field public static final int Q = 29; // 0x1d
     field public static final int R = 30; // 0x1e
+    field public static final int S = 10000; // 0x2710
   }
 
   public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
@@ -45089,6 +40296,7 @@
   }
 
   public static final class CarrierConfigManager.Ims {
+    field public static final String KEY_ENABLE_PRESENCE_PUBLISH_BOOL = "ims.enable_presence_publish_bool";
     field public static final String KEY_IMS_SINGLE_REGISTRATION_REQUIRED_BOOL = "ims.ims_single_registration_required_bool";
     field public static final String KEY_PREFIX = "ims.";
     field public static final String KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT = "ims.wifi_off_deferring_time_millis_int";
@@ -45154,7 +40362,7 @@
     method public long getNci();
     method @IntRange(from=0, to=3279165) public int getNrarfcn();
     method @IntRange(from=0, to=1007) public int getPci();
-    method @IntRange(from=0, to=16777215) public int getTac();
+    method @IntRange(from=0, to=65535) public int getTac();
     method public void writeToParcel(android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellIdentityNr> CREATOR;
   }
@@ -45480,6 +40688,28 @@
     field public static final int IP_VERSION_MISMATCH = 2055; // 0x807
     field public static final int IRAT_HANDOVER_FAILED = 2194; // 0x892
     field public static final int IS707B_MAX_ACCESS_PROBES = 2089; // 0x829
+    field public static final int IWLAN_AUTHORIZATION_REJECTED = 9003; // 0x232b
+    field public static final int IWLAN_DNS_RESOLUTION_NAME_FAILURE = 16388; // 0x4004
+    field public static final int IWLAN_DNS_RESOLUTION_TIMEOUT = 16389; // 0x4005
+    field public static final int IWLAN_IKEV2_AUTH_FAILURE = 16385; // 0x4001
+    field public static final int IWLAN_IKEV2_CERT_INVALID = 16387; // 0x4003
+    field public static final int IWLAN_IKEV2_CONFIG_FAILURE = 16384; // 0x4000
+    field public static final int IWLAN_IKEV2_MSG_TIMEOUT = 16386; // 0x4002
+    field public static final int IWLAN_ILLEGAL_ME = 9006; // 0x232e
+    field public static final int IWLAN_IMEI_NOT_ACCEPTED = 11005; // 0x2afd
+    field public static final int IWLAN_MAX_CONNECTION_REACHED = 8193; // 0x2001
+    field public static final int IWLAN_NETWORK_FAILURE = 10500; // 0x2904
+    field public static final int IWLAN_NON_3GPP_ACCESS_TO_EPC_NOT_ALLOWED = 9000; // 0x2328
+    field public static final int IWLAN_NO_APN_SUBSCRIPTION = 9002; // 0x232a
+    field public static final int IWLAN_PDN_CONNECTION_REJECTION = 8192; // 0x2000
+    field public static final int IWLAN_PLMN_NOT_ALLOWED = 11011; // 0x2b03
+    field public static final int IWLAN_RAT_TYPE_NOT_ALLOWED = 11001; // 0x2af9
+    field public static final int IWLAN_SEMANTIC_ERRORS_IN_PACKET_FILTERS = 8244; // 0x2034
+    field public static final int IWLAN_SEMANTIC_ERROR_IN_THE_TFT_OPERATION = 8241; // 0x2031
+    field public static final int IWLAN_SYNTACTICAL_ERRORS_IN_PACKET_FILTERS = 8245; // 0x2035
+    field public static final int IWLAN_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION = 8242; // 0x2032
+    field public static final int IWLAN_UNAUTHENTICATED_EMERGENCY_NOT_SUPPORTED = 11055; // 0x2b2f
+    field public static final int IWLAN_USER_UNKNOWN = 9001; // 0x2329
     field public static final int LIMITED_TO_IPV4 = 2234; // 0x8ba
     field public static final int LIMITED_TO_IPV6 = 2235; // 0x8bb
     field public static final int LLC_SNDCP = 25; // 0x19
@@ -46579,6 +41809,7 @@
     field public static final int APPTYPE_ISIM = 5; // 0x5
     field public static final int APPTYPE_RUIM = 3; // 0x3
     field public static final int APPTYPE_SIM = 1; // 0x1
+    field public static final int APPTYPE_UNKNOWN = 0; // 0x0
     field public static final int APPTYPE_USIM = 2; // 0x2
     field public static final int AUTHTYPE_EAP_AKA = 129; // 0x81
     field public static final int AUTHTYPE_EAP_SIM = 128; // 0x80
@@ -47298,6 +42529,7 @@
     field public static final int CODE_WIFI_LOST = 1407; // 0x57f
     field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsReasonInfo> CREATOR;
     field public static final int EXTRA_CODE_CALL_RETRY_BY_SETTINGS = 3; // 0x3
+    field public static final int EXTRA_CODE_CALL_RETRY_EMERGENCY = 4; // 0x4
     field public static final int EXTRA_CODE_CALL_RETRY_NORMAL = 1; // 0x1
     field public static final int EXTRA_CODE_CALL_RETRY_SILENT_REDIAL = 2; // 0x2
   }
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt
index ee8abf1..9349770 100644
--- a/core/api/module-lib-current.txt
+++ b/core/api/module-lib-current.txt
@@ -8,6 +8,20 @@
 
 }
 
+package android.net {
+
+  public final class TcpRepairWindow {
+    ctor public TcpRepairWindow(int, int, int, int, int, int);
+    field public final int maxWindow;
+    field public final int rcvWnd;
+    field public final int rcvWndScale;
+    field public final int rcvWup;
+    field public final int sndWl1;
+    field public final int sndWnd;
+  }
+
+}
+
 package android.os {
 
   public class Binder implements android.os.IBinder {
diff --git a/core/api/removed.txt b/core/api/removed.txt
index 3655af2..21aeef6d 100644
--- a/core/api/removed.txt
+++ b/core/api/removed.txt
@@ -221,14 +221,6 @@
 
 }
 
-package android.icu.util {
-
-  public class JapaneseCalendar extends android.icu.util.GregorianCalendar {
-    field @Deprecated public static final int CURRENT_ERA;
-  }
-
-}
-
 package android.location {
 
   public class Location implements android.os.Parcelable {
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index bece6a7..244df9b 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -36,6 +36,7 @@
     field public static final String BIND_DIRECTORY_SEARCH = "android.permission.BIND_DIRECTORY_SEARCH";
     field public static final String BIND_EUICC_SERVICE = "android.permission.BIND_EUICC_SERVICE";
     field public static final String BIND_EXTERNAL_STORAGE_SERVICE = "android.permission.BIND_EXTERNAL_STORAGE_SERVICE";
+    field public static final String BIND_GBA_SERVICE = "android.permission.BIND_GBA_SERVICE";
     field public static final String BIND_IMS_SERVICE = "android.permission.BIND_IMS_SERVICE";
     field public static final String BIND_KEYGUARD_APPWIDGET = "android.permission.BIND_KEYGUARD_APPWIDGET";
     field public static final String BIND_NETWORK_RECOMMENDATION_SERVICE = "android.permission.BIND_NETWORK_RECOMMENDATION_SERVICE";
@@ -5986,6 +5987,7 @@
     field @Deprecated public static final int TETHER_ERROR_NO_ERROR = 0; // 0x0
     field @Deprecated public static final int TETHER_ERROR_PROVISION_FAILED = 11; // 0xb
     field public static final int TYPE_NONE = -1; // 0xffffffff
+    field @Deprecated public static final int TYPE_PROXY = 16; // 0x10
     field @Deprecated public static final int TYPE_WIFI_P2P = 13; // 0xd
   }
 
@@ -6175,6 +6177,7 @@
     method public final void sendNetworkCapabilities(@NonNull android.net.NetworkCapabilities);
     method public final void sendNetworkScore(@IntRange(from=0, to=99) int);
     method public final void sendSocketKeepaliveEvent(int, int);
+    method public final void setUnderlyingNetworks(@Nullable java.util.List<android.net.Network>);
     method public void unregister();
     field public static final int VALIDATION_STATUS_NOT_VALID = 2; // 0x2
     field public static final int VALIDATION_STATUS_VALID = 1; // 0x1
@@ -7285,7 +7288,7 @@
     method @Nullable public <T extends android.os.Parcelable> T getParcelable(@NonNull Class<T>);
     method public int getStability();
     method public void readFromParcel(@NonNull android.os.Parcel);
-    method public boolean setParcelable(@Nullable android.os.Parcelable);
+    method public void setParcelable(@Nullable android.os.Parcelable);
     method public void writeToParcel(@NonNull android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.os.ParcelableHolder> CREATOR;
   }
@@ -9615,6 +9618,25 @@
     field @NonNull public static final android.os.Parcelable.Creator<android.telephony.DataSpecificRegistrationInfo> CREATOR;
   }
 
+  public final class DataThrottlingRequest implements android.os.Parcelable {
+    method public int describeContents();
+    method public long getCompletionDurationMillis();
+    method public int getDataThrottlingAction();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.DataThrottlingRequest> CREATOR;
+    field public static final int DATA_THROTTLING_ACTION_HOLD = 3; // 0x3
+    field public static final int DATA_THROTTLING_ACTION_NO_DATA_THROTTLING = 0; // 0x0
+    field public static final int DATA_THROTTLING_ACTION_THROTTLE_PRIMARY_CARRIER = 2; // 0x2
+    field public static final int DATA_THROTTLING_ACTION_THROTTLE_SECONDARY_CARRIER = 1; // 0x1
+  }
+
+  public static final class DataThrottlingRequest.Builder {
+    ctor public DataThrottlingRequest.Builder();
+    method @NonNull public android.telephony.DataThrottlingRequest build();
+    method @NonNull public android.telephony.DataThrottlingRequest.Builder setCompletionDurationMillis(long);
+    method @NonNull public android.telephony.DataThrottlingRequest.Builder setDataThrottlingAction(int);
+  }
+
   public final class ImsiEncryptionInfo implements android.os.Parcelable {
     method public int describeContents();
     method @Nullable public String getKeyIdentifier();
@@ -9746,6 +9768,18 @@
     field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_VOICE_ACTIVATION_STATE = 131072; // 0x20000
   }
 
+  public final class PinResult implements android.os.Parcelable {
+    method public int describeContents();
+    method public int getAttemptsRemaining();
+    method public int getResult();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PinResult> CREATOR;
+    field public static final int PIN_RESULT_TYPE_ABORTED = 3; // 0x3
+    field public static final int PIN_RESULT_TYPE_FAILURE = 2; // 0x2
+    field public static final int PIN_RESULT_TYPE_INCORRECT = 1; // 0x1
+    field public static final int PIN_RESULT_TYPE_SUCCESS = 0; // 0x0
+  }
+
   public final class PreciseCallState implements android.os.Parcelable {
     ctor public PreciseCallState(int, int, int, int, int);
     method public int describeContents();
@@ -10088,7 +10122,9 @@
   }
 
   public class TelephonyManager {
+    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void bootstrapAuthenticationRequest(int, @NonNull android.net.Uri, @NonNull android.telephony.gba.UaSecurityProtocolIdentifier, boolean, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.BootstrapAuthenticationCallback);
     method @Deprecated @RequiresPermission(android.Manifest.permission.CALL_PHONE) public void call(String, String);
+    method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.PinResult changeIccLockPin(@NonNull String, @NonNull String);
     method public int checkCarrierPrivilegesForPackage(String);
     method public int checkCarrierPrivilegesForPackageAnyPhone(String);
     method public void dial(String);
@@ -10140,6 +10176,7 @@
     method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getSimCardState(int);
     method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.Locale getSimLocale();
     method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getSupportedRadioAccessFamily();
+    method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.telephony.RadioAccessSpecifier> getSystemSelectionChannels();
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms();
     method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.UiccSlotInfo[] getUiccSlotsInfo();
     method @Nullable public android.os.Bundle getVisualVoicemailSettings();
@@ -10182,6 +10219,7 @@
     method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void resetOtaEmergencyNumberDbFilePath();
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean resetRadioConfig();
     method @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) public void resetSettings();
+    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int sendThermalMitigationRequest(@NonNull android.telephony.ThermalMitigationRequest);
     method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setAllowedNetworkTypes(long);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallForwarding(@NonNull android.telephony.CallForwardingInfo, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
@@ -10193,6 +10231,7 @@
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int);
     method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(int, boolean);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean);
+    method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.PinResult setIccLockEnabled(boolean, @NonNull String);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMobileDataPolicyEnabledStatus(int, boolean);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean);
     method public int setNrDualConnectivityState(int);
@@ -10201,17 +10240,21 @@
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadio(boolean);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setRadioEnabled(boolean);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadioPower(boolean);
-    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerState(int);
-    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerStateForSlot(int, int);
+    method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerState(int);
+    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerState(int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
+    method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerStateForSlot(int, int);
+    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerStateForSlot(int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>);
     method @Deprecated public void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoiceActivationState(int);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void shutdownAllRadios();
+    method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.PinResult supplyIccLockPin(@NonNull String);
+    method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.PinResult supplyIccLockPuk(@NonNull String, @NonNull String);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean supplyPin(String);
-    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPinReportResult(String);
+    method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPinReportResult(String);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean supplyPuk(String, String);
-    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPukReportResult(String, String);
+    method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPukReportResult(String, String);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean switchSlots(int[]);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void toggleRadioOnOff();
     method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void updateOtaEmergencyNumberDbFilePath(@NonNull android.os.ParcelFileDescriptor);
@@ -10250,6 +10293,12 @@
     field public static final String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE";
     field public static final String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
     field public static final String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
+    field public static final int GBA_FAILURE_REASON_FEATURE_NOT_READY = 2; // 0x2
+    field public static final int GBA_FAILURE_REASON_FEATURE_NOT_SUPPORTED = 1; // 0x1
+    field public static final int GBA_FAILURE_REASON_INCORRECT_NAF_ID = 4; // 0x4
+    field public static final int GBA_FAILURE_REASON_NETWORK_FAILURE = 3; // 0x3
+    field public static final int GBA_FAILURE_REASON_SECURITY_PROTOCOL_NOT_SUPPORTED = 5; // 0x5
+    field public static final int GBA_FAILURE_REASON_UNKNOWN = 0; // 0x0
     field public static final int INVALID_EMERGENCY_NUMBER_DB_VERSION = -1; // 0xffffffff
     field public static final int KEY_TYPE_EPDG = 1; // 0x1
     field public static final int KEY_TYPE_WLAN = 2; // 0x2
@@ -10284,6 +10333,11 @@
     field public static final int SET_CARRIER_RESTRICTION_ERROR = 2; // 0x2
     field public static final int SET_CARRIER_RESTRICTION_NOT_SUPPORTED = 1; // 0x1
     field public static final int SET_CARRIER_RESTRICTION_SUCCESS = 0; // 0x0
+    field public static final int SET_SIM_POWER_STATE_ALREADY_IN_STATE = 1; // 0x1
+    field public static final int SET_SIM_POWER_STATE_MODEM_ERROR = 2; // 0x2
+    field public static final int SET_SIM_POWER_STATE_NOT_SUPPORTED = 4; // 0x4
+    field public static final int SET_SIM_POWER_STATE_SIM_ERROR = 3; // 0x3
+    field public static final int SET_SIM_POWER_STATE_SUCCESS = 0; // 0x0
     field public static final int SIM_ACTIVATION_STATE_ACTIVATED = 2; // 0x2
     field public static final int SIM_ACTIVATION_STATE_ACTIVATING = 1; // 0x1
     field public static final int SIM_ACTIVATION_STATE_DEACTIVATED = 3; // 0x3
@@ -10296,6 +10350,17 @@
     field public static final int SRVCC_STATE_HANDOVER_FAILED = 2; // 0x2
     field public static final int SRVCC_STATE_HANDOVER_NONE = -1; // 0xffffffff
     field public static final int SRVCC_STATE_HANDOVER_STARTED = 0; // 0x0
+    field public static final int THERMAL_MITIGATION_RESULT_INVALID_STATE = 3; // 0x3
+    field public static final int THERMAL_MITIGATION_RESULT_MODEM_ERROR = 1; // 0x1
+    field public static final int THERMAL_MITIGATION_RESULT_MODEM_NOT_AVAILABLE = 2; // 0x2
+    field public static final int THERMAL_MITIGATION_RESULT_SUCCESS = 0; // 0x0
+    field public static final int THERMAL_MITIGATION_RESULT_UNKNOWN_ERROR = 4; // 0x4
+  }
+
+  public static class TelephonyManager.BootstrapAuthenticationCallback {
+    ctor public TelephonyManager.BootstrapAuthenticationCallback();
+    method public void onAuthenticationFailure(int);
+    method public void onKeysAvailable(@NonNull byte[], @NonNull String);
   }
 
   public static interface TelephonyManager.CallForwardingInfoCallback {
@@ -10307,6 +10372,24 @@
     field public static final int RESULT_SUCCESS = 0; // 0x0
   }
 
+  public final class ThermalMitigationRequest implements android.os.Parcelable {
+    method public int describeContents();
+    method @Nullable public android.telephony.DataThrottlingRequest getDataThrottlingRequest();
+    method public int getThermalMitigationAction();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ThermalMitigationRequest> CREATOR;
+    field public static final int THERMAL_MITIGATION_ACTION_DATA_THROTTLING = 0; // 0x0
+    field public static final int THERMAL_MITIGATION_ACTION_RADIO_OFF = 2; // 0x2
+    field public static final int THERMAL_MITIGATION_ACTION_VOICE_ONLY = 1; // 0x1
+  }
+
+  public static final class ThermalMitigationRequest.Builder {
+    ctor public ThermalMitigationRequest.Builder();
+    method @NonNull public android.telephony.ThermalMitigationRequest build();
+    method @NonNull public android.telephony.ThermalMitigationRequest.Builder setDataThrottlingRequest(@NonNull android.telephony.DataThrottlingRequest);
+    method @NonNull public android.telephony.ThermalMitigationRequest.Builder setThermalMitigationAction(int);
+  }
+
   public final class UiccAccessRule implements android.os.Parcelable {
     ctor public UiccAccessRule(byte[], @Nullable String, long);
     method public int describeContents();
@@ -10664,6 +10747,141 @@
 
 }
 
+package android.telephony.gba {
+
+  public class GbaService extends android.app.Service {
+    ctor public GbaService();
+    method public void onAuthenticationRequest(int, int, int, @NonNull android.net.Uri, @NonNull byte[], boolean);
+    method public final void reportAuthenticationFailure(int, int) throws java.lang.RuntimeException;
+    method public final void reportKeysAvailable(int, @NonNull byte[], @NonNull String) throws java.lang.RuntimeException;
+    field public static final String SERVICE_INTERFACE = "android.telephony.gba.GbaService";
+  }
+
+  public class TlsParams {
+    method public static boolean isTlsCipherSuiteSupported(int);
+    field public static final int GROUP_SECP256R1 = 23; // 0x17
+    field public static final int GROUP_SECP384R1 = 24; // 0x18
+    field public static final int GROUP_X25519 = 29; // 0x1d
+    field public static final int GROUP_X448 = 30; // 0x1e
+    field public static final int PROTOCOL_VERSION_TLS_1_2 = 771; // 0x303
+    field public static final int PROTOCOL_VERSION_TLS_1_3 = 772; // 0x304
+    field public static final int SIG_ECDSA_BRAINPOOLP256R1TLS13_SHA256 = 2074; // 0x81a
+    field public static final int SIG_ECDSA_BRAINPOOLP384R1TLS13_SHA384 = 2075; // 0x81b
+    field public static final int SIG_ECDSA_BRAINPOOLP512R1TLS13_SHA512 = 2076; // 0x81c
+    field public static final int SIG_ECDSA_SECP256R1_SHA256 = 1027; // 0x403
+    field public static final int SIG_ECDSA_SECP384R1_SHA384 = 1283; // 0x503
+    field public static final int SIG_ECDSA_SECP521R1_SHA512 = 1539; // 0x603
+    field public static final int SIG_ECDSA_SHA1 = 515; // 0x203
+    field public static final int SIG_RSA_PKCS1_SHA1 = 513; // 0x201
+    field public static final int SIG_RSA_PKCS1_SHA256 = 1025; // 0x401
+    field public static final int SIG_RSA_PKCS1_SHA256_LEGACY = 1056; // 0x420
+    field public static final int SIG_RSA_PKCS1_SHA384 = 1281; // 0x501
+    field public static final int SIG_RSA_PKCS1_SHA384_LEGACY = 1312; // 0x520
+    field public static final int SIG_RSA_PKCS1_SHA512 = 1537; // 0x601
+    field public static final int SIG_RSA_PKCS1_SHA512_LEGACY = 1568; // 0x620
+    field public static final int SIG_RSA_PSS_RSAE_SHA256 = 2052; // 0x804
+    field public static final int SIG_RSA_PSS_RSAE_SHA384 = 2053; // 0x805
+    field public static final int SIG_RSA_PSS_RSAE_SHA512 = 2054; // 0x806
+    field public static final int TLS_AES_128_CCM_SHA256 = 4868; // 0x1304
+    field public static final int TLS_AES_128_GCM_SHA256 = 4865; // 0x1301
+    field public static final int TLS_AES_256_GCM_SHA384 = 4866; // 0x1302
+    field public static final int TLS_CHACHA20_POLY1305_SHA256 = 4867; // 0x1303
+    field public static final int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; // 0x13
+    field public static final int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; // 0x32
+    field public static final int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; // 0x40
+    field public static final int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; // 0x38
+    field public static final int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; // 0x6a
+    field public static final int TLS_DHE_PSK_WITH_AES_128_CCM = 49318; // 0xc0a6
+    field public static final int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; // 0xaa
+    field public static final int TLS_DHE_PSK_WITH_AES_256_CCM = 49319; // 0xc0a7
+    field public static final int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; // 0xab
+    field public static final int TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 52397; // 0xccad
+    field public static final int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; // 0x16
+    field public static final int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; // 0x33
+    field public static final int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; // 0x67
+    field public static final int TLS_DHE_RSA_WITH_AES_128_CCM = 49310; // 0xc09e
+    field public static final int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; // 0x9e
+    field public static final int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; // 0x39
+    field public static final int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; // 0x6b
+    field public static final int TLS_DHE_RSA_WITH_AES_256_CCM = 49311; // 0xc09f
+    field public static final int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; // 0x9f
+    field public static final int TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 52394; // 0xccaa
+    field public static final int TLS_DH_ANON_WITH_3DES_EDE_CBC_SHA = 27; // 0x1b
+    field public static final int TLS_DH_ANON_WITH_AES_128_CBC_SHA = 52; // 0x34
+    field public static final int TLS_DH_ANON_WITH_AES_128_CBC_SHA256 = 108; // 0x6c
+    field public static final int TLS_DH_ANON_WITH_AES_256_CBC_SHA = 58; // 0x3a
+    field public static final int TLS_DH_ANON_WITH_AES_256_CBC_SHA256 = 109; // 0x6d
+    field public static final int TLS_DH_ANON_WITH_RC4_128_MD5 = 24; // 0x18
+    field public static final int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; // 0xd
+    field public static final int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; // 0x30
+    field public static final int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; // 0x3e
+    field public static final int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; // 0x36
+    field public static final int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; // 0x68
+    field public static final int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; // 0x10
+    field public static final int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; // 0x31
+    field public static final int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; // 0x3f
+    field public static final int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; // 0x37
+    field public static final int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; // 0x69
+    field public static final int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 49195; // 0xc02b
+    field public static final int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 49196; // 0xc02c
+    field public static final int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 52393; // 0xcca9
+    field public static final int TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256 = 53253; // 0xd005
+    field public static final int TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256 = 53249; // 0xd001
+    field public static final int TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384 = 53250; // 0xd002
+    field public static final int TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 52396; // 0xccac
+    field public static final int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 49199; // 0xc02f
+    field public static final int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 49200; // 0xc030
+    field public static final int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 52392; // 0xcca8
+    field public static final int TLS_NULL_WITH_NULL_NULL = 0; // 0x0
+    field public static final int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; // 0xa
+    field public static final int TLS_RSA_WITH_AES_128_CBC_SHA = 47; // 0x2f
+    field public static final int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; // 0x3c
+    field public static final int TLS_RSA_WITH_AES_256_CBC_SHA = 53; // 0x35
+    field public static final int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; // 0x3d
+    field public static final int TLS_RSA_WITH_NULL_MD5 = 1; // 0x1
+    field public static final int TLS_RSA_WITH_NULL_SHA = 2; // 0x2
+    field public static final int TLS_RSA_WITH_NULL_SHA256 = 59; // 0x3b
+    field public static final int TLS_RSA_WITH_RC4_128_MD5 = 4; // 0x4
+    field public static final int TLS_RSA_WITH_RC4_128_SHA = 5; // 0x5
+  }
+
+  public final class UaSecurityProtocolIdentifier implements android.os.Parcelable {
+    method public int describeContents();
+    method public int getOrg();
+    method public int getProtocol();
+    method public int getTlsCipherSuite();
+    method @NonNull public byte[] toByteArray();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.gba.UaSecurityProtocolIdentifier> CREATOR;
+    field public static final int ORG_3GPP = 1; // 0x1
+    field public static final int ORG_3GPP2 = 2; // 0x2
+    field public static final int ORG_GSMA = 4; // 0x4
+    field public static final int ORG_LOCAL = 255; // 0xff
+    field public static final int ORG_NONE = 0; // 0x0
+    field public static final int ORG_OMA = 3; // 0x3
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_GENERATION_TMPI = 256; // 0x100
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_GENERIC_PUSH_LAYER = 5; // 0x5
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_HTTP_BASED_MBMS = 3; // 0x3
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_HTTP_DIGEST_AUTHENTICATION = 2; // 0x2
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_IMS_MEDIA_PLANE = 6; // 0x6
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_MBMS = 1; // 0x1
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_SIP_BASED_MBMS = 4; // 0x4
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_SUBSCRIBER_CERTIFICATE = 0; // 0x0
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_TLS_BROWSER = 131072; // 0x20000
+    field public static final int UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT = 65536; // 0x10000
+  }
+
+  public static final class UaSecurityProtocolIdentifier.Builder {
+    ctor public UaSecurityProtocolIdentifier.Builder();
+    ctor public UaSecurityProtocolIdentifier.Builder(@NonNull android.telephony.gba.UaSecurityProtocolIdentifier);
+    method @NonNull public android.telephony.gba.UaSecurityProtocolIdentifier build();
+    method @NonNull public android.telephony.gba.UaSecurityProtocolIdentifier.Builder setOrg(int);
+    method @NonNull public android.telephony.gba.UaSecurityProtocolIdentifier.Builder setProtocol(int);
+    method @NonNull public android.telephony.gba.UaSecurityProtocolIdentifier.Builder setTlsCipherSuite(int);
+  }
+
+}
+
 package android.telephony.ims {
 
   public final class AudioCodecAttributes implements android.os.Parcelable {
@@ -10677,6 +10895,61 @@
     field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.AudioCodecAttributes> CREATOR;
   }
 
+  public interface DelegateMessageCallback {
+    method public void onMessageReceived(@NonNull android.telephony.ims.SipMessage);
+    method public void onMessageSendFailure(@NonNull String, int);
+    method public void onMessageSent(@NonNull String);
+  }
+
+  public final class DelegateRegistrationState implements android.os.Parcelable {
+    method public int describeContents();
+    method @NonNull public java.util.Set<android.telephony.ims.FeatureTagState> getDeregisteredFeatureTags();
+    method @NonNull public java.util.Set<android.telephony.ims.FeatureTagState> getDeregisteringFeatureTags();
+    method @NonNull public java.util.Set<java.lang.String> getRegisteredFeatureTags();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.DelegateRegistrationState> CREATOR;
+    field public static final int DEREGISTERED_REASON_NOT_PROVISIONED = 1; // 0x1
+    field public static final int DEREGISTERED_REASON_NOT_REGISTERED = 2; // 0x2
+    field public static final int DEREGISTERED_REASON_UNKNOWN = 0; // 0x0
+    field public static final int DEREGISTERING_REASON_DESTROY_PENDING = 6; // 0x6
+    field public static final int DEREGISTERING_REASON_FEATURE_TAGS_CHANGING = 5; // 0x5
+    field public static final int DEREGISTERING_REASON_PDN_CHANGE = 3; // 0x3
+    field public static final int DEREGISTERING_REASON_PROVISIONING_CHANGE = 4; // 0x4
+  }
+
+  public static final class DelegateRegistrationState.Builder {
+    ctor public DelegateRegistrationState.Builder();
+    method @NonNull public android.telephony.ims.DelegateRegistrationState.Builder addDeregisteredFeatureTag(@NonNull String, int);
+    method @NonNull public android.telephony.ims.DelegateRegistrationState.Builder addDeregisteringFeatureTag(@NonNull String, int);
+    method @NonNull public android.telephony.ims.DelegateRegistrationState.Builder addRegisteredFeatureTag(@NonNull String);
+    method @NonNull public android.telephony.ims.DelegateRegistrationState.Builder addRegisteredFeatureTags(@NonNull java.util.Set<java.lang.String>);
+    method @NonNull public android.telephony.ims.DelegateRegistrationState build();
+  }
+
+  public final class DelegateRequest implements android.os.Parcelable {
+    ctor public DelegateRequest(@NonNull java.util.Set<java.lang.String>);
+    method public int describeContents();
+    method @NonNull public java.util.Set<java.lang.String> getFeatureTags();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.DelegateRequest> CREATOR;
+  }
+
+  public interface DelegateStateCallback {
+    method public void onCreated(@NonNull android.telephony.ims.stub.SipDelegate, @Nullable java.util.Set<android.telephony.ims.FeatureTagState>);
+    method public void onDestroyed(int);
+    method public void onFeatureTagRegistrationChanged(@NonNull android.telephony.ims.DelegateRegistrationState);
+    method public void onImsConfigurationChanged(@NonNull android.telephony.ims.SipDelegateImsConfiguration);
+  }
+
+  public final class FeatureTagState implements android.os.Parcelable {
+    ctor public FeatureTagState(@NonNull String, int);
+    method public int describeContents();
+    method @NonNull public String getFeatureTag();
+    method public int getState();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.FeatureTagState> CREATOR;
+  }
+
   public final class ImsCallForwardInfo implements android.os.Parcelable {
     ctor public ImsCallForwardInfo(int, int, int, int, @NonNull String, int);
     method public int describeContents();
@@ -11197,8 +11470,108 @@
     field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.RtpHeaderExtensionType> CREATOR;
   }
 
+  public interface SipDelegateConnection {
+    method public void closeDialog(@NonNull String);
+    method public void notifyMessageReceiveError(@NonNull String, int);
+    method public void notifyMessageReceived(@NonNull String);
+    method public void sendMessage(@NonNull android.telephony.ims.SipMessage, long);
+  }
+
+  public final class SipDelegateImsConfiguration implements android.os.Parcelable {
+    method public boolean containsKey(@NonNull String);
+    method @NonNull public android.os.PersistableBundle copyBundle();
+    method public int describeContents();
+    method public boolean getBoolean(@NonNull String, boolean);
+    method public int getInt(@NonNull String, int);
+    method @Nullable public String getString(@NonNull String);
+    method public long getVersion();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.SipDelegateImsConfiguration> CREATOR;
+    field public static final String IPTYPE_IPV4 = "IPV4";
+    field public static final String IPTYPE_IPV6 = "IPV6";
+    field public static final String KEY_SIP_CONFIG_AUTHENTICATION_HEADER_STRING = "sip_config_auhentication_header_string";
+    field public static final String KEY_SIP_CONFIG_AUTHENTICATION_NONCE_STRING = "sip_config_authentication_nonce_string";
+    field public static final String KEY_SIP_CONFIG_HOME_DOMAIN_STRING = "sip_config_home_domain_string";
+    field public static final String KEY_SIP_CONFIG_IMEI_STRING = "sip_config_imei_string";
+    field public static final String KEY_SIP_CONFIG_IPTYPE_STRING = "sip_config_iptype_string";
+    field public static final String KEY_SIP_CONFIG_IS_COMPACT_FORM_ENABLED_BOOL = "sip_config_is_compact_form_enabled_bool";
+    field public static final String KEY_SIP_CONFIG_IS_GRUU_ENABLED_BOOL = "sip_config_is_gruu_enabled_bool";
+    field public static final String KEY_SIP_CONFIG_IS_IPSEC_ENABLED_BOOL = "sip_config_is_ipsec_enabled_bool";
+    field public static final String KEY_SIP_CONFIG_IS_KEEPALIVE_ENABLED_BOOL = "sip_config_is_keepalive_enabled_bool";
+    field public static final String KEY_SIP_CONFIG_IS_NAT_ENABLED_BOOL = "sip_config_is_nat_enabled_bool";
+    field public static final String KEY_SIP_CONFIG_MAX_PAYLOAD_SIZE_ON_UDP_INT = "sip_config_udp_max_payload_size_int";
+    field public static final String KEY_SIP_CONFIG_PATH_HEADER_STRING = "sip_config_path_header_string";
+    field public static final String KEY_SIP_CONFIG_P_ACCESS_NETWORK_INFO_HEADER_STRING = "sip_config_p_access_network_info_header_string";
+    field public static final String KEY_SIP_CONFIG_P_ASSOCIATED_URI_HEADER_STRING = "sip_config_p_associated_uri_header_string";
+    field public static final String KEY_SIP_CONFIG_P_LAST_ACCESS_NETWORK_INFO_HEADER_STRING = "sip_config_p_last_access_network_info_header_string";
+    field public static final String KEY_SIP_CONFIG_SECURITY_VERIFY_HEADER_STRING = "sip_config_security_verify_header_string";
+    field public static final String KEY_SIP_CONFIG_SERVER_DEFAULT_IPADDRESS_STRING = "sip_config_server_default_ipaddress_string";
+    field public static final String KEY_SIP_CONFIG_SERVER_DEFAULT_PORT_INT = "sip_config_server_default_port_int";
+    field public static final String KEY_SIP_CONFIG_SERVER_IPSEC_CLIENT_PORT_INT = "sip_config_server_ipsec_client_port_int";
+    field public static final String KEY_SIP_CONFIG_SERVER_IPSEC_OLD_CLIENT_PORT_INT = "sip_config_server_ipsec_old_client_port_int";
+    field public static final String KEY_SIP_CONFIG_SERVER_IPSEC_SERVER_PORT_INT = "sip_config_server_ipsec_server_port_int";
+    field public static final String KEY_SIP_CONFIG_SERVICE_ROUTE_HEADER_STRING = "sip_config_service_route_header_string";
+    field public static final String KEY_SIP_CONFIG_TRANSPORT_TYPE_STRING = "sip_config_protocol_type_string";
+    field public static final String KEY_SIP_CONFIG_UE_DEFAULT_IPADDRESS_STRING = "sip_config_ue_default_ipaddress_string";
+    field public static final String KEY_SIP_CONFIG_UE_DEFAULT_PORT_INT = "sip_config_ue_default_port_int";
+    field public static final String KEY_SIP_CONFIG_UE_IPSEC_CLIENT_PORT_INT = "sip_config_ue_ipsec_client_port_int";
+    field public static final String KEY_SIP_CONFIG_UE_IPSEC_OLD_CLIENT_PORT_INT = "sip_config_ue_ipsec_old_client_port_int";
+    field public static final String KEY_SIP_CONFIG_UE_IPSEC_SERVER_PORT_INT = "sip_config_ue_ipsec_server_port_int";
+    field public static final String KEY_SIP_CONFIG_UE_PRIVATE_USER_ID_STRING = "sip_config_ue_private_user_id_string";
+    field public static final String KEY_SIP_CONFIG_UE_PUBLIC_GRUU_STRING = "sip_config_ue_public_gruu_string";
+    field public static final String KEY_SIP_CONFIG_UE_PUBLIC_IPADDRESS_WITH_NAT_STRING = "sip_config_ue_public_ipaddress_with_nat_string";
+    field public static final String KEY_SIP_CONFIG_UE_PUBLIC_PORT_WITH_NAT_INT = "sip_config_ue_public_port_with_nat_int";
+    field public static final String KEY_SIP_CONFIG_UE_PUBLIC_USER_ID_STRING = "sip_config_ue_public_user_id_string";
+    field public static final String KEY_SIP_CONFIG_URI_USER_PART_STRING = "sip_config_uri_user_part_string";
+    field public static final String SIP_TRANSPORT_TCP = "TCP";
+    field public static final String SIP_TRANSPORT_UDP = "UDP";
+  }
+
+  public static final class SipDelegateImsConfiguration.Builder {
+    ctor public SipDelegateImsConfiguration.Builder(int);
+    ctor public SipDelegateImsConfiguration.Builder(@NonNull android.telephony.ims.SipDelegateImsConfiguration);
+    method @NonNull public android.telephony.ims.SipDelegateImsConfiguration.Builder addBoolean(@NonNull String, boolean);
+    method @NonNull public android.telephony.ims.SipDelegateImsConfiguration.Builder addInt(@NonNull String, int);
+    method @NonNull public android.telephony.ims.SipDelegateImsConfiguration.Builder addString(@NonNull String, @NonNull String);
+    method @NonNull public android.telephony.ims.SipDelegateImsConfiguration build();
+  }
+
   public class SipDelegateManager {
+    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void createSipDelegate(@NonNull android.telephony.ims.DelegateRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.stub.DelegateConnectionStateCallback, @NonNull android.telephony.ims.stub.DelegateConnectionMessageCallback) throws android.telephony.ims.ImsException;
+    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void destroySipDelegate(@NonNull android.telephony.ims.SipDelegateConnection, int);
     method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isSupported() throws android.telephony.ims.ImsException;
+    field public static final int DENIED_REASON_INVALID = 4; // 0x4
+    field public static final int DENIED_REASON_IN_USE_BY_ANOTHER_DELEGATE = 1; // 0x1
+    field public static final int DENIED_REASON_NOT_ALLOWED = 2; // 0x2
+    field public static final int DENIED_REASON_SINGLE_REGISTRATION_NOT_ALLOWED = 3; // 0x3
+    field public static final int DENIED_REASON_UNKNOWN = 0; // 0x0
+    field public static final int MESSAGE_FAILURE_REASON_DELEGATE_CLOSED = 2; // 0x2
+    field public static final int MESSAGE_FAILURE_REASON_DELEGATE_DEAD = 1; // 0x1
+    field public static final int MESSAGE_FAILURE_REASON_INTERNAL_DELEGATE_STATE_TRANSITION = 11; // 0xb
+    field public static final int MESSAGE_FAILURE_REASON_INVALID_BODY_CONTENT = 5; // 0x5
+    field public static final int MESSAGE_FAILURE_REASON_INVALID_FEATURE_TAG = 6; // 0x6
+    field public static final int MESSAGE_FAILURE_REASON_INVALID_HEADER_FIELDS = 4; // 0x4
+    field public static final int MESSAGE_FAILURE_REASON_INVALID_START_LINE = 3; // 0x3
+    field public static final int MESSAGE_FAILURE_REASON_NETWORK_NOT_AVAILABLE = 8; // 0x8
+    field public static final int MESSAGE_FAILURE_REASON_NOT_REGISTERED = 9; // 0x9
+    field public static final int MESSAGE_FAILURE_REASON_STALE_IMS_CONFIGURATION = 10; // 0xa
+    field public static final int MESSAGE_FAILURE_REASON_TAG_NOT_ENABLED_FOR_DELEGATE = 7; // 0x7
+    field public static final int MESSAGE_FAILURE_REASON_UNKNOWN = 0; // 0x0
+    field public static final int SIP_DELEGATE_DESTROY_REASON_REQUESTED_BY_APP = 2; // 0x2
+    field public static final int SIP_DELEGATE_DESTROY_REASON_SERVICE_DEAD = 1; // 0x1
+    field public static final int SIP_DELEGATE_DESTROY_REASON_SUBSCRIPTION_TORN_DOWN = 4; // 0x4
+    field public static final int SIP_DELEGATE_DESTROY_REASON_UNKNOWN = 0; // 0x0
+    field public static final int SIP_DELEGATE_DESTROY_REASON_USER_DISABLED_RCS = 3; // 0x3
+  }
+
+  public final class SipMessage implements android.os.Parcelable {
+    ctor public SipMessage(@NonNull String, @NonNull String, @NonNull byte[]);
+    method public int describeContents();
+    method @NonNull public byte[] getContent();
+    method @NonNull public String getHeaderSection();
+    method @NonNull public String getStartLine();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.SipMessage> CREATOR;
   }
 
 }
@@ -11292,6 +11665,19 @@
 
 package android.telephony.ims.stub {
 
+  public interface DelegateConnectionMessageCallback {
+    method public void onMessageReceived(@NonNull android.telephony.ims.SipMessage);
+    method public void onMessageSendFailure(@NonNull String, int);
+    method public void onMessageSent(@NonNull String);
+  }
+
+  public interface DelegateConnectionStateCallback {
+    method public void onCreated(@NonNull android.telephony.ims.SipDelegateConnection);
+    method public void onDestroyed(int);
+    method public void onFeatureTagStatusChanged(@NonNull android.telephony.ims.DelegateRegistrationState, @NonNull java.util.Set<android.telephony.ims.FeatureTagState>);
+    method public void onImsConfigurationChanged(@NonNull android.telephony.ims.SipDelegateImsConfiguration);
+  }
+
   public class ImsCallSessionImplBase implements java.lang.AutoCloseable {
     ctor public ImsCallSessionImplBase();
     method public void accept(int, android.telephony.ims.ImsStreamMediaProfile);
@@ -11452,8 +11838,17 @@
     method public int updateColr(int);
   }
 
+  public interface SipDelegate {
+    method public void closeDialog(@NonNull String);
+    method public void notifyMessageReceiveError(@NonNull String, int);
+    method public void notifyMessageReceived(@NonNull String);
+    method public void sendMessage(@NonNull android.telephony.ims.SipMessage, long);
+  }
+
   public class SipTransportImplBase {
     ctor public SipTransportImplBase(@NonNull java.util.concurrent.Executor);
+    method public void createSipDelegate(int, @NonNull android.telephony.ims.DelegateRequest, @NonNull android.telephony.ims.DelegateStateCallback, @NonNull android.telephony.ims.DelegateMessageCallback);
+    method public void destroySipDelegate(@NonNull android.telephony.ims.stub.SipDelegate, int);
   }
 
 }
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index fc27d06..feadd06 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -36,6 +36,7 @@
   public static final class R.bool {
     field public static final int config_assistantOnTopOfDream = 17891333; // 0x1110005
     field public static final int config_perDisplayFocusEnabled = 17891332; // 0x1110004
+    field public static final int config_remoteInsetsControllerControlsSystemBars = 17891334; // 0x1110006
   }
 
   public static final class R.string {
@@ -832,6 +833,11 @@
 
 package android.media {
 
+  public final class AudioAttributes implements android.os.Parcelable {
+    method @NonNull public static String usageToXsdString(int);
+    method public static int xsdStringToUsage(@NonNull String);
+  }
+
   public final class AudioFocusRequest {
     method @Nullable public android.media.AudioManager.OnAudioFocusChangeListener getOnAudioFocusChangeListener();
   }
diff --git a/core/java/android/animation/OWNERS b/core/java/android/animation/OWNERS
new file mode 100644
index 0000000..822a35c
--- /dev/null
+++ b/core/java/android/animation/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 47085
+
+romainguy@google.com
+tianliu@google.com
+alanv@google.com
+adamp@google.com
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index bd09eac..4c16072 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -5195,8 +5195,8 @@
      * result callbacks including {@link #onRequestPermissionsResult(int, String[], int[])}.
      * </p>
      * <p>
-     * The <a href="https://github.com/googlesamples/android-RuntimePermissions">
-     * RuntimePermissions</a> sample app demonstrates how to use this method to
+     * The <a href="https://github.com/android/permissions-samples">
+     * RuntimePermissions</a> sample apps demonstrate how to use this method to
      * request permissions at run time.
      * </p>
      *
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 5428730..23787eb 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -3251,12 +3251,6 @@
         sendMessage(H.CLEAN_UP_CONTEXT, cci);
     }
 
-    @Override
-    public void handleFixedRotationAdjustments(@NonNull IBinder token,
-            @Nullable FixedRotationAdjustments fixedRotationAdjustments) {
-        handleFixedRotationAdjustments(token, fixedRotationAdjustments, null /* overrideConfig */);
-    }
-
     /**
      * Applies the rotation adjustments to override display information in resources belong to the
      * provided token. If the token is activity token, the adjustments also apply to application
@@ -3266,51 +3260,39 @@
      * @param fixedRotationAdjustments The information to override the display adjustments of
      *                                 corresponding resources. If it is null, the exiting override
      *                                 will be cleared.
-     * @param overrideConfig The override configuration of activity. It is used to override
-     *                       application configuration. If it is non-null, it means the token is
-     *                       confirmed as activity token. Especially when launching new activity,
-     *                       {@link #mActivities} hasn't put the new token.
      */
-    private void handleFixedRotationAdjustments(@NonNull IBinder token,
-            @Nullable FixedRotationAdjustments fixedRotationAdjustments,
-            @Nullable Configuration overrideConfig) {
-        // The element of application configuration override is set only if the application
-        // adjustments are needed, because activity already has its own override configuration.
-        final Configuration[] appConfigOverride;
-        final Consumer<DisplayAdjustments> override;
-        if (fixedRotationAdjustments != null) {
-            appConfigOverride = new Configuration[1];
-            override = displayAdjustments -> {
-                displayAdjustments.setFixedRotationAdjustments(fixedRotationAdjustments);
-                if (appConfigOverride[0] != null) {
-                    displayAdjustments.getConfiguration().updateFrom(appConfigOverride[0]);
-                }
-            };
-        } else {
-            appConfigOverride = null;
-            override = null;
-        }
+    @Override
+    public void handleFixedRotationAdjustments(@NonNull IBinder token,
+            @Nullable FixedRotationAdjustments fixedRotationAdjustments) {
+        final Consumer<DisplayAdjustments> override = fixedRotationAdjustments != null
+                ? displayAdjustments -> displayAdjustments
+                        .setFixedRotationAdjustments(fixedRotationAdjustments)
+                : null;
         if (!mResourcesManager.overrideTokenDisplayAdjustments(token, override)) {
             // No resources are associated with the token.
             return;
         }
-        if (overrideConfig == null) {
-            final ActivityClientRecord r = mActivities.get(token);
-            if (r == null) {
-                // It is not an activity token. Nothing to do for application.
-                return;
-            }
-            overrideConfig = r.overrideConfig;
-        }
-        if (appConfigOverride != null) {
-            appConfigOverride[0] = overrideConfig;
+        if (mActivities.get(token) == null) {
+            // Nothing to do for application if it is not an activity token.
+            return;
         }
 
-        // Apply the last override to application resources for compatibility. Because the Resources
-        // of Display can be from application, e.g.
-        //    applicationContext.getSystemService(DisplayManager.class).getDisplay(displayId)
-        // and the deprecated usage:
-        //    applicationContext.getSystemService(WindowManager.class).getDefaultDisplay();
+        overrideApplicationDisplayAdjustments(token, override);
+    }
+
+    /**
+     * Applies the last override to application resources for compatibility. Because the Resources
+     * of Display can be from application, e.g.
+     *   applicationContext.getSystemService(DisplayManager.class).getDisplay(displayId)
+     * and the deprecated usage:
+     *   applicationContext.getSystemService(WindowManager.class).getDefaultDisplay();
+     *
+     * @param token The owner and target of the override.
+     * @param override The display adjustments override for application resources. If it is null,
+     *                 the override of the token will be removed and pop the last one to use.
+     */
+    private void overrideApplicationDisplayAdjustments(@NonNull IBinder token,
+            @Nullable Consumer<DisplayAdjustments> override) {
         final Consumer<DisplayAdjustments> appOverride;
         if (mActiveRotationAdjustments == null) {
             mActiveRotationAdjustments = new ArrayList<>(2);
@@ -3543,8 +3525,13 @@
         // The rotation adjustments must be applied before creating the activity, so the activity
         // can get the adjusted display info during creation.
         if (r.mPendingFixedRotationAdjustments != null) {
-            handleFixedRotationAdjustments(r.token, r.mPendingFixedRotationAdjustments,
-                    r.overrideConfig);
+            // The adjustments should have been set by handleLaunchActivity, so the last one is the
+            // override for activity resources.
+            if (mActiveRotationAdjustments != null && !mActiveRotationAdjustments.isEmpty()) {
+                mResourcesManager.overrideTokenDisplayAdjustments(r.token,
+                        mActiveRotationAdjustments.get(
+                                mActiveRotationAdjustments.size() - 1).second);
+            }
             r.mPendingFixedRotationAdjustments = null;
         }
 
@@ -3583,6 +3570,13 @@
             mProfiler.startProfiling();
         }
 
+        if (r.mPendingFixedRotationAdjustments != null) {
+            // The rotation adjustments must be applied before handling configuration, so process
+            // level display metrics can be adjusted.
+            overrideApplicationDisplayAdjustments(r.token, adjustments ->
+                    adjustments.setFixedRotationAdjustments(r.mPendingFixedRotationAdjustments));
+        }
+
         // Make sure we are running with the most recent config.
         handleConfigurationChanged(null, null);
 
@@ -5113,6 +5107,7 @@
                 }
             }
             r.setState(ON_DESTROY);
+            mLastReportedWindowingMode.remove(r.activity.getActivityToken());
         }
         schedulePurgeIdler();
         // updatePendingActivityConfiguration() reads from mActivities to update
@@ -5777,7 +5772,15 @@
             if (DEBUG_CONFIGURATION) Slog.v(TAG, "Handle configuration changed: "
                     + config);
 
-            mResourcesManager.applyConfigurationToResourcesLocked(config, compat);
+            final Resources appResources = mInitialApplication.getResources();
+            if (appResources.hasOverrideDisplayAdjustments()) {
+                // The value of Display#getRealSize will be adjusted by FixedRotationAdjustments,
+                // but Display#getSize refers to DisplayAdjustments#mConfiguration. So the rotated
+                // configuration also needs to set to the adjustments for consistency.
+                appResources.getDisplayAdjustments().getConfiguration().updateFrom(config);
+            }
+            mResourcesManager.applyConfigurationToResourcesLocked(config, compat,
+                    appResources.getDisplayAdjustments());
             updateLocaleListFromAppContext(mInitialApplication.getApplicationContext(),
                     mResourcesManager.getConfiguration().getLocales());
 
@@ -7393,7 +7396,8 @@
                 // We need to apply this change to the resources immediately, because upon returning
                 // the view hierarchy will be informed about it.
                 if (mResourcesManager.applyConfigurationToResourcesLocked(globalConfig,
-                        null /* compat */)) {
+                        null /* compat */,
+                        mInitialApplication.getResources().getDisplayAdjustments())) {
                     updateLocaleListFromAppContext(mInitialApplication.getApplicationContext(),
                             mResourcesManager.getConfiguration().getLocales());
 
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java
index 92b0da1c..098d090 100644
--- a/core/java/android/app/ActivityView.java
+++ b/core/java/android/app/ActivityView.java
@@ -105,7 +105,8 @@
     public ActivityView(
             @NonNull Context context, @NonNull AttributeSet attrs, int defStyle,
             boolean singleTaskInstance, boolean usePublicVirtualDisplay) {
-        this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, false);
+        this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay,
+                false /* disableSurfaceViewBackgroundLayer */);
     }
 
     /** @hide */
@@ -113,12 +114,22 @@
             @NonNull Context context, @NonNull AttributeSet attrs, int defStyle,
             boolean singleTaskInstance, boolean usePublicVirtualDisplay,
             boolean disableSurfaceViewBackgroundLayer) {
+        this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay,
+                disableSurfaceViewBackgroundLayer, false /* useTrustedDisplay */);
+    }
+
+    // TODO(b/162901735): Refactor ActivityView with Builder
+    /** @hide */
+    public ActivityView(
+            @NonNull Context context, @NonNull AttributeSet attrs, int defStyle,
+            boolean singleTaskInstance, boolean usePublicVirtualDisplay,
+            boolean disableSurfaceViewBackgroundLayer, boolean useTrustedDisplay) {
         super(context, attrs, defStyle);
         if (useTaskOrganizer()) {
             mTaskEmbedder = new TaskOrganizerTaskEmbedder(context, this);
         } else {
             mTaskEmbedder = new VirtualDisplayTaskEmbedder(context, this, singleTaskInstance,
-                    usePublicVirtualDisplay);
+                    usePublicVirtualDisplay, useTrustedDisplay);
         }
         mSurfaceView = new SurfaceView(context, null, 0, 0, disableSurfaceViewBackgroundLayer);
         // Since ActivityView#getAlpha has been overridden, we should use parent class's alpha
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index c4f13fe..31ab224 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -1114,28 +1114,30 @@
     public static final int OP_NO_ISOLATED_STORAGE = AppProtoEnums.APP_OP_NO_ISOLATED_STORAGE;
 
     /**
-     * Reserved key for 100
+     * Phone call is using microphone
      *
      * @hide
      */
-    public static final int OP_RESERVED_100 = 100;
+    // TODO: Add as AppProtoEnums
+    public static final int OP_PHONE_CALL_MICROPHONE = 100;
+    /**
+     * Phone call is using camera
+     *
+     * @hide
+     */
+    // TODO: Add as AppProtoEnums
+    public static final int OP_PHONE_CALL_CAMERA = 101;
 
     /**
-     * Reserved key for 101
+     * Audio is being recorded for hotword detection.
      *
      * @hide
      */
-    public static final int OP_RESERVED_101 = 101;
-
-    /**
-     * Reserved key for 102
-     *
-     * @hide
-     */
-    public static final int OP_RESERVED_102 = 102;
+    // TODO: Add as AppProtoEnums
+    public static final int OP_RECORD_AUDIO_HOTWORD = 102;
 
     /** @hide */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
+    @UnsupportedAppUsage
     public static final int _NUM_OP = 104;
 
     /** Access to coarse location information. */
@@ -1464,25 +1466,24 @@
     public static final String OPSTR_NO_ISOLATED_STORAGE = "android:no_isolated_storage";
 
     /**
-     * Reserved for 100
+     * Phone call is using microphone
      *
      * @hide
      */
-    public static final String OPSTR_RESERVED_100 = "android:opstr_reserved_100";
+    public static final String OPSTR_PHONE_CALL_MICROPHONE = "android:phone_call_microphone";
+    /**
+     * Phone call is using camera
+     *
+     * @hide
+     */
+    public static final String OPSTR_PHONE_CALL_CAMERA = "android:phone_call_camera";
 
     /**
-     * Reserved for 101
+     * Audio is being recorded for hotword detection.
      *
      * @hide
      */
-    public static final String OPSTR_RESERVED_101 = "android:opstr_reserved_101";
-
-    /**
-     * Reserved for 102
-     *
-     * @hide
-     */
-    public static final String OPSTR_RESERVED_102 = "android:opstr_reserved_102";
+    public static final String OPSTR_RECORD_AUDIO_HOTWORD = "android:record_audio_hotword";
 
     /** {@link #sAppOpsToNote} not initialized yet for this op */
     private static final byte SHOULD_COLLECT_NOTE_OP_NOT_INITIALIZED = 0;
@@ -1674,9 +1675,9 @@
             OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED, //AUTO_REVOKE_PERMISSIONS_IF_UNUSED
             OP_AUTO_REVOKE_MANAGED_BY_INSTALLER, //OP_AUTO_REVOKE_MANAGED_BY_INSTALLER
             OP_NO_ISOLATED_STORAGE,             // NO_ISOLATED_STORAGE
-            OP_RESERVED_100,                    // OP_RESERVED_100
-            OP_RESERVED_101,                    // OP_RESERVED_101
-            OP_RESERVED_102,                    // OP_RESERVED_102
+            OP_PHONE_CALL_MICROPHONE,           // OP_PHONE_CALL_MICROPHONE
+            OP_PHONE_CALL_CAMERA,               // OP_PHONE_CALL_CAMERA
+            OP_RECORD_AUDIO_HOTWORD,            // RECORD_AUDIO_HOTWORD
             OP_MANAGE_ONGOING_CALLS,            // MANAGE_ONGOING_CALLS
     };
 
@@ -1784,9 +1785,9 @@
             OPSTR_AUTO_REVOKE_PERMISSIONS_IF_UNUSED,
             OPSTR_AUTO_REVOKE_MANAGED_BY_INSTALLER,
             OPSTR_NO_ISOLATED_STORAGE,
-            OPSTR_RESERVED_100,
-            OPSTR_RESERVED_101,
-            OPSTR_RESERVED_102,
+            OPSTR_PHONE_CALL_MICROPHONE,
+            OPSTR_PHONE_CALL_CAMERA,
+            OPSTR_RECORD_AUDIO_HOTWORD,
             OPSTR_MANAGE_ONGOING_CALLS,
     };
 
@@ -1895,9 +1896,9 @@
             "AUTO_REVOKE_PERMISSIONS_IF_UNUSED",
             "AUTO_REVOKE_MANAGED_BY_INSTALLER",
             "NO_ISOLATED_STORAGE",
-            "RESERVED_100",
-            "RESERVED_101",
-            "RESERVED_102",
+            "PHONE_CALL_MICROPHONE",
+            "PHONE_CALL_CAMERA",
+            "RECORD_AUDIO_HOTWORD",
             "MANAGE_ONGOING_CALLS",
     };
 
@@ -2007,9 +2008,9 @@
             null, // no permission for OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED
             null, // no permission for OP_AUTO_REVOKE_MANAGED_BY_INSTALLER
             null, // no permission for OP_NO_ISOLATED_STORAGE
-            null, // OP_RESERVED_100
-            null, // OP_RESERVED_101
-            null, // OP_RESERVED_102
+            null, // no permission for OP_PHONE_CALL_MICROPHONE
+            null, // no permission for OP_PHONE_CALL_CAMERA
+            null, // no permission for OP_RECORD_AUDIO_HOTWORD
             Manifest.permission.MANAGE_ONGOING_CALLS,
     };
 
@@ -2119,9 +2120,9 @@
             null, // AUTO_REVOKE_PERMISSIONS_IF_UNUSED
             null, // AUTO_REVOKE_MANAGED_BY_INSTALLER
             null, // NO_ISOLATED_STORAGE
-            null, // OP_RESERVED_100
-            null, // OP_RESERVED_101
-            null, // OP_RESERVED_102
+            null, // PHONE_CALL_MICROPHONE
+            null, // PHONE_CALL_MICROPHONE
+            null, // RECORD_AUDIO_HOTWORD
             null, // MANAGE_ONGOING_CALLS
     };
 
@@ -2230,9 +2231,9 @@
             null, // AUTO_REVOKE_PERMISSIONS_IF_UNUSED
             null, // AUTO_REVOKE_MANAGED_BY_INSTALLER
             null, // NO_ISOLATED_STORAGE
-            null, // OP_RESERVED_100
-            null, // OP_RESERVED_101
-            null, // OP_RESERVED_102
+            null, // PHONE_CALL_MICROPHONE
+            null, // PHONE_CALL_CAMERA
+            null, // RECORD_AUDIO_HOTWORD
             null, // MANAGE_ONGOING_CALLS
     };
 
@@ -2340,9 +2341,9 @@
             AppOpsManager.MODE_DEFAULT, // OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED
             AppOpsManager.MODE_ALLOWED, // OP_AUTO_REVOKE_MANAGED_BY_INSTALLER
             AppOpsManager.MODE_ERRORED, // OP_NO_ISOLATED_STORAGE
-            AppOpsManager.MODE_ERRORED, // OP_RESERVED_100
-            AppOpsManager.MODE_ERRORED, // OP_RESERVED_101
-            AppOpsManager.MODE_ERRORED, // OP_RESERVED_102
+            AppOpsManager.MODE_ALLOWED, // PHONE_CALL_MICROPHONE
+            AppOpsManager.MODE_ALLOWED, // PHONE_CALL_CAMERA
+            AppOpsManager.MODE_ALLOWED, // OP_RECORD_AUDIO_HOTWORD
             AppOpsManager.MODE_DEFAULT, // MANAGE_ONGOING_CALLS
     };
 
@@ -2454,9 +2455,9 @@
             false, // AUTO_REVOKE_PERMISSIONS_IF_UNUSED
             false, // AUTO_REVOKE_MANAGED_BY_INSTALLER
             true, // NO_ISOLATED_STORAGE
-            false, // OP_RESERVED_100
-            false, // OP_RESERVED_101
-            false, // OP_RESERVED_102
+            false, // PHONE_CALL_MICROPHONE
+            false, // PHONE_CALL_CAMERA
+            false, // RECORD_AUDIO_HOTWORD
             true, // MANAGE_ONGOING_CALLS
     };
 
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 4f065fd..602b835 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -1901,10 +1901,8 @@
     @Override
     public Object getSystemService(String name) {
         if (vmIncorrectContextUseEnabled()) {
-            // We may override this API from outer context.
-            final boolean isUiContext = isUiContext() || isOuterUiContext();
             // Check incorrect Context usage.
-            if (isUiComponent(name) && !isUiContext) {
+            if (isUiComponent(name) && !isSelfOrOuterUiContext()) {
                 final String errorMessage = "Tried to access visual service "
                         + SystemServiceRegistry.getSystemServiceClassName(name)
                         + " from a non-visual Context:" + getOuterContext();
@@ -1921,15 +1919,17 @@
         return SystemServiceRegistry.getSystemService(this, name);
     }
 
-    private boolean isOuterUiContext() {
-        return getOuterContext() != null && getOuterContext().isUiContext();
-    }
-
     @Override
     public String getSystemServiceName(Class<?> serviceClass) {
         return SystemServiceRegistry.getSystemServiceName(serviceClass);
     }
 
+    // TODO(b/149463653): check if we still need this method after migrating IMS to WindowContext.
+    private boolean isSelfOrOuterUiContext() {
+        // We may override outer context's isUiContext
+        return isUiContext() || getOuterContext() != null && getOuterContext().isUiContext();
+    }
+
     /** @hide */
     @Override
     public boolean isUiContext() {
@@ -2376,7 +2376,6 @@
         context.setResources(createResources(mToken, mPackageInfo, mSplitName, displayId,
                 overrideConfiguration, getDisplayAdjustments(displayId).getCompatibilityInfo(),
                 mResources.getLoaders()));
-        context.mIsUiContext = isUiContext() || isOuterUiContext();
         return context;
     }
 
@@ -2396,6 +2395,11 @@
                 mResources.getLoaders()));
         context.mDisplay = display;
         context.mIsAssociatedWithDisplay = true;
+        // Note that even if a display context is derived from an UI context, it should not be
+        // treated as UI context because it does not handle configuration changes from the server
+        // side. If the context does need to handle configuration changes, please use
+        // Context#createWindowContext(int, Bundle).
+        context.mIsUiContext = false;
         return context;
     }
 
@@ -2481,9 +2485,9 @@
 
     @Override
     public Display getDisplay() {
-        if (!mIsSystemOrSystemUiContext && !mIsAssociatedWithDisplay) {
+        if (!mIsSystemOrSystemUiContext && !mIsAssociatedWithDisplay && !isSelfOrOuterUiContext()) {
             throw new UnsupportedOperationException("Tried to obtain display from a Context not "
-                    + "associated with  one. Only visual Contexts (such as Activity or one created "
+                    + "associated with one. Only visual Contexts (such as Activity or one created "
                     + "with Context#createWindowContext) or ones created with "
                     + "Context#createDisplayContext are associated with displays. Other types of "
                     + "Contexts are typically related to background entities and may return an "
@@ -2757,6 +2761,7 @@
             mDisplay = container.mDisplay;
             mIsAssociatedWithDisplay = container.mIsAssociatedWithDisplay;
             mIsSystemOrSystemUiContext = container.mIsSystemOrSystemUiContext;
+            mIsUiContext = container.isSelfOrOuterUiContext();
         } else {
             mBasePackageName = packageInfo.mPackageName;
             ApplicationInfo ainfo = packageInfo.getApplicationInfo();
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index 75d8a19..2953a5a 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -683,4 +683,14 @@
      * Kills uid with the reason of permission change.
      */
     void killUidForPermissionChange(int appId, int userId, String reason);
+
+    /**
+     * Control the app freezer state. Returns true in case of success, false if the operation
+     * didn't succeed (for example, when the app freezer isn't supported). 
+     * Handling the freezer state via this method is reentrant, that is it can be 
+     * disabled and re-enabled multiple times in parallel. As long as there's a 1:1 disable to
+     * enable match, the freezer is re-enabled at last enable only.
+     * @param enable set it to true to enable the app freezer, false to disable it.
+     */
+    boolean enableAppFreezer(in boolean enable);
 }
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index a21a156..7be661b 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -801,12 +801,9 @@
 
         makePaths(mActivityThread, isBundledApp, mApplicationInfo, zipPaths, libPaths);
 
-        String libraryPermittedPath = mDataDir;
-        if (mActivityThread == null) {
-            // In a zygote context where mActivityThread is null we can't access the app data dir
-            // and including this in libraryPermittedPath would cause SELinux denials.
-            libraryPermittedPath = "";
-        }
+        // Including an inaccessible dir in libraryPermittedPath would cause SELinux denials
+        // when the loader attempts to canonicalise the path. so we don't.
+        String libraryPermittedPath = canAccessDataDir() ? mDataDir : "";
 
         if (isBundledApp) {
             // For bundled apps, add the base directory of the app (e.g.,
@@ -950,6 +947,33 @@
         }
     }
 
+    /**
+     * Return whether we can access the package's private data directory in order to be able to
+     * load code from it.
+     */
+    private boolean canAccessDataDir() {
+        // In a zygote context where mActivityThread is null we can't access the app data dir.
+        if (mActivityThread == null) {
+            return false;
+        }
+
+        // A package can access its own data directory (the common case, so short-circuit it).
+        if (Objects.equals(mPackageName, ActivityThread.currentPackageName())) {
+            return true;
+        }
+
+        // Temporarily disable logging of disk reads on the Looper thread as this is necessary -
+        // and the loader will access the directory anyway if we don't check it.
+        StrictMode.ThreadPolicy oldPolicy = allowThreadDiskReads();
+        try {
+            // We are constructing a classloader for a different package. It is likely,
+            // but not certain, that we can't acccess its app data dir - so check.
+            return new File(mDataDir).canExecute();
+        } finally {
+            setThreadPolicy(oldPolicy);
+        }
+    }
+
     @UnsupportedAppUsage
     public ClassLoader getClassLoader() {
         synchronized (this) {
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 7aa5172..9c6e61c 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -4801,7 +4801,6 @@
             contentView.setViewVisibility(R.id.time, View.GONE);
             contentView.setImageViewIcon(R.id.profile_badge, null);
             contentView.setViewVisibility(R.id.profile_badge, View.GONE);
-            contentView.setViewVisibility(R.id.alerted_icon, View.GONE);
             mN.mUsesStandardHeader = false;
         }
 
diff --git a/core/java/android/app/OWNERS b/core/java/android/app/OWNERS
new file mode 100644
index 0000000..06ad9c9
--- /dev/null
+++ b/core/java/android/app/OWNERS
@@ -0,0 +1,34 @@
+
+# Remain no owner because multiple modules may touch this file.
+per-file ContextImpl.java = *
+
+# ActivityThread
+per-file ActivityThread.java = file:/services/core/java/com/android/server/am/OWNERS
+per-file ActivityThread.java = file:/services/core/java/com/android/server/wm/OWNERS
+
+# Alarm
+per-file *Alarm* = file:/apex/jobscheduler/OWNERS
+
+# AppOps
+per-file *AppOp* = file:/core/java/android/permission/OWNERS
+
+# Notification
+per-file *Notification* = file:/packages/SystemUI/OWNERS
+
+# ResourcesManager
+per-file ResourcesManager = rtmitchell@google.com, toddke@google.com
+
+# Wallpaper
+per-file *Wallpaper* = file:/core/java/android/service/wallpaper/OWNERS
+
+# WindowManager
+per-file *Activity* = file:/services/core/java/com/android/server/wm/OWNERS
+per-file ClientTransactionHandler.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file Fragment.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file *Task* = file:/services/core/java/com/android/server/wm/OWNERS
+per-file Window* = file:/services/core/java/com/android/server/wm/OWNERS
+
+# TODO(b/174932174): determine the ownership of KeyguardManager.java
+
+# Zygote
+per-file *Zygote* = file:/ZYGOTE_OWNERS
diff --git a/core/java/android/app/ResourcesManager.java b/core/java/android/app/ResourcesManager.java
index 7477899..771528a 100644
--- a/core/java/android/app/ResourcesManager.java
+++ b/core/java/android/app/ResourcesManager.java
@@ -39,7 +39,6 @@
 import android.util.ArrayMap;
 import android.util.DisplayMetrics;
 import android.util.Log;
-import android.util.LruCache;
 import android.util.Pair;
 import android.util.Slog;
 import android.view.Display;
@@ -62,7 +61,6 @@
 import java.util.Objects;
 import java.util.WeakHashMap;
 import java.util.function.Consumer;
-import java.util.function.Predicate;
 
 /** @hide */
 public class ResourcesManager {
@@ -129,17 +127,30 @@
         }
     }
 
-    private static final boolean ENABLE_APK_ASSETS_CACHE = false;
-
     /**
-     * The ApkAssets we are caching and intend to hold strong references to.
+     * Loads {@link ApkAssets} and caches them to prevent their garbage collection while the
+     * instance is alive and reachable.
      */
-    private final LruCache<ApkKey, ApkAssets> mLoadedApkAssets =
-            (ENABLE_APK_ASSETS_CACHE) ? new LruCache<>(3) : null;
+    private class ApkAssetsSupplier {
+        final ArrayMap<ApkKey, ApkAssets> mLocalCache = new ArrayMap<>();
+
+        /**
+         * Retrieves the {@link ApkAssets} corresponding to the specified key, caches the ApkAssets
+         * within this instance, and inserts the loaded ApkAssets into the {@link #mCachedApkAssets}
+         * cache.
+         */
+        ApkAssets load(final ApkKey apkKey) throws IOException {
+            ApkAssets apkAssets = mLocalCache.get(apkKey);
+            if (apkAssets == null) {
+                apkAssets = loadApkAssets(apkKey);
+                mLocalCache.put(apkKey, apkAssets);
+            }
+            return apkAssets;
+        }
+    }
 
     /**
-     * The ApkAssets that are being referenced in the wild that we can reuse, even if they aren't
-     * in our LRU cache. Bonus resources :)
+     * The ApkAssets that are being referenced in the wild that we can reuse.
      */
     private final ArrayMap<ApkKey, WeakReference<ApkAssets>> mCachedApkAssets = new ArrayMap<>();
 
@@ -337,49 +348,78 @@
         return "/data/resource-cache/" + path.substring(1).replace('/', '@') + "@idmap";
     }
 
-    private @NonNull ApkAssets loadApkAssets(String path, boolean sharedLib, boolean overlay)
-            throws IOException {
-        final ApkKey newKey = new ApkKey(path, sharedLib, overlay);
-        ApkAssets apkAssets = null;
-        if (mLoadedApkAssets != null) {
-            apkAssets = mLoadedApkAssets.get(newKey);
-            if (apkAssets != null && apkAssets.isUpToDate()) {
-                return apkAssets;
-            }
-        }
+    private @NonNull ApkAssets loadApkAssets(@NonNull final ApkKey key) throws IOException {
+        ApkAssets apkAssets;
 
         // Optimistically check if this ApkAssets exists somewhere else.
-        final WeakReference<ApkAssets> apkAssetsRef = mCachedApkAssets.get(newKey);
-        if (apkAssetsRef != null) {
-            apkAssets = apkAssetsRef.get();
-            if (apkAssets != null && apkAssets.isUpToDate()) {
-                if (mLoadedApkAssets != null) {
-                    mLoadedApkAssets.put(newKey, apkAssets);
+        synchronized (this) {
+            final WeakReference<ApkAssets> apkAssetsRef = mCachedApkAssets.get(key);
+            if (apkAssetsRef != null) {
+                apkAssets = apkAssetsRef.get();
+                if (apkAssets != null && apkAssets.isUpToDate()) {
+                    return apkAssets;
+                } else {
+                    // Clean up the reference.
+                    mCachedApkAssets.remove(key);
                 }
-
-                return apkAssets;
-            } else {
-                // Clean up the reference.
-                mCachedApkAssets.remove(newKey);
             }
         }
 
         // We must load this from disk.
-        if (overlay) {
-            apkAssets = ApkAssets.loadOverlayFromPath(overlayPathToIdmapPath(path), 0 /*flags*/);
+        if (key.overlay) {
+            apkAssets = ApkAssets.loadOverlayFromPath(overlayPathToIdmapPath(key.path),
+                    0 /*flags*/);
         } else {
-            apkAssets = ApkAssets.loadFromPath(path, sharedLib ? ApkAssets.PROPERTY_DYNAMIC : 0);
+            apkAssets = ApkAssets.loadFromPath(key.path,
+                    key.sharedLib ? ApkAssets.PROPERTY_DYNAMIC : 0);
         }
 
-        if (mLoadedApkAssets != null) {
-            mLoadedApkAssets.put(newKey, apkAssets);
+        synchronized (this) {
+            mCachedApkAssets.put(key, new WeakReference<>(apkAssets));
         }
 
-        mCachedApkAssets.put(newKey, new WeakReference<>(apkAssets));
         return apkAssets;
     }
 
     /**
+     * Retrieves a list of apk keys representing the ApkAssets that should be loaded for
+     * AssetManagers mapped to the {@param key}.
+     */
+    private static @NonNull ArrayList<ApkKey> extractApkKeys(@NonNull final ResourcesKey key) {
+        final ArrayList<ApkKey> apkKeys = new ArrayList<>();
+
+        // resDir can be null if the 'android' package is creating a new Resources object.
+        // This is fine, since each AssetManager automatically loads the 'android' package
+        // already.
+        if (key.mResDir != null) {
+            apkKeys.add(new ApkKey(key.mResDir, false /*sharedLib*/, false /*overlay*/));
+        }
+
+        if (key.mSplitResDirs != null) {
+            for (final String splitResDir : key.mSplitResDirs) {
+                apkKeys.add(new ApkKey(splitResDir, false /*sharedLib*/, false /*overlay*/));
+            }
+        }
+
+        if (key.mLibDirs != null) {
+            for (final String libDir : key.mLibDirs) {
+                // Avoid opening files we know do not have resources, like code-only .jar files.
+                if (libDir.endsWith(".apk")) {
+                    apkKeys.add(new ApkKey(libDir, true /*sharedLib*/, false /*overlay*/));
+                }
+            }
+        }
+
+        if (key.mOverlayDirs != null) {
+            for (final String idmapPath : key.mOverlayDirs) {
+                apkKeys.add(new ApkKey(idmapPath, false /*sharedLib*/, true /*overlay*/));
+            }
+        }
+
+        return apkKeys;
+    }
+
+    /**
      * Creates an AssetManager from the paths within the ResourcesKey.
      *
      * This can be overridden in tests so as to avoid creating a real AssetManager with
@@ -390,64 +430,38 @@
     @VisibleForTesting
     @UnsupportedAppUsage
     protected @Nullable AssetManager createAssetManager(@NonNull final ResourcesKey key) {
+        return createAssetManager(key, /* apkSupplier */ null);
+    }
+
+    /**
+     * Variant of {@link #createAssetManager(ResourcesKey)} that attempts to load ApkAssets
+     * from an {@link ApkAssetsSupplier} if non-null; otherwise ApkAssets are loaded using
+     * {@link #loadApkAssets(ApkKey)}.
+     */
+    private @Nullable AssetManager createAssetManager(@NonNull final ResourcesKey key,
+            @Nullable ApkAssetsSupplier apkSupplier) {
         final AssetManager.Builder builder = new AssetManager.Builder();
 
-        // resDir can be null if the 'android' package is creating a new Resources object.
-        // This is fine, since each AssetManager automatically loads the 'android' package
-        // already.
-        if (key.mResDir != null) {
+        final ArrayList<ApkKey> apkKeys = extractApkKeys(key);
+        for (int i = 0, n = apkKeys.size(); i < n; i++) {
+            final ApkKey apkKey = apkKeys.get(i);
             try {
-                builder.addApkAssets(loadApkAssets(key.mResDir, false /*sharedLib*/,
-                        false /*overlay*/));
+                builder.addApkAssets(
+                        (apkSupplier != null) ? apkSupplier.load(apkKey) : loadApkAssets(apkKey));
             } catch (IOException e) {
-                Log.e(TAG, "failed to add asset path " + key.mResDir);
-                return null;
-            }
-        }
-
-        if (key.mSplitResDirs != null) {
-            for (final String splitResDir : key.mSplitResDirs) {
-                try {
-                    builder.addApkAssets(loadApkAssets(splitResDir, false /*sharedLib*/,
-                            false /*overlay*/));
-                } catch (IOException e) {
-                    Log.e(TAG, "failed to add split asset path " + splitResDir);
+                if (apkKey.overlay) {
+                    Log.w(TAG, String.format("failed to add overlay path '%s'", apkKey.path), e);
+                } else if (apkKey.sharedLib) {
+                    Log.w(TAG, String.format(
+                            "asset path '%s' does not exist or contains no resources",
+                            apkKey.path), e);
+                } else {
+                    Log.e(TAG, String.format("failed to add asset path '%s'", apkKey.path), e);
                     return null;
                 }
             }
         }
 
-        if (key.mLibDirs != null) {
-            for (final String libDir : key.mLibDirs) {
-                if (libDir.endsWith(".apk")) {
-                    // Avoid opening files we know do not have resources,
-                    // like code-only .jar files.
-                    try {
-                        builder.addApkAssets(loadApkAssets(libDir, true /*sharedLib*/,
-                                false /*overlay*/));
-                    } catch (IOException e) {
-                        Log.w(TAG, "Asset path '" + libDir +
-                                "' does not exist or contains no resources.");
-
-                        // continue.
-                    }
-                }
-            }
-        }
-
-        if (key.mOverlayDirs != null) {
-            for (final String idmapPath : key.mOverlayDirs) {
-                try {
-                    builder.addApkAssets(loadApkAssets(idmapPath, false /*sharedLib*/,
-                            true /*overlay*/));
-                } catch (IOException e) {
-                    Log.w(TAG, "failed to add overlay path " + idmapPath);
-
-                    // continue.
-                }
-            }
-        }
-
         if (key.mLoaders != null) {
             for (final ResourcesLoader loader : key.mLoaders) {
                 builder.addLoader(loader);
@@ -480,24 +494,6 @@
 
             pw.println("ResourcesManager:");
             pw.increaseIndent();
-            if (mLoadedApkAssets != null) {
-                pw.print("cached apks: total=");
-                pw.print(mLoadedApkAssets.size());
-                pw.print(" created=");
-                pw.print(mLoadedApkAssets.createCount());
-                pw.print(" evicted=");
-                pw.print(mLoadedApkAssets.evictionCount());
-                pw.print(" hit=");
-                pw.print(mLoadedApkAssets.hitCount());
-                pw.print(" miss=");
-                pw.print(mLoadedApkAssets.missCount());
-                pw.print(" max=");
-                pw.print(mLoadedApkAssets.maxSize());
-            } else {
-                pw.print("cached apks: 0 [cache disabled]");
-            }
-            pw.println();
-
             pw.print("total apks: ");
             pw.println(countLiveReferences(mCachedApkAssets.values()));
 
@@ -533,11 +529,12 @@
         return config;
     }
 
-    private @Nullable ResourcesImpl createResourcesImpl(@NonNull ResourcesKey key) {
+    private @Nullable ResourcesImpl createResourcesImpl(@NonNull ResourcesKey key,
+            @Nullable ApkAssetsSupplier apkSupplier) {
         final DisplayAdjustments daj = new DisplayAdjustments(key.mOverrideConfiguration);
         daj.setCompatibilityInfo(key.mCompatInfo);
 
-        final AssetManager assets = createAssetManager(key);
+        final AssetManager assets = createAssetManager(key, apkSupplier);
         if (assets == null) {
             return null;
         }
@@ -575,9 +572,18 @@
      */
     private @Nullable ResourcesImpl findOrCreateResourcesImplForKeyLocked(
             @NonNull ResourcesKey key) {
+        return findOrCreateResourcesImplForKeyLocked(key, /* apkSupplier */ null);
+    }
+
+    /**
+     * Variant of {@link #findOrCreateResourcesImplForKeyLocked(ResourcesKey)} that attempts to
+     * load ApkAssets from a {@link ApkAssetsSupplier} when creating a new ResourcesImpl.
+     */
+    private @Nullable ResourcesImpl findOrCreateResourcesImplForKeyLocked(
+            @NonNull ResourcesKey key, @Nullable ApkAssetsSupplier apkSupplier) {
         ResourcesImpl impl = findResourcesImplForKeyLocked(key);
         if (impl == null) {
-            impl = createResourcesImpl(key);
+            impl = createResourcesImpl(key, apkSupplier);
             if (impl != null) {
                 mResourceImpls.put(key, new WeakReference<>(impl));
             }
@@ -766,7 +772,7 @@
             }
 
             // Now request an actual Resources object.
-            return createResources(token, key, classLoader);
+            return createResources(token, key, classLoader, /* apkSupplier */ null);
         } finally {
             Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);
         }
@@ -810,18 +816,45 @@
     }
 
     /**
+     * Creates an {@link ApkAssetsSupplier} and loads all the ApkAssets required by the {@param key}
+     * into the supplier. This should be done while the lock is not held to prevent performing I/O
+     * while holding the lock.
+     */
+    private @NonNull ApkAssetsSupplier createApkAssetsSupplierNotLocked(@NonNull ResourcesKey key) {
+        Trace.traceBegin(Trace.TRACE_TAG_RESOURCES,
+                "ResourcesManager#createApkAssetsSupplierNotLocked");
+        try {
+            final ApkAssetsSupplier supplier = new ApkAssetsSupplier();
+            final ArrayList<ApkKey> apkKeys = extractApkKeys(key);
+            for (int i = 0, n = apkKeys.size(); i < n; i++) {
+                final ApkKey apkKey = apkKeys.get(i);
+                try {
+                    supplier.load(apkKey);
+                } catch (IOException e) {
+                    Log.w(TAG, String.format("failed to preload asset path '%s'", apkKey.path), e);
+                }
+            }
+            return supplier;
+        } finally {
+            Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);
+        }
+    }
+
+    /**
      * Creates a Resources object set with a ResourcesImpl object matching the given key.
      *
      * @param activityToken The Activity this Resources object should be associated with.
      * @param key The key describing the parameters of the ResourcesImpl object.
      * @param classLoader The classloader to use for the Resources object.
      *                    If null, {@link ClassLoader#getSystemClassLoader()} is used.
+     * @param apkSupplier The apk assets supplier to use when creating a new ResourcesImpl object.
      * @return A Resources object that gets updated when
      *         {@link #applyConfigurationToResourcesLocked(Configuration, CompatibilityInfo)}
      *         is called.
      */
     private @Nullable Resources createResources(@Nullable IBinder activityToken,
-            @NonNull ResourcesKey key, @NonNull ClassLoader classLoader) {
+            @NonNull ResourcesKey key, @NonNull ClassLoader classLoader,
+            @Nullable ApkAssetsSupplier apkSupplier) {
         synchronized (this) {
             if (DEBUG) {
                 Throwable here = new Throwable();
@@ -829,7 +862,7 @@
                 Slog.w(TAG, "!! Get resources for activity=" + activityToken + " key=" + key, here);
             }
 
-            ResourcesImpl resourcesImpl = findOrCreateResourcesImplForKeyLocked(key);
+            ResourcesImpl resourcesImpl = findOrCreateResourcesImplForKeyLocked(key, apkSupplier);
             if (resourcesImpl == null) {
                 return null;
             }
@@ -898,7 +931,10 @@
                 rebaseKeyForActivity(activityToken, key);
             }
 
-            return createResources(activityToken, key, classLoader);
+            // Preload the ApkAssets required by the key to prevent performing heavy I/O while the
+            // ResourcesManager lock is held.
+            final ApkAssetsSupplier assetsSupplier = createApkAssetsSupplierNotLocked(key);
+            return createResources(activityToken, key, classLoader, assetsSupplier);
         } finally {
             Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);
         }
@@ -969,7 +1005,13 @@
                     final ResourcesKey newKey = rebaseActivityOverrideConfig(resources, oldConfig,
                             overrideConfig, displayId);
                     if (newKey != null) {
-                        updateActivityResources(resources, newKey, false);
+                        final ResourcesImpl resourcesImpl =
+                                findOrCreateResourcesImplForKeyLocked(newKey);
+                        if (resourcesImpl != null && resourcesImpl != resources.getImpl()) {
+                            // Set the ResourcesImpl, updating it for all users of this Resources
+                            // object.
+                            resources.setImpl(resourcesImpl);
+                        }
                     }
                 }
             }
@@ -1024,33 +1066,21 @@
         return newKey;
     }
 
-    private void updateActivityResources(Resources resources, ResourcesKey newKey,
-            boolean hasLoader) {
-        final ResourcesImpl resourcesImpl;
-
-        if (hasLoader) {
-            // Loaders always get new Impls because they cannot be shared
-            resourcesImpl = createResourcesImpl(newKey);
-        } else {
-            resourcesImpl = findOrCreateResourcesImplForKeyLocked(newKey);
-        }
-
-        if (resourcesImpl != null && resourcesImpl != resources.getImpl()) {
-            // Set the ResourcesImpl, updating it for all users of this Resources
-            // object.
-            resources.setImpl(resourcesImpl);
-        }
-    }
-
     public final boolean applyConfigurationToResources(@NonNull Configuration config,
             @Nullable CompatibilityInfo compat) {
         synchronized(this) {
-            return applyConfigurationToResourcesLocked(config, compat);
+            return applyConfigurationToResourcesLocked(config, compat, null /* adjustments */);
         }
     }
 
     public final boolean applyConfigurationToResourcesLocked(@NonNull Configuration config,
-                                                             @Nullable CompatibilityInfo compat) {
+            @Nullable CompatibilityInfo compat) {
+        return applyConfigurationToResourcesLocked(config, compat, null /* adjustments */);
+    }
+
+    /** Applies the global configuration to the managed resources. */
+    public final boolean applyConfigurationToResourcesLocked(@NonNull Configuration config,
+            @Nullable CompatibilityInfo compat, @Nullable DisplayAdjustments adjustments) {
         try {
             Trace.traceBegin(Trace.TRACE_TAG_RESOURCES,
                     "ResourcesManager#applyConfigurationToResourcesLocked");
@@ -1074,6 +1104,11 @@
                         | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE;
             }
 
+            if (adjustments != null) {
+                // Currently the only case where the adjustment takes effect is to simulate placing
+                // an app in a rotated display.
+                adjustments.adjustGlobalAppMetrics(defaultDisplayMetrics);
+            }
             Resources.updateSystemConfiguration(config, defaultDisplayMetrics, compat);
 
             ApplicationPackageManager.configurationChanged();
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index d10e33f..496ac3b 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -189,6 +189,7 @@
 import android.util.ArrayMap;
 import android.util.Log;
 import android.util.Slog;
+import android.uwb.UwbManager;
 import android.view.ContextThemeWrapper;
 import android.view.LayoutInflater;
 import android.view.WindowManager;
@@ -719,6 +720,14 @@
                 return new SerialManager(ctx, ISerialManager.Stub.asInterface(b));
             }});
 
+        registerService(Context.UWB_SERVICE, UwbManager.class,
+                new CachedServiceFetcher<UwbManager>() {
+                    @Override
+                    public UwbManager createService(ContextImpl ctx) {
+                        return UwbManager.getInstance();
+                    }
+                });
+
         registerService(Context.VIBRATOR_SERVICE, Vibrator.class,
                 new CachedServiceFetcher<Vibrator>() {
             @Override
diff --git a/core/java/android/app/TaskInfo.java b/core/java/android/app/TaskInfo.java
index 5fcf495..c2aa643 100644
--- a/core/java/android/app/TaskInfo.java
+++ b/core/java/android/app/TaskInfo.java
@@ -177,6 +177,13 @@
      */
     public boolean isResizeable;
 
+    /**
+     * Screen orientation set by {@link #baseActivity} via
+     * {@link Activity#setRequestedOrientation(int)}.
+     * @hide
+     */
+    public @ActivityInfo.ScreenOrientation int requestedOrientation;
+
     TaskInfo() {
         // Do nothing
     }
@@ -248,6 +255,7 @@
                 ? ActivityInfo.CREATOR.createFromParcel(source)
                 : null;
         isResizeable = source.readBoolean();
+        requestedOrientation = source.readInt();
     }
 
     /**
@@ -298,6 +306,7 @@
             topActivityInfo.writeToParcel(dest, flags);
         }
         dest.writeBoolean(isResizeable);
+        dest.writeInt(requestedOrientation);
     }
 
     @Override
@@ -316,6 +325,7 @@
                 + " token=" + token
                 + " topActivityType=" + topActivityType
                 + " pictureInPictureParams=" + pictureInPictureParams
-                + " topActivityInfo=" + topActivityInfo;
+                + " topActivityInfo=" + topActivityInfo
+                + " requestedOrientation=" + requestedOrientation;
     }
 }
diff --git a/core/java/android/app/UiModeManager.java b/core/java/android/app/UiModeManager.java
index 558e222..e2fc5db 100644
--- a/core/java/android/app/UiModeManager.java
+++ b/core/java/android/app/UiModeManager.java
@@ -509,6 +509,9 @@
     }
 
     /**
+     * Activating night mode for the current user
+     *
+     * @return {@code true} if the change is successful
      * @hide
      */
     public boolean setNightModeActivated(boolean active) {
diff --git a/core/java/android/app/admin/OWNERS b/core/java/android/app/admin/OWNERS
new file mode 100644
index 0000000..8462cbe
--- /dev/null
+++ b/core/java/android/app/admin/OWNERS
@@ -0,0 +1,11 @@
+# Bug component: 142675
+
+# Android Enterprise team
+rubinxu@google.com
+sandness@google.com
+eranm@google.com
+alexkershaw@google.com
+pgrafov@google.com
+
+# Emeritus
+yamasani@google.com
diff --git a/core/java/android/app/assist/OWNERS b/core/java/android/app/assist/OWNERS
new file mode 100644
index 0000000..46b5ea0
--- /dev/null
+++ b/core/java/android/app/assist/OWNERS
@@ -0,0 +1,7 @@
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/app/contentsuggestions/OWNERS b/core/java/android/app/contentsuggestions/OWNERS
new file mode 100644
index 0000000..482abb2
--- /dev/null
+++ b/core/java/android/app/contentsuggestions/OWNERS
@@ -0,0 +1,9 @@
+# Bug component: 643919
+
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/app/prediction/AppPredictor.java b/core/java/android/app/prediction/AppPredictor.java
index 4517c6d..fd1b9e3 100644
--- a/core/java/android/app/prediction/AppPredictor.java
+++ b/core/java/android/app/prediction/AppPredictor.java
@@ -82,6 +82,8 @@
     private final AppPredictionSessionId mSessionId;
     private final ArrayMap<Callback, CallbackWrapper> mRegisteredCallbacks = new ArrayMap<>();
 
+    private final IBinder mToken = new Binder();
+
     /**
      * Creates a new Prediction client.
      * <p>
@@ -97,7 +99,7 @@
         mSessionId = new AppPredictionSessionId(
                 context.getPackageName() + ":" + UUID.randomUUID().toString(), context.getUserId());
         try {
-            mPredictionManager.createPredictionSession(predictionContext, mSessionId);
+            mPredictionManager.createPredictionSession(predictionContext, mSessionId, mToken);
         } catch (RemoteException e) {
             Log.e(TAG, "Failed to create predictor", e);
             e.rethrowAsRuntimeException();
diff --git a/core/java/android/app/prediction/IPredictionManager.aidl b/core/java/android/app/prediction/IPredictionManager.aidl
index 587e3fd..863fc6f9 100644
--- a/core/java/android/app/prediction/IPredictionManager.aidl
+++ b/core/java/android/app/prediction/IPredictionManager.aidl
@@ -29,7 +29,7 @@
 interface IPredictionManager {
 
     void createPredictionSession(in AppPredictionContext context,
-            in AppPredictionSessionId sessionId);
+            in AppPredictionSessionId sessionId, in IBinder token);
 
     void notifyAppTargetEvent(in AppPredictionSessionId sessionId, in AppTargetEvent event);
 
diff --git a/core/java/android/app/prediction/OWNERS b/core/java/android/app/prediction/OWNERS
new file mode 100644
index 0000000..fe012da
--- /dev/null
+++ b/core/java/android/app/prediction/OWNERS
@@ -0,0 +1,2 @@
+adamcohen@google.com
+sunnygoyal@google.com
diff --git a/core/java/android/app/role/OWNERS b/core/java/android/app/role/OWNERS
index b94d988..b8076366 100644
--- a/core/java/android/app/role/OWNERS
+++ b/core/java/android/app/role/OWNERS
@@ -1,6 +1,4 @@
-svetoslavganov@google.com
-moltmann@google.com
+# Bug component: 137825
+
 zhanghai@google.com
-evanseverson@google.com
-eugenesusla@google.com
-ntmyren@google.com
+moltmann@google.com
diff --git a/core/java/android/app/servertransaction/OWNERS b/core/java/android/app/servertransaction/OWNERS
new file mode 100644
index 0000000..aa6248e
--- /dev/null
+++ b/core/java/android/app/servertransaction/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 316125
+
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/core/java/android/app/slice/OWNERS b/core/java/android/app/slice/OWNERS
new file mode 100644
index 0000000..b0a44fb
--- /dev/null
+++ b/core/java/android/app/slice/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 342804
+
+sunnygoyal@google.com
+dsandler@android.com
+dsandler@google.com
+adamcohen@google.com
diff --git a/core/java/android/app/time/OWNERS b/core/java/android/app/time/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/core/java/android/app/time/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/core/java/android/app/timedetector/GnssTimeSuggestion.aidl b/core/java/android/app/timedetector/GnssTimeSuggestion.aidl
new file mode 100644
index 0000000..81475ec
--- /dev/null
+++ b/core/java/android/app/timedetector/GnssTimeSuggestion.aidl
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.timedetector;
+
+parcelable GnssTimeSuggestion;
diff --git a/core/java/android/app/timedetector/GnssTimeSuggestion.java b/core/java/android/app/timedetector/GnssTimeSuggestion.java
new file mode 100644
index 0000000..6478a2d
--- /dev/null
+++ b/core/java/android/app/timedetector/GnssTimeSuggestion.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.timedetector;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.TimestampedValue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * A time signal from a GNSS source.
+ *
+ * <p>{@code utcTime} is the suggested time. The {@code utcTime.value} is the number of milliseconds
+ * elapsed since 1/1/1970 00:00:00 UTC. The {@code utcTime.referenceTimeMillis} is the value of the
+ * elapsed realtime clock when the {@code utcTime.value} was established.
+ * Note that the elapsed realtime clock is considered accurate but it is volatile, so time
+ * suggestions cannot be persisted across device resets.
+ *
+ * <p>{@code debugInfo} contains debugging metadata associated with the suggestion. This is used to
+ * record why the suggestion exists and how it was entered. This information exists only to aid in
+ * debugging and therefore is used by {@link #toString()}, but it is not for use in detection
+ * logic and is not considered in {@link #hashCode()} or {@link #equals(Object)}.
+ *
+ * @hide
+ */
+public final class GnssTimeSuggestion implements Parcelable {
+
+    public static final @NonNull Creator<GnssTimeSuggestion> CREATOR =
+            new Creator<GnssTimeSuggestion>() {
+                public GnssTimeSuggestion createFromParcel(Parcel in) {
+                    return GnssTimeSuggestion.createFromParcel(in);
+                }
+
+                public GnssTimeSuggestion[] newArray(int size) {
+                    return new GnssTimeSuggestion[size];
+                }
+            };
+
+    @NonNull private final TimestampedValue<Long> mUtcTime;
+    @Nullable private ArrayList<String> mDebugInfo;
+
+    public GnssTimeSuggestion(@NonNull TimestampedValue<Long> utcTime) {
+        mUtcTime = Objects.requireNonNull(utcTime);
+        Objects.requireNonNull(utcTime.getValue());
+    }
+
+    private static GnssTimeSuggestion createFromParcel(Parcel in) {
+        TimestampedValue<Long> utcTime = in.readParcelable(null /* classLoader */);
+        GnssTimeSuggestion suggestion = new GnssTimeSuggestion(utcTime);
+        @SuppressWarnings("unchecked")
+        ArrayList<String> debugInfo = (ArrayList<String>) in.readArrayList(null /* classLoader */);
+        suggestion.mDebugInfo = debugInfo;
+        return suggestion;
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        dest.writeParcelable(mUtcTime, 0);
+        dest.writeList(mDebugInfo);
+    }
+
+    @NonNull
+    public TimestampedValue<Long> getUtcTime() {
+        return mUtcTime;
+    }
+
+    @NonNull
+    public List<String> getDebugInfo() {
+        return mDebugInfo == null
+                ? Collections.emptyList() : Collections.unmodifiableList(mDebugInfo);
+    }
+
+    /**
+     * Associates information with the instance that can be useful for debugging / logging. The
+     * information is present in {@link #toString()} but is not considered for
+     * {@link #equals(Object)} and {@link #hashCode()}.
+     */
+    public void addDebugInfo(String... debugInfos) {
+        if (mDebugInfo == null) {
+            mDebugInfo = new ArrayList<>();
+        }
+        mDebugInfo.addAll(Arrays.asList(debugInfos));
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        GnssTimeSuggestion that = (GnssTimeSuggestion) o;
+        return Objects.equals(mUtcTime, that.mUtcTime);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(mUtcTime);
+    }
+
+    @Override
+    public String toString() {
+        return "GnssTimeSuggestion{"
+                + "mUtcTime=" + mUtcTime
+                + ", mDebugInfo=" + mDebugInfo
+                + '}';
+    }
+}
diff --git a/core/java/android/app/timedetector/ITimeDetectorService.aidl b/core/java/android/app/timedetector/ITimeDetectorService.aidl
index 5ead0c9..87e7233 100644
--- a/core/java/android/app/timedetector/ITimeDetectorService.aidl
+++ b/core/java/android/app/timedetector/ITimeDetectorService.aidl
@@ -16,6 +16,7 @@
 
 package android.app.timedetector;
 
+import android.app.timedetector.GnssTimeSuggestion;
 import android.app.timedetector.ManualTimeSuggestion;
 import android.app.timedetector.NetworkTimeSuggestion;
 import android.app.timedetector.TelephonyTimeSuggestion;
@@ -34,7 +35,8 @@
  * {@hide}
  */
 interface ITimeDetectorService {
-  void suggestManualTime(in ManualTimeSuggestion timeSuggestion);
+  void suggestGnssTime(in GnssTimeSuggestion timeSuggestion);
+  boolean suggestManualTime(in ManualTimeSuggestion timeSuggestion);
   void suggestNetworkTime(in NetworkTimeSuggestion timeSuggestion);
   void suggestTelephonyTime(in TelephonyTimeSuggestion timeSuggestion);
 }
diff --git a/core/java/android/app/timedetector/OWNERS b/core/java/android/app/timedetector/OWNERS
new file mode 100644
index 0000000..941eed8
--- /dev/null
+++ b/core/java/android/app/timedetector/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 847766
+mingaleev@google.com
+narayan@google.com
+nfuller@google.com
diff --git a/core/java/android/app/timedetector/TimeDetector.java b/core/java/android/app/timedetector/TimeDetector.java
index 84ad495..52016b6 100644
--- a/core/java/android/app/timedetector/TimeDetector.java
+++ b/core/java/android/app/timedetector/TimeDetector.java
@@ -53,12 +53,16 @@
     void suggestTelephonyTime(@NonNull TelephonyTimeSuggestion timeSuggestion);
 
     /**
-     * Suggests the user's manually entered current time to the detector.
+     * Suggests the current time, determined from the user's manually entered information, to
+     * the detector. Returns {@code false} if the suggestion was invalid, or the device
+     * configuration prevented the suggestion being used, {@code true} if the suggestion was
+     * accepted. A suggestion that is valid but does not change the time because it matches the
+     * current device time is considered accepted.
      *
      * @hide
      */
     @RequiresPermission(android.Manifest.permission.SUGGEST_MANUAL_TIME_AND_ZONE)
-    void suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion);
+    boolean suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion);
 
     /**
      * Suggests the time according to a network time source like NTP.
@@ -67,4 +71,12 @@
      */
     @RequiresPermission(android.Manifest.permission.SET_TIME)
     void suggestNetworkTime(NetworkTimeSuggestion timeSuggestion);
+
+    /**
+     * Suggests the time according to a gnss time source.
+     *
+     * @hide
+     */
+    @RequiresPermission(android.Manifest.permission.SET_TIME)
+    void suggestGnssTime(GnssTimeSuggestion timeSuggestion);
 }
diff --git a/core/java/android/app/timedetector/TimeDetectorImpl.java b/core/java/android/app/timedetector/TimeDetectorImpl.java
index c1d6667..b0aa3c8 100644
--- a/core/java/android/app/timedetector/TimeDetectorImpl.java
+++ b/core/java/android/app/timedetector/TimeDetectorImpl.java
@@ -52,12 +52,12 @@
     }
 
     @Override
-    public void suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion) {
+    public boolean suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion) {
         if (DEBUG) {
             Log.d(TAG, "suggestManualTime called: " + timeSuggestion);
         }
         try {
-            mITimeDetectorService.suggestManualTime(timeSuggestion);
+            return mITimeDetectorService.suggestManualTime(timeSuggestion);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -74,4 +74,16 @@
             throw e.rethrowFromSystemServer();
         }
     }
+
+    @Override
+    public void suggestGnssTime(GnssTimeSuggestion timeSuggestion) {
+        if (DEBUG) {
+            Log.d(TAG, "suggestGnssTime called: " + timeSuggestion);
+        }
+        try {
+            mITimeDetectorService.suggestGnssTime(timeSuggestion);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
 }
diff --git a/core/java/android/app/timezone/OWNERS b/core/java/android/app/timezone/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/core/java/android/app/timezone/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/core/java/android/app/timezonedetector/ITimeZoneDetectorService.aidl b/core/java/android/app/timezonedetector/ITimeZoneDetectorService.aidl
index b06f4b8..6d7b26d 100644
--- a/core/java/android/app/timezonedetector/ITimeZoneDetectorService.aidl
+++ b/core/java/android/app/timezonedetector/ITimeZoneDetectorService.aidl
@@ -33,6 +33,6 @@
  * {@hide}
  */
 interface ITimeZoneDetectorService {
-  void suggestManualTimeZone(in ManualTimeZoneSuggestion timeZoneSuggestion);
+  boolean suggestManualTimeZone(in ManualTimeZoneSuggestion timeZoneSuggestion);
   void suggestTelephonyTimeZone(in TelephonyTimeZoneSuggestion timeZoneSuggestion);
 }
diff --git a/core/java/android/app/timezonedetector/OWNERS b/core/java/android/app/timezonedetector/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/core/java/android/app/timezonedetector/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/core/java/android/app/timezonedetector/TimeZoneDetector.java b/core/java/android/app/timezonedetector/TimeZoneDetector.java
index 34a7586..b783684 100644
--- a/core/java/android/app/timezonedetector/TimeZoneDetector.java
+++ b/core/java/android/app/timezonedetector/TimeZoneDetector.java
@@ -41,13 +41,16 @@
     }
 
     /**
-     * Suggests the current time zone, determined using the user's manually entered information, to
-     * the detector. The detector may ignore the signal based on system settings.
+     * Suggests the current time zone, determined from the user's manually entered information, to
+     * the detector. Returns {@code false} if the suggestion was invalid, or the device
+     * configuration prevented the suggestion being used, {@code true} if the suggestion was
+     * accepted. A suggestion that is valid but does not change the time zone because it matches
+     * the current device time zone is considered accepted.
      *
      * @hide
      */
     @RequiresPermission(android.Manifest.permission.SUGGEST_MANUAL_TIME_AND_ZONE)
-    void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion);
+    boolean suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion);
 
     /**
      * Suggests the current time zone, determined using telephony signals, to the detector. The
diff --git a/core/java/android/app/timezonedetector/TimeZoneDetectorImpl.java b/core/java/android/app/timezonedetector/TimeZoneDetectorImpl.java
index 54cf1f3..3bd6b4b 100644
--- a/core/java/android/app/timezonedetector/TimeZoneDetectorImpl.java
+++ b/core/java/android/app/timezonedetector/TimeZoneDetectorImpl.java
@@ -40,12 +40,12 @@
     }
 
     @Override
-    public void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) {
+    public boolean suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) {
         if (DEBUG) {
             Log.d(TAG, "suggestManualTimeZone called: " + timeZoneSuggestion);
         }
         try {
-            mITimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion);
+            return mITimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
diff --git a/core/java/android/app/usage/OWNERS b/core/java/android/app/usage/OWNERS
new file mode 100644
index 0000000..a33d0ad
--- /dev/null
+++ b/core/java/android/app/usage/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 532296
+
+yamasani@google.com
+mwachens@google.com
+varunshah@google.com
diff --git a/core/java/android/attention/OWNERS b/core/java/android/attention/OWNERS
new file mode 100644
index 0000000..dd579b6
--- /dev/null
+++ b/core/java/android/attention/OWNERS
@@ -0,0 +1 @@
+asalo@google.com
diff --git a/core/java/android/bluetooth/BluetoothClass.java b/core/java/android/bluetooth/BluetoothClass.java
index 905b0cee..1e92fc0 100755
--- a/core/java/android/bluetooth/BluetoothClass.java
+++ b/core/java/android/bluetooth/BluetoothClass.java
@@ -425,13 +425,13 @@
                     return false;
             }
         } else if (profile == PROFILE_HID) {
-            return (getDeviceClass() & Device.Major.PERIPHERAL) == Device.Major.PERIPHERAL;
+            return getMajorDeviceClass() == Device.Major.PERIPHERAL;
         } else if (profile == PROFILE_PANU || profile == PROFILE_NAP) {
             // No good way to distinguish between the two, based on class bits.
             if (hasService(Service.NETWORKING)) {
                 return true;
             }
-            return (getDeviceClass() & Device.Major.NETWORKING) == Device.Major.NETWORKING;
+            return getMajorDeviceClass() == Device.Major.NETWORKING;
         } else {
             return false;
         }
diff --git a/core/java/android/bluetooth/BluetoothLeAudio.java b/core/java/android/bluetooth/BluetoothLeAudio.java
new file mode 100644
index 0000000..3f00fa6
--- /dev/null
+++ b/core/java/android/bluetooth/BluetoothLeAudio.java
@@ -0,0 +1,451 @@
+/*
+ * Copyright 2020 HIMSA II K/S - www.himsa.com.
+ * Represented by EHIMA - www.ehima.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.bluetooth;
+
+import android.Manifest;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
+import android.content.Context;
+import android.os.Binder;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.CloseGuard;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This class provides the public APIs to control the LeAudio profile.
+ *
+ * <p>BluetoothLeAudio is a proxy object for controlling the Bluetooth LE Audio
+ * Service via IPC. Use {@link BluetoothAdapter#getProfileProxy} to get
+ * the BluetoothLeAudio proxy object.
+ *
+ * <p> Android only supports one set of connected Bluetooth LeAudio device at a time. Each
+ * method is protected with its appropriate permission.
+ */
+public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
+    private static final String TAG = "BluetoothLeAudio";
+    private static final boolean DBG = false;
+    private static final boolean VDBG = false;
+
+    private CloseGuard mCloseGuard;
+
+    /**
+     * Intent used to broadcast the change in connection state of the LeAudio
+     * profile. Please note that in the binaural case, there will be two different LE devices for
+     * the left and right side and each device will have their own connection state changes.
+     *
+     * <p>This intent will have 3 extras:
+     * <ul>
+     * <li> {@link #EXTRA_STATE} - The current state of the profile. </li>
+     * <li> {@link #EXTRA_PREVIOUS_STATE}- The previous state of the profile.</li>
+     * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
+     * </ul>
+     *
+     * <p>{@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} can be any of
+     * {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTING},
+     * {@link #STATE_CONNECTED}, {@link #STATE_DISCONNECTING}.
+     *
+     * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
+     * receive.
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED =
+            "android.bluetooth.action.LE_AUDIO_CONNECTION_STATE_CHANGED";
+
+    /**
+     * Intent used to broadcast the selection of a connected device as active.
+     *
+     * <p>This intent will have one extra:
+     * <ul>
+     * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. It can
+     * be null if no device is active. </li>
+     * </ul>
+     *
+     * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
+     * receive.
+     *
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_LE_AUDIO_ACTIVE_DEVICE_CHANGED =
+            "android.bluetooth.action.LE_AUDIO_ACTIVE_DEVICE_CHANGED";
+
+    /**
+     * This represents an invalid group ID.
+     *
+     * @hide
+     */
+    public static final int GROUP_ID_INVALID = IBluetoothLeAudio.LE_AUDIO_GROUP_ID_INVALID;
+
+    private BluetoothAdapter mAdapter;
+    private final BluetoothProfileConnector<IBluetoothLeAudio> mProfileConnector =
+            new BluetoothProfileConnector(this, BluetoothProfile.LE_AUDIO, "BluetoothLeAudio",
+                    IBluetoothLeAudio.class.getName()) {
+                @Override
+                public IBluetoothLeAudio getServiceInterface(IBinder service) {
+                    return IBluetoothLeAudio.Stub.asInterface(Binder.allowBlocking(service));
+                }
+    };
+
+    /**
+     * Create a BluetoothLeAudio proxy object for interacting with the local
+     * Bluetooth LeAudio service.
+     */
+    /*package*/ BluetoothLeAudio(Context context, ServiceListener listener) {
+        mAdapter = BluetoothAdapter.getDefaultAdapter();
+        mProfileConnector.connect(context, listener);
+        mCloseGuard = new CloseGuard();
+        mCloseGuard.open("close");
+    }
+
+    /**
+     * @hide
+     */
+    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+    public void close() {
+        mProfileConnector.disconnect();
+    }
+
+    private IBluetoothLeAudio getService() {
+        return mProfileConnector.getService();
+    }
+
+    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+    protected void finalize() {
+        if (mCloseGuard != null) {
+            mCloseGuard.warnIfOpen();
+        }
+        close();
+    }
+
+    /**
+     * Initiate connection to a profile of the remote bluetooth device.
+     *
+     * <p> This API returns false in scenarios like the profile on the
+     * device is already connected or Bluetooth is not turned on.
+     * When this API returns true, it is guaranteed that
+     * connection state intent for the profile will be broadcasted with
+     * the state. Users can get the connection state of the profile
+     * from this intent.
+     *
+     *
+     * @param device Remote Bluetooth Device
+     * @return false on immediate error, true otherwise
+     * @hide
+     */
+    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+    public boolean connect(@Nullable BluetoothDevice device) {
+        if (DBG) log("connect(" + device + ")");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled() && isValidDevice(device)) {
+                return service.connect(device);
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return false;
+        }
+    }
+
+    /**
+     * Initiate disconnection from a profile
+     *
+     * <p> This API will return false in scenarios like the profile on the
+     * Bluetooth device is not in connected state etc. When this API returns,
+     * true, it is guaranteed that the connection state change
+     * intent will be broadcasted with the state. Users can get the
+     * disconnection state of the profile from this intent.
+     *
+     * <p> If the disconnection is initiated by a remote device, the state
+     * will transition from {@link #STATE_CONNECTED} to
+     * {@link #STATE_DISCONNECTED}. If the disconnect is initiated by the
+     * host (local) device the state will transition from
+     * {@link #STATE_CONNECTED} to state {@link #STATE_DISCONNECTING} to
+     * state {@link #STATE_DISCONNECTED}. The transition to
+     * {@link #STATE_DISCONNECTING} can be used to distinguish between the
+     * two scenarios.
+     *
+     *
+     * @param device Remote Bluetooth Device
+     * @return false on immediate error, true otherwise
+     * @hide
+     */
+    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+    public boolean disconnect(@Nullable BluetoothDevice device) {
+        if (DBG) log("disconnect(" + device + ")");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled() && isValidDevice(device)) {
+                return service.disconnect(device);
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return false;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public @NonNull List<BluetoothDevice> getConnectedDevices() {
+        if (VDBG) log("getConnectedDevices()");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled()) {
+                return service.getConnectedDevices();
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return new ArrayList<BluetoothDevice>();
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return new ArrayList<BluetoothDevice>();
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public @NonNull List<BluetoothDevice> getDevicesMatchingConnectionStates(
+            @NonNull int[] states) {
+        if (VDBG) log("getDevicesMatchingStates()");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled()) {
+                return service.getDevicesMatchingConnectionStates(states);
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return new ArrayList<BluetoothDevice>();
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return new ArrayList<BluetoothDevice>();
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @RequiresPermission(Manifest.permission.BLUETOOTH)
+    public @BtProfileState int getConnectionState(@NonNull BluetoothDevice device) {
+        if (VDBG) log("getState(" + device + ")");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled()
+                    && isValidDevice(device)) {
+                return service.getConnectionState(device);
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return BluetoothProfile.STATE_DISCONNECTED;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return BluetoothProfile.STATE_DISCONNECTED;
+        }
+    }
+
+    /**
+     * Select a connected device as active.
+     *
+     * The active device selection is per profile. An active device's
+     * purpose is profile-specific. For example, LeAudio audio
+     * streaming is to the active LeAudio device. If a remote device
+     * is not connected, it cannot be selected as active.
+     *
+     * <p> This API returns false in scenarios like the profile on the
+     * device is not connected or Bluetooth is not turned on.
+     * When this API returns true, it is guaranteed that the
+     * {@link #ACTION_LEAUDIO_ACTIVE_DEVICE_CHANGED} intent will be broadcasted
+     * with the active device.
+     *
+     *
+     * @param device the remote Bluetooth device. Could be null to clear
+     * the active device and stop streaming audio to a Bluetooth device.
+     * @return false on immediate error, true otherwise
+     * @hide
+     */
+    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+    public boolean setActiveDevice(@Nullable BluetoothDevice device) {
+        if (DBG) log("setActiveDevice(" + device + ")");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled()
+                    && ((device == null) || isValidDevice(device))) {
+                service.setActiveDevice(device);
+                return true;
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return false;
+        }
+    }
+
+    /**
+     * Get the connected LeAudio devices that are active
+     *
+     * @return the list of active devices. Returns empty list on error.
+     * @hide
+     */
+    @NonNull
+    @RequiresPermission(Manifest.permission.BLUETOOTH)
+    public List<BluetoothDevice> getActiveDevices() {
+        if (VDBG) log("getActiveDevices()");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled()) {
+                return service.getActiveDevices();
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return new ArrayList<>();
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return new ArrayList<>();
+        }
+    }
+
+    /**
+     * Get device group id. Devices with same group id belong to same group (i.e left and right
+     * earbud)
+     * @param device LE Audio capable device
+     * @return group id that this device currently belongs to
+     * @hide
+     */
+    @RequiresPermission(Manifest.permission.BLUETOOTH)
+    public int getGroupId(@NonNull BluetoothDevice device) {
+        if (VDBG) log("getGroupId()");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled()) {
+                return service.getGroupId(device);
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return GROUP_ID_INVALID;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return GROUP_ID_INVALID;
+        }
+    }
+
+    /**
+     * Set connection policy of the profile
+     *
+     * <p> The device should already be paired.
+     * Connection policy can be one of {@link #CONNECTION_POLICY_ALLOWED},
+     * {@link #CONNECTION_POLICY_FORBIDDEN}, {@link #CONNECTION_POLICY_UNKNOWN}
+     *
+     * @param device Paired bluetooth device
+     * @param connectionPolicy is the connection policy to set to for this profile
+     * @return true if connectionPolicy is set, false on error
+     * @hide
+     */
+    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+    public boolean setConnectionPolicy(@NonNull BluetoothDevice device,
+            @ConnectionPolicy int connectionPolicy) {
+        if (DBG) log("setConnectionPolicy(" + device + ", " + connectionPolicy + ")");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled()
+                    && isValidDevice(device)) {
+                if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_FORBIDDEN
+                        && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) {
+                    return false;
+                }
+                return service.setConnectionPolicy(device, connectionPolicy);
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return false;
+        }
+    }
+
+    /**
+     * Get the connection policy of the profile.
+     *
+     * <p> The connection policy can be any of:
+     * {@link #CONNECTION_POLICY_ALLOWED}, {@link #CONNECTION_POLICY_FORBIDDEN},
+     * {@link #CONNECTION_POLICY_UNKNOWN}
+     *
+     * @param device Bluetooth device
+     * @return connection policy of the device
+     * @hide
+     */
+    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+    public @ConnectionPolicy int getConnectionPolicy(@Nullable BluetoothDevice device) {
+        if (VDBG) log("getConnectionPolicy(" + device + ")");
+        try {
+            final IBluetoothLeAudio service = getService();
+            if (service != null && mAdapter.isEnabled()
+                    && isValidDevice(device)) {
+                return service.getConnectionPolicy(device);
+            }
+            if (service == null) Log.w(TAG, "Proxy not attached to service");
+            return BluetoothProfile.CONNECTION_POLICY_FORBIDDEN;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return BluetoothProfile.CONNECTION_POLICY_FORBIDDEN;
+        }
+    }
+
+
+    /**
+     * Helper for converting a state to a string.
+     *
+     * For debug use only - strings are not internationalized.
+     *
+     * @hide
+     */
+    public static String stateToString(int state) {
+        switch (state) {
+            case STATE_DISCONNECTED:
+                return "disconnected";
+            case STATE_CONNECTING:
+                return "connecting";
+            case STATE_CONNECTED:
+                return "connected";
+            case STATE_DISCONNECTING:
+                return "disconnecting";
+            default:
+                return "<unknown state " + state + ">";
+        }
+    }
+
+    private boolean isValidDevice(@Nullable BluetoothDevice device) {
+        if (device == null) return false;
+
+        if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true;
+        return false;
+    }
+
+    private static void log(String msg) {
+        Log.d(TAG, msg);
+    }
+}
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index db851c4..c31b04e 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -207,12 +207,19 @@
     int HEARING_AID = 21;
 
     /**
+     * LE Audio Device
+     *
+     * @hide
+     */
+    int LE_AUDIO = 22;
+
+    /**
      * Max profile ID. This value should be updated whenever a new profile is added to match
      * the largest value assigned to a profile.
      *
      * @hide
      */
-    int MAX_PROFILE_ID = 21;
+    int MAX_PROFILE_ID = 22;
 
     /**
      * Default priority for devices that we try to auto-connect to and
diff --git a/core/java/android/bluetooth/OWNERS b/core/java/android/bluetooth/OWNERS
new file mode 100644
index 0000000..3523ee0
--- /dev/null
+++ b/core/java/android/bluetooth/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 27441
+
+zachoverflow@google.com
+siyuanh@google.com
diff --git a/core/java/android/bluetooth/le/OWNERS b/core/java/android/bluetooth/le/OWNERS
new file mode 100644
index 0000000..3523ee0
--- /dev/null
+++ b/core/java/android/bluetooth/le/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 27441
+
+zachoverflow@google.com
+siyuanh@google.com
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 7ffcead..92ede1c 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3513,6 +3513,7 @@
             //@hide: TIME_ZONE_DETECTOR_SERVICE,
             PERMISSION_SERVICE,
             LIGHTS_SERVICE,
+            UWB_SERVICE,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface ServiceName {}
@@ -5179,6 +5180,15 @@
 
     /**
      * Use with {@link #getSystemService(String)} to retrieve a
+     * {@link android.uwb.UwbManager}.
+     *
+     * @see #getSystemService(String)
+     * @hide
+     */
+    public static final String UWB_SERVICE = "uwb";
+
+    /**
+     * Use with {@link #getSystemService(String)} to retrieve a
      * {@link android.app.DreamManager} for controlling Dream states.
      *
      * @see #getSystemService(String)
diff --git a/core/java/android/content/OWNERS b/core/java/android/content/OWNERS
new file mode 100644
index 0000000..c1e7e41
--- /dev/null
+++ b/core/java/android/content/OWNERS
@@ -0,0 +1,3 @@
+# Remain no owner because multiple modules may touch this file.
+per-file Context.java = *
+per-file ContextWrapper.java = *
diff --git a/core/java/android/content/om/OWNERS b/core/java/android/content/om/OWNERS
new file mode 100644
index 0000000..91a0abf
--- /dev/null
+++ b/core/java/android/content/om/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 568631
+
+toddke@android.com
+toddke@google.com
+patb@google.com
+rtmitchell@google.com
diff --git a/core/java/android/content/pm/OWNERS b/core/java/android/content/pm/OWNERS
index a16bb4f..24872e8 100644
--- a/core/java/android/content/pm/OWNERS
+++ b/core/java/android/content/pm/OWNERS
@@ -1 +1,8 @@
+# Bug component: 36137
+
+toddke@android.com
+toddke@google.com
+patb@google.com
+
 per-file PackageParser.java = chiuwinson@google.com
+per-file *Shortcut* = omakoto@google.com, yamasani@google.com, sunnygoyal@google.com, mett@google.com, pinyaoting@google.com
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java
index 47f84c8..005c7ce 100644
--- a/core/java/android/content/pm/PackageInstaller.java
+++ b/core/java/android/content/pm/PackageInstaller.java
@@ -37,6 +37,7 @@
 import android.content.IntentSender;
 import android.content.pm.PackageManager.DeleteFlags;
 import android.content.pm.PackageManager.InstallReason;
+import android.content.pm.PackageManager.InstallScenario;
 import android.graphics.Bitmap;
 import android.net.Uri;
 import android.os.Build;
@@ -1291,9 +1292,8 @@
          *
          * @throws PackageManager.NameNotFoundException if the new owner could not be found.
          * @throws SecurityException if called after the session has been committed or abandoned.
-         * @throws SecurityException if the session does not update the original installer
-         * @throws SecurityException if streams opened through
-         *                           {@link #openWrite(String, long, long) are still open.
+         * @throws IllegalArgumentException if streams opened through
+         *                                  {@link #openWrite(String, long, long) are still open.
          */
         public void transfer(@NonNull String packageName)
                 throws PackageManager.NameNotFoundException {
@@ -1466,6 +1466,14 @@
         public int installLocation = PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY;
         /** {@hide} */
         public @InstallReason int installReason = PackageManager.INSTALL_REASON_UNKNOWN;
+        /**
+         * {@hide}
+         *
+         * This flag indicates which installation scenario best describes this session.  The system
+         * may use this value when making decisions about how to handle the installation, such as
+         * prioritizing system health or user experience.
+         */
+        public @InstallScenario int installScenario = PackageManager.INSTALL_SCENARIO_DEFAULT;
         /** {@hide} */
         @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
         public long sizeBytes = -1;
@@ -1529,6 +1537,7 @@
             installFlags = source.readInt();
             installLocation = source.readInt();
             installReason = source.readInt();
+            installScenario = source.readInt();
             sizeBytes = source.readLong();
             appPackageName = source.readString();
             appIcon = source.readParcelable(null);
@@ -1560,6 +1569,7 @@
             ret.installFlags = installFlags;
             ret.installLocation = installLocation;
             ret.installReason = installReason;
+            ret.installScenario = installScenario;
             ret.sizeBytes = sizeBytes;
             ret.appPackageName = appPackageName;
             ret.appIcon = appIcon;  // not a copy.
@@ -1985,6 +1995,8 @@
             pw.printPair("mode", mode);
             pw.printHexPair("installFlags", installFlags);
             pw.printPair("installLocation", installLocation);
+            pw.printPair("installReason", installReason);
+            pw.printPair("installScenario", installScenario);
             pw.printPair("sizeBytes", sizeBytes);
             pw.printPair("appPackageName", appPackageName);
             pw.printPair("appIcon", (appIcon != null));
@@ -2018,6 +2030,7 @@
             dest.writeInt(installFlags);
             dest.writeInt(installLocation);
             dest.writeInt(installReason);
+            dest.writeInt(installScenario);
             dest.writeLong(sizeBytes);
             dest.writeString(appPackageName);
             dest.writeParcelable(appIcon, flags);
@@ -2127,6 +2140,8 @@
         /** {@hide} */
         public @InstallReason int installReason;
         /** {@hide} */
+        public @InstallReason int installScenario;
+        /** {@hide} */
         @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
         public long sizeBytes;
         /** {@hide} */
@@ -2204,6 +2219,7 @@
 
             mode = source.readInt();
             installReason = source.readInt();
+            installScenario = source.readInt();
             sizeBytes = source.readLong();
             appPackageName = source.readString();
             appIcon = source.readParcelable(null);
@@ -2734,6 +2750,7 @@
 
             dest.writeInt(mode);
             dest.writeInt(installReason);
+            dest.writeInt(installScenario);
             dest.writeLong(sizeBytes);
             dest.writeString(appPackageName);
             dest.writeParcelable(appIcon, flags);
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 74463fd..ae1067d 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -1038,6 +1038,60 @@
     public static final int INSTALL_REASON_ROLLBACK = 5;
 
     /** @hide */
+    @IntDef(prefix = { "INSTALL_SCENARIO_" }, value = {
+            INSTALL_SCENARIO_DEFAULT,
+            INSTALL_SCENARIO_FAST,
+            INSTALL_SCENARIO_BULK,
+            INSTALL_SCENARIO_BULK_SECONDARY,
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface InstallScenario {}
+
+    /**
+     * A value to indicate the lack of CUJ information, disabling all installation scenario logic.
+     *
+     * @hide
+     */
+    public static final int INSTALL_SCENARIO_DEFAULT = 0;
+
+    /**
+     * Installation scenario providing the fastest “install button to launch" experience possible.
+     *
+     * @hide
+     */
+    public static final int INSTALL_SCENARIO_FAST = 1;
+
+    /**
+     * Installation scenario indicating a bulk operation with the desired result of a fully
+     * optimized application.  If the system is busy or resources are scarce the system will
+     * perform less work to avoid impacting system health.
+     *
+     * Examples of bulk installation scenarios might include device restore, background updates of
+     * multiple applications, or user-triggered updates for all applications.
+     *
+     * The decision to use BULK or BULK_SECONDARY should be based on the desired user experience.
+     * BULK_SECONDARY operations may take less time to complete but, when they do, will produce
+     * less optimized applications.  The device state (e.g. memory usage or battery status) should
+     * not be considered when making this decision as those factors are taken into account by the
+     * Package Manager when acting on the installation scenario.
+     *
+     * @hide
+     */
+    public static final int INSTALL_SCENARIO_BULK = 2;
+
+    /**
+     * Installation scenario indicating a bulk operation that prioritizes minimal system health
+     * impact over application optimization.  The application may undergo additional optimization
+     * if the system is idle and system resources are abundant.  The more elements of a bulk
+     * operation that are marked BULK_SECONDARY, the faster the entire bulk operation will be.
+     *
+     * See the comments for INSTALL_SCENARIO_BULK for more information.
+     *
+     * @hide
+     */
+    public static final int INSTALL_SCENARIO_BULK_SECONDARY = 3;
+
+    /** @hide */
     @IntDef(prefix = { "UNINSTALL_REASON_" }, value = {
             UNINSTALL_REASON_UNKNOWN,
             UNINSTALL_REASON_USER_TYPE,
@@ -2500,6 +2554,15 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device is capable of communicating with
+     * other devices via ultra wideband.
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_UWB = "android.hardware.uwb";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
      * {@link #hasSystemFeature}: The device supports connecting to USB devices
      * as the USB host.
      */
diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java
index aca5b45..08b23b0 100644
--- a/core/java/android/content/pm/UserInfo.java
+++ b/core/java/android/content/pm/UserInfo.java
@@ -221,6 +221,14 @@
     public boolean preCreated;
 
     /**
+     * When {@code true}, it indicates this user was created by converting a {@link #preCreated}
+     * user.
+     *
+     * <p><b>NOTE: </b>only used for debugging purposes, it's not set when marshalled to a parcel.
+     */
+    public boolean convertedFromPreCreated;
+
+    /**
      * Creates a UserInfo whose user type is determined automatically by the flags according to
      * {@link #getDefaultUserType}; can only be used for user types handled there.
      */
@@ -413,6 +421,7 @@
         lastLoggedInFingerprint = orig.lastLoggedInFingerprint;
         partial = orig.partial;
         preCreated = orig.preCreated;
+        convertedFromPreCreated = orig.convertedFromPreCreated;
         profileGroupId = orig.profileGroupId;
         restrictedProfileParentId = orig.restrictedProfileParentId;
         guestToRemove = orig.guestToRemove;
@@ -440,6 +449,7 @@
                 + ", type=" + userType
                 + ", flags=" + flagsToString(flags)
                 + (preCreated ? " (pre-created)" : "")
+                + (convertedFromPreCreated ? " (converted)" : "")
                 + (partial ? " (partial)" : "")
                 + "]";
     }
diff --git a/core/java/android/content/pm/dex/OWNERS b/core/java/android/content/pm/dex/OWNERS
new file mode 100644
index 0000000..267e5d58
--- /dev/null
+++ b/core/java/android/content/pm/dex/OWNERS
@@ -0,0 +1,7 @@
+# Bug component: 86431
+
+toddke@android.com
+toddke@google.com
+patb@google.com
+calin@google.com
+ngeoffray@google.com
diff --git a/core/java/android/content/pm/permission/OWNERS b/core/java/android/content/pm/permission/OWNERS
new file mode 100644
index 0000000..cde7b2a
--- /dev/null
+++ b/core/java/android/content/pm/permission/OWNERS
@@ -0,0 +1,11 @@
+# Bug component: 137825
+
+toddke@android.com
+toddke@google.com
+patb@google.com
+moltmann@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
+zhanghai@google.com
+evanseverson@google.com
+ntmyren@google.com
diff --git a/core/java/android/content/pm/split/OWNERS b/core/java/android/content/pm/split/OWNERS
new file mode 100644
index 0000000..3d126d2
--- /dev/null
+++ b/core/java/android/content/pm/split/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 36137
+
+toddke@android.com
+toddke@google.com
+patb@google.com
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index ccb8c44..3d6ac72 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -45,7 +45,6 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.TestApi;
-import android.app.UiModeManager;
 import android.app.WindowConfiguration;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.content.LocaleProto;
@@ -928,7 +927,13 @@
         fontScale = o.fontScale;
         mcc = o.mcc;
         mnc = o.mnc;
-        locale = o.locale == null ? null : (Locale) o.locale.clone();
+        if (o.locale == null) {
+            locale = null;
+        } else if (!o.locale.equals(locale)) {
+            // Only clone a new Locale instance if we need to:  the clone() is
+            // both CPU and GC intensive.
+            locale = (Locale) o.locale.clone();
+        }
         o.fixUpLocaleList();
         mLocaleList = o.mLocaleList;
         userSetLocale = o.userSetLocale;
@@ -1624,7 +1629,10 @@
         if ((mask & ActivityInfo.CONFIG_LOCALE) != 0) {
             mLocaleList = delta.mLocaleList;
             if (!mLocaleList.isEmpty()) {
-                locale = (Locale) delta.locale.clone();
+                if (!delta.locale.equals(locale)) {
+                    // Don't churn a new Locale clone unless we're actually changing it
+                    locale = (Locale) delta.locale.clone();
+                }
             }
         }
         if ((mask & ActivityInfo.CONFIG_LAYOUT_DIRECTION) != 0) {
diff --git a/core/java/android/content/res/OWNERS b/core/java/android/content/res/OWNERS
new file mode 100644
index 0000000..bc2355c
--- /dev/null
+++ b/core/java/android/content/res/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 568761
+
+toddke@android.com
+toddke@google.com
+patb@google.com
+rtmitchell@google.com
diff --git a/core/java/android/content/rollback/OWNERS b/core/java/android/content/rollback/OWNERS
new file mode 100644
index 0000000..3093fd6
--- /dev/null
+++ b/core/java/android/content/rollback/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 557916
+
+narayan@google.com
+nandana@google.com
+olilan@google.com
diff --git a/core/java/android/database/sqlite/SQLiteQueryBuilder.java b/core/java/android/database/sqlite/SQLiteQueryBuilder.java
index 669d046..e9c59f5 100644
--- a/core/java/android/database/sqlite/SQLiteQueryBuilder.java
+++ b/core/java/android/database/sqlite/SQLiteQueryBuilder.java
@@ -798,6 +798,7 @@
     }
 
     private void enforceStrictToken(@NonNull String token) {
+        if (TextUtils.isEmpty(token)) return;
         if (isTableOrColumn(token)) return;
         if (SQLiteTokenizer.isFunction(token)) return;
         if (SQLiteTokenizer.isType(token)) return;
diff --git a/core/java/android/gesture/OWNERS b/core/java/android/gesture/OWNERS
new file mode 100644
index 0000000..b3b8775
--- /dev/null
+++ b/core/java/android/gesture/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 25700
+
+romainguy@google.com
+alanv@google.com
+adamp@google.com
+aurimas@google.com
+nduca@google.com
+sumir@google.com
diff --git a/core/java/android/hardware/OWNERS b/core/java/android/hardware/OWNERS
index 47dbf2d..3295042 100644
--- a/core/java/android/hardware/OWNERS
+++ b/core/java/android/hardware/OWNERS
@@ -1,2 +1,5 @@
 # Camera
 per-file *Camera*=cychen@google.com,epeev@google.com,etalvala@google.com,shuzhenwang@google.com,yinchiayeh@google.com,zhijunhe@google.com,jchowdhary@google.com
+
+# Sensor Privacy
+per-file *SensorPrivacy* = file:platform/frameworks/native:/libs/sensorprivacy/OWNERS
diff --git a/core/java/android/hardware/biometrics/OWNERS b/core/java/android/hardware/biometrics/OWNERS
new file mode 100644
index 0000000..33527f8
--- /dev/null
+++ b/core/java/android/hardware/biometrics/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 879035
+
+jaggies@google.com
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index bc88cc2..2b633b5 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -2176,10 +2176,8 @@
 
     /**
      * <p>The desired zoom ratio</p>
-     * <p>Instead of using {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} with dual purposes of crop and zoom, the
-     * application can now choose to use this tag to specify the desired zoom level. The
-     * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} can still be used to specify the horizontal or vertical
-     * crop to achieve aspect ratios different than the native camera sensor.</p>
+     * <p>Instead of using {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} for zoom, the application can now choose to
+     * use this tag to specify the desired zoom level.</p>
      * <p>By using this control, the application gains a simpler way to control zoom, which can
      * be a combination of optical and digital zoom. For example, a multi-camera system may
      * contain more than one lens with different focal lengths, and the user can use optical
@@ -2861,11 +2859,18 @@
      * respectively.</p>
      * <p>The camera device may adjust the crop region to account for rounding and other hardware
      * requirements; the final crop region used will be included in the output capture result.</p>
+     * <p>The camera sensor output aspect ratio depends on factors such as output stream
+     * combination and {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}, and shouldn't be adjusted by using
+     * this control. And the camera device will treat different camera sensor output sizes
+     * (potentially with in-sensor crop) as the same crop of
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}. As a result, the application shouldn't assume the
+     * maximum crop region always maps to the same aspect ratio or field of view for the
+     * sensor output.</p>
      * <p>Starting from API level 30, it's strongly recommended to use {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}
      * to take advantage of better support for zoom with logical multi-camera. The benefits
      * include better precision with optical-digital zoom combination, and ability to do
      * zoom-out from 1.0x. When using {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for zoom, the crop region in
-     * the capture request must be either letterboxing or pillarboxing (but not both). The
+     * the capture request should be left as the default activeArray size. The
      * coordinate system is post-zoom, meaning that the activeArraySize or
      * preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.  See
      * {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for details.</p>
@@ -2875,6 +2880,7 @@
      * capability and mode</p>
      * <p>This key is available on all devices.</p>
      *
+     * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
      * @see CaptureRequest#CONTROL_ZOOM_RATIO
      * @see CaptureRequest#DISTORTION_CORRECTION_MODE
      * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index cc4d278..41f4df7 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -2406,10 +2406,8 @@
 
     /**
      * <p>The desired zoom ratio</p>
-     * <p>Instead of using {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} with dual purposes of crop and zoom, the
-     * application can now choose to use this tag to specify the desired zoom level. The
-     * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} can still be used to specify the horizontal or vertical
-     * crop to achieve aspect ratios different than the native camera sensor.</p>
+     * <p>Instead of using {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} for zoom, the application can now choose to
+     * use this tag to specify the desired zoom level.</p>
      * <p>By using this control, the application gains a simpler way to control zoom, which can
      * be a combination of optical and digital zoom. For example, a multi-camera system may
      * contain more than one lens with different focal lengths, and the user can use optical
@@ -3507,11 +3505,18 @@
      * respectively.</p>
      * <p>The camera device may adjust the crop region to account for rounding and other hardware
      * requirements; the final crop region used will be included in the output capture result.</p>
+     * <p>The camera sensor output aspect ratio depends on factors such as output stream
+     * combination and {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}, and shouldn't be adjusted by using
+     * this control. And the camera device will treat different camera sensor output sizes
+     * (potentially with in-sensor crop) as the same crop of
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}. As a result, the application shouldn't assume the
+     * maximum crop region always maps to the same aspect ratio or field of view for the
+     * sensor output.</p>
      * <p>Starting from API level 30, it's strongly recommended to use {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}
      * to take advantage of better support for zoom with logical multi-camera. The benefits
      * include better precision with optical-digital zoom combination, and ability to do
      * zoom-out from 1.0x. When using {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for zoom, the crop region in
-     * the capture request must be either letterboxing or pillarboxing (but not both). The
+     * the capture request should be left as the default activeArray size. The
      * coordinate system is post-zoom, meaning that the activeArraySize or
      * preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.  See
      * {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for details.</p>
@@ -3521,6 +3526,7 @@
      * capability and mode</p>
      * <p>This key is available on all devices.</p>
      *
+     * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
      * @see CaptureRequest#CONTROL_ZOOM_RATIO
      * @see CaptureRequest#DISTORTION_CORRECTION_MODE
      * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
index 920d34f..a00ff8e 100644
--- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
+++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
@@ -1693,35 +1693,24 @@
     private static native long nativeAllocateCopy(long ptr)
             throws NullPointerException;
 
-    @FastNative
     private static synchronized native void nativeWriteToParcel(Parcel dest, long ptr);
-    @FastNative
     private static synchronized native void nativeReadFromParcel(Parcel source, long ptr);
-    @FastNative
     private static synchronized native void nativeSwap(long ptr, long otherPtr)
             throws NullPointerException;
-    @FastNative
     private static synchronized native void nativeClose(long ptr);
-    @FastNative
     private static synchronized native boolean nativeIsEmpty(long ptr);
-    @FastNative
     private static synchronized native int nativeGetEntryCount(long ptr);
 
     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    @FastNative
     private static synchronized native byte[] nativeReadValues(int tag, long ptr);
-    @FastNative
     private static synchronized native void nativeWriteValues(int tag, byte[] src, long ptr);
     private static synchronized native void nativeDump(long ptr) throws IOException; // dump to LOGD
 
-    @FastNative
     private static synchronized native ArrayList nativeGetAllVendorKeys(long ptr, Class keyClass);
     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    @FastNative
     private static synchronized native int nativeGetTagFromKeyLocal(long ptr, String keyName)
             throws IllegalArgumentException;
     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    @FastNative
     private static synchronized native int nativeGetTypeFromTagLocal(long ptr, int tag)
             throws IllegalArgumentException;
     @FastNative
diff --git a/core/java/android/hardware/display/OWNERS b/core/java/android/hardware/display/OWNERS
index 9ca3910..5bcd9bb8 100644
--- a/core/java/android/hardware/display/OWNERS
+++ b/core/java/android/hardware/display/OWNERS
@@ -1,2 +1,6 @@
+# Bug component: 345010
+
+include /services/core/java/com/android/server/display/OWNERS
+
 michaelwr@google.com
 santoscordon@google.com
diff --git a/core/java/android/hardware/face/OWNERS b/core/java/android/hardware/face/OWNERS
new file mode 100644
index 0000000..33527f8
--- /dev/null
+++ b/core/java/android/hardware/face/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 879035
+
+jaggies@google.com
diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java
index 1ea6f28..fad80cb 100644
--- a/core/java/android/hardware/fingerprint/FingerprintManager.java
+++ b/core/java/android/hardware/fingerprint/FingerprintManager.java
@@ -19,6 +19,7 @@
 import static android.Manifest.permission.INTERACT_ACROSS_USERS;
 import static android.Manifest.permission.MANAGE_FINGERPRINT;
 import static android.Manifest.permission.USE_BIOMETRIC;
+import static android.Manifest.permission.USE_BIOMETRIC_INTERNAL;
 import static android.Manifest.permission.USE_FINGERPRINT;
 
 import android.annotation.NonNull;
@@ -76,11 +77,13 @@
     private static final int MSG_ERROR = 104;
     private static final int MSG_REMOVED = 105;
     private static final int MSG_ENUMERATED = 106;
+    private static final int MSG_FINGERPRINT_DETECTED = 107;
 
     private IFingerprintService mService;
     private Context mContext;
     private IBinder mToken = new Binder();
     private AuthenticationCallback mAuthenticationCallback;
+    private FingerprintDetectionCallback mFingerprintDetectionCallback;
     private EnrollmentCallback mEnrollmentCallback;
     private RemovalCallback mRemovalCallback;
     private EnumerateCallback mEnumerateCallback;
@@ -108,6 +111,13 @@
         }
     }
 
+    private class OnFingerprintDetectionCancelListener implements OnCancelListener {
+        @Override
+        public void onCancel() {
+            cancelFingerprintDetect();
+        }
+    }
+
     /**
      * A wrapper class for the crypto objects supported by FingerprintManager. Currently the
      * framework supports {@link Signature}, {@link Cipher} and {@link Mac} objects.
@@ -273,6 +283,18 @@
     };
 
     /**
+     * Callback structure provided for {@link #detectFingerprint(CancellationSignal,
+     * FingerprintDetectionCallback, int)}.
+     * @hide
+     */
+    public interface FingerprintDetectionCallback {
+        /**
+         * Invoked when a fingerprint has been detected.
+         */
+        void onFingerprintDetected(int userId, boolean isStrongBiometric);
+    }
+
+    /**
      * Callback structure provided to {@link FingerprintManager#enroll(byte[], CancellationSignal,
      * int, int, EnrollmentCallback)} must provide an implementation of this for listening to
      * fingerprint events.
@@ -455,6 +477,35 @@
     }
 
     /**
+     * Uses the fingerprint hardware to detect for the presence of a finger, without giving details
+     * about accept/reject/lockout.
+     * @hide
+     */
+    @RequiresPermission(USE_BIOMETRIC_INTERNAL)
+    public void detectFingerprint(@NonNull CancellationSignal cancel,
+            @NonNull FingerprintDetectionCallback callback, int userId) {
+        if (mService == null) {
+            return;
+        }
+
+        if (cancel.isCanceled()) {
+            Slog.w(TAG, "Detection already cancelled");
+            return;
+        } else {
+            cancel.setOnCancelListener(new OnFingerprintDetectionCancelListener());
+        }
+
+        mFingerprintDetectionCallback = callback;
+
+        try {
+            mService.detectFingerprint(mToken, userId, mServiceReceiver,
+                    mContext.getOpPackageName());
+        } catch (RemoteException e) {
+            Slog.w(TAG, "Remote exception when requesting finger detect", e);
+        }
+    }
+
+    /**
      * Request fingerprint enrollment. This call warms up the fingerprint hardware
      * and starts scanning for fingerprints. Progress will be indicated by callbacks to the
      * {@link EnrollmentCallback} object. It terminates when
@@ -798,6 +849,10 @@
                     sendEnumeratedResult((Long) msg.obj /* deviceId */, msg.arg1 /* fingerId */,
                             msg.arg2 /* groupId */);
                     break;
+                case MSG_FINGERPRINT_DETECTED:
+                    sendFingerprintDetected(msg.arg1 /* userId */,
+                            (boolean) msg.obj /* isStrongBiometric */);
+                    break;
             }
         }
     };
@@ -892,6 +947,14 @@
         }
     }
 
+    private void sendFingerprintDetected(int userId, boolean isStrongBiometric) {
+        if (mFingerprintDetectionCallback == null) {
+            Slog.e(TAG, "sendFingerprintDetected, callback null");
+            return;
+        }
+        mFingerprintDetectionCallback.onFingerprintDetected(userId, isStrongBiometric);
+    }
+
     /**
      * @hide
      */
@@ -928,6 +991,18 @@
         }
     }
 
+    private void cancelFingerprintDetect() {
+        if (mService == null) {
+            return;
+        }
+
+        try {
+            mService.cancelFingerprintDetect(mToken, mContext.getOpPackageName());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
     /**
      * @hide
      */
@@ -1033,6 +1108,12 @@
                     fp).sendToTarget();
         }
 
+        @Override
+        public void onFingerprintDetected(long deviceId, int userId, boolean isStrongBiometric) {
+            mHandler.obtainMessage(MSG_FINGERPRINT_DETECTED, userId, 0, isStrongBiometric)
+                    .sendToTarget();
+        }
+
         @Override // binder call
         public void onAuthenticationFailed(long deviceId) {
             mHandler.obtainMessage(MSG_AUTHENTICATION_FAILED).sendToTarget();
diff --git a/core/java/android/hardware/fingerprint/IFingerprintService.aidl b/core/java/android/hardware/fingerprint/IFingerprintService.aidl
index c5c3755..8aa36d7 100644
--- a/core/java/android/hardware/fingerprint/IFingerprintService.aidl
+++ b/core/java/android/hardware/fingerprint/IFingerprintService.aidl
@@ -33,6 +33,11 @@
     void authenticate(IBinder token, long sessionId, int userId,
             IFingerprintServiceReceiver receiver, int flags, String opPackageName);
 
+    // Uses the fingerprint hardware to detect for the presence of a finger, without giving details
+    // about accept/reject/lockout.
+    void detectFingerprint(IBinder token, int userId, IFingerprintServiceReceiver receiver,
+            String opPackageName);
+
     // This method prepares the service to start authenticating, but doesn't start authentication.
     // This is protected by the MANAGE_BIOMETRIC signatuer permission. This method should only be
     // called from BiometricService. The additional uid, pid, userId arguments should be determined
@@ -48,6 +53,9 @@
     // Cancel authentication for the given sessionId
     void cancelAuthentication(IBinder token, String opPackageName);
 
+    // Cancel finger detection
+    void cancelFingerprintDetect(IBinder token, String opPackageName);
+
     // Same as above, except this is protected by the MANAGE_BIOMETRIC signature permission. Takes
     // an additional uid, pid, userid.
     void cancelAuthenticationFromService(IBinder token, String opPackageName,
diff --git a/core/java/android/hardware/fingerprint/IFingerprintServiceReceiver.aidl b/core/java/android/hardware/fingerprint/IFingerprintServiceReceiver.aidl
index 4412cee..a84b81e1 100644
--- a/core/java/android/hardware/fingerprint/IFingerprintServiceReceiver.aidl
+++ b/core/java/android/hardware/fingerprint/IFingerprintServiceReceiver.aidl
@@ -26,6 +26,7 @@
     void onAcquired(long deviceId, int acquiredInfo, int vendorCode);
     void onAuthenticationSucceeded(long deviceId, in Fingerprint fp, int userId,
             boolean isStrongBiometric);
+    void onFingerprintDetected(long deviceId, int userId, boolean isStrongBiometric);
     void onAuthenticationFailed(long deviceId);
     void onError(long deviceId, int error, int vendorCode);
     void onRemoved(long deviceId, int fingerId, int groupId, int remaining);
diff --git a/core/java/android/hardware/fingerprint/OWNERS b/core/java/android/hardware/fingerprint/OWNERS
new file mode 100644
index 0000000..dcead40
--- /dev/null
+++ b/core/java/android/hardware/fingerprint/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 114777
+
+jaggies@google.com
diff --git a/core/java/android/hardware/hdmi/HdmiDeviceInfo.java b/core/java/android/hardware/hdmi/HdmiDeviceInfo.java
index 55b0726..6b2bab4 100644
--- a/core/java/android/hardware/hdmi/HdmiDeviceInfo.java
+++ b/core/java/android/hardware/hdmi/HdmiDeviceInfo.java
@@ -513,4 +513,19 @@
                 && mDeviceId == other.mDeviceId
                 && mAdopterId == other.mAdopterId;
     }
+
+    @Override
+    public int hashCode() {
+        return java.util.Objects.hash(
+                mHdmiDeviceType,
+                mPhysicalAddress,
+                mPortId,
+                mLogicalAddress,
+                mDeviceType,
+                mVendorId,
+                mDevicePowerStatus,
+                mDisplayName,
+                mDeviceId,
+                mAdopterId);
+    }
 }
diff --git a/core/java/android/hardware/hdmi/HdmiPortInfo.java b/core/java/android/hardware/hdmi/HdmiPortInfo.java
index e97e120..47db4f3 100644
--- a/core/java/android/hardware/hdmi/HdmiPortInfo.java
+++ b/core/java/android/hardware/hdmi/HdmiPortInfo.java
@@ -192,6 +192,7 @@
 
     @Override
     public int hashCode() {
-        return mId;
+        return java.util.Objects.hash(
+                mId, mType, mAddress, mCecSupported, mArcSupported, mMhlSupported);
     }
 }
diff --git a/core/java/android/hardware/hdmi/OWNERS b/core/java/android/hardware/hdmi/OWNERS
new file mode 100644
index 0000000..16c15e3
--- /dev/null
+++ b/core/java/android/hardware/hdmi/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 826094
+
+include /services/core/java/com/android/server/display/OWNERS
+
+marvinramin@google.com
+nchalko@google.com
diff --git a/core/java/android/hardware/input/OWNERS b/core/java/android/hardware/input/OWNERS
index 0313a40..25e02e1 100644
--- a/core/java/android/hardware/input/OWNERS
+++ b/core/java/android/hardware/input/OWNERS
@@ -1,2 +1,6 @@
+# Bug component: 136048
+
+include /services/core/java/com/android/server/input/OWNERS
+
 michaelwr@google.com
 svv@google.com
diff --git a/core/java/android/hardware/iris/OWNERS b/core/java/android/hardware/iris/OWNERS
new file mode 100644
index 0000000..33527f8
--- /dev/null
+++ b/core/java/android/hardware/iris/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 879035
+
+jaggies@google.com
diff --git a/core/java/android/hardware/lights/OWNERS b/core/java/android/hardware/lights/OWNERS
new file mode 100644
index 0000000..cb46a80
--- /dev/null
+++ b/core/java/android/hardware/lights/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/lights/OWNERS
diff --git a/core/java/android/hardware/location/OWNERS b/core/java/android/hardware/location/OWNERS
new file mode 100644
index 0000000..383321b
--- /dev/null
+++ b/core/java/android/hardware/location/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 880425
+
+mstogaitis@google.com
+wyattriley@google.com
+etn@google.com
+weiwa@google.com
diff --git a/core/java/android/hardware/soundtrigger/OWNERS b/core/java/android/hardware/soundtrigger/OWNERS
new file mode 100644
index 0000000..816bc6b
--- /dev/null
+++ b/core/java/android/hardware/soundtrigger/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/media/soundtrigger/OWNERS
diff --git a/core/java/android/hardware/usb/OWNERS b/core/java/android/hardware/usb/OWNERS
index 8ee72b5..8f2b39d 100644
--- a/core/java/android/hardware/usb/OWNERS
+++ b/core/java/android/hardware/usb/OWNERS
@@ -1,6 +1,4 @@
-badhri@google.com
-elaurent@google.com
+# Bug component: 175220
+
 moltmann@google.com
-albertccwang@google.com
-jameswei@google.com
-howardyen@google.com
\ No newline at end of file
+badhri@google.com
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 6c6bd00..0924e9f 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -1208,15 +1208,19 @@
         mWindow.getWindow().getAttributes().setFitInsetsIgnoringVisibility(true);
 
         // IME layout should always be inset by navigation bar, no matter its current visibility,
-        // unless automotive requests it, since automotive may hide the navigation bar.
+        // unless automotive requests it. Automotive devices may request the navigation bar to be
+        // hidden when the IME shows up (controlled via config_automotiveHideNavBarForKeyboard)
+        // in order to maximize the visible screen real estate. When this happens, the IME window
+        // should animate from the bottom of the screen to reduce the jank that happens from the
+        // lack of synchronization between the bottom system window and the IME window.
+        if (mIsAutomotive && mAutomotiveHideNavBarForKeyboard) {
+            mWindow.getWindow().setDecorFitsSystemWindows(false);
+        }
         mWindow.getWindow().getDecorView().setOnApplyWindowInsetsListener(
                 (v, insets) -> v.onApplyWindowInsets(
                         new WindowInsets.Builder(insets).setInsets(
                                 navigationBars(),
-                                mIsAutomotive && mAutomotiveHideNavBarForKeyboard
-                                        ? android.graphics.Insets.NONE
-                                        : insets.getInsetsIgnoringVisibility(navigationBars())
-                                )
+                                insets.getInsetsIgnoringVisibility(navigationBars()))
                                 .build()));
 
         // For ColorView in DecorView to work, FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS needs to be set
diff --git a/core/java/android/inputmethodservice/OWNERS b/core/java/android/inputmethodservice/OWNERS
index 4447197..e6a04da 100644
--- a/core/java/android/inputmethodservice/OWNERS
+++ b/core/java/android/inputmethodservice/OWNERS
@@ -1,3 +1,4 @@
+# Bug component: 34867
 set noparent
 
-include ../../../../services/core/java/com/android/server/inputmethod/OWNERS
+include /services/core/java/com/android/server/inputmethod/OWNERS
diff --git a/core/java/android/metrics/OWNERS b/core/java/android/metrics/OWNERS
new file mode 100644
index 0000000..ba867e0
--- /dev/null
+++ b/core/java/android/metrics/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 26805
+
+cwren@android.com
+cwren@google.com
diff --git a/core/java/android/net/CaptivePortal.java b/core/java/android/net/CaptivePortal.java
index c2586fa..269bbf2 100644
--- a/core/java/android/net/CaptivePortal.java
+++ b/core/java/android/net/CaptivePortal.java
@@ -15,7 +15,6 @@
  */
 package android.net;
 
-import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.RequiresPermission;
 import android.annotation.SystemApi;
@@ -24,8 +23,6 @@
 import android.os.Parcelable;
 import android.os.RemoteException;
 
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-
 /**
  * A class allowing apps handling the {@link ConnectivityManager#ACTION_CAPTIVE_PORTAL_SIGN_IN}
  * activity to indicate to the system different outcomes of captive portal sign in.  This class is
@@ -75,17 +72,6 @@
     private final IBinder mBinder;
 
     /** @hide */
-    @IntDef(value = {
-        MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_ACTIVITY,
-        MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_DISMISSED,
-        MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_UNWANTED,
-        MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_WANTED_AS_IS,
-        MetricsEvent.CAPTIVE_PORTAL_LOGIN_ACTIVITY_SSL_ERROR,
-    })
-    public @interface EventId {
-    }
-
-    /** @hide */
     public CaptivePortal(@NonNull IBinder binder) {
         mBinder = binder;
     }
@@ -176,7 +162,7 @@
      * @hide
      */
     @SystemApi
-    public void logEvent(@EventId int eventId, @NonNull String packageName) {
+    public void logEvent(int eventId, @NonNull String packageName) {
         try {
             ICaptivePortal.Stub.asInterface(mBinder).logEvent(eventId, packageName);
         } catch (RemoteException e) {
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index c28a901..cf5d4e5 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -684,7 +684,7 @@
      * {@hide}
      */
     @Deprecated
-    @UnsupportedAppUsage
+    @SystemApi
     public static final int TYPE_PROXY = 16;
 
     /**
diff --git a/core/java/android/net/ConnectivityMetricsEvent.java b/core/java/android/net/ConnectivityMetricsEvent.java
index 522add1..8b06ebe 100644
--- a/core/java/android/net/ConnectivityMetricsEvent.java
+++ b/core/java/android/net/ConnectivityMetricsEvent.java
@@ -19,7 +19,7 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 
-import com.android.internal.util.BitUtils;
+import java.util.BitSet;
 
 /**
  * Represents a core networking event defined in package android.net.metrics.
@@ -86,9 +86,7 @@
         if (ifname != null) {
             buffer.append(", ").append(ifname);
         }
-        for (int t : BitUtils.unpackBits(transports)) {
-            buffer.append(", ").append(NetworkCapabilities.transportNameOf(t));
-        }
+        buffer.append(", transports=").append(BitSet.valueOf(new long[] { transports }));
         buffer.append("): ").append(data.toString());
         return buffer.toString();
     }
diff --git a/core/java/android/net/Ikev2VpnProfile.java b/core/java/android/net/Ikev2VpnProfile.java
index c8ca618e..63fc5f2 100644
--- a/core/java/android/net/Ikev2VpnProfile.java
+++ b/core/java/android/net/Ikev2VpnProfile.java
@@ -16,12 +16,9 @@
 
 package android.net;
 
-import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_PSK;
-import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_RSA;
-import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_USER_PASS;
-
 import static com.android.internal.annotations.VisibleForTesting.Visibility;
 import static com.android.internal.util.Preconditions.checkStringNotEmpty;
+import static com.android.net.module.util.NetworkStackConstants.IPV6_MIN_MTU;
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -158,9 +155,8 @@
         // IPv6 MTU is greater; since profiles may be started by the system on IPv4 and IPv6
         // networks, the VPN must provide a link fulfilling the stricter of the two conditions
         // (at least that of the IPv6 MTU).
-        if (mMaxMtu < LinkProperties.MIN_MTU_V6) {
-            throw new IllegalArgumentException(
-                    "Max MTU must be at least" + LinkProperties.MIN_MTU_V6);
+        if (mMaxMtu < IPV6_MIN_MTU) {
+            throw new IllegalArgumentException("Max MTU must be at least" + IPV6_MIN_MTU);
         }
 
         switch (mType) {
@@ -811,9 +807,8 @@
             // IPv6 MTU is greater; since profiles may be started by the system on IPv4 and IPv6
             // networks, the VPN must provide a link fulfilling the stricter of the two conditions
             // (at least that of the IPv6 MTU).
-            if (mtu < LinkProperties.MIN_MTU_V6) {
-                throw new IllegalArgumentException(
-                        "Max MTU must be at least " + LinkProperties.MIN_MTU_V6);
+            if (mtu < IPV6_MIN_MTU) {
+                throw new IllegalArgumentException("Max MTU must be at least " + IPV6_MIN_MTU);
             }
             mMaxMtu = mtu;
             return this;
diff --git a/core/java/android/net/IpSecTransform.java b/core/java/android/net/IpSecTransform.java
index 44a0a4f..aa7811a 100644
--- a/core/java/android/net/IpSecTransform.java
+++ b/core/java/android/net/IpSecTransform.java
@@ -17,8 +17,6 @@
 
 import static android.net.IpSecManager.INVALID_RESOURCE_ID;
 
-import static com.android.internal.util.Preconditions.checkNotNull;
-
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.RequiresFeature;
@@ -27,7 +25,6 @@
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.os.Binder;
-import android.os.Handler;
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.ServiceManager;
@@ -181,7 +178,6 @@
         try {
             IIpSecService svc = getIpSecService();
             svc.deleteTransform(mResourceId);
-            stopNattKeepalive();
         } catch (RemoteException e) {
             throw e.rethrowAsRuntimeException();
         } catch (Exception e) {
@@ -212,36 +208,6 @@
     private int mResourceId;
     private final Context mContext;
     private final CloseGuard mCloseGuard = CloseGuard.get();
-    private ConnectivityManager.PacketKeepalive mKeepalive;
-    private Handler mCallbackHandler;
-    private final ConnectivityManager.PacketKeepaliveCallback mKeepaliveCallback =
-            new ConnectivityManager.PacketKeepaliveCallback() {
-
-                @Override
-                public void onStarted() {
-                    synchronized (this) {
-                        mCallbackHandler.post(() -> mUserKeepaliveCallback.onStarted());
-                    }
-                }
-
-                @Override
-                public void onStopped() {
-                    synchronized (this) {
-                        mKeepalive = null;
-                        mCallbackHandler.post(() -> mUserKeepaliveCallback.onStopped());
-                    }
-                }
-
-                @Override
-                public void onError(int error) {
-                    synchronized (this) {
-                        mKeepalive = null;
-                        mCallbackHandler.post(() -> mUserKeepaliveCallback.onError(error));
-                    }
-                }
-            };
-
-    private NattKeepaliveCallback mUserKeepaliveCallback;
 
     /** @hide */
     @VisibleForTesting
@@ -273,76 +239,6 @@
         public void onError(int error) {}
     }
 
-    /**
-     * Start a NAT-T keepalive session for the current transform.
-     *
-     * For a transform that is using UDP encapsulated IPv4, NAT-T offloading provides
-     * a power efficient mechanism of sending NAT-T packets at a specified interval.
-     *
-     * @param userCallback a {@link #NattKeepaliveCallback} to receive asynchronous status
-     *      information about the requested NAT-T keepalive session.
-     * @param intervalSeconds the interval between NAT-T keepalives being sent. The
-     *      the allowed range is between 20 and 3600 seconds.
-     * @param handler a handler on which to post callbacks when received.
-     *
-     * @hide
-     */
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.MANAGE_IPSEC_TUNNELS,
-            android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD
-    })
-    public void startNattKeepalive(@NonNull NattKeepaliveCallback userCallback,
-            int intervalSeconds, @NonNull Handler handler) throws IOException {
-        checkNotNull(userCallback);
-        if (intervalSeconds < 20 || intervalSeconds > 3600) {
-            throw new IllegalArgumentException("Invalid NAT-T keepalive interval");
-        }
-        checkNotNull(handler);
-        if (mResourceId == INVALID_RESOURCE_ID) {
-            throw new IllegalStateException(
-                    "Packet keepalive cannot be started for an inactive transform");
-        }
-
-        synchronized (mKeepaliveCallback) {
-            if (mKeepaliveCallback != null) {
-                throw new IllegalStateException("Keepalive already active");
-            }
-
-            mUserKeepaliveCallback = userCallback;
-            ConnectivityManager cm = (ConnectivityManager) mContext.getSystemService(
-                    Context.CONNECTIVITY_SERVICE);
-            mKeepalive = cm.startNattKeepalive(
-                    mConfig.getNetwork(), intervalSeconds, mKeepaliveCallback,
-                    NetworkUtils.numericToInetAddress(mConfig.getSourceAddress()),
-                    4500, // FIXME urgently, we need to get the port number from the Encap socket
-                    NetworkUtils.numericToInetAddress(mConfig.getDestinationAddress()));
-            mCallbackHandler = handler;
-        }
-    }
-
-    /**
-     * Stop an ongoing NAT-T keepalive session.
-     *
-     * Calling this API will request that an ongoing NAT-T keepalive session be terminated.
-     * If this API is not called when a Transform is closed, the underlying NAT-T session will
-     * be terminated automatically.
-     *
-     * @hide
-     */
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.MANAGE_IPSEC_TUNNELS,
-            android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD
-    })
-    public void stopNattKeepalive() {
-        synchronized (mKeepaliveCallback) {
-            if (mKeepalive == null) {
-                Log.e(TAG, "No active keepalive to stop");
-                return;
-            }
-            mKeepalive.stop();
-        }
-    }
-
     /** This class is used to build {@link IpSecTransform} objects. */
     public static class Builder {
         private Context mContext;
diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java
index 06046f7..0941e7d 100644
--- a/core/java/android/net/LinkProperties.java
+++ b/core/java/android/net/LinkProperties.java
@@ -81,8 +81,7 @@
 
     private static final int MIN_MTU    = 68;
 
-    /** @hide */
-    public static final int MIN_MTU_V6 = 1280;
+    private static final int MIN_MTU_V6 = 1280;
 
     private static final int MAX_MTU    = 10000;
 
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 44ebff9..6780167 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -40,6 +40,7 @@
 import java.lang.annotation.RetentionPolicy;
 import java.time.Duration;
 import java.util.ArrayList;
+import java.util.List;
 import java.util.Objects;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -50,7 +51,7 @@
  * An agent manages the life cycle of a network. A network starts its
  * life cycle when {@link register} is called on NetworkAgent. The network
  * is then connecting. When full L3 connectivity has been established,
- * the agent shoud call {@link markConnected} to inform the system that
+ * the agent should call {@link markConnected} to inform the system that
  * this network is ready to use. When the network disconnects its life
  * ends and the agent should call {@link unregister}, at which point the
  * system will clean up and free resources.
@@ -93,12 +94,6 @@
     @Nullable
     private volatile Network mNetwork;
 
-    // Whether this NetworkAgent is using the legacy (never unhidden) API. The difference is
-    // that the legacy API uses NetworkInfo to convey the state, while the current API is
-    // exposing methods to manage it and generate it internally instead.
-    // TODO : remove this as soon as all agents have been converted.
-    private final boolean mIsLegacy;
-
     private final Handler mHandler;
     private volatile AsyncChannel mAsyncChannel;
     private final String LOG_TAG;
@@ -109,8 +104,6 @@
     private static final long BW_REFRESH_MIN_WIN_MS = 500;
     private boolean mBandwidthUpdateScheduled = false;
     private AtomicBoolean mBandwidthUpdatePending = new AtomicBoolean(false);
-    // Not used by legacy agents. Non-legacy agents use this to convert the NetworkAgent system API
-    // into the internal API of ConnectivityService.
     @NonNull
     private NetworkInfo mNetworkInfo;
     @NonNull
@@ -174,6 +167,14 @@
     public static final int EVENT_NETWORK_SCORE_CHANGED = BASE + 4;
 
     /**
+     * Sent by the NetworkAgent to ConnectivityService to pass the current
+     * list of underlying networks.
+     * obj = array of Network objects
+     * @hide
+     */
+    public static final int EVENT_UNDERLYING_NETWORKS_CHANGED = BASE + 5;
+
+    /**
      * Sent by ConnectivityService to the NetworkAgent to inform the agent of the
      * networks status - whether we could use the network or could not, due to
      * either a bad network configuration (no internet link) or captive portal.
@@ -217,7 +218,13 @@
      * The key for the redirect URL in the Bundle argument of {@code CMD_REPORT_NETWORK_STATUS}.
      * @hide
      */
-    public static String REDIRECT_URL_KEY = "redirect URL";
+    public static final String REDIRECT_URL_KEY = "redirect URL";
+
+    /**
+     * Bundle key for the underlying networks in {@code EVENT_UNDERLYING_NETWORKS_CHANGED}.
+     * @hide
+     */
+    public static final String UNDERLYING_NETWORKS_KEY = "underlyingNetworks";
 
      /**
      * Sent by the NetworkAgent to ConnectivityService to indicate this network was
@@ -322,35 +329,6 @@
      */
     public static final int CMD_REMOVE_KEEPALIVE_PACKET_FILTER = BASE + 17;
 
-    /** @hide TODO: remove and replace usage with the public constructor. */
-    public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni,
-            NetworkCapabilities nc, LinkProperties lp, int score) {
-        this(looper, context, logTag, ni, nc, lp, score, null, NetworkProvider.ID_NONE);
-        // Register done by the constructor called in the previous line
-    }
-
-    /** @hide TODO: remove and replace usage with the public constructor. */
-    public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni,
-            NetworkCapabilities nc, LinkProperties lp, int score, NetworkAgentConfig config) {
-        this(looper, context, logTag, ni, nc, lp, score, config, NetworkProvider.ID_NONE);
-        // Register done by the constructor called in the previous line
-    }
-
-    /** @hide TODO: remove and replace usage with the public constructor. */
-    public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni,
-            NetworkCapabilities nc, LinkProperties lp, int score, int providerId) {
-        this(looper, context, logTag, ni, nc, lp, score, null, providerId);
-        // Register done by the constructor called in the previous line
-    }
-
-    /** @hide TODO: remove and replace usage with the public constructor. */
-    public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni,
-            NetworkCapabilities nc, LinkProperties lp, int score, NetworkAgentConfig config,
-            int providerId) {
-        this(looper, context, logTag, nc, lp, score, config, providerId, ni, true /* legacy */);
-        register();
-    }
-
     private static NetworkInfo getLegacyNetworkInfo(final NetworkAgentConfig config) {
         // The subtype can be changed with (TODO) setLegacySubtype, but it starts
         // with 0 (TelephonyManager.NETWORK_TYPE_UNKNOWN) and an empty description.
@@ -378,7 +356,7 @@
             @NonNull NetworkAgentConfig config, @Nullable NetworkProvider provider) {
         this(looper, context, logTag, nc, lp, score, config,
                 provider == null ? NetworkProvider.ID_NONE : provider.getProviderId(),
-                getLegacyNetworkInfo(config), false /* legacy */);
+                getLegacyNetworkInfo(config));
     }
 
     private static class InitialConfiguration {
@@ -403,11 +381,9 @@
 
     private NetworkAgent(@NonNull Looper looper, @NonNull Context context, @NonNull String logTag,
             @NonNull NetworkCapabilities nc, @NonNull LinkProperties lp, int score,
-            @NonNull NetworkAgentConfig config, int providerId, @NonNull NetworkInfo ni,
-            boolean legacy) {
+            @NonNull NetworkAgentConfig config, int providerId, @NonNull NetworkInfo ni) {
         mHandler = new NetworkAgentHandler(looper);
         LOG_TAG = logTag;
-        mIsLegacy = legacy;
         mNetworkInfo = new NetworkInfo(ni);
         this.providerId = providerId;
         if (ni == null || nc == null || lp == null) {
@@ -650,15 +626,37 @@
     }
 
     /**
+     * Must be called by the agent when the network's underlying networks change.
+     *
+     * <p>{@code networks} is one of the following:
+     * <ul>
+     * <li><strong>a non-empty array</strong>: an array of one or more {@link Network}s, in
+     * decreasing preference order. For example, if this VPN uses both wifi and mobile (cellular)
+     * networks to carry app traffic, but prefers or uses wifi more than mobile, wifi should appear
+     * first in the array.</li>
+     * <li><strong>an empty array</strong>: a zero-element array, meaning that the VPN has no
+     * underlying network connection, and thus, app traffic will not be sent or received.</li>
+     * <li><strong>null</strong>: (default) signifies that the VPN uses whatever is the system's
+     * default network. I.e., it doesn't use the {@code bindSocket} or {@code bindDatagramSocket}
+     * APIs mentioned above to send traffic over specific channels.</li>
+     * </ul>
+     *
+     * @param underlyingNetworks the new list of underlying networks.
+     * @see {@link VpnService.Builder#setUnderlyingNetworks(Network[])}
+     */
+    public final void setUnderlyingNetworks(@Nullable List<Network> underlyingNetworks) {
+        final ArrayList<Network> underlyingArray = (underlyingNetworks != null)
+                ? new ArrayList<>(underlyingNetworks) : null;
+        final Bundle bundle = new Bundle();
+        bundle.putParcelableArrayList(UNDERLYING_NETWORKS_KEY, underlyingArray);
+        queueOrSendMessage(EVENT_UNDERLYING_NETWORKS_CHANGED, bundle);
+    }
+
+    /**
      * Inform ConnectivityService that this agent has now connected.
      * Call {@link #unregister} to disconnect.
      */
     public void markConnected() {
-        if (mIsLegacy) {
-            throw new UnsupportedOperationException(
-                    "Legacy agents can't call markConnected.");
-        }
-        // |reason| cannot be used by the non-legacy agents
         mNetworkInfo.setDetailedState(NetworkInfo.DetailedState.CONNECTED, null /* reason */,
                 mNetworkInfo.getExtraInfo());
         queueOrSendMessage(EVENT_NETWORK_INFO_CHANGED, mNetworkInfo);
@@ -671,9 +669,6 @@
      * the network is torn down and this agent can no longer be used.
      */
     public void unregister() {
-        if (mIsLegacy) {
-            throw new UnsupportedOperationException("Legacy agents can't call unregister.");
-        }
         // When unregistering an agent nobody should use the extrainfo (or reason) any more.
         mNetworkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null /* reason */,
                 null /* extraInfo */);
@@ -693,9 +688,6 @@
      */
     @Deprecated
     public void setLegacySubtype(final int legacySubtype, @NonNull final String legacySubtypeName) {
-        if (mIsLegacy) {
-            throw new UnsupportedOperationException("Legacy agents can't call setLegacySubtype.");
-        }
         mNetworkInfo.setSubtype(legacySubtype, legacySubtypeName);
         queueOrSendMessage(EVENT_NETWORK_INFO_CHANGED, mNetworkInfo);
     }
@@ -718,9 +710,6 @@
      */
     @Deprecated
     public void setLegacyExtraInfo(@Nullable final String extraInfo) {
-        if (mIsLegacy) {
-            throw new UnsupportedOperationException("Legacy agents can't call setLegacyExtraInfo.");
-        }
         mNetworkInfo.setExtraInfo(extraInfo);
         queueOrSendMessage(EVENT_NETWORK_INFO_CHANGED, mNetworkInfo);
     }
@@ -731,9 +720,6 @@
      */
     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
     public final void sendNetworkInfo(NetworkInfo networkInfo) {
-        if (!mIsLegacy) {
-            throw new UnsupportedOperationException("Only legacy agents can call sendNetworkInfo.");
-        }
         queueOrSendMessage(EVENT_NETWORK_INFO_CHANGED, new NetworkInfo(networkInfo));
     }
 
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index 40bb8bf..1a37fb9 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -712,6 +712,7 @@
         if (ArrayUtils.contains(originalAdministratorUids, creatorUid)) {
             setAdministratorUids(new int[] {creatorUid});
         }
+        // There is no need to clear the UIDs, they have already been cleared by clearAll() above.
     }
 
     /**
@@ -805,7 +806,9 @@
      */
     private static final int TEST_NETWORKS_ALLOWED_TRANSPORTS = 1 << TRANSPORT_TEST
             // Test ethernet networks can be created with EthernetManager#setIncludeTestInterfaces
-            | 1 << TRANSPORT_ETHERNET;
+            | 1 << TRANSPORT_ETHERNET
+            // Test VPN networks can be created but their UID ranges must be empty.
+            | 1 << TRANSPORT_VPN;
 
     /**
      * Adds the given transport type to this {@code NetworkCapability} instance.
@@ -972,6 +975,10 @@
         return mOwnerUid;
     }
 
+    private boolean equalsOwnerUid(@NonNull final NetworkCapabilities nc) {
+        return mOwnerUid == nc.mOwnerUid;
+    }
+
     /**
      * UIDs of packages that are administrators of this network, or empty if none.
      *
@@ -1681,6 +1688,7 @@
                 && equalsTransportInfo(that)
                 && equalsUids(that)
                 && equalsSSID(that)
+                && equalsOwnerUid(that)
                 && equalsPrivateDnsBroken(that)
                 && equalsRequestor(that)
                 && equalsAdministratorUids(that);
@@ -1694,17 +1702,18 @@
                 + ((int) (mUnwantedNetworkCapabilities >> 32) * 7)
                 + ((int) (mTransportTypes & 0xFFFFFFFF) * 11)
                 + ((int) (mTransportTypes >> 32) * 13)
-                + (mLinkUpBandwidthKbps * 17)
-                + (mLinkDownBandwidthKbps * 19)
+                + mLinkUpBandwidthKbps * 17
+                + mLinkDownBandwidthKbps * 19
                 + Objects.hashCode(mNetworkSpecifier) * 23
-                + (mSignalStrength * 29)
-                + Objects.hashCode(mUids) * 31
-                + Objects.hashCode(mSSID) * 37
-                + Objects.hashCode(mTransportInfo) * 41
-                + Objects.hashCode(mPrivateDnsBroken) * 43
-                + Objects.hashCode(mRequestorUid) * 47
-                + Objects.hashCode(mRequestorPackageName) * 53
-                + Arrays.hashCode(mAdministratorUids) * 59;
+                + mSignalStrength * 29
+                + mOwnerUid * 31
+                + Objects.hashCode(mUids) * 37
+                + Objects.hashCode(mSSID) * 41
+                + Objects.hashCode(mTransportInfo) * 43
+                + Objects.hashCode(mPrivateDnsBroken) * 47
+                + Objects.hashCode(mRequestorUid) * 53
+                + Objects.hashCode(mRequestorPackageName) * 59
+                + Arrays.hashCode(mAdministratorUids) * 61;
     }
 
     @Override
diff --git a/core/java/android/net/NetworkIdentity.java b/core/java/android/net/NetworkIdentity.java
index 0948a4da..a0dc72d 100644
--- a/core/java/android/net/NetworkIdentity.java
+++ b/core/java/android/net/NetworkIdentity.java
@@ -17,8 +17,6 @@
 package android.net;
 
 import static android.net.ConnectivityManager.TYPE_WIFI;
-import static android.net.ConnectivityManager.getNetworkTypeName;
-import static android.net.ConnectivityManager.isNetworkTypeMobile;
 
 import android.content.Context;
 import android.net.wifi.WifiInfo;
@@ -26,7 +24,6 @@
 import android.os.Build;
 import android.service.NetworkIdentityProto;
 import android.telephony.Annotation.NetworkType;
-import android.util.Slog;
 import android.util.proto.ProtoOutputStream;
 
 import java.util.Objects;
@@ -84,7 +81,7 @@
     @Override
     public String toString() {
         final StringBuilder builder = new StringBuilder("{");
-        builder.append("type=").append(getNetworkTypeName(mType));
+        builder.append("type=").append(mType);
         builder.append(", subType=");
         if (mSubType == SUBTYPE_COMBINED) {
             builder.append("COMBINED");
@@ -194,18 +191,9 @@
         boolean metered = !state.networkCapabilities.hasCapability(
                 NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
 
-        if (isNetworkTypeMobile(type)) {
-            if (state.subscriberId == null) {
-                if (state.networkInfo.getState() != NetworkInfo.State.DISCONNECTED &&
-                        state.networkInfo.getState() != NetworkInfo.State.UNKNOWN) {
-                    Slog.w(TAG, "Active mobile network without subscriber! ni = "
-                            + state.networkInfo);
-                }
-            }
+        subscriberId = state.subscriberId;
 
-            subscriberId = state.subscriberId;
-
-        } else if (type == TYPE_WIFI) {
+        if (type == TYPE_WIFI) {
             if (state.networkId != null) {
                 networkId = state.networkId;
             } else {
diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index a643d09..f05f033 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -144,6 +144,8 @@
     public static final String FIREWALL_CHAIN_NAME_STANDBY = "standby";
     /** @hide */
     public static final String FIREWALL_CHAIN_NAME_POWERSAVE = "powersave";
+    /** @hide */
+    public static final String FIREWALL_CHAIN_NAME_RESTRICTED = "restricted";
 
     private static final boolean ALLOW_PLATFORM_APP_POLICY = true;
 
diff --git a/core/java/android/net/NetworkProvider.java b/core/java/android/net/NetworkProvider.java
index d31218d..14cb51c 100644
--- a/core/java/android/net/NetworkProvider.java
+++ b/core/java/android/net/NetworkProvider.java
@@ -51,13 +51,6 @@
     public static final int ID_NONE = -1;
 
     /**
-     * A hardcoded ID for NetworkAgents representing VPNs. These agents are not created by any
-     * provider, so they use this constant for clarity instead of NONE.
-     * @hide only used by ConnectivityService.
-     */
-    public static final int ID_VPN = -2;
-
-    /**
      * The first providerId value that will be allocated.
      * @hide only used by ConnectivityService.
      */
@@ -70,7 +63,7 @@
 
     private final Messenger mMessenger;
     private final String mName;
-    private final ConnectivityManager mCm;
+    private final Context mContext;
 
     private int mProviderId = ID_NONE;
 
@@ -85,8 +78,6 @@
      */
     @SystemApi
     public NetworkProvider(@NonNull Context context, @NonNull Looper looper, @NonNull String name) {
-        mCm = ConnectivityManager.from(context);
-
         Handler handler = new Handler(looper) {
             @Override
             public void handleMessage(Message m) {
@@ -102,6 +93,7 @@
                 }
             }
         };
+        mContext = context;
         mMessenger = new Messenger(handler);
         mName = name;
     }
@@ -165,6 +157,6 @@
     @SystemApi
     @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY)
     public void declareNetworkRequestUnfulfillable(@NonNull NetworkRequest request) {
-        mCm.declareNetworkRequestUnfulfillable(request);
+        ConnectivityManager.from(mContext).declareNetworkRequestUnfulfillable(request);
     }
 }
diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java
index a0faafa..d84ee2a 100644
--- a/core/java/android/net/NetworkUtils.java
+++ b/core/java/android/net/NetworkUtils.java
@@ -35,7 +35,6 @@
 import java.net.InetAddress;
 import java.net.SocketException;
 import java.net.UnknownHostException;
-import java.util.Collection;
 import java.util.Locale;
 import java.util.TreeSet;
 
@@ -342,20 +341,6 @@
     }
 
     /**
-     * Create a string array of host addresses from a collection of InetAddresses
-     * @param addrs a Collection of InetAddresses
-     * @return an array of Strings containing their host addresses
-     */
-    public static String[] makeStrings(Collection<InetAddress> addrs) {
-        String[] result = new String[addrs.size()];
-        int i = 0;
-        for (InetAddress addr : addrs) {
-            result[i++] = addr.getHostAddress();
-        }
-        return result;
-    }
-
-    /**
      * Trim leading zeros from IPv4 address strings
      * Our base libraries will interpret that as octel..
      * Must leave non v4 addresses and host names alone.
diff --git a/core/java/android/net/OWNERS b/core/java/android/net/OWNERS
index 5e2a718..4ea8a54 100644
--- a/core/java/android/net/OWNERS
+++ b/core/java/android/net/OWNERS
@@ -1,11 +1,5 @@
 set noparent
 
-codewiz@google.com
-jchalard@google.com
-jsharkey@android.com
-junyulai@google.com
-lorenzo@google.com
-reminv@google.com
-satk@google.com
+include platform/frameworks/base:/services/core/java/com/android/server/net/OWNERS
 
 per-file SSL*, Uri*, Url* = prb@google.com, dauletz@google.com, narayan@google.com, ngeoffray@google.com
diff --git a/core/java/android/net/Proxy.java b/core/java/android/net/Proxy.java
index f1d9669..20ccc07 100644
--- a/core/java/android/net/Proxy.java
+++ b/core/java/android/net/Proxy.java
@@ -205,7 +205,7 @@
                 if (host.equalsIgnoreCase("localhost")) {
                     return true;
                 }
-                if (NetworkUtils.numericToInetAddress(host).isLoopbackAddress()) {
+                if (InetAddresses.parseNumericAddress(host).isLoopbackAddress()) {
                     return true;
                 }
             }
diff --git a/core/java/android/net/TcpRepairWindow.java b/core/java/android/net/TcpRepairWindow.java
index 86034f0..f062fa9 100644
--- a/core/java/android/net/TcpRepairWindow.java
+++ b/core/java/android/net/TcpRepairWindow.java
@@ -16,12 +16,15 @@
 
 package android.net;
 
+import android.annotation.SystemApi;
+
 /**
  * Corresponds to C's {@code struct tcp_repair_window} from
  * include/uapi/linux/tcp.h
  *
  * @hide
  */
+@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
 public final class TcpRepairWindow {
     public final int sndWl1;
     public final int sndWnd;
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java
index 4e019cf..fa65061 100644
--- a/core/java/android/net/TrafficStats.java
+++ b/core/java/android/net/TrafficStats.java
@@ -597,10 +597,17 @@
     }
 
     /**
-     * Return the number of packets transmitted on the specified interface since
-     * device boot. Statistics are measured at the network layer, so both TCP and
+     * Return the number of packets transmitted on the specified interface since the interface
+     * was created. Statistics are measured at the network layer, so both TCP and
      * UDP usage are included.
      *
+     * Note that the returned values are partial statistics that do not count data from several
+     * sources and do not apply several adjustments that are necessary for correctness, such
+     * as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to
+     * determine whether traffic is being transferred on the specific interface but are not a
+     * substitute for the more accurate statistics provided by the {@link NetworkStatsManager}
+     * APIs.
+     *
      * @param iface The name of the interface.
      * @return The number of transmitted packets.
      */
@@ -613,10 +620,17 @@
     }
 
     /**
-     * Return the number of packets received on the specified interface since
-     * device boot. Statistics are measured at the network layer, so both TCP
+     * Return the number of packets received on the specified interface since the interface was
+     * created. Statistics are measured at the network layer, so both TCP
      * and UDP usage are included.
      *
+     * Note that the returned values are partial statistics that do not count data from several
+     * sources and do not apply several adjustments that are necessary for correctness, such
+     * as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to
+     * determine whether traffic is being transferred on the specific interface but are not a
+     * substitute for the more accurate statistics provided by the {@link NetworkStatsManager}
+     * APIs.
+     *
      * @param iface The name of the interface.
      * @return The number of received packets.
      */
@@ -628,9 +642,22 @@
         }
     }
 
-    /** {@hide} */
-    @UnsupportedAppUsage
-    public static long getTxBytes(String iface) {
+    /**
+     * Return the number of bytes transmitted on the specified interface since the interface
+     * was created. Statistics are measured at the network layer, so both TCP and
+     * UDP usage are included.
+     *
+     * Note that the returned values are partial statistics that do not count data from several
+     * sources and do not apply several adjustments that are necessary for correctness, such
+     * as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to
+     * determine whether traffic is being transferred on the specific interface but are not a
+     * substitute for the more accurate statistics provided by the {@link NetworkStatsManager}
+     * APIs.
+     *
+     * @param iface The name of the interface.
+     * @return The number of transmitted bytes.
+     */
+    public static long getTxBytes(@NonNull String iface) {
         try {
             return getStatsService().getIfaceStats(iface, TYPE_TX_BYTES);
         } catch (RemoteException e) {
@@ -638,9 +665,22 @@
         }
     }
 
-    /** {@hide} */
-    @UnsupportedAppUsage
-    public static long getRxBytes(String iface) {
+    /**
+     * Return the number of bytes received on the specified interface since the interface
+     * was created. Statistics are measured at the network layer, so both TCP
+     * and UDP usage are included.
+     *
+     * Note that the returned values are partial statistics that do not count data from several
+     * sources and do not apply several adjustments that are necessary for correctness, such
+     * as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to
+     * determine whether traffic is being transferred on the specific interface but are not a
+     * substitute for the more accurate statistics provided by the {@link NetworkStatsManager}
+     * APIs.
+     *
+     * @param iface The name of the interface.
+     * @return The number of received bytes.
+     */
+    public static long getRxBytes(@NonNull String iface) {
         try {
             return getStatsService().getIfaceStats(iface, TYPE_RX_BYTES);
         } catch (RemoteException e) {
diff --git a/core/java/android/net/metrics/ConnectStats.java b/core/java/android/net/metrics/ConnectStats.java
index b320b75..c67259d 100644
--- a/core/java/android/net/metrics/ConnectStats.java
+++ b/core/java/android/net/metrics/ConnectStats.java
@@ -16,14 +16,14 @@
 
 package android.net.metrics;
 
-import android.net.NetworkCapabilities;
 import android.system.OsConstants;
 import android.util.IntArray;
 import android.util.SparseIntArray;
 
-import com.android.internal.util.BitUtils;
 import com.android.internal.util.TokenBucket;
 
+import java.util.BitSet;
+
 /**
  * A class that aggregates connect() statistics.
  * {@hide}
@@ -120,10 +120,9 @@
     @Override
     public String toString() {
         StringBuilder builder =
-                new StringBuilder("ConnectStats(").append("netId=").append(netId).append(", ");
-        for (int t : BitUtils.unpackBits(transports)) {
-            builder.append(NetworkCapabilities.transportNameOf(t)).append(", ");
-        }
+                new StringBuilder("ConnectStats(").append("netId=").append(netId)
+                        .append(", transports=").append(BitSet.valueOf(new long[] { transports }))
+                        .append(", ");
         builder.append(String.format("%d events, ", eventCount));
         builder.append(String.format("%d success, ", connectCount));
         builder.append(String.format("%d blocking, ", connectBlockingCount));
diff --git a/core/java/android/net/metrics/DefaultNetworkEvent.java b/core/java/android/net/metrics/DefaultNetworkEvent.java
index 6f383b4..8988983 100644
--- a/core/java/android/net/metrics/DefaultNetworkEvent.java
+++ b/core/java/android/net/metrics/DefaultNetworkEvent.java
@@ -16,12 +16,7 @@
 
 package android.net.metrics;
 
-import static android.net.ConnectivityManager.NETID_UNSET;
-
-import android.net.NetworkCapabilities;
-
-import com.android.internal.util.BitUtils;
-
+import java.util.BitSet;
 import java.util.StringJoiner;
 
 /**
@@ -32,8 +27,8 @@
 
     // The creation time in milliseconds of this DefaultNetworkEvent.
     public final long creationTimeMs;
-    // The network ID of the network or NETID_UNSET if none.
-    public int netId = NETID_UNSET;
+    // The network ID of the network or 0 if none.
+    public int netId = 0;
     // The list of transport types, as defined in NetworkCapabilities.java.
     public int transports;
     // The list of transport types of the last previous default network.
@@ -63,9 +58,7 @@
     public String toString() {
         StringJoiner j = new StringJoiner(", ", "DefaultNetworkEvent(", ")");
         j.add("netId=" + netId);
-        for (int t : BitUtils.unpackBits(transports)) {
-            j.add(NetworkCapabilities.transportNameOf(t));
-        }
+        j.add("transports=" + BitSet.valueOf(new long[] { transports }));
         j.add("ip=" + ipSupport());
         if (initialScore > 0) {
             j.add("initial_score=" + initialScore);
diff --git a/core/java/android/net/metrics/DnsEvent.java b/core/java/android/net/metrics/DnsEvent.java
index 5aa705b..bf351ce 100644
--- a/core/java/android/net/metrics/DnsEvent.java
+++ b/core/java/android/net/metrics/DnsEvent.java
@@ -16,11 +16,8 @@
 
 package android.net.metrics;
 
-import android.net.NetworkCapabilities;
-
-import com.android.internal.util.BitUtils;
-
 import java.util.Arrays;
+import java.util.BitSet;
 
 /**
  * A batch of DNS events recorded by NetdEventListenerService for a specific network.
@@ -86,10 +83,10 @@
     @Override
     public String toString() {
         StringBuilder builder =
-                new StringBuilder("DnsEvent(").append("netId=").append(netId).append(", ");
-        for (int t : BitUtils.unpackBits(transports)) {
-            builder.append(NetworkCapabilities.transportNameOf(t)).append(", ");
-        }
+                new StringBuilder("DnsEvent(").append("netId=").append(netId)
+                        .append(", transports=")
+                        .append(BitSet.valueOf(new long[] { transports }))
+                        .append(", ");
         builder.append(String.format("%d events, ", eventCount));
         builder.append(String.format("%d success)", successCount));
         return builder.toString();
diff --git a/core/java/android/net/metrics/NetworkMetrics.java b/core/java/android/net/metrics/NetworkMetrics.java
index 66d92c4..8f2f612 100644
--- a/core/java/android/net/metrics/NetworkMetrics.java
+++ b/core/java/android/net/metrics/NetworkMetrics.java
@@ -16,11 +16,9 @@
 
 package android.net.metrics;
 
-import android.net.NetworkCapabilities;
-
-import com.android.internal.util.BitUtils;
 import com.android.internal.util.TokenBucket;
 
+import java.util.BitSet;
 import java.util.StringJoiner;
 
 /**
@@ -144,9 +142,7 @@
         public String toString() {
             StringJoiner j = new StringJoiner(", ", "{", "}");
             j.add("netId=" + netId);
-            for (int t : BitUtils.unpackBits(transports)) {
-                j.add(NetworkCapabilities.transportNameOf(t));
-            }
+            j.add("transports=" + BitSet.valueOf(new long[] { transports }));
             j.add(String.format("dns avg=%dms max=%dms err=%.1f%% tot=%d",
                     (int) dnsLatencies.average(), (int) dnsLatencies.max,
                     100 * dnsErrorRate.average(), dnsErrorRate.count));
diff --git a/core/java/android/nfc/OWNERS b/core/java/android/nfc/OWNERS
new file mode 100644
index 0000000..6aaf039
--- /dev/null
+++ b/core/java/android/nfc/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 48448
+
+zachoverflow@google.com
+alisher@google.com
diff --git a/core/java/android/nfc/cardemulation/OWNERS b/core/java/android/nfc/cardemulation/OWNERS
new file mode 100644
index 0000000..6aaf039
--- /dev/null
+++ b/core/java/android/nfc/cardemulation/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 48448
+
+zachoverflow@google.com
+alisher@google.com
diff --git a/core/java/android/nfc/dta/OWNERS b/core/java/android/nfc/dta/OWNERS
new file mode 100644
index 0000000..6aaf039
--- /dev/null
+++ b/core/java/android/nfc/dta/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 48448
+
+zachoverflow@google.com
+alisher@google.com
diff --git a/core/java/android/nfc/tech/OWNERS b/core/java/android/nfc/tech/OWNERS
new file mode 100644
index 0000000..6aaf039
--- /dev/null
+++ b/core/java/android/nfc/tech/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 48448
+
+zachoverflow@google.com
+alisher@google.com
diff --git a/core/java/android/os/BinderProxy.java b/core/java/android/os/BinderProxy.java
index 683993f..0185ba4 100644
--- a/core/java/android/os/BinderProxy.java
+++ b/core/java/android/os/BinderProxy.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.app.ActivityManager;
 import android.app.AppOpsManager;
 import android.util.Log;
 import android.util.SparseIntArray;
@@ -255,7 +256,12 @@
             // out of system_server to all processes hosting binder objects it holds a reference to;
             // since some of those processes might be frozen, we don't want to block here
             // forever. Disable the freezer.
-            Process.enableFreezer(false);
+            try {
+                ActivityManager.getService().enableAppFreezer(false);
+            } catch (RemoteException e) {
+                Log.e(Binder.TAG, "RemoteException while disabling app freezer");
+            }
+
             for (WeakReference<BinderProxy> weakRef : proxiesToQuery) {
                 BinderProxy bp = weakRef.get();
                 String key;
@@ -278,7 +284,11 @@
                     counts.put(key, i + 1);
                 }
             }
-            Process.enableFreezer(true);
+            try {
+                ActivityManager.getService().enableAppFreezer(true);
+            } catch (RemoteException e) {
+                Log.e(Binder.TAG, "RemoteException while re-enabling app freezer");
+            }
             Map.Entry<String, Integer>[] sorted = counts.entrySet().toArray(
                     new Map.Entry[counts.size()]);
 
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 8121329..0d8769e 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -106,12 +106,24 @@
     public static final String HARDWARE = getString("ro.hardware");
 
     /**
-     * The hardware variant (SKU), if available.
+     * The SKU of the hardware (from the kernel command line). The SKU is reported by the bootloader
+     * to configure system software features.
      */
     @NonNull
     public static final String SKU = getString("ro.boot.hardware.sku");
 
     /**
+     * The SKU of the device as set by the original design manufacturer (ODM). This is a
+     * runtime-initialized property set during startup to configure device services.
+     *
+     * <p>The ODM SKU may have multiple variants for the same system SKU in case a manufacturer
+     * produces variants of the same design. For example, the same build may be released with
+     * variations in physical keyboard and/or display hardware, each with a different ODM SKU.
+     */
+    @NonNull
+    public static final String ODM_SKU = getString("ro.boot.product.hardware.sku");
+
+    /**
      * Whether this build was for an emulator device.
      * @hide
      */
@@ -1012,17 +1024,40 @@
 
         /**
          * Q.
-         * <p>
-         * <em>Why? Why, to give you a taste of your future, a preview of things
-         * to come. Con permiso, Capitan. The hall is rented, the orchestra
-         * engaged. It's now time to see if you can dance.</em>
+         *
+         * <p>Applications targeting this or a later release will get these new changes in behavior.
+         * For more information about this release, see the
+         * <a href="/about/versions/10">Android 10 overview</a>.</p>
+         * <ul>
+         * <li><a href="/about/versions/10/behavior-changes-all">Behavior changes: all apps</a></li>
+         * <li><a href="/about/versions/10/behavior-changes-10">Behavior changes: apps targeting API
+         * 29+</a></li>
+         * </ul>
+         *
          */
         public static final int Q = 29;
 
         /**
          * R.
+         *
+         * <p>Applications targeting this or a later release will get these new changes in behavior.
+         * For more information about this release, see the
+         * <a href="/about/versions/11">Android 11 overview</a>.</p>
+         * <ul>
+         * <li><a href="/about/versions/11/behavior-changes-all">Behavior changes: all apps</a></li>
+         * <li><a href="/about/versions/11/behavior-changes-11">Behavior changes: Apps targeting
+         * Android 11</a></li>
+         * <li><a href="/about/versions/11/non-sdk-11">Updates to non-SDK interface restrictions
+         * in Android 11</a></li>
+         * </ul>
+         *
          */
         public static final int R = 30;
+
+        /**
+         * S.
+         */
+        public static final int S = CUR_DEVELOPMENT;
     }
 
     /** The type of build, like "user" or "eng". */
diff --git a/core/java/android/os/GraphicsEnvironment.java b/core/java/android/os/GraphicsEnvironment.java
index a6b869d..df1f1b2 100644
--- a/core/java/android/os/GraphicsEnvironment.java
+++ b/core/java/android/os/GraphicsEnvironment.java
@@ -64,10 +64,11 @@
     private static final String SYSTEM_DRIVER_NAME = "system";
     private static final String SYSTEM_DRIVER_VERSION_NAME = "";
     private static final long SYSTEM_DRIVER_VERSION_CODE = 0;
-    private static final String PROPERTY_GFX_DRIVER = "ro.gfx.driver.0";
+    private static final String PROPERTY_GFX_DRIVER_PRODUCTION = "ro.gfx.driver.0";
     private static final String PROPERTY_GFX_DRIVER_PRERELEASE = "ro.gfx.driver.1";
     private static final String PROPERTY_GFX_DRIVER_BUILD_TIME = "ro.gfx.driver_build_time";
-    private static final String METADATA_DRIVER_BUILD_TIME = "com.android.gamedriver.build_time";
+    private static final String METADATA_DRIVER_BUILD_TIME =
+            "com.android.graphics.driver.build_time";
     private static final String METADATA_DEVELOPER_DRIVER_ENABLE =
             "com.android.graphics.developerdriver.enable";
     private static final String METADATA_INJECT_LAYERS_ENABLE =
@@ -78,20 +79,20 @@
     private static final String ACTION_ANGLE_FOR_ANDROID_TOAST_MESSAGE =
             "android.app.action.ANGLE_FOR_ANDROID_TOAST_MESSAGE";
     private static final String INTENT_KEY_A4A_TOAST_MESSAGE = "A4A Toast Message";
-    private static final String GAME_DRIVER_ALLOWLIST_ALL = "*";
-    private static final String GAME_DRIVER_SPHAL_LIBRARIES_FILENAME = "sphal_libraries.txt";
+    private static final String UPDATABLE_DRIVER_ALLOWLIST_ALL = "*";
+    private static final String UPDATABLE_DRIVER_SPHAL_LIBRARIES_FILENAME = "sphal_libraries.txt";
     private static final int VULKAN_1_0 = 0x00400000;
     private static final int VULKAN_1_1 = 0x00401000;
 
-    // GAME_DRIVER_ALL_APPS
+    // UPDATABLE_DRIVER_ALL_APPS
     // 0: Default (Invalid values fallback to default as well)
-    // 1: All apps use Game Driver
-    // 2: All apps use Prerelease Driver
+    // 1: All apps use updatable production driver
+    // 2: All apps use updatable prerelease driver
     // 3: All apps use system graphics driver
-    private static final int GAME_DRIVER_GLOBAL_OPT_IN_DEFAULT = 0;
-    private static final int GAME_DRIVER_GLOBAL_OPT_IN_GAME_DRIVER = 1;
-    private static final int GAME_DRIVER_GLOBAL_OPT_IN_PRERELEASE_DRIVER = 2;
-    private static final int GAME_DRIVER_GLOBAL_OPT_IN_OFF = 3;
+    private static final int UPDATABLE_DRIVER_GLOBAL_OPT_IN_DEFAULT = 0;
+    private static final int UPDATABLE_DRIVER_GLOBAL_OPT_IN_PRODUCTION_DRIVER = 1;
+    private static final int UPDATABLE_DRIVER_GLOBAL_OPT_IN_PRERELEASE_DRIVER = 2;
+    private static final int UPDATABLE_DRIVER_GLOBAL_OPT_IN_OFF = 3;
 
     private ClassLoader mClassLoader;
     private String mLibrarySearchPaths;
@@ -722,14 +723,17 @@
      * Return the driver package name to use. Return null for system driver.
      */
     private static String chooseDriverInternal(Bundle coreSettings, ApplicationInfo ai) {
-        final String gameDriver = SystemProperties.get(PROPERTY_GFX_DRIVER);
-        final boolean hasGameDriver = gameDriver != null && !gameDriver.isEmpty();
+        final String productionDriver = SystemProperties.get(PROPERTY_GFX_DRIVER_PRODUCTION);
+        final boolean hasProductionDriver = productionDriver != null && !productionDriver.isEmpty();
 
         final String prereleaseDriver = SystemProperties.get(PROPERTY_GFX_DRIVER_PRERELEASE);
         final boolean hasPrereleaseDriver = prereleaseDriver != null && !prereleaseDriver.isEmpty();
 
-        if (!hasGameDriver && !hasPrereleaseDriver) {
-            if (DEBUG) Log.v(TAG, "Neither Game Driver nor prerelease driver is supported.");
+        if (!hasProductionDriver && !hasPrereleaseDriver) {
+            if (DEBUG) {
+                Log.v(TAG,
+                        "Neither updatable production driver nor prerelease driver is supported.");
+            }
             return null;
         }
 
@@ -745,56 +749,59 @@
                 (ai.metaData != null && ai.metaData.getBoolean(METADATA_DEVELOPER_DRIVER_ENABLE))
                 || isDebuggable();
 
-        // Priority for Game Driver settings global on confliction (Higher priority comes first):
-        // 1. GAME_DRIVER_ALL_APPS
-        // 2. GAME_DRIVER_OPT_OUT_APPS
-        // 3. GAME_DRIVER_PRERELEASE_OPT_IN_APPS
-        // 4. GAME_DRIVER_OPT_IN_APPS
-        // 5. GAME_DRIVER_DENYLIST
-        // 6. GAME_DRIVER_ALLOWLIST
-        switch (coreSettings.getInt(Settings.Global.GAME_DRIVER_ALL_APPS, 0)) {
-            case GAME_DRIVER_GLOBAL_OPT_IN_OFF:
-                if (DEBUG) Log.v(TAG, "Game Driver is turned off on this device.");
+        // Priority of updatable driver settings on confliction (Higher priority comes first):
+        // 1. UPDATABLE_DRIVER_ALL_APPS
+        // 2. UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS
+        // 3. UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS
+        // 4. UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS
+        // 5. UPDATABLE_DRIVER_PRODUCTION_DENYLIST
+        // 6. UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST
+        switch (coreSettings.getInt(Settings.Global.UPDATABLE_DRIVER_ALL_APPS, 0)) {
+            case UPDATABLE_DRIVER_GLOBAL_OPT_IN_OFF:
+                if (DEBUG) Log.v(TAG, "updatable driver is turned off on this device.");
                 return null;
-            case GAME_DRIVER_GLOBAL_OPT_IN_GAME_DRIVER:
-                if (DEBUG) Log.v(TAG, "All apps opt in to use Game Driver.");
-                return hasGameDriver ? gameDriver : null;
-            case GAME_DRIVER_GLOBAL_OPT_IN_PRERELEASE_DRIVER:
-                if (DEBUG) Log.v(TAG, "All apps opt in to use prerelease driver.");
+            case UPDATABLE_DRIVER_GLOBAL_OPT_IN_PRODUCTION_DRIVER:
+                if (DEBUG) Log.v(TAG, "All apps opt in to use updatable production driver.");
+                return hasProductionDriver ? productionDriver : null;
+            case UPDATABLE_DRIVER_GLOBAL_OPT_IN_PRERELEASE_DRIVER:
+                if (DEBUG) Log.v(TAG, "All apps opt in to use updatable prerelease driver.");
                 return hasPrereleaseDriver && enablePrereleaseDriver ? prereleaseDriver : null;
-            case GAME_DRIVER_GLOBAL_OPT_IN_DEFAULT:
+            case UPDATABLE_DRIVER_GLOBAL_OPT_IN_DEFAULT:
             default:
                 break;
         }
 
         final String appPackageName = ai.packageName;
-        if (getGlobalSettingsString(null, coreSettings, Settings.Global.GAME_DRIVER_OPT_OUT_APPS)
+        if (getGlobalSettingsString(null, coreSettings,
+                                    Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS)
                         .contains(appPackageName)) {
-            if (DEBUG) Log.v(TAG, "App opts out for Game Driver.");
+            if (DEBUG) Log.v(TAG, "App opts out for updatable production driver.");
             return null;
         }
 
         if (getGlobalSettingsString(
-                    null, coreSettings, Settings.Global.GAME_DRIVER_PRERELEASE_OPT_IN_APPS)
+                    null, coreSettings, Settings.Global.UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS)
                         .contains(appPackageName)) {
-            if (DEBUG) Log.v(TAG, "App opts in for prerelease Game Driver.");
+            if (DEBUG) Log.v(TAG, "App opts in for updatable prerelease driver.");
             return hasPrereleaseDriver && enablePrereleaseDriver ? prereleaseDriver : null;
         }
 
-        // Early return here since the rest logic is only for Game Driver.
-        if (!hasGameDriver) {
-            if (DEBUG) Log.v(TAG, "Game Driver is not supported on the device.");
+        // Early return here since the rest logic is only for updatable production Driver.
+        if (!hasProductionDriver) {
+            if (DEBUG) Log.v(TAG, "Updatable production driver is not supported on the device.");
             return null;
         }
 
         final boolean isOptIn =
-                getGlobalSettingsString(null, coreSettings, Settings.Global.GAME_DRIVER_OPT_IN_APPS)
+                getGlobalSettingsString(null, coreSettings,
+                                        Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS)
                         .contains(appPackageName);
         final List<String> allowlist =
-                getGlobalSettingsString(null, coreSettings, Settings.Global.GAME_DRIVER_ALLOWLIST);
-        if (!isOptIn && allowlist.indexOf(GAME_DRIVER_ALLOWLIST_ALL) != 0
+                getGlobalSettingsString(null, coreSettings,
+                                        Settings.Global.UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST);
+        if (!isOptIn && allowlist.indexOf(UPDATABLE_DRIVER_ALLOWLIST_ALL) != 0
                 && !allowlist.contains(appPackageName)) {
-            if (DEBUG) Log.v(TAG, "App is not on the allowlist for Game Driver.");
+            if (DEBUG) Log.v(TAG, "App is not on the allowlist for updatable production driver.");
             return null;
         }
 
@@ -802,13 +809,13 @@
         // terminate early if it's on the denylist and fallback to system driver.
         if (!isOptIn
                 && getGlobalSettingsString(
-                        null, coreSettings, Settings.Global.GAME_DRIVER_DENYLIST)
+                        null, coreSettings, Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLIST)
                            .contains(appPackageName)) {
-            if (DEBUG) Log.v(TAG, "App is on the denylist for Game Driver.");
+            if (DEBUG) Log.v(TAG, "App is on the denylist for updatable production driver.");
             return null;
         }
 
-        return gameDriver;
+        return productionDriver;
     }
 
     /**
@@ -871,9 +878,10 @@
             throw new NullPointerException("apk's meta-data cannot be null");
         }
 
-        final String driverBuildTime = driverAppInfo.metaData.getString(METADATA_DRIVER_BUILD_TIME);
-        if (driverBuildTime == null || driverBuildTime.isEmpty()) {
-            throw new IllegalArgumentException("com.android.gamedriver.build_time is not set");
+        String driverBuildTime = driverAppInfo.metaData.getString(METADATA_DRIVER_BUILD_TIME);
+        if (driverBuildTime == null || driverBuildTime.length() <= 1) {
+            Log.v(TAG, "com.android.graphics.driver.build_time is not set");
+            driverBuildTime = "L0";
         }
         // driver_build_time in the meta-data is in "L<Unix epoch timestamp>" format. e.g. L123456.
         // Long.parseLong will throw if the meta-data "driver_build_time" is not set properly.
@@ -901,7 +909,7 @@
             final Context driverContext =
                     context.createPackageContext(driverPackageName, Context.CONTEXT_RESTRICTED);
             final BufferedReader reader = new BufferedReader(new InputStreamReader(
-                    driverContext.getAssets().open(GAME_DRIVER_SPHAL_LIBRARIES_FILENAME)));
+                    driverContext.getAssets().open(UPDATABLE_DRIVER_SPHAL_LIBRARIES_FILENAME)));
             final ArrayList<String> assetStrings = new ArrayList<>();
             for (String assetString; (assetString = reader.readLine()) != null;) {
                 assetStrings.add(assetString);
@@ -913,7 +921,7 @@
             }
         } catch (IOException e) {
             if (DEBUG) {
-                Log.w(TAG, "Failed to load '" + GAME_DRIVER_SPHAL_LIBRARIES_FILENAME + "'");
+                Log.w(TAG, "Failed to load '" + UPDATABLE_DRIVER_SPHAL_LIBRARIES_FILENAME + "'");
             }
         }
         return "";
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index e1d9005..25d84ba 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -321,16 +321,6 @@
     void setFirewallChainEnabled(int chain, boolean enable);
 
     /**
-     * Set all packets from users in ranges to go through VPN specified by netId.
-     */
-    void addVpnUidRanges(int netId, in UidRange[] ranges);
-
-    /**
-     * Clears the special VPN rules for users in ranges and VPN specified by netId.
-     */
-    void removeVpnUidRanges(int netId, in UidRange[] ranges);
-
-    /**
      * Start listening for mobile activity state changes.
      */
     void registerNetworkActivityListener(INetworkActivityListener listener);
@@ -361,7 +351,5 @@
     void removeInterfaceFromLocalNetwork(String iface);
     int removeRoutesFromLocalNetwork(in List<RouteInfo> routes);
 
-    void setAllowOnlyVpnForUids(boolean enable, in UidRange[] uidRanges);
-
     boolean isNetworkRestricted(int uid);
 }
diff --git a/core/java/android/os/OWNERS b/core/java/android/os/OWNERS
index 40c291f..6aa1be9 100644
--- a/core/java/android/os/OWNERS
+++ b/core/java/android/os/OWNERS
@@ -15,7 +15,16 @@
 per-file PowerManager.java = michaelwr@google.com, santoscordon@google.com
 per-file PowerManagerInternal.java = michaelwr@google.com, santoscordon@google.com
 
-# Zygote
-per-file ZygoteProcess.java = calin@google.com, chriswailes@google.com, maco@google.com, narayan@google.com, ngeoffray@google.com
+# BatteryStats
+per-file *BatteryConsumer* = file:/BATTERY_STATS_OWNERS
+per-file BatteryManager* = file:/BATTERY_STATS_OWNERS
+per-file BatteryStats* = file:/BATTERY_STATS_OWNERS
+per-file BatteryUsageStats* = file:/BATTERY_STATS_OWNERS
+per-file PowerComponents.java = file:/BATTERY_STATS_OWNERS
 
 per-file GraphicsEnvironment.java = chrisforbes@google.com, cnorthrop@google.com, lpy@google.com, timvp@google.com, zzyiwei@google.com
+
+per-file *Network* = file:/services/core/java/com/android/server/net/OWNERS
+per-file *Power* = file:/services/core/java/com/android/server/power/OWNERS
+per-file *Telephony* = file:/telephony/OWNERS
+per-file *Zygote* = file:/ZYGOTE_OWNERS
diff --git a/core/java/android/os/ParcelableHolder.java b/core/java/android/os/ParcelableHolder.java
index 95c07b6..1be367c 100644
--- a/core/java/android/os/ParcelableHolder.java
+++ b/core/java/android/os/ParcelableHolder.java
@@ -120,31 +120,37 @@
 
     /**
      * Write a parcelable into ParcelableHolder, the previous parcelable will be removed.
-     * @return {@code false} if the parcelable's stability is more unstable ParcelableHolder.
+     * @throws BadParcelableException if the parcelable's stability is more unstable
+     *         ParcelableHolder.
      */
-    public boolean setParcelable(@Nullable Parcelable p) {
-        // a ParcelableHolder can only hold things at its stability or higher
+    public void setParcelable(@Nullable Parcelable p) {
+        // A ParcelableHolder can only hold things at its stability or higher.
         if (p != null && this.getStability() > p.getStability()) {
-            return false;
+            throw new BadParcelableException(
+                "A ParcelableHolder can only hold things at its stability or higher. "
+                + "The ParcelableHolder's stability is " + this.getStability()
+                + ", but the parcelable's stability is " + p.getStability());
         }
         mParcelable = p;
         if (mParcel != null) {
             mParcel.recycle();
             mParcel = null;
         }
-        return true;
     }
 
     /**
      * @return the parcelable that was written by {@link #setParcelable} or {@link #readFromParcel},
-     *         or {@code null} if the parcelable has not been written, or T is different from
-     *         the type written by (@link #setParcelable}.
+     *         or {@code null} if the parcelable has not been written.
+     * @throws BadParcelableException if T is different from the type written by
+     *         (@link #setParcelable}.
      */
     @Nullable
     public <T extends Parcelable> T getParcelable(@NonNull Class<T> clazz) {
         if (mParcel == null) {
-            if (!clazz.isInstance(mParcelable)) {
-                return null;
+            if (mParcelable != null && !clazz.isInstance(mParcelable)) {
+                throw new BadParcelableException(
+                    "The ParcelableHolder has " + mParcelable.getClass().getName()
+                    + ", but the requested type is " + clazz.getName());
             }
             return (T) mParcelable;
         }
@@ -152,8 +158,10 @@
         mParcel.setDataPosition(0);
 
         T parcelable = mParcel.readParcelable(clazz.getClassLoader());
-        if (!clazz.isInstance(parcelable)) {
-            return null;
+        if (parcelable != null && !clazz.isInstance(parcelable)) {
+            throw new BadParcelableException(
+                    "The ParcelableHolder has " + parcelable.getClass().getName()
+                    + ", but the requested type is " + clazz.getName());
         }
         mParcelable = parcelable;
 
@@ -170,16 +178,21 @@
 
         mParcelable = null;
 
+        int dataSize = parcel.readInt();
+        if (dataSize < 0) {
+            throw new IllegalArgumentException("dataSize from parcel is negative");
+        } else if (dataSize == 0) {
+            if (mParcel != null) {
+                mParcel.recycle();
+                mParcel = null;
+            }
+            return;
+        }
         if (mParcel == null) {
             mParcel = Parcel.obtain();
         }
         mParcel.setDataPosition(0);
         mParcel.setDataSize(0);
-
-        int dataSize = parcel.readInt();
-        if (dataSize < 0) {
-            throw new IllegalArgumentException("dataSize from parcel is negative");
-        }
         int dataStartPos = parcel.dataPosition();
 
         mParcel.appendFrom(parcel, dataStartPos, dataSize);
@@ -196,6 +209,11 @@
             return;
         }
 
+        if (mParcelable == null) {
+            parcel.writeInt(0);
+            return;
+        }
+
         int sizePos = parcel.dataPosition();
         parcel.writeInt(0);
         int dataStartPos = parcel.dataPosition();
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index a0d2f0d..49b4e00 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -65,7 +65,7 @@
     /* NOTE: Wake lock levels were previously defined as a bit field, except that only a few
      * combinations were actually supported so the bit field was removed.  This explains
      * why the numbering scheme is so odd.  If adding a new wake lock level, any unused
-     * value (in frameworks/base/core/proto/android/os/enums.proto) can be used.
+     * value (in frameworks/proto_logging/stats/enums/os/enums.proto) can be used.
      */
 
     /**
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index c2c4d62..8c2ca6d 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -946,7 +946,7 @@
 
     /**
      * Enable or disable the freezer. When enable == false all frozen processes are unfrozen,
-     * but aren't removed from the freezer. Processes can still be added or removed
+     * but aren't removed from the freezer. While in this state, processes can be added or removed
      * by using setProcessFrozen, but they won't actually be frozen until the freezer is enabled
      * again. If enable == true the freezer is enabled again, and all processes
      * in the freezer (including the ones added while the freezer was disabled) are frozen.
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 8926b27..67d5f5f 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -3172,28 +3172,55 @@
     }
 
     /**
-     * Returns information for all users on this device, including ones marked for deletion.
-     * To retrieve only users that are alive, use {@link #getUsers(boolean)}.
+     * Returns information for all fully-created users on this device, including ones marked for
+     * deletion.
      *
-     * @return the list of users that exist on the device.
+     * <p>To retrieve only users that are not marked for deletion, use {@link #getAliveUsers()}.
+     *
+     * <p>To retrieve *all* users (including partial and pre-created users), use
+     * {@link #getUsers(boolean, boolean, boolean)) getUsers(false, false, false)}.
+     *
+     * <p>To retrieve a more specific list of users, use
+     * {@link #getUsers(boolean, boolean, boolean)}.
+     *
+     * @return the list of users that were created.
+     *
      * @hide
      */
     @UnsupportedAppUsage
     @RequiresPermission(android.Manifest.permission.MANAGE_USERS)
     public List<UserInfo> getUsers() {
-        return getUsers(/* excludeDying= */ false);
+        return getUsers(/*excludePartial= */ true, /* excludeDying= */ false,
+                /* excludePreCreated= */ true);
     }
 
     /**
-     * Returns information for all users on this device. Requires
-     * {@link android.Manifest.permission#MANAGE_USERS} permission.
+     * Returns information for all "usable" users on this device (i.e, it excludes users that are
+     * marked for deletion, pre-created users, etc...).
      *
-     * @param excludeDying specify if the list should exclude users being
-     *            removed.
+     * <p>To retrieve all fully-created users, use {@link #getUsers()}.
+     *
+     * <p>To retrieve a more specific list of users, use
+     * {@link #getUsers(boolean, boolean, boolean)}.
+     *
      * @return the list of users that were created.
      * @hide
      */
+    @RequiresPermission(android.Manifest.permission.MANAGE_USERS)
+    public @NonNull List<UserInfo> getAliveUsers() {
+        return getUsers(/*excludePartial= */ true, /* excludeDying= */ true,
+                /* excludePreCreated= */ true);
+    }
+
+    /**
+     * @deprecated use {@link #getAliveUsers()} for {@code getUsers(true)}, or
+     * {@link #getUsers()} for @code getUsers(false)}.
+     *
+     * @hide
+     */
+    @Deprecated
     @UnsupportedAppUsage
+    @RequiresPermission(android.Manifest.permission.MANAGE_USERS)
     public @NonNull List<UserInfo> getUsers(boolean excludeDying) {
         return getUsers(/*excludePartial= */ true, excludeDying,
                 /* excludePreCreated= */ true);
diff --git a/core/java/android/os/VibrationEffect.java b/core/java/android/os/VibrationEffect.java
index 8be4bfd..769a34e 100644
--- a/core/java/android/os/VibrationEffect.java
+++ b/core/java/android/os/VibrationEffect.java
@@ -1083,8 +1083,7 @@
          *
          * @param primitiveId The primitive to add
          * @param scale The scale to apply to the intensity of the primitive.
-         * @param delay The amount of time, in milliseconds, to wait between playing the prior
-         *              primitive and this one
+         * @param delay The amount of time in milliseconds to wait before playing this primitive
          * @return The {@link Composition} object to enable adding multiple primitives in one chain.
          */
         @NonNull
diff --git a/core/java/android/os/connectivity/OWNERS b/core/java/android/os/connectivity/OWNERS
new file mode 100644
index 0000000..a0f0238
--- /dev/null
+++ b/core/java/android/os/connectivity/OWNERS
@@ -0,0 +1 @@
+dplotnikov@google.com
diff --git a/core/java/android/os/health/OWNERS b/core/java/android/os/health/OWNERS
new file mode 100644
index 0000000..6045344
--- /dev/null
+++ b/core/java/android/os/health/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 26805
+
+dplotnikov@google.com
+mwachens@google.com
diff --git a/core/java/android/os/image/OWNERS b/core/java/android/os/image/OWNERS
new file mode 100644
index 0000000..389b55b
--- /dev/null
+++ b/core/java/android/os/image/OWNERS
@@ -0,0 +1 @@
+andrewhsieh@google.com
diff --git a/core/java/android/os/storage/OWNERS b/core/java/android/os/storage/OWNERS
new file mode 100644
index 0000000..8af7de5
--- /dev/null
+++ b/core/java/android/os/storage/OWNERS
@@ -0,0 +1,7 @@
+# Bug component: 95221
+
+narayan@google.com
+nandana@google.com
+corinac@google.com
+zezeozue@google.com
+maco@google.com
diff --git a/core/java/android/os/storage/StorageManagerInternal.java b/core/java/android/os/storage/StorageManagerInternal.java
index e05991b..a79a1cf 100644
--- a/core/java/android/os/storage/StorageManagerInternal.java
+++ b/core/java/android/os/storage/StorageManagerInternal.java
@@ -118,7 +118,7 @@
      * affects them.
      */
     public abstract void onAppOpsChanged(int code, int uid,
-            @Nullable String packageName, int mode);
+            @Nullable String packageName, int mode, int previousMode);
 
     /**
      * Asks the StorageManager to reset all state for the provided user; this will result
diff --git a/core/java/android/os/storage/VolumeInfo.java b/core/java/android/os/storage/VolumeInfo.java
index e6bb088..3edc154 100644
--- a/core/java/android/os/storage/VolumeInfo.java
+++ b/core/java/android/os/storage/VolumeInfo.java
@@ -200,6 +200,21 @@
         internalPath = parcel.readString8();
     }
 
+    public VolumeInfo(VolumeInfo volumeInfo) {
+        this.id = volumeInfo.id;
+        this.type = volumeInfo.type;
+        this.disk = volumeInfo.disk;
+        this.partGuid = volumeInfo.partGuid;
+        this.mountFlags = volumeInfo.mountFlags;
+        this.mountUserId = volumeInfo.mountUserId;
+        this.state = volumeInfo.state;
+        this.fsType = volumeInfo.fsType;
+        this.fsUuid = volumeInfo.fsUuid;
+        this.fsLabel = volumeInfo.fsLabel;
+        this.path = volumeInfo.path;
+        this.internalPath = volumeInfo.internalPath;
+    }
+
     @UnsupportedAppUsage
     public static @NonNull String getEnvironmentForState(int state) {
         final String envState = sStateToEnvironment.get(state);
diff --git a/core/java/android/permission/OWNERS b/core/java/android/permission/OWNERS
new file mode 100644
index 0000000..d09f351
--- /dev/null
+++ b/core/java/android/permission/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 137825
+
+moltmann@google.com
+evanseverson@google.com
+ntmyren@google.com
+zhanghai@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/permission/PermissionControllerService.java b/core/java/android/permission/PermissionControllerService.java
index 8ad35e7..e2e6140 100644
--- a/core/java/android/permission/PermissionControllerService.java
+++ b/core/java/android/permission/PermissionControllerService.java
@@ -35,6 +35,8 @@
 import android.annotation.SystemApi;
 import android.app.Service;
 import android.app.admin.DevicePolicyManager.PermissionGrantState;
+import android.compat.annotation.ChangeId;
+import android.compat.annotation.Disabled;
 import android.content.Intent;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
@@ -83,6 +85,15 @@
     public static final String SERVICE_INTERFACE = "android.permission.PermissionControllerService";
 
     /**
+     * A ChangeId indicating that this device supports camera and mic indicators. Will be "false"
+     * if present, because the CompatChanges#isChangeEnabled method returns true if the change id
+     * is not present.
+     */
+    @ChangeId
+    @Disabled
+    private static final long CAMERA_MIC_INDICATORS_NOT_PRESENT = 162547999L;
+
+    /**
      * Revoke a set of runtime permissions for various apps.
      *
      * @param requests The permissions to revoke as {@code Map<packageName, List<permission>>}
diff --git a/core/java/android/permissionpresenterservice/OWNERS b/core/java/android/permissionpresenterservice/OWNERS
new file mode 100644
index 0000000..d09f351
--- /dev/null
+++ b/core/java/android/permissionpresenterservice/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 137825
+
+moltmann@google.com
+evanseverson@google.com
+ntmyren@google.com
+zhanghai@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/print/OWNERS b/core/java/android/print/OWNERS
new file mode 100644
index 0000000..72f0983
--- /dev/null
+++ b/core/java/android/print/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 47273
+
+moltmann@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/print/pdf/OWNERS b/core/java/android/print/pdf/OWNERS
new file mode 100644
index 0000000..72f0983
--- /dev/null
+++ b/core/java/android/print/pdf/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 47273
+
+moltmann@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/printservice/OWNERS b/core/java/android/printservice/OWNERS
new file mode 100644
index 0000000..72f0983
--- /dev/null
+++ b/core/java/android/printservice/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 47273
+
+moltmann@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/printservice/recommendation/OWNERS b/core/java/android/printservice/recommendation/OWNERS
new file mode 100644
index 0000000..72f0983
--- /dev/null
+++ b/core/java/android/printservice/recommendation/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 47273
+
+moltmann@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/provider/DocumentsProvider.java b/core/java/android/provider/DocumentsProvider.java
index 1a59e8d..b704d66 100644
--- a/core/java/android/provider/DocumentsProvider.java
+++ b/core/java/android/provider/DocumentsProvider.java
@@ -218,8 +218,15 @@
     }
 
     /** {@hide} */
-    private void enforceTree(Uri documentUri) {
-        if (isTreeUri(documentUri)) {
+    private void enforceTreeForExtraUris(Bundle extras) {
+        enforceTree(extras.getParcelable(DocumentsContract.EXTRA_URI));
+        enforceTree(extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI));
+        enforceTree(extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI));
+    }
+
+    /** {@hide} */
+    private void enforceTree(@Nullable Uri documentUri) {
+        if (documentUri != null && isTreeUri(documentUri)) {
             final String parent = getTreeDocumentId(documentUri);
             final String child = getDocumentId(documentUri);
             if (Objects.equals(parent, child)) {
@@ -232,6 +239,10 @@
         }
     }
 
+    private Uri validateIncomingNullableUri(@Nullable Uri uri) {
+        return uri == null ? null : validateIncomingUri(uri);
+    }
+
     /**
      * Create a new document and return its newly generated
      * {@link Document#COLUMN_DOCUMENT_ID}. You must allocate a new
@@ -1076,11 +1087,21 @@
         final Context context = getContext();
         final Bundle out = new Bundle();
 
+        // If the URI is a tree URI performs some validation.
+        enforceTreeForExtraUris(extras);
+
+        final Uri extraUri = validateIncomingNullableUri(
+                extras.getParcelable(DocumentsContract.EXTRA_URI));
+        final Uri extraTargetUri = validateIncomingNullableUri(
+                extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI));
+        final Uri extraParentUri = validateIncomingNullableUri(
+                extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI));
+
         if (METHOD_EJECT_ROOT.equals(method)) {
             // Given that certain system apps can hold MOUNT_UNMOUNT permission, but only apps
             // signed with platform signature can hold MANAGE_DOCUMENTS, we are going to check for
             // MANAGE_DOCUMENTS or associated URI permission here instead
-            final Uri rootUri = extras.getParcelable(DocumentsContract.EXTRA_URI);
+            final Uri rootUri = extraUri;
             enforceWritePermissionInner(rootUri, getCallingPackage(), getCallingAttributionTag(),
                     null);
 
@@ -1090,7 +1111,7 @@
             return out;
         }
 
-        final Uri documentUri = extras.getParcelable(DocumentsContract.EXTRA_URI);
+        final Uri documentUri = extraUri;
         final String authority = documentUri.getAuthority();
         final String documentId = DocumentsContract.getDocumentId(documentUri);
 
@@ -1099,14 +1120,11 @@
                     "Requested authority " + authority + " doesn't match provider " + mAuthority);
         }
 
-        // If the URI is a tree URI performs some validation.
-        enforceTree(documentUri);
-
         if (METHOD_IS_CHILD_DOCUMENT.equals(method)) {
             enforceReadPermissionInner(documentUri, getCallingPackage(),
                     getCallingAttributionTag(), null);
 
-            final Uri childUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI);
+            final Uri childUri = extraTargetUri;
             final String childAuthority = childUri.getAuthority();
             final String childId = DocumentsContract.getDocumentId(childUri);
 
@@ -1173,7 +1191,7 @@
             revokeDocumentPermission(documentId);
 
         } else if (METHOD_COPY_DOCUMENT.equals(method)) {
-            final Uri targetUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI);
+            final Uri targetUri = extraTargetUri;
             final String targetId = DocumentsContract.getDocumentId(targetUri);
 
             enforceReadPermissionInner(documentUri, getCallingPackage(),
@@ -1197,9 +1215,9 @@
             }
 
         } else if (METHOD_MOVE_DOCUMENT.equals(method)) {
-            final Uri parentSourceUri = extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI);
+            final Uri parentSourceUri = extraParentUri;
             final String parentSourceId = DocumentsContract.getDocumentId(parentSourceUri);
-            final Uri targetUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI);
+            final Uri targetUri = extraTargetUri;
             final String targetId = DocumentsContract.getDocumentId(targetUri);
 
             enforceWritePermissionInner(documentUri, getCallingPackage(),
@@ -1225,7 +1243,7 @@
             }
 
         } else if (METHOD_REMOVE_DOCUMENT.equals(method)) {
-            final Uri parentSourceUri = extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI);
+            final Uri parentSourceUri = extraParentUri;
             final String parentSourceId = DocumentsContract.getDocumentId(parentSourceUri);
 
             enforceReadPermissionInner(parentSourceUri, getCallingPackage(),
diff --git a/core/java/android/provider/OWNERS b/core/java/android/provider/OWNERS
index 97e0156..792ff20 100644
--- a/core/java/android/provider/OWNERS
+++ b/core/java/android/provider/OWNERS
@@ -2,4 +2,8 @@
 per-file DeviceConfig.java = hackbod@google.com
 per-file DeviceConfig.java = schfan@google.com
 
-
+per-file CallLog.java = file:/telephony/OWNERS
+per-file DocumentsContract.java = file:/core/java/android/os/storage/OWNERS
+per-file DocumentsProvider.java = file:/core/java/android/os/storage/OWNERS
+per-file MediaStore.java = file:/core/java/android/os/storage/OWNERS
+per-file Telephony.java = file:/telephony/OWNERS
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index a1d993b..300bb760 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -8942,6 +8942,13 @@
         public static final int ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW = 0x2;
 
         /**
+         * Whether the Adaptive connectivity option is enabled.
+         *
+         * @hide
+         */
+        public static final String ADAPTIVE_CONNECTIVITY_ENABLED = "adaptive_connectivity_enabled";
+
+        /**
          * Keys we no longer back up under the current schema, but want to continue to
          * process when restoring historical backup datasets.
          *
@@ -8957,6 +8964,22 @@
         };
 
         /**
+         * How long Assistant handles have enabled in milliseconds.
+         *
+         * @hide
+         */
+        public static final String ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS =
+                "reminder_exp_learning_time_elapsed";
+
+        /**
+         * How many times the Assistant has been triggered using the touch gesture.
+         *
+         * @hide
+         */
+        public static final String ASSIST_HANDLES_LEARNING_EVENT_COUNT =
+                "reminder_exp_learning_event_count";
+
+        /**
          * These entries are considered common between the personal and the managed profile,
          * since the managed profile doesn't get to change them.
          */
@@ -12263,63 +12286,71 @@
                 "show_angle_in_use_dialog_box";
 
         /**
-         * Game Driver global preference for all Apps.
+         * Updatable driver global preference for all Apps.
          * 0 = Default
-         * 1 = All Apps use Game Driver
-         * 2 = All Apps use system graphics driver
+         * 1 = All Apps use updatable production driver
+         * 2 = All apps use updatable prerelease driver
+         * 3 = All Apps use system graphics driver
          * @hide
          */
-        public static final String GAME_DRIVER_ALL_APPS = "game_driver_all_apps";
+        public static final String UPDATABLE_DRIVER_ALL_APPS = "updatable_driver_all_apps";
 
         /**
-         * List of Apps selected to use Game Driver.
+         * List of Apps selected to use updatable production driver.
          * i.e. <pkg1>,<pkg2>,...,<pkgN>
          * @hide
          */
-        public static final String GAME_DRIVER_OPT_IN_APPS = "game_driver_opt_in_apps";
+        public static final String UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS =
+                "updatable_driver_production_opt_in_apps";
 
         /**
-         * List of Apps selected to use prerelease Game Driver.
+         * List of Apps selected to use updatable prerelease driver.
          * i.e. <pkg1>,<pkg2>,...,<pkgN>
          * @hide
          */
-        public static final String GAME_DRIVER_PRERELEASE_OPT_IN_APPS =
-                "game_driver_prerelease_opt_in_apps";
+        public static final String UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS =
+                "updatable_driver_prerelease_opt_in_apps";
 
         /**
-         * List of Apps selected not to use Game Driver.
+         * List of Apps selected not to use updatable production driver.
          * i.e. <pkg1>,<pkg2>,...,<pkgN>
          * @hide
          */
-        public static final String GAME_DRIVER_OPT_OUT_APPS = "game_driver_opt_out_apps";
+        public static final String UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS =
+                "updatable_driver_production_opt_out_apps";
 
         /**
-         * Apps on the denylist that are forbidden to use Game Driver.
+         * Apps on the denylist that are forbidden to use updatable production driver.
          * @hide
          */
-        public static final String GAME_DRIVER_DENYLIST = "game_driver_denylist";
+        public static final String UPDATABLE_DRIVER_PRODUCTION_DENYLIST =
+                "updatable_driver_production_denylist";
 
         /**
-         * List of denylists, each denylist is a denylist for a specific version of Game Driver.
+         * List of denylists, each denylist is a denylist for a specific version of
+         * updatable production driver.
          * @hide
          */
-        public static final String GAME_DRIVER_DENYLISTS = "game_driver_denylists";
+        public static final String UPDATABLE_DRIVER_PRODUCTION_DENYLISTS =
+                "updatable_driver_production_denylists";
 
         /**
-         * Apps on the allowlist that are allowed to use Game Driver.
+         * Apps on the allowlist that are allowed to use updatable production driver.
          * The string is a list of application package names, seperated by comma.
          * i.e. <apk1>,<apk2>,...,<apkN>
          * @hide
          */
-        public static final String GAME_DRIVER_ALLOWLIST = "game_driver_allowlist";
+        public static final String UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST =
+                "updatable_driver_production_allowlist";
 
         /**
-         * List of libraries in sphal accessible by Game Driver
+         * List of libraries in sphal accessible by updatable driver
          * The string is a list of library names, separated by colon.
          * i.e. <lib1>:<lib2>:...:<libN>
          * @hide
          */
-        public static final String GAME_DRIVER_SPHAL_LIBRARIES = "game_driver_sphal_libraries";
+        public static final String UPDATABLE_DRIVER_SPHAL_LIBRARIES =
+                "updatable_driver_sphal_libraries";
 
         /**
          * Ordered GPU debug layer list for Vulkan
diff --git a/core/java/android/se/OWNERS b/core/java/android/se/OWNERS
new file mode 100644
index 0000000..f1539dc
--- /dev/null
+++ b/core/java/android/se/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 456592
+
+cbrubaker@google.com
+vishwath@google.com
diff --git a/core/java/android/se/omapi/OWNERS b/core/java/android/se/omapi/OWNERS
new file mode 100644
index 0000000..f1539dc
--- /dev/null
+++ b/core/java/android/se/omapi/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 456592
+
+cbrubaker@google.com
+vishwath@google.com
diff --git a/core/java/android/security/OWNERS b/core/java/android/security/OWNERS
index 7120376..3f8d75e 100644
--- a/core/java/android/security/OWNERS
+++ b/core/java/android/security/OWNERS
@@ -1,3 +1,8 @@
+# Bug component: 36824
+
+cbrubaker@google.com
+vishwath@google.com
+
 per-file NetworkSecurityPolicy.java = cbrubaker@google.com
 per-file NetworkSecurityPolicy.java = klyubin@google.com
 per-file FrameworkNetworkSecurityPolicy.java = cbrubaker@google.com
diff --git a/core/java/android/security/keymaster/KeymasterDefs.java b/core/java/android/security/keymaster/KeymasterDefs.java
index e32ffa6..017f405 100644
--- a/core/java/android/security/keymaster/KeymasterDefs.java
+++ b/core/java/android/security/keymaster/KeymasterDefs.java
@@ -16,6 +16,19 @@
 
 package android.security.keymaster;
 
+import android.hardware.security.keymint.Algorithm;
+import android.hardware.security.keymint.BlockMode;
+import android.hardware.security.keymint.Digest;
+import android.hardware.security.keymint.ErrorCode;
+import android.hardware.security.keymint.HardwareAuthenticatorType;
+import android.hardware.security.keymint.KeyFormat;
+import android.hardware.security.keymint.KeyOrigin;
+import android.hardware.security.keymint.KeyPurpose;
+import android.hardware.security.keymint.PaddingMode;
+import android.hardware.security.keymint.SecurityLevel;
+import android.hardware.security.keymint.Tag;
+import android.hardware.security.keymint.TagType;
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -30,204 +43,284 @@
     private KeymasterDefs() {}
 
     // Tag types.
-    public static final int KM_INVALID = 0 << 28;
-    public static final int KM_ENUM = 1 << 28;
-    public static final int KM_ENUM_REP = 2 << 28;
-    public static final int KM_UINT = 3 << 28;
-    public static final int KM_UINT_REP = 4 << 28;
-    public static final int KM_ULONG = 5 << 28;
-    public static final int KM_DATE = 6 << 28;
-    public static final int KM_BOOL = 7 << 28;
-    public static final int KM_BIGNUM = 8 << 28;
-    public static final int KM_BYTES = 9 << 28;
-    public static final int KM_ULONG_REP = 10 << 28;
+    public static final int KM_INVALID = TagType.INVALID;
+    public static final int KM_ENUM = TagType.ENUM;
+    public static final int KM_ENUM_REP = TagType.ENUM_REP;
+    public static final int KM_UINT = TagType.UINT;
+    public static final int KM_UINT_REP = TagType.UINT_REP;
+    public static final int KM_ULONG = TagType.ULONG;
+    public static final int KM_DATE = TagType.DATE;
+    public static final int KM_BOOL = TagType.BOOL;
+    public static final int KM_BIGNUM = TagType.BIGNUM;
+    public static final int KM_BYTES = TagType.BYTES;
+    public static final int KM_ULONG_REP = TagType.ULONG_REP;
 
     // Tag values.
-    public static final int KM_TAG_INVALID = KM_INVALID | 0;
-    public static final int KM_TAG_PURPOSE = KM_ENUM_REP | 1;
-    public static final int KM_TAG_ALGORITHM = KM_ENUM | 2;
-    public static final int KM_TAG_KEY_SIZE = KM_UINT | 3;
-    public static final int KM_TAG_BLOCK_MODE = KM_ENUM_REP | 4;
-    public static final int KM_TAG_DIGEST = KM_ENUM_REP | 5;
-    public static final int KM_TAG_PADDING = KM_ENUM_REP | 6;
-    public static final int KM_TAG_CALLER_NONCE = KM_BOOL | 7;
-    public static final int KM_TAG_MIN_MAC_LENGTH = KM_UINT | 8;
+    public static final int KM_TAG_INVALID = Tag.INVALID; // KM_INVALID | 0;
+    public static final int KM_TAG_PURPOSE = Tag.PURPOSE; // KM_ENUM_REP | 1;
+    public static final int KM_TAG_ALGORITHM = Tag.ALGORITHM; // KM_ENUM | 2;
+    public static final int KM_TAG_KEY_SIZE = Tag.KEY_SIZE; // KM_UINT | 3;
+    public static final int KM_TAG_BLOCK_MODE = Tag.BLOCK_MODE; // KM_ENUM_REP | 4;
+    public static final int KM_TAG_DIGEST = Tag.DIGEST; // KM_ENUM_REP | 5;
+    public static final int KM_TAG_PADDING = Tag.PADDING; // KM_ENUM_REP | 6;
+    public static final int KM_TAG_CALLER_NONCE = Tag.CALLER_NONCE; // KM_BOOL | 7;
+    public static final int KM_TAG_MIN_MAC_LENGTH = Tag.MIN_MAC_LENGTH; // KM_UINT | 8;
 
-    public static final int KM_TAG_RESCOPING_ADD = KM_ENUM_REP | 101;
-    public static final int KM_TAG_RESCOPING_DEL = KM_ENUM_REP | 102;
-    public static final int KM_TAG_BLOB_USAGE_REQUIREMENTS = KM_ENUM | 705;
+    public static final int KM_TAG_BLOB_USAGE_REQUIREMENTS =
+            Tag.BLOB_USAGE_REQUIREMENTS; // KM_ENUM | 705;
 
-    public static final int KM_TAG_RSA_PUBLIC_EXPONENT = KM_ULONG | 200;
-    public static final int KM_TAG_INCLUDE_UNIQUE_ID = KM_BOOL | 202;
+    public static final int KM_TAG_RSA_PUBLIC_EXPONENT = Tag.RSA_PUBLIC_EXPONENT; // KM_ULONG | 200;
+    public static final int KM_TAG_INCLUDE_UNIQUE_ID = Tag.INCLUDE_UNIQUE_ID; // KM_BOOL | 202;
 
-    public static final int KM_TAG_ACTIVE_DATETIME = KM_DATE | 400;
-    public static final int KM_TAG_ORIGINATION_EXPIRE_DATETIME = KM_DATE | 401;
-    public static final int KM_TAG_USAGE_EXPIRE_DATETIME = KM_DATE | 402;
-    public static final int KM_TAG_MIN_SECONDS_BETWEEN_OPS = KM_UINT | 403;
-    public static final int KM_TAG_MAX_USES_PER_BOOT = KM_UINT | 404;
+    public static final int KM_TAG_ACTIVE_DATETIME = Tag.ACTIVE_DATETIME; // KM_DATE | 400;
+    public static final int KM_TAG_ORIGINATION_EXPIRE_DATETIME =
+            Tag.ORIGINATION_EXPIRE_DATETIME; // KM_DATE | 401;
+    public static final int KM_TAG_USAGE_EXPIRE_DATETIME =
+            Tag.USAGE_EXPIRE_DATETIME; // KM_DATE | 402;
+    public static final int KM_TAG_MIN_SECONDS_BETWEEN_OPS =
+            Tag.MIN_SECONDS_BETWEEN_OPS; // KM_UINT | 403;
+    public static final int KM_TAG_MAX_USES_PER_BOOT = Tag.MAX_USES_PER_BOOT; // KM_UINT | 404;
 
-    public static final int KM_TAG_ALL_USERS = KM_BOOL | 500;
-    public static final int KM_TAG_USER_ID = KM_UINT | 501;
-    public static final int KM_TAG_USER_SECURE_ID = KM_ULONG_REP | 502;
-    public static final int KM_TAG_NO_AUTH_REQUIRED = KM_BOOL | 503;
-    public static final int KM_TAG_USER_AUTH_TYPE = KM_ENUM | 504;
-    public static final int KM_TAG_AUTH_TIMEOUT = KM_UINT | 505;
-    public static final int KM_TAG_ALLOW_WHILE_ON_BODY = KM_BOOL | 506;
-    public static final int KM_TAG_TRUSTED_USER_PRESENCE_REQUIRED = KM_BOOL | 507;
-    public static final int KM_TAG_TRUSTED_CONFIRMATION_REQUIRED = KM_BOOL | 508;
-    public static final int KM_TAG_UNLOCKED_DEVICE_REQUIRED = KM_BOOL | 509;
+    public static final int KM_TAG_USER_ID = Tag.USER_ID; // KM_UINT | 501;
+    public static final int KM_TAG_USER_SECURE_ID = Tag.USER_SECURE_ID; // KM_ULONG_REP | 502;
+    public static final int KM_TAG_NO_AUTH_REQUIRED = Tag.NO_AUTH_REQUIRED; // KM_BOOL | 503;
+    public static final int KM_TAG_USER_AUTH_TYPE = Tag.USER_AUTH_TYPE; // KM_ENUM | 504;
+    public static final int KM_TAG_AUTH_TIMEOUT = Tag.AUTH_TIMEOUT; // KM_UINT | 505;
+    public static final int KM_TAG_ALLOW_WHILE_ON_BODY = Tag.ALLOW_WHILE_ON_BODY; // KM_BOOL | 506;
+    public static final int KM_TAG_TRUSTED_USER_PRESENCE_REQUIRED =
+            Tag.TRUSTED_USER_PRESENCE_REQUIRED; // KM_BOOL | 507;
+    public static final int KM_TAG_TRUSTED_CONFIRMATION_REQUIRED =
+            Tag.TRUSTED_CONFIRMATION_REQUIRED; // KM_BOOL | 508;
+    public static final int KM_TAG_UNLOCKED_DEVICE_REQUIRED =
+            Tag.UNLOCKED_DEVICE_REQUIRED; // KM_BOOL | 509;
 
-    public static final int KM_TAG_ALL_APPLICATIONS = KM_BOOL | 600;
-    public static final int KM_TAG_APPLICATION_ID = KM_BYTES | 601;
+    public static final int KM_TAG_APPLICATION_ID = Tag.APPLICATION_ID; // KM_BYTES | 601;
 
-    public static final int KM_TAG_CREATION_DATETIME = KM_DATE | 701;
-    public static final int KM_TAG_ORIGIN = KM_ENUM | 702;
-    public static final int KM_TAG_ROLLBACK_RESISTANT = KM_BOOL | 703;
-    public static final int KM_TAG_ROOT_OF_TRUST = KM_BYTES | 704;
-    public static final int KM_TAG_UNIQUE_ID = KM_BYTES | 707;
-    public static final int KM_TAG_ATTESTATION_CHALLENGE = KM_BYTES | 708;
-    public static final int KM_TAG_ATTESTATION_ID_BRAND = KM_BYTES | 710;
-    public static final int KM_TAG_ATTESTATION_ID_DEVICE = KM_BYTES | 711;
-    public static final int KM_TAG_ATTESTATION_ID_PRODUCT = KM_BYTES | 712;
-    public static final int KM_TAG_ATTESTATION_ID_SERIAL = KM_BYTES | 713;
-    public static final int KM_TAG_ATTESTATION_ID_IMEI = KM_BYTES | 714;
-    public static final int KM_TAG_ATTESTATION_ID_MEID = KM_BYTES | 715;
-    public static final int KM_TAG_ATTESTATION_ID_MANUFACTURER = KM_BYTES | 716;
-    public static final int KM_TAG_ATTESTATION_ID_MODEL = KM_BYTES | 717;
-    public static final int KM_TAG_DEVICE_UNIQUE_ATTESTATION = KM_BOOL | 720;
+    public static final int KM_TAG_CREATION_DATETIME = Tag.CREATION_DATETIME; // KM_DATE | 701;
+    public static final int KM_TAG_ORIGIN = Tag.ORIGIN; // KM_ENUM | 702;
+    public static final int KM_TAG_ROLLBACK_RESISTANT = Tag.ROLLBACK_RESISTANCE; // KM_BOOL | 703;
+    public static final int KM_TAG_ROOT_OF_TRUST = Tag.ROOT_OF_TRUST; // KM_BYTES | 704;
+    public static final int KM_TAG_UNIQUE_ID = Tag.UNIQUE_ID; // KM_BYTES | 707;
+    public static final int KM_TAG_ATTESTATION_CHALLENGE =
+            Tag.ATTESTATION_CHALLENGE; // KM_BYTES | 708;
+    public static final int KM_TAG_ATTESTATION_ID_BRAND =
+            Tag.ATTESTATION_ID_BRAND; // KM_BYTES | 710;
+    public static final int KM_TAG_ATTESTATION_ID_DEVICE =
+            Tag.ATTESTATION_ID_DEVICE; // KM_BYTES | 711;
+    public static final int KM_TAG_ATTESTATION_ID_PRODUCT =
+            Tag.ATTESTATION_ID_PRODUCT; // KM_BYTES | 712;
+    public static final int KM_TAG_ATTESTATION_ID_SERIAL =
+            Tag.ATTESTATION_ID_SERIAL; // KM_BYTES | 713;
+    public static final int KM_TAG_ATTESTATION_ID_IMEI =
+            Tag.ATTESTATION_ID_IMEI; // KM_BYTES | 714;
+    public static final int KM_TAG_ATTESTATION_ID_MEID =
+            Tag.ATTESTATION_ID_MEID; // KM_BYTES | 715;
+    public static final int KM_TAG_ATTESTATION_ID_MANUFACTURER =
+            Tag.ATTESTATION_ID_MANUFACTURER; // KM_BYTES | 716;
+    public static final int KM_TAG_ATTESTATION_ID_MODEL =
+            Tag.ATTESTATION_ID_MODEL; // KM_BYTES | 717;
+    public static final int KM_TAG_VENDOR_PATCHLEVEL =
+            Tag.VENDOR_PATCHLEVEL; // KM_UINT | 718;
+    public static final int KM_TAG_BOOT_PATCHLEVEL =
+            Tag.BOOT_PATCHLEVEL; // KM_UINT | 719;
+    public static final int KM_TAG_DEVICE_UNIQUE_ATTESTATION =
+            Tag.DEVICE_UNIQUE_ATTESTATION; // KM_BOOL | 720;
 
-    public static final int KM_TAG_ASSOCIATED_DATA = KM_BYTES | 1000;
-    public static final int KM_TAG_NONCE = KM_BYTES | 1001;
-    public static final int KM_TAG_AUTH_TOKEN = KM_BYTES | 1002;
-    public static final int KM_TAG_MAC_LENGTH = KM_UINT | 1003;
+    public static final int KM_TAG_ASSOCIATED_DATA = Tag.ASSOCIATED_DATA; // KM_BYTES | 1000;
+    public static final int KM_TAG_NONCE = Tag.NONCE; // KM_BYTES | 1001;
+    public static final int KM_TAG_MAC_LENGTH = Tag.MAC_LENGTH; // KM_UINT | 1003;
 
     // Algorithm values.
-    public static final int KM_ALGORITHM_RSA = 1;
-    public static final int KM_ALGORITHM_EC = 3;
-    public static final int KM_ALGORITHM_AES = 32;
-    public static final int KM_ALGORITHM_3DES = 33;
-    public static final int KM_ALGORITHM_HMAC = 128;
+    public static final int KM_ALGORITHM_RSA = Algorithm.RSA;
+    public static final int KM_ALGORITHM_EC = Algorithm.EC;
+    public static final int KM_ALGORITHM_AES = Algorithm.AES;
+    public static final int KM_ALGORITHM_3DES = Algorithm.TRIPLE_DES;
+    public static final int KM_ALGORITHM_HMAC = Algorithm.HMAC;
 
     // Block modes.
-    public static final int KM_MODE_ECB = 1;
-    public static final int KM_MODE_CBC = 2;
-    public static final int KM_MODE_CTR = 3;
-    public static final int KM_MODE_GCM = 32;
+    public static final int KM_MODE_ECB = BlockMode.ECB;
+    public static final int KM_MODE_CBC = BlockMode.CBC;
+    public static final int KM_MODE_CTR = BlockMode.CTR;
+    public static final int KM_MODE_GCM = BlockMode.GCM;
 
     // Padding modes.
-    public static final int KM_PAD_NONE = 1;
-    public static final int KM_PAD_RSA_OAEP = 2;
-    public static final int KM_PAD_RSA_PSS = 3;
-    public static final int KM_PAD_RSA_PKCS1_1_5_ENCRYPT = 4;
-    public static final int KM_PAD_RSA_PKCS1_1_5_SIGN = 5;
-    public static final int KM_PAD_PKCS7 = 64;
+    public static final int KM_PAD_NONE = PaddingMode.NONE;
+    public static final int KM_PAD_RSA_OAEP = PaddingMode.RSA_OAEP;
+    public static final int KM_PAD_RSA_PSS = PaddingMode.RSA_PSS;
+    public static final int KM_PAD_RSA_PKCS1_1_5_ENCRYPT = PaddingMode.RSA_PKCS1_1_5_ENCRYPT;
+    public static final int KM_PAD_RSA_PKCS1_1_5_SIGN = PaddingMode.RSA_PKCS1_1_5_SIGN;
+    public static final int KM_PAD_PKCS7 = PaddingMode.PKCS7;
 
     // Digest modes.
-    public static final int KM_DIGEST_NONE = 0;
-    public static final int KM_DIGEST_MD5 = 1;
-    public static final int KM_DIGEST_SHA1 = 2;
-    public static final int KM_DIGEST_SHA_2_224 = 3;
-    public static final int KM_DIGEST_SHA_2_256 = 4;
-    public static final int KM_DIGEST_SHA_2_384 = 5;
-    public static final int KM_DIGEST_SHA_2_512 = 6;
+    public static final int KM_DIGEST_NONE = Digest.NONE;
+    public static final int KM_DIGEST_MD5 = Digest.MD5;
+    public static final int KM_DIGEST_SHA1 = Digest.SHA1;
+    public static final int KM_DIGEST_SHA_2_224 = Digest.SHA_2_224;
+    public static final int KM_DIGEST_SHA_2_256 = Digest.SHA_2_256;
+    public static final int KM_DIGEST_SHA_2_384 = Digest.SHA_2_384;
+    public static final int KM_DIGEST_SHA_2_512 = Digest.SHA_2_512;
 
     // Key origins.
-    public static final int KM_ORIGIN_GENERATED = 0;
-    public static final int KM_ORIGIN_IMPORTED = 2;
-    public static final int KM_ORIGIN_UNKNOWN = 3;
-    public static final int KM_ORIGIN_SECURELY_IMPORTED = 4;
+    public static final int KM_ORIGIN_GENERATED = KeyOrigin.GENERATED;
+    public static final int KM_ORIGIN_DERIVED = KeyOrigin.DERIVED;
+    public static final int KM_ORIGIN_IMPORTED = KeyOrigin.IMPORTED;
+    public static final int KM_ORIGIN_UNKNOWN = KeyOrigin.RESERVED;
+    public static final int KM_ORIGIN_SECURELY_IMPORTED = KeyOrigin.SECURELY_IMPORTED;
 
     // Key usability requirements.
     public static final int KM_BLOB_STANDALONE = 0;
     public static final int KM_BLOB_REQUIRES_FILE_SYSTEM = 1;
 
     // Operation Purposes.
-    public static final int KM_PURPOSE_ENCRYPT = 0;
-    public static final int KM_PURPOSE_DECRYPT = 1;
-    public static final int KM_PURPOSE_SIGN = 2;
-    public static final int KM_PURPOSE_VERIFY = 3;
-    public static final int KM_PURPOSE_WRAP = 5;
+    public static final int KM_PURPOSE_ENCRYPT = KeyPurpose.ENCRYPT;
+    public static final int KM_PURPOSE_DECRYPT = KeyPurpose.DECRYPT;
+    public static final int KM_PURPOSE_SIGN = KeyPurpose.SIGN;
+    public static final int KM_PURPOSE_VERIFY = KeyPurpose.VERIFY;
+    public static final int KM_PURPOSE_WRAP = KeyPurpose.WRAP_KEY;
 
     // Key formats.
-    public static final int KM_KEY_FORMAT_X509 = 0;
-    public static final int KM_KEY_FORMAT_PKCS8 = 1;
-    public static final int KM_KEY_FORMAT_RAW = 3;
+    public static final int KM_KEY_FORMAT_X509 = KeyFormat.X509;
+    public static final int KM_KEY_FORMAT_PKCS8 = KeyFormat.PKCS8;
+    public static final int KM_KEY_FORMAT_RAW = KeyFormat.RAW;
 
     // User authenticators.
-    public static final int HW_AUTH_PASSWORD = 1 << 0;
-    public static final int HW_AUTH_BIOMETRIC = 1 << 1;
+    public static final int HW_AUTH_PASSWORD = HardwareAuthenticatorType.PASSWORD;
+    public static final int HW_AUTH_BIOMETRIC = HardwareAuthenticatorType.FINGERPRINT;
 
     // Security Levels.
-    public static final int KM_SECURITY_LEVEL_SOFTWARE = 0;
-    public static final int KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT = 1;
-    public static final int KM_SECURITY_LEVEL_STRONGBOX = 2;
+    public static final int KM_SECURITY_LEVEL_SOFTWARE = SecurityLevel.SOFTWARE;
+    public static final int KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT =
+            SecurityLevel.TRUSTED_ENVIRONMENT;
+    public static final int KM_SECURITY_LEVEL_STRONGBOX = SecurityLevel.STRONGBOX;
 
     // Error codes.
-    public static final int KM_ERROR_OK = 0;
-    public static final int KM_ERROR_ROOT_OF_TRUST_ALREADY_SET = -1;
-    public static final int KM_ERROR_UNSUPPORTED_PURPOSE = -2;
-    public static final int KM_ERROR_INCOMPATIBLE_PURPOSE = -3;
-    public static final int KM_ERROR_UNSUPPORTED_ALGORITHM = -4;
-    public static final int KM_ERROR_INCOMPATIBLE_ALGORITHM = -5;
-    public static final int KM_ERROR_UNSUPPORTED_KEY_SIZE = -6;
-    public static final int KM_ERROR_UNSUPPORTED_BLOCK_MODE = -7;
-    public static final int KM_ERROR_INCOMPATIBLE_BLOCK_MODE = -8;
-    public static final int KM_ERROR_UNSUPPORTED_MAC_LENGTH = -9;
-    public static final int KM_ERROR_UNSUPPORTED_PADDING_MODE = -10;
-    public static final int KM_ERROR_INCOMPATIBLE_PADDING_MODE = -11;
-    public static final int KM_ERROR_UNSUPPORTED_DIGEST = -12;
-    public static final int KM_ERROR_INCOMPATIBLE_DIGEST = -13;
-    public static final int KM_ERROR_INVALID_EXPIRATION_TIME = -14;
-    public static final int KM_ERROR_INVALID_USER_ID = -15;
-    public static final int KM_ERROR_INVALID_AUTHORIZATION_TIMEOUT = -16;
-    public static final int KM_ERROR_UNSUPPORTED_KEY_FORMAT = -17;
-    public static final int KM_ERROR_INCOMPATIBLE_KEY_FORMAT = -18;
-    public static final int KM_ERROR_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM = -19;
-    public static final int KM_ERROR_UNSUPPORTED_KEY_VERIFICATION_ALGORITHM = -20;
-    public static final int KM_ERROR_INVALID_INPUT_LENGTH = -21;
-    public static final int KM_ERROR_KEY_EXPORT_OPTIONS_INVALID = -22;
-    public static final int KM_ERROR_DELEGATION_NOT_ALLOWED = -23;
-    public static final int KM_ERROR_KEY_NOT_YET_VALID = -24;
-    public static final int KM_ERROR_KEY_EXPIRED = -25;
-    public static final int KM_ERROR_KEY_USER_NOT_AUTHENTICATED = -26;
-    public static final int KM_ERROR_OUTPUT_PARAMETER_NULL = -27;
-    public static final int KM_ERROR_INVALID_OPERATION_HANDLE = -28;
-    public static final int KM_ERROR_INSUFFICIENT_BUFFER_SPACE = -29;
-    public static final int KM_ERROR_VERIFICATION_FAILED = -30;
-    public static final int KM_ERROR_TOO_MANY_OPERATIONS = -31;
-    public static final int KM_ERROR_UNEXPECTED_NULL_POINTER = -32;
-    public static final int KM_ERROR_INVALID_KEY_BLOB = -33;
-    public static final int KM_ERROR_IMPORTED_KEY_NOT_ENCRYPTED = -34;
-    public static final int KM_ERROR_IMPORTED_KEY_DECRYPTION_FAILED = -35;
-    public static final int KM_ERROR_IMPORTED_KEY_NOT_SIGNED = -36;
-    public static final int KM_ERROR_IMPORTED_KEY_VERIFICATION_FAILED = -37;
-    public static final int KM_ERROR_INVALID_ARGUMENT = -38;
-    public static final int KM_ERROR_UNSUPPORTED_TAG = -39;
-    public static final int KM_ERROR_INVALID_TAG = -40;
-    public static final int KM_ERROR_MEMORY_ALLOCATION_FAILED = -41;
-    public static final int KM_ERROR_INVALID_RESCOPING = -42;
-    public static final int KM_ERROR_IMPORT_PARAMETER_MISMATCH = -44;
-    public static final int KM_ERROR_SECURE_HW_ACCESS_DENIED = -45;
-    public static final int KM_ERROR_OPERATION_CANCELLED = -46;
-    public static final int KM_ERROR_CONCURRENT_ACCESS_CONFLICT = -47;
-    public static final int KM_ERROR_SECURE_HW_BUSY = -48;
-    public static final int KM_ERROR_SECURE_HW_COMMUNICATION_FAILED = -49;
-    public static final int KM_ERROR_UNSUPPORTED_EC_FIELD = -50;
-    public static final int KM_ERROR_MISSING_NONCE = -51;
-    public static final int KM_ERROR_INVALID_NONCE = -52;
-    public static final int KM_ERROR_MISSING_MAC_LENGTH = -53;
-    public static final int KM_ERROR_KEY_RATE_LIMIT_EXCEEDED = -54;
-    public static final int KM_ERROR_CALLER_NONCE_PROHIBITED = -55;
-    public static final int KM_ERROR_KEY_MAX_OPS_EXCEEDED = -56;
-    public static final int KM_ERROR_INVALID_MAC_LENGTH = -57;
-    public static final int KM_ERROR_MISSING_MIN_MAC_LENGTH = -58;
-    public static final int KM_ERROR_UNSUPPORTED_MIN_MAC_LENGTH = -59;
-    public static final int KM_ERROR_CANNOT_ATTEST_IDS = -66;
-    public static final int KM_ERROR_HARDWARE_TYPE_UNAVAILABLE = -68;
-    public static final int KM_ERROR_DEVICE_LOCKED = -72;
-    public static final int KM_ERROR_UNIMPLEMENTED = -100;
-    public static final int KM_ERROR_VERSION_MISMATCH = -101;
-    public static final int KM_ERROR_UNKNOWN_ERROR = -1000;
+    public static final int KM_ERROR_OK = ErrorCode.OK;
+    public static final int KM_ERROR_ROOT_OF_TRUST_ALREADY_SET =
+            ErrorCode.ROOT_OF_TRUST_ALREADY_SET; // -1;
+    public static final int KM_ERROR_UNSUPPORTED_PURPOSE =
+            ErrorCode.UNSUPPORTED_PURPOSE; // -2;
+    public static final int KM_ERROR_INCOMPATIBLE_PURPOSE =
+            ErrorCode.INCOMPATIBLE_PURPOSE; // -3;
+    public static final int KM_ERROR_UNSUPPORTED_ALGORITHM =
+            ErrorCode.UNSUPPORTED_ALGORITHM; // -4;
+    public static final int KM_ERROR_INCOMPATIBLE_ALGORITHM =
+            ErrorCode.INCOMPATIBLE_ALGORITHM; // -5;
+    public static final int KM_ERROR_UNSUPPORTED_KEY_SIZE =
+            ErrorCode.UNSUPPORTED_KEY_SIZE; // -6;
+    public static final int KM_ERROR_UNSUPPORTED_BLOCK_MODE =
+            ErrorCode.UNSUPPORTED_BLOCK_MODE; // -7;
+    public static final int KM_ERROR_INCOMPATIBLE_BLOCK_MODE =
+            ErrorCode.INCOMPATIBLE_BLOCK_MODE; // -8;
+    public static final int KM_ERROR_UNSUPPORTED_MAC_LENGTH =
+            ErrorCode.UNSUPPORTED_MAC_LENGTH; // -9;
+    public static final int KM_ERROR_UNSUPPORTED_PADDING_MODE =
+            ErrorCode.UNSUPPORTED_PADDING_MODE; // -10;
+    public static final int KM_ERROR_INCOMPATIBLE_PADDING_MODE =
+            ErrorCode.INCOMPATIBLE_PADDING_MODE; // -11;
+    public static final int KM_ERROR_UNSUPPORTED_DIGEST =
+            ErrorCode.UNSUPPORTED_DIGEST; // -12;
+    public static final int KM_ERROR_INCOMPATIBLE_DIGEST =
+            ErrorCode.INCOMPATIBLE_DIGEST; // -13;
+    public static final int KM_ERROR_INVALID_EXPIRATION_TIME =
+            ErrorCode.INVALID_EXPIRATION_TIME; // -14;
+    public static final int KM_ERROR_INVALID_USER_ID =
+            ErrorCode.INVALID_USER_ID; // -15;
+    public static final int KM_ERROR_INVALID_AUTHORIZATION_TIMEOUT =
+            ErrorCode.INVALID_AUTHORIZATION_TIMEOUT; // -16;
+    public static final int KM_ERROR_UNSUPPORTED_KEY_FORMAT =
+            ErrorCode.UNSUPPORTED_KEY_FORMAT; // -17;
+    public static final int KM_ERROR_INCOMPATIBLE_KEY_FORMAT =
+            ErrorCode.INCOMPATIBLE_KEY_FORMAT; // -18;
+    public static final int KM_ERROR_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM =
+            ErrorCode.UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM; // -19;
+    public static final int KM_ERROR_UNSUPPORTED_KEY_VERIFICATION_ALGORITHM =
+            ErrorCode.UNSUPPORTED_KEY_VERIFICATION_ALGORITHM; // -20;
+    public static final int KM_ERROR_INVALID_INPUT_LENGTH =
+            ErrorCode.INVALID_INPUT_LENGTH; // -21;
+    public static final int KM_ERROR_KEY_EXPORT_OPTIONS_INVALID =
+            ErrorCode.KEY_EXPORT_OPTIONS_INVALID; // -22;
+    public static final int KM_ERROR_DELEGATION_NOT_ALLOWED =
+            ErrorCode.DELEGATION_NOT_ALLOWED; // -23;
+    public static final int KM_ERROR_KEY_NOT_YET_VALID =
+            ErrorCode.KEY_NOT_YET_VALID; // -24;
+    public static final int KM_ERROR_KEY_EXPIRED =
+            ErrorCode.KEY_EXPIRED; // -25;
+    public static final int KM_ERROR_KEY_USER_NOT_AUTHENTICATED =
+            ErrorCode.KEY_USER_NOT_AUTHENTICATED; // -26;
+    public static final int KM_ERROR_OUTPUT_PARAMETER_NULL =
+            ErrorCode.OUTPUT_PARAMETER_NULL; // -27;
+    public static final int KM_ERROR_INVALID_OPERATION_HANDLE =
+            ErrorCode.INVALID_OPERATION_HANDLE; // -28;
+    public static final int KM_ERROR_INSUFFICIENT_BUFFER_SPACE =
+            ErrorCode.INSUFFICIENT_BUFFER_SPACE; // -29;
+    public static final int KM_ERROR_VERIFICATION_FAILED =
+            ErrorCode.VERIFICATION_FAILED; // -30;
+    public static final int KM_ERROR_TOO_MANY_OPERATIONS =
+            ErrorCode.TOO_MANY_OPERATIONS; // -31;
+    public static final int KM_ERROR_UNEXPECTED_NULL_POINTER =
+            ErrorCode.UNEXPECTED_NULL_POINTER; // -32;
+    public static final int KM_ERROR_INVALID_KEY_BLOB =
+            ErrorCode.INVALID_KEY_BLOB; // -33;
+    public static final int KM_ERROR_IMPORTED_KEY_NOT_ENCRYPTED =
+            ErrorCode.IMPORTED_KEY_NOT_ENCRYPTED; // -34;
+    public static final int KM_ERROR_IMPORTED_KEY_DECRYPTION_FAILED =
+            ErrorCode.IMPORTED_KEY_DECRYPTION_FAILED; // -35;
+    public static final int KM_ERROR_IMPORTED_KEY_NOT_SIGNED =
+            ErrorCode.IMPORTED_KEY_NOT_SIGNED; // -36;
+    public static final int KM_ERROR_IMPORTED_KEY_VERIFICATION_FAILED =
+            ErrorCode.IMPORTED_KEY_VERIFICATION_FAILED; // -37;
+    public static final int KM_ERROR_INVALID_ARGUMENT =
+            ErrorCode.INVALID_ARGUMENT; // -38;
+    public static final int KM_ERROR_UNSUPPORTED_TAG =
+            ErrorCode.UNSUPPORTED_TAG; // -39;
+    public static final int KM_ERROR_INVALID_TAG =
+            ErrorCode.INVALID_TAG; // -40;
+    public static final int KM_ERROR_MEMORY_ALLOCATION_FAILED =
+            ErrorCode.MEMORY_ALLOCATION_FAILED; // -41;
+    public static final int KM_ERROR_IMPORT_PARAMETER_MISMATCH =
+            ErrorCode.IMPORT_PARAMETER_MISMATCH; // -44;
+    public static final int KM_ERROR_SECURE_HW_ACCESS_DENIED =
+            ErrorCode.SECURE_HW_ACCESS_DENIED; // -45;
+    public static final int KM_ERROR_OPERATION_CANCELLED =
+            ErrorCode.OPERATION_CANCELLED; // -46;
+    public static final int KM_ERROR_CONCURRENT_ACCESS_CONFLICT =
+            ErrorCode.CONCURRENT_ACCESS_CONFLICT; // -47;
+    public static final int KM_ERROR_SECURE_HW_BUSY =
+            ErrorCode.SECURE_HW_BUSY; // -48;
+    public static final int KM_ERROR_SECURE_HW_COMMUNICATION_FAILED =
+            ErrorCode.SECURE_HW_COMMUNICATION_FAILED; // -49;
+    public static final int KM_ERROR_UNSUPPORTED_EC_FIELD =
+            ErrorCode.UNSUPPORTED_EC_FIELD; // -50;
+    public static final int KM_ERROR_MISSING_NONCE =
+            ErrorCode.MISSING_NONCE; // -51;
+    public static final int KM_ERROR_INVALID_NONCE =
+            ErrorCode.INVALID_NONCE; // -52;
+    public static final int KM_ERROR_MISSING_MAC_LENGTH =
+            ErrorCode.MISSING_MAC_LENGTH; // -53;
+    public static final int KM_ERROR_KEY_RATE_LIMIT_EXCEEDED =
+            ErrorCode.KEY_RATE_LIMIT_EXCEEDED; // -54;
+    public static final int KM_ERROR_CALLER_NONCE_PROHIBITED =
+            ErrorCode.CALLER_NONCE_PROHIBITED; // -55;
+    public static final int KM_ERROR_KEY_MAX_OPS_EXCEEDED =
+            ErrorCode.KEY_MAX_OPS_EXCEEDED; // -56;
+    public static final int KM_ERROR_INVALID_MAC_LENGTH =
+            ErrorCode.INVALID_MAC_LENGTH; // -57;
+    public static final int KM_ERROR_MISSING_MIN_MAC_LENGTH =
+            ErrorCode.MISSING_MIN_MAC_LENGTH; // -58;
+    public static final int KM_ERROR_UNSUPPORTED_MIN_MAC_LENGTH =
+            ErrorCode.UNSUPPORTED_MIN_MAC_LENGTH; // -59;
+    public static final int KM_ERROR_CANNOT_ATTEST_IDS =
+            ErrorCode.CANNOT_ATTEST_IDS; // -66;
+    public static final int KM_ERROR_HARDWARE_TYPE_UNAVAILABLE =
+            ErrorCode.HARDWARE_TYPE_UNAVAILABLE; // -68;
+    public static final int KM_ERROR_DEVICE_LOCKED =
+            ErrorCode.DEVICE_LOCKED; // -72;
+    public static final int KM_ERROR_UNIMPLEMENTED =
+            ErrorCode.UNIMPLEMENTED; // -100;
+    public static final int KM_ERROR_VERSION_MISMATCH =
+            ErrorCode.VERSION_MISMATCH; // -101;
+    public static final int KM_ERROR_UNKNOWN_ERROR =
+            ErrorCode.UNKNOWN_ERROR; // -1000;
 
     public static final Map<Integer, String> sErrorCodeToString = new HashMap<Integer, String>();
     static {
diff --git a/core/java/android/security/keymaster/OWNERS b/core/java/android/security/keymaster/OWNERS
new file mode 100644
index 0000000..65129a4
--- /dev/null
+++ b/core/java/android/security/keymaster/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 189335
+
+swillden@google.com
+jdanis@google.com
+jbires@google.com
diff --git a/core/java/android/security/keystore/OWNERS b/core/java/android/security/keystore/OWNERS
index bb487fb..65129a4 100644
--- a/core/java/android/security/keystore/OWNERS
+++ b/core/java/android/security/keystore/OWNERS
@@ -1,4 +1,5 @@
-aseemk@google.com
-bozhu@google.com
-dementyev@google.com
-robertberry@google.com
+# Bug component: 189335
+
+swillden@google.com
+jdanis@google.com
+jbires@google.com
diff --git a/core/java/android/security/keystore/recovery/OWNERS b/core/java/android/security/keystore/recovery/OWNERS
new file mode 100644
index 0000000..65129a4
--- /dev/null
+++ b/core/java/android/security/keystore/recovery/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 189335
+
+swillden@google.com
+jdanis@google.com
+jbires@google.com
diff --git a/core/java/android/security/net/OWNERS b/core/java/android/security/net/OWNERS
new file mode 100644
index 0000000..d828164
--- /dev/null
+++ b/core/java/android/security/net/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 36824
+
+cbrubaker@google.com
+brambonne@google.com
diff --git a/core/java/android/security/net/config/OWNERS b/core/java/android/security/net/config/OWNERS
index 5350373..85ce3c6 100644
--- a/core/java/android/security/net/config/OWNERS
+++ b/core/java/android/security/net/config/OWNERS
@@ -1,3 +1,5 @@
+# Bug component: 36824
 set noparent
+
 cbrubaker@google.com
-klyubin@google.com
+brambonne@google.com
diff --git a/core/java/android/service/appprediction/OWNERS b/core/java/android/service/appprediction/OWNERS
new file mode 100644
index 0000000..fe012da
--- /dev/null
+++ b/core/java/android/service/appprediction/OWNERS
@@ -0,0 +1,2 @@
+adamcohen@google.com
+sunnygoyal@google.com
diff --git a/core/java/android/service/attention/OWNERS b/core/java/android/service/attention/OWNERS
new file mode 100644
index 0000000..dd579b6
--- /dev/null
+++ b/core/java/android/service/attention/OWNERS
@@ -0,0 +1 @@
+asalo@google.com
diff --git a/core/java/android/service/autofill/InlinePresentation.java b/core/java/android/service/autofill/InlinePresentation.java
index 91416948..6eb2a15 100644
--- a/core/java/android/service/autofill/InlinePresentation.java
+++ b/core/java/android/service/autofill/InlinePresentation.java
@@ -40,6 +40,11 @@
 
     /**
      * Represents the UI content and the action for the inline suggestion.
+     *
+     * <p>The Slice should be constructed using the Content builder provided in the androidx
+     * autofill library e.g. {@code androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder}
+     * and then converted to a Slice with
+     * {@code androidx.autofill.inline.UiVersions.Content#getSlice()}.</p>
      */
     private final @NonNull Slice mSlice;
 
@@ -90,6 +95,11 @@
      *
      * @param slice
      *   Represents the UI content and the action for the inline suggestion.
+     *
+     *   <p>The Slice should be constructed using the Content builder provided in the androidx
+     *   autofill library e.g. {@code androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder}
+     *   and then converted to a Slice with
+     *   {@code androidx.autofill.inline.UiVersions.Content#getSlice()}.</p>
      * @param inlinePresentationSpec
      *   Specifies the UI specification for the inline suggestion.
      * @param pinned
@@ -118,6 +128,11 @@
 
     /**
      * Represents the UI content and the action for the inline suggestion.
+     *
+     * <p>The Slice should be constructed using the Content builder provided in the androidx
+     * autofill library e.g. {@code androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder}
+     * and then converted to a Slice with
+     * {@code androidx.autofill.inline.UiVersions.Content#getSlice()}.</p>
      */
     @DataClass.Generated.Member
     public @NonNull Slice getSlice() {
@@ -244,7 +259,7 @@
     };
 
     @DataClass.Generated(
-            time = 1593131904745L,
+            time = 1596484869201L,
             codegenVersion = "1.0.15",
             sourceFile = "frameworks/base/core/java/android/service/autofill/InlinePresentation.java",
             inputSignatures = "private final @android.annotation.NonNull android.app.slice.Slice mSlice\nprivate final @android.annotation.NonNull android.widget.inline.InlinePresentationSpec mInlinePresentationSpec\nprivate final  boolean mPinned\npublic @android.annotation.NonNull @android.annotation.Size(min=0L) java.lang.String[] getAutofillHints()\nclass InlinePresentation extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genHiddenConstDefs=true, genEqualsHashCode=true)")
diff --git a/core/java/android/service/autofill/OWNERS b/core/java/android/service/autofill/OWNERS
new file mode 100644
index 0000000..a088632
--- /dev/null
+++ b/core/java/android/service/autofill/OWNERS
@@ -0,0 +1,9 @@
+# Bug component: 351486
+
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/service/autofill/augmented/OWNERS b/core/java/android/service/autofill/augmented/OWNERS
new file mode 100644
index 0000000..a088632
--- /dev/null
+++ b/core/java/android/service/autofill/augmented/OWNERS
@@ -0,0 +1,9 @@
+# Bug component: 351486
+
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/service/carrier/OWNERS b/core/java/android/service/carrier/OWNERS
new file mode 100644
index 0000000..d768ef4
--- /dev/null
+++ b/core/java/android/service/carrier/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+fionaxu@google.com
diff --git a/core/java/android/service/chooser/OWNERS b/core/java/android/service/chooser/OWNERS
new file mode 100644
index 0000000..a5acba5
--- /dev/null
+++ b/core/java/android/service/chooser/OWNERS
@@ -0,0 +1,4 @@
+asc@google.com
+mpietal@google.com
+dsandler@android.com
+dsandler@google.com
diff --git a/core/java/android/service/contentcapture/OWNERS b/core/java/android/service/contentcapture/OWNERS
new file mode 100644
index 0000000..6337327
--- /dev/null
+++ b/core/java/android/service/contentcapture/OWNERS
@@ -0,0 +1,9 @@
+# Bug component: 544200
+
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/service/contentsuggestions/OWNERS b/core/java/android/service/contentsuggestions/OWNERS
new file mode 100644
index 0000000..46b5ea0
--- /dev/null
+++ b/core/java/android/service/contentsuggestions/OWNERS
@@ -0,0 +1,7 @@
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/service/dreams/OWNERS b/core/java/android/service/dreams/OWNERS
index 708ab4c..842c10e 100644
--- a/core/java/android/service/dreams/OWNERS
+++ b/core/java/android/service/dreams/OWNERS
@@ -1,4 +1,4 @@
+# Bug component: 78010
+
 dsandler@android.com
-michaelwr@google.com
-roosa@google.com
-galinap@google.com
+dsandler@google.com
diff --git a/core/java/android/service/gatekeeper/OWNERS b/core/java/android/service/gatekeeper/OWNERS
new file mode 100644
index 0000000..2ca52cd
--- /dev/null
+++ b/core/java/android/service/gatekeeper/OWNERS
@@ -0,0 +1,3 @@
+swillden@google.com
+jdanis@google.com
+jbires@google.com
diff --git a/core/java/android/service/media/OWNERS b/core/java/android/service/media/OWNERS
new file mode 100644
index 0000000..916fc36
--- /dev/null
+++ b/core/java/android/service/media/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 137631
+
+hdmoon@google.com
+insun@google.com
+jaewan@google.com
+jinpark@google.com
+klhyun@google.com
+gyumin@google.com
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index 1d5f7fb..ab1b943 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -1901,6 +1901,17 @@
         /**
          * @hide
          */
+        public @NonNull Ranking withAudiblyAlertedInfo(@Nullable Ranking previous) {
+            if (previous != null && previous.mLastAudiblyAlertedMs > 0
+                    && this.mLastAudiblyAlertedMs <= 0) {
+                this.mLastAudiblyAlertedMs = previous.mLastAudiblyAlertedMs;
+            }
+            return this;
+        }
+
+        /**
+         * @hide
+         */
         public void populate(Ranking other) {
             populate(other.mKey,
                     other.mRank,
diff --git a/core/java/android/service/notification/OWNERS b/core/java/android/service/notification/OWNERS
index 2e94be5..debb493 100644
--- a/core/java/android/service/notification/OWNERS
+++ b/core/java/android/service/notification/OWNERS
@@ -1,4 +1,6 @@
+# Bug component: 34005
+
 juliacr@google.com
-beverlyt@google.com
+pixel@google.com
 dsandler@android.com
-pixel@google.com
\ No newline at end of file
+dsandler@google.com
diff --git a/core/java/android/service/quicksettings/OWNERS b/core/java/android/service/quicksettings/OWNERS
new file mode 100644
index 0000000..12eb7c7
--- /dev/null
+++ b/core/java/android/service/quicksettings/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 78010
+
+kozynski@google.com
+pixel@google.com
+dsandler@android.com
+dsandler@google.com
diff --git a/core/java/android/service/resolver/OWNERS b/core/java/android/service/resolver/OWNERS
new file mode 100644
index 0000000..10150c37
--- /dev/null
+++ b/core/java/android/service/resolver/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 78010
+
+asc@google.com
+mpietal@google.com
+dsandler@android.com
+dsandler@google.com
diff --git a/core/java/android/service/restrictions/OWNERS b/core/java/android/service/restrictions/OWNERS
new file mode 100644
index 0000000..eaba2e9
--- /dev/null
+++ b/core/java/android/service/restrictions/OWNERS
@@ -0,0 +1 @@
+yamasani@google.com
diff --git a/core/java/android/service/textclassifier/OWNERS b/core/java/android/service/textclassifier/OWNERS
new file mode 100644
index 0000000..a535f52
--- /dev/null
+++ b/core/java/android/service/textclassifier/OWNERS
@@ -0,0 +1,9 @@
+# Bug component: 709498
+
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/service/textservice/OWNERS b/core/java/android/service/textservice/OWNERS
new file mode 100644
index 0000000..10b8b76
--- /dev/null
+++ b/core/java/android/service/textservice/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 34867
+
+include ../../inputmethodservice/OWNERS
\ No newline at end of file
diff --git a/core/java/android/service/trust/OWNERS b/core/java/android/service/trust/OWNERS
new file mode 100644
index 0000000..affe471
--- /dev/null
+++ b/core/java/android/service/trust/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 36824
+
+cbrubaker@google.com
+vishwath@google.com
diff --git a/core/java/android/service/voice/OWNERS b/core/java/android/service/voice/OWNERS
new file mode 100644
index 0000000..46b5ea0
--- /dev/null
+++ b/core/java/android/service/voice/OWNERS
@@ -0,0 +1,7 @@
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/service/wallpaper/OWNERS b/core/java/android/service/wallpaper/OWNERS
new file mode 100644
index 0000000..756eef8
--- /dev/null
+++ b/core/java/android/service/wallpaper/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 78010
+
+dupin@google.com
+dsandler@android.com
+dsandler@google.com
diff --git a/core/java/android/service/watchdog/OWNERS b/core/java/android/service/watchdog/OWNERS
new file mode 100644
index 0000000..1c045e1
--- /dev/null
+++ b/core/java/android/service/watchdog/OWNERS
@@ -0,0 +1,3 @@
+narayan@google.com
+nandana@google.com
+olilan@google.com
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index dee9ac4..64364ff 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -62,17 +62,17 @@
  * to release the native resources used by the TextToSpeech engine.
  *
  * Apps targeting Android 11 that use text-to-speech should declare {@link
- * TextToSpeech.Engine#INTENT_ACTION_TTS_SERVICE} in the <code><queries></code> elements of their
+ * TextToSpeech.Engine#INTENT_ACTION_TTS_SERVICE} in the {@code queries} elements of their
  * manifest:
  *
- * <code>
- * <queries>
+ * <pre>
+ * &lt;queries&gt;
  *   ...
- *  <intent>
- *      <action android:name="android.intent.action.TTS_SERVICE" />
- *  </intent>
- * </queries>
- * </code>
+ *  &lt;intent&gt;
+ *      &lt;action android:name="android.intent.action.TTS_SERVICE" /&gt;
+ *  &lt;/intent&gt;
+ * &lt;/queries&gt;
+ * </pre>
  */
 public class TextToSpeech {
 
@@ -254,18 +254,17 @@
      * </ul>
      *
      * Apps targeting Android 11 that use text-to-speech should declare {@link
-     * #INTENT_ACTION_TTS_SERVICE} in the <code><queries></code> elements of their
+     * TextToSpeech.Engine#INTENT_ACTION_TTS_SERVICE} in the {@code queries} elements of their
      * manifest:
      *
-     * <code>
-     * <queries>
+     * <pre>
+     * &lt;queries&gt;
      *   ...
-     *  <intent>
-     *      <action android:name="android.intent.action.TTS_SERVICE" />
-     *  </intent>
-     * </queries>
-     * </code>
-
+     *  &lt;intent&gt;
+     *      &lt;action android:name="android.intent.action.TTS_SERVICE" /&gt;
+     *  &lt;/intent&gt;
+     * &lt;/queries&gt;
+     * </pre>
      */
     public class Engine {
 
diff --git a/core/java/android/telephony/OWNERS b/core/java/android/telephony/OWNERS
new file mode 100644
index 0000000..640baf2
--- /dev/null
+++ b/core/java/android/telephony/OWNERS
@@ -0,0 +1 @@
+include /telephony/OWNERS
diff --git a/core/java/android/timezone/OWNERS b/core/java/android/timezone/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/core/java/android/timezone/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/core/java/android/transition/OWNERS b/core/java/android/transition/OWNERS
new file mode 100644
index 0000000..eb5a581
--- /dev/null
+++ b/core/java/android/transition/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 25700
+
+romainguy@google.com
+mount@google.com
+alanv@google.com
+adamp@google.com
diff --git a/core/java/android/util/proto/OWNERS b/core/java/android/util/proto/OWNERS
new file mode 100644
index 0000000..1eb6abf
--- /dev/null
+++ b/core/java/android/util/proto/OWNERS
@@ -0,0 +1,2 @@
+dplotnikov@google.com
+mwachens@google.com
diff --git a/core/java/android/uwb/AdapterStateListener.java b/core/java/android/uwb/AdapterStateListener.java
new file mode 100644
index 0000000..8875af3
--- /dev/null
+++ b/core/java/android/uwb/AdapterStateListener.java
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.uwb;
+
+import android.annotation.NonNull;
+import android.os.Binder;
+import android.os.RemoteException;
+import android.util.Log;
+import android.uwb.UwbManager.AdapterStateCallback;
+import android.uwb.UwbManager.AdapterStateCallback.StateChangedReason;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Executor;
+
+/**
+ * @hide
+ */
+public class AdapterStateListener extends IUwbAdapterStateCallbacks.Stub {
+    private static final String TAG = "Uwb.StateListener";
+
+    private final IUwbAdapter mAdapter;
+    private boolean mIsRegistered = false;
+
+    private final Map<AdapterStateCallback, Executor> mCallbackMap = new HashMap<>();
+
+    @StateChangedReason
+    private int mAdapterStateChangeReason = AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN;
+    private boolean mAdapterEnabledState = false;
+
+    public AdapterStateListener(@NonNull IUwbAdapter adapter) {
+        mAdapter = adapter;
+    }
+
+    /**
+     * Register an {@link AdapterStateCallback} with this {@link AdapterStateListener}
+     *
+     * @param executor an {@link Executor} to execute given callback
+     * @param callback user implementation of the {@link AdapterStateCallback}
+     */
+    public void register(@NonNull Executor executor, @NonNull AdapterStateCallback callback) {
+        synchronized (this) {
+            if (mCallbackMap.containsKey(callback)) {
+                return;
+            }
+
+            mCallbackMap.put(callback, executor);
+
+            if (!mIsRegistered) {
+                try {
+                    mAdapter.registerAdapterStateCallbacks(this);
+                    mIsRegistered = true;
+                } catch (RemoteException e) {
+                    Log.w(TAG, "Failed to register adapter state callback");
+                    executor.execute(() -> callback.onStateChanged(false,
+                            AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN));
+                }
+            } else {
+                sendCurrentState(callback);
+            }
+        }
+    }
+
+    /**
+     * Unregister the specified {@link AdapterStateCallback}
+     *
+     * @param callback user implementation of the {@link AdapterStateCallback}
+     */
+    public void unregister(@NonNull AdapterStateCallback callback) {
+        synchronized (this) {
+            if (!mCallbackMap.containsKey(callback)) {
+                return;
+            }
+
+            mCallbackMap.remove(callback);
+
+            if (mCallbackMap.isEmpty() && mIsRegistered) {
+                try {
+                    mAdapter.unregisterAdapterStateCallbacks(this);
+                } catch (RemoteException e) {
+                    Log.w(TAG, "Failed to unregister AdapterStateCallback with service");
+                }
+                mIsRegistered = false;
+            }
+        }
+    }
+
+    private void sendCurrentState(@NonNull AdapterStateCallback callback) {
+        synchronized (this) {
+            Executor executor = mCallbackMap.get(callback);
+
+            final long identity = Binder.clearCallingIdentity();
+            try {
+                executor.execute(() -> callback.onStateChanged(
+                        mAdapterEnabledState, mAdapterStateChangeReason));
+            } finally {
+                Binder.restoreCallingIdentity(identity);
+            }
+        }
+    }
+
+    @Override
+    public void onAdapterStateChanged(boolean isEnabled, int reason) {
+        synchronized (this) {
+            @StateChangedReason int localReason =
+                    convertToStateChangedReason(reason);
+            mAdapterEnabledState = isEnabled;
+            mAdapterStateChangeReason = localReason;
+            for (AdapterStateCallback cb : mCallbackMap.keySet()) {
+                sendCurrentState(cb);
+            }
+        }
+    }
+
+    private static @StateChangedReason int convertToStateChangedReason(
+            @StateChangeReason int reason) {
+        switch (reason) {
+            case StateChangeReason.ALL_SESSIONS_CLOSED:
+                return AdapterStateCallback.STATE_CHANGED_REASON_ALL_SESSIONS_CLOSED;
+
+            case StateChangeReason.SESSION_STARTED:
+                return AdapterStateCallback.STATE_CHANGED_REASON_SESSION_STARTED;
+
+            case StateChangeReason.SYSTEM_POLICY:
+                return AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_POLICY;
+
+            case StateChangeReason.SYSTEM_BOOT:
+                return AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_BOOT;
+
+            case StateChangeReason.UNKNOWN:
+            default:
+                return AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN;
+        }
+    }
+}
diff --git a/core/java/android/uwb/IUwbAdapter.aidl b/core/java/android/uwb/IUwbAdapter.aidl
index d29ed34..2c8b2e4 100644
--- a/core/java/android/uwb/IUwbAdapter.aidl
+++ b/core/java/android/uwb/IUwbAdapter.aidl
@@ -98,11 +98,18 @@
   int getMaxSimultaneousSessions();
 
   /**
-   * Get the maximum number of remote devices per session
+   * Get the maximum number of remote devices per session when local device is initiator
    *
    * @return the maximum number of remote devices supported in a single session
    */
-  int getMaxRemoteDevicesPerSession();
+  int getMaxRemoteDevicesPerInitiatorSession();
+
+  /**
+   * Get the maximum number of remote devices per session when local device is responder
+   *
+   * @return the maximum number of remote devices supported in a single session
+   */
+  int getMaxRemoteDevicesPerResponderSession();
 
   /**
    * Provides the capabilities and features of the device
diff --git a/core/java/android/uwb/StateChangeReason.aidl b/core/java/android/uwb/StateChangeReason.aidl
index 46a6e2e..28eaf9f 100644
--- a/core/java/android/uwb/StateChangeReason.aidl
+++ b/core/java/android/uwb/StateChangeReason.aidl
@@ -41,5 +41,10 @@
    * The adapter state changed because of a device system change.
    */
   SYSTEM_POLICY,
+
+  /**
+   * Used to signal the first adapter state message after boot
+   */
+   SYSTEM_BOOT,
 }
 
diff --git a/core/java/android/uwb/UwbManager.java b/core/java/android/uwb/UwbManager.java
index 2f1e2de..ed5cf36 100644
--- a/core/java/android/uwb/UwbManager.java
+++ b/core/java/android/uwb/UwbManager.java
@@ -16,13 +16,21 @@
 
 package android.uwb;
 
+import android.annotation.CallbackExecutor;
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.SuppressLint;
+import android.annotation.SystemService;
+import android.content.Context;
+import android.os.IBinder;
 import android.os.PersistableBundle;
+import android.os.RemoteException;
+import android.os.ServiceManager;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.Executor;
@@ -36,7 +44,13 @@
  *
  * @hide
  */
+@SystemService(Context.UWB_SERVICE)
 public final class UwbManager {
+    private IUwbAdapter mUwbAdapter;
+    private static final String SERVICE_NAME = "uwb";
+
+    private AdapterStateListener mAdapterStateListener;
+
     /**
      * Interface for receiving UWB adapter state changes
      */
@@ -96,10 +110,31 @@
 
     /**
      * Use <code>Context.getSystemService(UwbManager.class)</code> to get an instance.
+     *
+     * @param adapter an instance of an {@link android.uwb.IUwbAdapter}
      */
-    private UwbManager() {
-        throw new UnsupportedOperationException();
+    private UwbManager(IUwbAdapter adapter) {
+        mUwbAdapter = adapter;
+        mAdapterStateListener = new AdapterStateListener(adapter);
     }
+
+    /**
+     * @hide
+     */
+    public static UwbManager getInstance() {
+        IBinder b = ServiceManager.getService(SERVICE_NAME);
+        if (b == null) {
+            return null;
+        }
+
+        IUwbAdapter adapter = IUwbAdapter.Stub.asInterface(b);
+        if (adapter == null) {
+            return null;
+        }
+
+        return new UwbManager(adapter);
+    }
+
     /**
      * Register an {@link AdapterStateCallback} to listen for UWB adapter state changes
      * <p>The provided callback will be invoked by the given {@link Executor}.
@@ -112,8 +147,9 @@
      * @param executor an {@link Executor} to execute given callback
      * @param callback user implementation of the {@link AdapterStateCallback}
      */
-    public void registerAdapterStateCallback(Executor executor, AdapterStateCallback callback) {
-        throw new UnsupportedOperationException();
+    public void registerAdapterStateCallback(@NonNull @CallbackExecutor Executor executor,
+            @NonNull AdapterStateCallback callback) {
+        mAdapterStateListener.register(executor, callback);
     }
 
     /**
@@ -125,8 +161,8 @@
      *
      * @param callback user implementation of the {@link AdapterStateCallback}
      */
-    public void unregisterAdapterStateCallback(AdapterStateCallback callback) {
-        throw new UnsupportedOperationException();
+    public void unregisterAdapterStateCallback(@NonNull AdapterStateCallback callback) {
+        mAdapterStateListener.unregister(callback);
     }
 
     /**
@@ -139,7 +175,11 @@
      */
     @NonNull
     public PersistableBundle getSpecificationInfo() {
-        throw new UnsupportedOperationException();
+        try {
+            return mUwbAdapter.getSpecificationInfo();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
     }
 
     /**
@@ -148,7 +188,11 @@
      * @return true if ranging is supported
      */
     public boolean isRangingSupported() {
-        throw new UnsupportedOperationException();
+        try {
+            return mUwbAdapter.isRangingSupported();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
     }
 
     @Retention(RetentionPolicy.SOURCE)
@@ -197,7 +241,24 @@
      */
     @AngleOfArrivalSupportType
     public int getAngleOfArrivalSupport() {
-        throw new UnsupportedOperationException();
+        try {
+            switch (mUwbAdapter.getAngleOfArrivalSupport()) {
+                case AngleOfArrivalSupport.TWO_DIMENSIONAL:
+                    return ANGLE_OF_ARRIVAL_SUPPORT_TYPE_2D;
+
+                case AngleOfArrivalSupport.THREE_DIMENSIONAL_HEMISPHERICAL:
+                    return ANGLE_OF_ARRIVAL_SUPPORT_TYPE_3D_HEMISPHERICAL;
+
+                case AngleOfArrivalSupport.THREE_DIMENSIONAL_SPHERICAL:
+                    return ANGLE_OF_ARRIVAL_SUPPORT_TYPE_3D_SPHERICAL;
+
+                case AngleOfArrivalSupport.NONE:
+                default:
+                    return ANGLE_OF_ARRIVAL_SUPPORT_TYPE_NONE;
+            }
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
     }
 
     /**
@@ -211,7 +272,15 @@
      */
     @NonNull
     public List<Integer> getSupportedChannelNumbers() {
-        throw new UnsupportedOperationException();
+        List<Integer> channels = new ArrayList<>();
+        try {
+            for (int channel : mUwbAdapter.getSupportedChannels()) {
+                channels.add(channel);
+            }
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+        return channels;
     }
 
     /**
@@ -222,7 +291,15 @@
      */
     @NonNull
     public Set<Integer> getSupportedPreambleCodeIndices() {
-        throw new UnsupportedOperationException();
+        Set<Integer> preambles = new HashSet<>();
+        try {
+            for (int preamble : mUwbAdapter.getSupportedPreambleCodes()) {
+                preambles.add(preamble);
+            }
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+        return preambles;
     }
 
     /**
@@ -234,7 +311,11 @@
      */
     @SuppressLint("MethodNameUnits")
     public long elapsedRealtimeResolutionNanos() {
-        throw new UnsupportedOperationException();
+        try {
+            return mUwbAdapter.getTimestampResolutionNanos();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
     }
 
     /**
@@ -243,7 +324,11 @@
      * @return the maximum allowed number of simultaneously open {@link RangingSession} instances.
      */
     public int getMaxSimultaneousSessions() {
-        throw new UnsupportedOperationException();
+        try {
+            return mUwbAdapter.getMaxSimultaneousSessions();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
     }
 
     /**
@@ -253,7 +338,11 @@
      * @return the maximum number of remote devices per {@link RangingSession}
      */
     public int getMaxRemoteDevicesPerInitiatorSession() {
-        throw new UnsupportedOperationException();
+        try {
+            return mUwbAdapter.getMaxRemoteDevicesPerInitiatorSession();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
     }
 
     /**
@@ -263,7 +352,11 @@
      * @return the maximum number of remote devices per {@link RangingSession}
      */
     public int getMaxRemoteDevicesPerResponderSession() {
-        throw new UnsupportedOperationException();
+        try {
+            return mUwbAdapter.getMaxRemoteDevicesPerResponderSession();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
     }
 
     /**
diff --git a/core/java/android/view/DisplayAdjustments.java b/core/java/android/view/DisplayAdjustments.java
index c726bee..7c01f7a8 100644
--- a/core/java/android/view/DisplayAdjustments.java
+++ b/core/java/android/view/DisplayAdjustments.java
@@ -130,14 +130,16 @@
         w = metrics.noncompatWidthPixels;
         metrics.noncompatWidthPixels = metrics.noncompatHeightPixels;
         metrics.noncompatHeightPixels = w;
+    }
 
-        float x = metrics.xdpi;
-        metrics.xdpi = metrics.ydpi;
-        metrics.ydpi = x;
-
-        x = metrics.noncompatXdpi;
-        metrics.noncompatXdpi = metrics.noncompatYdpi;
-        metrics.noncompatYdpi = x;
+    /** Adjusts global display metrics that is available to applications. */
+    public void adjustGlobalAppMetrics(@NonNull DisplayMetrics metrics) {
+        final FixedRotationAdjustments rotationAdjustments = mFixedRotationAdjustments;
+        if (rotationAdjustments == null) {
+            return;
+        }
+        metrics.noncompatWidthPixels = metrics.widthPixels = rotationAdjustments.mAppWidth;
+        metrics.noncompatHeightPixels = metrics.heightPixels = rotationAdjustments.mAppHeight;
     }
 
     /** Returns the adjusted cutout if available. Otherwise the original cutout is returned. */
@@ -178,7 +180,7 @@
 
     /**
      * An application can be launched in different rotation than the real display. This class
-     * provides the information to adjust the values returned by {@link #Display}.
+     * provides the information to adjust the values returned by {@link Display}.
      * @hide
      */
     public static class FixedRotationAdjustments implements Parcelable {
@@ -186,12 +188,24 @@
         @Surface.Rotation
         final int mRotation;
 
+        /**
+         * The rotated {@link DisplayInfo#appWidth}. The value cannot be simply swapped according
+         * to rotation because it minus the region of screen decorations.
+         */
+        final int mAppWidth;
+
+        /** The rotated {@link DisplayInfo#appHeight}. */
+        final int mAppHeight;
+
         /** Non-null if the device has cutout. */
         @Nullable
         final DisplayCutout mRotatedDisplayCutout;
 
-        public FixedRotationAdjustments(@Surface.Rotation int rotation, DisplayCutout cutout) {
+        public FixedRotationAdjustments(@Surface.Rotation int rotation, int appWidth, int appHeight,
+                DisplayCutout cutout) {
             mRotation = rotation;
+            mAppWidth = appWidth;
+            mAppHeight = appHeight;
             mRotatedDisplayCutout = cutout;
         }
 
@@ -199,6 +213,8 @@
         public int hashCode() {
             int hash = 17;
             hash = hash * 31 + mRotation;
+            hash = hash * 31 + mAppWidth;
+            hash = hash * 31 + mAppHeight;
             hash = hash * 31 + Objects.hashCode(mRotatedDisplayCutout);
             return hash;
         }
@@ -210,12 +226,14 @@
             }
             final FixedRotationAdjustments other = (FixedRotationAdjustments) o;
             return mRotation == other.mRotation
+                    && mAppWidth == other.mAppWidth && mAppHeight == other.mAppHeight
                     && Objects.equals(mRotatedDisplayCutout, other.mRotatedDisplayCutout);
         }
 
         @Override
         public String toString() {
             return "FixedRotationAdjustments{rotation=" + Surface.rotationToString(mRotation)
+                    + " appWidth=" + mAppWidth + " appHeight=" + mAppHeight
                     + " cutout=" + mRotatedDisplayCutout + "}";
         }
 
@@ -227,12 +245,16 @@
         @Override
         public void writeToParcel(Parcel dest, int flags) {
             dest.writeInt(mRotation);
+            dest.writeInt(mAppWidth);
+            dest.writeInt(mAppHeight);
             dest.writeTypedObject(
                     new DisplayCutout.ParcelableWrapper(mRotatedDisplayCutout), flags);
         }
 
         private FixedRotationAdjustments(Parcel in) {
             mRotation = in.readInt();
+            mAppWidth = in.readInt();
+            mAppHeight = in.readInt();
             final DisplayCutout.ParcelableWrapper cutoutWrapper =
                     in.readTypedObject(DisplayCutout.ParcelableWrapper.CREATOR);
             mRotatedDisplayCutout = cutoutWrapper != null ? cutoutWrapper.get() : null;
diff --git a/core/java/android/view/FocusFinder.java b/core/java/android/view/FocusFinder.java
index 713cfb4..064bc69 100644
--- a/core/java/android/view/FocusFinder.java
+++ b/core/java/android/view/FocusFinder.java
@@ -311,6 +311,9 @@
         }
 
         final int count = focusables.size();
+        if (count < 2) {
+            return null;
+        }
         switch (direction) {
             case View.FOCUS_FORWARD:
                 return getNextFocusable(focused, focusables, count);
@@ -373,29 +376,29 @@
     }
 
     private static View getNextFocusable(View focused, ArrayList<View> focusables, int count) {
+        if (count < 2) {
+            return null;
+        }
         if (focused != null) {
             int position = focusables.lastIndexOf(focused);
             if (position >= 0 && position + 1 < count) {
                 return focusables.get(position + 1);
             }
         }
-        if (!focusables.isEmpty()) {
-            return focusables.get(0);
-        }
-        return null;
+        return focusables.get(0);
     }
 
     private static View getPreviousFocusable(View focused, ArrayList<View> focusables, int count) {
+        if (count < 2) {
+            return null;
+        }
         if (focused != null) {
             int position = focusables.indexOf(focused);
             if (position > 0) {
                 return focusables.get(position - 1);
             }
         }
-        if (!focusables.isEmpty()) {
-            return focusables.get(count - 1);
-        }
-        return null;
+        return focusables.get(count - 1);
     }
 
     private static View getNextKeyboardNavigationCluster(
diff --git a/core/java/android/view/IDisplayWindowInsetsController.aidl b/core/java/android/view/IDisplayWindowInsetsController.aidl
index 429c3ae..a0d4a65 100644
--- a/core/java/android/view/IDisplayWindowInsetsController.aidl
+++ b/core/java/android/view/IDisplayWindowInsetsController.aidl
@@ -27,6 +27,13 @@
 oneway interface IDisplayWindowInsetsController {
 
     /**
+     * Called when top focused window changes to determine whether or not to take over insets
+     * control. Won't be called if config_remoteInsetsControllerControlsSystemBars is false.
+     * @param packageName: Passes the top package name
+     */
+    void topFocusedWindowChanged(String packageName);
+
+    /**
      * @see IWindow#insetsChanged
      */
     void insetsChanged(in InsetsState insetsState);
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index 4aeb7bb..1bef2ee 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -388,16 +388,6 @@
     oneway void hideTransientBars(int displayId);
 
     /**
-    * When set to {@code true} the system bars will always be shown. This is true even if an app
-    * requests to be fullscreen by setting the system ui visibility flags. The
-    * functionality was added for the automotive case as a way to guarantee required content stays
-    * on screen at all times.
-    *
-    * @hide
-    */
-    oneway void setForceShowSystemBars(boolean show);
-
-    /**
      * Called by System UI to notify of changes to the visibility of Recents.
      */
     oneway void setRecentsVisibility(boolean visible);
diff --git a/core/java/android/view/InputApplicationHandle.java b/core/java/android/view/InputApplicationHandle.java
index 3d05e2a..9b96f7f 100644
--- a/core/java/android/view/InputApplicationHandle.java
+++ b/core/java/android/view/InputApplicationHandle.java
@@ -16,6 +16,7 @@
 
 package android.view;
 
+import android.annotation.NonNull;
 import android.os.IBinder;
 
 /**
@@ -31,17 +32,20 @@
     private long ptr;
 
     // Application name.
-    public String name;
+    public final @NonNull String name;
 
     // Dispatching timeout.
-    public long dispatchingTimeoutNanos;
+    public final long dispatchingTimeoutNanos;
 
     public final IBinder token;
 
     private native void nativeDispose();
 
-    public InputApplicationHandle(IBinder token) {
+    public InputApplicationHandle(@NonNull IBinder token, @NonNull String name,
+            long dispatchingTimeoutNanos) {
         this.token = token;
+        this.name = name;
+        this.dispatchingTimeoutNanos = dispatchingTimeoutNanos;
     }
 
     public InputApplicationHandle(InputApplicationHandle handle) {
diff --git a/core/java/android/view/InputWindowHandle.java b/core/java/android/view/InputWindowHandle.java
index 5f74b2a..71d26b8 100644
--- a/core/java/android/view/InputWindowHandle.java
+++ b/core/java/android/view/InputWindowHandle.java
@@ -36,7 +36,7 @@
     private long ptr;
 
     // The input application handle.
-    public final InputApplicationHandle inputApplicationHandle;
+    public InputApplicationHandle inputApplicationHandle;
 
     // The token associates input data with a window and its input channel. The client input
     // channel and the server input channel will both contain this token.
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java
index 985829f..403ac3a 100644
--- a/core/java/android/view/InsetsController.java
+++ b/core/java/android/view/InsetsController.java
@@ -618,16 +618,20 @@
             return false;
         }
         if (DEBUG) Log.d(TAG, "onStateChanged: " + state);
-        updateState(state);
-
-        boolean localStateChanged = !mState.equals(mLastDispatchedState,
-                true /* excludingCaptionInsets */, true /* excludeInvisibleIme */);
         mLastDispatchedState.set(state, true /* copySources */);
 
+        final InsetsState lastState = new InsetsState(mState, true /* copySources */);
+        updateState(state);
         applyLocalVisibilityOverride();
-        if (localStateChanged) {
-            if (DEBUG) Log.d(TAG, "onStateChanged, notifyInsetsChanged, send state to WM: " + mState);
+
+        if (!mState.equals(lastState, true /* excludingCaptionInsets */,
+                true /* excludeInvisibleIme */)) {
+            if (DEBUG) Log.d(TAG, "onStateChanged, notifyInsetsChanged");
             mHost.notifyInsetsChanged();
+        }
+        if (!mState.equals(mLastDispatchedState, true /* excludingCaptionInsets */,
+                true /* excludeInvisibleIme */)) {
+            if (DEBUG) Log.d(TAG, "onStateChanged, send state to WM: " + mState);
             updateRequestedState();
         }
         return true;
diff --git a/core/java/android/view/InsetsState.java b/core/java/android/view/InsetsState.java
index 6b0b509..8137883 100644
--- a/core/java/android/view/InsetsState.java
+++ b/core/java/android/view/InsetsState.java
@@ -60,6 +60,8 @@
  */
 public class InsetsState implements Parcelable {
 
+    public static final InsetsState EMPTY = new InsetsState();
+
     /**
      * Internal representation of inset source types. This is different from the public API in
      * {@link WindowInsets.Type} as one type from the public API might indicate multiple windows
@@ -74,6 +76,10 @@
             ITYPE_BOTTOM_GESTURES,
             ITYPE_LEFT_GESTURES,
             ITYPE_RIGHT_GESTURES,
+            ITYPE_TOP_MANDATORY_GESTURES,
+            ITYPE_BOTTOM_MANDATORY_GESTURES,
+            ITYPE_LEFT_MANDATORY_GESTURES,
+            ITYPE_RIGHT_MANDATORY_GESTURES,
             ITYPE_TOP_TAPPABLE_ELEMENT,
             ITYPE_BOTTOM_TAPPABLE_ELEMENT,
             ITYPE_LEFT_DISPLAY_CUTOUT,
@@ -102,20 +108,27 @@
     public static final int ITYPE_BOTTOM_GESTURES = 4;
     public static final int ITYPE_LEFT_GESTURES = 5;
     public static final int ITYPE_RIGHT_GESTURES = 6;
-    public static final int ITYPE_TOP_TAPPABLE_ELEMENT = 7;
-    public static final int ITYPE_BOTTOM_TAPPABLE_ELEMENT = 8;
 
-    public static final int ITYPE_LEFT_DISPLAY_CUTOUT = 9;
-    public static final int ITYPE_TOP_DISPLAY_CUTOUT = 10;
-    public static final int ITYPE_RIGHT_DISPLAY_CUTOUT = 11;
-    public static final int ITYPE_BOTTOM_DISPLAY_CUTOUT = 12;
+    /** Additional gesture inset types that map into {@link Type.MANDATORY_SYSTEM_GESTURES}. */
+    public static final int ITYPE_TOP_MANDATORY_GESTURES = 7;
+    public static final int ITYPE_BOTTOM_MANDATORY_GESTURES = 8;
+    public static final int ITYPE_LEFT_MANDATORY_GESTURES = 9;
+    public static final int ITYPE_RIGHT_MANDATORY_GESTURES = 10;
+
+    public static final int ITYPE_TOP_TAPPABLE_ELEMENT = 11;
+    public static final int ITYPE_BOTTOM_TAPPABLE_ELEMENT = 12;
+
+    public static final int ITYPE_LEFT_DISPLAY_CUTOUT = 13;
+    public static final int ITYPE_TOP_DISPLAY_CUTOUT = 14;
+    public static final int ITYPE_RIGHT_DISPLAY_CUTOUT = 15;
+    public static final int ITYPE_BOTTOM_DISPLAY_CUTOUT = 16;
 
     /** Input method window. */
-    public static final int ITYPE_IME = 13;
+    public static final int ITYPE_IME = 17;
 
     /** Additional system decorations inset type. */
-    public static final int ITYPE_CLIMATE_BAR = 14;
-    public static final int ITYPE_EXTRA_NAVIGATION_BAR = 15;
+    public static final int ITYPE_CLIMATE_BAR = 18;
+    public static final int ITYPE_EXTRA_NAVIGATION_BAR = 19;
 
     static final int LAST_TYPE = ITYPE_EXTRA_NAVIGATION_BAR;
     public static final int SIZE = LAST_TYPE + 1;
@@ -451,9 +464,11 @@
         final ArraySet<Integer> result = new ArraySet<>();
         if ((types & Type.STATUS_BARS) != 0) {
             result.add(ITYPE_STATUS_BAR);
+            result.add(ITYPE_CLIMATE_BAR);
         }
         if ((types & Type.NAVIGATION_BARS) != 0) {
             result.add(ITYPE_NAVIGATION_BAR);
+            result.add(ITYPE_EXTRA_NAVIGATION_BAR);
         }
         if ((types & Type.CAPTION_BAR) != 0) {
             result.add(ITYPE_CAPTION_BAR);
@@ -489,6 +504,10 @@
                 return Type.IME;
             case ITYPE_TOP_GESTURES:
             case ITYPE_BOTTOM_GESTURES:
+            case ITYPE_TOP_MANDATORY_GESTURES:
+            case ITYPE_BOTTOM_MANDATORY_GESTURES:
+            case ITYPE_LEFT_MANDATORY_GESTURES:
+            case ITYPE_RIGHT_MANDATORY_GESTURES:
                 return Type.MANDATORY_SYSTEM_GESTURES;
             case ITYPE_LEFT_GESTURES:
             case ITYPE_RIGHT_GESTURES:
@@ -548,6 +567,14 @@
                 return "ITYPE_LEFT_GESTURES";
             case ITYPE_RIGHT_GESTURES:
                 return "ITYPE_RIGHT_GESTURES";
+            case ITYPE_TOP_MANDATORY_GESTURES:
+                return "ITYPE_TOP_MANDATORY_GESTURES";
+            case ITYPE_BOTTOM_MANDATORY_GESTURES:
+                return "ITYPE_BOTTOM_MANDATORY_GESTURES";
+            case ITYPE_LEFT_MANDATORY_GESTURES:
+                return "ITYPE_LEFT_MANDATORY_GESTURES";
+            case ITYPE_RIGHT_MANDATORY_GESTURES:
+                return "ITYPE_RIGHT_MANDATORY_GESTURES";
             case ITYPE_TOP_TAPPABLE_ELEMENT:
                 return "ITYPE_TOP_TAPPABLE_ELEMENT";
             case ITYPE_BOTTOM_TAPPABLE_ELEMENT:
diff --git a/core/java/android/view/OWNERS b/core/java/android/view/OWNERS
index 7b60f2e..72fa4c3 100644
--- a/core/java/android/view/OWNERS
+++ b/core/java/android/view/OWNERS
@@ -1,15 +1,74 @@
+# Bug component: 25700
+
+romainguy@google.com
+alanv@google.com
+adamp@google.com
+aurimas@google.com
+nduca@google.com
+sumir@google.com
+ogunwale@google.com
+jjaggi@google.com
+roosa@google.com
+
 # Display
-per-file Display.java = michaelwr@google.com, santoscordon@google.com
-per-file DisplayInfo.java = michaelwr@google.com, santoscordon@google.com
+per-file Display*.java = file:/services/core/java/com/android/server/display/OWNERS
+per-file Display*.aidl = file:/services/core/java/com/android/server/display/OWNERS
 
 # Haptics
-per-file HapticFeedbackConstants.java = michaelwr@google.com, santoscordon@google.com
+per-file HapticFeedbackConstants.java = file:/services/core/java/com/android/server/input/OWNERS
+
+# Ime
+per-file Ime*.java = file:/core/java/android/view/inputmethod/OWNERS
 
 # Input
-per-file IInputMonitorHost.aidl = michaelwr@google.com, svv@google.com
-per-file Input*.java = michaelwr@google.com, svv@google.com
-per-file Input*.aidl = michaelwr@google.com, svv@google.com
-per-file KeyEvent.java = michaelwr@google.com, svv@google.com
-per-file MotionEvent.java = michaelwr@google.com, svv@google.com
-per-file PointerIcon.java = michaelwr@google.com, svv@google.com
-per-file SimulatedDpad.java = michaelwr@google.com, svv@google.com
+per-file IInput*.aidl = file:/services/core/java/com/android/server/input/OWNERS
+per-file Input*.java = file:/services/core/java/com/android/server/input/OWNERS
+per-file Input*.aidl = file:/services/core/java/com/android/server/input/OWNERS
+per-file KeyEvent.java = file:/services/core/java/com/android/server/input/OWNERS
+per-file MotionEvent.java = file:/services/core/java/com/android/server/input/OWNERS
+per-file PointerIcon.java = file:/services/core/java/com/android/server/input/OWNERS
+per-file SimulatedDpad.java = file:/services/core/java/com/android/server/input/OWNERS
+
+# InputWindowHandle
+per-file InputWindowHandle.java  = file:/services/core/java/com/android/server/input/OWNERS
+per-file InputWindowHandle.java  = file:/services/core/java/com/android/server/wm/OWNERS
+
+# Surface
+per-file Surface.java = file:/graphics/java/android/graphics/OWNERS
+per-file Surface.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file SurfaceView.java = file:/graphics/java/android/graphics/OWNERS
+per-file SurfaceView.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file SurfaceHolder.java = file:/graphics/java/android/graphics/OWNERS
+per-file SurfaceHolder.java = file:/services/core/java/com/android/server/wm/OWNERS
+
+# View
+per-file View.java = file:/services/accessibility/OWNERS
+per-file View.java = file:/core/java/android/service/autofill/OWNERS
+per-file View.java = file:/graphics/java/android/graphics/OWNERS
+per-file View.java = file:/services/core/java/com/android/server/input/OWNERS
+per-file View.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file ViewRootImpl.java = file:/services/accessibility/OWNERS
+per-file ViewRootImpl.java = file:/core/java/android/service/autofill/OWNERS
+per-file ViewRootImpl.java = file:/graphics/java/android/graphics/OWNERS
+per-file ViewRootImpl.java = file:/services/core/java/com/android/server/input/OWNERS
+per-file ViewRootImpl.java = file:/services/core/java/com/android/server/wm/OWNERS
+
+# WindowManager
+per-file DisplayCutout.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file DisplayCutout.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file IDisplay*.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file Inset*.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file Inset*.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file IPinnedStackListener.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file IRecents*.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file IRemote*.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file IWindow*.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file RemoteAnimation*.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file RemoteAnimation*.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file SurfaceControl*.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file SurfaceControl*.aidl = file:/services/core/java/com/android/server/wm/OWNERS
+per-file SurfaceSession.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file SyncRtSurfaceTransactionApplier.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file ViewRootInsetsControllerHost.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file Window*.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file Window*.aidl = file:/services/core/java/com/android/server/wm/OWNERS
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index f777f55..cf96192 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -99,7 +99,7 @@
      * Defines the duration in milliseconds a user needs to hold down the
      * appropriate buttons (power + volume down) to trigger the screenshot chord.
      */
-    private static final int SCREENSHOT_CHORD_KEY_TIMEOUT = 500;
+    private static final int SCREENSHOT_CHORD_KEY_TIMEOUT = 0;
 
     /**
      * Defines the duration in milliseconds a user needs to hold down the
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 994a959..8194621 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -53,6 +53,9 @@
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_BEHAVIOR_CONTROLLED;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FIT_INSETS_CONTROLLED;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME;
+import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
+import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST;
 import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
 import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL;
 import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
@@ -1449,14 +1452,13 @@
             }
 
             // Don't lose the mode we last auto-computed.
-            if ((attrs.softInputMode & WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST)
+            if ((attrs.softInputMode & SOFT_INPUT_MASK_ADJUST)
                     == WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED) {
                 mWindowAttributes.softInputMode = (mWindowAttributes.softInputMode
-                        & ~WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST)
-                        | (oldSoftInputMode & WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST);
+                        & ~SOFT_INPUT_MASK_ADJUST) | (oldSoftInputMode & SOFT_INPUT_MASK_ADJUST);
             }
 
-            if ((changes & LayoutParams.SOFT_INPUT_MODE_CHANGED) != 0) {
+            if (mWindowAttributes.softInputMode != oldSoftInputMode) {
                 requestFitSystemWindows();
             }
 
@@ -1979,11 +1981,7 @@
             mCompatibleVisibilityInfo.globalVisibility =
                     (mCompatibleVisibilityInfo.globalVisibility & ~View.SYSTEM_UI_FLAG_LOW_PROFILE)
                             | (mAttachInfo.mSystemUiVisibility & View.SYSTEM_UI_FLAG_LOW_PROFILE);
-            if (mDispatchedSystemUiVisibility != mCompatibleVisibilityInfo.globalVisibility) {
-                mHandler.removeMessages(MSG_DISPATCH_SYSTEM_UI_VISIBILITY);
-                mHandler.sendMessage(mHandler.obtainMessage(
-                        MSG_DISPATCH_SYSTEM_UI_VISIBILITY, mCompatibleVisibilityInfo));
-            }
+            dispatchDispatchSystemUiVisibilityChanged(mCompatibleVisibilityInfo);
             if (mAttachInfo.mKeepScreenOn != oldScreenOn
                     || mAttachInfo.mSystemUiVisibility != params.subtreeSystemUiVisibility
                     || mAttachInfo.mHasSystemUiListeners != params.hasSystemUiListeners) {
@@ -2037,9 +2035,30 @@
             info.globalVisibility |= systemUiFlag;
             info.localChanges &= ~systemUiFlag;
         }
-        if (mDispatchedSystemUiVisibility != info.globalVisibility) {
+        dispatchDispatchSystemUiVisibilityChanged(info);
+    }
+
+    /**
+     * If the system is forcing showing any system bar, the legacy low profile flag should be
+     * cleared for compatibility.
+     *
+     * @param showTypes {@link InsetsType types} shown by the system.
+     * @param fromIme {@code true} if the invocation is from IME.
+     */
+    private void clearLowProfileModeIfNeeded(@InsetsType int showTypes, boolean fromIme) {
+        final SystemUiVisibilityInfo info = mCompatibleVisibilityInfo;
+        if ((showTypes & Type.systemBars()) != 0 && !fromIme
+                && (info.globalVisibility & SYSTEM_UI_FLAG_LOW_PROFILE) != 0) {
+            info.globalVisibility &= ~SYSTEM_UI_FLAG_LOW_PROFILE;
+            info.localChanges |= SYSTEM_UI_FLAG_LOW_PROFILE;
+            dispatchDispatchSystemUiVisibilityChanged(info);
+        }
+    }
+
+    private void dispatchDispatchSystemUiVisibilityChanged(SystemUiVisibilityInfo args) {
+        if (mDispatchedSystemUiVisibility != args.globalVisibility) {
             mHandler.removeMessages(MSG_DISPATCH_SYSTEM_UI_VISIBILITY);
-            mHandler.sendMessage(mHandler.obtainMessage(MSG_DISPATCH_SYSTEM_UI_VISIBILITY, info));
+            mHandler.sendMessage(mHandler.obtainMessage(MSG_DISPATCH_SYSTEM_UI_VISIBILITY, args));
         }
     }
 
@@ -2073,6 +2092,7 @@
         final int sysUiVis = inOutParams.systemUiVisibility | inOutParams.subtreeSystemUiVisibility;
         final int flags = inOutParams.flags;
         final int type = inOutParams.type;
+        final int adjust = inOutParams.softInputMode & SOFT_INPUT_MASK_ADJUST;
 
         if ((inOutParams.privateFlags & PRIVATE_FLAG_APPEARANCE_CONTROLLED) == 0) {
             inOutParams.insetsFlags.appearance = 0;
@@ -2098,12 +2118,13 @@
             }
         }
 
+        inOutParams.privateFlags &= ~PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME;
+
         if ((inOutParams.privateFlags & PRIVATE_FLAG_FIT_INSETS_CONTROLLED) != 0) {
             return;
         }
 
         int types = inOutParams.getFitInsetsTypes();
-        int sides = inOutParams.getFitInsetsSides();
         boolean ignoreVis = inOutParams.isFitInsetsIgnoringVisibility();
 
         if (((sysUiVis & SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0
@@ -2118,10 +2139,13 @@
         if (type == TYPE_TOAST || type == TYPE_SYSTEM_ALERT) {
             ignoreVis = true;
         } else if ((types & Type.systemBars()) == Type.systemBars()) {
-            types |= Type.ime();
+            if (adjust == SOFT_INPUT_ADJUST_RESIZE) {
+                types |= Type.ime();
+            } else {
+                inOutParams.privateFlags |= PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME;
+            }
         }
         inOutParams.setFitInsetsTypes(types);
-        inOutParams.setFitInsetsSides(sides);
         inOutParams.setFitInsetsIgnoringVisibility(ignoreVis);
 
         // The fitting of insets are not really controlled by the clients, so we remove the flag.
@@ -2491,8 +2515,7 @@
 
         if (mFirst || mAttachInfo.mViewVisibilityChanged) {
             mAttachInfo.mViewVisibilityChanged = false;
-            int resizeMode = mSoftInputMode &
-                    WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST;
+            int resizeMode = mSoftInputMode & SOFT_INPUT_MASK_ADJUST;
             // If we are in auto resize mode, then we need to determine
             // what mode to use now.
             if (resizeMode == WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED) {
@@ -2505,11 +2528,8 @@
                 if (resizeMode == 0) {
                     resizeMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN;
                 }
-                if ((lp.softInputMode &
-                        WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) != resizeMode) {
-                    lp.softInputMode = (lp.softInputMode &
-                            ~WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) |
-                            resizeMode;
+                if ((lp.softInputMode & SOFT_INPUT_MASK_ADJUST) != resizeMode) {
+                    lp.softInputMode = (lp.softInputMode & ~SOFT_INPUT_MASK_ADJUST) | resizeMode;
                     params = lp;
                 }
             }
@@ -5005,6 +5025,7 @@
                                 String.format("Calling showInsets(%d,%b) on window that no longer"
                                         + " has views.", msg.arg1, msg.arg2 == 1));
                     }
+                    clearLowProfileModeIfNeeded(msg.arg1, msg.arg2 == 1);
                     mInsetsController.show(msg.arg1, msg.arg2 == 1);
                     break;
                 }
diff --git a/core/java/android/view/WindowInsetsController.java b/core/java/android/view/WindowInsetsController.java
index 1a90035..24538c5 100644
--- a/core/java/android/view/WindowInsetsController.java
+++ b/core/java/android/view/WindowInsetsController.java
@@ -33,7 +33,6 @@
 /**
  * Interface to control windows that generate insets.
  *
- * TODO(118118435): Needs more information and examples once the API is more baked.
  */
 public interface WindowInsetsController {
 
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 4567cc9..c356769 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -2034,6 +2034,12 @@
         public static final int PRIVATE_FLAG_FIT_INSETS_CONTROLLED = 0x10000000;
 
         /**
+         * Flag to indicate that the parent frame of a window should be inset by IME.
+         * @hide
+         */
+        public static final int PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME = 0x40000000;
+
+        /**
          * An internal annotation for flags that can be specified to {@link #softInputMode}.
          *
          * @hide
diff --git a/core/java/android/view/WindowManagerPolicyConstants.java b/core/java/android/view/WindowManagerPolicyConstants.java
index 492ab6f..8c35520 100644
--- a/core/java/android/view/WindowManagerPolicyConstants.java
+++ b/core/java/android/view/WindowManagerPolicyConstants.java
@@ -49,6 +49,13 @@
     int PRESENCE_INTERNAL = 1 << 0;
     int PRESENCE_EXTERNAL = 1 << 1;
 
+    // Alternate bars position values
+    int ALT_BAR_UNKNOWN = -1;
+    int ALT_BAR_LEFT = 1 << 0;
+    int ALT_BAR_RIGHT = 1 << 1;
+    int ALT_BAR_BOTTOM = 1 << 2;
+    int ALT_BAR_TOP = 1 << 3;
+
     // Navigation bar position values
     int NAV_BAR_INVALID = -1;
     int NAV_BAR_LEFT = 1 << 0;
diff --git a/core/java/android/view/accessibility/OWNERS b/core/java/android/view/accessibility/OWNERS
index c6f42f7..93b5a2e 100644
--- a/core/java/android/view/accessibility/OWNERS
+++ b/core/java/android/view/accessibility/OWNERS
@@ -1,4 +1,11 @@
-svetoslavganov@google.com
+# Bug component: 44214
+
+romainguy@google.com
+alanv@google.com
+adamp@google.com
+aurimas@google.com
+nduca@google.com
+sumir@google.com
+ogunwale@google.com
+jjaggi@google.com
 pweaver@google.com
-rhedjao@google.com
-qasid@google.com
diff --git a/core/java/android/view/animation/OWNERS b/core/java/android/view/animation/OWNERS
new file mode 100644
index 0000000..9b8f4d9
--- /dev/null
+++ b/core/java/android/view/animation/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 25700
+
+romainguy@google.com
+tianliu@google.com
+alanv@google.com
+adamp@google.com
diff --git a/core/java/android/view/autofill/OWNERS b/core/java/android/view/autofill/OWNERS
new file mode 100644
index 0000000..a088632
--- /dev/null
+++ b/core/java/android/view/autofill/OWNERS
@@ -0,0 +1,9 @@
+# Bug component: 351486
+
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/view/contentcapture/OWNERS b/core/java/android/view/contentcapture/OWNERS
new file mode 100644
index 0000000..6337327
--- /dev/null
+++ b/core/java/android/view/contentcapture/OWNERS
@@ -0,0 +1,9 @@
+# Bug component: 544200
+
+joannechung@google.com
+adamhe@google.com
+tymtsai@google.com
+lpeter@google.com
+augale@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index b1f4df1..2ed0b76 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -611,7 +611,8 @@
         @Override
         public void startInputAsyncOnWindowFocusGain(View focusedView,
                 @SoftInputModeFlags int softInputMode, int windowFlags, boolean forceNewFocus) {
-            final int startInputFlags = getStartInputFlags(focusedView, 0);
+            int startInputFlags = getStartInputFlags(focusedView, 0);
+            startInputFlags |= StartInputFlags.WINDOW_GAINED_FOCUS;
 
             final ImeFocusController controller = getFocusController();
             if (controller == null) {
diff --git a/core/java/android/view/inputmethod/OWNERS b/core/java/android/view/inputmethod/OWNERS
index 244cc30..e6a04da 100644
--- a/core/java/android/view/inputmethod/OWNERS
+++ b/core/java/android/view/inputmethod/OWNERS
@@ -1,3 +1,4 @@
+# Bug component: 34867
 set noparent
 
-include ../../../../../services/core/java/com/android/server/inputmethod/OWNERS
+include /services/core/java/com/android/server/inputmethod/OWNERS
diff --git a/core/java/android/view/inspector/OWNERS b/core/java/android/view/inspector/OWNERS
index c2827cc..705f4b3 100644
--- a/core/java/android/view/inspector/OWNERS
+++ b/core/java/android/view/inspector/OWNERS
@@ -1,3 +1,6 @@
+romainguy@google.com
 alanv@google.com
+adamp@google.com
 aurimas@google.com
-emberrose@google.com
+nduca@google.com
+sumir@google.com
diff --git a/core/java/android/view/textclassifier/OWNERS b/core/java/android/view/textclassifier/OWNERS
index be4fbaa..ac80d9f 100644
--- a/core/java/android/view/textclassifier/OWNERS
+++ b/core/java/android/view/textclassifier/OWNERS
@@ -1,14 +1,8 @@
 # Bug component: 709498
 
+mns@google.com
 toki@google.com
-tonymak@google.com
-zilka@google.com
-jalt@google.com
-joannechung@google.com
+svetoslavganov@android.com
 svetoslavganov@google.com
-eugeniom@google.com
-samsellem@google.com
-adamhe@google.com
 augale@google.com
-lpeter@google.com
-tymtsai@google.com
\ No newline at end of file
+joannechung@google.com
diff --git a/core/java/android/view/textclassifier/intent/OWNERS b/core/java/android/view/textclassifier/intent/OWNERS
new file mode 100644
index 0000000..ac80d9f
--- /dev/null
+++ b/core/java/android/view/textclassifier/intent/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 709498
+
+mns@google.com
+toki@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
+augale@google.com
+joannechung@google.com
diff --git a/core/java/android/view/textclassifier/logging/OWNERS b/core/java/android/view/textclassifier/logging/OWNERS
new file mode 100644
index 0000000..ac80d9f
--- /dev/null
+++ b/core/java/android/view/textclassifier/logging/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 709498
+
+mns@google.com
+toki@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
+augale@google.com
+joannechung@google.com
diff --git a/core/java/android/view/textservice/OWNERS b/core/java/android/view/textservice/OWNERS
new file mode 100644
index 0000000..582be8d
--- /dev/null
+++ b/core/java/android/view/textservice/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 34867
+
+include ../inputmethod/OWNERS
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 0eed7b6..3dc925d 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -387,6 +387,7 @@
     private final SuggestionHelper mSuggestionHelper = new SuggestionHelper();
 
     private boolean mFlagCursorDragFromAnywhereEnabled;
+    private float mCursorDragDirectionMinXYRatio;
     private boolean mFlagInsertionHandleGesturesEnabled;
 
     // Specifies whether the new magnifier (with fish-eye effect) is enabled.
@@ -423,6 +424,11 @@
         mFlagCursorDragFromAnywhereEnabled = AppGlobals.getIntCoreSetting(
                 WidgetFlags.KEY_ENABLE_CURSOR_DRAG_FROM_ANYWHERE,
                 WidgetFlags.ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT ? 1 : 0) != 0;
+        final int cursorDragMinAngleFromVertical = AppGlobals.getIntCoreSetting(
+                WidgetFlags.KEY_CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL,
+                WidgetFlags.CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL_DEFAULT);
+        mCursorDragDirectionMinXYRatio = EditorTouchState.getXYRatio(
+                cursorDragMinAngleFromVertical);
         mFlagInsertionHandleGesturesEnabled = AppGlobals.getIntCoreSetting(
                 WidgetFlags.KEY_ENABLE_INSERTION_HANDLE_GESTURES,
                 WidgetFlags.ENABLE_INSERTION_HANDLE_GESTURES_DEFAULT ? 1 : 0) != 0;
@@ -432,6 +438,8 @@
         if (TextView.DEBUG_CURSOR) {
             logCursor("Editor", "Cursor drag from anywhere is %s.",
                     mFlagCursorDragFromAnywhereEnabled ? "enabled" : "disabled");
+            logCursor("Editor", "Cursor drag min angle from vertical is %d (= %f x/y ratio)",
+                    cursorDragMinAngleFromVertical, mCursorDragDirectionMinXYRatio);
             logCursor("Editor", "Insertion handle gestures is %s.",
                     mFlagInsertionHandleGesturesEnabled ? "enabled" : "disabled");
             logCursor("Editor", "New magnifier is %s.",
@@ -458,6 +466,11 @@
     }
 
     @VisibleForTesting
+    public void setCursorDragMinAngleFromVertical(int degreesFromVertical) {
+        mCursorDragDirectionMinXYRatio = EditorTouchState.getXYRatio(degreesFromVertical);
+    }
+
+    @VisibleForTesting
     public boolean getFlagInsertionHandleGesturesEnabled() {
         return mFlagInsertionHandleGesturesEnabled;
     }
@@ -6059,12 +6072,7 @@
             return trueLine;
         }
 
-        final int lineHeight = layout.getLineBottom(prevLine) - layout.getLineTop(prevLine);
-        int slop = (int)(LINE_SLOP_MULTIPLIER_FOR_HANDLEVIEWS
-                * (layout.getLineBottom(trueLine) - layout.getLineTop(trueLine)));
-        slop = Math.max(mLineChangeSlopMin,
-                Math.min(mLineChangeSlopMax, lineHeight + slop)) - lineHeight;
-        slop = Math.max(0, slop);
+        final int slop = (int)(LINE_SLOP_MULTIPLIER_FOR_HANDLEVIEWS * mTextView.getLineHeight());
 
         final float verticalOffset = mTextView.viewportToContentVerticalOffset();
         if (trueLine > prevLine && y >= layout.getLineBottom(prevLine) + slop + verticalOffset) {
@@ -6134,10 +6142,11 @@
                     if (mIsDraggingCursor) {
                         performCursorDrag(event);
                     } else if (mFlagCursorDragFromAnywhereEnabled
-                                && mTextView.getLayout() != null
-                                && mTextView.isFocused()
-                                && mTouchState.isMovedEnoughForDrag()
-                                && !mTouchState.isDragCloseToVertical()) {
+                            && mTextView.getLayout() != null
+                            && mTextView.isFocused()
+                            && mTouchState.isMovedEnoughForDrag()
+                            && (mTouchState.getInitialDragDirectionXYRatio()
+                            > mCursorDragDirectionMinXYRatio || mTouchState.isOnHandle())) {
                         startCursorDrag(event);
                     }
                     break;
diff --git a/core/java/android/widget/EditorTouchState.java b/core/java/android/widget/EditorTouchState.java
index 9eb63087..7514368 100644
--- a/core/java/android/widget/EditorTouchState.java
+++ b/core/java/android/widget/EditorTouchState.java
@@ -59,7 +59,7 @@
     private boolean mMultiTapInSameArea;
 
     private boolean mMovedEnoughForDrag;
-    private boolean mIsDragCloseToVertical;
+    private float mInitialDragDirectionXYRatio;
 
     public float getLastDownX() {
         return mLastDownX;
@@ -98,8 +98,23 @@
         return mMovedEnoughForDrag;
     }
 
-    public boolean isDragCloseToVertical() {
-        return mIsDragCloseToVertical && !mIsOnHandle;
+    /**
+     * When {@link #isMovedEnoughForDrag()} is {@code true}, this function returns the x/y ratio for
+     * the initial drag direction. Smaller values indicate that the direction is closer to vertical,
+     * while larger values indicate that the direction is closer to horizontal. For example:
+     * <ul>
+     *     <li>if the drag direction is exactly vertical, this returns 0
+     *     <li>if the drag direction is exactly horizontal, this returns {@link Float#MAX_VALUE}
+     *     <li>if the drag direction is 45 deg from vertical, this returns 1
+     *     <li>if the drag direction is 30 deg from vertical, this returns 0.58 (x delta is smaller
+     *     than y delta)
+     *     <li>if the drag direction is 60 deg from vertical, this returns 1.73 (x delta is bigger
+     *     than y delta)
+     * </ul>
+     * This function never returns negative values, regardless of the direction of the drag.
+     */
+    public float getInitialDragDirectionXYRatio() {
+        return mInitialDragDirectionXYRatio;
     }
 
     public void setIsOnHandle(boolean onHandle) {
@@ -155,7 +170,7 @@
             mLastDownY = event.getY();
             mLastDownMillis = event.getEventTime();
             mMovedEnoughForDrag = false;
-            mIsDragCloseToVertical = false;
+            mInitialDragDirectionXYRatio = 0.0f;
         } else if (action == MotionEvent.ACTION_UP) {
             if (TextView.DEBUG_CURSOR) {
                 logCursor("EditorTouchState", "ACTION_UP");
@@ -164,7 +179,7 @@
             mLastUpY = event.getY();
             mLastUpMillis = event.getEventTime();
             mMovedEnoughForDrag = false;
-            mIsDragCloseToVertical = false;
+            mInitialDragDirectionXYRatio = 0.0f;
         } else if (action == MotionEvent.ACTION_MOVE) {
             if (!mMovedEnoughForDrag) {
                 float deltaX = event.getX() - mLastDownX;
@@ -174,9 +189,8 @@
                 int touchSlop = config.getScaledTouchSlop();
                 mMovedEnoughForDrag = distanceSquared > touchSlop * touchSlop;
                 if (mMovedEnoughForDrag) {
-                    // If the direction of the swipe motion is within 45 degrees of vertical, it is
-                    // considered a vertical drag.
-                    mIsDragCloseToVertical = Math.abs(deltaX) <= Math.abs(deltaY);
+                    mInitialDragDirectionXYRatio = (deltaY == 0) ? Float.MAX_VALUE :
+                            Math.abs(deltaX / deltaY);
                 }
             }
         } else if (action == MotionEvent.ACTION_CANCEL) {
@@ -185,7 +199,7 @@
             mMultiTapStatus = MultiTapStatus.NONE;
             mMultiTapInSameArea = false;
             mMovedEnoughForDrag = false;
-            mIsDragCloseToVertical = false;
+            mInitialDragDirectionXYRatio = 0.0f;
         }
     }
 
@@ -201,4 +215,27 @@
         float distanceSquared = (deltaX * deltaX) + (deltaY * deltaY);
         return distanceSquared <= maxDistance * maxDistance;
     }
+
+    /**
+     * Returns the x/y ratio corresponding to the given angle relative to vertical. Smaller angle
+     * values (ie, closer to vertical) will result in a smaller x/y ratio. For example:
+     * <ul>
+     *     <li>if the angle is 45 deg, the ratio is 1
+     *     <li>if the angle is 30 deg, the ratio is 0.58 (x delta is smaller than y delta)
+     *     <li>if the angle is 60 deg, the ratio is 1.73 (x delta is bigger than y delta)
+     * </ul>
+     * If the passed-in value is <= 0, this function returns 0. If the passed-in value is >= 90,
+     * this function returns {@link Float#MAX_VALUE}.
+     *
+     * @see #getInitialDragDirectionXYRatio()
+     */
+    public static float getXYRatio(int angleFromVerticalInDegrees) {
+        if (angleFromVerticalInDegrees <= 0) {
+            return 0.0f;
+        }
+        if (angleFromVerticalInDegrees >= 90) {
+            return Float.MAX_VALUE;
+        }
+        return (float) Math.tan(Math.toRadians(angleFromVerticalInDegrees));
+    }
 }
diff --git a/core/java/android/widget/OWNERS b/core/java/android/widget/OWNERS
index 5c79d21..718076b 100644
--- a/core/java/android/widget/OWNERS
+++ b/core/java/android/widget/OWNERS
@@ -1 +1,11 @@
+# Bug component: 25700
+
+romainguy@google.com
+alanv@google.com
+adamp@google.com
+aurimas@google.com
+siyamed@google.com
+
 per-file TextView.java, EditText.java, Editor.java = siyamed@google.com, nona@google.com, clarabayarri@google.com
+
+per-file SpellChecker.java = file:../view/inputmethod/OWNERS
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 8de9149..3c45e8c 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -54,6 +54,7 @@
 import android.view.ViewDebug;
 import android.view.ViewHierarchyEncoder;
 import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
 import android.view.accessibility.AccessibilityNodeInfo;
 import android.view.animation.AlphaAnimation;
 import android.view.animation.Animation;
@@ -310,9 +311,6 @@
         setMax(a.getInt(R.styleable.ProgressBar_max, mMax));
 
         setProgress(a.getInt(R.styleable.ProgressBar_progress, mProgress));
-        // onProgressRefresh() is only called when the progress changes. So we should set
-        // stateDescription during initialization here.
-        super.setStateDescription(formatStateDescription(mProgress));
 
         setSecondaryProgress(a.getInt(
                 R.styleable.ProgressBar_secondaryProgress, mSecondaryProgress));
@@ -1616,7 +1614,8 @@
     }
 
     void onProgressRefresh(float scale, boolean fromUser, int progress) {
-        if (mCustomStateDescription == null) {
+        if (AccessibilityManager.getInstance(mContext).isEnabled()
+                && mCustomStateDescription == null) {
             super.setStateDescription(formatStateDescription(mProgress));
         }
     }
@@ -2340,6 +2339,7 @@
                     AccessibilityNodeInfo.RangeInfo.RANGE_TYPE_INT, getMin(), getMax(),
                     getProgress());
             info.setRangeInfo(rangeInfo);
+            info.setStateDescription(formatStateDescription(mProgress));
         }
     }
 
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index c617ccc..deed219 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -395,6 +395,10 @@
     private static final int EMS = LINES;
     private static final int PIXELS = 2;
 
+    // Maximum text length for single line input.
+    private static final int MAX_LENGTH_FOR_SINGLE_LINE_EDIT_TEXT = 5000;
+    private InputFilter.LengthFilter mSingleLineLengthFilter = null;
+
     private static final RectF TEMP_RECTF = new RectF();
 
     /** @hide */
@@ -1589,7 +1593,11 @@
         // Same as setSingleLine(), but make sure the transformation method and the maximum number
         // of lines of height are unchanged for multi-line TextViews.
         setInputTypeSingleLine(singleLine);
-        applySingleLine(singleLine, singleLine, singleLine);
+        applySingleLine(singleLine, singleLine, singleLine,
+                // Does not apply automated max length filter since length filter will be resolved
+                // later in this function.
+                false
+        );
 
         if (singleLine && getKeyListener() == null && ellipsize == ELLIPSIZE_NOT_SET) {
             ellipsize = ELLIPSIZE_END;
@@ -1633,7 +1641,16 @@
             setTransformationMethod(PasswordTransformationMethod.getInstance());
         }
 
-        if (maxlength >= 0) {
+        // For addressing b/145128646
+        // For the performance reason, we limit characters for single line text field.
+        if (bufferType == BufferType.EDITABLE && singleLine && maxlength == -1) {
+            mSingleLineLengthFilter = new InputFilter.LengthFilter(
+                MAX_LENGTH_FOR_SINGLE_LINE_EDIT_TEXT);
+        }
+
+        if (mSingleLineLengthFilter != null) {
+            setFilters(new InputFilter[] { mSingleLineLengthFilter });
+        } else if (maxlength >= 0) {
             setFilters(new InputFilter[] { new InputFilter.LengthFilter(maxlength) });
         } else {
             setFilters(NO_FILTERS);
@@ -6590,7 +6607,7 @@
         if (mSingleLine != singleLine || forceUpdate) {
             // Change single line mode, but only change the transformation if
             // we are not in password mode.
-            applySingleLine(singleLine, !isPassword, true);
+            applySingleLine(singleLine, !isPassword, true, true);
         }
 
         if (!isSuggestionsEnabled()) {
@@ -10229,6 +10246,9 @@
      * Note that the default conditions are not necessarily those that were in effect prior this
      * method, and you may want to reset these properties to your custom values.
      *
+     * Note that due to performance reasons, by setting single line for the EditText, the maximum
+     * text length is set to 5000 if no other character limitation are applied.
+     *
      * @attr ref android.R.styleable#TextView_singleLine
      */
     @android.view.RemotableViewMethod
@@ -10236,7 +10256,7 @@
         // Could be used, but may break backward compatibility.
         // if (mSingleLine == singleLine) return;
         setInputTypeSingleLine(singleLine);
-        applySingleLine(singleLine, true, true);
+        applySingleLine(singleLine, true, true, true);
     }
 
     /**
@@ -10256,14 +10276,40 @@
     }
 
     private void applySingleLine(boolean singleLine, boolean applyTransformation,
-            boolean changeMaxLines) {
+            boolean changeMaxLines, boolean changeMaxLength) {
         mSingleLine = singleLine;
+
         if (singleLine) {
             setLines(1);
             setHorizontallyScrolling(true);
             if (applyTransformation) {
                 setTransformationMethod(SingleLineTransformationMethod.getInstance());
             }
+
+            if (!changeMaxLength) return;
+
+            // Single line length filter is only applicable editable text.
+            if (mBufferType != BufferType.EDITABLE) return;
+
+            final InputFilter[] prevFilters = getFilters();
+            for (InputFilter filter: getFilters()) {
+                // We don't add LengthFilter if already there.
+                if (filter instanceof InputFilter.LengthFilter) return;
+            }
+
+            if (mSingleLineLengthFilter == null) {
+                mSingleLineLengthFilter = new InputFilter.LengthFilter(
+                    MAX_LENGTH_FOR_SINGLE_LINE_EDIT_TEXT);
+            }
+
+            final InputFilter[] newFilters = new InputFilter[prevFilters.length + 1];
+            System.arraycopy(prevFilters, 0, newFilters, 0, prevFilters.length);
+            newFilters[prevFilters.length] = mSingleLineLengthFilter;
+
+            setFilters(newFilters);
+
+            // Since filter doesn't apply to existing text, trigger filter by setting text.
+            setText(getText());
         } else {
             if (changeMaxLines) {
                 setMaxLines(Integer.MAX_VALUE);
@@ -10272,6 +10318,47 @@
             if (applyTransformation) {
                 setTransformationMethod(null);
             }
+
+            if (!changeMaxLength) return;
+
+            // Single line length filter is only applicable editable text.
+            if (mBufferType != BufferType.EDITABLE) return;
+
+            final InputFilter[] prevFilters = getFilters();
+            if (prevFilters.length == 0) return;
+
+            // Short Circuit: if mSingleLineLengthFilter is not allocated, nobody sets automated
+            // single line char limit filter.
+            if (mSingleLineLengthFilter == null) return;
+
+            // If we need to remove mSingleLineLengthFilter, we need to allocate another array.
+            // Since filter list is expected to be small and want to avoid unnecessary array
+            // allocation, check if there is mSingleLengthFilter first.
+            int targetIndex = -1;
+            for (int i = 0; i < prevFilters.length; ++i) {
+                if (prevFilters[i] == mSingleLineLengthFilter) {
+                    targetIndex = i;
+                    break;
+                }
+            }
+            if (targetIndex == -1) return;  // not found. Do nothing.
+
+            if (prevFilters.length == 1) {
+                setFilters(NO_FILTERS);
+                return;
+            }
+
+            // Create new array which doesn't include mSingleLengthFilter.
+            final InputFilter[] newFilters = new InputFilter[prevFilters.length - 1];
+            System.arraycopy(prevFilters, 0, newFilters, 0, targetIndex);
+            System.arraycopy(
+                    prevFilters,
+                    targetIndex + 1,
+                    newFilters,
+                    targetIndex,
+                    prevFilters.length - targetIndex - 1);
+            setFilters(newFilters);
+            mSingleLineLengthFilter = null;
         }
     }
 
diff --git a/core/java/android/widget/WidgetFlags.java b/core/java/android/widget/WidgetFlags.java
index 09ab5aa..e272086 100644
--- a/core/java/android/widget/WidgetFlags.java
+++ b/core/java/android/widget/WidgetFlags.java
@@ -41,6 +41,28 @@
     public static final boolean ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT = true;
 
     /**
+     * Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
+     * rather than a scroll. The direction angle of the swipe gesture must exceed this value in
+     * order to trigger cursor drag; otherwise, the swipe will be assumed to be a scroll gesture.
+     * The value units for this flag is degrees and the valid range is [0,90] inclusive. If a value
+     * < 0 is set, 0 will be used instead; if a value > 90 is set, 90 will be used instead.
+     */
+    public static final String CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL =
+            "CursorControlFeature__min_angle_from_vertical_to_start_cursor_drag";
+
+    /**
+     * The key used in app core settings for the flag
+     * {@link #CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL}.
+     */
+    public static final String KEY_CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL =
+            "widget__min_angle_from_vertical_to_start_cursor_drag";
+
+    /**
+     * Default value for the flag {@link #CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL}.
+     */
+    public static final int CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL_DEFAULT = 45;
+
+    /**
      * The flag of finger-to-cursor distance in DP for cursor dragging.
      * The value unit is DP and the range is {0..100}. If the value is out of range, the legacy
      * value, which is based on handle size, will be used.
diff --git a/core/java/android/widget/inline/InlinePresentationSpec.java b/core/java/android/widget/inline/InlinePresentationSpec.java
index 5f924c6..e7727fd 100644
--- a/core/java/android/widget/inline/InlinePresentationSpec.java
+++ b/core/java/android/widget/inline/InlinePresentationSpec.java
@@ -42,8 +42,13 @@
     private final Size mMaxSize;
 
     /**
-     * The extras encoding the UI style information. Defaults to {@code Bundle.Empty} in which case
-     * the default system UI style will be used.
+     * The extras encoding the UI style information.
+     *
+     * <p>The style bundles can be created using the relevant Style classes and their builders in
+     * the androidx autofill library e.g. {@code androidx.autofill.inline.UiVersions.StylesBuilder}.
+     * </p>
+     *
+     * <p>The style must be set for the suggestion to render properly.</p>
      *
      * <p>Note: There should be no remote objects in the bundle, all included remote objects will
      * be removed from the bundle before transmission.</p>
@@ -123,8 +128,13 @@
     }
 
     /**
-     * The extras encoding the UI style information. Defaults to {@code Bundle.Empty} in which case
-     * the default system UI style will be used.
+     * The extras encoding the UI style information.
+     *
+     * <p>The style bundles can be created using the relevant Style classes and their builders in
+     * the androidx autofill library e.g. {@code androidx.autofill.inline.UiVersions.StylesBuilder}.
+     * </p>
+     *
+     * <p>The style must be set for the suggestion to render properly.</p>
      *
      * <p>Note: There should be no remote objects in the bundle, all included remote objects will
      * be removed from the bundle before transmission.</p>
@@ -264,8 +274,13 @@
         }
 
         /**
-         * The extras encoding the UI style information. Defaults to {@code Bundle.Empty} in which case
-         * the default system UI style will be used.
+         * The extras encoding the UI style information.
+         *
+         * <p>The style bundles can be created using the relevant Style classes and their builders in
+         * the androidx autofill library e.g. {@code androidx.autofill.inline.UiVersions.StylesBuilder}.
+         * </p>
+         *
+         * <p>The style must be set for the suggestion to render properly.</p>
          *
          * <p>Note: There should be no remote objects in the bundle, all included remote objects will
          * be removed from the bundle before transmission.</p>
@@ -302,7 +317,7 @@
     }
 
     @DataClass.Generated(
-            time = 1588109681295L,
+            time = 1596485189661L,
             codegenVersion = "1.0.15",
             sourceFile = "frameworks/base/core/java/android/widget/inline/InlinePresentationSpec.java",
             inputSignatures = "private final @android.annotation.NonNull android.util.Size mMinSize\nprivate final @android.annotation.NonNull android.util.Size mMaxSize\nprivate final @android.annotation.NonNull android.os.Bundle mStyle\nprivate static @android.annotation.NonNull android.os.Bundle defaultStyle()\nprivate  boolean styleEquals(android.os.Bundle)\npublic  void filterContentTypes()\nclass InlinePresentationSpec extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true, genBuilder=true)\nclass BaseBuilder extends java.lang.Object implements []")
diff --git a/core/java/android/window/OWNERS b/core/java/android/window/OWNERS
index d10fb31..2c61df9 100644
--- a/core/java/android/window/OWNERS
+++ b/core/java/android/window/OWNERS
@@ -1,3 +1,3 @@
 set noparent
 
-include ../../../../services/core/java/com/android/server/wm/OWNERS
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/core/java/android/window/VirtualDisplayTaskEmbedder.java b/core/java/android/window/VirtualDisplayTaskEmbedder.java
index 9ccb4c1..9013da3 100644
--- a/core/java/android/window/VirtualDisplayTaskEmbedder.java
+++ b/core/java/android/window/VirtualDisplayTaskEmbedder.java
@@ -19,6 +19,7 @@
 import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL;
 import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY;
 import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC;
+import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_TRUSTED;
 import static android.view.Display.INVALID_DISPLAY;
 
 import android.app.ActivityManager;
@@ -63,6 +64,7 @@
     private int mDisplayDensityDpi;
     private final boolean mSingleTaskInstance;
     private final boolean mUsePublicVirtualDisplay;
+    private final boolean mUseTrustedDisplay;
     private VirtualDisplay mVirtualDisplay;
     private Insets mForwardedInsets;
     private DisplayMetrics mTmpDisplayMetrics;
@@ -77,10 +79,12 @@
      *                           only applicable if virtual displays are used
      */
     public VirtualDisplayTaskEmbedder(Context context, VirtualDisplayTaskEmbedder.Host host,
-            boolean singleTaskInstance, boolean usePublicVirtualDisplay) {
+            boolean singleTaskInstance, boolean usePublicVirtualDisplay,
+            boolean useTrustedDisplay) {
         super(context, host);
         mSingleTaskInstance = singleTaskInstance;
         mUsePublicVirtualDisplay = usePublicVirtualDisplay;
+        mUseTrustedDisplay = useTrustedDisplay;
     }
 
     /**
@@ -103,6 +107,9 @@
         if (mUsePublicVirtualDisplay) {
             virtualDisplayFlags |= VIRTUAL_DISPLAY_FLAG_PUBLIC;
         }
+        if (mUseTrustedDisplay) {
+            virtualDisplayFlags |= VIRTUAL_DISPLAY_FLAG_TRUSTED;
+        }
 
         mVirtualDisplay = displayManager.createVirtualDisplay(
                 DISPLAY_NAME + "@" + System.identityHashCode(this), mHost.getWidth(),
diff --git a/core/java/com/android/ims/OWNERS b/core/java/com/android/ims/OWNERS
new file mode 100644
index 0000000..640baf2
--- /dev/null
+++ b/core/java/com/android/ims/OWNERS
@@ -0,0 +1 @@
+include /telephony/OWNERS
diff --git a/core/java/com/android/internal/BrightnessSynchronizer.java b/core/java/com/android/internal/BrightnessSynchronizer.java
index 8ff3c49..e8ce0f2 100644
--- a/core/java/com/android/internal/BrightnessSynchronizer.java
+++ b/core/java/com/android/internal/BrightnessSynchronizer.java
@@ -36,7 +36,7 @@
  * (new) system for storing the brightness. It has methods to convert between the two and also
  * observes for when one of the settings is changed and syncs this with the other.
  */
-public class BrightnessSynchronizer{
+public class BrightnessSynchronizer {
 
     private static final int MSG_UPDATE_FLOAT = 1;
     private static final int MSG_UPDATE_INT = 2;
@@ -78,6 +78,26 @@
         mContext = context;
         mBrightnessSyncObserver = new BrightnessSyncObserver(mHandler);
         mBrightnessSyncObserver.startObserving();
+
+        // It is possible for the system to start up with the int and float values not
+        // synchronized. So we force an update to the int value, since float is the source
+        // of truth. Fallback to int value, if float is invalid. If both are invalid, use default
+        // float value from config.
+        final float currentFloatBrightness = getScreenBrightnessFloat(context);
+        final int currentIntBrightness = getScreenBrightnessInt(context);
+
+        if (!Float.isNaN(currentFloatBrightness)) {
+            updateBrightnessIntFromFloat(currentFloatBrightness);
+        } else if (currentIntBrightness != -1) {
+            updateBrightnessFloatFromInt(currentIntBrightness);
+        } else {
+            final float defaultBrightness = mContext.getResources().getFloat(
+                    com.android.internal.R.dimen.config_screenBrightnessSettingDefaultFloat);
+            Settings.System.putFloatForUser(mContext.getContentResolver(),
+                    Settings.System.SCREEN_BRIGHTNESS_FLOAT, defaultBrightness,
+                    UserHandle.USER_CURRENT);
+
+        }
     }
 
     /**
@@ -166,7 +186,8 @@
 
     private static int getScreenBrightnessInt(Context context) {
         return Settings.System.getIntForUser(context.getContentResolver(),
-                Settings.System.SCREEN_BRIGHTNESS, 0, UserHandle.USER_CURRENT);
+                Settings.System.SCREEN_BRIGHTNESS, PowerManager.BRIGHTNESS_INVALID,
+                UserHandle.USER_CURRENT);
     }
 
     private float mPreferredSettingValue;
diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java
index 236e67a..ac8f9e8 100644
--- a/core/java/com/android/internal/app/ChooserActivity.java
+++ b/core/java/com/android/internal/app/ChooserActivity.java
@@ -273,8 +273,6 @@
     private int mLastNumberOfChildren = -1;
 
     private static final String TARGET_DETAILS_FRAGMENT_TAG = "targetDetailsFragment";
-    // TODO: Update to handle landscape instead of using static value
-    private static final int MAX_RANKED_TARGETS = 4;
 
     private final List<ChooserTargetServiceConnection> mServiceConnections = new ArrayList<>();
     private final Set<Pair<ComponentName, UserHandle>> mServicesRequested = new HashSet<>();
@@ -784,8 +782,8 @@
                 FrameworkStatsLog.SHARESHEET_STARTED,
                 getReferrerPackageName(),
                 target.getType(),
-                initialIntents == null ? 0 : initialIntents.length,
                 mCallerChooserTargets == null ? 0 : mCallerChooserTargets.length,
+                initialIntents == null ? 0 : initialIntents.length,
                 isWorkProfile(),
                 findPreferredContentPreview(getTargetIntent(), getContentResolver()),
                 target.getAction()
@@ -2641,7 +2639,10 @@
         }
         RecyclerView recyclerView = mChooserMultiProfilePagerAdapter.getActiveAdapterView();
         ChooserGridAdapter gridAdapter = mChooserMultiProfilePagerAdapter.getCurrentRootAdapter();
-        if (gridAdapter == null || recyclerView == null) {
+        // Skip height calculation if recycler view was scrolled to prevent it inaccurately
+        // calculating the height, as the logic below does not account for the scrolled offset.
+        if (gridAdapter == null || recyclerView == null
+                || recyclerView.computeVerticalScrollOffset() != 0) {
             return;
         }
 
@@ -3128,6 +3129,13 @@
         ChooserGridAdapter currentRootAdapter =
                 mChooserMultiProfilePagerAdapter.getCurrentRootAdapter();
         currentRootAdapter.updateDirectShareExpansion();
+        // This fixes an edge case where after performing a variety of gestures, vertical scrolling
+        // ends up disabled. That's because at some point the old tab's vertical scrolling is
+        // disabled and the new tab's is enabled. For context, see b/159997845
+        setVerticalScrollEnabled(true);
+        if (mResolverDrawerLayout != null) {
+            mResolverDrawerLayout.scrollNestedScrollableChildBackToTop();
+        }
     }
 
     @Override
@@ -3286,9 +3294,8 @@
         }
 
         /**
-         * Returns either {@code 0} or {@code 1} depending on whether we want to show the list item
-         * content preview. Not to be confused with the sticky content preview which is above the
-         * personal and work tabs.
+         * Whether the "system" row of targets is displayed.
+         * This area includes the content preview (if present) and action row.
          */
         public int getSystemRowCount() {
             // For the tabbed case we show the sticky content preview above the tabs,
@@ -3296,6 +3303,7 @@
             if (shouldShowTabs()) {
                 return 0;
             }
+
             if (!isSendAction(getTargetIntent())) {
                 return 0;
             }
diff --git a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
index ffa6041..3a65a32 100644
--- a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
@@ -252,8 +252,10 @@
 
     @Override
     protected void setupContainerPadding(View container) {
+        int initialBottomPadding = getContext().getResources().getDimensionPixelSize(
+                R.dimen.resolver_empty_state_container_padding_bottom);
         container.setPadding(container.getPaddingLeft(), container.getPaddingTop(),
-                container.getPaddingRight(), container.getPaddingBottom() + mBottomOffset);
+                container.getPaddingRight(), initialBottomPadding + mBottomOffset);
     }
 
     class ChooserProfileDescriptor extends ProfileDescriptor {
diff --git a/core/java/com/android/internal/app/OWNERS b/core/java/com/android/internal/app/OWNERS
new file mode 100644
index 0000000..108ab92
--- /dev/null
+++ b/core/java/com/android/internal/app/OWNERS
@@ -0,0 +1 @@
+per-file *AppOp* = file:/core/java/android/permission/OWNERS
diff --git a/core/java/com/android/internal/compat/ChangeReporter.java b/core/java/com/android/internal/compat/ChangeReporter.java
index 5e886a6..60a30a0 100644
--- a/core/java/com/android/internal/compat/ChangeReporter.java
+++ b/core/java/com/android/internal/compat/ChangeReporter.java
@@ -221,7 +221,7 @@
                     FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER;
 
     @Retention(RetentionPolicy.SOURCE)
-    @IntDef(flag = true, prefix = { "STATE_" }, value = {
+    @IntDef(prefix = { "STATE_" }, value = {
             STATE_UNKNOWN_STATE,
             STATE_ENABLED,
             STATE_DISABLED,
@@ -231,7 +231,7 @@
     }
 
     @Retention(RetentionPolicy.SOURCE)
-    @IntDef(flag = true, prefix = { "SOURCE_" }, value = {
+    @IntDef(prefix = { "SOURCE_" }, value = {
             SOURCE_UNKNOWN_SOURCE,
             SOURCE_APP_PROCESS,
             SOURCE_SYSTEM_SERVER
diff --git a/core/java/com/android/internal/config/sysui/OWNERS b/core/java/com/android/internal/config/sysui/OWNERS
new file mode 100644
index 0000000..2e96c97
--- /dev/null
+++ b/core/java/com/android/internal/config/sysui/OWNERS
@@ -0,0 +1 @@
+include /packages/SystemUI/OWNERS
diff --git a/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java b/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
index d238d0e..b4cd145 100644
--- a/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
+++ b/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
@@ -120,6 +120,18 @@
      */
     public static final String HASH_SALT_MAX_DAYS = "hash_salt_max_days";
 
+    // Flag related to Privacy Indicators
+
+    /**
+     * Whether to show the complete ongoing app ops chip.
+     */
+    public static final String PROPERTY_PERMISSIONS_HUB_ENABLED = "permissions_hub_2_enabled";
+
+    /**
+     * Whether to show app ops chip for just microphone + camera.
+     */
+    public static final String PROPERTY_MIC_CAMERA_ENABLED = "camera_mic_icons_enabled";
+
     // Flags related to Assistant
 
     /**
@@ -378,6 +390,20 @@
     public static final String CHOOSER_TARGET_RANKING_ENABLED = "chooser_target_ranking_enabled";
 
     /**
+     * (float) Weight bonus applied on top sharing shortcuts as per native ranking provided by apps.
+     * Its range need to be 0 ~ 1.
+     */
+    public static final String TOP_NATIVE_RANKED_SHARING_SHORTCUTS_BOOSTER =
+            "top_native_ranked_sharing_shortcut_booster";
+
+    /**
+     * (float) Weight bonus applied on 2nd top sharing shortcuts as per native ranking provided by
+     * apps. Its range need to be 0 ~ 1.
+     */
+    public static final String NON_TOP_NATIVE_RANKED_SHARING_SHORTCUTS_BOOSTER =
+            "non_top_native_ranked_sharing_shortcut_booster";
+
+    /**
      * (boolean) Whether to enable user-drag resizing for PIP.
      */
     public static final String PIP_USER_RESIZE = "pip_user_resize";
@@ -397,6 +423,11 @@
      */
     public static final String BACK_GESTURE_SLOP_MULTIPLIER = "back_gesture_slop_multiplier";
 
+    /**
+     * (long) Screenshot keychord delay (how long the buttons must be pressed), in ms
+     */
+    public static final String SCREENSHOT_KEYCHORD_DELAY = "screenshot_keychord_delay";
+
     private SystemUiDeviceConfigFlags() {
     }
 }
diff --git a/core/java/com/android/internal/content/FileSystemProvider.java b/core/java/com/android/internal/content/FileSystemProvider.java
index a50a522..3b5fecf 100644
--- a/core/java/com/android/internal/content/FileSystemProvider.java
+++ b/core/java/com/android/internal/content/FileSystemProvider.java
@@ -113,6 +113,14 @@
         // Default is no-op
     }
 
+    /**
+     * Callback indicating that the given document has been deleted or moved. This gives
+     * the provider a hook to revoke the uri permissions.
+     */
+    protected void onDocIdDeleted(String docId) {
+        // Default is no-op
+    }
+
     @Override
     public boolean onCreate() {
         throw new UnsupportedOperationException(
@@ -283,6 +291,7 @@
 
         final String afterDocId = getDocIdForFile(after);
         onDocIdChanged(docId);
+        onDocIdDeleted(docId);
         onDocIdChanged(afterDocId);
 
         final File afterVisibleFile = getFileForDocId(afterDocId, true);
@@ -312,6 +321,7 @@
 
         final String docId = getDocIdForFile(after);
         onDocIdChanged(sourceDocumentId);
+        onDocIdDeleted(sourceDocumentId);
         onDocIdChanged(docId);
         moveInMediaStore(visibleFileBefore, getFileForDocId(docId, true));
 
@@ -343,6 +353,7 @@
         }
 
         onDocIdChanged(docId);
+        onDocIdDeleted(docId);
         removeFromMediaStore(visibleFile);
     }
 
diff --git a/core/java/com/android/internal/inputmethod/InputMethodDebug.java b/core/java/com/android/internal/inputmethod/InputMethodDebug.java
index 37f6823..3bcba75 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodDebug.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodDebug.java
@@ -224,6 +224,8 @@
                 return "HIDE_DOCKED_STACK_ATTACHED";
             case SoftInputShowHideReason.HIDE_RECENTS_ANIMATION:
                 return "HIDE_RECENTS_ANIMATION";
+            case SoftInputShowHideReason.HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR:
+                return "HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR";
             default:
                 return "Unknown=" + reason;
         }
diff --git a/core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java b/core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java
index 4b968b4..f46626b 100644
--- a/core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java
+++ b/core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java
@@ -47,7 +47,8 @@
         SoftInputShowHideReason.HIDE_POWER_BUTTON_GO_HOME,
         SoftInputShowHideReason.HIDE_DOCKED_STACK_ATTACHED,
         SoftInputShowHideReason.HIDE_RECENTS_ANIMATION,
-        SoftInputShowHideReason.HIDE_BUBBLES})
+        SoftInputShowHideReason.HIDE_BUBBLES,
+        SoftInputShowHideReason.HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR})
 public @interface SoftInputShowHideReason {
     /** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */
     int SHOW_SOFT_INPUT = 0;
@@ -147,4 +148,17 @@
      * switching, or collapsing Bubbles.
      */
     int HIDE_BUBBLES = 19;
+
+    /**
+     * Hide soft input when focusing the same window (e.g. screen turned-off and turn-on) which no
+     * valid focused editor.
+     *
+     * Note: From Android R, the window focus change callback is processed by InputDispatcher,
+     * some focus behavior changes (e.g. There are an activity with a dialog window, after
+     * screen turned-off and turned-on, before Android R the window focus sequence would be
+     * the activity first and then the dialog focused, however, in R the focus sequence would be
+     * only the dialog focused as it's the latest window with input focus) makes we need to hide
+     * soft-input when the same window focused again to align with the same behavior prior to R.
+     */
+    int HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR = 20;
 }
diff --git a/core/java/com/android/internal/inputmethod/StartInputFlags.java b/core/java/com/android/internal/inputmethod/StartInputFlags.java
index 5a8d2c2..ac83987 100644
--- a/core/java/com/android/internal/inputmethod/StartInputFlags.java
+++ b/core/java/com/android/internal/inputmethod/StartInputFlags.java
@@ -47,4 +47,10 @@
      * documented hence we probably need to revisit this though.
      */
     int INITIAL_CONNECTION = 4;
+
+    /**
+     * The start input happens when the window gained focus to call
+     * {@code android.view.inputmethod.InputMethodManager#startInputAsyncOnWindowFocusGain}.
+     */
+    int WINDOW_GAINED_FOCUS = 8;
 }
diff --git a/core/java/com/android/internal/notification/OWNERS b/core/java/com/android/internal/notification/OWNERS
new file mode 100644
index 0000000..396fd12
--- /dev/null
+++ b/core/java/com/android/internal/notification/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/notification/OWNERS
diff --git a/core/java/com/android/internal/os/KernelWakelockReader.java b/core/java/com/android/internal/os/KernelWakelockReader.java
index f668bba..e595db3 100644
--- a/core/java/com/android/internal/os/KernelWakelockReader.java
+++ b/core/java/com/android/internal/os/KernelWakelockReader.java
@@ -184,6 +184,7 @@
 
         try {
             wlStats = mSuspendControlService.getWakeLockStats();
+            Slog.i(TAG, "Number of wakelock obtained from SystemSuspend: " + wlStats.length);
             updateWakelockStats(wlStats, staleStats);
         } catch (RemoteException e) {
             Slog.wtf(TAG, "Failed to obtain wakelock stats from ISuspendControlService", e);
diff --git a/core/java/com/android/internal/os/OWNERS b/core/java/com/android/internal/os/OWNERS
index afc9432..8f78b2a 100644
--- a/core/java/com/android/internal/os/OWNERS
+++ b/core/java/com/android/internal/os/OWNERS
@@ -1 +1,8 @@
-per-file ZygoteArguments.java,ZygoteConnection.java,ZygoteInit.java,Zygote.java,ZygoteServer.java = calin@google.com, chriswailes@google.com, maco@google.com, narayan@google.com, ngeoffray@google.com
+per-file *Power* = file:/services/core/java/com/android/server/power/OWNERS
+per-file *Zygote* = file:/ZYGOTE_OWNERS
+
+# BatteryStats
+per-file BatterySipper.java = file:/BATTERY_STATS_OWNERS
+per-file BatteryStats* = file:/BATTERY_STATS_OWNERS
+per-file BatteryUsageStats* = file:/BATTERY_STATS_OWNERS
+per-file *PowerCalculator* = file:/BATTERY_STATS_OWNERS
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 6a67670..6335baa 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -631,8 +631,11 @@
 
     /**
      * Creates a PathClassLoader for the given class path that is associated with a shared
-     * namespace, i.e., this classloader can access platform-private native libraries. The
-     * classloader will use java.library.path as the native library path.
+     * namespace, i.e., this classloader can access platform-private native libraries.
+     *
+     * The classloader will add java.library.path to the native library path for the classloader
+     * namespace. Since it includes platform locations like /system/lib, this is only appropriate
+     * for platform code that don't need linker namespace isolation (as opposed to APEXes and apps).
      */
     static ClassLoader createPathClassLoader(String classPath, int targetSdkVersion) {
         String libraryPath = System.getProperty("java.library.path");
diff --git a/core/java/com/android/internal/os/logging/MetricsLoggerWrapper.java b/core/java/com/android/internal/os/logging/MetricsLoggerWrapper.java
index ba60fa5..b42ea7d 100644
--- a/core/java/com/android/internal/os/logging/MetricsLoggerWrapper.java
+++ b/core/java/com/android/internal/os/logging/MetricsLoggerWrapper.java
@@ -16,14 +16,8 @@
 
 package com.android.internal.os.logging;
 
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.util.Pair;
 import android.view.WindowManager.LayoutParams;
 
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.util.FrameworkStatsLog;
 
 /**
@@ -32,81 +26,6 @@
  */
 public class MetricsLoggerWrapper {
 
-    private static final int METRIC_VALUE_DISMISSED_BY_TAP = 0;
-    private static final int METRIC_VALUE_DISMISSED_BY_DRAG = 1;
-
-    public static void logPictureInPictureDismissByTap(Context context,
-            Pair<ComponentName, Integer> topActivityInfo) {
-        MetricsLogger.action(context, MetricsEvent.ACTION_PICTURE_IN_PICTURE_DISMISSED,
-                METRIC_VALUE_DISMISSED_BY_TAP);
-        FrameworkStatsLog.write(FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED,
-                getUid(context, topActivityInfo.first, topActivityInfo.second),
-                topActivityInfo.first.flattenToString(),
-                FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED__STATE__DISMISSED);
-    }
-
-    public static void logPictureInPictureDismissByDrag(Context context,
-            Pair<ComponentName, Integer> topActivityInfo) {
-        MetricsLogger.action(context,
-                MetricsEvent.ACTION_PICTURE_IN_PICTURE_DISMISSED,
-                METRIC_VALUE_DISMISSED_BY_DRAG);
-        FrameworkStatsLog.write(FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED,
-                getUid(context, topActivityInfo.first, topActivityInfo.second),
-                topActivityInfo.first.flattenToString(),
-                FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED__STATE__DISMISSED);
-    }
-
-    public static void logPictureInPictureMinimize(Context context, boolean isMinimized,
-            Pair<ComponentName, Integer> topActivityInfo) {
-        MetricsLogger.action(context, MetricsEvent.ACTION_PICTURE_IN_PICTURE_MINIMIZED,
-                isMinimized);
-        FrameworkStatsLog.write(FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED,
-                getUid(context, topActivityInfo.first, topActivityInfo.second),
-                topActivityInfo.first.flattenToString(),
-                FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED__STATE__MINIMIZED);
-    }
-
-    /**
-     * Get uid from component name and user Id
-     * @return uid. -1 if not found.
-     */
-    private static int getUid(Context context, ComponentName componentName, int userId) {
-        int uid = -1;
-        if (componentName == null) {
-            return uid;
-        }
-        try {
-            uid = context.getPackageManager().getApplicationInfoAsUser(
-                    componentName.getPackageName(), 0, userId).uid;
-        } catch (NameNotFoundException e) {
-        }
-        return uid;
-    }
-
-    public static void logPictureInPictureMenuVisible(Context context, boolean menuStateFull) {
-        MetricsLogger.visibility(context, MetricsEvent.ACTION_PICTURE_IN_PICTURE_MENU,
-                menuStateFull);
-    }
-
-    public static void logPictureInPictureEnter(Context context,
-            int uid, String shortComponentName, boolean supportsEnterPipOnTaskSwitch) {
-        MetricsLogger.action(context, MetricsEvent.ACTION_PICTURE_IN_PICTURE_ENTERED,
-                supportsEnterPipOnTaskSwitch);
-        FrameworkStatsLog.write(FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED, uid,
-                shortComponentName,
-                FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED__STATE__ENTERED);
-    }
-
-    public static void logPictureInPictureFullScreen(Context context, int uid,
-            String shortComponentName) {
-        MetricsLogger.action(context,
-                MetricsEvent.ACTION_PICTURE_IN_PICTURE_EXPANDED_TO_FULLSCREEN);
-        FrameworkStatsLog.write(FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED,
-                uid,
-                shortComponentName,
-                FrameworkStatsLog.PICTURE_IN_PICTURE_STATE_CHANGED__STATE__EXPANDED_TO_FULL_SCREEN);
-    }
-
     public static void logAppOverlayEnter(int uid, String packageName, boolean changed, int type, boolean usingAlertWindow) {
         if (changed) {
             if (type != LayoutParams.TYPE_APPLICATION_OVERLAY) {
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index b12c5e9..fbbf791 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -1094,13 +1094,15 @@
             mLastWindowFlags = attrs.flags;
 
             if (insets != null) {
-                final Insets systemBarInsets = insets.getInsets(WindowInsets.Type.systemBars());
                 final Insets stableBarInsets = insets.getInsetsIgnoringVisibility(
                         WindowInsets.Type.systemBars());
-                mLastTopInset = systemBarInsets.top;
-                mLastBottomInset = systemBarInsets.bottom;
-                mLastRightInset = systemBarInsets.right;
-                mLastLeftInset = systemBarInsets.left;
+                final Insets systemInsets = Insets.min(
+                        insets.getInsets(WindowInsets.Type.systemBars()
+                                | WindowInsets.Type.displayCutout()), stableBarInsets);
+                mLastTopInset = systemInsets.top;
+                mLastBottomInset = systemInsets.bottom;
+                mLastRightInset = systemInsets.right;
+                mLastLeftInset = systemInsets.left;
 
                 // Don't animate if the presence of stable insets has changed, because that
                 // indicates that the window was either just added and received them for the
diff --git a/core/java/com/android/internal/policy/OWNERS b/core/java/com/android/internal/policy/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/core/java/com/android/internal/policy/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/core/java/com/android/internal/statusbar/OWNERS b/core/java/com/android/internal/statusbar/OWNERS
new file mode 100644
index 0000000..2e96c97
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/OWNERS
@@ -0,0 +1 @@
+include /packages/SystemUI/OWNERS
diff --git a/core/java/com/android/internal/telephony/OWNERS b/core/java/com/android/internal/telephony/OWNERS
new file mode 100644
index 0000000..640baf2
--- /dev/null
+++ b/core/java/com/android/internal/telephony/OWNERS
@@ -0,0 +1 @@
+include /telephony/OWNERS
diff --git a/core/java/com/android/internal/util/ScreenshotHelper.java b/core/java/com/android/internal/util/ScreenshotHelper.java
index 9bf0513..a23fc4b 100644
--- a/core/java/com/android/internal/util/ScreenshotHelper.java
+++ b/core/java/com/android/internal/util/ScreenshotHelper.java
@@ -291,7 +291,7 @@
             };
 
             Message msg = Message.obtain(null, screenshotType, screenshotRequest);
-            final ServiceConnection myConn = mScreenshotConnection;
+
             Handler h = new Handler(handler.getLooper()) {
                 @Override
                 public void handleMessage(Message msg) {
@@ -304,8 +304,8 @@
                             break;
                         case SCREENSHOT_MSG_PROCESS_COMPLETE:
                             synchronized (mScreenshotLock) {
-                                if (myConn != null && mScreenshotConnection == myConn) {
-                                    mContext.unbindService(myConn);
+                                if (mScreenshotConnection != null) {
+                                    mContext.unbindService(mScreenshotConnection);
                                     mScreenshotConnection = null;
                                     mScreenshotService = null;
                                 }
@@ -368,6 +368,7 @@
                 }
             } else {
                 Messenger messenger = new Messenger(mScreenshotService);
+
                 try {
                     messenger.send(msg);
                 } catch (RemoteException e) {
diff --git a/core/java/com/android/internal/view/OWNERS b/core/java/com/android/internal/view/OWNERS
new file mode 100644
index 0000000..851d1f3
--- /dev/null
+++ b/core/java/com/android/internal/view/OWNERS
@@ -0,0 +1,20 @@
+# Bug component: 25700
+
+file:/core/java/android/view/OWNERS
+
+# Autofill
+per-file IInlineSuggestions*.aidl = file:/core/java/android/service/autofill/OWNERS
+per-file InlineSuggestions*.java = file:/core/java/android/service/autofill/OWNERS
+
+# Ime
+per-file *Input* = file:/services/core/java/com/android/server/inputmethod/OWNERS
+
+# Surface
+per-file *Surface* = file:/graphics/java/android/graphics/OWNERS
+per-file *Surface* = file:/services/core/java/com/android/server/wm/OWNERS
+
+# WindowManager
+per-file AppearanceRegion = file:/services/core/java/com/android/server/wm/OWNERS
+per-file BaseIWIndow.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file RotationPolicy.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file WindowManagerPolicyThread.java = file:/services/core/java/com/android/server/wm/OWNERS
diff --git a/core/java/com/android/internal/widget/LocalImageResolver.java b/core/java/com/android/internal/widget/LocalImageResolver.java
index 2302de2..b4e108f 100644
--- a/core/java/com/android/internal/widget/LocalImageResolver.java
+++ b/core/java/com/android/internal/widget/LocalImageResolver.java
@@ -23,6 +23,7 @@
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
+import android.util.Log;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -31,6 +32,7 @@
  * A class to extract Bitmaps from a MessagingStyle message.
  */
 public class LocalImageResolver {
+    private static final String TAG = LocalImageResolver.class.getSimpleName();
 
     private static final int MAX_SAFE_ICON_SIZE_PX = 480;
 
@@ -60,11 +62,18 @@
 
     private static BitmapFactory.Options getBoundsOptionsForImage(Uri uri, Context context)
             throws IOException {
-        InputStream input = context.getContentResolver().openInputStream(uri);
         BitmapFactory.Options onlyBoundsOptions = new BitmapFactory.Options();
-        onlyBoundsOptions.inJustDecodeBounds = true;
-        BitmapFactory.decodeStream(input, null, onlyBoundsOptions);
-        input.close();
+        try (InputStream input = context.getContentResolver().openInputStream(uri)) {
+            if (input == null) {
+                throw new IllegalArgumentException();
+            }
+            onlyBoundsOptions.inJustDecodeBounds = true;
+            BitmapFactory.decodeStream(input, null, onlyBoundsOptions);
+        } catch (IllegalArgumentException iae) {
+            onlyBoundsOptions.outWidth = -1;
+            onlyBoundsOptions.outHeight = -1;
+            Log.e(TAG, "error loading image", iae);
+        }
         return onlyBoundsOptions;
     }
 
diff --git a/core/java/com/android/internal/widget/ResolverDrawerLayout.java b/core/java/com/android/internal/widget/ResolverDrawerLayout.java
index 3f708f8..90eeabb 100644
--- a/core/java/com/android/internal/widget/ResolverDrawerLayout.java
+++ b/core/java/com/android/internal/widget/ResolverDrawerLayout.java
@@ -464,11 +464,7 @@
                             smoothScrollTo(mCollapsibleHeight + mUncollapsibleHeight, yvel);
                             mDismissOnScrollerFinished = true;
                         } else {
-                            if (isNestedListChildScrolled()) {
-                                mNestedListChild.smoothScrollToPosition(0);
-                            } else if (isNestedRecyclerChildScrolled()) {
-                                mNestedRecyclerChild.smoothScrollToPosition(0);
-                            }
+                            scrollNestedScrollableChildBackToTop();
                             smoothScrollTo(yvel < 0 ? 0 : mCollapsibleHeight, yvel);
                         }
                     }
@@ -493,6 +489,17 @@
         return handled;
     }
 
+    /**
+     * Scroll nested scrollable child back to top if it has been scrolled.
+     */
+    public void scrollNestedScrollableChildBackToTop() {
+        if (isNestedListChildScrolled()) {
+            mNestedListChild.smoothScrollToPosition(0);
+        } else if (isNestedRecyclerChildScrolled()) {
+            mNestedRecyclerChild.smoothScrollToPosition(0);
+        }
+    }
+
     private void onSecondaryPointerUp(MotionEvent ev) {
         final int pointerIndex = ev.getActionIndex();
         final int pointerId = ev.getPointerId(pointerIndex);
diff --git a/core/jni/OWNERS b/core/jni/OWNERS
index 7d80993..8048298 100644
--- a/core/jni/OWNERS
+++ b/core/jni/OWNERS
@@ -6,15 +6,35 @@
 per-file android_net_* = codewiz@google.com, jchalard@google.com, lorenzo@google.com, reminv@google.com, satk@google.com
 
 # Display
-per-file android_hardware_display_* = michaelwr@google.com, santoscordon@google.com
+per-file android_hardware_display_* = file:/services/core/java/com/android/server/display/OWNERS
 
 # Input
-per-file android_hardware_input* = michaelwr@google.com, svv@google.com
-per-file android_view_Input* = michaelwr@google.com, svv@google.com
-per-file android_view_KeyCharacterMap.* = michaelwr@google.com, svv@google.com
-per-file android_view_*KeyEvent.* = michaelwr@google.com, svv@google.com
-per-file android_view_*MotionEvent.* = michaelwr@google.com, svv@google.com
-per-file android_view_PointerIcon.* = michaelwr@google.com, svv@google.com
+per-file android_hardware_input* = file:/services/core/java/com/android/server/input/OWNERS
+per-file android_view_Input* = file:/services/core/java/com/android/server/input/OWNERS
+per-file android_view_KeyCharacterMap.* = file:/services/core/java/com/android/server/input/OWNERS
+per-file android_view_*KeyEvent.* = file:/services/core/java/com/android/server/input/OWNERS
+per-file android_view_*MotionEvent.* = file:/services/core/java/com/android/server/input/OWNERS
+per-file android_view_PointerIcon.* = file:/services/core/java/com/android/server/input/OWNERS
 
-# Zygote
-per-file com_android_internal_os_Zygote.*,fd_utils.* = calin@google.com, chriswailes@google.com, maco@google.com, narayan@google.com, ngeoffray@google.com
+# WindowManager
+per-file android_graphics_BLASTBufferQueue.cpp = file:/services/core/java/com/android/server/wm/OWNERS
+per-file android_view_Surface* = file:/services/core/java/com/android/server/wm/OWNERS
+
+per-file *Zygote* = file:/ZYGOTE_OWNERS
+per-file Android.bp = file:platform/build/soong:/OWNERS
+per-file android_animation_* = file:/core/java/android/animation/OWNERS
+per-file android_app_admin_* = file:/core/java/android/app/admin/OWNERS
+per-file android_content_res_* = file:/core/java/android/content/res/OWNERS
+per-file android_graphics_* = file:/graphics/java/android/graphics/OWNERS
+per-file android_hardware_Usb* = file:/services/usb/OWNERS
+per-file android_hardware_display_* = file:/core/java/android/hardware/display/OWNERS
+per-file android_hardware_input_* = file:/core/java/android/hardware/input/OWNERS
+per-file android_hardware_location_* = file:/core/java/android/hardware/location/OWNERS
+per-file android_media_* = file:/media/java/android/media/OWNERS
+per-file android_media_midi_* = file:/media/java/android/media/midi/OWNERS
+per-file android_opengl_* = file:/opengl/java/android/opengl/OWNERS
+per-file android_os_storage_* = file:/core/java/android/os/storage/OWNERS
+per-file android_se_* = file:/core/java/android/se/OWNERS
+per-file android_security_* = file:/core/java/android/security/OWNERS
+per-file android_view_* = file:/core/java/android/view/OWNERS
+per-file com_android_internal_net_* = file:/services/core/java/com/android/server/net/OWNERS
diff --git a/core/jni/android_hardware_input_InputApplicationHandle.cpp b/core/jni/android_hardware_input_InputApplicationHandle.cpp
index 71edfd5..c1ecae8 100644
--- a/core/jni/android_hardware_input_InputApplicationHandle.cpp
+++ b/core/jni/android_hardware_input_InputApplicationHandle.cpp
@@ -58,6 +58,11 @@
     if (!obj) {
         return false;
     }
+    if (mInfo.token.get() != nullptr) {
+        // The java fields are immutable, so it doesn't need to update again.
+        env->DeleteLocalRef(obj);
+        return true;
+    }
 
     mInfo.name = getStringField(env, obj, gInputApplicationHandleClassInfo.name, "<null>");
 
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp
index 1f62544..7493e39 100644
--- a/core/jni/android_media_AudioSystem.cpp
+++ b/core/jni/android_media_AudioSystem.cpp
@@ -336,7 +336,7 @@
             return (jint)AUDIO_JAVA_BAD_VALUE;
         }
         const char *address = env->GetStringUTFChars((jstring)addrJobj, NULL);
-        AudioDeviceTypeAddr dev = AudioDeviceTypeAddr(typesPtr[i], address);
+        AudioDeviceTypeAddr dev = AudioDeviceTypeAddr((audio_devices_t)typesPtr[i], address);
         audioDeviceTypeAddrVector.add(dev);
         env->ReleaseStringUTFChars((jstring)addrJobj, address);
     }
@@ -818,7 +818,8 @@
                                                bool useInMask)
 {
     nAudioGainConfig->index = env->GetIntField(jAudioGainConfig, gAudioGainConfigFields.mIndex);
-    nAudioGainConfig->mode = env->GetIntField(jAudioGainConfig, gAudioGainConfigFields.mMode);
+    nAudioGainConfig->mode =
+            (audio_gain_mode_t)env->GetIntField(jAudioGainConfig, gAudioGainConfigFields.mMode);
     ALOGV("convertAudioGainConfigToNative got gain index %d", nAudioGainConfig->index);
     jint jMask = env->GetIntField(jAudioGainConfig, gAudioGainConfigFields.mChannelMask);
     audio_channel_mask_t nMask;
@@ -938,8 +939,8 @@
 
     jobject jAudioDevicePort = env->GetObjectField(jAudioPortConfig,
             gAudioPortConfigFields.mPort);
-    nAudioPortConfig->ext.device.type = env->GetIntField(jAudioDevicePort,
-            gAudioPortFields.mType);
+    nAudioPortConfig->ext.device.type =
+            (audio_devices_t)env->GetIntField(jAudioDevicePort, gAudioPortFields.mType);
     jstring jDeviceAddress = (jstring)env->GetObjectField(jAudioDevicePort,
             gAudioPortFields.mAddress);
     const char *nDeviceAddress = env->GetStringUTFChars(jDeviceAddress, NULL);
@@ -2332,7 +2333,7 @@
 
 static jint
 android_media_AudioSystem_setAllowedCapturePolicy(JNIEnv *env, jobject thiz, jint uid, jint flags) {
-    return AudioSystem::setAllowedCapturePolicy(uid, flags);
+    return AudioSystem::setAllowedCapturePolicy(uid, static_cast<audio_flags_mask_t>(flags));
 }
 
 static jint
@@ -2367,8 +2368,10 @@
 
     const char *c_address = env->GetStringUTFChars(deviceAddress, NULL);
     int status = check_AudioSystem_Command(
-            AudioSystem::setPreferredDeviceForStrategy((product_strategy_t) strategy,
-                    AudioDeviceTypeAddr(deviceType, c_address)));
+            AudioSystem::setPreferredDeviceForStrategy((product_strategy_t)strategy,
+                                                       AudioDeviceTypeAddr((audio_devices_t)
+                                                                                   deviceType,
+                                                                           c_address)));
     env->ReleaseStringUTFChars(deviceAddress, c_address);
     return (jint) status;
 }
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index 5c045b6..7a5c383 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -20,6 +20,7 @@
 #include "android_media_AudioTrack.h"
 
 #include <nativehelper/JNIHelp.h>
+#include <nativehelper/ScopedUtfChars.h>
 #include "core_jni_helpers.h"
 
 #include <utils/Log.h>
@@ -251,7 +252,7 @@
                                            jint audioFormat, jint buffSizeInBytes, jint memoryMode,
                                            jintArray jSession, jlong nativeAudioTrack,
                                            jboolean offload, jint encapsulationMode,
-                                           jobject tunerConfiguration) {
+                                           jobject tunerConfiguration, jstring opPackageName) {
     ALOGV("sampleRates=%p, channel mask=%x, index mask=%x, audioFormat(Java)=%d, buffSize=%d,"
           " nativeAudioTrack=0x%" PRIX64 ", offload=%d encapsulationMode=%d tuner=%p",
           jSampleRate, channelPositionMask, channelIndexMask, audioFormat, buffSizeInBytes,
@@ -337,7 +338,8 @@
         }
 
         // create the native AudioTrack object
-        lpTrack = new AudioTrack();
+        ScopedUtfChars opPackageNameStr(env, opPackageName);
+        lpTrack = new AudioTrack(opPackageNameStr.c_str());
 
         // read the AudioAttributes values
         auto paa = JNIAudioAttributeHelper::makeUnique();
@@ -371,23 +373,24 @@
         status_t status = NO_ERROR;
         switch (memoryMode) {
         case MODE_STREAM:
-            status = lpTrack->set(
-                    AUDIO_STREAM_DEFAULT,// stream type, but more info conveyed in paa (last argument)
-                    sampleRateInHertz,
-                    format,// word length, PCM
-                    nativeChannelMask,
-                    offload ? 0 : frameCount,
-                    offload ? AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD : AUDIO_OUTPUT_FLAG_NONE,
-                    audioCallback, &(lpJniStorage->mCallbackData),//callback, callback data (user)
-                    0,// notificationFrames == 0 since not using EVENT_MORE_DATA to feed the AudioTrack
-                    0,// shared mem
-                    true,// thread can call Java
-                    sessionId,// audio session ID
-                    offload ? AudioTrack::TRANSFER_SYNC_NOTIF_CALLBACK : AudioTrack::TRANSFER_SYNC,
-                    offload ? &offloadInfo : NULL,
-                    -1, -1,                       // default uid, pid values
-                    paa.get());
-
+            status = lpTrack->set(AUDIO_STREAM_DEFAULT, // stream type, but more info conveyed
+                                                        // in paa (last argument)
+                                  sampleRateInHertz,
+                                  format, // word length, PCM
+                                  nativeChannelMask, offload ? 0 : frameCount,
+                                  offload ? AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD
+                                          : AUDIO_OUTPUT_FLAG_NONE,
+                                  audioCallback,
+                                  &(lpJniStorage->mCallbackData), // callback, callback data (user)
+                                  0,    // notificationFrames == 0 since not using EVENT_MORE_DATA
+                                        // to feed the AudioTrack
+                                  0,    // shared mem
+                                  true, // thread can call Java
+                                  sessionId, // audio session ID
+                                  offload ? AudioTrack::TRANSFER_SYNC_NOTIF_CALLBACK
+                                          : AudioTrack::TRANSFER_SYNC,
+                                  offload ? &offloadInfo : NULL, -1, -1, // default uid, pid values
+                                  paa.get());
             break;
 
         case MODE_STATIC:
@@ -398,22 +401,22 @@
                 goto native_init_failure;
             }
 
-            status = lpTrack->set(
-                    AUDIO_STREAM_DEFAULT,// stream type, but more info conveyed in paa (last argument)
-                    sampleRateInHertz,
-                    format,// word length, PCM
-                    nativeChannelMask,
-                    frameCount,
-                    AUDIO_OUTPUT_FLAG_NONE,
-                    audioCallback, &(lpJniStorage->mCallbackData),//callback, callback data (user));
-                    0,// notificationFrames == 0 since not using EVENT_MORE_DATA to feed the AudioTrack
-                    lpJniStorage->mMemBase,// shared mem
-                    true,// thread can call Java
-                    sessionId,// audio session ID
-                    AudioTrack::TRANSFER_SHARED,
-                    NULL,                         // default offloadInfo
-                    -1, -1,                       // default uid, pid values
-                    paa.get());
+            status = lpTrack->set(AUDIO_STREAM_DEFAULT, // stream type, but more info conveyed
+                                                        // in paa (last argument)
+                                  sampleRateInHertz,
+                                  format, // word length, PCM
+                                  nativeChannelMask, frameCount, AUDIO_OUTPUT_FLAG_NONE,
+                                  audioCallback,
+                                  &(lpJniStorage->mCallbackData), // callback, callback data (user)
+                                  0, // notificationFrames == 0 since not using EVENT_MORE_DATA
+                                     // to feed the AudioTrack
+                                  lpJniStorage->mMemBase, // shared mem
+                                  true,                   // thread can call Java
+                                  sessionId,              // audio session ID
+                                  AudioTrack::TRANSFER_SHARED,
+                                  NULL,   // default offloadInfo
+                                  -1, -1, // default uid, pid values
+                                  paa.get());
             break;
 
         default:
@@ -1428,7 +1431,8 @@
         {"native_stop", "()V", (void *)android_media_AudioTrack_stop},
         {"native_pause", "()V", (void *)android_media_AudioTrack_pause},
         {"native_flush", "()V", (void *)android_media_AudioTrack_flush},
-        {"native_setup", "(Ljava/lang/Object;Ljava/lang/Object;[IIIIII[IJZILjava/lang/Object;)I",
+        {"native_setup",
+         "(Ljava/lang/Object;Ljava/lang/Object;[IIIIII[IJZILjava/lang/Object;Ljava/lang/String;)I",
          (void *)android_media_AudioTrack_setup},
         {"native_finalize", "()V", (void *)android_media_AudioTrack_finalize},
         {"native_release", "()V", (void *)android_media_AudioTrack_release},
diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp
index 7c32ca6..6becb07 100644
--- a/core/jni/android_util_Process.cpp
+++ b/core/jni/android_util_Process.cpp
@@ -346,22 +346,6 @@
     }
 }
 
-void android_os_Process_enableFreezer(
-        JNIEnv *env, jobject clazz, jboolean enable)
-{
-    bool success = true;
-
-    if (enable) {
-        success = SetTaskProfiles(0, {"FreezerFrozen"}, true);
-    } else {
-        success = SetTaskProfiles(0, {"FreezerThawed"}, true);
-    }
-
-    if (!success) {
-        jniThrowException(env, "java/lang/RuntimeException", "Unknown error");
-    }
-}
-
 jint android_os_Process_getProcessGroup(JNIEnv* env, jobject clazz, jint pid)
 {
     SchedPolicy sp;
@@ -1360,7 +1344,6 @@
         {"sendSignal", "(II)V", (void*)android_os_Process_sendSignal},
         {"sendSignalQuiet", "(II)V", (void*)android_os_Process_sendSignalQuiet},
         {"setProcessFrozen", "(IIZ)V", (void*)android_os_Process_setProcessFrozen},
-        {"enableFreezer", "(Z)V", (void*)android_os_Process_enableFreezer},
         {"getFreeMemory", "()J", (void*)android_os_Process_getFreeMemory},
         {"getTotalMemory", "()J", (void*)android_os_Process_getTotalMemory},
         {"readProcLines", "(Ljava/lang/String;[Ljava/lang/String;[J)V",
diff --git a/core/proto/Android.bp b/core/proto/Android.bp
deleted file mode 100644
index 3b891d6..0000000
--- a/core/proto/Android.bp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// C++ library for Bluetooth platform wide protobuf definitions
-cc_library_static {
-    name: "libbt-platform-protos-lite",
-    host_supported: true,
-    proto: {
-        export_proto_headers: true,
-        type: "lite",
-    },
-    srcs: [
-        "android/bluetooth/a2dp/enums.proto",
-        "android/bluetooth/enums.proto",
-        "android/bluetooth/hci/enums.proto",
-        "android/bluetooth/hfp/enums.proto",
-        "android/bluetooth/smp/enums.proto",
-    ],
-}
diff --git a/core/proto/OWNERS b/core/proto/OWNERS
index 542d26f..748b4b4 100644
--- a/core/proto/OWNERS
+++ b/core/proto/OWNERS
@@ -25,3 +25,8 @@
 
 # Graphics stats
 jreck@google.com
+
+# Accessibility
+pweaver@google.com
+hongmingjin@google.com
+cbrower@google.com
diff --git a/core/proto/android/app/enums.proto b/core/proto/android/app/enums.proto
deleted file mode 100644
index e282acb..0000000
--- a/core/proto/android/app/enums.proto
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app;
-
-option java_outer_classname = "AppProtoEnums";
-option java_multiple_files = true;
-
-// ActivityManagerInternal.java's APP_TRANSITION reasons.
-enum AppTransitionReasonEnum {
-    APP_TRANSITION_REASON_UNKNOWN = 0;
-    // The transition was started because we drew the splash screen.
-    APP_TRANSITION_SPLASH_SCREEN = 1;
-    // The transition was started because we all app windows were drawn.
-    APP_TRANSITION_WINDOWS_DRAWN = 2;
-    // The transition was started because of a timeout.
-    APP_TRANSITION_TIMEOUT = 3;
-    // The transition was started because of a we drew a task snapshot.
-    APP_TRANSITION_SNAPSHOT = 4;
-    // The transition was started because it was a recents animation and we only needed to wait on
-    // the wallpaper.
-    APP_TRANSITION_RECENTS_ANIM = 5;
-}
-
-// ActivityManager.java PROCESS_STATEs
-// Next tag: 1021
-enum ProcessStateEnum {
-    // Unlike the ActivityManager PROCESS_STATE values, the ordering and numerical values
-    // here are completely fixed and arbitrary. Order is irrelevant.
-    // No attempt need be made to keep them in sync.
-    // The values here must not be modified. Any new process states can be appended to the end.
-
-    // Process state that is unknown to this proto file (i.e. is not mapped
-    // by ActivityManager.processStateAmToProto()). Can only happen if there's a bug in the mapping.
-    PROCESS_STATE_UNKNOWN_TO_PROTO = 998;
-    // Not a real process state.
-    PROCESS_STATE_UNKNOWN = 999;
-    // Process is a persistent system process.
-    PROCESS_STATE_PERSISTENT = 1000;
-    // Process is a persistent system process and is doing UI.
-    PROCESS_STATE_PERSISTENT_UI = 1001;
-    // Process is hosting the current top activities. Note that this covers
-    // all activities that are visible to the user.
-    PROCESS_STATE_TOP = 1002;
-    // Process is bound to a TOP app.
-    PROCESS_STATE_BOUND_TOP = 1020;
-    // Process is hosting a foreground service.
-    PROCESS_STATE_FOREGROUND_SERVICE = 1003;
-    // Process is hosting a service bound by the system or another foreground app.
-    PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 1004;
-    // Process is important to the user, and something they are aware of.
-    PROCESS_STATE_IMPORTANT_FOREGROUND = 1005;
-    // Process is important to the user, but not something they are aware of.
-    PROCESS_STATE_IMPORTANT_BACKGROUND = 1006;
-    // Process is in the background transient so we will try to keep running.
-    PROCESS_STATE_TRANSIENT_BACKGROUND = 1007;
-    // Process is in the background running a backup/restore operation.
-    PROCESS_STATE_BACKUP = 1008;
-    // Process is in the background running a service. Unlike oom_adj, this
-    // level is used for both the normal running in background state and the
-    // executing operations state.
-    PROCESS_STATE_SERVICE = 1009;
-    // Process is in the background running a receiver. Note that from the
-    // perspective of oom_adj, receivers run at a higher foreground level, but
-    // for our prioritization here that is not necessary and putting them
-    // below services means many fewer changes in some process states as they
-    // receive broadcasts.
-    PROCESS_STATE_RECEIVER = 1010;
-    // Same as PROCESS_STATE_TOP but while device is sleeping.
-    PROCESS_STATE_TOP_SLEEPING = 1011;
-    // Process is in the background, but it can't restore its state so we want
-    // to try to avoid killing it.
-    PROCESS_STATE_HEAVY_WEIGHT = 1012;
-    // Process is in the background but hosts the home activity.
-    PROCESS_STATE_HOME = 1013;
-    // Process is in the background but hosts the last shown activity.
-    PROCESS_STATE_LAST_ACTIVITY = 1014;
-    // Process is being cached for later use and contains activities.
-    PROCESS_STATE_CACHED_ACTIVITY = 1015;
-    // Process is being cached for later use and is a client of another cached
-    // process that contains activities.
-    PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 1016;
-    // Process is being cached for later use and has an activity that corresponds
-    // to an existing recent task.
-    PROCESS_STATE_CACHED_RECENT = 1017;
-    // Process is being cached for later use and is empty.
-    PROCESS_STATE_CACHED_EMPTY = 1018;
-    // Process does not exist.
-    PROCESS_STATE_NONEXISTENT = 1019;
-}
-
-// AppOpsManager.java - operation ids for logging
-enum AppOpEnum {
-    APP_OP_NONE = -1;
-    APP_OP_COARSE_LOCATION = 0;
-    APP_OP_FINE_LOCATION = 1;
-    APP_OP_GPS = 2;
-    APP_OP_VIBRATE = 3;
-    APP_OP_READ_CONTACTS = 4;
-    APP_OP_WRITE_CONTACTS = 5;
-    APP_OP_READ_CALL_LOG = 6;
-    APP_OP_WRITE_CALL_LOG = 7;
-    APP_OP_READ_CALENDAR = 8;
-    APP_OP_WRITE_CALENDAR = 9;
-    APP_OP_WIFI_SCAN = 10;
-    APP_OP_POST_NOTIFICATION = 11;
-    APP_OP_NEIGHBORING_CELLS = 12;
-    APP_OP_CALL_PHONE = 13;
-    APP_OP_READ_SMS = 14;
-    APP_OP_WRITE_SMS = 15;
-    APP_OP_RECEIVE_SMS = 16;
-    APP_OP_RECEIVE_EMERGENCY_SMS = 17;
-    APP_OP_RECEIVE_MMS = 18;
-    APP_OP_RECEIVE_WAP_PUSH = 19;
-    APP_OP_SEND_SMS = 20;
-    APP_OP_READ_ICC_SMS = 21;
-    APP_OP_WRITE_ICC_SMS = 22;
-    APP_OP_WRITE_SETTINGS = 23;
-    APP_OP_SYSTEM_ALERT_WINDOW = 24;
-    APP_OP_ACCESS_NOTIFICATIONS = 25;
-    APP_OP_CAMERA = 26;
-    APP_OP_RECORD_AUDIO = 27;
-    APP_OP_PLAY_AUDIO = 28;
-    APP_OP_READ_CLIPBOARD = 29;
-    APP_OP_WRITE_CLIPBOARD = 30;
-    APP_OP_TAKE_MEDIA_BUTTONS = 31;
-    APP_OP_TAKE_AUDIO_FOCUS = 32;
-    APP_OP_AUDIO_MASTER_VOLUME = 33;
-    APP_OP_AUDIO_VOICE_VOLUME = 34;
-    APP_OP_AUDIO_RING_VOLUME = 35;
-    APP_OP_AUDIO_MEDIA_VOLUME = 36;
-    APP_OP_AUDIO_ALARM_VOLUME = 37;
-    APP_OP_AUDIO_NOTIFICATION_VOLUME = 38;
-    APP_OP_AUDIO_BLUETOOTH_VOLUME = 39;
-    APP_OP_WAKE_LOCK = 40;
-    APP_OP_MONITOR_LOCATION = 41;
-    APP_OP_MONITOR_HIGH_POWER_LOCATION = 42;
-    APP_OP_GET_USAGE_STATS = 43;
-    APP_OP_MUTE_MICROPHONE = 44;
-    APP_OP_TOAST_WINDOW = 45;
-    APP_OP_PROJECT_MEDIA = 46;
-    APP_OP_ACTIVATE_VPN = 47;
-    APP_OP_WRITE_WALLPAPER = 48;
-    APP_OP_ASSIST_STRUCTURE = 49;
-    APP_OP_ASSIST_SCREENSHOT = 50;
-    APP_OP_READ_PHONE_STATE = 51;
-    APP_OP_ADD_VOICEMAIL = 52;
-    APP_OP_USE_SIP = 53;
-    APP_OP_PROCESS_OUTGOING_CALLS = 54;
-    APP_OP_USE_FINGERPRINT = 55;
-    APP_OP_BODY_SENSORS = 56;
-    APP_OP_READ_CELL_BROADCASTS = 57;
-    APP_OP_MOCK_LOCATION = 58;
-    APP_OP_READ_EXTERNAL_STORAGE = 59;
-    APP_OP_WRITE_EXTERNAL_STORAGE = 60;
-    APP_OP_TURN_SCREEN_ON = 61;
-    APP_OP_GET_ACCOUNTS = 62;
-    APP_OP_RUN_IN_BACKGROUND = 63;
-    APP_OP_AUDIO_ACCESSIBILITY_VOLUME = 64;
-    APP_OP_READ_PHONE_NUMBERS = 65;
-    APP_OP_REQUEST_INSTALL_PACKAGES = 66;
-    APP_OP_PICTURE_IN_PICTURE = 67;
-    APP_OP_INSTANT_APP_START_FOREGROUND = 68;
-    APP_OP_ANSWER_PHONE_CALLS = 69;
-    APP_OP_RUN_ANY_IN_BACKGROUND = 70;
-    APP_OP_CHANGE_WIFI_STATE = 71;
-    APP_OP_REQUEST_DELETE_PACKAGES = 72;
-    APP_OP_BIND_ACCESSIBILITY_SERVICE = 73;
-    APP_OP_ACCEPT_HANDOVER = 74;
-    APP_OP_MANAGE_IPSEC_TUNNELS = 75;
-    APP_OP_START_FOREGROUND = 76;
-    APP_OP_BLUETOOTH_SCAN = 77;
-    APP_OP_USE_BIOMETRIC = 78;
-    APP_OP_ACTIVITY_RECOGNITION = 79;
-    APP_OP_SMS_FINANCIAL_TRANSACTIONS = 80;
-    APP_OP_READ_MEDIA_AUDIO = 81;
-    APP_OP_WRITE_MEDIA_AUDIO = 82;
-    APP_OP_READ_MEDIA_VIDEO = 83;
-    APP_OP_WRITE_MEDIA_VIDEO = 84;
-    APP_OP_READ_MEDIA_IMAGES = 85;
-    APP_OP_WRITE_MEDIA_IMAGES = 86;
-    APP_OP_LEGACY_STORAGE = 87;
-    APP_OP_ACCESS_ACCESSIBILITY = 88;
-    APP_OP_READ_DEVICE_IDENTIFIERS = 89;
-    APP_OP_ACCESS_MEDIA_LOCATION = 90;
-    APP_OP_QUERY_ALL_PACKAGES = 91;
-    APP_OP_MANAGE_EXTERNAL_STORAGE = 92;
-    APP_OP_INTERACT_ACROSS_PROFILES = 93;
-    APP_OP_ACTIVATE_PLATFORM_VPN = 94;
-    APP_OP_LOADER_USAGE_STATS = 95;
-    APP_OP_DEPRECATED_1 = 96 [deprecated = true];
-    APP_OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED = 97;
-    APP_OP_AUTO_REVOKE_MANAGED_BY_INSTALLER = 98;
-    APP_OP_NO_ISOLATED_STORAGE = 99;
-    APP_OP_RESERVED_100 = 100;
-    APP_OP_RESERVED_101 = 101;
-    APP_OP_RESERVED_102 = 102;
-    APP_OP_MANAGE_ONGOING_CALLS = 103;
-}
diff --git a/core/proto/android/app/job/enums.proto b/core/proto/android/app/job/enums.proto
deleted file mode 100644
index 41863bb..0000000
--- a/core/proto/android/app/job/enums.proto
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app.job;
-
-// This file is for JobScheduler enums inside the app directory. If you're
-// adding enums for system-server-side code, use the file in
-// frameworks/base/core/proto/android/server/job.
-option java_outer_classname = "JobProtoEnums";
-option java_multiple_files = true;
-
-// Reasons a job is stopped.
-// Primarily used in android.app.job.JobParameters.java.
-enum StopReasonEnum {
-    STOP_REASON_UNKNOWN = -1;
-    STOP_REASON_CANCELLED = 0;
-    STOP_REASON_CONSTRAINTS_NOT_SATISFIED = 1;
-    STOP_REASON_PREEMPT = 2;
-    STOP_REASON_TIMEOUT = 3;
-    STOP_REASON_DEVICE_IDLE = 4;
-    STOP_REASON_DEVICE_THERMAL = 5;
-    STOP_REASON_RESTRICTED_BUCKET = 6;
-}
diff --git a/core/proto/android/app/media_output_enum.proto b/core/proto/android/app/media_output_enum.proto
deleted file mode 100644
index 0d42fb7..0000000
--- a/core/proto/android/app/media_output_enum.proto
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app.settings.mediaoutput;
-option java_multiple_files = true;
-
-/**
- * The medium type specified in an output switching operation.
- */
-enum MediumType {
-    UNKNOWN_TYPE = 0;
-    BUILTIN_SPEAKER = 1;
-    WIRED_3POINT5_MM_AUDIO = 100;
-    WIRED_3POINT5_MM_HEADSET = 101;
-    WIRED_3POINT5_MM_HEADPHONES = 102;
-    USB_C_AUDIO = 200;
-    USB_C_DEVICE = 201;
-    USB_C_HEADSET = 202;
-    USB_C_ACCESSORY = 203;
-    USB_C_DOCK = 204;
-    USB_C_HDMI = 205;
-    BLUETOOTH = 300;
-    BLUETOOTH_HEARING_AID = 301;
-    BLUETOOTH_A2DP = 302;
-    REMOTE_SINGLE = 400;
-    REMOTE_TV = 401;
-    REMOTE_SPEAKER = 402;
-    REMOTE_GROUP = 500;
-    REMOTE_DYNAMIC_GROUP = 501;
-};
-
-/**
- * The result of an output switching operation.
- */
-enum SwitchResult {
-    ERROR = 0;
-    OK = 1;
-};
-
-/**
- * The sub result of an output switching operation.
- */
-enum SubResult {
-    UNKNOWN_ERROR = 0;
-    NO_ERROR = 1;
-    REJECTED = 2;
-    NETWORK_ERROR = 3;
-    ROUTE_NOT_AVAILABLE = 4;
-    INVALID_COMMAND = 5;
-}
diff --git a/core/proto/android/app/settings_enums.proto b/core/proto/android/app/settings_enums.proto
deleted file mode 100644
index 69b32c2..0000000
--- a/core/proto/android/app/settings_enums.proto
+++ /dev/null
@@ -1,2686 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app.settings;
-option java_multiple_files = true;
-
-/**
- * The action performed in this event
- */
-enum Action {
-    ACTION_UNKNOWN = 0;
-    PAGE_VISIBLE = 1;
-    PAGE_HIDE = 2;
-
-    // ACTION: Settings > Wi-Fi > [Long press network] > Connect to network
-    //   SUBTYPE: true if connecting to a saved network, false if not
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_WIFI_CONNECT = 135;
-
-    // ACTION: Settings > Wi-Fi > [Long press network] > Forget network
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_WIFI_FORGET = 137;
-
-    // ACTION: Settings > Wi-Fi > Toggle off
-    //   SUBTYPE: true if connected to network before toggle, false if not
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_WIFI_OFF = 138;
-
-    // ACTION: Settings > Wi-Fi > Toggle on
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_WIFI_ON = 139;
-
-    // ACTION: Settings > Bluetooth > Overflow > Rename this device
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_BLUETOOTH_RENAME = 161;
-
-    // ACTION: Settings > Bluetooth > Overflow > Show received files
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_BLUETOOTH_FILES = 162;
-
-    // ACTION: DND Settings > Priority only allows > Reminder toggle
-    //   SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_ZEN_ALLOW_REMINDERS = 167;
-
-    // ACTION: DND Settings > Priority only allows > Event toggle
-    //   SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_ZEN_ALLOW_EVENTS = 168;
-
-    // ACTION: DND Settings > Priority only allows > Messages
-    //   SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_ZEN_ALLOW_MESSAGES = 169;
-
-    // ACTION: DND Settings > Priority only allows > Calls
-    //   SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_ZEN_ALLOW_CALLS = 170;
-
-    // ACTION: DND Settings > Priority only allows > Repeat callers toggle
-    //   SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_ZEN_ALLOW_REPEAT_CALLS = 171;
-
-    // ACTION: DND Settings > Automatic rules > [Rule] > Delete rule > Delete
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_ZEN_DELETE_RULE_OK = 175;
-
-    // ACTION: Settings > More > Airplane mode toggle
-    //   SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_AIRPLANE_TOGGLE = 177;
-
-    // ACTION: Settings > Data usage > Cellular data toggle
-    //   SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_CELL_DATA_TOGGLE = 178;
-
-    // ACTION: Settings > Display > When device is rotated
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_ROTATION_LOCK = 203;
-
-    // OPEN: Settings > Search > Perform search
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_SEARCH_RESULTS = 226;
-
-    // ACTION: Settings > Security > Nexus Imprint > [Fingerprint] > Delete
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_FINGERPRINT_DELETE = 253;
-
-    // ACTION: Settings > Security > Nexus Imprint > [Fingerprint] > Rename
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_FINGERPRINT_RENAME = 254;
-
-    // ACTION: Settings -> Developer Options -> Take bug report -> Interactive report
-    // CATEGORY: SETTINGS
-    // OS: N
-    // Interactive bug report initiated from Settings.
-    ACTION_BUGREPORT_FROM_SETTINGS_INTERACTIVE = 294;
-
-    // ACTION: Settings -> Developer Options -> Take bug report -> Full report
-    // CATEGORY: SETTINGS
-    // OS: N
-    // Interactive bug report initiated from Settings.
-    ACTION_BUGREPORT_FROM_SETTINGS_FULL = 295;
-
-    // click on collapsed conditional or clicks expand button
-    ACTION_SETTINGS_CONDITION_EXPAND = 373;
-
-    // click main area of expanded conditional
-    ACTION_SETTINGS_CONDITION_CLICK = 375;
-
-    // click a direct button on expanded conditional
-    ACTION_SETTINGS_CONDITION_BUTTON = 376;
-
-    // Action: user enable / disabled data saver using Settings
-    // OPEN: Settings -> Data Usage -> Data saver -> On/off toggle
-    // VALUE: 1 for enabled, 0 for disabled
-    // CATEGORY: SETTINGS
-    // OS: N
-    ACTION_DATA_SAVER_MODE = 394;
-
-    // User whitelisted an app for Data Saver mode; action pass package name of app
-    // Action: user enable / disabled data saver using Settings
-    // OPEN: Settings -> Data Usage -> Data saver -> Unrestricted data access > APP toggle turned on
-    //       or
-    //       Settings -> Apps -> APP -> Data usage -> Unrestricted data usage toggle turned on
-    // VALUE: package name of APP
-    // CATEGORY: SETTINGS
-    // OS: N
-    ACTION_DATA_SAVER_WHITELIST = 395;
-
-    // User blacklisted an app for Data Saver mode; action pass package name of app
-    // OPEN: Settings -> Apps -> APP -> Data usage -> Background data toggle turned off
-    // VALUE: package name of APP
-    // CATEGORY: SETTINGS
-    // OS: N
-    ACTION_DATA_SAVER_BLACKLIST = 396;
-
-    // ACTION: Settings -> Storage -> Manage storage -> Click Storage Manager
-    //   SUBTYPE: false is off, true is on
-    ACTION_TOGGLE_STORAGE_MANAGER = 489;
-
-    // OPEN: Settings > Display -> Ambient Display
-    // CATEGORY: SETTINGS
-    ACTION_AMBIENT_DISPLAY = 495;
-
-    // ACTION: Allow Battery optimization for an app
-    APP_SPECIAL_PERMISSION_BATTERY_ALLOW = 764;
-
-    // ACTION: Deny Battery optimization for an app
-    APP_SPECIAL_PERMISSION_BATTERY_DENY = 765;
-
-    // ACTION: Enable Device Admin app
-    APP_SPECIAL_PERMISSION_ADMIN_ALLOW = 766;
-
-    // ACTION: Disable Device Admin app
-    APP_SPECIAL_PERMISSION_ADMIN_DENY = 767;
-
-    // ACTION: Allow "Do Not Disturb access" for an app
-    APP_SPECIAL_PERMISSION_DND_ALLOW = 768;
-
-    // ACTION: Deny "Do Not Disturb access" for an app
-    APP_SPECIAL_PERMISSION_DND_DENY = 769;
-
-    // ACTION: Allow "Draw over other apps" for an app
-    APP_SPECIAL_PERMISSION_APPDRAW_ALLOW = 770;
-
-    // ACTION: Deny "Display over other apps" for an app
-    APP_SPECIAL_PERMISSION_APPDRAW_DENY = 771;
-
-    // ACTION: Allow "VR helper services" for an app
-    APP_SPECIAL_PERMISSION_VRHELPER_ALLOW = 772;
-
-    // ACTION: Deny "VR helper services" for an app
-    APP_SPECIAL_PERMISSION_VRHELPER_DENY = 773;
-
-    // ACTION: Allow "Modify system settings" for an app
-    APP_SPECIAL_PERMISSION_SETTINGS_CHANGE_ALLOW = 774;
-
-    // ACTION: Deny "Modify system settings" for an app
-    APP_SPECIAL_PERMISSION_SETTINGS_CHANGE_DENY = 775;
-
-    // ACTION: Allow "Notification access" for an app
-    APP_SPECIAL_PERMISSION_NOTIVIEW_ALLOW = 776;
-
-    // ACTION: Deny "Notification access" for an app
-    APP_SPECIAL_PERMISSION_NOTIVIEW_DENY = 777;
-
-    // ACTION: "Premium SMS access" for an app - "ask user" option
-    APP_SPECIAL_PERMISSION_PREMIUM_SMS_ASK = 778;
-
-    // ACTION: "Premium SMS access" for an app - "never allow" option
-    APP_SPECIAL_PERMISSION_PREMIUM_SMS_DENY = 779;
-
-    // ACTION: "Premium SMS access" for an app - "always allow" option
-    APP_SPECIAL_PERMISSION_PREMIUM_SMS_ALWAYS_ALLOW = 780;
-
-    // ACTION: Allow "Unrestricted data access" for an app
-    APP_SPECIAL_PERMISSION_UNL_DATA_ALLOW = 781;
-
-    // ACTION: Deny "Unrestricted data access" for an app
-    APP_SPECIAL_PERMISSION_UNL_DATA_DENY = 782;
-
-    // ACTION: Allow "Usage access" for an app
-    APP_SPECIAL_PERMISSION_USAGE_VIEW_ALLOW = 783;
-
-    // ACTION: Deny "Usage access" for an app
-    APP_SPECIAL_PERMISSION_USAGE_VIEW_DENY = 784;
-
-    // ACTION: "Force stop" action on an app
-    ACTION_APP_FORCE_STOP = 807;
-
-    // ACTION: Allow "Enable picture-in-picture" for an app
-    APP_PICTURE_IN_PICTURE_ALLOW = 813;
-
-    // ACTION: Create a Settings shortcut item.
-    ACTION_SETTINGS_CREATE_SHORTCUT = 829;
-
-    // ACTION: A tile in Settings information architecture is clicked
-    ACTION_SETTINGS_TILE_CLICK = 830;
-
-    // ACTION: Settings advanced button is expanded
-    ACTION_SETTINGS_ADVANCED_BUTTON_EXPAND = 834;
-
-    // ACTION: Deny "Enable picture-in-picture" for an app
-    APP_PICTURE_IN_PICTURE_DENY = 814;
-
-    // ACTION: Settings -> Display -> Theme
-    ACTION_THEME = 816;
-
-    // ACTION: Settings > About device > Build number
-    ACTION_SETTINGS_BUILD_NUMBER_PREF = 847;
-
-    // ACTION: Settings > Battery > Menu > Optimization
-    ACTION_SETTINGS_MENU_BATTERY_OPTIMIZATION = 851;
-
-    // ACTION: Settings > Battery > Menu > Apps Toggle
-    ACTION_SETTINGS_MENU_BATTERY_APPS_TOGGLE = 852;
-
-    // ACTION: Settings > Any preference is changed
-    ACTION_SETTINGS_PREFERENCE_CHANGE = 853;
-
-    // ACTION: Settings > Connected devices > Bluetooth -> Available devices
-    ACTION_SETTINGS_BLUETOOTH_PAIR = 866;
-
-    // ACTION: Settings > Connected devices > Bluetooth -> Paired devices
-    ACTION_SETTINGS_BLUETOOTH_CONNECT = 867;
-
-    // ACTION: Settings > Connected devices > Bluetooth -> Connected device
-    ACTION_SETTINGS_BLUETOOTH_DISCONNECT = 868;
-
-    // ACTION: Settings > Connected devices > Bluetooth -> Error dialog
-    ACTION_SETTINGS_BLUETOOTH_CONNECT_ERROR = 869;
-
-    // ACTION: Settings > Connected devices > Bluetooth master switch Toggle
-    ACTION_SETTINGS_MASTER_SWITCH_BLUETOOTH_TOGGLE = 870;
-
-    // ACTION: Settings > App detail > Uninstall
-    ACTION_SETTINGS_UNINSTALL_APP = 872;
-
-    // ACTION: Settings > App detail > Uninstall Device admin app
-    ACTION_SETTINGS_UNINSTALL_DEVICE_ADMIN = 873;
-
-    // ACTION: Settings > App detail > Disable app
-    ACTION_SETTINGS_DISABLE_APP = 874;
-
-    // ACTION: Settings > App detail > Enable app
-    ACTION_SETTINGS_ENABLE_APP = 875;
-
-    // ACTION: Settings > App detail > Clear data
-    ACTION_SETTINGS_CLEAR_APP_DATA = 876;
-
-    // ACTION: Settings > App detail > Clear cache
-    ACTION_SETTINGS_CLEAR_APP_CACHE = 877;
-
-    // ACTION: Logs pressing the "Clear app" button in the app info settings page for an instant
-    // app.
-    // VALUE: The package name of the app
-    ACTION_SETTINGS_CLEAR_INSTANT_APP = 923;
-
-    // OPEN: Assist Gesture training intro in Settings
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    SETTINGS_ASSIST_GESTURE_TRAINING_INTRO = 991;
-
-    // OPEN: Assist Gesture training enrolling in Settings
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    SETTINGS_ASSIST_GESTURE_TRAINING_ENROLLING = 992;
-
-    // OPEN: Assist Gesture training finished in Settings
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    SETTINGS_ASSIST_GESTURE_TRAINING_FINISHED = 993;
-
-    // ACTION: Update default app from Settings
-    ACTION_SETTINGS_UPDATE_DEFAULT_APP = 1000;
-
-    // ACTION: Settings > Wi-Fi > [Long press network] > Sign in to network
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    ACTION_WIFI_SIGNIN = 1008;
-
-    // ACTION: Settings > Notification Settings > Open application notification
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    ACTION_OPEN_APP_NOTIFICATION_SETTING = 1016;
-
-    // ACTION: Settings > App Info > Open app settings
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    ACTION_OPEN_APP_SETTING = 1017;
-
-    // ACTION: Collect PSD Signals
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    ACTION_PSD_LOADER = 1019;
-
-    // OPEN: Settings > Trampoline Intent > Settings page
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    TRAMPOLINE_SETTINGS_EVENT = 1033;
-
-    // ACTION: Logged when user tries to pair a Bluetooth device without name from Settings app
-    // CATEGORY: SETTINGS
-    // OS: O MR
-    ACTION_SETTINGS_BLUETOOTH_PAIR_DEVICES_WITHOUT_NAMES = 1096;
-
-    // ACTION: Settings > Network & Internet > Mobile network > Network
-    // CATEGORY: SETTINGS
-    ACTION_MOBILE_NETWORK_MANUAL_SELECT_NETWORK = 1210;
-
-    // ACTION: DND Settings > Priority only allows > Alarms toggle
-    // SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ZEN_ALLOW_ALARMS = 1226;
-
-    // ACTION: DND Settings > Priority only allows > Media toggle
-    // SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ZEN_ALLOW_MEDIA = 1227;
-
-    // ACTION: A private dns mode been selected by user
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_PRIVATE_DNS_MODE = 1249;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Select rule ("Event") > Rule name > OK
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ZEN_MODE_RULE_NAME_CHANGE_OK = 1267;
-
-    // OPEN: Settings > Sound > Do Not Disturb > TURN ON NOW/TURN OFF NOW
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ZEN_TOGGLE_DND_BUTTON = 1268;
-
-    // ACTION: DND Settings > What to block > full screen intents
-    //   SUBTYPE: false is allowed, true is blocked
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACTION_ZEN_BLOCK_FULL_SCREEN_INTENTS = 1332;
-
-    // ACTION: DND Settings > What to block
-    //   SUBTYPE: false is allowed, true is blocked
-    // OS: P
-    ACTION_ZEN_BLOCK_LIGHT = 1333;
-
-    // ACTION: DND Settings > What to block
-    //   SUBTYPE: false is allowed, true is blocked
-    // OS: P
-    ACTION_ZEN_BLOCK_PEEK = 1334;
-
-    // ACTION: DND Settings > What to block
-    //   SUBTYPE: false is allowed, true is blocked
-    // OS: P
-    ACTION_ZEN_BLOCK_STATUS = 1335;
-
-    // ACTION: DND Settings > What to block
-    //   SUBTYPE: false is allowed, true is blocked
-    // OS: P
-    ACTION_ZEN_BLOCK_BADGE = 1336;
-
-    // ACTION: DND Settings > What to block
-    //   SUBTYPE: false is allowed, true is blocked
-    // OS: P
-    ACTION_ZEN_BLOCK_AMBIENT = 1337;
-
-    // ACTION: DND Settings > What to block
-    //   SUBTYPE: false is allowed, true is blocked
-    // OS: P
-    ACTION_ZEN_BLOCK_NOTIFICATION_LIST = 1338;
-
-    // ACTION: DND Settings > Priority only allows > System toggle
-    // SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ZEN_ALLOW_SYSTEM = 1340;
-
-    // ACTION: Settings > Battery settings > Battery tip > App restriction tip
-    // OS: P
-    ACTION_APP_RESTRICTION_TIP = 1347;
-
-    // ACTION: Settings > Battery settings > Battery tip > High usage tip
-    // OS: P
-    ACTION_HIGH_USAGE_TIP = 1348;
-
-    // ACTION: Settings > Battery settings > Battery tip > Summary tip
-    // OS: P
-    ACTION_SUMMARY_TIP = 1349;
-
-    // ACTION: Settings > Battery settings > Battery tip > Smart battery tip
-    // OS: P
-    ACTION_SMART_BATTERY_TIP = 1350;
-
-    // ACTION: Settings > Battery settings > Battery tip > Early warning tip
-    // OS: P
-    ACTION_EARLY_WARNING_TIP = 1351;
-
-    // ACTION: Settings > Battery settings > Battery tip > Low battery tip
-    // OS: P
-    ACTION_LOW_BATTERY_TIP = 1352;
-
-    // ACTION: Settings > Battery settings > Battery tip > App restriction list shown
-    // OS: P
-    ACTION_APP_RESTRICTION_TIP_LIST = 1353;
-
-    // ACTION: Settings > Battery settings > Battery tip > High usage list shown
-    // OS: P
-    ACTION_HIGH_USAGE_TIP_LIST = 1354;
-
-    // ACTION: Settings > Battery settings > Battery tip > Open app restriction page
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_TIP_OPEN_APP_RESTRICTION_PAGE = 1361;
-
-    // ACTION: Settings > Battery settings > Battery tip > Restrict app
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_TIP_RESTRICT_APP = 1362;
-
-    // ACTION: Settings > Battery settings > Battery tip > Unrestrict app
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_TIP_UNRESTRICT_APP = 1363;
-
-    // ACTION: Settings > Battery settings > Battery tip > Open smart battery page
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_TIP_OPEN_SMART_BATTERY = 1364;
-
-    // ACTION: Settings > Battery settings > Battery tip > Turn on battery saver
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_TIP_TURN_ON_BATTERY_SAVER = 1365;
-
-    // ACTION: Settings > Anomaly receiver > Anomaly received
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ANOMALY_TRIGGERED = 1367;
-
-    // ACTION: A Settings Slice is requested
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_SETTINGS_SLICE_REQUESTED = 1371;
-
-    // ACTION: A Settings Slice is updated with new value
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_SETTINGS_SLICE_CHANGED = 1372;
-
-    // OPEN: DND onboarding activity > Ok button
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ZEN_ONBOARDING_OK = 1378;
-
-    // OPEN: DND onboarding activity > Settings link
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ZEN_ONBOARDING_SETTINGS = 1379;
-
-    // ACTION: Settings > Anomaly receiver > Anomaly ignored, don't show up in battery settings
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ANOMALY_IGNORED = 1387;
-
-    // ACTION: Settings > Battery settings > Battery tip > Open battery saver page
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_TIP_OPEN_BATTERY_SAVER_PAGE = 1388;
-
-    // ACTION: DND Settings > What to block
-    // OS: P
-    ACTION_ZEN_SOUND_ONLY = 1396;
-
-    // ACTION: DND Settings > Notifications
-    // OS: P
-    ACTION_ZEN_SOUND_AND_VIS_EFFECTS = 1397;
-
-    // ACTION: DND Settings > Notifications
-    // OS: P
-    ACTION_ZEN_SHOW_CUSTOM = 1398;
-
-    // ACTION: DND Settings > Notifications
-    // OS: P
-    ACTION_ZEN_CUSTOM = 1399;
-
-    // OPEN: DND onboarding activity > don't update button
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_ZEN_ONBOARDING_KEEP_CURRENT_SETTINGS = 1406;
-
-    // ACTION: Storage initialization wizard initialization choice of external/portable
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_STORAGE_INIT_EXTERNAL = 1407;
-
-    // ACTION: Storage initialization wizard initialization choice of internal/adoptable
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_STORAGE_INIT_INTERNAL = 1408;
-
-    // ACTION: Storage initialization wizard benchmark fast choice of continue
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_STORAGE_BENCHMARK_FAST_CONTINUE = 1409;
-
-    // ACTION: Storage initialization wizard benchmark slow choice of continue
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_STORAGE_BENCHMARK_SLOW_CONTINUE = 1410;
-
-    // ACTION: Storage initialization wizard benchmark slow choice of abort
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_STORAGE_BENCHMARK_SLOW_ABORT = 1411;
-
-    // ACTION: Storage initialization wizard migration choice of now
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_STORAGE_MIGRATE_NOW = 1412;
-
-    // ACTION: Storage initialization wizard migration choice of later
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACTION_STORAGE_MIGRATE_LATER = 1413;
-
-    // OPEN: Settings > Sound > Switch a2dp devices dialog
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_SWITCH_A2DP_DEVICES = 1415;
-
-
-    // OPEN: Settings > Sound > Switch hfp devices dialog
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_SWITCH_HFP_DEVICES = 1416;
-
-    // OPEN: QS Sensor Privacy Mode tile shown
-    // ACTION: QS Sensor Privacy Mode tile tapped
-    // SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: QUICK_SETTINGS
-    // OS: Q
-    QS_SENSOR_PRIVACY = 1598;
-
-    // ACTION: Tap & Pay -> Default Application Setting -> Use Forground
-    ACTION_NFC_PAYMENT_FOREGROUND_SETTING = 1622;
-
-    // ACTION: Tap & Pay -> Default Application Setting -> Use Default
-    ACTION_NFC_PAYMENT_ALWAYS_SETTING = 1623;
-
-    // ACTION: Settings > Search Bar > Avatar
-    // CATEGORY: SETTINGS
-    // OS: Q
-    CLICK_ACCOUNT_AVATAR = 1643;
-
-    // ACTION: Set new password (action intent android.app.action.SET_NEW_PASSWORD)
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ACTION_SET_NEW_PASSWORD = 1645;
-
-    // ACTION: Set new password (action intent android.app.action.SET_NEW_PARENT_PROFILE_PASSWORD)
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ACTION_SET_NEW_PARENT_PROFILE_PASSWORD = 1646;
-
-    // ACTION: An interaction with a Slice or other component in the Panel.
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ACTION_PANEL_INTERACTION = 1658;
-
-    // ACTION: Show Contextual homepage. Log total loading latency.
-    ACTION_CONTEXTUAL_HOME_SHOW = 1662;
-
-    // ACTION: Contextual card displays
-    ACTION_CONTEXTUAL_CARD_SHOW = 1663;
-
-    // ACTION: Contextual cards are eligible to be shown, but don't rank high
-    ACTION_CONTEXTUAL_CARD_NOT_SHOW = 1664;
-
-    // ACTION: Settings > long press a card, and click dismiss
-    // Contextual card is dismissed
-    ACTION_CONTEXTUAL_CARD_DISMISS = 1665;
-
-    // ACTION: Settings > click a card
-    // Contextual card is clicked
-    ACTION_CONTEXTUAL_CARD_CLICK = 1666;
-
-    // Mapping: go/at-mapping
-    ACTION_ATSG = 1674;
-
-    ACTION_ATPG = 1675;
-
-    ACTION_ATCLPB = 1676;
-
-    ACTION_ATCGIB = 1677;
-
-    ACTION_ATCPAB = 1678;
-
-    ACTION_ATCSAUC = 1679;
-
-    ACTION_ATCSCUC = 1680;
-
-    ACTION_ATCHNUC = 1681;
-
-    // ACTION: Individual contextual card loading time
-    ACTION_CONTEXTUAL_CARD_LOAD = 1684;
-
-    //ACTION: Contextual card loading timeout
-    ACTION_CONTEXTUAL_CARD_LOAD_TIMEOUT = 1685;
-
-    //ACTION: Log result for each card's eligibility check
-    ACTION_CONTEXTUAL_CARD_ELIGIBILITY = 1686;
-
-    // ACTION: Display white balance setting enabled or disabled.
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ACTION_DISPLAY_WHITE_BALANCE_SETTING_CHANGED = 1703;
-
-    // ACTION: Share a Wi-Fi network by generating a QR code
-    ACTION_SETTINGS_SHARE_WIFI_QR_CODE = 1710;
-
-    // ACTION: Connect to a Wi-Fi network by scanning a QR code
-    ACTION_SETTINGS_ENROLL_WIFI_QR_CODE = 1711;
-
-    // ACTION: Share Wi-Fi hotspot by generating a QR code
-    ACTION_SETTINGS_SHARE_WIFI_HOTSPOT_QR_CODE = 1712;
-
-    // ACTION: Settings > Initialize Search bar > Verify Slice > Invalid data
-    ACTION_VERIFY_SLICE_ERROR_INVALID_DATA = 1725;
-
-    // ACTION: Settings > Initialize Search bar > Verify Slice > Parsing error
-    ACTION_VERIFY_SLICE_PARSING_ERROR = 1726;
-
-    // ACTION: Settings > Initialize Search bar > Verify Slice > Other exception
-    ACTION_VERIFY_SLICE_OTHER_EXCEPTION = 1727;
-
-    // Custom tag to evaluate the consuming time of the Controller.updateState.
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACTION_CONTROLLER_UPDATE_STATE = 1728;
-
-    // Custom tag to evaluate the consuming time from onAttach to
-    // DashboardFragment.updatePreferenceStates.
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACTION_DASHBOARD_VISIBLE_TIME = 1729;
-
-    // ACTION: Allow "Access all files" for an app
-    APP_SPECIAL_PERMISSION_MANAGE_EXT_STRG_ALLOW = 1730;
-
-    // ACTION: Deny "Access all files" for an app
-    APP_SPECIAL_PERMISSION_MANAGE_EXT_STRG_DENY = 1731;
-
-    // ACTION: Battery feature usage
-    ACTION_BATTERY_OPTION_FEATURE_USAGE = 1732;
-
-    // ACTION: Battery feature runtime event
-    ACTION_BATTERY_OPTION_RUNTIME_EVENT = 1733;
-
-    // ACTION: Settings > Developer Options > Toggle on Wireless debugging
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACTION_ADB_WIRELESS_ON = 1734;
-
-    // ACTION: Settings > Developer Options > Toggle off Wireless debugging
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACTION_ADB_WIRELESS_OFF = 1735;
-
-    // ACTION: Change Wi-Fi hotspot name
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACTION_SETTINGS_CHANGE_WIFI_HOTSPOT_NAME = 1736;
-
-    // ACTION: Change Wi-Fi hotspot password
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACTION_SETTINGS_CHANGE_WIFI_HOTSPOT_PASSWORD = 1737;
-
-    // ACTION: Settings > Security > Toggle on Confirm Sim deletion
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACTION_CONFIRM_SIM_DELETION_ON = 1738;
-
-    // ACTION: Settings > Security > Toggle off Confirm Sim deletion
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACTION_CONFIRM_SIM_DELETION_OFF = 1739;
-}
-
-/**
- * Id for Settings pages. Each page must have its own unique Id.
- */
-enum PageId {
-    // Unknown page. Should not be used in production code.
-    PAGE_UNKNOWN = 0;
-
-    // OPEN: Settings > Accessibility
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCESSIBILITY = 2;
-
-    // OPEN: Settings > Accessibility > Captions preference
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCESSIBILITY_CAPTION_PROPERTIES = 3;
-
-    // OPEN: Settings > Accessibility > [Service]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCESSIBILITY_SERVICE = 4;
-
-    // OPEN: Settings > Accessibility > Color correction
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCESSIBILITY_TOGGLE_DALTONIZER = 5;
-
-    // OPEN: Settings > Accessibility > Accessibility shortcut
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCESSIBILITY_TOGGLE_GLOBAL_GESTURE = 6;
-
-    // OPEN: Settings > Accessibility > Magnification gestures (Renamed in O)
-    // OPEN: Settings > Accessibility > Magnification > Magnify with triple-tap
-    // OPEN: Settings > Accessibility > Magnification > Magnify with button
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFICATION = 7;
-
-    // OPEN: Settings > Accounts
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCOUNT = 8;
-
-    // OPEN: Settings > Accounts > [Single Account Sync Settings]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCOUNTS_ACCOUNT_SYNC = 9;
-
-    // OPEN: Settings > Accounts > Add an account
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ACCOUNTS_CHOOSE_ACCOUNT_ACTIVITY = 10;
-
-    // OPEN: Settings > Cellular network settings > APNs
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APN = 12;
-
-    // OPEN: Settings > More > Cellular network settings > APNs > [Edit APN]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APN_EDITOR = 13;
-
-    // OPEN: Settings > Apps > Configure apps > App links > [App]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_APP_LAUNCH = 17;
-
-    // OPEN: Settings > Internal storage > Apps storage > [App]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_APP_STORAGE = 19;
-
-    // OPEN: Settings > Apps > [App info]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_INSTALLED_APP_DETAILS = 20;
-
-    // OPEN: Settings > Memory > App usage > [App Memory usage]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_PROCESS_STATS_DETAIL = 21;
-
-    // OPEN: Settings > Memory > App usage
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_PROCESS_STATS_UI = 23;
-
-    // OPEN: Choose Bluetooth device (ex: when sharing)
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    BLUETOOTH_DEVICE_PICKER = 25;
-
-    // OPEN: Settings > Security > Choose screen lock
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    CHOOSE_LOCK_GENERIC = 27;
-
-    // OPEN: Settings > Security > Choose screen lock > Choose your password
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    CHOOSE_LOCK_PASSWORD = 28;
-
-    // OPEN: Settings > Security > Choose screen lock > Choose your pattern
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    CHOOSE_LOCK_PATTERN = 29;
-
-    // OPEN: Settings > Security > Choose screen lock > Confirm your password
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    CONFIRM_LOCK_PASSWORD = 30;
-
-    // OPEN: Settings > Security > Choose screen lock > Confirm your pattern
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    CONFIRM_LOCK_PATTERN = 31;
-
-    // OPEN: Settings > Security > Encrypt phone
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    CRYPT_KEEPER = 32;
-
-    // OPEN: Settings > Security > Encrypt phone > Confirm
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    CRYPT_KEEPER_CONFIRM = 33;
-
-    // OPEN: Settings (Root page)
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    DASHBOARD_SUMMARY = 35;
-
-    // OPEN: Settings > Data usage
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    DATA_USAGE_SUMMARY = 37;
-
-    // OPEN: Settings > Date & time
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    DATE_TIME = 38;
-
-    // OPEN: Settings > Developer options
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    DEVELOPMENT = 39;
-
-    // OPEN: Settings > About phone
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    DEVICEINFO = 40;
-
-    // OPEN: Settings > Internal storage
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    DEVICEINFO_STORAGE = 42;
-
-    // OPEN: Settings > Display
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    DISPLAY = 46;
-
-    // OPEN: Settings > Display > Daydream
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    DREAM = 47;
-
-    // OPEN: Settings > Security > Screen lock > Secure start-up
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ENCRYPTION = 48;
-
-    // OPEN: Settings > Security > Nexus Imprint
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT = 49;
-
-    // OPEN: Settings > Battery > History details
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FUELGAUGE_BATTERY_HISTORY_DETAIL = 51;
-
-    // OPEN: Settings > Battery > Battery saver
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FUELGAUGE_BATTERY_SAVER = 52;
-
-    // OPEN: Settings > Battery > [App Use details]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FUELGAUGE_POWER_USAGE_DETAIL = 53;
-
-    // OPEN: Settings > Security > SIM card lock settings
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ICC_LOCK = 56;
-
-    // OPEN: Settings > Language & input > Physical keyboard
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    INPUTMETHOD_KEYBOARD = 58;
-
-    // OPEN: Settings > Language & input > Spell checker
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    INPUTMETHOD_SPELL_CHECKERS = 59;
-
-    // OBSOLETE
-    INPUTMETHOD_SUBTYPE_ENABLER = 60;
-
-    // OPEN: Settings > Language & input > Personal dictionary
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    INPUTMETHOD_USER_DICTIONARY = 61;
-
-    // OPEN: Settings > Language & input > Add word
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    INPUTMETHOD_USER_DICTIONARY_ADD_WORD = 62;
-
-    // OPEN: Settings > Location
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    LOCATION = 63;
-
-    // OPEN: Settings > Apps
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    MANAGE_APPLICATIONS = 65;
-
-    // OPEN: Settings > Backup & reset > Factory data reset
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    MASTER_CLEAR = 66;
-
-    // OPEN: Settings > Backup & reset > Factory data reset > Confirm
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    MASTER_CLEAR_CONFIRM = 67;
-
-    // OPEN: Settings > More > Android Beam
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NFC_BEAM = 69;
-
-    // OPEN: Settings > Tap & pay
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NFC_PAYMENT = 70;
-
-    // OPEN: Settings > Sound & notification > App notifications > [App]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_APP_NOTIFICATION = 72;
-
-    // OBSOLETE
-    NOTIFICATION_REDACTION = 74;
-
-    // OPEN: Settings Widget > Notification log
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_STATION = 75;
-
-    // OPEN: Settings > Sound & notification > Do not disturb
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_ZEN_MODE = 76;
-
-
-    // OPEN: Print job notification > Print job settings
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    PRINT_JOB_SETTINGS = 78;
-
-    // OPEN: Settings > Printing > [Print Service]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    PRINT_SERVICE_SETTINGS = 79;
-
-    // OPEN: Settings > Printing
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    PRINT_SETTINGS = 80;
-
-    // OPEN: Settings > Backup & reset
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    PRIVACY = 81;
-
-    //OBSOLETE
-    PROXY_SELECTOR = 82;
-
-    // OPEN: Settings > Backup & reset > Network settings reset
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    RESET_NETWORK = 83;
-
-    // OPEN: Settings > Backup & reset > Network settings reset > Confirm
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    RESET_NETWORK_CONFIRM = 84;
-
-    // OPEN: Settings > Developer Options > Running Services
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    RUNNING_SERVICE_DETAILS = 85;
-
-    // OPEN: Settings > Security > Screen pinning
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    SCREEN_PINNING = 86;
-
-    // OPEN: Settings > Security
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    SECURITY = 87;
-
-    // OPEN: Settings > SIM cards
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    SIM = 88;
-
-    // OBSOLETE
-    TESTING = 89;
-
-    // OPEN: Settings > More > Tethering & portable hotspot
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    TETHER = 90;
-
-    // OPEN: Settings > Security > Trust agents
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    TRUST_AGENT = 91;
-
-    // OPEN: Settings > Security > Trusted credentials
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    TRUSTED_CREDENTIALS = 92;
-
-    // OPEN: Settings > Language & input > TTS output > [Engine] > Settings
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    TTS_ENGINE_SETTINGS = 93;
-
-    // OPEN: Settings > Language & input > Text-to-speech output
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    TTS_TEXT_TO_SPEECH = 94;
-
-    // OPEN: Settings > Security > Apps with usage access
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    USAGE_ACCESS = 95;
-
-    // OPEN: Settings > Users
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    USER = 96;
-
-    // OPEN: Settings > Users > [Restricted profile app & content access]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    USERS_APP_RESTRICTIONS = 97;
-
-    // OPEN: Settings > Users > [User settings]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    USER_DETAILS = 98;
-
-    // OPEN: Settings > More > VPN
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    VPN = 100;
-
-    // OPEN: Settings > Display > Choose wallpaper from
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    WALLPAPER_TYPE = 101;
-
-    // OPEN: Settings > Display > Cast
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    WFD_WIFI_DISPLAY = 102;
-
-    // OPEN: Settings > Wi-Fi
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    WIFI = 103;
-
-    // OPEN: Settings > More > Wi-Fi Calling
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    WIFI_CALLING = 105;
-
-    // OPEN: Settings > Wi-Fi > Saved networks
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    WIFI_SAVED_ACCESS_POINTS = 106;
-
-    // OPEN: Settings > Wi-Fi > Advanced Wi-Fi > Wi-Fi Direct
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    WIFI_P2P = 109;
-
-    // OPEN: Settings > Apps > Configure apps > App permissions
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_ADVANCED = 130;
-
-    // OPEN: Settings > Location > Scanning
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    LOCATION_SCANNING = 131;
-
-    // OPEN: Settings > Sound & notification > App notifications
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    MANAGE_APPLICATIONS_NOTIFICATIONS = 133;
-
-    // OPEN: Settings > Sound & notification > DND > Priority only allows
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_ZEN_MODE_PRIORITY = 141;
-
-    // OPEN: Settings > Sound & notification > DND > Automatic rules
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_ZEN_MODE_AUTOMATION = 142;
-
-    // OPEN: Settings > Sound & notification > DND > [Time based rule]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_ZEN_MODE_SCHEDULE_RULE = 144;
-
-    // OPEN: Settings > Apps > Configure apps > App links
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    MANAGE_DOMAIN_URLS = 143;
-
-    // OPEN: Settings > Sound & notification > DND > [Event rule]
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_ZEN_MODE_EVENT_RULE = 146;
-
-    // OPEN: Settings > Sound & notification > Notification access
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_ACCESS = 179;
-
-    // OPEN: Settings > Sound & notification > Do Not Disturb access
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    NOTIFICATION_ZEN_MODE_ACCESS = 180;
-
-    // OPEN: Settings > Internal storage > Apps storage
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_STORAGE_APPS = 182;
-
-    // OPEN: Settings > Security > Usage access
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_USAGE_ACCESS_DETAIL = 183;
-
-    // OPEN: Settings > Battery > Battery optimization
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_HIGH_POWER_APPS = 184;
-
-    // OPEN: Settings > Apps > Configure > Default apps > Assist & voice input
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    APPLICATIONS_MANAGE_ASSIST = 201;
-
-    // OPEN: Settings > Memory
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    PROCESS_STATS_SUMMARY = 202;
-
-    // OPEN: Settings > Apps > Configure Apps > Display over other apps
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    SYSTEM_ALERT_WINDOW_APPS = 221;
-
-    // OPEN: Settings > About phone > Legal information
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    ABOUT_LEGAL_SETTINGS = 225;
-
-
-    // OPEN: Settings > Developer options > Inactive apps
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FUELGAUGE_INACTIVE_APPS = 238;
-
-    // OPEN: Settings > Security > Nexus Imprint > Add Fingerprint
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_ENROLLING = 240;
-    // OPEN: Fingerprint Enroll > Find Sensor
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_FIND_SENSOR = 241;
-
-    // OPEN: Fingerprint Enroll > Fingerprint Enrolled!
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_ENROLL_FINISH = 242;
-
-    // OPEN: Fingerprint Enroll introduction
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_ENROLL_INTRO = 243;
-
-    // OPEN: Fingerprint Enroll > Let's Start!
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_ENROLL_SIDECAR = 245;
-
-    // OPEN: Fingerprint Enroll SUW > Let's Start!
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_ENROLLING_SETUP = 246;
-
-    // OPEN: Fingerprint Enroll SUW > Find Sensor
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_FIND_SENSOR_SETUP = 247;
-
-    // OPEN: Fingerprint Enroll SUW > Fingerprint Enrolled!
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_ENROLL_FINISH_SETUP = 248;
-
-    // OPEN: Fingerprint Enroll SUW introduction
-    // CATEGORY: SETTINGS
-    // OS: 6.0
-    FINGERPRINT_ENROLL_INTRO_SETUP = 249;
-
-    // OPEN: Settings > Developer Options > Background Check
-    // CATEGORY: SETTINGS
-    // OS: N
-    BACKGROUND_CHECK_SUMMARY = 258;
-
-    // OPEN: Settings > Notifications > [App] > Channel Notifications
-    // CATEGORY: SETTINGS
-    // OS: N
-    NOTIFICATION_TOPIC_NOTIFICATION = 265;
-
-    // OPEN: Settings > Security > User credentials
-    // CATEGORY: Settings
-    // OS: N
-    USER_CREDENTIALS = 285;
-
-    // Logs that the user has edited the enabled VR listeners.
-    // CATEGORY: SETTINGS
-    // OS: N
-    VR_MANAGE_LISTENERS = 334;
-
-    // Settings -> Accessibility -> Click after pointer stops moving
-    // CATEGORY: SETTINGS
-    // OS: N
-    ACCESSIBILITY_TOGGLE_AUTOCLICK = 335;
-
-    // Settings -> Sound
-    // CATEGORY: SETTINGS
-    // OS: N
-    SOUND = 336;
-
-    // Settings -> Notifications -> Gear
-    // CATEGORY: SETTINGS
-    // OS: N
-    CONFIGURE_NOTIFICATION = 337;
-
-    // Settings -> Wi-Fi -> Gear
-    // CATEGORY: SETTINGS
-    // OS: N
-    CONFIGURE_WIFI = 338;
-
-    // Settings -> Display -> Display size
-    // OS: N
-    DISPLAY_SCREEN_ZOOM = 339;
-
-    // Settings -> Display -> Font size
-    // CATEGORY: SETTINGS
-    // OS: N
-    ACCESSIBILITY_FONT_SIZE = 340;
-
-    // Settings -> Data usage -> Cellular/Wi-Fi data usage
-    // CATEGORY: SETTINGS
-    // OS: N
-    DATA_USAGE_LIST = 341;
-
-    // Settings -> Data usage -> Billing cycle or DATA_USAGE_LIST -> Gear
-    // CATEGORY: SETTINGS
-    // OS: N
-    BILLING_CYCLE = 342;
-
-    // DATA_USAGE_LIST -> Any item or App info -> Data usage
-    // CATEGORY: SETTINGS
-    // OS: N
-    APP_DATA_USAGE = 343;
-
-    // Settings -> Language & input -> Language
-    // CATEGORY: SETTINGS
-    // OS: N
-    USER_LOCALE_LIST = 344;
-
-    // Settings -> Language & input -> Virtual keyboard
-    // CATEGORY: SETTINGS
-    // OS: N
-    VIRTUAL_KEYBOARDS = 345;
-
-    // Settings -> Language & input -> Physical keyboard
-    // CATEGORY: SETTINGS
-    // OS: N
-    PHYSICAL_KEYBOARDS = 346;
-
-    // Settings -> Language & input -> Virtual keyboard -> Add a virtual keyboard
-    // CATEGORY: SETTINGS
-    // OS: N
-    ENABLE_VIRTUAL_KEYBOARDS = 347;
-
-    // Settings -> Data usage -> Data Saver
-    // CATEGORY: SETTINGS
-    // OS: N
-    DATA_SAVER_SUMMARY = 348;
-
-    // Settings -> Data usage -> Data Saver -> Unrestricted data access
-    // CATEGORY: SETTINGS
-    // OS: N
-    DATA_USAGE_UNRESTRICTED_ACCESS = 349;
-
-    // Settings -> Apps -> Gear -> Special access
-    SPECIAL_ACCESS = 351;
-
-    // OPEN: SUW Welcome Screen -> Vision Settings
-    // CATEGORY: SETTINGS
-    // OS: N
-    SUW_ACCESSIBILITY = 367;
-
-    // OPEN: SUW Welcome Screen -> Vision Settings -> Magnification gestures (Renamed in O)
-    // OPEN: SUW Welcome Screen -> Vision Settings -> Magnification -> Magnify with triple-tap
-    // OPEN: SUW Welcome Screen -> Vision Settings -> Magnification -> Magnify with button
-    // ACTION: New magnification gesture configuration is chosen
-    //  SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: N
-    SUW_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFICATION = 368;
-
-    // OPEN: SUW Welcome Screen -> Vision Settings -> Font size
-    // ACTION: New font size is chosen
-    //  SUBTYPE: 0 is small, 1 is default, 2 is large, 3 is largest
-    // CATEGORY: SETTINGS
-    // OS: N
-    SUW_ACCESSIBILITY_FONT_SIZE = 369;
-
-    // OPEN: SUW Welcome Screen -> Vision Settings -> Display size
-    // ACTION: New display size is chosen
-    //  SUBTYPE: 0 is small, 1 is default, 2 is large, 3 is larger, 4 is largest
-    // CATEGORY: SETTINGS
-    // OS: N
-    SUW_ACCESSIBILITY_DISPLAY_SIZE = 370;
-
-    // OPEN: SUW Welcome Screen -> Vision Settings -> TalkBack
-    // ACTION: New screen reader configuration is chosen
-    //  SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: N
-    SUW_ACCESSIBILITY_TOGGLE_SCREEN_READER = 371;
-
-    // Airplane mode on
-    SETTINGS_CONDITION_AIRPLANE_MODE = 377;
-    // AKA Data saver on
-    SETTINGS_CONDITION_BACKGROUND_DATA = 378;
-    // Battery saver on
-    SETTINGS_CONDITION_BATTERY_SAVER = 379;
-    // Cellular data off
-    SETTINGS_CONDITION_CELLULAR_DATA = 380;
-    // Do not disturb on
-    SETTINGS_CONDITION_DND = 381;
-    // Hotspot on
-    SETTINGS_CONDITION_HOTSPOT = 382;
-    // Work profile off
-    SETTINGS_CONDITION_WORK_MODE = 383;
-
-    // Settings > Apps > Gear > Special Access > Premium SMS access
-    PREMIUM_SMS_ACCESS = 388;
-
-    // OPEN: Settings > Accounts > Work profile settings
-    // CATEGORY: SETTINGS
-    ACCOUNTS_WORK_PROFILE_SETTINGS = 401;
-
-    // Settings -> Dev options -> Convert to file encryption
-    CONVERT_FBE = 402;
-
-    // Settings -> Dev options -> Convert to file encryption -> WIPE AND CONVERT...
-    CONVERT_FBE_CONFIRM = 403;
-
-    // Settings -> Dev options -> Running services
-    RUNNING_SERVICES = 404;
-
-    // The dialog shown by 3P intent to change current webview implementation.
-    WEBVIEW_IMPLEMENTATION = 405;
-
-    // OPEN: Settings > Internal storage > Storage manager
-    // CATEGORY: SETTINGS
-    STORAGE_MANAGER_SETTINGS = 458;
-
-    // OPEN: Settings -> Gestures
-    // CATEGORY: SETTINGS
-    SETTINGS_GESTURES = 459;
-
-    // OPEN: Settings > Display > Night Light
-    // CATEGORY: SETTINGS
-    NIGHT_DISPLAY_SETTINGS = 488;
-
-    // Night Light on
-    SETTINGS_CONDITION_NIGHT_DISPLAY = 492;
-
-    // OPEN: Settings > Language & input > Personal dictionary (single locale)
-    USER_DICTIONARY_SETTINGS = 514;
-
-    // OPEN: Settings > Date & time > Select time zone
-    ZONE_PICKER = 515;
-
-    // OPEN: Settings > Security > Device administrators
-    DEVICE_ADMIN_SETTINGS = 516;
-
-    // OPEN: Settings > Security > Factory Reset Protection dialog
-    DIALOG_FRP = 528;
-
-    // OPEN: Settings > Custom list preference with confirmation message
-    DIALOG_CUSTOM_LIST_CONFIRMATION = 529;
-
-    // OPEN: Settings > APN Editor > Error dialog
-    DIALOG_APN_EDITOR_ERROR = 530;
-
-    // OPEN: Settings > Users > Edit owner info dialog
-    DIALOG_OWNER_INFO_SETTINGS = 531;
-
-    // OPEN: Settings > Security > Use one lock dialog
-    DIALOG_UNIFICATION_CONFIRMATION = 532;
-
-    // OPEN: Settings > Security > User Credential
-    DIALOG_USER_CREDENTIAL = 533;
-
-    // OPEN: Settings > Accounts > Remove account
-    DIALOG_REMOVE_USER = 534;
-
-    // OPEN: Settings > Accounts > Confirm auto sync dialog
-    DIALOG_CONFIRM_AUTO_SYNC_CHANGE = 535;
-
-    // OPEN: Settings > Apps > Dialog for running service details
-    DIALOG_RUNNIGN_SERVICE = 536;
-
-    // OPEN: Settings > Bluetooth > Rename this device
-    DIALOG_BLUETOOTH_RENAME = 538;
-
-    // OPEN: Settings > Battery optimization > details for app
-    DIALOG_HIGH_POWER_DETAILS = 540;
-
-    // OPEN: Settings > Keyboard > Show keyboard layout dialog
-    DIALOG_KEYBOARD_LAYOUT = 541;
-
-    // OPEN: Settings > WIFI Scan permission dialog
-    DIALOG_WIFI_SCAN_MODE = 543;
-
-    // OPEN: Settings > Wireless > VPN > Config dialog
-    DIALOG_LEGACY_VPN_CONFIG = 545;
-
-    // OPEN: Settings > Wireless > VPN > Config dialog for app
-    DIALOG_VPN_APP_CONFIG = 546;
-
-    // OPEN: Settings > Wireless > VPN > Cannot connect dialog
-    DIALOG_VPN_CANNOT_CONNECT = 547;
-
-    // OPEN: Settings > Wireless > VPN > Replace existing VPN dialog
-    DIALOG_VPN_REPLACE_EXISTING = 548;
-
-    // OPEN: Settings > Billing cycle > Edit billing cycle dates dialog
-    DIALOG_BILLING_CYCLE = 549;
-
-    // OPEN: Settings > Billing cycle > Edit data limit/warning dialog
-    DIALOG_BILLING_BYTE_LIMIT = 550;
-
-    // OPEN: Settings > Billing cycle > turn on data limit dialog
-    DIALOG_BILLING_CONFIRM_LIMIT = 551;
-
-    // OPEN: Settings > Service > Turn off notification access dialog
-    DIALOG_DISABLE_NOTIFICATION_ACCESS = 552;
-
-    // OPEN: Settings > Sound > Use personal sound for work profile dialog
-    DIALOG_UNIFY_SOUND_SETTINGS = 553;
-
-    // OPEN: Settings > Zen mode > Dialog warning about the zen access privileges being granted.
-    DIALOG_ZEN_ACCESS_GRANT = 554;
-
-    // OPEN: Settings > Zen mode > Dialog warning about the zen access privileges being revoked.
-    DIALOG_ZEN_ACCESS_REVOKE = 555;
-
-    // OPEN: Settings > Zen mode > Dialog that picks time for zen mode.
-    DIALOG_ZEN_TIMEPICKER = 556;
-
-    // OPEN: Settings > Apps > Dialog that informs user to allow service access for app.
-    DIALOG_SERVICE_ACCESS_WARNING = 557;
-
-    // OPEN: Settings > Apps > Dialog for app actions (such as force stop/clear data)
-    DIALOG_APP_INFO_ACTION = 558;
-
-    // OPEN: Settings > Storage > Dialog for forgetting a storage device
-    DIALOG_VOLUME_FORGET = 559;
-
-    // OPEN: Settings > Storage > Dialog for initializing a volume
-    DIALOG_VOLUME_INIT = 561;
-
-    // OPEN: Settings > Storage > Dialog for unmounting a volume
-    DIALOG_VOLUME_UNMOUNT = 562;
-
-    // OPEN: Settings > Storage > Dialog for renaming a volume
-    DIALOG_VOLUME_RENAME = 563;
-
-    // OPEN: Settings > Storage > Dialog for clear cache
-    DIALOG_STORAGE_CLEAR_CACHE = 564;
-
-    // OPEN: Settings > Storage > Dialog for system info
-    DIALOG_STORAGE_SYSTEM_INFO = 565;
-
-    // OPEN: Settings > Storage > Dialog for other info
-    DIALOG_STORAGE_OTHER_INFO = 566;
-
-    // OPEN: Settings > Storage > Dialog for user info
-    DIALOG_STORAGE_USER_INFO = 567;
-    // OPEN: Settings > Add fingerprint > Dialog when user touches fingerprint icon.
-    DIALOG_FINGERPRINT_ICON_TOUCH = 568;
-
-    // OPEN: Settings > Add fingerprint > Error dialog
-    DIALOG_FINGERPINT_ERROR = 569;
-
-    // OPEN: Settings > Fingerprint > Rename or delete dialog
-    DIALOG_FINGERPINT_EDIT = 570;
-
-    // OPEN: Settings > Fingerprint > Dialog for deleting last fingerprint
-    DIALOG_FINGERPINT_DELETE_LAST = 571;
-
-    // OPEN: SUW > Fingerprint > Dialog to confirm skip fingerprint setup entirely.
-    DIALOG_FINGERPRINT_SKIP_SETUP = 573;
-
-    // OPEN: Settings > Proxy Selector error dialog
-    DIALOG_PROXY_SELECTOR_ERROR = 574;
-
-    // OPEN: Settings > Wifi > P2P Settings > Disconnect dialog
-    DIALOG_WIFI_P2P_DISCONNECT = 575;
-
-    // OPEN: Settings > Wifi > P2P Settings > Cancel connection dialog
-    DIALOG_WIFI_P2P_CANCEL_CONNECT = 576;
-
-    // OPEN: Settings > Wifi > P2P Settings > Rename dialog
-    DIALOG_WIFI_P2P_RENAME = 577;
-
-    // OPEN: Settings > Wifi > P2P Settings > Forget group dialog
-    DIALOG_WIFI_P2P_DELETE_GROUP = 578;
-
-    // OPEN: Settings > APN > Restore default dialog
-    DIALOG_APN_RESTORE_DEFAULT = 579;
-
-    // OPEN: Settings > Encryption interstitial accessibility warning dialog
-    DIALOG_ENCRYPTION_INTERSTITIAL_ACCESSIBILITY = 581;
-
-    // OPEN: Settings > Acessibility > Enable accessiblity service dialog
-    DIALOG_ACCESSIBILITY_SERVICE_ENABLE = 583;
-
-    // OPEN: Settings > Acessibility > Disable accessiblity service dialog
-    DIALOG_ACCESSIBILITY_SERVICE_DISABLE = 584;
-
-    // OPEN: Settings > Account > Remove account dialog
-    DIALOG_ACCOUNT_SYNC_REMOVE = 585;
-
-    // OPEN: Settings > Account > Remove account failed dialog
-    DIALOG_ACCOUNT_SYNC_FAILED_REMOVAL = 586;
-
-    // OPEN: Settings > Account > Cannot do onetime sync dialog
-    DIALOG_ACCOUNT_SYNC_CANNOT_ONETIME_SYNC = 587;
-
-    // OPEN: Settings > Display > Night light > Set start time dialog
-    DIALOG_NIGHT_DISPLAY_SET_START_TIME = 588;
-
-    // OPEN: Settings > Display > Night light > Set end time dialog
-    DIALOG_NIGHT_DISPLAY_SET_END_TIME = 589;
-
-
-
-        // OPEN: Settings > User > Edit info dialog
-        DIALOG_USER_EDIT = 590;
-
-        // OPEN: Settings > User > Confirm remove dialog
-        DIALOG_USER_REMOVE = 591;
-
-        // OPEN: Settings > User > Enable calling dialog
-        DIALOG_USER_ENABLE_CALLING = 592;
-
-        // OPEN: Settings > User > Enable calling and sms dialog
-        DIALOG_USER_ENABLE_CALLING_AND_SMS = 593;
-
-        // OPEN: Settings > User > Cannot manage device message dialog
-        DIALOG_USER_CANNOT_MANAGE = 594;
-
-        // OPEN: Settings > User > Add user dialog
-        DIALOG_USER_ADD = 595;
-
-        // OPEN: Settings > User > Setup user dialog
-        DIALOG_USER_SETUP = 596;
-
-        // OPEN: Settings > User > Setup profile dialog
-        DIALOG_USER_SETUP_PROFILE = 597;
-
-        // OPEN: Settings > User > Choose user type dialog
-        DIALOG_USER_CHOOSE_TYPE = 598;
-
-        // OPEN: Settings > User > Need lockscreen dialog
-        DIALOG_USER_NEED_LOCKSCREEN = 599;
-
-        // OPEN: Settings > User > Confirm exit guest mode dialog
-        DIALOG_USER_CONFIRM_EXIT_GUEST = 600;
-
-        // OPEN: Settings > User > Edit user profile dialog
-        DIALOG_USER_EDIT_PROFILE = 601;
-
-
-    // OPEN: Settings > Wifi > Saved AP > Edit dialog
-    DIALOG_WIFI_SAVED_AP_EDIT = 602;
-
-    // OPEN: Settings > Wifi > Edit AP dialog
-    DIALOG_WIFI_AP_EDIT = 603;
-
-    // OPEN: Settings > Wifi > Write config to NFC dialog
-    DIALOG_WIFI_WRITE_NFC = 606;
-
-    // OPEN: Settings > Date > Date picker dialog
-    DIALOG_DATE_PICKER = 607;
-
-    // OPEN: Settings > Date > Time picker dialog
-    DIALOG_TIME_PICKER = 608;
-
-    // OPEN: Settings > Wireless > Manage wireless plan dialog
-    DIALOG_MANAGE_MOBILE_PLAN = 609;
-
-    // OPEN Settings > Bluetooth > Attempt to connect to device that shows dialog
-    BLUETOOTH_DIALOG_FRAGMENT = 613;
-
-    // OPEN: Settings > Security
-    // CATEGORY: SETTINGS
-    // OS: O
-    ENTERPRISE_PRIVACY_SETTINGS = 628;
-
-    // OPEN: Settings > System
-    SETTINGS_SYSTEM_CATEGORY = 744;
-
-    // OPEN: Settings > Storage
-    SETTINGS_STORAGE_CATEGORY = 745;
-
-    // OPEN: Settings > Network & Internet
-    SETTINGS_NETWORK_CATEGORY = 746;
-
-    // OPEN: Settings > Connected Device
-    SETTINGS_CONNECTED_DEVICE_CATEGORY = 747;
-
-    // OPEN: Settings > App & Notification
-    SETTINGS_APP_NOTIF_CATEGORY = 748;
-
-    // OPEN: Settings > System > Language & Region
-    SETTINGS_LANGUAGE_CATEGORY = 750;
-
-    // OPEN: Settings > System > Input & Gesture > Swipe to notification gesture
-    SETTINGS_GESTURE_SWIPE_TO_NOTIFICATION = 751;
-
-    // OPEN: Settings > System > Input & Gesture > Double tap power button gesture
-    SETTINGS_GESTURE_DOUBLE_TAP_POWER = 752;
-
-    // OPEN: Settings > System > Input & Gesture > Pick up gesture
-    SETTINGS_GESTURE_PICKUP = 753;
-
-    // OPEN: Settings > System > Input & Gesture > Double tap screen gesture
-    SETTINGS_GESTURE_DOUBLE_TAP_SCREEN = 754;
-
-    // OPEN: Settings > System > Input & Gesture > Double twist gesture
-    SETTINGS_GESTURE_DOUBLE_TWIST = 755;
-
-    // OPEN: Settings > Apps > Default Apps > Default browser
-    DEFAULT_BROWSER_PICKER = 785;
-    // OPEN: Settings > Apps > Default Apps > Default emergency app
-    DEFAULT_EMERGENCY_APP_PICKER = 786;
-
-    // OPEN: Settings > Apps > Default Apps > Default home
-    DEFAULT_HOME_PICKER = 787;
-
-    // OPEN: Settings > Apps > Default Apps > Default phone
-    DEFAULT_PHONE_PICKER = 788;
-
-    // OPEN: Settings > Apps > Default Apps > Default sms
-    DEFAULT_SMS_PICKER = 789;
-
-    // OPEN: Settings > Apps > Notification > Notification Assistant
-    DEFAULT_NOTIFICATION_ASSISTANT = 790;
-
-
-    // OPEN: Settings > Apps > Default Apps > Warning dialog to confirm selection
-    DEFAULT_APP_PICKER_CONFIRMATION_DIALOG = 791;
-
-    // OPEN: Settings > Apps > Default Apps > Default autofill app
-    DEFAULT_AUTOFILL_PICKER = 792;
-
-    // OPEN: Settings > Apps > Gear > Special Access > Install other apps
-    // CATEGORY: SETTINGS
-    // OS: 8.0
-    MANAGE_EXTERNAL_SOURCES = 808;
-
-    // Logs that the user has edited the picture-in-picture settings.
-    // CATEGORY: SETTINGS
-    SETTINGS_MANAGE_PICTURE_IN_PICTURE = 812;
-
-    // OPEN: SUW Welcome Screen -> Vision Settings -> Select to Speak
-    // ACTION: Select to Speak configuration is chosen
-    //  SUBTYPE: 0 is off, 1 is on
-    // CATEGORY: SETTINGS
-    // OS: N
-    SUW_ACCESSIBILITY_TOGGLE_SELECT_TO_SPEAK = 817;
-
-    // OPEN: Settings > System > Backup
-    // CATEGORY: SETTINGS
-    // OS: O
-    BACKUP_SETTINGS = 818;
-
-    // OPEN: Settings > Storage > Games
-    // CATEGORY: SETTINGS
-    // OS: O
-    APPLICATIONS_STORAGE_GAMES = 838;
-
-    // OPEN: Settings > Storage > Audio and Music
-    // CATEGORY: SETTINGS
-    // OS: O
-    APPLICATIONS_STORAGE_MUSIC = 839;
-
-    // ACTION: Settings > Storage > Free Up Space to launch Deletion Helper
-    // CATEGORY: SETTINGS
-    // OS: O
-    STORAGE_FREE_UP_SPACE_NOW = 840;
-
-    // ACTION: Settings > Storage > Files to open the File Manager
-    // CATEGORY: SETTINGS
-    // OS: O
-    STORAGE_FILES = 841;
-
-    // OPEN: Settings > Apps > Default Apps > Assist >  Default assist
-    DEFAULT_ASSIST_PICKER = 843;
-
-    // OPEN: Settings > Apps > Default Apps > Assist >  Default voice input
-    DEFAULT_VOICE_INPUT_PICKER = 844;
-
-    // OPEN: Settings > Storage > [Profile]
-    SETTINGS_STORAGE_PROFILE = 845;
-
-    // OPEN: Settings > Security & screen lock -> Encryption & crendentials
-    // CATEGORY: SETTINGS
-    // OS: O
-    ENCRYPTION_AND_CREDENTIAL = 846;
-
-    // OPEN: Settings > Wi-Fi > Network Details (click on Access Point)
-    // CATEGORY: SETTINGS
-    // OS: O
-    WIFI_NETWORK_DETAILS = 849;
-
-    // OPEN: Settings > Wi-Fi > Wifi Preferences -> Advanced -> Network Scorer
-    // CATEGORY: SETTINGS
-    // OS: O
-    SETTINGS_NETWORK_SCORER = 861;
-
-    // OPEN: Settings > About device > Model > Hardware info dialog
-    DIALOG_SETTINGS_HARDWARE_INFO = 862;
-
-    // OPEN: Settings > Security & screen lock -> Lock screen preferences
-    // CATEGORY: SETTINGS
-    SETTINGS_LOCK_SCREEN_PREFERENCES = 882;
-
-
-    // OPEN: Settings -> Display -> When in VR Mode
-    VR_DISPLAY_PREFERENCE = 921;
-
-    // OPEN: Settings > Accessibility > Magnification
-    // CATEGORY: SETTINGS
-    // OS: O
-    ACCESSIBILITY_SCREEN_MAGNIFICATION_SETTINGS = 922;
-
-    // OPEN: Settings -> System -> Reset options
-    RESET_DASHBOARD = 924;
-
-     // OPEN: Settings > Security > Nexus Imprint > [Fingerprint] > Delete
-    // CATEGORY: SETTINGS
-    // OS: O
-    FINGERPRINT_REMOVE_SIDECAR = 934;
-
-    // OPEN: Settings > Storage > Movies & TV
-    // CATEGORY: SETTINGS
-    // OS: O
-    APPLICATIONS_STORAGE_MOVIES = 935;
-
-    // OPEN: Settings > Security > Managed Device Info > Apps installed
-    // CATEGORY: SETTINGS
-    // OS: O
-    ENTERPRISE_PRIVACY_INSTALLED_APPS = 938;
-
-    // OPEN: Settings > Security > Managed Device Info > nnn permissions
-    // CATEGORY: SETTINGS
-    // OS: O
-    ENTERPRISE_PRIVACY_PERMISSIONS = 939;
-
-
-    // OPEN: Settings > Security > Managed Device Info > Default apps
-    // CATEGORY: SETTINGS
-    // OS: O
-    ENTERPRISE_PRIVACY_DEFAULT_APPS = 940;
-
-    // OPEN: Choose screen lock dialog in Settings
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    SETTINGS_CHOOSE_LOCK_DIALOG = 990;
-
-    // OPEN: Settings > System > Languages & input > Assist gesture
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    SETTINGS_ASSIST_GESTURE = 996;
-
-    // OPEN: Settings > Connected Devices > Bluetooth > (click on details link for a paired device)
-    BLUETOOTH_DEVICE_DETAILS = 1009;
-
-    // OPEN: Settings > credential pages - prompt for key guard configuration confirmation
-    CONFIGURE_KEYGUARD_DIALOG = 1010;
-
-    // OPEN: Settings > Network > Tether > Wi-Fi hotspot
-    WIFI_TETHER_SETTINGS = 1014;
-
-    // OPEN: Settings->Connected Devices->Bluetooth->(click on details link for a paired device)
-    // -> Edit name button.
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    DIALOG_BLUETOOTH_PAIRED_DEVICE_RENAME = 1015;
-
-    // OPEN: Settings > Connected devices > Bluetooth > Pair new device
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    BLUETOOTH_PAIRING = 1018;
-
-    // OPEN: Settings->Connected Devices->Bluetooth->(click on details link for a paired device)
-    // -> Forget button.
-    // CATEGORY: SETTINGS
-    // OS: O DR
-    DIALOG_BLUETOOTH_PAIRED_DEVICE_FORGET = 1031;
-
-    // OPEN: Settings > Storage > Photos & Videos
-    // CATEGORY: SETTINGS
-    // OS: O MR
-    APPLICATIONS_STORAGE_PHOTOS = 1092;
-
-    // OPEN: Settings > Display > Colors
-    // CATEGORY: SETTINGS
-    // OS: O MR
-    COLOR_MODE_SETTINGS = 1143;
-
-    // OPEN: Settings > Developer Options > Experiment dashboard
-    // CATEGORY: SETTINGS
-    SETTINGS_FEATURE_FLAGS_DASHBOARD = 1217;
-
-    // OPEN: Settings > Notifications > [App] > Topic Notifications
-    // CATEGORY: SETTINGS
-    // OS: P
-    NOTIFICATION_CHANNEL_GROUP = 1218;
-
-    // OPEN: Settings > Developer options > Enable > Info dialog
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_ENABLE_DEVELOPMENT_OPTIONS = 1219;
-
-    // OPEN: Settings > Developer options > OEM unlocking > Info dialog
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_ENABLE_OEM_UNLOCKING = 1220;
-
-    // OPEN: Settings > Developer options > USB debugging > Info dialog
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_ENABLE_ADB = 1222;
-
-    // OPEN: Settings > Security > Nexus Imprint > [Fingerprint]
-    // CATEGORY: SETTINGS
-    // OS: P
-    FINGERPRINT_AUTHENTICATE_SIDECAR = 1221;
-
-    // OPEN: Settings > Developer options > Revoke USB debugging authorizations > Info dialog
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_CLEAR_ADB_KEYS = 1223;
-
-    // Open: Settings > Developer options > Quick setting tile config
-    // CATEGORY: SETTINGS
-    // OS: P
-    DEVELOPMENT_QS_TILE_CONFIG = 1224;
-
-    // OPEN: Settings > Developer options > Store logger data persistently on device > Info dialog
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_LOG_PERSIST = 1225;
-
-    // OPEN: Settings > Network & Internet > Mobile network > Wi-Fi calling
-    // CATEGORY: SETTINGS
-    // OS: P
-    WIFI_CALLING_FOR_SUB = 1230;
-
-    // Open: Settings > Dev options > Oem unlock > lock it > warning dialog.
-    // OS: P
-    DIALOG_OEM_LOCK_INFO = 1238;
-
-    // Open: Settings > System > About phone > IMEI
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_IMEI_INFO = 1240;
-
-    // OPEN: Settings > System > About Phone > Sim status
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_SIM_STATUS = 1246;
-
-    // OPEN: Settings > System > About Phone > Android Version
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_FIRMWARE_VERSION = 1247;
-
-    // OPEN: Settings > Battery(version 2)
-    // CATEGORY: SETTINGS
-    // OS: P
-    FUELGAUGE_POWER_USAGE_SUMMARY_V2 = 1263;
-
-    // OPEN: Settings > Connected devices > Connection preferences
-    // CATEGORY: SETTINGS
-    // OS: P
-    CONNECTION_DEVICE_ADVANCED = 1264;
-
-    // OPEN: Settings > Security > Screen lock gear icon
-    // CATEGORY: SETTINGS
-    // OS: P
-    SCREEN_LOCK_SETTINGS = 1265;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Delete rule (trash can icon)
-    // CATEGORY: SETTINGS
-    // OS: P
-    NOTIFICATION_ZEN_MODE_DELETE_RULE_DIALOG = 1266;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Add rule > Event/Time
-    // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Select rule ("Event") > Rule name
-    // CATEGORY: SETTINGS
-    // OS: P
-    NOTIFICATION_ZEN_MODE_RULE_NAME_DIALOG = 1269;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Add rule
-    // CATEGORY: SETTINGS
-    // OS: P
-    NOTIFICATION_ZEN_MODE_RULE_SELECTION_DIALOG = 1270;
-
-    // OPEN: Settings > Battery > Smart Battery
-    // CATEGORY: SETTINGS
-    // OS: P
-    FUELGAUGE_SMART_BATTERY = 1281;
-
-    // OPEN: Settings > Battery > Smart Battery > Restricted apps
-    // CATEGORY: SETTINGS
-    // OS: P
-    FUELGAUGE_RESTRICTED_APP_DETAILS = 1285;
-
-    // OPEN: Settings > Sound & notification > Do Not Disturb > Turn on now
-    // CATEGORY: SETTINGS
-    // OS: P
-    NOTIFICATION_ZEN_MODE_ENABLE_DIALOG = 1286;
-
-    // OPEN: Settings->Connected Devices->USB->(click on details link)
-    // CATEGORY: SETTINGS
-    // OS: P
-    USB_DEVICE_DETAILS = 1291;
-
-    // OPEN: Settings > Accessibility > Vibration
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACCESSIBILITY_VIBRATION = 1292;
-
-    // OPEN: Settings > Accessibility > Vibration > Notification vibration
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACCESSIBILITY_VIBRATION_NOTIFICATION = 1293;
-
-    // OPEN: Settings > Accessibility > Vibration > Touch vibration
-    // CATEGORY: SETTINGS
-    // OS: P
-    ACCESSIBILITY_VIBRATION_TOUCH = 1294;
-
-    // OPEN: Settings->Developer Options->Default USB
-    // CATEGORY: SETTINGS
-    // OS: P
-    USB_DEFAULT = 1312;
-
-    // OPEN: Settings > Battery > Battery tip > Battery tip Dialog
-    // CATEGORY: SETTINGS
-    // OS: P
-    FUELGAUGE_BATTERY_TIP_DIALOG = 1323;
-
-    // OPEN: DND Settings > What to block
-    // OS: P
-    ZEN_WHAT_TO_BLOCK = 1339;
-
-    // OPEN: Settings > Sounds > Do Not Disturb > Duration
-    // CATEGORY: SETTINGS
-    // OS: P
-    NOTIFICATION_ZEN_MODE_DURATION_DIALOG = 1341;
-
-    // OPEN: Settings > Date & time > Select time zone -> Region
-    // CATEGORY: SETTINGS
-    // OS: P
-    SETTINGS_ZONE_PICKER_REGION = 1355;
-
-    // OPEN: Settings > Date & time > Select time zone -> Time Zone
-    // CATEGORY: SETTINGS
-    // OS: P
-    SETTINGS_ZONE_PICKER_TIME_ZONE = 1356;
-    // OPEN: Settings > Date & time > Select time zone -> Select UTC Offset
-    // CATEGORY: SETTINGS
-    // OS: P
-    SETTINGS_ZONE_PICKER_FIXED_OFFSET = 1357;
-
-    // OPEN: Settings > Gestures > Prevent Ringing
-    // OS: P
-    SETTINGS_PREVENT_RINGING = 1360;
-
-    // Settings > Condition > Device muted
-    // CATEGORY: SETTINGS
-    // OS: P
-    SETTINGS_CONDITION_DEVICE_MUTED = 1368;
-
-    // Settings > Condition > Device vibrate
-    // CATEGORY: SETTINGS
-    // OS: P
-    SETTINGS_CONDITION_DEVICE_VIBRATE = 1369;
-
-    // OPEN: Settings > Connected devices > previously connected devices
-    // CATEGORY: SETTINGS
-    // OS: P
-    PREVIOUSLY_CONNECTED_DEVICES = 1370;
-
-    // OPEN: Settings > Network & Internet > Wi-Fi > Wi-Fi Preferences > Turn on Wi-Fi automatically
-    //       note: Wifi Scanning must be off for this dialog to show
-    // CATEGORY: SETTINGS
-    // OS: P
-    WIFI_SCANNING_NEEDED_DIALOG = 1373;
-
-    // OPEN: Settings > System > Gestures > System navigation
-    // CATEGORY: SETTINGS
-    // OS: P
-    SETTINGS_GESTURE_SWIPE_UP = 1374;
-
-    // OPEN: Settings > Storage > Dialog to format a storage volume
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_VOLUME_FORMAT = 1375;
-
-    // OPEN: DND onboarding activity
-    // CATEGORY: SETTINGS
-    // OS: P
-    SETTINGS_ZEN_ONBOARDING = 1380;
-
-    // OPEN: Settings > Display > Auto brightness
-    // CATEGORY: SETTINGS
-    // OS: P
-    SETTINGS_AUTO_BRIGHTNESS = 1381;
-
-     // OPEN: Settings > Connected Devices > Bluetooth
-    // CATEGORY: SETTINGS
-    // OS: P
-    BLUETOOTH_FRAGMENT = 1390;
-
-    // Screen: DND Settings > Notifications
-    // OS: P
-    SETTINGS_ZEN_NOTIFICATIONS = 1400;
-
-    // An event category for slices.
-    // OPEN: Slice became visible.
-    // CLOSE: Slice became invisible.
-    // ACTION: Slice was tapped.
-    SLICE = 1401;
-
-    // OPEN: Settings -> Developer Options -> Disable Bluetooth A2DP hardware
-    // offload
-    // CATEGORY: SETTINGS
-    // OS: P
-    DIALOG_BLUETOOTH_DISABLE_A2DP_HW_OFFLOAD = 1441;
-
-    // OPEN: Settings homepage
-    SETTINGS_HOMEPAGE = 1502;
-
-    // OPEN: Settings > Create shortcut(widget)
-    // CATEGORY: SETTINGS
-    // OS: Q
-    SETTINGS_CREATE_SHORTCUT = 1503;
-
-    // OPEN: Face Enroll introduction
-    // CATEGORY: SETTINGS
-    // OS: Q
-    FACE_ENROLL_INTRO = 1506;
-
-    // OPEN: Face Enroll introduction
-    // CATEGORY: SETTINGS
-    // OS: Q
-    FACE_ENROLL_ENROLLING = 1507;
-
-    // OPEN: Face Enroll introduction
-    // CATEGORY: SETTINGS
-    // OS: Q
-    FACE_ENROLL_FINISHED = 1508;
-
-    // OPEN: Face Enroll sidecar
-    // CATEGORY: SETTINGS
-    // OS: Q
-    FACE_ENROLL_SIDECAR = 1509;
-
-    // OPEN: Settings > Add face > Error dialog
-    // OS: Q
-    DIALOG_FACE_ERROR = 1510;
-
-    // OPEN: Settings > Security > Face
-    // CATEGORY: SETTINGS
-    // OS: Q
-    FACE = 1511;
-
-   // OPEN: Settings > Acessibility > HearingAid pairing instructions dialog
-    // CATEGORY: SETTINGS
-    // OS: Q
-    DIALOG_ACCESSIBILITY_HEARINGAID = 1512;
-
-    // OPEN: Settings > Add face
-    // OS: Q
-    FACE_ENROLL_PREVIEW = 1554;
-
-    // OPEN: Settings > Network & Internet > Wi-Fi > Add network
-    // CATEGORY: SETTINGS
-    // OS: Q
-    SETTINGS_WIFI_ADD_NETWORK = 1556;
-
-    // OPEN: Settings > System > Input & Gesture > Reach up gesture
-    // OS: Q
-    SETTINGS_GESTURE_WAKE_LOCK_SCREEN = 1557;
-
-    // OPEN: Settings > System > Input & Gesture > Wake screen
-    SETTINGS_GESTURE_WAKE_SCREEN = 1570;
-
-    // OPEN: Settings > Network & internet > Mobile network
-    MOBILE_NETWORK = 1571;
-
-    // OPEN: Settings > Network & internet > Mobile network > Choose network
-    MOBILE_NETWORK_SELECT = 1581;
-
-    // OPEN: Settings > Network & internet > Mobile network > Mobile Data > Dialog
-    MOBILE_DATA_DIALOG = 1582;
-
-    // OPEN: Settings > Network & internet > Mobile network > Data roaming > Dialog
-    MOBILE_ROAMING_DIALOG = 1583;
-
-    // Settings > Display > Lock screen display > On lock screen
-    LOCK_SCREEN_NOTIFICATION_CONTENT = 1584;
-
-    // ConfirmDeviceCredentials > BiometricPrompt
-    BIOMETRIC_FRAGMENT = 1585;
-
-    // OPEN: Biometric Enrollment (android.settings.BIOMETRIC_ENROLL action intent)
-    BIOMETRIC_ENROLL_ACTIVITY = 1586;
-
-    // OPEN: Settings > Privacy
-    TOP_LEVEL_PRIVACY = 1587;
-
-    // OPEN: Settings > Sound & notification > Do Not Disturb > See all exceptions >
-    // Allow apps to override
-    // CATEGORY: SETTINGS
-    // OS: Q
-    NOTIFICATION_ZEN_MODE_OVERRIDING_APPS = 1588;
-
-
-    // OPEN: Settings > Sound & notification > Do Not Disturb > See all exceptions >
-    // Allow apps to override > Choose app
-    // CATEGORY: SETTINGS
-    // OS: Q
-    NOTIFICATION_ZEN_MODE_OVERRIDING_APP = 1589;
-
-    // OPEN: Settings > Developer options > Disable > Info dialog
-    DIALOG_DISABLE_DEVELOPMENT_OPTIONS = 1591;
-
-    // OPEN: WifiDppConfiguratorActivity (android.settings.WIFI_DPP_CONFIGURATOR_XXX action intents)
-    SETTINGS_WIFI_DPP_CONFIGURATOR = 1595;
-
-    // OPEN: WifiDppEnrolleeActivity (android.settings.WIFI_DPP_ENROLLEE_XXX action intents)
-    SETTINGS_WIFI_DPP_ENROLLEE = 1596;
-
-    // OPEN: Settings > Apps & Notifications -> Special app access -> Financial Apps Sms Access
-    SETTINGS_FINANCIAL_APPS_SMS_ACCESS = 1597;
-
-
-
-    // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
-    // > Do Not Disturb behavior
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ZEN_CUSTOM_RULE_SETTINGS = 1604;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
-    // > Do Not Disturb behavior > Custom
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ZEN_CUSTOM_RULE_SOUND_SETTINGS = 1605;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
-    // > Do Not Disturb behavior > Use default Do Not Disturb behavior
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ZEN_CUSTOM_RULE_DEFAULT_SETTINGS = 1606;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
-    // > Do Not Disturb behavior > Use default Do Not Disturb behavior
-    // > Notification restriction
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ZEN_CUSTOM_RULE_NOTIFICATION_RESTRICTIONS = 1608;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
-    // > Do Not Disturb behavior > Use default Do Not Disturb behavior
-    // > Notification restriction > Custom
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ZEN_CUSTOM_RULE_VIS_EFFECTS = 1609;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
-    // > Do Not Disturb behavior > Use default Do Not Disturb behavior
-    // > Notification restriction > Custom > Allow messages
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ZEN_CUSTOM_RULE_MESSAGES = 1610;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
-    // > Do Not Disturb behavior > Use default Do Not Disturb behavior
-    // > Notification restriction > Custom > Allow calls
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ZEN_CUSTOM_RULE_CALLS = 1611;
-
-    // OPEN: Settings > Sound > Do Not Disturb > Click footer link if custom settings applied
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ZEN_CUSTOM_SETTINGS_DIALOG = 1612;
-
-    // OPEN: Settings > Developer Options > Game Driver Preferences
-    // CATEGORY: SETTINGS
-    // OS: Q
-    SETTINGS_GAME_DRIVER_DASHBOARD = 1613;
-
-    // OPEN: Settings > Accessibility > Vibration > Ring vibration
-    // CATEGORY: SETTINGS
-    // OS: Q
-    ACCESSIBILITY_VIBRATION_RING = 1620;
-
-    // OPEN: Settings > System > Input & Gesture > Skip songs
-    SETTINGS_GESTURE_SKIP = 1624;
-
-    // OPEN: Settings > System > Input & Gesture > Silence alerts
-    SETTINGS_GESTURE_SILENCE = 1625;
-
-    // OPEN: Settings > System > Input & Gesture > Tap to check
-    SETTINGS_GESTURE_TAP_SCREEN = 1626;
-
-    // OPEN: Settings > Network & internet > Click Mobile network to land on a page with a list of
-    // SIM/eSIM subscriptions.
-    MOBILE_NETWORK_LIST = 1627;
-
-    // OPEN: Settings > Display > Adaptive sleep
-    // OS: Q
-    SETTINGS_ADAPTIVE_SLEEP = 1628;
-
-    // OPEN: Settings > System > Aware
-    SETTINGS_AWARE = 1632;
-
-    // OPEN: Settings > System > Aware > Disable > Dialog
-    DIALOG_AWARE_DISABLE = 1633;
-
-    // OPEN: Settings > Settings > Network & internet > Click Mobile network to land on page with
-    // details for a SIM/eSIM mobile network > Click edit icon to bring up a rename dialog.
-    // OS: Q
-    MOBILE_NETWORK_RENAME_DIALOG = 1642;
-
-    // OPEN: Set new password (android.app.action.SET_NEW_PASSWORD action intent)
-    // CATEGORY: SETTINGS
-    // OS: Q
-    SET_NEW_PASSWORD_ACTIVITY = 1644;
-
-    // Panel for Internet Connectivity
-    PANEL_INTERNET_CONNECTIVITY = 1654;
-
-    // Panel for Volume
-    PANEL_VOLUME = 1655;
-
-    // Panel for NFC
-    PANEL_NFC = 1656;
-
-    // Panel for Media Output
-    PANEL_MEDIA_OUTPUT = 1657;
-
-    // Mapping: go/at-mapping
-    PAGE_ATSSI = 1667;
-
-    PAGE_ATSII = 1668;
-
-    PAGE_ATUS = 1669;
-
-    PAGE_ATSSP = 1670;
-
-    PAGE_ATSAP = 1671;
-
-    PAGE_ATSCP = 1672;
-
-    PAGE_ATHNP = 1673;
-
-    // OPEN: Accessibility detail settings (android.settings.ACCESSIBILITY_DETAILS_SETTINGS intent)
-    ACCESSIBILITY_DETAILS_SETTINGS = 1682;
-
-    // Open: Settings will show the conditional when Grayscale mode is on
-    SETTINGS_CONDITION_GRAYSCALE_MODE = 1683;
-
-    // Panel for Wifi
-    PANEL_WIFI = 1687;
-
-    // Open: Settings > Special App Access > Do not disturb control for app
-    ZEN_ACCESS_DETAIL = 1692;
-
-    // OPEN: Settings > Face > Remove face
-    // OS: Q
-    DIALOG_FACE_REMOVE = 1693;
-
-    // Settings > Display > Theme
-    DARK_UI_SETTINGS = 1698;
-
-    // Settings > global bubble settings
-    BUBBLE_SETTINGS = 1699;
-
-    // Settings > app > bubble settings
-    APP_BUBBLE_SETTINGS = 1700;
-
-    // OPEN: Settings > System > Aware > Info dialog
-    DIALOG_AWARE_STATUS = 1701;
-
-    // Open: Settings > app > bubble settings > confirmation dialog
-    DIALOG_APP_BUBBLE_SETTINGS = 1702;
-
-    // OPEN: Settings > Pick SIM dialog
-    DIALOG_SIM_LIST = 1707;
-
-    // OPEN: Settings > Pick SIM (that supports calling) dialog
-    DIALOG_CALL_SIM_LIST = 1708;
-
-    // OPEN: Settings > Pick preferred SIM dialog
-    DIALOG_PREFERRED_SIM_PICKER = 1709;
-
-    // OPEN: Settings > Network & internet > Mobile network > Delete sim
-    DIALOG_DELETE_SIM_CONFIRMATION = 1713;
-
-    // OPEN: Settings >  Network & internet > Mobile network > Delete sim > (answer yes to
-    //       confirmation)
-    DIALOG_DELETE_SIM_PROGRESS = 1714;
-
-    // Settings > Apps and notifications > Notifications > Gentle notifications
-    GENTLE_NOTIFICATIONS_SCREEN = 1715;
-
-    // OPEN: Settings > System > Gestures > Global Actions Panel
-    // CATEGORY: SETTINGS
-    // OS: Q
-    GLOBAL_ACTIONS_PANEL_SETTINGS = 1728;
-
-    // OPEN: Settings > Display > Dark Theme
-    // CATEGORY: SETTINGS
-    // OS: Q
-    // Note: Only shows up on first time toggle
-    DIALOG_DARK_UI_INFO = 1740;
-
-    // OPEN: Settings > About phone > Legal information > Google Play system update licenses
-    // CATEGORY: SETTINGS
-    // OS: Q
-    MODULE_LICENSES_DASHBOARD = 1746;
-
-    // OPEN: Settings > System > Gestures > System navigation > Info icon
-    // CATEGORY: SETTINGS
-    // OS: Q
-    // Note: Info icon is visible only when gesture navigation is not available and disabled
-    SETTINGS_GESTURE_NAV_NOT_AVAILABLE_DLG = 1747;
-
-    // OPEN: Settings > System > Gestures > System navigation > Gear icon
-    // CATEGORY: SETTINGS
-    // OS: Q
-    // Note: Gear icon is shown next to gesture navigation preference and opens sensitivity dialog
-    SETTINGS_GESTURE_NAV_BACK_SENSITIVITY_DLG = 1748;
-
-    // OPEN: Settings > System > Aware > Aware Display
-    // CATEGORY: SETTINGS
-    // OS: Q
-    SETTINGS_AWARE_DISPLAY = 1750;
-
-    // OPEN: Settings > System > Input & Gesture > tap gesture
-    // CATEGORY: SETTINGS
-    // OS: Q
-    SETTINGS_GESTURE_TAP = 1751;
-    // ---- End Q Constants, all Q constants go above this line ----
-    // OPEN: Settings > Network & Internet > Wi-Fi > Click new network
-    // CATEGORY: SETTINGS
-    // OS: R
-    SETTINGS_WIFI_CONFIGURE_NETWORK = 1800;
-
-    // OPEN: Settings > Accessibility > Magnification
-    // CATEGORY: SETTINGS
-    // OS: R
-    // Note: Shows up only when Magnify with shortcut is enabled
-    // and under accessibility button mode.
-    DIALOG_TOGGLE_SCREEN_MAGNIFICATION_ACCESSIBILITY_BUTTON = 1801;
-
-    // OPEN: Settings > Accessibility > Magnification
-    // CATEGORY: SETTINGS
-    // OS: R
-    // Note: Shows up only when Magnify with shortcut is enabled.
-    // and under gesture navigation mode.
-    DIALOG_TOGGLE_SCREEN_MAGNIFICATION_GESTURE_NAVIGATION = 1802;
-
-    // OPEN: Settings > Security & screen lock -> Encryption & credentials > Install a certificate
-    // CATEGORY: SETTINGS
-    // OS: R
-    INSTALL_CERTIFICATE_FROM_STORAGE = 1803;
-
-    // OPEN: Settings > Apps and notifications > Special app access > notification access >
-    // an app
-    // CATEGORY: SETTINGS
-    // OS: R
-    NOTIFICATION_ACCESS_DETAIL = 1804;
-
-    // OPEN: Settings > Developer Options > Platform Compat
-    // CATEGORY: SETTINGS
-    // OS: R
-    SETTINGS_PLATFORM_COMPAT_DASHBOARD = 1805;
-
-    // OPEN: Settings > Location -> Work profile tab
-    // CATEGORY: SETTINGS
-    // OS: R
-    LOCATION_WORK = 1806;
-
-    // OPEN: Settings > Account -> Work profile tab
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACCOUNT_WORK = 1807;
-
-    // OPEN: Settings > Developer Options > Bug report handler
-    // CATEGORY: SETTINGS
-    // OS: R
-    SETTINGS_BUGREPORT_HANDLER = 1808;
-
-    // Panel for adding Wi-Fi networks
-    // CATEGORY: SETTINGS
-    // OS: R
-    PANEL_ADD_WIFI_NETWORKS = 1809;
-
-    // OPEN: Settings > Accessibility > Enable the feature or shortcut > Show tutorial dialog
-    // CATEGORY: SETTINGS
-    // OS: R
-    DIALOG_ACCESSIBILITY_TUTORIAL = 1810;
-
-    // OPEN: Settings > Accessibility > Edit shortcut dialog
-    // CATEGORY: SETTINGS
-    // OS: R
-    DIALOG_ACCESSIBILITY_SERVICE_EDIT_SHORTCUT = 1812;
-
-    // OPEN: Settings > Accessibility > Magnification > Edit shortcut dialog
-    // CATEGORY: SETTINGS
-    // OS: R
-    DIALOG_MAGNIFICATION_EDIT_SHORTCUT = 1813;
-
-    // OPEN: Settings > Accessibility > Color correction > Edit shortcut dialog
-    // CATEGORY: SETTINGS
-    // OS: R
-    DIALOG_DALTONIZER_EDIT_SHORTCUT = 1814;
-
-    // OPEN: Settings > Accessibility > Magnification > Settings
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACCESSIBILITY_MAGNIFICATION_SETTINGS = 1815;
-
-    // OPEN: Settings > Accessibility > Magnification > Settings > Magnification area dialog
-    // CATEGORY: SETTINGS
-    // OS: R
-    DIALOG_MAGNIFICATION_CAPABILITY = 1816;
-
-    // OPEN: Settings > Accessibility > Color inversion
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACCESSIBILITY_COLOR_INVERSION_SETTINGS = 1817;
-
-    // OPEN: Settings > Accessibility > Color inversion > Edit shortcut dialog
-    // CATEGORY: SETTINGS
-    // OS: R
-    DIALOG_COLOR_INVERSION_EDIT_SHORTCUT = 1818;
-
-    // OPEN: Settings > Accessibility > Captions preference > Captions appearance
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACCESSIBILITY_CAPTION_APPEARANCE = 1819;
-
-    // OPEN: Settings > Accessibility > Captions preference > More options
-    // CATEGORY: SETTINGS
-    // OS: R
-    ACCESSIBILITY_CAPTION_MORE_OPTIONS = 1820;
-
-    // OPEN: Settings > Battery > Battery share
-    // CATEGORY: SETTINGS
-    // OS: R
-    FUELGAUGE_BATTERY_SHARE = 1821;
-
-    // OPEN: Settings -> Apps & Notifications -> Special App Access
-    // CATEGORY: SETTINGS
-    // OS: R
-    MANAGE_EXTERNAL_STORAGE = 1822;
-
-    // Open: Settings > DND > People
-    // OS: R
-    DND_PEOPLE = 1823;
-
-    // OPEN: Settings > Apps and notifications > App info > one of any app > Open by default
-    //       > Open supported links
-    // CATEGORY: SETTINGS
-    // OS: R
-    OPEN_SUPPORTED_LINKS = 1824;
-
-    // OPEN: Settings > Display > Dark theme > Set start time dialog
-    DIALOG_DARK_THEME_SET_START_TIME = 1825;
-
-    // OPEN: Settings > Display > Dark theme > Set end time dialog
-    DIALOG_DARK_THEME_SET_END_TIME = 1826;
-
-    // OPEN: Settings -> Sound -> Vibrate for calls
-    // CATEGORY: SETTINGS
-    // OS: R
-    VIBRATE_FOR_CALLS = 1827;
-
-    // OPEN: Settings > Connected devices > Connection preferences > NFC
-    // CATEGORY: SETTINGS
-    // OS: R
-    CONNECTION_DEVICE_ADVANCED_NFC = 1828;
-
-    // OPEN: Settings -> Apps & Notifications -> Special App Access
-    INTERACT_ACROSS_PROFILES = 1829;
-
-    // OPEN: Settings > Notifications > (app or conversations) > conversation
-    NOTIFICATION_CONVERSATION_SETTINGS = 1830;
-
-    // OPEN: Settings > Developer Options > Wireless debugging
-    // CATEGORY: SETTINGS
-    // OS: R
-    SETTINGS_ADB_WIRELESS = 1831;
-
-    // OPEN: Settings > Developer Options > Wireless debugging
-    //   > Pair device with pairing code > Pairing code dialog
-    // CATEGORY: SETTINGS
-    // OS: R
-    ADB_WIRELESS_DEVICE_PAIRING_DIALOG = 1832;
-
-    // OPEN: Settings > Developer Options > Wireless debugging
-    //   > Pair device with QR code > Scan QR code > Pairing device dialog
-    // CATEGORY: SETTINGS
-    // OS: R
-    ADB_WIRELESS_DEVICE_QR_PAIRING_DIALOG = 1833;
-
-    // OPEN: Settings > apps & notifications > notifications > conversations
-    // CATEGORY: SETTINGS
-    // OS: R
-    NOTIFICATION_CONVERSATION_LIST_SETTINGS = 1834;
-
-    // Panel for Media Output Group operation
-    // CATEGORY: SETTINGS
-    // OS: R
-    PANEL_MEDIA_OUTPUT_GROUP = 1835;
-
-    // OPEN: Settings > Developer Options > Wireless debugging
-    //   > Click on paired device
-    // CATEGORY: SETTINGS
-    // OS: R
-    ADB_WIRELESS_DEVICE_DETAILS = 1836;
-
-    // Open: Settings > Sound > Do Not Disturb > People > Conversations
-    // OS: R
-    DND_CONVERSATIONS = 1837;
-
-    // Open: Settings > Sound > Do Not Disturb > People > Calls
-    // OS: R
-    DND_CALLS = 1838;
-
-    // Open: Settings > Sound > Do Not Disturb > People > Messages
-    // OS: R
-    DND_MESSAGES = 1839;
-
-    // Open: Settings > Sound > Do Not Disturb > Apps > <Choose App>
-    // OS: R
-    DND_APPS_BYPASSING = 1840;
-
-    // OPEN: Settings > Battery > Advanced battery option
-    // CATEGORY: SETTINGS
-    // OS: R
-    FUELGAUGE_ADVANCED_BATTERY_OPTION = 1842;
-
-    // OPEN: Settings > System > Gestures > Power menu
-    // CATEGORY: SETTINGS
-    // OS: R
-    POWER_MENU_SETTINGS = 1843;
-
-    // OPEN: Settings > System > Gestures > Power menu > Device controls
-    // CATEGORY: SETTINGS
-    // OS: R
-    DEVICE_CONTROLS_SETTINGS = 1844;
-
-    // OPEN: Settings > Sound > Media
-    // CATEGORY: SETTINGS
-    // OS: R
-    MEDIA_CONTROLS_SETTINGS = 1845;
-}
diff --git a/core/proto/android/app/tvsettings_enums.proto b/core/proto/android/app/tvsettings_enums.proto
deleted file mode 100644
index 31c5dd6..0000000
--- a/core/proto/android/app/tvsettings_enums.proto
+++ /dev/null
@@ -1,941 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app.tvsettings;
-option java_multiple_files = true;
-option java_outer_classname = "TvSettingsEnums";
-
-/** The performed action types */
-enum Action {
-
-    /**
-     * Denotes an unknown action. It is a filler that should generally be
-     * avoided.
-     */
-    ACTION_UNKNOWN = 0;
-
-    /**
-     * Denotes that a TvSettings page is being focused. (Previewing a page in
-     * two panel settings should NOT be considered as focusing on the page.)
-     */
-    PAGE_FOCUSED = 1;
-
-    /**
-     * Denotes that an entry (typically a leaf node of settings tree) is
-     * selected by a user.
-     */
-    ENTRY_SELECTED = 2;
-
-    /** Denotes that a toggle is clicked by a user. */
-    TOGGLE_INTERACTED = 3;
-
-    /**
-     * Denotes that a TvSettings page is being focused in the forward direction
-     * into the settings tree.
-     */
-    PAGE_FOCUSED_FORWARD = 4;
-
-    /**
-     * Denotes that a TvSettings page is being focused in the backward direction
-     * up the settings tree.
-     */
-    PAGE_FOCUSED_BACKWARD = 5;
-
-    /** Denotes that a toggle is turned on by a user. */
-    TOGGLED_ON = 6;
-
-    /** Denotes that a toggle is turned off by a user. */
-    TOGGLED_OFF = 7;
-
-}
-
-/**
- * Ids for TvSettings focusable pages or actionable entries
- *
- * For details of the scheme, please refer to the "Definition of item_id" and
- * "Evolve of item_id" sections in go/atv-settings-ww-logging-design.
- */
-enum ItemId {
-
-    option allow_alias = true;
-
-    // Filler that should be avoided
-    UNKNOWN = 0x00000000;
-
-    // TvSettings
-    TV_SETTINGS_ROOT = 0x00000001;
-
-    // TvSettings unknown/default classic page
-    PAGE_CLASSIC_DEFAULT = 0x00000002;
-
-    // TvSettings unknown/default slice page
-    PAGE_SLICE_DEFAULT = 0x00000003;
-
-    // TvSettings unknown/default entry
-    ENTRY_DEFAULT = 0x00000004;
-
-    // TvSettings > Suggested settings entry
-    SUGGESTED_SETTINGS = 0x00000010;
-
-    // TvSettings > Quick Settings
-    QUICK_SETTINGS = 0x00000011;
-
-    // VERSION 1: Starting with Q
-    // These are ordered in depth-first search manner.
-
-    // TvSettings > Network & Internet
-    NETWORK = 0x11000000;
-
-    // TvSettings > Network & Internet > Wi-Fi (toggle)
-    NETWORK_WIFI_ON_OFF = 0x11100000;
-
-    // TvSettings > Network & Internet >
-    // [A connected network entry in available networks list]
-    NETWORK_AP_INFO = 0x11200000;
-
-    // TvSettings > Network & Internet >
-    // [A connected network entry in available networks list] > Proxy settings
-    NETWORK_AP_INFO_PROXY_SETTINGS = 0x11210000;
-
-    // TvSettings > Network & Internet >
-    // [A connected network entry in available networks list] > IP settings
-    NETWORK_AP_INFO_IP_SETTINGS = 0x11220000;
-
-    // TvSettings > Network & Internet >
-    // [A connected network entry in available networks list] > Forget network
-    NETWORK_AP_INFO_FORGET_NETWORK = 0x11230000;
-
-    // TvSettings > Network & Internet >
-    // [A not connected network entry in available networks list]
-    NETWORK_NOT_CONNECTED_AP = 0x11300000;
-
-    // TvSettings > Network & Internet > See all
-    NETWORK_SEE_ALL = 0x11400000;
-
-    // TvSettings > Network & Internet > See fewer
-    NETWORK_SEE_FEWER = 0x11500000;
-
-    // TvSettings > Network & Internet > Add new network
-    NETWORK_ADD_NEW_NETWORK = 0x11600000;
-
-    // TvSettings > Network & Internet > Scanning always available (toggle)
-    NETWORK_ALWAYS_SCANNING_NETWORKS = 0x11700000;
-
-    // TvSettings > Network & Internet > Proxy settings (in Ethernet category)
-    NETWORK_ETHERNET_PROXY_SETTINGS = 0x11800000;
-
-    // TvSettings > Network & Internet > IP settings (in Ethernet category)
-    NETWORK_ETHERNET_IP_SETTINGS = 0x11900000;
-
-    // TvSettings > Account & Sign In (Slice)
-    ACCOUNT_SLICE = 0x12000000;
-
-    // TvSettings > Account & Sign In (Slice) > [A regular account]
-    ACCOUNT_SLICE_REG_ACCOUNT = 0x12100000;
-
-    // TvSettings > Account & Sign In (Slice) > [A regular account] >
-    // Google Assistant
-    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT = 0x12130000;
-
-    // TvSettings > Account & Sign In (Slice) > [A regular account] >
-    // Google Assistant > SafeSearch filter (toggle)
-    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SAFE_SEARCH = 0x12131000;
-
-    // TvSettings > Account & Sign In (Slice) > [A regular account] >
-    // Google Assistant > Block offensive words (toggle)
-    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_BLOCK_OFFENSIVE = 0x12132000;
-
-    // TvSettings > Account & Sign In (Slice) > [A regular account] >
-    // Google Assistant > Searchable apps
-    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SEARCHABLE_APPS = 0x12133000;
-
-    // TvSettings > Account & Sign In (Slice) > [A regular account] >
-    // Google Assistant > Personal results (toggle)
-    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_PERSONAL_RESULTS = 0x12134000;
-
-    // Reserving [0x12140000, 0x12190000] for possible future settings
-
-    // TvSettings > Account & Sign In (Slice) > [A regular account] > Remove
-    ACCOUNT_SLICE_REG_ACCOUNT_REMOVE = 0x121A0000;
-
-    // Reserving [0x12200000, 0x12900000] for possible future settings
-
-    // TvSettings > Account & Sign In (Slice) > Add account...
-    ACCOUNT_SLICE_ADD_ACCOUNT = 0x12A00000;
-
-    // TvSettings > Account & Sign In (Classic)
-    ACCOUNT_CLASSIC = 0x13000000;
-
-    // TvSettings > Account & Sign In (Classic) > [A regular account]
-    ACCOUNT_CLASSIC_REG_ACCOUNT = 0x13100000;
-
-    // TvSettings > Account & Sign In (Classic) > [A regular account] > Sync now
-    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_NOW = 0x13110000;
-
-    // TvSettings > Account & Sign In (Classic) > [A regular account] >
-    // Remove account
-    ACCOUNT_CLASSIC_REG_ACCOUNT_REMOVE_ACCOUNT = 0x13120000;
-
-    // TvSettings > Account & Sign In (Classic) > [A regular account] >
-    // [Choose synced apps] Calendar (toggle)
-    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_CALENDAR = 0x13130000;
-
-    // TvSettings > Account & Sign In (Classic) > [A regular account] >
-    // [Choose synced apps] Contacts (toggle)
-    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_CONTACTS = 0x13140000;
-
-    // TvSettings > Account & Sign In (Classic) > [A regular account] >
-    // [Choose synced apps] Google Play Movies & TV (toggle)
-    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_GPMT = 0x13150000;
-
-    // TvSettings > Account & Sign In (Classic) > [A regular account] >
-    // [Choose synced apps] Google Play Music (toggle)
-    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_GPM = 0x13160000;
-
-    // TvSettings > Account & Sign In (Classic) > [A regular account] >
-    // [Choose synced apps] People details (toggle)
-    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_PEOPLE = 0x13170000;
-
-    // Reserving [0x13200000, 0x13900000] for possible future settings
-
-    // TvSettings > Account & Sign In (Classic) > Add account
-    ACCOUNT_CLASSIC_ADD_ACCOUNT = 0x13A00000;
-
-    // TvSettings > Display & Sound
-    DISPLAY_SOUND = 0x15000000;
-
-    // TvSettings > Display & Sound > Advanced display settings
-    DISPLAY_SOUND_ADVANCED_DISPLAY = 0x15100000;
-
-    // TvSettings > Display & Sound > Advanced display settings >
-    // Allow game mode (toggle)
-    DISPLAY_SOUND_ADVANCED_DISPLAY_GAME_MODE = 0x15110000;
-
-    // TvSettings > Display & Sound > System sounds (toggle)
-    DISPLAY_SOUND_SYSTEM_SOUNDS = 0x15200000;
-
-    // TvSettings > Display & Sound > Advanced sound settings
-    DISPLAY_SOUND_ADVANCED_SOUNDS = 0x15300000;
-
-    // TvSettings > Display & Sound > Advanced sound settings > Select formats
-    DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS = 0x15310000;
-
-    // TvSettings > Display & Sound > Advanced sound settings > Select formats >
-    // Auto...
-    DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_AUTO = 0x15311000;
-
-    // TvSettings > Display & Sound > Advanced sound settings > Select formats >
-    // None...
-    DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_NONE = 0x15312000;
-
-    // TvSettings > Display & Sound > Advanced sound settings > Select formats >
-    // Manual...
-    DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_MANUAL = 0x15313000;
-
-    // TvSettings > Display & Sound > Advanced sound settings >
-    // Dolby AC-4 (toggle)
-    DISPLAY_SOUND_ADVANCED_SOUNDS_DAC4 = 0x15320000;
-
-    // TvSettings > Display & Sound > Advanced sound settings >
-    // Dolby Atmos in Dolby Digital Plus (toggle)
-    DISPLAY_SOUND_ADVANCED_SOUNDS_DADDP = 0x15330000;
-
-    // TvSettings > Display & Sound > Advanced sound settings >
-    // Dolby Digital (toggle)
-    DISPLAY_SOUND_ADVANCED_SOUNDS_DD = 0x15340000;
-
-    // TvSettings > Display & Sound > Advanced sound settings >
-    // Dolby Digital Plus (toggle)
-    DISPLAY_SOUND_ADVANCED_SOUNDS_DDP = 0x15350000;
-
-    // TvSettings > Display & Sound > Advanced sound settings > DTS (toggle)
-    DISPLAY_SOUND_ADVANCED_SOUNDS_DTS = 0x15360000;
-
-    // TvSettings > Display & Sound > Advanced sound settings > DTS-HD (toggle)
-    DISPLAY_SOUND_ADVANCED_SOUNDS_DTSHD = 0x15370000;
-
-    // TvSettings > Display & Sound > Advanced sound settings > AAC (toggle)
-    DISPLAY_SOUND_ADVANCED_SOUNDS_AAC = 0x15380000;
-
-    // TvSettings > Display & Sound > Advanced sound settings >
-    // Dolby TrueHD (toggle)
-    DISPLAY_SOUND_ADVANCED_SOUNDS_DTHD = 0x15390000;
-
-    // TvSettings > Apps
-    APPS = 0x16000000;
-
-    // TvSettings > Apps > See all apps
-    APPS_ALL_APPS = 0x16100000;
-
-    // TvSettings > Apps > See all apps > [An app entry]
-    APPS_ALL_APPS_APP_ENTRY = 0x16110000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Open
-    APPS_ALL_APPS_APP_ENTRY_OPEN = 0x16111000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Force stop
-    APPS_ALL_APPS_APP_ENTRY_FORCE_STOP = 0x16112000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Uninstall
-    APPS_ALL_APPS_APP_ENTRY_UNINSTALL = 0x16113000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Uninstall updates
-    APPS_ALL_APPS_APP_ENTRY_UNINSTALL_UPDATES = 0x16114000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Disable
-    APPS_ALL_APPS_APP_ENTRY_DISABLE = 0x16115000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Clear data
-    APPS_ALL_APPS_APP_ENTRY_CLEAR_DATA = 0x16116000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Clear cache
-    APPS_ALL_APPS_APP_ENTRY_CLEAR_CACHE = 0x16117000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Clear defaults
-    APPS_ALL_APPS_APP_ENTRY_CLEAR_DEFAULTS = 0x16118000;
-
-    // TvSettings > Apps > See all apps > [An app entry] >
-    // Notifications (toggle)
-    APPS_ALL_APPS_APP_ENTRY_NOTIFICATIONS = 0x16119000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Permissions
-    APPS_ALL_APPS_APP_ENTRY_PERMISSIONS = 0x1611A000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Enable
-    APPS_ALL_APPS_APP_ENTRY_ENABLE = 0x1611B000;
-
-    // TvSettings > Apps > See all apps > [An app entry] > Open source licenses
-    APPS_ALL_APPS_APP_ENTRY_LICENSES = 0x1611C000;
-
-    // TvSettings > Apps > See all apps > Show system apps
-    APPS_ALL_APPS_SHOW_SYSTEM_APPS = 0x16120000;
-
-    // TvSettings > Apps > App permissions
-    APPS_APP_PERMISSIONS = 0x16200000;
-
-    // TvSettings > Apps > App permission > Body sensors
-    APPS_APP_PERMISSIONS_BODY_SENSORS = 0x16210000;
-
-    // TvSettings > Apps > App permission > Calendar
-    APPS_APP_PERMISSIONS_CALENDAR = 0x16220000;
-
-    // TvSettings > Apps > App permission > Call logs
-    APPS_APP_PERMISSIONS_CALL_LOGS = 0x16230000;
-
-    // TvSettings > Apps > App permission > Camera
-    APPS_APP_PERMISSIONS_CAMERA = 0x16240000;
-
-    // TvSettings > Apps > App permission > Contacts
-    APPS_APP_PERMISSIONS_CONTACTS = 0x16250000;
-
-    // TvSettings > Apps > App permission > Location
-    APPS_APP_PERMISSIONS_LOCATION = 0x16260000;
-
-    // TvSettings > Apps > App permission > Microphone
-    APPS_APP_PERMISSIONS_MICROPHONE = 0x16270000;
-
-    // TvSettings > Apps > App permission > Phone
-    APPS_APP_PERMISSIONS_PHONE = 0x16280000;
-
-    // TvSettings > Apps > App permission > Physical activity
-    APPS_APP_PERMISSIONS_PHYSICAL_ACTIVITY = 0x16290000;
-
-    // TvSettings > Apps > App permission > SMS
-    APPS_APP_PERMISSIONS_SMS = 0x162A0000;
-
-    // TvSettings > Apps > App permission > Storage
-    APPS_APP_PERMISSIONS_STORAGE = 0x162B0000;
-
-    // TvSettings > Apps > App permission > Additional permissions
-    APPS_APP_PERMISSIONS_ADDITIONAL = 0x162C0000;
-
-    // TvSettings > Apps > App permission > Additional permissions >
-    // real all TV listings
-    APPS_APP_PERMISSIONS_ADDITIONAL_READ_TV_LISTINGS = 0x162C1000;
-
-    // TvSettings > Apps > App permission > Additional permissions >
-    // real instant messages
-    APPS_APP_PERMISSIONS_ADDITIONAL_READ_INSTANT_MESSAGES = 0x162C2000;
-
-    // TvSettings > Apps > App permission > Additional permissions >
-    // write instant messages
-    APPS_APP_PERMISSIONS_ADDITIONAL_WRITE_INSTANT_MESSAGES = 0x162C3000;
-
-    // TvSettings > Apps > Special app access
-    APPS_SPECIAL_APP_ACCESS = 0x16300000;
-
-    // TvSettings > Apps > Special app access > Energy optimization
-    APPS_SPECIAL_APP_ACCESS_ENERGY_OPTIMIZATION = 0x16310000;
-
-    // TvSettings > Apps > Special app access > Usage access
-    APPS_SPECIAL_APP_ACCESS_USAGE_ACCESS = 0x16320000;
-
-    // TvSettings > Apps > Special app access > Notification access
-    APPS_SPECIAL_APP_ACCESS_NOTIFICATION_ACCESS = 0x16330000;
-
-    // TvSettings > Apps > Special app access > Display over other apps
-    APPS_SPECIAL_APP_ACCESS_DISPLAY_OVER_OTHERS = 0x16340000;
-
-    // TvSettings > Apps > Special app access > Modify system settings
-    APPS_SPECIAL_APP_ACCESS_MODIFY_SYSTEM_SETTINGS = 0x16350000;
-
-    // TvSettings > Apps > Special app access > Picture-in-picture
-    APPS_SPECIAL_APP_ACCESS_PICTURE_IN_PICTURE = 0x16360000;
-
-    // TvSettings > Apps > Security & restrictions
-    APPS_SECURITY_RESTRICTIONS = 0x16400000;
-
-    // TvSettings > Apps > Security & restrictions > Unknown sources
-    APPS_SECURITY_RESTRICTIONS_UNKNOWN_SOURCES = 0x16410000;
-
-    // TvSettings > Apps > Security & restrictions > Verify apps (toggle)
-    APPS_SECURITY_RESTRICTIONS_VERIFY_APPS = 0x16420000;
-
-    // TvSettings > Apps > Security & restrictions > Create restricted profile
-    APPS_SECURITY_RESTRICTIONS_CREATE_PROFILE = 0x16430000;
-
-    // TvSettings > Apps > Security & restrictions > Enter restricted profile
-    APPS_SECURITY_RESTRICTIONS_ENTER_PROFILE = 0x16440000;
-
-    // TvSettings > Apps > Security & restrictions >
-    // Allowed apps (Restricted Profile)
-    APPS_SECURITY_RESTRICTIONS_PROFILE_ALLOWED_APPS = 0x16450000;
-
-    // TvSettings > Apps > Security & restrictions >
-    // Change pin (Restricted Profile)
-    APPS_SECURITY_RESTRICTIONS_PROFILE_CHANGE_PIN = 0x16460000;
-
-    // TvSettings > Apps > Security & restrictions >
-    // Delete restricted profile
-    APPS_SECURITY_RESTRICTIONS_DELETE_PROFILE = 0x16470000;
-
-    // TvSettings > Apps > Security & restrictions >
-    // Exit restricted profile
-    APPS_SECURITY_RESTRICTIONS_EXIT_PROFILE = 0x16480000;
-
-    // TvSettings > System (same as TvSettings > Device Preferences)
-    SYSTEM = 0x17000000;
-
-    // TvSettings > System > About
-    SYSTEM_ABOUT = 0x17100000;
-
-    // TvSettings > System > System update
-    SYSTEM_ABOUT_SYSTEM_UPDATE = 0x17110000;
-
-    // TvSettings > System > Device name
-    SYSTEM_ABOUT_DEVICE_NAME = 0x17120000;
-
-    // TvSettings > System > Factory reset
-    SYSTEM_ABOUT_FACTORY_RESET = 0x17130000;
-
-    // TvSettings > System > Status
-    SYSTEM_ABOUT_STATUS = 0x17140000;
-
-    // TvSettings > System > Legal information
-    SYSTEM_ABOUT_LEGAL_INFO = 0x17150000;
-
-    // TvSettings > System > Legal information > Open source licenses
-    SYSTEM_ABOUT_LEGAL_INFO_OPEN_SOURCE = 0x17151000;
-
-    // TvSettings > System > Legal information > Google legal
-    SYSTEM_ABOUT_LEGAL_INFO_GOOGLE_LEGAL = 0x17152000;
-
-    // TvSettings > System > Legal information > System WebView licenses
-    SYSTEM_ABOUT_LEGAL_INFO_SYSTEM_WEBVIEW = 0x17153000;
-
-    // TvSettings > System > Build
-    SYSTEM_ABOUT_BUILD = 0x17160000;
-
-    // TvSettings > System > Date & time
-    SYSTEM_DATE_TIME = 0x17200000;
-
-    // TvSettings > System > Date & time > Automatic data & time
-    SYSTEM_DATE_TIME_AUTOMATIC = 0x17210000;
-
-    // TvSettings > System > Date & time > Automatic data & time >
-    // Use network-provided time
-    SYSTEM_DATE_TIME_AUTOMATIC_USE_NETWORK_TIME = 0x17211000;
-
-    // TvSettings > System > Date & time > Automatic data & time > Off
-    SYSTEM_DATE_TIME_AUTOMATIC_OFF = 0x17212000;
-
-    // TvSettings > System > Date & time > Set date
-    SYSTEM_DATE_TIME_SET_DATE = 0x17220000;
-
-    // TvSettings > System > Date & time > Set time
-    SYSTEM_DATE_TIME_SET_TIME = 0x17230000;
-
-    // TvSettings > System > Date & time > Set time zone
-    SYSTEM_DATE_TIME_SET_TIME_ZONE = 0x17240000;
-
-    // TvSettings > System > Date & time > Set time zone > [A time zone button]
-    SYSTEM_DATE_TIME_SET_TIME_ZONE_BUTTON = 0x17241000;
-
-    // TvSettings > System > Date & time > Use 24-hour format (toggle)
-    SYSTEM_DATE_TIME_USE_24_HOUR_FORMAT = 0x17250000;
-
-    // TvSettings > System > Language
-    SYSTEM_LANGUAGE = 0x17300000;
-
-    // TvSettings > System > Language > [A language button]
-    SYSTEM_LANGUAGE_BUTTON = 0x17310000;
-
-    // TvSettings > System > Keyboard
-    SYSTEM_KEYBOARD = 0x17400000;
-
-    // TvSettings > System > Keyboard > Current keyboard
-    SYSTEM_KEYBOARD_CURRENT_KEYBOARD = 0x17410000;
-
-    // TvSettings > System > Keyboard > Gboard Settings
-    SYSTEM_KEYBOARD_GBOARD_SETTINGS = 0x17420000;
-
-    // TvSettings > System > Keyboard > Gboard Settings > Languages
-    SYSTEM_KEYBOARD_GBOARD_SETTINGS_LANGUAGES = 0x17421000;
-
-    // TvSettings > System > Keyboard > Gboard Settings > Terms of services
-    SYSTEM_KEYBOARD_GBOARD_SETTINGS_TOS = 0x17422000;
-
-    // TvSettings > System > Keyboard > Gboard Settings > Privacy policy
-    SYSTEM_KEYBOARD_GBOARD_SETTINGS_PRIVACY_POLICY = 0x17423000;
-
-    // TvSettings > System > Keyboard > Gboard Settings > Open source licenses
-    SYSTEM_KEYBOARD_GBOARD_SETTINGS_OPEN_SOURCE = 0x17424000;
-
-    // TvSettings > System > Keyboard > Gboard Settings >
-    // Share usage statistics (toggle)
-    SYSTEM_KEYBOARD_GBOARD_SETTINGS_SHARE_USAGE_STATS = 0x17425000;
-
-    // TvSettings > System > Keyboard > Manage keyboards
-    SYSTEM_KEYBOARD_MANAGE_KEYBOARDS = 0x17430000;
-
-    // TvSettings > System > Storage
-    SYSTEM_STORAGE = 0x17500000;
-
-    // TvSettings > System > Internal shared storage
-    SYSTEM_STORAGE_INTERNAL_STORAGE = 0x17510000;
-
-    // TvSettings > System > Internal shared storage > Apps
-    SYSTEM_STORAGE_INTERNAL_STORAGE_APPS = 0x17511000;
-
-    // TvSettings > System > Internal shared storage >
-    // Cached data (brings up "Clear cached data?" dialog upon click)
-    SYSTEM_STORAGE_INTERNAL_STORAGE_CACHED = 0x17512000;
-
-    // TvSettings > System > Energy saver
-    SYSTEM_ENERGYSAVER = 0x17700000;
-
-    // TvSettings > System > Energy saver > Turn off display after
-    SYSTEM_ENERGYSAVER_START_DELAY = 0x17710000;
-
-    // TvSettings > System > Energy saver > Turn off display after > 15 minutes
-    SYSTEM_ENERGYSAVER_START_DELAY_15M = 0x17711000;
-
-    // TvSettings > System > Energy saver > Turn off display after > 30 minutes
-    SYSTEM_ENERGYSAVER_START_DELAY_30M = 0x17712000;
-
-    // TvSettings > System > Energy saver > Turn off display after > 1 hour
-    SYSTEM_ENERGYSAVER_START_DELAY_1H = 0x17713000;
-
-    // TvSettings > System > Energy saver > Turn off display after > 3 hours
-    SYSTEM_ENERGYSAVER_START_DELAY_3H = 0x17714000;
-
-    // TvSettings > System > Energy saver > Turn off display after > 6 hours
-    SYSTEM_ENERGYSAVER_START_DELAY_6H = 0x17715000;
-
-    // TvSettings > System > Energy saver > Turn off display after > 12 hours
-    SYSTEM_ENERGYSAVER_START_DELAY_12H = 0x17716000;
-
-    // TvSettings > System > Energy saver > Turn off display after > Never
-    SYSTEM_ENERGYSAVER_START_DELAY_NEVER = 0x17717000;
-
-    // TvSettings > System > Accessibility
-    SYSTEM_A11Y = 0x17800000;
-
-    // TvSettings > System > Accessibility > Captions
-    SYSTEM_A11Y_CAPTIONS = 0x17810000;
-
-    // TvSettings > System > Accessibility > Captions > Display (toggle)
-    SYSTEM_A11Y_CAPTIONS_DISPLAY_ON_OFF = 0x17811000;
-
-    // TvSettings > System > Accessibility > Captions > Language
-    SYSTEM_A11Y_CAPTIONS_LANGUAGE = 0x17812000;
-
-    // TvSettings > System > Accessibility > Captions > Language > [A language]
-    SYSTEM_A11Y_CAPTIONS_LANGUAGE_BUTTON = 0x17812100;
-
-    // TvSettings > System > Accessibility > Captions > Text size
-    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE = 0x17813000;
-
-    // TvSettings > System > Accessibility > Captions > Text size > Very small
-    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_VERY_SMALL = 0x17813100;
-
-    // TvSettings > System > Accessibility > Captions > Text size > Small
-    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_SMALL = 0x17813200;
-
-    // TvSettings > System > Accessibility > Captions > Text size > Normal
-    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_NORMAL = 0x17813300;
-
-    // TvSettings > System > Accessibility > Captions > Text size > Large
-    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_LARGE = 0x17813400;
-
-    // TvSettings > System > Accessibility > Captions > Text size > Very large
-    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_VERY_LARGE = 0x17813500;
-
-    // TvSettings > System > Accessibility > Captions >
-    // White on black (radio button)
-    SYSTEM_A11Y_CAPTIONS_WHITE_ON_BLACK = 0x17814000;
-
-    // TvSettings > System > Accessibility > Captions >
-    // Black on white (radio button)
-    SYSTEM_A11Y_CAPTIONS_BLACK_ON_WHITE = 0x17815000;
-
-    // TvSettings > System > Accessibility > Captions >
-    // Yellow on black (radio button)
-    SYSTEM_A11Y_CAPTIONS_YELLOW_ON_BLACK = 0x17816000;
-
-    // TvSettings > System > Accessibility > Captions >
-    // Yellow on blue (radio button)
-    SYSTEM_A11Y_CAPTIONS_YELLOW_ON_BLUE = 0x17817000;
-
-    // TvSettings > System > Accessibility > Captions > Custom
-    SYSTEM_A11Y_CAPTIONS_CUSTOM = 0x17818000;
-
-    // TvSettings > System > Accessibility > Captions > Custom > Font family
-    SYSTEM_A11Y_CAPTIONS_CUSTOM_FONT = 0x17818100;
-
-    // TvSettings > System > Accessibility > Captions > Custom > Text color
-    SYSTEM_A11Y_CAPTIONS_CUSTOM_TEXT_COLOR = 0x17818200;
-
-    // TvSettings > System > Accessibility > Captions > Custom > Text opacity
-    SYSTEM_A11Y_CAPTIONS_CUSTOM_TEXT_OPACITY = 0x17818300;
-
-    // TvSettings > System > Accessibility > Captions > Custom > Edge type
-    SYSTEM_A11Y_CAPTIONS_CUSTOM_EDGE_TYPE = 0x17818400;
-
-    // TvSettings > System > Accessibility > Captions > Custom > Edge color
-    SYSTEM_A11Y_CAPTIONS_CUSTOM_EDGE_COLOR = 0x17818500;
-
-    // TvSettings > System > Accessibility > Captions > Custom >
-    // Show background (toggle)
-    SYSTEM_A11Y_CAPTIONS_SHOW_BACKGROUND = 0x17818600;
-
-    // TvSettings > System > Accessibility > Captions > Custom >
-    // Background color
-    SYSTEM_A11Y_CAPTIONS_BACKGROUND_COLOR = 0x17818700;
-
-    // TvSettings > System > Accessibility > Captions > Custom >
-    // Background opacity
-    SYSTEM_A11Y_CAPTIONS_BACKGROUND_OPACITY = 0x17818800;
-
-    // TvSettings > System > Accessibility > Captions > Custom >
-    // Show window (toggle)
-    SYSTEM_A11Y_CAPTIONS_SHOW_WINDOW = 0x17818900;
-
-    // TvSettings > System > Accessibility > Captions > Custom > Window color
-    SYSTEM_A11Y_CAPTIONS_WINDOW_COLOR = 0x17818A00;
-
-    // TvSettings > System > Accessibility > Captions > Custom > Window opacity
-    SYSTEM_A11Y_CAPTIONS_WINDOW_OPACITY = 0x17818B00;
-
-    // TvSettings > System > Accessibility > High contrast text (toggle)
-    SYSTEM_A11Y_HIGH_CONTRAST_TEXT = 0x17820000;
-
-    // TvSettings > System > Accessibility > Text to speech
-    SYSTEM_A11Y_TTS = 0x17830000;
-
-    // TvSettings > System > Accessibility > Text to speech > [Select an engine]
-    SYSTEM_A11Y_TTS_ENGINE_SELECT = 0x17831000;
-
-    // TvSettings > System > Accessibility > Text to speech >
-    // Engine configuration
-    SYSTEM_A11Y_TTS_ENGINE_CONFIG = 0x17832000;
-
-    // TvSettings > System > Accessibility > Text to speech >
-    // Engine configuration > Language
-    SYSTEM_A11Y_TTS_ENGINE_CONFIG_LANGUAGE = 0x17832100;
-
-    // TvSettings > System > Accessibility > Text to speech >
-    // Engine configuration > Language > Button
-    SYSTEM_A11Y_TTS_ENGINE_CONFIG_LANGUAGE_CHOOSE_LANGUAGE = 0x17832110;
-
-    // TvSettings > System > Accessibility > Text to speech >
-    // Engine configuration > Settings for Google Text-to-speech Engine
-    SYSTEM_A11Y_TTS_ENGINE_CONFIG_SETTINGS_GTTS_ENGINE = 0x17832200;
-
-    // TvSettings > System > Accessibility > Text to speech >
-    // Engine configuration > Install voice data
-    SYSTEM_A11Y_TTS_ENGINE_CONFIG_INSTALL_VOICE_DATA = 0x17832300;
-
-    // TvSettings > System > Accessibility > Text to speech > Speech rate
-    SYSTEM_A11Y_TTS_SPEECH_RATE = 0x17833000;
-
-    // TvSettings > System > Accessibility > Text to speech >
-    // Listen to an example
-    SYSTEM_A11Y_TTS_LISTEN_EXAMPLE = 0x17834000;
-
-    // TvSettings > System > Accessibility > Accessibility shortcut
-    SYSTEM_A11Y_SHORTCUT = 0x17840000;
-
-    // TvSettings > System > Accessibility > Accessibility shortcut >
-    // Enable (toggle)
-    SYSTEM_A11Y_SHORTCUT_ON_OFF = 0x17841000;
-
-    // TvSettings > System > Accessibility > Accessibility shortcut >
-    // Shortcut services
-    SYSTEM_A11Y_SHORTCUT_SERVICE = 0x17842000;
-
-    // TvSettings > System > Accessibility > TalkBack
-    SYSTEM_A11Y_TALKBACK = 0x17850000;
-
-    // TvSettings > System > Accessibility > TalkBack > Enable (toggle)
-    SYSTEM_A11Y_TALKBACK_ON_OFF = 0x17851000;
-
-    // TvSettings > System > Accessibility > TalkBack > Configuration
-    SYSTEM_A11Y_TALKBACK_CONFIG = 0x17852000;
-
-    // TvSettings > System > Accessibility > Accessibility Menu
-    SYSTEM_A11Y_A11Y_MENU = 0x17860000;
-
-    // TvSettings > System > Accessibility > Accessibility Menu >
-    // Enable (toggle)
-    SYSTEM_A11Y_A11Y_MENU_ON_OFF = 0x17861000;
-
-    // TvSettings > System > Accessibility > Accessibility Menu > Configuration
-    SYSTEM_A11Y_A11Y_MENU_CONFIG = 0x17862000;
-
-    // TvSettings > System > Accessibility > Select to Speak
-    SYSTEM_A11Y_STS = 0x17870000;
-
-    // TvSettings > System > Accessibility > Select to Speak > Enable (toggle)
-    SYSTEM_A11Y_STS_ON_OFF = 0x17871000;
-
-    // TvSettings > System > Accessibility > Select to Speak > Configuration
-    SYSTEM_A11Y_STS_CONFIG = 0x17872000;
-
-    // TvSettings > System > Accessibility > Switch Access
-    SYSTEM_A11Y_SWITCH_ACCESS = 0x17880000;
-
-    // TvSettings > System > Accessibility > Switch Access > Enable (Toggle)
-    SYSTEM_A11Y_SWITCH_ACCESS_ON_OFF = 0x17881000;
-
-    // TvSettings > System > Accessibility > Switch Access > Configuration
-    SYSTEM_A11Y_SWITCH_ACCESS_CONFIG = 0x17882000;
-
-    // TvSettings > System > Reboot
-    SYSTEM_REBOOT = 0x17900000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings)
-    PREFERENCES_HOME_SCREEN = 0x17A00000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Customize channels
-    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS = 0x17A10000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Customize channels > Play Next
-    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN = 0x17A11000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Customize channels > Play Next > On (toggle)
-    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_ON_OFF = 0x17A11100;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Customize channels > Play Next > Google Play Movies & TV (toggle)
-    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_GPMT = 0x17A11200;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Customize channels > Play Next > Google Play Music (toggle)
-    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_GPM = 0x17A11300;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Customize channels > Play Next > Promotional channels (toggle)
-    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_PROMOTIONAL = 0x17A11400;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Customize channels > Home screen channels
-    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_HOME_SCREEN = 0x17A12000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Customize channels > Promotional channels
-    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PROMOTIONAL = 0x17A13000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Enable video previews (toggle)
-    PREFERENCES_HOME_SCREEN_VIDEO_PREVIEWS = 0x17A20000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Enable audio previews (toggle)
-    PREFERENCES_HOME_SCREEN_AUDIO_PREVIEWS = 0x17A30000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Reorder apps
-    PREFERENCES_HOME_SCREEN_REORDER_APPS = 0x17A40000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Reorder games
-    PREFERENCES_HOME_SCREEN_REORDER_GAMES = 0x17A50000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Android TV Home open source licenses
-    PREFERENCES_HOME_SCREEN_ATVH_OPEN_SOURCE = 0x17A60000;
-
-    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
-    // Android TV Core Services open source licenses
-    PREFERENCES_HOME_SCREEN_ATVCS_OPEN_SOURCE = 0x17A70000;
-
-    // TvSettings > Device Preferences > Google Assistant
-    PREFERENCES_ASSISTANT = 0x17B00000;
-
-    // TvSettings > Device Preferences > Google Assistant > Accounts
-    PREFERENCES_ASSISTANT_ACCOUNTS = 0x17B10000;
-
-    // TvSettings > Device Preferences > Google Assistant > Accept permissions
-    PREFERENCES_ASSISTANT_ACCEPT_PERMISSIONS = 0x17B20000;
-
-    // TvSettings > Device Preferences > Google Assistant > View permissions
-    PREFERENCES_ASSISTANT_VIEW_PERMISSIONS = 0x17B30000;
-
-    // TvSettings > Device Preferences > Google Assistant > Searchable apps
-    // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SEARCHABLE_APPS)
-    PREFERENCES_ASSISTANT_SEARCHABLE_APPS = 0x12133000;
-
-    // TvSettings > Device Preferences > Google Assistant > SafeSearch filter
-    // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SAFE_SEARCH)
-    PREFERENCES_ASSISTANT_SAFESEARCH_FILTER = 0x12131000;
-
-    // TvSettings > Device Preferences > Google Assistant >
-    // Block offensive words
-    // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_BLOCK_OFFENSIVE)
-    PREFERENCES_ASSISTANT_BLOCK_OFFENSIVE = 0x12132000;
-
-    // TvSettings > Device Preferences > Google Assistant > Open source licenses
-    PREFERENCES_ASSISTANT_OPEN_SOURCE = 0x17B40000;
-
-    // TvSettings > Device Preferences > Chromecast Android Shell
-    PREFERENCES_CHROMECAST_SHELL = 0x17C00000;
-
-    // TvSettings > Device Preferences > Chromecast Android Shell >
-    // Open source licenses
-    PREFERENCES_CHROMECAST_SHELL_OPEN_SOURCE = 0x17C10000;
-
-    // TvSettings > Device Preferences > Screen saver
-    PREFERENCES_SCREENSAVER = 0x17D00000;
-
-    // TvSettings > Device Preferences > Screen saver > Screen saver (chooser)
-    PREFERENCES_SCREENSAVER_CHOOSER = 0x17D10000;
-
-    // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
-    // Turn screen off
-    PREFERENCES_SCREENSAVER_CHOOSER_SCREEN_OFF = 0x17D11000;
-
-    // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
-    // Backdrop
-    PREFERENCES_SCREENSAVER_CHOOSER_BACKDROP = 0x17D12000;
-
-    // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
-    // Colors
-    PREFERENCES_SCREENSAVER_CHOOSER_COLORS = 0x17D13000;
-
-    // TvSettings > Device Preferences > Screen saver > When to start
-    PREFERENCES_SCREENSAVER_START_DELAY = 0x17D20000;
-
-    // TvSettings > Device Preferences > Screen saver > When to start >
-    // 5 minutes
-    PREFERENCES_SCREENSAVER_START_DELAY_5M = 0x17D21000;
-
-    // TvSettings > Device Preferences > Screen saver > When to start >
-    // 15 minutes
-    PREFERENCES_SCREENSAVER_START_DELAY_15M = 0x17D22000;
-
-    // TvSettings > Device Preferences > Screen saver > When to start >
-    // 30 minutes
-    PREFERENCES_SCREENSAVER_START_DELAY_30M = 0x17D23000;
-
-    // TvSettings > Device Preferences > Screen saver > When to start >
-    // 1 hour
-    PREFERENCES_SCREENSAVER_START_DELAY_1H = 0x17D24000;
-
-    // TvSettings > Device Preferences > Screen saver > When to start >
-    // 2 hours
-    PREFERENCES_SCREENSAVER_START_DELAY_2H = 0x17D25000;
-
-    // TvSettings > Device Preferences > Screen saver > Start now
-    PREFERENCES_SCREENSAVER_START_NOW = 0x17D30000;
-
-    // TvSettings > Connected Devices (Slice)
-    CONNECTED_SLICE = 0x18000000;
-
-    // TvSettings > Connected Devices (Slice) > Connect remote or headphones
-    CONNECTED_SLICE_CONNECT_NEW_DEVICES = 0x18100000;
-
-    // TvSettings > Connected Devices (Slice) > [A connected device]
-    CONNECTED_SLICE_DEVICE_ENTRY = 0x18200000;
-
-    // TvSettings > Connected Devices (Slice) > [A connected device] >
-    // Remote update
-    CONNECTED_SLICE_DEVICE_ENTRY_UPDATE = 0x18210000;
-
-    // TvSettings > Connected Devices (Slice) > [A connected device] > Rename
-    CONNECTED_SLICE_DEVICE_ENTRY_RENAME = 0x18220000;
-
-    // TvSettings > Connected Devices (Slice) > [A connected device] > Forget
-    CONNECTED_SLICE_DEVICE_ENTRY_FORGET = 0x18230000;
-
-    // TvSettings > Connected Devices (Slice) > HDMI-CEC
-    CONNECTED_SLICE_HDMICEC = 0x18300000;
-
-    // TvSettings > Connected Devices (Slice) > HDMI-CEC > Enable (toggle)
-    CONNECTED_SLICE_HDMICEC_ON_OFF = 0x18310000;
-
-    // TvSettings > Connected Devices (aliasing CONNECTED_SLICE)
-    CONNECTED_CLASSIC = 0x18000000;
-
-    // TvSettings > Connected Devices > Connect remote
-    // (aliasing CONNECTED_SLICE_CONNECT_NEW_DEVICES)
-    CONNECTED_CLASSIC_CONNECT_REMOTE = 0x18100000;
-
-    // TvSettings > Connected Devices > [A connected device]
-    // (aliasing CONNECTED_SLICE_DEVICE_ENTRY)
-    CONNECTED_CLASSIC_DEVICE_ENTRY = 0x18200000;
-
-    // TvSettings > Connected Devices > [A connected device] > Update
-    // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_UPDATE)
-    CONNECTED_CLASSIC_DEVICE_ENTRY_UPDATE = 0x18210000;
-
-    // TvSettings > Connected Devices > [A connected device] > Rename
-    // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_RENAME)
-    CONNECTED_CLASSIC_DEVICE_ENTRY_RENAME = 0x18220000;
-
-    // TvSettings > Connected Devices > [A connected device] > Forget
-    // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_FORGET)
-    CONNECTED_CLASSIC_DEVICE_ENTRY_FORGET = 0x18230000;
-
-    // TvSettings > Connected Devices > HDMI-CEC
-    // (aliasing CONNECTED_SLICE_HDMICEC)
-    CONNECTED_CLASSIC_HDMICEC = 0x18300000;
-
-    // TvSettings > Connected Devices > HDMI-CEC > Enable (toggle)
-    // (aliasing CONNECTED_SLICE_HDMICEC_ON_OFF)
-    CONNECTED_CLASSIC_HDMICEC_ON_OFF = 0x18310000;
-
-    // TvSettings > Help & Feedback
-    FEEDBACK = 0x19000000;
-
-    // TvSettings > Help & Feedback > Send feedback
-    FEEDBACK_SEND = 0x19100000;
-}
diff --git a/core/proto/android/bluetooth/a2dp/enums.proto b/core/proto/android/bluetooth/a2dp/enums.proto
deleted file mode 100644
index 5a025bd..0000000
--- a/core/proto/android/bluetooth/a2dp/enums.proto
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth.a2dp;
-
-option java_outer_classname = "BluetoothA2dpProtoEnums";
-option java_multiple_files = true;
-
-// A2dp playback state enum, defined from:
-// frameworks/base/core/java/android/bluetooth/BluetoothA2dp.java
-enum PlaybackStateEnum {
-    PLAYBACK_STATE_UNKNOWN = 0;
-    PLAYBACK_STATE_PLAYING = 10;
-    PLAYBACK_STATE_NOT_PLAYING = 11;
-}
-
-enum AudioCodingModeEnum {
-    AUDIO_CODING_MODE_UNKNOWN = 0;
-    AUDIO_CODING_MODE_HARDWARE = 1;
-    AUDIO_CODING_MODE_SOFTWARE = 2;
-}
diff --git a/core/proto/android/bluetooth/enums.proto b/core/proto/android/bluetooth/enums.proto
deleted file mode 100644
index dc60ede..0000000
--- a/core/proto/android/bluetooth/enums.proto
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth;
-
-option java_outer_classname = "BluetoothProtoEnums";
-option java_multiple_files = true;
-
-// Bluetooth connection states.
-enum ConnectionStateEnum {
-    CONNECTION_STATE_DISCONNECTED = 0;
-    CONNECTION_STATE_CONNECTING = 1;
-    CONNECTION_STATE_CONNECTED = 2;
-    CONNECTION_STATE_DISCONNECTING = 3;
-}
-
-// Bluetooth Adapter Enable and Disable Reasons
-enum EnableDisableReasonEnum {
-    ENABLE_DISABLE_REASON_UNSPECIFIED = 0;
-    ENABLE_DISABLE_REASON_APPLICATION_REQUEST = 1;
-    ENABLE_DISABLE_REASON_AIRPLANE_MODE = 2;
-    ENABLE_DISABLE_REASON_DISALLOWED = 3;
-    ENABLE_DISABLE_REASON_RESTARTED = 4;
-    ENABLE_DISABLE_REASON_START_ERROR = 5;
-    ENABLE_DISABLE_REASON_SYSTEM_BOOT = 6;
-    ENABLE_DISABLE_REASON_CRASH = 7;
-    ENABLE_DISABLE_REASON_USER_SWITCH = 8;
-    ENABLE_DISABLE_REASON_RESTORE_USER_SETTING = 9;
-    ENABLE_DISABLE_REASON_FACTORY_RESET = 10;
-    ENABLE_DISABLE_REASON_INIT_FLAGS_CHANGED = 11;
-}
-
-enum DirectionEnum {
-    DIRECTION_UNKNOWN = 0;
-    DIRECTION_OUTGOING = 1;
-    DIRECTION_INCOMING = 2;
-}
-
-// First item is the default value, other values follow Bluetooth spec definition
-enum LinkTypeEnum {
-    // Link type is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
-    LINK_TYPE_UNKNOWN = 0xFFF;
-    LINK_TYPE_SCO = 0x00;
-    LINK_TYPE_ACL = 0x01;
-    LINK_TYPE_ESCO = 0x02;
-}
-
-enum DeviceInfoSrcEnum {
-    DEVICE_INFO_SRC_UNKNOWN = 0;
-    // Within Android Bluetooth stack
-    DEVICE_INFO_INTERNAL = 1;
-    // Outside Android Bluetooth stack
-    DEVICE_INFO_EXTERNAL = 2;
-}
-
-enum DeviceTypeEnum {
-    DEVICE_TYPE_UNKNOWN = 0;
-    DEVICE_TYPE_CLASSIC = 1;
-    DEVICE_TYPE_LE = 2;
-    DEVICE_TYPE_DUAL = 3;
-}
-
-// Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
-enum TransportTypeEnum {
-    TRANSPORT_TYPE_AUTO = 0;
-    TRANSPORT_TYPE_BREDR = 1;
-    TRANSPORT_TYPE_LE = 2;
-}
-
-// Bond state enum
-// Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
-enum BondStateEnum {
-    BOND_STATE_UNKNOWN = 0;
-    BOND_STATE_NONE = 10;
-    BOND_STATE_BONDING = 11;
-    BOND_STATE_BONDED = 12;
-}
-
-// Sub states within the bonding general state
-enum BondSubStateEnum {
-    BOND_SUB_STATE_UNKNOWN = 0;
-    BOND_SUB_STATE_LOCAL_OOB_DATA_PROVIDED = 1;
-    BOND_SUB_STATE_LOCAL_PIN_REQUESTED = 2;
-    BOND_SUB_STATE_LOCAL_PIN_REPLIED = 3;
-    BOND_SUB_STATE_LOCAL_SSP_REQUESTED = 4;
-    BOND_SUB_STATE_LOCAL_SSP_REPLIED = 5;
-}
-
-enum UnbondReasonEnum {
-    UNBOND_REASON_UNKNOWN = 0;
-    UNBOND_REASON_AUTH_FAILED = 1;
-    UNBOND_REASON_AUTH_REJECTED = 2;
-    UNBOND_REASON_AUTH_CANCELED = 3;
-    UNBOND_REASON_REMOTE_DEVICE_DOWN = 4;
-    UNBOND_REASON_DISCOVERY_IN_PROGRESS = 5;
-    UNBOND_REASON_AUTH_TIMEOUT = 6;
-    UNBOND_REASON_REPEATED_ATTEMPTS = 7;
-    UNBOND_REASON_REMOTE_AUTH_CANCELED = 8;
-    UNBOND_REASON_REMOVED = 9;
-}
-
-enum SocketTypeEnum {
-    SOCKET_TYPE_UNKNOWN = 0;
-    SOCKET_TYPE_RFCOMM = 1;
-    SOCKET_TYPE_SCO = 2;
-    SOCKET_TYPE_L2CAP_BREDR = 3;
-    SOCKET_TYPE_L2CAP_LE = 4;
-}
-
-enum SocketConnectionstateEnum {
-    SOCKET_CONNECTION_STATE_UNKNOWN = 0;
-    // Socket acts as a server waiting for connection
-    SOCKET_CONNECTION_STATE_LISTENING = 1;
-    // Socket acts as a client trying to connect
-    SOCKET_CONNECTION_STATE_CONNECTING = 2;
-    // Socket is connected
-    SOCKET_CONNECTION_STATE_CONNECTED = 3;
-    // Socket tries to disconnect from remote
-    SOCKET_CONNECTION_STATE_DISCONNECTING = 4;
-    // This socket is closed
-    SOCKET_CONNECTION_STATE_DISCONNECTED = 5;
-}
-
-enum SocketRoleEnum {
-    SOCKET_ROLE_UNKNOWN = 0;
-    SOCKET_ROLE_LISTEN = 1;
-    SOCKET_ROLE_CONNECTION = 2;
-}
diff --git a/core/proto/android/bluetooth/hci/enums.proto b/core/proto/android/bluetooth/hci/enums.proto
deleted file mode 100644
index ef894e5..0000000
--- a/core/proto/android/bluetooth/hci/enums.proto
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth.hci;
-
-option java_outer_classname = "BluetoothHciProtoEnums";
-option java_multiple_files = true;
-
-// HCI command opcodes (OCF+OGF) from Bluetooth 5.0 specification Vol 2, Part E, Section 7
-// Original definition: system/bt/stack/include/hcidefs.h
-enum CommandEnum {
-    // Opcode is at most 2 bytes (0xFFFF), thus 0xFFFFF must not be a valid value
-    CMD_UNKNOWN = 0xFFFFF;
-    // Link control commands 0x0400
-    CMD_INQUIRY = 0x0401;
-    CMD_INQUIRY_CANCEL = 0x0402;
-    CMD_PERIODIC_INQUIRY_MODE = 0x0403;
-    CMD_EXIT_PERIODIC_INQUIRY_MODE = 0x0404;
-    CMD_CREATE_CONNECTION = 0x0405;
-    CMD_DISCONNECT = 0x0406;
-    CMD_ADD_SCO_CONNECTION = 0x0407; // Deprecated since Bluetooth 1.2
-    CMD_CREATE_CONNECTION_CANCEL = 0x0408;
-    CMD_ACCEPT_CONNECTION_REQUEST = 0x0409;
-    CMD_REJECT_CONNECTION_REQUEST = 0x040A;
-    CMD_LINK_KEY_REQUEST_REPLY = 0x040B;
-    CMD_LINK_KEY_REQUEST_NEG_REPLY = 0x040C;
-    CMD_PIN_CODE_REQUEST_REPLY = 0x040D;
-    CMD_PIN_CODE_REQUEST_NEG_REPLY = 0x040E;
-    CMD_CHANGE_CONN_PACKET_TYPE = 0x040F;
-    CMD_AUTHENTICATION_REQUESTED = 0x0411;
-    CMD_SET_CONN_ENCRYPTION = 0x0413;
-    CMD_CHANGE_CONN_LINK_KEY = 0x0415;
-    CMD_MASTER_LINK_KEY = 0x0417;
-    CMD_RMT_NAME_REQUEST = 0x0419;
-    CMD_RMT_NAME_REQUEST_CANCEL = 0x041A;
-    CMD_READ_RMT_FEATURES = 0x041B;
-    CMD_READ_RMT_EXT_FEATURES = 0x041C;
-    CMD_READ_RMT_VERSION_INFO = 0x041D;
-    CMD_READ_RMT_CLOCK_OFFSET = 0x041F;
-    CMD_READ_LMP_HANDLE = 0x0420;
-    CMD_SETUP_ESCO_CONNECTION = 0x0428;
-    CMD_ACCEPT_ESCO_CONNECTION = 0x0429;
-    CMD_REJECT_ESCO_CONNECTION = 0x042A;
-    CMD_IO_CAPABILITY_REQUEST_REPLY = 0x042B;
-    CMD_USER_CONF_REQUEST_REPLY = 0x042C;
-    CMD_USER_CONF_VALUE_NEG_REPLY = 0x042D;
-    CMD_USER_PASSKEY_REQ_REPLY = 0x042E;
-    CMD_USER_PASSKEY_REQ_NEG_REPLY = 0x042F;
-    CMD_REM_OOB_DATA_REQ_REPLY = 0x0430;
-    CMD_REM_OOB_DATA_REQ_NEG_REPLY = 0x0433;
-    CMD_IO_CAP_REQ_NEG_REPLY = 0x0434;
-    // BEGIN: AMP commands (not used in system/bt)
-    CMD_CREATE_PHYSICAL_LINK = 0x0435;
-    CMD_ACCEPT_PHYSICAL_LINK = 0x0436;
-    CMD_DISCONNECT_PHYSICAL_LINK = 0x0437;
-    CMD_CREATE_LOGICAL_LINK = 0x0438;
-    CMD_ACCEPT_LOGICAL_LINK = 0x0439;
-    CMD_DISCONNECT_LOGICAL_LINK = 0x043A;
-    CMD_LOGICAL_LINK_CANCEL = 0x043B;
-    CMD_FLOW_SPEC_MODIFY = 0x043C;
-    // END: AMP commands
-    CMD_ENH_SETUP_ESCO_CONNECTION = 0x043D;
-    CMD_ENH_ACCEPT_ESCO_CONNECTION = 0x043E;
-    CMD_TRUNCATED_PAGE = 0x043F;
-    CMD_TRUNCATED_PAGE_CANCEL = 0x0440;
-    CMD_SET_CLB = 0x0441;
-    CMD_RECEIVE_CLB = 0x0442;
-    CMD_START_SYNC_TRAIN = 0x0443;
-    CMD_RECEIVE_SYNC_TRAIN = 0x0444;
-    CMD_REM_OOB_EXTENDED_DATA_REQ_REPLY = 0x0445; // Not currently used in system/bt
-    // Link policy commands 0x0800
-    CMD_HOLD_MODE = 0x0801;
-    CMD_SNIFF_MODE = 0x0803;
-    CMD_EXIT_SNIFF_MODE = 0x0804;
-    CMD_PARK_MODE = 0x0805;
-    CMD_EXIT_PARK_MODE = 0x0806;
-    CMD_QOS_SETUP = 0x0807;
-    CMD_ROLE_DISCOVERY = 0x0809;
-    CMD_SWITCH_ROLE = 0x080B;
-    CMD_READ_POLICY_SETTINGS = 0x080C;
-    CMD_WRITE_POLICY_SETTINGS = 0x080D;
-    CMD_READ_DEF_POLICY_SETTINGS = 0x080E;
-    CMD_WRITE_DEF_POLICY_SETTINGS = 0x080F;
-    CMD_FLOW_SPECIFICATION = 0x0810;
-    CMD_SNIFF_SUB_RATE = 0x0811;
-    // Host controller baseband commands 0x0C00
-    CMD_SET_EVENT_MASK = 0x0C01;
-    CMD_RESET = 0x0C03;
-    CMD_SET_EVENT_FILTER = 0x0C05;
-    CMD_FLUSH = 0x0C08;
-    CMD_READ_PIN_TYPE = 0x0C09;
-    CMD_WRITE_PIN_TYPE = 0x0C0A;
-    CMD_CREATE_NEW_UNIT_KEY = 0x0C0B;
-    CMD_GET_MWS_TRANS_LAYER_CFG = 0x0C0C; // Deprecated (not used in spec)
-    CMD_READ_STORED_LINK_KEY = 0x0C0D;
-    CMD_WRITE_STORED_LINK_KEY = 0x0C11;
-    CMD_DELETE_STORED_LINK_KEY = 0x0C12;
-    CMD_CHANGE_LOCAL_NAME = 0x0C13;
-    CMD_READ_LOCAL_NAME = 0x0C14;
-    CMD_READ_CONN_ACCEPT_TOUT = 0x0C15;
-    CMD_WRITE_CONN_ACCEPT_TOUT = 0x0C16;
-    CMD_READ_PAGE_TOUT = 0x0C17;
-    CMD_WRITE_PAGE_TOUT = 0x0C18;
-    CMD_READ_SCAN_ENABLE = 0x0C19;
-    CMD_WRITE_SCAN_ENABLE = 0x0C1A;
-    CMD_READ_PAGESCAN_CFG = 0x0C1B;
-    CMD_WRITE_PAGESCAN_CFG = 0x0C1C;
-    CMD_READ_INQUIRYSCAN_CFG = 0x0C1D;
-    CMD_WRITE_INQUIRYSCAN_CFG = 0x0C1E;
-    CMD_READ_AUTHENTICATION_ENABLE = 0x0C1F;
-    CMD_WRITE_AUTHENTICATION_ENABLE = 0x0C20;
-    CMD_READ_ENCRYPTION_MODE = 0x0C21; // Deprecated
-    CMD_WRITE_ENCRYPTION_MODE = 0x0C22; // Deprecated
-    CMD_READ_CLASS_OF_DEVICE = 0x0C23;
-    CMD_WRITE_CLASS_OF_DEVICE = 0x0C24;
-    CMD_READ_VOICE_SETTINGS = 0x0C25;
-    CMD_WRITE_VOICE_SETTINGS = 0x0C26;
-    CMD_READ_AUTOMATIC_FLUSH_TIMEOUT = 0x0C27;
-    CMD_WRITE_AUTOMATIC_FLUSH_TIMEOUT = 0x0C28;
-    CMD_READ_NUM_BCAST_REXMITS = 0x0C29;
-    CMD_WRITE_NUM_BCAST_REXMITS = 0x0C2A;
-    CMD_READ_HOLD_MODE_ACTIVITY = 0x0C2B;
-    CMD_WRITE_HOLD_MODE_ACTIVITY = 0x0C2C;
-    CMD_READ_TRANSMIT_POWER_LEVEL = 0x0C2D;
-    CMD_READ_SCO_FLOW_CTRL_ENABLE = 0x0C2E;
-    CMD_WRITE_SCO_FLOW_CTRL_ENABLE = 0x0C2F;
-    CMD_SET_HC_TO_HOST_FLOW_CTRL = 0x0C31;
-    CMD_HOST_BUFFER_SIZE = 0x0C33;
-    CMD_HOST_NUM_PACKETS_DONE = 0x0C35;
-    CMD_READ_LINK_SUPER_TOUT = 0x0C36;
-    CMD_WRITE_LINK_SUPER_TOUT = 0x0C37;
-    CMD_READ_NUM_SUPPORTED_IAC = 0x0C38;
-    CMD_READ_CURRENT_IAC_LAP = 0x0C39;
-    CMD_WRITE_CURRENT_IAC_LAP = 0x0C3A;
-    CMD_READ_PAGESCAN_PERIOD_MODE = 0x0C3B; // Deprecated
-    CMD_WRITE_PAGESCAN_PERIOD_MODE = 0x0C3C; // Deprecated
-    CMD_READ_PAGESCAN_MODE = 0x0C3D; // Deprecated
-    CMD_WRITE_PAGESCAN_MODE = 0x0C3E; // Deprecated
-    CMD_SET_AFH_CHANNELS = 0x0C3F;
-    CMD_READ_INQSCAN_TYPE = 0x0C42;
-    CMD_WRITE_INQSCAN_TYPE = 0x0C43;
-    CMD_READ_INQUIRY_MODE = 0x0C44;
-    CMD_WRITE_INQUIRY_MODE = 0x0C45;
-    CMD_READ_PAGESCAN_TYPE = 0x0C46;
-    CMD_WRITE_PAGESCAN_TYPE = 0x0C47;
-    CMD_READ_AFH_ASSESSMENT_MODE = 0x0C48;
-    CMD_WRITE_AFH_ASSESSMENT_MODE = 0x0C49;
-    CMD_READ_EXT_INQ_RESPONSE = 0x0C51;
-    CMD_WRITE_EXT_INQ_RESPONSE = 0x0C52;
-    CMD_REFRESH_ENCRYPTION_KEY = 0x0C53;
-    CMD_READ_SIMPLE_PAIRING_MODE = 0x0C55;
-    CMD_WRITE_SIMPLE_PAIRING_MODE = 0x0C56;
-    CMD_READ_LOCAL_OOB_DATA = 0x0C57;
-    CMD_READ_INQ_TX_POWER_LEVEL = 0x0C58;
-    CMD_WRITE_INQ_TX_POWER_LEVEL = 0x0C59;
-    CMD_READ_ERRONEOUS_DATA_RPT = 0x0C5A;
-    CMD_WRITE_ERRONEOUS_DATA_RPT = 0x0C5B;
-    CMD_ENHANCED_FLUSH = 0x0C5F;
-    CMD_SEND_KEYPRESS_NOTIF = 0x0C60;
-    CMD_READ_LOGICAL_LINK_ACCEPT_TIMEOUT = 0x0C61;
-    CMD_WRITE_LOGICAL_LINK_ACCEPT_TIMEOUT = 0x0C62;
-    CMD_SET_EVENT_MASK_PAGE_2 = 0x0C63;
-    CMD_READ_LOCATION_DATA = 0x0C64;
-    CMD_WRITE_LOCATION_DATA = 0x0C65;
-    CMD_READ_FLOW_CONTROL_MODE = 0x0C66;
-    CMD_WRITE_FLOW_CONTROL_MODE = 0x0C67;
-    CMD_READ_ENHANCED_TX_PWR_LEVEL = 0x0C68; // Not currently used in system/bt
-    CMD_READ_BE_FLUSH_TOUT = 0x0C69;
-    CMD_WRITE_BE_FLUSH_TOUT = 0x0C6A;
-    CMD_SHORT_RANGE_MODE = 0x0C6B;
-    CMD_READ_BLE_HOST_SUPPORT = 0x0C6C;
-    CMD_WRITE_BLE_HOST_SUPPORT = 0x0C6D;
-    CMD_SET_MWS_CHANNEL_PARAMETERS = 0x0C6E;
-    CMD_SET_EXTERNAL_FRAME_CONFIGURATION = 0x0C6F;
-    CMD_SET_MWS_SIGNALING = 0x0C70;
-    CMD_SET_MWS_TRANSPORT_LAYER = 0x0C71;
-    CMD_SET_MWS_SCAN_FREQUENCY_TABLE = 0x0C72;
-    CMD_SET_MWS_PATTERN_CONFIGURATION = 0x0C73;
-    CMD_SET_RESERVED_LT_ADDR = 0x0C74;
-    CMD_DELETE_RESERVED_LT_ADDR = 0x0C75;
-    CMD_WRITE_CLB_DATA = 0x0C76;
-    CMD_READ_SYNC_TRAIN_PARAM = 0x0C77;
-    CMD_WRITE_SYNC_TRAIN_PARAM = 0x0C78;
-    CMD_READ_SECURE_CONNS_SUPPORT = 0x0C79;
-    CMD_WRITE_SECURE_CONNS_SUPPORT = 0x0C7A;
-    CMD_READ_AUTHED_PAYLOAD_TIMEOUT = 0x0C7B; // Not currently used in system/bt
-    CMD_WRITE_AUTHED_PAYLOAD_TIMEOUT = 0x0C7C; // Not currently used in system/bt
-    CMD_READ_LOCAL_OOB_EXTENDED_DATA = 0x0C7D; // Not currently used in system/bt
-    CMD_READ_EXTENDED_PAGE_TIMEOUT = 0x0C7E; // Not currently used in system/bt
-    CMD_WRITE_EXTENDED_PAGE_TIMEOUT = 0x0C7F; // Not currently used in system/bt
-    CMD_READ_EXTENDED_INQUIRY_LENGTH = 0x0C80; // Not currently used in system/bt
-    CMD_WRITE_EXTENDED_INQUIRY_LENGTH = 0x0C81; // Not currently used in system/bt
-    // Informational parameter commands 0x1000
-    CMD_READ_LOCAL_VERSION_INFO = 0x1001;
-    CMD_READ_LOCAL_SUPPORTED_CMDS = 0x1002;
-    CMD_READ_LOCAL_FEATURES = 0x1003;
-    CMD_READ_LOCAL_EXT_FEATURES = 0x1004;
-    CMD_READ_BUFFER_SIZE = 0x1005;
-    CMD_READ_COUNTRY_CODE = 0x1007; // Deprecated
-    CMD_READ_BD_ADDR = 0x1009;
-    CMD_READ_DATA_BLOCK_SIZE = 0x100A;
-    CMD_READ_LOCAL_SUPPORTED_CODECS = 0x100B;
-    // Status parameter commands 0x1400
-    CMD_READ_FAILED_CONTACT_COUNTER = 0x1401;
-    CMD_RESET_FAILED_CONTACT_COUNTER = 0x1402;
-    CMD_GET_LINK_QUALITY = 0x1403;
-    CMD_READ_RSSI = 0x1405;
-    CMD_READ_AFH_CH_MAP = 0x1406;
-    CMD_READ_CLOCK = 0x1407;
-    CMD_READ_ENCR_KEY_SIZE = 0x1408;
-    CMD_READ_LOCAL_AMP_INFO = 0x1409;
-    CMD_READ_LOCAL_AMP_ASSOC = 0x140A;
-    CMD_WRITE_REMOTE_AMP_ASSOC = 0x140B;
-    CMD_GET_MWS_TRANSPORT_CFG = 0x140C; // Not currently used in system/bt
-    CMD_SET_TRIGGERED_CLK_CAPTURE = 0x140D; // Not currently used in system/bt
-    // Testing commands 0x1800
-    CMD_READ_LOOPBACK_MODE = 0x1801;
-    CMD_WRITE_LOOPBACK_MODE = 0x1802;
-    CMD_ENABLE_DEV_UNDER_TEST_MODE = 0x1803;
-    CMD_WRITE_SIMP_PAIR_DEBUG_MODE = 0x1804;
-    CMD_ENABLE_AMP_RCVR_REPORTS = 0x1807;
-    CMD_AMP_TEST_END = 0x1808;
-    CMD_AMP_TEST = 0x1809;
-    CMD_WRITE_SECURE_CONN_TEST_MODE = 0x180A; // Not currently used in system/bt
-    // BLE commands 0x2000
-    CMD_BLE_SET_EVENT_MASK = 0x2001;
-    CMD_BLE_READ_BUFFER_SIZE = 0x2002;
-    CMD_BLE_READ_LOCAL_SPT_FEAT = 0x2003;
-    CMD_BLE_WRITE_LOCAL_SPT_FEAT = 0x2004;
-    CMD_BLE_WRITE_RANDOM_ADDR = 0x2005;
-    CMD_BLE_WRITE_ADV_PARAMS = 0x2006;
-    CMD_BLE_READ_ADV_CHNL_TX_POWER = 0x2007;
-    CMD_BLE_WRITE_ADV_DATA = 0x2008;
-    CMD_BLE_WRITE_SCAN_RSP_DATA = 0x2009;
-    CMD_BLE_WRITE_ADV_ENABLE = 0x200A;
-    CMD_BLE_WRITE_SCAN_PARAMS = 0x200B;
-    CMD_BLE_WRITE_SCAN_ENABLE = 0x200C;
-    CMD_BLE_CREATE_LL_CONN = 0x200D;
-    CMD_BLE_CREATE_CONN_CANCEL = 0x200E;
-    CMD_BLE_READ_WHITE_LIST_SIZE = 0x200F;
-    CMD_BLE_CLEAR_WHITE_LIST = 0x2010;
-    CMD_BLE_ADD_WHITE_LIST = 0x2011;
-    CMD_BLE_REMOVE_WHITE_LIST = 0x2012;
-    CMD_BLE_UPD_LL_CONN_PARAMS = 0x2013;
-    CMD_BLE_SET_HOST_CHNL_CLASS = 0x2014;
-    CMD_BLE_READ_CHNL_MAP = 0x2015;
-    CMD_BLE_READ_REMOTE_FEAT = 0x2016;
-    CMD_BLE_ENCRYPT = 0x2017;
-    CMD_BLE_RAND = 0x2018;
-    CMD_BLE_START_ENC = 0x2019;
-    CMD_BLE_LTK_REQ_REPLY = 0x201A;
-    CMD_BLE_LTK_REQ_NEG_REPLY = 0x201B;
-    CMD_BLE_READ_SUPPORTED_STATES = 0x201C;
-    CMD_BLE_RECEIVER_TEST = 0x201D;
-    CMD_BLE_TRANSMITTER_TEST = 0x201E;
-    CMD_BLE_TEST_END = 0x201F;
-    CMD_BLE_RC_PARAM_REQ_REPLY = 0x2020;
-    CMD_BLE_RC_PARAM_REQ_NEG_REPLY = 0x2021;
-    CMD_BLE_SET_DATA_LENGTH = 0x2022;
-    CMD_BLE_READ_DEFAULT_DATA_LENGTH = 0x2023;
-    CMD_BLE_WRITE_DEFAULT_DATA_LENGTH = 0x2024;
-    CMD_BLE_GENERATE_DHKEY = 0x2026; // Not currently used in system/bt
-    CMD_BLE_ADD_DEV_RESOLVING_LIST = 0x2027;
-    CMD_BLE_RM_DEV_RESOLVING_LIST = 0x2028;
-    CMD_BLE_CLEAR_RESOLVING_LIST = 0x2029;
-    CMD_BLE_READ_RESOLVING_LIST_SIZE = 0x202A;
-    CMD_BLE_READ_RESOLVABLE_ADDR_PEER = 0x202B;
-    CMD_BLE_READ_RESOLVABLE_ADDR_LOCAL = 0x202C;
-    CMD_BLE_SET_ADDR_RESOLUTION_ENABLE = 0x202D;
-    CMD_BLE_SET_RAND_PRIV_ADDR_TIMOUT = 0x202E;
-    CMD_BLE_READ_MAXIMUM_DATA_LENGTH = 0x202F;
-    CMD_BLE_READ_PHY = 0x2030;
-    CMD_BLE_SET_DEFAULT_PHY = 0x2031;
-    CMD_BLE_SET_PHY = 0x2032;
-    CMD_BLE_ENH_RECEIVER_TEST = 0x2033;
-    CMD_BLE_ENH_TRANSMITTER_TEST = 0x2034;
-    CMD_BLE_SET_EXT_ADVERTISING_RANDOM_ADDRESS = 0x2035;
-    CMD_BLE_SET_EXT_ADVERTISING_PARAM = 0x2036;
-    CMD_BLE_SET_EXT_ADVERTISING_DATA = 0x2037;
-    CMD_BLE_SET_EXT_ADVERTISING_SCAN_RESP = 0x2038;
-    CMD_BLE_SET_EXT_ADVERTISING_ENABLE = 0x2039;
-    CMD_BLE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH = 0x203A;
-    CMD_BLE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS = 0x203B;
-    CMD_BLE_REMOVE_ADVERTISING_SET = 0x203C;
-    CMD_BLE_CLEAR_ADVERTISING_SETS = 0x203D;
-    CMD_BLE_SET_PERIODIC_ADVERTISING_PARAM = 0x203E;
-    CMD_BLE_SET_PERIODIC_ADVERTISING_DATA = 0x203F;
-    CMD_BLE_SET_PERIODIC_ADVERTISING_ENABLE = 0x2040;
-    CMD_BLE_SET_EXTENDED_SCAN_PARAMETERS = 0x2041;
-    CMD_BLE_SET_EXTENDED_SCAN_ENABLE = 0x2042;
-    CMD_BLE_EXTENDED_CREATE_CONNECTION = 0x2043;
-    CMD_BLE_PERIODIC_ADVERTISING_CREATE_SYNC = 0x2044;
-    CMD_BLE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL = 0x2045;
-    CMD_BLE_PERIODIC_ADVERTISING_TERMINATE_SYNC = 0x2046;
-    CMD_BLE_ADD_DEVICE_TO_PERIODIC_ADVERTISING_LIST = 0x2047;
-    CMD_BLE_RM_DEVICE_FROM_PERIODIC_ADVERTISING_LIST = 0x2048;
-    CMD_BLE_CLEAR_PERIODIC_ADVERTISING_LIST = 0x2049;
-    CMD_BLE_READ_PERIODIC_ADVERTISING_LIST_SIZE = 0x204A;
-    CMD_BLE_READ_TRANSMIT_POWER = 0x204B;
-    CMD_BLE_READ_RF_COMPENS_POWER = 0x204C;
-    CMD_BLE_WRITE_RF_COMPENS_POWER = 0x204D;
-    CMD_BLE_SET_PRIVACY_MODE = 0x204E;
-    // Vendor specific commands 0xFC00 and above
-    // Android vendor specific commands defined in
-    // https://source.android.com/devices/bluetooth/hci_requirements#vendor-specific-capabilities
-    CMD_BLE_VENDOR_CAP = 0xFD53;
-    CMD_BLE_MULTI_ADV = 0xFD54;
-    CMD_BLE_BATCH_SCAN = 0xFD56;
-    CMD_BLE_ADV_FILTER = 0xFD57;
-    CMD_BLE_TRACK_ADV = 0xFD58;
-    CMD_BLE_ENERGY_INFO = 0xFD59;
-    CMD_BLE_EXTENDED_SCAN_PARAMS = 0xFD5A;
-    CMD_CONTROLLER_DEBUG_INFO = 0xFD5B;
-    CMD_CONTROLLER_A2DP_OPCODE = 0xFD5D;
-    CMD_BRCM_SET_ACL_PRIORITY = 0xFC57;
-    // Other vendor specific commands below here
-}
-
-// HCI event codes from the Bluetooth 5.0 specification Vol 2, Part 7, Section 7
-// Original definition: system/bt/stack/include/hcidefs.h
-enum EventEnum {
-    // Event is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
-    EVT_UNKNOWN = 0xFFF;
-    EVT_INQUIRY_COMP = 0x01;
-    EVT_INQUIRY_RESULT = 0x02;
-    EVT_CONNECTION_COMP = 0x03;
-    EVT_CONNECTION_REQUEST = 0x04;
-    EVT_DISCONNECTION_COMP = 0x05;
-    EVT_AUTHENTICATION_COMP = 0x06;
-    EVT_RMT_NAME_REQUEST_COMP = 0x07;
-    EVT_ENCRYPTION_CHANGE = 0x08;
-    EVT_CHANGE_CONN_LINK_KEY = 0x09;
-    EVT_MASTER_LINK_KEY_COMP = 0x0A;
-    EVT_READ_RMT_FEATURES_COMP = 0x0B;
-    EVT_READ_RMT_VERSION_COMP = 0x0C;
-    EVT_QOS_SETUP_COMP = 0x0D;
-    EVT_COMMAND_COMPLETE = 0x0E;
-    EVT_COMMAND_STATUS = 0x0F;
-    EVT_HARDWARE_ERROR = 0x10;
-    EVT_FLUSH_OCCURRED = 0x11;
-    EVT_ROLE_CHANGE = 0x12;
-    EVT_NUM_COMPL_DATA_PKTS = 0x13;
-    EVT_MODE_CHANGE = 0x14;
-    EVT_RETURN_LINK_KEYS = 0x15;
-    EVT_PIN_CODE_REQUEST = 0x16;
-    EVT_LINK_KEY_REQUEST = 0x17;
-    EVT_LINK_KEY_NOTIFICATION = 0x18;
-    EVT_LOOPBACK_COMMAND = 0x19;
-    EVT_DATA_BUF_OVERFLOW = 0x1A;
-    EVT_MAX_SLOTS_CHANGED = 0x1B;
-    EVT_READ_CLOCK_OFF_COMP = 0x1C;
-    EVT_CONN_PKT_TYPE_CHANGE = 0x1D;
-    EVT_QOS_VIOLATION = 0x1E;
-    EVT_PAGE_SCAN_MODE_CHANGE = 0x1F; // Deprecated
-    EVT_PAGE_SCAN_REP_MODE_CHNG = 0x20;
-    EVT_FLOW_SPECIFICATION_COMP = 0x21;
-    EVT_INQUIRY_RSSI_RESULT = 0x22;
-    EVT_READ_RMT_EXT_FEATURES_COMP = 0x23;
-    EVT_ESCO_CONNECTION_COMP = 0x2C;
-    EVT_ESCO_CONNECTION_CHANGED = 0x2D;
-    EVT_SNIFF_SUB_RATE = 0x2E;
-    EVT_EXTENDED_INQUIRY_RESULT = 0x2F;
-    EVT_ENCRYPTION_KEY_REFRESH_COMP = 0x30;
-    EVT_IO_CAPABILITY_REQUEST = 0x31;
-    EVT_IO_CAPABILITY_RESPONSE = 0x32;
-    EVT_USER_CONFIRMATION_REQUEST = 0x33;
-    EVT_USER_PASSKEY_REQUEST = 0x34;
-    EVT_REMOTE_OOB_DATA_REQUEST = 0x35;
-    EVT_SIMPLE_PAIRING_COMPLETE = 0x36;
-    EVT_LINK_SUPER_TOUT_CHANGED = 0x38;
-    EVT_ENHANCED_FLUSH_COMPLETE = 0x39;
-    EVT_USER_PASSKEY_NOTIFY = 0x3B;
-    EVT_KEYPRESS_NOTIFY = 0x3C;
-    EVT_RMT_HOST_SUP_FEAT_NOTIFY = 0x3D;
-    EVT_BLE_META = 0x3E;
-    EVT_PHYSICAL_LINK_COMP = 0x40;
-    EVT_CHANNEL_SELECTED = 0x41;
-    EVT_DISC_PHYSICAL_LINK_COMP = 0x42;
-    EVT_PHY_LINK_LOSS_EARLY_WARNING = 0x43;
-    EVT_PHY_LINK_RECOVERY = 0x44;
-    EVT_LOGICAL_LINK_COMP = 0x45;
-    EVT_DISC_LOGICAL_LINK_COMP = 0x46;
-    EVT_FLOW_SPEC_MODIFY_COMP = 0x47;
-    EVT_NUM_COMPL_DATA_BLOCKS = 0x48;
-    EVT_AMP_TEST_START = 0x49; // Not currently used in system/bt
-    EVT_AMP_TEST_END = 0x4A; // Not currently used in system/bt
-    EVT_AMP_RECEIVER_RPT = 0x4B; // Not currently used in system/bt
-    EVT_SHORT_RANGE_MODE_COMPLETE = 0x4C;
-    EVT_AMP_STATUS_CHANGE = 0x4D;
-    EVT_SET_TRIGGERED_CLOCK_CAPTURE = 0x4E;
-    EVT_SYNC_TRAIN_CMPL = 0x4F; // Not currently used in system/bt
-    EVT_SYNC_TRAIN_RCVD = 0x50; // Not currently used in system/bt
-    EVT_CONNLESS_SLAVE_BROADCAST_RCVD = 0x51; // Not currently used in system/bt
-    EVT_CONNLESS_SLAVE_BROADCAST_TIMEOUT = 0x52; // Not currently used in system/bt
-    EVT_TRUNCATED_PAGE_CMPL = 0x53; // Not currently used in system/bt
-    EVT_SLAVE_PAGE_RES_TIMEOUT = 0x54; // Not currently used in system/bt
-    EVT_CONNLESS_SLAVE_BROADCAST_CHNL_MAP_CHANGE = 0x55; // Not currently used in system/bt
-    EVT_INQUIRY_RES_NOTIFICATION = 0x56; // Not currently used in system/bt
-    EVT_AUTHED_PAYLOAD_TIMEOUT = 0x57; // Not currently used in system/bt
-    EVT_SAM_STATUS_CHANGE = 0x58; // Not currently used in system/bt
-}
-
-// Bluetooth low energy related meta event codes
-// from the Bluetooth 5.0 specification Vol 2, Part E, Section 7.7.65
-// Original definition: system/bt/stack/include/hcidefs.h
-enum BleMetaEventEnum {
-    // BLE meta event code is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
-    BLE_EVT_UNKNOWN = 0xFFF;
-    BLE_EVT_CONN_COMPLETE_EVT = 0x01;
-    BLE_EVT_ADV_PKT_RPT_EVT = 0x02;
-    BLE_EVT_LL_CONN_PARAM_UPD_EVT = 0x03;
-    BLE_EVT_READ_REMOTE_FEAT_CMPL_EVT = 0x04;
-    BLE_EVT_LTK_REQ_EVT = 0x05;
-    BLE_EVT_RC_PARAM_REQ_EVT = 0x06;
-    BLE_EVT_DATA_LENGTH_CHANGE_EVT = 0x07;
-    BLE_EVT_READ_LOCAL_P256_PUB_KEY = 0x08; // Not currently used in system/bt
-    BLE_EVT_GEN_DHKEY_CMPL = 0x09; // Not currently used in system/bt
-    BLE_EVT_ENHANCED_CONN_COMPLETE_EVT = 0x0a;
-    BLE_EVT_DIRECT_ADV_EVT = 0x0b;
-    BLE_EVT_PHY_UPDATE_COMPLETE_EVT = 0x0c;
-    BLE_EVT_EXTENDED_ADVERTISING_REPORT_EVT = 0x0D;
-    BLE_EVT_PERIODIC_ADV_SYNC_EST_EVT = 0x0E;
-    BLE_EVT_PERIODIC_ADV_REPORT_EVT = 0x0F;
-    BLE_EVT_PERIODIC_ADV_SYNC_LOST_EVT = 0x10;
-    BLE_EVT_SCAN_TIMEOUT_EVT = 0x11;
-    BLE_EVT_ADVERTISING_SET_TERMINATED_EVT = 0x12;
-    BLE_EVT_SCAN_REQ_RX_EVT = 0x13;
-    BLE_EVT_CHNL_SELECTION_ALGORITHM = 0x14; // Not currently used in system/bt
-}
-
-// HCI status code from the Bluetooth 5.0 specification Vol 2, Part D.
-// Original definition: system/bt/stack/include/hcidefs.h
-enum StatusEnum {
-    // Status is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
-    STATUS_UNKNOWN = 0xFFF;
-    STATUS_SUCCESS = 0x00;
-    STATUS_ILLEGAL_COMMAND = 0x01;
-    STATUS_NO_CONNECTION = 0x02;
-    STATUS_HW_FAILURE = 0x03;
-    STATUS_PAGE_TIMEOUT = 0x04;
-    STATUS_AUTH_FAILURE = 0x05;
-    STATUS_KEY_MISSING = 0x06;
-    STATUS_MEMORY_FULL = 0x07;
-    STATUS_CONNECTION_TOUT = 0x08;
-    STATUS_MAX_NUM_OF_CONNECTIONS = 0x09;
-    STATUS_MAX_NUM_OF_SCOS = 0x0A;
-    STATUS_CONNECTION_EXISTS = 0x0B;
-    STATUS_COMMAND_DISALLOWED = 0x0C;
-    STATUS_HOST_REJECT_RESOURCES = 0x0D;
-    STATUS_HOST_REJECT_SECURITY = 0x0E;
-    STATUS_HOST_REJECT_DEVICE = 0x0F;
-    STATUS_HOST_TIMEOUT = 0x10;
-    STATUS_UNSUPPORTED_VALUE = 0x11;
-    STATUS_ILLEGAL_PARAMETER_FMT = 0x12;
-    STATUS_PEER_USER = 0x13;
-    STATUS_PEER_LOW_RESOURCES = 0x14;
-    STATUS_PEER_POWER_OFF = 0x15;
-    STATUS_CONN_CAUSE_LOCAL_HOST = 0x16;
-    STATUS_REPEATED_ATTEMPTS = 0x17;
-    STATUS_PAIRING_NOT_ALLOWED = 0x18;
-    STATUS_UNKNOWN_LMP_PDU = 0x19;
-    STATUS_UNSUPPORTED_REM_FEATURE = 0x1A;
-    STATUS_SCO_OFFSET_REJECTED = 0x1B;
-    STATUS_SCO_INTERVAL_REJECTED = 0x1C;
-    STATUS_SCO_AIR_MODE = 0x1D;
-    STATUS_INVALID_LMP_PARAM = 0x1E;
-    STATUS_UNSPECIFIED = 0x1F;
-    STATUS_UNSUPPORTED_LMP_FEATURE = 0x20;
-    STATUS_ROLE_CHANGE_NOT_ALLOWED = 0x21;
-    STATUS_LMP_RESPONSE_TIMEOUT = 0x22;
-    STATUS_LMP_STATUS_TRANS_COLLISION = 0x23;
-    STATUS_LMP_PDU_NOT_ALLOWED = 0x24;
-    STATUS_ENCRY_MODE_NOT_ACCEPTABLE = 0x25;
-    STATUS_UNIT_KEY_USED = 0x26;
-    STATUS_QOS_NOT_SUPPORTED = 0x27;
-    STATUS_INSTANT_PASSED = 0x28;
-    STATUS_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = 0x29;
-    STATUS_DIFF_TRANSACTION_COLLISION = 0x2A;
-    STATUS_UNDEFINED_0x2B = 0x2B; // Not used
-    STATUS_QOS_UNACCEPTABLE_PARAM = 0x2C;
-    STATUS_QOS_REJECTED = 0x2D;
-    STATUS_CHAN_CLASSIF_NOT_SUPPORTED = 0x2E;
-    STATUS_INSUFFCIENT_SECURITY = 0x2F;
-    STATUS_PARAM_OUT_OF_RANGE = 0x30;
-    STATUS_UNDEFINED_0x31 = 0x31; // Not used
-    STATUS_ROLE_SWITCH_PENDING = 0x32;
-    STATUS_UNDEFINED_0x33 = 0x33;
-    STATUS_RESERVED_SLOT_VIOLATION = 0x34;
-    STATUS_ROLE_SWITCH_FAILED = 0x35;
-    STATUS_INQ_RSP_DATA_TOO_LARGE = 0x36;
-    STATUS_SIMPLE_PAIRING_NOT_SUPPORTED = 0x37;
-    STATUS_HOST_BUSY_PAIRING = 0x38;
-    STATUS_REJ_NO_SUITABLE_CHANNEL = 0x39;
-    STATUS_CONTROLLER_BUSY = 0x3A;
-    STATUS_UNACCEPT_CONN_INTERVAL = 0x3B;
-    STATUS_ADVERTISING_TIMEOUT = 0x3C;
-    STATUS_CONN_TOUT_DUE_TO_MIC_FAILURE = 0x3D;
-    STATUS_CONN_FAILED_ESTABLISHMENT = 0x3E;
-    STATUS_MAC_CONNECTION_FAILED = 0x3F;
-    STATUS_LT_ADDR_ALREADY_IN_USE = 0x40;
-    STATUS_LT_ADDR_NOT_ALLOCATED = 0x41;
-    STATUS_CLB_NOT_ENABLED = 0x42;
-    STATUS_CLB_DATA_TOO_BIG = 0x43;
-    STATUS_OPERATION_CANCELED_BY_HOST = 0x44; // Not currently used in system/bt
-}
-
-enum BqrIdEnum {
-    BQR_ID_UNKNOWN = 0x00;
-    BQR_ID_MONITOR_MODE = 0x01;
-    BQR_ID_APPROACH_LSTO = 0x02;
-    BQR_ID_A2DP_AUDIO_CHOPPY = 0x03;
-    BQR_ID_SCO_VOICE_CHOPPY = 0x04;
-}
-
-enum BqrPacketTypeEnum {
-    BQR_PACKET_TYPE_UNKNOWN = 0x00;
-    BQR_PACKET_TYPE_ID = 0x01;
-    BQR_PACKET_TYPE_NULL = 0x02;
-    BQR_PACKET_TYPE_POLL = 0x03;
-    BQR_PACKET_TYPE_FHS = 0x04;
-    BQR_PACKET_TYPE_HV1 = 0x05;
-    BQR_PACKET_TYPE_HV2 = 0x06;
-    BQR_PACKET_TYPE_HV3 = 0x07;
-    BQR_PACKET_TYPE_DV = 0x08;
-    BQR_PACKET_TYPE_EV3 = 0x09;
-    BQR_PACKET_TYPE_EV4 = 0x0A;
-    BQR_PACKET_TYPE_EV5 = 0x0B;
-    BQR_PACKET_TYPE_2EV3 = 0x0C;
-    BQR_PACKET_TYPE_2EV5 = 0x0D;
-    BQR_PACKET_TYPE_3EV3 = 0x0E;
-    BQR_PACKET_TYPE_3EV5 = 0x0F;
-    BQR_PACKET_TYPE_DM1 = 0x10;
-    BQR_PACKET_TYPE_DH1 = 0x11;
-    BQR_PACKET_TYPE_DM3 = 0x12;
-    BQR_PACKET_TYPE_DH3 = 0x13;
-    BQR_PACKET_TYPE_DM5 = 0x14;
-    BQR_PACKET_TYPE_DH5 = 0x15;
-    BQR_PACKET_TYPE_AUX1 = 0x16;
-    BQR_PACKET_TYPE_2DH1 = 0x17;
-    BQR_PACKET_TYPE_2DH3 = 0x18;
-    BQR_PACKET_TYPE_2DH5 = 0x19;
-    BQR_PACKET_TYPE_3DH1 = 0x1A;
-    BQR_PACKET_TYPE_3DH3 = 0x1B;
-    BQR_PACKET_TYPE_3DH5 = 0x1C;
-}
diff --git a/core/proto/android/bluetooth/hfp/enums.proto b/core/proto/android/bluetooth/hfp/enums.proto
deleted file mode 100644
index d286e4b..0000000
--- a/core/proto/android/bluetooth/hfp/enums.proto
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth.hfp;
-
-option java_outer_classname = "BluetoothHfpProtoEnums";
-option java_multiple_files = true;
-
-enum ScoCodec {
-    SCO_CODEC_UNKNOWN = 0;
-    SCO_CODEC_CVSD = 1;
-    // Default codec behind Wide Band Speech
-    SCO_CODEC_MSBC = 2;
-}
\ No newline at end of file
diff --git a/core/proto/android/bluetooth/smp/enums.proto b/core/proto/android/bluetooth/smp/enums.proto
deleted file mode 100644
index c6747b7..0000000
--- a/core/proto/android/bluetooth/smp/enums.proto
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 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.
- */
-
-syntax = "proto2";
-package android.bluetooth.smp;
-
-option java_outer_classname = "BluetoothSmpProtoEnums";
-option java_multiple_files = true;
-
-// SMP Pairing command codes
-enum CommandEnum {
-    CMD_UNKNOWN = 0x00;
-    CMD_PAIRING_REQUEST = 0x01;
-    CMD_PAIRING_RESPONSE = 0x02;
-    CMD_PAIRING_CONFIRM = 0x03;
-    CMD_PAIRING_RANDOM = 0x04;
-    CMD_PAIRING_FAILED = 0x05;
-    CMD_ENCRYPTION_INFON = 0x06;
-    CMD_MASTER_IDENTIFICATION = 0x07;
-    CMD_IDENTITY_INFO = 0x08;
-    CMD_IDENTITY_ADDR_INFO = 0x09;
-    CMD_SIGNING_INFO = 0x0A;
-    CMD_SECURITY_REQUEST = 0x0B;
-    CMD_PAIRING_PUBLIC_KEY = 0x0C;
-    CMD_PAIRING_DHKEY_CHECK = 0x0D;
-    CMD_PAIRING_KEYPRESS_INFO = 0x0E;
-}
-
-enum PairingFailReasonEnum {
-    PAIRING_FAIL_REASON_RESERVED = 0x00;
-    PAIRING_FAIL_REASON_PASSKEY_ENTRY = 0x01;
-    PAIRING_FAIL_REASON_OOB = 0x02;
-    PAIRING_FAIL_REASON_AUTH_REQ = 0x03;
-    PAIRING_FAIL_REASON_CONFIRM_VALUE = 0x04;
-    PAIRING_FAIL_REASON_PAIR_NOT_SUPPORT = 0x05;
-    PAIRING_FAIL_REASON_ENC_KEY_SIZE = 0x06;
-    PAIRING_FAIL_REASON_INVALID_CMD = 0x07;
-    PAIRING_FAIL_REASON_UNSPECIFIED = 0x08;
-    PAIRING_FAIL_REASON_REPEATED_ATTEMPTS = 0x09;
-    PAIRING_FAIL_REASON_INVALID_PARAMETERS = 0x0A;
-    PAIRING_FAIL_REASON_DHKEY_CHK = 0x0B;
-    PAIRING_FAIL_REASON_NUMERIC_COMPARISON = 0x0C;
-    PAIRING_FAIL_REASON_CLASSIC_PAIRING_IN_PROGR = 0x0D;
-    PAIRING_FAIL_REASON_XTRANS_DERIVE_NOT_ALLOW = 0x0E;
-}
\ No newline at end of file
diff --git a/core/proto/android/debug/enums.proto b/core/proto/android/debug/enums.proto
deleted file mode 100644
index 6747bb7..0000000
--- a/core/proto/android/debug/enums.proto
+++ /dev/null
@@ -1,67 +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.
- */
-
-syntax = "proto2";
-package android.debug;
-
-option java_outer_classname = "AdbProtoEnums";
-option java_multiple_files = true;
-
-/**
- * adb connection state used to track adb connection changes in AdbDebuggingManager.java.
- */
-enum AdbConnectionStateEnum {
-    UNKNOWN = 0;
-
-    /**
-     * The adb connection is waiting for approval from the user.
-     */
-    AWAITING_USER_APPROVAL = 1;
-
-    /**
-     * The user allowed the adb connection from the system.
-     */
-    USER_ALLOWED = 2;
-
-    /**
-     * The user denied the adb connection from the system.
-     */
-    USER_DENIED = 3;
-
-    /**
-     * The adb connection was automatically allowed without user interaction due to the system
-     * being previously allowed by the user with the 'always allow' option selected, and the adb
-     * grant has not yet expired.
-     */
-    AUTOMATICALLY_ALLOWED = 4;
-
-    /**
-     * An empty or invalid base64 encoded key was provided to the framework; the connection was
-     * automatically denied.
-     */
-    DENIED_INVALID_KEY = 5;
-
-    /**
-     * vold decrypt has not yet occurred; the connection was automatically denied.
-     */
-    DENIED_VOLD_DECRYPT = 6;
-
-    /**
-     * The adb session has been disconnected.
-     */
-    DISCONNECTED = 7;
-}
-
diff --git a/core/proto/android/hardware/biometrics/enums.proto b/core/proto/android/hardware/biometrics/enums.proto
deleted file mode 100644
index f2e0638..0000000
--- a/core/proto/android/hardware/biometrics/enums.proto
+++ /dev/null
@@ -1,60 +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.
- */
-
-syntax = "proto2";
-
-package android.hardware.biometrics;
-
-option java_outer_classname = "BiometricsProtoEnums";
-option java_multiple_files = true;
-
-// Logging constants for <Biometric>Service and BiometricService
-
-enum ModalityEnum {
-    MODALITY_UNKNOWN = 0;
-    MODALITY_FINGERPRINT = 1;   // 1 << 0
-    MODALITY_IRIS = 2;          // 1 << 1
-    MODALITY_FACE = 4;          // 1 << 2
-}
-
-enum ClientEnum {
-    CLIENT_UNKNOWN = 0;
-    CLIENT_KEYGUARD = 1;
-    CLIENT_BIOMETRIC_PROMPT = 2;
-    CLIENT_FINGERPRINT_MANAGER = 3; // Deprecated API before BiometricPrompt was introduced
-}
-
-enum ActionEnum {
-    ACTION_UNKNOWN = 0;
-    ACTION_ENROLL = 1;
-    ACTION_AUTHENTICATE = 2;
-    ACTION_ENUMERATE = 3;
-    ACTION_REMOVE = 4;
-}
-
-enum IssueEnum {
-    ISSUE_UNKNOWN = 0;
-    // When a biometric HAL has crashed.
-    ISSUE_HAL_DEATH = 1;
-    // When Android Framework has a template that doesn't exist in the HAL. The framework
-    // is expected to remove its template to stay in sync with the HAL.
-    ISSUE_UNKNOWN_TEMPLATE_ENROLLED_FRAMEWORK = 2;
-    // When the HAL has a template that doesn't exist in Android Framework. The framework
-    // is expected to notify the HAL to remove this template to stay in sync with the framework.
-    ISSUE_UNKNOWN_TEMPLATE_ENROLLED_HAL = 3;
-    // When the HAL has not sent ERROR_CANCELED within the specified timeout.
-    ISSUE_CANCEL_TIMED_OUT = 4;
-}
\ No newline at end of file
diff --git a/core/proto/android/hardware/sensor/assist/enums.proto b/core/proto/android/hardware/sensor/assist/enums.proto
deleted file mode 100644
index 012dcb2..0000000
--- a/core/proto/android/hardware/sensor/assist/enums.proto
+++ /dev/null
@@ -1,34 +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.
- */
-
-syntax = "proto2";
-package android.hardware.sensor.assist;
-
-option java_outer_classname = "AssistGestureProtoEnums";
-option java_multiple_files = true;
-
-enum AssistGestureStageEnum {
-    ASSIST_GESTURE_STAGE_UNKNOWN = 0;
-    ASSIST_GESTURE_STAGE_PROGRESS = 1;
-    ASSIST_GESTURE_STAGE_PRIMED = 2;
-    ASSIST_GESTURE_STAGE_DETECTED = 3;
-}
-
-enum AssistGestureFeedbackEnum {
-    ASSIST_GESTURE_FEEDBACK_UNKNOWN = 0;
-    ASSIST_GESTURE_FEEDBACK_NOT_USED = 1;
-    ASSIST_GESTURE_FEEDBACK_USED = 2;
-}
\ No newline at end of file
diff --git a/core/proto/android/net/networkcapabilities.proto b/core/proto/android/net/networkcapabilities.proto
deleted file mode 100644
index be0cad1..0000000
--- a/core/proto/android/net/networkcapabilities.proto
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.net;
-
-option java_multiple_files = true;
-
-import "frameworks/base/core/proto/android/privacy.proto";
-
-/**
- * An android.net.NetworkCapabilities object.
- */
-message NetworkCapabilitiesProto {
-    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    enum Transport {
-        // Indicates this network uses a Cellular transport.
-        TRANSPORT_CELLULAR = 0;
-        // Indicates this network uses a Wi-Fi transport.
-        TRANSPORT_WIFI = 1;
-        // Indicates this network uses a Bluetooth transport.
-        TRANSPORT_BLUETOOTH = 2;
-        // Indicates this network uses an Ethernet transport.
-        TRANSPORT_ETHERNET = 3;
-        // Indicates this network uses a VPN transport.
-        TRANSPORT_VPN = 4;
-        // Indicates this network uses a Wi-Fi Aware transport.
-        TRANSPORT_WIFI_AWARE = 5;
-        // Indicates this network uses a LoWPAN transport.
-        TRANSPORT_LOWPAN = 6;
-    }
-    repeated Transport transports = 1;
-
-    enum NetCapability {
-        // Indicates this is a network that has the ability to reach the
-        // carrier's MMSC for sending and receiving MMS messages.
-        NET_CAPABILITY_MMS = 0;
-        // Indicates this is a network that has the ability to reach the
-        // carrier's SUPL server, used to retrieve GPS information.
-        NET_CAPABILITY_SUPL = 1;
-        // Indicates this is a network that has the ability to reach the
-        // carrier's DUN or tethering gateway.
-        NET_CAPABILITY_DUN = 2;
-        // Indicates this is a network that has the ability to reach the
-        // carrier's FOTA portal, used for over the air updates.
-        NET_CAPABILITY_FOTA = 3;
-        // Indicates this is a network that has the ability to reach the
-        // carrier's IMS servers, used for network registration and signaling.
-        NET_CAPABILITY_IMS = 4;
-        // Indicates this is a network that has the ability to reach the
-        // carrier's CBS servers, used for carrier specific services.
-        NET_CAPABILITY_CBS = 5;
-        // Indicates this is a network that has the ability to reach a Wi-Fi
-        // direct peer.
-        NET_CAPABILITY_WIFI_P2P = 6;
-        // Indicates this is a network that has the ability to reach a carrier's
-        // Initial Attach servers.
-        NET_CAPABILITY_IA = 7;
-        // Indicates this is a network that has the ability to reach a carrier's
-        // RCS servers, used for Rich Communication Services.
-        NET_CAPABILITY_RCS = 8;
-        // Indicates this is a network that has the ability to reach a carrier's
-        // XCAP servers, used for configuration and control.
-        NET_CAPABILITY_XCAP = 9;
-        // Indicates this is a network that has the ability to reach a carrier's
-        // Emergency IMS servers or other services, used for network signaling
-        // during emergency calls.
-        NET_CAPABILITY_EIMS = 10;
-        // Indicates that this network is unmetered.
-        NET_CAPABILITY_NOT_METERED = 11;
-        // Indicates that this network should be able to reach the internet.
-        NET_CAPABILITY_INTERNET = 12;
-        // Indicates that this network is available for general use. If this is
-        // not set applications should not attempt to communicate on this
-        // network. Note that this is simply informative and not enforcement -
-        // enforcement is handled via other means. Set by default.
-        NET_CAPABILITY_NOT_RESTRICTED = 13;
-        // Indicates that the user has indicated implicit trust of this network.
-        // This generally means it's a sim-selected carrier, a plugged in
-        // ethernet, a paired BT device or a wifi the user asked to connect to.
-        // Untrusted networks are probably limited to unknown wifi AP. Set by
-        // default.
-        NET_CAPABILITY_TRUSTED = 14;
-        // Indicates that this network is not a VPN.  This capability is set by
-        // default and should be explicitly cleared for VPN networks.
-        NET_CAPABILITY_NOT_VPN = 15;
-        // Indicates that connectivity on this network was successfully
-        // validated. For example, for a network with NET_CAPABILITY_INTERNET,
-        // it means that Internet connectivity was successfully detected.
-        NET_CAPABILITY_VALIDATED = 16;
-        // Indicates that this network was found to have a captive portal in
-        // place last time it was probed.
-        NET_CAPABILITY_CAPTIVE_PORTAL = 17;
-        // Indicates that this network is not roaming.
-        NET_CAPABILITY_NOT_ROAMING = 18;
-        // Indicates that this network is available for use by apps, and not a
-        // network that is being kept up in the background to facilitate fast
-        // network switching.
-        NET_CAPABILITY_FOREGROUND = 19;
-    }
-    repeated NetCapability capabilities = 2;
-
-    // Passive link bandwidth. This is a rough guide of the expected peak
-    // bandwidth for the first hop on the given transport.  It is not measured,
-    // but may take into account link parameters (Radio technology, allocated
-    // channels, etc).
-    optional int32 link_up_bandwidth_kbps = 3;
-    optional int32 link_down_bandwidth_kbps = 4;
-
-    optional string network_specifier = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
-
-    // True if this object specifies a signal strength.
-    optional bool can_report_signal_strength = 6;
-    // This is a signed integer, and higher values indicate better signal. The
-    // exact units are bearer-dependent. For example, Wi-Fi uses RSSI.
-    // Only valid if can_report_signal_strength is true.
-    optional sint32 signal_strength = 7;
-}
diff --git a/core/proto/android/net/networkrequest.proto b/core/proto/android/net/networkrequest.proto
index b35a020..6794c8c 100644
--- a/core/proto/android/net/networkrequest.proto
+++ b/core/proto/android/net/networkrequest.proto
@@ -20,8 +20,8 @@
 
 option java_multiple_files = true;
 
-import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/net/networkcapabilities.proto";
 
 /**
  * An android.net.NetworkRequest object.
diff --git a/core/proto/android/os/batterystats.proto b/core/proto/android/os/batterystats.proto
index 892ebf7..7d68a0d 100644
--- a/core/proto/android/os/batterystats.proto
+++ b/core/proto/android/os/batterystats.proto
@@ -19,10 +19,10 @@
 
 package android.os;
 
-import "frameworks/base/core/proto/android/app/job/enums.proto";
 import "frameworks/base/core/proto/android/os/powermanager.proto";
-import "frameworks/base/core/proto/android/telephony/enums.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/app/job/enums.proto";
+import "frameworks/proto_logging/stats/enums/telephony/enums.proto";
 
 message BatteryStatsProto {
     option (android.msg_privacy).dest = DEST_AUTOMATIC;
diff --git a/core/proto/android/os/enums.proto b/core/proto/android/os/enums.proto
deleted file mode 100644
index 566861b..0000000
--- a/core/proto/android/os/enums.proto
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.os;
-
-option java_outer_classname = "OsProtoEnums";
-option java_multiple_files = true;
-
-// These constants are defined in hardware/interfaces/health/1.0/types.hal
-// They are primarily used by android/os/BatteryManager.java.
-enum BatteryHealthEnum {
-    BATTERY_HEALTH_INVALID = 0;
-    BATTERY_HEALTH_UNKNOWN = 1;
-    BATTERY_HEALTH_GOOD = 2;
-    BATTERY_HEALTH_OVERHEAT = 3;
-    BATTERY_HEALTH_DEAD = 4;
-    BATTERY_HEALTH_OVER_VOLTAGE = 5;
-    BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6;
-    BATTERY_HEALTH_COLD = 7;
-}
-
-// Plug states, primarily used by android/os/BatteryManager.java.
-enum BatteryPluggedStateEnum {
-    // Note that NONE is not in BatteryManager.java's constants.
-    BATTERY_PLUGGED_NONE = 0;
-    // Power source is an AC charger.
-    BATTERY_PLUGGED_AC = 1;
-    // Power source is a USB port.
-    BATTERY_PLUGGED_USB = 2;
-    // Power source is wireless.
-    BATTERY_PLUGGED_WIRELESS = 4;
-}
-
-// These constants are defined in hardware/interfaces/health/1.0/types.hal
-// They are primarily used by android/os/BatteryManager.java.
-enum BatteryStatusEnum {
-    BATTERY_STATUS_INVALID = 0;
-    BATTERY_STATUS_UNKNOWN = 1;
-    BATTERY_STATUS_CHARGING = 2;
-    BATTERY_STATUS_DISCHARGING = 3;
-    BATTERY_STATUS_NOT_CHARGING = 4;
-    BATTERY_STATUS_FULL = 5;
-}
-
-// These constants are defined in hardware/interfaces/thermal/1.0/types.hal
-// and in hardware/interfaces/thermal/2.0/types.hal
-// They are primarily used by android/os/HardwarePropertiesManager.java.
-// Any change to the types in the thermal hal should be made here as well.
-enum TemperatureTypeEnum {
-    TEMPERATURE_TYPE_UNKNOWN = -1;
-    TEMPERATURE_TYPE_CPU = 0;
-    TEMPERATURE_TYPE_GPU = 1;
-    TEMPERATURE_TYPE_BATTERY = 2;
-    TEMPERATURE_TYPE_SKIN = 3;
-    TEMPERATURE_TYPE_USB_PORT = 4;
-    TEMPERATURE_TYPE_POWER_AMPLIFIER = 5;
-
-    // Battery Charge Limit - virtual thermal sensors.
-    TEMPERATURE_TYPE_BCL_VOLTAGE = 6;
-    TEMPERATURE_TYPE_BCL_CURRENT = 7;
-    TEMPERATURE_TYPE_BCL_PERCENTAGE = 8;
-
-    // Neural Processing Unit.
-    TEMPERATURE_TYPE_NPU = 9;
-}
-
-// Device throttling severity
-// These constants are defined in hardware/interfaces/thermal/2.0/types.hal.
-// Any change to the types in the thermal hal should be made here as well.
-enum ThrottlingSeverityEnum {
-    // Not under throttling.
-    NONE = 0;
-    // Light throttling where UX is not impacted.
-    LIGHT = 1;
-    // Moderate throttling where UX is not largely impacted.
-    MODERATE = 2;
-    // Severe throttling where UX is largely impacted.
-    // Similar to 1.0 throttlingThreshold.
-    SEVERE = 3;
-    // Platform has done everything to reduce power.
-    CRITICAL = 4;
-    // Key components in platform are shutting down due to thermal condition.
-    // Device functionalities will be limited.
-    EMERGENCY = 5;
-    // Need shutdown immediately.
-    SHUTDOWN = 6;
-};
-
-// Device cooling device types.
-// These constants are defined in hardware/interfaces/thermal/2.0/types.hal.
-// Any change to the types in the thermal hal should be made here as well.
-enum CoolingTypeEnum {
-    FAN = 0;
-    BATTERY = 1;
-    CPU = 2;
-    GPU = 3;
-    MODEM = 4;
-    NPU = 5;
-    COMPONENT = 6;
-};
-
-// Wakelock types, primarily used by android/os/PowerManager.java.
-enum WakeLockLevelEnum {
-    // NOTE: Wake lock levels were previously defined as a bit field, except
-    // that only a few combinations were actually supported so the bit field
-    // was removed. This explains why the numbering scheme is so odd. If
-    // adding a new wake lock level, any unused value can be used.
-
-    // Ensures that the CPU is running; the screen and keyboard backlight
-    // will be allowed to go off.
-    PARTIAL_WAKE_LOCK = 1;
-
-    // Ensures that the screen is on (but may be dimmed); the keyboard
-    // backlight will be allowed to go off. If the user presses the power
-    // button, then the SCREEN_DIM_WAKE_LOCK will be implicitly released by
-    // the system, causing both the screen and the CPU to be turned off.
-    SCREEN_DIM_WAKE_LOCK = 6 [deprecated = true];
-
-    // Ensures that the screen is on at full brightness; the keyboard
-    // backlight will be allowed to go off. If the user presses the power
-    // button, then the SCREEN_BRIGHT_WAKE_LOCK will be implicitly released
-    // by the system, causing both the screen and the CPU to be turned off.
-    SCREEN_BRIGHT_WAKE_LOCK = 10 [deprecated = true];
-
-    // Ensures that the screen and keyboard backlight are on at full
-    // brightness. If the user presses the power button, then the
-    // FULL_WAKE_LOCK will be implicitly released by the system, causing
-    // both the screen and the CPU to be turned off.
-    FULL_WAKE_LOCK = 26 [deprecated = true];
-
-    // Turns the screen off when the proximity sensor activates. If the
-    // proximity sensor detects that an object is nearby, the screen turns
-    // off immediately. Shortly after the object moves away, the screen
-    // turns on again.
-    // A proximity wake lock does not prevent the device from falling asleep
-    // unlike FULL_WAKE_LOCK, SCREEN_BRIGHT_WAKE_LOCK and
-    // SCREEN_DIM_WAKE_LOCK. If there is no user activity and no other wake
-    // locks are held, then the device will fall asleep (and lock) as usual.
-    // However, the device will not fall asleep while the screen has been
-    // turned off by the proximity sensor because it effectively counts as
-    // ongoing user activity.
-    PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32;
-
-    // Put the screen in a low power state and allow the CPU to suspend if
-    // no other wake locks are held. This is used by the dream manager to
-    // implement doze mode. It currently has no effect unless the power
-    // manager is in the dozing state.
-    DOZE_WAKE_LOCK = 64;
-
-    // Keep the device awake enough to allow drawing to occur. This is used
-    // by the window manager to allow applications to draw while the system
-    // is dozing. It currently has no effect unless the power manager is in
-    // the dozing state.
-    DRAW_WAKE_LOCK = 128;
-}
diff --git a/core/proto/android/os/incident.proto b/core/proto/android/os/incident.proto
index 64cf75d..e97b1a8 100644
--- a/core/proto/android/os/incident.proto
+++ b/core/proto/android/os/incident.proto
@@ -55,13 +55,13 @@
 import "frameworks/base/core/proto/android/service/procstats.proto";
 import "frameworks/base/core/proto/android/service/restricted_image.proto";
 import "frameworks/base/core/proto/android/service/sensor_service.proto";
-import "frameworks/base/core/proto/android/service/usb.proto";
 import "frameworks/base/core/proto/android/util/event_log_tags.proto";
 import "frameworks/base/core/proto/android/util/log.proto";
 import "frameworks/base/core/proto/android/util/textdump.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
 import "frameworks/base/core/proto/android/section.proto";
 import "frameworks/base/proto/src/ipconnectivity.proto";
+import "frameworks/proto_logging/stats/enums/service/usb.proto";
 
 package android.os;
 
diff --git a/core/proto/android/providers/settings/global.proto b/core/proto/android/providers/settings/global.proto
index a80bb40..171a14b 100644
--- a/core/proto/android/providers/settings/global.proto
+++ b/core/proto/android/providers/settings/global.proto
@@ -433,35 +433,36 @@
         // Ordered GPU debug layer list for GLES
         // i.e. <layer1>:<layer2>:...:<layerN>
         optional SettingProto debug_layers_gles = 7;
-        // Game Driver - global preference for all Apps
+        // Updatable Driver - global preference for all Apps
         // 0 = Default
-        // 1 = All Apps use Game Driver
-        // 2 = All Apps use system graphics driver
-        optional SettingProto game_driver_all_apps = 8;
-        // Game Driver - List of Apps selected to use Game Driver
+        // 1 = All Apps use updatable production driver
+        // 2 = All apps use updatable prerelease driver
+        // 3 = All Apps use system graphics driver
+        optional SettingProto updatable_driver_all_apps = 8;
+        // Updatable Driver - List of Apps selected to use updatable production driver
         // i.e. <pkg1>,<pkg2>,...,<pkgN>
-        optional SettingProto game_driver_opt_in_apps = 9;
-        // Game Driver - List of Apps selected not to use Game Driver
+        optional SettingProto updatable_driver_production_opt_in_apps = 9;
+        // Updatable Driver - List of Apps selected not to use updatable production driver
         // i.e. <pkg1>,<pkg2>,...,<pkgN>
-        optional SettingProto game_driver_opt_out_apps = 10;
-        // Game Driver - List of Apps that are forbidden to use Game Driver
-        optional SettingProto game_driver_denylist = 11;
-        // Game Driver - List of Apps that are allowed to use Game Driver
-        optional SettingProto game_driver_allowlist = 12;
+        optional SettingProto updatable_driver_production_opt_out_apps = 10;
+        // Updatable Driver - List of Apps that are forbidden to use updatable production driver
+        optional SettingProto updatable_driver_production_denylist = 11;
+        // Updatable Driver - List of Apps that are allowed to use updatable production driver
+        optional SettingProto updatable_driver_production_allowlist = 12;
         // ANGLE - List of Apps that can check ANGLE rules
         optional SettingProto angle_allowlist = 13;
-        // Game Driver - List of denylists, each denylist is a denylist for
-        // a specific Game Driver version
-        optional SettingProto game_driver_denylists = 14;
+        // Updatable Driver - List of denylists, each denylist is a denylist for
+        // a specific updatable production driver version
+        optional SettingProto updatable_driver_production_denylists = 14;
         // ANGLE - Show a dialog box when ANGLE is selected for the currently running PKG
         optional SettingProto show_angle_in_use_dialog = 15;
-        // Game Driver - List of libraries in sphal accessible by Game Driver
-        optional SettingProto game_driver_sphal_libraries = 16;
+        // Updatable Driver - List of libraries in sphal accessible by updatable driver
+        optional SettingProto updatable_driver_sphal_libraries = 16;
         // ANGLE - External package containing ANGLE libraries
         optional SettingProto angle_debug_package = 17;
-        // Game Driver - List of Apps selected to use prerelease Game Driver
+        // Updatable Driver - List of Apps selected to use updatable prerelease driver
         // i.e. <pkg1>,<pkg2>,...,<pkgN>
-        optional SettingProto game_driver_prerelease_opt_in_apps = 18;
+        optional SettingProto updatable_driver_prerelease_opt_in_apps = 18;
     }
     optional Gpu gpu = 59;
 
diff --git a/core/proto/android/providers/settings/secure.proto b/core/proto/android/providers/settings/secure.proto
index fe8a0f1..cfd428c 100644
--- a/core/proto/android/providers/settings/secure.proto
+++ b/core/proto/android/providers/settings/secure.proto
@@ -119,6 +119,14 @@
     }
     optional Assist assist = 7;
 
+    message AssistHandles {
+        option (android.msg_privacy).dest = DEST_EXPLICIT;
+
+        optional SettingProto learning_time_elapsed_millis = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
+        optional SettingProto learning_event_count = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
+    }
+    optional AssistHandles assist_handles = 86;
+
     message Autofill {
         option (android.msg_privacy).dest = DEST_EXPLICIT;
 
@@ -180,6 +188,7 @@
     optional SettingProto cmas_additional_broadcast_pkg = 14 [ (android.privacy).dest = DEST_AUTOMATIC ];
     repeated SettingProto completed_categories = 15;
     optional SettingProto connectivity_release_pending_intent_delay_ms = 16 [ (android.privacy).dest = DEST_AUTOMATIC ];
+    optional SettingProto adaptive_connectivity_enabled = 84 [ (android.privacy).dest = DEST_AUTOMATIC ];
 
     message Controls {
         option (android.msg_privacy).dest = DEST_EXPLICIT;
@@ -595,5 +604,5 @@
 
     // Please insert fields in alphabetical order and group them into messages
     // if possible (to avoid reaching the method limit).
-    // Next tag = 82;
+    // Next tag = 87;
 }
diff --git a/core/proto/android/server/activitymanagerservice.proto b/core/proto/android/server/activitymanagerservice.proto
index 2d2ead4..fa046c6 100644
--- a/core/proto/android/server/activitymanagerservice.proto
+++ b/core/proto/android/server/activitymanagerservice.proto
@@ -20,7 +20,6 @@
 
 import "frameworks/base/core/proto/android/app/activitymanager.proto";
 import "frameworks/base/core/proto/android/app/appexitinfo.proto";
-import "frameworks/base/core/proto/android/app/enums.proto";
 import "frameworks/base/core/proto/android/app/notification.proto";
 import "frameworks/base/core/proto/android/app/profilerinfo.proto";
 import "frameworks/base/core/proto/android/content/component_name.proto";
@@ -35,6 +34,7 @@
 import "frameworks/base/core/proto/android/server/windowmanagerservice.proto";
 import "frameworks/base/core/proto/android/util/common.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/app/enums.proto";
 
 option java_multiple_files = true;
 
diff --git a/core/proto/android/server/bluetooth_manager_service.proto b/core/proto/android/server/bluetooth_manager_service.proto
index 998413f..c33f66a 100644
--- a/core/proto/android/server/bluetooth_manager_service.proto
+++ b/core/proto/android/server/bluetooth_manager_service.proto
@@ -17,8 +17,8 @@
 syntax = "proto2";
 package com.android.server;
 
-import "frameworks/base/core/proto/android/bluetooth/enums.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/bluetooth/enums.proto";
 
 option java_multiple_files = true;
 
diff --git a/core/proto/android/server/connectivity/Android.bp b/core/proto/android/server/connectivity/Android.bp
deleted file mode 100644
index 50c238b..0000000
--- a/core/proto/android/server/connectivity/Android.bp
+++ /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.
-
-java_library_static {
-    name: "datastallprotosnano",
-    proto: {
-        type: "nano",
-    },
-    srcs: [
-        "data_stall_event.proto",
-    ],
-    sdk_version: "system_current",
-    // this is part of updatable modules(NetworkStack) which targets 29(Q)
-    min_sdk_version: "29",
-}
diff --git a/core/proto/android/server/connectivity/data_stall_event.proto b/core/proto/android/server/connectivity/data_stall_event.proto
deleted file mode 100644
index 787074b..0000000
--- a/core/proto/android/server/connectivity/data_stall_event.proto
+++ /dev/null
@@ -1,91 +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.
- */
-
-syntax = "proto2";
-
-package com.android.server.connectivity;
-option java_multiple_files = true;
-option java_outer_classname = "DataStallEventProto";
-
-enum ProbeResult {
-    UNKNOWN = 0;
-    VALID = 1;
-    INVALID = 2;
-    PORTAL = 3;
-    PARTIAL = 4;
-}
-
-enum ApBand {
-    AP_BAND_UNKNOWN = 0;
-    AP_BAND_2GHZ = 1;
-    AP_BAND_5GHZ = 2;
-    AP_BAND_6GHZ = 3;
-}
-
-// Refer to definition in TelephonyManager.java.
-enum RadioTech {
-  RADIO_TECHNOLOGY_UNKNOWN = 0;
-  RADIO_TECHNOLOGY_GPRS = 1;
-  RADIO_TECHNOLOGY_EDGE = 2;
-  RADIO_TECHNOLOGY_UMTS = 3;
-  RADIO_TECHNOLOGY_IS95A = 4;
-  RADIO_TECHNOLOGY_IS95B = 5;
-  RADIO_TECHNOLOGY_1XRTT = 6;
-  RADIO_TECHNOLOGY_EVDO_0 = 7;
-  RADIO_TECHNOLOGY_EVDO_A = 8;
-  RADIO_TECHNOLOGY_HSDPA = 9;
-  RADIO_TECHNOLOGY_HSUPA = 10;
-  RADIO_TECHNOLOGY_HSPA = 11;
-  RADIO_TECHNOLOGY_EVDO_B = 12;
-  RADIO_TECHNOLOGY_LTE = 13;
-  RADIO_TECHNOLOGY_EHRPD = 14;
-  RADIO_TECHNOLOGY_HSPAP = 15;
-  RADIO_TECHNOLOGY_GSM = 16;
-  RADIO_TECHNOLOGY_TD_SCDMA = 17;
-  RADIO_TECHNOLOGY_IWLAN = 18;
-  RADIO_TECHNOLOGY_LTE_CA = 19;
-  RADIO_TECHNOLOGY_NR = 20;
-}
-
-// Cellular specific information.
-message CellularData {
-    // Indicate the radio technology at the time of data stall suspected.
-    optional RadioTech rat_type = 1;
-    // True if device is in roaming network at the time of data stall suspected.
-    optional bool is_roaming = 2;
-    // Registered network MccMnc when data stall happen
-    optional string network_mccmnc = 3;
-    // Indicate the SIM card carrier.
-    optional string sim_mccmnc = 4;
-    // Signal strength level at the time of data stall suspected.
-    optional int32 signal_strength = 5;
-}
-
-// Wifi specific information.
-message WifiData {
-    // Signal strength at the time of data stall suspected.
-    // RSSI range is between -55 to -110.
-    optional int32 signal_strength = 1;
-    // AP band.
-    optional ApBand wifi_band = 2;
-}
-
-message DnsEvent {
-    // The dns return code.
-    repeated int32 dns_return_code = 1;
-    // Indicate the timestamp of the dns event.
-    repeated int64 dns_time = 2;
-}
diff --git a/core/proto/android/server/enums.proto b/core/proto/android/server/enums.proto
deleted file mode 100644
index 89f7010..0000000
--- a/core/proto/android/server/enums.proto
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.server;
-
-option java_outer_classname = "ServerProtoEnums";
-option java_multiple_files = true;
-
-enum DeviceIdleModeEnum {
-    // Device idle mode - not active.
-    DEVICE_IDLE_MODE_OFF = 0;
-    // Device idle mode - active in lightweight mode.
-    DEVICE_IDLE_MODE_LIGHT = 1;
-    // Device idle mode - active in full mode.
-    DEVICE_IDLE_MODE_DEEP = 2;
-}
-
-enum ErrorSource {
-    ERROR_SOURCE_UNKNOWN = 0;
-    // Data app
-    DATA_APP = 1;
-    // System app
-    SYSTEM_APP = 2;
-    // System server.
-    SYSTEM_SERVER = 3;
-}
diff --git a/core/proto/android/server/job/enums.proto b/core/proto/android/server/job/enums.proto
deleted file mode 100644
index 50fc031..0000000
--- a/core/proto/android/server/job/enums.proto
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package com.android.server.job;
-
-// This file is for JobScheduler enums inside the server directory. If you're
-// adding enums for app-side code, use the file in
-// frameworks/base/core/proto/android/app/job.
-option java_outer_classname = "JobServerProtoEnums";
-option java_multiple_files = true;
-
-// Set of constraints that a job potentially needs satisfied before it can run.
-// Defined in
-// frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java
-enum ConstraintEnum {
-    CONSTRAINT_UNKNOWN = 0;
-    CONSTRAINT_CHARGING = 1;
-    CONSTRAINT_BATTERY_NOT_LOW = 2;
-    CONSTRAINT_STORAGE_NOT_LOW = 3;
-    CONSTRAINT_TIMING_DELAY = 4;
-    CONSTRAINT_DEADLINE = 5;
-    CONSTRAINT_IDLE = 6;
-    CONSTRAINT_CONNECTIVITY = 7;
-    CONSTRAINT_CONTENT_TRIGGER = 8;
-    CONSTRAINT_DEVICE_NOT_DOZING = 9;
-    CONSTRAINT_WITHIN_QUOTA = 10;
-    CONSTRAINT_BACKGROUND_NOT_RESTRICTED = 11;
-}
diff --git a/core/proto/android/server/jobscheduler.proto b/core/proto/android/server/jobscheduler.proto
index f2f20e3a..d16ba28 100644
--- a/core/proto/android/server/jobscheduler.proto
+++ b/core/proto/android/server/jobscheduler.proto
@@ -20,7 +20,6 @@
 
 option java_multiple_files = true;
 
-import "frameworks/base/core/proto/android/app/job/enums.proto";
 import "frameworks/base/core/proto/android/content/clipdata.proto";
 import "frameworks/base/core/proto/android/content/component_name.proto";
 import "frameworks/base/core/proto/android/content/intent.proto";
@@ -29,10 +28,11 @@
 import "frameworks/base/core/proto/android/os/bundle.proto";
 import "frameworks/base/core/proto/android/os/persistablebundle.proto";
 import "frameworks/base/core/proto/android/server/appstatetracker.proto";
-import "frameworks/base/core/proto/android/server/job/enums.proto";
 import "frameworks/base/core/proto/android/server/statlogger.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
 import "frameworks/base/core/proto/android/util/quotatracker.proto";
+import "frameworks/proto_logging/stats/enums/app/job/enums.proto";
+import "frameworks/proto_logging/stats/enums/server/job/enums.proto";
 
 message JobSchedulerServiceDumpProto {
     option (.android.msg_privacy).dest = DEST_AUTOMATIC;
diff --git a/core/proto/android/server/location/enums.proto b/core/proto/android/server/location/enums.proto
deleted file mode 100644
index 943ff18..0000000
--- a/core/proto/android/server/location/enums.proto
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.server.location;
-
-option java_outer_classname = "ServerLocationProtoEnums";
-option java_multiple_files = true;
-
-// GPS Signal Quality levels,
-// primarily used by location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
-enum GpsSignalQualityEnum {
-    GPS_SIGNAL_QUALITY_UNKNOWN = -1;
-    GPS_SIGNAL_QUALITY_POOR = 0;
-    GPS_SIGNAL_QUALITY_GOOD = 1;
-}
-
-// A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
-enum GnssNiType {
-    VOICE = 1;
-    UMTS_SUPL = 2;
-    UMTS_CTRL_PLANE = 3;
-    EMERGENCY_SUPL = 4;
-};
-
-// GNSS NI responses, used to define the response in NI structures.
-enum GnssUserResponseType {
-    RESPONSE_ACCEPT = 1;
-    RESPONSE_DENY = 2;
-    RESPONSE_NORESP = 3;
-};
-
-// GNSS NI data encoding scheme.
-enum GnssNiEncodingType {
-    ENC_NONE = 0;
-    ENC_SUPL_GSM_DEFAULT = 1;
-    ENC_SUPL_UTF8 = 2;
-    ENC_SUPL_UCS2 = 3;
-    ENC_UNKNOWN = -1;
-};
-
-// Protocol stack that initiated the non-framework location request.
-enum NfwProtocolStack {
-    // Cellular control plane requests.
-    CTRL_PLANE = 0;
-    // All types of SUPL requests.
-    SUPL = 1;
-    // All types of requests from IMS.
-    IMS = 10;
-    // All types of requests from SIM.
-    SIM = 11;
-    // Requests from other protocol stacks.
-    OTHER_PROTOCOL_STACK = 100;
-};
-
-// Source initiating/receiving the location information.
-enum NfwRequestor  {
-    // Wireless service provider.
-    CARRIER = 0;
-    // Device manufacturer.
-    OEM = 10;
-    // Modem chipset vendor.
-    MODEM_CHIPSET_VENDOR = 11;
-    // GNSS chipset vendor.
-    GNSS_CHIPSET_VENDOR = 12;
-    // Other chipset vendor.
-    OTHER_CHIPSET_VENDOR = 13;
-    // Automobile client.
-    AUTOMOBILE_CLIENT = 20;
-    // Other sources.
-    OTHER_REQUESTOR = 100;
-};
-
-// Indicates whether location information was provided for this request.
-enum NfwResponseType {
-    // Request rejected because framework has not given permission for this use case.
-    REJECTED = 0;
-    // Request accepted but could not provide location because of a failure.
-    ACCEPTED_NO_LOCATION_PROVIDED = 1;
-    // Request accepted and location provided.
-    ACCEPTED_LOCATION_PROVIDED = 2;
-};
-
-// The SUPL mode.
-enum SuplMode {
-    // Mobile Station Based.
-    MSB = 0x01;
-    // Mobile Station Assisted.
-    MSA = 0x02;
-};
-
-// Enum that hold the bit masks for various LTE Positioning Profile settings (LPP_PROFILE
-// configuration parameter). If none of the bits in the enum are set, the default setting is
-// Radio Resource Location Protocol(RRLP).
-enum LppProfile {
-    // Enable LTE Positioning Protocol user plane.
-    USER_PLANE = 0x01;
-    // Enable LTE Positioning Protocol Control plane.
-    CONTROL_PLANE = 0x02;
-};
-
-// Positioning protocol on A-Glonass system.
-enum GlonassPosProtocol {
-    // Radio Resource Control(RRC) control-plane.
-    RRC_CPLANE = 0x01;
-    // Radio Resource Location user-plane.
-    RRLP_CPLANE = 0x02;
-    // LTE Positioning Protocol User plane.
-    LPP_UPLANE = 0x04;
-};
-
-// Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
-enum GpsLock {
-    // Lock Mobile Originated GPS functionalitues.
-    MO = 0x01;
-    // Lock Network Initiated GPS functionalities.
-    NI = 0x02;
-};
diff --git a/core/proto/android/server/powermanagerservice.proto b/core/proto/android/server/powermanagerservice.proto
index 0455d58..c5c4d7c 100644
--- a/core/proto/android/server/powermanagerservice.proto
+++ b/core/proto/android/server/powermanagerservice.proto
@@ -19,16 +19,16 @@
 
 option java_multiple_files = true;
 
-import "frameworks/base/core/proto/android/app/enums.proto";
 import "frameworks/base/core/proto/android/content/intent.proto";
-import "frameworks/base/core/proto/android/os/enums.proto";
 import "frameworks/base/core/proto/android/os/looper.proto";
 import "frameworks/base/core/proto/android/os/powermanager.proto";
 import "frameworks/base/core/proto/android/os/worksource.proto";
 import "frameworks/base/core/proto/android/providers/settings.proto";
 import "frameworks/base/core/proto/android/server/wirelesschargerdetector.proto";
-import "frameworks/base/core/proto/android/view/enums.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/app/enums.proto";
+import "frameworks/proto_logging/stats/enums/os/enums.proto";
+import "frameworks/proto_logging/stats/enums/view/enums.proto";
 
 message PowerManagerServiceDumpProto {
     option (.android.msg_privacy).dest = DEST_AUTOMATIC;
diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto
index 0f5616f..420fc7d 100644
--- a/core/proto/android/server/windowmanagerservice.proto
+++ b/core/proto/android/server/windowmanagerservice.proto
@@ -24,11 +24,12 @@
 import "frameworks/base/core/proto/android/server/surfaceanimator.proto";
 import "frameworks/base/core/proto/android/view/displaycutout.proto";
 import "frameworks/base/core/proto/android/view/displayinfo.proto";
-import "frameworks/base/core/proto/android/view/enums.proto";
 import "frameworks/base/core/proto/android/view/surface.proto";
 import "frameworks/base/core/proto/android/view/windowlayoutparams.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
 
+import "frameworks/proto_logging/stats/enums/view/enums.proto";
+
 package com.android.server.wm;
 
 option java_multiple_files = true;
diff --git a/core/proto/android/service/battery.proto b/core/proto/android/service/battery.proto
index 586411f..3a112e7 100644
--- a/core/proto/android/service/battery.proto
+++ b/core/proto/android/service/battery.proto
@@ -20,8 +20,8 @@
 option java_multiple_files = true;
 option java_outer_classname = "BatteryServiceProto";
 
-import "frameworks/base/core/proto/android/os/enums.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/os/enums.proto";
 
 message BatteryServiceDumpProto {
     option (android.msg_privacy).dest = DEST_AUTOMATIC;
diff --git a/core/proto/android/service/procstats.proto b/core/proto/android/service/procstats.proto
index 7a4c070..57051f0 100644
--- a/core/proto/android/service/procstats.proto
+++ b/core/proto/android/service/procstats.proto
@@ -21,8 +21,8 @@
 option java_outer_classname = "ProcessStatsServiceProto";
 
 import "frameworks/base/core/proto/android/util/common.proto";
-import "frameworks/base/core/proto/android/service/procstats_enum.proto";
 import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/service/procstats_enum.proto";
 
 /**
  * Data from ProcStatsService Dumpsys
diff --git a/core/proto/android/service/procstats_enum.proto b/core/proto/android/service/procstats_enum.proto
deleted file mode 100644
index 2abf373..0000000
--- a/core/proto/android/service/procstats_enum.proto
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.service.procstats;
-
-option java_multiple_files = true;
-option java_outer_classname = "ProcessStatsEnums";
-
-enum ScreenState {
-    SCREEN_STATE_UNKNOWN = 0;
-    SCREEN_STATE_OFF = 1;
-    SCREEN_STATE_ON = 2;
-}
-
-enum MemoryState {
-    MEMORY_STATE_UNKNOWN = 0;
-    MEMORY_STATE_NORMAL = 1;     // normal.
-    MEMORY_STATE_MODERATE = 2;   // moderate memory pressure.
-    MEMORY_STATE_LOW = 3;        // low memory.
-    MEMORY_STATE_CRITICAL = 4;   // critical memory.
-}
-
-// this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
-// and not frameworks/base/core/java/android/app/ActivityManager.java
-enum ProcessState {
-    PROCESS_STATE_UNKNOWN = 0;
-    // Persistent system process.
-    PROCESS_STATE_PERSISTENT = 1;
-    // Top activity; actually any visible activity.
-    PROCESS_STATE_TOP = 2;
-    // Important foreground process (ime, wallpaper, etc).
-    PROCESS_STATE_IMPORTANT_FOREGROUND = 3;
-    // Important background process.
-    PROCESS_STATE_IMPORTANT_BACKGROUND = 4;
-    // Performing backup operation.
-    PROCESS_STATE_BACKUP = 5;
-    // Background process running a service.
-    PROCESS_STATE_SERVICE = 6;
-    // Process not running, but would be if there was enough RAM.
-    PROCESS_STATE_SERVICE_RESTARTING = 7;
-    // Process running a receiver.
-    PROCESS_STATE_RECEIVER = 8;
-    // Heavy-weight process (currently not used).
-    PROCESS_STATE_HEAVY_WEIGHT = 9;
-    // Process hosting home/launcher app when not on top.
-    PROCESS_STATE_HOME = 10;
-    // Process hosting the last app the user was in.
-    PROCESS_STATE_LAST_ACTIVITY = 11;
-    // Cached process hosting a previous activity.
-    PROCESS_STATE_CACHED_ACTIVITY = 12;
-    // Cached process hosting a client activity.
-    PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 13;
-    // Cached process that is empty.
-    PROCESS_STATE_CACHED_EMPTY = 14;
-}
-
-enum ServiceOperationState {
-    SERVICE_OPERATION_STATE_UNKNOWN = 0;
-    SERVICE_OPERATION_STATE_RUNNING = 1;
-    SERVICE_OPERATION_STATE_STARTED = 2;
-    SERVICE_OPERATION_STATE_FOREGROUND = 3;
-    SERVICE_OPERATION_STATE_BOUND = 4;
-    SERVICE_OPERATION_STATE_EXECUTING = 5;
-}
-
-// this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
-// and not frameworks/base/core/java/android/app/ActivityManager.java
-enum AggregatedProcessState {
-    AGGREGATED_PROCESS_STATE_UNKNOWN = 0;
-    // Persistent system process; PERSISTENT or PERSISTENT_UI in ActivityManager
-    AGGREGATED_PROCESS_STATE_PERSISTENT = 1;
-    // Top activity; actually any visible activity; TOP or TOP_SLEEPING in ActivityManager
-    AGGREGATED_PROCESS_STATE_TOP = 2;
-    // Bound top foreground process; BOUND_TOP or BOUND_FOREGROUND_SERVICE in ActivityManager
-    AGGREGATED_PROCESS_STATE_BOUND_TOP_OR_FGS = 3;
-    // Important foreground process; FOREGROUND_SERVICE in ActivityManager
-    AGGREGATED_PROCESS_STATE_FGS = 4;
-    // Important foreground process ; IMPORTANT_FOREGROUND in ActivityManager
-    AGGREGATED_PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
-    // Various background processes; IMPORTANT_BACKGROUND, TRANSIENT_BACKGROUND, BACKUP, SERVICE,
-    // HEAVY_WEIGHT in ActivityManager
-    AGGREGATED_PROCESS_STATE_BACKGROUND = 6;
-    // Process running a receiver; RECEIVER in ActivityManager
-    AGGREGATED_PROCESS_STATE_RECEIVER = 7;
-    // Various cached processes; HOME, LAST_ACTIVITY, CACHED_ACTIVITY, CACHED_RECENT,
-    // CACHED_ACTIVITY_CLIENT, CACHED_EMPTY in ActivityManager
-    AGGREGATED_PROCESS_STATE_CACHED = 8;
-}
\ No newline at end of file
diff --git a/core/proto/android/service/usb.proto b/core/proto/android/service/usb.proto
deleted file mode 100644
index 40c5a85..0000000
--- a/core/proto/android/service/usb.proto
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.service.usb;
-
-option java_multiple_files = true;
-option java_outer_classname = "UsbServiceProto";
-
-import "frameworks/base/core/proto/android/content/component_name.proto";
-import "frameworks/base/core/proto/android/service/enums.proto";
-import "frameworks/base/core/proto/android/privacy.proto";
-
-message UsbServiceDumpProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional UsbDeviceManagerProto device_manager = 1;
-    optional UsbHostManagerProto host_manager = 2;
-    optional UsbPortManagerProto port_manager = 3;
-    optional UsbAlsaManagerProto alsa_manager = 4;
-    optional UsbSettingsManagerProto settings_manager = 5;
-    optional UsbPermissionsManagerProto permissions_manager = 6;
-}
-
-message UsbDeviceManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional UsbHandlerProto handler = 1;
-    optional UsbDebuggingManagerProto debugging_manager = 2;
-}
-
-message UsbHandlerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    /* Same as android.hardware.usb.gadget.V1_0.GadgetFunction.* */
-    enum Function {
-        FUNCTION_ADB = 1;
-        FUNCTION_ACCESSORY = 2;
-        FUNCTION_MTP = 4;
-        FUNCTION_MIDI = 8;
-        FUNCTION_PTP = 16;
-        FUNCTION_RNDIS = 32;
-        FUNCTION_AUDIO_SOURCE = 64;
-    }
-
-    repeated Function current_functions = 1;
-    optional bool current_functions_applied = 2;
-    repeated Function screen_unlocked_functions = 3;
-    optional bool screen_locked = 4;
-    optional bool connected = 5;
-    optional bool configured = 6;
-    optional UsbAccessoryProto current_accessory = 7;
-    optional bool host_connected = 8;
-    optional bool source_power = 9;
-    optional bool sink_power = 10;
-    optional bool usb_charging = 11;
-    optional bool hide_usb_notification = 12;
-    optional bool audio_accessory_connected = 13;
-    optional bool adb_enabled = 14;
-    optional string kernel_state = 15;
-    optional string kernel_function_list = 16;
-}
-
-message UsbAccessoryProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional string manufacturer = 1;
-    optional string model = 2;
-    // For "classical" USB-accessories the manufacturer bakes this into the
-    // firmware of the device. If an Android phone is configured as accessory, the
-    // app that sets up the accessory side of the connection set this. Either way,
-    // these are part of the detection protocol, and so they cannot be user set or
-    // unique.
-    optional string description = 3;
-    optional string version = 4;
-    optional string uri = 5 [ (android.privacy).dest = DEST_EXPLICIT ];
-    // Non-resettable hardware ID.
-    optional string serial = 6 [ (android.privacy).dest = DEST_LOCAL ];
-}
-
-message UsbDebuggingManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional bool connected_to_adb = 1;
-    // A workstation that connects to the phone for debugging is identified by
-    // this key.
-    optional string last_key_received = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
-    optional string user_keys = 3 [ (android.privacy).dest = DEST_LOCAL ];
-    optional string system_keys = 4 [ (android.privacy).dest = DEST_LOCAL ];
-}
-
-message UsbHostManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional android.content.ComponentNameProto default_usb_host_connection_handler = 1;
-    repeated UsbDeviceProto devices = 2;
-    optional int32 num_connects = 3;
-    repeated UsbConnectionRecordProto connections = 4;
-}
-
-message UsbDeviceProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    // Generic USB name, not user-provided.
-    optional string name = 1;
-    // ID specific to the vendor, not the device.
-    optional int32 vendor_id = 2;
-    // ID of this product type: Each vendor gives each product a unique ID. E.g.
-    // all mice of the same model would have the same ID.
-    optional int32 product_id = 3;
-    optional int32 class = 4;
-    optional int32 subclass = 5;
-    optional int32 protocol = 6;
-    optional string manufacturer_name = 7;
-    optional string product_name = 8;
-    optional string version = 9;
-    // Non-resettable hardware ID.
-    optional string serial_number = 10 [ (android.privacy).dest = DEST_LOCAL ];
-    repeated UsbConfigurationProto configurations = 11;
-}
-
-message UsbConfigurationProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    // A single USB device can have several configurations and the app accessing
-    // the USB device can switch between them. At any time only one can be active.
-    // Each configuration can present completely different interfaces end
-    // endpoints, i.e. a completely different behavior.
-    optional int32 id = 1;
-    // Hardware-defined name, not set by the user.
-    optional string name = 2;
-    optional uint32 attributes = 3;
-    optional int32 max_power = 4;
-    repeated UsbInterfaceProto interfaces = 5;
-}
-
-message UsbInterfaceProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    // Hardware defined. This is the id used by the app to identify the interface.
-    optional int32 id = 1;
-    optional int32 alternate_settings = 2;
-    optional string name = 3;
-    optional int32 class = 4;
-    optional int32 subclass = 5;
-    optional int32 protocol = 6;
-    repeated UsbEndPointProto endpoints = 7;
-}
-
-message UsbEndPointProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional int32 endpoint_number = 1;
-    optional android.service.UsbEndPointDirection direction = 2;
-      // The address of the endpoint. Needed to read and write to the endpoint.
-    optional int32 address = 3;
-    optional android.service.UsbEndPointType type = 4;
-    optional uint32 attributes = 5;
-    optional int32 max_packet_size = 6;
-    optional int32 interval = 7;
-}
-
-message UsbConnectionRecordProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    // usb device's address, e.g. 001/002, nothing about the phone
-    optional string device_address = 1;
-    optional android.service.UsbConnectionRecordMode mode = 2;
-    optional int64 timestamp = 3;
-    optional int32 manufacturer = 4;
-    optional int32 product = 5;
-    optional UsbIsHeadsetProto is_headset = 6;
-}
-
-message UsbIsHeadsetProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional bool in = 1;
-    optional bool out = 2;
-}
-
-message UsbPortManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional bool is_simulation_active = 1;
-    repeated UsbPortInfoProto usb_ports = 2;
-}
-
-message UsbPortInfoProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional UsbPortProto port = 1;
-    optional UsbPortStatusProto status = 2;
-    optional bool can_change_mode = 3;
-    optional bool can_change_power_role = 4;
-    optional bool can_change_data_role = 5;
-    optional int64 connected_at_millis = 6;
-    optional int64 last_connect_duration_millis = 7;
-}
-
-message UsbPortProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    /* Same as android.hardware.usb.V1_1.Constants.PortMode_1_1 */
-    enum Mode {
-        MODE_NONE = 0;
-        MODE_UFP = 1;
-        MODE_DFP = 2;
-        MODE_DRP = 3;
-        MODE_AUDIO_ACCESSORY = 4;
-        MODE_DEBUG_ACCESSORY = 8;
-    }
-
-    // ID of the port. A device (eg: Chromebooks) might have multiple ports.
-    optional string id = 1;
-    repeated Mode supported_modes = 2;
-}
-
-/* Same as android.hardware.usb.V1_2.Constants.ContaminantPresenceStatus */
-enum ContaminantPresenceStatus {
-    CONTAMINANT_STATUS_UNKNOWN = 0;
-    CONTAMINANT_STATUS_NOT_SUPPORTED = 1;
-    CONTAMINANT_STATUS_DISABLED = 2;
-    CONTAMINANT_STATUS_NOT_DETECTED = 3;
-    CONTAMINANT_STATUS_DETECTED = 4;
-}
-
-message UsbPortStatusProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    /* Same as android.hardware.usb.V1_0.Constants.PortPowerRole */
-    enum PowerRole {
-        POWER_ROLE_NONE = 0;
-        POWER_ROLE_SOURCE = 1;
-        POWER_ROLE_SINK = 2;
-    }
-
-    /* Same as android.hardware.usb.V1_0.Constants.PortDataRole */
-    enum DataRole {
-        DATA_ROLE_NONE = 0;
-        DATA_ROLE_HOST = 1;
-        DATA_ROLE_DEVICE = 2;
-    }
-
-    optional bool connected = 1;
-    optional UsbPortProto.Mode current_mode = 2;
-    optional PowerRole power_role = 3;
-    optional DataRole data_role = 4;
-    repeated UsbPortStatusRoleCombinationProto role_combinations = 5;
-    optional ContaminantPresenceStatus contaminant_presence_status = 6;
-}
-
-message UsbPortStatusRoleCombinationProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional UsbPortStatusProto.PowerRole power_role = 1;
-    optional UsbPortStatusProto.DataRole data_role = 2;
-}
-
-message UsbAlsaManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional int32 cards_parser = 1;
-    repeated UsbAlsaDeviceProto alsa_devices = 2;
-    repeated UsbMidiDeviceProto midi_devices = 3;
-}
-
-message UsbAlsaDeviceProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional int32 card = 1;
-    optional int32 device = 2;
-    optional string name = 3;
-    optional bool has_playback = 4;
-    optional bool has_capture = 5;
-    // usb device's address, e.g. 001/002, nothing about the phone
-    optional string address = 6;
-}
-
-message UsbMidiDeviceProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional int32 card = 1;
-    optional int32 device = 2;
-    // usb device's address, e.g. 001/002, nothing about the phone
-    optional string device_address = 3;
-}
-
-message UsbSettingsManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    repeated UsbUserSettingsManagerProto user_settings = 1;
-    repeated UsbProfileGroupSettingsManagerProto profile_group_settings = 2;
-}
-
-message UsbUserSettingsManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional int32 user_id = 1;
-    reserved 2; // previously device_permissions, now unused
-    reserved 3; // previously accessory_permissions, now unused
-    repeated UsbDeviceAttachedActivities device_attached_activities = 4;
-    repeated UsbAccessoryAttachedActivities accessory_attached_activities = 5;
-}
-
-message UsbProfileGroupSettingsManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    // The user id of the personal profile if the device has a work profile.
-    optional int32 parent_user_id = 1;
-    repeated UsbSettingsDevicePreferenceProto device_preferences = 2;
-    repeated UsbSettingsAccessoryPreferenceProto accessory_preferences = 3;
-}
-
-message UsbSettingsDevicePreferenceProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional UsbDeviceFilterProto filter = 1;
-    optional UserPackageProto user_package = 2;
-}
-
-message UsbPermissionsManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    repeated UsbUserPermissionsManagerProto user_permissions = 1;
-}
-
-message UsbUserPermissionsManagerProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional int32 user_id = 1;
-
-    repeated UsbDevicePermissionProto device_permissions = 2;
-    repeated UsbAccessoryPermissionProto accessory_permissions = 3;
-
-    repeated UsbDevicePersistentPermissionProto device_persistent_permissions = 4;
-    repeated UsbAccessoryPersistentPermissionProto accessory_persistent_permissions = 5;
-}
-
-message UsbDevicePermissionProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    // Name of device set by manufacturer
-    // All devices of the same model have the same name
-    optional string device_name = 1;
-    repeated int32 uids = 2;
-}
-
-message UsbAccessoryPermissionProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    // Description of accessory set by manufacturer
-    // All accessories of the same model have the same description
-    optional string accessory_description = 1;
-    repeated int32 uids = 2;
-}
-
-message UsbDevicePersistentPermissionProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional UsbDeviceFilterProto device_filter = 1;
-    repeated UsbUidPermissionProto permission_values = 2;
-}
-
-message UsbAccessoryPersistentPermissionProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional UsbAccessoryFilterProto accessory_filter = 1;
-    repeated UsbUidPermissionProto permission_values = 2;
-}
-
-message UsbUidPermissionProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional int32 uid = 1;
-    optional bool is_granted = 2;
-}
-
-message UsbDeviceFilterProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    // Mirrors the vendor_id of UsbDeviceProto.
-    optional int32 vendor_id = 1;
-    optional int32 product_id = 2;
-    optional int32 class = 3;
-    optional int32 subclass = 4;
-    optional int32 protocol = 5;
-    optional string manufacturer_name = 6;
-    optional string product_name = 7;
-    optional string serial_number = 8 [ (android.privacy).dest = DEST_EXPLICIT ];
-}
-
-message UserPackageProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional int32 user_id = 1;
-    optional string package_name =2;
-}
-
-message UsbSettingsAccessoryPreferenceProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional UsbAccessoryFilterProto filter = 1;
-    optional UserPackageProto user_package = 2;
-}
-
-message UsbAccessoryFilterProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional string manufacturer = 1;
-    optional string model = 2;
-    optional string version = 3;
-}
-
-message UsbDeviceAttachedActivities {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional android.content.ComponentNameProto activity = 1;
-    repeated UsbDeviceFilterProto filters = 2;
-}
-
-message UsbAccessoryAttachedActivities {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional android.content.ComponentNameProto activity = 1;
-    repeated UsbAccessoryFilterProto filters = 2;
-}
diff --git a/core/proto/android/stats/accessibility/accessibility_enums.proto b/core/proto/android/stats/accessibility/accessibility_enums.proto
deleted file mode 100644
index 5118ad5..0000000
--- a/core/proto/android/stats/accessibility/accessibility_enums.proto
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.accessibility;
-option java_multiple_files = true;
-
-// The entry point of the accessibility shortcut.
-enum ShortcutType {
-  UNKNOWN_TYPE = 0;
-  A11Y_BUTTON = 1;
-  VOLUME_KEY = 2;
-  TRIPLE_TAP = 3;
-  A11Y_BUTTON_LONG_PRESS = 4;
-}
-
-// The service status code.
-enum ServiceStatus {
-  UNKNOWN = 0;
-  ENABLED = 1;
-  DISABLED = 2;
-}
\ No newline at end of file
diff --git a/core/proto/android/stats/connectivity/Android.bp b/core/proto/android/stats/connectivity/Android.bp
deleted file mode 100644
index 5e6ac3c..0000000
--- a/core/proto/android/stats/connectivity/Android.bp
+++ /dev/null
@@ -1,38 +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.
-
-java_library_static {
-    name: "networkstackprotos",
-    proto: {
-        type: "lite",
-    },
-    srcs: [
-        "network_stack.proto",
-    ],
-    sdk_version: "system_29",
-}
-
-java_library_static {
-    name: "tetheringprotos",
-    proto: {
-        type: "lite",
-    },
-    srcs: [
-        "tethering.proto",
-    ],
-    apex_available: [
-        "com.android.tethering",
-    ],
-    sdk_version: "system_current",
-}
diff --git a/core/proto/android/stats/connectivity/network_stack.proto b/core/proto/android/stats/connectivity/network_stack.proto
deleted file mode 100644
index e9726d7..0000000
--- a/core/proto/android/stats/connectivity/network_stack.proto
+++ /dev/null
@@ -1,180 +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.
- */
-
-syntax = "proto2";
-
-package android.stats.connectivity;
-option java_multiple_files = true;
-option java_outer_classname = "NetworkStackProto";
-
-enum DhcpRenewResult {
-    RR_UNKNOWN = 0;
-    RR_SUCCESS = 1;
-    RR_ERROR_NAK = 2;
-    RR_ERROR_IP_MISMATCH = 3;
-    RR_ERROR_IP_EXPIRE = 4;
-}
-
-enum DisconnectCode {
-    DC_NONE = 0;
-    DC_NORMAL_TERMINATION = 1;
-    DC_PROVISIONING_FAIL = 2;
-    DC_ERROR_STARTING_IPV4 = 4;
-    DC_ERROR_STARTING_IPV6 = 5;
-    DC_ERROR_STARTING_IPREACHABILITYMONITOR = 6;
-    DC_INVALID_PROVISIONING = 7;
-    DC_INTERFACE_NOT_FOUND = 8;
-    DC_PROVISIONING_TIMEOUT = 9;
-}
-
-enum TransportType {
-    TT_UNKNOWN = 0;
-    // Indicates this network uses a Cellular transport
-    TT_CELLULAR = 1;
-    // Indicates this network uses a Wi-Fi transport
-    TT_WIFI = 2;
-    // Indicates this network uses a Bluetooth transport
-    TT_BLUETOOTH = 3;
-    // Indicates this network uses an Ethernet transport
-    TT_ETHERNET = 4;
-    // Indicates this network uses a Wi-Fi Aware transport
-    TT_WIFI_AWARE = 5;
-    // Indicates this network uses a LoWPAN transport
-    TT_LOWPAN = 6;
-    // Indicates this network uses a Cellular+VPN transport
-    TT_CELLULAR_VPN = 7;
-    // Indicates this network uses a Wi-Fi+VPN transport
-    TT_WIFI_VPN = 8;
-    // Indicates this network uses a Bluetooth+VPN transport
-    TT_BLUETOOTH_VPN = 9;
-    // Indicates this network uses an Ethernet+VPN transport
-    TT_ETHERNET_VPN = 10;
-    // Indicates this network uses a Wi-Fi+Cellular+VPN transport
-    TT_WIFI_CELLULAR_VPN = 11;
-    // Indicates this network uses for test only
-    TT_TEST = 12;
-}
-
-enum DhcpFeature {
-    DF_UNKNOWN = 0;
-    // DHCP INIT-REBOOT state
-    DF_INITREBOOT = 1;
-    // DHCP rapid commit option
-    DF_RAPIDCOMMIT  = 2;
-    // Duplicate address detection
-    DF_DAD = 3;
-    // Fast initial Link setup
-    DF_FILS = 4;
-}
-
-enum HostnameTransResult {
-    HTR_UNKNOWN = 0;
-    HTR_SUCCESS = 1;
-    HTR_FAILURE = 2;
-    HTR_DISABLE = 3;
-}
-
-enum ProbeResult {
-    PR_UNKNOWN = 0;
-    PR_SUCCESS = 1;
-    PR_FAILURE = 2;
-    PR_PORTAL = 3;
-    // DNS query for the probe host returned a private IP address
-    PR_PRIVATE_IP_DNS = 4;
-}
-
-enum ValidationResult {
-    VR_UNKNOWN = 0;
-    VR_SUCCESS = 1;
-    VR_FAILURE = 2;
-    VR_PORTAL = 3;
-    VR_PARTIAL = 4;
-}
-
-enum ProbeType {
-    PT_UNKNOWN = 0;
-    PT_DNS       = 1;
-    PT_HTTP      = 2;
-    PT_HTTPS     = 3;
-    PT_PAC       = 4;
-    PT_FALLBACK  = 5;
-    PT_PRIVDNS   = 6;
-    PT_CAPPORT_API = 7;
-}
-
-// The Dhcp error code is defined in android.net.metrics.DhcpErrorEvent
-enum DhcpErrorCode {
-    ET_UNKNOWN = 0;
-    ET_L2_ERROR = 1;
-    ET_L3_ERROR = 2;
-    ET_L4_ERROR = 3;
-    ET_DHCP_ERROR = 4;
-    ET_MISC_ERROR = 5;
-    /* Reserve for error type
-    // ET_L2_ERROR_TYPE = ET_L2_ERROR << 8;
-    ET_L2_ERROR_TYPE = 256;
-    // ET_L3_ERROR_TYPE = ET_L3_ERROR << 8;
-    ET_L3_ERROR_TYPE = 512;
-    // ET_L4_ERROR_TYPE = ET_L4_ERROR << 8;
-    ET_L4_ERROR_TYPE = 768;
-    // ET_DHCP_ERROR_TYPE = ET_DHCP_ERROR << 8;
-    ET_DHCP_ERROR_TYPE = 1024;
-    // ET_MISC_ERROR_TYPE = ET_MISC_ERROR << 8;
-    ET_MISC_ERROR_TYPE = 1280;
-    */
-    // ET_L2_TOO_SHORT = (ET_L2_ERROR_TYPE | 0x1) << 16;
-    ET_L2_TOO_SHORT = 16842752;
-    // ET_L2_WRONG_ETH_TYPE = (ET_L2_ERROR_TYPE | 0x2) << 16;
-    ET_L2_WRONG_ETH_TYPE = 16908288;
-    // ET_L3_TOO_SHORT = (ET_L3_ERROR_TYPE | 0x1) << 16;
-    ET_L3_TOO_SHORT = 33619968;
-    // ET_L3_NOT_IPV4 = (ET_L3_ERROR_TYPE | 0x2) << 16;
-    ET_L3_NOT_IPV4 = 33685504;
-    // ET_L3_INVALID_IP = (ET_L3_ERROR_TYPE | 0x3) << 16;
-    ET_L3_INVALID_IP = 33751040;
-    // ET_L4_NOT_UDP = (ET_L4_ERROR_TYPE | 0x1) << 16;
-    ET_L4_NOT_UDP = 50397184;
-    // ET_L4_WRONG_PORT = (ET_L4_ERROR_TYPE | 0x2) << 16;
-    ET_L4_WRONG_PORT = 50462720;
-    // ET_BOOTP_TOO_SHORT = (ET_DHCP_ERROR_TYPE | 0x1) << 16;
-    ET_BOOTP_TOO_SHORT = 67174400;
-    // ET_DHCP_BAD_MAGIC_COOKIE = (ET_DHCP_ERROR_TYPE | 0x2) << 16;
-    ET_DHCP_BAD_MAGIC_COOKIE = 67239936;
-    // ET_DHCP_INVALID_OPTION_LENGTH = (ET_DHCP_ERROR_TYPE | 0x3) << 16;
-    ET_DHCP_INVALID_OPTION_LENGTH = 67305472;
-    // ET_DHCP_NO_MSG_TYPE = (ET_DHCP_ERROR_TYPE | 0x4) << 16;
-    ET_DHCP_NO_MSG_TYPE = 67371008;
-    // ET_DHCP_UNKNOWN_MSG_TYPE = (ET_DHCP_ERROR_TYPE | 0x5) << 16;
-    ET_DHCP_UNKNOWN_MSG_TYPE = 67436544;
-    // ET_DHCP_NO_COOKIE = (ET_DHCP_ERROR_TYPE | 0x6) << 16;
-    ET_DHCP_NO_COOKIE = 67502080;
-    // ET_BUFFER_UNDERFLOW = (ET_MISC_ERROR_TYPE | 0x1) << 16;
-    ET_BUFFER_UNDERFLOW = 83951616;
-    // ET_RECEIVE_ERROR = (ET_MISC_ERROR_TYPE | 0x2) << 16;
-    ET_RECEIVE_ERROR = 84017152;
-    // ET_PARSING_ERROR = (ET_MISC_ERROR_TYPE | 0x3) << 16;
-    ET_PARSING_ERROR = 84082688;
-}
-
-enum NetworkQuirkEvent {
-    QE_UNKNOWN = 0;
-    QE_IPV6_PROVISIONING_ROUTER_LOST = 1;
-}
-
-message NetworkStackEventData {
-
-}
-
diff --git a/core/proto/android/stats/connectivity/tethering.proto b/core/proto/android/stats/connectivity/tethering.proto
deleted file mode 100644
index 13f0b8c..0000000
--- a/core/proto/android/stats/connectivity/tethering.proto
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto2";
-package android.stats.connectivity;
-option java_multiple_files = true;
-option java_outer_classname = "TetheringProto";
-
-enum ErrorCode {
-    EC_NO_ERROR = 0;
-    EC_UNKNOWN_IFACE = 1;
-    EC_SERVICE_UNAVAIL = 2;
-    EC_UNSUPPORTED = 3;
-    EC_UNAVAIL_IFACE = 4;
-    EC_INTERNAL_ERROR = 5;
-    EC_TETHER_IFACE_ERROR = 6;
-    EC_UNTETHER_IFACE_ERROR = 7;
-    EC_ENABLE_FORWARDING_ERROR = 8;
-    EC_DISABLE_FORWARDING_ERROR = 9;
-    EC_IFACE_CFG_ERROR = 10;
-    EC_PROVISIONING_FAILED = 11;
-    EC_DHCPSERVER_ERROR = 12;
-    EC_ENTITLEMENT_UNKNOWN = 13;
-    EC_NO_CHANGE_TETHERING_PERMISSION = 14;
-    EC_NO_ACCESS_TETHERING_PERMISSION = 15;
-    EC_UNKNOWN_TYPE = 16;
-}
-
-enum DownstreamType {
-    // Unspecific tethering type.
-    DS_UNSPECIFIED = 0;
-    // Wifi tethering type.
-    DS_TETHERING_WIFI = 1;
-    // USB tethering type.
-    DS_TETHERING_USB = 2;
-    // Bluetooth tethering type.
-    DS_TETHERING_BLUETOOTH = 3;
-    // Wifi P2p tethering type.
-    DS_TETHERING_WIFI_P2P = 4;
-    // NCM (Network Control Model) local tethering type.
-    DS_TETHERING_NCM = 5;
-    // Ethernet tethering type.
-    DS_TETHERING_ETHERNET = 6;
-}
-
-enum UpstreamType {
-    UT_UNKNOWN = 0;
-    // Indicates upstream using a Cellular transport.
-    UT_CELLULAR = 1;
-    // Indicates upstream using a Wi-Fi transport.
-    UT_WIFI = 2;
-    // Indicates upstream using a Bluetooth transport.
-    UT_BLUETOOTH = 3;
-    // Indicates upstream using an Ethernet transport.
-    UT_ETHERNET = 4;
-    // Indicates upstream using a Wi-Fi Aware transport.
-    UT_WIFI_AWARE = 5;
-    // Indicates upstream using a LoWPAN transport.
-    UT_LOWPAN = 6;
-    // Indicates upstream using a Cellular+VPN transport.
-    UT_CELLULAR_VPN = 7;
-    // Indicates upstream using a Wi-Fi+VPN transport.
-    UT_WIFI_VPN = 8;
-    // Indicates upstream using a Bluetooth+VPN transport.
-    UT_BLUETOOTH_VPN = 9;
-    // Indicates upstream using an Ethernet+VPN transport.
-    UT_ETHERNET_VPN = 10;
-    // Indicates upstream using a Wi-Fi+Cellular+VPN transport.
-    UT_WIFI_CELLULAR_VPN = 11;
-    // Indicates upstream using for test only.
-    UT_TEST = 12;
-    // Indicates upstream using DUN capability + Cellular transport.
-    UT_DUN_CELLULAR = 13;
-}
-
-enum UserType {
-    // Unknown.
-    USER_UNKNOWN = 0;
-    // Settings.
-    USER_SETTINGS = 1;
-    // System UI.
-    USER_SYSTEMUI = 2;
-    // Google mobile service.
-    USER_GMS = 3;
-}
diff --git a/core/proto/android/stats/devicepolicy/Android.bp b/core/proto/android/stats/devicepolicy/Android.bp
deleted file mode 100644
index 5fb278a..0000000
--- a/core/proto/android/stats/devicepolicy/Android.bp
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library_static {
-    name: "devicepolicyprotosnano",
-    proto: {
-        type: "nano",
-    },
-    srcs: [
-        "*.proto",
-    ],
-    java_version: "1.8",
-    target: {
-        android: {
-            jarjar_rules: "jarjar-rules.txt",
-        },
-        host: {
-            static_libs: ["libprotobuf-java-nano"],
-        }
-    },
-    sdk_version: "core_platform",
-}
diff --git a/core/proto/android/stats/devicepolicy/device_policy.proto b/core/proto/android/stats/devicepolicy/device_policy.proto
deleted file mode 100644
index af30cf3..0000000
--- a/core/proto/android/stats/devicepolicy/device_policy.proto
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.devicepolicy;
-option java_multiple_files = true;
-
-message StringList {
-  repeated string string_value = 1;
-}
diff --git a/core/proto/android/stats/devicepolicy/device_policy_enums.proto b/core/proto/android/stats/devicepolicy/device_policy_enums.proto
deleted file mode 100644
index 7c1a049..0000000
--- a/core/proto/android/stats/devicepolicy/device_policy_enums.proto
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.devicepolicy;
-option java_multiple_files = true;
-
-/**
- * Id for device policy features.
- */
-enum EventId {
-  SET_PASSWORD_QUALITY = 1;
-  SET_PASSWORD_MINIMUM_LENGTH = 2;
-  SET_PASSWORD_MINIMUM_NUMERIC = 3;
-  SET_PASSWORD_MINIMUM_NON_LETTER = 4;
-  SET_PASSWORD_MINIMUM_LETTERS = 5;
-  SET_PASSWORD_MINIMUM_LOWER_CASE = 6;
-  SET_PASSWORD_MINIMUM_UPPER_CASE = 7;
-  SET_PASSWORD_MINIMUM_SYMBOLS = 8;
-  SET_KEYGUARD_DISABLED_FEATURES = 9;
-  LOCK_NOW = 10;
-  WIPE_DATA_WITH_REASON = 11;
-  ADD_USER_RESTRICTION = 12;
-  REMOVE_USER_RESTRICTION = 13;
-  SET_SECURE_SETTING = 14;
-  SET_SECURITY_LOGGING_ENABLED = 15;
-  RETRIEVE_SECURITY_LOGS = 16;
-  RETRIEVE_PRE_REBOOT_SECURITY_LOGS = 17;
-  SET_PERMISSION_POLICY = 18;
-  SET_PERMISSION_GRANT_STATE = 19;
-  INSTALL_KEY_PAIR = 20;
-  INSTALL_CA_CERT = 21;
-  CHOOSE_PRIVATE_KEY_ALIAS = 22;
-  REMOVE_KEY_PAIR = 23;
-  UNINSTALL_CA_CERTS = 24;
-  SET_CERT_INSTALLER_PACKAGE = 25;
-  SET_ALWAYS_ON_VPN_PACKAGE = 26;
-  SET_PERMITTED_INPUT_METHODS = 27;
-  SET_PERMITTED_ACCESSIBILITY_SERVICES = 28;
-  SET_SCREEN_CAPTURE_DISABLED = 29;
-  SET_CAMERA_DISABLED = 30;
-  QUERY_SUMMARY_FOR_USER = 31;
-  QUERY_SUMMARY = 32;
-  QUERY_DETAILS = 33;
-  REBOOT = 34;
-  SET_MASTER_VOLUME_MUTED = 35;
-  SET_AUTO_TIME_REQUIRED = 36;
-  SET_KEYGUARD_DISABLED = 37;
-  SET_STATUS_BAR_DISABLED = 38;
-  SET_ORGANIZATION_COLOR = 39;
-  SET_PROFILE_NAME = 40;
-  SET_USER_ICON = 41;
-  SET_DEVICE_OWNER_LOCK_SCREEN_INFO = 42;
-  SET_SHORT_SUPPORT_MESSAGE = 43;
-  SET_LONG_SUPPORT_MESSAGE = 44;
-  SET_CROSS_PROFILE_CONTACTS_SEARCH_DISABLED = 45;
-  SET_CROSS_PROFILE_CALLER_ID_DISABLED = 46;
-  SET_BLUETOOTH_CONTACT_SHARING_DISABLED = 47;
-  ADD_CROSS_PROFILE_INTENT_FILTER = 48;
-  ADD_CROSS_PROFILE_WIDGET_PROVIDER = 49;
-  SET_SYSTEM_UPDATE_POLICY = 50;
-  SET_LOCKTASK_MODE_ENABLED = 51;
-  ADD_PERSISTENT_PREFERRED_ACTIVITY = 52;
-  REQUEST_BUGREPORT = 53;
-  GET_WIFI_MAC_ADDRESS = 54;
-  REQUEST_QUIET_MODE_ENABLED = 55;
-  WORK_PROFILE_LOCATION_CHANGED = 56;
-  DO_USER_INFO_CLICKED = 57;
-  TRANSFER_OWNERSHIP = 58;
-  GENERATE_KEY_PAIR = 59;
-  SET_KEY_PAIR_CERTIFICATE = 60;
-  SET_KEEP_UNINSTALLED_PACKAGES = 61;
-  SET_APPLICATION_RESTRICTIONS = 62;
-  SET_APPLICATION_HIDDEN = 63;
-  ENABLE_SYSTEM_APP = 64;
-  ENABLE_SYSTEM_APP_WITH_INTENT = 65;
-  INSTALL_EXISTING_PACKAGE = 66;
-  SET_UNINSTALL_BLOCKED = 67;
-  SET_PACKAGES_SUSPENDED = 68;
-  ON_LOCK_TASK_MODE_ENTERING = 69;
-  SET_CROSS_PROFILE_CALENDAR_PACKAGES = 70;
-  GET_USER_PASSWORD_COMPLEXITY_LEVEL = 72;
-  INSTALL_SYSTEM_UPDATE = 73;
-  INSTALL_SYSTEM_UPDATE_ERROR = 74;
-  IS_MANAGED_KIOSK = 75;
-  IS_UNATTENDED_MANAGED_KIOSK = 76;
-  PROVISIONING_MANAGED_PROFILE_ON_FULLY_MANAGED_DEVICE = 77;
-  PROVISIONING_PERSISTENT_DEVICE_OWNER = 78;
-
-  // existing Tron logs to be migrated to statsd
-  PROVISIONING_ENTRY_POINT_NFC = 79;
-  PROVISIONING_ENTRY_POINT_QR_CODE = 80;
-  PROVISIONING_ENTRY_POINT_CLOUD_ENROLLMENT = 81;
-  PROVISIONING_ENTRY_POINT_ADB = 82;
-  PROVISIONING_ENTRY_POINT_TRUSTED_SOURCE = 83;
-  PROVISIONING_DPC_PACKAGE_NAME = 84;
-  PROVISIONING_DPC_INSTALLED_BY_PACKAGE = 85;
-  PROVISIONING_PROVISIONING_ACTIVITY_TIME_MS = 86;
-  PROVISIONING_PREPROVISIONING_ACTIVITY_TIME_MS = 87;
-  PROVISIONING_ENCRYPT_DEVICE_ACTIVITY_TIME_MS = 88;
-  PROVISIONING_WEB_ACTIVITY_TIME_MS = 89;
-  PROVISIONING_TRAMPOLINE_ACTIVITY_TIME_MS = 90 [deprecated=true];
-  PROVISIONING_POST_ENCRYPTION_ACTIVITY_TIME_MS = 91 [deprecated=true];
-  PROVISIONING_FINALIZATION_ACTIVITY_TIME_MS = 92 [deprecated=true];
-  PROVISIONING_NETWORK_TYPE = 93;
-  PROVISIONING_ACTION = 94;
-  PROVISIONING_EXTRAS = 95;
-  PROVISIONING_COPY_ACCOUNT_TASK_MS = 96;
-  PROVISIONING_CREATE_PROFILE_TASK_MS = 97;
-  PROVISIONING_START_PROFILE_TASK_MS = 98;
-  PROVISIONING_DOWNLOAD_PACKAGE_TASK_MS = 99;
-  PROVISIONING_INSTALL_PACKAGE_TASK_MS = 100;
-  PROVISIONING_CANCELLED = 101;
-  PROVISIONING_ERROR = 102;
-  PROVISIONING_COPY_ACCOUNT_STATUS = 103;
-  PROVISIONING_TOTAL_TASK_TIME_MS = 104;
-  PROVISIONING_SESSION_STARTED = 105;
-  PROVISIONING_SESSION_COMPLETED = 106;
-  PROVISIONING_TERMS_ACTIVITY_TIME_MS = 107;
-  PROVISIONING_TERMS_COUNT = 108;
-  PROVISIONING_TERMS_READ = 109;
-
-  SEPARATE_PROFILE_CHALLENGE_CHANGED = 110;
-  SET_GLOBAL_SETTING = 111;
-  INSTALL_PACKAGE = 112;
-  UNINSTALL_PACKAGE = 113;
-  WIFI_SERVICE_ADD_NETWORK_SUGGESTIONS = 114;
-  WIFI_SERVICE_ADD_OR_UPDATE_NETWORK = 115;
-  QUERY_SUMMARY_FOR_DEVICE = 116;
-  REMOVE_CROSS_PROFILE_WIDGET_PROVIDER = 117;
-  ESTABLISH_VPN = 118;
-  SET_NETWORK_LOGGING_ENABLED = 119;
-  RETRIEVE_NETWORK_LOGS = 120;
-  PROVISIONING_PREPARE_TOTAL_TIME_MS = 121;
-  PROVISIONING_PREPARE_STARTED = 122;
-  PROVISIONING_PREPARE_COMPLETED = 123;
-  PROVISIONING_FLOW_TYPE = 124;
-  CROSS_PROFILE_APPS_GET_TARGET_USER_PROFILES = 125;
-  CROSS_PROFILE_APPS_START_ACTIVITY_AS_USER = 126;
-  SET_AUTO_TIME = 127;
-  SET_AUTO_TIME_ZONE = 128;
-  SET_USER_CONTROL_DISABLED_PACKAGES = 129;
-  SET_FACTORY_RESET_PROTECTION = 130;
-  SET_COMMON_CRITERIA_MODE = 131;
-  ALLOW_MODIFICATION_OF_ADMIN_CONFIGURED_NETWORKS = 132;
-  SET_TIME = 133;
-  SET_TIME_ZONE = 134;
-  SET_PERSONAL_APPS_SUSPENDED = 135;
-  SET_MANAGED_PROFILE_MAXIMUM_TIME_OFF = 136;
-  COMP_TO_ORG_OWNED_PO_MIGRATED = 137;
-  SET_CROSS_PROFILE_PACKAGES = 138;
-  SET_INTERACT_ACROSS_PROFILES_APP_OP = 139;
-  GET_CROSS_PROFILE_PACKAGES = 140;
-  CAN_REQUEST_INTERACT_ACROSS_PROFILES_TRUE = 141;
-  CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_NO_PROFILES = 142;
-  CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_WHITELIST = 143;
-  CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_PERMISSION = 144;
-  CAN_INTERACT_ACROSS_PROFILES_TRUE = 145;
-  CAN_INTERACT_ACROSS_PROFILES_FALSE_PERMISSION = 146;
-  CAN_INTERACT_ACROSS_PROFILES_FALSE_NO_PROFILES = 147;
-  CREATE_CROSS_PROFILE_INTENT = 148;
-  IS_MANAGED_PROFILE = 149;
-  START_ACTIVITY_BY_INTENT = 150;
-  BIND_CROSS_PROFILE_SERVICE = 151;
-  PROVISIONING_DPC_SETUP_STARTED = 152;
-  PROVISIONING_DPC_SETUP_COMPLETED = 153;
-  PROVISIONING_ORGANIZATION_OWNED_MANAGED_PROFILE = 154;
-  RESOLVER_CROSS_PROFILE_TARGET_OPENED = 155;
-  RESOLVER_SWITCH_TABS = 156;
-  RESOLVER_EMPTY_STATE_WORK_APPS_DISABLED = 157;
-  RESOLVER_EMPTY_STATE_NO_SHARING_TO_PERSONAL= 158;
-  RESOLVER_EMPTY_STATE_NO_SHARING_TO_WORK= 159;
-  RESOLVER_EMPTY_STATE_NO_APPS_RESOLVED= 160;
-  RESOLVER_AUTOLAUNCH_CROSS_PROFILE_TARGET = 161;
-  CROSS_PROFILE_SETTINGS_PAGE_LAUNCHED_FROM_APP = 162;
-  CROSS_PROFILE_SETTINGS_PAGE_LAUNCHED_FROM_SETTINGS = 163;
-  CROSS_PROFILE_SETTINGS_PAGE_ADMIN_RESTRICTED = 164;
-  CROSS_PROFILE_SETTINGS_PAGE_MISSING_WORK_APP = 165;
-  CROSS_PROFILE_SETTINGS_PAGE_MISSING_PERSONAL_APP = 166;
-  CROSS_PROFILE_SETTINGS_PAGE_MISSING_INSTALL_BANNER_INTENT = 167;
-  CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_CLICKED = 168;
-  CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_NO_INTENT_CLICKED  = 169;
-  CROSS_PROFILE_SETTINGS_PAGE_USER_CONSENTED = 170;
-  CROSS_PROFILE_SETTINGS_PAGE_USER_DECLINED_CONSENT = 171;
-  CROSS_PROFILE_SETTINGS_PAGE_PERMISSION_REVOKED = 172;
-  DOCSUI_EMPTY_STATE_NO_PERMISSION = 173;
-  DOCSUI_EMPTY_STATE_QUIET_MODE = 174;
-  DOCSUI_LAUNCH_OTHER_APP = 175;
-  DOCSUI_PICK_RESULT = 176;
-}
diff --git a/core/proto/android/stats/devicepolicy/jarjar-rules.txt b/core/proto/android/stats/devicepolicy/jarjar-rules.txt
deleted file mode 100644
index 40043a86..0000000
--- a/core/proto/android/stats/devicepolicy/jarjar-rules.txt
+++ /dev/null
@@ -1 +0,0 @@
-rule com.google.protobuf.nano.** com.android.framework.protobuf.nano.@1
diff --git a/core/proto/android/stats/dnsresolver/Android.bp b/core/proto/android/stats/dnsresolver/Android.bp
deleted file mode 100644
index 1e8c763..0000000
--- a/core/proto/android/stats/dnsresolver/Android.bp
+++ /dev/null
@@ -1,24 +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.
-
-java_library_static {
-    name: "dnsresolverprotosnano",
-    proto: {
-        type: "nano",
-    },
-    srcs: [
-        "dns_resolver.proto",
-    ],
-    sdk_version: "system_current",
-}
diff --git a/core/proto/android/stats/dnsresolver/dns_resolver.proto b/core/proto/android/stats/dnsresolver/dns_resolver.proto
deleted file mode 100644
index b17d12c..0000000
--- a/core/proto/android/stats/dnsresolver/dns_resolver.proto
+++ /dev/null
@@ -1,375 +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.
- */
-syntax = "proto2";
-package android.stats.dnsresolver;
-
-enum EventType {
-    EVENT_UNKNOWN = 0;
-    EVENT_GETADDRINFO = 1;
-    EVENT_GETHOSTBYNAME = 2;
-    EVENT_GETHOSTBYADDR = 3;
-    EVENT_RES_NSEND = 4;
-}
-
-// The return value of the DNS resolver for each DNS lookups.
-// bionic/libc/include/netdb.h
-// system/netd/resolv/include/netd_resolv/resolv.h
-enum ReturnCode {
-    RC_EAI_NO_ERROR = 0;
-    RC_EAI_ADDRFAMILY = 1;
-    RC_EAI_AGAIN = 2;
-    RC_EAI_BADFLAGS = 3;
-    RC_EAI_FAIL = 4;
-    RC_EAI_FAMILY = 5;
-    RC_EAI_MEMORY = 6;
-    RC_EAI_NODATA = 7;
-    RC_EAI_NONAME = 8;
-    RC_EAI_SERVICE = 9;
-    RC_EAI_SOCKTYPE = 10;
-    RC_EAI_SYSTEM = 11;
-    RC_EAI_BADHINTS = 12;
-    RC_EAI_PROTOCOL = 13;
-    RC_EAI_OVERFLOW = 14;
-    RC_RESOLV_INTERNAL_ERROR = 254;
-    RC_RESOLV_TIMEOUT = 255;
-    RC_EAI_MAX = 256;
-}
-
-enum NsRcode {
-    NS_R_NO_ERROR = 0;  // No error occurred.
-    NS_R_FORMERR = 1;   // Format error.
-    NS_R_SERVFAIL = 2;  // Server failure.
-    NS_R_NXDOMAIN = 3;  // Name error.
-    NS_R_NOTIMPL = 4;   // Unimplemented.
-    NS_R_REFUSED = 5;   // Operation refused.
-    // these are for BIND_UPDATE
-    NS_R_YXDOMAIN = 6;  // Name exists
-    NS_R_YXRRSET = 7;   // RRset exists
-    NS_R_NXRRSET = 8;   // RRset does not exist
-    NS_R_NOTAUTH = 9;   // Not authoritative for zone
-    NS_R_NOTZONE = 10;  // Zone of record different from zone section
-    NS_R_MAX = 11;
-    // Define rcode=12~15(UNASSIGNED) in rcode enum type.
-    // Some DNS Servers might return undefined code to devices.
-    // Without the enum definition, that would be noise for our dashboard.
-    NS_R_UNASSIGNED12 = 12; // Unassigned
-    NS_R_UNASSIGNED13 = 13; // Unassigned
-    NS_R_UNASSIGNED14 = 14; // Unassigned
-    NS_R_UNASSIGNED15 = 15; // Unassigned
-    // The following are EDNS extended rcodes
-    NS_R_BADVERS = 16;
-    // The following are TSIG errors
-    // NS_R_BADSIG  = 16,
-    NS_R_BADKEY = 17;
-    NS_R_BADTIME = 18;
-    NS_R_INTERNAL_ERROR = 254;
-    NS_R_TIMEOUT = 255;
-}
-
-// Currently defined type values for resources and queries.
-enum NsType {
-    NS_T_INVALID = 0;      // Cookie.
-    NS_T_A = 1;            // Host address.
-    NS_T_NS = 2;           // Authoritative server.
-    NS_T_MD = 3;           // Mail destination.
-    NS_T_MF = 4;           // Mail forwarder.
-    NS_T_CNAME = 5;        // Canonical name.
-    NS_T_SOA = 6;          // Start of authority zone.
-    NS_T_MB = 7;           // Mailbox domain name.
-    NS_T_MG = 8;           // Mail group member.
-    NS_T_MR = 9;           // Mail rename name.
-    NS_T_NULL = 10;        // Null resource record.
-    NS_T_WKS = 11;         // Well known service.
-    NS_T_PTR = 12;         // Domain name pointer.
-    NS_T_HINFO = 13;       // Host information.
-    NS_T_MINFO = 14;       // Mailbox information.
-    NS_T_MX = 15;          // Mail routing information.
-    NS_T_TXT = 16;         // Text strings.
-    NS_T_RP = 17;          // Responsible person.
-    NS_T_AFSDB = 18;       // AFS cell database.
-    NS_T_X25 = 19;         // X_25 calling address.
-    NS_T_ISDN = 20;        // ISDN calling address.
-    NS_T_RT = 21;          // Router.
-    NS_T_NSAP = 22;        // NSAP address.
-    NS_T_NSAP_PTR = 23;    // Reverse NSAP lookup (deprecated).
-    NS_T_SIG = 24;         // Security signature.
-    NS_T_KEY = 25;         // Security key.
-    NS_T_PX = 26;          // X.400 mail mapping.
-    NS_T_GPOS = 27;        // Geographical position (withdrawn).
-    NS_T_AAAA = 28;        // IPv6 Address.
-    NS_T_LOC = 29;         // Location Information.
-    NS_T_NXT = 30;         // Next domain (security).
-    NS_T_EID = 31;         // Endpoint identifier.
-    NS_T_NIMLOC = 32;      // Nimrod Locator.
-    NS_T_SRV = 33;         // Server Selection.
-    NS_T_ATMA = 34;        // ATM Address
-    NS_T_NAPTR = 35;       // Naming Authority PoinTeR
-    NS_T_KX = 36;          // Key Exchange
-    NS_T_CERT = 37;        // Certification record
-    NS_T_A6 = 38;          // IPv6 address (experimental)
-    NS_T_DNAME = 39;       // Non-terminal DNAME
-    NS_T_SINK = 40;        // Kitchen sink (experimentatl)
-    NS_T_OPT = 41;         // EDNS0 option (meta-RR)
-    NS_T_APL = 42;         // Address prefix list (RFC 3123)
-    NS_T_DS = 43;          // Delegation Signer
-    NS_T_SSHFP = 44;       // SSH Fingerprint
-    NS_T_IPSECKEY = 45;    // IPSEC Key
-    NS_T_RRSIG = 46;       // RRset Signature
-    NS_T_NSEC = 47;        // Negative security
-    NS_T_DNSKEY = 48;      // DNS Key
-    NS_T_DHCID = 49;       // Dynamic host configuratin identifier
-    NS_T_NSEC3 = 50;       // Negative security type 3
-    NS_T_NSEC3PARAM = 51;  // Negative security type 3 parameters
-    NS_T_HIP = 55;         // Host Identity Protocol
-    NS_T_SPF = 99;         // Sender Policy Framework
-    NS_T_TKEY = 249;       // Transaction key
-    NS_T_TSIG = 250;       // Transaction signature.
-    NS_T_IXFR = 251;       // Incremental zone transfer.
-    NS_T_AXFR = 252;       // Transfer zone of authority.
-    NS_T_MAILB = 253;      // Transfer mailbox records.
-    NS_T_MAILA = 254;      // Transfer mail agent records.
-    NS_T_ANY = 255;        // Wildcard match.
-    NS_T_ZXFR = 256;       // BIND-specific, nonstandard.
-    NS_T_DLV = 32769;      // DNSSEC look-aside validatation.
-    NS_T_MAX = 65536;
-}
-
-enum IpVersion {
-    IV_UNKNOWN = 0;
-    IV_IPV4 = 1;
-    IV_IPV6 = 2;
-}
-
-enum Protocol {
-    PROTO_UNKNOWN = 0;
-    PROTO_UDP = 1;
-    PROTO_TCP = 2;
-    PROTO_DOT = 3;
-}
-
-enum PrivateDnsModes {
-    PDM_UNKNOWN = 0;
-    PDM_OFF = 1;
-    PDM_OPPORTUNISTIC = 2;
-    PDM_STRICT = 3;
-}
-
-enum NetworkType {
-    NT_UNKNOWN = 0;
-    // Indicates this network uses a Cellular transport.
-    NT_CELLULAR = 1;
-    // Indicates this network uses a Wi-Fi transport.
-    NT_WIFI = 2;
-    // Indicates this network uses a Bluetooth transport.
-    NT_BLUETOOTH = 3;
-    // Indicates this network uses an Ethernet transport.
-    NT_ETHERNET = 4;
-    // Indicates this network uses a VPN transport, now deprecated.
-    NT_VPN = 5 [deprecated=true];
-    // Indicates this network uses a Wi-Fi Aware transport.
-    NT_WIFI_AWARE = 6;
-    // Indicates this network uses a LoWPAN transport.
-    NT_LOWPAN = 7;
-    // Indicates this network uses a Cellular+VPN transport.
-    NT_CELLULAR_VPN = 8;
-    // Indicates this network uses a Wi-Fi+VPN transport.
-    NT_WIFI_VPN = 9;
-    // Indicates this network uses a Bluetooth+VPN transport.
-    NT_BLUETOOTH_VPN = 10;
-    // Indicates this network uses an Ethernet+VPN transport.
-    NT_ETHERNET_VPN = 11;
-    // Indicates this network uses a Wi-Fi+Cellular+VPN transport.
-    NT_WIFI_CELLULAR_VPN = 12;
-}
-
-enum CacheStatus{
-    // the cache can't handle that kind of queries.
-    // or the answer buffer is too small.
-    CS_UNSUPPORTED = 0;
-    // the cache doesn't know about this query.
-    CS_NOTFOUND = 1;
-    // the cache found the answer.
-    CS_FOUND = 2;
-    // Don't do anything on cache.
-    CS_SKIP = 3;
-}
-
-// The enum LinuxErrno is defined in the following 2 files.
-// 1. bionic/libc/kernel/uapi/asm-generic/errno-base.h
-// 2. bionic/libc/kernel/uapi/asm-generic/errno.h
-enum LinuxErrno {
-    SYS_NO_ERROR = 0;
-    SYS_EPERM = 1;              // Not super-user
-    SYS_ENOENT = 2;             // No such file or directory
-    SYS_ESRCH = 3;              // No such process
-    SYS_EINTR = 4;              // Interrupted system call
-    SYS_EIO = 5;                // I/O error
-    SYS_ENXIO = 6;              // No such device or address
-    SYS_E2BIG = 7;              // Arg list too long
-    SYS_ENOEXEC = 8;            // Exec format error
-    SYS_EBADF = 9;              // Bad file number
-    SYS_ECHILD = 10;            // No children
-    SYS_EAGAIN = 11;            // No more processes
-    SYS_ENOMEM = 12;            // Not enough core
-    SYS_EACCES = 13;            // Permission denied
-    SYS_EFAULT = 14;            // Bad address
-    SYS_ENOTBLK = 15;           // Block device required
-    SYS_EBUSY = 16;             // Mount device busy
-    SYS_EEXIST = 17;            // File exists
-    SYS_EXDEV = 18;             // Cross-device link
-    SYS_ENODEV = 19;            // No such device
-    SYS_ENOTDIR = 20;           // Not a directory
-    SYS_EISDIR = 21;            // Is a directory
-    SYS_EINVAL = 22;            // Invalid argument
-    SYS_ENFILE = 23;            // Too many open files in system
-    SYS_EMFILE = 24;            // Too many open files
-    SYS_ENOTTY = 25;            // Not a typewriter
-    SYS_ETXTBSY = 26;           // Text file busy
-    SYS_EFBIG = 27;             // File too large
-    SYS_ENOSPC = 28;            // No space left on device
-    SYS_ESPIPE = 29;            // Illegal seek
-    SYS_EROFS = 30;             // Read only file system
-    SYS_EMLINK = 31;            // Too many links
-    SYS_EPIPE = 32;             // Broken pipe
-    SYS_EDOM = 33;              // Math arg out of domain of func
-    SYS_ERANGE = 34;            // Math result not representable
-    SYS_EDEADLOCK = 35;         // File locking deadlock error
-    SYS_ENAMETOOLONG = 36;      // File or path name too long
-    SYS_ENOLCK = 37;            // No record locks available
-    SYS_ENOSYS = 38;            // Function not implemented
-    SYS_ENOTEMPTY = 39;         // Directory not empty
-    SYS_ELOOP = 40;             // Too many symbolic links
-    SYS_ENOMSG = 42;            // No message of desired type
-    SYS_EIDRM = 43;             // Identifier removed
-    SYS_ECHRNG = 44;            // Channel number out of range
-    SYS_EL2NSYNC = 45;          // Level 2 not synchronized
-    SYS_EL3HLT = 46;            // Level 3 halted
-    SYS_EL3RST = 47;            // Level 3 reset
-    SYS_ELNRNG = 48;            // Link number out of range
-    SYS_EUNATCH = 49;           // rotocol driver not attached
-    SYS_ENOCSI = 50;            // No CSI structure available
-    SYS_EL2HLT = 51;            // Level 2 halted
-    SYS_EBADE = 52;             // Invalid exchange
-    SYS_EBADR = 53;             // Invalid request descriptor
-    SYS_EXFULL = 54;            // Exchange full
-    SYS_ENOANO = 55;            // No anode
-    SYS_EBADRQC = 56;           // Invalid request code
-    SYS_EBADSLT = 57;           // Invalid slot
-    SYS_EBFONT = 59;            // Bad font file fmt
-    SYS_ENOSTR = 60;            // Device not a stream
-    SYS_ENODATA = 61;           // No data (for no delay io)
-    SYS_ETIME = 62;             // Timer expired
-    SYS_ENOSR = 63;             // Out of streams resources
-    SYS_ENONET = 64;            // Machine is not on the network
-    SYS_ENOPKG = 65;            // Package not installed
-    SYS_EREMOTE = 66;           // The object is remote
-    SYS_ENOLINK = 67;           // The link has been severed
-    SYS_EADV = 68;              // Advertise error
-    SYS_ESRMNT = 69;            // Srmount error
-    SYS_ECOMM = 70;             // Communication error on send
-    SYS_EPROTO = 71;            // Protocol error
-    SYS_EMULTIHOP = 72;         // Multihop attempted
-    SYS_EDOTDOT = 73;           // Cross mount point (not really error)
-    SYS_EBADMSG = 74;           // Trying to read unreadable message
-    SYS_EOVERFLOW = 75;         // Value too large for defined data type
-    SYS_ENOTUNIQ = 76;          // Given log. name not unique
-    SYS_EBADFD = 77;            // f.d. invalid for this operation
-    SYS_EREMCHG = 78;           // Remote address changed
-    SYS_ELIBACC = 79;           // Can't access a needed shared lib
-    SYS_ELIBBAD = 80;           // Accessing a corrupted shared lib
-    SYS_ELIBSCN = 81;           // .lib section in a.out corrupted
-    SYS_ELIBMAX = 82;           // Attempting to link in too many libs
-    SYS_ELIBEXEC = 83;          // Attempting to exec a shared library
-    SYS_EILSEQ = 84;
-    SYS_ERESTART = 85;
-    SYS_ESTRPIPE = 86;
-    SYS_EUSERS = 87;
-    SYS_ENOTSOCK = 88;          // Socket operation on non-socket
-    SYS_EDESTADDRREQ = 89;      // Destination address required
-    SYS_EMSGSIZE = 90;          // Message too long
-    SYS_EPROTOTYPE = 91;        // Protocol wrong type for socket
-    SYS_ENOPROTOOPT = 92;       // Protocol not available
-    SYS_EPROTONOSUPPORT = 93;   // Unknown protocol
-    SYS_ESOCKTNOSUPPORT = 94;   // Socket type not supported
-    SYS_EOPNOTSUPP = 95;        // Operation not supported on transport endpoint
-    SYS_EPFNOSUPPORT = 96;      // Protocol family not supported
-    SYS_EAFNOSUPPORT = 97;      // Address family not supported by protocol family
-    SYS_EADDRINUSE = 98;        // Address already in use
-    SYS_EADDRNOTAVAIL = 99;     // Address not available
-    SYS_ENETDOWN = 100;         // Network interface is not configured
-    SYS_ENETUNREACH = 101;      // Network is unreachable
-    SYS_ENETRESET = 102;
-    SYS_ECONNABORTED = 103;     // Connection aborted
-    SYS_ECONNRESET = 104;       // Connection reset by peer
-    SYS_ENOBUFS = 105;          // No buffer space available
-    SYS_EISCONN = 106;          // Socket is already connected
-    SYS_ENOTCONN = 107;         // Socket is not connected
-    SYS_ESHUTDOWN = 108;        // Can't send after socket shutdown
-    SYS_ETOOMANYREFS = 109;
-    SYS_ETIMEDOUT = 110;        // Connection timed out
-    SYS_ECONNREFUSED = 111;     // Connection refused
-    SYS_EHOSTDOWN = 112;        // Host is down
-    SYS_EHOSTUNREACH = 113;     // Host is unreachable
-    SYS_EALREADY = 114;         // Socket already connected
-    SYS_EINPROGRESS = 115;      // Connection already in progress
-    SYS_ESTALE = 116;
-    SYS_EUCLEAN = 117;
-    SYS_ENOTNAM = 118;
-    SYS_ENAVAIL = 119;
-    SYS_EISNAM = 120;
-    SYS_EREMOTEIO = 121;
-    SYS_EDQUOT = 122;
-    SYS_ENOMEDIUM = 123;        // No medium (in tape drive)
-    SYS_EMEDIUMTYPE = 124;
-    SYS_ECANCELED = 125;
-    SYS_ENOKEY = 126;
-    SYS_EKEYEXPIRED = 127;
-    SYS_EKEYREVOKED = 128;
-    SYS_EKEYREJECTED = 129;
-    SYS_EOWNERDEAD = 130;
-    SYS_ENOTRECOVERABLE = 131;
-    SYS_ERFKILL = 132;
-    SYS_EHWPOISON = 133;
-}
-
-message DnsQueryEvent {
-    optional android.stats.dnsresolver.NsRcode rcode = 1;
-
-    optional android.stats.dnsresolver.NsType type = 2;
-
-    optional android.stats.dnsresolver.CacheStatus cache_hit = 3;
-
-    optional android.stats.dnsresolver.IpVersion ip_version = 4;
-
-    optional android.stats.dnsresolver.Protocol protocol = 5;
-
-    // Number of DNS query retry times
-    optional int32 retry_times = 6;
-
-    // Ordinal number of name server.
-    optional int32 dns_server_index = 7;
-
-    // Used only by TCP and DOT. True for new connections.
-    optional bool connected = 8;
-
-    optional int32 latency_micros = 9;
-
-    optional android.stats.dnsresolver.LinuxErrno linux_errno = 10;
-}
-
-message DnsQueryEvents {
-    repeated DnsQueryEvent dns_query_event = 1;
-}
diff --git a/core/proto/android/stats/docsui/docsui_enums.proto b/core/proto/android/stats/docsui/docsui_enums.proto
deleted file mode 100644
index 5963f6a..0000000
--- a/core/proto/android/stats/docsui/docsui_enums.proto
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.docsui;
-option java_multiple_files = true;
-
-enum LaunchAction {
-    UNKNOWN = 0;
-    OPEN = 1;
-    CREATE = 2;
-    GET_CONTENT = 3;
-    OPEN_TREE = 4;
-    PICK_COPY_DEST = 5;
-    BROWSE = 6;
-    OTHER = 7;
-}
-
-enum MimeType {
-    MIME_UNKNOWN = 0;
-    MIME_NONE = 1;
-    MIME_ANY = 2;
-    MIME_APPLICATION = 3;
-    MIME_AUDIO = 4;
-    MIME_IMAGE = 5;
-    MIME_MESSAGE = 6;
-    MIME_MULTIPART = 7;
-    MIME_TEXT = 8;
-    MIME_VIDEO = 9;
-    MIME_OTHER = 10;
-}
-
-enum Root {
-    ROOT_UNKNOWN = 0;
-    ROOT_NONE = 1;
-    ROOT_OTHER_DOCS_PROVIDER = 2;
-    ROOT_AUDIO = 3;
-    ROOT_DEVICE_STORAGE = 4;
-    ROOT_DOWNLOADS = 5;
-    ROOT_HOME = 6;
-    ROOT_IMAGES = 7;
-    ROOT_RECENTS = 8;
-    ROOT_VIDEOS = 9;
-    ROOT_MTP = 10;
-    ROOT_THIRD_PARTY_APP = 11;
-    ROOT_DOCUMENTS = 12;
-}
-
-enum ContextScope {
-    SCOPE_UNKNOWN = 0;
-    SCOPE_FILES = 1;
-    SCOPE_PICKER = 2;
-}
-
-enum Provider {
-    PROVIDER_UNKNOWN = 0;
-    PROVIDER_SYSTEM = 1;
-    PROVIDER_EXTERNAL = 2;
-}
-
-enum FileOperation {
-    OP_UNKNOWN = 0;
-    OP_OTHER = 1;
-    OP_COPY = 2;
-    OP_COPY_INTRA_PROVIDER = 3;
-    OP_COPY_SYSTEM_PROVIDER = 4;
-    OP_COPY_EXTERNAL_PROVIDER = 5;
-    OP_MOVE = 6;
-    OP_MOVE_INTRA_PROVIDER = 7;
-    OP_MOVE_SYSTEM_PROVIDER = 8;
-    OP_MOVE_EXTERNAL_PROVIDER = 9;
-    OP_DELETE = 10;
-    OP_RENAME = 11;
-    OP_CREATE_DIR = 12;
-    OP_OTHER_ERROR = 13;
-    OP_DELETE_ERROR = 14;
-    OP_MOVE_ERROR = 15;
-    OP_COPY_ERROR = 16;
-    OP_RENAME_ERROR = 17;
-    OP_CREATE_DIR_ERROR = 18;
-    OP_COMPRESS_INTRA_PROVIDER = 19;
-    OP_COMPRESS_SYSTEM_PROVIDER = 20;
-    OP_COMPRESS_EXTERNAL_PROVIDER = 21;
-    OP_EXTRACT_INTRA_PROVIDER = 22;
-    OP_EXTRACT_SYSTEM_PROVIDER = 23;
-    OP_EXTRACT_EXTERNAL_PROVIDER = 24;
-    OP_COMPRESS_ERROR = 25;
-    OP_EXTRACT_ERROR = 26;
-}
-
-enum SubFileOperation {
-    SUB_OP_UNKNOWN = 0;
-    SUB_OP_QUERY_DOC = 1;
-    SUB_OP_QUERY_CHILD = 2;
-    SUB_OP_OPEN_FILE = 3;
-    SUB_OP_READ_FILE = 4;
-    SUB_OP_CREATE_DOC = 5;
-    SUB_OP_WRITE_FILE = 6;
-    SUB_OP_DELETE_DOC = 7;
-    SUB_OP_OBTAIN_STREAM_TYPE = 8;
-    SUB_OP_QUICK_MOVE = 9;
-    SUB_OP_QUICK_COPY = 10;
-}
-
-enum CopyMoveOpMode {
-    MODE_UNKNOWN = 0;
-    MODE_PROVIDER = 1;
-    MODE_CONVERTED = 2;
-    MODE_CONVENTIONAL = 3;
-}
-
-enum Authority {
-    AUTH_UNKNOWN = 0;
-    AUTH_OTHER = 1;
-    AUTH_MEDIA = 2;
-    AUTH_STORAGE_INTERNAL = 3;
-    AUTH_STORAGE_EXTERNAL = 4;
-    AUTH_DOWNLOADS = 5;
-    AUTH_MTP = 6;
-}
-
-enum UserAction {
-    ACTION_UNKNOWN = 0;
-    ACTION_OTHER = 1;
-    ACTION_GRID = 2;
-    ACTION_LIST = 3;
-    ACTION_SORT_NAME = 4;
-    ACTION_SORT_DATE = 5;
-    ACTION_SORT_SIZE = 6;
-    ACTION_SORT_TYPE = 7;
-    ACTION_SEARCH = 8;
-    ACTION_SHOW_SIZE = 9;
-    ACTION_HIDE_SIZE = 10;
-    ACTION_SETTINGS = 11;
-    ACTION_COPY_TO = 12;
-    ACTION_MOVE_TO = 13;
-    ACTION_DELETE = 14;
-    ACTION_RENAME = 15;
-    ACTION_CREATE_DIR = 16;
-    ACTION_SELECT_ALL = 17;
-    ACTION_SHARE = 18;
-    ACTION_OPEN = 19;
-    ACTION_SHOW_ADVANCED = 20;
-    ACTION_HIDE_ADVANCED = 21;
-    ACTION_NEW_WINDOW = 22;
-    ACTION_PASTE_CLIPBOARD = 23;
-    ACTION_COPY_CLIPBOARD = 24;
-    ACTION_DRAG_N_DROP = 25;
-    ACTION_DRAG_N_DROP_MULTI_WINDOW = 26;
-    ACTION_CUT_CLIPBOARD = 27;
-    ACTION_COMPRESS = 28;
-    ACTION_EXTRACT_TO = 29;
-    ACTION_VIEW_IN_APPLICATION = 30;
-    ACTION_INSPECTOR = 31;
-    ACTION_SEARCH_CHIP = 32;
-    ACTION_SEARCH_HISTORY = 33;
-}
-
-enum InvalidScopedAccess {
-    SCOPED_DIR_ACCESS_UNKNOWN = 0;
-    SCOPED_DIR_ACCESS_INVALID_ARGUMENTS = 1;
-    SCOPED_DIR_ACCESS_INVALID_DIRECTORY = 2;
-    SCOPED_DIR_ACCESS_ERROR = 3;
-    SCOPED_DIR_ACCESS_DEPRECATED = 4;
-}
-
-enum SearchType {
-    TYPE_UNKNOWN = 0;
-    TYPE_CHIP_IMAGES = 1;
-    TYPE_CHIP_AUDIOS = 2;
-    TYPE_CHIP_VIDEOS = 3;
-    TYPE_CHIP_DOCS = 4;
-    TYPE_SEARCH_HISTORY = 5;
-    TYPE_SEARCH_STRING = 6;
-    TYPE_CHIP_LARGE_FILES = 7;
-    TYPE_CHIP_FROM_THIS_WEEK = 8;
-}
-
-enum SearchMode {
-    SEARCH_UNKNOWN = 0;
-    SEARCH_KEYWORD = 1;
-    SEARCH_CHIPS = 2;
-    SEARCH_KEYWORD_N_CHIPS = 3;
-}
diff --git a/core/proto/android/stats/enums.proto b/core/proto/android/stats/enums.proto
deleted file mode 100644
index 8f8055e..0000000
--- a/core/proto/android/stats/enums.proto
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats;
-option java_outer_classname = "StatsEnums";
-
-enum EventType {
-  // Unknown.
-  TYPE_UNKNOWN = 0;
-  CONTENT_SUGGESTIONS_CLASSIFY_CONTENT_CALL_SUCCEEDED = 1;
-  CONTENT_SUGGESTIONS_CLASSIFY_CONTENT_CALL_FAILED = 2;
-  CONTENT_SUGGESTIONS_SUGGEST_CONTENT_CALL_SUCCEEDED = 3;
-  CONTENT_SUGGESTIONS_SUGGEST_CONTENT_CALL_FAILED = 4;
-}
diff --git a/core/proto/android/stats/intelligence/enums.proto b/core/proto/android/stats/intelligence/enums.proto
deleted file mode 100644
index 0c210e3..0000000
--- a/core/proto/android/stats/intelligence/enums.proto
+++ /dev/null
@@ -1,40 +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.
- */
-
-syntax = "proto2";
-
-package android.stats.intelligence;
-option java_outer_classname = "IntelligenceStatsEnums";
-
-enum Status {
-  // The value wasn't set.
-  // protoc requires enum values to be unique by package rather than enum type.
-  // This forces us to prefix the enum values.
-  STATUS_UNKNOWN = 0;
-  // The event succeeded.
-  STATUS_SUCCEEDED = 1;
-  // The event had an error.
-  STATUS_FAILED = 2;
-}
-
-enum EventType {
-  // The value wasn't set.
-  EVENT_UNKNOWN = 0;
-  // ContentSuggestionsService classifyContentSelections call.
-  EVENT_CONTENT_SUGGESTIONS_CLASSIFY_CONTENT_CALL = 1;
-  // ContentSuggestionsService suggestContentSelections call.
-  EVENT_CONTENT_SUGGESTIONS_SUGGEST_CONTENT_CALL = 2;
-}
diff --git a/core/proto/android/stats/launcher/Android.bp b/core/proto/android/stats/launcher/Android.bp
deleted file mode 100644
index 976a0b8..0000000
--- a/core/proto/android/stats/launcher/Android.bp
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library {
-    name: "launcherprotosnano",
-    proto: {
-        type: "nano",
-        output_params: ["store_unknown_fields=true"],
-        include_dirs: ["external/protobuf/src"],
-    },
-
-    sdk_version: "current",
-    srcs: [
-        "*.proto",
-    ],
-}
-
-java_library {
-    name: "launcherprotoslite",
-    proto: {
-        type: "lite",
-        include_dirs: ["external/protobuf/src"],
-    },
-
-    sdk_version: "current",
-    srcs: [
-        "*.proto",
-    ],
-}
diff --git a/core/proto/android/stats/launcher/launcher.proto b/core/proto/android/stats/launcher/launcher.proto
deleted file mode 100644
index fc177d5..0000000
--- a/core/proto/android/stats/launcher/launcher.proto
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.launcher;
-option java_multiple_files = true;
-
-enum LauncherAction {
-    DEFAULT_ACTION = 0;
-    LAUNCH_APP = 1;
-    LAUNCH_TASK = 2;
-    DISMISS_TASK = 3;
-    LONGPRESS = 4;
-    DRAGDROP = 5;
-    SWIPE_UP = 6;
-    SWIPE_DOWN = 7;
-    SWIPE_LEFT = 8;
-    SWIPE_RIGHT = 9;
-}
-
-enum LauncherState {
-    LAUNCHER_STATE_UNSPECIFIED = 0;
-    BACKGROUND = 1;
-    HOME = 2;
-    OVERVIEW = 3;
-    ALLAPPS = 4;
-    UNCHANGED = 5;
-}
-
-message LauncherTarget {
-    enum Type {
-        NONE = 0;
-        ITEM_TYPE = 1;
-        CONTROL_TYPE = 2;
-        CONTAINER_TYPE = 3;
-    }
-    enum Item {
-        DEFAULT_ITEM = 0;
-        APP_ICON = 1;
-        SHORTCUT = 2;
-        WIDGET = 3;
-        FOLDER_ICON = 4;
-        DEEPSHORTCUT = 5;
-        SEARCHBOX = 6;
-        EDITTEXT = 7;
-        NOTIFICATION = 8;
-        TASK = 9;
-    }
-    enum Container {
-        DEFAULT_CONTAINER = 0;
-        HOTSEAT = 1;
-        FOLDER = 2;
-        PREDICTION = 3;
-        SEARCHRESULT = 4;
-    }
-    enum Control {
-        DEFAULT_CONTROL = 0;
-        MENU = 1;
-        UNINSTALL = 2;
-        REMOVE = 3;
-    }
-    optional Type type = 1;
-    optional Item item = 2;
-    optional Container container = 3;
-    optional Control control = 4;
-    optional string launch_component = 5;
-    optional int32 page_id = 6;
-    optional int32 grid_x = 7;
-    optional int32 grid_y = 8;
-}
-
-message LauncherExtension {
-    repeated LauncherTarget src_target = 1;
-    repeated LauncherTarget dst_target = 2;
-}
diff --git a/core/proto/android/stats/location/location_enums.proto b/core/proto/android/stats/location/location_enums.proto
deleted file mode 100644
index 553c01c..0000000
--- a/core/proto/android/stats/location/location_enums.proto
+++ /dev/null
@@ -1,122 +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.
- */
-
-syntax = "proto2";
-
-package android.stats.location;
-option java_outer_classname = "LocationStatsEnums";
-
-
-// APIs from LocationManagerService
-enum LocationManagerServiceApi {
-    API_UNKNOWN = 0;
-    API_REQUEST_LOCATION_UPDATES = 1;
-    API_ADD_GNSS_MEASUREMENTS_LISTENER = 2;
-    API_REGISTER_GNSS_STATUS_CALLBACK = 3;
-    API_REQUEST_GEOFENCE = 4;
-    API_SEND_EXTRA_COMMAND = 5;
-}
-
-enum UsageState {
-    USAGE_STARTED = 0;
-    USAGE_ENDED = 1;
-}
-
-// Type of location providers
-enum ProviderType {
-    PROVIDER_UNKNOWN = 0;
-    PROVIDER_NETWORK = 1;
-    PROVIDER_GPS = 2;
-    PROVIDER_PASSIVE = 3;
-    PROVIDER_FUSED = 4;
-}
-
-// Type of Callback passed in for this API
-enum CallbackType {
-    CALLBACK_UNKNOWN = 0;
-    // Current API does not need a callback, e.g. sendExtraCommand
-    CALLBACK_NOT_APPLICABLE = 1;
-    CALLBACK_LISTENER = 2;
-    CALLBACK_PENDING_INTENT = 3;
-}
-
-// Possible values for mQuality field in
-// frameworks/base/location/java/android/location/LocationRequest.java
-enum LocationRequestQuality {
-    QUALITY_UNKNOWN = 0;
-    ACCURACY_FINE = 100;
-    ACCURACY_BLOCK = 102;
-    ACCURACY_CITY = 104;
-    POWER_NONE = 200;
-    POWER_LOW = 201;
-    POWER_HIGH = 203;
-}
-
-// Bucketized values for interval field in
-// frameworks/base/location/java/android/location/LocationRequest.java
-enum LocationRequestIntervalBucket {
-    INTERVAL_UNKNOWN = 0;
-    INTERVAL_BETWEEN_0_SEC_AND_1_SEC = 1;
-    INTERVAL_BETWEEN_1_SEC_AND_5_SEC = 2;
-    INTERVAL_BETWEEN_5_SEC_AND_1_MIN = 3;
-    INTERVAL_BETWEEN_1_MIN_AND_10_MIN = 4;
-    INTERVAL_BETWEEN_10_MIN_AND_1_HOUR = 5;
-    INTERVAL_LARGER_THAN_1_HOUR = 6;
-}
-
-// Bucketized values for small displacement field in
-// frameworks/base/location/java/android/location/LocationRequest.java
-// Value in meters.
-enum SmallestDisplacementBucket {
-    DISTANCE_UNKNOWN = 0;
-    DISTANCE_ZERO = 1;
-    DISTANCE_BETWEEN_0_AND_100 = 2;
-    DISTANCE_LARGER_THAN_100 = 3;
-}
-
-// Bucketized values for expire_in field in
-// frameworks/base/location/java/android/location/LocationRequest.java
-enum ExpirationBucket {
-    EXPIRATION_UNKNOWN = 0;
-    EXPIRATION_BETWEEN_0_AND_20_SEC = 1;
-    EXPIRATION_BETWEEN_20_SEC_AND_1_MIN = 2;
-    EXPIRATION_BETWEEN_1_MIN_AND_10_MIN = 3;
-    EXPIRATION_BETWEEN_10_MIN_AND_1_HOUR = 4;
-    EXPIRATION_LARGER_THAN_1_HOUR = 5;
-    EXPIRATION_NO_EXPIRY = 6;
-}
-
-// Bucketized values for radius field in
-// frameworks/base/location/java/android/location/Geofence.java
-// Value in meters.
-enum GeofenceRadiusBucket {
-    RADIUS_UNKNOWN = 0;
-    RADIUS_BETWEEN_0_AND_100 = 1;
-    RADIUS_BETWEEN_100_AND_200 = 2;
-    RADIUS_BETWEEN_200_AND_300 = 3;
-    RADIUS_BETWEEN_300_AND_1000 = 4;
-    RADIUS_BETWEEN_1000_AND_10000 = 5;
-    RADIUS_LARGER_THAN_100000 = 6;
-    RADIUS_NEGATIVE = 7;
-}
-
-// Caller Activity Importance.
-enum ActivityImportance {
-    IMPORTANCE_UNKNOWN = 0;
-    IMPORTANCE_TOP = 1;
-    IMPORTANCE_FORGROUND_SERVICE = 2;
-    IMPORTANCE_BACKGROUND = 3;
-}
diff --git a/core/proto/android/stats/mediametrics/mediametrics.proto b/core/proto/android/stats/mediametrics/mediametrics.proto
deleted file mode 100644
index 9f0ff59..0000000
--- a/core/proto/android/stats/mediametrics/mediametrics.proto
+++ /dev/null
@@ -1,239 +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.
- */
-
-syntax = "proto2";
-
-package android.stats.mediametrics;
-
-/**
- * Track how we arbitrate between microphone/input requests.
- * Logged from
- *   frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
- *   frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp
- * Next Tag: 10
- */
-message AudioPolicyData {
-    optional int32 status = 1;
-    optional string request_source = 2;
-    optional string request_package = 3;
-    optional int32 request_session = 4;
-    optional string request_device = 5;
-    optional string active_source = 6;
-    optional string active_package = 7;
-    optional int32 active_session = 8;
-    optional string active_device = 9;
-}
-
-/**
- * Track properties of audio recording
- * Logged from
- *   frameworks/av/media/libaudioclient/AudioRecord.cpp
- *   frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp
- * Next Tag: 16
- */
-message AudioRecordData {
-    optional string encoding = 1;
-    optional string source = 2;
-    optional int32 latency = 3;
-    optional int32 samplerate = 4;
-    optional int32 channels = 5;
-    optional int64 created_millis = 6;
-    optional int64 duration_millis = 7;
-    optional int32 count = 8;
-    optional int32 error_code = 9;
-    optional string error_function = 10;
-    optional int32 port_id = 11;
-    optional int32 frame_count = 12;
-    optional string attributes = 13;
-    optional int64 channel_mask = 14;
-    optional int64 start_count = 15;
-
-}
-
-/**
- * Track audio thread performance data
- * Logged from
- *   frameworks/av/media/libnblog/ReportPerformance.cpp
- *   frameworks/av/services/mediaanalytics/statsd_audiothread.cpp
- * Next Tag: 28
- */
-message AudioThreadData {
-    optional string type = 1;
-    optional int32 framecount = 2;
-    optional int32 samplerate = 3;
-    optional string work_millis_hist = 4;
-    optional string latency_millis_hist = 5;
-    optional string warmup_millis_hist = 6;
-    optional int64 underruns = 7;
-    optional int64 overruns = 8;
-    optional int64 active_millis = 9;
-    optional int64 duration_millis = 10;
-
-    optional int32 id = 11;
-    optional int32 port_id = 12;
-    optional int32 sample_rate = 13;
-    optional int64 channel_mask = 14;
-    optional string encoding = 15;
-    optional int32 frame_count = 16;
-    optional string output_device = 17;
-    optional string input_device = 18;
-    optional double io_jitter_mean_millis = 19;
-    optional double io_jitter_stddev_millis = 20;
-    optional double process_time_mean_millis = 21;
-    optional double process_time_stddev_millis = 22;
-    optional double timestamp_jitter_mean_millis = 23;
-    optional double timestamp_jitter_stddev_millis = 24;
-    optional double latency_mean_millis = 25;
-    optional double latency_stddev_millis = 26;
-
-}
-
-/**
- * Track audio track playback data
- * Logged from
- *   frameworks/av/media/libaudioclient/AudioTrack.cpp
- *   frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp
- * Next Tag: 12
- */
-message AudioTrackData {
-    optional string stream_type = 1;
-    optional string content_type = 2;
-    optional string track_usage = 3;
-    optional int32 sample_rate = 4;
-    optional int64 channel_mask = 5;
-
-    optional int32 underrun_frames = 6;
-    optional int32 startup_glitch = 7;
-
-    optional int32 port_id = 8;
-    optional string encoding = 9;
-    optional int32 frame_count = 10;
-    optional string attributes = 11;
-
-
-}
-
-/**
- * Track Media Codec usage
- * Logged from:
- *   frameworks/av/media/libstagefright/MediaCodec.cpp
- *   frameworks/av/services/mediaanalytics/statsd_codec.cpp
- * Next Tag: 26
- */
-message CodecData {
-    optional string codec = 1;
-    optional string mime = 2;
-    optional string mode = 3;
-    optional int32 encoder = 4;
-    optional int32 secure = 5;
-    optional int32 width = 6;
-    optional int32 height = 7;
-    optional int32 rotation = 8;
-    optional int32 crypto = 9;
-    optional int32 profile = 10;
-    optional int32 level = 11;
-    optional int32 max_width = 12;
-    optional int32 max_height = 13;
-    optional int32 error_code = 14;
-    optional string error_state = 15;
-    optional int64 latency_max = 16;
-    optional int64 latency_min = 17;
-    optional int64 latency_avg = 18;
-    optional int64 latency_count = 19;
-    optional int64 latency_unknown = 20;
-    optional int32 queue_input_buffer_error = 21;
-    optional int32 queue_secure_input_buffer_error = 22;
-    optional string bitrate_mode = 23;
-    optional int32 bitrate = 24;
-    optional int64 lifetime_millis = 25;
-}
-
-/**
- * Track Media Extractor (pulling video/audio streams out of containers) usage
- * Logged from:
- *   frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp
- *   frameworks/av/services/mediaanalytics/statsd_extractor.cpp
- * Next Tag: 4
- */
-message ExtractorData {
-    optional string format = 1;
-    optional string mime = 2;
-    optional int32 tracks = 3;
-}
-
-/**
- * Track Media Player usage
- * this handles both nuplayer and nuplayer2
- * Logged from:
- *   frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
- *   frameworks/av/media/libmediaplayer2/nuplayer2/NuPlayer2Driver.cpp
- *   frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp
- * Next Tag: 21
- */
-message NuPlayerData {
-    optional string whichPlayer = 1;
-
-    optional string video_mime = 2;
-    optional string video_codec = 3;
-    optional int32 width = 4;
-    optional int32 height = 5;
-    optional int64 frames = 6;
-    optional int64 frames_dropped = 7;
-    optional double framerate = 8;
-    optional string audio_mime = 9;
-    optional string audio_codec = 10;
-    optional int64 duration_millis = 11;
-    optional int64 playing_millis = 12;
-    optional int32 error = 13;
-    optional int32 error_code = 14;
-    optional string error_state = 15;
-    optional string data_source_type = 16;
-    optional int64 rebuffering_millis = 17;
-    optional int32 rebuffers = 18;
-    optional int32 rebuffer_at_exit = 19;
-    optional int64 frames_dropped_startup = 20;
-}
-
-/**
- * Track information about recordings (e.g. camcorder)
- * Logged from
- *   frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp
- *   frameworks/av/services/mediaanalytics/if_statsd.cpp
- * Next Tag: 22
- */
-message RecorderData {
-    optional string audio_mime = 1;
-    optional string video_mime = 2;
-    optional int32 video_profile = 3;
-    optional int32 video_level = 4;
-    optional int32 width = 5;
-    optional int32 height = 6;
-    optional int32 rotation = 7;
-    optional int32 framerate = 8;
-    optional int32 capture_fps = 9;
-    optional double capture_fps_enable = 10;
-    optional int64 duration_millis = 11;
-    optional int64 paused_millis = 12;
-    optional int32 paused_count = 13;
-    optional int32 audio_bitrate = 14;
-    optional int32 audio_channels = 15;
-    optional int32 audio_samplerate = 16;
-    optional int32 movie_timescale = 17;
-    optional int32 audio_timescale = 18;
-    optional int32 video_timescale = 19;
-    optional int32 video_bitrate = 20;
-    optional int32 iframe_interval = 21;
-}
diff --git a/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto b/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto
deleted file mode 100644
index 138782b..0000000
--- a/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto
+++ /dev/null
@@ -1,30 +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.
- */
-
-syntax = "proto2";
-package android.stats.mediaprovider;
-option java_multiple_files = true;
-
-enum VolumeType {
-    // Volume is unknown
-    UNKNOWN = 0;
-    // Volume is MediaStore.VOLUME_INTERNAL
-    INTERNAL = 1;
-    // Volume is MediaStore.VOLUME_EXTERNAL_PRIMARY
-    EXTERNAL_PRIMARY = 2;
-    // Volume is non-primary external storage
-    EXTERNAL_OTHER = 3;
-}
diff --git a/core/proto/android/stats/otaupdate/updateengine_enums.proto b/core/proto/android/stats/otaupdate/updateengine_enums.proto
deleted file mode 100644
index a6e9919..0000000
--- a/core/proto/android/stats/otaupdate/updateengine_enums.proto
+++ /dev/null
@@ -1,82 +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.
- */
-
-syntax = "proto2";
-package android.stats.otaupdate;
-
-// The payload type of an OTA update attempt on A/B devices.
-enum PayloadType {
-    FULL = 10000;
-    DELTA = 10001;
-}
-
-// The attempt result reported by the update engine for an OTA update.
-enum AttemptResult {
-    UPDATE_SUCCEEDED = 10000;
-    INTERNAL_ERROR = 10001;
-    PAYLOAD_DOWNLOAD_ERROR = 10002;
-    METADATA_MALFORMED = 10003;
-    OPERATION_MALFORMED = 10004;
-    OPERATION_EXECUTION_ERROR = 10005;
-    METADATA_VERIFICATION_FAILED = 10006;
-    PAYLOAD_VERIFICATION_FAILED = 10007;
-    VERIFICATION_FAILED = 10008;
-    POSTINSTALL_FAILED = 10009;
-    ABNORMAL_TERMINATION = 10010;
-    UPDATE_CANCELED = 10011;
-    UPDATE_SUCCEEDED_NOT_ACTIVE = 10012;
-}
-
-// The error code reported by the update engine after an OTA update attempt
-// on A/B devices. More details in system/update_engine/common/error_code.h
-enum ErrorCode {
-    SUCCESS = 10000;
-    ERROR = 10001;
-    FILESYSTEM_COPIER_ERROR = 10004;
-    POST_INSTALL_RUNNER_ERROR = 10005;
-    PAYLOAD_MISMATCHED_TYPE_ERROR = 10006;
-    INSTALL_DEVICE_OPEN_ERROR = 10007;
-    KERNEL_DEVICE_OPEN_ERROR = 10008;
-    DOWNLOAD_TRANSFER_ERROR = 10009;
-    PAYLOAD_HASH_MISMATCH_ERROR = 10010;
-    PAYLOAD_SIZE_MISMATCH_ERROR = 10011;
-    DOWNLOAD_PAYLOAD_VERIFICATION_ERROR = 10012;
-    DOWNLOAD_NEW_PARTITION_INFO_ERROR = 10013;
-    DOWNLOAD_WRITE_ERROR = 10014;
-    NEW_ROOTFS_VERIFICATION_ERROR = 10015;
-    SIGNED_DELTA_PAYLOAD_EXPECTED_ERROR = 10017;
-    DOWNLOAD_PAYLOAD_PUB_KEY_VERIFICATION_ERROR = 10018;
-    DOWNLOAD_STATE_INITIALIZATION_ERROR = 10020;
-    DOWNLOAD_INVALID_METADATA_MAGIC_STRING = 10021;
-    DOWNLOAD_SIGNATURE_MISSING_IN_MANIFEST = 10022;
-    DOWNLOAD_MANIFEST_PARSE_ERROR = 10023;
-    DOWNLOAD_METADATA_SIGNATURE_ERROR = 10024;
-    DOWNLOAD_METADATA_SIGNATURE_VERIFICATION_ERROR = 10025;
-    DOWNLOAD_METADATA_SIGNATURE_MISMATCH = 10026;
-    DOWNLOAD_OPERATION_HASH_VERIFICATION_ERROR = 10027;
-    DOWNLOAD_OPERATION_EXECUTION_ERROR = 10028;
-    DOWNLOAD_OPERATION_HASH_MISMATCH = 10029;
-    DOWNLOAD_INVALID_METADATA_SIZE = 10032;
-    DOWNLOAD_INVALID_METADATA_SIGNATURE = 10033;
-    DOWNLOAD_OPERATION_HASH_MISSING_ERROR = 10038;
-    DOWNLOAD_METADATA_SIGNATURE_MISSING_ERROR = 10039;
-    UNSUPPORTED_MAJOR_PAYLOAD_VERSION = 10044;
-    UNSUPPORTED_MINOR_PAYLOAD_VERSION = 10045;
-    FILESYSTEM_VERIFIER_ERROR = 10047;
-    USER_CANCELED = 10048;
-    PAYLOAD_TIMESTAMP_ERROR = 10051;
-    UPDATED_BUT_NOT_ACTIVE = 10052;
-}
diff --git a/core/proto/android/stats/storage/storage_enums.proto b/core/proto/android/stats/storage/storage_enums.proto
deleted file mode 100644
index 6892e28..0000000
--- a/core/proto/android/stats/storage/storage_enums.proto
+++ /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.
- */
-
-syntax = "proto2";
-
-package android.stats.storage;
-
-enum ExternalStorageType {
-  UNKNOWN = 0;
-  SD_CARD = 1;
-  USB = 2;
-  OTHER = 3;
-}
diff --git a/core/proto/android/stats/style/Android.bp b/core/proto/android/stats/style/Android.bp
deleted file mode 100644
index f085a52..0000000
--- a/core/proto/android/stats/style/Android.bp
+++ /dev/null
@@ -1,27 +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.
-
-java_library {
-    name: "styleprotosnano",
-    proto: {
-        type: "nano",
-        output_params: ["store_unknown_fields=true"],
-        include_dirs: ["external/protobuf/src"],
-    },
-
-    sdk_version: "current",
-    srcs: [
-        "*.proto",
-    ],
-}
diff --git a/core/proto/android/stats/style/style_enums.proto b/core/proto/android/stats/style/style_enums.proto
deleted file mode 100644
index f3f491f..0000000
--- a/core/proto/android/stats/style/style_enums.proto
+++ /dev/null
@@ -1,48 +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.
- */
-
-syntax = "proto2";
-package android.stats.style;
-option java_multiple_files = true;
-
-enum Action {
-    DEFAULT_ACTION = 0;
-    ONRESUME = 1;
-    ONSTOP = 2;
-    PICKER_SELECT = 3;
-    PICKER_APPLIED = 4;
-    WALLPAPER_OPEN_CATEGORY = 5;
-    WALLPAPER_SELECT = 6;
-    WALLPAPER_APPLIED = 7;
-    WALLPAPER_EXPLORE = 8;
-    WALLPAPER_DOWNLOAD = 9;
-    WALLPAPER_REMOVE = 10;
-    LIVE_WALLPAPER_DOWNLOAD_SUCCESS = 11;
-    LIVE_WALLPAPER_DOWNLOAD_FAILED = 12;
-    LIVE_WALLPAPER_DOWNLOAD_CANCELLED = 13;
-    LIVE_WALLPAPER_DELETE_SUCCESS = 14;
-    LIVE_WALLPAPER_DELETE_FAILED = 15;
-    LIVE_WALLPAPER_APPLIED = 16;
-    LIVE_WALLPAPER_INFO_SELECT = 17;
-    LIVE_WALLPAPER_CUSTOMIZE_SELECT = 18;
-}
-
-enum LocationPreference {
-    LOCATION_PREFERENCE_UNSPECIFIED = 0;
-    LOCATION_UNAVAILABLE = 1;
-    LOCATION_CURRENT = 2;
-    LOCATION_MANUAL = 3;
-}
diff --git a/core/proto/android/stats/sysui/notification_enums.proto b/core/proto/android/stats/sysui/notification_enums.proto
deleted file mode 100644
index 30bdeca..0000000
--- a/core/proto/android/stats/sysui/notification_enums.proto
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.sysui;
-
-// Enum used in NotificationReported and NotificationChannelModified atoms
-enum NotificationImportance {  // Constants from NotificationManager.java
-  IMPORTANCE_UNSPECIFIED = -1000;  // Should not occur for real notifications.
-  IMPORTANCE_NONE = 0;  // No importance: does not show in the shade.
-  IMPORTANCE_MIN = 1;  // Minimum to show in the shade.
-  IMPORTANCE_LOW = 2;  // Shows in shade, maybe status bar, no buzz/beep.
-  IMPORTANCE_DEFAULT = 3;  // Shows everywhere, makes noise, no heads-up.
-  IMPORTANCE_HIGH = 4;  // Shows everywhere, makes noise, heads-up, may full-screen.
-  IMPORTANCE_IMPORTANT_CONVERSATION = 5;  // High + isImportantConversation().
-}
diff --git a/core/proto/android/stats/textclassifier/Android.bp b/core/proto/android/stats/textclassifier/Android.bp
deleted file mode 100644
index bf90227..0000000
--- a/core/proto/android/stats/textclassifier/Android.bp
+++ /dev/null
@@ -1,23 +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.
-
-java_library_static {
-    name: "textclassifierprotoslite",
-    proto: {
-        type: "lite",
-    },
-    srcs: [
-        "*.proto",
-    ],
-}
\ No newline at end of file
diff --git a/core/proto/android/stats/textclassifier/textclassifier_enums.proto b/core/proto/android/stats/textclassifier/textclassifier_enums.proto
deleted file mode 100644
index 4be7b7c..0000000
--- a/core/proto/android/stats/textclassifier/textclassifier_enums.proto
+++ /dev/null
@@ -1,87 +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.
- */
-
-syntax = "proto2";
-package android.stats.textclassifier;
-option java_multiple_files = true;
-
-enum EventType {
-    TYPE_UNKNOWN = 0;
-    // User started a new selection.
-    SELECTION_STARTED = 1;
-    // User modified an existing selection.
-    SELECTION_MODIFIED = 2;
-    // Smart selection triggered for a single token (word).
-    SMART_SELECTION_SINGLE = 3;
-    // Smart selection triggered spanning multiple tokens (words).
-    SMART_SELECTION_MULTI = 4;
-    // Something else other than user or the default TextClassifier triggered a selection.
-    AUTO_SELECTION = 5;
-    // Smart actions shown to the user.
-    ACTIONS_SHOWN = 6;
-    // User clicked a link.
-    LINK_CLICKED = 7;
-    // User typed over the selection.
-    OVERTYPE = 8;
-    // User clicked on Copy action.
-    COPY_ACTION = 9;
-    // User clicked on Paste action.
-    PASTE_ACTION = 10;
-    // User clicked on Cut action.
-    CUT_ACTION = 11;
-    // User clicked on Share action.
-    SHARE_ACTION = 12;
-    // User clicked on a Smart action.
-    SMART_ACTION = 13;
-    // User dragged+dropped the selection.
-    SELECTION_DRAG = 14;
-    // Selection is destroyed.
-    SELECTION_DESTROYED = 15;
-    // User clicked on a custom action.
-    OTHER_ACTION = 16;
-    // User clicked on Select All action
-    SELECT_ALL = 17;
-    // User reset the smart selection.
-    SELECTION_RESET = 18;
-    // User composed a reply.
-    MANUAL_REPLY = 19;
-    // TextClassifier generated some actions
-    ACTIONS_GENERATED = 20;
-    // Some text links were generated
-    LINKS_GENERATED = 21;
-}
-
-enum WidgetType {
-    WIDGET_TYPE_UNKNOWN = 0;
-    // Standard TextView
-    WIDGET_TYPE_TEXTVIEW = 1;
-    // EditText
-    WIDGET_TYPE_EDITTEXT = 2;
-    // Not selectable textview
-    WIDGET_TYPE_UNSELECTABLE_TEXTVIEW = 3;
-    // Standard Webview
-    WIDGET_TYPE_WEBVIEW = 4;
-    // Editable TextView
-    WIDGET_TYPE_EDIT_WEBVIEW = 5;
-    // Custom text widget
-    WIDGET_TYPE_CUSTOM_TEXTVIEW = 6;
-    // Custom editable text widget.
-    WIDGET_TYPE_CUSTOM_EDITTEXT = 7;
-    // Non-selectable text widget.
-    WIDGET_TYPE_CUSTOM_UNSELECTABLE_TEXTVIEW = 8;
-    // Notification
-    WIDGET_TYPE_NOTIFICATION = 9;
-}
diff --git a/core/proto/android/stats/tls/enums.proto b/core/proto/android/stats/tls/enums.proto
deleted file mode 100644
index 1777d69..0000000
--- a/core/proto/android/stats/tls/enums.proto
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto2";
-package android.stats.tls;
-
-// Keep in sync with
-// external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java
-enum Protocol {
-    UNKNOWN_PROTO = 0;
-    SSL_V3 = 1;
-    TLS_V1 = 2;
-    TLS_V1_1 = 3;
-    TLS_V1_2 = 4;
-    TLS_V1_3 = 5;
-}
-
-// Cipher suites' ids are based on IANA's database:
-// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4
-//
-// If you add new cipher suite, make sure id is the same as in  IANA's database (see link above)
-//
-// Keep in sync with
-// external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java
-enum CipherSuite {
-    UNKNOWN_CIPHER_SUITE = 0x0000;
-
-    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A;
-    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014;
-    TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035;
-    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009;
-    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013;
-    TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F;
-    TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A;
-
-    // TLSv1.2 cipher suites
-    TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C;
-    TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D;
-    TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F;
-    TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030;
-    TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B;
-    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C;
-    TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9;
-    TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8;
-
-    // Pre-Shared Key (PSK) cipher suites
-    TLS_PSK_WITH_AES_128_CBC_SHA = 0x008C;
-    TLS_PSK_WITH_AES_256_CBC_SHA = 0x008D;
-    TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = 0xC035;
-    TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = 0xC036;
-    TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAC;
-
-    // TLS 1.3 cipher suites
-    TLS_AES_128_GCM_SHA256 = 0x1301;
-    TLS_AES_256_GCM_SHA384 = 0x1302;
-    TLS_CHACHA20_POLY1305_SHA256 = 0x1303;
-}
\ No newline at end of file
diff --git a/core/proto/android/telecomm/enums.proto b/core/proto/android/telecomm/enums.proto
deleted file mode 100644
index 5ca4a85..0000000
--- a/core/proto/android/telecomm/enums.proto
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.telecom;
-
-option java_outer_classname = "TelecomProtoEnums";
-option java_multiple_files = true;
-
-/**
- * Call states, primarily used in CallState.java,
- * Call.java, and CallsManager.java in packages/services.
- */
-enum CallStateEnum {
-    /**
-     * Indicates that a call is new and not connected. This is used as the default state internally
-     * within Telecom and should not be used between Telecom and call services. Call services are
-     * not expected to ever interact with NEW calls, but {@link android.telecom.InCallService}s will
-     * see calls in this state.
-     */
-    NEW = 0;
-
-    /**
-     * The initial state of an outgoing {@code Call}.
-     * Common transitions are to {@link #DIALING} state for a successful call or
-     * {@link #DISCONNECTED} if it failed.
-     */
-    CONNECTING = 1;
-
-    /**
-     * The state of an outgoing {@code Call} when waiting on user to select a
-     * {@link android.telecom.PhoneAccount} through which to place the call.
-     */
-    SELECT_PHONE_ACCOUNT = 2;
-
-    /**
-     * Indicates that a call is outgoing and in the dialing state. A call transitions to this state
-     * once an outgoing call has begun (e.g., user presses the dial button in Dialer). Calls in this
-     * state usually transition to {@link #ACTIVE} if the call was answered or {@link #DISCONNECTED}
-     * if the call was disconnected somehow (e.g., failure or cancellation of the call by the user).
-     */
-    DIALING = 3;
-
-    /**
-     * Indicates that a call is incoming and the user still has the option of answering, rejecting,
-     * or doing nothing with the call. This state is usually associated with some type of audible
-     * ringtone. Normal transitions are to {@link #ACTIVE} if answered or {@link #DISCONNECTED}
-     * otherwise.
-     */
-    RINGING = 4;
-
-    /**
-     * Indicates that a call is currently connected to another party and a communication channel is
-     * open between them. The normal transition to this state is by the user answering a
-     * {@link #DIALING} call or a {@link #RINGING} call being answered by the other party.
-     */
-    ACTIVE = 5;
-
-    /**
-     * Indicates that the call is currently on hold. In this state, the call is not terminated
-     * but no communication is allowed until the call is no longer on hold. The typical transition
-     * to this state is by the user putting an {@link #ACTIVE} call on hold by explicitly performing
-     * an action, such as clicking the hold button.
-     */
-    ON_HOLD = 6;
-
-    /**
-     * Indicates that a call is currently disconnected. All states can transition to this state
-     * by the call service giving notice that the connection has been severed. When the user
-     * explicitly ends a call, it will not transition to this state until the call service confirms
-     * the disconnection or communication was lost to the call service currently responsible for
-     * this call (e.g., call service crashes).
-     */
-    DISCONNECTED = 7;
-
-    /**
-     * Indicates that the call was attempted (mostly in the context of outgoing, at least at the
-     * time of writing) but cancelled before it was successfully connected.
-     */
-    ABORTED = 8;
-
-    /**
-     * Indicates that the call is in the process of being disconnected and will transition next
-     * to a {@link #DISCONNECTED} state.
-     * <p>
-     * This state is not expected to be communicated from the Telephony layer, but will be reported
-     * to the InCall UI for calls where disconnection has been initiated by the user but the
-     * ConnectionService has confirmed the call as disconnected.
-     */
-    DISCONNECTING = 9;
-
-    /**
-     * Indicates that the call is in the process of being pulled to the local device.
-     * <p>
-     * This state should only be set on a call with
-     * {@link android.telecom.Connection#PROPERTY_IS_EXTERNAL_CALL} and
-     * {@link android.telecom.Connection#CAPABILITY_CAN_PULL_CALL}.
-     */
-    PULLING = 10;
-
-    /**
-     * Indicates that an incoming call has been answered by the in-call UI, but Telephony hasn't yet
-     * set the call to active.
-     */
-    ANSWERED = 11;
-
-    /**
-     * Indicates that the call is undergoing audio processing by a different app in the background.
-     * @see android.telecom.Call#STATE_AUDIO_PROCESSING
-     */
-    AUDIO_PROCESSING = 12;
-
-    /**
-     * Indicates that the call is in a fake ringing state.
-     * @see android.telecom.Call#STATE_SIMULATED_RINGING
-     */
-    SIMULATED_RINGING = 13;
-}
-
-// Disconnect causes for a call. Primarily used by android/telecom/DisconnectCause.java
-enum DisconnectCauseEnum {
-    /**
-     * Disconnected because of an unknown or unspecified reason.
-     */
-    UNKNOWN = 0;
-
-    /**
-     * Disconnected because there was an error, such as a problem with the network.
-     */
-    ERROR = 1;
-
-    /**
-     * Disconnected because of a local user-initiated action, such as hanging up.
-     */
-    LOCAL = 2;
-
-    /**
-     * Disconnected because of a remote user-initiated action, such as the other party hanging up
-     * up.
-     */
-    REMOTE = 3;
-
-    /**
-     * Disconnected because it has been canceled.
-     */
-    CANCELED = 4;
-
-    /**
-     * Disconnected because there was no response to an incoming call.
-     */
-    MISSED = 5;
-
-    /**
-     * Disconnected because the user rejected an incoming call.
-     */
-    REJECTED = 6;
-
-    /**
-     * Disconnected because the other party was busy.
-     */
-    BUSY = 7;
-
-    /**
-     * Disconnected because of a restriction on placing the call, such as dialing in airplane
-     * mode.
-     */
-    RESTRICTED = 8;
-
-    /**
-     * Disconnected for reason not described by other disconnect codes.
-     */
-    OTHER = 9;
-
-    /**
-     * Disconnected because the connection manager did not support the call. The call will be tried
-     * again without a connection manager. See {@link PhoneAccount#CAPABILITY_CONNECTION_MANAGER}.
-     */
-    CONNECTION_MANAGER_NOT_SUPPORTED = 10;
-
-    /**
-     * Disconnected because the user did not locally answer the incoming call, but it was answered
-     * on another device where the call was ringing.
-     */
-    ANSWERED_ELSEWHERE = 11;
-
-    /**
-     * Disconnected because the call was pulled from the current device to another device.
-     */
-    CALL_PULLED = 12;
-}
diff --git a/core/proto/android/telephony/enums.proto b/core/proto/android/telephony/enums.proto
deleted file mode 100644
index f14e3ed..0000000
--- a/core/proto/android/telephony/enums.proto
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.telephony;
-
-option java_outer_classname = "TelephonyProtoEnums";
-option java_multiple_files = true;
-
-enum CallBearerEnum {
-    /** Call bearer is unknown or invalid */
-    CALL_BEARER_UNKNOWN = 0;
-
-    /** Call bearer is legacy CS */
-    CALL_BEARER_CS = 1;
-
-    /** Call bearer is IMS */
-    CALL_BEARER_IMS = 2;
-}
-
-enum CallDirectionEnum {
-    /** Call direction: unknown or invalid */
-    CALL_DIRECTION_UNKNOWN = 0;
-
-    /** Call direction: mobile originated (outgoing for this device) */
-    CALL_DIRECTION_MO = 1;
-
-    /** Call direction: mobile terminated (incoming for this device) */
-    CALL_DIRECTION_MT = 2;
-}
-
-// Call setup duration buckets.
-// See com.android.internal.telephony.metrics.VoiceCallSessionStats for definition.
-enum CallSetupDurationEnum {
-    CALL_SETUP_DURATION_UNKNOWN = 0;
-    CALL_SETUP_DURATION_EXTREMELY_FAST = 1;
-    CALL_SETUP_DURATION_ULTRA_FAST = 2;
-    CALL_SETUP_DURATION_VERY_FAST = 3;
-    CALL_SETUP_DURATION_FAST = 4;
-    CALL_SETUP_DURATION_NORMAL = 5;
-    CALL_SETUP_DURATION_SLOW = 6;
-    CALL_SETUP_DURATION_VERY_SLOW = 7;
-    CALL_SETUP_DURATION_ULTRA_SLOW = 8;
-    CALL_SETUP_DURATION_EXTREMELY_SLOW = 9;
-}
-
-// Data conn. power states, primarily used by android/telephony/DataConnectionRealTimeInfo.java.
-enum DataConnectionPowerStateEnum {
-    DATA_CONNECTION_POWER_STATE_LOW = 1;
-    DATA_CONNECTION_POWER_STATE_MEDIUM = 2;
-    DATA_CONNECTION_POWER_STATE_HIGH = 3;
-    DATA_CONNECTION_POWER_STATE_UNKNOWN = 2147483647; // Java Integer.MAX_VALUE;
-}
-
-// Network type enums, primarily used by android/telephony/TelephonyManager.java.
-// Do not add negative types.
-enum NetworkTypeEnum {
-    NETWORK_TYPE_UNKNOWN = 0;
-    NETWORK_TYPE_GPRS = 1;
-    NETWORK_TYPE_EDGE = 2;
-    NETWORK_TYPE_UMTS = 3;
-    NETWORK_TYPE_CDMA = 4;
-    NETWORK_TYPE_EVDO_0 = 5;
-    NETWORK_TYPE_EVDO_A = 6;
-    NETWORK_TYPE_1XRTT = 7;
-    NETWORK_TYPE_HSDPA = 8;
-    NETWORK_TYPE_HSUPA = 9;
-    NETWORK_TYPE_HSPA = 10;
-    NETWORK_TYPE_IDEN = 11;
-    NETWORK_TYPE_EVDO_B = 12;
-    NETWORK_TYPE_LTE = 13;
-    NETWORK_TYPE_EHRPD = 14;
-    NETWORK_TYPE_HSPAP = 15;
-    NETWORK_TYPE_GSM = 16;
-    NETWORK_TYPE_TD_SCDMA = 17;
-    NETWORK_TYPE_IWLAN = 18;
-    NETWORK_TYPE_LTE_CA = 19;
-    NETWORK_TYPE_NR = 20;
-}
-
-// Signal strength levels, primarily used by android/telephony/SignalStrength.java.
-enum SignalStrengthEnum {
-    SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
-    SIGNAL_STRENGTH_POOR = 1;
-    SIGNAL_STRENGTH_MODERATE = 2;
-    SIGNAL_STRENGTH_GOOD = 3;
-    SIGNAL_STRENGTH_GREAT = 4;
-}
-
-enum ServiceStateEnum {
-    /**
-     * Normal operation condition, the phone is registered
-     * with an operator either in home network or in roaming.
-     */
-    SERVICE_STATE_IN_SERVICE = 0;
-
-    /**
-     * Phone is not registered with any operator, the phone
-     * can be currently searching a new operator to register to, or not
-     * searching to registration at all, or registration is denied, or radio
-     * signal is not available.
-     */
-    SERVICE_STATE_OUT_OF_SERVICE = 1;
-
-    /**
-     * The phone is registered and locked.  Only emergency numbers are allowed. {@more}
-     */
-    SERVICE_STATE_EMERGENCY_ONLY = 2;
-
-    /**
-     * Radio of telephony is explicitly powered off.
-     */
-    SERVICE_STATE_POWER_OFF = 3;
-}
-
-enum SimStateEnum {
-    SIM_STATE_UNKNOWN = 0;
-    /** SIM card state: no SIM card is available in the device */
-    SIM_STATE_ABSENT = 1;
-    /** SIM card state: Locked: requires the user's SIM PIN to unlock */
-    SIM_STATE_PIN_REQUIRED = 2;
-    /** SIM card state: Locked: requires the user's SIM PUK to unlock */
-    SIM_STATE_PUK_REQUIRED = 3;
-    /** SIM card state: Locked: requires a network PIN to unlock */
-    SIM_STATE_NETWORK_LOCKED = 4;
-    /** SIM card state: Ready */
-    SIM_STATE_READY = 5;
-    /** SIM card state: SIM Card is NOT READY */
-    SIM_STATE_NOT_READY = 6;
-    /** SIM card state: SIM Card Error, permanently disabled */
-    SIM_STATE_PERM_DISABLED = 7;
-    /** SIM card state: SIM Card Error, present but faulty */
-    SIM_STATE_CARD_IO_ERROR = 8;
-    /** SIM card state: SIM Card restricted, present but not usable due to
-     * carrier restrictions.
-     */
-    SIM_STATE_CARD_RESTRICTED = 9;
-    /**
-     * SIM card state: Loaded: SIM card applications have been loaded
-     * @hide
-     */
-    SIM_STATE_LOADED = 10;
-    /**
-     * SIM card state: SIM Card is present
-     * @hide
-     */
-    SIM_STATE_PRESENT = 11;
-}
diff --git a/core/proto/android/view/enums.proto b/core/proto/android/view/enums.proto
deleted file mode 100644
index 0172e78..0000000
--- a/core/proto/android/view/enums.proto
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.view;
-
-option java_outer_classname = "ViewProtoEnums";
-option java_multiple_files = true;
-
-// Screen states, primarily used by android/view/Display.java.
-enum DisplayStateEnum {
-    // The display state is unknown.
-    DISPLAY_STATE_UNKNOWN = 0;
-    // The display state is off.
-    DISPLAY_STATE_OFF = 1;
-    // The display state is on.
-    DISPLAY_STATE_ON = 2;
-    // The display is dozing in a low power state; it is still on but is
-    // optimized for showing system-provided content while the device is
-    // non-interactive.
-    DISPLAY_STATE_DOZE = 3;
-    // The display is dozing in a suspended low power state; it is still on
-    // but is optimized for showing static system-provided content while the
-    // device is non-interactive.
-    DISPLAY_STATE_DOZE_SUSPEND = 4;
-    // The display is on and optimized for VR mode.
-    DISPLAY_STATE_VR = 5;
-    // The display is in a suspended full power state; it is still on but the
-    // CPU is not updating it.
-    DISPLAY_STATE_ON_SUSPEND = 6;
-}
-
-// Constants found in android.view.WindowManager.
-enum TransitionTypeEnum {
-    TRANSIT_NONE = 0;
-    TRANSIT_UNSET = -1;
-    TRANSIT_ACTIVITY_OPEN = 6;
-    TRANSIT_ACTIVITY_CLOSE = 7;
-    TRANSIT_TASK_OPEN = 8;
-    TRANSIT_TASK_CLOSE = 9;
-    TRANSIT_TASK_TO_FRONT = 10;
-    TRANSIT_TASK_TO_BACK = 11;
-    TRANSIT_WALLPAPER_CLOSE = 12;
-    TRANSIT_WALLPAPER_OPEN = 13;
-    TRANSIT_WALLPAPER_INTRA_OPEN = 14;
-    TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
-    TRANSIT_TASK_OPEN_BEHIND = 16;
-    TRANSIT_TASK_IN_PLACE = 17;
-    TRANSIT_ACTIVITY_RELAUNCH = 18;
-    TRANSIT_DOCK_TASK_FROM_RECENTS = 19;
-    TRANSIT_KEYGUARD_GOING_AWAY = 20;
-    TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21;
-    TRANSIT_KEYGUARD_OCCLUDE = 22;
-    TRANSIT_KEYGUARD_UNOCCLUDE = 23;
-    TRANSIT_TRANSLUCENT_ACTIVITY_OPEN = 24;
-    TRANSIT_TRANSLUCENT_ACTIVITY_CLOSE = 25;
-    TRANSIT_CRASHING_ACTIVITY_CLOSE = 26;
-}
diff --git a/core/proto/android/wifi/enums.proto b/core/proto/android/wifi/enums.proto
deleted file mode 100644
index 315c579..0000000
--- a/core/proto/android/wifi/enums.proto
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.net.wifi;
-
-option java_outer_classname = "WifiProtoEnums";
-option java_multiple_files = true;
-
-/**
- * Wifi Lock modes, primarily used in
- * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLockManager.java.
- */
-enum WifiModeEnum {
-    /**
-     * Deprecated.
-     * Wi-Fi will be kept active, and will behave normally.
-     */
-    WIFI_MODE_FULL = 1 [deprecated=true];
-
-    /**
-     * Deprecated.
-     * Wi-Fi will be kept active, but the only operation that will be supported is initiation of
-     * scans, and the subsequent reporting of scan results.
-     */
-    WIFI_MODE_SCAN_ONLY = 2 [deprecated=true];
-
-    /**
-     * Wi-Fi will not go to power save.
-     */
-    WIFI_MODE_FULL_HIGH_PERF = 3;
-
-    /**
-     * Wi-Fi will operate with a priority to achieve low latency.
-     */
-    WIFI_MODE_FULL_LOW_LATENCY = 4;
-}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index a417f0c..96a57c1 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -144,7 +144,7 @@
     <protected-broadcast android:name="android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED" />
     <protected-broadcast android:name="android.bluetooth.device.action.UUID" />
     <protected-broadcast android:name="android.bluetooth.device.action.MAS_INSTANCE" />
-    <protected-broadcast android:name="android.bluetooth.action.ALIAS_CHANGED" />
+    <protected-broadcast android:name="android.bluetooth.device.action.ALIAS_CHANGED" />
     <protected-broadcast android:name="android.bluetooth.device.action.FOUND" />
     <protected-broadcast android:name="android.bluetooth.device.action.CLASS_CHANGED" />
     <protected-broadcast android:name="android.bluetooth.device.action.ACL_CONNECTED" />
@@ -1345,7 +1345,7 @@
         android:priority="800" />
 
     <!-- Allows an application to access data from sensors that the user uses to
-         measure what is happening inside his/her body, such as heart rate.
+         measure what is happening inside their body, such as heart rate.
          <p>Protection level: dangerous -->
     <permission android:name="android.permission.BODY_SENSORS"
         android:permissionGroup="android.permission-group.UNDEFINED"
@@ -2323,6 +2323,14 @@
     <permission android:name="android.permission.READ_CARRIER_APP_INFO"
         android:protectionLevel="signature" />
 
+    <!-- Required by a GbaService to ensure that only the system can bind to it.
+         <p>Protection level: signature
+         @SystemApi
+         @hide
+    -->
+    <permission android:name="android.permission.BIND_GBA_SERVICE"
+        android:protectionLevel="signature" />
+
     <!-- ================================== -->
     <!-- Permissions for sdcard interaction -->
     <!-- ================================== -->
@@ -3032,6 +3040,12 @@
     <permission android:name="android.permission.DUMP"
         android:protectionLevel="signature|privileged|development" />
 
+    <!-- Allows an application to start tracing for InputMethod and WindowManager.
+    <p>Not for use by third-party applications.
+    @hide -->
+    <permission android:name="android.permission.CONTROL_UI_TRACING"
+        android:protectionLevel="signature|privileged|development" />
+
     <!-- Allows an application to read the low-level system log files.
     <p>Not for use by third-party applications, because
     Log entries can contain the user's private information. -->
@@ -5061,6 +5075,10 @@
     <permission android:name="android.permission.ACCESS_LOCUS_ID_USAGE_STATS"
                 android:protectionLevel="signature|appPredictor" />
 
+    <!-- @hide Allows an application to create/destroy input consumer. -->
+    <permission android:name="android.permission.INPUT_CONSUMER"
+                android:protectionLevel="signature" />
+
     <!-- Attribution for Country Detector. -->
     <attribution android:tag="CountryDetector" android:label="@string/country_detector"/>
     <!-- Attribution for Location service. -->
diff --git a/core/res/OWNERS b/core/res/OWNERS
new file mode 100644
index 0000000..263d638
--- /dev/null
+++ b/core/res/OWNERS
@@ -0,0 +1,17 @@
+adamp@google.com
+alanv@google.com
+dsandler@android.com
+dsandler@google.com
+hackbod@android.com
+hackbod@google.com
+jsharkey@android.com
+jsharkey@google.com
+michaelwr@google.com
+nandana@google.com
+narayan@google.com
+ogunwale@google.com
+patb@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
+toddke@google.com
+yamasani@google.com
diff --git a/core/res/res/drawable-car-night/car_dialog_button_background.xml b/core/res/res/drawable-car-night/car_dialog_button_background.xml
deleted file mode 100644
index 138cb38..0000000
--- a/core/res/res/drawable-car-night/car_dialog_button_background.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2020 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_focused="true">
-        <ripple android:color="#2371cd">
-            <item android:id="@android:id/mask">
-                <color android:color="@*android:color/car_white_1000"/>
-            </item>
-        </ripple>
-    </item>
-    <item>
-        <ripple android:color="?android:attr/colorControlHighlight">
-            <item android:id="@android:id/mask">
-                <color android:color="@*android:color/car_white_1000"/>
-            </item>
-        </ripple>
-    </item>
-</selector>
diff --git a/core/res/res/drawable-car/car_dialog_button_background.xml b/core/res/res/drawable-car/car_dialog_button_background.xml
index a7d40bcd..72e5af3 100644
--- a/core/res/res/drawable-car/car_dialog_button_background.xml
+++ b/core/res/res/drawable-car/car_dialog_button_background.xml
@@ -16,11 +16,18 @@
   -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_focused="true">
-        <ripple android:color="#4b9eff">
-            <item android:id="@android:id/mask">
-                <color android:color="@*android:color/car_white_1000"/>
+        <layer-list>
+            <item>
+                <shape android:shape="rectangle">
+                    <solid android:color="#3D94CBFF"/>
+                </shape>
             </item>
-        </ripple>
+            <item>
+                <shape android:shape="rectangle">
+                    <stroke android:width="8dp" android:color="#94CBFF"/>
+                </shape>
+            </item>
+        </layer-list>
     </item>
     <item>
         <ripple android:color="?android:attr/colorControlHighlight">
diff --git a/core/res/res/layout/notification_material_action_list.xml b/core/res/res/layout/notification_material_action_list.xml
index 3615b9e..df271f0 100644
--- a/core/res/res/layout/notification_material_action_list.xml
+++ b/core/res/res/layout/notification_material_action_list.xml
@@ -25,6 +25,7 @@
             android:id="@+id/actions_container_layout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:gravity="end"
             android:orientation="horizontal"
             android:paddingEnd="@dimen/bubble_gone_padding_end"
             >
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 89ce3b0..7d773d9 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Druk kieslys om oop te sluit of maak noodoproep."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Druk kieslys om oop te maak."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Teken patroon om te ontsluit"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Noodgeval"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Noodoproep"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Keer terug na oproep"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Reg!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Probeer weer"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Opgedateer deur jou administrateur"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Uitgevee deur jou administrateur"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Batterybespaarder doen die volgende om die batterylewe te verleng:\n\n•Skakel Donkertema aan\n•Skakel agtergrondaktiwiteit, sommige visuele effekte en ander kenmerke, soos \"Ok Google\", af of beperk hulle\n\n"<annotation id="url">"Kom meer te wete"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Batterybespaarder doen die volgende om batterylewe te verleng:\n\n•Skakel Donkertema aan\n•Skakel agtergrondaktiwiteit, sommige visuele effekte en ander kenmerke, soos \"Ok Google\", af of beperk hulle"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Batterybespaarder doen die volgende om die batterylewe te verleng:\n\n• Skakel Donkertema aan\n• Skakel agtergrondaktiwiteit, sommige visuele effekte en ander kenmerke, soos \"Ok Google\", af of beperk dit\n\n"<annotation id="url">"Kom meer te wete"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Batterybespaarder doen die volgende om batterylewe te verleng:\n\n• Skakel Donkertema aan\n• Skakel agtergrondaktiwiteit, sommige visuele effekte en ander kenmerke, soos \"Ok Google\", af of beperk dit"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Databespaarder verhoed sommige programme om data in die agtergrond te stuur of te aanvaar om datagebruik te help verminder. \'n Program wat jy tans gebruik kan by data ingaan, maar sal dit dalk minder gereeld doen. Dit kan byvoorbeeld beteken dat prente nie wys totdat jy op hulle tik nie."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Skakel Databespaarder aan?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Skakel aan"</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 54a002d..57f2d6a 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"ለመክፈት ምናሌ ተጫንወይም የአደጋ ጊዜ ጥሪ አድርግ።"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"ለመክፈት ምናሌ ተጫን"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"ለመክፈት ስርዓተ ጥለት ሳል"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"ድንገተኛ አደጋ"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"የአደጋ ጊዜ ጥሪ"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"ወደ ጥሪ ተመለስ"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"ትክክል!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"እንደገና ሞክር"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"በእርስዎ አስተዳዳሪ ተዘምኗል"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"በእርስዎ አስተዳዳሪ ተሰርዟል"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"እሺ"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"የባትሪ ዕድሜን ለማራዘም፣ የባትሪ ቆጣቢ፦\n\n•ጨለማ ገጽታን ያበራል\n•የበስተጀርባ እንቅስቃሴን፣ አንዳንድ የሚታዩ ማሳመሪያዎችን፣ እና ሌሎች እንደ «Hey Google» ያሉ ባህሪያትን ያጠፋል ወይም ይገድባል\n\n"<annotation id="url">"የበለጠ ለመረዳት"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"የባትሪ ዕድሜን ለማራዘም፣ የባትሪ ቆጣቢ፦\n\n•ጨለማ ገጽታን ያበራል\n•የበስተጀርባ እንቅስቃሴን፣ አንዳንድ የሚታዩ ማሳመሪያዎችን፣ እና ሌሎች እንደ «Hey Google» ያሉ ባህሪያትን ያጠፋል ወይም ይገድባል"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"የባትሪ ዕድሜን ለማራዘም፣ የባትሪ ቆጣቢ፦\n\n•ጨለማ ገጽታን ያበራል\n•የበስተጀርባ እንቅስቃሴን፣ አንዳንድ የሚታዩ ማሳመሪያዎችን፣ እና ሌሎች እንደ «Hey Google» ያሉ ባህሪያትን ያጠፋል ወይም ይገድባል\n\n"<annotation id="url">"የበለጠ ለመረዳት"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"የባትሪ ዕድሜን ለማራዘም የባትሪ ኃይል ቆጣቢ፦\n\n• ጨለማ ገጽታን ያበራል\n• የበስተጀርባ እንቅስቃሴን፣ አንዳንድ ምስላዊ ተጽዕኖዎችን እና ሌሎች እንደ «Hey Google» ያሉ ባህሪያትን ያጠፋል ወይም ይገድባል"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"የውሂብ አጠቃቀም እንዲቀንስ ለማገዝ ውሂብ ቆጣቢ አንዳንድ መተግበሪያዎች ከበስተጀርባ ሆነው ውሂብ እንዳይልኩ ወይም እንዳይቀበሉ ይከለክላቸዋል። በአሁኑ ጊዜ እየተጠቀሙበት ያለ መተግበሪያ ውሂብ ሊደርስ ይችላል፣ ነገር ግን ባነሰ ተደጋጋሚነት ሊሆን ይችላል። ይሄ ማለት ለምሳሌ ምስሎችን መታ እስኪያደርጓቸው ድረስ ላይታዩ ይችላሉ ማለት ነው።"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ውሂብ ቆጣቢ ይጥፋ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"አብራ"</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 7564ae7..4a99ec8 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -841,7 +841,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"اضغط على \"القائمة\" لإلغاء التأمين أو إجراء اتصال بالطوارئ."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"اضغط على \"القائمة\" لإلغاء التأمين."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"رسم نقش لإلغاء التأمين"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"الطوارئ"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"مكالمة طوارئ"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"العودة إلى الاتصال"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"صحيح!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"أعد المحاولة"</string>
@@ -1884,8 +1884,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"تم التحديث بواسطة المشرف"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"تم الحذف بواسطة المشرف"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"حسنًا"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"‏لإطالة عمر البطارية، تعمل ميزة \"توفير شحن البطارية\" على:\n\n• تفعيل \"المظهر الداكن\"\n• إيقاف أو حظر النشاط في الخلفية وبعض التأثيرات المرئية والميزات الأخرى، مثل \"Ok Google\".\n\n"<annotation id="url">"مزيد من المعلومات"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"‏لإطالة عمر البطارية، تعمل ميزة \"توفير شحن البطارية\" على:\n\n• تفعيل \"المظهر الداكن\"\n• إيقاف أو حظر النشاط في الخلفية وبعض التأثيرات المرئية والميزات الأخرى، مثل \"Ok Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"‏لإطالة عمر البطارية، تعمل ميزة \"توفير شحن البطارية\" على:\n·تفعيل \"المظهر الداكن\"\n إيقاف أو حظر النشاط في الخلفية وبعض التأثيرات المرئية والميزات الأخرى، مثل \"Ok Google\"\n\n\n"<annotation id="url">"مزيد من المعلومات"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"‏لإطالة عمر البطارية، تعمل ميزة \"توفير شحن البطارية\" على:\n\n• تفعيل \"المظهر الداكن\"\n• إيقاف أو حظر النشاط في الخلفية وبعض التأثيرات المرئية والميزات الأخرى، مثل \"Ok Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"للمساعدة في خفض استخدام البيانات، تمنع ميزة \"توفير البيانات\" بعض التطبيقات من إرسال البيانات وتلقّيها في الخلفية. يمكن للتطبيقات المتاحة لديك الآن استخدام البيانات، ولكن لا يمكنها الإكثار من ذلك. وهذا يعني أن الصور مثلاً لا تظهر حتى تنقر عليها."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"هل تريد تفعيل توفير البيانات؟"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"تفعيل"</string>
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index 8f9c179..4ff2a6a 100644
--- a/core/res/res/values-as/strings.xml
+++ b/core/res/res/values-as/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"আনলক কৰিবলৈ বা জৰুৰীকালীন কল কৰিবলৈ মেনু টিপক।"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"আনলক কৰিবলৈ মেনু টিপক।"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"আনলক কৰিবলৈ আর্হি আঁকক"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"জৰুৰীকালীন"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"জৰুৰীকালীন কল"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"কললৈ উভতি যাওক"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"শুদ্ধ!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"আকৌ চেষ্টা কৰক"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"আপোনাৰ প্ৰশাসকে আপেডট কৰিছে"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"আপোনাৰ প্ৰশাসকে মচিছে"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ঠিক আছে"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"বেটাৰীৰ জীৱনকাল বৃদ্ধি কৰিবলৈ, বেটাৰী সঞ্চয়কাৰীয়ে:\n\n•গাঢ় ৰঙৰ থীম অন কৰে\n•পটভূমিৰ কাৰ্যকলাপ, কিছুমান ভিজুৱেল প্ৰভাৱ আৰু “Hey Google”ৰ দৰে অন্য সুবিধাসমূহ অফ কৰে অথবা সেইবোৰ সীমাবদ্ধ কৰে\n\n"<annotation id="url">"অধিক জানক"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"বেটাৰীৰ জীৱনকাল বৃদ্ধি কৰিবলৈ, বেটাৰী সঞ্চয়কাৰীয়ে:\n\n•গাঢ় ৰঙৰ থীম অন কৰে\n•পটভূমিৰ কাৰ্যকলাপ, কিছুমান ভিজুৱেল প্ৰভাৱ আৰু “Hey Google”ৰ দৰে অন্য সুবিধাসমূহ অফ কৰে অথবা সেইবোৰ সীমাবদ্ধ কৰে"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"বেটাৰীৰ জীৱনকাল বৃদ্ধি কৰিবলৈ, বেটাৰী সঞ্চয়কাৰীয়ে:\n\n•গাঢ় ৰঙৰ থীম অন কৰে\n•নেপথ্যৰ কাৰ্যকলাপ, কিছুমান ভিজুৱেল ইফেক্ট আৰু “Hey Google”ৰ দৰে অন্য সুবিধাসমূহ অফ কৰে অথবা সেইবোৰ সীমাবদ্ধ কৰে\n\n"<annotation id="url">"অধিক জানক"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"বেটাৰীৰ জীৱনকাল বৃদ্ধি কৰিবলৈ বেটাৰী সঞ্চয়কাৰীয়ে:\n\n• গাঢ় ৰঙৰ থীম অন কৰে\n• নেপথ্যৰ কাৰ্যকলাপ, কিছুমান ভিজুৱেল ইফেক্ট আৰু “Hey Google”ৰ দৰে অন্য সুবিধাসমূহ অফ কৰে অথবা সীমাবদ্ধ কৰে"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ডেটা ব্য়ৱহাৰ মাত্ৰা কম কৰিবৰ বাবে ডেটা সঞ্চয়কাৰীয়ে কিছুমান এপক নেপথ্য়ত ডেটা প্ৰেৰণ বা সংগ্ৰহ কৰাত বাধা প্ৰদান কৰে। আপুনি বৰ্তমান ব্য়ৱহাৰ কৰি থকা এটা এপে ডেটা ব্য়ৱহাৰ কৰিব পাৰে, কিন্তু সঘনাই এই কার্য কৰিব নোৱাৰিব পাৰে। ইয়াৰ অৰ্থ এইয়ে হ\'ব পাৰে যে, উদাহৰণস্বৰূপে, আপুনি নিটিপা পর্যন্ত প্ৰতিচ্ছবিসমূহ দেখুওৱা নহ’ব।"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ডেটা সঞ্চয়কাৰী অন কৰিবনে?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"অন কৰক"</string>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index f1b9743..1d5d6d8 100644
--- a/core/res/res/values-az/strings.xml
+++ b/core/res/res/values-az/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Təcili zəng kilidini açmaq və ya yerləşdirmək üçün Menyu düyməsinə basın."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Kilidi açmaq üçün Menyu düyməsinə basın."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Kilidi açmaq üçün model çəkin"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Təcili"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Təcili zəng"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Zəngə qayıt"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Düzdür!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Bir də cəhd edin"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Admin tərəfindən yeniləndi"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Admin tərəfindən silindi"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Batareyanın ömrünü artırmaq üçün Enerjiyə Qənaət funksiyası:\n\n•Qaranlıq temanı aktiv edir\n•Arxa fondakı fəaliyyəti, bəzi vizual effektləri və “Hey Google” kimi digər funksiyaları deaktiv edir və ya məhdudlaşdırır\n\n"<annotation id="url">"Ətraflı məlumat"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Batareyanın ömrünü artırmaq üçün Enerjiyə Qənaət funksiyası:\n\n•Qaranlıq temanı aktiv edir\n•Arxa fondakı fəaliyyəti, bəzi vizual effektləri və “Hey Google” kimi digər funksiyaları deaktiv edir və ya məhdudlaşdırır"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Batareyanın ömrünü artırmaq üçün Enerjiyə Qənaət funksiyası:\n\n• Qaranlıq temanı aktiv edir\n• Arxa fondakı fəaliyyəti, bəzi vizual effektləri və “Hey Google” kimi digər funksiyaları deaktiv edir və ya məhdudlaşdırır\n\n"<annotation id="url">"Ətraflı məlumat"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Batareyanın ömrünü artırmaq üçün Enerjiyə Qənaət funksiyası:\n\n• Qaranlıq temanı aktiv edir\n• Arxa fondakı fəaliyyəti, bəzi vizual effektləri və “Hey Google” kimi digər funksiyaları deaktiv edir və ya məhdudlaşdırır"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Data istifadəsini azalatmaq üçün, Data Qanaəti bəzi tətbiqlərin arxafonda data göndərməsinin və qəbulunun qarşısını alır. Hazırda işlətdiyiniz tətbiq dataya daxil ola bilər, ancaq bunu tez-tez edə bilməz. Bu o deməkdir ki, məsələn, Siz üzərinə tıklamadıqca o şəkillər göstərilməyəcək."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Data Qənaəti aktiv edilsin?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Aktivləşdirin"</string>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index 239fff1..daec63a 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -94,7 +94,7 @@
     <string name="notification_channel_mobile_data_status" msgid="1941911162076442474">"Status mobilnih podataka"</string>
     <string name="notification_channel_sms" msgid="1243384981025535724">"SMS-ovi"</string>
     <string name="notification_channel_voice_mail" msgid="8457433203106654172">"Poruke govorne pošte"</string>
-    <string name="notification_channel_wfc" msgid="9048240466765169038">"Pozivanje preko Wi-Fi mreže"</string>
+    <string name="notification_channel_wfc" msgid="9048240466765169038">"Pozivanje preko WiFi mreže"</string>
     <string name="notification_channel_sim" msgid="5098802350325677490">"Status SIM-a"</string>
     <string name="notification_channel_sim_high_prio" msgid="642361929452850928">"Obaveštenja SIM kartice sa statusom „visok prioritet“"</string>
     <string name="peerTtyModeFull" msgid="337553730440832160">"Korisnik zahteva POTPUN režim TTY"</string>
@@ -123,30 +123,30 @@
     <string name="roamingText11" msgid="5245687407203281407">"Baner rominga je uključen"</string>
     <string name="roamingText12" msgid="673537506362152640">"Baner rominga je isključen"</string>
     <string name="roamingTextSearching" msgid="5323235489657753486">"Pretraživanje usluge"</string>
-    <string name="wfcRegErrorTitle" msgid="3193072971584858020">"Podešavanje pozivanja preko Wi-Fi-ja nije uspelo"</string>
+    <string name="wfcRegErrorTitle" msgid="3193072971584858020">"Podešavanje pozivanja preko WiFi-a nije uspelo"</string>
   <string-array name="wfcOperatorErrorAlertMessages">
-    <item msgid="468830943567116703">"Da biste upućivali pozive i slali poruke preko Wi-Fi-ja, prvo zatražite od mobilnog operatera da vam omogući ovu uslugu. Zatim u Podešavanjima ponovo uključite Pozivanje preko Wi-Fi-ja. (kôd greške: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
+    <item msgid="468830943567116703">"Da biste upućivali pozive i slali poruke preko WiFi-a, prvo zatražite od mobilnog operatera da vam omogući ovu uslugu. Zatim u Podešavanjima ponovo uključite Pozivanje preko WiFi-a. (kôd greške: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
   </string-array>
   <string-array name="wfcOperatorErrorNotificationMessages">
     <item msgid="4795145070505729156">"Problem u vezi sa registrovanjem pozivanja preko Wi‑Fi-ja kod mobilnog operatera: <xliff:g id="CODE">%1$s</xliff:g>"</item>
   </string-array>
     <!-- no translation found for wfcSpnFormat_spn (2982505428519096311) -->
     <skip />
-    <string name="wfcSpnFormat_spn_wifi_calling" msgid="3165949348000906194">"<xliff:g id="SPN">%s</xliff:g> pozivanje preko Wi-Fi-ja"</string>
-    <string name="wfcSpnFormat_spn_wifi_calling_vo_hyphen" msgid="3836827895369365298">"<xliff:g id="SPN">%s</xliff:g> – pozivanje preko Wi-Fi-ja"</string>
+    <string name="wfcSpnFormat_spn_wifi_calling" msgid="3165949348000906194">"<xliff:g id="SPN">%s</xliff:g> pozivanje preko WiFi-a"</string>
+    <string name="wfcSpnFormat_spn_wifi_calling_vo_hyphen" msgid="3836827895369365298">"<xliff:g id="SPN">%s</xliff:g> – pozivanje preko WiFi-a"</string>
     <string name="wfcSpnFormat_wlan_call" msgid="4895315549916165700">"WLAN poziv"</string>
     <string name="wfcSpnFormat_spn_wlan_call" msgid="255919245825481510">"<xliff:g id="SPN">%s</xliff:g> WLAN poziv"</string>
-    <string name="wfcSpnFormat_spn_wifi" msgid="7232899594327126970">"<xliff:g id="SPN">%s</xliff:g> Wi-Fi"</string>
-    <string name="wfcSpnFormat_wifi_calling_bar_spn" msgid="8383917598312067365">"Pozivanje preko Wi-Fi-ja | <xliff:g id="SPN">%s</xliff:g>"</string>
+    <string name="wfcSpnFormat_spn_wifi" msgid="7232899594327126970">"<xliff:g id="SPN">%s</xliff:g> WiFi"</string>
+    <string name="wfcSpnFormat_wifi_calling_bar_spn" msgid="8383917598312067365">"Pozivanje preko WiFi-a | <xliff:g id="SPN">%s</xliff:g>"</string>
     <string name="wfcSpnFormat_spn_vowifi" msgid="6865214948822061486">"<xliff:g id="SPN">%s</xliff:g> VoWifi"</string>
-    <string name="wfcSpnFormat_wifi_calling" msgid="6178935388378661755">"Pozivanje preko Wi-Fi-ja"</string>
-    <string name="wfcSpnFormat_wifi" msgid="1376356951297043426">"Wi-Fi"</string>
-    <string name="wfcSpnFormat_wifi_calling_wo_hyphen" msgid="7178561009225028264">"Pozivanje preko Wi-Fi-ja"</string>
+    <string name="wfcSpnFormat_wifi_calling" msgid="6178935388378661755">"Pozivanje preko WiFi-a"</string>
+    <string name="wfcSpnFormat_wifi" msgid="1376356951297043426">"WiFi"</string>
+    <string name="wfcSpnFormat_wifi_calling_wo_hyphen" msgid="7178561009225028264">"Pozivanje preko WiFi-a"</string>
     <string name="wfcSpnFormat_vowifi" msgid="8371335230890725606">"VoWifi"</string>
     <string name="wifi_calling_off_summary" msgid="5626710010766902560">"Isključeno"</string>
-    <string name="wfc_mode_wifi_preferred_summary" msgid="1035175836270943089">"Pozivanje preko Wi-Fi-ja"</string>
+    <string name="wfc_mode_wifi_preferred_summary" msgid="1035175836270943089">"Pozivanje preko WiFi-a"</string>
     <string name="wfc_mode_cellular_preferred_summary" msgid="4958965609212575619">"Poziv preko mobilne mreže"</string>
-    <string name="wfc_mode_wifi_only_summary" msgid="104951993894678665">"Samo Wi-Fi"</string>
+    <string name="wfc_mode_wifi_only_summary" msgid="104951993894678665">"Samo WiFi"</string>
     <string name="cfTemplateNotForwarded" msgid="862202427794270501">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Nije prosleđeno"</string>
     <string name="cfTemplateForwarded" msgid="9132506315842157860">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
     <string name="cfTemplateForwardedTime" msgid="735042369233323609">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g> nakon <xliff:g id="TIME_DELAY">{2}</xliff:g> sekunde/i"</string>
@@ -495,14 +495,14 @@
     <string name="permdesc_changeNetworkState" msgid="649341947816898736">"Dozvoljava aplikaciji da menja status povezivanja sa mrežom."</string>
     <string name="permlab_changeTetherState" msgid="9079611809931863861">"promena povezivanja privezivanjem"</string>
     <string name="permdesc_changeTetherState" msgid="3025129606422533085">"Dozvoljava aplikaciji da menja status veze sa privezanom mrežom."</string>
-    <string name="permlab_accessWifiState" msgid="5552488500317911052">"pregled Wi-Fi veza"</string>
-    <string name="permdesc_accessWifiState" msgid="6913641669259483363">"Dozvoljava aplikaciji da pregleda informacije o Wi-Fi umrežavanju, kao što su informacije o tome da li je Wi-Fi omogućen i nazivi povezanih Wi-Fi uređaja."</string>
-    <string name="permlab_changeWifiState" msgid="7947824109713181554">"povezivanje i prekid veze sa Wi-Fi mrežom"</string>
-    <string name="permdesc_changeWifiState" msgid="7170350070554505384">"Dozvoljava aplikaciji da se povezuje sa pristupnim tačkama za Wi-Fi i prekida vezu sa njima, kao i da unosi promene u konfiguraciju uređaja za Wi-Fi mreže."</string>
-    <string name="permlab_changeWifiMulticastState" msgid="285626875870754696">"omogućavanje prijema višesmernog Wi-Fi saobraćaja"</string>
-    <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="191079868596433554">"Dozvoljava aplikaciji da prima pakete koji se šalju na sve uređaje na Wi-Fi mreži pomoću višesmernih adresa, a ne samo na tablet. Koristi više napajanja od režima jednosmernog saobraćaja."</string>
-    <string name="permdesc_changeWifiMulticastState" product="tv" msgid="1336952358450652595">"Dozvoljava aplikaciji da prima pakete koji se šalju na sve uređaje na Wi-Fi mreži pomoću višesmernih adresa, a ne samo na Android TV uređaj. Koristi više energije od režima bez višesmernog slanja."</string>
-    <string name="permdesc_changeWifiMulticastState" product="default" msgid="8296627590220222740">"Dozvoljava aplikaciji da prima pakete koji se šalju na sve uređaje na Wi-Fi mreži pomoću višesmernih adresa, a ne samo na telefon. Koristi više napajanja od režima jednosmernog saobraćaja."</string>
+    <string name="permlab_accessWifiState" msgid="5552488500317911052">"pregled WiFi veza"</string>
+    <string name="permdesc_accessWifiState" msgid="6913641669259483363">"Dozvoljava aplikaciji da pregleda informacije o WiFi umrežavanju, kao što su informacije o tome da li je WiFi omogućen i nazivi povezanih WiFi uređaja."</string>
+    <string name="permlab_changeWifiState" msgid="7947824109713181554">"povezivanje i prekid veze sa WiFi mrežom"</string>
+    <string name="permdesc_changeWifiState" msgid="7170350070554505384">"Dozvoljava aplikaciji da se povezuje sa pristupnim tačkama za WiFi i prekida vezu sa njima, kao i da unosi promene u konfiguraciju uređaja za WiFi mreže."</string>
+    <string name="permlab_changeWifiMulticastState" msgid="285626875870754696">"omogućavanje prijema višesmernog WiFi saobraćaja"</string>
+    <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="191079868596433554">"Dozvoljava aplikaciji da prima pakete koji se šalju na sve uređaje na WiFi mreži pomoću višesmernih adresa, a ne samo na tablet. Koristi više napajanja od režima jednosmernog saobraćaja."</string>
+    <string name="permdesc_changeWifiMulticastState" product="tv" msgid="1336952358450652595">"Dozvoljava aplikaciji da prima pakete koji se šalju na sve uređaje na WiFi mreži pomoću višesmernih adresa, a ne samo na Android TV uređaj. Koristi više energije od režima bez višesmernog slanja."</string>
+    <string name="permdesc_changeWifiMulticastState" product="default" msgid="8296627590220222740">"Dozvoljava aplikaciji da prima pakete koji se šalju na sve uređaje na WiFi mreži pomoću višesmernih adresa, a ne samo na telefon. Koristi više napajanja od režima jednosmernog saobraćaja."</string>
     <string name="permlab_bluetoothAdmin" msgid="6490373569441946064">"pristup Bluetooth podešavanjima"</string>
     <string name="permdesc_bluetoothAdmin" product="tablet" msgid="5370837055438574863">"Dozvoljava aplikaciji da konfiguriše lokalni Bluetooth tablet, kao i da otkrije daljinske uređaje i upari se sa njima."</string>
     <string name="permdesc_bluetoothAdmin" product="tv" msgid="1623992984547014588">"Dozvoljava aplikaciji da konfiguriše Bluetooth na Android TV uređaju i da otkrije udaljene uređaje i upari se sa njima."</string>
@@ -832,7 +832,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Pritisnite „Meni“ da biste otključali telefon ili uputite hitan poziv."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Pritisnite „Meni“ za otključavanje."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Unesite šablon za otključavanje"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Hitne službe"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Hitan poziv"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Nazad na poziv"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Tačno!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Probajte ponovo"</string>
@@ -923,7 +923,7 @@
     <string name="granularity_label_link" msgid="9007852307112046526">"link"</string>
     <string name="granularity_label_line" msgid="376204904280620221">"red"</string>
     <string name="factorytest_failed" msgid="3190979160945298006">"Fabričko testiranje nije uspelo"</string>
-    <string name="factorytest_not_system" msgid="5658160199925519869">"Radnja FACTORY_TEST je podržana samo za pakete instalirane u direktorijumu /system/app."</string>
+    <string name="factorytest_not_system" msgid="5658160199925519869">"Radnja FACTORY_TEST je podržana samo za pakete instalirane u folderu /system/app."</string>
     <string name="factorytest_no_action" msgid="339252838115675515">"Nije pronađen nijedan paket koji obezbeđuje radnju FACTORY_TEST."</string>
     <string name="factorytest_reboot" msgid="2050147445567257365">"Restartuj"</string>
     <string name="js_dialog_title" msgid="7464775045615023241">"Na stranici na adresi „<xliff:g id="TITLE">%s</xliff:g>“ piše:"</string>
@@ -1256,7 +1256,7 @@
     <string name="ringtone_picker_title_alarm" msgid="7438934548339024767">"Zvuci alarma"</string>
     <string name="ringtone_picker_title_notification" msgid="6387191794719608122">"Zvuci obaveštenja"</string>
     <string name="ringtone_unknown" msgid="5059495249862816475">"Nepoznato"</string>
-    <string name="wifi_available_sign_in" msgid="381054692557675237">"Prijavljivanje na Wi-Fi mrežu"</string>
+    <string name="wifi_available_sign_in" msgid="381054692557675237">"Prijavljivanje na WiFi mrežu"</string>
     <string name="network_available_sign_in" msgid="1520342291829283114">"Prijavite se na mrežu"</string>
     <!-- no translation found for network_available_sign_in_detailed (7520423801613396556) -->
     <skip />
@@ -1272,7 +1272,7 @@
     <string name="network_switch_metered_toast" msgid="501662047275723743">"Prešli ste sa tipa mreže <xliff:g id="PREVIOUS_NETWORK">%1$s</xliff:g> na tip mreže <xliff:g id="NEW_NETWORK">%2$s</xliff:g>"</string>
   <string-array name="network_switch_type_name">
     <item msgid="2255670471736226365">"mobilni podaci"</item>
-    <item msgid="5520925862115353992">"Wi-Fi"</item>
+    <item msgid="5520925862115353992">"WiFi"</item>
     <item msgid="1055487873974272842">"Bluetooth"</item>
     <item msgid="1616528372438698248">"Eternet"</item>
     <item msgid="9177085807664964627">"VPN"</item>
@@ -1538,10 +1538,10 @@
     <string name="data_usage_warning_title" msgid="9034893717078325845">"Upozorenje na potrošnju podataka"</string>
     <string name="data_usage_warning_body" msgid="1669325367188029454">"Potrošili ste <xliff:g id="APP">%s</xliff:g> podataka"</string>
     <string name="data_usage_mobile_limit_title" msgid="3911447354393775241">"Dostigli ste ograničenje podataka"</string>
-    <string name="data_usage_wifi_limit_title" msgid="2069698056520812232">"Nema više Wi-Fi podataka"</string>
+    <string name="data_usage_wifi_limit_title" msgid="2069698056520812232">"Nema više WiFi podataka"</string>
     <string name="data_usage_limit_body" msgid="3567699582000085710">"Podaci su pauzirani tokom ostatka ciklusa"</string>
     <string name="data_usage_mobile_limit_snoozed_title" msgid="101888478915677895">"Potrošili ste mobilne podatke"</string>
-    <string name="data_usage_wifi_limit_snoozed_title" msgid="1622359254521960508">"Potrošili ste Wi-Fi podatke"</string>
+    <string name="data_usage_wifi_limit_snoozed_title" msgid="1622359254521960508">"Potrošili ste WiFi podatke"</string>
     <string name="data_usage_limit_snoozed_body" msgid="545146591766765678">"Prekoračili ste <xliff:g id="SIZE">%s</xliff:g> od podešenog ograničenja"</string>
     <string name="data_usage_restricted_title" msgid="126711424380051268">"Pozadinski podaci su ograničeni"</string>
     <string name="data_usage_restricted_body" msgid="5338694433686077733">"Dodirnite za uklanjanje ograničenja."</string>
@@ -1815,8 +1815,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Ažurirao je administrator"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Izbrisao je administrator"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Potvrdi"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Da bi se produžilo trajanje baterije, Ušteda baterije:\n\n•uključuje tamnu temu\n•isključuje ili ograničava aktivnosti u pozadini, neke vizuelne efekte i druge funkcije, na primer „Ok Google“\n\n"<annotation id="url">"Saznajte više"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Da bi se produžilo trajanje baterije, Ušteda baterije:\n\n•uključuje tamnu temu\n•isključuje ili ograničava aktivnosti u pozadini, neke vizuelne efekte i druge funkcije, na primer, „Ok Google“"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Da bi se produžilo trajanje baterije, Ušteda baterije:\n\n• uključuje tamnu temu\n• isključuje ili ograničava aktivnosti u pozadini, neke vizuelne efekte i druge funkcije, na primer „Ok Google“\n\n"<annotation id="url">"Saznajte više"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Da bi se produžilo trajanje baterije, Ušteda baterije:\n\n• uključuje tamnu temu\n• isključuje ili ograničava aktivnosti u pozadini, neke vizuelne efekte i druge funkcije, na primer, „Ok Google“"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Da bi se smanjila potrošnja podataka, Ušteda podataka sprečava neke aplikacije da šalju ili primaju podatke u pozadini. Aplikacija koju trenutno koristite može da pristupa podacima, ali će to činiti ređe. Na primer, slike se neće prikazivati dok ih ne dodirnete."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Želite da uključite Uštedu podataka?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Uključi"</string>
@@ -2038,7 +2038,7 @@
     <string name="battery_saver_charged_notification_summary" product="default" msgid="5544457317418624367">"Baterija telefona je dovoljno napunjena. Funkcije više nisu ograničene."</string>
     <string name="battery_saver_charged_notification_summary" product="tablet" msgid="4426317048139996888">"Baterija tableta je dovoljno napunjena. Funkcije više nisu ograničene."</string>
     <string name="battery_saver_charged_notification_summary" product="device" msgid="1031562417867646649">"Baterija uređaja je dovoljno napunjena. Funkcije više nisu ograničene."</string>
-    <string name="mime_type_folder" msgid="2203536499348787650">"Direktorijum"</string>
+    <string name="mime_type_folder" msgid="2203536499348787650">"Folder"</string>
     <string name="mime_type_apk" msgid="3168784749499623902">"Android aplikacija"</string>
     <string name="mime_type_generic" msgid="4606589110116560228">"Datoteka"</string>
     <string name="mime_type_generic_ext" msgid="9220220924380909486">"<xliff:g id="EXTENSION">%1$s</xliff:g> datoteka"</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index ddee07c..6fbdd46 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Націсніце \"Меню\", каб разблакаваць, або зрабіце экстраны выклік."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Націсніце \"Меню\", каб разблакаваць."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Намалюйце камбінацыю разблакоўкі, каб разблакаваць"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Экстранны выклік"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Экстранны выклік"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Вярнуцца да выкліку"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Правільна!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Паўтарыце спробу"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Абноўлены вашым адміністратарам"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Выдалены вашым адміністратарам"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ОК"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Каб павялічыць тэрмін службы акумулятара, рэжым эканоміі зараду:\n\n•·уключае цёмную тэму;\n• выключае ці абмяжоўвае дзеянні ў фонавым рэжыме, некаторыя візуальныя эфекты і іншыя функцыі, напрыклад \"Ok Google\"\n\n"<annotation id="url">"Даведацца больш"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Каб павялічыць тэрмін службы акумулятара, рэжым эканоміі зараду:\n\n• уключае цёмную тэму;\n• выключае ці абмяжоўвае дзеянні ў фонавым рэжыме, некаторыя візуальныя эфекты і іншыя функцыі, напрыклад \"Ok Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Каб павялічыць тэрмін службы акумулятара, рэжым эканоміі зараду:\n\n•·уключае цёмную тэму;\n• выключае ці абмяжоўвае дзеянні ў фонавым рэжыме, некаторыя візуальныя эфекты і іншыя функцыі, напрыклад \"Ok Google\"\n\n"<annotation id="url">"Даведацца больш"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Каб павялічыць тэрмін службы акумулятара, рэжым эканоміі зараду:\n\n• уключае цёмную тэму;\n• выключае ці абмяжоўвае дзеянні ў фонавым рэжыме, некаторыя візуальныя эфекты і іншыя функцыі, напрыклад \"Ok Google\""</string>
     <string name="data_saver_description" msgid="4995164271550590517">"У рэжыме \"Эканомія трафіка\" фонавая перадача для некаторых праграмам адключана. Праграма, якую вы зараз выкарыстоўваеце, можа атрымліваць доступ да даных, але радзей, чым звычайна. Напрыклад, відарысы могуць не загружацца, пакуль вы не націсніце на іх."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Уключыць Эканомію трафіка?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Уключыць"</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 99d7d86..a7012a0 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Натиснете „Меню“, за да отключите или да извършите спешно обаждане."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Натиснете „Меню“, за да отключите."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Нарисувайте фигура, за да отключите"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Спешни случаи"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Спешно обаждане"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Назад към обаждането"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Правилно!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Опитайте отново"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Актуализирано от администратора ви"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Изтрито от администратора ви"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ОК"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"С цел удължаване на живота на батерията режимът за запазването ѝ:\n\n•·включва тъмната тема;\n•·изключва или ограничава активността на заден план, някои визуални ефекти и други функции, като например „Ok Google“.\n\n"<annotation id="url">"Научете повече"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"С цел удължаване на живота на батерията режимът за запазването ѝ:\n\n• включва тъмната тема;\n• изключва или ограничава активността на заден план, някои визуални ефекти и други функции, като например „Ok Google“."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"С цел удължаване на живота на батерията режимът за запазването ѝ:\n\n•·включва тъмната тема;\n•·изключва или ограничава активността на заден план, някои визуални ефекти и други функции, като например „Ok Google“.\n\n"<annotation id="url">"Научете повече"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"С цел удължаване на живота на батерията режимът за запазването ѝ:\n\n• включва тъмната тема;\n• изключва или ограничава активността на заден план, някои визуални ефекти и други функции, като например „Ok Google“."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"С цел намаляване на преноса на данни функцията за икономия на данни не позволява на някои приложения да изпращат или получават данни на заден план. Понастоящем използвано от вас приложение може да използва данни, но по-рядко. Това например може да означава, че изображенията не се показват, докато не ги докоснете."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Ще вкл. ли „Икономия на данни“?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Включване"</string>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index 1b143c8..c1c4099 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -795,7 +795,7 @@
     <string name="orgTypeOther" msgid="5450675258408005553">"অন্যান্য"</string>
     <string name="orgTypeCustom" msgid="1126322047677329218">"কাস্টম"</string>
     <string name="relationTypeCustom" msgid="282938315217441351">"কাস্টম"</string>
-    <string name="relationTypeAssistant" msgid="4057605157116589315">"Assistant"</string>
+    <string name="relationTypeAssistant" msgid="4057605157116589315">"অ্যাসিস্ট্যান্ট"</string>
     <string name="relationTypeBrother" msgid="7141662427379247820">"ভাই"</string>
     <string name="relationTypeChild" msgid="9076258911292693601">"সন্তান"</string>
     <string name="relationTypeDomesticPartner" msgid="7825306887697559238">"জীবনসাথি"</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"আনলক করতে বা জরুরি কল করতে মেনু টিপুন৷"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"আনলক করতে মেনু টিপুন৷"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"আনলক করতে প্যাটার্ন আঁকুন"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"জরুরী"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"জরুরি কল"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"কলে ফিরুন"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"সঠিক!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"আবার চেষ্টা করুন"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"আপনার প্রশাসক আপডেট করেছেন"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"আপনার প্রশাসক মুছে দিয়েছেন"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ঠিক আছে"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ব্যাটারি আরও বেশিক্ষণ চালাতে, ব্যাটারি সেভার:\n\n•গাঢ় থিম চালু করে\n•ব্যাকগ্রাউন্ড অ্যাক্টিভিটি, কিছু ভিজ্যুয়াল এফেক্ট এবং “হ্যালো Google”-এর মতো অন্যান্য ফিচার বন্ধ বা সীমিত করে\n\n"<annotation id="url">"আরও জানুন"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ব্যাটারি আরও বেশিক্ষণ চালাতে, ব্যাটারি সেভার:\n\n•গাঢ় থিম চালু করে\n•ব্যাকগ্রাউন্ড অ্যাক্টিভিটি, কিছু ভিজ্যুয়াল এফেক্ট এবং “হ্যালো Google”-এর মতো অন্যান্য ফিচার বন্ধ বা সীমিত করে"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ব্যাটারি আরও বেশিক্ষণ চালাতে, ব্যাটারি সেভার:\n\n• ডার্ক থিম চালু করে\n• ব্যাকগ্রাউন্ড অ্যাক্টিভিটি, কিছু ভিজ্যুয়াল এফেক্ট এবং “হ্যালো Google”-এর মতো অন্যান্য ফিচার বন্ধ বা সীমিত করে\n\n"<annotation id="url">"আরও জানুন"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ব্যাটারি আরও বেশিক্ষণ চালাতে, ব্যাটারি সেভার:\n\n• ডার্ক থিম চালু করে\n• ব্যাকগ্রাউন্ড অ্যাক্টিভিটি, কিছু ভিজ্যুয়াল এফেক্ট এবং “হ্যালো Google”-এর মতো অন্যান্য ফিচার বন্ধ অথবা সীমিত করে"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ডেটার ব্যবহার কমাতে সহায়তা করার জন্য, ডেটা সেভার ব্যাকগ্রাউন্ডে কিছু অ্যাপ্লিকেশনকে ডেটা পাঠাতে বা গ্রহণ করতে বাধা দেয়৷ আপনি বর্তমানে এমন একটি অ্যাপ্লিকেশন ব্যবহার করছেন যেটি ডেটা অ্যাক্সেস করতে পারে, তবে সেটি কমই করে৷ এর ফলে যা হতে পারে, উদাহরণস্বরূপ, আপনি ছবির উপর ট্যাপ না করা পর্যন্ত সেগুলি দেখানো হবে না৷"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ডেটা সেভার চালু করবেন?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"চালু করুন"</string>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index 079eb56..5c5f822 100644
--- a/core/res/res/values-bs/strings.xml
+++ b/core/res/res/values-bs/strings.xml
@@ -832,7 +832,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Pritisnite dugme Meni kako biste otključali uređaj ili obavili hitni poziv."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Pritisnite dugme Meni za otključavanje uređaja."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Nacrtajte uzorak za otključavanje"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Hitno"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Hitni poziv"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Povratak na poziv"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Ispravno!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Pokušajte ponovo"</string>
@@ -1815,8 +1815,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Ažurirao je vaš administrator"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Izbrisao je vaš administrator"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Uredu"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Radi produženja vijeka trajanja baterije, Ušteda baterije:\n\n•Uključuje Tamnu temu\n•Isključuje ili ograničava aktivnosti u pozadini, određene vizuelne efekte i druge funkcije kao što je \"Ok Google\"\n\n"<annotation id="url">"Saznajte više"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Radi produženja vijeka trajanja baterije, Ušteda baterije:\n\n•Uključuje Tamnu temu\n•Isključuje ili ograničava aktivnosti u pozadini, određene vizuelne efekte i druge funkcije kao što je \"Ok Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Radi produženja vijeka trajanja baterije, Ušteda baterije:\n\n• Uključuje Tamnu temu\n• Isključuje ili ograničava aktivnosti u pozadini, određene vizuelne efekte i druge funkcije kao što je \"Ok Google\"\n\n"<annotation id="url">"Saznajte više"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Radi produženja vijeka trajanja baterije, Ušteda baterije:\n\n• Uključuje Tamnu temu\n• Isključuje ili ograničava aktivnost u pozadini, određene vizuelne efekte i druge funkcije kao što je \"Ok Google\""</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Radi smanjenja prijenosa podataka, Ušteda podataka sprečava da neke aplikacije šalju ili primaju podatke u pozadini. Aplikacija koju trenutno koristite može pristupiti podacima, ali će to činiti rjeđe. Naprimjer, to može značiti da se slike ne prikazuju dok ih ne dodirnete."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Uključiti Uštedu podataka?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Uključi"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 97bb9c1..f85fe5a 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -312,7 +312,7 @@
     <string name="permgrouplab_calllog" msgid="7926834372073550288">"Registres de trucades"</string>
     <string name="permgroupdesc_calllog" msgid="2026996642917801803">"llegir i editar el registre de trucades del telèfon"</string>
     <string name="permgrouplab_phone" msgid="570318944091926620">"Telèfon"</string>
-    <string name="permgroupdesc_phone" msgid="270048070781478204">"fer i gestionar trucades"</string>
+    <string name="permgroupdesc_phone" msgid="270048070781478204">"fer i gestionar trucades telefòniques"</string>
     <string name="permgrouplab_sensors" msgid="9134046949784064495">"Sensors corporals"</string>
     <string name="permgroupdesc_sensors" msgid="2610631290633747752">"accedir a les dades del sensor sobre els signes vitals"</string>
     <string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"Recuperar el contingut de la finestra"</string>
@@ -325,7 +325,7 @@
     <string name="capability_desc_canControlMagnification" msgid="2206586716709254805">"Controla el nivell i la posició del zoom de la pantalla."</string>
     <string name="capability_title_canPerformGestures" msgid="9106545062106728987">"Fer gestos"</string>
     <string name="capability_desc_canPerformGestures" msgid="6619457251067929726">"Permet tocar, lliscar, pinçar i fer altres gestos."</string>
-    <string name="capability_title_canCaptureFingerprintGestures" msgid="1189053104594608091">"Gestos d\'empremtes dactilars"</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="1189053104594608091">"Gestos d\'empremtes digitals"</string>
     <string name="capability_desc_canCaptureFingerprintGestures" msgid="6861869337457461274">"Captura gestos realitzats en el sensor d\'empremtes dactilars del dispositiu."</string>
     <string name="capability_title_canTakeScreenshot" msgid="3895812893130071930">"Fes una captura de pantalla"</string>
     <string name="capability_desc_canTakeScreenshot" msgid="7762297374317934052">"Pots fer una captura de la pantalla."</string>
@@ -341,8 +341,8 @@
     <string name="permdesc_uninstall_shortcut" msgid="1924735350988629188">"Permet que l\'aplicació suprimeixi les dreceres de la pantalla d\'inici sense la intervenció de l\'usuari."</string>
     <string name="permlab_processOutgoingCalls" msgid="4075056020714266558">"desviació de les trucades sortints"</string>
     <string name="permdesc_processOutgoingCalls" msgid="7833149750590606334">"Permet que l\'aplicació vegi el número que s\'està marcant durant una trucada sortint, amb l\'opció de redirigir la trucada a un altre número o bé de cancel·lar-la completament."</string>
-    <string name="permlab_answerPhoneCalls" msgid="4131324833663725855">"contestar a trucades"</string>
-    <string name="permdesc_answerPhoneCalls" msgid="894386681983116838">"Permet que l\'aplicació contesti a una trucada entrant."</string>
+    <string name="permlab_answerPhoneCalls" msgid="4131324833663725855">"contestar a trucades telefòniques"</string>
+    <string name="permdesc_answerPhoneCalls" msgid="894386681983116838">"Permet que l\'aplicació contesti a una trucada telefònica entrant."</string>
     <string name="permlab_receiveSms" msgid="505961632050451881">"recepció de missatges de text (SMS)"</string>
     <string name="permdesc_receiveSms" msgid="1797345626687832285">"Permet que l\'aplicació rebi i processi missatges SMS. Això vol dir que l\'aplicació pot controlar o suprimir missatges que s\'han enviat al teu dispositiu sense mostrar-te\'ls."</string>
     <string name="permlab_receiveMms" msgid="4000650116674380275">"recepció de missatges de text (MMS)"</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Premeu Menú per desbloquejar-lo o per fer una trucada d\'emergència."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Premeu Menú per desbloquejar."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Dibuixeu el patró de desbloqueig"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergència"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Trucada d\'emergència"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Torna a la trucada"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correcte!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Torna-ho a provar"</string>
@@ -947,7 +947,7 @@
     <string name="autofill_district" msgid="6428712062213557327">"Districte"</string>
     <string name="autofill_department" msgid="9047276226873531529">"Departament"</string>
     <string name="autofill_prefecture" msgid="7267397763720241872">"Prefectura"</string>
-    <string name="autofill_parish" msgid="6847960518334530198">"Districte"</string>
+    <string name="autofill_parish" msgid="6847960518334530198">"Parròquia"</string>
     <string name="autofill_area" msgid="8289022370678448983">"Àrea"</string>
     <string name="autofill_emirate" msgid="2544082046790551168">"Emirat"</string>
     <string name="permlab_readHistoryBookmarks" msgid="9102293913842539697">"lectura dels marcadors i l\'historial web"</string>
@@ -1219,8 +1219,8 @@
     <string name="volume_music" msgid="7727274216734955095">"Volum de multimèdia"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"S\'està reproduint per Bluetooth"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"S\'ha establert el so de silenci"</string>
-    <string name="volume_call" msgid="7625321655265747433">"Volum en trucada"</string>
-    <string name="volume_bluetooth_call" msgid="2930204618610115061">"Volum en trucada per Bluetooth"</string>
+    <string name="volume_call" msgid="7625321655265747433">"Volum a la trucada"</string>
+    <string name="volume_bluetooth_call" msgid="2930204618610115061">"Volum a la trucada per Bluetooth"</string>
     <string name="volume_alarm" msgid="4486241060751798448">"Volum d\'alarma"</string>
     <string name="volume_notification" msgid="6864412249031660057">"Volum de notificacions"</string>
     <string name="volume_unknown" msgid="4041914008166576293">"Volum"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Actualitzat per l\'administrador"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Suprimit per l\'administrador"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"D\'acord"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Per allargar la durada de la bateria, el mode Estalvi de bateria fa el següent:\n\n• Activa el tema fosc.\n• Desactiva o restringeix l\'activitat en segon pla, alguns efectes visuals i altres funcions com \"Ok Google\".\n\n"<annotation id="url">"Més informació"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Per allargar la durada de la bateria, el mode Estalvi de bateria fa el següent:\n\n• Activa el tema fosc.\n• Desactiva o restringeix l\'activitat en segon pla, alguns efectes visuals i altres funcions com \"Ok Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Per allargar la durada de la bateria, la funció Estalvi de bateria:\n\n• Activa el tema fosc.\n• Desactiva o restringeix l\'activitat en segon pla, alguns efectes visuals i altres funcions com \"Ok Google\".\n\n"<annotation id="url">"Més informació"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Per allargar la durada de la bateria, la funció Estalvi de bateria:\n\n• Activa el tema fosc.\n• Desactiva o restringeix l\'activitat en segon pla, alguns efectes visuals i altres funcions com \"Ok Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Per reduir l\'ús de dades, la funció Economitzador de dades evita que determinades aplicacions enviïn o rebin dades en segon pla. L\'aplicació que estiguis fent servir podrà accedir a les dades, però menys sovint. Això vol dir, per exemple, que les imatges no es mostraran fins que no les toquis."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Activar l\'Economitzador de dades?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Activa"</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index fb893c9..0edeb0b 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Chcete-li odemknout telefon nebo provést tísňové volání, stiskněte Menu."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Telefon odemknete stisknutím tlačítka Menu."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Odblokujte pomocí gesta"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Stav nouze"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Tísňové volání"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Zavolat zpět"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Správně!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Zkusit znovu"</string>
@@ -1271,7 +1271,7 @@
     <string name="volume_icon_description_notification" msgid="579091344110747279">"Hlasitost oznámení"</string>
     <string name="ringtone_default" msgid="9118299121288174597">"Výchozí vyzvánění"</string>
     <string name="ringtone_default_with_actual" msgid="2709686194556159773">"Výchozí (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
-    <string name="ringtone_silent" msgid="397111123930141876">"Žádný"</string>
+    <string name="ringtone_silent" msgid="397111123930141876">"Žádné"</string>
     <string name="ringtone_picker_title" msgid="667342618626068253">"Vyzvánění"</string>
     <string name="ringtone_picker_title_alarm" msgid="7438934548339024767">"Zvuky budíku"</string>
     <string name="ringtone_picker_title_notification" msgid="6387191794719608122">"Zvuky upozornění"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Aktualizováno administrátorem"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Smazáno administrátorem"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Spořič baterie za účelem úspory energie:\n\n• zapne tmavý motiv,\n• vypne nebo omezí aktivitu na pozadí, některé vizuální efekty a další funkce jako „Ok Google“\n\n"<annotation id="url">"Další informace"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Spořič baterie za účelem úspory energie:\n\n• zapne tmavý motiv,\n• vypne nebo omezí aktivitu na pozadí, některé vizuální efekty a další funkce jako „Ok Google“"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Spořič baterie za účelem úspory energie:\n\n• Zapne tmavý motiv.\n• Vypne nebo omezí aktivitu na pozadí, některé vizuální efekty a další funkce jako „Ok Google“.\n\n"<annotation id="url">"Další informace"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Spořič baterie za účelem úspory energie:\n\n• Zapne tmavý motiv.\n• Vypne nebo omezí aktivitu na pozadí, některé vizuální efekty a další funkce jako „Ok Google“."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Spořič dat z důvodu snížení využití dat některým aplikacím brání v odesílání nebo příjmu dat na pozadí. Aplikace, kterou právě používáte, data přenášet může, ale může tak činit méně často. V důsledku toho se například obrázky nemusejí zobrazit, dokud na ně neklepnete."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Chcete zapnout Spořič dat?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Zapnout"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index eedf0d5..09e2ea2 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Tryk på Menu for at låse op eller foretage et nødopkald."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Tryk på Menu for at låse op."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Tegn oplåsningsmønster"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Nødsituation"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Nødopkald"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Tilbage til opkald"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Rigtigt!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Prøv igen"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Opdateret af din administrator"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Slettet af din administrator"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Batterisparefunktionen gør følgende for at spare på batteriet:\n\n•Aktiverer Mørkt tema\n•Deaktiverer eller begrænser aktivitet i baggrunden, visse visuelle effekter og andre funktioner som f.eks. \"Hey Google\"\n\n"<annotation id="url">"Få flere oplysninger"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Batterisparefunktionen gør følgende for at spare på batteriet:\n\n•Aktiverer Mørkt tema\n•Deaktiverer eller begrænser aktivitet i baggrunden, visse visuelle effekter og andre funktioner som f.eks. \"Hey Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Batterisparefunktionen gør følgende for at spare på batteriet:\n\n• Aktiverer Mørkt tema\n• Deaktiverer eller begrænser aktivitet i baggrunden, visse visuelle effekter og andre funktioner som f.eks. \"Hey Google\"\n\n"<annotation id="url">"Få flere oplysninger"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Batterisparefunktionen gør følgende for at spare på batteriet:\n\n• Aktiverer Mørkt tema\n• Deaktiverer eller begrænser aktivitet i baggrunden, visse visuelle effekter og andre funktioner som f.eks. \"Hey Google\""</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Datasparefunktionen forhindrer nogle apps i at sende eller modtage data i baggrunden for at reducere dataforbruget. En app, der er i brug, kan få adgang til data, men gør det måske ikke så ofte. Dette kan f.eks. betyde, at billeder ikke vises, før du trykker på dem."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Vil du aktivere Datasparefunktion?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Aktivér"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 3ccd566..627a3ab 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -325,7 +325,7 @@
     <string name="capability_desc_canControlMagnification" msgid="2206586716709254805">"Legt die Zoom-Stufe und -Position auf dem Display fest."</string>
     <string name="capability_title_canPerformGestures" msgid="9106545062106728987">"Touch-Gesten möglich"</string>
     <string name="capability_desc_canPerformGestures" msgid="6619457251067929726">"Tippen, Wischen, Zusammenziehen und andere Touch-Gesten möglich."</string>
-    <string name="capability_title_canCaptureFingerprintGestures" msgid="1189053104594608091">"Fingerabdrucksensor-Gesten"</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="1189053104594608091">"Gesten auf dem Fingerabdrucksensor"</string>
     <string name="capability_desc_canCaptureFingerprintGestures" msgid="6861869337457461274">"Erfasst Touch-Gesten auf dem Fingerabdrucksensor des Geräts."</string>
     <string name="capability_title_canTakeScreenshot" msgid="3895812893130071930">"Screenshot erstellen"</string>
     <string name="capability_desc_canTakeScreenshot" msgid="7762297374317934052">"Es kann ein Screenshot des Displays erstellt werden."</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Drücke die Menütaste, um das Telefon zu entsperren oder einen Notruf zu tätigen."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Zum Entsperren die Menütaste drücken"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Muster zum Entsperren zeichnen"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Notruf"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Notruf"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Zurück zum Anruf"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Korrekt!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Erneut versuchen"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Von deinem Administrator aktualisiert"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Von deinem Administrator gelöscht"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Der Stromsparmodus sorgt für eine längere Akkulaufzeit:\n\n• Das dunkle Design wird aktiviert\n• Hintergrundaktivitäten, einige optische Effekte und weitere Funktionen wie \"Ok Google\" werden abgeschaltet oder eingeschränkt\n\n"<annotation id="url">"Weitere Informationen"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Der Stromsparmodus sorgt für eine längere Akkulaufzeit:\n\n• Das dunkle Design wird aktiviert\n• Hintergrundaktivitäten, einige optische Effekte und weitere Funktionen wie \"Ok Google\" werden abgeschaltet oder eingeschränkt"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Der Energiesparmodus sorgt für eine längere Akkulaufzeit:\n\n• Das dunkle Design wird aktiviert\n• Hintergrundaktivitäten, einige optische Effekte und weitere Funktionen wie \"Ok Google\" werden abgeschaltet oder eingeschränkt\n\n"<annotation id="url">"Weitere Informationen"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Der Energiesparmodus sorgt für eine längere Akkulaufzeit:\n\n• Das dunkle Design wird aktiviert\n• Hintergrundaktivitäten, einige optische Effekte und weitere Funktionen wie \"Ok Google\" werden abgeschaltet oder eingeschränkt"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Der Datensparmodus verhindert zum einen, dass manche Apps im Hintergrund Daten senden oder empfangen, sodass weniger Daten verbraucht werden. Zum anderen werden die Datenzugriffe der gerade aktiven App eingeschränkt, was z. B. dazu führen kann, dass Bilder erst angetippt werden müssen, bevor sie sichtbar werden."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Datensparmodus aktivieren?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Aktivieren"</string>
@@ -1999,9 +1999,9 @@
     <string name="notification_appops_overlay_active" msgid="5571732753262836481">"wird über anderen Apps auf dem Bildschirm angezeigt"</string>
     <string name="dynamic_mode_notification_channel_name" msgid="2986926422100223328">"Infomitteilung zum Ablaufmodus"</string>
     <string name="dynamic_mode_notification_title" msgid="9205715501274608016">"Dein Akku könnte vor der gewöhnlichen Ladezeit leer sein"</string>
-    <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"Stromsparmodus aktiviert, um die Akkulaufzeit zu verlängern"</string>
-    <string name="battery_saver_notification_channel_name" msgid="3918243458067916913">"Stromsparmodus"</string>
-    <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"Stromsparmodus deaktiviert"</string>
+    <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"Energiesparmodus aktiviert, um die Akkulaufzeit zu verlängern"</string>
+    <string name="battery_saver_notification_channel_name" msgid="3918243458067916913">"Energiesparmodus"</string>
+    <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"Energiesparmodus deaktiviert"</string>
     <string name="battery_saver_charged_notification_summary" product="default" msgid="5544457317418624367">"Das Smartphone ist ausreichend geladen. Es sind keine Funktionen mehr beschränkt."</string>
     <string name="battery_saver_charged_notification_summary" product="tablet" msgid="4426317048139996888">"Das Tablet ist ausreichend geladen. Es sind keine Funktionen mehr beschränkt."</string>
     <string name="battery_saver_charged_notification_summary" product="device" msgid="1031562417867646649">"Das Gerät ist ausreichend geladen. Es sind keine Funktionen mehr beschränkt."</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 916ad5f..9435d34 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Πατήστε \"Menu\" για ξεκλείδωμα ή για κλήση έκτακτης ανάγκης."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Πατήστε \"Μενού\" για ξεκλείδωμα."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Σχεδιασμός μοτίβου για ξεκλείδωμα"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Κλήση έκτακτης ανάγκης"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Κλήση έκτακτης ανάγκης"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Επιστροφή στην κλήση"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Σωστό!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Προσπαθήστε ξανά"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Ενημερώθηκε από τον διαχειριστή σας"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Διαγράφηκε από τον διαχειριστή σας"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Για την επέκταση της διάρκειας ζωής της μπαταρίας σας, η Εξοικονόμηση μπαταρίας:\n\n•Ενεργοποιεί το Σκούρο θέμα\n•Απενεργοποιεί ή περιορίζει τη δραστηριότητα παρασκηνίου, ορισμένα οπτικά εφέ και άλλες λειτουργίες όπως την εντολή Hey Google\n\n"<annotation id="url">"Μάθετε περισσότερα"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Για την επέκταση της διάρκειας ζωής της μπαταρίας, η Εξοικονόμηση μπαταρίας:\n\n•Ενεργοποιεί το Σκούρο θέμα\n•Απενεργοποιεί ή περιορίζει τη δραστηριότητα παρασκηνίου, ορισμένα οπτικά εφέ και άλλες λειτουργίες όπως την εντολή Hey Google."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Για την επέκταση της διάρκειας ζωής της μπαταρίας σας, η Εξοικονόμηση μπαταρίας:\n\n• Ενεργοποιεί το Σκούρο θέμα\n• Απενεργοποιεί ή περιορίζει τη δραστηριότητα παρασκηνίου, ορισμένα οπτικά εφέ και άλλες λειτουργίες όπως την εντολή Hey Google\n\n"<annotation id="url">"Μάθετε περισσότερα"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Για την επέκταση της διάρκειας ζωής της μπαταρίας σας, η Εξοικονόμηση μπαταρίας:\n\n• Ενεργοποιεί το Σκούρο θέμα\n• Απενεργοποιεί ή περιορίζει τη δραστηριότητα στο παρασκήνιο, ορισμένα οπτικά εφέ και άλλες λειτουργίες, όπως την εντολή Hey Google"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Προκειμένου να μειωθεί η χρήση δεδομένων, η Εξοικονόμηση δεδομένων αποτρέπει την αποστολή ή λήψη δεδομένων από ορισμένες εφαρμογές στο παρασκήνιο. Μια εφαρμογή που χρησιμοποιείτε αυτήν τη στιγμή μπορεί να χρησιμοποιήσει δεδομένα αλλά με μικρότερη συχνότητα. Για παράδειγμα, οι εικόνες μπορεί να μην εμφανίζονται μέχρι να τις πατήσετε."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Ενεργ.Εξοικονόμησης δεδομένων;"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Ενεργοποίηση"</string>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 551325d..c748cc8 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Press Menu to unlock or place emergency call."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Press Menu to unlock."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Draw pattern to unlock"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergency"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Emergency call"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Return to call"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correct!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Try again"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Updated by your admin"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Deleted by your admin"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"To extend battery life, Battery Saver:\n\n•Turns on Dark theme\n•Turns off or restricts background activity, some visual effects and other features like \'Hey Google\'\n\n"<annotation id="url">"Learn more"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"To extend battery life, Battery Saver:\n\n•Turns on Dark theme\n•Turns off or restricts background activity, some visual effects and other features like \'Hey Google\'"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like “Hey Google”\n\n"<annotation id="url">"Learn more"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like “Hey Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"To help reduce data usage, Data Saver prevents some apps from sending or receiving data in the background. An app you\'re currently using can access data, but may do so less frequently. This may mean, for example, that images don’t display until you tap them."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Turn on Data Saver?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Turn on"</string>
diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml
index 1cf5904..d6faf46 100644
--- a/core/res/res/values-en-rCA/strings.xml
+++ b/core/res/res/values-en-rCA/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Press Menu to unlock or place emergency call."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Press Menu to unlock."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Draw pattern to unlock"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergency"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Emergency call"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Return to call"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correct!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Try again"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Updated by your admin"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Deleted by your admin"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like \"Hey Google\"\n\n"<annotation id="url">"Learn more"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like \"Hey Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like “Hey Google”\n\n"<annotation id="url">"Learn more"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like “Hey Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"To help reduce data usage, Data Saver prevents some apps from sending or receiving data in the background. An app you\'re currently using can access data, but may do so less frequently. This may mean, for example, that images don\'t display until you tap them."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Turn on Data Saver?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Turn on"</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 779fdff..695ddb0 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Press Menu to unlock or place emergency call."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Press Menu to unlock."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Draw pattern to unlock"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergency"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Emergency call"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Return to call"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correct!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Try again"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Updated by your admin"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Deleted by your admin"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"To extend battery life, Battery Saver:\n\n•Turns on Dark theme\n•Turns off or restricts background activity, some visual effects and other features like \'Hey Google\'\n\n"<annotation id="url">"Learn more"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"To extend battery life, Battery Saver:\n\n•Turns on Dark theme\n•Turns off or restricts background activity, some visual effects and other features like \'Hey Google\'"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like “Hey Google”\n\n"<annotation id="url">"Learn more"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like “Hey Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"To help reduce data usage, Data Saver prevents some apps from sending or receiving data in the background. An app that you’re currently using can access data, but may do so less frequently. This may mean, for example, that images don’t display until you tap them."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Turn on Data Saver?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Turn on"</string>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index c290d9e..596d4b6 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Press Menu to unlock or place emergency call."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Press Menu to unlock."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Draw pattern to unlock"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergency"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Emergency call"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Return to call"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correct!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Try again"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Updated by your admin"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Deleted by your admin"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"To extend battery life, Battery Saver:\n\n•Turns on Dark theme\n•Turns off or restricts background activity, some visual effects and other features like \'Hey Google\'\n\n"<annotation id="url">"Learn more"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"To extend battery life, Battery Saver:\n\n•Turns on Dark theme\n•Turns off or restricts background activity, some visual effects and other features like \'Hey Google\'"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like “Hey Google”\n\n"<annotation id="url">"Learn more"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"To extend battery life, Battery Saver:\n\n• Turns on Dark theme\n• Turns off or restricts background activity, some visual effects and other features like “Hey Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"To help reduce data usage, Data Saver prevents some apps from sending or receiving data in the background. An app that you’re currently using can access data, but may do so less frequently. This may mean, for example, that images don’t display until you tap them."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Turn on Data Saver?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Turn on"</string>
diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml
index fef02fb..2cd891f 100644
--- a/core/res/res/values-en-rXC/strings.xml
+++ b/core/res/res/values-en-rXC/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‏‎‎‎‏‏‏‎‏‎‏‎‏‏‏‏‏‏‎‎‎‎‏‏‏‏‏‎‏‎‏‎‏‎‎‏‎‏‏‏‎‎‏‎‏‏‎‏‎‏‎‏‏‎‎‎Press Menu to unlock or place emergency call.‎‏‎‎‏‎"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‏‏‎‎‏‎‏‎‏‏‎‎‎‏‎‏‏‏‏‏‎‎‎‏‏‎‎‎‎‏‎‎‎‏‏‏‎‎‏‏‎‏‏‏‎‏‎‏‏‏‎‏‎‏‏‎‎‏‎Press Menu to unlock.‎‏‎‎‏‎"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‏‏‏‏‏‏‏‏‏‎‎‎‎‏‎‎‏‎‏‏‎‎‏‎‎‎‎‎‎‎‏‏‏‎‏‏‏‏‎‏‏‏‎‎‏‎‎‏‎‏‎‎‎‎‏‏‎‏‎Draw pattern to unlock‎‏‎‎‏‎"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‎‎‎‎‎‏‎‏‏‏‏‏‎‏‎‎‎‎‎‎‏‏‏‎‏‎‏‎‏‎‏‏‏‏‏‏‎‏‎‏‎‎‎‎‎‏‏‏‏‎‏‎‏‏‎‎‏‏‎Emergency‎‏‎‎‏‎"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‎‎‏‏‎‎‎‏‎‏‏‏‎‏‏‏‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‏‎‏‏‎‏‏‏‏‏‎‏‏‎‎‏‏‏‏‏‎‎‎Emergency call‎‏‎‎‏‎"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‏‏‏‏‎‎‏‏‏‏‏‎‎‎‎‎‎‎‏‏‏‎‎‎‏‎‏‎‏‎‎‎‏‎‏‏‎‎‏‎‎‎‎‏‎‎‏‎‎‏‏‏‏‎‏‏‏‎‎Return to call‎‏‎‎‏‎"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‏‏‏‎‎‏‏‎‎‏‎‏‎‏‎‏‏‎‏‏‎‎‏‏‎‏‏‎‏‎‎‎‏‏‎‏‏‎‏‏‏‎‎‎‎‏‎‏‏‎‎‏‏‎‎Correct!‎‏‎‎‏‎"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‎‏‏‎‎‏‏‎‏‎‏‏‏‏‎‎‎‏‎‎‏‎‏‎‏‎‏‎‏‎‎‏‎‎‏‎‎‎‎‏‎‏‎‎‏‏‎‎‏‎‎‏‏‏‎‏‎‎Try again‎‏‎‎‏‎"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‎‎‏‏‏‎‏‎‏‏‎‏‏‏‏‎‏‏‏‎‏‎‏‎‎‎‏‎‏‎‏‎‎‏‏‏‎‏‎‏‎‎‎‏‏‏‏‏‎‏‎‏‏‏‏‏‎‏‎Updated by your admin‎‏‎‎‏‎"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‏‏‏‎‏‎‎‎‎‎‎‎‎‎‎‏‏‎‏‏‎‎‎‎‏‏‏‎‎‏‏‎‏‏‏‎‎‎‎‎‏‎‏‎‏‎‏‎‏‎‎‎‏‏‏‏‏‎Deleted by your admin‎‏‎‎‏‎"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‏‎‏‎‏‎‎‏‎‎‎‏‏‏‎‏‎‎‏‎‏‏‏‎‏‎‎‏‎‎‎‏‏‏‎‏‏‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‎OK‎‏‎‎‏‎"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‏‎‎‏‏‏‏‎‎‎‏‎‏‏‎‎‏‎‎‎‏‎‏‏‎‏‎‏‎‎‏‎‏‏‎‎‎‎‏‏‏‎‏‎‎‏‎‏‎‏‏‎‎‏‎‎‏‎To extend battery life, Battery Saver:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎•Turns on Dark theme‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎•Turns off or restricts background activity, some visual effects, and other features like “Hey Google”‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎"<annotation id="url">"‎‏‎‎‏‏‏‎Learn more‎‏‎‎‏‏‎"</annotation>"‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‎‏‎‏‏‎‎‏‎‎‏‏‎‏‎‏‎‎‏‏‎‎‎‎‏‎‎‎‎‏‎‏‎‎‏‏‏‏‏‏‏‏‎‏‏‏‎‎‎‏‏‎‏‎‎‎To extend battery life, Battery Saver:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎•Turns on Dark theme‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎•Turns off or restricts background activity, some visual effects, and other features like “Hey Google”‎‏‎‎‏‎"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‎‏‎‏‏‎‎‏‏‎‏‏‏‏‎‎‎‎‏‏‏‎‎‎‎‏‏‎‎‎‎‏‎‎‎‏‏‎‏‏‎‎‏‎‎‎‏‏‏‎‏‏‎‎‏‎‎‏‎To extend battery life, Battery Saver:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎• Turns on Dark theme‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎• Turns off or restricts background activity, some visual effects, and other features like “Hey Google”‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎"<annotation id="url">"‎‏‎‎‏‏‏‎Learn more‎‏‎‎‏‏‎"</annotation>"‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‏‎‎‏‎‎‏‎‎‏‏‏‎‎‏‏‏‎‎‎‏‎‎‎‎‎‏‏‏‎‏‎‏‏‎‏‎‏‎‎‎‎‎‏‏‎‏‎‏‎‏‏‏‎‏‏‎‎‎To extend battery life, Battery Saver:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎• Turns on Dark theme‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎• Turns off or restricts background activity, some visual effects, and other features like “Hey Google”‎‏‎‎‏‎"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‎‏‎‏‎‎‏‎‎‏‏‎‎‎‏‏‎‏‏‏‎‎‎‎‏‎‎‎‎‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‏‏‏‎‎‎‏‏‎‏‎‏‎To help reduce data usage, Data Saver prevents some apps from sending or receiving data in the background. An app you’re currently using can access data, but may do so less frequently. This may mean, for example, that images don’t display until you tap them.‎‏‎‎‏‎"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‎‏‎‎‏‎‎‎‎‏‏‎‏‏‎‏‎‏‎‎‏‏‎‏‏‏‏‎‏‏‎‎‎‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‏‎‎‏‏‎‏‎‎‏‎Turn on Data Saver?‎‏‎‎‏‎"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‎‏‎‎‎‎‏‏‎‏‏‏‎‏‎‏‎‎‎‎‏‏‏‎‏‏‎‏‏‎‎‏‎‏‏‏‎‎‎‏‎‏‎‎‏‎‎‎‏‎‎‎‎‎‏‏‏‎‎Turn on‎‏‎‎‏‎"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 1a51067..4d93d6e 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Presiona el Menú para desbloquear o realizar una llamada de emergencia."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Presionar Menú para desbloquear."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Dibujar el patrón de desbloqueo"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergencia"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Llamada de emergencia"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Regresar a llamada"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correcto"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Vuelve a intentarlo."</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Tu administrador actualizó este paquete"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Tu administrador borró este paquete"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Aceptar"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Para extender la duración de la batería, el Ahorro de batería hace lo siguiente:\n\n•Activa el Tema oscuro.\n•Desactiva o restringe la actividad en segundo plano, algunos efectos visuales y otras funciones, como \"Hey Google\".\n\n"<annotation id="url">"Más información"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Para extender la duración de batería, el Ahorro de batería hace lo siguiente:\n\n•Activa el Tema oscuro.\n•Desactiva o restringe la actividad en segundo plano, algunos efectos visuales y otras funciones, como \"Hey Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Para extender la duración de batería, el Ahorro de batería hace lo siguiente:\n\n• Activa el Tema oscuro.\n• Desactiva o restringe la actividad en segundo plano, algunos efectos visuales y otras funciones, como \"Hey Google\".\n\n"<annotation id="url">"Más información"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Para extender la duración de batería, el Ahorro de batería hace lo siguiente:\n\n• Activa el Tema oscuro.\n• Desactiva o restringe la actividad en segundo plano, algunos efectos visuales y otras funciones, como \"Hey Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Para reducir el uso de datos, el modo Ahorro de datos evita que algunas apps envíen y reciban datos en segundo plano. La app que estés usando podrá acceder a los datos, pero con menor frecuencia. De esta forma, por ejemplo, las imágenes no se mostrarán hasta que las presiones."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"¿Deseas activar Ahorro de datos?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Activar"</string>
@@ -2044,7 +2044,7 @@
     <string name="accessibility_system_action_on_screen_a11y_shortcut_chooser_label" msgid="1057878690209817886">"Selector del acceso directo de accesibilidad en pantalla"</string>
     <string name="accessibility_system_action_hardware_a11y_shortcut_label" msgid="5764644187715255107">"Acceso directo de accesibilidad"</string>
     <string name="accessibility_freeform_caption" msgid="8377519323496290122">"Barra de subtítulos de <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
-    <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"Se colocó <xliff:g id="PACKAGE_NAME">%1$s</xliff:g> en el depósito RESTRICTED"</string>
+    <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"Se colocó <xliff:g id="PACKAGE_NAME">%1$s</xliff:g> en el bucket RESTRICTED"</string>
     <string name="conversation_single_line_name_display" msgid="8958948312915255999">"<xliff:g id="SENDER_NAME">%1$s</xliff:g>:"</string>
     <string name="conversation_single_line_image_placeholder" msgid="6983271082911936900">"envió una imagen"</string>
     <string name="conversation_title_fallback_one_to_one" msgid="1980753619726908614">"Conversación"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index fea419f..7b6dea3 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Pulsa la tecla de menú para desbloquear el teléfono o realizar una llamada de emergencia."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Pulsa la tecla de menú para desbloquear la pantalla."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Dibujar patrón de desbloqueo"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergencia"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Llamada de emergencia"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Volver a llamada"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correcto"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Vuelve a intentarlo"</string>
@@ -1629,7 +1629,7 @@
     <string name="accessibility_shortcut_single_service_warning" msgid="6363127705112844257">"Al mantener pulsadas ambas teclas de volumen durante unos segundos se activa <xliff:g id="SERVICE">%1$s</xliff:g>, una función de accesibilidad. Esta función puede modificar el funcionamiento del dispositivo.\n\nPuedes asignar este acceso directo a otra función en Ajustes &gt; Accesibilidad."</string>
     <string name="accessibility_shortcut_on" msgid="5463618449556111344">"Activar"</string>
     <string name="accessibility_shortcut_off" msgid="3651336255403648739">"No activar"</string>
-    <string name="accessibility_shortcut_menu_item_status_on" msgid="6608392117189732543">"SÍ"</string>
+    <string name="accessibility_shortcut_menu_item_status_on" msgid="6608392117189732543">"ACTIVADO"</string>
     <string name="accessibility_shortcut_menu_item_status_off" msgid="5531598275559472393">"NO"</string>
     <string name="accessibility_enable_service_title" msgid="3931558336268541484">"¿Permitir que <xliff:g id="SERVICE">%1$s</xliff:g> pueda controlar totalmente tu dispositivo?"</string>
     <string name="accessibility_enable_service_encryption_warning" msgid="8603532708618236909">"Si activas <xliff:g id="SERVICE">%1$s</xliff:g>, el dispositivo no utilizará el bloqueo de pantalla para mejorar el cifrado de datos."</string>
@@ -1770,7 +1770,7 @@
       <item quantity="other">Vuelve a intentarlo en <xliff:g id="COUNT">%d</xliff:g> segundos</item>
       <item quantity="one">Vuelve a intentarlo en 1 segundo</item>
     </plurals>
-    <string name="restr_pin_try_later" msgid="5897719962541636727">"Volver a intentar más tarde"</string>
+    <string name="restr_pin_try_later" msgid="5897719962541636727">"Reintentar más tarde"</string>
     <string name="immersive_cling_title" msgid="2307034298721541791">"Modo de pantalla completa"</string>
     <string name="immersive_cling_description" msgid="7092737175345204832">"Para salir, desliza el dedo de arriba abajo."</string>
     <string name="immersive_cling_positive" msgid="7047498036346489883">"Entendido"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Actualizado por el administrador"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Eliminado por el administrador"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Aceptar"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Para que la batería dure más, el modo Ahorro de batería hace lo siguiente:\n\n• Activa el tema oscuro\n•Desactiva o restringe actividad en segundo plano, algunos efectos visuales y otras funciones como \"Ok Google\"\n\n"<annotation id="url">"Más información"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Para que la batería dure más, el modo Ahorro de batería hace lo siguiente:\n\n• Activa el tema oscuro\n• Desactiva o restringe actividad en segundo plano, algunos efectos visuales y otras funciones como \"Ok Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Para que la batería dure más, Ahorro de batería hace lo siguiente:\n\n• Activa el tema oscuro.\n• Desactiva o restringe la actividad en segundo plano, algunos efectos visuales y otras funciones, como \"Ok Google\".\n\n"<annotation id="url">"Más información"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Para que la batería dure más, Ahorro de batería hace lo siguiente:\n\n• Activa el tema oscuro.\n• Desactiva o restringe la actividad en segundo plano, algunos efectos visuales y otras funciones, como \"Ok Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"El modo Ahorro de datos evita que algunas aplicaciones envíen o reciban datos en segundo plano, lo que puede reducir el uso de datos. Una aplicación activa puede acceder a los datos, aunque con menos frecuencia. Esto significa que es posible que, por ejemplo, algunas imágenes no se muestren hasta que las toques."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"¿Activar Ahorro de datos?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Activar"</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 6b5741c..ea6fabe 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Vajutage avamiseks või hädaabikõne tegemiseks menüünuppu"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Vajutage avamiseks menüüklahvi."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Avamiseks joonistage muster"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Hädaabi"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Hädaabikõne"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Kõne juurde tagasi"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Õige."</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Proovige uuesti"</string>
@@ -1216,7 +1216,7 @@
     <string name="dump_heap_ready_text" msgid="5849618132123045516">"Protsessi <xliff:g id="PROC">%1$s</xliff:g> mälutõmmis on jagamiseks saadaval. Olge ettevaatlik: see mälutõmmis võib sisaldada tundlikke isiklikke andmeid, millele protsessil on juurdepääs. See võib hõlmata teie sisestatud teavet."</string>
     <string name="sendText" msgid="493003724401350724">"Valige teksti jaoks toiming"</string>
     <string name="volume_ringtone" msgid="134784084629229029">"Helina helitugevus"</string>
-    <string name="volume_music" msgid="7727274216734955095">"Meediumi helitugevus"</string>
+    <string name="volume_music" msgid="7727274216734955095">"Meedia helitugevus"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"Esitatakse Bluetoothi kaudu"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"Valitud on hääletu märguanne"</string>
     <string name="volume_call" msgid="7625321655265747433">"Kõne helitugevus"</string>
@@ -1227,7 +1227,7 @@
     <string name="volume_icon_description_bluetooth" msgid="7540388479345558400">"Bluetoothi maht"</string>
     <string name="volume_icon_description_ringer" msgid="2187800636867423459">"Helina tugevus"</string>
     <string name="volume_icon_description_incall" msgid="4491255105381227919">"Kõne helitugevus"</string>
-    <string name="volume_icon_description_media" msgid="4997633254078171233">"Meediumi helitugevus"</string>
+    <string name="volume_icon_description_media" msgid="4997633254078171233">"Meedia helitugevus"</string>
     <string name="volume_icon_description_notification" msgid="579091344110747279">"Teatise helitugevus"</string>
     <string name="ringtone_default" msgid="9118299121288174597">"Vaikehelin"</string>
     <string name="ringtone_default_with_actual" msgid="2709686194556159773">"Vaikimisi (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Administraator on seda värskendanud"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Administraator on selle kustutanud"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Aku tööea pikendamiseks teeb akusäästja järgmist.\n\n• Lülitab sisse tumeda teema.\n• Lülitab välja taustategevused, mõned visuaalsed efektid ja muud funktsioonid (nt „Ok Google”) või piirab neid.\n\n"<annotation id="url">"Lisateave"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Aku tööea pikendamiseks teeb akusäästja järgmist.\n\n• Lülitab sisse tumeda teema.\n• Lülitab välja taustategevused, mõned visuaalsed efektid ja muud funktsioonid (nt „Ok Google”) või piirab neid."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Aku tööea pikendamiseks teeb akusäästja järgmist.\n\n• Lülitab sisse tumeda teema.\n• Lülitab välja taustategevused, mõned visuaalsed efektid ja muud funktsioonid (nt „Ok Google”) või piirab neid.\n\n"<annotation id="url">"Lisateave"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Aku tööea pikendamiseks teeb akusäästja järgmist.\n\n• Lülitab sisse tumeda teema.\n• Lülitab välja taustategevused, mõned visuaalsed efektid ja muud funktsioonid (nt „Ok Google”) või piirab neid."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Andmekasutuse vähendamiseks keelab andmemahu säästja mõne rakenduse puhul andmete taustal saatmise ja vastuvõtmise. Rakendus, mida praegu kasutate, pääseb andmesidele juurde, kuid võib seda teha väiksema sagedusega. Seetõttu võidakse näiteks pildid kuvada alles siis, kui neid puudutate."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Lülitada andmemahu säästja sisse?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Lülita sisse"</string>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index 5c763f4..5e52506 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -492,7 +492,7 @@
     <string name="permdesc_changeNetworkState" msgid="649341947816898736">"Sarearen konexioaren egoera aldatzeko baimena ematen die aplikazioei."</string>
     <string name="permlab_changeTetherState" msgid="9079611809931863861">"aldatu telefono bidezko konektagarritasuna"</string>
     <string name="permdesc_changeTetherState" msgid="3025129606422533085">"Partekatutako Interneterako konexioaren egoera aldatzeko baimena ematen die aplikazioei."</string>
-    <string name="permlab_accessWifiState" msgid="5552488500317911052">"ikusi wifi bidezko konexioak"</string>
+    <string name="permlab_accessWifiState" msgid="5552488500317911052">"ikusi wifi-konexioak"</string>
     <string name="permdesc_accessWifiState" msgid="6913641669259483363">"Wi-Fi sareei buruzko informazioa ikusteko baimena ematen die aplikazioei, adibidez, Wi-Fi konexioa aktibatuta dagoen eta konektatutako Wi-Fi gailuen izenak zein diren."</string>
     <string name="permlab_changeWifiState" msgid="7947824109713181554">"konektatu wifira edo deskonektatu bertatik"</string>
     <string name="permdesc_changeWifiState" msgid="7170350070554505384">"Wi-Fi sarbide-puntuetara konektatzeko edo haietatik deskonektatzeko baimena ematen die aplikazioei, baita Wi-Fi sareen gailu-konfigurazioari aldaketak egitekoa ere."</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Desblokeatzeko edo larrialdi-deia egiteko, sakatu Menua."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Desblokeatzeko, sakatu Menua."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Desblokeatzeko, marraztu eredua"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Larrialdi-deiak"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Larrialdi-deia"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Itzuli deira"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Eredua zuzena da!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Saiatu berriro"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Administratzaileak eguneratu du"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Administratzaileak ezabatu du"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Ados"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Bateriaren iraupena luzatzeko, erabili bateria-aurrezlea:\n\n• Gai iluna aktibatzen du.\n• Desaktibatu edo murriztu egiten ditu atzeko planoko jarduerak, zenbait efektu bisual eta beste eginbide batzuk, hala nola \"Ok Google\".\n\n"<annotation id="url">"Lortu informazio gehiago"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Bateriaren iraupena luzatzeko, erabili bateria-aurrezlea:\n\n• Gai iluna aktibatzen du.\n• Desaktibatu edo murriztu egiten ditu atzeko planoko jarduerak, zenbait efektu bisual eta beste eginbide batzuk, hala nola \"Ok Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Bateriaren iraupena luzatzeko, erabili bateria-aurrezlea:\n\n• Gai iluna aktibatzen du.\n• Desaktibatu edo murriztu egiten ditu atzeko planoko jarduerak, zenbait efektu bisual eta beste eginbide batzuk, hala nola \"Ok Google\".\n\n"<annotation id="url">"Lortu informazio gehiago"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Bateriaren iraupena luzatzeko, erabili bateria-aurrezlea:\n\n• Gai iluna aktibatzen du.\n• Atzeko planoko jarduerak, zenbait efektu bisual eta beste eginbide batzuk desaktibatzen edo murrizten ditu, hala nola \"Ok Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Datuen erabilera murrizteko, atzeko planoan datuak bidaltzea eta jasotzea galarazten die datu-aurrezleak aplikazio batzuei. Une honetan erabiltzen ari zaren aplikazioak atzitu egin ahal izango ditu datuak, baina baliteke maiztasun txikiagoarekin atzitzea. Horrela, adibidez, baliteke irudiak ez erakustea haiek sakatu arte."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Datu-aurrezlea aktibatu nahi duzu?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Aktibatu"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 39bf1d6..fe283ab 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -156,9 +156,9 @@
     <string name="httpErrorOk" msgid="6206751415788256357">"تأیید"</string>
     <string name="httpError" msgid="3406003584150566720">"خطایی در شبکه وجود داشت."</string>
     <string name="httpErrorLookup" msgid="3099834738227549349">"نشانی اینترنتی پیدا نشد."</string>
-    <string name="httpErrorUnsupportedAuthScheme" msgid="3976195595501606787">"‏طرح کلی احراز هویت سایت پشتیبانی نمی‌‎شود."</string>
+    <string name="httpErrorUnsupportedAuthScheme" msgid="3976195595501606787">"‏طرح کلی اصالت‌سنجی سایت پشتیبانی نمی‌‎شود."</string>
     <string name="httpErrorAuth" msgid="469553140922938968">"راستی‌آزمایی ناموفق بود."</string>
-    <string name="httpErrorProxyAuth" msgid="7229662162030113406">"احراز هویت از طریق سرور پروکسی انجام نشد."</string>
+    <string name="httpErrorProxyAuth" msgid="7229662162030113406">"اصالت‌سنجی از طریق سرور پروکسی انجام نشد."</string>
     <string name="httpErrorConnect" msgid="3295081579893205617">"اتصال به سرور انجام نشد."</string>
     <string name="httpErrorIO" msgid="3860318696166314490">"برقراری ارتباط با سرور ممکن نبود. بعداً دوباره امتحان کنید."</string>
     <string name="httpErrorTimeout" msgid="7446272815190334204">"زمان اتصال به سرور تمام شده است."</string>
@@ -523,11 +523,11 @@
     <string name="permlab_requestPasswordComplexity" msgid="1808977190557794109">"درخواست پیچیدگی قفل صفحه"</string>
     <string name="permdesc_requestPasswordComplexity" msgid="1130556896836258567">"به برنامه اجازه می‌دهد سطح پیچیدگی قفل صفحه (بالا، متوسط، پایین، یا هیچ‌کدام) را بیاموزد که نشان‌دهنده بازه ممکن طول و نوع قفل صفحه است. همچنین برنامه می‌تواند به کاربران پیشنهاد دهد قفل صفحه را به سطح خاصی به‌روزرسانی کنند، اما کاربران می‌توانند آزادانه این پیشنهاد را نادیده بگیرند و به سطح دیگری بروند. توجه داشته باشید که قفل صفحه در قالب نوشتار ساده ذخیره نمی‌شود، بنابراین برنامه گذرواژه دقیق را نمی‌داند."</string>
     <string name="permlab_useBiometric" msgid="6314741124749633786">"استفاده از سخت‌افزار بیومتریک"</string>
-    <string name="permdesc_useBiometric" msgid="7502858732677143410">"به برنامه امکان می‌دهد از سخت‌افزار بیومتریک برای احراز هویت استفاده کند"</string>
+    <string name="permdesc_useBiometric" msgid="7502858732677143410">"به برنامه امکان می‌دهد از سخت‌افزار بیومتریک برای اصالت‌سنجی استفاده کند"</string>
     <string name="permlab_manageFingerprint" msgid="7432667156322821178">"مدیریت سخت‌افزار اثر انگشت"</string>
     <string name="permdesc_manageFingerprint" msgid="2025616816437339865">"به برنامه امکان می‌دهد روش‌هایی را برای افزودن و حذف الگوهای اثر انگشت جهت استفاده، فعال کند."</string>
     <string name="permlab_useFingerprint" msgid="1001421069766751922">"استفاده از سخت‌افزار اثر انگشت"</string>
-    <string name="permdesc_useFingerprint" msgid="412463055059323742">"به برنامه امکان می‌دهد از سخت‌افزار اثر انگشت برای احراز هویت استفاده کند"</string>
+    <string name="permdesc_useFingerprint" msgid="412463055059323742">"به برنامه امکان می‌دهد از سخت‌افزار اثر انگشت برای اصالت‌سنجی استفاده کند"</string>
     <string name="permlab_audioWrite" msgid="8501705294265669405">"تغییر مجموعه موسیقی شما"</string>
     <string name="permdesc_audioWrite" msgid="8057399517013412431">"به برنامه اجازه می‌دهد مجموعه موسیقی‌تان را تغییر دهد."</string>
     <string name="permlab_videoWrite" msgid="5940738769586451318">"تغییر مجموعه ویدیوی شما"</string>
@@ -538,9 +538,9 @@
     <string name="permdesc_mediaLocation" msgid="597912899423578138">"به برنامه اجازه می‌دهد مکان‌ها را از مجموعه رسانه‌تان بخواند."</string>
     <string name="biometric_dialog_default_title" msgid="55026799173208210">"تأیید کنید این شما هستید"</string>
     <string name="biometric_error_hw_unavailable" msgid="2494077380540615216">"سخت‌افزار زیست‌سنجی دردسترس نیست"</string>
-    <string name="biometric_error_user_canceled" msgid="6732303949695293730">"احراز هویت لغو شد"</string>
+    <string name="biometric_error_user_canceled" msgid="6732303949695293730">"اصالت‌سنجی لغو شد"</string>
     <string name="biometric_not_recognized" msgid="5106687642694635888">"شناسایی نشد"</string>
-    <string name="biometric_error_canceled" msgid="8266582404844179778">"احراز هویت لغو شد"</string>
+    <string name="biometric_error_canceled" msgid="8266582404844179778">"اصالت‌سنجی لغو شد"</string>
     <string name="biometric_error_device_not_secured" msgid="3129845065043995924">"پین، الگو یا گذرواژه‌ای تنظیم نشده است"</string>
     <string name="fingerprint_acquired_partial" msgid="8532380671091299342">"بخشی از اثر انگشت شناسایی شد. لطفاً دوباره امتحان کنید."</string>
     <string name="fingerprint_acquired_insufficient" msgid="2545149524031515411">"اثرانگشت پردازش نشد. لطفاً دوباره امتحان کنید."</string>
@@ -549,9 +549,9 @@
     <string name="fingerprint_acquired_too_slow" msgid="6683510291554497580">"حرکت انگشت خیلی آهسته بود. لطفاً دوباره امتحان کنید."</string>
   <string-array name="fingerprint_acquired_vendor">
   </string-array>
-    <string name="fingerprint_authenticated" msgid="2024862866860283100">"اثر انگشت احراز هویت شد"</string>
-    <string name="face_authenticated_no_confirmation_required" msgid="8867889115112348167">"چهره احراز هویت شد"</string>
-    <string name="face_authenticated_confirmation_required" msgid="6872632732508013755">"چهره احراز هویت شد، لطفاً تأیید را فشار دهید"</string>
+    <string name="fingerprint_authenticated" msgid="2024862866860283100">"اثر انگشت اصالت‌سنجی شد"</string>
+    <string name="face_authenticated_no_confirmation_required" msgid="8867889115112348167">"چهره اصالت‌سنجی شد"</string>
+    <string name="face_authenticated_confirmation_required" msgid="6872632732508013755">"چهره اصالت‌سنجی شد، لطفاً تأیید را فشار دهید"</string>
     <string name="fingerprint_error_hw_not_available" msgid="4571700896929561202">"سخت‌افزار اثرانگشت در دسترس نیست."</string>
     <string name="fingerprint_error_no_space" msgid="6126456006769817485">"ذخیره اثر انگشت ممکن نیست. لطفاً یک اثر انگشت موجود را حذف کنید."</string>
     <string name="fingerprint_error_timeout" msgid="2946635815726054226">"درنگ ثبت اثر انگشت به پایان رسید. دوباره امتحان کنید."</string>
@@ -570,7 +570,7 @@
     <string name="permlab_manageFace" msgid="4569549381889283282">"مدیریت سخت‌افزار «بازگشایی با چهره»"</string>
     <string name="permdesc_manageFace" msgid="6204569688492710471">"به برنامه امکان می‌دهد روش‌هایی را برای افزودن و حذف الگوهای چهره جهت استفاده فرابخواند."</string>
     <string name="permlab_useFaceAuthentication" msgid="1011430526454859030">"استفاده از سخت‌افزار «بازگشایی با چهره»"</string>
-    <string name="permdesc_useFaceAuthentication" msgid="3115697017684668012">"به برنامه امکان می‌دهد از سخت‌افزار «بازگشایی با چهره» برای احراز هویت استفاده کند"</string>
+    <string name="permdesc_useFaceAuthentication" msgid="3115697017684668012">"به برنامه امکان می‌دهد از سخت‌افزار «بازگشایی با چهره» برای اصالت‌سنجی استفاده کند"</string>
     <string name="face_recalibrate_notification_name" msgid="6006095897989257026">"بازگشایی با چهره"</string>
     <string name="face_recalibrate_notification_title" msgid="5944930528030496897">"ثبت مجدد چهره"</string>
     <string name="face_recalibrate_notification_content" msgid="892757485125249962">"برای بهبود تشخیص، لطفاً چهره‌تان را دوباره ثبت کنید"</string>
@@ -589,9 +589,9 @@
     <string name="face_acquired_recalibrate" msgid="8724013080976469746">"لطفاً چهره‌تان را مجدداً ثبت کنید."</string>
     <string name="face_acquired_too_different" msgid="4699657338753282542">"دیگر چهره را تشخیص نمی‌دهد. دوباره امتحان کنید."</string>
     <string name="face_acquired_too_similar" msgid="7684650785108399370">"بسیار شبیه قبلی است، لطفاً قیافه دیگری بگیرید."</string>
-    <string name="face_acquired_pan_too_extreme" msgid="7822191262299152527">"سرتان را کمی پایین آورید."</string>
-    <string name="face_acquired_tilt_too_extreme" msgid="8119978324129248059">"سرتان را کمی پایین آورید."</string>
-    <string name="face_acquired_roll_too_extreme" msgid="1442830503572636825">"سرتان را کمی پایین آورید."</string>
+    <string name="face_acquired_pan_too_extreme" msgid="7822191262299152527">"سرتان را کمی صاف بگیرید."</string>
+    <string name="face_acquired_tilt_too_extreme" msgid="8119978324129248059">"سرتان را کمی صاف بگیرید."</string>
+    <string name="face_acquired_roll_too_extreme" msgid="1442830503572636825">"سرتان را کمی صاف بگیرید."</string>
     <string name="face_acquired_obscured" msgid="4917643294953326639">"هرچیزی را که حائل چهره‌تان است بردارید."</string>
     <string name="face_acquired_sensor_dirty" msgid="8968391891086721678">"بالای صفحه و همچنین نوار مشکی را تمیز کنید."</string>
   <string-array name="face_acquired_vendor">
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"برای بازکردن قفل یا انجام تماس اضطراری روی «منو» فشار دهید."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"برای بازگشایی قفل روی منو فشار دهید."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"الگو را بکشید تا قفل آن باز شود"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"اضطراری"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"تماس اضطراری"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"بازگشت به تماس"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"صحیح است!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"دوباره امتحان کنید"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"توسط سرپرست سیستم به‌روزرسانی شد"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"توسط سرپرست سیستم حذف شد"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"تأیید"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"‏برای افزایش عمر باتری، «بهینه‌سازی باتری»:\n\n•«طرح زمینه تیره» را روشن می‌کند\n•فعالیت پس‌زمینه، برخی جلوه‌های بصری، و دیگر ویژگی‌ها مانند «Ok Google» را خاموش یا محدود می‌کند\n\n"<annotation id="url">"بیشتر بدانید"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"‏برای افزایش عمر باتری، «بهینه‌سازی باتری»:\n\n•«طرح زمینه تیره» را روشن می‌کند\n•فعالیت پس‌زمینه، برخی جلوه‌های بصری، و دیگر ویژگی‌ها مانند «Ok Google» را خاموش یا محدود می‌کند"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"‏برای افزایش عمر باتری، «بهینه‌سازی باتری»:\n\n• «طرح زمینه تیره» را روشن می‌کند\n• فعالیت پس‌زمینه، برخی جلوه‌های بصری، و دیگر ویژگی‌ها مانند «Ok Google» را خاموش یا محدود می‌کند\n\n"<annotation id="url">"بیشتر بدانید"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"‏برای افزایش عمر باتری، «بهینه‌سازی باتری»:\n\n• «طرح زمینه تیره» را روشن می‌کند\n• فعالیت پس‌زمینه، برخی جلوه‌های بصری، و دیگر ویژگی‌ها مثل «Ok Google» را خاموش یا محدود می‌کند"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"«صرفه‌جویی داده»، برای کمک به کاهش مصرف داده، از ارسال و دریافت داده در پس‌زمینه ازطرف بعضی برنامه‌ها جلوگیری می‌کند. برنامه‌ای که درحال‌حاضر استفاده می‌کنید می‌تواند به داده‌ها دسترسی داشته باشد اما دفعات دسترسی آن محدود است.این یعنی، برای مثال، تصاویر تازمانی‌که روی آن‌ها ضربه نزنید نشان داده نمی‌شوند."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"«صرفه‌جویی داده» روشن شود؟"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"روشن کردن"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index aee6739..527d5a6 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Poista lukitus tai soita hätäpuhelu painamalla Valikko-painiketta."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Poista lukitus painamalla Valikko-painiketta."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Poista lukitus piirtämällä kuvio"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Hätäpuhelu"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Hätäpuhelu"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Palaa puheluun"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Oikein!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Yritä uudelleen"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Järjestelmänvalvoja päivitti tämän."</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Järjestelmänvalvoja poisti tämän."</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Parantaakseen akunkestoa Virransäästö\n\n•·laittaa tumman teeman päälle\n•·laittaa pois päältä tai rajoittaa taustatoimintoja, joitakin visuaalisia tehosteita ja muita ominaisuuksia (esim. Hei Google).\n\n"<annotation id="url">"Lue lisää"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Parantaakseen akunkestoa Virransäästö\n\n•·laittaa tumman teeman päälle\n•·laittaa pois päältä tai rajoittaa taustatoimintoja, joitakin visuaalisia tehosteita ja muita ominaisuuksia (esim. Hei Google)."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Parantaakseen akunkestoa Virransäästö\n\n•·laittaa tumman teeman päälle\n•·laittaa pois päältä tai rajoittaa taustatoimintoja, joitakin visuaalisia tehosteita ja muita ominaisuuksia (esim. Ok Google).\n\n"<annotation id="url">"Lue lisää"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Parantaakseen akunkestoa Virransäästö\n\n•·laittaa tumman teeman päälle\n•·laittaa pois päältä tai rajoittaa taustatoimintoja, joitakin visuaalisia tehosteita ja muita ominaisuuksia (esim. Ok Google)."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Data Saver estää joitakin sovelluksia lähettämästä tai vastaanottamasta tietoja taustalla, jotta datan käyttöä voidaan vähentää. Käytössäsi oleva sovellus voi yhä käyttää dataa, mutta se saattaa tehdä niin tavallista harvemmin. Tämä voi tarkoittaa esimerkiksi sitä, että kuva ladataan vasta, kun kosketat sitä."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Otetaanko Data Saver käyttöön?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Ota käyttöön"</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 2b42c12..e8d6408 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -52,6 +52,7 @@
     <string name="enablePin" msgid="2543771964137091212">"Opération infructueuse. Activez le verrouillage SIM/RUIM."</string>
     <plurals name="pinpuk_attempts" formatted="false" msgid="1619867269012213584">
       <item quantity="one">Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative avant que votre carte SIM soit verrouillée.</item>
+      <item quantity="many">You have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts before SIM is locked.</item>
       <item quantity="other">Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives avant que votre carte SIM soit verrouillée.</item>
     </plurals>
     <string name="imei" msgid="2157082351232630390">"Code IIEM"</string>
@@ -179,6 +180,7 @@
     <string name="low_memory" product="default" msgid="2539532364144025569">"La mémoire du téléphone est pleine. Veuillez supprimer des fichiers pour libérer de l\'espace."</string>
     <plurals name="ssl_ca_cert_warning" formatted="false" msgid="2288194355006173029">
       <item quantity="one">Autorité de certification installée</item>
+      <item quantity="many">Certificate authorities installed</item>
       <item quantity="other">Autorités de certification installées</item>
     </plurals>
     <string name="ssl_ca_cert_noti_by_unknown" msgid="4961102218216815242">"Par un tiers inconnu"</string>
@@ -251,6 +253,7 @@
     <string name="bugreport_option_full_summary" msgid="1975130009258435885">"Utilisez cette option pour qu\'il y ait le moins d\'interférences système possible lorsque votre appareil ne répond pas ou qu\'il est trop lent, ou lorsque vous avez besoin de toutes les sections du rapport de bogue. Aucune capture d\'écran supplémentaire ne peut être capturée, et vous ne pouvez entrer aucune autre information."</string>
     <plurals name="bugreport_countdown" formatted="false" msgid="3906120379260059206">
       <item quantity="one">Saisie d\'écran pour le rapport de bogue dans <xliff:g id="NUMBER_1">%d</xliff:g> seconde.</item>
+      <item quantity="many">Taking screenshot for bug report in <xliff:g id="NUMBER_1">%d</xliff:g> seconds.</item>
       <item quantity="other">Saisie d\'écran pour le rapport de bogue dans <xliff:g id="NUMBER_1">%d</xliff:g> secondes.</item>
     </plurals>
     <string name="bugreport_screenshot_success_toast" msgid="7986095104151473745">"Capture d\'écran prise avec le rapport de bogue"</string>
@@ -683,9 +686,9 @@
     <string name="policylab_forceLock" msgid="7360335502968476434">"Verrouiller l\'écran"</string>
     <string name="policydesc_forceLock" msgid="1008844760853899693">"Gérer le mode et les conditions de verrouillage de l\'écran"</string>
     <string name="policylab_wipeData" msgid="1359485247727537311">"Effacer toutes les données"</string>
-    <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Effacer les données de la tablette sans avertissement, en rétablissant la configuration d\'usine"</string>
+    <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="default" msgid="8036084184768379022">"Effacer les données du téléphone sans avertissement, en rétablissant la configuration d\'usine"</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="policylab_wipeData_secondaryUser" 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>
     <string name="policydesc_wipeData_secondaryUser" product="tv" msgid="2293713284515865200">"Effacez les données de cet utilisateur sur cet appareil Android TV sans avertissement."</string>
@@ -829,7 +832,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Appuyez sur \"Menu\" pour débloquer le téléphone ou appeler un numéro d\'urgence."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Appuyez sur \"Menu\" pour déverrouiller l\'appareil."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Dessinez un schéma pour déverrouiller le téléphone"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Urgence"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Appel d\'urgence"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Retour à l\'appel"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"C\'est exact!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Réessayer"</string>
@@ -863,12 +866,12 @@
     <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="3069635524964070596">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Au bout de <xliff:g id="NUMBER_1">%2$d</xliff:g> échecs supplémentaires, vous devrez déverrouiller votre tablette à l\'aide de votre identifiant Google.\n\nVeuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
     <string name="lockscreen_failed_attempts_almost_glogin" product="tv" msgid="6399092175942158529">"Vous avez dessiné votre schéma de déverrouillage incorrectement à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprise(s). Après <xliff:g id="NUMBER_1">%2$d</xliff:g> autre(s) tentative(s) incorrecte(s), vous devrez déverrouiller votre appareil Android TV en vous connectant à votre compte Google.\n\n Réessayez dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
     <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="5691623136957148335">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Au bout de <xliff:g id="NUMBER_1">%2$d</xliff:g> échecs supplémentaires, vous devrez déverrouiller votre téléphone à l\'aide de votre identifiant Google.\n\nVeuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
-    <string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="7914445759242151426">"Vous avez tenté de déverrouiller la tablette de façon incorrecte à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, sa configuration d\'usine sera rétablie, et toutes les données utilisateur seront perdues."</string>
+    <string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="7914445759242151426">"Vous avez tenté de déverrouiller la tablette de façon incorrecte à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, ses paramètres par défaut seront rétablis, et toutes les données d\'utilisateur seront perdues."</string>
     <string name="lockscreen_failed_attempts_almost_at_wipe" product="tv" msgid="4275591249631864248">"Vous avez tenté de déverrouiller votre appareil Android TV incorrectement à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprise(s). Après <xliff:g id="NUMBER_1">%2$d</xliff:g> autre(s) tentative(s) incorrecte(s), votre appareil Android TV sera réinitialisé à ses valeurs d\'usine et toutes les données personnelles seront supprimées."</string>
-    <string name="lockscreen_failed_attempts_almost_at_wipe" product="default" msgid="1166532464798446579">"Vous avez tenté de déverrouiller le téléphone de façon incorrecte à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, sa configuration d\'usine sera rétablie, et toutes les données utilisateur seront perdues."</string>
-    <string name="lockscreen_failed_attempts_now_wiping" product="tablet" msgid="8682445539263683414">"Vous avez tenté de déverrouiller la tablette de façon incorrecte à <xliff:g id="NUMBER">%d</xliff:g> reprises. Sa configuration d\'usine va être rétablie."</string>
+    <string name="lockscreen_failed_attempts_almost_at_wipe" product="default" msgid="1166532464798446579">"Vous avez tenté de déverrouiller le téléphone de façon incorrecte à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, ses paramètres par défaut seront rétablis, et toutes les données d\'utilisateur seront perdues."</string>
+    <string name="lockscreen_failed_attempts_now_wiping" product="tablet" msgid="8682445539263683414">"Vous avez tenté de déverrouiller la tablette de façon incorrecte à <xliff:g id="NUMBER">%d</xliff:g> reprises. Ses paramètres par défaut vont être rétablis."</string>
     <string name="lockscreen_failed_attempts_now_wiping" product="tv" msgid="2205435033340091883">"Vous avez tenté de déverrouiller votre appareil Android TV incorrectement à <xliff:g id="NUMBER">%d</xliff:g> reprise(s). Votre appareil Android TV sera maintenant réinitialisé à ses valeurs d\'usine."</string>
-    <string name="lockscreen_failed_attempts_now_wiping" product="default" msgid="2203704707679895487">"Vous avez tenté de déverrouiller le téléphone de façon incorrecte à <xliff:g id="NUMBER">%d</xliff:g> reprises. Sa configuration d\'usine va être rétablie."</string>
+    <string name="lockscreen_failed_attempts_now_wiping" product="default" msgid="2203704707679895487">"Vous avez tenté de déverrouiller le téléphone de façon incorrecte à <xliff:g id="NUMBER">%d</xliff:g> reprises. Ses paramètres par défaut vont être rétablis."</string>
     <string name="lockscreen_too_many_failed_attempts_countdown" msgid="6807200118164539589">"Veuillez réessayer dans <xliff:g id="NUMBER">%d</xliff:g> secondes."</string>
     <string name="lockscreen_forgot_pattern_button_text" msgid="8362442730606839031">"Schéma oublié?"</string>
     <string name="lockscreen_glogin_forgot_pattern" msgid="9218940117797602518">"Déverrouillage du compte"</string>
@@ -994,6 +997,7 @@
     <string name="beforeOneMonthDurationPast" msgid="8315149541372065392">"Il y a plus d\'un mois"</string>
     <plurals name="last_num_days" formatted="false" msgid="687443109145393632">
       <item quantity="one">Le dernier <xliff:g id="COUNT_1">%d</xliff:g> jour</item>
+      <item quantity="many">Last <xliff:g id="COUNT_1">%d</xliff:g> days</item>
       <item quantity="other">Le dernier <xliff:g id="COUNT_1">%d</xliff:g> jours</item>
     </plurals>
     <string name="last_month" msgid="1528906781083518683">"Le mois dernier"</string>
@@ -1016,66 +1020,82 @@
     <string name="now_string_shortest" msgid="3684914126941650330">"maintenant"</string>
     <plurals name="duration_minutes_shortest" formatted="false" msgid="7519574894537185135">
       <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> m</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g>m</item>
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> m</item>
     </plurals>
     <plurals name="duration_hours_shortest" formatted="false" msgid="2838655994500499651">
       <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> h</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g>h</item>
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> h</item>
     </plurals>
     <plurals name="duration_days_shortest" formatted="false" msgid="3686058472983158496">
       <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> j</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g>d</item>
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> j</item>
     </plurals>
     <plurals name="duration_years_shortest" formatted="false" msgid="8299112348723640338">
       <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> a</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g>y</item>
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> a</item>
     </plurals>
     <plurals name="duration_minutes_shortest_future" formatted="false" msgid="849196137176399440">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> m</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g>m</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> m</item>
     </plurals>
     <plurals name="duration_hours_shortest_future" formatted="false" msgid="5386373597343170388">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> h</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g>h</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> h</item>
     </plurals>
     <plurals name="duration_days_shortest_future" formatted="false" msgid="814754627092787227">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> j</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g>d</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> j</item>
     </plurals>
     <plurals name="duration_years_shortest_future" formatted="false" msgid="7683731800140202145">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> a</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g>y</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> a</item>
     </plurals>
     <plurals name="duration_minutes_relative" formatted="false" msgid="6569851308583028344">
       <item quantity="one">il y a <xliff:g id="COUNT_1">%d</xliff:g> minute</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> minutes ago</item>
       <item quantity="other">il y a <xliff:g id="COUNT_1">%d</xliff:g> minutes</item>
     </plurals>
     <plurals name="duration_hours_relative" formatted="false" msgid="420434788589102019">
       <item quantity="one">il y a<xliff:g id="COUNT_1">%d</xliff:g> heure</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> hours ago</item>
       <item quantity="other">il y a<xliff:g id="COUNT_1">%d</xliff:g> heures</item>
     </plurals>
     <plurals name="duration_days_relative" formatted="false" msgid="6056425878237482431">
       <item quantity="one">il y a <xliff:g id="COUNT_1">%d</xliff:g> jour</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> days ago</item>
       <item quantity="other">il y a <xliff:g id="COUNT_1">%d</xliff:g> jours</item>
     </plurals>
     <plurals name="duration_years_relative" formatted="false" msgid="2179998228861172159">
       <item quantity="one">il y a <xliff:g id="COUNT_1">%d</xliff:g> an</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> years ago</item>
       <item quantity="other">il y a <xliff:g id="COUNT_1">%d</xliff:g> ans</item>
     </plurals>
     <plurals name="duration_minutes_relative_future" formatted="false" msgid="5759885720917567723">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> minute</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g> minutes</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> minutes</item>
     </plurals>
     <plurals name="duration_hours_relative_future" formatted="false" msgid="8963511608507707959">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> heure</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g> hours</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> heures</item>
     </plurals>
     <plurals name="duration_days_relative_future" formatted="false" msgid="1964709470979250702">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> jour</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g> days</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> jours</item>
     </plurals>
     <plurals name="duration_years_relative_future" formatted="false" msgid="3985129025134896371">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> ans</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g> years</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> ans</item>
     </plurals>
     <string name="VideoView_error_title" msgid="5750686717225068016">"Problème vidéo"</string>
@@ -1446,6 +1466,7 @@
     <string name="find_on_page" msgid="5400537367077438198">"Rechercher sur la page"</string>
     <plurals name="matches_found" formatted="false" msgid="1101758718194295554">
       <item quantity="one"><xliff:g id="INDEX">%d</xliff:g> sur <xliff:g id="TOTAL">%d</xliff:g></item>
+      <item quantity="many"><xliff:g id="INDEX">%d</xliff:g> of <xliff:g id="TOTAL">%d</xliff:g></item>
       <item quantity="other"><xliff:g id="INDEX">%d</xliff:g> sur <xliff:g id="TOTAL">%d</xliff:g></item>
     </plurals>
     <string name="action_mode_done" msgid="2536182504764803222">"Terminé"</string>
@@ -1582,6 +1603,7 @@
     <string name="kg_wrong_pin" msgid="3680925703673166482">"NIP incorrect."</string>
     <plurals name="kg_too_many_failed_attempts_countdown" formatted="false" msgid="236717428673283568">
       <item quantity="one">Réessayer dans <xliff:g id="NUMBER">%d</xliff:g> seconde.</item>
+      <item quantity="many">Try again in <xliff:g id="NUMBER">%d</xliff:g> seconds.</item>
       <item quantity="other">Réessayer dans <xliff:g id="NUMBER">%d</xliff:g> secondes.</item>
     </plurals>
     <string name="kg_pattern_instructions" msgid="8366024510502517748">"Dessinez votre schéma."</string>
@@ -1608,12 +1630,12 @@
     <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="23741434207544038">"Vous avez saisi un NIP incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. \n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
     <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="3328686432962224215">"Vous avez saisi un mot de passe incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. \n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
     <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="7357404233979139075">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises.\n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="3479940221343361587">"Vous avez tenté de déverrouiller la tablette de façon incorrecte à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, sa configuration d\'usine sera rétablie, et toutes les données utilisateur seront perdues."</string>
+    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="3479940221343361587">"Vous avez tenté de déverrouiller la tablette de façon incorrecte à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, ses paramètres par défaut seront rétablis, et toutes les données d\'utilisateur seront perdues."</string>
     <string name="kg_failed_attempts_almost_at_wipe" product="tv" msgid="9064457748587850217">"Vous avez tenté de déverrouiller votre appareil Android TV incorrectement à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprise(s). Après <xliff:g id="NUMBER_1">%2$d</xliff:g> autre(s) tentative(s) incorrecte(s), votre appareil Android TV sera réinitialisé à ses valeurs d\'usine et toutes les données personnelles seront supprimées."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="5955398963754432548">"Vous avez tenté de déverrouiller le téléphone de façon incorrecte à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, sa configuration d\'usine sera rétablie, et toutes les données utilisateur seront perdues."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="2299099385175083308">"Vous avez tenté de déverrouiller la tablette de façon incorrecte à <xliff:g id="NUMBER">%d</xliff:g> reprises. Sa configuration d\'usine va être rétablie."</string>
+    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="5955398963754432548">"Vous avez tenté de déverrouiller le téléphone de façon incorrecte à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, ses paramètres par défaut seront rétablis, et toutes les données d\'utilisateur seront perdues."</string>
+    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="2299099385175083308">"Vous avez tenté de déverrouiller la tablette de façon incorrecte à <xliff:g id="NUMBER">%d</xliff:g> reprises. Ses paramètres par défaut vont être rétablis."</string>
     <string name="kg_failed_attempts_now_wiping" product="tv" msgid="5045460916106267585">"Vous avez tenté de déverrouiller votre appareil Android TV incorrectement à <xliff:g id="NUMBER">%d</xliff:g> reprise(s). Votre appareil Android TV sera maintenant réinitialisé à ses valeurs d\'usine."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="5043730590446071189">"Vous avez tenté de déverrouiller le téléphone de façon incorrecte à <xliff:g id="NUMBER">%d</xliff:g> reprises. Sa configuration d\'usine va être rétablie."</string>
+    <string name="kg_failed_attempts_now_wiping" product="default" msgid="5043730590446071189">"Vous avez tenté de déverrouiller le téléphone de façon incorrecte à <xliff:g id="NUMBER">%d</xliff:g> reprises. Ses paramètres par défaut vont être rétablis."</string>
     <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="7086799295109717623">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, vous devrez déverrouiller votre tablette à l\'aide d\'un compte de messagerie électronique.\n\n Veuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
     <string name="kg_failed_attempts_almost_at_login" product="tv" msgid="4670840383567106114">"Vous avez dessiné votre schéma de déverrouillage incorrectement à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprise(s). Après <xliff:g id="NUMBER_1">%2$d</xliff:g> autre(s) tentative(s) incorrecte(s), vous devrez déverrouiller votre appareil Android TV à l\'aide d\'un compte de courriel.\n\nVeuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
     <string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, vous devrez déverrouiller votre téléphone à l\'aide d\'un compte de messagerie électronique.\n\n Veuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
@@ -1768,6 +1790,7 @@
     <string name="restr_pin_error_too_short" msgid="1547007808237941065">"Le NIP est trop court. Il doit comporter au moins 4 chiffres."</string>
     <plurals name="restr_pin_countdown" formatted="false" msgid="4427486903285216153">
       <item quantity="one">Réessayer dans <xliff:g id="COUNT">%d</xliff:g> seconde</item>
+      <item quantity="many">Try again in <xliff:g id="COUNT">%d</xliff:g> seconds</item>
       <item quantity="other">Réessayer dans <xliff:g id="COUNT">%d</xliff:g> secondes</item>
     </plurals>
     <string name="restr_pin_try_later" msgid="5897719962541636727">"Réessayez plus tard"</string>
@@ -1792,41 +1815,49 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Mise à jour par votre administrateur"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Supprimé par votre administrateur"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Pour prolonger l\'autonomie de la pile, l\'économiseur de pile effectue les actions suivantes :\n\n•·Active le thème sombre\n•·Désactive ou limite l\'activité en arrière-plan, certains effets visuels et d\'autres fonctionnalités, comme « Ok Google »\n\n"<annotation id="url">"En savoir plus"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Pour prolonger l\'autonomie de la pile, l\'économiseur de pile effectue les actions suivantes :\n\n•·Active le thème sombre\n•·Désactive ou limite l\'activité en arrière-plan, certains effets visuels et d\'autres fonctionnalités, comme « Ok Google »"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Pour prolonger l\'autonomie de la pile, l\'économiseur de pile effectue les actions suivantes :\n\n•·Active le thème sombre\n•·Désactive ou limite l\'activité en arrière-plan, certains effets visuels et d\'autres fonctionnalités, comme « Ok Google »\n\n"<annotation id="url">"En savoir plus"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Pour prolonger l\'autonomie de la pile, l\'économiseur de pile effectue les actions suivantes :\n\n•·Active le thème sombre\n•·Désactive ou limite l\'activité en arrière-plan, certains effets visuels et d\'autres fonctionnalités, comme « Ok Google »"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Pour aider à diminuer l\'utilisation des données, la fonctionnalité Économiseur de données empêche certaines applications d\'envoyer ou de recevoir des données en arrière-plan. Une application que vous utilisez actuellement peut accéder à des données, mais peut le faire moins souvent. Cela peut signifier, par exemple, que les images ne s\'affichent pas jusqu\'à ce que vous les touchiez."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Activer l\'économiseur de données?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Activer"</string>
     <plurals name="zen_mode_duration_minutes_summary" formatted="false" msgid="2877101784123058273">
       <item quantity="one">Pendant %1$d minute (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
+      <item quantity="many">For %1$d minutes (until <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="other">Pendant %1$d minutes (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
     </plurals>
     <plurals name="zen_mode_duration_minutes_summary_short" formatted="false" msgid="4230730310318858312">
       <item quantity="one">Pendant %1$d min (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
+      <item quantity="many">For %1$d min (until <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="other">Pendant %1$d min (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
     </plurals>
     <plurals name="zen_mode_duration_hours_summary" formatted="false" msgid="7725354244196466758">
       <item quantity="one">Pendant %1$d heure (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
+      <item quantity="many">For %1$d hours (until <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="other">Pendant %1$d heures (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
     </plurals>
     <plurals name="zen_mode_duration_hours_summary_short" formatted="false" msgid="588719069121765642">
       <item quantity="one">Pendant %1$d h (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
+      <item quantity="many">For %1$d hr (until <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="other">Pendant %1$d h (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
     </plurals>
     <plurals name="zen_mode_duration_minutes" formatted="false" msgid="1148568456958944998">
       <item quantity="one">Pendant %d minute</item>
+      <item quantity="many">For %d minutes</item>
       <item quantity="other">Pendant %d minutes</item>
     </plurals>
     <plurals name="zen_mode_duration_minutes_short" formatted="false" msgid="2742377799995454859">
       <item quantity="one">Pendant %d min</item>
+      <item quantity="many">For %d min</item>
       <item quantity="other">Pendant %d min</item>
     </plurals>
     <plurals name="zen_mode_duration_hours" formatted="false" msgid="525401855645490022">
       <item quantity="one">Pendant %d heure</item>
+      <item quantity="many">For %d hours</item>
       <item quantity="other">Pendant %d heures</item>
     </plurals>
     <plurals name="zen_mode_duration_hours_short" formatted="false" msgid="7644653189680911640">
       <item quantity="one">Pendant %d h</item>
+      <item quantity="many">For %d hr</item>
       <item quantity="other">Pendant %d h</item>
     </plurals>
     <string name="zen_mode_until" msgid="2250286190237669079">"Jusqu\'à <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
@@ -1842,7 +1873,7 @@
     <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Événement"</string>
     <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sommeil"</string>
     <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> désactive certains sons"</string>
-    <string name="system_error_wipe_data" msgid="5910572292172208493">"Un problème interne est survenu avec votre appareil. Il se peut qu\'il soit instable jusqu\'à ce que vous le réinitialisiez à sa configuration d\'usine."</string>
+    <string name="system_error_wipe_data" msgid="5910572292172208493">"Un problème interne est survenu avec votre appareil. Il se peut qu\'il soit instable jusqu\'à ce que vous le réinitialisiez à ses paramètres par défaut."</string>
     <string name="system_error_manufacturer" msgid="703545241070116315">"Un problème interne est survenu avec votre appareil. Communiquez avec le fabricant pour obtenir plus de détails."</string>
     <string name="stk_cc_ussd_to_dial" msgid="3139884150741157610">"La demande USSD a été remplacée par une demande d\'appel régulier"</string>
     <string name="stk_cc_ussd_to_ss" msgid="4826846653052609738">"La demande USSD a été remplacée par une demande SS"</string>
@@ -1867,6 +1898,7 @@
     <string name="notification_messaging_title_template" msgid="772857526770251989">"<xliff:g id="CONVERSATION_TITLE">%1$s</xliff:g> : <xliff:g id="SENDER_NAME">%2$s</xliff:g>"</string>
     <plurals name="selected_count" formatted="false" msgid="3946212171128200491">
       <item quantity="one"><xliff:g id="COUNT_1">%1$d</xliff:g> élément sélectionné</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> selected</item>
       <item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> éléments sélectionnés</item>
     </plurals>
     <string name="default_notification_channel_label" msgid="3697928973567217330">"Sans catégorie"</string>
@@ -1934,6 +1966,7 @@
     <string name="autofill_picker_no_suggestions" msgid="1076022650427481509">"Aucune suggestion de remplissage automatique"</string>
     <plurals name="autofill_picker_some_suggestions" formatted="false" msgid="6651883186966959978">
       <item quantity="one"><xliff:g id="COUNT">%1$s</xliff:g> suggestion de remplissage automatique</item>
+      <item quantity="many"><xliff:g id="COUNT">%1$s</xliff:g> autofill suggestions</item>
       <item quantity="other"><xliff:g id="COUNT">%1$s</xliff:g> suggestions de remplissage automatique</item>
     </plurals>
     <string name="autofill_save_title" msgid="7719802414283739775">"Enregistrer sous "<b>"<xliff:g id="LABEL">%1$s</xliff:g>"</b>"?"</string>
@@ -2027,6 +2060,7 @@
     <string name="car_loading_profile" msgid="8219978381196748070">"Chargement en cours…"</string>
     <plurals name="file_count" formatted="false" msgid="7063513834724389247">
       <item quantity="one"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> fichier</item>
+      <item quantity="many"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> files</item>
       <item quantity="other"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> fichiers</item>
     </plurals>
     <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Aucune recommandation de personnes avec lesquelles effectuer un partage"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index d4978c3..fc91c47 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -52,6 +52,7 @@
     <string name="enablePin" msgid="2543771964137091212">"Échec de l\'opération. Veuillez activer le verrouillage de la carte SIM/RUIM."</string>
     <plurals name="pinpuk_attempts" formatted="false" msgid="1619867269012213584">
       <item quantity="one">Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative avant que votre carte SIM ne soit verrouillée.</item>
+      <item quantity="many">You have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts before SIM is locked.</item>
       <item quantity="other">Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives avant que votre carte SIM ne soit verrouillée.</item>
     </plurals>
     <string name="imei" msgid="2157082351232630390">"Code IMEI"</string>
@@ -179,6 +180,7 @@
     <string name="low_memory" product="default" msgid="2539532364144025569">"La mémoire du téléphone est pleine. Veuillez supprimer des fichiers pour libérer de l\'espace."</string>
     <plurals name="ssl_ca_cert_warning" formatted="false" msgid="2288194355006173029">
       <item quantity="one">Autorité de certification installée</item>
+      <item quantity="many">Certificate authorities installed</item>
       <item quantity="other">Autorités de certification installées</item>
     </plurals>
     <string name="ssl_ca_cert_noti_by_unknown" msgid="4961102218216815242">"Par un tiers inconnu"</string>
@@ -251,6 +253,7 @@
     <string name="bugreport_option_full_summary" msgid="1975130009258435885">"Utilisez cette option pour qu\'il y ait le moins d\'interférences système possible lorsque votre appareil ne répond pas ou qu\'il est trop lent, ou lorsque vous avez besoin de toutes les sections du rapport de bug. Aucune capture d\'écran supplémentaire ne peut être prise, et vous ne pouvez saisir aucune autre information."</string>
     <plurals name="bugreport_countdown" formatted="false" msgid="3906120379260059206">
       <item quantity="one">Capture d\'écran pour le rapport de bug dans <xliff:g id="NUMBER_1">%d</xliff:g> seconde</item>
+      <item quantity="many">Taking screenshot for bug report in <xliff:g id="NUMBER_1">%d</xliff:g> seconds.</item>
       <item quantity="other">Capture d\'écran pour le rapport de bug dans <xliff:g id="NUMBER_1">%d</xliff:g> secondes</item>
     </plurals>
     <string name="bugreport_screenshot_success_toast" msgid="7986095104151473745">"Capture d\'écran avec rapport de bug effectuée"</string>
@@ -829,7 +832,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Appuyez sur \"Menu\" pour déverrouiller le téléphone ou appeler un numéro d\'urgence"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Appuyez sur \"Menu\" pour déverrouiller le téléphone."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Dessinez un schéma pour déverrouiller le téléphone"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Urgences"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Appel d\'urgence"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Retour à l\'appel"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Combinaison correcte !"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Veuillez réessayer."</string>
@@ -994,6 +997,7 @@
     <string name="beforeOneMonthDurationPast" msgid="8315149541372065392">"Il y a plus d\'un mois"</string>
     <plurals name="last_num_days" formatted="false" msgid="687443109145393632">
       <item quantity="one">Le dernier jour (<xliff:g id="COUNT_1">%d</xliff:g>)</item>
+      <item quantity="many">Last <xliff:g id="COUNT_1">%d</xliff:g> days</item>
       <item quantity="other">Les <xliff:g id="COUNT_1">%d</xliff:g> derniers jours</item>
     </plurals>
     <string name="last_month" msgid="1528906781083518683">"Le mois dernier"</string>
@@ -1016,66 +1020,82 @@
     <string name="now_string_shortest" msgid="3684914126941650330">"mainten."</string>
     <plurals name="duration_minutes_shortest" formatted="false" msgid="7519574894537185135">
       <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> m</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g>m</item>
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> m</item>
     </plurals>
     <plurals name="duration_hours_shortest" formatted="false" msgid="2838655994500499651">
       <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> h</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g>h</item>
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> h</item>
     </plurals>
     <plurals name="duration_days_shortest" formatted="false" msgid="3686058472983158496">
       <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> j</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g>d</item>
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> j</item>
     </plurals>
     <plurals name="duration_years_shortest" formatted="false" msgid="8299112348723640338">
       <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> a</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g>y</item>
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> a</item>
     </plurals>
     <plurals name="duration_minutes_shortest_future" formatted="false" msgid="849196137176399440">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> m</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g>m</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> m</item>
     </plurals>
     <plurals name="duration_hours_shortest_future" formatted="false" msgid="5386373597343170388">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> h</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g>h</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> h</item>
     </plurals>
     <plurals name="duration_days_shortest_future" formatted="false" msgid="814754627092787227">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> j</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g>d</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> j</item>
     </plurals>
     <plurals name="duration_years_shortest_future" formatted="false" msgid="7683731800140202145">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> a</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g>y</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> a</item>
     </plurals>
     <plurals name="duration_minutes_relative" formatted="false" msgid="6569851308583028344">
       <item quantity="one">il y a <xliff:g id="COUNT_1">%d</xliff:g> minute</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> minutes ago</item>
       <item quantity="other">il y a <xliff:g id="COUNT_1">%d</xliff:g> minutes</item>
     </plurals>
     <plurals name="duration_hours_relative" formatted="false" msgid="420434788589102019">
       <item quantity="one">il y a <xliff:g id="COUNT_1">%d</xliff:g> heure</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> hours ago</item>
       <item quantity="other">il y a <xliff:g id="COUNT_1">%d</xliff:g> heures</item>
     </plurals>
     <plurals name="duration_days_relative" formatted="false" msgid="6056425878237482431">
       <item quantity="one">il y a <xliff:g id="COUNT_1">%d</xliff:g> jour</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> days ago</item>
       <item quantity="other">il y a <xliff:g id="COUNT_1">%d</xliff:g> jours</item>
     </plurals>
     <plurals name="duration_years_relative" formatted="false" msgid="2179998228861172159">
       <item quantity="one">il y a <xliff:g id="COUNT_1">%d</xliff:g> an</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> years ago</item>
       <item quantity="other">il y a <xliff:g id="COUNT_1">%d</xliff:g> ans</item>
     </plurals>
     <plurals name="duration_minutes_relative_future" formatted="false" msgid="5759885720917567723">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> minute</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g> minutes</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> minutes</item>
     </plurals>
     <plurals name="duration_hours_relative_future" formatted="false" msgid="8963511608507707959">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> heure</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g> hours</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> heures</item>
     </plurals>
     <plurals name="duration_days_relative_future" formatted="false" msgid="1964709470979250702">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> jour</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g> days</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> jours</item>
     </plurals>
     <plurals name="duration_years_relative_future" formatted="false" msgid="3985129025134896371">
       <item quantity="one">dans <xliff:g id="COUNT_1">%d</xliff:g> an</item>
+      <item quantity="many">in <xliff:g id="COUNT_1">%d</xliff:g> years</item>
       <item quantity="other">dans <xliff:g id="COUNT_1">%d</xliff:g> ans</item>
     </plurals>
     <string name="VideoView_error_title" msgid="5750686717225068016">"Problème vidéo"</string>
@@ -1231,7 +1251,7 @@
     <string name="volume_icon_description_notification" msgid="579091344110747279">"Volume des notifications"</string>
     <string name="ringtone_default" msgid="9118299121288174597">"Sonnerie par défaut"</string>
     <string name="ringtone_default_with_actual" msgid="2709686194556159773">"Sonnerie par défaut (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
-    <string name="ringtone_silent" msgid="397111123930141876">"Aucun(e)"</string>
+    <string name="ringtone_silent" msgid="397111123930141876">"Aucun"</string>
     <string name="ringtone_picker_title" msgid="667342618626068253">"Sonneries"</string>
     <string name="ringtone_picker_title_alarm" msgid="7438934548339024767">"Sons de l\'alarme"</string>
     <string name="ringtone_picker_title_notification" msgid="6387191794719608122">"Sons de notification"</string>
@@ -1446,6 +1466,7 @@
     <string name="find_on_page" msgid="5400537367077438198">"Rechercher sur la page"</string>
     <plurals name="matches_found" formatted="false" msgid="1101758718194295554">
       <item quantity="one"><xliff:g id="INDEX">%d</xliff:g> sur <xliff:g id="TOTAL">%d</xliff:g></item>
+      <item quantity="many"><xliff:g id="INDEX">%d</xliff:g> of <xliff:g id="TOTAL">%d</xliff:g></item>
       <item quantity="other"><xliff:g id="INDEX">%d</xliff:g> sur <xliff:g id="TOTAL">%d</xliff:g></item>
     </plurals>
     <string name="action_mode_done" msgid="2536182504764803222">"OK"</string>
@@ -1582,6 +1603,7 @@
     <string name="kg_wrong_pin" msgid="3680925703673166482">"Code PIN incorrect."</string>
     <plurals name="kg_too_many_failed_attempts_countdown" formatted="false" msgid="236717428673283568">
       <item quantity="one">Réessayez dans <xliff:g id="NUMBER">%d</xliff:g> seconde.</item>
+      <item quantity="many">Try again in <xliff:g id="NUMBER">%d</xliff:g> seconds.</item>
       <item quantity="other">Réessayez dans <xliff:g id="NUMBER">%d</xliff:g> secondes.</item>
     </plurals>
     <string name="kg_pattern_instructions" msgid="8366024510502517748">"Dessinez votre schéma."</string>
@@ -1768,6 +1790,7 @@
     <string name="restr_pin_error_too_short" msgid="1547007808237941065">"Le code PIN est trop court. Il doit comporter au moins 4 chiffres."</string>
     <plurals name="restr_pin_countdown" formatted="false" msgid="4427486903285216153">
       <item quantity="one">Réessayer dans <xliff:g id="COUNT">%d</xliff:g> seconde</item>
+      <item quantity="many">Try again in <xliff:g id="COUNT">%d</xliff:g> seconds</item>
       <item quantity="other">Réessayer dans <xliff:g id="COUNT">%d</xliff:g> secondes</item>
     </plurals>
     <string name="restr_pin_try_later" msgid="5897719962541636727">"Veuillez réessayer ultérieurement."</string>
@@ -1792,41 +1815,49 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Mis à jour par votre administrateur"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Supprimé par votre administrateur"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Pour prolonger l\'autonomie de la batterie, l\'économiseur de batterie :\n\n·• active le thème sombre\n·• désactive ou restreint les activités en arrière-plan, certains effets visuels et d\'autres fonctionnalités, comme \"Ok Google\"\n\n"<annotation id="url">"En savoir plus"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Pour prolonger l\'autonomie de la batterie, l\'économiseur de batterie :\n\n·• active le thème sombre\n • désactive ou restreint les activités en arrière-plan, certains effets visuels et d\'autres fonctionnalités, comme \"Ok Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Pour prolonger l\'autonomie de la batterie, l\'économiseur de batterie :\n\n • active le thème sombre ;\n • désactive ou restreint les activités en arrière-plan, certains effets visuels et d\'autres fonctionnalités, comme \"Hey Google\".\n\n"<annotation id="url">"En savoir plus"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Pour prolonger l\'autonomie de la batterie, l\'économiseur de batterie :\n\n• active le thème sombre ;\n • désactive ou restreint les activités en arrière-plan, certains effets visuels et d\'autres fonctionnalités, comme \"Hey Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Pour réduire la consommation de données, l\'économiseur de données empêche certaines applications d\'envoyer ou de recevoir des données en arrière-plan. Ainsi, les applications que vous utilisez peuvent toujours accéder aux données, mais pas en permanence. Par exemple, il se peut que les images ne s\'affichent pas tant que vous n\'appuyez pas dessus."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Activer l\'économiseur de données ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Activer"</string>
     <plurals name="zen_mode_duration_minutes_summary" formatted="false" msgid="2877101784123058273">
       <item quantity="one">Pendant %1$d minute (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
+      <item quantity="many">For %1$d minutes (until <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="other">Pendant %1$d minutes (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
     </plurals>
     <plurals name="zen_mode_duration_minutes_summary_short" formatted="false" msgid="4230730310318858312">
       <item quantity="one">Pendant %1$d min (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
+      <item quantity="many">For %1$d min (until <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="other">Pendant %1$d min (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
     </plurals>
     <plurals name="zen_mode_duration_hours_summary" formatted="false" msgid="7725354244196466758">
       <item quantity="one">Pendant %1$d heure (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
+      <item quantity="many">For %1$d hours (until <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="other">Pendant %1$d heures (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
     </plurals>
     <plurals name="zen_mode_duration_hours_summary_short" formatted="false" msgid="588719069121765642">
       <item quantity="one">Pendant %1$d h (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
+      <item quantity="many">For %1$d hr (until <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="other">Pendant %1$d h (jusqu\'à <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
     </plurals>
     <plurals name="zen_mode_duration_minutes" formatted="false" msgid="1148568456958944998">
       <item quantity="one">Pendant %d minute</item>
+      <item quantity="many">For %d minutes</item>
       <item quantity="other">Pendant %d minutes</item>
     </plurals>
     <plurals name="zen_mode_duration_minutes_short" formatted="false" msgid="2742377799995454859">
       <item quantity="one">Pendant %d min</item>
+      <item quantity="many">For %d min</item>
       <item quantity="other">Pendant %d min</item>
     </plurals>
     <plurals name="zen_mode_duration_hours" formatted="false" msgid="525401855645490022">
       <item quantity="one">Pendant %d heure</item>
+      <item quantity="many">For %d hours</item>
       <item quantity="other">Pendant %d heures</item>
     </plurals>
     <plurals name="zen_mode_duration_hours_short" formatted="false" msgid="7644653189680911640">
       <item quantity="one">Pendant %d h</item>
+      <item quantity="many">For %d hr</item>
       <item quantity="other">Pendant %d h</item>
     </plurals>
     <string name="zen_mode_until" msgid="2250286190237669079">"Jusqu\'à <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
@@ -1867,6 +1898,7 @@
     <string name="notification_messaging_title_template" msgid="772857526770251989">"<xliff:g id="CONVERSATION_TITLE">%1$s</xliff:g> : <xliff:g id="SENDER_NAME">%2$s</xliff:g>"</string>
     <plurals name="selected_count" formatted="false" msgid="3946212171128200491">
       <item quantity="one"><xliff:g id="COUNT_1">%1$d</xliff:g> élément sélectionné</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> selected</item>
       <item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> éléments sélectionnés</item>
     </plurals>
     <string name="default_notification_channel_label" msgid="3697928973567217330">"Sans catégorie"</string>
@@ -1934,6 +1966,7 @@
     <string name="autofill_picker_no_suggestions" msgid="1076022650427481509">"Aucune suggestion de saisie automatique"</string>
     <plurals name="autofill_picker_some_suggestions" formatted="false" msgid="6651883186966959978">
       <item quantity="one"><xliff:g id="COUNT">%1$s</xliff:g> suggestion de saisie automatique</item>
+      <item quantity="many"><xliff:g id="COUNT">%1$s</xliff:g> autofill suggestions</item>
       <item quantity="other"><xliff:g id="COUNT">%1$s</xliff:g> suggestions de saisie automatique</item>
     </plurals>
     <string name="autofill_save_title" msgid="7719802414283739775">"Enregistrer dans "<b>"<xliff:g id="LABEL">%1$s</xliff:g>"</b>" ?"</string>
@@ -2027,6 +2060,7 @@
     <string name="car_loading_profile" msgid="8219978381196748070">"Chargement…"</string>
     <plurals name="file_count" formatted="false" msgid="7063513834724389247">
       <item quantity="one"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> fichier</item>
+      <item quantity="many"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> files</item>
       <item quantity="other"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> fichiers</item>
     </plurals>
     <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Aucune recommandation de personnes avec lesquelles effectuer un partage"</string>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index e4ac021..7cc6f69 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Preme Menú para desbloquear ou realizar unha chamada de emerxencia."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Preme Menú para desbloquear."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Crea o padrón de desbloqueo"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emerxencia"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Chamada de emerxencia"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Volver á chamada"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correcto!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Téntao de novo"</string>
@@ -1587,7 +1587,7 @@
     <string name="kg_pattern_instructions" msgid="8366024510502517748">"Debuxa o teu padrón"</string>
     <string name="kg_sim_pin_instructions" msgid="6479401489471690359">"Introduce o PIN da tarxeta SIM"</string>
     <string name="kg_pin_instructions" msgid="7355933174673539021">"Introduce o PIN"</string>
-    <string name="kg_password_instructions" msgid="7179782578809398050">"Insire o teu contrasinal"</string>
+    <string name="kg_password_instructions" msgid="7179782578809398050">"Escribe o teu contrasinal"</string>
     <string name="kg_puk_enter_puk_hint" msgid="6696187482616360994">"Agora a tarxeta SIM está desactivada. Introduce o código PUK para continuar. Ponte en contacto co operador para obter información detallada."</string>
     <string name="kg_puk_enter_pin_hint" msgid="8190982314659429770">"Introduce o código PIN desexado"</string>
     <string name="kg_enter_confirm_pin_hint" msgid="6372557107414074580">"Confirma o código PIN desexado"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Actualizado polo teu administrador"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Eliminado polo teu administrador"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Aceptar"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Para aumentar a duración da batería, a función Aforro de batería fai o seguinte:\n\n•Activa o tema escuro\n•Desactiva ou restrinxe a actividade en segundo plano, algúns efectos visuais e outras funcións, como \"Ok Google\"\n\n"<annotation id="url">"Máis información"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Para aumentar a duración da batería, a función Aforro de batería fai o seguinte:\n\n•Activa o tema escuro\n•Desactiva ou restrinxe a actividade en segundo plano, algúns efectos visuais e outras funcións, como \"Ok Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Para aumentar a duración da batería, a función Aforro de batería fai o seguinte:\n\n• Activa o tema escuro.\n• Desactiva ou restrinxe a actividade en segundo plano, algúns efectos visuais e outras funcións, como \"Ok Google\".\n\n"<annotation id="url">"Máis información"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Para aumentar a duración da batería, a función Aforro de batería fai o seguinte:\n\n• Activa o tema escuro\n• Desactiva ou restrinxe a actividade en segundo plano, algúns efectos visuais e outras funcións, como \"Ok Google\""</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Para contribuír a reducir o uso de datos, o aforro de datos impide que algunhas aplicacións envíen ou reciban datos en segundo plano. Cando esteas utilizando unha aplicación, esta poderá acceder aos datos, pero é posible que o faga con menos frecuencia. Por exemplo, é posible que as imaxes non se mostren ata que as toques."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Queres activar o aforro de datos?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Activar"</string>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index 6700f54..55e462c 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -189,7 +189,7 @@
     <string name="work_profile_deleted_description_dpm_wipe" msgid="2477244968924647232">"આ ઉપકરણ પર તમારી કાર્યાલયની પ્રોફાઇલ હવે ઉપલબ્ધ નથી"</string>
     <string name="work_profile_deleted_reason_maximum_password_failure" msgid="1080323158315663167">"પાસવર્ડના ઘણા વધુ પ્રયત્નો"</string>
     <string name="device_ownership_relinquished" msgid="4080886992183195724">"વ્યવસ્થાપકે ડિવાઇસ વ્યક્તિગત ઉપયોગ માટે આપી દીધું છે"</string>
-    <string name="network_logging_notification_title" msgid="554983187553845004">"ઉપકરણ સંચાલિત છે"</string>
+    <string name="network_logging_notification_title" msgid="554983187553845004">"ડિવાઇસ મેનેજ થયેલ છે"</string>
     <string name="network_logging_notification_text" msgid="1327373071132562512">"તમારી સંસ્થા આ ઉપકરણનું સંચાલન કરે છે અને નેટવર્ક ટ્રાફિફનું નિયમન કરી શકે છે. વિગતો માટે ટૅપ કરો."</string>
     <string name="location_changed_notification_title" msgid="3620158742816699316">"ઍપ તમારા સ્થાનને ઍક્સેસ કરી શકે છે"</string>
     <string name="location_changed_notification_text" msgid="7158423339982706912">"વધુ જાણવા માટે તમારા IT વ્યવસ્થાપકનો સંપર્ક કરો"</string>
@@ -312,7 +312,7 @@
     <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>
+    <string name="permgroupdesc_phone" msgid="270048070781478204">"ફોન કૉલ કરો અને મેનેજ કરો"</string>
     <string name="permgrouplab_sensors" msgid="9134046949784064495">"બૉડી સેન્સર"</string>
     <string name="permgroupdesc_sensors" msgid="2610631290633747752">"તમારા મહત્વપૂર્ણ ચિહ્નો વિશે સેન્સર ડેટા ઍક્સેસ કરો"</string>
     <string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"વિંડો કન્ટેન્ટ પુનઃપ્રાપ્ત કરો"</string>
@@ -363,7 +363,7 @@
     <string name="permdesc_receiveWapPush" msgid="1638677888301778457">"એપ્લિકેશનને WAP સંદેશા પ્રાપ્ત કરવાની અને તેના પર પ્રક્રિયા કરવાની મંજૂરી આપે છે. આ પરવાનગીમાં તમને દર્શાવ્યા વિના તમને મોકલેલ સંદેશાઓનું નિરીક્ષણ કરવાની અને કાઢી નાખવાની ક્ષમતાનો સમાવેશ થાય છે."</string>
     <string name="permlab_getTasks" msgid="7460048811831750262">"ચાલુ ઍપ્લિકેશનો પુનઃપ્રાપ્ત કરો"</string>
     <string name="permdesc_getTasks" msgid="7388138607018233726">"એપ્લિકેશનને વર્તમાનમાં અને તાજેતરમાં ચાલી રહેલ Tasks વિશેની વિગતવાર માહિતી પુનઃપ્રાપ્ત કરવાની મંજૂરી આપે છે. આ એપ્લિકેશનને ઉપકરણ પર કઈ એપ્લિકેશન્સનો ઉપયોગ થાય છે તેના વિશેની માહિતી શોધવાની મંજૂરી આપી શકે છે."</string>
-    <string name="permlab_manageProfileAndDeviceOwners" msgid="639849495253987493">"પ્રોફાઇલ અને ઉપકરણ માલિકોને સંચાલિત કરો"</string>
+    <string name="permlab_manageProfileAndDeviceOwners" msgid="639849495253987493">"પ્રોફાઇલ અને ડિવાઇસ માલિકોને મેનેજ કરો"</string>
     <string name="permdesc_manageProfileAndDeviceOwners" msgid="7304240671781989283">"એપ્લિકેશન્સને પ્રોફાઇલ માલિકો અને ઉપકરણ માલિકો સેટ કરવાની મંજૂરી આપે છે."</string>
     <string name="permlab_reorderTasks" msgid="7598562301992923804">"ચાલુ એપ્લિકેશન્સને ફરી ગોઠવો"</string>
     <string name="permdesc_reorderTasks" msgid="8796089937352344183">"ઍપ્લિકેશનને અગ્રભૂમિ અને પૃષ્ટભૂમિમાં Tasks ખસેડવાની મંજૂરી આપે છે. તમારા ઇનપુટ વિના ઍપ્લિકેશન આ કરી શકે છે."</string>
@@ -524,7 +524,7 @@
     <string name="permdesc_requestPasswordComplexity" msgid="1130556896836258567">"ઍપને સ્ક્રીન લૉકની જટિલતાનું લેવલ (ઊંચું, મધ્યમ, નીચું અથવા કોઈ નહીં) જાણવાની મંજૂરી આપે છે, જે સ્ક્રીન લૉકના પ્રકાર અને લંબાઈની સંભવિત શ્રેણી સૂચવે છે. ઍપ વપરાશકર્તાઓને સ્ક્રીન લૉકને ચોક્કસ લેવલ સુધી અપડેટ કરવાનું સૂચન પણ કરી શકે છે, પરંતુ વપરાશકર્તાઓ મુક્ત રીતે અવગણીને નૅવિગેટ કરી શકે છે. નોંધી લો કે સ્ક્રીન લૉકનો plaintextમાં સંગ્રહ કરવામાં આવતો નથી, તેથી ઍપને ચોક્કસ પાસવર્ડની જાણ હોતી નથી."</string>
     <string name="permlab_useBiometric" msgid="6314741124749633786">"બાયોમેટ્રિક હાર્ડવેરનો ઉપયોગ કરો"</string>
     <string name="permdesc_useBiometric" msgid="7502858732677143410">"ઍપને પ્રમાણીકરણ માટે બાયોમેટ્રિક હાર્ડવેરનો ઉપયોગ કરવાની મંજૂરી આપે છે"</string>
-    <string name="permlab_manageFingerprint" msgid="7432667156322821178">"ફિંગરપ્રિન્ટ હાર્ડવેરને સંચાલિત કરો"</string>
+    <string name="permlab_manageFingerprint" msgid="7432667156322821178">"ફિંગરપ્રિન્ટ હાર્ડવેરને મેનેજ કરો"</string>
     <string name="permdesc_manageFingerprint" msgid="2025616816437339865">"ઍપને ઉપયોગ માટે ફિંગરપ્રિન્ટ નમૂના ઉમેરવા અને કાઢી નાખવા માટે પદ્ધતિઓની વિનંતી કરવાની મંજૂરી આપે છે."</string>
     <string name="permlab_useFingerprint" msgid="1001421069766751922">"ફિંગરપ્રિન્ટ હાર્ડવેરનો ઉપયોગ કરો"</string>
     <string name="permdesc_useFingerprint" msgid="412463055059323742">"ઍપને પ્રમાણીકરણ માટે ફિંગરપ્રિન્ટ હાર્ડવેરનો ઉપયોગ કરવાની મંજૂરી આપે છે"</string>
@@ -627,8 +627,8 @@
     <string name="permdesc_register_sim_subscription" msgid="4183858662792232464">"એપ્લિકેશનને નવા ટેલિકોમ સિમ કનેક્શન્સની નોંધણી કરવાની મંજૂરી આપે છે."</string>
     <string name="permlab_register_call_provider" msgid="6135073566140050702">"નવા ટેલિકોમ કનેક્શન્સની નોંધણી કરો"</string>
     <string name="permdesc_register_call_provider" msgid="4201429251459068613">"એપ્લિકેશનને નવા ટેલિકોમ કનેક્શન્સની નોંધણી કરવાની મંજૂરી આપે છે."</string>
-    <string name="permlab_connection_manager" msgid="3179365584691166915">"ટેલિકોમ કનેક્શન્સ સંચાલિત કરો"</string>
-    <string name="permdesc_connection_manager" msgid="1426093604238937733">"એપ્લિકેશનને ટેલીકોમ કનેક્શન્સને સંચાલિત કરવાની મંજૂરી આપે છે."</string>
+    <string name="permlab_connection_manager" msgid="3179365584691166915">"ટેલિકોમ કનેક્શનને મેનેજ કરો"</string>
+    <string name="permdesc_connection_manager" msgid="1426093604238937733">"ઍપને ટેલિકોમ કનેક્શનને મેનેજ કરવાની મંજૂરી આપે છે."</string>
     <string name="permlab_bind_incall_service" msgid="5990625112603493016">"ઇન-કૉલ સ્ક્રીન વડે ક્રિયાપ્રતિક્રિયા કરો"</string>
     <string name="permdesc_bind_incall_service" msgid="4124917526967765162">"વપરાશકર્તા ઇન-કૉલ સ્ર્કીન ક્યારે અને કેવી રીતે જુએ છે તે નિયંત્રિત કરવાની એપ્લિકેશનને મંજૂરી આપે છે."</string>
     <string name="permlab_bind_connection_service" msgid="5409268245525024736">"ટેલિફોની સેવાઓ સાથે વાર્તાલાપ કરો"</string>
@@ -637,8 +637,8 @@
     <string name="permdesc_control_incall_experience" msgid="5896723643771737534">"એપ્લિકેશનને કૉલમાં વપરાશકર્તા અનુભવ પ્રદાન કરવાની મંજૂરી આપે છે."</string>
     <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="permlab_manageNetworkPolicy" msgid="6872549423152175378">"નેટવર્ક નીતિ મેનેજ કરો"</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>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"અનલૉક કરવા માટે અથવા કટોકટીનો કૉલ કરવા માટે મેનૂ દબાવો."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"અનલૉક કરવા માટે મેનૂ દબાવો."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"અનલૉક કરવા માટે પૅટર્ન દોરો."</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"ઇમર્જન્સી"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"ઇમર્જન્સી કૉલ"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"કૉલ પર પાછા ફરો"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"સાચું!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"ફરી પ્રયાસ કરો"</string>
@@ -933,7 +933,7 @@
     <string name="double_tap_toast" msgid="7065519579174882778">"ટિપ: ઝૂમ વધારવા અને ઘટાડવા માટે બે વાર ટેપ કરો."</string>
     <string name="autofill_this_form" msgid="3187132440451621492">"સ્વતઃભરણ"</string>
     <string name="setup_autofill" msgid="5431369130866618567">"સ્વતઃભરણ સેટ કરો"</string>
-    <string name="autofill_window_title" msgid="4379134104008111961">"<xliff:g id="SERVICENAME">%1$s</xliff:g> સાથે આપમેળે ભરો"</string>
+    <string name="autofill_window_title" msgid="4379134104008111961">"<xliff:g id="SERVICENAME">%1$s</xliff:g> સાથે ઑટોમૅટિક રીતે ભરો"</string>
     <string name="autofill_address_name_separator" msgid="8190155636149596125">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3402882515222673691">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="760522655085707045">", "</string>
@@ -1426,8 +1426,8 @@
     <string name="notification_ranker_binding_label" msgid="432708245635563763">"સૂચના રેંકર સેવા"</string>
     <string name="vpn_title" msgid="5906991595291514182">"VPN સક્રિય કર્યું"</string>
     <string name="vpn_title_long" msgid="6834144390504619998">"<xliff:g id="APP">%s</xliff:g> દ્વારા VPN સક્રિય થયું"</string>
-    <string name="vpn_text" msgid="2275388920267251078">"નેટવર્કને સંચાલિત કરવા માટે ટૅપ કરો."</string>
-    <string name="vpn_text_long" msgid="278540576806169831">"<xliff:g id="SESSION">%s</xliff:g> થી કનેક્ટ થયાં. નેટવર્કને સંચાલિત કરવા માટે ટૅપ કરો."</string>
+    <string name="vpn_text" msgid="2275388920267251078">"નેટવર્કને મેનેજ કરવા માટે ટૅપ કરો."</string>
+    <string name="vpn_text_long" msgid="278540576806169831">"<xliff:g id="SESSION">%s</xliff:g> થી કનેક્ટ થયાં. નેટવર્કને મેનેજ કરવા માટે ટૅપ કરો."</string>
     <string name="vpn_lockdown_connecting" msgid="6096725311950342607">"હંમેશા-ચાલુ VPN કનેક્ટ થઈ રહ્યું છે…"</string>
     <string name="vpn_lockdown_connected" msgid="2853127976590658469">"હંમેશા-ચાલુ VPN કનેક્ટ થયું"</string>
     <string name="vpn_lockdown_disconnected" msgid="5573611651300764955">"હંમેશાં-ચાલુ VPN થી ડિસ્કનેક્ટ થયું"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"તમારા વ્યવસ્થાપક દ્વારા અપડેટ કરવામાં આવેલ છે"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"તમારા વ્યવસ્થાપક દ્વારા કાઢી નાખવામાં આવેલ છે"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ઓકે"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"બૅટરીની આવરદા વધારવા માટે, બૅટરી સેવર:\n\n•ઘેરી થીમ ચાલુ કરે છે\n•બૅકગ્રાઉન્ડ પ્રવૃત્તિ, અમુક વિઝ્યુઅલ ઇફેક્ટ અને “ઓકે Google” જેવી અન્ય સુવિધાઓ બંધ અથવા પ્રતિબંધિત કરે છે\n\n"<annotation id="url">"વધુ જાણો"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"બૅટરીની આવરદા વધારવા માટે, બૅટરી સેવર:\n\n•ઘેરી થીમ ચાલુ કરે છે\n•બૅકગ્રાઉન્ડ પ્રવૃત્તિ, અમુક વિઝ્યુઅલ ઇફેક્ટ અને “ઓકે Google” જેવી અન્ય સુવિધાઓ બંધ અથવા પ્રતિબંધિત કરે છે"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"બૅટરીની આવરદા વધારવા માટે, બૅટરી સેવર:\n\n• ઘેરી થીમ ચાલુ કરે છે\n• બૅકગ્રાઉન્ડ પ્રવૃત્તિ, અમુક વિઝ્યુઅલ ઇફેક્ટ અને “ઓકે Google” જેવી અન્ય સુવિધાઓ બંધ અથવા પ્રતિબંધિત કરે છે\n\n"<annotation id="url">"વધુ જાણો"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"બૅટરીની આવરદા વધારવા માટે, બૅટરી સેવર:\n\n• ઘેરી થીમ ચાલુ કરે છે\n• બૅકગ્રાઉન્ડ પ્રવૃત્તિ, અમુક વિઝ્યુઅલ ઇફેક્ટ અને “ઓકે Google” જેવી અન્ય સુવિધાઓ બંધ અથવા પ્રતિબંધિત કરે છે"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ડેટા વપરાશને ઘટાડવામાં સહાય માટે, ડેટા સેવર કેટલીક ઍપને બૅકગ્રાઉન્ડમાં ડેટા મોકલવા અથવા પ્રાપ્ત કરવાથી અટકાવે છે. તમે હાલમાં ઉપયોગ કરી રહ્યાં છો તે ઍપ ડેટાને ઍક્સેસ કરી શકે છે, પરંતુ તે આ ક્યારેક જ કરી શકે છે. આનો અર્થ એ હોઈ શકે છે, ઉદાહરણ તરીકે, છબીઓ ત્યાં સુધી પ્રદર્શિત થશે નહીં જ્યાં સુધી તમે તેને ટૅપ નહીં કરો."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ડેટા સેવર ચાલુ કરીએ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ચાલુ કરો"</string>
@@ -1904,7 +1904,7 @@
     <string name="pin_specific_target" msgid="7824671240625957415">"<xliff:g id="LABEL">%1$s</xliff:g>ને પિન કરો"</string>
     <string name="unpin_target" msgid="3963318576590204447">"અનપિન કરો"</string>
     <string name="unpin_specific_target" msgid="3859828252160908146">"<xliff:g id="LABEL">%1$s</xliff:g>ને અનપિન કરો"</string>
-    <string name="app_info" msgid="6113278084877079851">"ઍપ્લિકેશન માહિતી"</string>
+    <string name="app_info" msgid="6113278084877079851">"ઍપની માહિતી"</string>
     <string name="negative_duration" msgid="1938335096972945232">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
     <string name="demo_starting_message" msgid="6577581216125805905">"ડેમો પ્રારંભ કરી રહ્યાં છે…"</string>
     <string name="demo_restarting_message" msgid="1160053183701746766">"ઉપકરણ ફરીથી સેટ કરી રહ્યાં છે…"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 5ac5770..7d48ce0 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"लॉक खोलने के लिए मेन्यू दबाएं या आपातलकालीन कॉल करें."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"लॉक खोलने के लिए मेन्यू दबाएं."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"अनलॉक करने के लिए आकार आरेखित करें"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"आपातकाल"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"आपातकालीन कॉल"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"कॉल पर वापस लौटें"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"सही!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"फिर से कोशिश करें"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"आपके व्यवस्थापक ने अपडेट किया है"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"आपके व्यवस्थापक ने हटा दिया है"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ठीक है"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"बैटरी लाइफ़ बढ़ाने के लिए, बैटरी सेवर:\n\n•गहरे रंग वाली थीम चालू करता है\n•बैकग्राउंड की गतिविधि, कुछ विज़ुअल इफ़ेक्ट, और \"Hey Google\" जैसी दूसरी सुविधाएं इस्तेमाल करने से रोकता है या उन्हें बंद कर देता है\n\n"<annotation id="url">"ज़्यादा जानें"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"बैटरी लाइफ़ बढ़ाने के लिए, बैटरी सेवर:\n\n•गहरे रंग वाली थीम चालू करता है\n•बैकग्राउंड की गतिविधि, कुछ विज़ुअल इफ़ेक्ट, और \"Hey Google\" जैसी दूसरी सुविधाएं इस्तेमाल करने से रोकता है या उन्हें बंद कर देता है"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"बैटरी लाइफ़ बढ़ाने के लिए, बैटरी सेवर:\n\n• गहरे रंग वाली थीम चालू करता है\n• बैकग्राउंड की गतिविधि, कुछ विज़ुअल इफ़ेक्ट, और \"Hey Google\" जैसी दूसरी सुविधाएं इस्तेमाल करने से रोकता है या इन्हें बंद कर देता है\n\n"<annotation id="url">"ज़्यादा जानें"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"बैटरी लाइफ़ बढ़ाने के लिए, बैटरी सेवर:\n\n• गहरे रंग वाली थीम चालू करता है\n• बैकग्राउंड की गतिविधि, कुछ विज़ुअल इफ़ेक्ट, और \"Hey Google\" जैसी दूसरी सुविधाएं इस्तेमाल करने से रोकता है या इन्हें बंद कर देता है"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"डेटा खर्च को कम करने के लिए, डेटा बचाने की सेटिंग कुछ ऐप्लिकेशन को बैकग्राउंड में डेटा भेजने या डेटा पाने से रोकती है. फ़िलहाल, आप जिस ऐप्लिकेशन का इस्तेमाल कर रहे हैं वह डेटा ऐक्सेस कर सकता है, लेकिन ऐसा कभी-कभी ही हो पाएगा. उदाहरण के लिए, इमेज तब तक दिखाई नहीं देंगी जब तक कि आप उन पर टैप नहीं करते."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"डेटा बचाने की सेटिंग चालू करें?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"चालू करें"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 5076aa9..d0ad16e 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -832,7 +832,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Pritisnite Izbornik za otključavanje ili pozivanje hitnih službi."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Pritisnite Izbornik za otključavanje."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Iscrtajte uzorak za otključavanje"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Hitne službe"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Hitni poziv"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Uzvrati poziv"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Ispravno!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Pokušajte ponovo"</string>
@@ -1815,8 +1815,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Ažurirao administrator"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Izbrisao administrator"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"U redu"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Da bi se produljilo trajanje baterije, Štednja baterije:\n\n• Uključuje Tamnu temu.\n• Isključuje ili ograničava aktivnosti u pozadini, neke vizualne efekte i druge značajke kao što je \"Hey Google\".\n\n"<annotation id="url">"Saznajte više"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Da bi se produljilo trajanje baterije, Štednja baterije:\n\n• Uključuje Tamnu temu.\n• Isključuje ili ograničava aktivnosti u pozadini, neke vizualne efekte i druge značajke kao što je \"Hey Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Da bi se produljilo trajanje baterije, Štednja baterije:\n\n• Uključuje Tamnu temu.\n• Isključuje ili ograničava aktivnosti u pozadini, neke vizualne efekte i druge značajke kao što je \"Hey Google\".\n\n"<annotation id="url">"Saznajte više"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Da bi se produljilo trajanje baterije, Štednja baterije:\n\n• Uključuje Tamnu temu.\n• Isključuje ili ograničava aktivnosti u pozadini, neke vizualne efekte i druge značajke kao što je \"Hey Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Da bi se smanjio podatkovni promet, značajka Štednja podatkovnog prometa onemogućuje nekim aplikacijama slanje ili primanje podataka u pozadini. Aplikacija koju trenutačno upotrebljavate može pristupiti podacima, no možda će to činiti rjeđe. To može značiti da se, na primjer, slike neće prikazivati dok ih ne dodirnete."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Uključiti Štednju podatkovnog prometa?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Uključi"</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index a2b04e3..34e1db5 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"A feloldáshoz vagy segélyhívás kezdeményezéséhez nyomja meg a Menü gombot."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"A feloldáshoz nyomja meg a Menü gombot."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Rajzolja le a mintát a feloldáshoz"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Segélyhívás"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Segélyhívás"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Hívás folytatása"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Helyes!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Próbálja újra"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"A rendszergazda által frissítve"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"A rendszergazda által törölve"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Az Akkumulátorkímélő mód az akkumulátor üzemidejének növelése érdekében a következőket teszi:\n\n• Bekapcsolja a sötét témát.\n• Kikapcsolja vagy korlátozza a háttérben futó tevékenységeket, egyes vizuális effekteket, az „Ok Google” parancsot és egyéb funkciókat.\n\n"<annotation id="url">"További információ"</annotation>"."</string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Az Akkumulátorkímélő mód az akkumulátor üzemidejének növelése érdekében a következőket teszi:\n\n• Bekapcsolja a sötét témát.\n• Kikapcsolja vagy korlátozza a háttérben futó tevékenységeket, egyes vizuális effekteket, az „Ok Google” parancsot és egyéb funkciókat."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Az Akkumulátorkímélő mód az akkumulátor üzemidejének növelése érdekében a következőket teszi:\n\n• Bekapcsolja a sötét témát.\n• Kikapcsolja vagy korlátozza a háttérben futó tevékenységeket, egyes vizuális effekteket, az „Ok Google” parancsot és egyéb funkciókat.\n\n"<annotation id="url">"További információ"</annotation>"."</string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Az Akkumulátorkímélő mód az akkumulátor üzemidejének növelése érdekében a következőket teszi:\n\n• Bekapcsolja a sötét témát.\n• Kikapcsolja vagy korlátozza a háttérben futó tevékenységeket, egyes vizuális effekteket, az „Ok Google” parancsot és egyéb funkciókat."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Az adatforgalom csökkentése érdekében az Adatforgalom-csökkentő megakadályozza, hogy egyes alkalmazások adatokat küldjenek vagy fogadjanak a háttérben. Az Ön által jelenleg használt alkalmazások hozzáférhetnek az adatokhoz, de csak ritkábban. Ez például azt jelentheti, hogy a képek csak rákoppintás után jelennek meg."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Bekapcsolja az Adatforgalom-csökkentőt?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Bekapcsolás"</string>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index e94e658..da83ae5 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Ապակողպելու կամ շտապ կանչ անելու համար սեղմեք «Ընտրացանկ»"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Ապակողպելու համար սեղմեք Ցանկը:"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Հավաքեք սխեման` ապակողպելու համար"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Շտապ կանչ"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Շտապ կանչ"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Վերադառնալ զանգին"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Ճիշտ է:"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Կրկին փորձեք"</string>
@@ -1219,7 +1219,7 @@
     <string name="volume_music" msgid="7727274216734955095">"Մեդիա ձայնի բարձրություն"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"Նվագարկում է Bluetooth-ի միջոցով"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"Սահմանվել է անձայն զանգերանգ"</string>
-    <string name="volume_call" msgid="7625321655265747433">"Մուտքային զանգի ձայնի ուժգնությունը"</string>
+    <string name="volume_call" msgid="7625321655265747433">"Խոսակցություն"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"Bluetooth-ի ներզանգի բարձրություն"</string>
     <string name="volume_alarm" msgid="4486241060751798448">"Զարթուցիչի ձայնը"</string>
     <string name="volume_notification" msgid="6864412249031660057">"Ծանուցումների ձայնի ուժգնությունը"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Թարմացվել է ձեր ադմինիստրատորի կողմից"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Ջնջվել է ձեր ադմինիստրատորի կողմից"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Եղավ"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Մարտկոցի աշխատաժամանակը երկարացնելու համար «Մարտկոցի տնտեսում» գործառույթը.\n\n•Միացնում է մուգ թեման։\n•Անջատում կամ սահմանափակում է աշխատանքը ֆոնային ռեժիմում, որոշ վիզուալ էֆեկտներ և այլ գործառույթներ, օրինակ՝ «Ok Google» հրահանգը։\n\n"<annotation id="url">"Իմանալ ավելին"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Մարտկոցի աշխատաժամանակը երկարացնելու համար «Մարտկոցի տնտեսում» գործառույթը.\n\n•Միացնում է մուգ թեման։\n•Անջատում կամ սահմանափակում է աշխատանքը ֆոնային ռեժիմում, որոշ վիզուալ էֆեկտներ և այլ գործառույթներ, օրինակ՝ «Ok Google» հրահանգը:"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Մարտկոցի աշխատաժամանակը երկարացնելու համար «Մարտկոցի տնտեսում» գործառույթը՝\n\n• Միացնում է մուգ թեման։\n• Անջատում կամ սահմանափակում է աշխատանքը ֆոնային ռեժիմում, որոշ վիզուալ էֆեկտներ և այլ գործառույթներ, օրինակ՝ «Ok Google» հրահանգը։\n\n"<annotation id="url">"Իմանալ ավելին"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Մարտկոցի աշխատաժամանակը երկարացնելու համար «Մարտկոցի տնտեսում» գործառույթը՝\n\n• Միացնում է մուգ թեման։\n• Անջատում կամ սահմանափակում է աշխատանքը ֆոնային ռեժիմում, որոշ վիզուալ էֆեկտներ և այլ գործառույթներ, օրինակ՝ «Ok Google» հրահանգը։"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Թրաֆիկի տնտեսման ռեժիմում որոշ հավելվածների համար տվյալների ֆոնային փոխանցումն անջատված է։ Հավելվածը, որն օգտագործում եք, կարող է տվյալներ փոխանցել և ստանալ, սակայն ոչ այնքան հաճախ: Օրինակ՝ պատկերները կցուցադրվեն միայն դրանց վրա սեղմելուց հետո։"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Միացնե՞լ թրաֆիկի տնտեսումը"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Միացնել"</string>
@@ -1907,7 +1907,7 @@
     <string name="app_info" msgid="6113278084877079851">"Հավելվածի մասին"</string>
     <string name="negative_duration" msgid="1938335096972945232">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
     <string name="demo_starting_message" msgid="6577581216125805905">"Ցուցադրական օգտատերը գործարկվում է…"</string>
-    <string name="demo_restarting_message" msgid="1160053183701746766">"Սարաքը վերակայվում է…"</string>
+    <string name="demo_restarting_message" msgid="1160053183701746766">"Սարքը վերակայվում է…"</string>
     <string name="suspended_widget_accessibility" msgid="6331451091851326101">"Անջատած <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="conference_call" msgid="5731633152336490471">"Կոնֆերանս զանգ"</string>
     <string name="tooltip_popup_title" msgid="7863719020269945722">"Հուշակ"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index a368319..b72ffe2 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Tekan Menu untuk membuka atau melakukan panggilan darurat."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Tekan Menu untuk membuka."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Buat pola untuk membuka"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Darurat"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Panggilan darurat"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Kembali ke panggilan"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Perbaiki!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Coba lagi"</string>
@@ -1219,7 +1219,7 @@
     <string name="volume_music" msgid="7727274216734955095">"Volume media"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"Memutar melalui Bluetooth"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"Nada dering senyap disetel"</string>
-    <string name="volume_call" msgid="7625321655265747433">"Volume saat-memanggil"</string>
+    <string name="volume_call" msgid="7625321655265747433">"Volume dalam panggilan"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"Volume saat-memanggil bluetooth"</string>
     <string name="volume_alarm" msgid="4486241060751798448">"Volume alarm"</string>
     <string name="volume_notification" msgid="6864412249031660057">"Volume pemberitahuan"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Diupdate oleh admin Anda"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Dihapus oleh admin Anda"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Oke"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Untuk memperpanjang masa pakai baterai, Penghemat Baterai:\n\n•Mengaktifkan Tema gelap\n•Menonaktifkan atau membatasi aktivitas di latar belakang, beberapa efek visual, dan fitur lain seperti “Ok Google”\n\n"<annotation id="url">"Pelajari lebih lanjut"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Untuk memperpanjang masa pakai baterai, Penghemat Baterai:\n\n•Mengaktifkan Tema gelap\n•Menonaktifkan atau membatasi aktivitas di latar belakang, beberapa efek visual, dan fitur lain seperti “Ok Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Untuk memperpanjang masa pakai baterai, Penghemat Baterai akan:\n\n• Mengaktifkan Tema gelap\n• Menonaktifkan atau membatasi aktivitas di latar belakang, beberapa efek visual, dan fitur lain seperti “Ok Google”\n\n"<annotation id="url">"Pelajari lebih lanjut"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Untuk memperpanjang masa pakai baterai, Penghemat Baterai akan:\n\n• Mengaktifkan Tema gelap\n• Menonaktifkan atau membatasi aktivitas di latar belakang, beberapa efek visual, dan fitur lain seperti “Ok Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Untuk membantu mengurangi penggunaan data, Penghemat Data mencegah beberapa aplikasi mengirim atau menerima data di latar belakang. Aplikasi yang sedang digunakan dapat mengakses data, tetapi frekuensinya agak lebih jarang. Misalnya saja, gambar hanya akan ditampilkan setelah diketuk."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Aktifkan Penghemat Data?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Aktifkan"</string>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index e5e23f6..1ca4e61 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Ýttu á valmyndartakkann til að taka úr lás eða hringja neyðarsímtal."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Ýttu á valmyndartakkann til að taka úr lás."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Teiknaðu mynstur til að taka úr lás"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Neyðarsímtal"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Neyðarsímtal"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Aftur í símtal"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Rétt!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Reyndu aftur"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Kerfisstjóri uppfærði"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Kerfisstjóri eyddi"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Í lagi"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Til að auka rafhlöðuendingu gerir rafhlöðusparnaður eftirfarandi:\n\n•Kveikir á dökku þema\n•Slekkur á eða takmarkar bakgrunnsvirkni, tilteknar myndbrellur og aðra eiginleika eins og „Ok Google“\n\n"<annotation id="url">"Frekari upplýsingar"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Til að auka rafhlöðuendingu gerir rafhlöðusparnaður eftirfarandi:\n\n•Kveikir á dökku þema\n•Slekkur á eða takmarkar bakgrunnsvirkni, tilteknar myndbrellur og aðra eiginleika eins og „Ok Google“"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Til að auka rafhlöðuendingu gerir rafhlöðusparnaður eftirfarandi:\n\n•·Kveikir á dökku þema\n•·Slekkur á eða takmarkar bakgrunnsvirkni, tilteknar myndbrellur og aðra eiginleika eins og „Ok Google“\n\n"<annotation id="url">"Frekari upplýsingar"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Til að auka rafhlöðuendingu gerir rafhlöðusparnaður eftirfarandi:\n\n• Kveikir á dökku þema\n• Slekkur á eða takmarkar bakgrunnsvirkni, tilteknar myndbrellur og aðra eiginleika eins og „Ok Google“"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Gagnasparnaður getur hjálpað til við að draga úr gagnanotkun með því að hindra forrit í að senda eða sækja gögn í bakgrunni. Forrit sem er í notkun getur náð í gögn, en gerir það kannski sjaldnar. Niðurstaðan getur verið, svo dæmi sé tekið, að myndir eru ekki birtar fyrr en þú ýtir á þær."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Kveikja á gagnasparnaði?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Kveikja"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 78b23aa..95e1a48 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Premi Menu per sbloccare o effettuare chiamate di emergenza."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Premi Menu per sbloccare."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Traccia la sequenza di sblocco"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergenza"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Chiamata di emergenza"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Torna a chiamata"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Corretta."</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Riprova"</string>
@@ -1231,7 +1231,7 @@
     <string name="volume_icon_description_notification" msgid="579091344110747279">"Volume notifiche"</string>
     <string name="ringtone_default" msgid="9118299121288174597">"Suoneria predefinita"</string>
     <string name="ringtone_default_with_actual" msgid="2709686194556159773">"Predefinita (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
-    <string name="ringtone_silent" msgid="397111123930141876">"Nessuna"</string>
+    <string name="ringtone_silent" msgid="397111123930141876">"Nessuno"</string>
     <string name="ringtone_picker_title" msgid="667342618626068253">"Suonerie"</string>
     <string name="ringtone_picker_title_alarm" msgid="7438934548339024767">"Suoni delle sveglie"</string>
     <string name="ringtone_picker_title_notification" msgid="6387191794719608122">"Suoni di notifica"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Aggiornato dall\'amministratore"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Eliminato dall\'amministratore"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Per estendere la durata della batteria, la funzionalità di risparmio energetico:\n\n•Attiva il tema scuro\n•Disattiva o limita le attività in background, alcuni effetti visivi e altre funzionalità come \"Ok Google\"\n\n"<annotation id="url">"Ulteriori informazioni"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Per estendere la durata della batteria, la funzionalità di risparmio energetico:\n\n•Attiva il tema scuro\n•Disattiva o limita le attività in background, alcuni effetti visivi e altre funzionalità come \"Ok Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Per estendere la durata della batteria, la funzionalità di risparmio energetico:\n\n• Attiva il tema scuro\n• Disattiva o limita le attività in background, alcuni effetti visivi e altre funzionalità come \"Hey Google\"\n\n"<annotation id="url">"Scopri di più"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Per estendere la durata della batteria, la funzionalità di risparmio energetico:\n\n• Attiva il tema scuro\n• Disattiva o limita le attività in background, alcuni effetti visivi e altre funzionalità come \"Hey Google\""</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Per contribuire a ridurre l\'utilizzo dei dati, la funzione Risparmio dati impedisce ad alcune app di inviare o ricevere dati in background. Un\'app in uso può accedere ai dati, ma potrebbe farlo con meno frequenza. Esempio: le immagini non vengono visualizzate finché non le tocchi."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Attivare Risparmio dati?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Attiva"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 519ca02..1389753 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"לחץ על \'תפריט\' כדי לבטל את הנעילה או כדי לבצע שיחת חירום."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"לחץ על \'תפריט\' כדי לבטל את הנעילה."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"שרטט קו לביטול נעילת המסך"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"חירום"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"שיחת חירום"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"חזרה לשיחה"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"נכון!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"כדאי לנסות שוב"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"עודכנה על ידי מנהל המערכת"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"נמחקה על ידי מנהל המערכת"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"אישור"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"‏כדי להאריך את חיי הסוללה, התכונה \'חיסכון בסוללה\':\n\n•מפעילה עיצוב כהה\n•מכבה או מגבילה פעילות ברקע, חלק מהאפקטים החזותיים ותכונות אחרות כמו Ok Google\n\n"<annotation id="url">"מידע נוסף"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"‏כדי להאריך את חיי הסוללה, התכונה \'חיסכון בסוללה\':\n\n•מפעילה עיצוב כהה\n•מכבה או מגבילה פעילות ברקע, חלק מהאפקטים החזותיים ותכונות אחרות כמו Ok Google"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"‏כדי להאריך את חיי הסוללה, התכונה \'חיסכון בסוללה\':\n\n• מפעילה עיצוב כהה\n• מכבה או מגבילה פעילות ברקע, חלק מהאפקטים החזותיים ותכונות אחרות כמו Ok Google\n\n"<annotation id="url">"למידע נוסף"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"‏כדי להאריך את חיי הסוללה, התכונה \'חיסכון בסוללה\':\n\n• מפעילה עיצוב כהה\n• מכבה או מגבילה פעילות ברקע, חלק מהאפקטים החזותיים ותכונות אחרות כמו Ok Google"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"‏כדי לסייע בהפחתת השימוש בנתונים, חוסך הנתונים (Data Saver) מונע מאפליקציות מסוימות שליחה או קבלה של נתונים ברקע. אפליקציה שבה נעשה שימוש כרגע יכולה לגשת לנתונים, אבל בתדירות נמוכה יותר. המשמעות היא, למשל, שתמונות יוצגו רק לאחר שמקישים עליהן."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"להפעיל את חוסך הנתונים?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"הפעל"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 1604bea..44c901c 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"MENUキーでロック解除(または緊急通報)"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"MENUキーでロック解除"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"パターンを入力"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"緊急通報"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"緊急通報"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"通話に戻る"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"一致しました"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"もう一度お試しください"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"管理者により更新されています"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"管理者により削除されています"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"電池を長持ちさせるためにバッテリー セーバーが行う操作:\n\n•ダークテーマをオンにする\n•バックグラウンド アクティビティ、一部の視覚効果や、「OK Google」などの機能をオフにする、または制限する\n\n"<annotation id="url">"詳細"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"電池を長持ちさせるためにバッテリー セーバーが行う操作:\n\n•ダークテーマをオンにする\n•バックグラウンド アクティビティ、一部の視覚効果や、「OK Google」などの機能をオフにする、または制限する"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"電池を長持ちさせるためにバッテリー セーバーが行う操作:\n\n• ダークテーマを ON にする\n• バックグラウンド アクティビティ、一部の視覚効果や、「OK Google」などの機能を OFF にする、または制限する\n\n"<annotation id="url">"詳細"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"電池を長持ちさせるためにバッテリー セーバーが行う操作:\n\n• ダークテーマを ON にする\n• バックグラウンド アクティビティ、一部の視覚効果や、「OK Google」などの機能を OFF にする、または制限する"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"データセーバーは、一部のアプリによるバックグラウンドでのデータ送受信を停止することでデータ使用量を抑制します。使用中のアプリからデータを送受信することはできますが、その頻度は低くなる場合があります。この影響として、たとえば画像はタップしないと表示されないようになります。"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"データセーバーを ON にしますか?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ON にする"</string>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index 3d447fc..7365b05 100644
--- a/core/res/res/values-ka/strings.xml
+++ b/core/res/res/values-ka/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"განბლოკვისთვის ან გადაუდებელი ზარისთვის დააჭირეთ მენიუს."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"განბლოკვისთვის დააჭირეთ მენიუს."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"განსაბლოკად დახატეთ ნიმუში"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"საგანგებო სამსახურები"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"გადაუდებელი ზარი"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"ზარზე დაბრუნება"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"სწორია!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"კიდევ სცადეთ"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"განახლებულია თქვენი ადმინისტრატორის მიერ"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"წაიშალა თქვენი ადმინისტრატორის მიერ"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"კარგი"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ბატარეის მუშაობის გახანგრძლივების მიზნით, ბატარეის დამზოგველი:\n\n•ჩართავს ბნელ თემას\n•გამორთავს ან ზღუდავს ფონურ აქტივობას, გარკვეულ ვიზუალურ ეფექტებს და სხვა ფუნქციებს, მაგალითად, „Hey Google“\n\n"<annotation id="url">"შეიტყვეთ მეტი"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ბატარეის მუშაობის გახანგრძლივების მიზნით, ბატარეის დამზოგველი:\n\n•ჩართავს ბნელ თემას\n•გამორთავს ან ზღუდავს ფონურ აქტივობას, გარკვეულ ვიზუალურ ეფექტებს და სხვა ფუნქციებს, მაგალითად, „Hey Google“"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ბატარეის მუშაობის გახანგრძლივების მიზნით, ბატარეის დამზოგველი:\n\n• ჩართავს ბნელ თემას\n• გამორთავს ან ზღუდავს ფონურ აქტივობას, გარკვეულ ვიზუალურ ეფექტებს და სხვა ფუნქციებს, მაგალითად, „Hey Google“\n\n"<annotation id="url">"შეიტყვეთ მეტი"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ბატარეის მუშაობის გახანგრძლივების მიზნით, ბატარეის დამზოგი:\n\n• ჩართავს ბნელ თემას\n• გამორთავს ან შეზღუდავს ფონურ აქტივობას, გარკვეულ ვიზუალურ ეფექტებს და სხვა ფუნქციებს, მაგალითად, „Hey Google“"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"მობილური ინტერნეტის მოხმარების შემცირების მიზნით, მონაცემთა დამზოგველი ზოგიერთ აპს ფონურ რეჟიმში მონაცემთა გაგზავნასა და მიღებას შეუზღუდავს. თქვენ მიერ ამჟამად გამოყენებული აპი მაინც შეძლებს მობილურ ინტერნეტზე წვდომას, თუმცა ამას ნაკლები სიხშირით განახორციელებს. ეს ნიშნავს, რომ, მაგალითად, სურათები არ გამოჩნდება მანამ, სანამ მათ საგანგებოდ არ შეეხებით."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ჩაირთოს მონაცემთა დამზოგველი?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ჩართვა"</string>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index aa60234..04020fb 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -61,7 +61,7 @@
     <string name="ColpMmi" msgid="4736462893284419302">"Қосылған желі идентификаторы"</string>
     <string name="ColrMmi" msgid="5889782479745764278">"Қосылған желі идентификаторын шектеу"</string>
     <string name="CfMmi" msgid="8390012691099787178">"Қоңырауды басқа нөмірге бағыттау"</string>
-    <string name="CwMmi" msgid="3164609577675404761">"Күтудегі қоңырау"</string>
+    <string name="CwMmi" msgid="3164609577675404761">"Қоңырауды ұстап тұру"</string>
     <string name="BaMmi" msgid="7205614070543372167">"Қоңырауды бөгеу"</string>
     <string name="PwdMmi" msgid="3360991257288638281">"Құпия сөз өзгерту"</string>
     <string name="PinMmi" msgid="7133542099618330959">"PIN өзгерту"</string>
@@ -317,7 +317,7 @@
     <string name="permgroupdesc_sensors" msgid="2610631290633747752">"ағза күйінің көрсеткіштері туралы сенсор деректеріне қатынасу"</string>
     <string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"Терезе мазмұнын оқып отыру"</string>
     <string name="capability_desc_canRetrieveWindowContent" msgid="6195610527625237661">"Ашық тұрған терезе мазмұнын тексеру."</string>
-    <string name="capability_title_canRequestTouchExploration" msgid="327598364696316213">"Explore by Touch функциясын қосу"</string>
+    <string name="capability_title_canRequestTouchExploration" msgid="327598364696316213">"Түртілген элементтерді дыбыстау функциясын қосу"</string>
     <string name="capability_desc_canRequestTouchExploration" msgid="4394677060796752976">"Түртілген элементтер дауыстап айтылады және экранды қимылдар арқылы зерттеуге болады."</string>
     <string name="capability_title_canRequestFilterKeyEvents" msgid="2772371671541753254">"Терілген мәтінді тексеру"</string>
     <string name="capability_desc_canRequestFilterKeyEvents" msgid="2381315802405773092">"Несиелік карта нөмірі және құпия сөздер сияқты жеке деректі қоса."</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Бекітпесін ашу үшін немесе төтенше қоңырауды табу үшін Мәзір тармағын басыңыз."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Ашу үшін Мәзір пернесін басыңыз."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Бекітпесін ашу үшін кескінді сызыңыз"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Төтенше жағдай"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Құтқару қызметіне қоңырау шалу"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Қоңырауға оралу"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Дұрыс!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Қайталап көріңіз"</string>
@@ -987,9 +987,9 @@
     <string name="searchview_description_clear" msgid="1989371719192982900">"Сұрақты өшіру"</string>
     <string name="searchview_description_submit" msgid="6771060386117334686">"Сұрақ жіберу"</string>
     <string name="searchview_description_voice" msgid="42360159504884679">"Дауыс арқылы іздеу"</string>
-    <string name="enable_explore_by_touch_warning_title" msgid="5095399706284943314">"Explore by Touch функциясы қосылсын ба?"</string>
-    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="1037295476738940824">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> қызметі Explore by Touch мүмкіндігін қосқысы келеді. Explore by Touch мүмкіндігі қосылған кезде, саусағыңыздың астындағы нәрсенің сипаттамаларын естисіз не көресіз немесе планшетпен өзара байланысу үшін қимылдайсыз."</string>
-    <string name="enable_explore_by_touch_warning_message" product="default" msgid="4312979647356179250">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> қызметі Explore by Touch мүмкіндігін қосқысы келеді. Explore by Touch мүмкіндігі қосылған кезде, саусағыңыздың астындағы нәрсенің сипаттамаларын естисіз не көресіз немесе телефонмен өзара байланысу үшін қимылдайсыз."</string>
+    <string name="enable_explore_by_touch_warning_title" msgid="5095399706284943314">"Түртілген элементтерді дыбыстау функциясы қосылсын ба?"</string>
+    <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="1037295476738940824">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> қызметі Түртілген элементтерді дыбыстау функциясын қосуға рұқсат сұрап тұр. Ол қосылған кезде, саусағыңыздың астындағы элементтің сипаттамасын естіп не көріп тұрасыз немесе планшетті қимылмен басқарасыз."</string>
+    <string name="enable_explore_by_touch_warning_message" product="default" msgid="4312979647356179250">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> қызметі Түртілген элементтерді дыбыстау функциясын қосуға рұқсат сұрап тұр. Ол қосылған кезде, саусағыңыздың астындағы элементтің сипаттамасын естіп не көріп тұрасыз немесе телефонды қимылмен басқарасыз."</string>
     <string name="oneMonthDurationPast" msgid="4538030857114635777">"1 ай бұрын"</string>
     <string name="beforeOneMonthDurationPast" msgid="8315149541372065392">"Осыған дейін 1 ай бұрын"</string>
     <plurals name="last_num_days" formatted="false" msgid="687443109145393632">
@@ -1219,9 +1219,9 @@
     <string name="volume_music" msgid="7727274216734955095">"Mультимeдиа дыбыс деңгейі"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"Bluetooth арқылы ойнату"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"Үнсіз қоңырау әуенін орнату"</string>
-    <string name="volume_call" msgid="7625321655265747433">"Келетін қоңырау дыбысының қаттылығы"</string>
+    <string name="volume_call" msgid="7625321655265747433">"Сөйлесу кезіндегі дыбыс деңгейі"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"Bluetooth қоңырауының қаттылығы"</string>
-    <string name="volume_alarm" msgid="4486241060751798448">"Дабыл дыбысының қаттылығы"</string>
+    <string name="volume_alarm" msgid="4486241060751798448">"Дабыл дыбысының деңгейі"</string>
     <string name="volume_notification" msgid="6864412249031660057">"Хабар дыбысының қаттылығы"</string>
     <string name="volume_unknown" msgid="4041914008166576293">"Дыбыс қаттылығы"</string>
     <string name="volume_icon_description_bluetooth" msgid="7540388479345558400">"Bluetooth дыбысының қаттылығы"</string>
@@ -1307,7 +1307,7 @@
     <string name="usb_unsupported_audio_accessory_title" msgid="2335775548086533065">"Аналогтық аудиожабдық анықталды"</string>
     <string name="usb_unsupported_audio_accessory_message" msgid="1300168007129796621">"Жалғанған құрылғы бұл телефонмен үйлесімсіз. Қосымша ақпарат алу үшін түртіңіз."</string>
     <string name="adb_active_notification_title" msgid="408390247354560331">"USB арқылы түзету қосылған"</string>
-    <string name="adb_active_notification_message" msgid="5617264033476778211">"USB арқылы түзетуді өшіру үшін түртіңіз"</string>
+    <string name="adb_active_notification_message" msgid="5617264033476778211">"USB арқылы түзетуді өшіру үшін түртіңіз."</string>
     <string name="adb_active_notification_message" product="tv" msgid="6624498401272780855">"USB арқылы түзетуді өшіру үшін таңдаңыз."</string>
     <string name="adbwifi_active_notification_title" msgid="6147343659168302473">"Сымсыз түзету байланыстырылды"</string>
     <string name="adbwifi_active_notification_message" msgid="930987922852867972">"Сымсыз түзетуді өшіру үшін түртіңіз."</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Әкімші жаңартқан"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Әкімші жойған"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Жарайды"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Батарея жұмысының ұзақтығын арттыру үшін Батареяны үнемдеу режимі:\n\n•қараңғы тақырыпты іске қосады;\n•фондық әрекеттерді, кейбір көрнекі әсерлерді және \"Ok Google\" сияқты басқа да функцияларды өшіреді немесе шектейді.\n\n"<annotation id="url">"Толығырақ"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Батарея жұмысының ұзақтығын арттыру үшін Батареяны үнемдеу режимі:\n\n•қараңғы тақырыпты іске қосады;\n•фондық әрекеттерді, кейбір көрнекі әсерлерді және \"Ok Google\" сияқты басқа да функцияларды өшіреді немесе шектейді."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Батарея жұмысының ұзақтығын арттыру үшін Батареяны үнемдеу режимі:\n\n•қараңғы тақырыпты іске қосады;\n•фондық әрекеттерді, кейбір көрнекі әсерлерді және \"Ok Google\" сияқты басқа да функцияларды өшіреді не шектейді.\n\n"<annotation id="url">"Толығырақ"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Батарея ұзағырақ жұмыс істеуі үшін, Battery Saver:\n\n• қараңғы тақырыпты қосады;\n•фондық жұмысты, кейбір визуалды әсерлерді және \"Ok Google\" сияқты басқа функцияларды өшіреді не шектейді."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Дерек шығынын азайту үшін Data Saver функциясы кейбір қолданбаларға деректерді фондық режимде жіберуге және алуға жол бермейді. Ашық тұрған қолданба деректерді пайдаланады, бірақ шектеулі шамада (мысалы, кескіндер оларды түрткенге дейін көрсетілмейді)."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Data Saver функциясын қосу керек пе?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Қосу"</string>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index af1db0b..43f0a1c 100644
--- a/core/res/res/values-km/strings.xml
+++ b/core/res/res/values-km/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"ចុច​ម៉ឺនុយ ដើម្បី​ដោះ​សោ​ ឬ​ហៅ​ពេល​អាសន្ន។"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"ចុច​ម៉ឺនុយ ដើម្បី​ដោះ​សោ។"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"គូរ​លំនាំ ដើម្បី​ដោះ​សោ"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"បន្ទាន់"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"ហៅទៅលេខសង្គ្រោះបន្ទាន់"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"ត្រឡប់​ទៅ​ការ​ហៅ"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"ត្រឹមត្រូវ!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"ព្យាយាម​ម្ដង​ទៀត"</string>
@@ -1219,8 +1219,8 @@
     <string name="volume_music" msgid="7727274216734955095">"កម្រិត​សំឡេង​មេឌៀ"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"ចាក់​តាម​ប៊្លូធូស"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"កំណត់​សំឡេង​រោទ៍​ស្ងាត់"</string>
-    <string name="volume_call" msgid="7625321655265747433">"កម្រិត​សំឡេង​ហៅ​ចូល"</string>
-    <string name="volume_bluetooth_call" msgid="2930204618610115061">"កម្រិត​សំឡេង​ហៅ​ចូល​តាម​ប៊្លូធូស"</string>
+    <string name="volume_call" msgid="7625321655265747433">"កម្រិត​សំឡេង​ក្នុងពេលនិយាយទូរសព្ទ"</string>
+    <string name="volume_bluetooth_call" msgid="2930204618610115061">"កម្រិត​សំឡេង​ក្នុងពេលនិយាយទូរសព្ទ​តាម​ប៊្លូធូស"</string>
     <string name="volume_alarm" msgid="4486241060751798448">"កម្រិត​សំឡេងម៉ោងរោទ៍"</string>
     <string name="volume_notification" msgid="6864412249031660057">"កម្រិត​សំឡេង​ការ​ជូន​ដំណឹង"</string>
     <string name="volume_unknown" msgid="4041914008166576293">"កម្រិត​សំឡេង"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"ធ្វើ​បច្ចុប្បន្នភាព​ដោយ​អ្នកគ្រប់គ្រង​របស់​អ្នក"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"លុប​ដោយ​អ្នកគ្រប់គ្រង​របស់​អ្នក"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"យល់ព្រម"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ដើម្បី​បង្កើនកម្រិត​ថាមពលថ្ម កម្មវិធី​សន្សំថ្ម៖\n\n•បើករចនាប័ទ្មងងឹត\n•បិទ ឬដាក់កំហិតលើ​សកម្មភាពផ្ទៃខាងក្រោយ ឥទ្ធិពល​ជារូបភាពមួយចំនួន និងមុខងារផ្សេងទៀត​ដូចជា “Ok Google” ជាដើម\n\n"<annotation id="url">"ស្វែងយល់​បន្ថែម"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ដើម្បី​បង្កើនកម្រិត​ថាមពលថ្ម កម្មវិធី​សន្សំថ្ម៖\n\n•បើករចនាប័ទ្មងងឹត\n•បិទ ឬដាក់កំហិតលើ​សកម្មភាពផ្ទៃខាងក្រោយ ឥទ្ធិពល​ជារូបភាពមួយចំនួន និងមុខងារផ្សេងទៀត​ដូចជា “Ok Google” ជាដើម"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ដើម្បី​បង្កើនកម្រិត​ថាមពលថ្ម មុខងារ​សន្សំ​ថ្ម៖\n\n• បើករចនាប័ទ្មងងឹត\n• បិទ ឬដាក់កំហិតលើ​សកម្មភាពផ្ទៃខាងក្រោយ ឥទ្ធិពល​ជារូបភាពមួយចំនួន និងមុខងារផ្សេងទៀត​ដូចជា “Hey Google” ជាដើម\n\n"<annotation id="url">"ស្វែងយល់​បន្ថែម"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ដើម្បី​បង្កើនកម្រិត​ថាមពលថ្ម មុខងារ​សន្សំថ្ម៖\n\n• បើករចនាប័ទ្មងងឹត\n• បិទ ឬដាក់កំហិតលើ​សកម្មភាពផ្ទៃខាងក្រោយ ឥទ្ធិពលរូបភាពមួយចំនួន និងមុខងារផ្សេងទៀត​ដូចជា “Ok Google” ជាដើម"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ដើម្បីជួយកាត់បន្ថយការប្រើប្រាស់ទិន្នន័យ កម្មវិធីសន្សំសំចៃទិន្នន័យរារាំងកម្មវិធីមួយចំនួនមិនឲ្យបញ្ជូន ឬទទួលទិន្នន័យនៅផ្ទៃខាងក្រោយទេ។ កម្មវិធីដែលអ្នកកំពុងប្រើនាពេលបច្ចុប្បន្នអាចចូលប្រើប្រាស់​ទិន្នន័យបាន ប៉ុន្តែអាចនឹងមិនញឹកញាប់ដូចមុនទេ។ ឧទាហរណ៍ រូបភាពមិនបង្ហាញទេ លុះត្រាតែអ្នកប៉ះរូបភាពទាំងនោះ។"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"បើកកម្មវិធីសន្សំសំចៃទិន្នន័យ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"បើក"</string>
@@ -1999,9 +1999,9 @@
     <string name="notification_appops_overlay_active" msgid="5571732753262836481">"កំពុងបង្ហាញ​ពីលើកម្មវិធីផ្សេងទៀត​នៅលើអេក្រង់​របស់អ្នក"</string>
     <string name="dynamic_mode_notification_channel_name" msgid="2986926422100223328">"ការ​ជូនដំណឹង​ព័ត៌មាន​របស់​មុខងារ​ទម្លាប់"</string>
     <string name="dynamic_mode_notification_title" msgid="9205715501274608016">"ថ្ម​អាច​នឹង​អស់ មុនពេល​សាកថ្មធម្មតា"</string>
-    <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"បាន​បើក​ដំណើរការកម្មវិធី​សន្សំ​ថ្ម ដើម្បីបង្កើនកម្រិត​ថាមពល​​ថ្ម"</string>
+    <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"បាន​បើក​ដំណើរការមុខងារ​សន្សំ​ថ្ម ដើម្បីបង្កើនកម្រិត​ថាមពល​​ថ្ម"</string>
     <string name="battery_saver_notification_channel_name" msgid="3918243458067916913">"មុខងារ​សន្សំ​ថ្ម"</string>
-    <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"កម្មវិធី​សន្សំ​ថ្ម​ត្រូវបានបិទ"</string>
+    <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"មុខងារ​សន្សំ​ថ្ម​ត្រូវបានបិទ"</string>
     <string name="battery_saver_charged_notification_summary" product="default" msgid="5544457317418624367">"ទូរសព្ទ​មាន​កម្រិតថ្ម​គ្រប់គ្រាន់​។ មុខងារ​ផ្សេងៗ​មិន​ត្រូវបាន​រឹតបន្តឹងទៀត​ទេ។"</string>
     <string name="battery_saver_charged_notification_summary" product="tablet" msgid="4426317048139996888">"ថេប្លេត​មាន​កម្រិតថ្ម​គ្រប់គ្រាន់​។ មុខងារ​ផ្សេងៗ​មិន​ត្រូវបាន​រឹតបន្តឹងទៀត​ទេ។"</string>
     <string name="battery_saver_charged_notification_summary" product="device" msgid="1031562417867646649">"ឧបករណ៍​មាន​កម្រិតថ្ម​គ្រប់គ្រាន់​។ មុខងារ​ផ្សេងៗ​មិន​ត្រូវបាន​រឹតបន្តឹងទៀត​ទេ។"</string>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 22dc3f1..9b22688 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"ಅನ್‌ಲಾಕ್ ಮಾಡಲು ಮೆನು ಒತ್ತಿರಿ ಇಲ್ಲವೇ ತುರ್ತು ಕರೆಯನ್ನು ಮಾಡಿ."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"ಅನ್‌ಲಾಕ್ ಮಾಡಲು ಮೆನು ಒತ್ತಿರಿ."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"ಅನ್‌ಲಾಕ್ ಮಾಡಲು ಪ್ಯಾಟರ್ನ್ ಚಿತ್ರಿಸಿ"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"ತುರ್ತು"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"ತುರ್ತು ಕರೆ"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"ಕರೆಗೆ ಹಿಂತಿರುಗು"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"ಸರಿಯಾಗಿದೆ!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ"</string>
@@ -1221,7 +1221,7 @@
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"ಶಾಂತ ರಿಂಗ್‌ಟೋನ್ ಹೊಂದಿಸಲಾಗಿದೆ"</string>
     <string name="volume_call" msgid="7625321655265747433">"ಒಳ-ಕರೆಯ ವಾಲ್ಯೂಮ್"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"ಬ್ಲೂಟೂತ್‌‌ ಒಳ-ಕರೆಯ ವಾಲ್ಯೂಮ್"</string>
-    <string name="volume_alarm" msgid="4486241060751798448">"ಅಲಾರಮ್ ವಾಲ್ಯೂಮ್"</string>
+    <string name="volume_alarm" msgid="4486241060751798448">"ಅಲಾರಂ ವಾಲ್ಯೂಮ್"</string>
     <string name="volume_notification" msgid="6864412249031660057">"ಅಧಿಸೂಚನೆಯ ವಾಲ್ಯೂಮ್"</string>
     <string name="volume_unknown" msgid="4041914008166576293">"ವಾಲ್ಯೂಮ್"</string>
     <string name="volume_icon_description_bluetooth" msgid="7540388479345558400">"ಬ್ಲೂಟೂತ್‌‌ ವಾಲ್ಯೂಮ್"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"ನಿಮ್ಮ ನಿರ್ವಾಹಕರಿಂದ ಅಪ್‌ಡೇಟ್ ಮಾಡಲ್ಪಟ್ಟಿದೆ"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"ನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಅಳಿಸಿದ್ದಾರೆ"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ಸರಿ"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ಬ್ಯಾಟರಿ ಬಾಳಿಕೆಯನ್ನು ವಿಸ್ತರಿಸಲು, ಬ್ಯಾಟರಿ ಸೇವರ್:\n\n•ಡಾರ್ಕ್ ಥೀಮ್ ಅನ್ನು ಆನ್ ಮಾಡುತ್ತದೆ\n•ಹಿನ್ನೆಲೆ ಚಟುವಟಿಕೆ, ಕೆಲವು ದೃಶ್ಯಾತ್ಮಕ ಎಫೆಕ್ಟ್‌ಗಳು ಮತ್ತು “ಹೇ Google” ನಂತಹ ಇತರ ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆಫ್ ಮಾಡುತ್ತದೆ ಅಥವಾ ನಿರ್ಬಂಧಿಸುತ್ತದೆ\n\n"<annotation id="url">"ಇನ್ನಷ್ಟು ತಿಳಿಯಿರಿ"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ಬ್ಯಾಟರಿ ಬಾಳಿಕೆಯನ್ನು ವಿಸ್ತರಿಸಲು, ಬ್ಯಾಟರಿ ಸೇವರ್:\n\n•ಡಾರ್ಕ್ ಥೀಮ್ ಅನ್ನು ಆನ್ ಮಾಡುತ್ತದೆ\n•ಹಿನ್ನೆಲೆ ಚಟುವಟಿಕೆ, ಕೆಲವು ವಿಷುವಲ್ ಎಫೆಕ್ಟ್‌ಗಳು ಮತ್ತು “ಹೇ Google” ನಂತಹ ಇತರ ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆಫ್ ಮಾಡುತ್ತದೆ ಅಥವಾ ನಿರ್ಬಂಧಿಸುತ್ತದೆ"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ಬ್ಯಾಟರಿ ಬಾಳಿಕೆಯನ್ನು ವಿಸ್ತರಿಸಲು, ಬ್ಯಾಟರಿ ಸೇವರ್:\n\n• ಡಾರ್ಕ್ ಥೀಮ್ ಅನ್ನು ಆನ್ ಮಾಡುತ್ತದೆ\n•ಹಿನ್ನೆಲೆ ಚಟುವಟಿಕೆ, ಕೆಲವು ದೃಶ್ಯಾತ್ಮಕ ಎಫೆಕ್ಟ್‌ಗಳು ಮತ್ತು “ಹೇ Google” ನಂತಹ ಇತರ ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆಫ್ ಮಾಡುತ್ತದೆ ಅಥವಾ ನಿರ್ಬಂಧಿಸುತ್ತದೆ\n\n"<annotation id="url">"ಇನ್ನಷ್ಟು ತಿಳಿಯಿರಿ"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ಬ್ಯಾಟರಿ ಬಾಳಿಕೆಯನ್ನು ವಿಸ್ತರಿಸಲು, ಬ್ಯಾಟರಿ ಸೇವರ್:\n\n• ಡಾರ್ಕ್ ಥೀಮ್ ಅನ್ನು ಆನ್ ಮಾಡುತ್ತದೆ\n• ಹಿನ್ನೆಲೆ ಚಟುವಟಿಕೆ, ಕೆಲವು ವಿಷುವಲ್ ಎಫೆಕ್ಟ್‌ಗಳು ಮತ್ತು “Ok Google” ನಂತಹ ಇತರ ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆಫ್ ಮಾಡುತ್ತದೆ ಅಥವಾ ನಿರ್ಬಂಧಿಸುತ್ತದೆ"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ಡೇಟಾ ಬಳಕೆ ಕಡಿಮೆ ಮಾಡುವ ನಿಟ್ಟಿನಲ್ಲಿ, ಡೇಟಾ ಸೇವರ್ ಕೆಲವು ಅಪ್ಲಿಕೇಶನ್‌ಗಳು ಹಿನ್ನೆಲೆಯಲ್ಲಿ ಡೇಟಾ ಕಳುಹಿಸುವುದನ್ನು ಅಥವಾ ಸ್ವೀಕರಿಸುವುದನ್ನು ತಡೆಯುತ್ತದೆ. ನೀವು ಪ್ರಸ್ತುತ ಬಳಸುತ್ತಿರುವ ಅಪ್ಲಿಕೇಶನ್ ಡೇಟಾವನ್ನು ಪ್ರವೇಶಿಸಬಹುದು ಆದರೆ ಪದೇ ಪದೇ ಪ್ರವೇಶಿಸಲು ಸಾಧ್ಯವಾಗುವುದಿಲ್ಲ. ಇದರರ್ಥ, ಉದಾಹರಣೆಗೆ, ನೀವು ಅವುಗಳನ್ನು ಟ್ಯಾಪ್ ಮಾಡುವವರೆಗೆ ಆ ಚಿತ್ರಗಳು ಕಾಣಿಸಿಕೊಳ್ಳುವುದಿಲ್ಲ."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ಡೇಟಾ ಸೇವರ್ ಆನ್ ಮಾಡಬೇಕೇ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ಆನ್‌ ಮಾಡಿ"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 63c3a37..636de4e1 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"비상 전화를 걸거나 잠금해제하려면 메뉴를 누르세요."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"잠금해제하려면 메뉴를 누르세요."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"잠금해제를 위해 패턴 그리기"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"긴급 전화"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"긴급 전화"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"통화로 돌아가기"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"맞습니다."</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"다시 시도"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"관리자에 의해 업데이트되었습니다."</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"관리자에 의해 삭제되었습니다."</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"확인"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"배터리 수명을 늘리기 위해 절전 모드가 다음과 같이 작동합니다.\n\n•어두운 테마를 사용 설정합니다.\n•백그라운드 활동, 일부 시각 효과 및 \'Hey Google\'과 같은 기타 기능을 사용 중지하거나 제한합니다.\n\n"<annotation id="url">"자세히 알아보기"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"배터리 수명을 늘리기 위해 절전 모드가 다음과 같이 작동합니다.\n\n•어두운 테마를 사용 설정합니다.\n•백그라운드 활동, 일부 시각 효과 및 \'Hey Google\'과 같은 기타 기능을 사용 중지하거나 제한합니다."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"배터리 수명을 늘리기 위해 절전 모드가 다음과 같이 작동합니다.\n\n• 어두운 테마를 사용 설정합니다.\n• 백그라운드 활동, 일부 시각 효과 및 \'Hey Google\'과 같은 기타 기능을 사용 중지하거나 제한합니다.\n\n"<annotation id="url">"자세히 알아보기"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"배터리 수명을 연장하기 위해 절전 모드가 다음과 같이 작동합니다.\n\n• 어두운 테마를 사용 설정합니다.\n• 백그라운드 활동, 일부 시각 효과 및 \'Hey Google\' 등의 기타 기능을 사용 중지하거나 제한합니다."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"데이터 사용량을 줄이기 위해 데이터 절약 모드는 일부 앱이 백그라운드에서 데이터를 전송하거나 수신하지 못하도록 합니다. 현재 사용 중인 앱에서 데이터에 액세스할 수 있지만 빈도가 줄어듭니다. 예를 들면, 이미지를 탭하기 전에는 이미지가 표시되지 않습니다."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"데이터 절약 모드를 사용 설정하시겠습니까?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"사용 설정"</string>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 2350ec82..d9ea686 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Кулпусун ачып же Шашылыш чалуу аткаруу үчүн менюну басыңыз."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Бөгөттөн чыгаруу үчүн Менюну басыңыз."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Кулпуну ачуу үчүн, үлгүнү тартыңыз"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Шашылыш чалуу"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Шашылыш чалуу"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Чалууга кайтуу"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Туура!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Дагы аракет кылыңыз"</string>
@@ -857,12 +857,12 @@
     <string name="lockscreen_sim_puk_locked_instructions" msgid="5307979043730860995">"Колдонуучунун нускамасын караңыз же Кардарларды тейлөө борборуна кайрылыңыз."</string>
     <string name="lockscreen_sim_locked_message" msgid="3160196135801185938">"SIM-карта бөгөттөлгөн."</string>
     <string name="lockscreen_sim_unlock_progress_dialog_message" msgid="2286497117428409709">"SIM-карта бөгөттөн чыгарылууда…"</string>
-    <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="6458790975898594240">"Кулпуну ачуу үлгүсүн <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тарттыңыз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундадан кийин дагы аракет кылып көрүңүз."</string>
+    <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="6458790975898594240">"Графикалык ачкычты <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тарттыңыз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундадан кийин дагы аракет кылып көрүңүз."</string>
     <string name="lockscreen_too_many_failed_password_attempts_dialog_message" msgid="3118353451602377380">"Сырсөзүңүздү <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тердиңиз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундадан кийин дагы аракет кылып көрүңүз."</string>
     <string name="lockscreen_too_many_failed_pin_attempts_dialog_message" msgid="2874278239714821984">"PIN-кодуңузду <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тердиңиз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундадан кийин дагы аракет кылып көрүңүз."</string>
-    <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="3069635524964070596">"Кулпуну ачуу үлгүсүн <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тарттыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес тартсаңыз, планшетиңиздин кулпусун Google\'га кирип ачууга туура келет.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундадан кийин дагы аракет кылып көрүңүз."</string>
+    <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="3069635524964070596">"Графикалык ачкычты <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тарттыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес тартсаңыз, планшетиңиздин кулпусун Google\'га кирип ачууга туура келет.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундадан кийин дагы аракет кылып көрүңүз."</string>
     <string name="lockscreen_failed_attempts_almost_glogin" product="tv" msgid="6399092175942158529">"Графикалык ачкычыңызды <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес чийдиңиз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> ийгиликсиз аракеттен кийин, Android TV түзмөгүңүздүн кулпусун Google аккаунтуңузга кирип ачышыңыз керек болот.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секунддан кийин кайталап көрүңүз."</string>
-    <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="5691623136957148335">"Кулпуну ачуу үлгүсүн <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тарттыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес тартсаңыз, телефонуңуздун кулпусун Google\'га кирип ачууга туура келет.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундадан кийин дагы аракет кылып көрүңүз."</string>
+    <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="5691623136957148335">"Графикалык ачкычты <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тарттыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес тартсаңыз, телефонуңуздун кулпусун Google\'га кирип ачууга туура келет.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундадан кийин дагы аракет кылып көрүңүз."</string>
     <string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="7914445759242151426">"Сиз планшетиңизди бөгөттөн чыгарууга <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес аракет кылдыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> аракеттен кийин, планшет баштапкы абалына келтирилет жана бардык маалыматтар өчүрүлөт."</string>
     <string name="lockscreen_failed_attempts_almost_at_wipe" product="tv" msgid="4275591249631864248">"Android TV түзмөгүңүздүн кулпусун <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес ачууга аракет жасадыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> ийгиликсиз аракеттен кийин, Android TV түзмөгүңүз демейки жөндөөлөргө кайтарылып, бардык колдонуучу дайындары жоголот."</string>
     <string name="lockscreen_failed_attempts_almost_at_wipe" product="default" msgid="1166532464798446579">"Сиз телефонуңузду бөгөттөн чыгарууга <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес аракет кылдыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> аракеттен кийин, телефон баштапкы абалына келтирилет жана бардык маалыматтар өчүрүлөт."</string>
@@ -1199,7 +1199,7 @@
     <string name="android_upgrading_apk" msgid="1339564803894466737">"<xliff:g id="NUMBER_1">%2$d</xliff:g> ичинен <xliff:g id="NUMBER_0">%1$d</xliff:g> колдонмо ыңгайлаштырылууда."</string>
     <string name="android_preparing_apk" msgid="589736917792300956">"<xliff:g id="APPNAME">%1$s</xliff:g> даярдалууда."</string>
     <string name="android_upgrading_starting_apps" msgid="6206161195076057075">"Колдонмолорду иштетип баштоо"</string>
-    <string name="android_upgrading_complete" msgid="409800058018374746">"Жүктөө аякталууда."</string>
+    <string name="android_upgrading_complete" msgid="409800058018374746">"Жүктөлүүдө"</string>
     <string name="heavy_weight_notification" msgid="8382784283600329576">"<xliff:g id="APP">%1$s</xliff:g> иштеп жатат"</string>
     <string name="heavy_weight_notification_detail" msgid="6802247239468404078">"Оюнга кайтуу үчүн таптаңыз"</string>
     <string name="heavy_weight_switcher_title" msgid="3861984210040100886">"Оюн тандоо"</string>
@@ -1219,7 +1219,7 @@
     <string name="volume_music" msgid="7727274216734955095">"Мультимедианын катуулугу"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"Bluetooth аркылуу ойнотулууда"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"Үнсүз рингтон орнотулду"</string>
-    <string name="volume_call" msgid="7625321655265747433">"Чалуудагы үн көлөмү"</string>
+    <string name="volume_call" msgid="7625321655265747433">"Сүйлөшүүнүн катуулугу"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"Bluetooth чалуудагы үн көлөмү"</string>
     <string name="volume_alarm" msgid="4486241060751798448">"Ойготкучтун катуулугу"</string>
     <string name="volume_notification" msgid="6864412249031660057">"Эскертме үн көлөмү"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Администраторуңуз жаңыртып койгон"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Администраторуңуз жок кылып салган"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ЖАРАЙТ"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Батареянын мөөнөтүн узартуу үчүн, Батареяны үнөмдөгүч режими төмөнкүлөрдү аткарат:\n\n•Караңгы теманы күйгүзөт\n•Фондогу аракеттерди, айрым визуалдык эффекттерди жана \"Окей Google\" сыяктуу башка функцияларды өчүрөт же чектейт\n\n"<annotation id="url">"Кеңири маалымат"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Батареянын иштешин узартуу үчүн, Батареяны үнөмдөөчү режим:\n\n•Караңгы теманы күйгүзөт\n•Фондогу аракеттерди, айрым визуалдык эффекттерди жана \"Окей Google\" сыяктуу башка функцияларды өчүрөт же чектейт"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Батареяны көбүрөөк убакытка жеткирүү үчүн Батареяны үнөмдөгүч режиминде:\n\n• Караңгы тема күйгүзүлөт\n• Фондогу аракеттерди, айрым визуалдык эффекттерди жана \"Окей Google\" сыяктуу башка функцияларды өчүрөт же чектейт\n\n"<annotation id="url">"Кеңири маалымат"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Батареяны көбүрөөк убакытка жеткирүү үчүн Батареяны үнөмдөгүч режими:\n\n• Караңгы тема күйгүзүлөт\n• Фондогу аракеттерди, айрым визуалдык эффекттерди жана \"Окей Google\" сыяктуу башка функцияларды өчүрөт же чектейт"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Трафикти үнөмдөө режиминде айрым колдонмолор дайын-даректерди фондо өткөрө алышпайт. Учурда сиз пайдаланып жаткан колдонмо дайын-даректерди жөнөтүп/ала алат, бирок адаттагыдан азыраак өткөргөндүктөн, анын айрым функциялары талаптагыдай иштебей коюшу мүмкүн. Мисалы, сүрөттөр басылмайынча жүктөлбөйт."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Трафикти үнөмдөө режимин иштетесизби?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Күйгүзүү"</string>
@@ -2001,8 +2001,8 @@
     <string name="dynamic_mode_notification_title" msgid="9205715501274608016">"Батарея кубаттоого чейин отуруп калышы мүмкүн"</string>
     <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"Батареянын отуруп калбашы үчүн Батареяны үнөмдөгүч режими иштетилди"</string>
     <string name="battery_saver_notification_channel_name" msgid="3918243458067916913">"Батареяны үнөмдөгүч"</string>
-    <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"Батареяны үнөмдөгүч режими өчүрүлдү"</string>
-    <string name="battery_saver_charged_notification_summary" product="default" msgid="5544457317418624367">"Телефон жеткиликтүү кубатталды. Функцияны колдоно берсеңиз болот."</string>
+    <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"Батареяны үнөмдөө режими өчүк"</string>
+    <string name="battery_saver_charged_notification_summary" product="default" msgid="5544457317418624367">"Телефондун кубаты жетиштүү. Функциялар мындан ары чектелбейт."</string>
     <string name="battery_saver_charged_notification_summary" product="tablet" msgid="4426317048139996888">"Планшет жеткиликтүү кубатталды. Функцияны колдоно берсеңиз болот."</string>
     <string name="battery_saver_charged_notification_summary" product="device" msgid="1031562417867646649">"Түзмөк жеткиликтүү кубатталды. Функцияны колдоно берсеңиз болот."</string>
     <string name="mime_type_folder" msgid="2203536499348787650">"Папка"</string>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index 66ec0e6..2197aee 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"ກົດ ເມນູ ເພື່ອປົດລັອກ ຫຼື ໂທອອກຫາເບີສຸກເສີນ."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"ກົດ \"ເມນູ\" ເພື່ອປົດລັອກ."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"ແຕ້ມຮູບແບບເພື່ອປົດລັອກ"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"ສຸກ​ເສີນ"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"ການໂທສຸກເສີນ"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"ກັບໄປຫາການໂທ"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"ຖືກຕ້ອງ!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"ລອງໃໝ່ອີກຄັ້ງ"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"ຖືກອັບໂຫລດໂດຍຜູ້ເບິ່ງແຍງລະບົບຂອງທ່ານ"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"ຖືກລຶບອອກໂດຍຜູ້ເບິ່ງແຍງລະບົບຂອງທ່ານ"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ຕົກລົງ"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ເພື່ອຍືດອາຍຸແບັດເຕີຣີ, ຕົວປະຢັດແບັດເຕີຣີຈະ:\n\n•ເປີດໃຊ້ຮູບແບບສີສັນມືດ\n•ປິດ ຫຼື ຈຳກັດການເຄື່ອນໄຫວໃນພື້ນຫຼັງ, ເອັບເຟັກດ້ານພາບບາງຢ່າງ ແລະ ຄຸນສົມບັດອື່ນໆ ເຊັ່ນ: “Ok Google”\n\n"<annotation id="url">"ສຶກສາເພີ່ມເຕີມ"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ເພື່ອຍືດອາຍຸແບັດເຕີຣີ, ຕົວປະຢັດແບັດເຕີຣີຈະ:\n\n•ເປີດໃຊ້ຮູບແບບສີສັນມືດ\n•ປິດ ຫຼື ຈຳກັດການເຄື່ອນໄຫວໃນພື້ນຫຼັງ, ເອັບເຟັກດ້ານພາບບາງຢ່າງ ແລະ ຄຸນສົມບັດອື່ນໆ ເຊັ່ນ: “Ok Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ເພື່ອຍືດອາຍຸແບັດເຕີຣີ, ຕົວປະຢັດແບັດເຕີຣີຈະ:\n\n• ເປີດໃຊ້ຮູບແບບສີສັນມືດ\n• ປິດ ຫຼື ຈຳກັດການເຄື່ອນໄຫວໃນພື້ນຫຼັງ, ເອັບເຟັກດ້ານພາບບາງຢ່າງ ແລະ ຄຸນສົມບັດອື່ນໆ ເຊັ່ນ: “Ok Google”\n\n"<annotation id="url">"ສຶກສາເພີ່ມເຕີມ"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ເພື່ອຍືດອາຍຸແບັດເຕີຣີ, ຕົວປະຢັດແບັດເຕີຣີຈະ:\n\n• ເປີດໃຊ້ຮູບແບບສີສັນມືດ\n• ປິດ ຫຼື ຈຳກັດການເຄື່ອນໄຫວໃນພື້ນຫຼັງ, ເອັບເຟັກດ້ານພາບບາງຢ່າງ ແລະ ຄຸນສົມບັດອື່ນໆ ເຊັ່ນ: “Ok Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ເພື່ອຊ່ວຍຫຼຸດຜ່ອນການນຳໃຊ້ຂໍ້ມູນ, ຕົວປະຢັດອິນເຕີເນັດຈະປ້ອງກັນບໍ່ໃຫ້ບາງແອັບສົ່ງ ຫຼື ຮັບຂໍ້ມູນໃນພື້ນຫຼັງ. ແອັບໃດໜຶ່ງທີ່ທ່ານກຳລັງໃຊ້ຢູ່ຈະສາມາດເຂົ້າເຖິງຂໍ້ມູນໄດ້ ແຕ່ອາດເຂົ້າເຖິງໄດ້ຖີ່ໜ້ອຍລົງ. ນີ້ອາດໝາຍຄວາມວ່າ ຮູບພາບຕ່າງໆອາດບໍ່ສະແດງຈົນກວ່າທ່ານຈະແຕະໃສ່ກ່ອນ."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ເປີດຕົວປະຢັດອິນເຕີເນັດບໍ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ເປີດໃຊ້"</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 4f71c36..6a49582 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Paspauskite „Meniu“, kad atrakintumėte ar skambintumėte pagalbos numeriu."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Paspauskite „Meniu“, jei norite atrakinti."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Nustatyti modelį, kad atrakintų"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Skambutis pagalbos numeriu"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Skambutis pagalbos numeriu"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"grįžti prie skambučio"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Teisingai!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Bandykite dar kartą"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Atnaujino administratorius"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Ištrynė administratorius"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Gerai"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Kad akumuliatorius veiktų ilgiau, Akumuliatoriaus tausojimo priemonė:\n\n• įjungia tamsiąją temą;\n• išjungia arba apriboja veiklą fone, kai kuriuos vaizdinius efektus ir kitas funkcijas, pvz., „Ok Google“.\n\n"<annotation id="url">"Sužinokite daugiau"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Kad akumuliatorius veiktų ilgiau, Akumuliatoriaus tausojimo priemonė:\n\n• įjungia tamsiąją temą;\n• išjungia arba apriboja veiklą fone, kai kuriuos vaizdinius efektus ir kitas funkcijas, pvz., „Ok Google“."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Kad akumuliatorius veiktų ilgiau, Akumuliatoriaus tausojimo priemonė:\n\n• įjungia tamsiąją temą;\n• išjungia arba apriboja veiklą fone, kai kuriuos vaizdinius efektus ir kitas funkcijas, pvz., „Ok Google“.\n\n"<annotation id="url">"Sužinokite daugiau"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Kad akumuliatorius veiktų ilgiau, Akumuliatoriaus tausojimo priemonė:\n\n• įjungia tamsiąją temą;\n• išjungia arba apriboja veiklą fone, kai kuriuos vaizdinius efektus ir kitas funkcijas, pvz., „Ok Google“."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Kad padėtų sumažinti duomenų naudojimą, Duomenų taupymo priemonė neleidžia kai kurioms programoms siųsti ar gauti duomenų fone. Šiuo metu naudojama programa gali pasiekti duomenis, bet tai bus daroma rečiau. Tai gali reikšti, kad, pvz., vaizdai nebus pateikiami, jei jų nepaliesite."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Įj. Duomenų taupymo priemonę?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Įjungti"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index b2f1de7..8e67568 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -832,7 +832,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Nospiediet Izvēlne, lai atbloķētu, vai veiciet ārkārtas zvanu."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Lai atbloķētu, nospiediet vienumu Izvēlne."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Zīmējiet kombināciju, lai atbloķētu."</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Ārkārtas situācija"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Ārkārtas izsaukums"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Atpakaļ pie zvana"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Pareizi!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Mēģināt vēlreiz"</string>
@@ -1815,8 +1815,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Atjaunināja administrators"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Dzēsa administrators"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Labi"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Lai paildzinātu akumulatora darbību, akumulatora enerģijas taupīšanas režīmā tiek veiktas tālāk norādītās darbības.\n\n• Tiek ieslēgts tumšais motīvs.\n• Tiek izslēgtas vai ierobežotas darbības fonā, noteikti vizuālie efekti un citas funkcijas, piemēram, “Ok Google”.\n\n"<annotation id="url">"Uzzināt vairāk"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Lai paildzinātu akumulatora darbību, akumulatora enerģijas taupīšanas režīmā tiek veiktas tālāk norādītās darbības.\n\n• Tiek ieslēgts tumšais motīvs.\n• Tiek izslēgtas vai ierobežotas darbības fonā, noteikti vizuālie efekti un citas funkcijas, piemēram, “Ok Google”."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Lai paildzinātu akumulatora darbības laiku, ieslēdzot akumulatora enerģijas taupīšanas režīmu, tiek veiktas tālāk norādītās darbības.\n\n• Tiek ieslēgts tumšais motīvs.\n• Tiek izslēgtas vai ierobežotas fonā veiktās darbības, daži vizuālie efekti un citas funkcijas, piemēram, “Ok Google”.\n\n"<annotation id="url">"Uzzināt vairāk"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Lai paildzinātu akumulatora darbības laiku, ieslēdzot akumulatora enerģijas taupīšanas režīmu, tiek veiktas tālāk norādītās darbības.\n\n• Tiek ieslēgts tumšais motīvs.\n• Tiek izslēgtas vai ierobežotas fonā veiktās darbības, daži vizuālie efekti un citas funkcijas, piemēram, “Ok Google”."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Lai samazinātu datu lietojumu, datu lietojuma samazinātājs neļauj dažām lietotnēm fonā nosūtīt vai saņemt datus. Lietotne, kuru pašlaik izmantojat, var piekļūt datiem, bet, iespējams, piekļūs tiem retāk (piemēram, attēli tiks parādīti tikai tad, kad tiem pieskarsieties)."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Vai ieslēgt datu lietojuma samazinātāju?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Ieslēgt"</string>
diff --git a/core/res/res/values-mcc260/config.xml b/core/res/res/values-mcc260/config.xml
new file mode 100644
index 0000000..79eefb7
--- /dev/null
+++ b/core/res/res/values-mcc260/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2020, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+  <!-- Set to false to disable emergency alert. -->
+  <bool name="config_cellBroadcastAppLinks">false</bool>
+</resources>
\ No newline at end of file
diff --git a/core/res/res/values-mcc262/config.xml b/core/res/res/values-mcc262/config.xml
new file mode 100644
index 0000000..79eefb7
--- /dev/null
+++ b/core/res/res/values-mcc262/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2020, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+  <!-- Set to false to disable emergency alert. -->
+  <bool name="config_cellBroadcastAppLinks">false</bool>
+</resources>
\ No newline at end of file
diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml
index 793cde7..d61a278 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/strings.xml
@@ -155,19 +155,19 @@
     <string name="fcError" msgid="5325116502080221346">"Проблем со поврзувањето или неважечки код за карактеристиката."</string>
     <string name="httpErrorOk" msgid="6206751415788256357">"Во ред"</string>
     <string name="httpError" msgid="3406003584150566720">"Настана грешка на мрежа."</string>
-    <string name="httpErrorLookup" msgid="3099834738227549349">"Не можеше да се најде URL."</string>
+    <string name="httpErrorLookup" msgid="3099834738227549349">"Не може да се најде URL."</string>
     <string name="httpErrorUnsupportedAuthScheme" msgid="3976195595501606787">"Шемата за автентикација на локацијата не е поддржана."</string>
-    <string name="httpErrorAuth" msgid="469553140922938968">"Не можеше да се автентицира."</string>
+    <string name="httpErrorAuth" msgid="469553140922938968">"Не може да се автентицира."</string>
     <string name="httpErrorProxyAuth" msgid="7229662162030113406">"Автентикацијата преку прокси серверот беше неуспешна."</string>
-    <string name="httpErrorConnect" msgid="3295081579893205617">"Не можеше да се поврзе со серверот."</string>
-    <string name="httpErrorIO" msgid="3860318696166314490">"Не можеше да се комуницира со серверот. Обидете се повторно подоцна."</string>
+    <string name="httpErrorConnect" msgid="3295081579893205617">"Не може да се поврзе со серверот."</string>
+    <string name="httpErrorIO" msgid="3860318696166314490">"Не може да се комуницира со серверот. Обидете се повторно подоцна."</string>
     <string name="httpErrorTimeout" msgid="7446272815190334204">"Времето за поврзување до серверот истече."</string>
     <string name="httpErrorRedirectLoop" msgid="8455757777509512098">"Страницата содржи премногу пренасочувања од серверот."</string>
     <string name="httpErrorUnsupportedScheme" msgid="2664108769858966374">"Протоколот не е поддржан."</string>
-    <string name="httpErrorFailedSslHandshake" msgid="546319061228876290">"Не можеше да се воспостави безбедна врска."</string>
-    <string name="httpErrorBadUrl" msgid="754447723314832538">"Страницата не можеше да се отвори, бидејќи URL е неважечки."</string>
-    <string name="httpErrorFile" msgid="3400658466057744084">"Не можеше да се пристапи до датотеката."</string>
-    <string name="httpErrorFileNotFound" msgid="5191433324871147386">"Не можеше да се најде бараната датотека."</string>
+    <string name="httpErrorFailedSslHandshake" msgid="546319061228876290">"Не може да се воспостави безбедна врска."</string>
+    <string name="httpErrorBadUrl" msgid="754447723314832538">"Страницата не може да се отвори, бидејќи URL е неважечки."</string>
+    <string name="httpErrorFile" msgid="3400658466057744084">"Не може да се пристапи до датотеката."</string>
+    <string name="httpErrorFileNotFound" msgid="5191433324871147386">"Не може да се најде бараната датотека."</string>
     <string name="httpErrorTooManyRequests" msgid="2149677715552037198">"Се обработуваат премногу барања. Обидете се повторно подоцна."</string>
     <string name="notification_title" msgid="5783748077084481121">"Грешка при пријавување за <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
     <string name="contentServiceSync" msgid="2341041749565687871">"Синхронизирај"</string>
@@ -543,7 +543,7 @@
     <string name="biometric_error_canceled" msgid="8266582404844179778">"Проверката е откажана"</string>
     <string name="biometric_error_device_not_secured" msgid="3129845065043995924">"Не е поставен PIN, шема или лозинка"</string>
     <string name="fingerprint_acquired_partial" msgid="8532380671091299342">"Откриен е делумен отпечаток. Обидете се повторно."</string>
-    <string name="fingerprint_acquired_insufficient" msgid="2545149524031515411">"Отпечатокот не можеше да се обработи. Обидете се повторно."</string>
+    <string name="fingerprint_acquired_insufficient" msgid="2545149524031515411">"Отпечатокот не може да се обработи. Обидете се повторно."</string>
     <string name="fingerprint_acquired_imager_dirty" msgid="4694800187151533990">"Сензорот за отпечатоци е валкан. Исчистете го и обидете се повторно."</string>
     <string name="fingerprint_acquired_too_fast" msgid="5151661932298844352">"Прстот се движеше пребрзо. Обидете се повторно."</string>
     <string name="fingerprint_acquired_too_slow" msgid="6683510291554497580">"Прстот се движеше премногу бавно. Обидете се повторно."</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Притисни „Мени“ да се отклучи или да направи итен повик."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Притиснете „Мени“ за да се отклучи."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Употребете ја шемата за да се отклучи"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Итен случај"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Итен повик"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Врати се на повик"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Точно!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Обидете се повторно"</string>
@@ -898,7 +898,7 @@
     <string name="keyguard_accessibility_user_selector" msgid="1466067610235696600">"Избирач на корисник"</string>
     <string name="keyguard_accessibility_status" msgid="6792745049712397237">"Статус"</string>
     <string name="keyguard_accessibility_camera" msgid="7862557559464986528">"Камера"</string>
-    <string name="keygaurd_accessibility_media_controls" msgid="2267379779900620614">"Контроли на медиуми"</string>
+    <string name="keygaurd_accessibility_media_controls" msgid="2267379779900620614">"Контроли за аудио/видео содржини"</string>
     <string name="keyguard_accessibility_widget_reorder_start" msgid="7066213328912939191">"Прередувањето виџети започна."</string>
     <string name="keyguard_accessibility_widget_reorder_end" msgid="1083806817600593490">"Прередувањето виџети заврши."</string>
     <string name="keyguard_accessibility_widget_deleted" msgid="1509738950119878705">"Виџетот <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> е избришан."</string>
@@ -1344,7 +1344,7 @@
     <string name="ext_media_new_notification_title" product="automotive" msgid="9085349544984742727">"<xliff:g id="NAME">%s</xliff:g> не работи"</string>
     <string name="ext_media_new_notification_message" msgid="6095403121990786986">"Допрете за поставување"</string>
     <string name="ext_media_new_notification_message" product="automotive" msgid="5140127881613227162">"Можеби ќе треба да го преформатирате уредот. Допрете за отстранување."</string>
-    <string name="ext_media_ready_notification_message" msgid="777258143284919261">"За пренесување фотографии и медиуми"</string>
+    <string name="ext_media_ready_notification_message" msgid="777258143284919261">"За пренесување фотографии и аудио/видео содржини"</string>
     <string name="ext_media_unmountable_notification_title" msgid="4895444667278979910">"Проблем со <xliff:g id="NAME">%s</xliff:g>"</string>
     <string name="ext_media_unmountable_notification_title" product="automotive" msgid="3142723758949023280">"<xliff:g id="NAME">%s</xliff:g> не работи"</string>
     <string name="ext_media_unmountable_notification_message" msgid="3256290114063126205">"Допрете за да го поправите ова"</string>
@@ -1385,8 +1385,8 @@
     <string name="ext_media_status_formatting" msgid="774148701503179906">"Се форматира..."</string>
     <string name="ext_media_status_missing" msgid="6520746443048867314">"Не е внесено"</string>
     <string name="activity_list_empty" msgid="4219430010716034252">"Не се пронајдени соодветни активности."</string>
-    <string name="permlab_route_media_output" msgid="8048124531439513118">"насочување излез за медиуми"</string>
-    <string name="permdesc_route_media_output" msgid="1759683269387729675">"Овозможува апликацијата да насочува излез за медиуми кон други надворешни уреди."</string>
+    <string name="permlab_route_media_output" msgid="8048124531439513118">"насочување излез за аудио/видео"</string>
+    <string name="permdesc_route_media_output" msgid="1759683269387729675">"Овозможува апликацијата да насочува излез за аудио/видео содржини кон други надворешни уреди."</string>
     <string name="permlab_readInstallSessions" msgid="7279049337895583621">"читање сесии на инсталирање"</string>
     <string name="permdesc_readInstallSessions" msgid="4012608316610763473">"Дозволува апликација да чита сесии на инсталирање. Тоа овозможува апликацијата да гледа детали за активни инсталации на пакет."</string>
     <string name="permlab_requestInstallPackages" msgid="7600020863445351154">"барање пакети за инсталирање"</string>
@@ -1396,7 +1396,7 @@
     <string name="permlab_requestIgnoreBatteryOptimizations" msgid="7646611326036631439">"прашај дали да се игнорираат оптимизациите на батеријата"</string>
     <string name="permdesc_requestIgnoreBatteryOptimizations" msgid="634260656917874356">"Овозможува апликацијата да побара дозвола за игнорирање на оптимизациите на батеријата за таа апликација."</string>
     <string name="tutorial_double_tap_to_zoom_message_short" msgid="1842872462124648678">"Допрете двапати за контрола на зумот"</string>
-    <string name="gadget_host_error_inflating" msgid="2449961590495198720">"Не можеше да се додаде виџет."</string>
+    <string name="gadget_host_error_inflating" msgid="2449961590495198720">"Не може да се додаде виџет."</string>
     <string name="ime_action_go" msgid="5536744546326495436">"Оди"</string>
     <string name="ime_action_search" msgid="4501435960587287668">"Пребарај"</string>
     <string name="ime_action_send" msgid="8456843745664334138">"Испрати"</string>
@@ -1431,7 +1431,7 @@
     <string name="vpn_lockdown_connecting" msgid="6096725311950342607">"Поврзување со секогаш вклучена VPN..."</string>
     <string name="vpn_lockdown_connected" msgid="2853127976590658469">"Поврзани со секогаш вклучена VPN"</string>
     <string name="vpn_lockdown_disconnected" msgid="5573611651300764955">"Исклучено од секогаш вклучената VPN"</string>
-    <string name="vpn_lockdown_error" msgid="4453048646854247947">"Не можеше да се поврзе на секогаш вклучената VPN"</string>
+    <string name="vpn_lockdown_error" msgid="4453048646854247947">"Не може да се поврзе на секогаш вклучената VPN"</string>
     <string name="vpn_lockdown_config" msgid="8331697329868252169">"Променете ја мрежата или поставките за VPN"</string>
     <string name="upload_file" msgid="8651942222301634271">"Избери датотека"</string>
     <string name="no_file_chosen" msgid="4146295695162318057">"Не е избрана датотека"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Ажурирано од администраторот"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Избришано од администраторот"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Во ред"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"За да го продолжи траењето на батеријата, „Штедачот на батерија“:\n\n•вклучува темна тема;\n•исклучува или ограничува активност во заднина, некои визуелни ефекти и други функции како „Ok Google“.\n\n"<annotation id="url">"Дознајте повеќе"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"За да го продолжи траењето на батеријата, „Штедачот на батерија“:\n\n•вклучува темна тема;\n•исклучува или ограничува активност во заднина, некои визуелни ефекти и други функции како „Ok Google“."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"За да го продолжи траењето на батеријата, „Штедачот на батерија“:\n\n• вклучува темна тема\n• исклучува или ограничува активност во заднина, некои визуелни ефекти и други функции како „Hey Google“\n\n"<annotation id="url">"Дознајте повеќе"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"За да го продолжи траењето на батеријата, „Штедачот на батерија“:\n\n• вклучува темна тема\n• исклучува или ограничува активност во заднина, некои визуелни ефекти и други функции како „Hey Google“"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"За да се намали користењето интернет, „Штедачот на интернет“ спречува дел од апликациите да испраќаат или да примаат податоци во заднина. Одредена апликација што ја користите ќе може да користи интернет, но можеби тоа ќе го прави поретко. Ова значи, на пример, дека сликите нема да се прикажуваат додека не ги допрете."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Да се вклучи „Штедач на интернет“?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Вклучи"</string>
@@ -1975,9 +1975,9 @@
     <string name="popup_window_default_title" msgid="6907717596694826919">"Појавен прозорец"</string>
     <string name="slice_more_content" msgid="3377367737876888459">"+ <xliff:g id="NUMBER">%1$d</xliff:g>"</string>
     <string name="shortcut_restored_on_lower_version" msgid="9206301954024286063">"Верзијата на апликацијата е постара или не е компатибилна со кратенкава"</string>
-    <string name="shortcut_restore_not_supported" msgid="4763198938588468400">"Не можеше да се врати кратенката бидејќи апликацијата не поддржува бекап и враќање"</string>
-    <string name="shortcut_restore_signature_mismatch" msgid="579345304221605479">"Не можеше да се врати кратенката бидејќи потписот на апликацијата не се совпаѓа"</string>
-    <string name="shortcut_restore_unknown_issue" msgid="2478146134395982154">"Не можеше да се врати кратенката"</string>
+    <string name="shortcut_restore_not_supported" msgid="4763198938588468400">"Не може да се врати кратенката бидејќи апликацијата не поддржува бекап и враќање"</string>
+    <string name="shortcut_restore_signature_mismatch" msgid="579345304221605479">"Не може да се врати кратенката бидејќи потписот на апликацијата не се совпаѓа"</string>
+    <string name="shortcut_restore_unknown_issue" msgid="2478146134395982154">"Не може да се врати кратенката"</string>
     <string name="shortcut_disabled_reason_unknown" msgid="753074793553599166">"Кратенката е оневозможена"</string>
     <string name="harmful_app_warning_uninstall" msgid="6472912975664191772">"ДЕИНСТАЛИРАЈ"</string>
     <string name="harmful_app_warning_open_anyway" msgid="5963657791740211807">"СЕПАК ОТВОРИ"</string>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index 1b03604..d30861f 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"അൺലോക്ക് ചെയ്യുന്നതിനായി മെനു അമർത്തുക അല്ലെങ്കിൽ അടിയന്തര കോൾ വിളിക്കുക."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"അൺലോക്കുചെയ്യാൻ മെനു അമർത്തുക."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"അൺലോക്ക് ചെയ്യാൻ പാറ്റേൺ വരയ്‌ക്കുക"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"എമർജൻസി"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"എമർജൻസി കോൾ"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"കോളിലേക്ക് മടങ്ങുക"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"ശരി!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"വീണ്ടും ശ്രമിക്കുക"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"നിങ്ങളുടെ അഡ്‌മിൻ അപ്‌ഡേറ്റ് ചെയ്യുന്നത്"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"നിങ്ങളുടെ അഡ്‌മിൻ ഇല്ലാതാക്കുന്നത്"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ശരി"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ബാറ്ററി ലെെഫ് വികസിപ്പിക്കാൻ, \'ബാറ്ററി ലാഭിക്കൽ\':\n\n•ഡാർക്ക് തീം ഓണാക്കും\n•പശ്ചാത്തല പ്രവർത്തനം, ചില വിഷ്വൽ ഇഫക്റ്റുകൾ, “ഹേയ് Google” പോലുള്ള മറ്റ് ഫീച്ചറുകൾ എന്നിവ ഓഫാക്കുകയോ നിയന്ത്രിക്കുകയോ ചെയ്യും\n\n"<annotation id="url">"കൂടുതലറിയുക"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ബാറ്ററി ലെെഫ് വികസിപ്പിക്കാൻ, \'ബാറ്ററി ലാഭിക്കൽ\':\n\n•ഡാർക്ക് തീം ഓണാക്കും\n•പശ്ചാത്തല പ്രവർത്തനം, ചില വിഷ്വൽ ഇഫക്റ്റുകൾ, “ഹേയ് Google” പോലുള്ള മറ്റ് ഫീച്ചറുകൾ എന്നിവ ഓഫാക്കുകയോ നിയന്ത്രിക്കുകയോ ചെയ്യും"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ബാറ്ററി ലെെഫ് വർദ്ധിപ്പിക്കാൻ, \'ബാറ്ററി ലാഭിക്കൽ\' ഇനിപ്പറയുന്നവ ചെയ്യുന്നു:\n\n•ഡാർക്ക് തീം ഓണാക്കുന്നു\n•പശ്ചാത്തല ആക്‌റ്റിവിറ്റി, ചില വിഷ്വൽ ഇഫക്റ്റുകൾ, “Ok Google” പോലുള്ള മറ്റ് ഫീച്ചറുകൾ എന്നിവ ഓഫാക്കുകയോ നിയന്ത്രിക്കുകയോ ചെയ്യന്നു\n\n"<annotation id="url">"കൂടുതലറിയുക"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ബാറ്ററി ലെെഫ് വർദ്ധിപ്പിക്കാൻ, \'ബാറ്ററി ലാഭിക്കൽ\' ഇനിപ്പറയുന്നവ ചെയ്യുന്നു:\n\n• ഡാർക്ക് തീം ഓണാക്കുന്നു\n• പശ്ചാത്തല ആക്റ്റിവിറ്റി, ചില വിഷ്വൽ ഇഫക്റ്റുകൾ, “Ok Google” പോലുള്ള മറ്റ് ഫീച്ചറുകൾ എന്നിവ ഓഫാക്കുകയോ നിയന്ത്രിക്കുകയോ ചെയ്യുന്നു"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ഡാറ്റാ ഉപയോഗം കുറയ്ക്കാൻ സഹായിക്കുന്നതിനായി പശ്ചാത്തലത്തിൽ ഡാറ്റ അയയ്ക്കുകയോ സ്വീകരിക്കുകയോ ചെയ്യുന്നതിൽ നിന്ന് ചില ആപ്പുകളെ ഡാറ്റാ സേവർ തടയുന്നു. നിങ്ങൾ നിലവിൽ ഉപയോഗിക്കുന്ന ഒരു ആപ്പിന് ഡാറ്റ ആക്‌സസ് ചെയ്യാനാകും, എന്നാൽ വല്ലപ്പോഴും മാത്രമെ സംഭവിക്കുന്നുള്ളു. ഇതിനർത്ഥം, ഉദാഹരണമായി നിങ്ങൾ ടാപ്പ് ചെയ്യുന്നത് വരെ ചിത്രങ്ങൾ പ്രദ‍‍‍ർശിപ്പിക്കുകയില്ല എന്നാണ്."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ഡാറ്റ സേവർ ഓണാക്കണോ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ഓണാക്കുക"</string>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index 1efb4eb..657f680 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -48,7 +48,7 @@
     <string name="invalidPin" msgid="7542498253319440408">"4-8 тооноос бүтэх PIN-г бичнэ үү."</string>
     <string name="invalidPuk" msgid="8831151490931907083">"8-с цөөнгүй тооноос бүтэх PUK-г бичнэ үү."</string>
     <string name="needPuk" msgid="7321876090152422918">"SIM картны PUK-түгжигдсэн. Тайлах бол PUK кодыг бичнэ үү."</string>
-    <string name="needPuk2" msgid="7032612093451537186">"SIM картын хаалтыг болиулах бол PUK2-г бичнэ үү."</string>
+    <string name="needPuk2" msgid="7032612093451537186">"SIM картыг блокоос гаргах бол PUK2-г бичнэ үү."</string>
     <string name="enablePin" msgid="2543771964137091212">"Амжилтгүй боллоо, СИМ/РҮИМ түгжээг идэвхжүүлнэ үү."</string>
     <plurals name="pinpuk_attempts" formatted="false" msgid="1619867269012213584">
       <item quantity="other">Таны СИМ түгжигдэхээс өмнө танд <xliff:g id="NUMBER_1">%d</xliff:g> оролдлого хийх боломж үлдлээ. </item>
@@ -273,7 +273,7 @@
     <string name="notification_channel_car_mode" msgid="2123919247040988436">"Машины горим"</string>
     <string name="notification_channel_account" msgid="6436294521740148173">"Бүртгэлийн төлөв"</string>
     <string name="notification_channel_developer" msgid="1691059964407549150">"Хөгжүүлэгчийн мессеж"</string>
-    <string name="notification_channel_developer_important" msgid="7197281908918789589">"Хөгжүүлэгчийн чухал зурвас"</string>
+    <string name="notification_channel_developer_important" msgid="7197281908918789589">"Хөгжүүлэгчийн чухал мессеж"</string>
     <string name="notification_channel_updates" msgid="7907863984825495278">"Шинэчлэлтүүд"</string>
     <string name="notification_channel_network_status" msgid="2127687368725272809">"Сүлжээний төлөв"</string>
     <string name="notification_channel_network_alerts" msgid="6312366315654526528">"Сүлжээний сануулга"</string>
@@ -356,9 +356,9 @@
     <string name="permlab_sendSms" msgid="7757368721742014252">"SMS мессежийг илгээх, харах"</string>
     <string name="permdesc_sendSms" msgid="6757089798435130769">"Апп нь SMS мессеж илгээх боломжтой. Энэ нь санаандгүй төлбөрт оруулж болзошгүй. Хортой апп нь таны зөвшөөрөлгүйгээр мессеж илгээн таныг төлбөрт оруулж болзошгүй."</string>
     <string name="permlab_readSms" msgid="5164176626258800297">"таны текст мессежийг унших(SMS эсвэл MMS)"</string>
-    <string name="permdesc_readSms" product="tablet" msgid="7912990447198112829">"Энэ апп таны таблетад хадгалсан бүх SMS (текст) зурвасыг унших боломжтой."</string>
+    <string name="permdesc_readSms" product="tablet" msgid="7912990447198112829">"Энэ апп таны таблетад хадгалсан бүх SMS (текст) мессежийг унших боломжтой."</string>
     <string name="permdesc_readSms" product="tv" msgid="3054753345758011986">"Энэ апп таны Android TV төхөөрөмжид хадгалсан бүх SMS (текст) мессежийг уншиж чадна."</string>
-    <string name="permdesc_readSms" product="default" msgid="774753371111699782">"Энэ апп таны утсанд хадгалсан бүх SMS (текст) зурвасыг унших боломжтой."</string>
+    <string name="permdesc_readSms" product="default" msgid="774753371111699782">"Энэ апп таны утсанд хадгалсан бүх SMS (текст) мессежийг унших боломжтой."</string>
     <string name="permlab_receiveWapPush" msgid="4223747702856929056">"текст мессеж(WAP) хүлээн авах"</string>
     <string name="permdesc_receiveWapPush" msgid="1638677888301778457">"Апп нь WAP мессежийг хүлээн авах болон биелүүлэх боломжтой. Энэ зөвшөөрөл нь танд илгээсэн мессежийг танд харуулалгүйгээр хянах эсвэл устгах боломжийг агуулна."</string>
     <string name="permlab_getTasks" msgid="7460048811831750262">"ажиллаж байгаа апп-г дуудах"</string>
@@ -416,9 +416,9 @@
     <string name="permdesc_readCalendar" product="tv" msgid="5811726712981647628">"Энэ апп таны Android TV төхөөрөмжид хадгалсан календарийн бүх арга хэмжээг унших болон таны календарийн өгөгдлийг хуваалцах эсвэл хадгалах боломжтой."</string>
     <string name="permdesc_readCalendar" product="default" msgid="9118823807655829957">"Энэ апп таны утсанд хадгалсан хуанлийн бүх арга хэмжээг унших, хуанлийн өгөгдлийг хуваалцах, хадгалах боломжтой."</string>
     <string name="permlab_writeCalendar" msgid="6422137308329578076">"календарын хуваарийг нэмэх эсвэл өөрчлөх болон эзэмшигчид мэдэгдэлгүйгээр зочидруу имэйл илгээх"</string>
-    <string name="permdesc_writeCalendar" product="tablet" msgid="8722230940717092850">"Энэ апп таны таблет дээр хуанлийн арга хэмжээг нэмэх, устгах, эсвэл өөрчлөх боломжтой. Энэ апп нь хуанли эзэмшигчээс зурвас илгээсэн мэт харагдах, эсвэл эзэмшигчид мэдэгдэлгүйгээр арга хэмжээг өөрчлөх боломжтой."</string>
+    <string name="permdesc_writeCalendar" product="tablet" msgid="8722230940717092850">"Энэ апп таны таблет дээр хуанлийн арга хэмжээг нэмэх, устгах, эсвэл өөрчлөх боломжтой. Энэ апп нь хуанли эзэмшигчээс мессеж илгээсэн мэт харагдах, эсвэл эзэмшигчид мэдэгдэлгүйгээр арга хэмжээг өөрчлөх боломжтой."</string>
     <string name="permdesc_writeCalendar" product="tv" msgid="951246749004952706">"Энэ апп таны Android TV төхөөрөмжид календарийн арга хэмжээ нэмэх, үүнийг устгах, эсвэл өөрчлөх боломжтой. Энэ апп календарийн өмчлөгчөөс ирсэн мэт харагдаж болох мессеж илгээх эсвэл арга хэмжээг өмчлөгчид нь мэдэгдэлгүйгээр өөрчлөх боломжтой."</string>
-    <string name="permdesc_writeCalendar" product="default" msgid="5416380074475634233">"Энэ апп таны утсанд хуанлийн арга хэмжээг нэмэх, устгах, эсвэл өөрчлөх боломжтой. Энэ апп нь хуанли эзэмшигчээс зурвас илгээсэн мэт харагдах, эсвэл эзэмшигчид мэдэгдэлгүйгээр арга хэмжээг өөрчлөх боломжтой."</string>
+    <string name="permdesc_writeCalendar" product="default" msgid="5416380074475634233">"Энэ апп таны утсанд хуанлийн арга хэмжээг нэмэх, устгах, эсвэл өөрчлөх боломжтой. Энэ апп нь хуанли эзэмшигчээс мессеж илгээсэн мэт харагдах, эсвэл эзэмшигчид мэдэгдэлгүйгээр арга хэмжээг өөрчлөх боломжтой."</string>
     <string name="permlab_accessLocationExtraCommands" msgid="5162339812057983988">"байршил нийлүүлэгчийн нэмэлт тушаалд хандах"</string>
     <string name="permdesc_accessLocationExtraCommands" msgid="355369611979907967">"Апп нь байршил нийлүүлэгчийн нэмэлт тушаалд хандах боломжтой. Энэ нь апп-д GPS эсвэл бусад байршлын үйлчилгээний ажиллагаанд нөлөөлөх боломжийг олгоно."</string>
     <string name="permlab_accessFineLocation" msgid="6426318438195622966">"нарийвчилсан байршилд зөвхөн нүүр хэсэгт хандах"</string>
@@ -472,10 +472,10 @@
     <string name="permdesc_transmitIr" product="tablet" msgid="5884738958581810253">"Апп-д таблетын хэт улаан дамжуулагчийг ашиглахыг зөвшөөрнө."</string>
     <string name="permdesc_transmitIr" product="tv" msgid="3278506969529173281">"Аппад таны Android TV төхөөрөмжийн хэт улаан туяаны дамжуулагчийг ашиглахыг зөвшөөрнө."</string>
     <string name="permdesc_transmitIr" product="default" msgid="8484193849295581808">"Апп-д утасны хэт улаан дамжуулагчийг ашиглахыг зөвшөөрнө."</string>
-    <string name="permlab_setWallpaper" msgid="6959514622698794511">"ханын зургийг тохируулах"</string>
-    <string name="permdesc_setWallpaper" msgid="2973996714129021397">"Апп нь системийн ханын зургийг тохируулах боломжтой."</string>
-    <string name="permlab_setWallpaperHints" msgid="1153485176642032714">"Таны ханын зурагны хэмжээг тохируулах"</string>
-    <string name="permdesc_setWallpaperHints" msgid="6257053376990044668">"Апп нь системийн ханын зургийн хэмжээний саналыг тохируулах боломжтой"</string>
+    <string name="permlab_setWallpaper" msgid="6959514622698794511">"дэлгэцийн зургийг тохируулах"</string>
+    <string name="permdesc_setWallpaper" msgid="2973996714129021397">"Апп нь системийн дэлгэцийн зургийг тохируулах боломжтой."</string>
+    <string name="permlab_setWallpaperHints" msgid="1153485176642032714">"Таны дэлгэцийн зургийн хэмжээг тохируулах"</string>
+    <string name="permdesc_setWallpaperHints" msgid="6257053376990044668">"Апп нь системийн дэлгэцийн зургийн хэмжээний саналыг тохируулах боломжтой"</string>
     <string name="permlab_setTimeZone" msgid="7922618798611542432">"цагийн бүсийн тохиргоо"</string>
     <string name="permdesc_setTimeZone" product="tablet" msgid="1788868809638682503">"Апп нь таблетын цагийн бүсийг солих боломжтой."</string>
     <string name="permdesc_setTimeZone" product="tv" msgid="9069045914174455938">"Аппад таны Android TV төхөөрөмжийн цагийн бүсийг өөрчлөхийг зөвшөөрнө."</string>
@@ -661,8 +661,8 @@
     <string name="permdesc_handoverStatus" msgid="3842269451732571070">"Одоогийн Андройд Бийм дамжуулалтын мэдээллийг хүлээн авахыг аппликейшнд зөвшөөрөх"</string>
     <string name="permlab_removeDrmCertificates" msgid="710576248717404416">"DRM сертификатыг устгах"</string>
     <string name="permdesc_removeDrmCertificates" msgid="4068445390318355716">"Аппликейшнд DRM сертификатыг устгахыг зөвшөөрнө. Энгийн апп-уудад хэзээ ч ашиглагдахгүй."</string>
-    <string name="permlab_bindCarrierMessagingService" msgid="3363450860593096967">"зөөгч зурвасын үйлчилгээнд холбох"</string>
-    <string name="permdesc_bindCarrierMessagingService" msgid="6316457028173478345">"Эзэмшигчид зөөгч зурвасын үйлчилгээний түвшний интерфэйст холбогдохыг зөвшөөрдөг. Энгийн апп-д шаардлагагүй."</string>
+    <string name="permlab_bindCarrierMessagingService" msgid="3363450860593096967">"зөөгч мессежийн үйлчилгээнд холбох"</string>
+    <string name="permdesc_bindCarrierMessagingService" msgid="6316457028173478345">"Эзэмшигчид зөөгч мессежийн үйлчилгээний түвшний интерфэйст холбогдохыг зөвшөөрдөг. Энгийн апп-д шаардлагагүй."</string>
     <string name="permlab_bindCarrierServices" msgid="2395596978626237474">"Үүрэн холбооны үйлчилгээ үзүүлэгчтэй холбогдох"</string>
     <string name="permdesc_bindCarrierServices" msgid="9185614481967262900">"Аливаа эзэмшигчийг үүрэн холбооны үйлчилгээ үзүүлэгчтэй холбодог. Энгийн аппд шаардлагагүй."</string>
     <string name="permlab_access_notification_policy" msgid="5524112842876975537">"Бүү саад бол тохируулгад хандалт хийх"</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Яаралтай дуудлага хийх буюу эсвэл түгжээг тайлах бол цэсийг дарна уу."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Тайлах бол цэсийг дарна уу."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Тайлах хээгээ зурна уу"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Яаралтай тусламж"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Яаралтай дуудлага"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Дуудлагаруу буцах"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Зөв!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Дахин оролдох"</string>
@@ -950,18 +950,18 @@
     <string name="autofill_parish" msgid="6847960518334530198">"Мөргөлч"</string>
     <string name="autofill_area" msgid="8289022370678448983">"Хэсэг"</string>
     <string name="autofill_emirate" msgid="2544082046790551168">"Эмират"</string>
-    <string name="permlab_readHistoryBookmarks" msgid="9102293913842539697">"өөрийн Вэб хавчуурга болон түүхийг унших"</string>
+    <string name="permlab_readHistoryBookmarks" msgid="9102293913842539697">"өөрийн Веб хавчуурга болон түүхийг унших"</string>
     <string name="permdesc_readHistoryBookmarks" msgid="2323799501008967852">"Апп нь Хөтчийн зочилж байсан бүх URL-н түүх болон Хөтчийн бүх хавчуургыг унших боломжтой. Анхаар: Энэ зөвшөөрөл нь гуравдагч талын хөтөч эсвэл вебээр хөтөчлөх чадавхтай аппликейшнүүдэд ашиглагдахгүй байх боломжтой."</string>
-    <string name="permlab_writeHistoryBookmarks" msgid="6090259925187986937">"вэб хавчуурга болон түүхийг бичих"</string>
+    <string name="permlab_writeHistoryBookmarks" msgid="6090259925187986937">"веб хавчуурга болон түүхийг бичих"</string>
     <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="573341025292489065">"Апп нь таны таблет дээр хадгалагдсан Хөтчийн түүх эсвэл хавчуургыг өөрчлөх боломжтой. Энэ нь апп-д Хөтчийн датаг арилгах эсвэл өөрчлөх боломжийг олгоно. Анхаар: Энэ зөвшөөрөл нь гуравдагч талын хөтөч эсвэл вебээр хөтөчлөх чадвартай аппликейшнд ажиллахгүй байх боломжтой."</string>
-    <string name="permdesc_writeHistoryBookmarks" product="tv" msgid="88642768580408561">"Аппад таны Android TV төхөөрөмжид хадгалсан Хөтчийн түүх эсвэл хавчуургыг өөрчлөхийг зөвшөөрнө. Энэ нь аппад Хөтчийн өгөгдлийг устгах эсвэл өөрчлөхийг зөвшөөрч болзошгүй. Санамж: энэ зөвшөөрөл нь гуравдагч талын хөтөч эсвэл вэб хөтчийн чадамжтай бусад аппад хэрэгжихгүй байж болзошгүй."</string>
+    <string name="permdesc_writeHistoryBookmarks" product="tv" msgid="88642768580408561">"Аппад таны Android TV төхөөрөмжид хадгалсан Хөтчийн түүх эсвэл хавчуургыг өөрчлөхийг зөвшөөрнө. Энэ нь аппад Хөтчийн өгөгдлийг устгах эсвэл өөрчлөхийг зөвшөөрч болзошгүй. Санамж: энэ зөвшөөрөл нь гуравдагч талын хөтөч эсвэл веб хөтчийн чадамжтай бусад аппад хэрэгжихгүй байж болзошгүй."</string>
     <string name="permdesc_writeHistoryBookmarks" product="default" msgid="2245203087160913652">"Апп нь таны утсан дээр хадгалагдсан Хөтчийн түүх эсвэл хавчуургыг өөрчлөх боломжтой. Энэ нь апп-д Хөтчийн датаг арилгах эсвэл өөрчлөх боломжийг олгоно. Анхаар: Энэ зөвшөөрөл нь гуравдагч талын хөтөч эсвэл вебээр хөтөчлөх чадвартай аппликейшнд ажиллахгүй байх боломжтой."</string>
     <string name="permlab_setAlarm" msgid="1158001610254173567">"сэрүүлэг тохируулах"</string>
     <string name="permdesc_setAlarm" msgid="2185033720060109640">"Апп нь суулгагдсан сэрүүлэгний апп дээр сэрүүлэг тохируулах боломжтой. Зарим сэрүүлэгний апп нь энэ функцийг дэмжихгүй байж болзошгүй."</string>
     <string name="permlab_addVoicemail" msgid="4770245808840814471">"дуут шуудан нэмэх"</string>
-    <string name="permdesc_addVoicemail" msgid="5470312139820074324">"Таны дуут шуудангийн ирсэн мэйлд зурвас нэмэхийг апп-д зөвшөөрөх."</string>
+    <string name="permdesc_addVoicemail" msgid="5470312139820074324">"Таны дуут шуудангийн ирсэн мэйлд мессеж нэмэхийг апп-д зөвшөөрөх."</string>
     <string name="permlab_writeGeolocationPermissions" msgid="8605631647492879449">"Хөтчийн геобайршлын зөвшөөрлийг өөрчлөх"</string>
-    <string name="permdesc_writeGeolocationPermissions" msgid="5817346421222227772">"Апп нь Хөтчийн гео байршлын зөвшөөрлийг өөрчлөх боломжтой. Хортой апп нь энийг ашиглан дурын вэб хуудасруу байршлын мэдээллийг илгээх боломжтой."</string>
+    <string name="permdesc_writeGeolocationPermissions" msgid="5817346421222227772">"Апп нь Хөтчийн гео байршлын зөвшөөрлийг өөрчлөх боломжтой. Хортой апп нь энийг ашиглан дурын веб хуудасруу байршлын мэдээллийг илгээх боломжтой."</string>
     <string name="save_password_message" msgid="2146409467245462965">"Та хөтчид энэ нууц үгийг сануулах уу?"</string>
     <string name="save_password_notnow" msgid="2878327088951240061">"Одоо биш"</string>
     <string name="save_password_remember" msgid="6490888932657708341">"Санах"</string>
@@ -1418,8 +1418,8 @@
     <string name="input_method_binding_label" msgid="1166731601721983656">"Оруулах арга"</string>
     <string name="sync_binding_label" msgid="469249309424662147">"Синк"</string>
     <string name="accessibility_binding_label" msgid="1974602776545801715">"Хандалт"</string>
-    <string name="wallpaper_binding_label" msgid="1197440498000786738">"Ханын зураг"</string>
-    <string name="chooser_wallpaper" msgid="3082405680079923708">"Ханын зураг солих"</string>
+    <string name="wallpaper_binding_label" msgid="1197440498000786738">"Дэлгэцийн зураг"</string>
+    <string name="chooser_wallpaper" msgid="3082405680079923708">"Дэлгэцийн зураг солих"</string>
     <string name="notification_listener_binding_label" msgid="2702165274471499713">"Мэдэгдэл сонсогч"</string>
     <string name="vr_listener_binding_label" msgid="8013112996671206429">"VR сонсогч"</string>
     <string name="condition_provider_service_binding_label" msgid="8490641013951857673">"Нөхцөл нийлүүлэгч"</string>
@@ -1452,7 +1452,7 @@
     <string name="progress_erasing" msgid="6891435992721028004">"Хуваалцсан хадгалах санг устгаж байна…"</string>
     <string name="share" msgid="4157615043345227321">"Хуваалцах"</string>
     <string name="find" msgid="5015737188624767706">"Олох"</string>
-    <string name="websearch" msgid="5624340204512793290">"Вэб хайлт"</string>
+    <string name="websearch" msgid="5624340204512793290">"Веб хайлт"</string>
     <string name="find_next" msgid="5341217051549648153">"Дараагийнхыг хайх"</string>
     <string name="find_previous" msgid="4405898398141275532">"Өмнөхөөс олох"</string>
     <string name="gpsNotifTicker" msgid="3207361857637620780">"<xliff:g id="NAME">%s</xliff:g>-н байршлын хүсэлт"</string>
@@ -1502,7 +1502,7 @@
     <string name="shareactionprovider_share_with_application" msgid="4902832247173666973">"<xliff:g id="APPLICATION_NAME">%s</xliff:g>-тай хуваалцана уу"</string>
     <string name="content_description_sliding_handle" msgid="982510275422590757">"Бариулыг гулсуулна. Хүрээд хүлээнэ."</string>
     <string name="description_target_unlock_tablet" msgid="7431571180065859551">"Түгжээг тайлах бол татна уу"</string>
-    <string name="action_bar_home_description" msgid="1501655419158631974">"Нүүр хуудасруу шилжих"</string>
+    <string name="action_bar_home_description" msgid="1501655419158631974">"Нүүр хуудас руу шилжих"</string>
     <string name="action_bar_up_description" msgid="6611579697195026932">"Дээш шилжих"</string>
     <string name="action_menu_overflow_description" msgid="4579536843510088170">"Нэмэлт сонголтууд"</string>
     <string name="action_bar_home_description_format" msgid="5087107531331621803">"%1$s, %2$s"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Таны админ шинэчилсэн"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Таны админ устгасан"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ОК"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Батарейн ажиллах хугацааг уртасгахын тулд Батарей хэмнэгч:\n\n•Бараан загварыг асаана\n•Арын үйл ажиллагаа, зарим визуал эффект болон “Hey Google” зэрэг бусад онцлогийг унтрааж эсвэл хязгаарлана\n\n"<annotation id="url">"Нэмэлт мэдээлэл авах"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Батарейн ажиллах хугацааг уртасгахын тулд Батарей хэмнэгч:\n\n•Бараан загварыг асаана\n•Арын үйл ажиллагаа, зарим визуал эффект болон “Hey Google” зэрэг бусад онцлогийг унтрааж эсвэл хязгаарлана"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Батарейн ажиллах хугацааг уртасгахын тулд Батарей хэмнэгч:\n\n•Бараан загварыг асаадаг\n•Арын үйл ажиллагаа, зарим визуал эффект болон “Hey Google” зэрэг бусад онцлогийг унтрааж эсвэл хязгаарладаг\n\n"<annotation id="url">"Нэмэлт мэдээлэл авах"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Батарей хэмнэгч нь батарейн ажиллах хугацааг уртасгахын тулд:\n\n• Бараан загварыг асаадаг\n• Арын үйл ажиллагаа, зарим визуал эффект болон “Hey Google” зэрэг бусад онцлогийг унтрааж эсвэл хязгаарладаг"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Дата ашиглалтыг багасгахын тулд дата хэмнэгч нь ар талд ажиллаж буй зарим апп-н өгөгдлийг илгээх болон авахаас сэргийлдэг. Таны одоогийн ашиглаж буй апп нь өгөгдөлд хандах боломжтой хэдий ч тогтмол хандахгүй. Энэ нь жишээлбэл зургийг товших хүртэл харагдахгүй гэсэн үг юм."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Дата хэмнэгчийг асаах уу?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Асаах"</string>
@@ -1893,7 +1893,7 @@
     <string name="app_blocked_message" msgid="542972921087873023">"<xliff:g id="APP_NAME">%1$s</xliff:g> яг одоо боломжгүй байна."</string>
     <string name="deprecated_target_sdk_message" msgid="5203207875657579953">"Энэ аппыг Андройдын хуучин хувилбарт зориулсан бөгөөд буруу ажиллаж болзошгүй. Шинэчлэлтийг шалгаж эсвэл хөгжүүлэгчтэй холбогдоно уу."</string>
     <string name="deprecated_target_sdk_app_store" msgid="8456784048558808909">"Шинэчлэлтийг шалгах"</string>
-    <string name="new_sms_notification_title" msgid="6528758221319927107">"Танд шинэ зурвасууд байна"</string>
+    <string name="new_sms_notification_title" msgid="6528758221319927107">"Танд шинэ мессежүүд байна"</string>
     <string name="new_sms_notification_content" msgid="3197949934153460639">"Үзэхийн тулд SMS аппыг нээх"</string>
     <string name="profile_encrypted_title" msgid="9001208667521266472">"Зарим функцийг хязгаарласан байж болзошгүй"</string>
     <string name="profile_encrypted_detail" msgid="5279730442756849055">"Ажлын профайлыг түгжсэн"</string>
@@ -1961,7 +1961,7 @@
     <string name="etws_primary_default_message_earthquake" msgid="8401079517718280669">"Тайван байж, ойролцоох нуугдах газар хайна уу."</string>
     <string name="etws_primary_default_message_tsunami" msgid="5828171463387976279">"Эргийн бүс, голын эргийн бүсээс өндөрлөг газар зэрэг аюулгүй газар руу нэн даруй шилжинэ үү."</string>
     <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="4888224011071875068">"Тайван байж, ойролцоох нуугдах газар хайна уу."</string>
-    <string name="etws_primary_default_message_test" msgid="4583367373909549421">"Онцгой байдлын зурвасын тест"</string>
+    <string name="etws_primary_default_message_test" msgid="4583367373909549421">"Онцгой байдлын мессежийн тест"</string>
     <string name="notification_reply_button_accessibility" msgid="5235776156579456126">"Хариу бичих"</string>
     <string name="etws_primary_default_message_others" msgid="7958161706019130739"></string>
     <string name="mmcc_authentication_reject" msgid="4891965994643876369">"SIM-г дуу хоолойд зөвшөөрдөггүй"</string>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 8890df5..a1c4b63 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -167,15 +167,15 @@
     <string name="httpErrorFailedSslHandshake" msgid="546319061228876290">"सुरक्षित कनेक्शन इंस्टॉल करू शकलो नाही."</string>
     <string name="httpErrorBadUrl" msgid="754447723314832538">"URL अवैध असल्यामुळे पेज उघडू शकलो नाही."</string>
     <string name="httpErrorFile" msgid="3400658466057744084">"फायलीवर प्रवेश करू शकलो नाही."</string>
-    <string name="httpErrorFileNotFound" msgid="5191433324871147386">"विनंती केलेली फाईल शोधू शकलो नाही."</string>
+    <string name="httpErrorFileNotFound" msgid="5191433324871147386">"विनंती केलेली फाइल शोधू शकलो नाही."</string>
     <string name="httpErrorTooManyRequests" msgid="2149677715552037198">"बर्‍याच विनंत्यांवर प्रक्रिया होत आहे. नंतर पुन्हा प्रयत्न करा."</string>
     <string name="notification_title" msgid="5783748077084481121">"<xliff:g id="ACCOUNT">%1$s</xliff:g> साठी साइन इन एरर"</string>
     <string name="contentServiceSync" msgid="2341041749565687871">"सिंक करा"</string>
     <string name="contentServiceSyncNotificationTitle" msgid="5766411446676388623">"सिंक करू शकत नाही"</string>
     <string name="contentServiceTooManyDeletesNotificationDesc" msgid="4562226280528716090">"खूप जास्त <xliff:g id="CONTENT_TYPE">%s</xliff:g> हटवण्याचा प्रयत्न केला."</string>
-    <string name="low_memory" product="tablet" msgid="5557552311566179924">"टॅबलेट संचयन पूर्ण भरले आहे. स्थान मोकळे करण्यासाठी काही फाईल हटवा."</string>
+    <string name="low_memory" product="tablet" msgid="5557552311566179924">"टॅबलेट संचयन पूर्ण भरले आहे. स्थान मोकळे करण्यासाठी काही फाइल हटवा."</string>
     <string name="low_memory" product="watch" msgid="3479447988234030194">"पाहण्याचे संचयन पूर्ण भरले आहे. स्थान मोकळे करण्यासाठी काही फाइल हटवा."</string>
-    <string name="low_memory" product="tv" msgid="6663680413790323318">"Android TV डिव्हाइस स्टोरेज पूर्ण भरलेले आहे. जागा मोकळी करण्यासाठी काही फाईल हटवा."</string>
+    <string name="low_memory" product="tv" msgid="6663680413790323318">"Android TV डिव्हाइस स्टोरेज पूर्ण भरलेले आहे. जागा मोकळी करण्यासाठी काही फाइल हटवा."</string>
     <string name="low_memory" product="default" msgid="2539532364144025569">"फोन संचयन पूर्ण भरले आहे. स्थान मोकळे करण्यासाठी काही फाइल हटवा."</string>
     <plurals name="ssl_ca_cert_warning" formatted="false" msgid="2288194355006173029">
       <item quantity="other">प्रमाणपत्र अधिकार इंस्टॉल केले</item>
@@ -195,7 +195,7 @@
     <string name="location_changed_notification_text" msgid="7158423339982706912">"अधिक जाणून घेण्यासाठी तुमच्या आयटी ॲडमिनशी संपर्क साधा"</string>
     <string name="country_detector" msgid="7023275114706088854">"कंट्री डिटेक्टर"</string>
     <string name="location_service" msgid="2439187616018455546">"स्थान सेवा"</string>
-    <string name="sensor_notification_service" msgid="7474531979178682676">"सेंसर सूचना सेवा"</string>
+    <string name="sensor_notification_service" msgid="7474531979178682676">"सेन्सर सूचना सेवा"</string>
     <string name="twilight_service" msgid="8964898045693187224">"ट्वायलाइट सेवा"</string>
     <string name="factory_reset_warning" msgid="6858705527798047809">"तुमचे डिव्हाइस मिटविले जाईल"</string>
     <string name="factory_reset_message" msgid="2657049595153992213">"प्रशासक अ‍ॅप वापरता येणार नाही. तुमचे डिव्हाइस आता साफ केले जाईल.\n\nतुम्हाला कुठलेही प्रश्न असल्यास, तुमच्या संस्थेच्या प्रशासकाशी संपर्क साधा."</string>
@@ -314,7 +314,7 @@
     <string name="permgrouplab_phone" msgid="570318944091926620">"फोन"</string>
     <string name="permgroupdesc_phone" msgid="270048070781478204">"फोन कॉल आणि व्यवस्थापित"</string>
     <string name="permgrouplab_sensors" msgid="9134046949784064495">"शरीर सेन्सर"</string>
-    <string name="permgroupdesc_sensors" msgid="2610631290633747752">"आपल्‍या महत्त्वाच्या मापनांविषयी सेंसर डेटा अ‍ॅक्सेस करा"</string>
+    <string name="permgroupdesc_sensors" msgid="2610631290633747752">"आपल्‍या महत्त्वाच्या मापनांविषयी सेन्सर डेटा अ‍ॅक्सेस करा"</string>
     <string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"विंडोमधील आशय पुन्हा मिळवा"</string>
     <string name="capability_desc_canRetrieveWindowContent" msgid="6195610527625237661">"तुम्ही वापरत असलेल्‍या विंडोमधील आशय तपासा."</string>
     <string name="capability_title_canRequestTouchExploration" msgid="327598364696316213">"स्पर्श करून अन्वेषण सुरू करा"</string>
@@ -386,7 +386,7 @@
     <string name="permlab_getPackageSize" msgid="375391550792886641">"अ‍ॅप संचयन स्थान मोजा"</string>
     <string name="permdesc_getPackageSize" msgid="742743530909966782">"अ‍ॅप ला त्याचा कोड, डेटा आणि कॅशे    आकार पुनर्प्राप्त करण्यासाठी अनुमती देते"</string>
     <string name="permlab_writeSettings" msgid="8057285063719277394">"सिस्टम सेटिंग्ज सुधारित करा"</string>
-    <string name="permdesc_writeSettings" msgid="8293047411196067188">"सिस्टीमचा सेटिंग्ज डेटा सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. दुर्भावनापूर्ण अ‍ॅप्स आपल्या सिस्टीमचे कॉन्फिगरेशन दूषित करू शकतात."</string>
+    <string name="permdesc_writeSettings" msgid="8293047411196067188">"सिस्टीमचा सेटिंग्ज डेटा सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. दुर्भावनापूर्ण अ‍ॅप्स आपल्या सिस्टीमचे कॉंफिगरेशन दूषित करू शकतात."</string>
     <string name="permlab_receiveBootCompleted" msgid="6643339400247325379">"सुरूवातीस चालवा"</string>
     <string name="permdesc_receiveBootCompleted" product="tablet" msgid="5565659082718177484">"जसे सिस्टम बूट करणे समाप्त करते तसे अ‍ॅप ला स्वतः प्रारंभ करण्यास अनुमती देते. यामुळे टॅबलेट प्रारंभ करण्यास वेळ लागू शकतो आणि नेहमी सुरू राहून एकंदर टॅबलेटला धीमे करण्यास अ‍ॅप ला अनुमती देते."</string>
     <string name="permdesc_receiveBootCompleted" product="tv" msgid="4900842256047614307">"सिस्टम बूट होणे संपल्यावर ॲपला स्वतः सुरू होण्याची अनुमती देते. यामुळे तुमच्या Android TV डिव्हाइसला सुरू होण्यास वेळ लागू शकतो आणि नेहमी सुरू राहून एकंदर डिव्हाइसलाच धीमे करण्याची अनुमती ॲपला देते."</string>
@@ -409,15 +409,15 @@
     <string name="permdesc_writeCallLog" product="tablet" msgid="2657525794731690397">"येणार्‍या आणि केल्या जाणार्‍या कॉलविषयीच्या डेटासह, आपल्या टॅब्लेटचा कॉल लॉग सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. दुर्भावनापूर्ण अ‍ॅप्स तुमचा कॉल लॉग मिटवण्यासाठी किंवा सुधारित करण्यासाठी याचा वापर करू शकतात."</string>
     <string name="permdesc_writeCallLog" product="tv" msgid="3934939195095317432">"येणार्‍या आणि केल्या जाणार्‍या कॉलविषयीच्या डेटासह, तुमच्या Android TV डिव्हाइसचा कॉल लॉग सुधारित करण्यासाठी ॲपला अनुमती देते. दुर्भावनापूर्ण अ‍ॅप्स तुमचा कॉल लॉग मिटवण्यासाठी किंवा सुधारित करण्यासाठी याचा वापर करू शकतात."</string>
     <string name="permdesc_writeCallLog" product="default" msgid="5903033505665134802">"येणार्‍या आणि केल्या जाणार्‍या कॉलविषयीच्या डेटासह, आपल्या फोनचा कॉल लॉग सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. दुर्भावनापूर्ण अ‍ॅप्स तुमचा कॉल लॉग मिटवण्यासाठी किंवा सुधारित करण्यासाठी याचा वापर करू शकतात."</string>
-    <string name="permlab_bodySensors" msgid="3411035315357380862">"शरीर सेंसर (हृदय गती मॉनिटरसारखे) अ‍ॅक्सेस करा"</string>
+    <string name="permlab_bodySensors" msgid="3411035315357380862">"शरीर सेन्सर (हृदय गती मॉनिटरसारखे) अ‍ॅक्सेस करा"</string>
     <string name="permdesc_bodySensors" product="default" msgid="2365357960407973997">"हृदय गती सारख्या, आपल्या शारीरिक स्थितीचे नियंत्रण करणार्‍या सेन्सरवरून डेटामध्ये प्रवेश करण्यासाठी ॲपला अनुमती देते."</string>
     <string name="permlab_readCalendar" msgid="6408654259475396200">"कॅलेंडर इव्हेंट आणि तपशील वाचा"</string>
     <string name="permdesc_readCalendar" product="tablet" msgid="515452384059803326">"हा अ‍ॅप आपल्या टॅब्लेटवर स्टोअर केलेले सर्व कॅलेंडर इव्हेंट वाचू आणि शेअर करू शकतो किंवा तुमचा कॅलेंडर डेटा सेव्ह करू शकतो."</string>
-    <string name="permdesc_readCalendar" product="tv" msgid="5811726712981647628">"हे ॲप तुमच्या Android TV डिव्हाइसवर स्टोअर केलेले सर्व कॅलेंडर इव्हेंट वाचू आणि शेअर करू शकतो किंवा तुमचा कॅलेंडर डेटा सेव्ह करू शकतो."</string>
+    <string name="permdesc_readCalendar" product="tv" msgid="5811726712981647628">"हे अ‍ॅप तुमच्या Android TV डिव्हाइसवर स्टोअर केलेले सर्व कॅलेंडर इव्हेंट वाचू आणि शेअर करू शकतो किंवा तुमचा कॅलेंडर डेटा सेव्ह करू शकतो."</string>
     <string name="permdesc_readCalendar" product="default" msgid="9118823807655829957">"हा अ‍ॅप आपल्या फोनवर स्टोअर केलेले सर्व कॅलेंडर इव्हेंट वाचू आणि शेअर करू शकतो किंवा तुमचा कॅलेंडर डेटा सेव्ह करू शकतो."</string>
     <string name="permlab_writeCalendar" msgid="6422137308329578076">"कॅलेंडर इव्हेंट जोडा किंवा बदला आणि मालकाला न कळवता अतिथींना ईमेल पाठवा"</string>
     <string name="permdesc_writeCalendar" product="tablet" msgid="8722230940717092850">"हा अ‍ॅप आपल्या टॅब्लेटवर कॅलेंडर इव्हेंट जोडू, काढू किंवा बदलू शकतो. हा अ‍ॅप कॅलेंडर मालकांकडून येत आहेत असे वाटणारे मेसेज पाठवू किंवा त्यांच्या मालकांना सूचित केल्याशिवाय इव्हेंट बदलू शकतो."</string>
-    <string name="permdesc_writeCalendar" product="tv" msgid="951246749004952706">"हे ॲप तुमच्या Android TV डिव्हाइसवर कॅलेंडर इव्हेंट जोडू, काढू किंवा बदलू शकतो. हे अ‍ॅप कॅलेंडर मालकांकडून येत आहेत असे वाटणारे मेसेज पाठवू किंवा त्यांच्या मालकांना सूचित केल्याशिवाय इव्हेंट बदलू शकतो."</string>
+    <string name="permdesc_writeCalendar" product="tv" msgid="951246749004952706">"हे अ‍ॅप तुमच्या Android TV डिव्हाइसवर कॅलेंडर इव्हेंट जोडू, काढू किंवा बदलू शकतो. हे अ‍ॅप कॅलेंडर मालकांकडून येत आहेत असे वाटणारे मेसेज पाठवू किंवा त्यांच्या मालकांना सूचित केल्याशिवाय इव्हेंट बदलू शकतो."</string>
     <string name="permdesc_writeCalendar" product="default" msgid="5416380074475634233">"हा अ‍ॅप आपल्या फोनवर कॅलेंडर इव्हेंट जोडू, काढू किंवा बदलू शकतो. हा अ‍ॅप कॅलेंडर मालकांकडून येत आहेत असे वाटणारे मेसेज पाठवू किंवा त्यांच्या मालकांना सूचित केल्याशिवाय इव्हेंट बदलू शकतो."</string>
     <string name="permlab_accessLocationExtraCommands" msgid="5162339812057983988">"अतिरिक्त स्थान प्रदाता आदेश अ‍ॅक्सेस करा"</string>
     <string name="permdesc_accessLocationExtraCommands" msgid="355369611979907967">"अ‍ॅपला अतिरिक्त स्‍थान प्रदाता आदेशावर प्रवेश करण्‍याची अनुमती देते. हे कदाचित अ‍ॅपला GPS किंवा इतर स्‍थान स्रोत च्या ऑपरेशनमध्‍ये हस्तक्षेप करण्‍याची अनुमती देऊ शकते."</string>
@@ -558,7 +558,7 @@
     <string name="fingerprint_error_canceled" msgid="540026881380070750">"फिंगरप्रिंट ऑपरेशन रद्द झाले."</string>
     <string name="fingerprint_error_user_canceled" msgid="7685676229281231614">"वापरकर्त्याने फिंगरप्रिंट ऑपरेशन रद्द केले."</string>
     <string name="fingerprint_error_lockout" msgid="7853461265604738671">"खूप प्रयत्न केले. नंतर पुन्हा प्रयत्न करा."</string>
-    <string name="fingerprint_error_lockout_permanent" msgid="3895478283943513746">"खूप प्रयत्न करून झाले. फिंगरप्रिंट सेंसर बंद आहे."</string>
+    <string name="fingerprint_error_lockout_permanent" msgid="3895478283943513746">"खूप प्रयत्न करून झाले. फिंगरप्रिंट सेन्सर बंद आहे."</string>
     <string name="fingerprint_error_unable_to_process" msgid="1148553603490048742">"पुन्हा प्रयत्न करा."</string>
     <string name="fingerprint_error_no_fingerprints" msgid="8671811719699072411">"कोणत्याही फिंगरप्रिंटची नोंद झाली नाही"</string>
     <string name="fingerprint_error_hw_not_present" msgid="578914350967423382">"या डिव्हाइसमध्ये फिंगरप्रिंट सेन्सर नाही."</string>
@@ -650,7 +650,7 @@
     <string name="permlab_bindDreamService" msgid="4776175992848982706">"स्‍वप्न सेवेवर प्रतिबद्ध करा"</string>
     <string name="permdesc_bindDreamService" msgid="9129615743300572973">"होल्‍डरला स्‍वप्नसेवेच्या शीर्ष-स्‍तराच्या इंटरफेसशी प्रतिबद्ध करण्‍यास अनुमती देते. सामान्‍य अ‍ॅप्‍सकरिता कधीही आवश्‍यक नसते."</string>
     <string name="permlab_invokeCarrierSetup" msgid="5098810760209818140">"वाहकाद्वारे-प्रदान केलेल्‍या कॉन्‍फिगरेशन अ‍ॅपची विनंती करा"</string>
-    <string name="permdesc_invokeCarrierSetup" msgid="4790845896063237887">"होल्‍डरला वाहकद्वारे-प्रदान केलेल्या कॉन्फिगरेशन अ‍ॅपची विनंती करण्‍याची अनुमती देते. सामान्‍य अ‍ॅप्‍ससाठी कधीही आवश्‍यक नसावे."</string>
+    <string name="permdesc_invokeCarrierSetup" msgid="4790845896063237887">"होल्‍डरला वाहकद्वारे-प्रदान केलेल्या कॉंफिगरेशन अ‍ॅपची विनंती करण्‍याची अनुमती देते. सामान्‍य अ‍ॅप्‍ससाठी कधीही आवश्‍यक नसावे."</string>
     <string name="permlab_accessNetworkConditions" msgid="1270732533356286514">"नेटवर्क स्‍थितींवरील निरीक्षणांसाठी ऐका"</string>
     <string name="permdesc_accessNetworkConditions" msgid="2959269186741956109">"अनु्प्रयोगाला नेटवर्क स्‍थितींवरील निरीक्षणे ऐकण्‍यासाठी अनुमती देते. सामान्‍य अ‍ॅप्‍ससाठी कधीही आवश्‍यक नसावे."</string>
     <string name="permlab_setInputCalibration" msgid="932069700285223434">"इनपुट डिव्हाइस कॅलिब्रेशन बदला"</string>
@@ -666,7 +666,7 @@
     <string name="permlab_bindCarrierServices" msgid="2395596978626237474">"वाहक सेवांवर प्रतिबद्ध करा"</string>
     <string name="permdesc_bindCarrierServices" msgid="9185614481967262900">"वाहक सेवांवर प्रतिबद्ध करण्यासाठी होल्डरला अनुमती देते. सामान्य ॲप्ससाठी कधीही आवश्यकता नसावी."</string>
     <string name="permlab_access_notification_policy" msgid="5524112842876975537">"व्यत्यय आणू नका अ‍ॅक्सेस करा"</string>
-    <string name="permdesc_access_notification_policy" msgid="8538374112403845013">"व्यत्यय आणू नका कॉन्फिगरेशन वाचण्यासाठी आणि लिहिण्यासाठी ॲपला अनुमती देते."</string>
+    <string name="permdesc_access_notification_policy" msgid="8538374112403845013">"व्यत्यय आणू नका कॉंफिगरेशन वाचण्यासाठी आणि लिहिण्यासाठी ॲपला अनुमती देते."</string>
     <string name="permlab_startViewPermissionUsage" msgid="1504564328641112341">"व्ह्यू परवानगी वापर सुरू करा"</string>
     <string name="permdesc_startViewPermissionUsage" msgid="2820325605959586538">"धारकास अ‍ॅपसाठी परवानगी वापरणे सुरू करण्याची अनुमती देते. सामान्य अ‍ॅप्ससाठी कधीही आवश्यकता नसते."</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"पासवर्ड नियम सेट करा"</string>
@@ -745,7 +745,7 @@
   </string-array>
     <string name="phoneTypeCustom" msgid="5120365721260686814">"कस्टम"</string>
     <string name="phoneTypeHome" msgid="3880132427643623588">"घर"</string>
-    <string name="phoneTypeMobile" msgid="1178852541462086735">"मोबाईल"</string>
+    <string name="phoneTypeMobile" msgid="1178852541462086735">"मोबाइल"</string>
     <string name="phoneTypeWork" msgid="6604967163358864607">"कार्य"</string>
     <string name="phoneTypeFaxWork" msgid="6757519896109439123">"कार्य फॅक्स"</string>
     <string name="phoneTypeFaxHome" msgid="6678559953115904345">"निवास फॅक्स"</string>
@@ -760,7 +760,7 @@
     <string name="phoneTypeRadio" msgid="2637819130239264771">"रेडिओ"</string>
     <string name="phoneTypeTelex" msgid="2558783611711876562">"टेलेक्स"</string>
     <string name="phoneTypeTtyTdd" msgid="532038552105328779">"TTY TDD"</string>
-    <string name="phoneTypeWorkMobile" msgid="7522314392003565121">"कार्य मोबाईल"</string>
+    <string name="phoneTypeWorkMobile" msgid="7522314392003565121">"कार्य मोबाइल"</string>
     <string name="phoneTypeWorkPager" msgid="3748332310638505234">"कार्य पेजर"</string>
     <string name="phoneTypeAssistant" msgid="757550783842231039">"असिस्टंट"</string>
     <string name="phoneTypeMms" msgid="1799747455131365989">"MMS"</string>
@@ -772,7 +772,7 @@
     <string name="emailTypeHome" msgid="1597116303154775999">"घर"</string>
     <string name="emailTypeWork" msgid="2020095414401882111">"कार्य"</string>
     <string name="emailTypeOther" msgid="5131130857030897465">"अन्य"</string>
-    <string name="emailTypeMobile" msgid="787155077375364230">"मोबाईल"</string>
+    <string name="emailTypeMobile" msgid="787155077375364230">"मोबाइल"</string>
     <string name="postalTypeCustom" msgid="5645590470242939129">"कस्टम"</string>
     <string name="postalTypeHome" msgid="7562272480949727912">"घर"</string>
     <string name="postalTypeWork" msgid="8553425424652012826">"कार्य"</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"अनलॉक करण्‍यासाठी मेनू दाबा किंवा आणीबाणीचा कॉल करा."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"अनलॉक करण्यासाठी मेनू दाबा."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"अनलॉक करण्यासाठी पॅटर्न काढा"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"आणीबाणी"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"आणीबाणी कॉल"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"कॉलवर परत या"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"अचूक!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"पुन्हा प्रयत्न करा"</string>
@@ -874,11 +874,11 @@
     <string name="lockscreen_glogin_forgot_pattern" msgid="9218940117797602518">"खाते अनलॉक करा"</string>
     <string name="lockscreen_glogin_too_many_attempts" msgid="3775904917743034195">"बरेच पॅटर्न प्रयत्न"</string>
     <string name="lockscreen_glogin_instructions" msgid="4695162942525531700">"अनलॉक करण्यासाठी, आपल्या Google खात्यासह साइन इन करा."</string>
-    <string name="lockscreen_glogin_username_hint" msgid="6916101478673157045">"वापरकर्तानाव (ईमेल)"</string>
+    <string name="lockscreen_glogin_username_hint" msgid="6916101478673157045">"वापरकर्ता नाव (ईमेल)"</string>
     <string name="lockscreen_glogin_password_hint" msgid="3031027901286812848">"पासवर्ड"</string>
     <string name="lockscreen_glogin_submit_button" msgid="3590556636347843733">"साइन इन करा"</string>
-    <string name="lockscreen_glogin_invalid_input" msgid="4369219936865697679">"अवैध वापरकर्तानाव किंवा पासवर्ड."</string>
-    <string name="lockscreen_glogin_account_recovery_hint" msgid="1683405808525090649">"तुमचे वापरकर्तानाव किंवा पासवर्ड विसरलात?\n "<b>"google.com/accounts/recovery"</b>" ला भेट द्या."</string>
+    <string name="lockscreen_glogin_invalid_input" msgid="4369219936865697679">"अवैध वापरकर्ता नाव किंवा पासवर्ड."</string>
+    <string name="lockscreen_glogin_account_recovery_hint" msgid="1683405808525090649">"तुमचे वापरकर्ता नाव किंवा पासवर्ड विसरलात?\n "<b>"google.com/accounts/recovery"</b>" ला भेट द्या."</string>
     <string name="lockscreen_glogin_checking_password" msgid="2607271802803381645">"तपासत आहे..."</string>
     <string name="lockscreen_unlock_label" msgid="4648257878373307582">"अनलॉक करा"</string>
     <string name="lockscreen_sound_on_label" msgid="1660281470535492430">"ध्वनी सुरू"</string>
@@ -954,7 +954,7 @@
     <string name="permdesc_readHistoryBookmarks" msgid="2323799501008967852">"ब्राउझरने भेट दिलेल्या सर्व URL चा इतिहास आणि ब्राउझरचे सर्व बुकमार्क वाचण्यास अ‍ॅप ला अनुमती देते. टीप: या परवानगीची तृतीय-पक्ष ब्राउझरद्वारे किंवा वेब ब्राउझिंग क्षमता असलेल्या अन्य अनुप्रयोगांद्वारे अंमलबजावणी करू शकत नाही."</string>
     <string name="permlab_writeHistoryBookmarks" msgid="6090259925187986937">"वेब बुकमार्क आणि इतिहास लिहा"</string>
     <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="573341025292489065">"तुमच्या टॅब्लेटवर स्टोअर केलेला ब्राउझरचा इतिहास किंवा बुकमार्क सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. हे ब्राउझर डेटा मिटविण्यासाठी किंवा सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. टीप: ही परवानगी तृतीय पक्ष ब्राउझरद्वारे किंवा वेब ब्राउझिंग क्षमतांसह अन्य अ‍ॅप्लिकेशनद्वारे अंमलबजावणी करण्याची टीप देऊ शकते."</string>
-    <string name="permdesc_writeHistoryBookmarks" product="tv" msgid="88642768580408561">"तुमच्या Android TV डिव्हाइसवर साठवलेला ब्राउझरचा इतिहास किंवा बुकमार्क सुधारित करण्यासाठी ॲप ला अनुमती देते. हे ॲपला ब्राउझर डेटा मिटवण्याची किंवा सुधारित करण्याची परवानगी देते. टीप: ही परवानगी तृतीय पक्ष ब्राउझरद्वारे किंवा वेब ब्राउझिंग क्षमतांसह अन्य अ‍ॅप्लिकेशनद्वारे अंमलबजावणी करण्याची टीप देऊ शकते."</string>
+    <string name="permdesc_writeHistoryBookmarks" product="tv" msgid="88642768580408561">"तुमच्या Android TV डिव्हाइसवर साठवलेला ब्राउझरचा इतिहास किंवा बुकमार्क सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. हे अ‍ॅपला ब्राउझर डेटा मिटवण्याची किंवा सुधारित करण्याची परवानगी देते. टीप: ही परवानगी तृतीय पक्ष ब्राउझरद्वारे किंवा वेब ब्राउझिंग क्षमतांसह अन्य अ‍ॅप्लिकेशनद्वारे अंमलबजावणी करण्याची टीप देऊ शकते."</string>
     <string name="permdesc_writeHistoryBookmarks" product="default" msgid="2245203087160913652">"तुमच्या फोनवर स्टोअर केलेला ब्राउझरचा इतिहास किंवा बुकमार्क सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. हे ब्राउझर डेटा मिटविण्यासाठी किंवा सुधारित करण्यासाठी अ‍ॅप ला अनुमती देते. टीप: ही परवानगी तृतीय पक्ष ब्राउझरद्वारे किंवा वेब ब्राउझिंग क्षमतांसह अन्य अ‍ॅप्लिकेशनद्वारे अंमलबजावणी करण्याची टीप देऊ शकते."</string>
     <string name="permlab_setAlarm" msgid="1158001610254173567">"अलार्म सेट करा"</string>
     <string name="permdesc_setAlarm" msgid="2185033720060109640">"इंस्टॉल केलेल्या अलार्म घड्याळ ॲपमध्ये अलार्म सेट करण्यासाठी ॲपला अनुमती देते. काही अलार्म घड्याळ ॲप्समध्ये हे वैशिष्ट्य नसू शकते."</string>
@@ -1266,8 +1266,8 @@
     <string name="sms_control_yes" msgid="4858845109269524622">"अनुमती द्या"</string>
     <string name="sms_control_no" msgid="4845717880040355570">"नकार द्या"</string>
     <string name="sms_short_code_confirm_message" msgid="1385416688897538724">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; हा &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;वर एक मेसेज पाठवू इच्छितो."</string>
-    <string name="sms_short_code_details" msgid="2723725738333388351">"यामुळे आपल्या मोबाईल खात्यावर "<b>"शुल्क आकारले जाऊ शकते"</b>"."</string>
-    <string name="sms_premium_short_code_details" msgid="1400296309866638111"><b>"यामुळे आपल्या मोबाईल खात्यावर शुल्क आकारले जाऊ शकते."</b></string>
+    <string name="sms_short_code_details" msgid="2723725738333388351">"यामुळे आपल्या मोबाइल खात्यावर "<b>"शुल्क आकारले जाऊ शकते"</b>"."</string>
+    <string name="sms_premium_short_code_details" msgid="1400296309866638111"><b>"यामुळे आपल्या मोबाइल खात्यावर शुल्क आकारले जाऊ शकते."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="920477594325526691">"पाठवा"</string>
     <string name="sms_short_code_confirm_deny" msgid="1356917469323768230">"रद्द करा"</string>
     <string name="sms_short_code_remember_choice" msgid="1374526438647744862">"माझी वड लक्षात ठेवा"</string>
@@ -1275,10 +1275,10 @@
     <string name="sms_short_code_confirm_always_allow" msgid="2223014893129755950">"नेहमी अनुमती द्या"</string>
     <string name="sms_short_code_confirm_never_allow" msgid="2688828813521652079">"कधीही अनुमती देऊ नका"</string>
     <string name="sim_removed_title" msgid="5387212933992546283">"सिम कार्ड काढले"</string>
-    <string name="sim_removed_message" msgid="9051174064474904617">"तुम्ही एक वैध सिम कार्ड घालून प्रारंभ करेपर्यंत मोबाईल नेटवर्क अनुपलब्ध असेल."</string>
+    <string name="sim_removed_message" msgid="9051174064474904617">"तुम्ही एक वैध सिम कार्ड घालून प्रारंभ करेपर्यंत मोबाइल नेटवर्क अनुपलब्ध असेल."</string>
     <string name="sim_done_button" msgid="6464250841528410598">"पूर्ण झाले"</string>
     <string name="sim_added_title" msgid="7930779986759414595">"सिम कार्ड जोडले"</string>
-    <string name="sim_added_message" msgid="6602906609509958680">"मोबाईल नेटवर्कवर अ‍ॅक्सेस करण्यासाठी तुमचे डिव्हाइस रीस्टार्ट करा."</string>
+    <string name="sim_added_message" msgid="6602906609509958680">"मोबाइल नेटवर्कवर अ‍ॅक्सेस करण्यासाठी तुमचे डिव्हाइस रीस्टार्ट करा."</string>
     <string name="sim_restart_button" msgid="8481803851341190038">"रीस्टार्ट"</string>
     <string name="install_carrier_app_notification_title" msgid="5712723402213090102">"मोबाइल सेवा अ‍ॅक्टिव्हेट करा"</string>
     <string name="install_carrier_app_notification_text" msgid="2781317581274192728">"तुमचे नवीन सिम अ‍ॅक्टिव्हेट करण्यासाठी वाहकाचे अ‍ॅप डाउनलोड करा"</string>
@@ -1329,7 +1329,7 @@
     <string name="select_input_method" msgid="3971267998568587025">"इनपुट पद्धत निवडा"</string>
     <string name="show_ime" msgid="6406112007347443383">"भौतिक कीबोर्ड सक्रिय असताना त्यास स्क्रीनवर ठेवा"</string>
     <string name="hardware" msgid="1800597768237606953">"व्हर्च्युअल कीबोर्ड दर्शवा"</string>
-    <string name="select_keyboard_layout_notification_title" msgid="4427643867639774118">"वास्तविक कीबोर्ड कॉन्फिगर करा"</string>
+    <string name="select_keyboard_layout_notification_title" msgid="4427643867639774118">"वास्तविक कीबोर्ड कॉंफिगर करा"</string>
     <string name="select_keyboard_layout_notification_message" msgid="8835158247369158154">"भाषा आणि लेआउट निवडण्यासाठी टॅप करा"</string>
     <string name="fast_scroll_alphabet" msgid="8854435958703888376">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
     <string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
@@ -1433,8 +1433,8 @@
     <string name="vpn_lockdown_disconnected" msgid="5573611651300764955">"कायम सुरू असलेल्या VPN मधून डिस्कनेक्ट केले"</string>
     <string name="vpn_lockdown_error" msgid="4453048646854247947">"कायम सुरू असलेल्या VPN शी कनेक्ट करता आले नाही"</string>
     <string name="vpn_lockdown_config" msgid="8331697329868252169">"नेटवर्क किंवा VPN सेटिंग्ज बदला"</string>
-    <string name="upload_file" msgid="8651942222301634271">"फाईल निवडा"</string>
-    <string name="no_file_chosen" msgid="4146295695162318057">"फाईल निवडली नाही"</string>
+    <string name="upload_file" msgid="8651942222301634271">"फाइल निवडा"</string>
+    <string name="no_file_chosen" msgid="4146295695162318057">"फाइल निवडली नाही"</string>
     <string name="reset" msgid="3865826612628171429">"रीसेट करा"</string>
     <string name="submit" msgid="862795280643405865">"सबमिट करा"</string>
     <string name="car_mode_disable_notification_title" msgid="8450693275833142896">"ड्रायव्हिंग अ‍ॅप सुरू आहे"</string>
@@ -1599,11 +1599,11 @@
     <string name="kg_invalid_confirm_pin_hint" product="default" msgid="4705368340409816254">"पिन कोड जुळत नाहीत"</string>
     <string name="kg_login_too_many_attempts" msgid="699292728290654121">"बरेच पॅटर्न प्रयत्न"</string>
     <string name="kg_login_instructions" msgid="3619844310339066827">"अनलॉक करण्यासाठी, आपल्या Google खात्यासह साइन इन करा."</string>
-    <string name="kg_login_username_hint" msgid="1765453775467133251">"वापरकर्तानाव (ईमेल)"</string>
+    <string name="kg_login_username_hint" msgid="1765453775467133251">"वापरकर्ता नाव (ईमेल)"</string>
     <string name="kg_login_password_hint" msgid="3330530727273164402">"पासवर्ड"</string>
     <string name="kg_login_submit_button" msgid="893611277617096870">"साइन इन करा"</string>
-    <string name="kg_login_invalid_input" msgid="8292367491901220210">"अवैध वापरकर्तानाव किंवा पासवर्ड."</string>
-    <string name="kg_login_account_recovery_hint" msgid="4892466171043541248">"तुमचे वापरकर्तानाव किंवा पासवर्ड विसरलात?\n "<b>"google.com/accounts/recovery"</b>" ला भेट द्या."</string>
+    <string name="kg_login_invalid_input" msgid="8292367491901220210">"अवैध वापरकर्ता नाव किंवा पासवर्ड."</string>
+    <string name="kg_login_account_recovery_hint" msgid="4892466171043541248">"तुमचे वापरकर्ता नाव किंवा पासवर्ड विसरलात?\n "<b>"google.com/accounts/recovery"</b>" ला भेट द्या."</string>
     <string name="kg_login_checking_password" msgid="4676010303243317253">"खाते तपासत आहे…"</string>
     <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="23741434207544038">"तुम्ही तुमचा पिन <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा अयोग्यरितीने टाइप केला आहे. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
     <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="3328686432962224215">"तुम्ही तुमचा पासवर्ड <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा अयोग्यरितीने टाइप केला आहे. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"आपल्या प्रशासकाने अपडेट केले"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"आपल्या प्रशासकाने हटवले"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ओके"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"बॅटरीचे आयुष्य वाढवण्यासाठी बॅटरी सेव्हर:\n\n•गडद थीम सुरू करते\n•बॅकग्राउंड ॲक्टिव्हिटी, काही व्हिज्युअल इफेक्ट आणि \"Ok Google\" यांसारखी वैशिष्ट्ये बंद किंवा मर्यादित करते.\n\n"<annotation id="url">"अधिक जाणून घ्या"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"बॅटरीचे आयुष्य वाढवण्यासाठी बॅटरी सेव्हर:\n\n•गडद थीम सुरू करते\n•बॅकग्राउंड ॲक्टिव्हिटी, काही व्हिज्युअल इफेक्ट आणि \"Ok Google\" यांसारखी वैशिष्ट्ये बंद किंवा मर्यादित करते."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"बॅटरी लाइफ वाढवण्यासाठी बॅटरी सेव्हर:\n\n•गडद थीम सुरू करते\n•बॅकग्राउंड ॲक्टिव्हिटी, काही व्हिज्युअल इफेक्ट आणि \"Ok Google\" यांसारखी वैशिष्ट्ये बंद किंवा मर्यादित करते.\n\n"<annotation id="url">"अधिक जाणून घ्या"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"बॅटरी लाइफ वाढवण्यासाठी बॅटरी सेव्हर:\n\n• गडद थीम सुरू करते\n• बॅकग्राउंड ॲक्टिव्हिटी, काही व्हिज्युअल इफेक्ट आणि “Ok Google” यांसारखी इतर वैशिष्ट्ये बंद किंवा मर्यादित करते"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"डेटाचा वापर कमी करण्यात मदत करण्यासाठी काही अ‍ॅप्सना बॅकग्राउंडमध्ये डेटा पाठवण्यास किंवा मिळवण्यास डेटा सर्व्हर प्रतिबंध करतो. तुम्ही सध्या वापरत असलेले अ‍ॅप डेटा अ‍ॅक्सेस करू शकते, पण तसे खूप कमी वेळा होते. याचाच अर्थ असा की, तुम्ही इमेजवर टॅप करेपर्यंत त्या डिस्प्ले होणार नाहीत असे होऊ शकते."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"डेटा सेव्हर सुरू करायचे?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"सुरू करा"</string>
@@ -1909,7 +1909,7 @@
     <string name="demo_starting_message" msgid="6577581216125805905">"डेमो प्रारंभ करत आहे..."</string>
     <string name="demo_restarting_message" msgid="1160053183701746766">"डिव्हाइस रीसेट करत आहे..."</string>
     <string name="suspended_widget_accessibility" msgid="6331451091851326101">"<xliff:g id="LABEL">%1$s</xliff:g> अक्षम केले"</string>
-    <string name="conference_call" msgid="5731633152336490471">"कॉन्फरन्स कॉल"</string>
+    <string name="conference_call" msgid="5731633152336490471">"कॉंफरन्स कॉल"</string>
     <string name="tooltip_popup_title" msgid="7863719020269945722">"टूलटिप"</string>
     <string name="app_category_game" msgid="4534216074910244790">"गेम"</string>
     <string name="app_category_audio" msgid="8296029904794676222">"संगीत आणि ऑडिओ"</string>
@@ -1956,7 +1956,7 @@
     <string name="autofill_save_type_debit_card" msgid="3169397504133097468">"डेबिट कार्ड"</string>
     <string name="autofill_save_type_payment_card" msgid="6555012156728690856">"पेमेंट कार्ड"</string>
     <string name="autofill_save_type_generic_card" msgid="1019367283921448608">"कार्ड"</string>
-    <string name="autofill_save_type_username" msgid="1018816929884640882">"वापरकर्तानाव"</string>
+    <string name="autofill_save_type_username" msgid="1018816929884640882">"वापरकर्ता नाव"</string>
     <string name="autofill_save_type_email_address" msgid="1303262336895591924">"ईमेल ॲड्रेस"</string>
     <string name="etws_primary_default_message_earthquake" msgid="8401079517718280669">"शांत रहा आणि जवळपास निवारा शोधा."</string>
     <string name="etws_primary_default_message_tsunami" msgid="5828171463387976279">"किनारपट्टीचे प्रदेश आणि नदीकाठची क्षेत्रे त्वरित रिकामी करून उंच मैदानासारख्या अधिक सुरक्षित ठिकाणी जा."</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 6d2d060..f715dc6 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Tekan Menu untuk menyahsekat atau membuat panggilan kecemasan."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Tekan Menu untuk membuka kunci."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Lukiskan corak untuk membuka kunci"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Kecemasan"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Panggilan kecemasan"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Kembali ke panggilan"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Betul!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Cuba lagi"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Dikemas kini oleh pentadbir anda"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Dipadamkan oleh pentadbir anda"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Untuk melanjutkan hayat bateri, Penjimat Bateri:\n\n•Menghidupkan Tema gelap\n•Mematikan atau mengehadkan aktiviti latar belakang, sesetengah kesan visual dan ciri lain seperti “Ok Google”\n\n"<annotation id="url">"Ketahui lebih lanjut"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Untuk melanjutkan hayat bateri, Penjimat Bateri:\n\n•Menghidupkan Tema gelap\n•Mematikan atau mengehadkan aktiviti latar belakang, sesetengah kesan visual dan ciri lain seperti “Ok Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Untuk melanjutkan hayat bateri, Penjimat Bateri:\n\n• Menghidupkan Tema gelap\n• Mematikan atau mengehadkan aktiviti latar belakang, sesetengah kesan visual dan ciri lain seperti “Ok Google”\n\n"<annotation id="url">"Ketahui lebih lanjut"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Untuk melanjutkan hayat bateri, Penjimat Bateri:\n\n•Menghidupkan Tema gelap\n• Mematikan atau mengehadkan aktiviti latar belakang, sesetengah kesan visual dan ciri-ciri lain seperti “Ok Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Untuk membantu mengurangkan penggunaan data, Penjimat Data menghalang sesetengah apl daripada menghantar atau menerima data di latar. Apl yang sedang digunakan boleh mengakses data tetapi mungkin tidak secara kerap. Perkara ini mungkin bermaksud bahawa imej tidak dipaparkan sehingga anda mengetik pada imej itu, contohnya."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Hidupkan Penjimat Data?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Hidupkan"</string>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index b9bf08f..9ba7fef 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"ဖွင့်ရန်သို့မဟုတ်အရေးပေါ်ခေါ်ဆိုခြင်းပြုလုပ်ရန် မီနူးကိုနှိပ်ပါ"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"မီးနူးကို နှိပ်ခြင်းဖြင့် သော့ဖွင့်ပါ"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"ဖွင့်ရန်ပုံစံဆွဲပါ"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"အရေးပေါ်"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"အရေးပေါ် ခေါ်ဆိုမှု"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"ခေါ်ဆိုမှုထံပြန်သွားရန်"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"မှန်ပါသည်"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"ထပ် စမ်းပါ"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"သင်၏ စီမံခန့်ခွဲသူက အပ်ဒိတ်လုပ်ထားသည်"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"သင်၏ စီမံခန့်ခွဲသူက ဖျက်လိုက်ပါပြီ"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ဘက်ထရီသက်တမ်း ပိုရှည်စေရန် \'ဘက်ထရီအားထိန်း\' က- \n\n•မှောင်သည့် အပြင်အဆင်ကို ဖွင့်သည်\n•နောက်ခံလုပ်ဆောင်ချက်၊ ပြသမှုဆိုင်ရာ အထူးပြုလုပ်ချက်အချို့နှင့် “Ok Google” ကဲ့သို့ အခြား ဝန်ဆောင်မှုများကို ပိတ်သည် သို့မဟုတ် ကန့်သတ်သည်\n\n"<annotation id="url">"ပိုမိုလေ့လာရန်"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ဘက်ထရီသက်တမ်း ပိုရှည်စေရန် \'ဘက်ထရီအားထိန်း\' က- \n\n•မှောင်သည့် အပြင်အဆင်ကို ဖွင့်သည်\n•နောက်ခံလုပ်ဆောင်ချက်၊ ပြသမှုဆိုင်ရာ အထူးပြုလုပ်ချက်အချို့နှင့် “Ok Google” ကဲ့သို့ အခြား ဝန်ဆောင်မှုများကို ပိတ်သည် သို့မဟုတ် ကန့်သတ်သည်"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ဘက်ထရီသက်တမ်း ပိုရှည်စေရန် \'ဘက်ထရီအားထိန်း\' က- \n\n• မှောင်သည့် အပြင်အဆင်ကို ဖွင့်သည်\n• နောက်ခံလုပ်ဆောင်ချက်၊ ပြသမှုဆိုင်ရာ အထူးပြုလုပ်ချက်အချို့နှင့် “Ok Google” ကဲ့သို့ အခြား ဝန်ဆောင်မှုများကို ပိတ်သည် သို့မဟုတ် ကန့်သတ်သည်\n\n"<annotation id="url">"ပိုမိုလေ့လာရန်"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ဘက်ထရီသက်တမ်း ပိုရှည်စေရန် \'ဘက်ထရီအားထိန်း\' က-\n\n•မှောင်သည့် အပြင်အဆင်ကို ဖွင့်သည်\n•နောက်ခံလုပ်ဆောင်ချက်၊ ပြသမှုဆိုင်ရာ အထူးပြုလုပ်ချက်အချို့နှင့် “Ok Google” ကဲ့သို့ အခြား ဝန်ဆောင်မှုများကို ပိတ်သည် သို့မဟုတ် ကန့်သတ်သည်"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ဒေတာအသုံးလျှော့ချနိုင်ရန်အတွက် အက်ပ်များကို နောက်ခံတွင် ဒေတာပို့ခြင်းနှင့် လက်ခံခြင်းမပြုရန် \'ဒေတာချွေတာမှု\' စနစ်က တားဆီးထားပါသည်။ ယခုအက်ပ်ဖြင့် ဒေတာအသုံးပြုနိုင်သော်လည်း အကြိမ်လျှော့၍သုံးရပါမည်။ ဥပမာ၊ သင်က မတို့မချင်း ပုံများပေါ်လာမည် မဟုတ်ပါ။"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ဒေတာချွေတာမှုစနစ် ဖွင့်မလား။"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ဖွင့်ပါ"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 5099d4f..4a89f37 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Trykk på menyknappen for å låse opp eller ringe et nødnummer."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Trykk på menyknappen for å låse opp."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Tegn mønster for å låse opp"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Nødssituasjon"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Nødanrop"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Tilbake til samtale"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Riktig!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Prøv på nytt"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Oppdatert av administratoren din"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Slettet av administratoren din"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"For å forlenge batterilevetiden gjør Batterisparing dette:\n\n• Slår på mørkt tema\n• Slår av eller begrenser bakgrunnsaktivitet, enkelte visuelle effekter og andre funksjoner, for eksempel «Hey Google»\n\n"<annotation id="url">"Finn ut mer"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"For å forlenge batterilevetiden gjør Batterisparing dette:\n\n• Slår på mørkt tema\n• Slår av eller begrenser bakgrunnsaktivitet, enkelte visuelle effekter og andre funksjoner, for eksempel «Hey Google»"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"For å forlenge batterilevetiden gjør Batterisparing dette:\n\n• slår på mørkt tema\n• slår av eller begrenser bakgrunnsaktivitet, enkelte visuelle effekter og andre funksjoner, for eksempel «Hey Google»\n\n"<annotation id="url">"Finn ut mer"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"For å forlenge batterilevetiden gjør Batterisparing dette:\n\n• slår på mørkt tema\n• slår av eller begrenser bakgrunnsaktivitet, enkelte visuelle effekter og andre funksjoner, for eksempel «Hey Google»"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Datasparing hindrer noen apper fra å sende og motta data i bakgrunnen, for å redusere dataforbruket. Aktive apper kan bruke data, men kanskje ikke så mye som ellers – for eksempel vises ikke bilder før du trykker på dem."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Vil du slå på Datasparing?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Slå på"</string>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index 904354b..6723e66 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -78,18 +78,18 @@
     <string name="serviceNotProvisioned" msgid="8289333510236766193">"सेवाको व्यवस्था छैन।"</string>
     <string name="CLIRPermanent" msgid="166443681876381118">"तपाईं कलर ID सेटिङ परिवर्तन गर्न सक्नुहुन्न।"</string>
     <string name="RestrictedOnDataTitle" msgid="1500576417268169774">"कुनै पनि मोबाइल डेटा सेवा उपलब्ध छैन"</string>
-    <string name="RestrictedOnEmergencyTitle" msgid="2852916906106191866">"आपतकालीन कल सेवा उपलब्ध छैन"</string>
+    <string name="RestrictedOnEmergencyTitle" msgid="2852916906106191866">"आपत्‌कालीन कल सेवा उपलब्ध छैन"</string>
     <string name="RestrictedOnNormalTitle" msgid="7009474589746551737">"कुनै पनि भ्वाइस सेवा उपलब्ध छैन"</string>
     <string name="RestrictedOnAllVoiceTitle" msgid="3982069078579103087">"कुनै पनि भ्वाइस वा आपातकालीन कल सेवा उपलब्ध छैन"</string>
     <string name="RestrictedStateContent" msgid="7693575344608618926">"तपाईंको सेवा प्रदायकले अस्थायी रूपमा निष्क्रिय पार्नुभएको"</string>
     <string name="RestrictedStateContentMsimTemplate" msgid="5228235722511044687">"SIM <xliff:g id="SIMNUMBER">%d</xliff:g> का लागि तपाईंको सेवा प्रदायकले अस्थायी रूपमा निष्क्रिय पार्नुभएको"</string>
     <string name="NetworkPreferenceSwitchTitle" msgid="1008329951315753038">"मोबाइल नेटवर्कमाथि पहुँच राख्न सकिएन"</string>
     <string name="NetworkPreferenceSwitchSummary" msgid="2086506181486324860">"रुचाइएको नेटवर्क परिवर्तन गरी हेर्नुहोस्‌। परिवर्तन गर्न ट्याप गर्नुहोस्‌।"</string>
-    <string name="EmergencyCallWarningTitle" msgid="1615688002899152860">"आपतकालीन कल सेवा अनुपलब्ध छ"</string>
-    <string name="EmergencyCallWarningSummary" msgid="1194185880092805497">"Wi‑Fi मार्फत आपतकालीन कल गर्न सकिँदैन"</string>
+    <string name="EmergencyCallWarningTitle" msgid="1615688002899152860">"आपत्‌कालीन कल सेवा अनुपलब्ध छ"</string>
+    <string name="EmergencyCallWarningSummary" msgid="1194185880092805497">"Wi‑Fi मार्फत आपत्‌कालीन कल गर्न सकिँदैन"</string>
     <string name="notification_channel_network_alert" msgid="4788053066033851841">"अलर्टहरू"</string>
     <string name="notification_channel_call_forward" msgid="8230490317314272406">"कल फर्वार्ड गर्ने सेवा"</string>
-    <string name="notification_channel_emergency_callback" msgid="54074839059123159">"आपतकालीन कलब्याक मोड"</string>
+    <string name="notification_channel_emergency_callback" msgid="54074839059123159">"आपत्‌कालीन कलब्याक मोड"</string>
     <string name="notification_channel_mobile_data_status" msgid="1941911162076442474">"मोबाइल डेटाको स्थिति"</string>
     <string name="notification_channel_sms" msgid="1243384981025535724">"SMS सन्देशहरू"</string>
     <string name="notification_channel_voice_mail" msgid="8457433203106654172">"भ्वाइस मेल सन्देशहरू"</string>
@@ -142,7 +142,7 @@
     <string name="wfcSpnFormat_wifi" msgid="1376356951297043426">"Wi-Fi"</string>
     <string name="wfcSpnFormat_wifi_calling_wo_hyphen" msgid="7178561009225028264">"WiFi कलिङ"</string>
     <string name="wfcSpnFormat_vowifi" msgid="8371335230890725606">"VoWifi"</string>
-    <string name="wifi_calling_off_summary" msgid="5626710010766902560">"निष्क्रिय"</string>
+    <string name="wifi_calling_off_summary" msgid="5626710010766902560">"अफ"</string>
     <string name="wfc_mode_wifi_preferred_summary" msgid="1035175836270943089">"Wi-Fi मार्फत कल गर्नुहोस्"</string>
     <string name="wfc_mode_cellular_preferred_summary" msgid="4958965609212575619">"मोबाइल नेटवर्कमार्फत कल गर्नुहोस्"</string>
     <string name="wfc_mode_wifi_only_summary" msgid="104951993894678665">"Wi-Fi मात्र"</string>
@@ -201,7 +201,7 @@
     <string name="factory_reset_message" msgid="2657049595153992213">"प्रशासकको एप प्रयोग गर्न मिल्दैन। तपाईंको यन्त्रको डेटा अब मेटाइने छ।\n\nतपाईंसँग प्रश्नहरू भएका खण्डमा आफ्नो संगठनका प्रशासकसँग सम्पर्क गर्नुहोस्।"</string>
     <string name="printing_disabled_by" msgid="3517499806528864633">"<xliff:g id="OWNER_APP">%s</xliff:g> ले छाप्ने कार्यलाई असक्षम पार्यो।"</string>
     <string name="personal_apps_suspension_title" msgid="7561416677884286600">"आफ्नो कार्य प्रोफाइल सक्रिय गर्नुहोस्"</string>
-    <string name="personal_apps_suspension_text" msgid="6115455688932935597">"तपाईंले आफ्नो कार्य प्रोफाइल सक्रिय नगरुन्जेल तपाईंका व्यक्तिगत अनुप्रयोगहरूलाई रोक लगाइन्छ"</string>
+    <string name="personal_apps_suspension_text" msgid="6115455688932935597">"तपाईंले आफ्नो कार्य प्रोफाइल सक्रिय नगरुन्जेल तपाईंका व्यक्तिगत एपहरूलाई रोक लगाइन्छ"</string>
     <string name="personal_apps_suspension_soon_text" msgid="8123898693479590">"मिति <xliff:g id="DATE">%1$s</xliff:g> <xliff:g id="TIME">%2$s</xliff:g> बजे व्यक्तिगत एपहरूलाई रोक लगाइने छ। तपाईंका IT एडमिन तपाईंलाई आफ्नो कार्य प्रोफाइल <xliff:g id="NUMBER">%3$d</xliff:g> भन्दा धेरै दिन निष्क्रिय राख्ने अनुमति दिनुहुन्न।"</string>
     <string name="personal_apps_suspended_turn_profile_on" msgid="2758012869627513689">"सक्रिय गर्नुहोस्"</string>
     <string name="me" msgid="6207584824693813140">"मलाई"</string>
@@ -229,7 +229,7 @@
     <string name="shutdown_confirm" product="default" msgid="136816458966692315">"तपाईँको फोन बन्द हुने छ।"</string>
     <string name="shutdown_confirm_question" msgid="796151167261608447">"के तपाईं बन्द गर्न चाहनुहुन्छ?"</string>
     <string name="reboot_safemode_title" msgid="5853949122655346734">"सुरक्षित मोडमा पुनःबुट गर्नुहोस्"</string>
-    <string name="reboot_safemode_confirm" msgid="1658357874737219624">"सुरक्षित मोडमा तपाईं पुनःबुट गर्न चाहनु हुन्छ? तपाईंले स्थापना गरेका सबै तेस्रो पक्षका अनुप्रयोगहरूलाई असक्षम गराउने छ।"</string>
+    <string name="reboot_safemode_confirm" msgid="1658357874737219624">"सुरक्षित मोडमा तपाईं पुनःबुट गर्न चाहनु हुन्छ? तपाईंले स्थापना गरेका सबै तेस्रो पक्षका एपहरूलाई असक्षम गराउने छ।"</string>
     <string name="recent_tasks_title" msgid="8183172372995396653">"नयाँ"</string>
     <string name="no_recent_tasks" msgid="9063946524312275906">"कुनै नयाँ एपहरू छैनन्।"</string>
     <string name="global_actions" product="tablet" msgid="4412132498517933867">"ट्याब्लेट विकल्पहरू"</string>
@@ -239,7 +239,7 @@
     <string name="global_action_power_off" msgid="4404936470711393203">"बन्द गर्नुहोस्"</string>
     <string name="global_action_power_options" msgid="1185286119330160073">"पावर"</string>
     <string name="global_action_restart" msgid="4678451019561687074">"पुनः सुरु गर्नुहोस्"</string>
-    <string name="global_action_emergency" msgid="1387617624177105088">"आपतकालीन"</string>
+    <string name="global_action_emergency" msgid="1387617624177105088">"आपत्‌कालीन"</string>
     <string name="global_action_bug_report" msgid="5127867163044170003">"बग रिपोर्ट"</string>
     <string name="global_action_logout" msgid="6093581310002476511">"सत्रको अन्त्य गर्नुहोस्"</string>
     <string name="global_action_screenshot" msgid="2610053466156478564">"स्क्रिनसट"</string>
@@ -343,34 +343,34 @@
     <string name="permdesc_processOutgoingCalls" msgid="7833149750590606334">"एपलाई अन्य नम्बरमा कल पुर्ननिर्देश वा समग्र कल परित्याग विकल्प सहित बहिर्गमन कल समयमा डायल गर्दाको नम्बर हेर्न अनुमति दिन्छ।"</string>
     <string name="permlab_answerPhoneCalls" msgid="4131324833663725855">"फोन कलहरूको जवाफ दिनुहोस्"</string>
     <string name="permdesc_answerPhoneCalls" msgid="894386681983116838">"एपलाई आगमन फोन कलको जवाफ दिन अनुमति दिन्छ।"</string>
-    <string name="permlab_receiveSms" msgid="505961632050451881">"पाठ सन्देशहरू (SMS) प्राप्त गर्नुहोस्"</string>
+    <string name="permlab_receiveSms" msgid="505961632050451881">"टेक्स्ट म्यासेजहरू (SMS) प्राप्त गर्नुहोस्"</string>
     <string name="permdesc_receiveSms" msgid="1797345626687832285">"एपलाई SMS सन्देशहरू प्राप्त गर्न र प्रक्रिया गर्न अनुमति दिन्छ। यसको मतलब अनुप्रयोगले तपाईंको उपकरणमा पठाइएको सन्देशहरू तपाईंलाई नदेखाईनै मोनिटर गर्न वा मेटाउन सक्दछ।"</string>
     <string name="permlab_receiveMms" msgid="4000650116674380275">"पाठ सन्देश (MMS) प्राप्त गर्नुहोस्"</string>
     <string name="permdesc_receiveMms" msgid="958102423732219710">"एपलाई MMS सन्देशहरू प्राप्त गर्न र प्रकृया गर्न अनुमति दिन्छ। यसको मतलब अनुप्रयोगले तपाईंको उपकरणमा पठाइएको सन्देशहरू तपाईंलाई नदेखाईनै मोनिटर गर्न वा मेटाउन सक्दछ।"</string>
     <string name="permlab_bindCellBroadcastService" msgid="586746677002040651">"मोबाइल प्रसारणसम्बन्धी सन्देशहरू फर्वार्ड गर्नुहोस्"</string>
-    <string name="permdesc_bindCellBroadcastService" msgid="6540910200973641606">"मोबाइल प्रसारणसम्बन्धी सन्देशहरू प्राप्त हुनासाथै तिनीहरूलाई फर्वार्ड गर्नका लागि यसले एपलाई मोबाइल प्रसारण मोड्युलमा जोडिने अनुमति दिन्छ। तपाईंलाई कतिपय स्थानमा आपत्कालीन अवस्थाका बारेमा जानकारी दिनका लागि मोबाइल प्रसारणसम्बन्धी अलर्टहरू पठाइन्छ। हानिकारक एपहरूले आपत्कालीन मोबाइल प्रसारण प्राप्त हुँदा तपाईंको यन्त्रलाई कार्य सम्पादन गर्ने वा सञ्चालित हुने क्रममा हस्तक्षेप गर्न सक्छन्।"</string>
+    <string name="permdesc_bindCellBroadcastService" msgid="6540910200973641606">"मोबाइल प्रसारणसम्बन्धी सन्देशहरू प्राप्त हुनासाथै तिनीहरूलाई फर्वार्ड गर्नका लागि यसले एपलाई मोबाइल प्रसारण मोड्युलमा जोडिने अनुमति दिन्छ। तपाईंलाई कतिपय स्थानमा आपत्‌कालीन अवस्थाका बारेमा जानकारी दिनका लागि मोबाइल प्रसारणसम्बन्धी अलर्टहरू पठाइन्छ। हानिकारक एपहरूले आपत्‌कालीन मोबाइल प्रसारण प्राप्त हुँदा तपाईंको यन्त्रलाई कार्य सम्पादन गर्ने वा सञ्चालित हुने क्रममा हस्तक्षेप गर्न सक्छन्।"</string>
     <string name="permlab_readCellBroadcasts" msgid="5869884450872137693">"सेल प्रसारित सन्देशहरू पढ्नुहोस्"</string>
-    <string name="permdesc_readCellBroadcasts" msgid="672513437331980168">"तपाईंको उपकरणद्वारा प्राप्त सेल प्रसारण सन्देशहरू एपलाई पढ्न अनुमति दिन्छ। सेल प्रसारण चेतावनीहरू केही स्थानहरूमा तपाईंलाई आपतकालीन गतिविधिहरूको बारेमा सचेत गराउन गरिएका छन्। खराब एपहरूले एउटा आपतकालीन सेल प्रसारण प्राप्त गर्दछ जब तपाईंको उपकरणको प्रदर्शन वा अपरेशनको साथ हस्तक्षेप गर्न सक्दछन्।"</string>
+    <string name="permdesc_readCellBroadcasts" msgid="672513437331980168">"तपाईंको उपकरणद्वारा प्राप्त सेल प्रसारण सन्देशहरू एपलाई पढ्न अनुमति दिन्छ। सेल प्रसारण चेतावनीहरू केही स्थानहरूमा तपाईंलाई आपत्‌कालीन गतिविधिहरूको बारेमा सचेत गराउन गरिएका छन्। खराब एपहरूले एउटा आपत्‌कालीन सेल प्रसारण प्राप्त गर्दछ जब तपाईंको उपकरणको प्रदर्शन वा अपरेशनको साथ हस्तक्षेप गर्न सक्दछन्।"</string>
     <string name="permlab_subscribedFeedsRead" msgid="217624769238425461">"सदस्य बनाइका फिडहरू पढ्नुहोस्"</string>
     <string name="permdesc_subscribedFeedsRead" msgid="6911349196661811865">"एपलाई अहिलेको समीकरण गरिएका सूचकहरू बारे विवरणहरू लिने अनुमति दिन्छ।"</string>
     <string name="permlab_sendSms" msgid="7757368721742014252">"SMS सन्देशहरू पठाउनुहोस् र हेर्नुहोस्"</string>
     <string name="permdesc_sendSms" msgid="6757089798435130769">"एपलाई SMS सन्देशहरू पठाउन अनुमति दिन्छ। यसले अप्रत्यासित चार्जहरूको परिणाम दिन सक्दछ। खराब एपहरूले तपाईंको पुष्टि बिना सन्देशहरू पठाएर तपाईंको पैसा खर्च गराउन सक्दछ।"</string>
-    <string name="permlab_readSms" msgid="5164176626258800297">"तपाईंका पाठ सन्देशहरू (SMS वा MMS) पढ्नुहोस्"</string>
+    <string name="permlab_readSms" msgid="5164176626258800297">"तपाईंका टेक्स्ट म्यासेजहरू (SMS वा MMS) पढ्नुहोस्"</string>
     <string name="permdesc_readSms" product="tablet" msgid="7912990447198112829">"यस अनुप्रयोगले तपाईंको ट्याब्लेटमा भण्डारण गरिएका सबै SMS (पाठ) सन्देशहरू पढ्न सक्छ।"</string>
     <string name="permdesc_readSms" product="tv" msgid="3054753345758011986">"यस अनुप्रयोगले तपाईंको Android टिभी यन्त्रमा भण्डार गरिएका सबै SMS.(पाठ) सन्देशहरू पढ्न सक्छ।"</string>
     <string name="permdesc_readSms" product="default" msgid="774753371111699782">"यस अनुप्रयोगले तपाईंको फोनमा भण्डारण गरिएका सबै SMS (पाठ) सन्देशहरू पढ्न सक्छ।"</string>
-    <string name="permlab_receiveWapPush" msgid="4223747702856929056">"पाठ सन्देशहरू (WAP) प्राप्त गर्नुहोस्"</string>
-    <string name="permdesc_receiveWapPush" msgid="1638677888301778457">"WAP सन्देशहरू प्राप्त गर्न र प्रशोधन गर्न एपलाई अनुमति दिन्छ। यो अनुमतिमा मोनिटर गर्ने वा तपाईँलाई पठाइएका सन्देशहरू तपाईँलाई नदेखाई मेट्ने क्षमता समावेश हुन्छ।"</string>
+    <string name="permlab_receiveWapPush" msgid="4223747702856929056">"टेक्स्ट म्यासेजहरू (WAP) प्राप्त गर्नुहोस्"</string>
+    <string name="permdesc_receiveWapPush" msgid="1638677888301778457">"WAP सन्देशहरू प्राप्त गर्न र प्रशोधन गर्न एपलाई अनुमति दिन्छ। यो अनुमतिमा मोनिटर गर्ने वा तपाईँलाई पठाइएका म्यासेजहरू तपाईँलाई नदेखाई मेट्ने क्षमता समावेश हुन्छ।"</string>
     <string name="permlab_getTasks" msgid="7460048811831750262">"चलिरहेका एपहरू पुनःबहाली गर्नुहोस्"</string>
     <string name="permdesc_getTasks" msgid="7388138607018233726">"वर्तमानमा र भरखरै चलिरहेका कार्यहरू बारेको सूचना पुनःबहाली गर्न एपलाई अनुमित दिन्छ। यसले उपकरणमा प्रयोग भएका अनुप्रयोगहरूको बारेमा सूचना पत्ता लगाउन एपलाई अनुमति दिन सक्छ।"</string>
     <string name="permlab_manageProfileAndDeviceOwners" msgid="639849495253987493">"प्रोफाइल र यन्त्र मालिकहरूको व्यवस्थापन गराउनुहोस्"</string>
-    <string name="permdesc_manageProfileAndDeviceOwners" msgid="7304240671781989283">"अनुप्रयोगहरूलाई प्रोफाइल र यन्त्र मालिकहरू सेट गर्न अनुमति दिनुहोस्।"</string>
-    <string name="permlab_reorderTasks" msgid="7598562301992923804">"चलिरहेका अनुप्रयोगहरूलाई पुनःक्रम गराउनुहोस्"</string>
+    <string name="permdesc_manageProfileAndDeviceOwners" msgid="7304240671781989283">"एपहरूलाई प्रोफाइल र यन्त्र मालिकहरू सेट गर्न अनुमति दिनुहोस्।"</string>
+    <string name="permlab_reorderTasks" msgid="7598562301992923804">"चलिरहेका एपहरूलाई पुनःक्रम गराउनुहोस्"</string>
     <string name="permdesc_reorderTasks" msgid="8796089937352344183">"कामहरूलाई अग्रभाग र पृष्ठभूमिमा सार्न एपलाई अनुमति दिन्छ। अनुप्रयोगले यो तपाईँको इनपुट बिना नै गर्न सक्छ।"</string>
     <string name="permlab_enableCarMode" msgid="893019409519325311">"कार मोड सक्षम गर्नुहोस्"</string>
     <string name="permdesc_enableCarMode" msgid="56419168820473508">"कार मोडलाई सक्षम पार्न एपलाई अनुमति दिन्छ।"</string>
     <string name="permlab_killBackgroundProcesses" msgid="6559320515561928348">"एपहरू बन्द गर्नुहोस्"</string>
-    <string name="permdesc_killBackgroundProcesses" msgid="2357013583055434685">"एपलाई अन्य अनुप्रयोगहरूको पृष्ठभूमि प्रक्रियाहरू बन्द गर्न अनुमति दिन्छ। यसले अन्य अनुप्रयोगहरूलाई चल्नबाट रोक्न सक्दछ।"</string>
+    <string name="permdesc_killBackgroundProcesses" msgid="2357013583055434685">"एपलाई अन्य अनुप्रयोगहरूको पृष्ठभूमि प्रक्रियाहरू बन्द गर्न अनुमति दिन्छ। यसले अन्य एपहरूलाई चल्नबाट रोक्न सक्दछ।"</string>
     <string name="permlab_systemAlertWindow" msgid="5757218350944719065">"यो एप अन्य एपहरूमाथि देखा पर्न सक्छ"</string>
     <string name="permdesc_systemAlertWindow" msgid="1145660714855738308">"यो एप अन्य एपहरूमाथि वा स्क्रिनका अन्य भागहरूमा देखा पर्न सक्छ। यसले एपको सामान्य प्रयोगमा अवरोध पुर्याउन सक्छ र अन्य एपहरू देखा पर्ने तरिकालाई परिवर्तन गर्न सक्छ।"</string>
     <string name="permlab_runInBackground" msgid="541863968571682785">"पृष्ठभूमिमा चलाउनुहोस्"</string>
@@ -378,7 +378,7 @@
     <string name="permlab_useDataInBackground" msgid="783415807623038947">"पृष्ठभूमिमा डेटा प्रयोग गर्नुहोस्"</string>
     <string name="permdesc_useDataInBackground" msgid="1230753883865891987">"यो अनुप्रयोगले पृष्ठभूमिमा डेटा प्रयोग गर्नसक्छ। यसले गर्दा धेरै डेटा प्रयोग हुनसक्छ।"</string>
     <string name="permlab_persistentActivity" msgid="464970041740567970">"एपहरू जहिले पनि चल्ने बनाउनुहोस्"</string>
-    <string name="permdesc_persistentActivity" product="tablet" msgid="6055271149187369916">"यसको आफ्नै मेमोरीमा दृढ भएकोको अंश बनाउनको लागि एपलाई अनुमति दिन्छ। ट्याब्लेटलाई ढिलो गराउँदै गरेका अन्य अनुप्रयोगहरूलाई सीमित मात्रामा यसले मेमोरी उपलब्ध गराउन सक्छ।"</string>
+    <string name="permdesc_persistentActivity" product="tablet" msgid="6055271149187369916">"यसको आफ्नै मेमोरीमा दृढ भएकोको अंश बनाउनको लागि एपलाई अनुमति दिन्छ। ट्याब्लेटलाई ढिलो गराउँदै गरेका अन्य एपहरूलाई सीमित मात्रामा यसले मेमोरी उपलब्ध गराउन सक्छ।"</string>
     <string name="permdesc_persistentActivity" product="tv" msgid="6800526387664131321">"एपलाई आफ्ना केही अंशहरू मेमोरीमा स्थायी रूपमा राख्ने अनुमति दिन्छ। यसले गर्दा अन्य अनुप्रयोगहरूका लागि मेमोरीको अभाव हुन सक्ने भएकाले तपाईंको Android टिभी यन्त्र सुस्त हुन सक्छ।"</string>
     <string name="permdesc_persistentActivity" product="default" msgid="1914841924366562051">"एपलाई मेमोरीमा आफैंको निरन्तरको अंश बनाउन अनुमति दिन्छ। यसले फोनलाई ढिला बनाएर अन्य एपहरूमा मेमोरी SIMित गर्न सक्दछन्।"</string>
     <string name="permlab_foregroundService" msgid="1768855976818467491">"अग्रभूमिको सेवा सञ्चालन गर्नुहोस्"</string>
@@ -396,9 +396,9 @@
     <string name="permdesc_broadcastSticky" product="tv" msgid="2338185920171000650">"एपलाई प्रसारण समाप्त भइसकेपछि पनि रहिरहने स्टिकी प्रसारणहरू पठाउने अनुमति दिन्छ। यो सुविधाको अत्यधिक प्रयोगले धेरै मेमोरी प्रयोग हुने भएकाले तपाईंको Android टिभी यन्त्र सुस्त वा अस्थिर हुन सक्छ।"</string>
     <string name="permdesc_broadcastSticky" product="default" msgid="134529339678913453">"औपचारिक प्रसारणलाई पठाउनको लागि एक एपलाई अनुमति दिन्छ, जुन प्रसारण समाप्त भएपछि बाँकी रहन्छ। अत्यधिक प्रयोगले धेरै मेमोरी प्रयोग गरेको कारणले फोनलाई ढिलो र अस्थिर बनाउन सक्छ।"</string>
     <string name="permlab_readContacts" msgid="8776395111787429099">"तपाईँका सम्पर्कहरू पढ्नुहोस्"</string>
-    <string name="permdesc_readContacts" product="tablet" msgid="6430093481659992692">"एपलाई तपाईंको ट्याब्लेटमा भण्डार गरिएका सम्पर्क ठेगानाहरूसँग सम्बन्धित डेटा पढ्ने अनुमति दिन्छ। एपहरूले सम्पर्क ठेगानाहरू बनाउने तपाईंको ट्याब्लेटमा भण्डार गरिएका खाताहरूमाथि पनि पहुँच प्राप्त गर्ने छन्। यसमा तपाईंले स्थापना गरेका एपहरूले बनाएका खाताहरू पर्न सक्छन्। यस अनुमतिले अनुप्रयोगहरूलाई तपाईंको सम्पर्क ठेगानासम्बन्धी डेटा सुरक्षित गर्न दिने भएकाले हानिकारक एपहरूले तपाईंलाई थाहै नदिइकन सम्पर्क ठेगानासम्बन्धी डेटा आदान प्रदान गर्न सक्छन्।"</string>
-    <string name="permdesc_readContacts" product="tv" msgid="8400138591135554789">"एपलाई तपाईंको Android टिभी यन्त्रमा भण्डारण गरिएका सम्पर्क ठेगानासम्बन्धी डेटा पढ्न अनुमति दिन्छ। एपहरूले सम्पर्क ठेगानाहरू बनाउने तपाईंको Android टिभी यन्त्रमा भण्डार गरिएका खाताहरूमाथि पनि पहुँच प्राप्त गर्ने छन्। यसमा तपाईंले स्थापना गरेका एपहरूले बनाएका खाताहरू पर्न सक्छन्। यस अनुमतिले अनुप्रयोगहरूलाई तपाईंको सम्पर्क ठेगानासम्बन्धी डेटा सुरक्षित गर्न दिने भएकाले हानिकारक एपहरूले तपाईंलाई थाहै नदिइकन सम्पर्क ठेगानासम्बन्धी डेटा आदान प्रदान गर्न सक्छन्।"</string>
-    <string name="permdesc_readContacts" product="default" msgid="4911989776203207644">"एपलाई तपाईंको फोनमा भण्डार गरिएका सम्पर्क ठेगानाहरूसँग सम्बन्धित डेटा पढ्ने अनुमति दिन्छ। एपहरूले सम्पर्क ठेगानाहरू बनाउने तपाईंको फोनमा भण्डार गरिएका खाताहरूमाथि पनि पहुँच प्राप्त गर्ने छन्। यसमा तपाईंले स्थापना गरेका एपहरूले बनाएका खाताहरू पर्न सक्छन्। यस अनुमतिले अनुप्रयोगहरूलाई तपाईंको सम्पर्क ठेगानासम्बन्धी डेटा सुरक्षित गर्न दिने भएकाले हानिकारक एपहरूले तपाईंलाई थाहै नदिइकन सम्पर्क ठेगानासम्बन्धी डेटा आदान प्रदान गर्न सक्छन्।"</string>
+    <string name="permdesc_readContacts" product="tablet" msgid="6430093481659992692">"एपलाई तपाईंको ट्याब्लेटमा भण्डार गरिएका सम्पर्क ठेगानाहरूसँग सम्बन्धित डेटा पढ्ने अनुमति दिन्छ। एपहरूले सम्पर्क ठेगानाहरू बनाउने तपाईंको ट्याब्लेटमा भण्डार गरिएका खाताहरूमाथि पनि पहुँच प्राप्त गर्ने छन्। यसमा तपाईंले स्थापना गरेका एपहरूले बनाएका खाताहरू पर्न सक्छन्। यस अनुमतिले एपहरूलाई तपाईंको सम्पर्क ठेगानासम्बन्धी डेटा सुरक्षित गर्न दिने भएकाले हानिकारक एपहरूले तपाईंलाई थाहै नदिइकन सम्पर्क ठेगानासम्बन्धी डेटा आदान प्रदान गर्न सक्छन्।"</string>
+    <string name="permdesc_readContacts" product="tv" msgid="8400138591135554789">"एपलाई तपाईंको Android टिभी यन्त्रमा भण्डारण गरिएका सम्पर्क ठेगानासम्बन्धी डेटा पढ्न अनुमति दिन्छ। एपहरूले सम्पर्क ठेगानाहरू बनाउने तपाईंको Android टिभी यन्त्रमा भण्डार गरिएका खाताहरूमाथि पनि पहुँच प्राप्त गर्ने छन्। यसमा तपाईंले स्थापना गरेका एपहरूले बनाएका खाताहरू पर्न सक्छन्। यस अनुमतिले एपहरूलाई तपाईंको सम्पर्क ठेगानासम्बन्धी डेटा सुरक्षित गर्न दिने भएकाले हानिकारक एपहरूले तपाईंलाई थाहै नदिइकन सम्पर्क ठेगानासम्बन्धी डेटा आदान प्रदान गर्न सक्छन्।"</string>
+    <string name="permdesc_readContacts" product="default" msgid="4911989776203207644">"एपलाई तपाईंको फोनमा भण्डार गरिएका सम्पर्क ठेगानाहरूसँग सम्बन्धित डेटा पढ्ने अनुमति दिन्छ। एपहरूले सम्पर्क ठेगानाहरू बनाउने तपाईंको फोनमा भण्डार गरिएका खाताहरूमाथि पनि पहुँच प्राप्त गर्ने छन्। यसमा तपाईंले स्थापना गरेका एपहरूले बनाएका खाताहरू पर्न सक्छन्। यस अनुमतिले एपहरूलाई तपाईंको सम्पर्क ठेगानासम्बन्धी डेटा सुरक्षित गर्न दिने भएकाले हानिकारक एपहरूले तपाईंलाई थाहै नदिइकन सम्पर्क ठेगानासम्बन्धी डेटा आदान प्रदान गर्न सक्छन्।"</string>
     <string name="permlab_writeContacts" msgid="8919430536404830430">"तपाईँका सम्पर्कहरू परिवर्तन गर्नुहोस्"</string>
     <string name="permdesc_writeContacts" product="tablet" msgid="6422419281427826181">"एपलाई तपाईंको ट्याब्लेटमा भण्डारण गरिएका सम्पर्क ठेगानासम्बन्धी डेटा परिमार्जन गर्न अनुमति दिन्छ। यो अनुमतिले एपलाई सम्पर्क ठेगानासम्बन्धी डेटा मेटाउन अनुमति दिन्छ।"</string>
     <string name="permdesc_writeContacts" product="tv" msgid="6488872735379978935">"एपलाई तपाईंको Android टिभी यन्त्रमा भण्डारण गरिएका सम्पर्क ठेगानासम्बन्धी डेटा परिमार्जन गर्न अनुमति दिन्छ। यो अनुमतिले एपलाई सम्पर्क ठेगानासम्बन्धी डेटा मेटाउन अनुमति दिन्छ।"</string>
@@ -445,7 +445,7 @@
     <string name="permdesc_vibrate" msgid="8733343234582083721">"एपलाई भाइब्रेटर नियन्त्रण गर्न अनुमति दिन्छ।"</string>
     <string name="permdesc_vibrator_state" msgid="7050024956594170724">"यो एपलाई कम्पनको स्थितिमाथि पहुँच राख्न दिनुहोस्।"</string>
     <string name="permlab_callPhone" msgid="1798582257194643320">"फोन नम्बरहरूमा सीधै कल गर्नुहोस्"</string>
-    <string name="permdesc_callPhone" msgid="5439809516131609109">"तपाईँको हस्तक्षेप बेगरै फोन नम्बर कल गर्न एपलाई अनुमति दिन्छ। यसले अनपेक्षित शुल्क वा कलहरू गराउन सक्छ। यसले एपलाई आपतकालीन नम्बरहरू कल गर्न अनुमति दिँदैन विचार गर्नुहोस्। खराब एपहरूले तपाईँको स्वीकार बिना कलहरू गरेर तपाईँलाई बढी पैसा तिराउन सक्छ।"</string>
+    <string name="permdesc_callPhone" msgid="5439809516131609109">"तपाईँको हस्तक्षेप बेगरै फोन नम्बर कल गर्न एपलाई अनुमति दिन्छ। यसले अनपेक्षित शुल्क वा कलहरू गराउन सक्छ। यसले एपलाई आपत्‌कालीन नम्बरहरू कल गर्न अनुमति दिँदैन विचार गर्नुहोस्। खराब एपहरूले तपाईँको स्वीकार बिना कलहरू गरेर तपाईँलाई बढी पैसा तिराउन सक्छ।"</string>
     <string name="permlab_accessImsCallService" msgid="442192920714863782">"IMS कल सेवा पहुँच गर्नुहोस्"</string>
     <string name="permdesc_accessImsCallService" msgid="6328551241649687162">"तपाईँको हस्तक्षेप बिना नै कल गर्न IMS सेवा प्रयोग गर्न एपलाई अनुमति दिन्छ।"</string>
     <string name="permlab_readPhoneState" msgid="8138526903259297969">"फोन स्थिति र पहिचान पढ्नुहोस्"</string>
@@ -614,7 +614,7 @@
     <string name="permlab_readSyncSettings" msgid="6250532864893156277">"समीकरण सेटिङहरू पढ्नुहोस्"</string>
     <string name="permdesc_readSyncSettings" msgid="1325658466358779298">"एपलाई खाताको लागि सिंक सेटिङहरू पढ्न अनुमति दिन्छ। उदाहरणको लागि यसले व्यक्तिहरको एप खातासँग सिंक भएको नभएको निर्धारण गर्न सक्दछ।"</string>
     <string name="permlab_writeSyncSettings" msgid="6583154300780427399">"टगल सिंक खुला र बन्द"</string>
-    <string name="permdesc_writeSyncSettings" msgid="6029151549667182687">"अनुप्रयोगहरूलाई खाताको लागि सिंक सेटिङहरू परिमार्जन गर्न अनुमति दिन्छ। उदाहरणको लागि, यो खातासँग व्यक्ति एपको सिंक सक्षम गर्न प्रयोग गर्न सकिन्छ।"</string>
+    <string name="permdesc_writeSyncSettings" msgid="6029151549667182687">"एपहरूलाई खाताको लागि सिंक सेटिङहरू परिमार्जन गर्न अनुमति दिन्छ। उदाहरणको लागि, यो खातासँग व्यक्ति एपको सिंक सक्षम गर्न प्रयोग गर्न सकिन्छ।"</string>
     <string name="permlab_readSyncStats" msgid="3747407238320105332">"सिंक तथ्याङ्कहरू पढ्नुहोस्"</string>
     <string name="permdesc_readSyncStats" msgid="3867809926567379434">"एपलाई खाताको लागि समीकरणको आँकडा समीकरण घटनाहरूको  इतिहास र समीकरण गरिएको डेटाको मापन समेत, पढ्न अनुमति दिन्छ।"</string>
     <string name="permlab_sdcardRead" msgid="5791467020950064920">"आफ्नो आदान प्रदान गरिएको भण्डारणको सामग्रीहरूहरू पढ्नुहोस्"</string>
@@ -642,9 +642,9 @@
     <string name="permlab_modifyNetworkAccounting" msgid="7448790834938749041">"नेटवर्क उपयोग लेखालाई परिमार्जन गर्नुहोस्"</string>
     <string name="permdesc_modifyNetworkAccounting" msgid="5076042642247205390">"एपलाई कसरी अनुप्रयोगहरूको विरूद्धमा कसरी नेटवर्क उपयोगी अकाउन्टेड छ भनेर परिमार्जन गर्न अनुमति दिन्छ। साधारण अनुप्रयोगहरूद्वारा प्रयोगको लागि होइन।"</string>
     <string name="permlab_accessNotifications" msgid="7130360248191984741">"सूचनाहरू पहुँच गर्नुहोस्"</string>
-    <string name="permdesc_accessNotifications" msgid="761730149268789668">"अन्य अनुप्रयोगहरूबाट पोस्ट गरिएकासहित पुनःप्राप्त गर्न, परीक्षण गर्न र सूचनाहरू हटाउन अनुप्रयोगहरूलाई अनुमति दिन्छ।"</string>
+    <string name="permdesc_accessNotifications" msgid="761730149268789668">"अन्य अनुप्रयोगहरूबाट पोस्ट गरिएकासहित पुनःप्राप्त गर्न, परीक्षण गर्न र सूचनाहरू हटाउन एपहरूलाई अनुमति दिन्छ।"</string>
     <string name="permlab_bindNotificationListenerService" msgid="5848096702733262458">"जानकारी श्रोता सेवामा बाँध्नुहोस्"</string>
-    <string name="permdesc_bindNotificationListenerService" msgid="4970553694467137126">"होल्डरलाई सूचना श्रोता सेवाको शीर्ष-स्तरको इन्टरफेस बाँध्न अनुमति दिन्छ। सामान्य अनुप्रयोगहरूलाई कहिले पनि आवश्यक नपर्न सक्दछ।"</string>
+    <string name="permdesc_bindNotificationListenerService" msgid="4970553694467137126">"होल्डरलाई सूचना श्रोता सेवाको शीर्ष-स्तरको इन्टरफेस बाँध्न अनुमति दिन्छ। सामान्य एपहरूलाई कहिले पनि आवश्यक नपर्न सक्दछ।"</string>
     <string name="permlab_bindConditionProviderService" msgid="5245421224814878483">"सर्त प्रदायक सेवामा जोड्न"</string>
     <string name="permdesc_bindConditionProviderService" msgid="6106018791256120258">"सर्त प्रदायक सेवाको माथिल्लो स्तरको इन्टरफेसमा जोड्न बाहकलाई अनुमति दिन्छ। साधारण अनुप्रयोगहरूको लागि कहिल्यै पनि आवश्यक पर्दैन।"</string>
     <string name="permlab_bindDreamService" msgid="4776175992848982706">"सपना सेवामा बाँध्नुहोस्"</string>
@@ -668,7 +668,7 @@
     <string name="permlab_access_notification_policy" msgid="5524112842876975537">"बाधा नपुर्याउँनुहोस् पहुँच गर्नुहोस्"</string>
     <string name="permdesc_access_notification_policy" msgid="8538374112403845013">"बाधा नपुर्याउँनुहोस् कन्फिगरेसन पढ्न र लेख्‍नको लागि एपलाई अनुमति दिनुहोस्।"</string>
     <string name="permlab_startViewPermissionUsage" msgid="1504564328641112341">"हेर्ने अनुमतिको प्रयोग सुरु गर्नुहोस्"</string>
-    <string name="permdesc_startViewPermissionUsage" msgid="2820325605959586538">"वाहकलाई कुनै अनुप्रयोगसम्बन्धी अनुमतिको प्रयोग सुरु गर्न दिन्छ। साधारण अनुप्रयोगहरूलाई कहिल्यै आवश्यक नपर्नु पर्ने हो।"</string>
+    <string name="permdesc_startViewPermissionUsage" msgid="2820325605959586538">"वाहकलाई कुनै एपसम्बन्धी अनुमतिको प्रयोग सुरु गर्न दिन्छ। साधारण एपहरूलाई कहिल्यै आवश्यक नपर्नु पर्ने हो।"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"पासवर्ड नियमहरू मिलाउनुहोस्"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"स्क्रिन लक पासवर्ड र PIN हरूमा अनुमति दिइएको लम्बाइ र वर्णहरूको नियन्त्रण गर्नुहोस्।"</string>
     <string name="policylab_watchLogin" msgid="7599669460083719504">"मनिटरको स्क्रिन अनलक गर्ने प्रयासहरू"</string>
@@ -823,13 +823,13 @@
     <string name="keyguard_password_enter_pin_password_code" msgid="7792964196473964340">"अनलक गर्न PIN कोड टाइप गर्नुहोस्"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="8583732939138432793">"गलत PIN कोड।"</string>
     <string name="keyguard_label_text" msgid="3841953694564168384">"अनलक गर्न मेनु थिच्नुहोस् र त्यसपछि ० थिच्नुहोस्।"</string>
-    <string name="emergency_call_dialog_number_for_display" msgid="2978165477085612673">"आपतकालीन नम्बर"</string>
+    <string name="emergency_call_dialog_number_for_display" msgid="2978165477085612673">"आपत्‌कालीन नम्बर"</string>
     <string name="lockscreen_carrier_default" msgid="6192313772955399160">"कुनै सेवा छैन"</string>
     <string name="lockscreen_screen_locked" msgid="7364905540516041817">"स्क्रिन लक गरिएको।"</string>
-    <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"अनलक वा आपतकालीन कल गर्न मेनु थिच्नुहोस्।"</string>
+    <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"अनलक वा आपत्‌कालीन कल गर्न मेनु थिच्नुहोस्।"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"अनलक गर्न मेनु थिच्नुहोस्।"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"अनलक गर्नु ढाँचा खिच्नुहोस्"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"आपतकालीन"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"आपत्‌कालीन कल"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"कलमा फर्किनुहोस्"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"सही!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"फेरि प्रयास गर्नुहोस्"</string>
@@ -851,7 +851,7 @@
     <string name="lockscreen_transport_stop_description" msgid="1449552232598355348">"रोक्नुहोस्"</string>
     <string name="lockscreen_transport_rew_description" msgid="7680106856221622779">"दोहोर्याउनुहोस्"</string>
     <string name="lockscreen_transport_ffw_description" msgid="4763794746640196772">"फास्ट फर्वार्ड"</string>
-    <string name="emergency_calls_only" msgid="3057351206678279851">"आपतकालीन कलहरू मात्र"</string>
+    <string name="emergency_calls_only" msgid="3057351206678279851">"आपत्‌कालीन कलहरू मात्र"</string>
     <string name="lockscreen_network_locked_message" msgid="2814046965899249635">"नेटवर्क लक छ"</string>
     <string name="lockscreen_sim_puk_locked_message" msgid="6618356415831082174">"SIM कार्ड PUK-लक गरिएको छ।"</string>
     <string name="lockscreen_sim_puk_locked_instructions" msgid="5307979043730860995">"प्रयोगकर्ता निर्देशक वा ग्राहक सेवा सम्पर्क हर्नुहोस्।"</string>
@@ -1119,7 +1119,7 @@
     <string name="dialog_alert_title" msgid="651856561974090712">"सावधानी"</string>
     <string name="loading" msgid="3138021523725055037">"लोड हुँदै..."</string>
     <string name="capital_on" msgid="2770685323900821829">"चालु"</string>
-    <string name="capital_off" msgid="7443704171014626777">"बन्द"</string>
+    <string name="capital_off" msgid="7443704171014626777">"अफ"</string>
     <string name="checked" msgid="9179896827054513119">"जाँच गरिएको"</string>
     <string name="not_checked" msgid="7972320087569023342">"जाँच गरिएको छैन"</string>
     <string name="whichApplication" msgid="5432266899591255759">"प्रयोग गरेर कारबाही पुरा गर्नुहोस्"</string>
@@ -1382,7 +1382,7 @@
     <string name="ext_media_status_unmountable" msgid="7043574843541087748">"बिग्रेको"</string>
     <string name="ext_media_status_unsupported" msgid="5460509911660539317">"असमर्थित"</string>
     <string name="ext_media_status_ejecting" msgid="7532403368044013797">"निकाल्दै..."</string>
-    <string name="ext_media_status_formatting" msgid="774148701503179906">"फरम्याट गर्दै…"</string>
+    <string name="ext_media_status_formatting" msgid="774148701503179906">"फर्म्याट गर्दै…"</string>
     <string name="ext_media_status_missing" msgid="6520746443048867314">"सम्मिलित छैन"</string>
     <string name="activity_list_empty" msgid="4219430010716034252">"कुनै मिल्ने गतिविधि पाइएन।"</string>
     <string name="permlab_route_media_output" msgid="8048124531439513118">"मिडिया निकास दिशानिर्देश गराउनुहोस्"</string>
@@ -1460,9 +1460,9 @@
     <string name="gpsNotifMessage" msgid="7346649122793758032">"<xliff:g id="NAME">%1$s</xliff:g> (<xliff:g id="SERVICE">%2$s</xliff:g>) द्वारा अनुरोध गरिएको"</string>
     <string name="gpsVerifYes" msgid="3719843080744112940">"हो"</string>
     <string name="gpsVerifNo" msgid="1671201856091564741">"होइन"</string>
-    <string name="gnss_nfw_notification_title" msgid="5004493772059563423">"आपत्कालीन सेवा उपलब्ध गराउन स्थान प्रयोग गरेको थियो"</string>
-    <string name="gnss_nfw_notification_message_oem" msgid="3683958907027107969">"तपाईंको यन्त्रका उत्पादकले हालसालै तपाईंलाई आपत्कालीन सेवा उपलब्ध गराउने प्रयोजनका लागि तपाईंको स्थान प्रयोग गरेको थियो"</string>
-    <string name="gnss_nfw_notification_message_carrier" msgid="815888995791562151">"तपाईंको टेलिफोन कम्पनीले हालसालै तपाईंलाई आपत्कालीन सेवा उपलब्ध गराउने प्रयोजनका लागि तपाईंको स्थान प्रयोग गरेको थियो"</string>
+    <string name="gnss_nfw_notification_title" msgid="5004493772059563423">"आपत्‌कालीन सेवा उपलब्ध गराउन स्थान प्रयोग गरेको थियो"</string>
+    <string name="gnss_nfw_notification_message_oem" msgid="3683958907027107969">"तपाईंको यन्त्रका उत्पादकले हालसालै तपाईंलाई आपत्‌कालीन सेवा उपलब्ध गराउने प्रयोजनका लागि तपाईंको स्थान प्रयोग गरेको थियो"</string>
+    <string name="gnss_nfw_notification_message_carrier" msgid="815888995791562151">"तपाईंको टेलिफोन कम्पनीले हालसालै तपाईंलाई आपत्‌कालीन सेवा उपलब्ध गराउने प्रयोजनका लागि तपाईंको स्थान प्रयोग गरेको थियो"</string>
     <string name="sync_too_many_deletes" msgid="6999440774578705300">"सीमा नाघेकाहरू मेट्नुहोस्"</string>
     <string name="sync_too_many_deletes_desc" msgid="7409327940303504440">"त्यहाँ <xliff:g id="NUMBER_OF_DELETED_ITEMS">%1$d</xliff:g> मेटाइएका आइटमहरू छन् <xliff:g id="TYPE_OF_SYNC">%2$s</xliff:g>को लागि, खाता <xliff:g id="ACCOUNT_NAME">%3$s</xliff:g>। तपाईं के गर्न चाहनु हुन्छ?"</string>
     <string name="sync_really_delete" msgid="5657871730315579051">"वस्तुहरू मेट्नुहोस्"</string>
@@ -1473,7 +1473,7 @@
     <string name="add_account_button_label" msgid="322390749416414097">"खाता थप्नुहोस्"</string>
     <string name="number_picker_increment_button" msgid="7621013714795186298">"बढाउनुहोस्"</string>
     <string name="number_picker_decrement_button" msgid="5116948444762708204">"घटाउनुहोस्"</string>
-    <string name="number_picker_increment_scroll_mode" msgid="8403893549806805985">"<xliff:g id="VALUE">%s</xliff:g> छोइराख्नुहोस्।"</string>
+    <string name="number_picker_increment_scroll_mode" msgid="8403893549806805985">"<xliff:g id="VALUE">%s</xliff:g> टच एण्ड होल्ड गर्नुहोस्।"</string>
     <string name="number_picker_increment_scroll_action" msgid="8310191318914268271">"बढाउन माथि र घटाउन तल सार्नुहोस्।"</string>
     <string name="time_picker_increment_minute_button" msgid="7195870222945784300">"मिनेट बढाउनुहोस्"</string>
     <string name="time_picker_decrement_minute_button" msgid="230925389943411490">"मिनेट घटाउनुहोस्"</string>
@@ -1656,9 +1656,9 @@
     <string name="accessibility_button_prompt_text" msgid="8343213623338605305">"तपाईंले पहुँचको बटन ट्याप गर्दा प्रयोग गर्न चाहनुभएको सुविधा छनौट गर्नुहोस्:"</string>
     <string name="accessibility_gesture_prompt_text" msgid="8742535972130563952">"तपाईंले पहुँचको इसारामार्फत प्रयोग गर्न चाहनुभएको सुविधा छनौट गर्नुहोस् (दुईवटा औँलाले स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्):"</string>
     <string name="accessibility_gesture_3finger_prompt_text" msgid="5211827854510660203">"तपाईंले पहुँचको इसारामार्फत प्रयोग गर्न चाहनुभएको सुविधा छनौट गर्नुहोस् (तीनवटा औँलाले स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्):"</string>
-    <string name="accessibility_button_instructional_text" msgid="8853928358872550500">"एउटा सुविधाबाट अर्को सुविधामा जान पहुँच बटन छोइराख्नुहोस्।"</string>
-    <string name="accessibility_gesture_instructional_text" msgid="9196230728837090497">"एउटा सुविधाबाट अर्को सुविधामा जान दुईवटा औँलाले माथितिर स्वाइप गरी स्क्रिनमा छोइराख्नुहोस्।"</string>
-    <string name="accessibility_gesture_3finger_instructional_text" msgid="3425123684990193765">"एउटा सुविधाबाट अर्को सुविधामा जान तीनवटा औँलाले माथितिर स्वाइप गरी स्क्रिनमा छोइराख्नुहोस्।"</string>
+    <string name="accessibility_button_instructional_text" msgid="8853928358872550500">"एउटा सुविधाबाट अर्को सुविधामा जान पहुँच बटन टच एण्ड होल्ड गर्नुहोस्।"</string>
+    <string name="accessibility_gesture_instructional_text" msgid="9196230728837090497">"एउटा सुविधाबाट अर्को सुविधामा जान दुईवटा औँलाले माथितिर स्वाइप गरी स्क्रिनमा टच एण्ड होल्ड गर्नुहोस्।"</string>
+    <string name="accessibility_gesture_3finger_instructional_text" msgid="3425123684990193765">"एउटा सुविधाबाट अर्को सुविधामा जान तीनवटा औँलाले माथितिर स्वाइप गरी स्क्रिनमा टच एण्ड होल्ड गर्नुहोस्।"</string>
     <string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"म्याग्निफिकेसन"</string>
     <string name="user_switched" msgid="7249833311585228097">"अहिलेको प्रयोगकर्ता <xliff:g id="NAME">%1$s</xliff:g>।"</string>
     <string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> मा स्विच गर्दै..."</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"तपाईंका प्रशासकले अद्यावधिक गर्नुभएको"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"तपाईंका प्रशासकले मेट्नुभएको"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ठिक छ"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ब्याट्रीको आयु बढाउन ब्याट्री सेभरले:\n\n•अँध्यारो थिम सक्रिय गर्छ\n•पृष्ठभूमिका गतिविधि, केही दृश्यात्मक प्रभाव तथा “Hey Google” जस्ता अन्य सुविधाहरू निष्क्रिय वा सीमित पार्छ\n\n"<annotation id="url">"थप जान्नुहोस्"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ब्याट्रीको आयु बढाउन ब्याट्री सेभरले:\n\n•अँध्यारो थिम सक्रिय गर्छ\n•पृष्ठभूमिका गतिविधि, केही दृश्यात्मक प्रभाव तथा “Hey Google” जस्ता अन्य सुविधाहरू निष्क्रिय वा सीमित पार्छ"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ब्याट्री सेभरले यन्त्रको ब्याट्री बढी समय टिकाउन:\n\n•अँध्यारो थिम सक्रिय गर्छ\n•पृष्ठभूमिका गतिविधि, केही दृश्यात्मक प्रभाव तथा “Hey Google” जस्ता अन्य सुविधाहरू निष्क्रिय वा सीमित पार्छ\n\n"<annotation id="url">"थप जान्नुहोस्"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ब्याट्री सेभरले यन्त्रको ब्याट्री बढी समय टिकाउन:\n\n• अँध्यारो थिम अन गर्छ\n• पृष्ठभूमिका क्रियाकलाप, केही दृश्यात्मक प्रभाव तथा “Hey Google” जस्ता अन्य सुविधाहरू अफ गर्छ वा सीमित पार्छ"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"डेटाको प्रयोगलाई कम गर्न डेटा सर्भरले केही एपलाई पृष्ठभूमिमा डेटा पठाउन वा प्राप्त गर्न दिँदैन। तपाईंले हाल प्रयोग गरिरहनुभएको अनु्प्रयोगले डेटा चलाउन सक्छ, तर पहिला भन्दा कम अन्तरालमा मात्र। उदाहरणका लागि, तपाईले छविहरूमा ट्याप नगरेसम्म ती छविहरू देखिँदैनन्।"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"डेटा सेभर सक्रिय गर्ने हो?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"सक्रिय गर्नुहोस्"</string>
@@ -1872,7 +1872,7 @@
     <string name="default_notification_channel_label" msgid="3697928973567217330">"वर्गीकरण नगरिएको"</string>
     <string name="importance_from_user" msgid="2782756722448800447">"तपाईंले यी सूचनाहरूको महत्त्व सेट गर्नुहोस् ।"</string>
     <string name="importance_from_person" msgid="4235804979664465383">"यसमा सङ्लग्न भएका मानिसहरूको कारणले गर्दा यो महत्वपूर्ण छ।"</string>
-    <string name="notification_history_title_placeholder" msgid="7748630986182249599">"अनुप्रयोगसम्बन्धी आफ्नो रोजाइअनुसारको सूचना"</string>
+    <string name="notification_history_title_placeholder" msgid="7748630986182249599">"एपसम्बन्धी आफ्नो रोजाइअनुसारको सूचना"</string>
     <string name="user_creation_account_exists" msgid="2239146360099708035">"<xliff:g id="ACCOUNT">%2$s</xliff:g> (यस खाताको प्रयोगकर्ता पहिले नै अवस्थित छ) मा नयाँ प्रयोगकर्ता सिर्जना गर्न <xliff:g id="APP">%1$s</xliff:g> लाई अनुमति दिने हो?"</string>
     <string name="user_creation_adding" msgid="7305185499667958364">"<xliff:g id="ACCOUNT">%2$s</xliff:g> मा नयाँ प्रयोगकर्ता सिर्जना गर्न <xliff:g id="APP">%1$s</xliff:g> लाई अनुमति दिने हो?"</string>
     <string name="language_selection_title" msgid="52674936078683285">"भाषा थप्नुहोस्"</string>
@@ -1904,7 +1904,7 @@
     <string name="pin_specific_target" msgid="7824671240625957415">"<xliff:g id="LABEL">%1$s</xliff:g> लाई पिन गर्नुहोस्"</string>
     <string name="unpin_target" msgid="3963318576590204447">"अनपिन गर्नुहोस्"</string>
     <string name="unpin_specific_target" msgid="3859828252160908146">"<xliff:g id="LABEL">%1$s</xliff:g> लाई अनपिन गर्नुहोस्"</string>
-    <string name="app_info" msgid="6113278084877079851">"अनुप्रयोगका बारे जानकारी"</string>
+    <string name="app_info" msgid="6113278084877079851">"एपका बारे जानकारी"</string>
     <string name="negative_duration" msgid="1938335096972945232">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
     <string name="demo_starting_message" msgid="6577581216125805905">"डेमो सुरु गर्दै…"</string>
     <string name="demo_restarting_message" msgid="1160053183701746766">"यन्त्रलाई रिसेट गर्दै…"</string>
@@ -1961,7 +1961,7 @@
     <string name="etws_primary_default_message_earthquake" msgid="8401079517718280669">"शान्त रहनुहोस् र नजिकै आश्रयस्थल खोज्नुहोस्।"</string>
     <string name="etws_primary_default_message_tsunami" msgid="5828171463387976279">"तटीय क्षेत्र र नदीछेउका ठाउँहरू छाडी उच्च सतहमा अवस्थित कुनै अझ सुरक्षित ठाउँमा जानुहोस्।"</string>
     <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="4888224011071875068">"शान्त रहनुहोस् र नजिकै आश्रयस्थल खोज्नुहोस्।"</string>
-    <string name="etws_primary_default_message_test" msgid="4583367373909549421">"आपतकालीन सन्देशहरूको परीक्षण"</string>
+    <string name="etws_primary_default_message_test" msgid="4583367373909549421">"आपत्‌कालीन सन्देशहरूको परीक्षण"</string>
     <string name="notification_reply_button_accessibility" msgid="5235776156579456126">"जवाफ दिनु…"</string>
     <string name="etws_primary_default_message_others" msgid="7958161706019130739"></string>
     <string name="mmcc_authentication_reject" msgid="4891965994643876369">"SIM मार्फत भ्वाइस कल गर्न मिल्दैन"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index e6b0039..bae44fd 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Druk op \'Menu\' om te ontgrendelen of noodoproep te plaatsen."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Druk op \'Menu\' om te ontgrendelen."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Patroon tekenen om te ontgrendelen"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Noodgeval"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Noodoproep"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Terug naar gesprek"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Juist!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Opnieuw proberen"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Geüpdatet door je beheerder"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Verwijderd door je beheerder"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Batterijbesparing doet het volgende om de batterijduur te verlengen:\n\n•Het donkere thema aanzetten\n•Achtergrondactiviteit, bepaalde visuele effecten en andere functies (zoals \'Hey Google\') uitzetten of beperken\n\n"<annotation id="url">"Meer informatie"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Batterijbesparing doet het volgende om de batterijduur te verlengen:\n\n•Het donkere thema aanzetten\n•Achtergrondactiviteit, bepaalde visuele effecten en andere functies (zoals \'Hey Google\') uitzetten of beperken"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Batterijbesparing doet het volgende om de batterijduur te verlengen:\n\n• Het donkere thema inschakelen\n• Achtergrondactiviteit, bepaalde visuele effecten en andere functies (zoals \'Hey Google\') uitschakelen of beperken\n\n"<annotation id="url">"Meer informatie"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Batterijbesparing doet het volgende om de batterijduur te verlengen:\n\n• Het donkere thema inschakelen.\n• Achtergrondactiviteit, bepaalde visuele effecten en andere functies (zoals \'Hey Google\') uitschakelen of beperken."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Databesparing beperkt het datagebruik door te voorkomen dat sommige apps gegevens verzenden of ontvangen op de achtergrond. De apps die je open hebt, kunnen nog steeds data verbruiken, maar doen dit minder vaak. Afbeeldingen worden dan bijvoorbeeld niet weergegeven totdat je erop tikt."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Databesparing aanzetten?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Inschakelen"</string>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index d34f18b..72fbc1d 100644
--- a/core/res/res/values-or/strings.xml
+++ b/core/res/res/values-or/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"ଅନଲକ୍‌ କରିବା ପାଇଁ ମେନୁକୁ ଦବାନ୍ତୁ କିମ୍ବା ଜରୁରୀକାଳୀନ କଲ୍‌ କରନ୍ତୁ।"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"ଅନଲକ୍‌ କରିବା ପାଇଁ ମେନୁକୁ ଦବାନ୍ତୁ।"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"ଅନଲକ୍‌ କରିବା ପାଇଁ ପାଟର୍ନ ଆଙ୍କନ୍ତୁ"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"ଜରୁରୀକାଳୀନ"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"ଜରୁରୀକାଳୀନ କଲ୍"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"କଲ୍‌କୁ ଫେରନ୍ତୁ"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"ଠିକ୍!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"ଆପଣଙ୍କ ଆଡମିନ୍‌‌ ଅପଡେଟ୍‍ କରିଛନ୍ତି"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"ଆପଣଙ୍କ ଆଡମିନ୍‌‌ ଡିଲିଟ୍‍ କରିଛନ୍ତି"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ଠିକ୍ ଅଛି"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ବ୍ୟାଟେରୀ ଲାଇଫ୍ ବଢ଼ାଇବାକୁ ବ୍ୟାଟେରୀ ସେଭର୍:\n\n•ଗାଢ଼ା ଥିମ୍ ଚାଲୁ କରେ\n•ପୃଷ୍ଠପଟ କାର୍ଯ୍ୟକଳାପ, କିଛି ଭିଜୁଆଲ୍ ପ୍ରଭାବ ଏବଂ “Hey Google” ପରି ଅନ୍ୟ ଫିଚରଗୁଡ଼ିକୁ ବନ୍ଦ କିମ୍ବା ପ୍ରତିବନ୍ଧିତ କରିଥାଏ\n\n"<annotation id="url">"ଅଧିକ ଜାଣନ୍ତୁ"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ବ୍ୟାଟେରୀ ଲାଇଫ୍ ବଢ଼ାଇବାକୁ ବ୍ୟାଟେରୀ ସେଭର୍:\n\n•ଗାଢ଼ା ଥିମ୍ ଚାଲୁ କରେ\n•ପୃଷ୍ଠପଟ କାର୍ଯ୍ୟକଳାପ, କିଛି ଭିଜୁଆଲ୍ ପ୍ରଭାବ ଏବଂ “Hey Google” ପରି ଅନ୍ୟ ଫିଚରଗୁଡ଼ିକୁ ବନ୍ଦ କିମ୍ବା ପ୍ରତିବନ୍ଧିତ କରିଥାଏ"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ବ୍ୟାଟେରୀ ଲାଇଫ୍ ବଢ଼ାଇବାକୁ ବ୍ୟାଟେରୀ ସେଭର୍:\n\n•ଗାଢ଼ା ଥିମ୍ ଚାଲୁ କରେ\n•ପୃଷ୍ଠପଟ କାର୍ଯ୍ୟକଳାପ, କିଛି ଭିଜୁଆଲ୍ ପ୍ରଭାବ ଏବଂ “Hey Google” ପରି ଅନ୍ୟ ଫିଚରଗୁଡ଼ିକୁ ବନ୍ଦ କିମ୍ବା ପ୍ରତିବନ୍ଧିତ କରିଥାଏ\n\n"<annotation id="url">"ଅଧିକ ଜାଣନ୍ତୁ"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ବ୍ୟାଟେରୀ ଲାଇଫ୍ ବଢ଼ାଇବାକୁ ବ୍ୟାଟେରୀ ସେଭର୍:\n\n• ଗାଢ଼ା ଥିମ୍ ଚାଲୁ କରେ\n• ପୃଷ୍ଠପଟ କାର୍ଯ୍ୟକଳାପ, କିଛି ଭିଜୁଆଲ୍ ପ୍ରଭାବ ଏବଂ “Hey Google” ପରି ଅନ୍ୟ ଫିଚରଗୁଡ଼ିକୁ ବନ୍ଦ କିମ୍ବା ପ୍ରତିବନ୍ଧିତ କରିଥାଏ"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ଡାଟା ବ୍ୟବହାର କମ୍‍ କରିବାରେ ସାହାଯ୍ୟ କରିବାକୁ, ଡାଟା ସେଭର୍‍ ବ୍ୟାକ୍‌ଗ୍ରାଉଣ୍ଡରେ ଡାଟା ପଠାଇବା କିମ୍ବା ପ୍ରାପ୍ତ କରିବାକୁ କିଛି ଆପ୍‍କୁ ବାରଣ କରେ। ଆପଣ ବର୍ତ୍ତମାନ ବ୍ୟବହାର କରୁଥିବା ଆପ୍‍, ଡାଟା ଆକ୍ସେସ୍‍ କରିପାରେ, କିନ୍ତୁ ଏହା କମ୍‍ ଥର କରିପାରେ। ଏହାର ଅର୍ଥ ହୋଇପାରେ ଯେମିତି ଆପଣ ଇମେଜଗୁଡ଼ିକୁ ଟାପ୍‍ ନକରିବା ପର୍ଯ୍ୟନ୍ତ ସେଗୁଡ଼ିକ ଡିସପ୍ଲେ ହୁଏ ନାହିଁ।"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ଡାଟା ସେଭର୍‌ ଚାଲୁ କରିବେ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ଚାଲୁ କରନ୍ତୁ"</string>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index 2627b53..45d32f2 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"ਅਣਲਾਕ ਕਰਨ ਲਈ ਮੀਨੂ ਦਬਾਓ ਜਾਂ ਸੰਕਟਕਾਲੀਨ ਕਾਲ ਕਰੋ।"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"ਅਣਲਾਕ ਕਰਨ ਲਈ ਮੀਨੂ ਦਬਾਓ।"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"ਅਣਲਾਕ ਕਰਨ ਲਈ ਪੈਟਰਨ ਡ੍ਰਾ ਕਰੋ"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"ਸੰਕਟਕਾਲ"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"ਸੰਕਟਕਾਲੀਨ ਕਾਲ"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"ਕਾਲ ਤੇ ਵਾਪਸ ਜਾਓ"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"ਸਹੀ!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ"</string>
@@ -1216,18 +1216,18 @@
     <string name="dump_heap_ready_text" msgid="5849618132123045516">"ਸਾਂਝਾ ਕਰਨ ਲਈ <xliff:g id="PROC">%1$s</xliff:g> ਦੀ ਪ੍ਰਕਿਰਿਆ ਦਾ ਹੀਪ ਡੰਪ ਤੁਹਾਡੇ ਲਈ ਉਪਲਬਧ ਹੈ। ਸਾਵਧਾਨ ਰਹੋ: ਸ਼ਾਇਦ ਇਸ ਹੀਪ ਡੰਪ ਵਿੱਚ ਕੋਈ ਵੀ ਸੰਵੇਦਨਸ਼ੀਲ ਨਿੱਜੀ ਜਾਣਕਾਰੀ ਸ਼ਾਮਲ ਹੋਵੇ, ਜਿਸ \'ਤੇ ਪ੍ਰਕਿਰਿਆ ਦੀ ਪਹੁੰਚ ਹੈ, ਜਿਸ ਵਿੱਚ ਸ਼ਾਇਦ ਤੁਹਾਡੇ ਵੱਲੋਂ ਟਾਈਪ ਕੀਤੀਆਂ ਚੀਜ਼ਾਂ ਸ਼ਾਮਲ ਹੋਣ।"</string>
     <string name="sendText" msgid="493003724401350724">"ਲਿਖਤ ਲਈ ਕੋਈ ਕਾਰਵਾਈ ਚੁਣੋ"</string>
     <string name="volume_ringtone" msgid="134784084629229029">"ਰਿੰਗਰ ਵੌਲਿਊਮ"</string>
-    <string name="volume_music" msgid="7727274216734955095">"ਮੀਡੀਆ ਵੌਲਿਊਮ"</string>
+    <string name="volume_music" msgid="7727274216734955095">"ਮੀਡੀਆ ਦੀ ਅਵਾਜ਼"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"Bluetooth ਰਾਹੀਂ ਪਲੇ ਕਰ ਰਿਹਾ ਹੈ"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"ਖਾਮੋਸ਼ ਰਿੰਗਟੋਨ ਸੈੱਟ ਕੀਤੀ"</string>
     <string name="volume_call" msgid="7625321655265747433">"ਇਨ-ਕਾਲ ਅਵਾਜ਼"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"ਬਲੂਟੁੱਥ ਇਨ-ਕਾਲ ਅਵਾਜ਼"</string>
-    <string name="volume_alarm" msgid="4486241060751798448">"ਅਲਾਰਮ ਵੌਲਿਊਮ"</string>
+    <string name="volume_alarm" msgid="4486241060751798448">"ਅਲਾਰਮ ਦੀ ਅਵਾਜ਼"</string>
     <string name="volume_notification" msgid="6864412249031660057">"ਸੂਚਨਾ ਵੌਲਿਊਮ"</string>
     <string name="volume_unknown" msgid="4041914008166576293">"ਵੌਲਿਊਮ"</string>
     <string name="volume_icon_description_bluetooth" msgid="7540388479345558400">"Bluetooth ਵੌਲਿਊਮ"</string>
     <string name="volume_icon_description_ringer" msgid="2187800636867423459">"ਰਿੰਗਟੋਨ ਵੌਲਿਊਮ"</string>
     <string name="volume_icon_description_incall" msgid="4491255105381227919">"ਕਾਲ ਅਵਾਜ਼"</string>
-    <string name="volume_icon_description_media" msgid="4997633254078171233">"ਮੀਡੀਆ ਵੌਲਿਊਮ"</string>
+    <string name="volume_icon_description_media" msgid="4997633254078171233">"ਮੀਡੀਆ ਦੀ ਅਵਾਜ਼"</string>
     <string name="volume_icon_description_notification" msgid="579091344110747279">"ਸੂਚਨਾ ਵੌਲਿਊਮ"</string>
     <string name="ringtone_default" msgid="9118299121288174597">"ਪੂਰਵ-ਨਿਰਧਾਰਤ ਰਿੰਗਟੋਨ"</string>
     <string name="ringtone_default_with_actual" msgid="2709686194556159773">"ਪੂਰਵ-ਨਿਰਧਾਰਤ (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"ਤੁਹਾਡੇ ਪ੍ਰਸ਼ਾਸਕ ਵੱਲੋਂ ਅੱਪਡੇਟ ਕੀਤਾ ਗਿਆ"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"ਤੁਹਾਡੇ ਪ੍ਰਸ਼ਾਸਕ ਵੱਲੋਂ ਮਿਟਾਇਆ ਗਿਆ"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ਠੀਕ ਹੈ"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"ਬੈਟਰੀ ਲਾਈਫ਼ ਵਧਾਉਣ ਲਈ, ਬੈਟਰੀ ਸੇਵਰ:\n\n•ਗੂੜ੍ਹਾ ਥੀਮ ਚਾਲੂ ਕਰਦਾ ਹੈ\n•ਬੈਕਗ੍ਰਾਊਂਡ ਸਰਗਰਮੀ, ਕੁਝ ਦ੍ਰਿਸ਼ਟੀਗਤ ਪ੍ਰਭਾਵਾਂ, ਅਤੇ \"Ok Google\" ਵਰਗੀਆਂ ਹੋਰ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨੂੰ ਬੰਦ ਕਰਦਾ ਹੈ ਜਾਂ ਉਹਨਾਂ \'ਤੇ ਪਾਬੰਦੀ ਲਗਾਉਂਦਾ ਹੈ\n\n"<annotation id="url">"ਹੋਰ ਜਾਣੋ"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"ਬੈਟਰੀ ਲਾਈਫ਼ ਵਧਾਉਣ ਲਈ, ਬੈਟਰੀ ਸੇਵਰ:\n\n•ਗੂੜ੍ਹਾ ਥੀਮ ਚਾਲੂ ਕਰਦਾ ਹੈ\n•ਬੈਕਗ੍ਰਾਊਂਡ ਸਰਗਰਮੀ, ਕੁਝ ਦ੍ਰਿਸ਼ਟੀਗਤ ਪ੍ਰਭਾਵਾਂ, ਅਤੇ \"Ok Google\" ਵਰਗੀਆਂ ਹੋਰ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨੂੰ ਬੰਦ ਕਰਦਾ ਹੈ ਜਾਂ ਉਹਨਾਂ \'ਤੇ ਪਾਬੰਦੀ ਲਗਾਉਂਦਾ ਹੈ"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"ਬੈਟਰੀ ਲਾਈਫ਼ ਵਧਾਉਣ ਲਈ, ਬੈਟਰੀ ਸੇਵਰ:\n\n• ਗੂੜ੍ਹਾ ਥੀਮ ਚਾਲੂ ਕਰਦਾ ਹੈ\n• ਬੈਕਗ੍ਰਾਊਂਡ ਸਰਗਰਮੀ, ਕੁਝ ਦ੍ਰਿਸ਼ਟੀਗਤ ਪ੍ਰਭਾਵਾਂ, ਅਤੇ \"Ok Google\" ਵਰਗੀਆਂ ਹੋਰ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨੂੰ ਬੰਦ ਕਰਦਾ ਹੈ ਜਾਂ ਉਹਨਾਂ \'ਤੇ ਪਾਬੰਦੀ ਲਗਾਉਂਦਾ ਹੈ\n\n"<annotation id="url">"ਹੋਰ ਜਾਣੋ"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"ਬੈਟਰੀ ਲਾਈਫ਼ ਵਧਾਉਣ ਲਈ, ਬੈਟਰੀ ਸੇਵਰ:\n\n• ਗੂੜ੍ਹੇ ਥੀਮ ਨੂੰ ਚਾਲੂ ਕਰਦਾ ਹੈ\n• ਬੈਕਗ੍ਰਾਊਂਡ ਸਰਗਰਮੀ, ਕੁਝ ਦ੍ਰਿਸ਼ਟੀਗਤ ਪ੍ਰਭਾਵਾਂ, ਅਤੇ \"Ok Google\" ਵਰਗੀਆਂ ਹੋਰ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨੂੰ ਬੰਦ ਕਰਦਾ ਹੈ ਜਾਂ ਉਹਨਾਂ \'ਤੇ ਪਾਬੰਦੀ ਲਗਾਉਂਦਾ ਹੈ"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ਡਾਟਾ ਵਰਤੋਂ ਘਟਾਉਣ ਵਿੱਚ ਮਦਦ ਲਈ, ਡਾਟਾ ਸੇਵਰ ਕੁਝ ਐਪਾਂ ਨੂੰ ਬੈਕਗ੍ਰਾਊਂਡ ਵਿੱਚ ਡਾਟਾ ਭੇਜਣ ਜਾਂ ਪ੍ਰਾਪਤ ਕਰਨ ਤੋਂ ਰੋਕਦਾ ਹੈ। ਤੁਹਾਡੇ ਵੱਲੋਂ ਵਰਤਮਾਨ ਤੌਰ \'ਤੇ ਵਰਤੀ ਜਾ ਰਹੀ ਐਪ ਡਾਟਾ \'ਤੇ ਪਹੁੰਚ ਕਰ ਸਕਦੀ ਹੈ, ਪਰ ਉਹ ਇੰਝ ਕਦੇ-ਕਦਾਈਂ ਕਰ ਸਕਦੀ ਹੈ। ਉਦਾਹਰਨ ਲਈ, ਇਸ ਦਾ ਮਤਲਬ ਇਹ ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਚਿੱਤਰ ਤਦ ਤੱਕ ਨਹੀਂ ਪ੍ਰਦਰਸ਼ਿਤ ਕੀਤੇ ਜਾਂਦੇ, ਜਦੋਂ ਤੱਕ ਤੁਸੀਂ ਉਹਨਾਂ \'ਤੇ ਟੈਪ ਨਹੀਂ ਕਰਦੇ।"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ਕੀ ਡਾਟਾ ਸੇਵਰ ਚਾਲੂ ਕਰਨਾ ਹੈ?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ਚਾਲੂ ਕਰੋ"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 254f1d0..ef599a1 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -186,10 +186,10 @@
       <item quantity="one">Urząd certyfikacji został zainstalowany</item>
     </plurals>
     <string name="ssl_ca_cert_noti_by_unknown" msgid="4961102218216815242">"Przez nieznany podmiot zewnętrzny"</string>
-    <string name="ssl_ca_cert_noti_by_administrator" msgid="4564941950768783879">"Przez administratora Twojego profilu do pracy"</string>
+    <string name="ssl_ca_cert_noti_by_administrator" msgid="4564941950768783879">"Przez administratora Twojego profilu służbowego"</string>
     <string name="ssl_ca_cert_noti_managed" msgid="217337232273211674">"Przez <xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
     <string name="work_profile_deleted" msgid="5891181538182009328">"Usunięto profil służbowy"</string>
-    <string name="work_profile_deleted_details" msgid="3773706828364418016">"Brakuje aplikacji administratora profilu do pracy lub jest ona uszkodzona. Dlatego Twój profil służbowy i związane z nim dane zostały usunięte. Skontaktuj się ze swoim administratorem, by uzyskać pomoc."</string>
+    <string name="work_profile_deleted_details" msgid="3773706828364418016">"Brakuje aplikacji administratora profilu służbowego lub jest ona uszkodzona. Dlatego Twój profil służbowy i związane z nim dane zostały usunięte. Skontaktuj się ze swoim administratorem, by uzyskać pomoc."</string>
     <string name="work_profile_deleted_description_dpm_wipe" msgid="2477244968924647232">"Twój profil służbowy nie jest już dostępny na tym urządzeniu"</string>
     <string name="work_profile_deleted_reason_maximum_password_failure" msgid="1080323158315663167">"Zbyt wiele prób podania hasła"</string>
     <string name="device_ownership_relinquished" msgid="4080886992183195724">"Administrator odstąpił urządzenie do użytku osobistego"</string>
@@ -204,8 +204,8 @@
     <string name="factory_reset_warning" msgid="6858705527798047809">"Twoje urządzenie zostanie wyczyszczone"</string>
     <string name="factory_reset_message" msgid="2657049595153992213">"Nie można użyć aplikacji administratora. Dane z urządzenia zostaną wykasowane.\n\nJeśli masz pytania, skontaktuj się z administratorem organizacji."</string>
     <string name="printing_disabled_by" msgid="3517499806528864633">"Drukowanie wyłączone przez: <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
-    <string name="personal_apps_suspension_title" msgid="7561416677884286600">"Włącz profil do pracy"</string>
-    <string name="personal_apps_suspension_text" msgid="6115455688932935597">"Zablokowano aplikacje osobiste do czasu włączenia profilu do pracy"</string>
+    <string name="personal_apps_suspension_title" msgid="7561416677884286600">"Włącz profil służbowy"</string>
+    <string name="personal_apps_suspension_text" msgid="6115455688932935597">"Zablokowano aplikacje osobiste do czasu włączenia profilu służbowego"</string>
     <string name="personal_apps_suspension_soon_text" msgid="8123898693479590">"Aplikacje osobiste zostaną zablokowane <xliff:g id="DATE">%1$s</xliff:g> o <xliff:g id="TIME">%2$s</xliff:g>. Administrator IT nie pozwala na wyłączenie profilu służbowego na dłużej niż <xliff:g id="NUMBER">%3$d</xliff:g> dni."</string>
     <string name="personal_apps_suspended_turn_profile_on" msgid="2758012869627513689">"Włącz"</string>
     <string name="me" msgid="6207584824693813140">"Ja"</string>
@@ -709,7 +709,7 @@
   <string-array name="phoneTypes">
     <item msgid="8996339953292723951">"Dom"</item>
     <item msgid="7740243458912727194">"Komórka"</item>
-    <item msgid="8526146065496663766">"Praca"</item>
+    <item msgid="8526146065496663766">"Służbowy"</item>
     <item msgid="8150904584178569699">"Faks w pracy"</item>
     <item msgid="4537253139152229577">"Faks domowy"</item>
     <item msgid="6751245029698664340">"Pager"</item>
@@ -718,24 +718,24 @@
   </string-array>
   <string-array name="emailAddressTypes">
     <item msgid="7786349763648997741">"Dom"</item>
-    <item msgid="435564470865989199">"Praca"</item>
+    <item msgid="435564470865989199">"Służbowy"</item>
     <item msgid="4199433197875490373">"Inne"</item>
     <item msgid="3233938986670468328">"Niestandardowy"</item>
   </string-array>
   <string-array name="postalAddressTypes">
     <item msgid="3861463339764243038">"Dom"</item>
-    <item msgid="5472578890164979109">"Praca"</item>
+    <item msgid="5472578890164979109">"Służbowy"</item>
     <item msgid="5718921296646594739">"Inny"</item>
     <item msgid="5523122236731783179">"Niestandardowy"</item>
   </string-array>
   <string-array name="imAddressTypes">
     <item msgid="588088543406993772">"Dom"</item>
-    <item msgid="5503060422020476757">"Praca"</item>
+    <item msgid="5503060422020476757">"Służbowy"</item>
     <item msgid="2530391194653760297">"Inne"</item>
     <item msgid="7640927178025203330">"Niestandardowy"</item>
   </string-array>
   <string-array name="organizationTypes">
-    <item msgid="6144047813304847762">"Praca"</item>
+    <item msgid="6144047813304847762">"Służbowy"</item>
     <item msgid="7402720230065674193">"Inne"</item>
     <item msgid="808230403067569648">"Niestandardowy"</item>
   </string-array>
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Naciśnij Menu, aby odblokować lub wykonać połączenie alarmowe."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Naciśnij Menu, aby odblokować."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Narysuj wzór, aby odblokować"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Alarmowe"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Połączenie alarmowe"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Powrót do połączenia"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Poprawnie!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Spróbuj ponownie."</string>
@@ -1453,8 +1453,8 @@
     <string name="deny" msgid="6632259981847676572">"Odmów"</string>
     <string name="permission_request_notification_title" msgid="1810025922441048273">"Prośba o pozwolenie"</string>
     <string name="permission_request_notification_with_subtitle" msgid="3743417870360129298">"Prośba o pozwolenie\ndotyczące konta <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <string name="forward_intent_to_owner" msgid="4620359037192871015">"Używasz tej aplikacji poza profilem do pracy"</string>
-    <string name="forward_intent_to_work" msgid="3620262405636021151">"Używasz tej aplikacji w swoim profilu do pracy"</string>
+    <string name="forward_intent_to_owner" msgid="4620359037192871015">"Używasz tej aplikacji poza profilem służbowym"</string>
+    <string name="forward_intent_to_work" msgid="3620262405636021151">"Używasz tej aplikacji w swoim profilu służbowym"</string>
     <string name="input_method_binding_label" msgid="1166731601721983656">"Sposób wprowadzania tekstu"</string>
     <string name="sync_binding_label" msgid="469249309424662147">"Synchronizacja"</string>
     <string name="accessibility_binding_label" msgid="1974602776545801715">"Ułatwienia dostępu"</string>
@@ -1591,7 +1591,7 @@
     <string name="SetupCallDefault" msgid="5581740063237175247">"Odebrać połączenie?"</string>
     <string name="activity_resolver_use_always" msgid="5575222334666843269">"Zawsze"</string>
     <string name="activity_resolver_use_once" msgid="948462794469672658">"Tylko raz"</string>
-    <string name="activity_resolver_work_profiles_support" msgid="4071345609235361269">"%1$s nie obsługuje profilu do pracy"</string>
+    <string name="activity_resolver_work_profiles_support" msgid="4071345609235361269">"%1$s nie obsługuje profilu służbowego"</string>
     <string name="default_audio_route_name" product="tablet" msgid="367936735632195517">"Tablet"</string>
     <string name="default_audio_route_name" product="tv" msgid="4908971385068087367">"Telewizor"</string>
     <string name="default_audio_route_name" product="default" msgid="9213546147739983977">"Telefon"</string>
@@ -1828,7 +1828,7 @@
     <string name="select_day" msgid="2060371240117403147">"Wybierz miesiąc i dzień"</string>
     <string name="select_year" msgid="1868350712095595393">"Wybierz rok"</string>
     <string name="deleted_key" msgid="9130083334943364001">"<xliff:g id="KEY">%1$s</xliff:g> usunięte"</string>
-    <string name="managed_profile_label_badge" msgid="6762559569999499495">"<xliff:g id="LABEL">%1$s</xliff:g> (praca)"</string>
+    <string name="managed_profile_label_badge" msgid="6762559569999499495">"<xliff:g id="LABEL">%1$s</xliff:g> (służbowy)"</string>
     <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="lock_to_app_unlock_pin" msgid="3890940811866290782">"Podaj PIN, aby odpiąć"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Zaktualizowany przez administratora"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Usunięty przez administratora"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Aby wydłużyć czas pracy na baterii, funkcja Oszczędzanie baterii:\n\n•włącza tryb ciemny\n•wyłącza lub ogranicza aktywność w tle, niektóre efekty wizualne oraz inne funkcje, np. „OK Google”\n\n"<annotation id="url">"Więcej informacji"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Aby wydłużyć czas pracy na baterii, funkcja Oszczędzanie baterii:\n\n•włącza tryb ciemny\n•wyłącza lub ogranicza aktywność w tle, niektóre efekty wizualne oraz inne funkcje, np. „OK Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Aby wydłużyć czas pracy na baterii, funkcja Oszczędzanie baterii:\n\n• włącza tryb ciemny,\n• wyłącza lub ogranicza aktywność w tle, niektóre efekty wizualne oraz inne funkcje, np. „OK Google”.\n\n"<annotation id="url">"Więcej informacji"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Aby wydłużyć czas pracy na baterii, Oszczędzanie baterii:\n\n• włącza tryb ciemny,\n• wyłącza lub ogranicza aktywność w tle, niektóre efekty wizualne oraz inne funkcje, np. „OK Google”."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Oszczędzanie danych uniemożliwia niektórym aplikacjom wysyłanie i odbieranie danych w tle, zmniejszając w ten sposób ich użycie. Aplikacja, z której w tej chwili korzystasz, może uzyskiwać dostęp do danych, ale rzadziej. Może to powodować, że obrazy będą się wyświetlać dopiero po kliknięciu."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Włączyć Oszczędzanie danych?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Włącz"</string>
@@ -1950,8 +1950,8 @@
     <string name="app_suspended_default_message" msgid="6451215678552004172">"Aplikacja <xliff:g id="APP_NAME_0">%1$s</xliff:g> nie jest teraz dostępna. Zarządza tym aplikacja <xliff:g id="APP_NAME_1">%2$s</xliff:g>."</string>
     <string name="app_suspended_more_details" msgid="211260942831587014">"Więcej informacji"</string>
     <string name="app_suspended_unsuspend_message" msgid="1665438589450555459">"Wznów działanie aplikacji"</string>
-    <string name="work_mode_off_title" msgid="5503291976647976560">"Włączyć profil do pracy?"</string>
-    <string name="work_mode_off_message" msgid="8417484421098563803">"Aplikacje do pracy, powiadomienia, dane i inne funkcje profilu do pracy zostaną włączone"</string>
+    <string name="work_mode_off_title" msgid="5503291976647976560">"Włączyć profil służbowy?"</string>
+    <string name="work_mode_off_message" msgid="8417484421098563803">"Aplikacje służbowe, powiadomienia, dane i inne funkcje profilu służbowego zostaną włączone"</string>
     <string name="work_mode_turn_on" msgid="3662561662475962285">"Włącz"</string>
     <string name="app_blocked_title" msgid="7353262160455028160">"Aplikacja jest niedostępna"</string>
     <string name="app_blocked_message" msgid="542972921087873023">"Aplikacja <xliff:g id="APP_NAME">%1$s</xliff:g> jest obecnie niedostępna."</string>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index bea5300..fa5be92 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Pressione Menu para desbloquear ou fazer uma chamada de emergência."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Pressione Menu para desbloquear."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Desenhe o padrão para desbloquear"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergência"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Chamada de emergência"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Retornar à chamada"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correto!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Tente novamente"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Atualizado pelo seu administrador"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Excluído pelo seu administrador"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Para prolongar a duração da carga, a \"Economia de bateria\":\n\n•ativa o tema escuro;\n•desativa ou restringe atividades em segundo plano, alguns efeitos visuais e outros recursos, como o \"Ok Google\".\n\n"<annotation id="url">"Saiba mais"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Para prolongar a duração da carga, a \"Economia de bateria\":\n\n•ativa o tema escuro;\n•desativa ou restringe atividades em segundo plano, alguns efeitos visuais e outros recursos, como o \"Ok Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Para prolongar a duração da carga, a \"Economia de bateria\":\n\n• ativa o tema escuro;\n• desativa ou restringe atividades em segundo plano, alguns efeitos visuais e outros recursos, como o \"Ok Google\".\n\n"<annotation id="url">"Saiba mais"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Para prolongar a duração da carga, a \"Economia de bateria\":\n\n• ativa o tema escuro;\n• desativa ou restringe atividades em segundo plano, alguns efeitos visuais e outros recursos, como o \"Ok Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Para ajudar a reduzir o uso de dados, a Economia de dados impede que alguns apps enviem ou recebam dados em segundo plano. Um app que você esteja usando no momento pode acessar dados, mas com menos frequência. Isso pode fazer com que imagens não sejam exibidas até que você toque nelas."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Ativar \"Economia de dados\"?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Ativar"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index c78bfb7..1beb966 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Prima Menu para desbloquear ou efectuar uma chamada de emergência."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Prima Menu para desbloquear."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Desenhar padrão para desbloquear"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergência"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Chamada de emergência"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Regressar à chamada"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correcto!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Tentar novamente"</string>
@@ -1128,7 +1128,7 @@
     <string name="whichViewApplication" msgid="5733194231473132945">"Abrir com"</string>
     <string name="whichViewApplicationNamed" msgid="415164730629690105">"Abrir com %1$s"</string>
     <string name="whichViewApplicationLabel" msgid="7367556735684742409">"Abrir"</string>
-    <string name="whichOpenHostLinksWith" msgid="7645631470199397485">"Abra os links de <xliff:g id="HOST">%1$s</xliff:g> com:"</string>
+    <string name="whichOpenHostLinksWith" msgid="7645631470199397485">"Abrir os links de <xliff:g id="HOST">%1$s</xliff:g> com:"</string>
     <string name="whichOpenLinksWith" msgid="1120936181362907258">"Abrir os links com:"</string>
     <string name="whichOpenLinksWithApp" msgid="6917864367861910086">"Abra os links com a app <xliff:g id="APPLICATION">%1$s</xliff:g>"</string>
     <string name="whichOpenHostLinksWithApp" msgid="2401668560768463004">"Abra os links de <xliff:g id="HOST">%1$s</xliff:g> com a app <xliff:g id="APPLICATION">%2$s</xliff:g>"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Atualizado pelo seu gestor"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Eliminado pelo seu gestor"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Para prolongar a autonomia da bateria, a Poupança de bateria:\n\n•Ativa o tema escuro.\n•Desativa ou restringe a atividade em segundo plano, alguns efeitos visuais e outras funcionalidades como \"Ok Google\".\n\n"<annotation id="url">"Saber mais"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Para prolongar a autonomia da bateria, a Poupança de bateria:\n\n•Ativa o tema escuro.\n•Desativa ou restringe a atividade em segundo plano, alguns efeitos visuais e outras funcionalidades como \"Ok Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Para prolongar a autonomia da bateria, a Poupança de bateria:\n\n•Ativa o tema escuro.\n•Desativa ou restringe a atividade em segundo plano, alguns efeitos visuais e outras funcionalidades como \"Ok Google\".\n\n"<annotation id="url">"Saiba mais"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Para prolongar a autonomia da bateria, a Poupança de bateria:\n\n• Ativa o tema escuro.\n•·Desativa ou restringe a atividade em segundo plano, alguns efeitos visuais e outras funcionalidades como \"Ok Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Para ajudar a reduzir a utilização de dados, a Poupança de dados impede que algumas aplicações enviem ou recebam dados em segundo plano. Uma determinada app que esteja a utilizar atualmente pode aceder aos dados, mas é possível que o faça com menos frequência. Isto pode significar, por exemplo, que as imagens não são apresentadas até que toque nas mesmas."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Pretende ativar a Poupança de dados?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Ativar"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index bea5300..fa5be92 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Pressione Menu para desbloquear ou fazer uma chamada de emergência."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Pressione Menu para desbloquear."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Desenhe o padrão para desbloquear"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergência"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Chamada de emergência"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Retornar à chamada"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Correto!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Tente novamente"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Atualizado pelo seu administrador"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Excluído pelo seu administrador"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Para prolongar a duração da carga, a \"Economia de bateria\":\n\n•ativa o tema escuro;\n•desativa ou restringe atividades em segundo plano, alguns efeitos visuais e outros recursos, como o \"Ok Google\".\n\n"<annotation id="url">"Saiba mais"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Para prolongar a duração da carga, a \"Economia de bateria\":\n\n•ativa o tema escuro;\n•desativa ou restringe atividades em segundo plano, alguns efeitos visuais e outros recursos, como o \"Ok Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Para prolongar a duração da carga, a \"Economia de bateria\":\n\n• ativa o tema escuro;\n• desativa ou restringe atividades em segundo plano, alguns efeitos visuais e outros recursos, como o \"Ok Google\".\n\n"<annotation id="url">"Saiba mais"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Para prolongar a duração da carga, a \"Economia de bateria\":\n\n• ativa o tema escuro;\n• desativa ou restringe atividades em segundo plano, alguns efeitos visuais e outros recursos, como o \"Ok Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Para ajudar a reduzir o uso de dados, a Economia de dados impede que alguns apps enviem ou recebam dados em segundo plano. Um app que você esteja usando no momento pode acessar dados, mas com menos frequência. Isso pode fazer com que imagens não sejam exibidas até que você toque nelas."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Ativar \"Economia de dados\"?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Ativar"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 4c5fbe6..bffa457 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -832,7 +832,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Apăsați Meniu pentru a debloca sau pentru a efectua apeluri de urgență."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Apăsați Meniu pentru deblocare."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Desenați modelul pentru a debloca"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Urgență"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Apel de urgență"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Reveniți la apel"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Corect!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Încercați din nou"</string>
@@ -1815,8 +1815,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Actualizat de administratorul dvs."</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Șters de administratorul dvs."</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Pentru a mări autonomia bateriei, Economisirea bateriei:\n\n•·activează tema întunecată;\n•·dezactivează sau restricționează activitatea în fundal, unele efecte vizuale și alte funcții, cum ar fi „Ok Google”.\n\n"<annotation id="url">"Aflați mai multe"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Pentru a mări autonomia bateriei, Economisirea bateriei:\n\n• activează tema întunecată;\n• dezactivează sau restricționează activitatea în fundal, unele efecte vizuale și alte funcții, cum ar fi „Ok Google”."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Pentru a mări autonomia bateriei, Economisirea bateriei:\n\n•·activează tema întunecată;\n•·dezactivează sau restricționează activitatea în fundal, unele efecte vizuale și alte funcții, cum ar fi „Ok Google”.\n\n"<annotation id="url">"Aflați mai multe"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Pentru a mări autonomia bateriei, Economisirea bateriei:\n\n• activează tema întunecată;\n• dezactivează sau restricționează activitatea în fundal, unele efecte vizuale și alte funcții, cum ar fi „Ok Google”."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Pentru a contribui la reducerea utilizării de date, Economizorul de date împiedică unele aplicații să trimită sau să primească date în fundal. O aplicație pe care o folosiți poate accesa datele, însă mai rar. Aceasta poate însemna, de exemplu, că imaginile se afișează numai după ce le atingeți."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Activați Economizorul de date?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Activați"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index fa5b001..f7f80f2 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -298,7 +298,7 @@
     <string name="safeMode" msgid="8974401416068943888">"Безопасный режим"</string>
     <string name="android_system_label" msgid="5974767339591067210">"Система Android"</string>
     <string name="user_owner_label" msgid="8628726904184471211">"Переключиться на личный профиль"</string>
-    <string name="managed_profile_label" msgid="7316778766973512382">"Переключиться на рабочий профиль"</string>
+    <string name="managed_profile_label" msgid="7316778766973512382">"Перейти в рабочий профиль"</string>
     <string name="permgrouplab_contacts" msgid="4254143639307316920">"Контакты"</string>
     <string name="permgroupdesc_contacts" msgid="9163927941244182567">"доступ к контактам"</string>
     <string name="permgrouplab_location" msgid="1858277002233964394">"Местоположение"</string>
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Нажмите \"Меню\", чтобы разблокировать экран или вызвать службу экстренной помощи."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Для разблокировки нажмите \"Меню\"."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Введите графический ключ"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Экстренный вызов"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Экстренный вызов"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Вернуться к вызову"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Правильно!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Повторите попытку"</string>
@@ -1261,7 +1261,7 @@
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"Выбран режим \"Без звука\""</string>
     <string name="volume_call" msgid="7625321655265747433">"Громкость при разговоре"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"Громкость при разговоре"</string>
-    <string name="volume_alarm" msgid="4486241060751798448">"Громкость сигнала предупреждения"</string>
+    <string name="volume_alarm" msgid="4486241060751798448">"Громкость будильника"</string>
     <string name="volume_notification" msgid="6864412249031660057">"Громкость уведомления"</string>
     <string name="volume_unknown" msgid="4041914008166576293">"Громкость"</string>
     <string name="volume_icon_description_bluetooth" msgid="7540388479345558400">"Громкость Bluetooth-устройства"</string>
@@ -1688,7 +1688,7 @@
     <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Выберите функции, которые будут запускаться с помощью кнопки специальных возможностей"</string>
     <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Выберите функции, которые будут запускаться с помощью кнопки регулировки громкости"</string>
     <string name="accessibility_uncheck_legacy_item_warning" msgid="8047830891064817447">"Сервис \"<xliff:g id="SERVICE_NAME">%s</xliff:g>\" отключен."</string>
-    <string name="edit_accessibility_shortcut_menu_button" msgid="8885752738733772935">"Изменить быстрые клавиши"</string>
+    <string name="edit_accessibility_shortcut_menu_button" msgid="8885752738733772935">"Изменить ярлыки"</string>
     <string name="done_accessibility_shortcut_menu_button" msgid="3668407723770815708">"Готово"</string>
     <string name="disable_accessibility_shortcut" msgid="5806091378745232383">"Деактивировать быстрое включение"</string>
     <string name="leave_accessibility_shortcut_on" msgid="6543362062336990814">"Использовать быстрое включение"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Обновлено администратором"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Удалено администратором"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ОК"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Чтобы продлить время работы от батареи, в режиме энергосбережения:\n\n• включается тёмная тема;\n• отключаются или ограничиваются фоновые процессы, некоторые визуальные эффекты и другие функции (например, распознавание команды \"Окей, Google\").\n\n"<annotation id="url">"Подробнее…"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Чтобы продлить время работы от батареи, в режиме энергосбережения:\n\n• включается тёмная тема;\n• отключаются или ограничиваются фоновые процессы, некоторые визуальные эффекты и другие функции (например, распознавание команды \"Окей, Google\")."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Чтобы продлить время работы от батареи, в режиме энергосбережения:\n\n• включается тёмная тема;\n• отключаются или ограничиваются фоновые процессы, некоторые визуальные эффекты и другие функции (например, распознавание команды \"Окей, Google\").\n\n"<annotation id="url">"Подробнее…"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Чтобы продлить время работы от батареи, в режиме энергосбережения:\n\n• включается тёмная тема;\n• отключаются или ограничиваются фоновые процессы, некоторые визуальные эффекты и другие функции (например, распознавание команды \"Окей, Google\")."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"В режиме экономии трафика фоновая передача данных для некоторых приложений отключена. Приложение, которым вы пользуетесь, может получать и отправлять данные, но реже, чем обычно. Например, изображения могут не загружаться, пока вы не нажмете на них."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Включить экономию трафика?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Включить"</string>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index b477be8..dc8f723 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"අගුළු හැරීමට මෙනුව ඔබන්න හෝ හදිසි ඇමතුම ලබාගන්න."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"අගුළු හැරීමට මෙනු ඔබන්න."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"අගුළු ඇරීමට රටාව අඳින්න"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"හදිසි"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"හදිසි ඇමතුම"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"ඇමතුම වෙත නැවත යන්න"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"නිවැරදියි!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"නැවත උත්සාහ කරන්න"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"ඔබගේ පරිපාලක මඟින් යාවත්කාලීන කර ඇත"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"ඔබගේ පරිපාලක මඟින් මකා දමා ඇත"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"හරි"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"බැටරියේ ජීව කාලය දික් කිරීමට, බැටරි සුරැකුම:\n\n•අඳුරු තේමාව ක්‍රියාත්මක කරයි\n•පසුබිමේ ක්‍රියාකාරකම, සමහර දෘෂ්‍ය ප්‍රයෝග සහ “Hey Google” වැනි වෙනත් විශේෂාංග ක්‍රියාවිරහිත කරයි නැතහොත් අවහිර කරයි\n\n"<annotation id="url">"තව දැන ගන්න"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"බැටරියේ ජීව කාලය දික් කිරීමට, බැටරි සුරැකුම:\n\n•අඳුරු තේමාව ක්‍රියාත්මක කරයි\n•පසුබිමේ ක්‍රියාකාරකම, සමහර දෘෂ්‍ය ප්‍රයෝග සහ “Hey Google” වැනි වෙනත් විශේෂාංග ක්‍රියාවිරහිත කරයි නැතහොත් අවහිර කරයි"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"බැටරියේ ජීව කාලය දික් කිරීමට, බැටරි සුරැකුම:\n\n•අඳුරු තේමාව ක්‍රියාත්මක කරයි\n•පසුබිමේ ක්‍රියාකාරකම, සමහර දෘශ්‍ය ප්‍රයෝග සහ “Hey Google” වැනි වෙනත් විශේෂාංග ක්‍රියාවිරහිත කරයි නැතහොත් අවහිර කරයි\n\n"<annotation id="url">"තව දැන ගන්න"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"බැටරියේ ජීව කාලය දික් කිරීමට, බැටරි සුරැකුම:\n\n•අඳුරු තේමාව ක්‍රියාත්මක කරයි\n•පසුබිමේ ක්‍රියාකාරකම, සමහර දෘශ්‍ය ප්‍රයෝග සහ “Hey Google” වැනි වෙනත් විශේෂාංග ක්‍රියාවිරහිත කරයි නැතහොත් අවහිර කරයි"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"දත්ත භාවිතය අඩු කිරීමට උදවු වීමට, දත්ත සුරැකුම සමහර යෙදුම් පසුබිමින් දත්ත යැවීම සහ ලබා ගැනීම වළක්වයි. ඔබ දැනට භාවිත කරන යෙදුමකට දත්ත වෙත පිවිසීමට හැකිය, නමුත් එසේ කරන්නේ කලාතුරකින් විය හැකිය. මෙයින් අදහස් වන්නේ, උදාහරණයක් ලෙස, එම රූප ඔබ ඒවාට තට්ටු කරන තෙක් සංදර්ශනය නොවන බවය."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"දත්ත සුරැකුම ක්‍රියාත්මක කරන්නද?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ක්‍රියාත්මක කරන්න"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 11c99a1..df5cdac 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Ak chcete odomknúť telefón alebo uskutočniť tiesňové volanie, stlačte Menu."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Telefón odomknete stlačením tlačidla Menu."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Odomknite nakreslením vzoru"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Stav tiesne"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Tiesňové volanie"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Zavolať späť"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Správne!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Skúsiť znova"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Aktualizoval správca"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Odstránil správca"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Šetrič batérie predlžuje výdrž batérie:\n\n• zapnutím tmavého motívu;\n•vypnutím alebo obmedzením aktivity na pozadí, niektorých vizuálnych efektov a ďalších funkcií, ako napríklad kľúčového slova „Hey Google“.\n\n"<annotation id="url">"Ďalšie informácie"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Šetrič batérie predlžuje výdrž batérie:\n\n• zapnutím tmavého motívu;\n• vypnutím alebo obmedzením aktivity na pozadí, niektorých vizuálnych efektov a ďalších funkcií, ako napríklad kľúčového slova „Hey Google“."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Šetrič batérie predlžuje výdrž batérie:\n\n• zapnutím tmavého motívu;\n• vypnutím alebo obmedzením aktivity na pozadí, niektorých vizuálnych efektov a ďalších funkcií, ako napríklad kľúčového výrazu „Hey Google“.\n\n"<annotation id="url">"Ďalšie informácie"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Šetrič batérie predlžuje výdrž batérie:\n\n• zapnutím tmavého motívu;\n• vypnutím alebo obmedzením aktivity na pozadí, niektorých vizuálnych efektov a ďalších funkcií, ako napríklad kľúčového výrazu „Hey Google“."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"S cieľom znížiť spotrebu dát bráni šetrič dát niektorým aplikáciám odosielať alebo prijímať dáta na pozadí. Aplikácia, ktorú práve používate, môže využívať dáta, ale možno to bude robiť menej často. Znamená to napríklad, že sa nezobrazia obrázky, kým na ne neklepnete."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Chcete zapnúť šetrič dát?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Zapnúť"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index dde651f..32cfb18 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Če želite odkleniti napravo ali opraviti klic v sili, pritisnite meni."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Če želite odkleniti, pritisnite meni."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Če želite odkleniti, narišite vzorec"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Klic v sili"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Klic v sili"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Nazaj na klic"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Pravilno."</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Poskusi znova"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Posodobil skrbnik"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Izbrisal skrbnik"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"V redu"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Funkcija varčevanja z energijo baterije podaljša čas delovanja baterije tako:\n\n•Vklopi temno temo,\n•izklopi ali omeji izvajanje dejavnosti v ozadju, nekaterih vizualnih učinkov in drugih funkcij, kot je »Hey Google«.\n\n"<annotation id="url">"Več o tem"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Funkcija varčevanja z energijo baterije podaljša čas delovanja baterije tako:\n\n•Vklopi temno temo,\n•izklopi ali omeji izvajanje dejavnosti v ozadju, nekaterih vizualnih učinkov in drugih funkcij, kot je »Hey Google«."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Funkcija varčevanja z energijo baterije podaljša čas delovanja baterije tako:\n\n• vklopi temno temo,\n• izklopi ali omeji dejavnost v ozadju, nekatere vizualne učinke in druge funkcije, kot je »Hey Google«.\n\n"<annotation id="url">"Več o tem"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Funkcija varčevanja z energijo baterije podaljša čas delovanja baterije tako:\n\n• vklopi temno temo;\n• izklopi ali omeji dejavnost v ozadju, nekatere vizualne učinke in druge funkcije, kot je »Hey Google«."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Zaradi zmanjševanja prenesene količine podatkov funkcija varčevanja s podatki nekaterim aplikacijam preprečuje, da bi v ozadju pošiljale ali prejemale podatke. Aplikacija, ki jo trenutno uporabljate, lahko prenaša podatke, vendar to morda počne manj pogosto. To na primer pomeni, da se slike ne prikažejo, dokler se jih ne dotaknete."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Vklop varčevanja s podatki?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Vklop"</string>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index 258940b..d84b019 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Shtyp \"Meny\" për të shkyçur ose për të kryer telefonatë urgjence."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Shtyp \"Meny\" për të shkyçur."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Vizato modelin për ta shkyçur"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Urgjenca"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Telefonata e urgjencës"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Kthehu te telefonata"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Saktë!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Provo sërish"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Përditësuar nga administratori"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Fshirë nga administratori"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Në rregull"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Për të rritur kohëzgjatjen e baterisë, \"Kursyesi i baterisë\":\n\n• Aktivizon \"Temën e errët\"\n•Çaktivizon ose kufizon aktivitetin në sfond, disa efekte vizuale dhe veçori të tjera si “Ok Google”\n\n"<annotation id="url">"Mëso më shumë"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Për të rritur kohëzgjatjen e baterisë, \"Kursyesi i baterisë\":\n\n• Aktivizon \"Temën e errët\"\n•Çaktivizon ose kufizon aktivitetin në sfond, disa efekte vizuale dhe veçori të tjera si “Ok Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Për të rritur kohëzgjatjen e baterisë, \"Kursyesi i baterisë\":\n\n• Aktivizon \"Temën e errët\"\n• Çaktivizon ose kufizon aktivitetin në sfond, disa efekte vizuale dhe veçori të tjera si “Ok Google”\n\n"<annotation id="url">"Mëso më shumë"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Për të rritur kohëzgjatjen e baterisë, \"Kursyesi i baterisë\":\n\n• Aktivizon \"Temën e errët\"\n• Çaktivizon ose kufizon aktivitetin në sfond, disa efekte vizuale dhe veçori të tjera si “Ok Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Për të ndihmuar në reduktimin e përdorimit të të dhënave, \"Kursyesi i të dhënave\" pengon që disa aplikacione të dërgojnë apo të marrin të dhëna në sfond. Një aplikacion që po përdor aktualisht mund të ketë qasje te të dhënat, por këtë mund ta bëjë më rrallë. Kjo mund të nënkuptojë, për shembull, se imazhet nuk shfaqen kur troket mbi to."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Të aktivizohet \"Kursyesi i të dhënave\"?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Aktivizo"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 651efc4e..d2e7865 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -94,7 +94,7 @@
     <string name="notification_channel_mobile_data_status" msgid="1941911162076442474">"Статус мобилних података"</string>
     <string name="notification_channel_sms" msgid="1243384981025535724">"SMS-ови"</string>
     <string name="notification_channel_voice_mail" msgid="8457433203106654172">"Поруке говорне поште"</string>
-    <string name="notification_channel_wfc" msgid="9048240466765169038">"Позивање преко Wi-Fi мреже"</string>
+    <string name="notification_channel_wfc" msgid="9048240466765169038">"Позивање преко WiFi мреже"</string>
     <string name="notification_channel_sim" msgid="5098802350325677490">"Статус SIM-а"</string>
     <string name="notification_channel_sim_high_prio" msgid="642361929452850928">"Обавештења SIM картице са статусом „висок приоритет“"</string>
     <string name="peerTtyModeFull" msgid="337553730440832160">"Корисник захтева ПОТПУН режим TTY"</string>
@@ -123,30 +123,30 @@
     <string name="roamingText11" msgid="5245687407203281407">"Банер роминга је укључен"</string>
     <string name="roamingText12" msgid="673537506362152640">"Банер роминга је искључен"</string>
     <string name="roamingTextSearching" msgid="5323235489657753486">"Претраживање услуге"</string>
-    <string name="wfcRegErrorTitle" msgid="3193072971584858020">"Подешавање позивања преко Wi-Fi-ја није успело"</string>
+    <string name="wfcRegErrorTitle" msgid="3193072971584858020">"Подешавање позивања преко WiFi-а није успело"</string>
   <string-array name="wfcOperatorErrorAlertMessages">
-    <item msgid="468830943567116703">"Да бисте упућивали позиве и слали поруке преко Wi-Fi-ја, прво затражите од мобилног оператера да вам омогући ову услугу. Затим у Подешавањима поново укључите Позивање преко Wi-Fi-ја. (кôд грешке: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
+    <item msgid="468830943567116703">"Да бисте упућивали позиве и слали поруке преко WiFi-а, прво затражите од мобилног оператера да вам омогући ову услугу. Затим у Подешавањима поново укључите Позивање преко WiFi-а. (кôд грешке: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
   </string-array>
   <string-array name="wfcOperatorErrorNotificationMessages">
     <item msgid="4795145070505729156">"Проблем у вези са регистровањем позивања преко Wi‑Fi-ја код мобилног оператера: <xliff:g id="CODE">%1$s</xliff:g>"</item>
   </string-array>
     <!-- no translation found for wfcSpnFormat_spn (2982505428519096311) -->
     <skip />
-    <string name="wfcSpnFormat_spn_wifi_calling" msgid="3165949348000906194">"<xliff:g id="SPN">%s</xliff:g> позивање преко Wi-Fi-ја"</string>
-    <string name="wfcSpnFormat_spn_wifi_calling_vo_hyphen" msgid="3836827895369365298">"<xliff:g id="SPN">%s</xliff:g> – позивање преко Wi-Fi-ја"</string>
+    <string name="wfcSpnFormat_spn_wifi_calling" msgid="3165949348000906194">"<xliff:g id="SPN">%s</xliff:g> позивање преко WiFi-а"</string>
+    <string name="wfcSpnFormat_spn_wifi_calling_vo_hyphen" msgid="3836827895369365298">"<xliff:g id="SPN">%s</xliff:g> – позивање преко WiFi-а"</string>
     <string name="wfcSpnFormat_wlan_call" msgid="4895315549916165700">"WLAN позив"</string>
     <string name="wfcSpnFormat_spn_wlan_call" msgid="255919245825481510">"<xliff:g id="SPN">%s</xliff:g> WLAN позив"</string>
-    <string name="wfcSpnFormat_spn_wifi" msgid="7232899594327126970">"<xliff:g id="SPN">%s</xliff:g> Wi-Fi"</string>
-    <string name="wfcSpnFormat_wifi_calling_bar_spn" msgid="8383917598312067365">"Позивање преко Wi-Fi-ја | <xliff:g id="SPN">%s</xliff:g>"</string>
+    <string name="wfcSpnFormat_spn_wifi" msgid="7232899594327126970">"<xliff:g id="SPN">%s</xliff:g> WiFi"</string>
+    <string name="wfcSpnFormat_wifi_calling_bar_spn" msgid="8383917598312067365">"Позивање преко WiFi-а | <xliff:g id="SPN">%s</xliff:g>"</string>
     <string name="wfcSpnFormat_spn_vowifi" msgid="6865214948822061486">"<xliff:g id="SPN">%s</xliff:g> VoWifi"</string>
-    <string name="wfcSpnFormat_wifi_calling" msgid="6178935388378661755">"Позивање преко Wi-Fi-ја"</string>
-    <string name="wfcSpnFormat_wifi" msgid="1376356951297043426">"Wi-Fi"</string>
-    <string name="wfcSpnFormat_wifi_calling_wo_hyphen" msgid="7178561009225028264">"Позивање преко Wi-Fi-ја"</string>
+    <string name="wfcSpnFormat_wifi_calling" msgid="6178935388378661755">"Позивање преко WiFi-а"</string>
+    <string name="wfcSpnFormat_wifi" msgid="1376356951297043426">"WiFi"</string>
+    <string name="wfcSpnFormat_wifi_calling_wo_hyphen" msgid="7178561009225028264">"Позивање преко WiFi-а"</string>
     <string name="wfcSpnFormat_vowifi" msgid="8371335230890725606">"VoWifi"</string>
     <string name="wifi_calling_off_summary" msgid="5626710010766902560">"Искључено"</string>
-    <string name="wfc_mode_wifi_preferred_summary" msgid="1035175836270943089">"Позивање преко Wi-Fi-ја"</string>
+    <string name="wfc_mode_wifi_preferred_summary" msgid="1035175836270943089">"Позивање преко WiFi-а"</string>
     <string name="wfc_mode_cellular_preferred_summary" msgid="4958965609212575619">"Позив преко мобилне мреже"</string>
-    <string name="wfc_mode_wifi_only_summary" msgid="104951993894678665">"Само Wi-Fi"</string>
+    <string name="wfc_mode_wifi_only_summary" msgid="104951993894678665">"Само WiFi"</string>
     <string name="cfTemplateNotForwarded" msgid="862202427794270501">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Није прослеђено"</string>
     <string name="cfTemplateForwarded" msgid="9132506315842157860">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
     <string name="cfTemplateForwardedTime" msgid="735042369233323609">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g> након <xliff:g id="TIME_DELAY">{2}</xliff:g> секунде/и"</string>
@@ -495,14 +495,14 @@
     <string name="permdesc_changeNetworkState" msgid="649341947816898736">"Дозвољава апликацији да мења статус повезивања са мрежом."</string>
     <string name="permlab_changeTetherState" msgid="9079611809931863861">"промена повезивања привезивањем"</string>
     <string name="permdesc_changeTetherState" msgid="3025129606422533085">"Дозвољава апликацији да мења статус везе са привезаном мрежом."</string>
-    <string name="permlab_accessWifiState" msgid="5552488500317911052">"преглед Wi-Fi веза"</string>
-    <string name="permdesc_accessWifiState" msgid="6913641669259483363">"Дозвољава апликацији да прегледа информације о Wi-Fi умрежавању, као што су информације о томе да ли је Wi-Fi омогућен и називи повезаних Wi-Fi уређаја."</string>
-    <string name="permlab_changeWifiState" msgid="7947824109713181554">"повезивање и прекид везе са Wi-Fi мрежом"</string>
-    <string name="permdesc_changeWifiState" msgid="7170350070554505384">"Дозвољава апликацији да се повезује са приступним тачкама за Wi-Fi и прекида везу са њима, као и да уноси промене у конфигурацију уређаја за Wi-Fi мреже."</string>
-    <string name="permlab_changeWifiMulticastState" msgid="285626875870754696">"омогућавање пријема вишесмерног Wi-Fi саобраћаја"</string>
-    <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="191079868596433554">"Дозвољава апликацији да прима пакете који се шаљу на све уређаје на Wi-Fi мрежи помоћу вишесмерних адреса, а не само на таблет. Користи више напајања од режима једносмерног саобраћаја."</string>
-    <string name="permdesc_changeWifiMulticastState" product="tv" msgid="1336952358450652595">"Дозвољава апликацији да прима пакете који се шаљу на све уређаје на Wi-Fi мрежи помоћу вишесмерних адреса, а не само на Android TV уређај. Користи више енергије од режима без вишесмерног слања."</string>
-    <string name="permdesc_changeWifiMulticastState" product="default" msgid="8296627590220222740">"Дозвољава апликацији да прима пакете који се шаљу на све уређаје на Wi-Fi мрежи помоћу вишесмерних адреса, а не само на телефон. Користи више напајања од режима једносмерног саобраћаја."</string>
+    <string name="permlab_accessWifiState" msgid="5552488500317911052">"преглед WiFi веза"</string>
+    <string name="permdesc_accessWifiState" msgid="6913641669259483363">"Дозвољава апликацији да прегледа информације о WiFi умрежавању, као што су информације о томе да ли је WiFi омогућен и називи повезаних WiFi уређаја."</string>
+    <string name="permlab_changeWifiState" msgid="7947824109713181554">"повезивање и прекид везе са WiFi мрежом"</string>
+    <string name="permdesc_changeWifiState" msgid="7170350070554505384">"Дозвољава апликацији да се повезује са приступним тачкама за WiFi и прекида везу са њима, као и да уноси промене у конфигурацију уређаја за WiFi мреже."</string>
+    <string name="permlab_changeWifiMulticastState" msgid="285626875870754696">"омогућавање пријема вишесмерног WiFi саобраћаја"</string>
+    <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="191079868596433554">"Дозвољава апликацији да прима пакете који се шаљу на све уређаје на WiFi мрежи помоћу вишесмерних адреса, а не само на таблет. Користи више напајања од режима једносмерног саобраћаја."</string>
+    <string name="permdesc_changeWifiMulticastState" product="tv" msgid="1336952358450652595">"Дозвољава апликацији да прима пакете који се шаљу на све уређаје на WiFi мрежи помоћу вишесмерних адреса, а не само на Android TV уређај. Користи више енергије од режима без вишесмерног слања."</string>
+    <string name="permdesc_changeWifiMulticastState" product="default" msgid="8296627590220222740">"Дозвољава апликацији да прима пакете који се шаљу на све уређаје на WiFi мрежи помоћу вишесмерних адреса, а не само на телефон. Користи више напајања од режима једносмерног саобраћаја."</string>
     <string name="permlab_bluetoothAdmin" msgid="6490373569441946064">"приступ Bluetooth подешавањима"</string>
     <string name="permdesc_bluetoothAdmin" product="tablet" msgid="5370837055438574863">"Дозвољава апликацији да конфигурише локални Bluetooth таблет, као и да открије даљинске уређаје и упари се са њима."</string>
     <string name="permdesc_bluetoothAdmin" product="tv" msgid="1623992984547014588">"Дозвољава апликацији да конфигурише Bluetooth на Android TV уређају и да открије удаљене уређаје и упари се са њима."</string>
@@ -832,7 +832,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Притисните „Мени“ да бисте откључали телефон или упутите хитан позив."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Притисните „Мени“ за откључавање."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Унесите шаблон за откључавање"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Хитне службе"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Хитан позив"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Назад на позив"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Тачно!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Пробајте поново"</string>
@@ -923,7 +923,7 @@
     <string name="granularity_label_link" msgid="9007852307112046526">"линк"</string>
     <string name="granularity_label_line" msgid="376204904280620221">"ред"</string>
     <string name="factorytest_failed" msgid="3190979160945298006">"Фабричко тестирање није успело"</string>
-    <string name="factorytest_not_system" msgid="5658160199925519869">"Радња FACTORY_TEST је подржана само за пакете инсталиране у директоријуму /system/app."</string>
+    <string name="factorytest_not_system" msgid="5658160199925519869">"Радња FACTORY_TEST је подржана само за пакете инсталиране у фолдеру /system/app."</string>
     <string name="factorytest_no_action" msgid="339252838115675515">"Није пронађен ниједан пакет који обезбеђује радњу FACTORY_TEST."</string>
     <string name="factorytest_reboot" msgid="2050147445567257365">"Рестартуј"</string>
     <string name="js_dialog_title" msgid="7464775045615023241">"На страници на адреси „<xliff:g id="TITLE">%s</xliff:g>“ пише:"</string>
@@ -1256,7 +1256,7 @@
     <string name="ringtone_picker_title_alarm" msgid="7438934548339024767">"Звуци аларма"</string>
     <string name="ringtone_picker_title_notification" msgid="6387191794719608122">"Звуци обавештења"</string>
     <string name="ringtone_unknown" msgid="5059495249862816475">"Непознато"</string>
-    <string name="wifi_available_sign_in" msgid="381054692557675237">"Пријављивање на Wi-Fi мрежу"</string>
+    <string name="wifi_available_sign_in" msgid="381054692557675237">"Пријављивање на WiFi мрежу"</string>
     <string name="network_available_sign_in" msgid="1520342291829283114">"Пријавите се на мрежу"</string>
     <!-- no translation found for network_available_sign_in_detailed (7520423801613396556) -->
     <skip />
@@ -1272,7 +1272,7 @@
     <string name="network_switch_metered_toast" msgid="501662047275723743">"Прешли сте са типа мреже <xliff:g id="PREVIOUS_NETWORK">%1$s</xliff:g> на тип мреже <xliff:g id="NEW_NETWORK">%2$s</xliff:g>"</string>
   <string-array name="network_switch_type_name">
     <item msgid="2255670471736226365">"мобилни подаци"</item>
-    <item msgid="5520925862115353992">"Wi-Fi"</item>
+    <item msgid="5520925862115353992">"WiFi"</item>
     <item msgid="1055487873974272842">"Bluetooth"</item>
     <item msgid="1616528372438698248">"Етернет"</item>
     <item msgid="9177085807664964627">"VPN"</item>
@@ -1538,10 +1538,10 @@
     <string name="data_usage_warning_title" msgid="9034893717078325845">"Упозорење на потрошњу података"</string>
     <string name="data_usage_warning_body" msgid="1669325367188029454">"Потрошили сте <xliff:g id="APP">%s</xliff:g> података"</string>
     <string name="data_usage_mobile_limit_title" msgid="3911447354393775241">"Достигли сте ограничење података"</string>
-    <string name="data_usage_wifi_limit_title" msgid="2069698056520812232">"Нема више Wi-Fi података"</string>
+    <string name="data_usage_wifi_limit_title" msgid="2069698056520812232">"Нема више WiFi података"</string>
     <string name="data_usage_limit_body" msgid="3567699582000085710">"Подаци су паузирани током остатка циклуса"</string>
     <string name="data_usage_mobile_limit_snoozed_title" msgid="101888478915677895">"Потрошили сте мобилне податке"</string>
-    <string name="data_usage_wifi_limit_snoozed_title" msgid="1622359254521960508">"Потрошили сте Wi-Fi податке"</string>
+    <string name="data_usage_wifi_limit_snoozed_title" msgid="1622359254521960508">"Потрошили сте WiFi податке"</string>
     <string name="data_usage_limit_snoozed_body" msgid="545146591766765678">"Прекорачили сте <xliff:g id="SIZE">%s</xliff:g> од подешеног ограничења"</string>
     <string name="data_usage_restricted_title" msgid="126711424380051268">"Позадински подаци су ограничени"</string>
     <string name="data_usage_restricted_body" msgid="5338694433686077733">"Додирните за уклањање ограничења."</string>
@@ -1815,8 +1815,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Ажурирао је администратор"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Избрисао је администратор"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Потврди"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Да би се продужило трајање батерије, Уштеда батерије:\n\n•укључује тамну тему\n•искључује или ограничава активности у позадини, неке визуелне ефекте и друге функције, на пример „Ок Google“\n\n"<annotation id="url">"Сазнајте више"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Да би се продужило трајање батерије, Уштеда батерије:\n\n•укључује тамну тему\n•искључује или ограничава активности у позадини, неке визуелне ефекте и друге функције, на пример, „Ок Google“"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Да би се продужило трајање батерије, Уштеда батерије:\n\n• укључује тамну тему\n• искључује или ограничава активности у позадини, неке визуелне ефекте и друге функције, на пример „Ок Google“\n\n"<annotation id="url">"Сазнајте више"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Да би се продужило трајање батерије, Уштеда батерије:\n\n• укључује тамну тему\n• искључује или ограничава активности у позадини, неке визуелне ефекте и друге функције, на пример, „Ок Google“"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Да би се смањила потрошња података, Уштеда података спречава неке апликације да шаљу или примају податке у позадини. Апликација коју тренутно користите може да приступа подацима, али ће то чинити ређе. На пример, слике се неће приказивати док их не додирнете."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Желите да укључите Уштеду података?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Укључи"</string>
@@ -2038,7 +2038,7 @@
     <string name="battery_saver_charged_notification_summary" product="default" msgid="5544457317418624367">"Батерија телефона је довољно напуњена. Функције више нису ограничене."</string>
     <string name="battery_saver_charged_notification_summary" product="tablet" msgid="4426317048139996888">"Батерија таблета је довољно напуњена. Функције више нису ограничене."</string>
     <string name="battery_saver_charged_notification_summary" product="device" msgid="1031562417867646649">"Батерија уређаја је довољно напуњена. Функције више нису ограничене."</string>
-    <string name="mime_type_folder" msgid="2203536499348787650">"Директоријум"</string>
+    <string name="mime_type_folder" msgid="2203536499348787650">"Фолдер"</string>
     <string name="mime_type_apk" msgid="3168784749499623902">"Android апликација"</string>
     <string name="mime_type_generic" msgid="4606589110116560228">"Датотека"</string>
     <string name="mime_type_generic_ext" msgid="9220220924380909486">"<xliff:g id="EXTENSION">%1$s</xliff:g> датотека"</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 206ea8d..279c619 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Tryck på Menu för att låsa upp eller ringa nödsamtal."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Tryck på Menu för att låsa upp."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Rita grafiskt lösenord för att låsa upp"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Nödsamtal"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Nödsamtal"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Tillbaka till samtal"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Korrekt!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Försök igen"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Administratören uppdaterade paketet"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Administratören raderade paketet"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Batterisparläget förlänger batteritiden genom att:\n\n• aktivera mörkt tema\n• inaktivera eller begränsa aktivitet i bakgrunden, vissa visuella effekter och andra funktioner, som ”Hey Google”\n\n"<annotation id="url">"Läs mer"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Batterisparläget förlänger batteritiden genom att:\n\n• aktivera mörkt tema\n• inaktivera eller begränsa aktivitet i bakgrunden, vissa visuella effekter och andra funktioner, som ”Hey Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Batterisparläget förlänger batteritiden genom att\n\n• aktivera mörkt tema\n• inaktivera eller begränsa aktivitet i bakgrunden, vissa visuella effekter och andra funktioner, som ”Hey Google”\n\n"<annotation id="url">"Läs mer"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Batterisparläget förlänger batteritiden genom att\n\n• aktivera Mörkt tema\n• inaktivera eller begränsa aktivitet i bakgrunden, vissa visuella effekter och andra funktioner, som ”Hey Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Med databesparing kan du minska dataanvändningen genom att hindra en del appar från att skicka eller ta emot data i bakgrunden. Appar som du använder kan komma åt data, men det sker kanske inte lika ofta. Detta innebär t.ex. att bilder inte visas förrän du trycker på dem."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Vill du aktivera Databesparing?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Aktivera"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 2476a2d..7066c00 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -305,7 +305,7 @@
     <string name="permgroupdesc_storage" msgid="6351503740613026600">"ifikie picha, maudhui na faili kwenye kifaa chako"</string>
     <string name="permgrouplab_microphone" msgid="2480597427667420076">"Maikrofoni"</string>
     <string name="permgroupdesc_microphone" msgid="1047786732792487722">"irekodi sauti"</string>
-    <string name="permgrouplab_activityRecognition" msgid="3324466667921775766">"Shughuli za kimwili"</string>
+    <string name="permgrouplab_activityRecognition" msgid="3324466667921775766">"Mazoezi ya mwili"</string>
     <string name="permgroupdesc_activityRecognition" msgid="4725624819457670704">"ifikie shughuli zako za kimwili"</string>
     <string name="permgrouplab_camera" msgid="9090413408963547706">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="7585150538459320326">"ipige picha na kurekodi video"</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Bonyeza Menyu ili kufungua au kupiga simu ya dharura."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Bonyeza Menyu ili kufungua."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Chora ruwaza ili kufungua"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Dharura"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Simu ya dharura"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Rudi kwa kupiga simu"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Sahihi!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Jaribu tena"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Imesasishwa na msimamizi wako"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Imefutwa na msimamizi wako"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Sawa"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Ili kuongeza muda wa matumizi ya betri, Kiokoa Betri:\n\n•Huwasha Mandhari meusi\n•Huzima au kuzuia shughuli za chinichini, baadhi ya madoido yanayoonekana na vipengele vingine kama vile \"Ok Google\"\n\n"<annotation id="url">"Pata maelezo zaidi"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Ili kuongeza muda wa matumizi ya betri, Kiokoa Betri:\n\n•Huwasha Mandhari meusi\n•Huzima au kuzuia shughuli za chinichini, baadhi ya madoido yanayoonekana na vipengele vingine kama vile \"Ok Google\""</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Ili kuongeza muda wa matumizi ya betri, Kiokoa Betri:\n\n• Huwasha Mandhari meusi\n• Huzima au kuzuia shughuli za chinichini, baadhi ya madoido yanayoonekana na vipengele vingine kama vile \"Ok Google\"\n\n"<annotation id="url">"Pata maelezo zaidi"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Ili kuongeza muda wa matumizi ya betri, Kiokoa Betri:\n\n• Huwasha Mandhari meusi\n• Huzima au kudhibiti shughuli za chinichini, baadhi ya madoido yanayoonekana na vipengele vingine kama vile \"Ok Google\""</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Ili kusaidia kupunguza matumizi ya data, Kiokoa Data huzuia baadhi ya programu kupokea na kutuma data chinichini. Programu ambayo unatumia sasa inaweza kufikia data, lakini si kila wakati. Kwa mfano, haitaonyesha picha hadi utakapozifungua."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Ungependa Kuwasha Kiokoa Data?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Washa"</string>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 32ea979..c39e1aa 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"தடைநீக்க மெனுவை அழுத்தவும் அல்லது அவசர அழைப்பை மேற்கொள்ளவும்."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"திறக்க, மெனுவை அழுத்தவும்."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"திறக்க வடிவத்தை வரையவும்"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"அவசர அழைப்பு"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"அவசர அழைப்பு"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"அழைப்பிற்குத் திரும்பு"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"சரி!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"மீண்டும் முயற்சிக்கவும்"</string>
@@ -1307,7 +1307,7 @@
     <string name="usb_unsupported_audio_accessory_title" msgid="2335775548086533065">"அனலாக் ஆடியோ துணைக்கருவி கண்டறியப்பட்டது"</string>
     <string name="usb_unsupported_audio_accessory_message" msgid="1300168007129796621">"இணைத்துள்ள சாதனமானது இந்த மொபைலுடன் இணங்கவில்லை. மேலும் அறிய, தட்டவும்."</string>
     <string name="adb_active_notification_title" msgid="408390247354560331">"USB பிழைதிருத்தம் இணைக்கப்பட்டது"</string>
-    <string name="adb_active_notification_message" msgid="5617264033476778211">"USB பிழைதிருத்தத்தை ஆஃப் செய்ய தட்டவும்"</string>
+    <string name="adb_active_notification_message" msgid="5617264033476778211">"USB பிழைதிருத்தத்தை ஆஃப் செய்யத் தட்டவும்"</string>
     <string name="adb_active_notification_message" product="tv" msgid="6624498401272780855">"USB பிழைதிருத்தத்தை முடக்க, தேர்ந்தெடுக்கவும்."</string>
     <string name="adbwifi_active_notification_title" msgid="6147343659168302473">"வைஃபை பிழைதிருத்தம் இணைக்கப்பட்டது"</string>
     <string name="adbwifi_active_notification_message" msgid="930987922852867972">"வைஃபை பிழைதிருத்தத்தை ஆஃப் செய்ய தட்டவும்"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"உங்கள் நிர்வாகி புதுப்பித்துள்ளார்"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"உங்கள் நிர்வாகி நீக்கியுள்ளார்"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"சரி"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"பேட்டரி நிலையை நீட்டிப்பதற்காக, பேட்டரி சேமிப்பான்:\n\n•டார்க் தீமினை ஆன் செய்யும்\n•பின்னணி செயல்பாடு, சில விஷுவல் எஃபெக்ட்கள், “Hey Google” போன்ற பிற அம்சங்களை ஆஃப் செய்யும் அல்லது கட்டுப்படுத்தும்\n\n"<annotation id="url">"மேலும் அறிக"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"பேட்டரி நிலையை நீட்டிப்பதற்காக, பேட்டரி சேமிப்பான்:\n\n•டார்க் தீமினை ஆன் செய்யும்\n•பின்னணி செயல்பாடு, சில விஷுவல் எஃபெக்ட்கள், “Hey Google” போன்ற பிற அம்சங்களை ஆஃப் செய்யும் அல்லது கட்டுப்படுத்தும்"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"பேட்டரி நிலையை நீட்டிப்பதற்காக, பேட்டரி சேமிப்பான்:\n\n• டார்க் தீமினை ஆன் செய்யும்\n• பின்னணி செயல்பாடு, சில விஷுவல் எஃபெக்ட்கள், “Ok Google” போன்ற பிற அம்சங்களை ஆஃப் செய்யும் அல்லது கட்டுப்படுத்தும்\n\n"<annotation id="url">"மேலும் அறிக"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"பேட்டரி நிலையை நீட்டிப்பதற்காக, பேட்டரி சேமிப்பான்:\n\n• டார்க் தீமினை ஆன் செய்யும்\n• பின்னணிச் செயல்பாடு, சில விஷுவல் எஃபெக்ட்கள், “Ok Google” போன்ற பிற அம்சங்களை ஆஃப் செய்யும் அல்லது கட்டுப்படுத்தும்"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"டேட்டா உபயோகத்தைக் குறைப்பதற்கு உதவ, பின்புலத்தில் டேட்டாவை அனுப்புவது அல்லது பெறுவதிலிருந்து சில ஆப்ஸை டேட்டா சேமிப்பான் தடுக்கும். தற்போது பயன்படுத்தும் ஆப்ஸானது எப்போதாவது டேட்டாவை அணுகலாம். எடுத்துக்காட்டாக, படங்களை நீங்கள் தட்டும் வரை அவை காட்டப்படாது."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"டேட்டா சேமிப்பானை இயக்கவா?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"இயக்கு"</string>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index b3137e6..726fd6c 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -822,14 +822,14 @@
     <string name="keyguard_password_enter_password_code" msgid="2751130557661643482">"అన్‌లాక్ చేయడానికి పాస్‌వర్డ్‌ను టైప్ చేయండి"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="7792964196473964340">"అన్‌లాక్ చేయడానికి పిన్‌ను టైప్ చేయండి"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="8583732939138432793">"చెల్లని పిన్‌ కోడ్."</string>
-    <string name="keyguard_label_text" msgid="3841953694564168384">"అన్‌లాక్ చేయడానికి, మెను ఆపై 0ని నొక్కండి."</string>
+    <string name="keyguard_label_text" msgid="3841953694564168384">"అన్‌లాక్ చేయడానికి, మెనూ ఆపై 0ని నొక్కండి."</string>
     <string name="emergency_call_dialog_number_for_display" msgid="2978165477085612673">"అత్యవసర నంబర్"</string>
     <string name="lockscreen_carrier_default" msgid="6192313772955399160">"సేవ లేదు"</string>
     <string name="lockscreen_screen_locked" msgid="7364905540516041817">"స్క్రీన్ లాక్ చేయబడింది."</string>
-    <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"అన్‌లాక్ చేయడానికి లేదా అత్యవసర కాల్ చేయడానికి మెను నొక్కండి."</string>
-    <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"అన్‌లాక్ చేయడానికి మెను నొక్కండి."</string>
+    <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"అన్‌లాక్ చేయడానికి లేదా అత్యవసర కాల్ చేయడానికి మెనూ నొక్కండి."</string>
+    <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"అన్‌లాక్ చేయడానికి మెనూ నొక్కండి."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"అన్‌లాక్ చేయడానికి నమూనాను గీయండి"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"అత్యవసరం"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"ఎమర్జెన్సీ కాల్"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"కాల్‌కు తిరిగి వెళ్లు"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"సరైనది!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"మళ్లీ ప్రయత్నించండి"</string>
@@ -970,7 +970,7 @@
     <string name="text_copied" msgid="2531420577879738860">"వచనం క్లిప్‌బోర్డ్‌కు కాపీ చేయబడింది."</string>
     <string name="copied" msgid="4675902854553014676">"కాపీ చేయబడింది"</string>
     <string name="more_item_label" msgid="7419249600215749115">"ఎక్కువ"</string>
-    <string name="prepend_shortcut_label" msgid="1743716737502867951">"మెను+"</string>
+    <string name="prepend_shortcut_label" msgid="1743716737502867951">"మెనూ+"</string>
     <string name="menu_meta_shortcut_label" msgid="1623390163674762478">"Meta+"</string>
     <string name="menu_ctrl_shortcut_label" msgid="131911133027196485">"Ctrl+"</string>
     <string name="menu_alt_shortcut_label" msgid="343761069945250991">"Alt+"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"మీ నిర్వాహకులు నవీకరించారు"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"మీ నిర్వాహకులు తొలగించారు"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"సరే"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"బ్యాటరీ జీవితకాలాన్ని పెంచడానికి, బ్యాటరీ సేవర్ వీటిని చేస్తుంది:\n\n•ముదురు రంగు రూపాన్ని ఆన్ చేస్తుంది\n•బ్యాక్‌గ్రౌండ్ యాక్టివిటీ, కొన్ని విజువల్ ఎఫెక్ట్‌లతో పాటు “Ok Google” వంటి ఇతర ఫీచర్‌లను ఆఫ్ చేస్తుంది లేదా పరిమితం చేస్తుంది\n\n"<annotation id="url">"మరింత తెలుసుకోండి"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"బ్యాటరీ జీవితకాలాన్ని పెంచడానికి, బ్యాటరీ సేవర్ వీటిని చేస్తుంది:\n\n•ముదురు రంగు రూపాన్ని ఆన్ చేస్తుంది\n•బ్యాక్‌గ్రౌండ్ యాక్టివిటీ, కొన్ని విజువల్ ఎఫెక్ట్‌లతో పాటు “Ok Google” వంటి ఇతర ఫీచర్‌లను ఆఫ్ చేస్తుంది లేదా పరిమితం చేస్తుంది"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"బ్యాటరీ జీవితకాలాన్ని పెంచడానికి, బ్యాటరీ సేవర్ వీటిని చేస్తుంది:\n\n• ముదురు రంగు రూపాన్ని ఆన్ చేస్తుంది\n•బ్యాక్‌గ్రౌండ్ యాక్టివిటీని, కొన్ని విజువల్ ఎఫెక్ట్‌లను, అలాగే “Ok Google” వంటి ఇతర ఫీచర్‌లను ఆఫ్ చేస్తుంది లేదా పరిమితం చేస్తుంది\n\n"<annotation id="url">"మరింత తెలుసుకోండి"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"బ్యాటరీ జీవితకాలాన్ని పెంచడానికి, బ్యాటరీ సేవర్ వీటిని చేస్తుంది:\n\n•ముదురు రంగు రూపాన్ని ఆన్ చేస్తుంది\n•బ్యాక్‌గ్రౌండ్ యాక్టివిటీని, కొన్ని విజువల్ ఎఫెక్ట్‌లను, అలాగే “Ok Google” వంటి ఇతర ఫీచర్‌లను ఆఫ్ చేస్తుంది లేదా పరిమితం చేస్తుంది"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"డేటా వినియోగాన్ని తగ్గించడంలో డేటా సేవర్ సహాయకరంగా ఉంటుంది. బ్యాక్‌గ్రౌండ్‌లో కొన్ని యాప్‌లు డేటాను పంపకుండా లేదా స్వీకరించకుండా నిరోధిస్తుంది. మీరు ప్రస్తుతం ఉపయోగిస్తోన్న యాప్‌, డేటాను యాక్సెస్ చేయగలదు. కానీ త‌క్కువ సార్లు మాత్ర‌మే అలా చేయవచ్చు. ఉదాహరణకు, మీరు నొక్కే వరకు ఫోటోలు ప్రదర్శించబడవు."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"డేటా సేవర్‌ను ఆన్ చేయాలా?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"ఆన్ చేయి"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index d4e0672..92dd924 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"กด เมนู เพื่อปลดล็อกหรือโทรฉุกเฉิน"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"กด เมนู เพื่อปลดล็อก"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"วาดรูปแบบเพื่อปลดล็อก"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"เหตุฉุกเฉิน"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"หมายเลขฉุกเฉิน"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"กลับสู่การโทร"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"ถูกต้อง!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"ลองอีกครั้ง"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"อัปเดตโดยผู้ดูแลระบบ"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"ลบโดยผู้ดูแลระบบ"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ตกลง"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"โหมดประหยัดแบตเตอรี่จะดำเนินการดังต่อไปนี้เพื่อยืดอายุการใช้งานแบตเตอรี่\n\n•เปิดธีมมืด\n•ปิดหรือจำกัดกิจกรรมในเบื้องหลัง เอฟเฟกต์ภาพบางอย่าง และฟีเจอร์อื่นๆ อย่างเช่น “Ok Google”\n\n"<annotation id="url">"ดูข้อมูลเพิ่มเติม"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"โหมดประหยัดแบตเตอรี่จะดำเนินการดังต่อไปนี้เพื่อยืดอายุการใช้งานแบตเตอรี่\n\n•เปิดธีมมืด\n•ปิดหรือจำกัดกิจกรรมในเบื้องหลัง เอฟเฟกต์ภาพบางอย่าง และฟีเจอร์อื่นๆ อย่างเช่น “Ok Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"โหมดประหยัดแบตเตอรี่จะดำเนินการดังต่อไปนี้เพื่อยืดอายุการใช้งานแบตเตอรี่\n\n• เปิดธีมมืด\n• ปิดหรือจำกัดกิจกรรมในเบื้องหลัง เอฟเฟกต์ภาพบางอย่าง และฟีเจอร์อื่นๆ อย่างเช่น “Ok Google”\n\n"<annotation id="url">"ดูข้อมูลเพิ่มเติม"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"โหมดประหยัดแบตเตอรี่จะดำเนินการดังต่อไปนี้เพื่อยืดอายุการใช้งานแบตเตอรี่\n\n• เปิดธีมมืด\n• ปิดหรือจำกัดกิจกรรมในเบื้องหลัง เอฟเฟกต์ภาพบางอย่าง และฟีเจอร์อื่นๆ อย่างเช่น \"Ok Google\""</string>
     <string name="data_saver_description" msgid="4995164271550590517">"เพื่อช่วยลดปริมาณการใช้อินเทอร์เน็ต โปรแกรมประหยัดอินเทอร์เน็ตจะช่วยป้องกันไม่ให้บางแอปส่งหรือรับข้อมูลโดยการใช้อินเทอร์เน็ตอยู่เบื้องหลัง แอปที่คุณกำลังใช้งานสามารถเข้าถึงอินเทอร์เน็ตได้ แต่อาจไม่บ่อยเท่าเดิม ตัวอย่างเช่น ภาพต่างๆ จะไม่แสดงจนกว่าคุณจะแตะที่ภาพเหล่านั้น"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"เปิดการประหยัดอินเทอร์เน็ตไหม"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"เปิด"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 4cea142..f68ed31 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Pindutin ang Menu upang i-unlock o magsagawa ng pang-emergency na tawag."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Pindutin ang Menu upang i-unlock."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Iguhit ang pattern upang i-unlock"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Emergency"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Emergency na tawag"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Bumalik sa tawag"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Tama!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Subukang muli"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Na-update ng iyong admin"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Na-delete ng iyong admin"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Para patagalin ang baterya, ginagawa ng Pangtipid sa Baterya na:\n\n•I-on ang Madilim na tema\n•I-off o paghigpitan ang aktibidad sa background, ilang visual effect, at iba pang feature gaya ng “Hey Google”\n\n"<annotation id="url">"Matuto pa"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Para patagalin ang baterya, ginagawa ng Pangtipid sa Baterya na:\n\n•I-on ang Madilim na tema\n•I-off o paghigpitan ang aktibidad sa background, ilang visual effect, at iba pang feature gaya ng “Hey Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Para patagalin ang baterya, ginagawa ng Pantipid ng Baterya na:\n\n• I-on ang Madilim na tema\n• I-off o paghihigpitan ang aktibidad sa background, ilang visual effect, at iba pang feature gaya ng “Hey Google”\n\n"<annotation id="url">"Matuto pa"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Para patagalin ang baterya, ginagawa ng Pantipid ng Baterya na:\n\n• I-on ang Madilim na tema\n• I-off o paghihigpitan ang aktibidad sa background, ilang visual effect, at iba pang feature gaya ng “Hey Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Upang makatulong na mabawasan ang paggamit ng data, pinipigilan ng Data Saver ang ilang app na magpadala o makatanggap ng data sa background. Maaaring mag-access ng data ang isang app na ginagamit mo sa kasalukuyan, ngunit mas bihira na nito magagawa iyon. Halimbawa, maaaring hindi lumabas ang mga larawan hangga\'t hindi mo nata-tap ang mga ito."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"I-on ang Data Saver?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"I-on"</string>
@@ -1999,9 +1999,9 @@
     <string name="notification_appops_overlay_active" msgid="5571732753262836481">"ipinapakita sa ibabaw ng ibang app sa iyong screen"</string>
     <string name="dynamic_mode_notification_channel_name" msgid="2986926422100223328">"Notification ng impormasyon ng Routine Mode"</string>
     <string name="dynamic_mode_notification_title" msgid="9205715501274608016">"Maaaring maubos ang baterya bago ang karaniwang pag-charge"</string>
-    <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"Na-activate ang Pangtipid sa Baterya para patagalin ang buhay ng baterya"</string>
-    <string name="battery_saver_notification_channel_name" msgid="3918243458067916913">"Pangtipid sa Baterya"</string>
-    <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"Na-off ang Pangtipid sa Baterya"</string>
+    <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"Na-activate ang Pantipid ng Baterya para patagalin ang buhay ng baterya"</string>
+    <string name="battery_saver_notification_channel_name" msgid="3918243458067916913">"Pantipid ng Baterya"</string>
+    <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"Na-off ang Pantipid ng Baterya"</string>
     <string name="battery_saver_charged_notification_summary" product="default" msgid="5544457317418624367">"May sapat na charge ang telepono. Hindi na pinaghihigpitan ang mga feature."</string>
     <string name="battery_saver_charged_notification_summary" product="tablet" msgid="4426317048139996888">"May sapat na charge ang tablet. Hindi na pinaghihigpitan ang mga feature."</string>
     <string name="battery_saver_charged_notification_summary" product="device" msgid="1031562417867646649">"May sapat na charge ang device. Hindi na pinaghihigpitan ang mga feature."</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 19bdba8..c0266d6 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Kilidi açmak veya acil çağrı yapmak için Menü\'ye basın."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Kilidi açmak için Menü\'ye basın."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Kilit açmak için deseni çizin"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Acil durum çağrısı"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Acil durum araması"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Çağrıya dön"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Doğru!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Tekrar deneyin"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Yöneticiniz tarafından güncellendi"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Yöneticiniz tarafından silindi"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"Tamam"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Pil ömrünü uzatmak için Pil Tasarrufu:\n\n•Koyu temayı açar\n•Arka plan etkinliğini, bazı görsel efektleri ve \"Ok Google\" gibi diğer özellikleri kapatır veya kısıtlar\n\n"<annotation id="url">"Daha fazla bilgi"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Pil ömrünü uzatmak için Pil Tasarrufu:\n\n•Koyu temayı açar\n•Arka plan etkinliğini, bazı görsel efektleri ve \"Ok Google\" gibi diğer özellikleri kapatır veya kısıtlar"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Pil ömrünü uzatmak için Pil Tasarrufu:\n\n• Koyu temayı açar\n• Arka plan etkinliğini, bazı görsel efektleri ve \"Ok Google\" gibi diğer özellikleri kapatır veya kısıtlar\n\n"<annotation id="url">"Daha fazla bilgi"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Pil ömrünü uzatmak için Pil Tasarrufu:\n\n• Koyu temayı açar\n• Arka plan etkinliğini, bazı görsel efektleri ve \"Ok Google\" gibi diğer özellikleri kapatır veya kısıtlar"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Veri kullanımını azaltmaya yardımcı olması için Veri Tasarrufu, bazı uygulamaların arka planda veri göndermesini veya almasını engeller. Şu anda kullandığınız bir uygulama veri bağlantısına erişebilir, ancak bunu daha seyrek yapabilir. Bu durumda örneğin, siz resimlere dokunmadan resimler görüntülenmez."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Veri Tasarrufu açılsın mı?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Aç"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 09b670b..d69ac54 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -835,7 +835,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Натис. меню, щоб розбл. чи зробити авар. виклик."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Натисн. меню, щоб розбл."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Намал. ключ, щоб розбл."</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Екстрений виклик"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Екстрений виклик"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Поверн. до дзвін."</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Правильно!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Повторіть спробу"</string>
@@ -1259,9 +1259,9 @@
     <string name="volume_music" msgid="7727274216734955095">"Гучність медіа"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"Відтвор. через Bluetooth"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"Установлено сигнал дзвінка без звуку"</string>
-    <string name="volume_call" msgid="7625321655265747433">"Обсяг вхідних"</string>
-    <string name="volume_bluetooth_call" msgid="2930204618610115061">"Обсяг вхідних Bluetooth"</string>
-    <string name="volume_alarm" msgid="4486241060751798448">"Гучн. сповіщ."</string>
+    <string name="volume_call" msgid="7625321655265747433">"Гучність під час розмови"</string>
+    <string name="volume_bluetooth_call" msgid="2930204618610115061">"Гучність у викликах Bluetooth"</string>
+    <string name="volume_alarm" msgid="4486241060751798448">"Гучність будильника"</string>
     <string name="volume_notification" msgid="6864412249031660057">"Гучність сповіщень"</string>
     <string name="volume_unknown" msgid="4041914008166576293">"Гучність"</string>
     <string name="volume_icon_description_bluetooth" msgid="7540388479345558400">"Гучність Bluetooth"</string>
@@ -1838,8 +1838,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Оновлено адміністратором"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Видалено адміністратором"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ОК"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Щоб подовжити час роботи акумулятора, режим енергозбереження:\n\n•вмикає темну тему;\n•припиняє або обмежує фонову активність, вимикає деякі візуальні ефекти та інші енергозатратні функції, зокрема команду \"Ok Google\".\n\n"<annotation id="url">"Докладніше"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Щоб подовжити час роботи акумулятора, режим енергозбереження:\n\n•вмикає темну тему;\n•припиняє або обмежує фонову активність, вимикає деякі візуальні ефекти та інші енергозатратні функції, зокрема команду \"Ok Google\"."</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Щоб подовжити час роботи акумулятора, режим енергозбереження:\n\n• вмикає темну тему;\n• припиняє або обмежує фонову активність, вимикає деякі візуальні ефекти та інші енергозатратні функції, зокрема команду \"Ok Google\".\n\n"<annotation id="url">"Докладніше"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Щоб подовжити час роботи акумулятора, режим енергозбереження:\n\n• вмикає темну тему;\n• припиняє або обмежує фонову активність, вимикає деякі візуальні ефекти та інші енергозатратні функції, зокрема команду \"Ok Google\"."</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Щоб зменшити використання трафіку, функція \"Заощадження трафіку\" не дозволяє деяким додаткам надсилати чи отримувати дані у фоновому режимі. Поточний додаток зможе отримувати доступ до таких даних, але рідше. Наприклад, зображення не відображатиметься, доки ви не торкнетеся його."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Увімкнути заощадження трафіку?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Увімкнути"</string>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 4666b41..cdc132e 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -272,8 +272,8 @@
     <string name="notification_channel_security" msgid="8516754650348238057">"سیکیورٹی"</string>
     <string name="notification_channel_car_mode" msgid="2123919247040988436">"کار وضع"</string>
     <string name="notification_channel_account" msgid="6436294521740148173">"اکاؤنٹ اسٹیٹس"</string>
-    <string name="notification_channel_developer" msgid="1691059964407549150">"ڈیولپر کے پیغامات"</string>
-    <string name="notification_channel_developer_important" msgid="7197281908918789589">"اہم ڈیولپر پیغامات"</string>
+    <string name="notification_channel_developer" msgid="1691059964407549150">"ڈویلپر کے پیغامات"</string>
+    <string name="notification_channel_developer_important" msgid="7197281908918789589">"اہم ڈویلپر پیغامات"</string>
     <string name="notification_channel_updates" msgid="7907863984825495278">"اپ ڈیٹس"</string>
     <string name="notification_channel_network_status" msgid="2127687368725272809">"نیٹ ورک اسٹیٹس"</string>
     <string name="notification_channel_network_alerts" msgid="6312366315654526528">"نیٹ ورک الرٹس"</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"غیر مقفل کرنے کیلئے مینو دبائیں یا ہنگامی کال کریں۔"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"غیر مقفل کرنے کیلئے مینو دبائیں۔"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"غیر مقفل کرنے کیلئے پیٹرن کو ڈرا کریں"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"ہنگامی"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"ہنگامی کال"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"کال پر واپس جائیں"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"صحیح!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"دوبارہ کوشش کریں"</string>
@@ -1211,7 +1211,7 @@
     <string name="dump_heap_ready_notification" msgid="2302452262927390268">"<xliff:g id="PROC">%1$s</xliff:g> ہیپ ڈمپ تیار ہے"</string>
     <string name="dump_heap_notification_detail" msgid="8431586843001054050">"ہیپ ڈمپ جمع ہو گیا ہے۔ اشتراک کرنے کیلئے تھپتھپائیں۔"</string>
     <string name="dump_heap_title" msgid="4367128917229233901">"ہیپ ڈمپ کا اشتراک کریں؟"</string>
-    <string name="dump_heap_text" msgid="1692649033835719336">"<xliff:g id="PROC">%1$s</xliff:g> کارروائی اپنی میموری کی حد <xliff:g id="SIZE">%2$s</xliff:g> سے تجاوز کر گئی ہے۔ آپ کے لیے ایک ہیپ ڈمپ اس کے ڈیولپر کے ساتھ اشتراک کرنے کے لیے دستیاب ہے۔ محتاط رہیں: اس ہیپ ڈمپ میں آپ کی کوئی ایسی ذاتی معلومات بھی شامل ہو سکتی ہے جس تک ایپلیکیشن کو رسائی حاصل ہے۔"</string>
+    <string name="dump_heap_text" msgid="1692649033835719336">"<xliff:g id="PROC">%1$s</xliff:g> کارروائی اپنی میموری کی حد <xliff:g id="SIZE">%2$s</xliff:g> سے تجاوز کر گئی ہے۔ آپ کے لیے ایک ہیپ ڈمپ اس کے ڈویلپر کے ساتھ اشتراک کرنے کے لیے دستیاب ہے۔ محتاط رہیں: اس ہیپ ڈمپ میں آپ کی کوئی ایسی ذاتی معلومات بھی شامل ہو سکتی ہے جس تک ایپلیکیشن کو رسائی حاصل ہے۔"</string>
     <string name="dump_heap_system_text" msgid="6805155514925350849">"<xliff:g id="PROC">%1$s</xliff:g> پروسیس نے اپنی میموری کی حد <xliff:g id="SIZE">%2$s</xliff:g> سے بڑھا لی ہے۔ آپ کے اشتراک کرنے کے لیے ہیپ ڈمپ دستیاب ہے۔ محتاط رہیں: اس ہیپ ڈمپ میں حساس ذاتی معلومات ہو سکتی ہے، جس میں آپ کے ذریعے ٹائپ کردہ چیزیں شامل ہو سکتی ہیں، جس تک پروسیس کو رسائی حاصل ہو سکتی ہے۔"</string>
     <string name="dump_heap_ready_text" msgid="5849618132123045516">"<xliff:g id="PROC">%1$s</xliff:g> کے پروسیس کا ہیپ ڈمپ آپ کے اشتراک کے لیے دستیاب ہے۔ محتاط رہیں: اس ہیپ ڈمپ میں ممکنہ طور پر حساس ذاتی معلومات ہو سکتی ہے، جس میں آپ کے ذریعے ٹائپ کردہ چیزیں شامل ہو سکتی ہیں، جس تک پروسیس کو رسائی حاصل ہو سکتی ہے۔"</string>
     <string name="sendText" msgid="493003724401350724">"متن کیلئے ایک کارروائی منتخب کریں"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"آپ کے منتظم کے ذریعے اپ ڈیٹ کیا گیا"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"آپ کے منتظم کے ذریعے حذف کیا گیا"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"ٹھیک ہے"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"‏بیٹری لائف کو بڑھانے کے لیے، بیٹری سیور:\n\n•گہری تھیم کو آن کرتی ہے\n•پس منظر کی سرگرمی، کچھ بصری اثرات اور دیگر خصوصیات جیسے کہ \"Ok Google\" کو آف یا محدود کرتی ہے\n\n"<annotation id="url">"مزید جانیں"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"‏بیٹری لائف کو بڑھانے کے لیے، بیٹری سیور:\n\n•گہری تھیم کو آن کرتی ہے\n•پس منظر کی سرگرمی، کچھ بصری اثرات اور دیگر خصوصیات جیسے کہ \"Ok Google\" کو آف یا محدود کرتی ہے"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"‏بیٹری لائف کو بڑھانے کے لیے، بیٹری سیور:\n\n• گہری تھیم کو آن کرتی ہے\n• پس منظر کی سرگرمی، کچھ بصری اثرات اور دیگر خصوصیات جیسے کہ \"Ok Google\" کو آف یا محدود کرتی ہے\n\n"<annotation id="url">"مزید جانیں"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"‏بیٹری لائف کو بڑھانے کے لیے، بیٹری سیور: \n\n• گہری تھیم کو آن کرتی ہے\n• پس منظر کی سرگرمی، کچھ ویژوئل اثرات اور دیگر خصوصیات جیسے کہ \"Ok Google\" کو آف یا محدود کرتی ہے"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"ڈیٹا کے استعمال کو کم کرنے میں مدد کیلئے، ڈیٹا سیور پس منظر میں کچھ ایپس کو ڈیٹا بھیجنے یا موصول کرنے سے روکتی ہے۔ آپ جو ایپ فی الحال استعمال کر رہے ہیں وہ ڈیٹا تک رسائی کر سکتی ہے مگر ہو سکتا ہے ایسا اکثر نہ ہو۔ اس کا مطلب مثال کے طور پر یہ ہو سکتا ہے کہ تصاویر تھپتھپانے تک ظاہر نہ ہوں۔"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"ڈیٹا سیور آن کریں؟"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"آن کریں"</string>
@@ -1891,7 +1891,7 @@
     <string name="work_mode_turn_on" msgid="3662561662475962285">"آن کریں"</string>
     <string name="app_blocked_title" msgid="7353262160455028160">"ایپ دستیاب نہیں ہے"</string>
     <string name="app_blocked_message" msgid="542972921087873023">"<xliff:g id="APP_NAME">%1$s</xliff:g> ابھی دستیاب نہیں ہے۔"</string>
-    <string name="deprecated_target_sdk_message" msgid="5203207875657579953">"‏یہ ایپ Android کے پرانے ورژن کے لئے بنائی گئی ہے اور ہو سکتا ہے صحیح طور پر کام نہ کرے۔ اپ ڈیٹس چیک کر کے آزمائیں یا ڈیولپر سے رابطہ کریں۔"</string>
+    <string name="deprecated_target_sdk_message" msgid="5203207875657579953">"‏یہ ایپ Android کے پرانے ورژن کے لئے بنائی گئی ہے اور ہو سکتا ہے صحیح طور پر کام نہ کرے۔ اپ ڈیٹس چیک کر کے آزمائیں یا ڈویلپر سے رابطہ کریں۔"</string>
     <string name="deprecated_target_sdk_app_store" msgid="8456784048558808909">"اپ ڈیٹ چیک کریں"</string>
     <string name="new_sms_notification_title" msgid="6528758221319927107">"آپ کے پاس نئے پیغامات ہیں"</string>
     <string name="new_sms_notification_content" msgid="3197949934153460639">"‏دیکھنے کیلئے SMS ایپ کھولیں"</string>
@@ -2071,7 +2071,7 @@
     <string name="PERSOSUBSTATE_SIM_NETWORK_ENTRY" msgid="8050953231914637819">"‏SIM نیٹ ورک غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_ENTRY" msgid="7164399703751688214">"‏SIM نیٹ ورک سب سیٹ کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_SIM_CORPORATE_ENTRY" msgid="4447629474818217364">"‏SIM کارپوریٹ کو غیر مقفل کرنے کا PIN"</string>
-    <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_ENTRY" msgid="973059024670737358">"‏SIM کے خدمت کے فراہم کنندہ کو غیر مقفل کرنے کا PIN"</string>
+    <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_ENTRY" msgid="973059024670737358">"‏SIM کے سروس فراہم کنندہ کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_SIM_SIM_ENTRY" msgid="4487435301206073787">"‏SIM کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_PUK_ENTRY" msgid="768060297218652809">"‏PUK درج کریں"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK_ENTRY" msgid="7129527319490548930">"‏PUK درج کریں"</string>
@@ -2082,7 +2082,7 @@
     <string name="PERSOSUBSTATE_RUIM_NETWORK2_ENTRY" msgid="687618528751880721">"‏RUIM network2 کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_RUIM_HRPD_ENTRY" msgid="6810596579655575381">"‏RUIM hrpd کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_RUIM_CORPORATE_ENTRY" msgid="2715929642540980259">"‏RUIM کارپوریٹ کو غیر مقفل کرنے کا PIN"</string>
-    <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_ENTRY" msgid="8557791623303951590">"‏RUIM خدمت کے فراہم کنندہ کو غیر مقفل کرنے کا PIN"</string>
+    <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_ENTRY" msgid="8557791623303951590">"‏RUIM سروس فراہم کنندہ کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_RUIM_RUIM_ENTRY" msgid="7382468767274580323">"‏RUIM کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK1_PUK_ENTRY" msgid="6730880791104286987">"‏PUK درج کریں"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK2_PUK_ENTRY" msgid="6432126539782267026">"‏PUK درج کریں"</string>
@@ -2094,10 +2094,10 @@
     <string name="PERSOSUBSTATE_SIM_SP_EHPLMN_ENTRY" msgid="3988705848553894358">"‏SP Equivalent Home PLMN کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_SIM_ICCID_ENTRY" msgid="6186770686690993200">"‏ICCID کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_SIM_IMPI_ENTRY" msgid="7043865376145617024">"‏IMPI کو غیر مقفل کرنے کا PIN"</string>
-    <string name="PERSOSUBSTATE_SIM_NS_SP_ENTRY" msgid="6144227308185112176">"‏نیٹ ورک سب سیٹ خدمت کے فراہم کنندہ کو غیر مقفل کرنے کا PIN"</string>
+    <string name="PERSOSUBSTATE_SIM_NS_SP_ENTRY" msgid="6144227308185112176">"‏نیٹ ورک سب سیٹ سروس فراہم کنندہ کو غیر مقفل کرنے کا PIN"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_IN_PROGRESS" msgid="4233355366318061180">"‏SIM نیٹ ورک کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_IN_PROGRESS" msgid="6742563947637715645">"‏SIM نیٹ ورک سب سیٹ کو غیر مقفل کرنے کی درخواست کی جا رہی ہے …"</string>
-    <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_IN_PROGRESS" msgid="2033399698172403560">"‏SIM کے خدمت کے فراہم کنندہ کو غیر مقفل کرنے کی درخواست کی جار ہی ہے…"</string>
+    <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_IN_PROGRESS" msgid="2033399698172403560">"‏SIM کے سروس فراہم کنندہ کو غیر مقفل کرنے کی درخواست کی جار ہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_CORPORATE_IN_PROGRESS" msgid="4795977251920732254">"‏SIM کارپوریٹ کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_PUK_IN_PROGRESS" msgid="1090425878157254446">"‏PUK کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK_IN_PROGRESS" msgid="6476898876518094438">"‏PUK کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
@@ -2108,13 +2108,13 @@
     <string name="PERSOSUBSTATE_RUIM_NETWORK1_IN_PROGRESS" msgid="4013870911606478520">"‏RUIM network1 کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK2_IN_PROGRESS" msgid="9032651188219523434">"‏RUIM network2 کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_RUIM_HRPD_IN_PROGRESS" msgid="6584576506344491207">"‏RUIM hrpd کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
-    <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_IN_PROGRESS" msgid="830981927724888114">"‏RUIM خدمت کے فراہم کنندہ کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
+    <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_IN_PROGRESS" msgid="830981927724888114">"‏RUIM سروس فراہم کنندہ کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_RUIM_CORPORATE_IN_PROGRESS" msgid="7851790973098894802">"‏RUIM کارپوریٹ کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_SPN_IN_PROGRESS" msgid="1149560739586960121">"‏SPN کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_SP_EHPLMN_IN_PROGRESS" msgid="5708964693522116025">"‏Requesting SP Equivalent Home کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_ICCID_IN_PROGRESS" msgid="7288103122966483455">"‏ICCID کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_IMPI_IN_PROGRESS" msgid="4036752174056147753">"‏IMPI کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
-    <string name="PERSOSUBSTATE_SIM_NS_SP_IN_PROGRESS" msgid="5089536274515338566">"نیٹ ورک سب سیٹ کے خدمت کے فراہم کنندہ کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
+    <string name="PERSOSUBSTATE_SIM_NS_SP_IN_PROGRESS" msgid="5089536274515338566">"نیٹ ورک سب سیٹ کے سروس فراہم کنندہ کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_RUIM_RUIM_IN_PROGRESS" msgid="6737197986936251958">"‏RUIM کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK1_PUK_IN_PROGRESS" msgid="5658767775619998623">"‏PUK کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK2_PUK_IN_PROGRESS" msgid="665978313257653727">"‏PUK کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
@@ -2124,14 +2124,14 @@
     <string name="PERSOSUBSTATE_RUIM_RUIM_PUK_IN_PROGRESS" msgid="1230605365926493599">"‏PUK کو غیر مقفل کرنے کی درخواست کی جا رہی ہے…"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_ERROR" msgid="1924844017037151535">"‏SIM نیٹ ورک کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_ERROR" msgid="3372797822292089708">"‏SIM نیٹ ورک سب سیٹ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
-    <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_ERROR" msgid="1878443146720411381">"‏SIM کے خدمت کے فراہم کنندہ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
+    <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_ERROR" msgid="1878443146720411381">"‏SIM کے سروس فراہم کنندہ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_SIM_CORPORATE_ERROR" msgid="7664778312218023192">"‏SIM کارپوریٹ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_SIM_SIM_ERROR" msgid="2472944311643350302">"‏SIM کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK1_ERROR" msgid="828089694480999120">"‏RUIM Network1 کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK2_ERROR" msgid="17619001007092511">"‏RUIM Network2 غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_RUIM_HRPD_ERROR" msgid="807214229604353614">"‏RUIM Hrpd کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_RUIM_CORPORATE_ERROR" msgid="8644184447744175747">"‏RUIM کارپوریٹ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
-    <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_ERROR" msgid="3801002648649640407">"‏RUIM خدمت کے فراہم کنندہ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
+    <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_ERROR" msgid="3801002648649640407">"‏RUIM سروس فراہم کنندہ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_RUIM_RUIM_ERROR" msgid="707397021218680753">"‏RUIM کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_PUK_ERROR" msgid="894358680773257820">"‏PUK غیر مقفل نہیں ہو سکا۔"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK_ERROR" msgid="352466878146726991">"‏PUK غیر مقفل نہیں ہو سکا۔"</string>
@@ -2148,16 +2148,16 @@
     <string name="PERSOSUBSTATE_SIM_SP_EHPLMN_ERROR" msgid="1116993930995545742">"‏SP Equivalent Home PLMN کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_SIM_ICCID_ERROR" msgid="7559167306794441462">"‏ICCID کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_SIM_IMPI_ERROR" msgid="2782926139511136588">"‏IMPI کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
-    <string name="PERSOSUBSTATE_SIM_NS_SP_ERROR" msgid="1890493954453456758">"نیٹ ورک سب سیٹ خدمت کے فراہم کنندہ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
+    <string name="PERSOSUBSTATE_SIM_NS_SP_ERROR" msgid="1890493954453456758">"نیٹ ورک سب سیٹ سروس فراہم کنندہ کو غیر مقفل کرنے کی درخواست ناکام ہو گئی۔"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_SUCCESS" msgid="4886243367747126325">"‏SIM نیٹ ورک غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_SUCCESS" msgid="4053809277733513987">"‏SIM نیٹ ورک سب سیٹ غیر مقفل ہو گیا۔"</string>
-    <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_SUCCESS" msgid="8249342930499801740">"‏SIM کے خدمت کا فراہم کنندہ غیر مقفل ہو گیا۔"</string>
+    <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_SUCCESS" msgid="8249342930499801740">"‏SIM کے سروس فراہم کنندہ غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_SIM_CORPORATE_SUCCESS" msgid="2339794542560381270">"‏SIM کارپوریٹ غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_SIM_SIM_SUCCESS" msgid="6975608174152828954">"‏SIM غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK1_SUCCESS" msgid="2846699261330463192">"‏RUIM Network1 غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_RUIM_NETWORK2_SUCCESS" msgid="5335414726057102801">"‏RUIM Network2 غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_RUIM_HRPD_SUCCESS" msgid="8868100318474971969">"‏RUIM Hrpd غیر مقفل ہو گیا۔"</string>
-    <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_SUCCESS" msgid="6020936629725666932">"‏RUIM خدمت کا فراہم کنندہ غیر مقفل ہو گیا۔"</string>
+    <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_SUCCESS" msgid="6020936629725666932">"‏RUIM سروس فراہم کنندہ غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_RUIM_CORPORATE_SUCCESS" msgid="6944873647584595489">"‏RUIM کارپوریٹ غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_RUIM_RUIM_SUCCESS" msgid="2526483514124121988">"‏RUIM غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_SIM_NETWORK_PUK_SUCCESS" msgid="7662200333621664621">"‏PUK غیر مقفل ہو گیا۔"</string>
@@ -2175,7 +2175,7 @@
     <string name="PERSOSUBSTATE_SIM_SP_EHPLMN_SUCCESS" msgid="8146602361895007345">"‏SP Equivalent Home PLMN غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_SIM_ICCID_SUCCESS" msgid="8058678548991999545">"‏ICCID غیر مقفل ہو گیا۔"</string>
     <string name="PERSOSUBSTATE_SIM_IMPI_SUCCESS" msgid="2545608067978550571">"‏IMPI غیر مقفل ہو گیا۔"</string>
-    <string name="PERSOSUBSTATE_SIM_NS_SP_SUCCESS" msgid="4352382949744625007">"نیٹ ورک سب سیٹ کے خدمت کا فراہم کنندہ غیر مقفل ہو گیا۔"</string>
+    <string name="PERSOSUBSTATE_SIM_NS_SP_SUCCESS" msgid="4352382949744625007">"نیٹ ورک سب سیٹ کے سروس فراہم کنندہ غیر مقفل ہو گیا۔"</string>
     <string name="config_pdp_reject_dialog_title" msgid="4072057179246785727"></string>
     <string name="config_pdp_reject_user_authentication_failed" msgid="4531693033885744689"></string>
     <string name="config_pdp_reject_service_not_subscribed" msgid="8190338397128671588"></string>
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index 44c217c..e8449c3 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -584,7 +584,7 @@
     <string name="face_acquired_too_right" msgid="2513391513020932655">"Telefonni chapga suring."</string>
     <string name="face_acquired_too_left" msgid="8882499346502714350">"Telefonni oʻngga suring."</string>
     <string name="face_acquired_poor_gaze" msgid="4427153558773628020">"Qurilmaga tik qarang."</string>
-    <string name="face_acquired_not_detected" msgid="2945945257956443257">"Telefoningizga yuzingizni tik tuting."</string>
+    <string name="face_acquired_not_detected" msgid="2945945257956443257">"Telefonni yuzingizga tik qarating."</string>
     <string name="face_acquired_too_much_motion" msgid="8199691445085189528">"Ortiqcha harakatlanmoqda. Qimirlatmasdan ushlang."</string>
     <string name="face_acquired_recalibrate" msgid="8724013080976469746">"Yuzingizni qaytadan qayd qildiring."</string>
     <string name="face_acquired_too_different" msgid="4699657338753282542">"Yuz tanilmadi. Qaytadan urining."</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Qulfdan chiqarish yoki favqulodda qo‘ng‘iroqni amalga oshirish uchun \"Menyu\"ni bosing."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Qulfni ochish uchun \"Menyu\"ga bosing."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Qulfni ochish uchun grafik kalitni chizing"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Favqulodda chaqiruv"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Favqulodda chaqiruv"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Qo‘ng‘iroqni qaytarish"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"To‘g‘ri!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Qaytadan urining"</string>
@@ -1219,7 +1219,7 @@
     <string name="volume_music" msgid="7727274216734955095">"Multimedia tovushi"</string>
     <string name="volume_music_hint_playing_through_bluetooth" msgid="2614142915948898228">"Bluetooth orqali ijro etilmoqda"</string>
     <string name="volume_music_hint_silent_ringtone_selected" msgid="1514829655029062233">"Ovozsiz rejim tanlandi"</string>
-    <string name="volume_call" msgid="7625321655265747433">"Suhbat vaqtidagi tovush balandligi"</string>
+    <string name="volume_call" msgid="7625321655265747433">"Suhbat tovushi"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"Kiruvchi bluetooth tovushi"</string>
     <string name="volume_alarm" msgid="4486241060751798448">"Signal tovushi"</string>
     <string name="volume_notification" msgid="6864412249031660057">"Eslatma tovushi"</string>
@@ -1231,7 +1231,7 @@
     <string name="volume_icon_description_notification" msgid="579091344110747279">"Eslatma tovushi"</string>
     <string name="ringtone_default" msgid="9118299121288174597">"Standart rington"</string>
     <string name="ringtone_default_with_actual" msgid="2709686194556159773">"Standart (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
-    <string name="ringtone_silent" msgid="397111123930141876">"Yo‘q"</string>
+    <string name="ringtone_silent" msgid="397111123930141876">"Hech qanday"</string>
     <string name="ringtone_picker_title" msgid="667342618626068253">"Ringtonlar"</string>
     <string name="ringtone_picker_title_alarm" msgid="7438934548339024767">"Signal ovozlari"</string>
     <string name="ringtone_picker_title_notification" msgid="6387191794719608122">"Bildirishnoma ovozlari"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Administrator tomonidan yangilangan"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Administrator tomonidan o‘chirilgan"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Batareya quvvatini uzaytirish uchun Quvvat tejash funksiyasi:\n\n•Tungi mavzuni yoqadi\n•Fondagi harakatlar, vizual effektlar va “Ok Google” kabi boshqa funksiyalarni faolsizlantiradi\n\n"<annotation id="url">"Batafsil"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Batareya quvvatini uzaytirish uchun Quvvat tejash funksiyasi:\n\n•Tungi mavzuni yoqadi\n•Fondagi harakatlar, vizual effektlar va “Ok Google” kabi boshqa funksiyalarni faolsizlantiradi"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Batareya quvvatini uzaytirish uchun Quvvat tejash funksiyasi:\n\n• Tungi mavzuni yoqadi\n• Fondagi harakatlar, vizual effektlar va “Ok Google” kabi boshqa funksiyalarni faolsizlantiradi\n\n"<annotation id="url">"Batafsil"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Batareya quvvatini uzaytirish uchun Quvvat tejash funksiyasi:\n\n• Tungi mavzuni yoqadi\n• Fondagi harakatlar, vizual effektlar va “Ok Google” kabi boshqa funksiyalarni faolsizlantiradi"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Trafik tejash rejimida ayrim ilovalar uchun orqa fonda internetdan foydalanish imkoniyati cheklanadi. Siz ishlatayotgan ilova zaruratga qarab internet-trafik sarflashi mumkin, biroq cheklangan miqdorda. Masalan, rasmlar ustiga bosmaguningizcha ular yuklanmaydi."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Trafik tejash yoqilsinmi?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Yoqish"</string>
@@ -1885,7 +1885,7 @@
     <string name="app_suspended_title" msgid="888873445010322650">"Ilova ishlamayapti"</string>
     <string name="app_suspended_default_message" msgid="6451215678552004172">"<xliff:g id="APP_NAME_0">%1$s</xliff:g> ishlamayapti. Uning ishlashini <xliff:g id="APP_NAME_1">%2$s</xliff:g> cheklamoqda."</string>
     <string name="app_suspended_more_details" msgid="211260942831587014">"Batafsil"</string>
-    <string name="app_suspended_unsuspend_message" msgid="1665438589450555459">"Ilovani ishga tushirish"</string>
+    <string name="app_suspended_unsuspend_message" msgid="1665438589450555459">"Ilovani pauzadan chiqarish"</string>
     <string name="work_mode_off_title" msgid="5503291976647976560">"Ish profili yoqilsinmi?"</string>
     <string name="work_mode_off_message" msgid="8417484421098563803">"Ishga oid ilovalar, bildirishnomalar, ma’lumotlar va boshqa ish profili imkoniyatlari yoqiladi"</string>
     <string name="work_mode_turn_on" msgid="3662561662475962285">"Yoqish"</string>
@@ -1999,7 +1999,7 @@
     <string name="notification_appops_overlay_active" msgid="5571732753262836481">"ekranda boshqa ilovalar ustidan ochiladi"</string>
     <string name="dynamic_mode_notification_channel_name" msgid="2986926422100223328">"Kun tartibi rejimi haqidagi bildirishnoma"</string>
     <string name="dynamic_mode_notification_title" msgid="9205715501274608016">"Batareya quvvati odatdagidan ertaroq tugashi mumkin"</string>
-    <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"Batareya quvvati uzoqroq ishlashi uchun Tejamkor rejim yoqildi"</string>
+    <string name="dynamic_mode_notification_summary" msgid="4141614604437372157">"Batareya quvvatini uzoqroq vaqtga yetkazish uchun quvvat tejash rejimi yoqildi"</string>
     <string name="battery_saver_notification_channel_name" msgid="3918243458067916913">"Quvvat tejash"</string>
     <string name="battery_saver_off_notification_title" msgid="7637255960468032515">"Quvvat tejash rejimi faolsizlantirildi"</string>
     <string name="battery_saver_charged_notification_summary" product="default" msgid="5544457317418624367">"Telefon yetarli quvvatlandi. Funksiyalar endi cheklovlarsiz ishlaydi."</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 1a0ec2a..bf7fbca 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Nhấn vào Menu để mở khóa hoặc thực hiện cuộc gọi khẩn cấp."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Nhấn vào Menu để mở khóa."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Vẽ hình để mở khóa"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Khẩn cấp"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Cuộc gọi khẩn cấp"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Quay lại cuộc gọi"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Chính xác!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Thử lại"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Do quản trị viên của bạn cập nhật"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Do quản trị viên của bạn xóa"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"OK"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Để tăng thời lượng pin, Trình tiết kiệm pin sẽ:\n\n•Bật Giao diện tối\n•Tắt hoặc hạn chế hoạt động chạy trong nền, một số hiệu ứng hình ảnh và các tính năng khác như lệnh “Ok Google”\n\n"<annotation id="url">"Tìm hiểu thêm"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Để tăng thời lượng pin, Trình tiết kiệm pin sẽ:\n\n•Bật Giao diện tối\n•Tắt hoặc hạn chế hoạt động chạy trong nền, một số hiệu ứng hình ảnh và các tính năng khác như lệnh “Ok Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Để tăng thời lượng pin, Trình tiết kiệm pin sẽ:\n\n• Bật Giao diện tối\n• Tắt hoặc hạn chế hoạt động chạy trong nền, một số hiệu ứng hình ảnh và các tính năng khác như lệnh “Ok Google”\n\n"<annotation id="url">"Tìm hiểu thêm"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Để tăng thời lượng pin, Trình tiết kiệm pin sẽ:\n\n• Bật Giao diện tối\n• Tắt hoặc hạn chế hoạt động chạy trong nền, một số hiệu ứng hình ảnh và các tính năng khác như lệnh “Ok Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Để giúp giảm mức sử dụng dữ liệu, Trình tiết kiệm dữ liệu sẽ chặn một số ứng dụng gửi hoặc nhận dữ liệu trong nền. Ứng dụng mà bạn hiện sử dụng có thể dùng dữ liệu nhưng tần suất sẽ giảm. Ví dụ: hình ảnh sẽ không hiển thị cho đến khi bạn nhấn vào hình ảnh đó."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Bật Trình tiết kiệm dữ liệu?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Bật"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index d04c618..a645cd7 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"按 Menu 解锁或进行紧急呼救。"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"按 MENU 解锁。"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"绘制解锁图案"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"紧急呼救"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"紧急呼叫"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"返回通话"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"正确!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"重试"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"已由您的管理员更新"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"已由您的管理员删除"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"确定"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"为了延长电池续航时间,省电模式会执行以下操作:\n\n• 开启深色主题\n• 关闭或限制后台活动、部分视觉效果和其他功能,例如“Ok Google”\n\n"<annotation id="url">"了解详情"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"为了延长电池续航时间,省电模式会执行以下操作:\n\n• 开启深色主题\n• 关闭或限制后台活动、部分视觉效果和其他功能,例如“Ok Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"为了延长电池续航时间,省电模式会执行以下操作:\n\n• 开启深色主题\n• 关闭或限制后台活动、部分视觉效果和其他功能,例如“Ok Google”\n\n"<annotation id="url">"了解详情"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"为了延长电池续航时间,省电模式会执行以下操作:\n\n• 开启深色主题\n• 关闭或限制后台活动、部分视觉效果和其他功能,例如“Ok Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"为了减少流量消耗,流量节省程序会阻止某些应用在后台收发数据。您当前使用的应用可以收发数据,但频率可能会降低。举例而言,这可能意味着图片只有在您点按之后才会显示。"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"要开启流量节省程序吗?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"开启"</string>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 458c361..cb61121 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"按選單鍵解鎖或撥打緊急電話。"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"按選單鍵解鎖。"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"畫出解鎖圖形以解除鎖定螢幕"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"緊急電話"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"緊急電話"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"返回通話"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"正確!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"再試一次"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"已由您的管理員更新"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"已由您的管理員刪除"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"好"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"為延長電池壽命,「省電模式」會:\n\n•開啟深色主題背景\n•關閉或限制背景活動、某些視覺效果和其他功能 (例如「Hey Google」)\n\n"<annotation id="url">"瞭解詳情"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"為延長電池壽命,「省電模式」會:\n\n•開啟深色主題背景\n•關閉或限制背景活動、某些視覺效果和其他功能 (例如「Hey Google」)"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"為延長電池壽命,「省電模式」會:\n\n• 開啟深色主題背景\n• 關閉或限制背景活動、某些視覺效果和其他功能 (例如「Hey Google」)\n\n"<annotation id="url">"瞭解詳情"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"為延長電池壽命,「省電模式」會:\n\n• 開啟深色主題背景\n• 停用或限制背景活動、部分視覺效果和其他功能 (例如「Hey Google」)"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"「數據節省模式」可防止部分應用程式在背景收發資料,以節省數據用量。您正在使用的應用程式可存取資料,但次數可能會減少。例如,圖片可能需要輕按才會顯示。"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"要開啟「數據節省模式」嗎?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"開啟"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 72dd458..4d2d86a 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"按下 [Menu] 解鎖或撥打緊急電話。"</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"按下 Menu 鍵解鎖。"</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"畫出解鎖圖案"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"緊急撥號"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"緊急電話"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"返回通話"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"正確!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"再試一次"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"已由你的管理員更新"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"已由你的管理員刪除"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"確定"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"為了延長電池續航力,省電模式會執行以下動作:\n\n•開啟深色主題\n•關閉或限制背景活動、部分視覺效果和其他功能,例如「Hey Google」啟動字詞\n\n"<annotation id="url">"瞭解詳情"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"為了延長電池續航力,省電模式會執行以下動作:\n\n•開啟深色主題\n•關閉或限制背景活動、部分視覺效果和其他功能,例如「Hey Google」啟動字詞"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"為了延長電池續航力,節約耗電量模式會執行以下動作:\n\n• 開啟深色主題\n• 關閉或限制背景活動、某些視覺效果和其他功能,例如「Ok Google」啟動字詞\n\n"<annotation id="url">"瞭解詳情"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"為了延長電池續航力,節約耗電量模式會執行以下動作:\n\n• 開啟深色主題\n• 關閉或限制背景活動、某些視覺效果和其他功能,例如「Ok Google」啟動字詞"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"「數據節省模式」可防止部分應用程式在背景收發資料,以節省數據用量。你目前使用的應用程式可以存取資料,但存取頻率可能不如平時高。舉例來說,圖片可能不會自動顯示,在你輕觸後才會顯示。"</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"要開啟數據節省模式嗎?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"開啟"</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 4fe07806..bb5360e 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -808,7 +808,7 @@
     <string name="relationTypeReferredBy" msgid="5285082289602849400">"Kusikiselwe ngu-"</string>
     <string name="relationTypeRelative" msgid="3396498519818009134">"Isihlobo"</string>
     <string name="relationTypeSister" msgid="3721676005094140671">"Usisi"</string>
-    <string name="relationTypeSpouse" msgid="6916682664436031703">"Umlingane"</string>
+    <string name="relationTypeSpouse" msgid="6916682664436031703">"Umlingani"</string>
     <string name="sipAddressTypeCustom" msgid="6283889809842649336">"Ngokwezifiso"</string>
     <string name="sipAddressTypeHome" msgid="5918441930656878367">"Ekhaya"</string>
     <string name="sipAddressTypeWork" msgid="7873967986701216770">"Umsebenzi"</string>
@@ -829,7 +829,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Chofoza Menyu ukuvula noma ukwenza ikholi ephuthumayo."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="7434061749374801753">"Chofoza Menyu ukuvula."</string>
     <string name="lockscreen_pattern_instructions" msgid="3169991838169244941">"Dweba iphathini ukuvula"</string>
-    <string name="lockscreen_emergency_call" msgid="7500692654885445299">"Isimo esiphuthumayo"</string>
+    <string name="lockscreen_emergency_call" msgid="7549683825868928636">"Ikholi ephuthumayo"</string>
     <string name="lockscreen_return_to_call" msgid="3156883574692006382">"Buyela ekholini"</string>
     <string name="lockscreen_pattern_correct" msgid="8050630103651508582">"Lungile!"</string>
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Zama futhi"</string>
@@ -1792,8 +1792,8 @@
     <string name="package_updated_device_owner" msgid="7560272363805506941">"Kubuyekezwe umlawuli wakho"</string>
     <string name="package_deleted_device_owner" msgid="2292335928930293023">"Kususwe umlawuli wakho"</string>
     <string name="confirm_battery_saver" msgid="5247976246208245754">"KULUNGILE"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="5997766757551917769">"Ukuze unwebe impilo yebhethri, Isilondolozi Sebhethri:\n\n•Sivula itimu emnyama\n•Sivala noma sibeka umkhawulo emsebenzini wangemuva, kweminye imithelela yokubuka, nakwezinye izici ezifana nokuthi “Ok Google”\n\n"<annotation id="url">"Funda kabanzi"</annotation></string>
-    <string name="battery_saver_description" msgid="8587408568232177204">"Ukuze unwebe impilo yebhethri, Isilondolozi sebhethri:\n\n•Sivula itimu emnyama\n•Sivala noma sibeka umkhawulo emsebenzini wangemuva, kweminye imithelela yokubuka, nakwezinye izici ezifana nokuthi “Ok Google”"</string>
+    <string name="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Ukuze unwebe impilo yebhethri, Isilondolozi Sebhethri:\n\n•Sivula itimu emnyama\n• Sivala noma sibeka umkhawulo emsebenzini wangemuva, kweminye imithelela yokubuka, nakwezinye izici ezifana nokuthi “Ok Google”\n\n"<annotation id="url">"Funda kabanzi"</annotation></string>
+    <string name="battery_saver_description" msgid="6794188153647295212">"Ukuze unwebe impilo yebhethri, Isilondolozi sebhethri:\n\n•Sivula itimu emnyama\n• Sivala noma sibeka umkhawulo emsebenzini wangemuva, kweminye imithelela yokubuka, nakwezinye izici ezifana nokuthi “Ok Google”"</string>
     <string name="data_saver_description" msgid="4995164271550590517">"Ukusiza ukwehlisa ukusetshenziswa kwedatha, iseva yedatha igwema ezinye izinhlelo zokusebenza ukuthi zithumele noma zamukele idatha ngasemuva. Uhlelo lokusebenza olisebenzisa okwamanje lingafinyelela idatha, kodwa lingenza kanjalo kancane. Lokhu kungachaza, isibonelo, ukuthi izithombe azibonisi uze uzithephe."</string>
     <string name="data_saver_enable_title" msgid="7080620065745260137">"Vula iseva yedatha?"</string>
     <string name="data_saver_enable_button" msgid="4399405762586419726">"Vula"</string>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 8a4676d..2f1bcdc 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1259,7 +1259,12 @@
         <!-- Can be combined with <var>text</var> and its variations to
              allow multiple lines of text in the field.  If this flag is not set,
              the text field will be constrained to a single line.  Corresponds to
-             {@link android.text.InputType#TYPE_TEXT_FLAG_MULTI_LINE}. -->
+             {@link android.text.InputType#TYPE_TEXT_FLAG_MULTI_LINE}.
+
+             Note: If this flag is not set and the text field doesn't have max length limit, the
+             framework automatically set maximum length of the characters to 5000 for the
+             performance reasons.
+             -->
         <flag name="textMultiLine" value="0x00020001" />
         <!-- Can be combined with <var>text</var> and its variations to
              indicate that though the regular text view should not be multiple
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 2b2bf8d..42a658e 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -712,10 +712,17 @@
           case, this can be disabled (set to false). -->
     <bool name="config_enableCarDockHomeLaunch">true</bool>
 
-    <!-- Control whether to force the display of System UI Bars at all times regardless of
-         System Ui Flags. This can be useful in the Automotive case if there's a requirement for
-         a UI element to be on screen at all times. -->
-    <bool name="config_forceShowSystemBars">false</bool>
+    <!-- Control whether to force apps to give up control over the display of system bars at all
+         times regardless of System Ui Flags.
+         In the Automotive case, this is helpful if there's a requirement for an UI element to be on
+         screen at all times. Setting this to true also gives System UI the ability to override the
+         visibility controls for the system through the usage of the
+         "SYSTEM_BAR_VISIBILITY_OVERRIDE" setting.
+         Ex: Only setting the config to true will force show system bars for the entire system.
+         Ex: Setting the config to true and the "SYSTEM_BAR_VISIBILITY_OVERRIDE" setting to
+         "immersive.status=apps" will force show navigation bar for all apps and force hide status
+         bar for all apps. -->
+    <bool name="config_remoteInsetsControllerControlsSystemBars">false</bool>
 
     <!-- HDMI behavior -->
 
@@ -1532,6 +1539,14 @@
     <!-- Class name of WallpaperManagerService. -->
     <string name="config_wallpaperManagerServiceName" translatable="false">com.android.server.wallpaper.WallpaperManagerService</string>
 
+    <!-- Specifies priority of automatic time sources. Suggestions from higher entries in the list
+         take precedence over lower ones.
+         See com.android.server.timedetector.TimeDetectorStrategy for available sources. -->
+    <string-array name="config_autoTimeSourcesPriority">
+        <item>telephony</item>
+        <item>network</item>
+    </string-array>
+
     <!-- Enables the TimeZoneRuleManager service. This is the global switch for the updateable time
          zone update mechanism. -->
     <bool name="config_enableUpdateableTimeZoneRules">false</bool>
@@ -2267,7 +2282,7 @@
 
     <!-- Amount of time in ms the user needs to press the relevant keys to trigger the
          screenshot chord -->
-    <integer name="config_screenshotChordKeyTimeout">500</integer>
+    <integer name="config_screenshotChordKeyTimeout">0</integer>
 
     <!-- Default width of a vertical scrollbar and height of a horizontal scrollbar.
          Takes effect only if the scrollbar drawables have no intrinsic size. -->
@@ -2297,7 +2312,7 @@
     </integer-array>
 
     <!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
-    <bool name="config_cellBroadcastAppLinks">false</bool>
+    <bool name="config_cellBroadcastAppLinks">true</bool>
 
     <!-- The default value if the SyncStorageEngine should sync automatically or not -->
     <bool name="config_syncstorageengine_masterSyncAutomatically">true</bool>
diff --git a/core/res/res/values/donottranslate.xml b/core/res/res/values/donottranslate.xml
index 3a1679c..f46f70c 100644
--- a/core/res/res/values/donottranslate.xml
+++ b/core/res/res/values/donottranslate.xml
@@ -23,7 +23,7 @@
     <!-- @hide DO NOT TRANSLATE. Control aspect ratio of lock pattern -->
     <string name="lock_pattern_view_aspect">square</string>
     <!-- @hide DO NOT TRANSLATE. ICU pattern for "Mon, 14 January" -->
-    <string name="icu_abbrev_wday_month_day_no_year">eeeMMMMd</string>
+    <string name="icu_abbrev_wday_month_day_no_year">EEEMMMMd</string>
     <!-- @hide DO NOT TRANSLATE. date formatting pattern for system ui.-->
     <string name="system_ui_date_pattern">@string/icu_abbrev_wday_month_day_no_year</string>
     <!-- @hide DO NOT TRANSLATE Spans within this text are applied to style composing regions
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index e2fbbf4..e00aff1 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -3024,6 +3024,8 @@
 
     <!-- @hide @TestApi -->
     <public type="bool" name="config_assistantOnTopOfDream" id="0x01110005" />
+    <!-- @hide @TestApi -->
+    <public type="bool" name="config_remoteInsetsControllerControlsSystemBars" id="0x01110006" />
   <!-- ===============================================================
        Resources added in version S of the platform
 
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 4b303a3..c1f3028 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2122,7 +2122,7 @@
     <!-- On the unlock pattern screen, shown at the top of the unlock screen to tell the user what to do. Below this text is the place for theu ser to draw the pattern. -->
     <string name="lockscreen_pattern_instructions">Draw pattern to unlock</string>
     <!-- Button at the bottom of the unlock screen to make an emergency call or access other emergency assistance functions. -->
-    <string name="lockscreen_emergency_call">Emergency</string>
+    <string name="lockscreen_emergency_call">Emergency call</string>
     <!-- Button at the bottom of the unlock screen that lets the user return to a call -->
     <string name="lockscreen_return_to_call">Return to call</string>
     <!-- Shown to confirm that the user entered their lock pattern correctly. -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index c51dca1..c505afe 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1671,7 +1671,7 @@
   <java-symbol type="bool" name="config_enableCarDockHomeLaunch" />
   <java-symbol type="bool" name="config_enableLockBeforeUnlockScreen" />
   <java-symbol type="bool" name="config_enableLockScreenRotation" />
-  <java-symbol type="bool" name="config_forceShowSystemBars" />
+  <java-symbol type="bool" name="config_remoteInsetsControllerControlsSystemBars" />
   <java-symbol type="bool" name="config_lidControlsScreenLock" />
   <java-symbol type="bool" name="config_lidControlsSleep" />
   <java-symbol type="bool" name="config_lockDayNightMode" />
@@ -2161,6 +2161,7 @@
   <java-symbol type="string" name="config_defaultNetworkScorerPackageName" />
   <java-symbol type="string" name="config_persistentDataPackageName" />
   <java-symbol type="string" name="config_deviceConfiguratorPackageName" />
+  <java-symbol type="array" name="config_autoTimeSourcesPriority" />
 
   <java-symbol type="layout" name="resolver_list" />
   <java-symbol type="id" name="resolver_list" />
diff --git a/core/tests/ConnectivityManagerTest/OWNERS b/core/tests/ConnectivityManagerTest/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/core/tests/PackageInstallerSessions/OWNERS b/core/tests/PackageInstallerSessions/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/core/tests/PackageInstallerSessions/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/core/tests/benchmarks/src/android/net/OWNERS b/core/tests/benchmarks/src/android/net/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/core/tests/benchmarks/src/android/net/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/core/tests/bluetoothtests/OWNERS b/core/tests/bluetoothtests/OWNERS
new file mode 100644
index 0000000..98bb877
--- /dev/null
+++ b/core/tests/bluetoothtests/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/bluetooth/OWNERS
diff --git a/core/tests/coretests/AndroidManifest.xml b/core/tests/coretests/AndroidManifest.xml
index b39c89b..6aa5dfc 100644
--- a/core/tests/coretests/AndroidManifest.xml
+++ b/core/tests/coretests/AndroidManifest.xml
@@ -129,6 +129,7 @@
     <!-- virtual display test permissions -->
     <uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
     <uses-permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT" />
+    <uses-permission android:name="android.permission.ADD_TRUSTED_DISPLAY" />
 
     <!-- color extraction test permissions -->
     <uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
diff --git a/core/tests/coretests/apks/OWNERS b/core/tests/coretests/apks/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/core/tests/coretests/apks/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/core/tests/coretests/res/values/overlayable_icons_test.xml b/core/tests/coretests/res/values/overlayable_icons_test.xml
new file mode 100644
index 0000000..7ea1848
--- /dev/null
+++ b/core/tests/coretests/res/values/overlayable_icons_test.xml
@@ -0,0 +1,86 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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>
+  <!-- overlayable_icons references all of the drawables in this package
+       that are being overlayed by resource overlays. If you remove/rename
+       any of these resources, you must also change the resource overlay icons.-->
+  <array name="overlayable_icons">
+    <item>@*android:drawable/ic_audio_alarm</item>
+    <item>@*android:drawable/ic_audio_alarm_mute</item>
+    <item>@*android:drawable/ic_battery_80_24dp</item>
+    <item>@*android:drawable/ic_bluetooth_share_icon</item>
+    <item>@*android:drawable/ic_bt_headphones_a2dp</item>
+    <item>@*android:drawable/ic_bt_headset_hfp</item>
+    <item>@*android:drawable/ic_bt_hearing_aid</item>
+    <item>@*android:drawable/ic_bt_laptop</item>
+    <item>@*android:drawable/ic_bt_misc_hid</item>
+    <item>@*android:drawable/ic_bt_network_pan</item>
+    <item>@*android:drawable/ic_bt_pointing_hid</item>
+    <item>@*android:drawable/ic_corp_badge</item>
+    <item>@*android:drawable/ic_expand_more</item>
+    <item>@*android:drawable/ic_faster_emergency</item>
+    <item>@*android:drawable/ic_file_copy</item>
+    <item>@*android:drawable/ic_lock</item>
+    <item>@*android:drawable/ic_lock_bugreport</item>
+    <item>@*android:drawable/ic_lock_open</item>
+    <item>@*android:drawable/ic_lock_power_off</item>
+    <item>@*android:drawable/ic_lockscreen_ime</item>
+    <item>@*android:drawable/ic_mode_edit</item>
+    <item>@*android:drawable/ic_notifications_alerted</item>
+    <item>@*android:drawable/ic_phone</item>
+    <item>@*android:drawable/ic_qs_airplane</item>
+    <item>@*android:drawable/ic_qs_auto_rotate</item>
+    <item>@*android:drawable/ic_qs_battery_saver</item>
+    <item>@*android:drawable/ic_qs_bluetooth</item>
+    <item>@*android:drawable/ic_qs_dnd</item>
+    <item>@*android:drawable/ic_qs_flashlight</item>
+    <item>@*android:drawable/ic_qs_night_display_on</item>
+    <item>@*android:drawable/ic_qs_ui_mode_night</item>
+    <item>@*android:drawable/ic_restart</item>
+    <item>@*android:drawable/ic_screenshot</item>
+    <item>@*android:drawable/ic_settings_bluetooth</item>
+    <item>@*android:drawable/ic_signal_cellular_0_4_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_0_5_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_1_4_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_1_5_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_2_4_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_2_5_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_3_4_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_3_5_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_4_4_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_4_5_bar</item>
+    <item>@*android:drawable/ic_signal_cellular_5_5_bar</item>
+    <item>@*android:drawable/ic_signal_location</item>
+    <item>@*android:drawable/ic_wifi_signal_0</item>
+    <item>@*android:drawable/ic_wifi_signal_1</item>
+    <item>@*android:drawable/ic_wifi_signal_2</item>
+    <item>@*android:drawable/ic_wifi_signal_3</item>
+    <item>@*android:drawable/ic_wifi_signal_4</item>
+    <item>@*android:drawable/perm_group_activity_recognition</item>
+    <item>@*android:drawable/perm_group_aural</item>
+    <item>@*android:drawable/perm_group_calendar</item>
+    <item>@*android:drawable/perm_group_call_log</item>
+    <item>@*android:drawable/perm_group_camera</item>
+    <item>@*android:drawable/perm_group_contacts</item>
+    <item>@*android:drawable/perm_group_location</item>
+    <item>@*android:drawable/perm_group_microphone</item>
+    <item>@*android:drawable/perm_group_phone_calls</item>
+    <item>@*android:drawable/perm_group_sensors</item>
+    <item>@*android:drawable/perm_group_sms</item>
+    <item>@*android:drawable/perm_group_storage</item>
+    <item>@*android:drawable/perm_group_visual</item>
+  </array>
+</resources>
diff --git a/core/tests/coretests/src/android/accessibilityservice/OWNERS b/core/tests/coretests/src/android/accessibilityservice/OWNERS
new file mode 100644
index 0000000..b74281e
--- /dev/null
+++ b/core/tests/coretests/src/android/accessibilityservice/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/accessibility/OWNERS
diff --git a/core/tests/coretests/src/android/app/OWNERS b/core/tests/coretests/src/android/app/OWNERS
new file mode 100644
index 0000000..bd7da0c
--- /dev/null
+++ b/core/tests/coretests/src/android/app/OWNERS
@@ -0,0 +1 @@
+per-file Window*.java = file:/services/core/java/com/android/server/wm/OWNERS
diff --git a/core/tests/coretests/src/android/app/activity/OWNERS b/core/tests/coretests/src/android/app/activity/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/core/tests/coretests/src/android/app/activity/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/core/tests/coretests/src/android/app/servertransaction/OWNERS b/core/tests/coretests/src/android/app/servertransaction/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/core/tests/coretests/src/android/app/servertransaction/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java b/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
index f11adef..7d2e32a 100644
--- a/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
@@ -191,7 +191,7 @@
         PersistableBundle persistableBundle = new PersistableBundle();
         persistableBundle.putInt("k", 4);
         FixedRotationAdjustments fixedRotationAdjustments = new FixedRotationAdjustments(
-                Surface.ROTATION_90, DisplayCutout.NO_CUTOUT);
+                Surface.ROTATION_90, 1920, 1080, DisplayCutout.NO_CUTOUT);
 
         LaunchActivityItem item = LaunchActivityItem.obtain(intent, ident, activityInfo,
                 config(), overrideConfig, compat, referrer, null /* voiceInteractor */,
@@ -351,7 +351,8 @@
         ClientTransaction transaction = ClientTransaction.obtain(new StubAppThread(),
                 null /* activityToken */);
         transaction.addCallback(FixedRotationAdjustmentsItem.obtain(new Binder(),
-                new FixedRotationAdjustments(Surface.ROTATION_270, DisplayCutout.NO_CUTOUT)));
+                new FixedRotationAdjustments(Surface.ROTATION_270, 1920, 1080,
+                        DisplayCutout.NO_CUTOUT)));
 
         writeAndPrepareForReading(transaction);
 
diff --git a/core/tests/coretests/src/android/app/time/OWNERS b/core/tests/coretests/src/android/app/time/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/core/tests/coretests/src/android/app/time/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/core/tests/coretests/src/android/app/timedetector/GnssTimeSuggestionTest.java b/core/tests/coretests/src/android/app/timedetector/GnssTimeSuggestionTest.java
new file mode 100644
index 0000000..e248010
--- /dev/null
+++ b/core/tests/coretests/src/android/app/timedetector/GnssTimeSuggestionTest.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.timedetector;
+
+import static android.app.timezonedetector.ParcelableTestSupport.assertRoundTripParcelable;
+import static android.app.timezonedetector.ParcelableTestSupport.roundTripParcelable;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
+import android.os.TimestampedValue;
+
+import org.junit.Test;
+
+public class GnssTimeSuggestionTest {
+
+    private static final TimestampedValue<Long> ARBITRARY_TIME =
+            new TimestampedValue<>(1111L, 2222L);
+
+    @Test
+    public void testEquals() {
+        GnssTimeSuggestion one = new GnssTimeSuggestion(ARBITRARY_TIME);
+        assertEquals(one, one);
+
+        GnssTimeSuggestion two = new GnssTimeSuggestion(ARBITRARY_TIME);
+        assertEquals(one, two);
+        assertEquals(two, one);
+
+        TimestampedValue<Long> differentTime = new TimestampedValue<>(
+                ARBITRARY_TIME.getReferenceTimeMillis() + 1,
+                ARBITRARY_TIME.getValue());
+        GnssTimeSuggestion three = new GnssTimeSuggestion(differentTime);
+        assertNotEquals(one, three);
+        assertNotEquals(three, one);
+
+        // DebugInfo must not be considered in equals().
+        one.addDebugInfo("Debug info 1");
+        two.addDebugInfo("Debug info 2");
+        assertEquals(one, two);
+    }
+
+    @Test
+    public void testParcelable() {
+        GnssTimeSuggestion suggestion = new GnssTimeSuggestion(ARBITRARY_TIME);
+        assertRoundTripParcelable(suggestion);
+
+        // DebugInfo should also be stored (but is not checked by equals()
+        suggestion.addDebugInfo("This is debug info");
+        GnssTimeSuggestion rtSuggestion = roundTripParcelable(suggestion);
+        assertEquals(suggestion.getDebugInfo(), rtSuggestion.getDebugInfo());
+    }
+}
diff --git a/core/tests/coretests/src/android/app/timedetector/OWNERS b/core/tests/coretests/src/android/app/timedetector/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/core/tests/coretests/src/android/app/timedetector/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/core/tests/coretests/src/android/app/timezone/OWNERS b/core/tests/coretests/src/android/app/timezone/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/core/tests/coretests/src/android/app/timezone/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/core/tests/coretests/src/android/app/timezonedetector/OWNERS b/core/tests/coretests/src/android/app/timezonedetector/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/core/tests/coretests/src/android/app/timezonedetector/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/core/tests/coretests/src/android/content/ContextTest.java b/core/tests/coretests/src/android/content/ContextTest.java
index 777f4a3..de81ff4 100644
--- a/core/tests/coretests/src/android/content/ContextTest.java
+++ b/core/tests/coretests/src/android/content/ContextTest.java
@@ -19,6 +19,7 @@
 import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY;
 import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC;
 import static android.view.Display.DEFAULT_DISPLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
 
 import static com.google.common.truth.Truth.assertThat;
 
@@ -188,19 +189,38 @@
 
         assertFalse(wrapper.isUiContext());
 
-        wrapper = new ContextWrapper(new TestUiContext());
+        wrapper = new ContextWrapper(getUiContext());
 
         assertTrue(wrapper.isUiContext());
     }
 
-    private static class TestUiContext extends ContextWrapper {
-        TestUiContext() {
-            super(null /* base */);
-        }
+    @Test
+    public void testIsUiContext_UiContextDerivedContext() {
+        final Context uiContext = getUiContext();
+        Context context = uiContext.createAttributionContext(null /* attributionTag */);
 
-        @Override
-        public boolean isUiContext() {
-            return true;
-        }
+        assertTrue(context.isUiContext());
+
+        context = uiContext.createConfigurationContext(new Configuration());
+
+        assertTrue(context.isUiContext());
+    }
+
+    @Test
+    public void testIsUiContext_UiContextDerivedDisplayContext() {
+        final Context uiContext = getUiContext();
+        final Display secondaryDisplay =
+                getSecondaryDisplay(uiContext.getSystemService(DisplayManager.class));
+        final Context context = uiContext.createDisplayContext(secondaryDisplay);
+
+        assertFalse(context.isUiContext());
+    }
+
+    private Context getUiContext() {
+        final Context appContext = ApplicationProvider.getApplicationContext();
+        final DisplayManager displayManager = appContext.getSystemService(DisplayManager.class);
+        final Display display = displayManager.getDisplay(DEFAULT_DISPLAY);
+        return appContext.createDisplayContext(display)
+                .createWindowContext(TYPE_APPLICATION_OVERLAY, null /* options */);
     }
 }
diff --git a/core/tests/coretests/src/android/content/OWNERS b/core/tests/coretests/src/android/content/OWNERS
new file mode 100644
index 0000000..911efb2
--- /dev/null
+++ b/core/tests/coretests/src/android/content/OWNERS
@@ -0,0 +1 @@
+per-file ContextTest.java = file:/services/core/java/com/android/server/wm/OWNERS
diff --git a/core/tests/coretests/src/android/database/OWNERS b/core/tests/coretests/src/android/database/OWNERS
new file mode 100644
index 0000000..bb9a2ca
--- /dev/null
+++ b/core/tests/coretests/src/android/database/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/database/OWNERS
diff --git a/core/tests/coretests/src/android/hardware/display/VirtualDisplayTest.java b/core/tests/coretests/src/android/hardware/display/VirtualDisplayTest.java
index daf6139..0f6284d 100644
--- a/core/tests/coretests/src/android/hardware/display/VirtualDisplayTest.java
+++ b/core/tests/coretests/src/android/hardware/display/VirtualDisplayTest.java
@@ -247,6 +247,25 @@
         assertDisplayUnregistered(display);
     }
 
+    /**
+     * Ensures that an application can create a trusted virtual display with the permission
+     * {@code ADD_TRUSTED_DISPLAY}.
+     */
+    public void testTrustedVirtualDisplay() throws Exception {
+        VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
+                WIDTH, HEIGHT, DENSITY, mSurface,
+                DisplayManager.VIRTUAL_DISPLAY_FLAG_TRUSTED);
+        assertNotNull("virtual display must not be null", virtualDisplay);
+
+        Display display = virtualDisplay.getDisplay();
+        try {
+            assertDisplayRegistered(display, Display.FLAG_PRIVATE | Display.FLAG_TRUSTED);
+        } finally {
+            virtualDisplay.release();
+        }
+        assertDisplayUnregistered(display);
+    }
+
     private void assertDisplayRegistered(Display display, int flags) {
         assertNotNull("display object must not be null", display);
         assertTrue("display must be valid", display.isValid());
diff --git a/core/tests/coretests/src/android/net/OWNERS b/core/tests/coretests/src/android/net/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/core/tests/coretests/src/android/net/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/core/tests/coretests/src/android/view/DisplayAdjustmentsTests.java b/core/tests/coretests/src/android/view/DisplayAdjustmentsTests.java
index 2fc42e9..3cf1722 100644
--- a/core/tests/coretests/src/android/view/DisplayAdjustmentsTests.java
+++ b/core/tests/coretests/src/android/view/DisplayAdjustmentsTests.java
@@ -77,8 +77,10 @@
         final int realRotation = Surface.ROTATION_0;
         final int fixedRotation = Surface.ROTATION_90;
 
-        mDisplayAdjustments.setFixedRotationAdjustments(
-                new FixedRotationAdjustments(fixedRotation, null /* cutout */));
+        final int appWidth = 1080;
+        final int appHeight = 1920;
+        mDisplayAdjustments.setFixedRotationAdjustments(new FixedRotationAdjustments(
+                fixedRotation, appWidth, appHeight, null /* cutout */));
 
         final int w = 1000;
         final int h = 2000;
@@ -95,13 +97,21 @@
         metrics.heightPixels = metrics.noncompatHeightPixels = h;
 
         final DisplayMetrics flippedMetrics = new DisplayMetrics();
-        flippedMetrics.xdpi = flippedMetrics.noncompatXdpi = h;
+        // The physical dpi should not be adjusted.
+        flippedMetrics.xdpi = flippedMetrics.noncompatXdpi = w;
         flippedMetrics.widthPixels = flippedMetrics.noncompatWidthPixels = h;
-        flippedMetrics.ydpi = flippedMetrics.noncompatYdpi = w;
+        flippedMetrics.ydpi = flippedMetrics.noncompatYdpi = h;
         flippedMetrics.heightPixels = flippedMetrics.noncompatHeightPixels = w;
 
         mDisplayAdjustments.adjustMetrics(metrics, realRotation);
 
         assertEquals(flippedMetrics, metrics);
+
+        mDisplayAdjustments.adjustGlobalAppMetrics(metrics);
+
+        assertEquals(appWidth, metrics.widthPixels);
+        assertEquals(appWidth, metrics.noncompatWidthPixels);
+        assertEquals(appHeight, metrics.heightPixels);
+        assertEquals(appHeight, metrics.noncompatHeightPixels);
     }
 }
diff --git a/core/tests/coretests/src/android/view/InsetsControllerTest.java b/core/tests/coretests/src/android/view/InsetsControllerTest.java
index 48695aa..de128ad 100644
--- a/core/tests/coretests/src/android/view/InsetsControllerTest.java
+++ b/core/tests/coretests/src/android/view/InsetsControllerTest.java
@@ -41,8 +41,11 @@
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.notNull;
+import static org.mockito.Mockito.clearInvocations;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
 import android.content.Context;
@@ -125,7 +128,7 @@
             }
             mTestClock = new OffsettableClock();
             mTestHandler = new TestHandler(null, mTestClock);
-            mTestHost = new TestHost(mViewRoot);
+            mTestHost = spy(new TestHost(mViewRoot));
             mController = new InsetsController(mTestHost, (controller, type) -> {
                 if (type == ITYPE_IME) {
                     return new InsetsSourceConsumer(type, controller.getState(),
@@ -760,6 +763,99 @@
         });
     }
 
+    @Test
+    public void testInsetsChangedCount_controlSystemBars() {
+        InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
+            prepareControls();
+
+            // Hiding visible system bars should only causes insets change once for each bar.
+            clearInvocations(mTestHost);
+            mController.hide(statusBars() | navigationBars());
+            verify(mTestHost, times(2)).notifyInsetsChanged();
+
+            // Sending the same insets state should not cause insets change.
+            // This simulates the callback from server after hiding system bars.
+            clearInvocations(mTestHost);
+            mController.onStateChanged(mController.getState());
+            verify(mTestHost, never()).notifyInsetsChanged();
+
+            // Showing invisible system bars should only causes insets change once for each bar.
+            clearInvocations(mTestHost);
+            mController.show(statusBars() | navigationBars());
+            verify(mTestHost, times(2)).notifyInsetsChanged();
+
+            // Sending the same insets state should not cause insets change.
+            // This simulates the callback from server after showing system bars.
+            clearInvocations(mTestHost);
+            mController.onStateChanged(mController.getState());
+            verify(mTestHost, never()).notifyInsetsChanged();
+        });
+    }
+
+    @Test
+    public void testInsetsChangedCount_controlIme() {
+        InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
+            prepareControls();
+
+            // Showing invisible ime should only causes insets change once.
+            clearInvocations(mTestHost);
+            mController.show(ime(), true /* fromIme */);
+            verify(mTestHost, times(1)).notifyInsetsChanged();
+
+            // Sending the same insets state should not cause insets change.
+            // This simulates the callback from server after showing ime.
+            clearInvocations(mTestHost);
+            mController.onStateChanged(mController.getState());
+            verify(mTestHost, never()).notifyInsetsChanged();
+
+            // Hiding visible ime should only causes insets change once.
+            clearInvocations(mTestHost);
+            mController.hide(ime());
+            verify(mTestHost, times(1)).notifyInsetsChanged();
+
+            // Sending the same insets state should not cause insets change.
+            // This simulates the callback from server after hiding ime.
+            clearInvocations(mTestHost);
+            mController.onStateChanged(mController.getState());
+            verify(mTestHost, never()).notifyInsetsChanged();
+        });
+    }
+
+    @Test
+    public void testInsetsChangedCount_onStateChanged() {
+        InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
+            final InsetsState localState = mController.getState();
+
+            // Changing status bar frame should cause notifyInsetsChanged.
+            clearInvocations(mTestHost);
+            InsetsState newState = new InsetsState(localState, true /* copySources */);
+            newState.getSource(ITYPE_STATUS_BAR).getFrame().bottom++;
+            mController.onStateChanged(newState);
+            verify(mTestHost, times(1)).notifyInsetsChanged();
+
+            // Changing status bar visibility should cause notifyInsetsChanged.
+            clearInvocations(mTestHost);
+            newState = new InsetsState(localState, true /* copySources */);
+            newState.getSource(ITYPE_STATUS_BAR).setVisible(false);
+            mController.onStateChanged(newState);
+            verify(mTestHost, times(1)).notifyInsetsChanged();
+
+            // Changing invisible IME frame should not cause notifyInsetsChanged.
+            clearInvocations(mTestHost);
+            newState = new InsetsState(localState, true /* copySources */);
+            newState.getSource(ITYPE_IME).getFrame().top--;
+            mController.onStateChanged(newState);
+            verify(mTestHost, never()).notifyInsetsChanged();
+
+            // Changing IME visibility should cause notifyInsetsChanged.
+            clearInvocations(mTestHost);
+            newState = new InsetsState(localState, true /* copySources */);
+            newState.getSource(ITYPE_IME).setVisible(true);
+            mController.onStateChanged(newState);
+            verify(mTestHost, times(1)).notifyInsetsChanged();
+        });
+    }
+
     private void waitUntilNextFrame() throws Exception {
         final CountDownLatch latch = new CountDownLatch(1);
         Choreographer.getMainThreadInstance().postCallback(Choreographer.CALLBACK_COMMIT,
@@ -792,7 +888,7 @@
         return controls;
     }
 
-    private static class TestHost extends ViewRootInsetsControllerHost {
+    public static class TestHost extends ViewRootInsetsControllerHost {
 
         private InsetsState mModifiedState = new InsetsState();
 
diff --git a/core/tests/coretests/src/android/view/InsetsStateTest.java b/core/tests/coretests/src/android/view/InsetsStateTest.java
index c7d835c..576cd78 100644
--- a/core/tests/coretests/src/android/view/InsetsStateTest.java
+++ b/core/tests/coretests/src/android/view/InsetsStateTest.java
@@ -124,6 +124,24 @@
     }
 
     @Test
+    public void testCalculateInsets_extraNavRightClimateTop() throws Exception {
+        try (final InsetsModeSession session =
+                     new InsetsModeSession(ViewRootImpl.NEW_INSETS_MODE_FULL)) {
+            mState.getSource(ITYPE_CLIMATE_BAR).setFrame(new Rect(0, 0, 100, 100));
+            mState.getSource(ITYPE_CLIMATE_BAR).setVisible(true);
+            mState.getSource(ITYPE_EXTRA_NAVIGATION_BAR).setFrame(new Rect(80, 0, 100, 300));
+            mState.getSource(ITYPE_EXTRA_NAVIGATION_BAR).setVisible(true);
+            WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false,
+                    false, DisplayCutout.NO_CUTOUT, 0, 0, 0, null);
+            // ITYPE_CLIMATE_BAR is a type of status bar and ITYPE_EXTRA_NAVIGATION_BAR is a type
+            // of navigation bar.
+            assertEquals(Insets.of(0, 100, 20, 0), insets.getSystemWindowInsets());
+            assertEquals(Insets.of(0, 100, 0, 0), insets.getInsets(Type.statusBars()));
+            assertEquals(Insets.of(0, 0, 20, 0), insets.getInsets(Type.navigationBars()));
+        }
+    }
+
+    @Test
     public void testCalculateInsets_imeIgnoredWithoutAdjustResize() {
         try (final InsetsModeSession session =
                      new InsetsModeSession(ViewRootImpl.NEW_INSETS_MODE_FULL)) {
@@ -331,6 +349,8 @@
     public void testGetDefaultVisibility() {
         assertTrue(InsetsState.getDefaultVisibility(ITYPE_STATUS_BAR));
         assertTrue(InsetsState.getDefaultVisibility(ITYPE_NAVIGATION_BAR));
+        assertTrue(InsetsState.getDefaultVisibility(ITYPE_CLIMATE_BAR));
+        assertTrue(InsetsState.getDefaultVisibility(ITYPE_EXTRA_NAVIGATION_BAR));
         assertTrue(InsetsState.getDefaultVisibility(ITYPE_CAPTION_BAR));
         assertFalse(InsetsState.getDefaultVisibility(ITYPE_IME));
     }
diff --git a/core/tests/coretests/src/android/view/ViewRootImplTest.java b/core/tests/coretests/src/android/view/ViewRootImplTest.java
index 5c16772..4cf6715 100644
--- a/core/tests/coretests/src/android/view/ViewRootImplTest.java
+++ b/core/tests/coretests/src/android/view/ViewRootImplTest.java
@@ -24,6 +24,7 @@
 import static android.view.View.SYSTEM_UI_FLAG_LOW_PROFILE;
 import static android.view.WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_TOUCH;
 import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
+import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
 import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
 import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
@@ -117,7 +118,15 @@
         final WindowManager.LayoutParams attrs = new WindowManager.LayoutParams(TYPE_APPLICATION);
         ViewRootImpl.adjustLayoutParamsForCompatibility(attrs);
 
-        // A window which fits system bars must fit IME, unless its type is toast or system alert.
+        assertEquals(Type.systemBars(), attrs.getFitInsetsTypes());
+    }
+
+    @Test
+    public void adjustLayoutParamsForCompatibility_fitSystemBarsAndIme() {
+        final WindowManager.LayoutParams attrs = new WindowManager.LayoutParams(TYPE_APPLICATION);
+        attrs.softInputMode |= SOFT_INPUT_ADJUST_RESIZE;
+        ViewRootImpl.adjustLayoutParamsForCompatibility(attrs);
+
         assertEquals(Type.systemBars() | Type.ime(), attrs.getFitInsetsTypes());
     }
 
diff --git a/core/tests/coretests/src/android/widget/EditorCursorDragTest.java b/core/tests/coretests/src/android/widget/EditorCursorDragTest.java
index df2946c..c37a34a 100644
--- a/core/tests/coretests/src/android/widget/EditorCursorDragTest.java
+++ b/core/tests/coretests/src/android/widget/EditorCursorDragTest.java
@@ -201,6 +201,38 @@
     }
 
     @Test
+    public void testCursorDrag_diagonal_thresholdConfig() throws Throwable {
+        TextView tv = mActivity.findViewById(R.id.textview);
+        Editor editor = tv.getEditorForTesting();
+
+        StringBuilder sb = new StringBuilder();
+        for (int i = 1; i <= 9; i++) {
+            sb.append("here is some text").append(i).append("\n");
+        }
+        sb.append(Strings.repeat("abcdefghij\n", 400)).append("Last");
+        String text = sb.toString();
+        onView(withId(R.id.textview)).perform(replaceText(text));
+
+        int index = text.indexOf("text9");
+        onView(withId(R.id.textview)).perform(clickOnTextAtIndex(index));
+        onView(withId(R.id.textview)).check(hasInsertionPointerAtIndex(index));
+
+        // Configure the drag direction threshold to require the drag to be exactly horizontal. With
+        // this set, a swipe that is slightly off horizontal should not trigger cursor drag.
+        editor.setCursorDragMinAngleFromVertical(90);
+        int startIdx = text.indexOf("5");
+        int endIdx = text.indexOf("here is some text3");
+        onView(withId(R.id.textview)).perform(dragOnText(startIdx, endIdx));
+        onView(withId(R.id.textview)).check(hasInsertionPointerAtIndex(index));
+
+        // Configure the drag direction threshold to require the drag to be 45 degrees or more from
+        // vertical. With this set, the same swipe gesture as above should now trigger cursor drag.
+        editor.setCursorDragMinAngleFromVertical(45);
+        onView(withId(R.id.textview)).perform(dragOnText(startIdx, endIdx));
+        onView(withId(R.id.textview)).check(hasInsertionPointerAtIndex(endIdx));
+    }
+
+    @Test
     public void testCursorDrag_vertical_whenTextViewContentsFitOnScreen() throws Throwable {
         String text = "012345_aaa\n"
                 + "0123456789\n"
diff --git a/core/tests/coretests/src/android/widget/EditorTouchStateTest.java b/core/tests/coretests/src/android/widget/EditorTouchStateTest.java
index 35fd4bd..94f43de 100644
--- a/core/tests/coretests/src/android/widget/EditorTouchStateTest.java
+++ b/core/tests/coretests/src/android/widget/EditorTouchStateTest.java
@@ -165,7 +165,7 @@
         long event2Time = 1001;
         MotionEvent event2 = moveEvent(event1Time, event2Time, 200f, 31f);
         mTouchState.update(event2, mConfig);
-        assertDrag(mTouchState, 20f, 30f, 0, 0, false);
+        assertDrag(mTouchState, 20f, 30f, 0, 0, 180f);
 
         // Simulate an ACTION_UP event with a delay that's longer than the double-tap timeout.
         long event3Time = 5000;
@@ -280,7 +280,7 @@
         long event3Time = 1002;
         MotionEvent event3 = moveEvent(event3Time, event3Time, newX, newY);
         mTouchState.update(event3, mConfig);
-        assertDrag(mTouchState, 20f, 30f, 0, 0, false);
+        assertDrag(mTouchState, 20f, 30f, 0, 0, Float.MAX_VALUE);
 
         // Simulate an ACTION_UP event.
         long event4Time = 1003;
@@ -301,15 +301,15 @@
         long event2Time = 1002;
         MotionEvent event2 = moveEvent(event1Time, event2Time, 100f, 174f);
         mTouchState.update(event2, mConfig);
-        assertDrag(mTouchState, 0f, 0f, 0, 0, true);
+        assertDrag(mTouchState, 0f, 0f, 0, 0, 100f / 174f);
 
         // Simulate another ACTION_MOVE event that is horizontal from the original down event.
-        // The value of `isDragCloseToVertical` should NOT change since it should only reflect the
-        // initial direction of movement.
+        // The drag direction ratio should NOT change since it should only reflect the initial
+        // direction of movement.
         long event3Time = 1003;
         MotionEvent event3 = moveEvent(event1Time, event3Time, 200f, 0f);
         mTouchState.update(event3, mConfig);
-        assertDrag(mTouchState, 0f, 0f, 0, 0, true);
+        assertDrag(mTouchState, 0f, 0f, 0, 0, 100f / 174f);
 
         // Simulate an ACTION_UP event.
         long event4Time = 1004;
@@ -330,15 +330,15 @@
         long event2Time = 1002;
         MotionEvent event2 = moveEvent(event1Time, event2Time, 100f, 90f);
         mTouchState.update(event2, mConfig);
-        assertDrag(mTouchState, 0f, 0f, 0, 0, false);
+        assertDrag(mTouchState, 0f, 0f, 0, 0, 100f / 90f);
 
         // Simulate another ACTION_MOVE event that is vertical from the original down event.
-        // The value of `isDragCloseToVertical` should NOT change since it should only reflect the
-        // initial direction of movement.
+        // The drag direction ratio should NOT change since it should only reflect the initial
+        // direction of movement.
         long event3Time = 1003;
         MotionEvent event3 = moveEvent(event1Time, event3Time, 0f, 200f);
         mTouchState.update(event3, mConfig);
-        assertDrag(mTouchState, 0f, 0f, 0, 0, false);
+        assertDrag(mTouchState, 0f, 0f, 0, 0, 100f / 90f);
 
         // Simulate an ACTION_UP event.
         long event4Time = 1004;
@@ -374,7 +374,7 @@
         long event2Time = 1002;
         MotionEvent event2 = moveEvent(event2Time, event2Time, 200f, 30f);
         mTouchState.update(event2, mConfig);
-        assertDrag(mTouchState, 20f, 30f, 0, 0, false);
+        assertDrag(mTouchState, 20f, 30f, 0, 0, Float.MAX_VALUE);
 
         // Simulate an ACTION_CANCEL event.
         long event3Time = 1003;
@@ -411,6 +411,84 @@
         assertSingleTap(mTouchState, 22f, 33f, 20f, 30f);
     }
 
+    @Test
+    public void testGetXYRatio() throws Exception {
+        doTestGetXYRatio(-1, 0.0f);
+        doTestGetXYRatio(0, 0.0f);
+        doTestGetXYRatio(30, 0.58f);
+        doTestGetXYRatio(45, 1.0f);
+        doTestGetXYRatio(60, 1.73f);
+        doTestGetXYRatio(90, Float.MAX_VALUE);
+        doTestGetXYRatio(91, Float.MAX_VALUE);
+    }
+
+    private void doTestGetXYRatio(int angleFromVerticalInDegrees, float expectedXYRatioRounded) {
+        float result = EditorTouchState.getXYRatio(angleFromVerticalInDegrees);
+        String msg = String.format(
+                "%d deg should give an x/y ratio of %f; actual unrounded result is %f",
+                angleFromVerticalInDegrees, expectedXYRatioRounded, result);
+        float roundedResult = (result == 0.0f || result == Float.MAX_VALUE) ? result :
+                Math.round(result * 100) / 100f;
+        assertThat(msg, roundedResult, is(expectedXYRatioRounded));
+    }
+
+    @Test
+    public void testUpdate_dragDirection() throws Exception {
+        // Simulate moving straight up.
+        doTestDragDirection(100f, 100f, 100f, 50f, 0f);
+
+        // Simulate moving straight down.
+        doTestDragDirection(100f, 100f, 100f, 150f, 0f);
+
+        // Simulate moving straight left.
+        doTestDragDirection(100f, 100f, 50f, 100f, Float.MAX_VALUE);
+
+        // Simulate moving straight right.
+        doTestDragDirection(100f, 100f, 150f, 100f, Float.MAX_VALUE);
+
+        // Simulate moving up and right, < 45 deg from vertical.
+        doTestDragDirection(100f, 100f, 110f, 50f, 10f / 50f);
+
+        // Simulate moving up and right, > 45 deg from vertical.
+        doTestDragDirection(100f, 100f, 150f, 90f, 50f / 10f);
+
+        // Simulate moving down and right, < 45 deg from vertical.
+        doTestDragDirection(100f, 100f, 110f, 150f, 10f / 50f);
+
+        // Simulate moving down and right, > 45 deg from vertical.
+        doTestDragDirection(100f, 100f, 150f, 110f, 50f / 10f);
+
+        // Simulate moving down and left, < 45 deg from vertical.
+        doTestDragDirection(100f, 100f, 90f, 150f, 10f / 50f);
+
+        // Simulate moving down and left, > 45 deg from vertical.
+        doTestDragDirection(100f, 100f, 50f, 110f, 50f / 10f);
+
+        // Simulate moving up and left, < 45 deg from vertical.
+        doTestDragDirection(100f, 100f, 90f, 50f, 10f / 50f);
+
+        // Simulate moving up and left, > 45 deg from vertical.
+        doTestDragDirection(100f, 100f, 50f, 90f, 50f / 10f);
+    }
+
+    private void doTestDragDirection(float downX, float downY, float moveX, float moveY,
+            float expectedInitialDragDirectionXYRatio) {
+        EditorTouchState touchState = new EditorTouchState();
+
+        // Simulate an ACTION_DOWN event.
+        long event1Time = 1001;
+        MotionEvent event1 = downEvent(event1Time, event1Time, downX, downY);
+        touchState.update(event1, mConfig);
+
+        // Simulate an ACTION_MOVE event.
+        long event2Time = 1002;
+        MotionEvent event2 = moveEvent(event1Time, event2Time, moveX, moveY);
+        touchState.update(event2, mConfig);
+        String msg = String.format("(%.0f,%.0f)=>(%.0f,%.0f)", downX, downY, moveX, moveY);
+        assertThat(msg, touchState.getInitialDragDirectionXYRatio(),
+                is(expectedInitialDragDirectionXYRatio));
+    }
+
     private static MotionEvent downEvent(long downTime, long eventTime, float x, float y) {
         return MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, 0);
     }
@@ -441,7 +519,7 @@
     }
 
     private static void assertDrag(EditorTouchState touchState, float lastDownX,
-            float lastDownY, float lastUpX, float lastUpY, boolean isDragCloseToVertical) {
+            float lastDownY, float lastUpX, float lastUpY, float initialDragDirectionXYRatio) {
         assertThat(touchState.getLastDownX(), is(lastDownX));
         assertThat(touchState.getLastDownY(), is(lastDownY));
         assertThat(touchState.getLastUpX(), is(lastUpX));
@@ -451,7 +529,7 @@
         assertThat(touchState.isMultiTap(), is(false));
         assertThat(touchState.isMultiTapInSameArea(), is(false));
         assertThat(touchState.isMovedEnoughForDrag(), is(true));
-        assertThat(touchState.isDragCloseToVertical(), is(isDragCloseToVertical));
+        assertThat(touchState.getInitialDragDirectionXYRatio(), is(initialDragDirectionXYRatio));
     }
 
     private static void assertMultiTap(EditorTouchState touchState,
@@ -467,6 +545,5 @@
                 || multiTapStatus == MultiTapStatus.TRIPLE_CLICK));
         assertThat(touchState.isMultiTapInSameArea(), is(isMultiTapInSameArea));
         assertThat(touchState.isMovedEnoughForDrag(), is(false));
-        assertThat(touchState.isDragCloseToVertical(), is(false));
     }
 }
diff --git a/core/tests/coretests/src/com/android/internal/accessibility/OWNERS b/core/tests/coretests/src/com/android/internal/accessibility/OWNERS
new file mode 100644
index 0000000..b74281e
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/accessibility/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/accessibility/OWNERS
diff --git a/core/tests/coretests/src/com/android/internal/inputmethod/OWNERS b/core/tests/coretests/src/com/android/internal/inputmethod/OWNERS
new file mode 100644
index 0000000..5deb2ce
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/inputmethod/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/inputmethod/OWNERS
diff --git a/core/tests/coretests/src/com/android/internal/policy/OWNERS b/core/tests/coretests/src/com/android/internal/policy/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/policy/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/core/tests/coretests/src/com/android/internal/power/OWNERS b/core/tests/coretests/src/com/android/internal/power/OWNERS
new file mode 100644
index 0000000..d68066b
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/power/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/power/OWNERS
diff --git a/core/tests/coretests/src/com/android/internal/statusbar/OWNERS b/core/tests/coretests/src/com/android/internal/statusbar/OWNERS
new file mode 100644
index 0000000..2e96c97
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/statusbar/OWNERS
@@ -0,0 +1 @@
+include /packages/SystemUI/OWNERS
diff --git a/core/tests/devicestatetests/src/android/hardware/devicestate/OWNERS b/core/tests/devicestatetests/src/android/hardware/devicestate/OWNERS
new file mode 100644
index 0000000..d9b0e2e
--- /dev/null
+++ b/core/tests/devicestatetests/src/android/hardware/devicestate/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/devicestate/OWNERS
diff --git a/core/tests/hdmitests/Android.bp b/core/tests/hdmitests/Android.bp
index 2194d4b..4755e0e 100644
--- a/core/tests/hdmitests/Android.bp
+++ b/core/tests/hdmitests/Android.bp
@@ -19,6 +19,7 @@
     static_libs: [
         "androidx.test.rules",
         "frameworks-base-testutils",
+        "guava-android-testlib",
         "truth-prebuilt",
     ],
     libs: ["android.test.runner"],
diff --git a/core/tests/hdmitests/OWNERS b/core/tests/hdmitests/OWNERS
new file mode 100644
index 0000000..c3c47ed
--- /dev/null
+++ b/core/tests/hdmitests/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/hardware/hdmi/OWNERS
diff --git a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiDeviceInfoTest.java b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiDeviceInfoTest.java
new file mode 100755
index 0000000..4c0de62
--- /dev/null
+++ b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiDeviceInfoTest.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.hardware.hdmi;
+
+import androidx.test.filters.SmallTest;
+
+import com.google.common.testing.EqualsTester;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/** Tests for {@link HdmiDeviceInfo} */
+@RunWith(JUnit4.class)
+@SmallTest
+public class HdmiDeviceInfoTest {
+
+    @Test
+    public void testEquals() {
+        int logicalAddr = 0x00;
+        int phyAddr = 0x1000;
+        int portId = 1;
+        int deviceType = 0;
+        int vendorId = 0x123456;
+        String displayName = "test device";
+        int powerStatus = HdmiControlManager.POWER_STATUS_TRANSIENT_TO_STANDBY;
+        int deviceId = 3;
+        int adopterId = 2;
+
+        new EqualsTester()
+                .addEqualityGroup(new HdmiDeviceInfo())
+                .addEqualityGroup(
+                        new HdmiDeviceInfo(phyAddr, portId), new HdmiDeviceInfo(phyAddr, portId))
+                .addEqualityGroup(
+                        new HdmiDeviceInfo(phyAddr, portId, adopterId, deviceId),
+                        new HdmiDeviceInfo(phyAddr, portId, adopterId, deviceId))
+                .addEqualityGroup(
+                        new HdmiDeviceInfo(
+                                logicalAddr, phyAddr, portId, deviceType, vendorId, displayName),
+                        new HdmiDeviceInfo(
+                                logicalAddr, phyAddr, portId, deviceType, vendorId, displayName))
+                .addEqualityGroup(
+                        new HdmiDeviceInfo(
+                                logicalAddr,
+                                phyAddr,
+                                portId,
+                                deviceType,
+                                vendorId,
+                                displayName,
+                                powerStatus),
+                        new HdmiDeviceInfo(
+                                logicalAddr,
+                                phyAddr,
+                                portId,
+                                deviceType,
+                                vendorId,
+                                displayName,
+                                powerStatus))
+                .testEquals();
+    }
+}
diff --git a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiPortInfoTest.java b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiPortInfoTest.java
new file mode 100755
index 0000000..d8dc1ea
--- /dev/null
+++ b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiPortInfoTest.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.hardware.hdmi;
+
+import androidx.test.filters.SmallTest;
+
+import com.google.common.testing.EqualsTester;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/** Tests for {@link HdmiPortInfo} */
+@RunWith(JUnit4.class)
+@SmallTest
+public class HdmiPortInfoTest {
+
+    @Test
+    public void testEquals() {
+        int portId = 1;
+        int portType = 0;
+        int address = 0x123456;
+        boolean isCec = true;
+        boolean isMhl = false;
+        boolean isArcSupported = false;
+
+        new EqualsTester()
+                .addEqualityGroup(
+                        new HdmiPortInfo(portId, portType, address, isCec, isMhl, isArcSupported),
+                        new HdmiPortInfo(portId, portType, address, isCec, isMhl, isArcSupported))
+                .addEqualityGroup(
+                        new HdmiPortInfo(
+                                portId + 1, portType, address, isCec, isMhl, isArcSupported))
+                .addEqualityGroup(
+                        new HdmiPortInfo(
+                                portId, portType + 1, address, isCec, isMhl, isArcSupported))
+                .addEqualityGroup(
+                        new HdmiPortInfo(
+                                portId, portType, address + 1, isCec, isMhl, isArcSupported))
+                .addEqualityGroup(
+                        new HdmiPortInfo(portId, portType, address, !isCec, isMhl, isArcSupported))
+                .addEqualityGroup(
+                        new HdmiPortInfo(portId, portType, address, isCec, !isMhl, isArcSupported))
+                .addEqualityGroup(
+                        new HdmiPortInfo(portId, portType, address, isCec, isMhl, !isArcSupported))
+                .testEquals();
+    }
+}
diff --git a/core/tests/hosttests/test-apps/OWNERS b/core/tests/hosttests/test-apps/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/core/tests/hosttests/test-apps/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/core/tests/mockingcoretests/src/android/app/activity/OWNERS b/core/tests/mockingcoretests/src/android/app/activity/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/core/tests/mockingcoretests/src/android/app/activity/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/core/tests/notificationtests/OWNERS b/core/tests/notificationtests/OWNERS
new file mode 100644
index 0000000..396fd12
--- /dev/null
+++ b/core/tests/notificationtests/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/notification/OWNERS
diff --git a/core/tests/overlaytests/OWNERS b/core/tests/overlaytests/OWNERS
new file mode 100644
index 0000000..afb98d4
--- /dev/null
+++ b/core/tests/overlaytests/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/content/om/OWNERS
diff --git a/core/tests/overlaytests/remount/TEST_MAPPING b/core/tests/overlaytests/remount/TEST_MAPPING
index 54dd431..22b28b5 100644
--- a/core/tests/overlaytests/remount/TEST_MAPPING
+++ b/core/tests/overlaytests/remount/TEST_MAPPING
@@ -1,7 +1,7 @@
 {
-  "presubmit": [
+  "presubmit-large": [
     {
       "name" : "OverlayRemountedTest"
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/core/tests/packagemanagertests/OWNERS b/core/tests/packagemanagertests/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/core/tests/packagemanagertests/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/core/tests/powertests/OWNERS b/core/tests/powertests/OWNERS
new file mode 100644
index 0000000..d68066b
--- /dev/null
+++ b/core/tests/powertests/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/power/OWNERS
diff --git a/core/tests/uwbtests/Android.bp b/core/tests/uwbtests/Android.bp
index c41c346..8ee86f4 100644
--- a/core/tests/uwbtests/Android.bp
+++ b/core/tests/uwbtests/Android.bp
@@ -17,6 +17,7 @@
     static_libs: [
         "androidx.test.ext.junit",
         "androidx.test.rules",
+        "mockito-target-minus-junit4",
     ],
     libs: [
         "android.test.runner",
diff --git a/core/tests/uwbtests/src/android/uwb/AdapterStateListenerTest.java b/core/tests/uwbtests/src/android/uwb/AdapterStateListenerTest.java
new file mode 100644
index 0000000..ce67ef7
--- /dev/null
+++ b/core/tests/uwbtests/src/android/uwb/AdapterStateListenerTest.java
@@ -0,0 +1,311 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.uwb;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+
+import android.os.RemoteException;
+import android.uwb.UwbManager.AdapterStateCallback;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Executor;
+
+/**
+ * Test of {@link AdapterStateListener}.
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class AdapterStateListenerTest {
+
+    IUwbAdapter mUwbAdapter = mock(IUwbAdapter.class);
+
+    Answer mRegisterSuccessAnswer = new Answer() {
+        public Object answer(InvocationOnMock invocation) {
+            Object[] args = invocation.getArguments();
+            IUwbAdapterStateCallbacks cb = (IUwbAdapterStateCallbacks) args[0];
+            try {
+                cb.onAdapterStateChanged(false, StateChangeReason.UNKNOWN);
+            } catch (RemoteException e) {
+                // Nothing to do
+            }
+            return new Object();
+        }
+    };
+
+    Throwable mThrowRemoteException = new RemoteException("RemoteException");
+
+    private static Executor getExecutor() {
+        return new Executor() {
+            @Override
+            public void execute(Runnable command) {
+                command.run();
+            }
+        };
+    }
+
+    private static void verifyCallbackStateChangedInvoked(
+            AdapterStateCallback callback, int numTimes) {
+        verify(callback, times(numTimes)).onStateChanged(anyBoolean(), anyInt());
+    }
+
+    @Test
+    public void testRegister_RegisterUnregister() throws RemoteException {
+        doAnswer(mRegisterSuccessAnswer).when(mUwbAdapter).registerAdapterStateCallbacks(any());
+
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+        AdapterStateCallback callback1 = mock(AdapterStateCallback.class);
+        AdapterStateCallback callback2 = mock(AdapterStateCallback.class);
+
+        // Verify that the adapter state listener registered with the UWB Adapter
+        adapterStateListener.register(getExecutor(), callback1);
+        verify(mUwbAdapter, times(1)).registerAdapterStateCallbacks(any());
+        verifyCallbackStateChangedInvoked(callback1, 1);
+        verifyCallbackStateChangedInvoked(callback2, 0);
+
+        // Register a second client and no new call to UWB Adapter
+        adapterStateListener.register(getExecutor(), callback2);
+        verify(mUwbAdapter, times(1)).registerAdapterStateCallbacks(any());
+        verifyCallbackStateChangedInvoked(callback1, 1);
+        verifyCallbackStateChangedInvoked(callback2, 1);
+
+        // Unregister first callback
+        adapterStateListener.unregister(callback1);
+        verify(mUwbAdapter, times(1)).registerAdapterStateCallbacks(any());
+        verify(mUwbAdapter, times(0)).unregisterAdapterStateCallbacks(any());
+        verifyCallbackStateChangedInvoked(callback1, 1);
+        verifyCallbackStateChangedInvoked(callback2, 1);
+
+        // Unregister second callback
+        adapterStateListener.unregister(callback2);
+        verify(mUwbAdapter, times(1)).registerAdapterStateCallbacks(any());
+        verify(mUwbAdapter, times(1)).unregisterAdapterStateCallbacks(any());
+        verifyCallbackStateChangedInvoked(callback1, 1);
+        verifyCallbackStateChangedInvoked(callback2, 1);
+    }
+
+    @Test
+    public void testRegister_FirstRegisterFails() throws RemoteException {
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+        AdapterStateCallback callback1 = mock(AdapterStateCallback.class);
+        AdapterStateCallback callback2 = mock(AdapterStateCallback.class);
+
+        // Throw a remote exception whenever first registering
+        doThrow(mThrowRemoteException).when(mUwbAdapter).registerAdapterStateCallbacks(any());
+
+        adapterStateListener.register(getExecutor(), callback1);
+        verify(mUwbAdapter, times(1)).registerAdapterStateCallbacks(any());
+
+        // No longer throw an exception, instead succeed
+        doAnswer(mRegisterSuccessAnswer).when(mUwbAdapter).registerAdapterStateCallbacks(any());
+
+        // Register a different callback
+        adapterStateListener.register(getExecutor(), callback2);
+        verify(mUwbAdapter, times(2)).registerAdapterStateCallbacks(any());
+
+        // Ensure first callback was invoked again
+        verifyCallbackStateChangedInvoked(callback1, 2);
+        verifyCallbackStateChangedInvoked(callback2, 1);
+    }
+
+    @Test
+    public void testRegister_RegisterSameCallbackTwice() throws RemoteException {
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+        AdapterStateCallback callback = mock(AdapterStateCallback.class);
+        doAnswer(mRegisterSuccessAnswer).when(mUwbAdapter).registerAdapterStateCallbacks(any());
+
+        adapterStateListener.register(getExecutor(), callback);
+        verifyCallbackStateChangedInvoked(callback, 1);
+
+        adapterStateListener.register(getExecutor(), callback);
+        verifyCallbackStateChangedInvoked(callback, 1);
+
+        // Invoke a state change and ensure the callback is only called once
+        adapterStateListener.onAdapterStateChanged(false, StateChangeReason.UNKNOWN);
+        verifyCallbackStateChangedInvoked(callback, 2);
+    }
+
+    @Test
+    public void testCallback_RunViaExecutor_Success() throws RemoteException {
+        // Verify that the callbacks are invoked on the executor when successful
+        doAnswer(mRegisterSuccessAnswer).when(mUwbAdapter).registerAdapterStateCallbacks(any());
+        runViaExecutor();
+    }
+
+    @Test
+    public void testCallback_RunViaExecutor_Failure() throws RemoteException {
+        // Verify that the callbacks are invoked on the executor when there is a remote exception
+        doThrow(mThrowRemoteException).when(mUwbAdapter).registerAdapterStateCallbacks(any());
+        runViaExecutor();
+    }
+
+    private void runViaExecutor() {
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+        AdapterStateCallback callback = mock(AdapterStateCallback.class);
+
+        Executor executor = mock(Executor.class);
+
+        // Do not run commands received and ensure that the callback is not invoked
+        doAnswer(new ExecutorAnswer(false)).when(executor).execute(any());
+        adapterStateListener.register(executor, callback);
+        verify(executor, times(1)).execute(any());
+        verifyCallbackStateChangedInvoked(callback, 0);
+
+        // Manually invoke the callback and ensure callback is not invoked
+        adapterStateListener.onAdapterStateChanged(false, StateChangeReason.UNKNOWN);
+        verify(executor, times(2)).execute(any());
+        verifyCallbackStateChangedInvoked(callback, 0);
+
+        // Run the command that the executor receives
+        doAnswer(new ExecutorAnswer(true)).when(executor).execute(any());
+        adapterStateListener.onAdapterStateChanged(false, StateChangeReason.UNKNOWN);
+        verify(executor, times(3)).execute(any());
+        verifyCallbackStateChangedInvoked(callback, 1);
+    }
+
+    class ExecutorAnswer implements Answer {
+
+        final boolean mShouldRun;
+        ExecutorAnswer(boolean shouldRun) {
+            mShouldRun = shouldRun;
+        }
+
+        @Override
+        public Object answer(InvocationOnMock invocation) throws Throwable {
+            if (mShouldRun) {
+                ((Runnable) invocation.getArgument(0)).run();
+            }
+            return null;
+        }
+    }
+
+    @Test
+    public void testNotify_AllCallbacksNotified() throws RemoteException {
+        doAnswer(mRegisterSuccessAnswer).when(mUwbAdapter).registerAdapterStateCallbacks(any());
+
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+        List<AdapterStateCallback> callbacks = new ArrayList<>();
+        for (int i = 0; i < 10; i++) {
+            AdapterStateCallback callback = mock(AdapterStateCallback.class);
+            adapterStateListener.register(getExecutor(), callback);
+            callbacks.add(callback);
+        }
+
+            // Ensure every callback got the initial state
+        for (AdapterStateCallback callback : callbacks) {
+            verifyCallbackStateChangedInvoked(callback, 1);
+        }
+
+        // Invoke a state change and ensure all callbacks are invoked
+        adapterStateListener.onAdapterStateChanged(true, StateChangeReason.ALL_SESSIONS_CLOSED);
+        for (AdapterStateCallback callback : callbacks) {
+            verifyCallbackStateChangedInvoked(callback, 2);
+        }
+    }
+
+    @Test
+    public void testStateChange_CorrectValue() {
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+
+        AdapterStateCallback callback = mock(AdapterStateCallback.class);
+
+        adapterStateListener.register(getExecutor(), callback);
+
+        runStateChangeValue(StateChangeReason.ALL_SESSIONS_CLOSED,
+                AdapterStateCallback.STATE_CHANGED_REASON_ALL_SESSIONS_CLOSED);
+
+        runStateChangeValue(StateChangeReason.SESSION_STARTED,
+                AdapterStateCallback.STATE_CHANGED_REASON_SESSION_STARTED);
+
+        runStateChangeValue(StateChangeReason.SYSTEM_BOOT,
+                AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_BOOT);
+
+        runStateChangeValue(StateChangeReason.SYSTEM_POLICY,
+                AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_POLICY);
+
+        runStateChangeValue(StateChangeReason.UNKNOWN,
+                AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN);
+    }
+
+    private void runStateChangeValue(@StateChangeReason int reasonIn,
+            @AdapterStateCallback.StateChangedReason int reasonOut) {
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+        AdapterStateCallback callback = mock(AdapterStateCallback.class);
+        adapterStateListener.register(getExecutor(), callback);
+
+        adapterStateListener.onAdapterStateChanged(false, reasonIn);
+        verify(callback, times(1)).onStateChanged(false, reasonOut);
+
+        adapterStateListener.onAdapterStateChanged(true, reasonIn);
+        verify(callback, times(1)).onStateChanged(true, reasonOut);
+    }
+
+    @Test
+    public void testStateChange_FirstRegisterGetsCorrectState() throws RemoteException {
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+        AdapterStateCallback callback = mock(AdapterStateCallback.class);
+
+        Answer registerAnswer = new Answer() {
+            public Object answer(InvocationOnMock invocation) {
+                Object[] args = invocation.getArguments();
+                IUwbAdapterStateCallbacks cb = (IUwbAdapterStateCallbacks) args[0];
+                try {
+                    cb.onAdapterStateChanged(true, StateChangeReason.SESSION_STARTED);
+                } catch (RemoteException e) {
+                    // Nothing to do
+                }
+                return new Object();
+            }
+        };
+
+        doAnswer(registerAnswer).when(mUwbAdapter).registerAdapterStateCallbacks(any());
+
+        adapterStateListener.register(getExecutor(), callback);
+        verify(callback).onStateChanged(true,
+                AdapterStateCallback.STATE_CHANGED_REASON_SESSION_STARTED);
+    }
+
+    @Test
+    public void testStateChange_SecondRegisterGetsCorrectState() {
+        AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
+        AdapterStateCallback callback1 = mock(AdapterStateCallback.class);
+        AdapterStateCallback callback2 = mock(AdapterStateCallback.class);
+
+        adapterStateListener.register(getExecutor(), callback1);
+        adapterStateListener.onAdapterStateChanged(true, StateChangeReason.SYSTEM_BOOT);
+
+        adapterStateListener.register(getExecutor(), callback2);
+        verify(callback2).onStateChanged(true,
+                AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_BOOT);
+    }
+}
diff --git a/core/tests/uwbtests/src/android/uwb/UwbManagerTest.java b/core/tests/uwbtests/src/android/uwb/UwbManagerTest.java
new file mode 100644
index 0000000..4983bed
--- /dev/null
+++ b/core/tests/uwbtests/src/android/uwb/UwbManagerTest.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.uwb;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import android.content.Context;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Test of {@link UwbManager}.
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class UwbManagerTest {
+
+    public final Context mContext = InstrumentationRegistry.getContext();
+
+    @Test
+    public void testServiceAvailable() {
+        UwbManager manager = mContext.getSystemService(UwbManager.class);
+        if (UwbTestUtils.isUwbSupported(mContext)) {
+            assertNotNull(manager);
+        } else {
+            assertNull(manager);
+        }
+    }
+}
diff --git a/core/tests/uwbtests/src/android/uwb/UwbTestUtils.java b/core/tests/uwbtests/src/android/uwb/UwbTestUtils.java
index 62e0b62..fb75092 100644
--- a/core/tests/uwbtests/src/android/uwb/UwbTestUtils.java
+++ b/core/tests/uwbtests/src/android/uwb/UwbTestUtils.java
@@ -16,6 +16,8 @@
 
 package android.uwb;
 
+import android.content.Context;
+import android.content.pm.PackageManager;
 import android.os.SystemClock;
 
 import java.util.ArrayList;
@@ -24,6 +26,11 @@
 public class UwbTestUtils {
     private UwbTestUtils() {}
 
+    public static boolean isUwbSupported(Context context) {
+        PackageManager packageManager = context.getPackageManager();
+        return packageManager.hasSystemFeature(PackageManager.FEATURE_UWB);
+    }
+
     public static AngleMeasurement getAngleMeasurement() {
         return new AngleMeasurement.Builder()
                 .setRadians(getDoubleInRange(-Math.PI, Math.PI))
diff --git a/data/etc/OWNERS b/data/etc/OWNERS
index 70d4678..5efd0bd 100644
--- a/data/etc/OWNERS
+++ b/data/etc/OWNERS
@@ -1 +1,13 @@
-per-file privapp-permissions-platform.xml = hackbod@android.com, jsharkey@android.com, svetoslavganov@google.com, toddke@google.com, yamasani@google.com, cbrubaker@google.com, jeffv@google.com, moltmann@google.com, lorenzo@google.com
+cbrubaker@google.com
+hackbod@android.com
+hackbod@google.com
+jeffv@google.com
+jsharkey@android.com
+jsharkey@google.com
+lorenzo@google.com
+moltmann@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
+toddke@android.com
+toddke@google.com
+yamasani@google.com
diff --git a/data/etc/car/OWNERS b/data/etc/car/OWNERS
new file mode 100644
index 0000000..09e257c
--- /dev/null
+++ b/data/etc/car/OWNERS
@@ -0,0 +1 @@
+include platform/packages/services/Car:/OWNERS
diff --git a/data/etc/com.android.systemui.xml b/data/etc/com.android.systemui.xml
index a5a2221..06f1dae 100644
--- a/data/etc/com.android.systemui.xml
+++ b/data/etc/com.android.systemui.xml
@@ -35,10 +35,12 @@
         <permission name="android.permission.MANAGE_USERS"/>
         <permission name="android.permission.MASTER_CLEAR"/>
         <permission name="android.permission.MEDIA_CONTENT_CONTROL"/>
+        <permission name="android.permission.MODIFY_AUDIO_ROUTING" />
         <permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
         <permission name="android.permission.MODIFY_PHONE_STATE"/>
         <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
         <permission name="android.permission.OBSERVE_NETWORK_POLICY"/>
+        <permission name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS" />
         <permission name="android.permission.OVERRIDE_WIFI_CONFIG"/>
         <permission name="android.permission.PACKAGE_USAGE_STATS" />
         <permission name="android.permission.READ_DREAM_STATE"/>
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index 0806e71..6555fe9 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -143,6 +143,10 @@
         <permission name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />
         <permission name="android.permission.PACKAGE_USAGE_STATS" />
         <permission name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
+        <permission name="android.permission.MODIFY_AUDIO_ROUTING" />
+
+        <!-- For permission hub 2 debugging only -->
+        <permission name="android.permission.GET_ACCOUNTS_PRIVILEGED"/>
     </privapp-permissions>
 
     <privapp-permissions package="com.android.phone">
@@ -316,6 +320,7 @@
         <permission name="android.permission.DELETE_CACHE_FILES"/>
         <permission name="android.permission.DELETE_PACKAGES"/>
         <permission name="android.permission.DUMP"/>
+        <permission name="android.permission.CONTROL_UI_TRACING"/>
         <permission name="android.permission.ACTIVITY_EMBEDDING"/>
         <permission name="android.permission.FORCE_STOP_PACKAGES"/>
         <permission name="android.permission.GET_APP_OPS_STATS"/>
diff --git a/data/fonts/OWNERS b/data/fonts/OWNERS
new file mode 100644
index 0000000..a538331
--- /dev/null
+++ b/data/fonts/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/graphics/fonts/OWNERS
diff --git a/data/sounds/effects/ChargingStarted.ogg b/data/sounds/effects/ChargingStarted.ogg
index f09e273..9526b08 100644
--- a/data/sounds/effects/ChargingStarted.ogg
+++ b/data/sounds/effects/ChargingStarted.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/ChargingStarted.ogg b/data/sounds/effects/ogg/ChargingStarted.ogg
index f09e273..9526b08 100644
--- a/data/sounds/effects/ogg/ChargingStarted.ogg
+++ b/data/sounds/effects/ogg/ChargingStarted.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/ChargingStarted_48k.ogg b/data/sounds/effects/ogg/ChargingStarted_48k.ogg
index f09e273..9526b08 100644
--- a/data/sounds/effects/ogg/ChargingStarted_48k.ogg
+++ b/data/sounds/effects/ogg/ChargingStarted_48k.ogg
Binary files differ
diff --git a/drm/java/android/drm/OWNERS b/drm/java/android/drm/OWNERS
new file mode 100644
index 0000000..4387100
--- /dev/null
+++ b/drm/java/android/drm/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 49079
+
+jtinker@google.com
+robertshih@google.com
diff --git a/drm/jni/Android.bp b/drm/jni/Android.bp
index 1e33f0e..68757d8 100644
--- a/drm/jni/Android.bp
+++ b/drm/jni/Android.bp
@@ -21,6 +21,7 @@
 
     shared_libs: [
         "libdrmframework",
+        "libdrmframeworkcommon",
         "liblog",
         "libutils",
         "libandroid_runtime",
diff --git a/errorprone/OWNERS b/errorprone/OWNERS
new file mode 100644
index 0000000..bddbdb3
--- /dev/null
+++ b/errorprone/OWNERS
@@ -0,0 +1,2 @@
+jsharkey@android.com
+jsharkey@google.com
diff --git a/framework-jarjar-rules.txt b/framework-jarjar-rules.txt
index 70dedb8..d8af726 100644
--- a/framework-jarjar-rules.txt
+++ b/framework-jarjar-rules.txt
@@ -1,6 +1,2 @@
 rule android.hidl.** android.internal.hidl.@1
 rule android.net.wifi.WifiAnnotations* android.internal.wifi.WifiAnnotations@1
-
-# Hide media mainline module implementation classes to avoid collisions with
-# app-bundled ExoPlayer classes.
-rule com.google.android.exoplayer2.** android.media.internal.exo.@1
diff --git a/graphics/OWNERS b/graphics/OWNERS
new file mode 100644
index 0000000..a6d1bc3
--- /dev/null
+++ b/graphics/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/graphics/OWNERS
diff --git a/graphics/java/android/graphics/OWNERS b/graphics/java/android/graphics/OWNERS
new file mode 100644
index 0000000..c3fb6f8
--- /dev/null
+++ b/graphics/java/android/graphics/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 24939
+
+romainguy@google.com
+jreck@google.com
+njawad@google.com
+sumir@google.com
+
+per-file BLASTBufferQueue.java = file:/services/core/java/com/android/server/wm/OWNERS
diff --git a/graphics/java/android/graphics/drawable/OWNERS b/graphics/java/android/graphics/drawable/OWNERS
new file mode 100644
index 0000000..6196889
--- /dev/null
+++ b/graphics/java/android/graphics/drawable/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 24939
+
+romainguy@google.com
+jreck@google.com
+njawad@google.com
+sumir@google.com
diff --git a/graphics/java/android/graphics/drawable/shapes/OWNERS b/graphics/java/android/graphics/drawable/shapes/OWNERS
new file mode 100644
index 0000000..6196889
--- /dev/null
+++ b/graphics/java/android/graphics/drawable/shapes/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 24939
+
+romainguy@google.com
+jreck@google.com
+njawad@google.com
+sumir@google.com
diff --git a/graphics/java/android/graphics/fonts/OWNERS b/graphics/java/android/graphics/fonts/OWNERS
new file mode 100644
index 0000000..e0a354e
--- /dev/null
+++ b/graphics/java/android/graphics/fonts/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 24939
+
+romainguy@google.com
+nona@google.com
+siyamed@google.com
diff --git a/graphics/java/android/graphics/pdf/OWNERS b/graphics/java/android/graphics/pdf/OWNERS
new file mode 100644
index 0000000..f04e200
--- /dev/null
+++ b/graphics/java/android/graphics/pdf/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 24939
+
+romainguy@google.com
+djsollen@google.com
+sumir@google.com
+svetoslavganov@android.com
+svetoslavganov@google.com
+moltmann@google.com
diff --git a/graphics/java/android/graphics/text/OWNERS b/graphics/java/android/graphics/text/OWNERS
new file mode 100644
index 0000000..e0a354e
--- /dev/null
+++ b/graphics/java/android/graphics/text/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 24939
+
+romainguy@google.com
+nona@google.com
+siyamed@google.com
diff --git a/keystore/java/android/security/KeyStoreOperation.java b/keystore/java/android/security/KeyStoreOperation.java
index 49a4887..7ea9e14 100644
--- a/keystore/java/android/security/KeyStoreOperation.java
+++ b/keystore/java/android/security/KeyStoreOperation.java
@@ -17,7 +17,7 @@
 package android.security;
 
 import android.annotation.NonNull;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.os.RemoteException;
 import android.os.ServiceSpecificException;
 import android.security.keymaster.KeymasterDefs;
diff --git a/keystore/java/android/security/KeyStoreSecurityLevel.java b/keystore/java/android/security/KeyStoreSecurityLevel.java
index 7c3de8b..3ef4aa5 100644
--- a/keystore/java/android/security/KeyStoreSecurityLevel.java
+++ b/keystore/java/android/security/KeyStoreSecurityLevel.java
@@ -18,7 +18,7 @@
 
 import android.annotation.NonNull;
 import android.app.compat.CompatChanges;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.os.RemoteException;
 import android.os.ServiceSpecificException;
 import android.security.keystore.BackendBusyException;
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java b/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java
index 5867ef6..b1b6306 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java
@@ -83,8 +83,7 @@
         boolean supports3DES = "true".equals(android.os.SystemProperties.get(DESEDE_SYSTEM_PROPERTY));
 
         // java.security.KeyStore
-        put("KeyStore.AndroidKeyStore", PACKAGE_NAME + ".AndroidKeyStoreSpi");
-        put("Alg.Alias.KeyStore.AndroidKeyStoreLegacy", "AndroidKeyStore");
+        put("KeyStore." + providerName, PACKAGE_NAME + ".AndroidKeyStoreSpi");
 
         // java.security.KeyPairGenerator
         put("KeyPairGenerator.EC", PACKAGE_NAME + ".AndroidKeyStoreKeyPairGeneratorSpi$EC");
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStore3DESCipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStore3DESCipherSpi.java
index 69c7a25..0775a1a 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStore3DESCipherSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStore3DESCipherSpi.java
@@ -17,7 +17,7 @@
 package android.security.keystore2;
 
 import android.annotation.NonNull;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.keymaster.KeymasterDefs;
 import android.security.keystore.ArrayUtils;
 import android.security.keystore.KeyProperties;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreAuthenticatedAESCipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreAuthenticatedAESCipherSpi.java
index 2b5f6c3..bc56f01 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreAuthenticatedAESCipherSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreAuthenticatedAESCipherSpi.java
@@ -18,7 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.KeyStoreException;
 import android.security.KeyStoreOperation;
 import android.security.keymaster.KeymasterDefs;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreCipherSpiBase.java b/keystore/java/android/security/keystore2/AndroidKeyStoreCipherSpiBase.java
index 18d2692..a3b04ab 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreCipherSpiBase.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreCipherSpiBase.java
@@ -19,7 +19,7 @@
 import android.annotation.CallSuper;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.KeyStoreException;
 import android.security.KeyStoreOperation;
 import android.security.keymaster.KeymasterDefs;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreECDSASignatureSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreECDSASignatureSpi.java
index 2250c89..d1ef1df 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreECDSASignatureSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreECDSASignatureSpi.java
@@ -17,7 +17,7 @@
 package android.security.keystore2;
 
 import android.annotation.NonNull;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.KeyStoreException;
 import android.security.KeyStoreOperation;
 import android.security.keymaster.KeymasterDefs;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreHmacSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreHmacSpi.java
index eea45c2..8475ad9 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreHmacSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreHmacSpi.java
@@ -16,7 +16,7 @@
 
 package android.security.keystore2;
 
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.KeyStoreException;
 import android.security.KeyStoreOperation;
 import android.security.keymaster.KeymasterDefs;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreKeyGeneratorSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreKeyGeneratorSpi.java
index 479fd8a..233f352 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreKeyGeneratorSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreKeyGeneratorSpi.java
@@ -16,8 +16,8 @@
 
 package android.security.keystore2;
 
-import android.hardware.keymint.KeyParameter;
-import android.hardware.keymint.SecurityLevel;
+import android.hardware.security.keymint.KeyParameter;
+import android.hardware.security.keymint.SecurityLevel;
 import android.security.KeyStore2;
 import android.security.KeyStoreSecurityLevel;
 import android.security.keymaster.KeymasterArguments;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreKeyPairGeneratorSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreKeyPairGeneratorSpi.java
index 61725e3..df0e146 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreKeyPairGeneratorSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreKeyPairGeneratorSpi.java
@@ -18,8 +18,8 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.hardware.keymint.KeyParameter;
-import android.hardware.keymint.SecurityLevel;
+import android.hardware.security.keymint.KeyParameter;
+import android.hardware.security.keymint.SecurityLevel;
 import android.os.Build;
 import android.security.KeyPairGeneratorSpec;
 import android.security.KeyStore2;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java
index 2686ddc..951f918 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java
@@ -18,7 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.keymaster.KeymasterDefs;
 import android.security.keystore.KeyProperties;
 import android.security.keystore.KeymasterUtils;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreRSASignatureSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreRSASignatureSpi.java
index 444dad4..ab75591 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreRSASignatureSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreRSASignatureSpi.java
@@ -17,7 +17,7 @@
 package android.security.keystore2;
 
 import android.annotation.NonNull;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.keymaster.KeymasterDefs;
 import android.security.keystore.KeyProperties;
 
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSignatureSpiBase.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSignatureSpiBase.java
index a168f8f..9b4f01e 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreSignatureSpiBase.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreSignatureSpiBase.java
@@ -18,7 +18,7 @@
 
 import android.annotation.CallSuper;
 import android.annotation.NonNull;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.KeyStoreException;
 import android.security.KeyStoreOperation;
 import android.security.keymaster.KeymasterDefs;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
index 9790a4a..aca5314 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
@@ -18,9 +18,9 @@
 
 import android.annotation.NonNull;
 import android.hardware.biometrics.BiometricManager;
-import android.hardware.keymint.HardwareAuthenticatorType;
-import android.hardware.keymint.KeyParameter;
-import android.hardware.keymint.SecurityLevel;
+import android.hardware.security.keymint.HardwareAuthenticatorType;
+import android.hardware.security.keymint.KeyParameter;
+import android.hardware.security.keymint.SecurityLevel;
 import android.security.GateKeeper;
 import android.security.KeyStore2;
 import android.security.KeyStoreParameter;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreUnauthenticatedAESCipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreUnauthenticatedAESCipherSpi.java
index a2d4528..4d4b0d8 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreUnauthenticatedAESCipherSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreUnauthenticatedAESCipherSpi.java
@@ -18,7 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
 import android.security.keymaster.KeymasterDefs;
 import android.security.keystore.ArrayUtils;
 import android.security.keystore.KeyProperties;
diff --git a/keystore/java/android/security/keystore2/KeyStore2ParameterUtils.java b/keystore/java/android/security/keystore2/KeyStore2ParameterUtils.java
index 8fa532b..18c786a 100644
--- a/keystore/java/android/security/keystore2/KeyStore2ParameterUtils.java
+++ b/keystore/java/android/security/keystore2/KeyStore2ParameterUtils.java
@@ -18,8 +18,8 @@
 
 import android.annotation.NonNull;
 import android.hardware.biometrics.BiometricManager;
-import android.hardware.keymint.KeyParameter;
-import android.hardware.keymint.SecurityLevel;
+import android.hardware.security.keymint.KeyParameter;
+import android.hardware.security.keymint.SecurityLevel;
 import android.security.GateKeeper;
 import android.security.keymaster.KeymasterDefs;
 import android.security.keystore.KeyProperties;
diff --git a/libs/WindowManager/Jetpack/Android.bp b/libs/WindowManager/Jetpack/Android.bp
index 4f4364f..7fbbb61 100644
--- a/libs/WindowManager/Jetpack/Android.bp
+++ b/libs/WindowManager/Jetpack/Android.bp
@@ -24,14 +24,14 @@
     static_libs: ["window-sidecar"],
     installable: true,
     sdk_version: "core_platform",
-    vendor: true,
+    system_ext_specific: true,
     libs: ["framework", "androidx.annotation_annotation",],
     required: ["androidx.window.sidecar.xml",],
 }
 
 prebuilt_etc {
     name: "androidx.window.sidecar.xml",
-    vendor: true,
+    system_ext_specific: true,
     sub_dir: "permissions",
     src: "androidx.window.sidecar.xml",
     filename_from_src: true,
diff --git a/libs/WindowManager/Jetpack/androidx.window.sidecar.xml b/libs/WindowManager/Jetpack/androidx.window.sidecar.xml
index f88a5f4..359e69f 100644
--- a/libs/WindowManager/Jetpack/androidx.window.sidecar.xml
+++ b/libs/WindowManager/Jetpack/androidx.window.sidecar.xml
@@ -17,5 +17,5 @@
 <permissions>
     <library
         name="androidx.window.sidecar"
-        file="/vendor/framework/androidx.window.sidecar.jar"/>
+        file="/system_ext/framework/androidx.window.sidecar.jar"/>
 </permissions>
diff --git a/libs/WindowManager/OWNERS b/libs/WindowManager/OWNERS
index 063d459..2c61df9 100644
--- a/libs/WindowManager/OWNERS
+++ b/libs/WindowManager/OWNERS
@@ -1,3 +1,3 @@
 set noparent
 
-include ../../services/core/java/com/android/server/wm/OWNERS
\ No newline at end of file
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index 5e0471c..7982ab6 100644
--- a/libs/hwui/renderthread/EglManager.cpp
+++ b/libs/hwui/renderthread/EglManager.cpp
@@ -208,8 +208,12 @@
     return config;
 }
 
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+
 void EglManager::initExtensions() {
     auto extensions = StringUtils::split(eglQueryString(mEglDisplay, EGL_EXTENSIONS));
+    auto extensionsAndroid =
+            StringUtils::split(eglQueryStringImplementationANDROID(mEglDisplay, EGL_EXTENSIONS));
 
     // For our purposes we don't care if EGL_BUFFER_AGE is a result of
     // EGL_EXT_buffer_age or EGL_KHR_partial_update as our usage is covered
@@ -228,9 +232,12 @@
     EglExtensions.displayP3 = extensions.has("EGL_EXT_gl_colorspace_display_p3_passthrough");
     EglExtensions.contextPriority = extensions.has("EGL_IMG_context_priority");
     EglExtensions.surfacelessContext = extensions.has("EGL_KHR_surfaceless_context");
-    EglExtensions.nativeFenceSync = extensions.has("EGL_ANDROID_native_fence_sync");
     EglExtensions.fenceSync = extensions.has("EGL_KHR_fence_sync");
     EglExtensions.waitSync = extensions.has("EGL_KHR_wait_sync");
+
+    // EGL_ANDROID_native_fence_sync is not exposed to applications, so access
+    // this through the private Android-specific query instead.
+    EglExtensions.nativeFenceSync = extensionsAndroid.has("EGL_ANDROID_native_fence_sync");
 }
 
 bool EglManager::hasEglContext() {
diff --git a/libs/incident/OWNERS b/libs/incident/OWNERS
new file mode 100644
index 0000000..f766115
--- /dev/null
+++ b/libs/incident/OWNERS
@@ -0,0 +1 @@
+include /cmds/incidentd/OWNERS
diff --git a/libs/input/OWNERS b/libs/input/OWNERS
new file mode 100644
index 0000000..d701f23
--- /dev/null
+++ b/libs/input/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/hardware/input/OWNERS
diff --git a/libs/storage/OWNERS b/libs/storage/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/libs/storage/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/libs/usb/OWNERS b/libs/usb/OWNERS
new file mode 100644
index 0000000..f7b2a37
--- /dev/null
+++ b/libs/usb/OWNERS
@@ -0,0 +1 @@
+include /services/usb/OWNERS
diff --git a/location/OWNERS b/location/OWNERS
new file mode 100644
index 0000000..5ac6028
--- /dev/null
+++ b/location/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/location/OWNERS
diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl
index 75ea0cb..7ed5b57 100644
--- a/location/java/android/location/ILocationManager.aidl
+++ b/location/java/android/location/ILocationManager.aidl
@@ -45,9 +45,9 @@
 interface ILocationManager
 {
     Location getLastLocation(in LocationRequest request, String packageName, String featureId);
-    boolean getCurrentLocation(in LocationRequest request,
-            in ICancellationSignal cancellationSignal, in ILocationListener listener,
-            String packageName, String featureId, String listenerId);
+    @nullable ICancellationSignal getCurrentLocation(in LocationRequest request,
+            in ILocationListener listener, String packageName, String featureId,
+            String listenerId);
 
     void requestLocationUpdates(in LocationRequest request, in ILocationListener listener,
             in PendingIntent intent, String packageName, String featureId, String listenerId);
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 0c7d96d..33c6951 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -724,16 +724,15 @@
             cancellationSignal.throwIfCanceled();
         }
 
-        ICancellationSignal remoteCancellationSignal = CancellationSignal.createTransport();
-
         try {
-            if (mService.getCurrentLocation(currentLocationRequest, remoteCancellationSignal,
-                    transport, mContext.getPackageName(), mContext.getAttributionTag(),
-                    transport.getListenerId())) {
+            ICancellationSignal cancelRemote = mService.getCurrentLocation(
+                    currentLocationRequest, transport, mContext.getPackageName(),
+                    mContext.getAttributionTag(), transport.getListenerId());
+            if (cancelRemote != null) {
                 transport.register(mContext.getSystemService(AlarmManager.class),
-                        remoteCancellationSignal);
+                        cancellationSignal, cancelRemote);
                 if (cancellationSignal != null) {
-                    cancellationSignal.setOnCancelListener(transport::cancel);
+                    cancellationSignal.setRemote(cancelRemote);
                 }
             } else {
                 transport.fail();
@@ -2535,7 +2534,7 @@
     }
 
     private static class GetCurrentLocationTransport extends ILocationListener.Stub implements
-            AlarmManager.OnAlarmListener {
+            AlarmManager.OnAlarmListener, CancellationSignal.OnCancelListener {
 
         @GuardedBy("this")
         @Nullable
@@ -2567,6 +2566,7 @@
         }
 
         public synchronized void register(AlarmManager alarmManager,
+                CancellationSignal cancellationSignal,
                 ICancellationSignal remoteCancellationSignal) {
             if (mConsumer == null) {
                 return;
@@ -2580,10 +2580,18 @@
                     this,
                     null);
 
+            if (cancellationSignal != null) {
+                cancellationSignal.setOnCancelListener(this);
+            }
+
             mRemoteCancellationSignal = remoteCancellationSignal;
         }
 
-        public void cancel() {
+        @Override
+        public void onCancel() {
+            synchronized (this) {
+                mRemoteCancellationSignal = null;
+            }
             remove();
         }
 
@@ -2632,11 +2640,6 @@
 
         @Override
         public void onLocationChanged(Location location) {
-            synchronized (this) {
-                // save ourselves a pointless x-process call to cancel the location request
-                mRemoteCancellationSignal = null;
-            }
-
             deliverResult(location);
         }
 
@@ -3034,7 +3037,7 @@
         protected GnssRequest merge(@NonNull List<GnssRequest> requests) {
             Preconditions.checkArgument(!requests.isEmpty());
             for (GnssRequest request : requests) {
-                if (request.isFullTracking()) {
+                if (request != null && request.isFullTracking()) {
                     return request;
                 }
             }
diff --git a/location/java/android/location/OWNERS b/location/java/android/location/OWNERS
new file mode 100644
index 0000000..6032144
--- /dev/null
+++ b/location/java/android/location/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 880425
+
+sooniln@google.com
+wyattriley@google.com
+yuhany@google.com
+weiwa@google.com
diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java
index 717074c..19354e0 100644
--- a/media/java/android/media/AudioAttributes.java
+++ b/media/java/android/media/AudioAttributes.java
@@ -20,6 +20,8 @@
 import android.annotation.NonNull;
 import android.annotation.RequiresPermission;
 import android.annotation.SystemApi;
+import android.annotation.TestApi;
+import android.audio.policy.configuration.V7_0.AudioUsage;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.media.audiopolicy.AudioProductStrategy;
 import android.os.Build;
@@ -34,7 +36,9 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
 
@@ -1281,6 +1285,97 @@
         }
     }
 
+    /** @hide **/
+    @TestApi
+    @NonNull
+    public static String usageToXsdString(@AttributeUsage int usage) {
+        switch (usage) {
+            case AudioAttributes.USAGE_UNKNOWN:
+                return AudioUsage.AUDIO_USAGE_UNKNOWN.toString();
+            case AudioAttributes.USAGE_MEDIA:
+                return AudioUsage.AUDIO_USAGE_MEDIA.toString();
+            case AudioAttributes.USAGE_VOICE_COMMUNICATION:
+                return AudioUsage.AUDIO_USAGE_VOICE_COMMUNICATION.toString();
+            case AudioAttributes.USAGE_VOICE_COMMUNICATION_SIGNALLING:
+                return AudioUsage.AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING.toString();
+            case AudioAttributes.USAGE_ALARM:
+                return AudioUsage.AUDIO_USAGE_ALARM.toString();
+            case AudioAttributes.USAGE_NOTIFICATION:
+                return AudioUsage.AUDIO_USAGE_NOTIFICATION.toString();
+            case AudioAttributes.USAGE_NOTIFICATION_RINGTONE:
+                return AudioUsage.AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE.toString();
+            case AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY:
+                return AudioUsage.AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY.toString();
+            case AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE:
+                return AudioUsage.AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE.toString();
+            case AudioAttributes.USAGE_ASSISTANCE_SONIFICATION:
+                return AudioUsage.AUDIO_USAGE_ASSISTANCE_SONIFICATION.toString();
+            case AudioAttributes.USAGE_GAME:
+                return AudioUsage.AUDIO_USAGE_GAME.toString();
+            case AudioAttributes.USAGE_VIRTUAL_SOURCE:
+                return AudioUsage.AUDIO_USAGE_VIRTUAL_SOURCE.toString();
+            case AudioAttributes.USAGE_ASSISTANT:
+                return AudioUsage.AUDIO_USAGE_ASSISTANT.toString();
+            case AudioAttributes.USAGE_CALL_ASSISTANT:
+                return AudioUsage.AUDIO_USAGE_CALL_ASSISTANT.toString();
+            case AudioAttributes.USAGE_EMERGENCY:
+                return AudioUsage.AUDIO_USAGE_EMERGENCY.toString();
+            case AudioAttributes.USAGE_SAFETY:
+                return AudioUsage.AUDIO_USAGE_SAFETY.toString();
+            case AudioAttributes.USAGE_VEHICLE_STATUS:
+                return AudioUsage.AUDIO_USAGE_VEHICLE_STATUS.toString();
+            case AudioAttributes.USAGE_ANNOUNCEMENT:
+                return AudioUsage.AUDIO_USAGE_ANNOUNCEMENT.toString();
+            default:
+                Log.w(TAG, "Unknown usage value " + usage);
+                return AudioUsage.AUDIO_USAGE_UNKNOWN.toString();
+        }
+    }
+
+    private static final Map<String, Integer> sXsdStringToUsage = new HashMap<>();
+
+    static {
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_UNKNOWN.toString(), USAGE_UNKNOWN);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_UNKNOWN.toString(), USAGE_UNKNOWN);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_MEDIA.toString(), USAGE_MEDIA);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_VOICE_COMMUNICATION.toString(),
+                USAGE_VOICE_COMMUNICATION);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING.toString(),
+                USAGE_VOICE_COMMUNICATION_SIGNALLING);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_ALARM.toString(), USAGE_ALARM);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_NOTIFICATION.toString(), USAGE_NOTIFICATION);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE.toString(),
+                USAGE_NOTIFICATION_RINGTONE);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY.toString(),
+                USAGE_ASSISTANCE_ACCESSIBILITY);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE.toString(),
+                USAGE_ASSISTANCE_NAVIGATION_GUIDANCE);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_ASSISTANCE_SONIFICATION.toString(),
+                USAGE_ASSISTANCE_SONIFICATION);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_GAME.toString(), USAGE_GAME);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_VIRTUAL_SOURCE.toString(),
+                USAGE_VIRTUAL_SOURCE);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_ASSISTANT.toString(), USAGE_ASSISTANT);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_CALL_ASSISTANT.toString(),
+                USAGE_CALL_ASSISTANT);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_EMERGENCY.toString(), USAGE_EMERGENCY);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_SAFETY.toString(), USAGE_SAFETY);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_VEHICLE_STATUS.toString(),
+                USAGE_VEHICLE_STATUS);
+        sXsdStringToUsage.put(AudioUsage.AUDIO_USAGE_ANNOUNCEMENT.toString(), USAGE_ANNOUNCEMENT);
+    }
+
+    /** @hide **/
+    @TestApi
+    public static @AttributeUsage int xsdStringToUsage(@NonNull String xsdUsage) {
+        if (sXsdStringToUsage.containsKey(xsdUsage)) {
+            return sXsdStringToUsage.get(xsdUsage);
+        } else {
+            Log.w(TAG, "Usage name not found in AudioUsage enum: " + xsdUsage);
+            return USAGE_UNKNOWN;
+        }
+    }
+
     /** @hide */
     public String contentTypeToString() {
         switch(mContentType) {
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java
index 655d100..b2c2c4b 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -808,7 +808,8 @@
         int initResult = native_setup(new WeakReference<AudioTrack>(this), mAttributes,
                 sampleRate, mChannelMask, mChannelIndexMask, mAudioFormat,
                 mNativeBufferSizeInBytes, mDataLoadMode, session, 0 /*nativeTrackInJavaObj*/,
-                offload, encapsulationMode, tunerConfiguration);
+                offload, encapsulationMode, tunerConfiguration,
+                getCurrentOpPackageName());
         if (initResult != SUCCESS) {
             loge("Error code "+initResult+" when initializing AudioTrack.");
             return; // with mState == STATE_UNINITIALIZED
@@ -894,7 +895,8 @@
                     nativeTrackInJavaObj,
                     false /*offload*/,
                     ENCAPSULATION_MODE_NONE,
-                    null /* tunerConfiguration */);
+                    null /* tunerConfiguration */,
+                    "" /* opPackagename */);
             if (initResult != SUCCESS) {
                 loge("Error code "+initResult+" when initializing AudioTrack.");
                 return; // with mState == STATE_UNINITIALIZED
@@ -4069,7 +4071,8 @@
             Object /*AudioAttributes*/ attributes,
             int[] sampleRate, int channelMask, int channelIndexMask, int audioFormat,
             int buffSizeInBytes, int mode, int[] sessionId, long nativeAudioTrack,
-            boolean offload, int encapsulationMode, Object tunerConfiguration);
+            boolean offload, int encapsulationMode, Object tunerConfiguration,
+            @NonNull String opPackageName);
 
     private native final void native_finalize();
 
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index 5fce5ee..3293c40 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -70,6 +70,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TimeZone;
+import java.util.UUID;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.zip.CRC32;
@@ -2095,7 +2096,10 @@
         try {
             // Move the original file to temporary file.
             if (mFilename != null) {
-                tempFile = new File(mFilename + ".tmp");
+                String parent = originalFile.getParent();
+                String name = originalFile.getName();
+                String tempPrefix = UUID.randomUUID().toString() + "_";
+                tempFile = new File(parent, tempPrefix + name);
                 if (!originalFile.renameTo(tempFile)) {
                     throw new IOException("Couldn't rename to " + tempFile.getAbsolutePath());
                 }
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index c2168f1..e7e83eb 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -25,6 +25,7 @@
 import android.annotation.TestApi;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.os.Build;
+import android.os.Process;
 import android.os.SystemProperties;
 import android.util.Log;
 import android.util.Pair;
@@ -188,13 +189,14 @@
 
     // COMMON CONSTANTS
     private static final Range<Integer> POSITIVE_INTEGERS =
-        Range.create(1, Integer.MAX_VALUE);
+            Range.create(1, Integer.MAX_VALUE);
     private static final Range<Long> POSITIVE_LONGS =
-        Range.create(1l, Long.MAX_VALUE);
+            Range.create(1L, Long.MAX_VALUE);
     private static final Range<Rational> POSITIVE_RATIONALS =
-        Range.create(new Rational(1, Integer.MAX_VALUE),
-                     new Rational(Integer.MAX_VALUE, 1));
-    private static final Range<Integer> SIZE_RANGE = Range.create(1, 32768);
+            Range.create(new Rational(1, Integer.MAX_VALUE),
+                         new Rational(Integer.MAX_VALUE, 1));
+    private static final Range<Integer> SIZE_RANGE =
+            Process.is64Bit() ? Range.create(1, 32768) : Range.create(1, 4096);
     private static final Range<Integer> FRAME_RATE_RANGE = Range.create(0, 960);
     private static final Range<Integer> BITRATE_RANGE = Range.create(0, 500000000);
     private static final int DEFAULT_MAX_SUPPORTED_INSTANCES = 32;
@@ -1399,6 +1401,9 @@
 
         /**
          * Returns the range of supported video widths.
+         * <p class=note>
+         * 32-bit processes will not support resolutions larger than 4096x4096 due to
+         * the limited address space.
          */
         public Range<Integer> getSupportedWidths() {
             return mWidthRange;
@@ -1406,6 +1411,9 @@
 
         /**
          * Returns the range of supported video heights.
+         * <p class=note>
+         * 32-bit processes will not support resolutions larger than 4096x4096 due to
+         * the limited address space.
          */
         public Range<Integer> getSupportedHeights() {
             return mHeightRange;
@@ -1857,6 +1865,10 @@
                         && aligned.mMaxMacroBlockRate >= otherAligned.mMaxMacroBlockRate);
             }
 
+            /* package private */ boolean isEqualDimension(@NonNull PerformancePoint other) {
+                return mWidth == other.mWidth && mHeight == other.mHeight;
+            }
+
             private @NonNull Size getCommonBlockSize(@NonNull PerformancePoint other) {
                 return new Size(
                         Math.max(mBlockSize.getWidth(), other.mBlockSize.getWidth()) * 16,
@@ -1997,6 +2009,9 @@
          * Performance points assume a single active codec. For use cases where multiple
          * codecs are active, should use that highest pixel count, and add the frame rates of
          * each individual codec.
+         * <p class=note>
+         * Supported resolution could be further restricted for 32-bit processes due to
+         * the limited virtual memory space.
          */
         @Nullable
         public List<PerformancePoint> getSupportedPerformancePoints() {
@@ -2164,6 +2179,12 @@
                 if (size == null || size.getWidth() * size.getHeight() <= 0) {
                     continue;
                 }
+                if (size.getWidth() > SIZE_RANGE.getUpper()
+                        || size.getHeight() > SIZE_RANGE.getUpper()) {
+                    size = new Size(
+                            Math.min(size.getWidth(), SIZE_RANGE.getUpper()),
+                            Math.min(size.getHeight(), SIZE_RANGE.getUpper()));
+                }
                 Range<Long> range = Utils.parseLongRange(map.get(key), null);
                 if (range == null || range.getLower() < 0 || range.getUpper() < 0) {
                     continue;
@@ -2193,6 +2214,29 @@
                                (a.getMaxMacroBlockRate() < b.getMaxMacroBlockRate() ? -1 : 1) :
                        (a.getMaxFrameRate() != b.getMaxFrameRate()) ?
                                (a.getMaxFrameRate() < b.getMaxFrameRate() ? -1 : 1) : 0));
+
+            // remove redundant points
+            for (int i = 1; i < ret.size(); ++i) {
+                PerformancePoint a = ret.get(i);
+                for (int j = 0; j < i; ++j) {
+                    PerformancePoint b = ret.get(j);
+                    if (b.isEqualDimension(a) && b.covers(a)) {
+                        ret.set(i, null);
+                        break;
+                    }
+                }
+            }
+            int newSize = 0;
+            for (int i = 0; i < ret.size(); ++i) {
+                PerformancePoint a = ret.get(i);
+                if (a == null) {
+                    continue;
+                }
+                ret.set(newSize, a);
+                ++newSize;
+            }
+            ret.setSize(newSize);
+
             return Collections.unmodifiableList(ret);
         }
 
diff --git a/media/java/android/media/MediaHTTPConnection.java b/media/java/android/media/MediaHTTPConnection.java
index a17ff82..babc1d5 100644
--- a/media/java/android/media/MediaHTTPConnection.java
+++ b/media/java/android/media/MediaHTTPConnection.java
@@ -19,7 +19,7 @@
 import static android.media.MediaPlayer.MEDIA_ERROR_UNSUPPORTED;
 
 import android.compat.annotation.UnsupportedAppUsage;
-import android.net.NetworkUtils;
+import android.net.InetAddresses;
 import android.os.IBinder;
 import android.os.StrictMode;
 import android.util.Log;
@@ -214,7 +214,7 @@
             if (host.equalsIgnoreCase("localhost")) {
                 return true;
             }
-            if (NetworkUtils.numericToInetAddress(host).isLoopbackAddress()) {
+            if (InetAddresses.parseNumericAddress(host).isLoopbackAddress()) {
                 return true;
             }
         } catch (IllegalArgumentException iex) {
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index e571b68..559786c 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -673,7 +673,8 @@
         /* Native setup requires a weak reference to our object.
          * It's easier to create it here than in C++.
          */
-        native_setup(new WeakReference<MediaPlayer>(this));
+        native_setup(new WeakReference<MediaPlayer>(this),
+                getCurrentOpPackageName());
 
         baseRegisterPlayer();
     }
@@ -2379,7 +2380,7 @@
     private native final int native_setMetadataFilter(Parcel request);
 
     private static native final void native_init();
-    private native final void native_setup(Object mediaplayer_this);
+    private native void native_setup(Object mediaplayerThis, @NonNull String opPackageName);
     private native final void native_finalize();
 
     /**
diff --git a/media/java/android/media/OWNERS b/media/java/android/media/OWNERS
new file mode 100644
index 0000000..cbc9ab7
--- /dev/null
+++ b/media/java/android/media/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 1344
+
+fgoldfain@google.com
+elaurent@google.com
+lajos@google.com
+olly@google.com
+andrewlewis@google.com
+sungsoo@google.com
diff --git a/media/java/android/media/PlayerBase.java b/media/java/android/media/PlayerBase.java
index ee8f1b3..df5e85e 100644
--- a/media/java/android/media/PlayerBase.java
+++ b/media/java/android/media/PlayerBase.java
@@ -27,6 +27,7 @@
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.text.TextUtils;
 import android.util.Log;
 
 import com.android.internal.annotations.GuardedBy;
@@ -622,4 +623,8 @@
         Log.w(className, "See the documentation of " + opName + " for what to use instead with " +
                 "android.media.AudioAttributes to qualify your playback use case");
     }
+
+    protected String getCurrentOpPackageName() {
+        return TextUtils.emptyIfNull(ActivityThread.currentOpPackageName());
+    }
 }
diff --git a/media/java/android/media/audiofx/OWNERS b/media/java/android/media/audiofx/OWNERS
new file mode 100644
index 0000000..189fe0f
--- /dev/null
+++ b/media/java/android/media/audiofx/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 48436
+
+elaurent@google.com
diff --git a/media/java/android/media/audiopolicy/OWNERS b/media/java/android/media/audiopolicy/OWNERS
new file mode 100644
index 0000000..189fe0f
--- /dev/null
+++ b/media/java/android/media/audiopolicy/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 48436
+
+elaurent@google.com
diff --git a/media/java/android/media/browse/MediaBrowser.java b/media/java/android/media/browse/MediaBrowser.java
index 3d27e4b..84ec93d 100644
--- a/media/java/android/media/browse/MediaBrowser.java
+++ b/media/java/android/media/browse/MediaBrowser.java
@@ -185,7 +185,7 @@
                 boolean bound = false;
                 try {
                     bound = mContext.bindService(intent, mServiceConnection,
-                            Context.BIND_AUTO_CREATE);
+                            Context.BIND_AUTO_CREATE | Context.BIND_INCLUDE_CAPABILITIES);
                 } catch (Exception ex) {
                     Log.e(TAG, "Failed binding to service " + mServiceComponent);
                 }
diff --git a/media/java/android/media/browse/OWNERS b/media/java/android/media/browse/OWNERS
new file mode 100644
index 0000000..916fc36
--- /dev/null
+++ b/media/java/android/media/browse/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 137631
+
+hdmoon@google.com
+insun@google.com
+jaewan@google.com
+jinpark@google.com
+klhyun@google.com
+gyumin@google.com
diff --git a/media/java/android/media/midi/OWNERS b/media/java/android/media/midi/OWNERS
new file mode 100644
index 0000000..6a351d3
--- /dev/null
+++ b/media/java/android/media/midi/OWNERS
@@ -0,0 +1 @@
+elaurent@google.com
diff --git a/media/java/android/media/session/OWNERS b/media/java/android/media/session/OWNERS
new file mode 100644
index 0000000..916fc36
--- /dev/null
+++ b/media/java/android/media/session/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 137631
+
+hdmoon@google.com
+insun@google.com
+jaewan@google.com
+jinpark@google.com
+klhyun@google.com
+gyumin@google.com
diff --git a/media/java/android/media/soundtrigger/OWNERS b/media/java/android/media/soundtrigger/OWNERS
new file mode 100644
index 0000000..6a351d3
--- /dev/null
+++ b/media/java/android/media/soundtrigger/OWNERS
@@ -0,0 +1 @@
+elaurent@google.com
diff --git a/media/java/android/media/tv/OWNERS b/media/java/android/media/tv/OWNERS
index a891154..8bccc9a 100644
--- a/media/java/android/media/tv/OWNERS
+++ b/media/java/android/media/tv/OWNERS
@@ -1,9 +1,6 @@
-amyjojo@google.com
 nchalko@google.com
-shubang@google.com
 quxiangfang@google.com
 
 # For android remote service
 per-file ITvRemoteServiceInput.aidl = file:/media/lib/tvremote/OWNERS
 per-file ITvRemoteProvider.aidl = file:/media/lib/tvremote/OWNERS
-
diff --git a/media/jni/android_media_MediaCodecLinearBlock.h b/media/jni/android_media_MediaCodecLinearBlock.h
index 8f1d2fa..ae2d3a2 100644
--- a/media/jni/android_media_MediaCodecLinearBlock.h
+++ b/media/jni/android_media_MediaCodecLinearBlock.h
@@ -49,7 +49,14 @@
             if (offset == 0 && size == block.capacity()) {
                 return mBuffer;
             }
-            return C2Buffer::CreateLinearBuffer(block.subBlock(offset, size));
+
+            std::shared_ptr<C2Buffer> buffer =
+                C2Buffer::CreateLinearBuffer(block.subBlock(offset, size));
+            for (const std::shared_ptr<const C2Info> &info : mBuffer->info()) {
+                std::shared_ptr<C2Param> param = std::move(C2Param::Copy(*info));
+                buffer->setInfo(std::static_pointer_cast<C2Info>(param));
+            }
+            return buffer;
         }
         if (mBlock) {
             return C2Buffer::CreateLinearBuffer(mBlock->share(offset, size, C2Fence{}));
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 82b746f..d63b1ad 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -33,6 +33,7 @@
 #include <utils/threads.h>
 #include "jni.h"
 #include <nativehelper/JNIPlatformHelp.h>
+#include <nativehelper/ScopedUtfChars.h>
 #include "android_runtime/AndroidRuntime.h"
 #include "android_runtime/android_view_Surface.h"
 #include "android_runtime/Log.h"
@@ -944,10 +945,12 @@
 }
 
 static void
-android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_this)
+android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_this,
+                                       jstring opPackageName)
 {
     ALOGV("native_setup");
-    sp<MediaPlayer> mp = new MediaPlayer();
+    ScopedUtfChars opPackageNameStr(env, opPackageName);
+    sp<MediaPlayer> mp = new MediaPlayer(opPackageNameStr.c_str());
     if (mp == NULL) {
         jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
         return;
@@ -1403,7 +1406,7 @@
     {"native_setMetadataFilter", "(Landroid/os/Parcel;)I",      (void *)android_media_MediaPlayer_setMetadataFilter},
     {"native_getMetadata", "(ZZLandroid/os/Parcel;)Z",          (void *)android_media_MediaPlayer_getMetadata},
     {"native_init",         "()V",                              (void *)android_media_MediaPlayer_native_init},
-    {"native_setup",        "(Ljava/lang/Object;)V",            (void *)android_media_MediaPlayer_native_setup},
+    {"native_setup",        "(Ljava/lang/Object;Ljava/lang/String;)V",(void *)android_media_MediaPlayer_native_setup},
     {"native_finalize",     "()V",                              (void *)android_media_MediaPlayer_native_finalize},
     {"getAudioSessionId",   "()I",                              (void *)android_media_MediaPlayer_get_audio_session_id},
     {"setAudioSessionId",   "(I)V",                             (void *)android_media_MediaPlayer_set_audio_session_id},
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp
index 96961ac2..d55e9d0 100644
--- a/media/jni/audioeffect/android_media_AudioEffect.cpp
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -331,7 +331,7 @@
     }
 
     if (deviceType != AUDIO_DEVICE_NONE) {
-        device.mType = deviceType;
+        device.mType = (audio_devices_t)deviceType;
         ScopedUtfChars address(env, deviceAddress);
         device.mAddress = address.c_str();
     }
diff --git a/media/jni/soundpool/android_media_SoundPool.cpp b/media/jni/soundpool/android_media_SoundPool.cpp
index ca3cc855..26725f8 100644
--- a/media/jni/soundpool/android_media_SoundPool.cpp
+++ b/media/jni/soundpool/android_media_SoundPool.cpp
@@ -200,7 +200,7 @@
     paa->usage = (audio_usage_t) env->GetIntField(jaa, javaAudioAttrFields.fieldUsage);
     paa->content_type =
             (audio_content_type_t) env->GetIntField(jaa, javaAudioAttrFields.fieldContentType);
-    paa->flags = env->GetIntField(jaa, javaAudioAttrFields.fieldFlags);
+    paa->flags = (audio_flags_mask_t) env->GetIntField(jaa, javaAudioAttrFields.fieldFlags);
 
     ALOGV("android_media_SoundPool_native_setup");
     auto *ap = new SoundPool(maxChannels, paa);
diff --git a/media/mca/effect/java/android/media/effect/OWNERS b/media/mca/effect/java/android/media/effect/OWNERS
new file mode 100644
index 0000000..6a351d3
--- /dev/null
+++ b/media/mca/effect/java/android/media/effect/OWNERS
@@ -0,0 +1 @@
+elaurent@google.com
diff --git a/media/mca/effect/java/android/media/effect/effects/OWNERS b/media/mca/effect/java/android/media/effect/effects/OWNERS
new file mode 100644
index 0000000..6a351d3
--- /dev/null
+++ b/media/mca/effect/java/android/media/effect/effects/OWNERS
@@ -0,0 +1 @@
+elaurent@google.com
diff --git a/media/mca/filterfw/java/android/filterfw/OWNERS b/media/mca/filterfw/java/android/filterfw/OWNERS
new file mode 100644
index 0000000..5d351ef
--- /dev/null
+++ b/media/mca/filterfw/java/android/filterfw/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 50018
+
+elaurent@google.com
diff --git a/media/mca/filterfw/java/android/filterfw/samples/OWNERS b/media/mca/filterfw/java/android/filterfw/samples/OWNERS
new file mode 100644
index 0000000..5d351ef
--- /dev/null
+++ b/media/mca/filterfw/java/android/filterfw/samples/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 50018
+
+elaurent@google.com
diff --git a/media/native/midi/MidiDeviceInfo.cpp b/media/native/midi/MidiDeviceInfo.cpp
index ac68d26..8a573fb 100644
--- a/media/native/midi/MidiDeviceInfo.cpp
+++ b/media/native/midi/MidiDeviceInfo.cpp
@@ -90,13 +90,13 @@
 
 status_t MidiDeviceInfo::readStringVector(
         const Parcel* parcel, Vector<String16> *vectorPtr, size_t defaultLength) {
-    std::unique_ptr<std::vector<std::unique_ptr<String16>>> v;
+    std::optional<std::vector<std::optional<String16>>> v;
     status_t result = parcel->readString16Vector(&v);
     if (result != OK) return result;
     vectorPtr->clear();
-    if (v.get() != nullptr) {
+    if (v) {
         for (const auto& iter : *v) {
-            if (iter.get() != nullptr) {
+            if (iter) {
                 vectorPtr->push_back(*iter);
             } else {
                 vectorPtr->push_back(String16());
diff --git a/mime/OWNERS b/mime/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/mime/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/mime/java-res/android.mime.types b/mime/java-res/android.mime.types
index f3730f2..88179a17 100644
--- a/mime/java-res/android.mime.types
+++ b/mime/java-res/android.mime.types
@@ -63,6 +63,7 @@
 ?application/x-android-drm-fl fl
 ?application/x-flac flac
 ?application/x-font pcf
+?application/x-mobipocket-ebook prc mobi
 ?application/x-mpegurl m3u m3u8
 ?application/x-pem-file pem
 ?application/x-pkcs12 p12 pfx
diff --git a/native/android/aidl/com/android/internal/compat/OWNERS b/native/android/aidl/com/android/internal/compat/OWNERS
new file mode 100644
index 0000000..f8c3520
--- /dev/null
+++ b/native/android/aidl/com/android/internal/compat/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/compat/OWNERS
diff --git a/native/graphics/OWNERS b/native/graphics/OWNERS
new file mode 100644
index 0000000..a6d1bc3
--- /dev/null
+++ b/native/graphics/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/graphics/OWNERS
diff --git a/opengl/java/android/opengl/OWNERS b/opengl/java/android/opengl/OWNERS
new file mode 100644
index 0000000..9c6c610
--- /dev/null
+++ b/opengl/java/android/opengl/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 25421
+
+sumir@google.com
+prahladk@google.com
diff --git a/packages/AppPredictionLib/OWNERS b/packages/AppPredictionLib/OWNERS
new file mode 100644
index 0000000..3a5d23d
--- /dev/null
+++ b/packages/AppPredictionLib/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/appprediction/OWNERS
diff --git a/packages/Backup/OWNERS b/packages/Backup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/packages/Backup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/packages/BackupEncryption/OWNERS b/packages/BackupEncryption/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/packages/BackupEncryption/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/packages/BackupRestoreConfirmation/OWNERS b/packages/BackupRestoreConfirmation/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/packages/BackupRestoreConfirmation/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/packages/CarSystemUI/TEST_MAPPING b/packages/CarSystemUI/TEST_MAPPING
index 6056ddf..c18a12a 100644
--- a/packages/CarSystemUI/TEST_MAPPING
+++ b/packages/CarSystemUI/TEST_MAPPING
@@ -8,5 +8,16 @@
         }
       ]
     }
+  ],
+
+  "carsysui-presubmit": [
+    {
+      "name": "CarSystemUITests",
+      "options" : [
+        {
+          "include-annotation": "com.android.systemui.car.CarSystemUiTest"
+        }
+      ]
+    }
   ]
 }
diff --git a/packages/CarSystemUI/res-keyguard/layout/keyguard_password_view.xml b/packages/CarSystemUI/res-keyguard/layout/keyguard_password_view.xml
index 8b235e6..d57875f 100644
--- a/packages/CarSystemUI/res-keyguard/layout/keyguard_password_view.xml
+++ b/packages/CarSystemUI/res-keyguard/layout/keyguard_password_view.xml
@@ -53,7 +53,7 @@
             android:textColor="?attr/wallpaperTextColor"
             android:textAppearance="?android:attr/textAppearanceMedium"
             android:imeOptions="flagForceAscii|actionDone"
-            android:maxLength="@integer/password_text_view_scale"
+            android:maxLength="@integer/password_max_length"
          />
 
         <TextView
diff --git a/packages/CarSystemUI/res/layout/car_user_switching_dialog.xml b/packages/CarSystemUI/res/layout/car_user_switching_dialog.xml
index 0a29424..09fbf7a 100644
--- a/packages/CarSystemUI/res/layout/car_user_switching_dialog.xml
+++ b/packages/CarSystemUI/res/layout/car_user_switching_dialog.xml
@@ -15,7 +15,6 @@
   ~ limitations under the License.
   -->
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:fitsSystemWindows="true"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:gravity="center"
diff --git a/packages/CarSystemUI/res/layout/headsup_container_bottom.xml b/packages/CarSystemUI/res/layout/headsup_container_bottom.xml
index 1782d25..5aab0a1 100644
--- a/packages/CarSystemUI/res/layout/headsup_container_bottom.xml
+++ b/packages/CarSystemUI/res/layout/headsup_container_bottom.xml
@@ -29,13 +29,12 @@
         android:orientation="horizontal"
         app:layout_constraintGuide_begin="@dimen/headsup_scrim_height"/>
 
-    <!-- Include a FocusParkingView at the beginning or end. The rotary controller "parks" the
-         focus here when the user navigates to another window. This is also used to prevent
-         wrap-around which is why it must be first or last in Tab order. -->
+    <!-- Include a FocusParkingView at the beginning. The rotary controller "parks" the focus here
+         when the user navigates to another window. This is also used to prevent wrap-around. -->
     <com.android.car.ui.FocusParkingView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent"/>
 
     <View
diff --git a/packages/CarSystemUI/res/layout/super_notification_shade.xml b/packages/CarSystemUI/res/layout/super_notification_shade.xml
deleted file mode 100644
index db71c91..0000000
--- a/packages/CarSystemUI/res/layout/super_notification_shade.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2020, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT 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 is the notification shade window. -->
-<com.android.systemui.statusbar.phone.NotificationShadeWindowView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:sysui="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:fitsSystemWindows="true">
-
-    <com.android.systemui.statusbar.BackDropView
-        android:id="@+id/backdrop"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:visibility="gone"
-        sysui:ignoreRightInset="true"
-    >
-        <ImageView android:id="@+id/backdrop_back"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:scaleType="centerCrop"/>
-        <ImageView android:id="@+id/backdrop_front"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:scaleType="centerCrop"
-            android:visibility="invisible"/>
-    </com.android.systemui.statusbar.BackDropView>
-
-    <com.android.systemui.statusbar.ScrimView
-        android:id="@+id/scrim_behind"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:importantForAccessibility="no"
-        sysui:ignoreRightInset="true"
-    />
-
-    <include layout="@layout/brightness_mirror"/>
-
-    <ViewStub android:id="@+id/fullscreen_user_switcher_stub"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout="@layout/car_fullscreen_user_switcher"/>
-
-    <include layout="@layout/notification_center_activity"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_marginBottom="@dimen/navigation_bar_height"
-        android:visibility="invisible"/>
-
-    <include layout="@layout/status_bar_expanded"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:visibility="invisible"/>
-
-    <com.android.systemui.statusbar.ScrimView
-        android:id="@+id/scrim_in_front"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:importantForAccessibility="no"
-        sysui:ignoreRightInset="true"
-    />
-
-</com.android.systemui.statusbar.phone.NotificationShadeWindowView>
diff --git a/packages/CarSystemUI/res/layout/super_status_bar.xml b/packages/CarSystemUI/res/layout/super_status_bar.xml
deleted file mode 100644
index d93f62f..0000000
--- a/packages/CarSystemUI/res/layout/super_status_bar.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2020, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT 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 is the status bar window. -->
-<com.android.systemui.statusbar.phone.StatusBarWindowView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:sysui="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:fitsSystemWindows="true">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-    >
-        <FrameLayout
-            android:id="@+id/status_bar_container"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:visibility="gone"
-        />
-
-        <FrameLayout
-            android:id="@+id/car_top_navigation_bar_container"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"/>
-    </LinearLayout>
-
-</com.android.systemui.statusbar.phone.StatusBarWindowView>
diff --git a/packages/CarSystemUI/res/layout/sysui_overlay_window.xml b/packages/CarSystemUI/res/layout/sysui_overlay_window.xml
index 2dc499c..e7295aa 100644
--- a/packages/CarSystemUI/res/layout/sysui_overlay_window.xml
+++ b/packages/CarSystemUI/res/layout/sysui_overlay_window.xml
@@ -22,12 +22,11 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-    <!-- TODO(b/151617493): replace marginBottom with insets. -->
     <ViewStub android:id="@+id/notification_panel_stub"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:layout="@layout/notification_panel_container"
-              android:layout_marginBottom="@dimen/navigation_bar_height"/>
+              android:layout_marginBottom="@dimen/car_bottom_navigation_bar_height"/>
 
     <ViewStub android:id="@+id/keyguard_stub"
               android:layout_width="match_parent"
diff --git a/packages/CarSystemUI/res/values-ca/strings.xml b/packages/CarSystemUI/res/values-ca/strings.xml
index 083f9d0..375fc5c 100644
--- a/packages/CarSystemUI/res/values-ca/strings.xml
+++ b/packages/CarSystemUI/res/values-ca/strings.xml
@@ -24,7 +24,7 @@
     <string name="start_guest_session" msgid="497784785761754874">"Convidat"</string>
     <string name="car_add_user" msgid="4067337059622483269">"Afegeix un usuari"</string>
     <string name="car_new_user" msgid="6637442369728092473">"Usuari nou"</string>
-    <string name="user_add_user_message_setup" msgid="1035578846007352323">"Quan s\'afegeix un usuari nou, aquest usuari ha de configurar el seu espai."</string>
+    <string name="user_add_user_message_setup" msgid="1035578846007352323">"Quan s\'afegeix un usuari nou, aquesta persona ha de configurar el seu espai."</string>
     <string name="user_add_user_message_update" msgid="7061671307004867811">"Qualsevol usuari pot actualitzar les aplicacions de la resta d\'usuaris."</string>
     <string name="car_loading_profile" msgid="4507385037552574474">"S\'està carregant"</string>
     <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"S\'està carregant l\'usuari (de <xliff:g id="FROM_USER">%1$d</xliff:g> a <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
diff --git a/packages/CarSystemUI/res/values-es-rUS/strings.xml b/packages/CarSystemUI/res/values-es-rUS/strings.xml
index c1c21d1..027242a 100644
--- a/packages/CarSystemUI/res/values-es-rUS/strings.xml
+++ b/packages/CarSystemUI/res/values-es-rUS/strings.xml
@@ -25,7 +25,7 @@
     <string name="car_add_user" msgid="4067337059622483269">"Agregar usuario"</string>
     <string name="car_new_user" msgid="6637442369728092473">"Usuario nuevo"</string>
     <string name="user_add_user_message_setup" msgid="1035578846007352323">"Cuando agregues un usuario nuevo, esa persona deberá configurar su espacio."</string>
-    <string name="user_add_user_message_update" msgid="7061671307004867811">"Cualquier usuario podrá actualizar las apps de otras personas."</string>
+    <string name="user_add_user_message_update" msgid="7061671307004867811">"Cualquier usuario puede actualizar las aplicaciones del resto de los usuarios."</string>
     <string name="car_loading_profile" msgid="4507385037552574474">"Cargando"</string>
     <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Cargando usuario (de <xliff:g id="FROM_USER">%1$d</xliff:g> a <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
 </resources>
diff --git a/packages/CarSystemUI/res/values-fi/strings.xml b/packages/CarSystemUI/res/values-fi/strings.xml
index 6068969..6abf92f 100644
--- a/packages/CarSystemUI/res/values-fi/strings.xml
+++ b/packages/CarSystemUI/res/values-fi/strings.xml
@@ -25,7 +25,7 @@
     <string name="car_add_user" msgid="4067337059622483269">"Lisää käyttäjä"</string>
     <string name="car_new_user" msgid="6637442369728092473">"Uusi käyttäjä"</string>
     <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kun lisäät uuden käyttäjän, hänen on valittava oman tilansa asetukset."</string>
-    <string name="user_add_user_message_update" msgid="7061671307004867811">"Kaikki käyttäjät voivat päivittää muiden käyttäjien sovelluksia."</string>
+    <string name="user_add_user_message_update" msgid="7061671307004867811">"Kaikki käyttäjät voivat päivittää sovelluksia muille käyttäjille."</string>
     <string name="car_loading_profile" msgid="4507385037552574474">"Ladataan"</string>
     <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Ladataan käyttäjäprofiilia (<xliff:g id="FROM_USER">%1$d</xliff:g>–<xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
 </resources>
diff --git a/packages/CarSystemUI/res/values-in/strings.xml b/packages/CarSystemUI/res/values-in/strings.xml
index 901cbe7..1145dc3 100644
--- a/packages/CarSystemUI/res/values-in/strings.xml
+++ b/packages/CarSystemUI/res/values-in/strings.xml
@@ -24,7 +24,7 @@
     <string name="start_guest_session" msgid="497784785761754874">"Tamu"</string>
     <string name="car_add_user" msgid="4067337059622483269">"Tambahkan Pengguna"</string>
     <string name="car_new_user" msgid="6637442369728092473">"Pengguna Baru"</string>
-    <string name="user_add_user_message_setup" msgid="1035578846007352323">"Saat Anda menambahkan pengguna baru, orang tersebut perlu menyiapkan ruangnya sendiri."</string>
+    <string name="user_add_user_message_setup" msgid="1035578846007352323">"Jika ditambahkan, pengguna baru harus menyiapkan ruangnya sendiri."</string>
     <string name="user_add_user_message_update" msgid="7061671307004867811">"Setiap pengguna dapat mengupdate aplikasi untuk semua pengguna lain."</string>
     <string name="car_loading_profile" msgid="4507385037552574474">"Memuat"</string>
     <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Memuat pengguna (dari <xliff:g id="FROM_USER">%1$d</xliff:g> menjadi <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
diff --git a/packages/CarSystemUI/res/values-kk/strings.xml b/packages/CarSystemUI/res/values-kk/strings.xml
index f9449be..5220aa5 100644
--- a/packages/CarSystemUI/res/values-kk/strings.xml
+++ b/packages/CarSystemUI/res/values-kk/strings.xml
@@ -24,7 +24,7 @@
     <string name="start_guest_session" msgid="497784785761754874">"Қонақ"</string>
     <string name="car_add_user" msgid="4067337059622483269">"Пайдаланушыны енгізу"</string>
     <string name="car_new_user" msgid="6637442369728092473">"Жаңа пайдаланушы"</string>
-    <string name="user_add_user_message_setup" msgid="1035578846007352323">"Енгізілген жаңа пайдаланушы өз профилін реттеуі керек."</string>
+    <string name="user_add_user_message_setup" msgid="1035578846007352323">"Қосылған жаңа пайдаланушы өз профилін реттеуі керек."</string>
     <string name="user_add_user_message_update" msgid="7061671307004867811">"Кез келген пайдаланушы қолданбаларды басқа пайдаланушылар үшін жаңарта алады."</string>
     <string name="car_loading_profile" msgid="4507385037552574474">"Жүктелуде"</string>
     <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Пайдаланушы профилі жүктелуде (<xliff:g id="FROM_USER">%1$d</xliff:g> – <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
diff --git a/packages/CarSystemUI/res/values-ky/strings.xml b/packages/CarSystemUI/res/values-ky/strings.xml
index b093363..b3b355a 100644
--- a/packages/CarSystemUI/res/values-ky/strings.xml
+++ b/packages/CarSystemUI/res/values-ky/strings.xml
@@ -25,7 +25,7 @@
     <string name="car_add_user" msgid="4067337059622483269">"Колдонуучу кошуу"</string>
     <string name="car_new_user" msgid="6637442369728092473">"Жаңы колдонуучу"</string>
     <string name="user_add_user_message_setup" msgid="1035578846007352323">"Жаңы колдонуучу кошулганда, ал өзүнүн профилин жөндөп алышы керек."</string>
-    <string name="user_add_user_message_update" msgid="7061671307004867811">"Колдонмолорду бир колдонуучу калган бардык колдонуучулар үчүн да жаңырта алат."</string>
+    <string name="user_add_user_message_update" msgid="7061671307004867811">"Колдонмолорду бир колдонуучу жаңыртканда, ал калган бардык колдонуучулар үчүн да жаңырат."</string>
     <string name="car_loading_profile" msgid="4507385037552574474">"Жүктөлүүдө"</string>
     <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Колдонуучу тууралуу маалымат жүктөлүүдө (<xliff:g id="FROM_USER">%1$d</xliff:g> – <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
 </resources>
diff --git a/packages/CarSystemUI/res/values-ne/strings.xml b/packages/CarSystemUI/res/values-ne/strings.xml
index 70bcfc7..40639de 100644
--- a/packages/CarSystemUI/res/values-ne/strings.xml
+++ b/packages/CarSystemUI/res/values-ne/strings.xml
@@ -25,7 +25,7 @@
     <string name="car_add_user" msgid="4067337059622483269">"प्रयोगकर्ता थप्नुहोस्"</string>
     <string name="car_new_user" msgid="6637442369728092473">"नयाँ प्रयोगकर्ता"</string>
     <string name="user_add_user_message_setup" msgid="1035578846007352323">"तपाईंले नयाँ प्रयोगकर्ता थप्दा ती व्यक्तिले आफ्नो स्थान सेटअप गर्नु पर्छ।"</string>
-    <string name="user_add_user_message_update" msgid="7061671307004867811">"सबै प्रयोगकर्ताले अन्य प्रयोगकर्ताका अनुप्रयोगहरू अद्यावधिक गर्न सक्छन्।"</string>
+    <string name="user_add_user_message_update" msgid="7061671307004867811">"सबै प्रयोगकर्ताले अन्य प्रयोगकर्ताका एपहरू अद्यावधिक गर्न सक्छन्।"</string>
     <string name="car_loading_profile" msgid="4507385037552574474">"लोड गरिँदै"</string>
     <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"प्रयोगकर्तासम्बन्धी जानकारी लोड गरिँदै (<xliff:g id="FROM_USER">%1$d</xliff:g> बाट <xliff:g id="TO_USER">%2$d</xliff:g> मा)"</string>
 </resources>
diff --git a/packages/CarSystemUI/res/values-sk/strings.xml b/packages/CarSystemUI/res/values-sk/strings.xml
index ea99f0f..2016b7b 100644
--- a/packages/CarSystemUI/res/values-sk/strings.xml
+++ b/packages/CarSystemUI/res/values-sk/strings.xml
@@ -25,7 +25,7 @@
     <string name="car_add_user" msgid="4067337059622483269">"Pridať používateľa"</string>
     <string name="car_new_user" msgid="6637442369728092473">"Nový používateľ"</string>
     <string name="user_add_user_message_setup" msgid="1035578846007352323">"Keď pridáte nového používateľa, musí si nastaviť vlastný priestor."</string>
-    <string name="user_add_user_message_update" msgid="7061671307004867811">"Ktorýkoľvek používateľ môže aktualizovať aplikácie všetkých ostatných používateľov."</string>
+    <string name="user_add_user_message_update" msgid="7061671307004867811">"Každý používateľ môže aktualizovať aplikácie pre všetkých ostatných používateľov."</string>
     <string name="car_loading_profile" msgid="4507385037552574474">"Načítava sa"</string>
     <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Načítava sa používateľ (predchádzajúci: <xliff:g id="FROM_USER">%1$d</xliff:g>, nasledujúci: <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
 </resources>
diff --git a/packages/CarSystemUI/res/values-uz/strings.xml b/packages/CarSystemUI/res/values-uz/strings.xml
index adef2ad..15b2b7a 100644
--- a/packages/CarSystemUI/res/values-uz/strings.xml
+++ b/packages/CarSystemUI/res/values-uz/strings.xml
@@ -17,7 +17,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="hvac_min_text" msgid="8167124789068494624">"Daq."</string>
+    <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
     <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
     <string name="voice_recognition_toast" msgid="1149934534584052842">"Endi ovozni tanish Bluetooth qurilma ulanganda amalga oshadi"</string>
     <string name="car_guest" msgid="318393171202663722">"Mehmon"</string>
diff --git a/packages/CarSystemUI/res/values/config.xml b/packages/CarSystemUI/res/values/config.xml
index cf967c0..24157f9 100644
--- a/packages/CarSystemUI/res/values/config.xml
+++ b/packages/CarSystemUI/res/values/config.xml
@@ -24,12 +24,45 @@
 
     <bool name="config_enableFullscreenUserSwitcher">true</bool>
 
-    <!-- configure which system ui bars should be displayed -->
+    <!-- Configure which system bars should be displayed. -->
     <bool name="config_enableTopNavigationBar">true</bool>
     <bool name="config_enableLeftNavigationBar">false</bool>
     <bool name="config_enableRightNavigationBar">false</bool>
     <bool name="config_enableBottomNavigationBar">true</bool>
 
+    <!-- Configure the type of each system bar. Each system bar must have a unique type. -->
+    <!--    STATUS_BAR = 0-->
+    <!--    NAVIGATION_BAR = 1-->
+    <!--    STATUS_BAR_EXTRA = 2-->
+    <!--    NAVIGATION_BAR_EXTRA = 3-->
+    <integer name="config_topSystemBarType">0</integer>
+    <integer name="config_leftSystemBarType">2</integer>
+    <integer name="config_rightSystemBarType">3</integer>
+    <integer name="config_bottomSystemBarType">1</integer>
+
+    <!-- Configure the relative z-order among the system bars. When two system bars overlap (e.g.
+         if both top bar and left bar are enabled, it creates an overlapping space in the upper left
+         corner), the system bar with the higher z-order takes the overlapping space and padding is
+         applied to the other bar.-->
+    <!-- NOTE: If two overlapping system bars have the same z-order, SystemBarConfigs will throw a
+         RuntimeException, since their placing order cannot be determined. Bars that do not overlap
+         are allowed to have the same z-order. -->
+    <!-- NOTE: If the z-order of a bar is 10 or above, it will also appear on top of HUN's.    -->
+    <integer name="config_topSystemBarZOrder">1</integer>
+    <integer name="config_leftSystemBarZOrder">0</integer>
+    <integer name="config_rightSystemBarZOrder">0</integer>
+    <integer name="config_bottomSystemBarZOrder">10</integer>
+
+    <!-- If set to true, the corresponding system bar will be hidden when Keyboard (IME) appears.
+         NOTE: hideBottomSystemBarKeyboard must not be overlaid directly here. To change its value,
+         overlay config_automotiveHideNavBarForKeyboard in framework/base/core/res/res. -->
+    <bool name="config_hideTopSystemBarForKeyboard">false</bool>
+    <bool name="config_hideBottomSystemBarForKeyboard">
+        @*android:bool/config_automotiveHideNavBarForKeyboard
+    </bool>
+    <bool name="config_hideLeftSystemBarForKeyboard">false</bool>
+    <bool name="config_hideRightSystemBarForKeyboard">false</bool>
+
     <!-- Disable normal notification rendering; we handle that ourselves -->
     <bool name="config_renderNotifications">false</bool>
 
diff --git a/packages/CarSystemUI/res/values/dimens.xml b/packages/CarSystemUI/res/values/dimens.xml
index cb321cd..e8ac9e1 100644
--- a/packages/CarSystemUI/res/values/dimens.xml
+++ b/packages/CarSystemUI/res/values/dimens.xml
@@ -81,6 +81,21 @@
     <dimen name="car_keyline_2">96dp</dimen>
     <dimen name="car_keyline_3">128dp</dimen>
 
+    <!-- Height of icons in Ongoing App Ops dialog. Both App Op icon and application icon -->
+    <dimen name="ongoing_appops_dialog_icon_height">48dp</dimen>
+    <!-- Margin between text lines in Ongoing App Ops dialog -->
+    <dimen name="ongoing_appops_dialog_text_margin">15dp</dimen>
+    <!-- Padding around Ongoing App Ops dialog content -->
+    <dimen name="ongoing_appops_dialog_content_padding">24dp</dimen>
+    <!-- Margins around the Ongoing App Ops chip. In landscape, the side margins are 0 -->
+    <dimen name="ongoing_appops_chip_margin">12dp</dimen>
+    <!-- Start and End padding for Ongoing App Ops chip -->
+    <dimen name="ongoing_appops_chip_side_padding">6dp</dimen>
+    <!-- Padding between background of Ongoing App Ops chip and content -->
+    <dimen name="ongoing_appops_chip_bg_padding">4dp</dimen>
+    <!-- Radius of Ongoing App Ops chip corners -->
+    <dimen name="ongoing_appops_chip_bg_corner_radius">12dp</dimen>
+
     <!-- Car volume dimens. -->
     <dimen name="car_volume_item_icon_size">@dimen/car_primary_icon_size</dimen>
     <dimen name="car_volume_item_height">@*android:dimen/car_single_line_list_item_height</dimen>
@@ -179,6 +194,12 @@
     <dimen name="car_navigation_bar_width">760dp</dimen>
     <dimen name="car_left_navigation_bar_width">96dp</dimen>
     <dimen name="car_right_navigation_bar_width">96dp</dimen>
+    <!-- In order to change the height of the bottom nav bar, overlay navigation_bar_height in
+         frameworks/base/core/res/res instead. -->
+    <dimen name="car_bottom_navigation_bar_height">@*android:dimen/navigation_bar_height</dimen>
+    <!-- In order to change the height of the top nav bar, overlay status_bar_height in
+         frameworks/base/core/res/res instead. -->
+    <dimen name="car_top_navigation_bar_height">@*android:dimen/status_bar_height</dimen>
 
     <dimen name="car_user_switcher_container_height">420dp</dimen>
     <!-- This must be the negative of car_user_switcher_container_height for the animation. -->
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
index 34afb13..b3102e2 100644
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
+++ b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
@@ -21,8 +21,8 @@
 import com.android.systemui.car.navigationbar.CarNavigationBar;
 import com.android.systemui.car.notification.CarNotificationModule;
 import com.android.systemui.car.sideloaded.SideLoadedAppController;
-import com.android.systemui.car.statusbar.CarStatusBar;
-import com.android.systemui.car.statusbar.CarStatusBarModule;
+import com.android.systemui.car.statusbar.UnusedStatusBar;
+import com.android.systemui.car.statusbar.UnusedStatusBarModule;
 import com.android.systemui.car.voicerecognition.ConnectedDeviceVoiceRecognitionNotifier;
 import com.android.systemui.car.volume.VolumeUI;
 import com.android.systemui.car.window.OverlayWindowModule;
@@ -39,7 +39,6 @@
 import com.android.systemui.statusbar.notification.InstantAppNotifier;
 import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
 import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.tv.TvStatusBar;
 import com.android.systemui.theme.ThemeOverlayController;
 import com.android.systemui.toast.ToastUI;
 import com.android.systemui.util.leak.GarbageMonitor;
@@ -50,9 +49,9 @@
 import dagger.multibindings.IntoMap;
 
 /** Binder for car specific {@link SystemUI} modules. */
-@Module(includes = {RecentsModule.class, CarStatusBarModule.class, NotificationsModule.class,
+@Module(includes = {RecentsModule.class, NotificationsModule.class,
         BubbleModule.class, KeyguardModule.class, OverlayWindowModule.class,
-        CarNotificationModule.class})
+        CarNotificationModule.class, UnusedStatusBarModule.class})
 public abstract class CarSystemUIBinder {
     /** Inject into AuthController. */
     @Binds
@@ -155,19 +154,7 @@
     @Binds
     @IntoMap
     @ClassKey(StatusBar.class)
-    public abstract SystemUI bindsStatusBar(CarStatusBar sysui);
-
-    /** Inject into TvStatusBar. */
-    @Binds
-    @IntoMap
-    @ClassKey(TvStatusBar.class)
-    public abstract SystemUI bindsTvStatusBar(TvStatusBar sysui);
-
-    /** Inject into StatusBarGoogle. */
-    @Binds
-    @IntoMap
-    @ClassKey(CarStatusBar.class)
-    public abstract SystemUI bindsCarStatusBar(CarStatusBar sysui);
+    public abstract SystemUI bindsStatusBar(UnusedStatusBar sysui);
 
     /** Inject into VolumeUI. */
     @Binds
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java
index 59d6ed6..0e3c7f3 100644
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java
+++ b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java
@@ -28,10 +28,9 @@
 import com.android.systemui.car.CarDeviceProvisionedController;
 import com.android.systemui.car.CarDeviceProvisionedControllerImpl;
 import com.android.systemui.car.keyguard.CarKeyguardViewController;
-import com.android.systemui.car.statusbar.CarStatusBar;
-import com.android.systemui.car.statusbar.CarStatusBarKeyguardViewManager;
 import com.android.systemui.car.statusbar.DozeServiceHost;
 import com.android.systemui.car.statusbar.DummyNotificationShadeWindowController;
+import com.android.systemui.car.statusbar.UnusedStatusBar;
 import com.android.systemui.car.volume.CarVolumeDialogComponent;
 import com.android.systemui.dagger.SystemUIRootComponent;
 import com.android.systemui.dagger.qualifiers.Background;
@@ -60,13 +59,14 @@
 import com.android.systemui.statusbar.phone.ShadeController;
 import com.android.systemui.statusbar.phone.ShadeControllerImpl;
 import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
 import com.android.systemui.statusbar.policy.BatteryController;
 import com.android.systemui.statusbar.policy.BatteryControllerImpl;
 import com.android.systemui.statusbar.policy.ConfigurationController;
 import com.android.systemui.statusbar.policy.DeviceProvisionedController;
 import com.android.systemui.statusbar.policy.HeadsUpManager;
 import com.android.systemui.volume.VolumeDialogComponent;
+import com.android.systemui.wm.DisplayImeController;
+import com.android.systemui.wm.DisplaySystemBarsController;
 
 import javax.inject.Named;
 import javax.inject.Singleton;
@@ -97,6 +97,10 @@
                 groupManager, configurationController);
     }
 
+    @Binds
+    abstract DisplayImeController bindDisplayImeController(
+            DisplaySystemBarsController displaySystemBarsController);
+
     @Singleton
     @Provides
     @Named(LEAK_REPORT_EMAIL_NAME)
@@ -135,7 +139,7 @@
 
     @Binds
     @Singleton
-    public abstract QSFactory provideQSFactory(QSFactoryImpl qsFactoryImpl);
+    public abstract QSFactory bindQSFactory(QSFactoryImpl qsFactoryImpl);
 
     @Binds
     abstract DockManager bindDockManager(DockManagerImpl dockManager);
@@ -152,17 +156,10 @@
             CarSystemUIRootComponent systemUIRootComponent);
 
     @Binds
-    public abstract StatusBar bindStatusBar(CarStatusBar statusBar);
-
-    @Binds
     abstract VolumeDialogComponent bindVolumeDialogComponent(
             CarVolumeDialogComponent carVolumeDialogComponent);
 
     @Binds
-    abstract StatusBarKeyguardViewManager bindStatusBarKeyguardViewManager(
-            CarStatusBarKeyguardViewManager keyguardViewManager);
-
-    @Binds
     abstract KeyguardViewController bindKeyguardViewController(
             CarKeyguardViewController carKeyguardViewController);
 
@@ -180,4 +177,7 @@
 
     @Binds
     abstract DozeHost bindDozeHost(DozeServiceHost dozeServiceHost);
+
+    @Binds
+    abstract StatusBar bindStatusBar(UnusedStatusBar statusBar);
 }
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/CarSystemUiTest.java b/packages/CarSystemUI/src/com/android/systemui/car/CarSystemUiTest.java
new file mode 100644
index 0000000..5f593b0
--- /dev/null
+++ b/packages/CarSystemUI/src/com/android/systemui/car/CarSystemUiTest.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.car;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotates that a test class should be run as part of CarSystemUI presubmit
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Documented
+public @interface CarSystemUiTest {
+}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
index 69766cc..ec018f9 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
@@ -21,10 +21,13 @@
 import android.content.Context;
 import android.os.Bundle;
 import android.os.Handler;
+import android.os.UserHandle;
 import android.util.Log;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewRootImpl;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
 
 import androidx.annotation.VisibleForTesting;
 
@@ -61,7 +64,7 @@
 public class CarKeyguardViewController extends OverlayViewController implements
         KeyguardViewController {
     private static final String TAG = "CarKeyguardViewController";
-    private static final boolean DEBUG = true;
+    private static final boolean DEBUG = false;
 
     private final Context mContext;
     private final Handler mHandler;
@@ -75,9 +78,10 @@
     private final DismissCallbackRegistry mDismissCallbackRegistry;
     private final ViewMediatorCallback mViewMediatorCallback;
     private final CarNavigationBarController mCarNavigationBarController;
+    private final InputMethodManager mInputMethodManager;
     // Needed to instantiate mBouncer.
-    private final KeyguardBouncer.BouncerExpansionCallback
-            mExpansionCallback = new KeyguardBouncer.BouncerExpansionCallback() {
+    private final KeyguardBouncer.BouncerExpansionCallback mExpansionCallback =
+            new KeyguardBouncer.BouncerExpansionCallback() {
                 @Override
                 public void onFullyShown() {
                 }
@@ -96,7 +100,8 @@
             };
     private final CarUserManager.UserLifecycleListener mUserLifecycleListener = (e) -> {
         if (e.getEventType() == CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING) {
-            revealKeyguardIfBouncerPrepared();
+            UserHandle currentUser = e.getUserHandle();
+            revealKeyguardIfBouncerPrepared(currentUser);
         }
     };
 
@@ -136,11 +141,18 @@
         mDismissCallbackRegistry = dismissCallbackRegistry;
         mViewMediatorCallback = viewMediatorCallback;
         mCarNavigationBarController = carNavigationBarController;
+        // TODO(b/169280588): Inject InputMethodManager instead.
+        mInputMethodManager = mContext.getSystemService(InputMethodManager.class);
 
         registerUserSwitchedListener();
     }
 
     @Override
+    protected boolean shouldShowNavigationBarInsets() {
+        return true;
+    }
+
+    @Override
     public void onFinishInflate() {
         mBouncer = SystemUIFactory.getInstance().createKeyguardBouncer(mContext,
                 mViewMediatorCallback, mLockPatternUtils,
@@ -172,7 +184,6 @@
         mKeyguardStateController.notifyKeyguardState(mShowing, /* occluded= */ false);
         mCarNavigationBarController.showAllKeyguardButtons(/* isSetUp= */ true);
         start();
-        getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ true);
         reset(/* hideBouncerWhenShowing= */ false);
         notifyKeyguardUpdateMonitor();
     }
@@ -187,7 +198,6 @@
         mBouncer.hide(/* destroyView= */ true);
         mCarNavigationBarController.hideAllKeyguardButtons(/* isSetUp= */ true);
         stop();
-        getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ false);
         mKeyguardStateController.notifyKeyguardDoneFading();
         mHandler.post(mViewMediatorCallback::keyguardGone);
         notifyKeyguardUpdateMonitor();
@@ -232,7 +242,6 @@
     public void onCancelClicked() {
         if (mBouncer == null) return;
 
-        getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ false);
         getOverlayViewGlobalStateController().setWindowNeedsInput(/* needsInput= */ false);
 
         mBouncer.hide(/* destroyView= */ true);
@@ -361,9 +370,9 @@
     }
 
     /**
-     *  Hides Keyguard so that the transitioning Bouncer can be hidden until it is prepared. To be
-     *  called by {@link com.android.systemui.car.userswitcher.FullscreenUserSwitcherViewMediator}
-     *  when a new user is selected.
+     * Hides Keyguard so that the transitioning Bouncer can be hidden until it is prepared. To be
+     * called by {@link com.android.systemui.car.userswitcher.FullscreenUserSwitcherViewMediator}
+     * when a new user is selected.
      */
     public void hideKeyguardToPrepareBouncer() {
         getLayout().setVisibility(View.INVISIBLE);
@@ -374,29 +383,41 @@
         mBouncer = keyguardBouncer;
     }
 
-    private void revealKeyguardIfBouncerPrepared() {
+    private void revealKeyguardIfBouncerPrepared(UserHandle currentUser) {
         int reattemptDelayMillis = 50;
         Runnable revealKeyguard = () -> {
             if (mBouncer == null) {
                 if (DEBUG) {
                     Log.d(TAG, "revealKeyguardIfBouncerPrepared: revealKeyguard request is ignored "
-                                    + "since the Bouncer has not been initialized yet.");
+                            + "since the Bouncer has not been initialized yet.");
                 }
                 return;
             }
             if (!mBouncer.inTransit() || !mBouncer.isSecure()) {
                 getLayout().setVisibility(View.VISIBLE);
+                updateCurrentUserForPasswordEntry(currentUser);
             } else {
                 if (DEBUG) {
                     Log.d(TAG, "revealKeyguardIfBouncerPrepared: Bouncer is not prepared "
                             + "yet so reattempting after " + reattemptDelayMillis + "ms.");
                 }
-                mHandler.postDelayed(this::revealKeyguardIfBouncerPrepared, reattemptDelayMillis);
+                mHandler.postDelayed(() -> revealKeyguardIfBouncerPrepared(currentUser),
+                        reattemptDelayMillis);
             }
         };
         mHandler.post(revealKeyguard);
     }
 
+    private void updateCurrentUserForPasswordEntry(UserHandle currentUser) {
+        EditText passwordEntry = getLayout().findViewById(R.id.passwordEntry);
+        if (passwordEntry != null) {
+            mHandler.post(() -> {
+                mInputMethodManager.restartInput(passwordEntry);
+                passwordEntry.setTextOperationUser(currentUser);
+            });
+        }
+    }
+
     private void notifyKeyguardUpdateMonitor() {
         mKeyguardUpdateMonitor.onKeyguardVisibilityChanged(mShowing);
         if (mBouncer != null) {
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java
index 37dfce4..b6d251f 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java
@@ -16,8 +16,6 @@
 
 package com.android.systemui.car.navigationbar;
 
-import static android.view.InsetsState.ITYPE_CLIMATE_BAR;
-import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_STATUS_BAR;
 import static android.view.InsetsState.containsType;
@@ -28,13 +26,11 @@
 
 import android.content.Context;
 import android.content.res.Resources;
-import android.graphics.PixelFormat;
 import android.inputmethodservice.InputMethodService;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.view.Display;
-import android.view.Gravity;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.WindowInsetsController;
@@ -45,7 +41,6 @@
 import com.android.internal.statusbar.IStatusBarService;
 import com.android.internal.statusbar.RegisterStatusBarResult;
 import com.android.internal.view.AppearanceRegion;
-import com.android.systemui.R;
 import com.android.systemui.SystemUI;
 import com.android.systemui.car.CarDeviceProvisionedController;
 import com.android.systemui.car.CarDeviceProvisionedListener;
@@ -74,7 +69,6 @@
 
 /** Navigation bars customized for the automotive use case. */
 public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks {
-
     private final Resources mResources;
     private final CarNavigationBarController mCarNavigationBarController;
     private final SysuiDarkIconDispatcher mStatusBarIconController;
@@ -91,12 +85,17 @@
     private final Lazy<StatusBarIconController> mIconControllerLazy;
 
     private final int mDisplayId;
+    private final SystemBarConfigs mSystemBarConfigs;
 
     private StatusBarSignalPolicy mSignalPolicy;
     private ActivityManagerWrapper mActivityManagerWrapper;
 
     // If the nav bar should be hidden when the soft keyboard is visible.
-    private boolean mHideNavBarForKeyboard;
+    private boolean mHideTopBarForKeyboard;
+    private boolean mHideLeftBarForKeyboard;
+    private boolean mHideRightBarForKeyboard;
+    private boolean mHideBottomBarForKeyboard;
+
     private boolean mBottomNavBarVisible;
 
     // Nav bar views.
@@ -139,7 +138,8 @@
             IStatusBarService barService,
             Lazy<KeyguardStateController> keyguardStateControllerLazy,
             Lazy<PhoneStatusBarPolicy> iconPolicyLazy,
-            Lazy<StatusBarIconController> iconControllerLazy
+            Lazy<StatusBarIconController> iconControllerLazy,
+            SystemBarConfigs systemBarConfigs
     ) {
         super(context);
         mResources = resources;
@@ -156,6 +156,7 @@
         mKeyguardStateControllerLazy = keyguardStateControllerLazy;
         mIconPolicyLazy = iconPolicyLazy;
         mIconControllerLazy = iconControllerLazy;
+        mSystemBarConfigs = systemBarConfigs;
 
         mDisplayId = context.getDisplayId();
     }
@@ -163,8 +164,13 @@
     @Override
     public void start() {
         // Set initial state.
-        mHideNavBarForKeyboard = mResources.getBoolean(
-                com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard);
+        mHideTopBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
+        mHideBottomBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(
+                SystemBarConfigs.BOTTOM);
+        mHideLeftBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.LEFT);
+        mHideRightBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(
+                SystemBarConfigs.RIGHT);
+
         mBottomNavBarVisible = false;
 
         // Connect into the status bar manager service
@@ -342,100 +348,63 @@
     private void buildNavBarContent() {
         mTopNavigationBarView = mCarNavigationBarController.getTopBar(isDeviceSetupForUser());
         if (mTopNavigationBarView != null) {
+            mSystemBarConfigs.insetSystemBar(SystemBarConfigs.TOP, mTopNavigationBarView);
             mTopNavigationBarWindow.addView(mTopNavigationBarView);
         }
 
         mBottomNavigationBarView = mCarNavigationBarController.getBottomBar(isDeviceSetupForUser());
         if (mBottomNavigationBarView != null) {
+            mSystemBarConfigs.insetSystemBar(SystemBarConfigs.BOTTOM, mBottomNavigationBarView);
             mBottomNavigationBarWindow.addView(mBottomNavigationBarView);
         }
 
         mLeftNavigationBarView = mCarNavigationBarController.getLeftBar(isDeviceSetupForUser());
         if (mLeftNavigationBarView != null) {
+            mSystemBarConfigs.insetSystemBar(SystemBarConfigs.LEFT, mLeftNavigationBarView);
             mLeftNavigationBarWindow.addView(mLeftNavigationBarView);
         }
 
         mRightNavigationBarView = mCarNavigationBarController.getRightBar(isDeviceSetupForUser());
         if (mRightNavigationBarView != null) {
+            mSystemBarConfigs.insetSystemBar(SystemBarConfigs.RIGHT, mRightNavigationBarView);
             mRightNavigationBarWindow.addView(mRightNavigationBarView);
         }
     }
 
     private void attachNavBarWindows() {
-        if (mTopNavigationBarWindow != null) {
-            int height = mResources.getDimensionPixelSize(
-                    com.android.internal.R.dimen.status_bar_height);
-            WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
-                    ViewGroup.LayoutParams.MATCH_PARENT,
-                    height,
-                    WindowManager.LayoutParams.TYPE_STATUS_BAR,
-                    WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-                            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
-                            | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
-                            | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
-                    PixelFormat.TRANSLUCENT);
-            lp.setTitle("TopCarNavigationBar");
-            lp.windowAnimations = 0;
-            lp.gravity = Gravity.TOP;
-            mWindowManager.addView(mTopNavigationBarWindow, lp);
-        }
+        mSystemBarConfigs.getSystemBarSidesByZOrder().forEach(this::attachNavBarBySide);
+    }
 
-        if (mBottomNavigationBarWindow != null && !mBottomNavBarVisible) {
-            mBottomNavBarVisible = true;
-            int height = mResources.getDimensionPixelSize(
-                    com.android.internal.R.dimen.navigation_bar_height);
+    private void attachNavBarBySide(int side) {
+        switch(side) {
+            case SystemBarConfigs.TOP:
+                if (mTopNavigationBarWindow != null) {
+                    mWindowManager.addView(mTopNavigationBarWindow,
+                            mSystemBarConfigs.getLayoutParamsBySide(SystemBarConfigs.TOP));
+                }
+                break;
+            case SystemBarConfigs.BOTTOM:
+                if (mBottomNavigationBarWindow != null && !mBottomNavBarVisible) {
+                    mBottomNavBarVisible = true;
 
-            WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
-                    ViewGroup.LayoutParams.MATCH_PARENT,
-                    height,
-                    WindowManager.LayoutParams.TYPE_NAVIGATION_BAR,
-                    WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-                            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
-                            | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
-                            | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
-                    PixelFormat.TRANSLUCENT);
-            lp.setTitle("BottomCarNavigationBar");
-            lp.windowAnimations = 0;
-            lp.gravity = Gravity.BOTTOM;
-            mWindowManager.addView(mBottomNavigationBarWindow, lp);
-        }
-
-        if (mLeftNavigationBarWindow != null) {
-            int width = mResources.getDimensionPixelSize(
-                    R.dimen.car_left_navigation_bar_width);
-            WindowManager.LayoutParams leftlp = new WindowManager.LayoutParams(
-                    width, ViewGroup.LayoutParams.MATCH_PARENT,
-                    WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
-                    WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-                            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
-                            | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
-                            | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
-                    PixelFormat.TRANSLUCENT);
-            leftlp.setTitle("LeftCarNavigationBar");
-            leftlp.providesInsetsTypes = new int[]{ITYPE_CLIMATE_BAR};
-            leftlp.setFitInsetsTypes(0);
-            leftlp.windowAnimations = 0;
-            leftlp.gravity = Gravity.LEFT;
-            mWindowManager.addView(mLeftNavigationBarWindow, leftlp);
-        }
-
-        if (mRightNavigationBarWindow != null) {
-            int width = mResources.getDimensionPixelSize(
-                    R.dimen.car_right_navigation_bar_width);
-            WindowManager.LayoutParams rightlp = new WindowManager.LayoutParams(
-                    width, ViewGroup.LayoutParams.MATCH_PARENT,
-                    WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
-                    WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-                            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
-                            | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
-                            | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
-                    PixelFormat.TRANSLUCENT);
-            rightlp.setTitle("RightCarNavigationBar");
-            rightlp.providesInsetsTypes = new int[]{ITYPE_EXTRA_NAVIGATION_BAR};
-            rightlp.setFitInsetsTypes(0);
-            rightlp.windowAnimations = 0;
-            rightlp.gravity = Gravity.RIGHT;
-            mWindowManager.addView(mRightNavigationBarWindow, rightlp);
+                    mWindowManager.addView(mBottomNavigationBarWindow,
+                            mSystemBarConfigs.getLayoutParamsBySide(SystemBarConfigs.BOTTOM));
+                }
+                break;
+            case SystemBarConfigs.LEFT:
+                if (mLeftNavigationBarWindow != null) {
+                    mWindowManager.addView(mLeftNavigationBarWindow,
+                            mSystemBarConfigs.getLayoutParamsBySide(SystemBarConfigs.LEFT));
+                }
+                break;
+            case SystemBarConfigs.RIGHT:
+                if (mRightNavigationBarWindow != null) {
+                    mWindowManager.addView(mRightNavigationBarWindow,
+                            mSystemBarConfigs.getLayoutParamsBySide(SystemBarConfigs.RIGHT));
+                }
+                break;
+            default:
+                return;
         }
     }
 
@@ -447,17 +416,30 @@
     @Override
     public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
             boolean showImeSwitcher) {
-        if (!mHideNavBarForKeyboard) {
-            return;
-        }
-
         if (mContext.getDisplayId() != displayId) {
             return;
         }
 
         boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
-        mCarNavigationBarController.setBottomWindowVisibility(
-                isKeyboardVisible ? View.GONE : View.VISIBLE);
+
+        if (mHideTopBarForKeyboard) {
+            mCarNavigationBarController.setTopWindowVisibility(
+                    isKeyboardVisible ? View.GONE : View.VISIBLE);
+        }
+
+        if (mHideBottomBarForKeyboard) {
+            mCarNavigationBarController.setBottomWindowVisibility(
+                    isKeyboardVisible ? View.GONE : View.VISIBLE);
+        }
+
+        if (mHideLeftBarForKeyboard) {
+            mCarNavigationBarController.setLeftWindowVisibility(
+                    isKeyboardVisible ? View.GONE : View.VISIBLE);
+        }
+        if (mHideRightBarForKeyboard) {
+            mCarNavigationBarController.setRightWindowVisibility(
+                    isKeyboardVisible ? View.GONE : View.VISIBLE);
+        }
     }
 
     @Override
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarController.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarController.java
index ca780ae..e522d19 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarController.java
@@ -22,7 +22,6 @@
 
 import androidx.annotation.Nullable;
 
-import com.android.systemui.R;
 import com.android.systemui.car.hvac.HvacController;
 
 import javax.inject.Inject;
@@ -61,7 +60,8 @@
             NavigationBarViewFactory navigationBarViewFactory,
             ButtonSelectionStateController buttonSelectionStateController,
             Lazy<HvacController> hvacControllerLazy,
-            ButtonRoleHolderController buttonRoleHolderController) {
+            ButtonRoleHolderController buttonRoleHolderController,
+            SystemBarConfigs systemBarConfigs) {
         mContext = context;
         mNavigationBarViewFactory = navigationBarViewFactory;
         mButtonSelectionStateController = buttonSelectionStateController;
@@ -69,19 +69,17 @@
         mButtonRoleHolderController = buttonRoleHolderController;
 
         // Read configuration.
-        mShowTop = mContext.getResources().getBoolean(R.bool.config_enableTopNavigationBar);
-        mShowBottom = mContext.getResources().getBoolean(R.bool.config_enableBottomNavigationBar);
-        mShowLeft = mContext.getResources().getBoolean(R.bool.config_enableLeftNavigationBar);
-        mShowRight = mContext.getResources().getBoolean(R.bool.config_enableRightNavigationBar);
+        mShowTop = systemBarConfigs.getEnabledStatusBySide(SystemBarConfigs.TOP);
+        mShowBottom = systemBarConfigs.getEnabledStatusBySide(SystemBarConfigs.BOTTOM);
+        mShowLeft = systemBarConfigs.getEnabledStatusBySide(SystemBarConfigs.LEFT);
+        mShowRight = systemBarConfigs.getEnabledStatusBySide(SystemBarConfigs.RIGHT);
     }
 
     /**
      * Hides all system bars.
      */
     public void hideBars() {
-        if (mTopView != null) {
-            mTopView.setVisibility(View.GONE);
-        }
+        setTopWindowVisibility(View.GONE);
         setBottomWindowVisibility(View.GONE);
         setLeftWindowVisibility(View.GONE);
         setRightWindowVisibility(View.GONE);
@@ -91,9 +89,7 @@
      * Shows all system bars.
      */
     public void showBars() {
-        if (mTopView != null) {
-            mTopView.setVisibility(View.VISIBLE);
-        }
+        setTopWindowVisibility(View.VISIBLE);
         setBottomWindowVisibility(View.VISIBLE);
         setLeftWindowVisibility(View.VISIBLE);
         setRightWindowVisibility(View.VISIBLE);
@@ -135,6 +131,11 @@
         return mShowRight ? mNavigationBarViewFactory.getRightWindow() : null;
     }
 
+    /** Toggles the top nav bar visibility. */
+    public boolean setTopWindowVisibility(@View.Visibility int visibility) {
+        return setWindowVisibility(getTopWindow(), visibility);
+    }
+
     /** Toggles the bottom nav bar visibility. */
     public boolean setBottomWindowVisibility(@View.Visibility int visibility) {
         return setWindowVisibility(getBottomWindow(), visibility);
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarView.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarView.java
index 029d4c7..ab401bb 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarView.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarView.java
@@ -20,7 +20,6 @@
 import android.util.AttributeSet;
 import android.view.MotionEvent;
 import android.view.View;
-import android.view.WindowInsets;
 import android.widget.LinearLayout;
 
 import com.android.systemui.Dependency;
@@ -77,11 +76,6 @@
         setFocusable(false);
     }
 
-    @Override
-    public WindowInsets onApplyWindowInsets(WindowInsets windowInsets) {
-        return windowInsets;
-    }
-
     // Used to forward touch events even if the touch was initiated from a child component
     @Override
     public boolean onInterceptTouchEvent(MotionEvent ev) {
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/NavigationBarViewFactory.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/NavigationBarViewFactory.java
index d60bc41..adf8d4d 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/NavigationBarViewFactory.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/NavigationBarViewFactory.java
@@ -148,10 +148,9 @@
         CarNavigationBarView view = (CarNavigationBarView) View.inflate(mContext, barLayout,
                 /* root= */ null);
 
-        // Include a FocusParkingView at the end. The rotary controller "parks" the focus here when
-        // the user navigates to another window. This is also used to prevent wrap-around which is
-        // why it must be first or last in Tab order.
-        view.addView(new FocusParkingView(mContext));
+        // Include a FocusParkingView at the beginning. The rotary controller "parks" the focus here
+        // when the user navigates to another window. This is also used to prevent wrap-around.
+        view.addView(new FocusParkingView(mContext), 0);
 
         mCachedViewMap.put(type, view);
         return mCachedViewMap.get(type);
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java
new file mode 100644
index 0000000..2efa2b3d
--- /dev/null
+++ b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java
@@ -0,0 +1,458 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.car.navigationbar;
+
+import android.annotation.IntDef;
+import android.content.res.Resources;
+import android.graphics.PixelFormat;
+import android.util.ArrayMap;
+import android.util.ArraySet;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.InsetsState;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.systemui.R;
+import com.android.systemui.car.notification.BottomNotificationPanelViewMediator;
+import com.android.systemui.car.notification.TopNotificationPanelViewMediator;
+import com.android.systemui.dagger.qualifiers.Main;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+/**
+ * Reads configs for system bars for each side (TOP, BOTTOM, LEFT, and RIGHT) and returns the
+ * corresponding {@link android.view.WindowManager.LayoutParams} per the configuration.
+ */
+@Singleton
+public class SystemBarConfigs {
+
+    private static final String TAG = SystemBarConfigs.class.getSimpleName();
+    // The z-order from which system bars will start to appear on top of HUN's.
+    private static final int HUN_ZORDER = 10;
+
+    @IntDef(value = {TOP, BOTTOM, LEFT, RIGHT})
+    @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
+    private @interface SystemBarSide {
+    }
+
+    public static final int TOP = 0;
+    public static final int BOTTOM = 1;
+    public static final int LEFT = 2;
+    public static final int RIGHT = 3;
+
+    /*
+        NOTE: The elements' order in the map below must be preserved as-is since the correct
+        corresponding values are obtained by the index.
+     */
+    private static final int[] BAR_TYPE_MAP = {
+            InsetsState.ITYPE_STATUS_BAR,
+            InsetsState.ITYPE_NAVIGATION_BAR,
+            InsetsState.ITYPE_CLIMATE_BAR,
+            InsetsState.ITYPE_EXTRA_NAVIGATION_BAR
+    };
+
+    private static final Map<@SystemBarSide Integer, Integer> BAR_GRAVITY_MAP = new ArrayMap<>();
+    private static final Map<@SystemBarSide Integer, String> BAR_TITLE_MAP = new ArrayMap<>();
+    private static final Map<@SystemBarSide Integer, Integer> BAR_GESTURE_MAP = new ArrayMap<>();
+
+    private final Resources mResources;
+    private final Map<@SystemBarSide Integer, SystemBarConfig> mSystemBarConfigMap =
+            new ArrayMap<>();
+    private final List<@SystemBarSide Integer> mSystemBarSidesByZOrder = new ArrayList<>();
+
+    private boolean mTopNavBarEnabled;
+    private boolean mBottomNavBarEnabled;
+    private boolean mLeftNavBarEnabled;
+    private boolean mRightNavBarEnabled;
+
+    @Inject
+    public SystemBarConfigs(@Main Resources resources) {
+        mResources = resources;
+
+        populateMaps();
+        readConfigs();
+
+        checkEnabledBarsHaveUniqueBarTypes();
+        checkSystemBarEnabledForNotificationPanel();
+        checkHideBottomBarForKeyboardConfigSync();
+
+        setInsetPaddingsForOverlappingCorners();
+        sortSystemBarSidesByZOrder();
+    }
+
+    protected WindowManager.LayoutParams getLayoutParamsBySide(@SystemBarSide int side) {
+        return mSystemBarConfigMap.get(side) != null
+                ? mSystemBarConfigMap.get(side).getLayoutParams() : null;
+    }
+
+    protected boolean getEnabledStatusBySide(@SystemBarSide int side) {
+        switch (side) {
+            case TOP:
+                return mTopNavBarEnabled;
+            case BOTTOM:
+                return mBottomNavBarEnabled;
+            case LEFT:
+                return mLeftNavBarEnabled;
+            case RIGHT:
+                return mRightNavBarEnabled;
+            default:
+                return false;
+        }
+    }
+
+    protected boolean getHideForKeyboardBySide(@SystemBarSide int side) {
+        return mSystemBarConfigMap.get(side) != null
+                && mSystemBarConfigMap.get(side).getHideForKeyboard();
+    }
+
+    protected void insetSystemBar(@SystemBarSide int side, CarNavigationBarView view) {
+        int[] paddings = mSystemBarConfigMap.get(side).getPaddings();
+        view.setPadding(paddings[2], paddings[0], paddings[3], paddings[1]);
+    }
+
+    protected List<Integer> getSystemBarSidesByZOrder() {
+        return mSystemBarSidesByZOrder;
+    }
+
+    @VisibleForTesting
+    protected static int getHunZOrder() {
+        return HUN_ZORDER;
+    }
+
+    private static void populateMaps() {
+        BAR_GRAVITY_MAP.put(TOP, Gravity.TOP);
+        BAR_GRAVITY_MAP.put(BOTTOM, Gravity.BOTTOM);
+        BAR_GRAVITY_MAP.put(LEFT, Gravity.LEFT);
+        BAR_GRAVITY_MAP.put(RIGHT, Gravity.RIGHT);
+
+        BAR_TITLE_MAP.put(TOP, "TopCarSystemBar");
+        BAR_TITLE_MAP.put(BOTTOM, "BottomCarSystemBar");
+        BAR_TITLE_MAP.put(LEFT, "LeftCarSystemBar");
+        BAR_TITLE_MAP.put(RIGHT, "RightCarSystemBar");
+
+        BAR_GESTURE_MAP.put(TOP, InsetsState.ITYPE_TOP_MANDATORY_GESTURES);
+        BAR_GESTURE_MAP.put(BOTTOM, InsetsState.ITYPE_BOTTOM_MANDATORY_GESTURES);
+        BAR_GESTURE_MAP.put(LEFT, InsetsState.ITYPE_LEFT_MANDATORY_GESTURES);
+        BAR_GESTURE_MAP.put(RIGHT, InsetsState.ITYPE_RIGHT_MANDATORY_GESTURES);
+    }
+
+    private void readConfigs() {
+        mTopNavBarEnabled = mResources.getBoolean(R.bool.config_enableTopNavigationBar);
+        mBottomNavBarEnabled = mResources.getBoolean(R.bool.config_enableBottomNavigationBar);
+        mLeftNavBarEnabled = mResources.getBoolean(R.bool.config_enableLeftNavigationBar);
+        mRightNavBarEnabled = mResources.getBoolean(R.bool.config_enableRightNavigationBar);
+
+        if (mTopNavBarEnabled) {
+            SystemBarConfig topBarConfig =
+                    new SystemBarConfigBuilder()
+                            .setSide(TOP)
+                            .setGirth(mResources.getDimensionPixelSize(
+                                    R.dimen.car_top_navigation_bar_height))
+                            .setBarType(mResources.getInteger(R.integer.config_topSystemBarType))
+                            .setZOrder(mResources.getInteger(R.integer.config_topSystemBarZOrder))
+                            .setHideForKeyboard(mResources.getBoolean(
+                                    R.bool.config_hideTopSystemBarForKeyboard))
+                            .build();
+            mSystemBarConfigMap.put(TOP, topBarConfig);
+        }
+
+        if (mBottomNavBarEnabled) {
+            SystemBarConfig bottomBarConfig =
+                    new SystemBarConfigBuilder()
+                            .setSide(BOTTOM)
+                            .setGirth(mResources.getDimensionPixelSize(
+                                    R.dimen.car_bottom_navigation_bar_height))
+                            .setBarType(mResources.getInteger(R.integer.config_bottomSystemBarType))
+                            .setZOrder(
+                                    mResources.getInteger(R.integer.config_bottomSystemBarZOrder))
+                            .setHideForKeyboard(mResources.getBoolean(
+                                    R.bool.config_hideBottomSystemBarForKeyboard))
+                            .build();
+            mSystemBarConfigMap.put(BOTTOM, bottomBarConfig);
+        }
+
+        if (mLeftNavBarEnabled) {
+            SystemBarConfig leftBarConfig =
+                    new SystemBarConfigBuilder()
+                            .setSide(LEFT)
+                            .setGirth(mResources.getDimensionPixelSize(
+                                    R.dimen.car_left_navigation_bar_width))
+                            .setBarType(mResources.getInteger(R.integer.config_leftSystemBarType))
+                            .setZOrder(mResources.getInteger(R.integer.config_leftSystemBarZOrder))
+                            .setHideForKeyboard(mResources.getBoolean(
+                                    R.bool.config_hideLeftSystemBarForKeyboard))
+                            .build();
+            mSystemBarConfigMap.put(LEFT, leftBarConfig);
+        }
+
+        if (mRightNavBarEnabled) {
+            SystemBarConfig rightBarConfig =
+                    new SystemBarConfigBuilder()
+                            .setSide(RIGHT)
+                            .setGirth(mResources.getDimensionPixelSize(
+                                    R.dimen.car_right_navigation_bar_width))
+                            .setBarType(mResources.getInteger(R.integer.config_rightSystemBarType))
+                            .setZOrder(mResources.getInteger(R.integer.config_rightSystemBarZOrder))
+                            .setHideForKeyboard(mResources.getBoolean(
+                                    R.bool.config_hideRightSystemBarForKeyboard))
+                            .build();
+            mSystemBarConfigMap.put(RIGHT, rightBarConfig);
+        }
+    }
+
+    private void checkEnabledBarsHaveUniqueBarTypes() throws RuntimeException {
+        Set<Integer> barTypesUsed = new ArraySet<>();
+        int enabledNavBarCount = mSystemBarConfigMap.size();
+
+        for (SystemBarConfig systemBarConfig : mSystemBarConfigMap.values()) {
+            barTypesUsed.add(systemBarConfig.getBarType());
+        }
+
+        // The number of bar types used cannot be fewer than that of enabled system bars.
+        if (barTypesUsed.size() < enabledNavBarCount) {
+            throw new RuntimeException("Each enabled system bar must have a unique bar type. Check "
+                    + "the configuration in config.xml");
+        }
+    }
+
+    private void checkSystemBarEnabledForNotificationPanel() throws RuntimeException {
+
+        String notificationPanelMediatorName =
+                mResources.getString(R.string.config_notificationPanelViewMediator);
+        if (notificationPanelMediatorName == null) {
+            return;
+        }
+
+        Class<?> notificationPanelMediatorUsed = null;
+        try {
+            notificationPanelMediatorUsed = Class.forName(notificationPanelMediatorName);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+        }
+
+        if (!mTopNavBarEnabled && TopNotificationPanelViewMediator.class.isAssignableFrom(
+                notificationPanelMediatorUsed)) {
+            throw new RuntimeException(
+                    "Top System Bar must be enabled to use " + notificationPanelMediatorName);
+        }
+
+        if (!mBottomNavBarEnabled && BottomNotificationPanelViewMediator.class.isAssignableFrom(
+                notificationPanelMediatorUsed)) {
+            throw new RuntimeException("Bottom System Bar must be enabled to use "
+                    + notificationPanelMediatorName);
+        }
+    }
+
+    private void checkHideBottomBarForKeyboardConfigSync() throws RuntimeException {
+        if (mBottomNavBarEnabled) {
+            boolean actual = mResources.getBoolean(R.bool.config_hideBottomSystemBarForKeyboard);
+            boolean expected = mResources.getBoolean(
+                    com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard);
+
+            if (actual != expected) {
+                throw new RuntimeException("config_hideBottomSystemBarForKeyboard must not be "
+                        + "overlaid directly and should always refer to"
+                        + "config_automotiveHideNavBarForKeyboard. However, their values "
+                        + "currently do not sync. Set config_hideBottomSystemBarForKeyguard to "
+                        + "@*android:bool/config_automotiveHideNavBarForKeyboard. To change its "
+                        + "value, overlay config_automotiveHideNavBarForKeyboard in "
+                        + "framework/base/core/res/res.");
+            }
+        }
+    }
+
+    private void setInsetPaddingsForOverlappingCorners() {
+        setInsetPaddingForOverlappingCorner(TOP, LEFT);
+        setInsetPaddingForOverlappingCorner(TOP, RIGHT);
+        setInsetPaddingForOverlappingCorner(BOTTOM, LEFT);
+        setInsetPaddingForOverlappingCorner(BOTTOM, RIGHT);
+    }
+
+    private void setInsetPaddingForOverlappingCorner(@SystemBarSide int horizontalSide,
+            @SystemBarSide int verticalSide) {
+
+        if (isVerticalBar(horizontalSide) || isHorizontalBar(verticalSide)) {
+            Log.w(TAG, "configureBarPaddings: Returning immediately since the horizontal and "
+                    + "vertical sides were not provided correctly.");
+            return;
+        }
+
+        SystemBarConfig horizontalBarConfig = mSystemBarConfigMap.get(horizontalSide);
+        SystemBarConfig verticalBarConfig = mSystemBarConfigMap.get(verticalSide);
+
+        if (verticalBarConfig != null && horizontalBarConfig != null) {
+            int horizontalBarZOrder = horizontalBarConfig.getZOrder();
+            int horizontalBarGirth = horizontalBarConfig.getGirth();
+            int verticalBarZOrder = verticalBarConfig.getZOrder();
+            int verticalBarGirth = verticalBarConfig.getGirth();
+
+            if (horizontalBarZOrder > verticalBarZOrder) {
+                verticalBarConfig.setPaddingBySide(horizontalSide, horizontalBarGirth);
+            } else if (horizontalBarZOrder < verticalBarZOrder) {
+                horizontalBarConfig.setPaddingBySide(verticalSide, verticalBarGirth);
+            } else {
+                throw new RuntimeException(
+                        BAR_TITLE_MAP.get(horizontalSide) + " " + BAR_TITLE_MAP.get(verticalSide)
+                                + " have the same Z-Order, and so their placing order cannot be "
+                                + "determined. Determine which bar should be placed on top of the "
+                                + "other bar and change the Z-order in config.xml accordingly."
+                );
+            }
+        }
+    }
+
+    private void sortSystemBarSidesByZOrder() {
+        List<SystemBarConfig> systemBarsByZOrder = new ArrayList<>(mSystemBarConfigMap.values());
+
+        systemBarsByZOrder.sort(new Comparator<SystemBarConfig>() {
+            @Override
+            public int compare(SystemBarConfig o1, SystemBarConfig o2) {
+                return o1.getZOrder() - o2.getZOrder();
+            }
+        });
+
+        systemBarsByZOrder.forEach(systemBarConfig -> {
+            mSystemBarSidesByZOrder.add(systemBarConfig.getSide());
+        });
+    }
+
+    private static boolean isHorizontalBar(@SystemBarSide int side) {
+        return side == TOP || side == BOTTOM;
+    }
+
+    private static boolean isVerticalBar(@SystemBarSide int side) {
+        return side == LEFT || side == RIGHT;
+    }
+
+    private static final class SystemBarConfig {
+        private final int mSide;
+        private final int mBarType;
+        private final int mGirth;
+        private final int mZOrder;
+        private final boolean mHideForKeyboard;
+
+        private int[] mPaddings = new int[]{0, 0, 0, 0};
+
+        private SystemBarConfig(@SystemBarSide int side, int barType, int girth, int zOrder,
+                boolean hideForKeyboard) {
+            mSide = side;
+            mBarType = barType;
+            mGirth = girth;
+            mZOrder = zOrder;
+            mHideForKeyboard = hideForKeyboard;
+        }
+
+        private int getSide() {
+            return mSide;
+        }
+
+        private int getBarType() {
+            return mBarType;
+        }
+
+        private int getGirth() {
+            return mGirth;
+        }
+
+        private int getZOrder() {
+            return mZOrder;
+        }
+
+        private boolean getHideForKeyboard() {
+            return mHideForKeyboard;
+        }
+
+        private int[] getPaddings() {
+            return mPaddings;
+        }
+
+        private WindowManager.LayoutParams getLayoutParams() {
+            WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                    isHorizontalBar(mSide) ? ViewGroup.LayoutParams.MATCH_PARENT : mGirth,
+                    isHorizontalBar(mSide) ? mGirth : ViewGroup.LayoutParams.MATCH_PARENT,
+                    mapZOrderToBarType(mZOrder),
+                    WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+                            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
+                            | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
+                            | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
+                    PixelFormat.TRANSLUCENT);
+            lp.setTitle(BAR_TITLE_MAP.get(mSide));
+            lp.providesInsetsTypes = new int[]{BAR_TYPE_MAP[mBarType], BAR_GESTURE_MAP.get(mSide)};
+            lp.setFitInsetsTypes(0);
+            lp.windowAnimations = 0;
+            lp.gravity = BAR_GRAVITY_MAP.get(mSide);
+            return lp;
+        }
+
+        private int mapZOrderToBarType(int zOrder) {
+            return zOrder >= HUN_ZORDER ? WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL
+                    : WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL;
+        }
+
+        private void setPaddingBySide(@SystemBarSide int side, int padding) {
+            mPaddings[side] = padding;
+        }
+    }
+
+    private static final class SystemBarConfigBuilder {
+        private int mSide;
+        private int mBarType;
+        private int mGirth;
+        private int mZOrder;
+        private boolean mHideForKeyboard;
+
+        private SystemBarConfigBuilder setSide(@SystemBarSide int side) {
+            mSide = side;
+            return this;
+        }
+
+        private SystemBarConfigBuilder setBarType(int type) {
+            mBarType = type;
+            return this;
+        }
+
+        private SystemBarConfigBuilder setGirth(int girth) {
+            mGirth = girth;
+            return this;
+        }
+
+        private SystemBarConfigBuilder setZOrder(int zOrder) {
+            mZOrder = zOrder;
+            return this;
+        }
+
+        private SystemBarConfigBuilder setHideForKeyboard(boolean hide) {
+            mHideForKeyboard = hide;
+            return this;
+        }
+
+        private SystemBarConfig build() {
+            return new SystemBarConfig(mSide, mBarType, mGirth, mZOrder, mHideForKeyboard);
+        }
+    }
+}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
index 1eead62..fd804c7 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
@@ -23,6 +23,8 @@
 import android.content.res.Resources;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
+import android.inputmethodservice.InputMethodService;
+import android.os.IBinder;
 import android.os.RemoteException;
 import android.util.Log;
 import android.view.GestureDetector;
@@ -80,6 +82,7 @@
     private final StatusBarStateController mStatusBarStateController;
     private final boolean mEnableHeadsUpNotificationWhenNotificationShadeOpen;
     private final NotificationVisibilityLogger mNotificationVisibilityLogger;
+    private final int mNavBarHeight;
 
     private float mInitialBackgroundAlpha;
     private float mBackgroundAlphaDiff;
@@ -89,7 +92,6 @@
     private RecyclerView mNotificationList;
     private NotificationViewController mNotificationViewController;
 
-    private boolean mIsTracking;
     private boolean mNotificationListAtEnd;
     private float mFirstTouchDownOnGlassPane;
     private boolean mNotificationListAtEndAtTimeOfTouch;
@@ -137,7 +139,10 @@
         mStatusBarStateController = statusBarStateController;
         mNotificationVisibilityLogger = notificationVisibilityLogger;
 
+        mNavBarHeight = mResources.getDimensionPixelSize(R.dimen.car_bottom_navigation_bar_height);
+
         mCommandQueue.addCallback(this);
+
         // Notification background setup.
         mInitialBackgroundAlpha = (float) mResources.getInteger(
                 R.integer.config_initialNotificationBackgroundAlpha) / 100;
@@ -178,6 +183,27 @@
         }
     }
 
+    @Override
+    public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
+            boolean showImeSwitcher) {
+        if (mContext.getDisplayId() != displayId) {
+            return;
+        }
+        boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
+        int bottomMargin = isKeyboardVisible ? 0 : mNavBarHeight;
+        ViewGroup container = (ViewGroup) getLayout();
+        if (container == null) {
+            // Notification panel hasn't been inflated before. We shouldn't try to update the layout
+            // params.
+            return;
+        }
+
+        ViewGroup.MarginLayoutParams params =
+                (ViewGroup.MarginLayoutParams) container.getLayoutParams();
+        params.setMargins(params.leftMargin, params.topMargin, params.rightMargin, bottomMargin);
+        container.setLayoutParams(params);
+    }
+
     // OverlayViewController
 
     @Override
@@ -192,11 +218,21 @@
     }
 
     @Override
-    protected boolean shouldShowNavigationBar() {
+    protected boolean shouldShowNavigationBarInsets() {
         return true;
     }
 
     @Override
+    protected boolean shouldShowStatusBarInsets() {
+        return true;
+    }
+
+    @Override
+    protected int getInsetTypesToFit() {
+        return 0;
+    }
+
+    @Override
     protected boolean shouldShowHUN() {
         return mEnableHeadsUpNotificationWhenNotificationShadeOpen;
     }
@@ -287,14 +323,14 @@
         // The glass pane is used to view touch events before passed to the notification list.
         // This allows us to initialize gesture listeners and detect when to close the notifications
         glassPane.setOnTouchListener((v, event) -> {
-            if (event.getActionMasked() == MotionEvent.ACTION_UP) {
+            if (isClosingAction(event)) {
                 mNotificationListAtEndAtTimeOfTouch = false;
             }
-            if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
+            if (isOpeningAction(event)) {
                 mFirstTouchDownOnGlassPane = event.getRawX();
                 mNotificationListAtEndAtTimeOfTouch = mNotificationListAtEnd;
                 // Reset the tracker when there is a touch down on the glass pane.
-                mIsTracking = false;
+                setIsTracking(false);
                 // Pass the down event to gesture detector so that it knows where the touch event
                 // started.
                 closeGestureDetector.onTouchEvent(event);
@@ -329,22 +365,21 @@
 
             // If the card is swiping we should not allow the notification shade to close.
             // Hence setting mNotificationListAtEndAtTimeOfTouch to false will stop that
-            // for us. We are also checking for mIsTracking because while swiping the
+            // for us. We are also checking for isTracking() because while swiping the
             // notification shade to close if the user goes a bit horizontal while swiping
             // upwards then also this should close.
-            if (mIsNotificationCardSwiping && !mIsTracking) {
+            if (mIsNotificationCardSwiping && !isTracking()) {
                 mNotificationListAtEndAtTimeOfTouch = false;
             }
 
             boolean handled = closeGestureDetector.onTouchEvent(event);
-            boolean isTracking = mIsTracking;
+            boolean isTracking = isTracking();
             Rect rect = getLayout().getClipBounds();
             float clippedHeight = 0;
             if (rect != null) {
                 clippedHeight = rect.bottom;
             }
-            if (!handled && event.getActionMasked() == MotionEvent.ACTION_UP
-                    && mIsSwipingVerticallyToClose) {
+            if (!handled && isClosingAction(event) && mIsSwipingVerticallyToClose) {
                 if (getSettleClosePercentage() < getPercentageFromEndingEdge() && isTracking) {
                     animatePanel(DEFAULT_FLING_VELOCITY, false);
                 } else if (clippedHeight != getLayout().getHeight() && isTracking) {
@@ -357,7 +392,7 @@
             // Updating the mNotificationListAtEndAtTimeOfTouch state has to be done after
             // the event has been passed to the closeGestureDetector above, such that the
             // closeGestureDetector sees the up event before the state has changed.
-            if (event.getActionMasked() == MotionEvent.ACTION_UP) {
+            if (isClosingAction(event)) {
                 mNotificationListAtEndAtTimeOfTouch = false;
             }
             return handled || isTracking;
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBar.java
deleted file mode 100644
index d692487..0000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBar.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.car.statusbar;
-
-import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME;
-
-import android.annotation.Nullable;
-import android.content.Context;
-import android.graphics.drawable.Drawable;
-import android.os.Handler;
-import android.os.PowerManager;
-import android.util.DisplayMetrics;
-import android.util.Log;
-import android.view.View;
-
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.statusbar.RegisterStatusBarResult;
-import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.keyguard.ViewMediatorCallback;
-import com.android.systemui.BatteryMeterView;
-import com.android.systemui.Dependency;
-import com.android.systemui.InitController;
-import com.android.systemui.Prefs;
-import com.android.systemui.R;
-import com.android.systemui.assist.AssistManager;
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.bubbles.BubbleController;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarDeviceProvisionedListener;
-import com.android.systemui.car.bluetooth.CarBatteryController;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-import com.android.systemui.classifier.FalsingLog;
-import com.android.systemui.colorextraction.SysuiColorExtractor;
-import com.android.systemui.dagger.qualifiers.UiBackground;
-import com.android.systemui.fragments.FragmentHostManager;
-import com.android.systemui.keyguard.DismissCallbackRegistry;
-import com.android.systemui.keyguard.KeyguardViewMediator;
-import com.android.systemui.keyguard.ScreenLifecycle;
-import com.android.systemui.keyguard.WakefulnessLifecycle;
-import com.android.systemui.plugins.DarkIconDispatcher;
-import com.android.systemui.plugins.FalsingManager;
-import com.android.systemui.plugins.PluginDependencyProvider;
-import com.android.systemui.plugins.qs.QS;
-import com.android.systemui.recents.Recents;
-import com.android.systemui.recents.ScreenPinningRequest;
-import com.android.systemui.shared.plugins.PluginManager;
-import com.android.systemui.stackdivider.Divider;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.KeyguardIndicationController;
-import com.android.systemui.statusbar.NavigationBarController;
-import com.android.systemui.statusbar.NotificationLockscreenUserManager;
-import com.android.systemui.statusbar.NotificationMediaManager;
-import com.android.systemui.statusbar.NotificationRemoteInputManager;
-import com.android.systemui.statusbar.NotificationShadeDepthController;
-import com.android.systemui.statusbar.NotificationViewHierarchyManager;
-import com.android.systemui.statusbar.PulseExpansionHandler;
-import com.android.systemui.statusbar.SuperStatusBarViewFactory;
-import com.android.systemui.statusbar.SysuiStatusBarStateController;
-import com.android.systemui.statusbar.VibratorHelper;
-import com.android.systemui.statusbar.notification.DynamicPrivacyController;
-import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
-import com.android.systemui.statusbar.notification.VisualStabilityManager;
-import com.android.systemui.statusbar.notification.collection.NotificationEntry;
-import com.android.systemui.statusbar.notification.init.NotificationsController;
-import com.android.systemui.statusbar.notification.interruption.BypassHeadsUpNotifier;
-import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
-import com.android.systemui.statusbar.notification.interruption.NotificationInterruptSuppressor;
-import com.android.systemui.statusbar.notification.logging.NotificationLogger;
-import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
-import com.android.systemui.statusbar.phone.AutoHideController;
-import com.android.systemui.statusbar.phone.BiometricUnlockController;
-import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
-import com.android.systemui.statusbar.phone.DozeParameters;
-import com.android.systemui.statusbar.phone.DozeScrimController;
-import com.android.systemui.statusbar.phone.DozeServiceHost;
-import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
-import com.android.systemui.statusbar.phone.KeyguardBypassController;
-import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
-import com.android.systemui.statusbar.phone.LightBarController;
-import com.android.systemui.statusbar.phone.LightsOutNotifController;
-import com.android.systemui.statusbar.phone.LockscreenLockIconController;
-import com.android.systemui.statusbar.phone.LockscreenWallpaper;
-import com.android.systemui.statusbar.phone.NotificationGroupManager;
-import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
-import com.android.systemui.statusbar.phone.PhoneStatusBarPolicy;
-import com.android.systemui.statusbar.phone.ScrimController;
-import com.android.systemui.statusbar.phone.ShadeController;
-import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.phone.StatusBarIconController;
-import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
-import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter;
-import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
-import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
-import com.android.systemui.statusbar.policy.BatteryController;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-import com.android.systemui.statusbar.policy.ExtensionController;
-import com.android.systemui.statusbar.policy.KeyguardStateController;
-import com.android.systemui.statusbar.policy.NetworkController;
-import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
-import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
-import com.android.systemui.statusbar.policy.UserSwitcherController;
-import com.android.systemui.volume.VolumeComponent;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.Map;
-import java.util.Optional;
-import java.util.concurrent.Executor;
-
-import javax.inject.Named;
-import javax.inject.Provider;
-
-import dagger.Lazy;
-
-/**
- * A status bar tailored for the automotive use case.
- */
-public class CarStatusBar extends StatusBar implements CarBatteryController.BatteryViewHandler {
-    private static final String TAG = "CarStatusBar";
-
-    private final UserSwitcherController mUserSwitcherController;
-    private final ScrimController mScrimController;
-
-    private CarBatteryController mCarBatteryController;
-    private BatteryMeterView mBatteryMeterView;
-    private Drawable mNotificationPanelBackground;
-
-    private final Object mQueueLock = new Object();
-    private final CarNavigationBarController mCarNavigationBarController;
-    private final CarDeviceProvisionedController mCarDeviceProvisionedController;
-    private final ScreenLifecycle mScreenLifecycle;
-
-    private boolean mDeviceIsSetUpForUser = true;
-    private boolean mIsUserSetupInProgress = false;
-
-    public CarStatusBar(
-            Context context,
-            NotificationsController notificationsController,
-            LightBarController lightBarController,
-            AutoHideController autoHideController,
-            KeyguardUpdateMonitor keyguardUpdateMonitor,
-            StatusBarIconController statusBarIconController,
-            PulseExpansionHandler pulseExpansionHandler,
-            NotificationWakeUpCoordinator notificationWakeUpCoordinator,
-            KeyguardBypassController keyguardBypassController,
-            KeyguardStateController keyguardStateController,
-            HeadsUpManagerPhone headsUpManagerPhone,
-            DynamicPrivacyController dynamicPrivacyController,
-            BypassHeadsUpNotifier bypassHeadsUpNotifier,
-            FalsingManager falsingManager,
-            BroadcastDispatcher broadcastDispatcher,
-            RemoteInputQuickSettingsDisabler remoteInputQuickSettingsDisabler,
-            NotificationGutsManager notificationGutsManager,
-            NotificationLogger notificationLogger,
-            NotificationInterruptStateProvider notificationInterruptStateProvider,
-            NotificationViewHierarchyManager notificationViewHierarchyManager,
-            KeyguardViewMediator keyguardViewMediator,
-            DisplayMetrics displayMetrics,
-            MetricsLogger metricsLogger,
-            @UiBackground Executor uiBgExecutor,
-            NotificationMediaManager notificationMediaManager,
-            NotificationLockscreenUserManager lockScreenUserManager,
-            NotificationRemoteInputManager remoteInputManager,
-            UserSwitcherController userSwitcherController,
-            NetworkController networkController,
-            BatteryController batteryController,
-            SysuiColorExtractor colorExtractor,
-            ScreenLifecycle screenLifecycle,
-            WakefulnessLifecycle wakefulnessLifecycle,
-            SysuiStatusBarStateController statusBarStateController,
-            VibratorHelper vibratorHelper,
-            BubbleController bubbleController,
-            NotificationGroupManager groupManager,
-            VisualStabilityManager visualStabilityManager,
-            CarDeviceProvisionedController carDeviceProvisionedController,
-            NavigationBarController navigationBarController,
-            Lazy<AssistManager> assistManagerLazy,
-            ConfigurationController configurationController,
-            NotificationShadeWindowController notificationShadeWindowController,
-            LockscreenLockIconController lockscreenLockIconController,
-            DozeParameters dozeParameters,
-            ScrimController scrimController,
-            Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
-            Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
-            DozeServiceHost dozeServiceHost,
-            PowerManager powerManager,
-            ScreenPinningRequest screenPinningRequest,
-            DozeScrimController dozeScrimController,
-            VolumeComponent volumeComponent,
-            CommandQueue commandQueue,
-            Optional<Recents> recents,
-            Provider<StatusBarComponent.Builder> statusBarComponentBuilder,
-            PluginManager pluginManager,
-            Optional<Divider> dividerOptional,
-            SuperStatusBarViewFactory superStatusBarViewFactory,
-            LightsOutNotifController lightsOutNotifController,
-            StatusBarNotificationActivityStarter.Builder
-                    statusBarNotificationActivityStarterBuilder,
-            ShadeController shadeController,
-            StatusBarKeyguardViewManager statusBarKeyguardViewManager,
-            ViewMediatorCallback viewMediatorCallback,
-            InitController initController,
-            DarkIconDispatcher darkIconDispatcher,
-            @Named(TIME_TICK_HANDLER_NAME) Handler timeTickHandler,
-            PluginDependencyProvider pluginDependencyProvider,
-            KeyguardDismissUtil keyguardDismissUtil,
-            ExtensionController extensionController,
-            UserInfoControllerImpl userInfoControllerImpl,
-            PhoneStatusBarPolicy phoneStatusBarPolicy,
-            KeyguardIndicationController keyguardIndicationController,
-            DismissCallbackRegistry dismissCallbackRegistry,
-            StatusBarTouchableRegionManager statusBarTouchableRegionManager,
-            Lazy<NotificationShadeDepthController> depthControllerLazy,
-            /* Car Settings injected components. */
-            CarNavigationBarController carNavigationBarController) {
-        super(
-                context,
-                notificationsController,
-                lightBarController,
-                autoHideController,
-                keyguardUpdateMonitor,
-                statusBarIconController,
-                pulseExpansionHandler,
-                notificationWakeUpCoordinator,
-                keyguardBypassController,
-                keyguardStateController,
-                headsUpManagerPhone,
-                dynamicPrivacyController,
-                bypassHeadsUpNotifier,
-                falsingManager,
-                broadcastDispatcher,
-                remoteInputQuickSettingsDisabler,
-                notificationGutsManager,
-                notificationLogger,
-                notificationInterruptStateProvider,
-                notificationViewHierarchyManager,
-                keyguardViewMediator,
-                displayMetrics,
-                metricsLogger,
-                uiBgExecutor,
-                notificationMediaManager,
-                lockScreenUserManager,
-                remoteInputManager,
-                userSwitcherController,
-                networkController,
-                batteryController,
-                colorExtractor,
-                screenLifecycle,
-                wakefulnessLifecycle,
-                statusBarStateController,
-                vibratorHelper,
-                bubbleController,
-                groupManager,
-                visualStabilityManager,
-                carDeviceProvisionedController,
-                navigationBarController,
-                assistManagerLazy,
-                configurationController,
-                notificationShadeWindowController,
-                lockscreenLockIconController,
-                dozeParameters,
-                scrimController,
-                null /* keyguardLiftController */,
-                lockscreenWallpaperLazy,
-                biometricUnlockControllerLazy,
-                dozeServiceHost,
-                powerManager,
-                screenPinningRequest,
-                dozeScrimController,
-                volumeComponent,
-                commandQueue,
-                recents,
-                statusBarComponentBuilder,
-                pluginManager,
-                dividerOptional,
-                lightsOutNotifController,
-                statusBarNotificationActivityStarterBuilder,
-                shadeController,
-                superStatusBarViewFactory,
-                statusBarKeyguardViewManager,
-                viewMediatorCallback,
-                initController,
-                darkIconDispatcher,
-                timeTickHandler,
-                pluginDependencyProvider,
-                keyguardDismissUtil,
-                extensionController,
-                userInfoControllerImpl,
-                phoneStatusBarPolicy,
-                keyguardIndicationController,
-                dismissCallbackRegistry,
-                depthControllerLazy,
-                statusBarTouchableRegionManager);
-        mUserSwitcherController = userSwitcherController;
-        mScrimController = scrimController;
-        mCarDeviceProvisionedController = carDeviceProvisionedController;
-        mCarNavigationBarController = carNavigationBarController;
-        mScreenLifecycle = screenLifecycle;
-    }
-
-    @Override
-    public void start() {
-        mDeviceIsSetUpForUser = mCarDeviceProvisionedController.isCurrentUserSetup();
-        mIsUserSetupInProgress = mCarDeviceProvisionedController.isCurrentUserSetupInProgress();
-
-        super.start();
-
-        createBatteryController();
-        mCarBatteryController.startListening();
-
-        mCarDeviceProvisionedController.addCallback(
-                new CarDeviceProvisionedListener() {
-                    @Override
-                    public void onUserSetupInProgressChanged() {
-                        mDeviceIsSetUpForUser = mCarDeviceProvisionedController
-                                .isCurrentUserSetup();
-                        mIsUserSetupInProgress = mCarDeviceProvisionedController
-                                .isCurrentUserSetupInProgress();
-                    }
-
-                    @Override
-                    public void onUserSetupChanged() {
-                        mDeviceIsSetUpForUser = mCarDeviceProvisionedController
-                                .isCurrentUserSetup();
-                        mIsUserSetupInProgress = mCarDeviceProvisionedController
-                                .isCurrentUserSetupInProgress();
-                    }
-
-                    @Override
-                    public void onUserSwitched() {
-                        mDeviceIsSetUpForUser = mCarDeviceProvisionedController
-                                .isCurrentUserSetup();
-                        mIsUserSetupInProgress = mCarDeviceProvisionedController
-                                .isCurrentUserSetupInProgress();
-                    }
-                });
-
-        mNotificationInterruptStateProvider.addSuppressor(new NotificationInterruptSuppressor() {
-            @Override
-            public String getName() {
-                return TAG;
-            }
-
-            @Override
-            public boolean suppressInterruptions(NotificationEntry entry) {
-                // Because space is usually constrained in the auto use-case, there should not be a
-                // pinned notification when the shade has been expanded.
-                // Ensure this by not allowing any interruptions (ie: pinning any notifications) if
-                // the shade is already opened.
-                return !getPresenter().isPresenterFullyCollapsed();
-            }
-        });
-    }
-
-    @Override
-    public boolean hideKeyguard() {
-        boolean result = super.hideKeyguard();
-        mCarNavigationBarController.hideAllKeyguardButtons(isDeviceSetupForUser());
-        return result;
-    }
-
-    @Override
-    public void showKeyguard() {
-        super.showKeyguard();
-        mCarNavigationBarController.showAllKeyguardButtons(isDeviceSetupForUser());
-    }
-
-    private boolean isDeviceSetupForUser() {
-        return mDeviceIsSetUpForUser && !mIsUserSetupInProgress;
-    }
-
-    @Override
-    protected void makeStatusBarView(@Nullable RegisterStatusBarResult result) {
-        super.makeStatusBarView(result);
-
-        mNotificationPanelBackground = getDefaultWallpaper();
-        mScrimController.setScrimBehindDrawable(mNotificationPanelBackground);
-
-        FragmentHostManager manager = FragmentHostManager.get(mPhoneStatusBarWindow);
-        manager.addTagListener(CollapsedStatusBarFragment.TAG, (tag, fragment) -> {
-            mBatteryMeterView = fragment.getView().findViewById(R.id.battery);
-
-            // By default, the BatteryMeterView should not be visible. It will be toggled
-            // when a device has connected by bluetooth.
-            mBatteryMeterView.setVisibility(View.GONE);
-        });
-    }
-
-    @Override
-    public void animateExpandNotificationsPanel() {
-        // No op.
-    }
-
-    @Override
-    protected QS createDefaultQSFragment() {
-        return null;
-    }
-
-    private BatteryController createBatteryController() {
-        mCarBatteryController = new CarBatteryController(mContext);
-        mCarBatteryController.addBatteryViewHandler(this);
-        return mCarBatteryController;
-    }
-
-    @Override
-    protected void createNavigationBar(@Nullable RegisterStatusBarResult result) {
-        // No op.
-    }
-
-    @Override
-    public void notifyBiometricAuthModeChanged() {
-        // No op.
-    }
-
-    @Override
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        //When executing dump() function simultaneously, we need to serialize them
-        //to get mStackScroller's position correctly.
-        synchronized (mQueueLock) {
-            pw.println("  mStackScroller: " + viewInfo(mStackScroller));
-            pw.println("  mStackScroller: " + viewInfo(mStackScroller)
-                    + " scroll " + mStackScroller.getScrollX()
-                    + "," + mStackScroller.getScrollY());
-        }
-        pw.print("  mCarBatteryController=");
-        pw.println(mCarBatteryController);
-        pw.print("  mBatteryMeterView=");
-        pw.println(mBatteryMeterView);
-
-        if (Dependency.get(KeyguardUpdateMonitor.class) != null) {
-            Dependency.get(KeyguardUpdateMonitor.class).dump(fd, pw, args);
-        }
-
-        FalsingLog.dump(pw);
-
-        pw.println("SharedPreferences:");
-        for (Map.Entry<String, ?> entry : Prefs.getAll(mContext).entrySet()) {
-            pw.print("  ");
-            pw.print(entry.getKey());
-            pw.print("=");
-            pw.println(entry.getValue());
-        }
-    }
-
-    @Override
-    public void showBatteryView() {
-        if (Log.isLoggable(TAG, Log.DEBUG)) {
-            Log.d(TAG, "showBatteryView(). mBatteryMeterView: " + mBatteryMeterView);
-        }
-
-        if (mBatteryMeterView != null) {
-            mBatteryMeterView.setVisibility(View.VISIBLE);
-        }
-    }
-
-    @Override
-    public void hideBatteryView() {
-        if (Log.isLoggable(TAG, Log.DEBUG)) {
-            Log.d(TAG, "hideBatteryView(). mBatteryMeterView: " + mBatteryMeterView);
-        }
-
-        if (mBatteryMeterView != null) {
-            mBatteryMeterView.setVisibility(View.GONE);
-        }
-    }
-
-    @Override
-    protected void createUserSwitcher() {
-        if (!mUserSwitcherController.useFullscreenUserSwitcher()) {
-            super.createUserSwitcher();
-        }
-    }
-
-    /**
-     * Dismisses the keyguard and shows bouncer if authentication is necessary.
-     */
-    public void dismissKeyguard() {
-        // Don't dismiss keyguard when the screen is off.
-        if (mScreenLifecycle.getScreenState() == ScreenLifecycle.SCREEN_OFF) {
-            return;
-        }
-        executeRunnableDismissingKeyguard(null/* runnable */, null /* cancelAction */,
-                true /* dismissShade */, true /* afterKeyguardGone */, true /* deferred */);
-    }
-
-    /**
-     * Ensures that relevant child views are appropriately recreated when the device's density
-     * changes.
-     */
-    @Override
-    public void onDensityOrFontScaleChanged() {
-        super.onDensityOrFontScaleChanged();
-        // Need to update the background on density changed in case the change was due to night
-        // mode.
-        mNotificationPanelBackground = getDefaultWallpaper();
-        mScrimController.setScrimBehindDrawable(mNotificationPanelBackground);
-    }
-
-    /**
-     * Returns the {@link Drawable} that represents the wallpaper that the user has currently set.
-     */
-    private Drawable getDefaultWallpaper() {
-        return mContext.getDrawable(com.android.internal.R.drawable.default_wallpaper);
-    }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBarKeyguardViewManager.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBarKeyguardViewManager.java
deleted file mode 100644
index 96a998a..0000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBarKeyguardViewManager.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.car.statusbar;
-
-import android.content.Context;
-import android.view.View;
-
-import com.android.internal.widget.LockPatternUtils;
-import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.keyguard.ViewMediatorCallback;
-import com.android.systemui.R;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-import com.android.systemui.dock.DockManager;
-import com.android.systemui.statusbar.NotificationMediaManager;
-import com.android.systemui.statusbar.SysuiStatusBarStateController;
-import com.android.systemui.statusbar.phone.NavigationModeController;
-import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
-import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-import com.android.systemui.statusbar.policy.KeyguardStateController;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-/** Car implementation of the {@link StatusBarKeyguardViewManager}. */
-@Singleton
-public class CarStatusBarKeyguardViewManager extends StatusBarKeyguardViewManager {
-
-    protected boolean mShouldHideNavBar;
-    private final CarNavigationBarController mCarNavigationBarController;
-    private Set<OnKeyguardCancelClickedListener> mKeygaurdCancelClickedListenerSet;
-
-    @Inject
-    public CarStatusBarKeyguardViewManager(Context context,
-            ViewMediatorCallback callback,
-            LockPatternUtils lockPatternUtils,
-            SysuiStatusBarStateController sysuiStatusBarStateController,
-            ConfigurationController configurationController,
-            KeyguardUpdateMonitor keyguardUpdateMonitor,
-            NavigationModeController navigationModeController,
-            DockManager dockManager,
-            NotificationShadeWindowController notificationShadeWindowController,
-            KeyguardStateController keyguardStateController,
-            NotificationMediaManager notificationMediaManager,
-            CarNavigationBarController carNavigationBarController) {
-        super(context, callback, lockPatternUtils, sysuiStatusBarStateController,
-                configurationController, keyguardUpdateMonitor, navigationModeController,
-                dockManager, notificationShadeWindowController, keyguardStateController,
-                notificationMediaManager);
-        mShouldHideNavBar = context.getResources()
-                .getBoolean(R.bool.config_hideNavWhenKeyguardBouncerShown);
-        mCarNavigationBarController = carNavigationBarController;
-        mKeygaurdCancelClickedListenerSet = new HashSet<>();
-    }
-
-    @Override
-    protected void updateNavigationBarVisibility(boolean navBarVisible) {
-        if (!mShouldHideNavBar) {
-            return;
-        }
-        int visibility = navBarVisible ? View.VISIBLE : View.GONE;
-        mCarNavigationBarController.setBottomWindowVisibility(visibility);
-        mCarNavigationBarController.setLeftWindowVisibility(visibility);
-        mCarNavigationBarController.setRightWindowVisibility(visibility);
-    }
-
-    /**
-     * Car is a multi-user system.  There's a cancel button on the bouncer that allows the user to
-     * go back to the user switcher and select another user.  Different user may have different
-     * security mode which requires bouncer container to be resized.  For this reason, the bouncer
-     * view is destroyed on cancel.
-     */
-    @Override
-    protected boolean shouldDestroyViewOnReset() {
-        return true;
-    }
-
-    /**
-     * Called when cancel button in bouncer is pressed.
-     */
-    @Override
-    public void onCancelClicked() {
-        mKeygaurdCancelClickedListenerSet.forEach(OnKeyguardCancelClickedListener::onCancelClicked);
-    }
-
-    /**
-     * Do nothing on this change.
-     * The base class hides the keyguard which for automotive we want to avoid b/c this would happen
-     * on a configuration change due to day/night (headlight state).
-     */
-    @Override
-    public void onDensityOrFontScaleChanged() {  }
-
-    /**
-     * Add listener for keyguard cancel clicked.
-     */
-    public void addOnKeyguardCancelClickedListener(
-            OnKeyguardCancelClickedListener keyguardCancelClickedListener) {
-        mKeygaurdCancelClickedListenerSet.add(keyguardCancelClickedListener);
-    }
-
-    /**
-     * Remove listener for keyguard cancel clicked.
-     */
-    public void removeOnKeyguardCancelClickedListener(
-            OnKeyguardCancelClickedListener keyguardCancelClickedListener) {
-        mKeygaurdCancelClickedListenerSet.remove(keyguardCancelClickedListener);
-    }
-
-
-    /**
-     * Defines a callback for keyguard cancel button clicked listeners.
-     */
-    public interface OnKeyguardCancelClickedListener {
-        /**
-         * Called when keyguard cancel button is clicked.
-         */
-        void onCancelClicked();
-    }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBarModule.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBarModule.java
deleted file mode 100644
index dc2eb04..0000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/CarStatusBarModule.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.car.statusbar;
-
-import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.PowerManager;
-import android.util.DisplayMetrics;
-
-import com.android.internal.logging.MetricsLogger;
-import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.keyguard.ViewMediatorCallback;
-import com.android.systemui.InitController;
-import com.android.systemui.assist.AssistManager;
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.bubbles.BubbleController;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-import com.android.systemui.colorextraction.SysuiColorExtractor;
-import com.android.systemui.dagger.qualifiers.UiBackground;
-import com.android.systemui.keyguard.DismissCallbackRegistry;
-import com.android.systemui.keyguard.KeyguardViewMediator;
-import com.android.systemui.keyguard.ScreenLifecycle;
-import com.android.systemui.keyguard.WakefulnessLifecycle;
-import com.android.systemui.plugins.DarkIconDispatcher;
-import com.android.systemui.plugins.FalsingManager;
-import com.android.systemui.plugins.PluginDependencyProvider;
-import com.android.systemui.recents.Recents;
-import com.android.systemui.recents.ScreenPinningRequest;
-import com.android.systemui.shared.plugins.PluginManager;
-import com.android.systemui.stackdivider.Divider;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.KeyguardIndicationController;
-import com.android.systemui.statusbar.NavigationBarController;
-import com.android.systemui.statusbar.NotificationLockscreenUserManager;
-import com.android.systemui.statusbar.NotificationMediaManager;
-import com.android.systemui.statusbar.NotificationRemoteInputManager;
-import com.android.systemui.statusbar.NotificationShadeDepthController;
-import com.android.systemui.statusbar.NotificationViewHierarchyManager;
-import com.android.systemui.statusbar.PulseExpansionHandler;
-import com.android.systemui.statusbar.SuperStatusBarViewFactory;
-import com.android.systemui.statusbar.SysuiStatusBarStateController;
-import com.android.systemui.statusbar.VibratorHelper;
-import com.android.systemui.statusbar.dagger.StatusBarDependenciesModule;
-import com.android.systemui.statusbar.notification.DynamicPrivacyController;
-import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
-import com.android.systemui.statusbar.notification.VisualStabilityManager;
-import com.android.systemui.statusbar.notification.init.NotificationsController;
-import com.android.systemui.statusbar.notification.interruption.BypassHeadsUpNotifier;
-import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
-import com.android.systemui.statusbar.notification.logging.NotificationLogger;
-import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
-import com.android.systemui.statusbar.notification.row.NotificationRowModule;
-import com.android.systemui.statusbar.phone.AutoHideController;
-import com.android.systemui.statusbar.phone.BiometricUnlockController;
-import com.android.systemui.statusbar.phone.DozeParameters;
-import com.android.systemui.statusbar.phone.DozeScrimController;
-import com.android.systemui.statusbar.phone.DozeServiceHost;
-import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
-import com.android.systemui.statusbar.phone.KeyguardBypassController;
-import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
-import com.android.systemui.statusbar.phone.LightBarController;
-import com.android.systemui.statusbar.phone.LightsOutNotifController;
-import com.android.systemui.statusbar.phone.LockscreenLockIconController;
-import com.android.systemui.statusbar.phone.LockscreenWallpaper;
-import com.android.systemui.statusbar.phone.NotificationGroupManager;
-import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
-import com.android.systemui.statusbar.phone.PhoneStatusBarPolicy;
-import com.android.systemui.statusbar.phone.ScrimController;
-import com.android.systemui.statusbar.phone.ShadeController;
-import com.android.systemui.statusbar.phone.StatusBarIconController;
-import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
-import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter;
-import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
-import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
-import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneDependenciesModule;
-import com.android.systemui.statusbar.policy.BatteryController;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-import com.android.systemui.statusbar.policy.ExtensionController;
-import com.android.systemui.statusbar.policy.KeyguardStateController;
-import com.android.systemui.statusbar.policy.NetworkController;
-import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
-import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
-import com.android.systemui.statusbar.policy.UserSwitcherController;
-import com.android.systemui.volume.VolumeComponent;
-
-import java.util.Optional;
-import java.util.concurrent.Executor;
-
-import javax.inject.Named;
-import javax.inject.Provider;
-import javax.inject.Singleton;
-
-import dagger.Lazy;
-import dagger.Module;
-import dagger.Provides;
-
-/**
- * Dagger Module providing {@link CarStatusBar}.
- */
-@Module(includes = {StatusBarDependenciesModule.class, StatusBarPhoneDependenciesModule.class,
-        NotificationRowModule.class})
-public class CarStatusBarModule {
-    /**
-     * Provides our instance of StatusBar which is considered optional.
-     */
-    @Provides
-    @Singleton
-    static CarStatusBar provideStatusBar(
-            Context context,
-            NotificationsController notificationsController,
-            LightBarController lightBarController,
-            AutoHideController autoHideController,
-            KeyguardUpdateMonitor keyguardUpdateMonitor,
-            StatusBarIconController statusBarIconController,
-            PulseExpansionHandler pulseExpansionHandler,
-            NotificationWakeUpCoordinator notificationWakeUpCoordinator,
-            KeyguardBypassController keyguardBypassController,
-            KeyguardStateController keyguardStateController,
-            HeadsUpManagerPhone headsUpManagerPhone,
-            DynamicPrivacyController dynamicPrivacyController,
-            BypassHeadsUpNotifier bypassHeadsUpNotifier,
-            FalsingManager falsingManager,
-            BroadcastDispatcher broadcastDispatcher,
-            RemoteInputQuickSettingsDisabler remoteInputQuickSettingsDisabler,
-            NotificationGutsManager notificationGutsManager,
-            NotificationLogger notificationLogger,
-            NotificationInterruptStateProvider notificationInterruptionStateProvider,
-            NotificationViewHierarchyManager notificationViewHierarchyManager,
-            KeyguardViewMediator keyguardViewMediator,
-            DisplayMetrics displayMetrics,
-            MetricsLogger metricsLogger,
-            @UiBackground Executor uiBgExecutor,
-            NotificationMediaManager notificationMediaManager,
-            NotificationLockscreenUserManager lockScreenUserManager,
-            NotificationRemoteInputManager remoteInputManager,
-            UserSwitcherController userSwitcherController,
-            NetworkController networkController,
-            BatteryController batteryController,
-            SysuiColorExtractor colorExtractor,
-            ScreenLifecycle screenLifecycle,
-            WakefulnessLifecycle wakefulnessLifecycle,
-            SysuiStatusBarStateController statusBarStateController,
-            VibratorHelper vibratorHelper,
-            BubbleController bubbleController,
-            NotificationGroupManager groupManager,
-            VisualStabilityManager visualStabilityManager,
-            CarDeviceProvisionedController carDeviceProvisionedController,
-            NavigationBarController navigationBarController,
-            Lazy<AssistManager> assistManagerLazy,
-            ConfigurationController configurationController,
-            NotificationShadeWindowController notificationShadeWindowController,
-            LockscreenLockIconController lockscreenLockIconController,
-            DozeParameters dozeParameters,
-            ScrimController scrimController,
-            Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
-            Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
-            DozeServiceHost dozeServiceHost,
-            PowerManager powerManager,
-            ScreenPinningRequest screenPinningRequest,
-            DozeScrimController dozeScrimController,
-            VolumeComponent volumeComponent,
-            CommandQueue commandQueue,
-            Optional<Recents> recentsOptional,
-            Provider<StatusBarComponent.Builder> statusBarComponentBuilder,
-            PluginManager pluginManager,
-            Optional<Divider> dividerOptional,
-            SuperStatusBarViewFactory superStatusBarViewFactory,
-            LightsOutNotifController lightsOutNotifController,
-            StatusBarNotificationActivityStarter.Builder
-                    statusBarNotificationActivityStarterBuilder,
-            ShadeController shadeController,
-            StatusBarKeyguardViewManager statusBarKeyguardViewManager,
-            ViewMediatorCallback viewMediatorCallback,
-            InitController initController,
-            DarkIconDispatcher darkIconDispatcher,
-            @Named(TIME_TICK_HANDLER_NAME) Handler timeTickHandler,
-            PluginDependencyProvider pluginDependencyProvider,
-            KeyguardDismissUtil keyguardDismissUtil,
-            ExtensionController extensionController,
-            UserInfoControllerImpl userInfoControllerImpl,
-            PhoneStatusBarPolicy phoneStatusBarPolicy,
-            KeyguardIndicationController keyguardIndicationController,
-            DismissCallbackRegistry dismissCallbackRegistry,
-            StatusBarTouchableRegionManager statusBarTouchableRegionManager,
-            Lazy<NotificationShadeDepthController> notificationShadeDepthControllerLazy,
-            CarNavigationBarController carNavigationBarController) {
-        return new CarStatusBar(
-                context,
-                notificationsController,
-                lightBarController,
-                autoHideController,
-                keyguardUpdateMonitor,
-                statusBarIconController,
-                pulseExpansionHandler,
-                notificationWakeUpCoordinator,
-                keyguardBypassController,
-                keyguardStateController,
-                headsUpManagerPhone,
-                dynamicPrivacyController,
-                bypassHeadsUpNotifier,
-                falsingManager,
-                broadcastDispatcher,
-                remoteInputQuickSettingsDisabler,
-                notificationGutsManager,
-                notificationLogger,
-                notificationInterruptionStateProvider,
-                notificationViewHierarchyManager,
-                keyguardViewMediator,
-                displayMetrics,
-                metricsLogger,
-                uiBgExecutor,
-                notificationMediaManager,
-                lockScreenUserManager,
-                remoteInputManager,
-                userSwitcherController,
-                networkController,
-                batteryController,
-                colorExtractor,
-                screenLifecycle,
-                wakefulnessLifecycle,
-                statusBarStateController,
-                vibratorHelper,
-                bubbleController,
-                groupManager,
-                visualStabilityManager,
-                carDeviceProvisionedController,
-                navigationBarController,
-                assistManagerLazy,
-                configurationController,
-                notificationShadeWindowController,
-                lockscreenLockIconController,
-                dozeParameters,
-                scrimController,
-                lockscreenWallpaperLazy,
-                biometricUnlockControllerLazy,
-                dozeServiceHost,
-                powerManager,
-                screenPinningRequest,
-                dozeScrimController,
-                volumeComponent,
-                commandQueue,
-                recentsOptional,
-                statusBarComponentBuilder,
-                pluginManager,
-                dividerOptional,
-                superStatusBarViewFactory,
-                lightsOutNotifController,
-                statusBarNotificationActivityStarterBuilder,
-                shadeController,
-                statusBarKeyguardViewManager,
-                viewMediatorCallback,
-                initController,
-                darkIconDispatcher,
-                timeTickHandler,
-                pluginDependencyProvider,
-                keyguardDismissUtil,
-                extensionController,
-                userInfoControllerImpl,
-                phoneStatusBarPolicy,
-                keyguardIndicationController,
-                dismissCallbackRegistry,
-                statusBarTouchableRegionManager,
-                notificationShadeDepthControllerLazy,
-                carNavigationBarController);
-    }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBar.java
new file mode 100644
index 0000000..48334bd
--- /dev/null
+++ b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBar.java
@@ -0,0 +1,224 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.car.statusbar;
+
+import android.content.Context;
+import android.os.Handler;
+import android.os.PowerManager;
+import android.util.DisplayMetrics;
+
+import com.android.internal.logging.MetricsLogger;
+import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.keyguard.ViewMediatorCallback;
+import com.android.systemui.InitController;
+import com.android.systemui.assist.AssistManager;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+import com.android.systemui.bubbles.BubbleController;
+import com.android.systemui.colorextraction.SysuiColorExtractor;
+import com.android.systemui.keyguard.DismissCallbackRegistry;
+import com.android.systemui.keyguard.KeyguardViewMediator;
+import com.android.systemui.keyguard.ScreenLifecycle;
+import com.android.systemui.keyguard.WakefulnessLifecycle;
+import com.android.systemui.plugins.DarkIconDispatcher;
+import com.android.systemui.plugins.FalsingManager;
+import com.android.systemui.plugins.PluginDependencyProvider;
+import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.ScreenPinningRequest;
+import com.android.systemui.shared.plugins.PluginManager;
+import com.android.systemui.stackdivider.Divider;
+import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.KeyguardIndicationController;
+import com.android.systemui.statusbar.NavigationBarController;
+import com.android.systemui.statusbar.NotificationLockscreenUserManager;
+import com.android.systemui.statusbar.NotificationMediaManager;
+import com.android.systemui.statusbar.NotificationRemoteInputManager;
+import com.android.systemui.statusbar.NotificationShadeDepthController;
+import com.android.systemui.statusbar.NotificationViewHierarchyManager;
+import com.android.systemui.statusbar.PulseExpansionHandler;
+import com.android.systemui.statusbar.SuperStatusBarViewFactory;
+import com.android.systemui.statusbar.SysuiStatusBarStateController;
+import com.android.systemui.statusbar.VibratorHelper;
+import com.android.systemui.statusbar.notification.DynamicPrivacyController;
+import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
+import com.android.systemui.statusbar.notification.VisualStabilityManager;
+import com.android.systemui.statusbar.notification.init.NotificationsController;
+import com.android.systemui.statusbar.notification.interruption.BypassHeadsUpNotifier;
+import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
+import com.android.systemui.statusbar.notification.logging.NotificationLogger;
+import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
+import com.android.systemui.statusbar.phone.AutoHideController;
+import com.android.systemui.statusbar.phone.BiometricUnlockController;
+import com.android.systemui.statusbar.phone.DozeParameters;
+import com.android.systemui.statusbar.phone.DozeScrimController;
+import com.android.systemui.statusbar.phone.DozeServiceHost;
+import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
+import com.android.systemui.statusbar.phone.KeyguardBypassController;
+import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
+import com.android.systemui.statusbar.phone.KeyguardLiftController;
+import com.android.systemui.statusbar.phone.LightBarController;
+import com.android.systemui.statusbar.phone.LightsOutNotifController;
+import com.android.systemui.statusbar.phone.LockscreenLockIconController;
+import com.android.systemui.statusbar.phone.LockscreenWallpaper;
+import com.android.systemui.statusbar.phone.NavigationBarView;
+import com.android.systemui.statusbar.phone.NotificationGroupManager;
+import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
+import com.android.systemui.statusbar.phone.PhoneStatusBarPolicy;
+import com.android.systemui.statusbar.phone.ScrimController;
+import com.android.systemui.statusbar.phone.ShadeController;
+import com.android.systemui.statusbar.phone.StatusBar;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
+import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter;
+import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
+import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
+import com.android.systemui.statusbar.policy.BatteryController;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.ExtensionController;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
+import com.android.systemui.statusbar.policy.NetworkController;
+import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
+import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
+import com.android.systemui.statusbar.policy.UserSwitcherController;
+import com.android.systemui.volume.VolumeComponent;
+
+import java.util.Optional;
+import java.util.concurrent.Executor;
+
+import javax.inject.Provider;
+
+import dagger.Lazy;
+
+/** Unused variant of {@link StatusBar} specifically used in the automotive context. */
+public class UnusedStatusBar extends StatusBar {
+
+    public UnusedStatusBar(Context context,
+            NotificationsController notificationsController,
+            LightBarController lightBarController,
+            AutoHideController autoHideController,
+            KeyguardUpdateMonitor keyguardUpdateMonitor,
+            StatusBarIconController statusBarIconController,
+            PulseExpansionHandler pulseExpansionHandler,
+            NotificationWakeUpCoordinator notificationWakeUpCoordinator,
+            KeyguardBypassController keyguardBypassController,
+            KeyguardStateController keyguardStateController,
+            HeadsUpManagerPhone headsUpManagerPhone,
+            DynamicPrivacyController dynamicPrivacyController,
+            BypassHeadsUpNotifier bypassHeadsUpNotifier,
+            FalsingManager falsingManager,
+            BroadcastDispatcher broadcastDispatcher,
+            RemoteInputQuickSettingsDisabler remoteInputQuickSettingsDisabler,
+            NotificationGutsManager notificationGutsManager,
+            NotificationLogger notificationLogger,
+            NotificationInterruptStateProvider notificationInterruptStateProvider,
+            NotificationViewHierarchyManager notificationViewHierarchyManager,
+            KeyguardViewMediator keyguardViewMediator,
+            DisplayMetrics displayMetrics,
+            MetricsLogger metricsLogger,
+            Executor uiBgExecutor,
+            NotificationMediaManager notificationMediaManager,
+            NotificationLockscreenUserManager lockScreenUserManager,
+            NotificationRemoteInputManager remoteInputManager,
+            UserSwitcherController userSwitcherController,
+            NetworkController networkController,
+            BatteryController batteryController,
+            SysuiColorExtractor colorExtractor,
+            ScreenLifecycle screenLifecycle,
+            WakefulnessLifecycle wakefulnessLifecycle,
+            SysuiStatusBarStateController statusBarStateController,
+            VibratorHelper vibratorHelper,
+            BubbleController bubbleController,
+            NotificationGroupManager groupManager,
+            VisualStabilityManager visualStabilityManager,
+            DeviceProvisionedController deviceProvisionedController,
+            NavigationBarController navigationBarController,
+            Lazy<AssistManager> assistManagerLazy,
+            ConfigurationController configurationController,
+            NotificationShadeWindowController notificationShadeWindowController,
+            LockscreenLockIconController lockscreenLockIconController,
+            DozeParameters dozeParameters,
+            ScrimController scrimController,
+            KeyguardLiftController keyguardLiftController,
+            Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
+            Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
+            DozeServiceHost dozeServiceHost,
+            PowerManager powerManager,
+            ScreenPinningRequest screenPinningRequest,
+            DozeScrimController dozeScrimController,
+            VolumeComponent volumeComponent,
+            CommandQueue commandQueue,
+            Optional<Recents> recentsOptional,
+            Provider<StatusBarComponent.Builder> statusBarComponentBuilder,
+            PluginManager pluginManager,
+            Optional<Divider> dividerOptional,
+            LightsOutNotifController lightsOutNotifController,
+            StatusBarNotificationActivityStarter.Builder statusBarNotifActivityStarterBuilder,
+            ShadeController shadeController,
+            SuperStatusBarViewFactory superStatusBarViewFactory,
+            StatusBarKeyguardViewManager statusBarKeyguardViewManager,
+            ViewMediatorCallback viewMediatorCallback,
+            InitController initController,
+            DarkIconDispatcher darkIconDispatcher,
+            Handler timeTickHandler,
+            PluginDependencyProvider pluginDependencyProvider,
+            KeyguardDismissUtil keyguardDismissUtil,
+            ExtensionController extensionController,
+            UserInfoControllerImpl userInfoControllerImpl,
+            PhoneStatusBarPolicy phoneStatusBarPolicy,
+            KeyguardIndicationController keyguardIndicationController,
+            DismissCallbackRegistry dismissCallbackRegistry,
+            Lazy<NotificationShadeDepthController> notificationShadeDepthControllerLazy,
+            StatusBarTouchableRegionManager statusBarTouchableRegionManager) {
+        super(context, notificationsController, lightBarController, autoHideController,
+                keyguardUpdateMonitor, statusBarIconController, pulseExpansionHandler,
+                notificationWakeUpCoordinator, keyguardBypassController, keyguardStateController,
+                headsUpManagerPhone, dynamicPrivacyController, bypassHeadsUpNotifier,
+                falsingManager,
+                broadcastDispatcher, remoteInputQuickSettingsDisabler, notificationGutsManager,
+                notificationLogger, notificationInterruptStateProvider,
+                notificationViewHierarchyManager, keyguardViewMediator, displayMetrics,
+                metricsLogger,
+                uiBgExecutor, notificationMediaManager, lockScreenUserManager, remoteInputManager,
+                userSwitcherController, networkController, batteryController, colorExtractor,
+                screenLifecycle, wakefulnessLifecycle, statusBarStateController, vibratorHelper,
+                bubbleController, groupManager, visualStabilityManager, deviceProvisionedController,
+                navigationBarController, assistManagerLazy, configurationController,
+                notificationShadeWindowController, lockscreenLockIconController, dozeParameters,
+                scrimController, keyguardLiftController, lockscreenWallpaperLazy,
+                biometricUnlockControllerLazy, dozeServiceHost, powerManager, screenPinningRequest,
+                dozeScrimController, volumeComponent, commandQueue, recentsOptional,
+                statusBarComponentBuilder, pluginManager, dividerOptional, lightsOutNotifController,
+                statusBarNotifActivityStarterBuilder, shadeController, superStatusBarViewFactory,
+                statusBarKeyguardViewManager, viewMediatorCallback, initController,
+                darkIconDispatcher,
+                timeTickHandler, pluginDependencyProvider, keyguardDismissUtil, extensionController,
+                userInfoControllerImpl, phoneStatusBarPolicy, keyguardIndicationController,
+                dismissCallbackRegistry, notificationShadeDepthControllerLazy,
+                statusBarTouchableRegionManager);
+    }
+
+    @Override
+    public void notifyBiometricAuthModeChanged() {
+        // No-op for Automotive devices.
+    }
+
+    @Override
+    public NavigationBarView getNavigationBarView() {
+        // Return null for Automotive devices.
+        return null;
+    }
+}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBarModule.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBarModule.java
new file mode 100644
index 0000000..2c86e4d
--- /dev/null
+++ b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBarModule.java
@@ -0,0 +1,285 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.car.statusbar;
+
+import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME;
+
+import android.content.Context;
+import android.os.Handler;
+import android.os.PowerManager;
+import android.util.DisplayMetrics;
+
+import androidx.annotation.Nullable;
+
+import com.android.internal.logging.MetricsLogger;
+import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.keyguard.ViewMediatorCallback;
+import com.android.systemui.InitController;
+import com.android.systemui.assist.AssistManager;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+import com.android.systemui.bubbles.BubbleController;
+import com.android.systemui.colorextraction.SysuiColorExtractor;
+import com.android.systemui.dagger.qualifiers.UiBackground;
+import com.android.systemui.keyguard.DismissCallbackRegistry;
+import com.android.systemui.keyguard.KeyguardViewMediator;
+import com.android.systemui.keyguard.ScreenLifecycle;
+import com.android.systemui.keyguard.WakefulnessLifecycle;
+import com.android.systemui.plugins.DarkIconDispatcher;
+import com.android.systemui.plugins.FalsingManager;
+import com.android.systemui.plugins.PluginDependencyProvider;
+import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.ScreenPinningRequest;
+import com.android.systemui.shared.plugins.PluginManager;
+import com.android.systemui.stackdivider.Divider;
+import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.KeyguardIndicationController;
+import com.android.systemui.statusbar.NavigationBarController;
+import com.android.systemui.statusbar.NotificationLockscreenUserManager;
+import com.android.systemui.statusbar.NotificationMediaManager;
+import com.android.systemui.statusbar.NotificationRemoteInputManager;
+import com.android.systemui.statusbar.NotificationShadeDepthController;
+import com.android.systemui.statusbar.NotificationViewHierarchyManager;
+import com.android.systemui.statusbar.PulseExpansionHandler;
+import com.android.systemui.statusbar.SuperStatusBarViewFactory;
+import com.android.systemui.statusbar.SysuiStatusBarStateController;
+import com.android.systemui.statusbar.VibratorHelper;
+import com.android.systemui.statusbar.dagger.StatusBarDependenciesModule;
+import com.android.systemui.statusbar.notification.DynamicPrivacyController;
+import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
+import com.android.systemui.statusbar.notification.VisualStabilityManager;
+import com.android.systemui.statusbar.notification.init.NotificationsController;
+import com.android.systemui.statusbar.notification.interruption.BypassHeadsUpNotifier;
+import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
+import com.android.systemui.statusbar.notification.logging.NotificationLogger;
+import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
+import com.android.systemui.statusbar.notification.row.NotificationRowModule;
+import com.android.systemui.statusbar.phone.AutoHideController;
+import com.android.systemui.statusbar.phone.BiometricUnlockController;
+import com.android.systemui.statusbar.phone.DozeParameters;
+import com.android.systemui.statusbar.phone.DozeScrimController;
+import com.android.systemui.statusbar.phone.DozeServiceHost;
+import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
+import com.android.systemui.statusbar.phone.KeyguardBypassController;
+import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
+import com.android.systemui.statusbar.phone.KeyguardLiftController;
+import com.android.systemui.statusbar.phone.LightBarController;
+import com.android.systemui.statusbar.phone.LightsOutNotifController;
+import com.android.systemui.statusbar.phone.LockscreenLockIconController;
+import com.android.systemui.statusbar.phone.LockscreenWallpaper;
+import com.android.systemui.statusbar.phone.NotificationGroupManager;
+import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
+import com.android.systemui.statusbar.phone.PhoneStatusBarPolicy;
+import com.android.systemui.statusbar.phone.ScrimController;
+import com.android.systemui.statusbar.phone.ShadeController;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
+import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter;
+import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
+import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
+import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneDependenciesModule;
+import com.android.systemui.statusbar.policy.BatteryController;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.ExtensionController;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
+import com.android.systemui.statusbar.policy.NetworkController;
+import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
+import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
+import com.android.systemui.statusbar.policy.UserSwitcherController;
+import com.android.systemui.volume.VolumeComponent;
+
+import java.util.Optional;
+import java.util.concurrent.Executor;
+
+import javax.inject.Named;
+import javax.inject.Provider;
+import javax.inject.Singleton;
+
+import dagger.Lazy;
+import dagger.Module;
+import dagger.Provides;
+
+/**
+ * Dagger Module providing {@link UnusedStatusBar}.
+ */
+@Module(includes = {StatusBarDependenciesModule.class, StatusBarPhoneDependenciesModule.class,
+        NotificationRowModule.class})
+public interface UnusedStatusBarModule {
+    /**
+     * Provides our instance of StatusBar which is considered optional.
+     */
+    @Provides
+    @Singleton
+    static UnusedStatusBar provideStatusBar(
+            Context context,
+            NotificationsController notificationsController,
+            LightBarController lightBarController,
+            AutoHideController autoHideController,
+            KeyguardUpdateMonitor keyguardUpdateMonitor,
+            StatusBarIconController statusBarIconController,
+            PulseExpansionHandler pulseExpansionHandler,
+            NotificationWakeUpCoordinator notificationWakeUpCoordinator,
+            KeyguardBypassController keyguardBypassController,
+            KeyguardStateController keyguardStateController,
+            HeadsUpManagerPhone headsUpManagerPhone,
+            DynamicPrivacyController dynamicPrivacyController,
+            BypassHeadsUpNotifier bypassHeadsUpNotifier,
+            FalsingManager falsingManager,
+            BroadcastDispatcher broadcastDispatcher,
+            RemoteInputQuickSettingsDisabler remoteInputQuickSettingsDisabler,
+            NotificationGutsManager notificationGutsManager,
+            NotificationLogger notificationLogger,
+            NotificationInterruptStateProvider notificationInterruptStateProvider,
+            NotificationViewHierarchyManager notificationViewHierarchyManager,
+            KeyguardViewMediator keyguardViewMediator,
+            DisplayMetrics displayMetrics,
+            MetricsLogger metricsLogger,
+            @UiBackground Executor uiBgExecutor,
+            NotificationMediaManager notificationMediaManager,
+            NotificationLockscreenUserManager lockScreenUserManager,
+            NotificationRemoteInputManager remoteInputManager,
+            UserSwitcherController userSwitcherController,
+            NetworkController networkController,
+            BatteryController batteryController,
+            SysuiColorExtractor colorExtractor,
+            ScreenLifecycle screenLifecycle,
+            WakefulnessLifecycle wakefulnessLifecycle,
+            SysuiStatusBarStateController statusBarStateController,
+            VibratorHelper vibratorHelper,
+            BubbleController bubbleController,
+            NotificationGroupManager groupManager,
+            VisualStabilityManager visualStabilityManager,
+            DeviceProvisionedController deviceProvisionedController,
+            NavigationBarController navigationBarController,
+            Lazy<AssistManager> assistManagerLazy,
+            ConfigurationController configurationController,
+            NotificationShadeWindowController notificationShadeWindowController,
+            LockscreenLockIconController lockscreenLockIconController,
+            DozeParameters dozeParameters,
+            ScrimController scrimController,
+            @Nullable KeyguardLiftController keyguardLiftController,
+            Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
+            Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
+            DozeServiceHost dozeServiceHost,
+            PowerManager powerManager,
+            ScreenPinningRequest screenPinningRequest,
+            DozeScrimController dozeScrimController,
+            VolumeComponent volumeComponent,
+            CommandQueue commandQueue,
+            Optional<Recents> recentsOptional,
+            Provider<StatusBarComponent.Builder> statusBarComponentBuilder,
+            PluginManager pluginManager,
+            Optional<Divider> dividerOptional,
+            LightsOutNotifController lightsOutNotifController,
+            StatusBarNotificationActivityStarter.Builder
+                    statusBarNotificationActivityStarterBuilder,
+            ShadeController shadeController,
+            SuperStatusBarViewFactory superStatusBarViewFactory,
+            StatusBarKeyguardViewManager statusBarKeyguardViewManager,
+            ViewMediatorCallback viewMediatorCallback,
+            InitController initController,
+            DarkIconDispatcher darkIconDispatcher,
+            @Named(TIME_TICK_HANDLER_NAME) Handler timeTickHandler,
+            PluginDependencyProvider pluginDependencyProvider,
+            KeyguardDismissUtil keyguardDismissUtil,
+            ExtensionController extensionController,
+            UserInfoControllerImpl userInfoControllerImpl,
+            PhoneStatusBarPolicy phoneStatusBarPolicy,
+            KeyguardIndicationController keyguardIndicationController,
+            Lazy<NotificationShadeDepthController> notificationShadeDepthController,
+            DismissCallbackRegistry dismissCallbackRegistry,
+            StatusBarTouchableRegionManager statusBarTouchableRegionManager) {
+        return new UnusedStatusBar(
+                context,
+                notificationsController,
+                lightBarController,
+                autoHideController,
+                keyguardUpdateMonitor,
+                statusBarIconController,
+                pulseExpansionHandler,
+                notificationWakeUpCoordinator,
+                keyguardBypassController,
+                keyguardStateController,
+                headsUpManagerPhone,
+                dynamicPrivacyController,
+                bypassHeadsUpNotifier,
+                falsingManager,
+                broadcastDispatcher,
+                remoteInputQuickSettingsDisabler,
+                notificationGutsManager,
+                notificationLogger,
+                notificationInterruptStateProvider,
+                notificationViewHierarchyManager,
+                keyguardViewMediator,
+                displayMetrics,
+                metricsLogger,
+                uiBgExecutor,
+                notificationMediaManager,
+                lockScreenUserManager,
+                remoteInputManager,
+                userSwitcherController,
+                networkController,
+                batteryController,
+                colorExtractor,
+                screenLifecycle,
+                wakefulnessLifecycle,
+                statusBarStateController,
+                vibratorHelper,
+                bubbleController,
+                groupManager,
+                visualStabilityManager,
+                deviceProvisionedController,
+                navigationBarController,
+                assistManagerLazy,
+                configurationController,
+                notificationShadeWindowController,
+                lockscreenLockIconController,
+                dozeParameters,
+                scrimController,
+                keyguardLiftController,
+                lockscreenWallpaperLazy,
+                biometricUnlockControllerLazy,
+                dozeServiceHost,
+                powerManager,
+                screenPinningRequest,
+                dozeScrimController,
+                volumeComponent,
+                commandQueue,
+                recentsOptional,
+                statusBarComponentBuilder,
+                pluginManager,
+                dividerOptional,
+                lightsOutNotifController,
+                statusBarNotificationActivityStarterBuilder,
+                shadeController,
+                superStatusBarViewFactory,
+                statusBarKeyguardViewManager,
+                viewMediatorCallback,
+                initController,
+                darkIconDispatcher,
+                timeTickHandler,
+                pluginDependencyProvider,
+                keyguardDismissUtil,
+                extensionController,
+                userInfoControllerImpl,
+                phoneStatusBarPolicy,
+                keyguardIndicationController,
+                dismissCallbackRegistry,
+                notificationShadeDepthController,
+                statusBarTouchableRegionManager);
+    }
+}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullScreenUserSwitcherViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullScreenUserSwitcherViewController.java
index 10b2b97..aac4cfb 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullScreenUserSwitcherViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullScreenUserSwitcherViewController.java
@@ -18,6 +18,8 @@
 
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
+import android.car.Car;
+import android.car.user.CarUserManager;
 import android.content.Context;
 import android.content.res.Resources;
 import android.view.View;
@@ -25,6 +27,7 @@
 import androidx.recyclerview.widget.GridLayoutManager;
 
 import com.android.systemui.R;
+import com.android.systemui.car.CarServiceProvider;
 import com.android.systemui.car.window.OverlayViewController;
 import com.android.systemui.car.window.OverlayViewGlobalStateController;
 import com.android.systemui.dagger.qualifiers.Main;
@@ -39,7 +42,9 @@
 public class FullScreenUserSwitcherViewController extends OverlayViewController {
     private final Context mContext;
     private final Resources mResources;
+    private final CarServiceProvider mCarServiceProvider;
     private final int mShortAnimationDuration;
+    private CarUserManager mCarUserManager;
     private UserGridRecyclerView mUserGridView;
     private UserGridRecyclerView.UserSelectionListener mUserSelectionListener;
 
@@ -47,10 +52,16 @@
     public FullScreenUserSwitcherViewController(
             Context context,
             @Main Resources resources,
+            CarServiceProvider carServiceProvider,
             OverlayViewGlobalStateController overlayViewGlobalStateController) {
         super(R.id.fullscreen_user_switcher_stub, overlayViewGlobalStateController);
         mContext = context;
         mResources = resources;
+        mCarServiceProvider = carServiceProvider;
+        mCarServiceProvider.addListener(car -> {
+            mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE);
+            registerCarUserManagerIfPossible();
+        });
         mShortAnimationDuration = mResources.getInteger(android.R.integer.config_shortAnimTime);
     }
 
@@ -63,6 +74,12 @@
         mUserGridView.setLayoutManager(layoutManager);
         mUserGridView.buildAdapter();
         mUserGridView.setUserSelectionListener(mUserSelectionListener);
+        registerCarUserManagerIfPossible();
+    }
+
+    @Override
+    protected boolean shouldFocusWindow() {
+        return false;
     }
 
     @Override
@@ -91,18 +108,6 @@
     }
 
     /**
-     * Invalidate underlying view.
-     */
-    void invalidate() {
-        if (getLayout() == null) {
-            // layout hasn't been inflated.
-            return;
-        }
-
-        getLayout().invalidate();
-    }
-
-    /**
      * Set {@link UserGridRecyclerView.UserSelectionListener}.
      */
     void setUserGridSelectionListener(
@@ -110,15 +115,9 @@
         mUserSelectionListener = userGridSelectionListener;
     }
 
-    /**
-     * Returns {@code true} when layout is visible.
-     */
-    boolean isVisible() {
-        if (getLayout() == null) {
-            // layout hasn't been inflated.
-            return false;
+    private void registerCarUserManagerIfPossible() {
+        if (mUserGridView != null && mCarUserManager != null) {
+            mUserGridView.setCarUserManager(mCarUserManager);
         }
-
-        return getLayout().getVisibility() == View.VISIBLE;
     }
 }
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java
index a526e69..a374df6 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java
@@ -24,11 +24,15 @@
 
 import android.annotation.IntDef;
 import android.annotation.Nullable;
+import android.annotation.UserIdInt;
 import android.app.ActivityManager;
 import android.app.AlertDialog;
 import android.app.AlertDialog.Builder;
 import android.app.Dialog;
-import android.car.userlib.CarUserManagerHelper;
+import android.car.user.CarUserManager;
+import android.car.user.UserCreationResult;
+import android.car.user.UserSwitchResult;
+import android.car.userlib.UserHelper;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.DialogInterface;
@@ -40,7 +44,9 @@
 import android.os.AsyncTask;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.sysprop.CarProperties;
 import android.util.AttributeSet;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -54,6 +60,7 @@
 import androidx.recyclerview.widget.GridLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
+import com.android.internal.infra.AndroidFuture;
 import com.android.internal.util.UserIcons;
 import com.android.systemui.R;
 
@@ -61,6 +68,7 @@
 import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 /**
@@ -68,9 +76,12 @@
  * One of the uses of this is for the lock screen in auto.
  */
 public class UserGridRecyclerView extends RecyclerView {
+    private static final String TAG = UserGridRecyclerView.class.getSimpleName();
+    private static final int TIMEOUT_MS = CarProperties.user_hal_timeout().orElse(5_000) + 500;
+
     private UserSelectionListener mUserSelectionListener;
     private UserAdapter mAdapter;
-    private CarUserManagerHelper mCarUserManagerHelper;
+    private CarUserManager mCarUserManager;
     private UserManager mUserManager;
     private Context mContext;
     private UserIconProvider mUserIconProvider;
@@ -85,7 +96,6 @@
     public UserGridRecyclerView(Context context, AttributeSet attrs) {
         super(context, attrs);
         mContext = context;
-        mCarUserManagerHelper = new CarUserManagerHelper(mContext);
         mUserManager = UserManager.get(mContext);
         mUserIconProvider = new UserIconProvider();
 
@@ -184,6 +194,11 @@
         mUserSelectionListener = userSelectionListener;
     }
 
+    /** Sets a {@link CarUserManager}. */
+    public void setCarUserManager(CarUserManager carUserManager) {
+        mCarUserManager = carUserManager;
+    }
+
     private void onUsersUpdate() {
         mAdapter.clearUsers();
         mAdapter.updateUsers(createUserRecords(getUsersForUserGrid()));
@@ -273,7 +288,9 @@
                         notifyUserSelected(userRecord);
                         UserInfo guest = createNewOrFindExistingGuest(mContext);
                         if (guest != null) {
-                            mCarUserManagerHelper.switchToUser(guest);
+                            if (!switchUser(guest.id)) {
+                                Log.e(TAG, "Failed to switch to guest user: " + guest.id);
+                            }
                         }
                         break;
                     case UserRecord.ADD_USER:
@@ -289,7 +306,9 @@
                         // If the user doesn't want to be a guest or add a user, switch to the user
                         // selected
                         notifyUserSelected(userRecord);
-                        mCarUserManagerHelper.switchToUser(userRecord.mInfo);
+                        if (!switchUser(userRecord.mInfo.id)) {
+                            Log.e(TAG, "Failed to switch users: " + userRecord.mInfo.id);
+                        }
                 }
             });
 
@@ -430,8 +449,9 @@
          */
         @Nullable
         public UserInfo createNewOrFindExistingGuest(Context context) {
+            AndroidFuture<UserCreationResult> future = mCarUserManager.createGuest(mGuestName);
             // CreateGuest will return null if a guest already exists.
-            UserInfo newGuest = mUserManager.createGuest(context, mGuestName);
+            UserInfo newGuest = getUserInfo(future);
             if (newGuest != null) {
                 new UserIconProvider().assignDefaultIcon(
                         mUserManager, context.getResources(), newGuest);
@@ -444,7 +464,6 @@
         @Override
         public void onClick(DialogInterface dialog, int which) {
             if (which == BUTTON_POSITIVE) {
-                notifyUserSelected(mAddUserRecord);
                 new AddNewUserTask().execute(mNewUserName);
             } else if (which == BUTTON_NEGATIVE) {
                 // Enable the add button only if cancel
@@ -462,11 +481,77 @@
             }
         }
 
+        @Nullable
+        private UserInfo getUserInfo(AndroidFuture<UserCreationResult> future) {
+            UserCreationResult userCreationResult;
+            try {
+                userCreationResult = future.get(TIMEOUT_MS, TimeUnit.MILLISECONDS);
+            } catch (Exception e) {
+                Log.w(TAG, "Could not create user.", e);
+                return null;
+            }
+
+            if (userCreationResult == null) {
+                Log.w(TAG, "Timed out while creating user: " + TIMEOUT_MS + "ms");
+                return null;
+            }
+            if (!userCreationResult.isSuccess() || userCreationResult.getUser() == null) {
+                Log.w(TAG, "Could not create user: " + userCreationResult);
+                return null;
+            }
+
+            return userCreationResult.getUser();
+        }
+
+        private boolean switchUser(@UserIdInt int userId) {
+            AndroidFuture<UserSwitchResult> userSwitchResultFuture =
+                    mCarUserManager.switchUser(userId);
+            UserSwitchResult userSwitchResult;
+            try {
+                userSwitchResult = userSwitchResultFuture.get(TIMEOUT_MS, TimeUnit.MILLISECONDS);
+            } catch (Exception e) {
+                Log.w(TAG, "Could not switch user.", e);
+                return false;
+            }
+
+            if (userSwitchResult == null) {
+                Log.w(TAG, "Timed out while switching user: " + TIMEOUT_MS + "ms");
+                return false;
+            }
+            if (!userSwitchResult.isSuccess()) {
+                Log.w(TAG, "Could not switch user: " + userSwitchResult);
+                return false;
+            }
+
+            return true;
+        }
+
+        // TODO(b/161539497): Replace AsyncTask with standard {@link java.util.concurrent} code.
         private class AddNewUserTask extends AsyncTask<String, Void, UserInfo> {
 
             @Override
             protected UserInfo doInBackground(String... userNames) {
-                return mCarUserManagerHelper.createNewNonAdminUser(userNames[0]);
+                AndroidFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0],
+                        /* flags= */ 0);
+                try {
+                    UserInfo user = getUserInfo(future);
+                    if (user != null) {
+                        UserHelper.setDefaultNonAdminRestrictions(mContext, user,
+                                /* enable= */ true);
+                        UserHelper.assignDefaultIcon(mContext, user);
+                        mAddUserRecord = new UserRecord(user, UserRecord.ADD_USER);
+                        return user;
+                    } else {
+                        Log.e(TAG, "Failed to create user in the background");
+                        return user;
+                    }
+                } catch (Exception e) {
+                    if (e instanceof InterruptedException) {
+                        Thread.currentThread().interrupt();
+                    }
+                    Log.e(TAG, "Error creating new user: ", e);
+                }
+                return null;
             }
 
             @Override
@@ -476,7 +561,11 @@
             @Override
             protected void onPostExecute(UserInfo user) {
                 if (user != null) {
-                    mCarUserManagerHelper.switchToUser(user);
+                    notifyUserSelected(mAddUserRecord);
+                    mAddUserView.setEnabled(true);
+                    if (!switchUser(user.id)) {
+                        Log.e(TAG, "Failed to switch to new user: " + user.id);
+                    }
                 }
                 if (mAddUserView != null) {
                     mAddUserView.setEnabled(true);
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewController.java
index 45f3d34..0d77c13 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewController.java
@@ -91,6 +91,11 @@
                 R.integer.config_userSwitchTransitionViewShownTimeoutMs);
     }
 
+    @Override
+    protected int getInsetTypesToFit() {
+        return 0;
+    }
+
     /**
      * Makes the user switch transition view appear and draws the content inside of it if a user
      * that is different from the previous user is provided and if the dialog is not already
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediator.java
index aea6914..7db2823 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediator.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediator.java
@@ -16,12 +16,12 @@
 
 package com.android.systemui.car.userswitcher;
 
-import android.app.ActivityManager;
 import android.car.Car;
 import android.car.user.CarUserManager;
 import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.systemui.car.CarDeviceProvisionedController;
 import com.android.systemui.car.CarServiceProvider;
 import com.android.systemui.car.window.OverlayViewMediator;
 
@@ -36,13 +36,16 @@
     private static final String TAG = "UserSwitchTransitionViewMediator";
 
     private final CarServiceProvider mCarServiceProvider;
+    private final CarDeviceProvisionedController mCarDeviceProvisionedController;
     private final UserSwitchTransitionViewController mUserSwitchTransitionViewController;
 
     @Inject
     public UserSwitchTransitionViewMediator(
             CarServiceProvider carServiceProvider,
+            CarDeviceProvisionedController carDeviceProvisionedController,
             UserSwitchTransitionViewController userSwitchTransitionViewController) {
         mCarServiceProvider = carServiceProvider;
+        mCarDeviceProvisionedController = carDeviceProvisionedController;
         mUserSwitchTransitionViewController = userSwitchTransitionViewController;
     }
 
@@ -74,7 +77,7 @@
     @VisibleForTesting
     void handleUserLifecycleEvent(CarUserManager.UserLifecycleEvent event) {
         if (event.getEventType() == CarUserManager.USER_LIFECYCLE_EVENT_TYPE_STARTING
-                && ActivityManager.getCurrentUser() == event.getUserId()) {
+                && mCarDeviceProvisionedController.getCurrentUser() == event.getUserId()) {
             mUserSwitchTransitionViewController.handleShow(event.getUserId());
         }
 
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java
index 45808a8..3c9879c 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java
@@ -191,6 +191,38 @@
         }
     }
 
+    /** Checks if a {@link MotionEvent} is an action to open the panel.
+     * @param e {@link MotionEvent} to check.
+     * @return true only if opening action.
+     */
+    protected boolean isOpeningAction(MotionEvent e) {
+        if (mAnimateDirection == POSITIVE_DIRECTION) {
+            return e.getActionMasked() == MotionEvent.ACTION_DOWN;
+        }
+
+        if (mAnimateDirection == NEGATIVE_DIRECTION) {
+            return e.getActionMasked() == MotionEvent.ACTION_UP;
+        }
+
+        return false;
+    }
+
+    /** Checks if a {@link MotionEvent} is an action to close the panel.
+     * @param e {@link MotionEvent} to check.
+     * @return true only if closing action.
+     */
+    protected boolean isClosingAction(MotionEvent e) {
+        if (mAnimateDirection == POSITIVE_DIRECTION) {
+            return e.getActionMasked() == MotionEvent.ACTION_UP;
+        }
+
+        if (mAnimateDirection == NEGATIVE_DIRECTION) {
+            return e.getActionMasked() == MotionEvent.ACTION_DOWN;
+        }
+
+        return false;
+    }
+
     /* ***************************************************************************************** *
      * Panel Animation
      * ***************************************************************************************** */
@@ -206,7 +238,6 @@
         }
 
         onAnimateCollapsePanel();
-        getOverlayViewGlobalStateController().setWindowFocusable(false);
         animatePanel(mClosingVelocity, /* isClosing= */ true);
     }
 
@@ -243,8 +274,7 @@
      * Depending on certain conditions, determines whether to fully expand or collapse the panel.
      */
     protected void maybeCompleteAnimation(MotionEvent event) {
-        if (event.getActionMasked() == MotionEvent.ACTION_UP
-                && isPanelVisible()) {
+        if (isClosingAction(event) && isPanelVisible()) {
             if (mSettleClosePercentage < mPercentageFromEndingEdge) {
                 animatePanel(DEFAULT_FLING_VELOCITY, false);
             } else {
@@ -266,14 +296,17 @@
             float from = getCurrentStartPosition(rect);
             if (from != to) {
                 animate(from, to, velocity, isClosing);
-                return;
             }
+
+            // If we swipe down the notification panel all the way to the bottom of the screen
+            // (i.e. from == to), then we have finished animating the panel.
+            return;
         }
 
         // We will only be here if the shade is being opened programmatically or via button when
         // height of the layout was not calculated.
-        ViewTreeObserver notificationTreeObserver = getLayout().getViewTreeObserver();
-        notificationTreeObserver.addOnGlobalLayoutListener(
+        ViewTreeObserver panelTreeObserver = getLayout().getViewTreeObserver();
+        panelTreeObserver.addOnGlobalLayoutListener(
                 new ViewTreeObserver.OnGlobalLayoutListener() {
                     @Override
                     public void onGlobalLayout() {
@@ -381,7 +414,6 @@
             getOverlayViewGlobalStateController().hideView(/* panelViewController= */ this);
         }
         getLayout().setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
-        getOverlayViewGlobalStateController().setWindowFocusable(visible);
     }
 
     /* ***************************************************************************************** *
@@ -476,6 +508,11 @@
         return mIsTracking;
     }
 
+    /** Sets whether the panel is currently tracking or not. */
+    protected final void setIsTracking(boolean isTracking) {
+        mIsTracking = isTracking;
+    }
+
     /** Returns {@code true} if the panel is currently animating. */
     protected final boolean isAnimating() {
         return mIsAnimating;
@@ -514,7 +551,7 @@
             }
             setPanelVisible(true);
 
-            // clips the view for the notification shade when the user scrolls to open.
+            // clips the view for the panel when the user scrolls to open.
             setViewClipBounds((int) event2.getRawY());
 
             // Initially the scroll starts with height being zero. This checks protects from divide
@@ -569,11 +606,11 @@
                 boolean isInClosingDirection = mAnimateDirection * distanceY > 0;
 
                 // This check is to figure out if onScroll was called while swiping the card at
-                // bottom of the list. At that time we should not allow notification shade to
+                // bottom of the panel. At that time we should not allow panel to
                 // close. We are also checking for the upwards swipe gesture here because it is
-                // possible if a user is closing the notification shade and while swiping starts
+                // possible if a user is closing the panel and while swiping starts
                 // to open again but does not fling. At that time we should allow the
-                // notification shade to close fully or else it would stuck in between.
+                // panel to close fully or else it would stuck in between.
                 if (Math.abs(getLayout().getHeight() - y)
                         > SWIPE_DOWN_MIN_DISTANCE && isInClosingDirection) {
                     setViewClipBounds((int) y);
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewController.java
index 3969f92..8adc1ad 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewController.java
@@ -16,9 +16,12 @@
 
 package com.android.systemui.car.window;
 
+import static android.view.WindowInsets.Type.statusBars;
+
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewStub;
+import android.view.WindowInsets;
 
 /**
  * Owns a {@link View} that is present in SystemUIOverlayWindow.
@@ -133,9 +136,18 @@
     }
 
     /**
-     * Returns {@code true} if navigation bar should be displayed over this view.
+     * Returns {@code true} if navigation bar insets should be displayed over this view. Has no
+     * effect if {@link #shouldFocusWindow} returns {@code false}.
      */
-    protected boolean shouldShowNavigationBar() {
+    protected boolean shouldShowNavigationBarInsets() {
+        return false;
+    }
+
+    /**
+     * Returns {@code true} if status bar insets should be displayed over this view. Has no
+     * effect if {@link #shouldFocusWindow} returns {@code false}.
+     */
+    protected boolean shouldShowStatusBarInsets() {
         return false;
     }
 
@@ -145,4 +157,22 @@
     protected boolean shouldShowWhenOccluded() {
         return false;
     }
+
+    /**
+     * Returns {@code true} if the window should be focued when this view is visible. Note that
+     * returning {@code false} here means that {@link #shouldShowStatusBarInsets} and
+     * {@link #shouldShowNavigationBarInsets} will have no effect.
+     */
+    protected boolean shouldFocusWindow() {
+        return true;
+    }
+
+    /**
+     * Returns the insets types to fit to the sysui overlay window when this
+     * {@link OverlayViewController} is in the foreground.
+     */
+    @WindowInsets.Type.InsetsType
+    protected int getInsetTypesToFit() {
+        return statusBars();
+    }
 }
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewGlobalStateController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewGlobalStateController.java
index 8e94109..55f0975 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewGlobalStateController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewGlobalStateController.java
@@ -16,13 +16,16 @@
 
 package com.android.systemui.car.window;
 
+import static android.view.WindowInsets.Type.navigationBars;
+import static android.view.WindowInsets.Type.statusBars;
+
 import android.annotation.Nullable;
 import android.util.Log;
+import android.view.WindowInsets.Type.InsetsType;
+import android.view.WindowInsetsController;
 
 import androidx.annotation.VisibleForTesting;
 
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -48,10 +51,7 @@
     private static final String TAG = OverlayViewGlobalStateController.class.getSimpleName();
     private static final int UNKNOWN_Z_ORDER = -1;
     private final SystemUIOverlayWindowController mSystemUIOverlayWindowController;
-    private final CarNavigationBarController mCarNavigationBarController;
-
-    private boolean mIsOccluded;
-
+    private final WindowInsetsController mWindowInsetsController;
     @VisibleForTesting
     Map<OverlayViewController, Integer> mZOrderMap;
     @VisibleForTesting
@@ -60,14 +60,15 @@
     Set<OverlayViewController> mViewsHiddenForOcclusion;
     @VisibleForTesting
     OverlayViewController mHighestZOrder;
+    private boolean mIsOccluded;
 
     @Inject
     public OverlayViewGlobalStateController(
-            CarNavigationBarController carNavigationBarController,
             SystemUIOverlayWindowController systemUIOverlayWindowController) {
         mSystemUIOverlayWindowController = systemUIOverlayWindowController;
         mSystemUIOverlayWindowController.attach();
-        mCarNavigationBarController = carNavigationBarController;
+        mWindowInsetsController =
+                mSystemUIOverlayWindowController.getBaseLayout().getWindowInsetsController();
         mZOrderMap = new HashMap<>();
         mZOrderVisibleSortedMap = new TreeMap<>();
         mViewsHiddenForOcclusion = new HashSet<>();
@@ -115,7 +116,10 @@
         }
 
         updateInternalsWhenShowingView(viewController);
+        refreshInsetTypesToFit();
+        refreshWindowFocus();
         refreshNavigationBarVisibility();
+        refreshStatusBarVisibility();
 
         Log.d(TAG, "Content shown: " + viewController.getClass().getName());
         debugLog();
@@ -185,7 +189,10 @@
 
         mZOrderVisibleSortedMap.remove(mZOrderMap.get(viewController));
         refreshHighestZOrderWhenHidingView(viewController);
+        refreshInsetTypesToFit();
+        refreshWindowFocus();
         refreshNavigationBarVisibility();
+        refreshStatusBarVisibility();
 
         if (mZOrderVisibleSortedMap.isEmpty()) {
             setWindowVisible(false);
@@ -208,10 +215,42 @@
     }
 
     private void refreshNavigationBarVisibility() {
-        if (mZOrderVisibleSortedMap.isEmpty() || mHighestZOrder.shouldShowNavigationBar()) {
-            mCarNavigationBarController.showBars();
+        if (mZOrderVisibleSortedMap.isEmpty()) {
+            mWindowInsetsController.show(navigationBars());
+            return;
+        }
+
+        // Do not hide navigation bar insets if the window is not focusable.
+        if (mHighestZOrder.shouldFocusWindow() && !mHighestZOrder.shouldShowNavigationBarInsets()) {
+            mWindowInsetsController.hide(navigationBars());
         } else {
-            mCarNavigationBarController.hideBars();
+            mWindowInsetsController.show(navigationBars());
+        }
+    }
+
+    private void refreshStatusBarVisibility() {
+        if (mZOrderVisibleSortedMap.isEmpty()) {
+            mWindowInsetsController.show(statusBars());
+            return;
+        }
+
+        // Do not hide status bar insets if the window is not focusable.
+        if (mHighestZOrder.shouldFocusWindow() && !mHighestZOrder.shouldShowStatusBarInsets()) {
+            mWindowInsetsController.hide(statusBars());
+        } else {
+            mWindowInsetsController.show(statusBars());
+        }
+    }
+
+    private void refreshWindowFocus() {
+        setWindowFocusable(mHighestZOrder == null ? false : mHighestZOrder.shouldFocusWindow());
+    }
+
+    private void refreshInsetTypesToFit() {
+        if (mZOrderVisibleSortedMap.isEmpty()) {
+            setFitInsetsTypes(statusBars());
+        } else {
+            setFitInsetsTypes(mHighestZOrder.getInsetTypesToFit());
         }
     }
 
@@ -224,6 +263,10 @@
         mSystemUIOverlayWindowController.setWindowVisible(visible);
     }
 
+    private void setFitInsetsTypes(@InsetsType int types) {
+        mSystemUIOverlayWindowController.setFitInsetsTypes(types);
+    }
+
     /**
      * Sets the {@link android.view.WindowManager.LayoutParams#FLAG_ALT_FOCUSABLE_IM} flag of the
      * sysui overlay window.
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowController.java
index bcd96f6..c955fab 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowController.java
@@ -16,6 +16,7 @@
 
 package com.android.systemui.car.window;
 
+import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
 import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
 
 import android.content.Context;
@@ -25,6 +26,7 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowInsets;
 import android.view.WindowManager;
 
 import com.android.systemui.R;
@@ -99,17 +101,23 @@
                 PixelFormat.TRANSLUCENT);
         mLp.token = new Binder();
         mLp.gravity = Gravity.TOP;
-        mLp.setFitInsetsTypes(/* types= */ 0);
         mLp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
         mLp.setTitle("SystemUIOverlayWindow");
         mLp.packageName = mContext.getPackageName();
         mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
+        mLp.insetsFlags.behavior = BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
 
         mWindowManager.addView(mBaseLayout, mLp);
         mLpChanged.copyFrom(mLp);
         setWindowVisible(false);
     }
 
+    /** Sets the types of insets to fit. Note: This should be rarely used. */
+    public void setFitInsetsTypes(@WindowInsets.Type.InsetsType int types) {
+        mLpChanged.setFitInsetsTypes(types);
+        updateWindow();
+    }
+
     /** Sets the window to the visible state. */
     public void setWindowVisible(boolean visible) {
         mVisible = visible;
@@ -154,6 +162,7 @@
     private void updateWindow() {
         if (mLp != null && mLp.copyFrom(mLpChanged) != 0) {
             if (isAttached()) {
+                mLp.insetsFlags.behavior = BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
                 mWindowManager.updateViewLayout(mBaseLayout, mLp);
             }
         }
diff --git a/packages/CarSystemUI/src/com/android/systemui/wm/BarControlPolicy.java b/packages/CarSystemUI/src/com/android/systemui/wm/BarControlPolicy.java
new file mode 100644
index 0000000..5f9665f
--- /dev/null
+++ b/packages/CarSystemUI/src/com/android/systemui/wm/BarControlPolicy.java
@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm;
+
+import android.car.settings.CarSettings;
+import android.content.Context;
+import android.database.ContentObserver;
+import android.os.Handler;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.util.ArraySet;
+import android.util.Slog;
+import android.view.WindowInsets;
+
+import androidx.annotation.VisibleForTesting;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+/**
+ * Util class to load PolicyControl and allow for querying if a package matches immersive filters.
+ * Similar to {@link com.android.server.wm.PolicyControl}, but separate due to CarSystemUI needing
+ * to set its own policies for system bar visibilities.
+ *
+ * This forces immersive mode behavior for one or both system bars (based on a package
+ * list).
+ *
+ * Control by setting {@link Settings.Global#POLICY_CONTROL_AUTO} to one or more name-value pairs.
+ * e.g.
+ *   to force immersive mode everywhere:
+ *     "immersive.full=*"
+ *   to force hide status bars for com.package1 but not com.package2:
+ *     "immersive.status=com.package1,-com.package2"
+ *
+ * Separate multiple name-value pairs with ':'
+ *   e.g. "immersive.status=com.package:immersive.navigation=*"
+ */
+public class BarControlPolicy {
+
+    private static final String TAG = "BarControlPolicy";
+    private static final boolean DEBUG = false;
+
+    private static final String NAME_IMMERSIVE_FULL = "immersive.full";
+    private static final String NAME_IMMERSIVE_STATUS = "immersive.status";
+    private static final String NAME_IMMERSIVE_NAVIGATION = "immersive.navigation";
+
+    @VisibleForTesting
+    static String sSettingValue;
+    @VisibleForTesting
+    static Filter sImmersiveStatusFilter;
+    private static Filter sImmersiveNavigationFilter;
+
+    /** Loads values from the POLICY_CONTROL setting to set filters. */
+    static boolean reloadFromSetting(Context context) {
+        if (DEBUG) Slog.d(TAG, "reloadFromSetting()");
+        String value = null;
+        try {
+            value = Settings.Global.getStringForUser(context.getContentResolver(),
+                    CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                    UserHandle.USER_CURRENT);
+            if (sSettingValue == value || sSettingValue != null && sSettingValue.equals(value)) {
+                return false;
+            }
+            setFilters(value);
+            sSettingValue = value;
+        } catch (Throwable t) {
+            Slog.w(TAG, "Error loading policy control, value=" + value, t);
+            return false;
+        }
+        return true;
+    }
+
+    /** Used in testing to reset BarControlPolicy. */
+    @VisibleForTesting
+    static void reset() {
+        sSettingValue = null;
+        sImmersiveStatusFilter = null;
+        sImmersiveNavigationFilter = null;
+    }
+
+    /**
+     * Registers a content observer to listen to updates to the SYSTEM_BAR_VISIBILITY_OVERRIDE flag.
+     */
+    static void registerContentObserver(Context context, Handler handler, FilterListener listener) {
+        context.getContentResolver().registerContentObserver(
+                Settings.Global.getUriFor(CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE), false,
+                new ContentObserver(handler) {
+                    @Override
+                    public void onChange(boolean selfChange) {
+                        if (reloadFromSetting(context)) {
+                            listener.onFilterUpdated();
+                        }
+                    }
+                }, UserHandle.USER_ALL);
+    }
+
+    /**
+     * Returns bar visibilities based on POLICY_CONTROL_AUTO filters and window policies.
+     * @return int[], where the first value is the inset types that should be shown, and the second
+     *         is the inset types that should be hidden.
+     */
+    @WindowInsets.Type.InsetsType
+    static int[] getBarVisibilities(String packageName) {
+        int hideTypes = 0;
+        int showTypes = 0;
+        if (matchesStatusFilter(packageName)) {
+            hideTypes |= WindowInsets.Type.statusBars();
+        } else {
+            showTypes |= WindowInsets.Type.statusBars();
+        }
+        if (matchesNavigationFilter(packageName)) {
+            hideTypes |= WindowInsets.Type.navigationBars();
+        } else {
+            showTypes |= WindowInsets.Type.navigationBars();
+        }
+
+        return new int[] {showTypes, hideTypes};
+    }
+
+    private static boolean matchesStatusFilter(String packageName) {
+        return sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(packageName);
+    }
+
+    private static boolean matchesNavigationFilter(String packageName) {
+        return sImmersiveNavigationFilter != null
+                && sImmersiveNavigationFilter.matches(packageName);
+    }
+
+    private static void setFilters(String value) {
+        if (DEBUG) Slog.d(TAG, "setFilters: " + value);
+        sImmersiveStatusFilter = null;
+        sImmersiveNavigationFilter = null;
+        if (value != null) {
+            String[] nvps = value.split(":");
+            for (String nvp : nvps) {
+                int i = nvp.indexOf('=');
+                if (i == -1) continue;
+                String n = nvp.substring(0, i);
+                String v = nvp.substring(i + 1);
+                if (n.equals(NAME_IMMERSIVE_FULL)) {
+                    Filter f = Filter.parse(v);
+                    sImmersiveStatusFilter = sImmersiveNavigationFilter = f;
+                } else if (n.equals(NAME_IMMERSIVE_STATUS)) {
+                    Filter f = Filter.parse(v);
+                    sImmersiveStatusFilter = f;
+                } else if (n.equals(NAME_IMMERSIVE_NAVIGATION)) {
+                    Filter f = Filter.parse(v);
+                    sImmersiveNavigationFilter = f;
+                }
+            }
+        }
+        if (DEBUG) {
+            Slog.d(TAG, "immersiveStatusFilter: " + sImmersiveStatusFilter);
+            Slog.d(TAG, "immersiveNavigationFilter: " + sImmersiveNavigationFilter);
+        }
+    }
+
+    private static class Filter {
+        private static final String ALL = "*";
+
+        private final ArraySet<String> mWhitelist;
+        private final ArraySet<String> mBlacklist;
+
+        private Filter(ArraySet<String> whitelist, ArraySet<String> blacklist) {
+            mWhitelist = whitelist;
+            mBlacklist = blacklist;
+        }
+
+        boolean matches(String packageName) {
+            if (packageName == null) return false;
+            if (onBlacklist(packageName)) return false;
+            return onWhitelist(packageName);
+        }
+
+        private boolean onBlacklist(String packageName) {
+            return mBlacklist.contains(packageName) || mBlacklist.contains(ALL);
+        }
+
+        private boolean onWhitelist(String packageName) {
+            return mWhitelist.contains(ALL) || mWhitelist.contains(packageName);
+        }
+
+        void dump(PrintWriter pw) {
+            pw.print("Filter[");
+            dump("whitelist", mWhitelist, pw); pw.print(',');
+            dump("blacklist", mBlacklist, pw); pw.print(']');
+        }
+
+        private void dump(String name, ArraySet<String> set, PrintWriter pw) {
+            pw.print(name); pw.print("=(");
+            int n = set.size();
+            for (int i = 0; i < n; i++) {
+                if (i > 0) pw.print(',');
+                pw.print(set.valueAt(i));
+            }
+            pw.print(')');
+        }
+
+        @Override
+        public String toString() {
+            StringWriter sw = new StringWriter();
+            dump(new PrintWriter(sw, true));
+            return sw.toString();
+        }
+
+        // value = comma-delimited list of tokens, where token = (package name|*)
+        // e.g. "com.package1", or "com.android.systemui, com.android.keyguard" or "*"
+        static Filter parse(String value) {
+            if (value == null) return null;
+            ArraySet<String> whitelist = new ArraySet<String>();
+            ArraySet<String> blacklist = new ArraySet<String>();
+            for (String token : value.split(",")) {
+                token = token.trim();
+                if (token.startsWith("-") && token.length() > 1) {
+                    token = token.substring(1);
+                    blacklist.add(token);
+                } else {
+                    whitelist.add(token);
+                }
+            }
+            return new Filter(whitelist, blacklist);
+        }
+    }
+
+    /**
+     * Interface to listen for updates to the filter triggered by the content observer listening to
+     * the SYSTEM_BAR_VISIBILITY_OVERRIDE flag.
+     */
+    interface FilterListener {
+
+        /** Callback triggered when the content observer updates the filter. */
+        void onFilterUpdated();
+    }
+
+    private BarControlPolicy() {}
+}
diff --git a/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsController.java b/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsController.java
new file mode 100644
index 0000000..c9ec34f
--- /dev/null
+++ b/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsController.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm;
+
+import android.os.Handler;
+import android.os.RemoteException;
+import android.util.ArraySet;
+import android.util.Slog;
+import android.util.SparseArray;
+import android.view.IDisplayWindowInsetsController;
+import android.view.InsetsController;
+import android.view.InsetsSourceControl;
+import android.view.InsetsState;
+import android.view.WindowInsets;
+
+import androidx.annotation.VisibleForTesting;
+
+import com.android.systemui.TransactionPool;
+import com.android.systemui.dagger.qualifiers.Main;
+
+import java.util.Objects;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+/**
+ * Controller that maps between displays and {@link IDisplayWindowInsetsController} in order to
+ * give system bar control to SystemUI.
+ * {@link R.bool#config_remoteInsetsControllerControlsSystemBars} determines whether this controller
+ * takes control or not.
+ */
+@Singleton
+public class DisplaySystemBarsController extends DisplayImeController {
+
+    private static final String TAG = "DisplaySystemBarsController";
+
+    private SparseArray<PerDisplay> mPerDisplaySparseArray;
+
+    @Inject
+    public DisplaySystemBarsController(
+            SystemWindows syswin,
+            DisplayController displayController,
+            @Main Handler mainHandler,
+            TransactionPool transactionPool) {
+        super(syswin, displayController, mainHandler, transactionPool);
+    }
+
+    @Override
+    public void onDisplayAdded(int displayId) {
+        PerDisplay pd = new PerDisplay(displayId);
+        try {
+            mSystemWindows.mWmService.setDisplayWindowInsetsController(displayId, pd);
+        } catch (RemoteException e) {
+            Slog.w(TAG, "Unable to set insets controller on display " + displayId);
+        }
+        // Lazy loading policy control filters instead of during boot.
+        if (mPerDisplaySparseArray == null) {
+            mPerDisplaySparseArray = new SparseArray<>();
+            BarControlPolicy.reloadFromSetting(mSystemWindows.mContext);
+            BarControlPolicy.registerContentObserver(mSystemWindows.mContext, mHandler, () -> {
+                int size = mPerDisplaySparseArray.size();
+                for (int i = 0; i < size; i++) {
+                    mPerDisplaySparseArray.valueAt(i).modifyDisplayWindowInsets();
+                }
+            });
+        }
+        mPerDisplaySparseArray.put(displayId, pd);
+    }
+
+    @Override
+    public void onDisplayRemoved(int displayId) {
+        try {
+            mSystemWindows.mWmService.setDisplayWindowInsetsController(displayId, null);
+        } catch (RemoteException e) {
+            Slog.w(TAG, "Unable to remove insets controller on display " + displayId);
+        }
+        mPerDisplaySparseArray.remove(displayId);
+    }
+
+    @VisibleForTesting
+    class PerDisplay extends DisplayImeController.PerDisplay {
+
+        int mDisplayId;
+        InsetsController mInsetsController;
+        InsetsState mInsetsState = new InsetsState();
+        String mPackageName;
+
+        PerDisplay(int displayId) {
+            super(displayId,
+                    mSystemWindows.mDisplayController.getDisplayLayout(displayId).rotation());
+            mDisplayId = displayId;
+            mInsetsController = new InsetsController(
+                    new DisplaySystemBarsInsetsControllerHost(mHandler, this));
+        }
+
+        @Override
+        public void insetsChanged(InsetsState insetsState) {
+            super.insetsChanged(insetsState);
+            if (mInsetsState.equals(insetsState)) {
+                return;
+            }
+            mInsetsState.set(insetsState, true /* copySources */);
+            mInsetsController.onStateChanged(insetsState);
+            if (mPackageName != null) {
+                modifyDisplayWindowInsets();
+            }
+        }
+
+        @Override
+        public void insetsControlChanged(InsetsState insetsState,
+                InsetsSourceControl[] activeControls) {
+            super.insetsControlChanged(insetsState, activeControls);
+            mInsetsController.onControlsChanged(activeControls);
+        }
+
+        @Override
+        public void hideInsets(@WindowInsets.Type.InsetsType int types, boolean fromIme) {
+            if ((types & WindowInsets.Type.ime()) == 0) {
+                mInsetsController.hide(types);
+            } else {
+                super.hideInsets(types, fromIme);
+            }
+
+        }
+
+        @Override
+        public void showInsets(@WindowInsets.Type.InsetsType int types, boolean fromIme) {
+            if ((types & WindowInsets.Type.ime()) == 0) {
+                mInsetsController.show(types);
+            } else {
+                super.showInsets(types, fromIme);
+            }
+
+        }
+
+        @Override
+        public void topFocusedWindowChanged(String packageName) {
+            if (Objects.equals(mPackageName, packageName)) {
+                return;
+            }
+            mPackageName = packageName;
+            modifyDisplayWindowInsets();
+        }
+
+        private void modifyDisplayWindowInsets() {
+            if (mPackageName == null) {
+                return;
+            }
+            int[] barVisibilities = BarControlPolicy.getBarVisibilities(mPackageName);
+            updateInsetsState(barVisibilities[0], /* visible= */ true);
+            updateInsetsState(barVisibilities[1], /* visible= */ false);
+            showInsets(barVisibilities[0], /* fromIme= */ false);
+            hideInsets(barVisibilities[1], /* fromIme= */ false);
+            try {
+                mSystemWindows.mWmService.modifyDisplayWindowInsets(mDisplayId, mInsetsState);
+            } catch (RemoteException e) {
+                Slog.w(TAG, "Unable to update window manager service.");
+            }
+        }
+
+        private void updateInsetsState(@WindowInsets.Type.InsetsType int types, boolean visible) {
+            ArraySet<Integer> internalTypes = InsetsState.toInternalType(types);
+            for (int i = internalTypes.size() - 1; i >= 0; i--) {
+                mInsetsState.getSource(internalTypes.valueAt(i)).setVisible(visible);
+            }
+        }
+    }
+}
diff --git a/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsInsetsControllerHost.java b/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsInsetsControllerHost.java
new file mode 100644
index 0000000..2f8da44
--- /dev/null
+++ b/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsInsetsControllerHost.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm;
+
+import android.annotation.NonNull;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.IDisplayWindowInsetsController;
+import android.view.InsetsController;
+import android.view.InsetsState;
+import android.view.SurfaceControl;
+import android.view.SyncRtSurfaceTransactionApplier;
+import android.view.WindowInsets;
+import android.view.WindowInsetsAnimation;
+import android.view.WindowInsetsController;
+import android.view.inputmethod.InputMethodManager;
+
+import java.util.List;
+
+/**
+ * Implements {@link InsetsController.Host} for usage by
+ * {@link DisplaySystemBarsController.PerDisplay} instances in {@link DisplaySystemBarsController}.
+ * @hide
+ */
+public class DisplaySystemBarsInsetsControllerHost implements InsetsController.Host {
+
+    private static final String TAG = DisplaySystemBarsInsetsControllerHost.class.getSimpleName();
+
+    private final Handler mHandler;
+    private final IDisplayWindowInsetsController mController;
+    private final float[] mTmpFloat9 = new float[9];
+
+    public DisplaySystemBarsInsetsControllerHost(
+            Handler handler, IDisplayWindowInsetsController controller) {
+        mHandler = handler;
+        mController = controller;
+    }
+
+    @Override
+    public Handler getHandler() {
+        return mHandler;
+    }
+
+    @Override
+    public void notifyInsetsChanged() {
+        // no-op
+    }
+
+    @Override
+    public void dispatchWindowInsetsAnimationPrepare(@NonNull WindowInsetsAnimation animation) {
+        // no-op
+    }
+
+    @Override
+    public WindowInsetsAnimation.Bounds dispatchWindowInsetsAnimationStart(
+            @NonNull WindowInsetsAnimation animation,
+            @NonNull WindowInsetsAnimation.Bounds bounds) {
+        return null;
+    }
+
+    @Override
+    public WindowInsets dispatchWindowInsetsAnimationProgress(@NonNull WindowInsets insets,
+            @NonNull List<WindowInsetsAnimation> runningAnimations) {
+        return null;
+    }
+
+    @Override
+    public void dispatchWindowInsetsAnimationEnd(@NonNull WindowInsetsAnimation animation) {
+        // no-op
+    }
+
+    @Override
+    public void applySurfaceParams(final SyncRtSurfaceTransactionApplier.SurfaceParams... params) {
+        for (int i = params.length - 1; i >= 0; i--) {
+            SyncRtSurfaceTransactionApplier.applyParams(
+                    new SurfaceControl.Transaction(), params[i], mTmpFloat9);
+        }
+
+    }
+
+    @Override
+    public void updateCompatSysUiVisibility(
+            @InsetsState.InternalInsetsType int type, boolean visible, boolean hasControl) {
+        // no-op
+    }
+
+    @Override
+    public void onInsetsModified(InsetsState insetsState) {
+        try {
+            mController.insetsChanged(insetsState);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to send insets to controller");
+        }
+    }
+
+    @Override
+    public boolean hasAnimationCallbacks() {
+        return false;
+    }
+
+    @Override
+    public void setSystemBarsAppearance(
+            @WindowInsetsController.Appearance int appearance,
+            @WindowInsetsController.Appearance int mask) {
+        // no-op
+    }
+
+    @Override
+    public @WindowInsetsController.Appearance int getSystemBarsAppearance() {
+        return 0;
+    }
+
+    @Override
+    public void setSystemBarsBehavior(@WindowInsetsController.Behavior int behavior) {
+        // no-op
+    }
+
+    @Override
+    public @WindowInsetsController.Behavior int getSystemBarsBehavior() {
+        return 0;
+    }
+
+    @Override
+    public void releaseSurfaceControlFromRt(SurfaceControl surfaceControl) {
+        surfaceControl.release();
+    }
+
+    @Override
+    public void addOnPreDrawRunnable(Runnable r) {
+        mHandler.post(r);
+    }
+
+    @Override
+    public void postInsetsAnimationCallback(Runnable r) {
+        mHandler.post(r);
+    }
+
+    @Override
+    public InputMethodManager getInputMethodManager() {
+        return null;
+    }
+
+    @Override
+    public String getRootViewTitle() {
+        return null;
+    }
+
+    @Override
+    public int dipToPx(int dips) {
+        return 0;
+    }
+
+    @Override
+    public IBinder getWindowToken() {
+        return null;
+    }
+}
diff --git a/packages/CarSystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java b/packages/CarSystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java
index fe59cbf..d769cac 100644
--- a/packages/CarSystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java
@@ -33,6 +33,7 @@
 
 import com.android.systemui.SysuiBaseFragmentTest;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -55,6 +56,7 @@
  * test suite causes errors, such as the incorrect settings provider being cached.
  * For an example, see {@link com.android.systemui.DependencyTest}.
  */
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @SmallTest
 public class AAAPlusPlusVerifySysuiRequiredTestPropertiesTest extends SysuiTestCase {
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java
index 7996170..e179ef1 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java
@@ -32,6 +32,7 @@
 
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.car.CarServiceProvider;
+import com.android.systemui.car.CarSystemUiTest;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -39,6 +40,7 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/keyguard/CarKeyguardViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/keyguard/CarKeyguardViewControllerTest.java
index 189e240..62dc236 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/keyguard/CarKeyguardViewControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/keyguard/CarKeyguardViewControllerTest.java
@@ -41,6 +41,7 @@
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.car.CarServiceProvider;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.car.navigationbar.CarNavigationBarController;
 import com.android.systemui.car.window.OverlayViewGlobalStateController;
 import com.android.systemui.keyguard.DismissCallbackRegistry;
@@ -59,6 +60,7 @@
 
 import dagger.Lazy;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonRoleHolderControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonRoleHolderControllerTest.java
index a57736b..4b82680 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonRoleHolderControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonRoleHolderControllerTest.java
@@ -39,6 +39,7 @@
 
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.car.CarDeviceProvisionedController;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.tests.R;
 
 import org.junit.Before;
@@ -49,6 +50,7 @@
 
 import java.util.List;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonSelectionStateControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonSelectionStateControllerTest.java
index 893057e..f623c26 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonSelectionStateControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonSelectionStateControllerTest.java
@@ -28,6 +28,7 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.tests.R;
 
 import org.junit.Before;
@@ -38,6 +39,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarControllerTest.java
index e84e42c..3fd0852 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarControllerTest.java
@@ -31,6 +31,7 @@
 
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.car.hvac.HvacController;
 import com.android.systemui.plugins.DarkIconDispatcher;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
@@ -41,11 +42,16 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
 public class CarNavigationBarControllerTest extends SysuiTestCase {
 
+    private static final String TOP_NOTIFICATION_PANEL =
+            "com.android.systemui.car.notification.TopNotificationPanelViewMediator";
+    private static final String BOTTOM_NOTIFICATION_PANEL =
+            "com.android.systemui.car.notification.BottomNotificationPanelViewMediator";
     private CarNavigationBarController mCarNavigationBar;
     private NavigationBarViewFactory mNavigationBarViewFactory;
     private TestableResources mTestableResources;
@@ -71,7 +77,8 @@
     private CarNavigationBarController createNavigationBarController() {
         return new CarNavigationBarController(mContext, mNavigationBarViewFactory,
                 mButtonSelectionStateController, () -> mHvacController,
-                mButtonRoleHolderController);
+                mButtonRoleHolderController,
+                new SystemBarConfigs(mTestableResources.getResources()));
     }
 
     @Test
@@ -114,6 +121,11 @@
     @Test
     public void testGetTopWindow_topDisabled_returnsNull() {
         mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, false);
+        mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
+        // If Top Notification Panel is used but top navigation bar is not enabled, SystemUI is
+        // expected to crash.
+        mTestableResources.addOverride(R.string.config_notificationPanelViewMediator,
+                BOTTOM_NOTIFICATION_PANEL);
         mCarNavigationBar = createNavigationBarController();
 
         ViewGroup window = mCarNavigationBar.getTopWindow();
@@ -145,6 +157,11 @@
     @Test
     public void testGetBottomWindow_bottomDisabled_returnsNull() {
         mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, false);
+        mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
+        // If Bottom Notification Panel is used but bottom navigation bar is not enabled,
+        // SystemUI is expected to crash.
+        mTestableResources.addOverride(R.string.config_notificationPanelViewMediator,
+                TOP_NOTIFICATION_PANEL);
         mCarNavigationBar = createNavigationBarController();
 
         ViewGroup window = mCarNavigationBar.getBottomWindow();
@@ -234,6 +251,28 @@
     }
 
     @Test
+    public void testSetTopWindowVisibility_setTrue_isVisible() {
+        mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
+        mCarNavigationBar = createNavigationBarController();
+
+        ViewGroup window = mCarNavigationBar.getTopWindow();
+        mCarNavigationBar.setTopWindowVisibility(View.VISIBLE);
+
+        assertThat(window.getVisibility()).isEqualTo(View.VISIBLE);
+    }
+
+    @Test
+    public void testSetTopWindowVisibility_setFalse_isGone() {
+        mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
+        mCarNavigationBar = createNavigationBarController();
+
+        ViewGroup window = mCarNavigationBar.getTopWindow();
+        mCarNavigationBar.setTopWindowVisibility(View.GONE);
+
+        assertThat(window.getVisibility()).isEqualTo(View.GONE);
+    }
+
+    @Test
     public void testSetBottomWindowVisibility_setTrue_isVisible() {
         mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
         mCarNavigationBar = createNavigationBarController();
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarTest.java
index 0caa86f..2b5af71 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarTest.java
@@ -45,6 +45,7 @@
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.car.CarDeviceProvisionedController;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.phone.AutoHideController;
 import com.android.systemui.statusbar.phone.LightBarController;
@@ -63,6 +64,7 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
@@ -140,7 +142,7 @@
                 mWindowManager, mDeviceProvisionedController, new CommandQueue(mContext),
                 mAutoHideController, mButtonSelectionStateListener, mHandler, mUiBgExecutor,
                 mBarService, () -> mKeyguardStateController, () -> mIconPolicy,
-                () -> mIconController);
+                () -> mIconController, new SystemBarConfigs(mTestableResources.getResources()));
     }
 
     @Test
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarViewTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarViewTest.java
index 19e394f..47fd820 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarViewTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarViewTest.java
@@ -30,6 +30,7 @@
 
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 
 import org.junit.After;
 import org.junit.Before;
@@ -38,6 +39,7 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationButtonTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationButtonTest.java
index bcaa5e9..173f548 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationButtonTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationButtonTest.java
@@ -37,6 +37,7 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.statusbar.AlphaOptimizedImageView;
 import com.android.systemui.tests.R;
 
@@ -45,6 +46,7 @@
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentMatcher;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/SystemBarConfigsTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/SystemBarConfigsTest.java
new file mode 100644
index 0000000..96f0504
--- /dev/null
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/SystemBarConfigsTest.java
@@ -0,0 +1,252 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.car.navigationbar;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.when;
+
+import android.content.res.Resources;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+import android.view.WindowManager;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.R;
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+import com.android.systemui.car.CarDeviceProvisionedController;
+import com.android.systemui.car.CarSystemUiTest;
+import com.android.systemui.car.notification.NotificationPanelViewController;
+import com.android.systemui.car.notification.NotificationPanelViewMediator;
+import com.android.systemui.car.notification.PowerManagerHelper;
+import com.android.systemui.car.notification.TopNotificationPanelViewMediator;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@CarSystemUiTest
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+@SmallTest
+public class SystemBarConfigsTest extends SysuiTestCase {
+
+    private SystemBarConfigs mSystemBarConfigs;
+    @Mock
+    private Resources mResources;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        setDefaultValidConfig();
+    }
+
+    @Test
+    public void onInit_allSystemBarsEnabled_eachHasUniqueBarTypes_doesNotThrowException() {
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void onInit_allSystemBarsEnabled_twoBarsHaveDuplicateType_throwsRuntimeException() {
+        when(mResources.getInteger(R.integer.config_topSystemBarType)).thenReturn(0);
+        when(mResources.getInteger(R.integer.config_bottomSystemBarType)).thenReturn(0);
+
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+    }
+
+    @Test
+    public void onInit_allSystemBarsEnabled_systemBarSidesSortedByZOrder() {
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+        List<Integer> actualOrder = mSystemBarConfigs.getSystemBarSidesByZOrder();
+        List<Integer> expectedOrder = new ArrayList<>();
+        expectedOrder.add(SystemBarConfigs.LEFT);
+        expectedOrder.add(SystemBarConfigs.RIGHT);
+        expectedOrder.add(SystemBarConfigs.TOP);
+        expectedOrder.add(SystemBarConfigs.BOTTOM);
+
+        assertTrue(actualOrder.equals(expectedOrder));
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void onInit_intersectingBarsHaveSameZOrder_throwsRuntimeException() {
+        when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(33);
+        when(mResources.getInteger(R.integer.config_leftSystemBarZOrder)).thenReturn(33);
+
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void onInit_hideBottomSystemBarForKeyboardValueDoNotSync_throwsRuntimeException() {
+        when(mResources.getBoolean(R.bool.config_hideBottomSystemBarForKeyboard)).thenReturn(false);
+        when(mResources.getBoolean(
+                com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard)).thenReturn(
+                true);
+
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+    }
+
+    @Test
+    public void onInit_topNotifPanelViewMediatorUsed_topBarEnabled_doesNotThrowException() {
+        when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(true);
+        when(mResources.getString(R.string.config_notificationPanelViewMediator)).thenReturn(
+                TestTopNotificationPanelViewMediator.class.getName());
+
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void onInit_topNotifPanelViewMediatorUsed_topBarNotEnabled_throwsRuntimeException() {
+        when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
+        when(mResources.getString(R.string.config_notificationPanelViewMediator)).thenReturn(
+                TestTopNotificationPanelViewMediator.class.getName());
+
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+    }
+
+    @Test
+    public void onInit_notificationPanelViewMediatorUsed_topBarNotEnabled_doesNotThrowException() {
+        when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
+        when(mResources.getString(R.string.config_notificationPanelViewMediator)).thenReturn(
+                NotificationPanelViewMediator.class.getName());
+
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+    }
+
+    @Test
+    public void getTopSystemBarLayoutParams_topBarEnabled_returnsTopSystemBarLayoutParams() {
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+        WindowManager.LayoutParams lp = mSystemBarConfigs.getLayoutParamsBySide(
+                SystemBarConfigs.TOP);
+
+        assertNotNull(lp);
+    }
+
+    @Test
+    public void getTopSystemBarLayoutParams_topBarNotEnabled_returnsNull() {
+        when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+        WindowManager.LayoutParams lp = mSystemBarConfigs.getLayoutParamsBySide(
+                SystemBarConfigs.TOP);
+
+        assertNull(lp);
+    }
+
+    @Test
+    public void getTopSystemBarHideForKeyboard_hideBarForKeyboard_returnsTrue() {
+        when(mResources.getBoolean(R.bool.config_hideTopSystemBarForKeyboard)).thenReturn(true);
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+
+        boolean hideKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
+
+        assertTrue(hideKeyboard);
+    }
+
+    @Test
+    public void getTopSystemBarHideForKeyboard_topBarNotEnabled_returnsFalse() {
+        when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+
+        boolean hideKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
+
+        assertFalse(hideKeyboard);
+    }
+
+    @Test
+    public void topSystemBarHasHigherZOrderThanHuns_topSystemBarIsNavigationBarPanelType() {
+        when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(
+                SystemBarConfigs.getHunZOrder() + 1);
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+        WindowManager.LayoutParams lp = mSystemBarConfigs.getLayoutParamsBySide(
+                SystemBarConfigs.TOP);
+
+        assertEquals(lp.type, WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL);
+    }
+
+    @Test
+    public void topSystemBarHasLowerZOrderThanHuns_topSystemBarIsStatusBarAdditionalType() {
+        when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(
+                SystemBarConfigs.getHunZOrder() - 1);
+        mSystemBarConfigs = new SystemBarConfigs(mResources);
+        WindowManager.LayoutParams lp = mSystemBarConfigs.getLayoutParamsBySide(
+                SystemBarConfigs.TOP);
+
+        assertEquals(lp.type, WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL);
+    }
+
+    // Set valid config where all system bars are enabled.
+    private void setDefaultValidConfig() {
+        when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(true);
+        when(mResources.getBoolean(R.bool.config_enableBottomNavigationBar)).thenReturn(true);
+        when(mResources.getBoolean(R.bool.config_enableLeftNavigationBar)).thenReturn(true);
+        when(mResources.getBoolean(R.bool.config_enableRightNavigationBar)).thenReturn(true);
+
+        when(mResources.getDimensionPixelSize(
+                com.android.internal.R.dimen.status_bar_height)).thenReturn(100);
+        when(mResources.getDimensionPixelSize(
+                com.android.internal.R.dimen.navigation_bar_height)).thenReturn(100);
+        when(mResources.getDimensionPixelSize(R.dimen.car_left_navigation_bar_width)).thenReturn(
+                100);
+        when(mResources.getDimensionPixelSize(R.dimen.car_right_navigation_bar_width)).thenReturn(
+                100);
+
+        when(mResources.getInteger(R.integer.config_topSystemBarType)).thenReturn(0);
+        when(mResources.getInteger(R.integer.config_bottomSystemBarType)).thenReturn(1);
+        when(mResources.getInteger(R.integer.config_leftSystemBarType)).thenReturn(2);
+        when(mResources.getInteger(R.integer.config_rightSystemBarType)).thenReturn(3);
+
+        when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(5);
+        when(mResources.getInteger(R.integer.config_bottomSystemBarZOrder)).thenReturn(10);
+        when(mResources.getInteger(R.integer.config_leftSystemBarZOrder)).thenReturn(2);
+        when(mResources.getInteger(R.integer.config_rightSystemBarZOrder)).thenReturn(3);
+
+        when(mResources.getBoolean(R.bool.config_hideTopSystemBarForKeyboard)).thenReturn(false);
+        when(mResources.getBoolean(
+                com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard)).thenReturn(
+                false);
+        when(mResources.getBoolean(R.bool.config_hideLeftSystemBarForKeyboard)).thenReturn(
+                false);
+        when(mResources.getBoolean(R.bool.config_hideRightSystemBarForKeyboard)).thenReturn(
+                false);
+    }
+
+    // Intentionally using a subclass of TopNotificationPanelViewMediator for testing purposes to
+    // ensure that OEM's will be able to implement and use their own NotificationPanelViewMediator.
+    private class TestTopNotificationPanelViewMediator extends
+            TopNotificationPanelViewMediator {
+        TestTopNotificationPanelViewMediator(
+                CarNavigationBarController carNavigationBarController,
+                NotificationPanelViewController notificationPanelViewController,
+                PowerManagerHelper powerManagerHelper,
+                BroadcastDispatcher broadcastDispatcher,
+                CarDeviceProvisionedController carDeviceProvisionedController,
+                ConfigurationController configurationController) {
+            super(carNavigationBarController, notificationPanelViewController, powerManagerHelper,
+                    broadcastDispatcher, carDeviceProvisionedController, configurationController);
+        }
+    }
+}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainerTest.java
index ccaeb45..384888a 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainerTest.java
@@ -30,6 +30,7 @@
 
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.car.CarDeviceProvisionedController;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.car.window.OverlayViewGlobalStateController;
 
 import org.junit.Before;
@@ -38,6 +39,7 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/NotificationVisibilityLoggerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/NotificationVisibilityLoggerTest.java
index 89dac58..d51aeb1 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/NotificationVisibilityLoggerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/NotificationVisibilityLoggerTest.java
@@ -37,6 +37,7 @@
 import com.android.internal.statusbar.IStatusBarService;
 import com.android.internal.statusbar.NotificationVisibility;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.util.concurrency.FakeExecutor;
 import com.android.systemui.util.time.FakeSystemClock;
 
@@ -49,6 +50,7 @@
 
 import java.util.Collections;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppDetectorTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppDetectorTest.java
index 77620f3..421e210 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppDetectorTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppDetectorTest.java
@@ -37,6 +37,7 @@
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.car.CarDeviceProvisionedController;
+import com.android.systemui.car.CarSystemUiTest;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -44,6 +45,7 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppListenerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppListenerTest.java
index 73f9f6a..67f222b 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppListenerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppListenerTest.java
@@ -35,6 +35,7 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -46,6 +47,7 @@
 import java.util.Collections;
 import java.util.List;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
@@ -218,7 +220,7 @@
 
         verify(mSideLoadedAppStateController, never()).onUnsafeTaskCreatedOnDisplay(any());
         verify(mSideLoadedAppStateController).onSafeTaskDisplayedOnDisplay(display1);
-        verify(mSideLoadedAppStateController, never()).onUnsafeTaskDisplayedOnDisplay(display2);
+        verify(mSideLoadedAppStateController).onUnsafeTaskDisplayedOnDisplay(display2);
         verify(mSideLoadedAppStateController).onSafeTaskDisplayedOnDisplay(display3);
         verify(mSideLoadedAppStateController, never()).onUnsafeTaskDisplayedOnDisplay(display1);
         verify(mSideLoadedAppStateController).onUnsafeTaskDisplayedOnDisplay(display2);
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewControllerTest.java
index 797dbf5..2e9d43b 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewControllerTest.java
@@ -36,6 +36,7 @@
 
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.car.window.OverlayViewGlobalStateController;
 
 import org.junit.Before;
@@ -44,6 +45,7 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediatorTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediatorTest.java
index a808e2d..7aeffce 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediatorTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediatorTest.java
@@ -16,6 +16,7 @@
 
 package com.android.systemui.car.userswitcher;
 
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -24,7 +25,10 @@
 import android.testing.AndroidTestingRunner;
 import android.testing.TestableLooper;
 
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarDeviceProvisionedController;
 import com.android.systemui.car.CarServiceProvider;
+import com.android.systemui.car.CarSystemUiTest;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -32,16 +36,19 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
-public class UserSwitchTransitionViewMediatorTest {
+public class UserSwitchTransitionViewMediatorTest extends SysuiTestCase {
     private static final int TEST_USER = 100;
 
     private UserSwitchTransitionViewMediator mUserSwitchTransitionViewMediator;
     @Mock
     private CarServiceProvider mCarServiceProvider;
     @Mock
+    private CarDeviceProvisionedController mCarDeviceProvisionedController;
+    @Mock
     private UserSwitchTransitionViewController mUserSwitchTransitionViewController;
     @Mock
     private CarUserManager.UserLifecycleEvent mUserLifecycleEvent;
@@ -51,21 +58,35 @@
         MockitoAnnotations.initMocks(this);
 
         mUserSwitchTransitionViewMediator = new UserSwitchTransitionViewMediator(
-                mCarServiceProvider, mUserSwitchTransitionViewController);
-
+                mCarServiceProvider, mCarDeviceProvisionedController,
+                mUserSwitchTransitionViewController);
+        when(mCarDeviceProvisionedController.getCurrentUser()).thenReturn(TEST_USER);
     }
 
     @Test
-    public void onUserLifecycleEvent_userStarting_callsHandleShow() {
+    public void onUserLifecycleEvent_userStarting_isCurrentUser_callsHandleShow() {
         when(mUserLifecycleEvent.getEventType()).thenReturn(
                 CarUserManager.USER_LIFECYCLE_EVENT_TYPE_STARTING);
         when(mUserLifecycleEvent.getUserId()).thenReturn(TEST_USER);
+
         mUserSwitchTransitionViewMediator.handleUserLifecycleEvent(mUserLifecycleEvent);
 
         verify(mUserSwitchTransitionViewController).handleShow(TEST_USER);
     }
 
     @Test
+    public void onUserLifecycleEvent_userStarting_isNotCurrentUser_doesNotCallHandleShow() {
+        when(mUserLifecycleEvent.getEventType()).thenReturn(
+                CarUserManager.USER_LIFECYCLE_EVENT_TYPE_STARTING);
+        when(mUserLifecycleEvent.getUserId()).thenReturn(TEST_USER);
+        when(mCarDeviceProvisionedController.getCurrentUser()).thenReturn(TEST_USER + 1);
+
+        mUserSwitchTransitionViewMediator.handleUserLifecycleEvent(mUserLifecycleEvent);
+
+        verify(mUserSwitchTransitionViewController, never()).handleShow(TEST_USER);
+    }
+
+    @Test
     public void onUserLifecycleEvent_userSwitching_callsHandleHide() {
         when(mUserLifecycleEvent.getEventType()).thenReturn(
                 CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING);
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifierTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifierTest.java
index eca51e3..f77294e 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifierTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifierTest.java
@@ -19,11 +19,15 @@
 import static com.android.systemui.car.voicerecognition.ConnectedDeviceVoiceRecognitionNotifier.INVALID_VALUE;
 import static com.android.systemui.car.voicerecognition.ConnectedDeviceVoiceRecognitionNotifier.VOICE_RECOGNITION_STARTED;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothHeadsetClient;
 import android.content.Intent;
 import android.os.Handler;
@@ -33,25 +37,36 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
+// TODO(b/162866441): Refactor to use the Executor pattern instead.
 public class ConnectedDeviceVoiceRecognitionNotifierTest extends SysuiTestCase {
 
     private static final String BLUETOOTH_PERM = android.Manifest.permission.BLUETOOTH;
+    private static final String BLUETOOTH_REMOTE_ADDRESS = "00:11:22:33:44:55";
 
     private ConnectedDeviceVoiceRecognitionNotifier mVoiceRecognitionNotifier;
+    private TestableLooper mTestableLooper;
+    private Handler mHandler;
     private Handler mTestHandler;
+    private BluetoothDevice mBluetoothDevice;
 
     @Before
     public void setUp() throws Exception {
-        TestableLooper testableLooper = TestableLooper.get(this);
-        mTestHandler = spy(new Handler(testableLooper.getLooper()));
+        mTestableLooper = TestableLooper.get(this);
+        mHandler = new Handler(mTestableLooper.getLooper());
+        mTestHandler = spy(mHandler);
+        mBluetoothDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(
+                BLUETOOTH_REMOTE_ADDRESS);
         mVoiceRecognitionNotifier = new ConnectedDeviceVoiceRecognitionNotifier(
                 mContext, mTestHandler);
         mVoiceRecognitionNotifier.onBootCompleted();
@@ -61,37 +76,60 @@
     public void testReceiveIntent_started_showToast() {
         Intent intent = new Intent(BluetoothHeadsetClient.ACTION_AG_EVENT);
         intent.putExtra(BluetoothHeadsetClient.EXTRA_VOICE_RECOGNITION, VOICE_RECOGNITION_STARTED);
+        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice);
+
         mContext.sendBroadcast(intent, BLUETOOTH_PERM);
+        mTestableLooper.processAllMessages();
         waitForIdleSync();
 
-        verify(mTestHandler).post(any());
+        mHandler.post(() -> {
+            ArgumentCaptor<Runnable> argumentCaptor = ArgumentCaptor.forClass(Runnable.class);
+            verify(mTestHandler).post(argumentCaptor.capture());
+            assertThat(argumentCaptor.getValue()).isNotNull();
+            assertThat(argumentCaptor.getValue()).isNotEqualTo(this);
+        });
     }
 
     @Test
     public void testReceiveIntent_invalidExtra_noToast() {
         Intent intent = new Intent(BluetoothHeadsetClient.ACTION_AG_EVENT);
         intent.putExtra(BluetoothHeadsetClient.EXTRA_VOICE_RECOGNITION, INVALID_VALUE);
+        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice);
+
         mContext.sendBroadcast(intent, BLUETOOTH_PERM);
+        mTestableLooper.processAllMessages();
         waitForIdleSync();
 
-        verify(mTestHandler, never()).post(any());
+        mHandler.post(() -> {
+            verify(mTestHandler, never()).post(any());
+        });
     }
 
     @Test
     public void testReceiveIntent_noExtra_noToast() {
         Intent intent = new Intent(BluetoothHeadsetClient.ACTION_AG_EVENT);
+        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice);
+
         mContext.sendBroadcast(intent, BLUETOOTH_PERM);
+        mTestableLooper.processAllMessages();
         waitForIdleSync();
 
-        verify(mTestHandler, never()).post(any());
+        mHandler.post(() -> {
+            verify(mTestHandler, never()).post(any());
+        });
     }
 
     @Test
     public void testReceiveIntent_invalidIntent_noToast() {
         Intent intent = new Intent(BluetoothHeadsetClient.ACTION_AUDIO_STATE_CHANGED);
+        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice);
+
         mContext.sendBroadcast(intent, BLUETOOTH_PERM);
+        mTestableLooper.processAllMessages();
         waitForIdleSync();
 
-        verify(mTestHandler, never()).post(any());
+        mHandler.post(() -> {
+            verify(mTestHandler, never()).post(any());
+        });
     }
 }
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java
index 45a05ac..23e21e4 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java
@@ -39,6 +39,7 @@
 
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.car.CarDeviceProvisionedController;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.statusbar.FlingAnimationUtils;
 import com.android.systemui.tests.R;
 
@@ -52,6 +53,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
@@ -222,18 +224,6 @@
     }
 
     @Test
-    public void animateCollapsePanel_removesWindowFocus() {
-        mOverlayPanelViewController.inflate(mBaseLayout);
-        mOverlayPanelViewController.setShouldAnimateCollapsePanel(true);
-        mOverlayPanelViewController.setPanelExpanded(true);
-        mOverlayPanelViewController.setPanelVisible(true);
-
-        mOverlayPanelViewController.animateCollapsePanel();
-
-        verify(mOverlayViewGlobalStateController).setWindowFocusable(false);
-    }
-
-    @Test
     public void animateExpandPanel_shouldNotAnimateExpandPanel_doesNotExpand() {
         mOverlayPanelViewController.inflate(mBaseLayout);
         mOverlayPanelViewController.setShouldAnimateExpandPanel(false);
@@ -363,14 +353,6 @@
     }
 
     @Test
-    public void setPanelVisible_setTrue_setWindowFocusable() {
-        mOverlayPanelViewController.inflate(mBaseLayout);
-        mOverlayPanelViewController.setPanelVisible(true);
-
-        verify(mOverlayViewGlobalStateController).setWindowFocusable(true);
-    }
-
-    @Test
     public void setPanelVisible_setFalse_windowVisible_setsWindowNotVisible() {
         mOverlayPanelViewController.inflate(mBaseLayout);
         when(mOverlayViewGlobalStateController.isWindowVisible()).thenReturn(true);
@@ -402,15 +384,6 @@
     }
 
     @Test
-    public void setPanelVisible_setFalse_setWindowNotFocusable() {
-        mOverlayPanelViewController.inflate(mBaseLayout);
-
-        mOverlayPanelViewController.setPanelVisible(false);
-
-        verify(mOverlayViewGlobalStateController).setWindowFocusable(false);
-    }
-
-    @Test
     public void dragOpenTouchListener_isNotInflated_inflatesView() {
         when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(true);
         assertThat(mOverlayPanelViewController.isInflated()).isFalse();
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewControllerTest.java
index c24a3b5..e784761 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewControllerTest.java
@@ -29,6 +29,7 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.tests.R;
 
 import org.junit.Before;
@@ -39,6 +40,7 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewGlobalStateControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewGlobalStateControllerTest.java
index cba42e5..294aa0d 100644
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewGlobalStateControllerTest.java
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewGlobalStateControllerTest.java
@@ -16,9 +16,14 @@
 
 package com.android.systemui.car.window;
 
+import static android.view.WindowInsets.Type.navigationBars;
+import static android.view.WindowInsets.Type.statusBars;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -28,22 +33,23 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewStub;
+import android.view.WindowInsetsController;
 
 import androidx.test.filters.SmallTest;
 
 import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
+import com.android.systemui.car.CarSystemUiTest;
 import com.android.systemui.tests.R;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
-import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 
 import java.util.Arrays;
 
+@CarSystemUiTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 @SmallTest
@@ -56,8 +62,6 @@
     private ViewGroup mBaseLayout;
 
     @Mock
-    private CarNavigationBarController mCarNavigationBarController;
-    @Mock
     private SystemUIOverlayWindowController mSystemUIOverlayWindowController;
     @Mock
     private OverlayViewMediator mOverlayViewMediator;
@@ -69,18 +73,22 @@
     private OverlayPanelViewController mOverlayPanelViewController;
     @Mock
     private Runnable mRunnable;
+    @Mock
+    private WindowInsetsController mWindowInsetsController;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(/* testClass= */ this);
 
-        mBaseLayout = (ViewGroup) LayoutInflater.from(mContext).inflate(
-                R.layout.overlay_view_global_state_controller_test, /* root= */ null);
+        mBaseLayout = spy((ViewGroup) LayoutInflater.from(mContext).inflate(
+                R.layout.overlay_view_global_state_controller_test, /* root= */ null));
+
+        when(mBaseLayout.getWindowInsetsController()).thenReturn(mWindowInsetsController);
 
         when(mSystemUIOverlayWindowController.getBaseLayout()).thenReturn(mBaseLayout);
 
         mOverlayViewGlobalStateController = new OverlayViewGlobalStateController(
-                mCarNavigationBarController, mSystemUIOverlayWindowController);
+                mSystemUIOverlayWindowController);
 
         verify(mSystemUIOverlayWindowController).attach();
     }
@@ -100,23 +108,101 @@
     }
 
     @Test
-    public void showView_nothingAlreadyShown_shouldShowNavBarFalse_navigationBarsHidden() {
+    public void showView_nothingVisible_windowNotFocusable_shouldShowNavBar_navBarsVisible() {
         setupOverlayViewController1();
-        when(mOverlayViewController1.shouldShowNavigationBar()).thenReturn(false);
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(false);
+        when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(true);
 
         mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
 
-        verify(mCarNavigationBarController).hideBars();
+        verify(mWindowInsetsController).show(navigationBars());
+    }
+
+    @Test
+    public void showView_nothingVisible_windowNotFocusable_shouldHideNavBar_notHidden() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(false);
+        when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(false);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController, never()).hide(navigationBars());
+    }
+
+    @Test
+    public void showView_nothingVisible_windowNotFocusable_shouldShowStatusBar_statusBarsVisible() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(false);
+        when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(true);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).show(statusBars());
+    }
+
+    @Test
+    public void showView_nothingVisible_windowNotFocusable_shouldHideStatusBar_notHidden() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(false);
+        when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(false);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController, never()).hide(statusBars());
+    }
+
+    @Test
+    public void showView_nothingAlreadyShown_shouldShowNavBarFalse_navigationBarsHidden() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(false);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).hide(navigationBars());
     }
 
     @Test
     public void showView_nothingAlreadyShown_shouldShowNavBarTrue_navigationBarsShown() {
         setupOverlayViewController1();
-        when(mOverlayViewController1.shouldShowNavigationBar()).thenReturn(true);
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(true);
 
         mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
 
-        verify(mCarNavigationBarController).showBars();
+        verify(mWindowInsetsController).show(navigationBars());
+    }
+
+    @Test
+    public void showView_nothingAlreadyShown_shouldShowStatusBarFalse_statusBarsHidden() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(false);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).hide(statusBars());
+    }
+
+    @Test
+    public void showView_nothingAlreadyShown_shouldShowStatusBarTrue_statusBarsShown() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(true);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).show(statusBars());
+    }
+
+    @Test
+    public void showView_nothingAlreadyShown_fitsNavBarInsets_insetsAdjusted() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(navigationBars());
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
     }
 
     @Test
@@ -163,25 +249,73 @@
     @Test
     public void showView_newHighestZOrder_shouldShowNavBarFalse_navigationBarsHidden() {
         setupOverlayViewController1();
-        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setupOverlayViewController2();
-        when(mOverlayViewController2.shouldShowNavigationBar()).thenReturn(false);
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(false);
+        reset(mWindowInsetsController);
 
         mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
 
-        verify(mCarNavigationBarController).hideBars();
+        verify(mWindowInsetsController).hide(navigationBars());
     }
 
     @Test
     public void showView_newHighestZOrder_shouldShowNavBarTrue_navigationBarsShown() {
         setupOverlayViewController1();
-        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setupOverlayViewController2();
-        when(mOverlayViewController2.shouldShowNavigationBar()).thenReturn(true);
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(true);
 
         mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
 
-        verify(mCarNavigationBarController).showBars();
+        verify(mWindowInsetsController).show(navigationBars());
+    }
+
+    @Test
+    public void showView_newHighestZOrder_shouldShowStatusBarFalse_statusBarsHidden() {
+        setupOverlayViewController1();
+        setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(false);
+        reset(mWindowInsetsController);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
+
+        verify(mWindowInsetsController).hide(statusBars());
+    }
+
+    @Test
+    public void showView_newHighestZOrder_shouldShowStatusBarTrue_statusBarsShown() {
+        setupOverlayViewController1();
+        setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(true);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
+
+        verify(mWindowInsetsController).show(statusBars());
+    }
+
+    @Test
+    public void showView_newHighestZOrder_fitsNavBarInsets_insetsAdjusted() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(statusBars());
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        setupOverlayViewController2();
+        when(mOverlayViewController2.getInsetTypesToFit()).thenReturn(navigationBars());
+        reset(mWindowInsetsController);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
+
+        verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
     }
 
     @Test
@@ -211,25 +345,71 @@
     @Test
     public void showView_oldHighestZOrder_shouldShowNavBarFalse_navigationBarsHidden() {
         setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
         setOverlayViewControllerAsShowing(mOverlayViewController2);
-        when(mOverlayViewController1.shouldShowNavigationBar()).thenReturn(true);
-        when(mOverlayViewController2.shouldShowNavigationBar()).thenReturn(false);
+        when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(true);
+        when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(false);
+        reset(mWindowInsetsController);
 
         mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
 
-        verify(mCarNavigationBarController).hideBars();
+        verify(mWindowInsetsController).hide(navigationBars());
     }
 
     @Test
     public void showView_oldHighestZOrder_shouldShowNavBarTrue_navigationBarsShown() {
         setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
         setOverlayViewControllerAsShowing(mOverlayViewController2);
-        when(mOverlayViewController1.shouldShowNavigationBar()).thenReturn(false);
-        when(mOverlayViewController2.shouldShowNavigationBar()).thenReturn(true);
+        when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(false);
+        when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(true);
 
         mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
 
-        verify(mCarNavigationBarController).showBars();
+        verify(mWindowInsetsController).show(navigationBars());
+    }
+
+    @Test
+    public void showView_oldHighestZOrder_shouldShowStatusBarFalse_statusBarsHidden() {
+        setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(true);
+        when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(false);
+        reset(mWindowInsetsController);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).hide(statusBars());
+    }
+
+    @Test
+    public void showView_oldHighestZOrder_shouldShowStatusBarTrue_statusBarsShown() {
+        setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(false);
+        when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(true);
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).show(statusBars());
+    }
+
+    @Test
+    public void showView_oldHighestZOrder_fitsNavBarInsets_insetsAdjusted() {
+        setupOverlayViewController2();
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(statusBars());
+        when(mOverlayViewController2.getInsetTypesToFit()).thenReturn(navigationBars());
+
+        mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
+
+        verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
     }
 
     @Test
@@ -396,27 +576,79 @@
     @Test
     public void hideView_newHighestZOrder_shouldShowNavBarFalse_navigationBarHidden() {
         setupOverlayViewController1();
-        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setOverlayViewControllerAsShowing(mOverlayViewController2);
-        when(mOverlayViewController1.shouldShowNavigationBar()).thenReturn(false);
+        when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(false);
+        reset(mWindowInsetsController);
 
         mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
 
-        verify(mCarNavigationBarController).hideBars();
+        verify(mWindowInsetsController).hide(navigationBars());
     }
 
     @Test
     public void hideView_newHighestZOrder_shouldShowNavBarTrue_navigationBarShown() {
         setupOverlayViewController1();
-        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setOverlayViewControllerAsShowing(mOverlayViewController2);
-        when(mOverlayViewController1.shouldShowNavigationBar()).thenReturn(true);
+        when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(true);
+        reset(mWindowInsetsController);
 
         mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
 
-        verify(mCarNavigationBarController).showBars();
+        verify(mWindowInsetsController).show(navigationBars());
+    }
+
+    @Test
+    public void hideView_newHighestZOrder_shouldShowStatusBarFalse_statusBarHidden() {
+        setupOverlayViewController1();
+        setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(false);
+        reset(mWindowInsetsController);
+
+        mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
+
+        verify(mWindowInsetsController).hide(statusBars());
+    }
+
+    @Test
+    public void hideView_newHighestZOrder_shouldShowStatusBarTrue_statusBarShown() {
+        setupOverlayViewController1();
+        setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(true);
+        reset(mWindowInsetsController);
+
+        mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
+
+        verify(mWindowInsetsController).show(statusBars());
+    }
+
+    @Test
+    public void hideView_newHighestZOrder_fitsNavBarInsets_insetsAdjusted() {
+        setupOverlayViewController1();
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        setupOverlayViewController2();
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(navigationBars());
+        when(mOverlayViewController2.getInsetTypesToFit()).thenReturn(statusBars());
+
+        mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
+
+        verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
     }
 
     @Test
@@ -435,27 +667,77 @@
     @Test
     public void hideView_oldHighestZOrder_shouldShowNavBarFalse_navigationBarHidden() {
         setupOverlayViewController1();
-        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setOverlayViewControllerAsShowing(mOverlayViewController2);
-        when(mOverlayViewController2.shouldShowNavigationBar()).thenReturn(false);
+        when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(false);
+        reset(mWindowInsetsController);
 
         mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
 
-        verify(mCarNavigationBarController).hideBars();
+        verify(mWindowInsetsController).hide(navigationBars());
     }
 
     @Test
     public void hideView_oldHighestZOrder_shouldShowNavBarTrue_navigationBarShown() {
         setupOverlayViewController1();
-        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
         setOverlayViewControllerAsShowing(mOverlayViewController2);
-        when(mOverlayViewController2.shouldShowNavigationBar()).thenReturn(true);
+        when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(true);
 
         mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
 
-        verify(mCarNavigationBarController).showBars();
+        verify(mWindowInsetsController).show(navigationBars());
+    }
+
+    @Test
+    public void hideView_oldHighestZOrder_shouldShowStatusBarFalse_statusBarHidden() {
+        setupOverlayViewController1();
+        setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(false);
+        reset(mWindowInsetsController);
+
+        mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).hide(statusBars());
+    }
+
+    @Test
+    public void hideView_oldHighestZOrder_shouldShowStatusBarTrue_statusBarShown() {
+        setupOverlayViewController1();
+        setupOverlayViewController2();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(true);
+
+        mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).show(statusBars());
+    }
+
+    @Test
+    public void hideView_oldHighestZOrder_fitsNavBarInsets_insetsAdjusted() {
+        setupOverlayViewController1();
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+        setupOverlayViewController2();
+        setOverlayViewControllerAsShowing(mOverlayViewController2);
+        when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(statusBars());
+        when(mOverlayViewController2.getInsetTypesToFit()).thenReturn(navigationBars());
+
+        mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
+
+        verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
     }
 
     @Test
@@ -473,11 +755,33 @@
     @Test
     public void hideView_viewControllerOnlyShown_navigationBarShown() {
         setupOverlayViewController1();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
         setOverlayViewControllerAsShowing(mOverlayViewController1);
 
         mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
 
-        verify(mCarNavigationBarController).showBars();
+        verify(mWindowInsetsController).show(navigationBars());
+    }
+
+    @Test
+    public void hideView_viewControllerOnlyShown_statusBarShown() {
+        setupOverlayViewController1();
+        when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+
+        mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
+
+        verify(mWindowInsetsController).show(statusBars());
+    }
+
+    @Test
+    public void hideView_viewControllerOnlyShown_insetsAdjustedToDefault() {
+        setupOverlayViewController1();
+        setOverlayViewControllerAsShowing(mOverlayViewController1);
+
+        mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
+
+        verify(mSystemUIOverlayWindowController).setFitInsetsTypes(statusBars());
     }
 
     @Test
@@ -613,7 +917,7 @@
 
     private void setOverlayViewControllerAsShowing(OverlayViewController overlayViewController) {
         mOverlayViewGlobalStateController.showView(overlayViewController, /* show= */ null);
-        Mockito.reset(mCarNavigationBarController, mSystemUIOverlayWindowController);
+        reset(mSystemUIOverlayWindowController);
         when(mSystemUIOverlayWindowController.getBaseLayout()).thenReturn(mBaseLayout);
     }
 }
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/wm/BarControlPolicyTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/wm/BarControlPolicyTest.java
new file mode 100644
index 0000000..da7cb8e
--- /dev/null
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/wm/BarControlPolicyTest.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm;
+
+import static android.view.WindowInsets.Type.navigationBars;
+import static android.view.WindowInsets.Type.statusBars;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.car.settings.CarSettings;
+import android.provider.Settings;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+@SmallTest
+public class BarControlPolicyTest extends SysuiTestCase {
+
+    private static final String PACKAGE_NAME = "sample.app";
+
+    @Before
+    public void setUp() {
+        BarControlPolicy.reset();
+    }
+
+    @After
+    public void tearDown() {
+        Settings.Global.clearProviderForTest();
+    }
+
+    @Test
+    public void reloadFromSetting_notSet_doesNotSetFilters() {
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        assertThat(BarControlPolicy.sImmersiveStatusFilter).isNull();
+    }
+
+    @Test
+    public void reloadFromSetting_invalidPolicyControlString_doesNotSetFilters() {
+        String text = "sample text";
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                text
+        );
+
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        assertThat(BarControlPolicy.sImmersiveStatusFilter).isNull();
+    }
+
+    @Test
+    public void reloadFromSetting_validPolicyControlString_setsFilters() {
+        String text = "immersive.status=" + PACKAGE_NAME;
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                text
+        );
+
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        assertThat(BarControlPolicy.sImmersiveStatusFilter).isNotNull();
+    }
+
+    @Test
+    public void reloadFromSetting_filtersSet_doesNotSetFiltersAgain() {
+        String text = "immersive.status=" + PACKAGE_NAME;
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                text
+        );
+
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        assertThat(BarControlPolicy.reloadFromSetting(mContext)).isFalse();
+    }
+
+    @Test
+    public void getBarVisibilities_policyControlNotSet_showsSystemBars() {
+        int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
+
+        assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
+        assertThat(visibilities[1]).isEqualTo(0);
+    }
+
+    @Test
+    public void getBarVisibilities_immersiveStatusForAppAndMatchingApp_hidesStatusBar() {
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                "immersive.status=" + PACKAGE_NAME);
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
+
+        assertThat(visibilities[0]).isEqualTo(navigationBars());
+        assertThat(visibilities[1]).isEqualTo(statusBars());
+    }
+
+    @Test
+    public void getBarVisibilities_immersiveStatusForAppAndNonMatchingApp_showsSystemBars() {
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                "immersive.status=" + PACKAGE_NAME);
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        int[] visibilities = BarControlPolicy.getBarVisibilities("sample2.app");
+
+        assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
+        assertThat(visibilities[1]).isEqualTo(0);
+    }
+
+    @Test
+    public void getBarVisibilities_immersiveStatusForAppsAndNonApp_showsSystemBars() {
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                "immersive.status=apps");
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
+
+        assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
+        assertThat(visibilities[1]).isEqualTo(0);
+    }
+
+    @Test
+    public void getBarVisibilities_immersiveFullForAppAndMatchingApp_hidesSystemBars() {
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                "immersive.full=" + PACKAGE_NAME);
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
+
+        assertThat(visibilities[0]).isEqualTo(0);
+        assertThat(visibilities[1]).isEqualTo(statusBars() | navigationBars());
+    }
+
+    @Test
+    public void getBarVisibilities_immersiveFullForAppAndNonMatchingApp_showsSystemBars() {
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                "immersive.full=" + PACKAGE_NAME);
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        int[] visibilities = BarControlPolicy.getBarVisibilities("sample2.app");
+
+        assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
+        assertThat(visibilities[1]).isEqualTo(0);
+    }
+
+    @Test
+    public void getBarVisibilities_immersiveFullForAppsAndNonApp_showsSystemBars() {
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                "immersive.full=apps");
+        BarControlPolicy.reloadFromSetting(mContext);
+
+        int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
+
+        assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
+        assertThat(visibilities[1]).isEqualTo(0);
+    }
+}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/wm/DisplaySystemBarsControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/wm/DisplaySystemBarsControllerTest.java
new file mode 100644
index 0000000..29cc8ee
--- /dev/null
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/wm/DisplaySystemBarsControllerTest.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.verify;
+
+import android.car.settings.CarSettings;
+import android.os.Handler;
+import android.os.RemoteException;
+import android.provider.Settings;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+import android.view.IWindowManager;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.TransactionPool;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+@SmallTest
+public class DisplaySystemBarsControllerTest extends SysuiTestCase {
+
+    private DisplaySystemBarsController mController;
+
+    private static final int DISPLAY_ID = 1;
+
+    @Mock
+    private SystemWindows mSystemWindows;
+    @Mock
+    private IWindowManager mIWindowManager;
+    @Mock
+    private DisplayController mDisplayController;
+    @Mock
+    private Handler mHandler;
+    @Mock
+    private TransactionPool mTransactionPool;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mSystemWindows.mContext = mContext;
+        mSystemWindows.mWmService = mIWindowManager;
+
+        mController = new DisplaySystemBarsController(
+                mSystemWindows,
+                mDisplayController,
+                mHandler,
+                mTransactionPool
+        );
+    }
+
+    @Test
+    public void onDisplayAdded_setsDisplayWindowInsetsControllerOnWMService()
+            throws RemoteException {
+        mController.onDisplayAdded(DISPLAY_ID);
+
+        verify(mIWindowManager).setDisplayWindowInsetsController(
+                eq(DISPLAY_ID), any(DisplaySystemBarsController.PerDisplay.class));
+    }
+
+    @Test
+    public void onDisplayAdded_loadsBarControlPolicyFilters() {
+        String text = "sample text";
+        Settings.Global.putString(
+                mContext.getContentResolver(),
+                CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
+                text
+        );
+
+        mController.onDisplayAdded(DISPLAY_ID);
+
+        assertThat(BarControlPolicy.sSettingValue).isEqualTo(text);
+    }
+
+    @Test
+    public void onDisplayRemoved_unsetsDisplayWindowInsetsControllerInWMService()
+            throws RemoteException {
+        mController.onDisplayAdded(DISPLAY_ID);
+
+        mController.onDisplayRemoved(DISPLAY_ID);
+
+        verify(mIWindowManager).setDisplayWindowInsetsController(
+                DISPLAY_ID, /* displayWindowInsetsController= */ null);
+    }
+}
diff --git a/packages/Connectivity/OWNERS b/packages/Connectivity/OWNERS
new file mode 100644
index 0000000..48e54da
--- /dev/null
+++ b/packages/Connectivity/OWNERS
@@ -0,0 +1,3 @@
+set noparent
+
+include platform/frameworks/base:/services/core/java/com/android/server/net/OWNERS
diff --git a/packages/CtsShim/build/Android.bp b/packages/CtsShim/build/Android.bp
index 43e3868..14a3376 100644
--- a/packages/CtsShim/build/Android.bp
+++ b/packages/CtsShim/build/Android.bp
@@ -34,6 +34,8 @@
 
     compile_multilib: "both",
     jni_libs: ["libshim_jni"],
+
+    uses_libs: ["android.test.runner"],
 }
 
 genrule {
@@ -108,6 +110,7 @@
     compile_multilib: "both",
     jni_libs: ["libshim_jni"],
 
+    uses_libs: ["android.test.runner"],
 }
 
 //##########################################################
diff --git a/packages/DynamicSystemInstallationService/res/values-af/strings.xml b/packages/DynamicSystemInstallationService/res/values-af/strings.xml
index 1829d34..231a5ce 100644
--- a/packages/DynamicSystemInstallationService/res/values-af/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-af/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dinamiese stelsel is gereed. Herbegin jou toestel om dit te begin gebruik."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Installeer tans"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Kon nie installeer nie"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Kon nie prent bekragtig nie. Staak installering."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Kon nie beeldafskrif bekragtig nie. Staak installering."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Laat loop tans \'n dinamiese stelsel. Herbegin om die oorspronklike Android-weergawe te gebruik."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Kanselleer"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Gooi weg"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Herbegin"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Het dinamiese stelsel weggegooi"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Kan nie dinamiese stelsel herbegin of laai nie"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Kon nie dinamiese stelsel deaktiveer nie"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-am/strings.xml b/packages/DynamicSystemInstallationService/res/values-am/strings.xml
index 7fcc40d..d0fc3cc 100644
--- a/packages/DynamicSystemInstallationService/res/values-am/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-am/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ዳግም ጀምር"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"የተጣለ ተለዋዋጭ ሥርዓት"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ዳግም ማስጀመር አይቻልም ወይም ተለዋዋጭ ሥርዓትን ይስቀሉ"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ተለዋዋጭ ስርዓትን ማሰናከል አልተሳካም"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ar/strings.xml b/packages/DynamicSystemInstallationService/res/values-ar/strings.xml
index be705c3..279cba1 100644
--- a/packages/DynamicSystemInstallationService/res/values-ar/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ar/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"النظام الديناميكي جاهز. لبدء استخدامه، يجب إعادة تشغيل الجهاز."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"التثبيت قيد التقدّم."</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"تعذّر التثبيت."</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"تعذّر التحقّق من الصورة. يجب إلغاء التثبيت."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"تعذّر التحقّق من النسخة. يجب إلغاء التثبيت."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"‏يتم الآن تشغيل نظام ديناميكي. يجب إعادة التشغيل لاستخدام الإصدار الأصلي لنظام Android."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"إلغاء"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"تجاهل"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"إعادة التشغيل"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"تم تجاهل النظام الديناميكي."</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"لا يمكن إعادة التشغيل أو تحميل النظام الديناميكي."</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"تعذّر إيقاف النظام الديناميكي."</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-as/strings.xml b/packages/DynamicSystemInstallationService/res/values-as/strings.xml
index 14eead9..13c8abc 100644
--- a/packages/DynamicSystemInstallationService/res/values-as/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-as/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ৰিষ্টাৰ্ট কৰক"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"বাতিল কৰা ডায়নামিক ছিষ্টেম"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ডায়নামিক ছিষ্টেম ৰিষ্টার্ট অথবা ল\'ড কৰিব নোৱাৰি"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ডায়নামিক ছিষ্টেম অক্ষম কৰিব পৰা নগ’ল"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-az/strings.xml b/packages/DynamicSystemInstallationService/res/values-az/strings.xml
index d1f0a4b..03d7cca 100644
--- a/packages/DynamicSystemInstallationService/res/values-az/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-az/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dinamik sistem hazırdır. İstifadəyə başlamaq üçün cihazınızı yenidən başladın."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Quraşdırılır"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Quraşdırılmadı"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Şəkil təsdiqlənmədi. Quraşdırmanı dayandırın."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Görüntü doğrulanması alınmadı. Quraşdırmanı dayandırın."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Hazırda dinamik sistem icra olunur. Orijinal Android versiyasından istifadə etmək üçün yenidən başladın."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Ləğv edin"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"İmtina edin"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Yenidən başladın"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dinamik sistemdən imtina edildi"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Dinamik sistemi yenidən başlatmaq və ya yükləmək mümkün deyil"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dinamik sistemi deaktiv etmək alınmadı"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-b+sr+Latn/strings.xml b/packages/DynamicSystemInstallationService/res/values-b+sr+Latn/strings.xml
index ea23a28..0e770da 100644
--- a/packages/DynamicSystemInstallationService/res/values-b+sr+Latn/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-b+sr+Latn/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dinamični sistem je spreman. Da biste počeli da ga koristite, restartujte uređaj."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Instalira se"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Instaliranje nije uspelo"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Validacija slike nije uspela. Otkažite instalaciju."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Validacija slike diska nije uspela. Otkažite instalaciju."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Trenutno je pokrenut dinamični sistem. Restartujte da biste koristili originalnu verziju Android-a."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Otkaži"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Odbaci"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Restartuj"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dinamični sistem je odbačen"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Restartovanje ili učitavanje dinamičnog sistema nije uspelo"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Onemogućavanje dinamičnog sistema nije uspelo"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-be/strings.xml b/packages/DynamicSystemInstallationService/res/values-be/strings.xml
index 7eef297..2044655a 100644
--- a/packages/DynamicSystemInstallationService/res/values-be/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-be/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Дынамічная сістэма гатовая. Каб пачаць выкарыстоўваць яе, перазапусціце прыладу."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Ідзе ўсталёўка"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Збой усталёўкі"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Збой пры праверцы відарыса. Усталёўка спынена."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Збой пры праверцы вобраза дыска. Усталёўка спынена."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Цяпер запушчана дынамічная сістэма. Перазапусціце, каб скарыстаць арыгінальную версію Android."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Скасаваць"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Адхіліць"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Перазапусціць"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Дынамічная сістэма адхілена"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Не ўдалося перазапусціць або загрузіць дынамічную сістэму"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Не ўдалося адключыць дынамічную сістэму"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-bg/strings.xml b/packages/DynamicSystemInstallationService/res/values-bg/strings.xml
index 9176676..f8c4fd9 100644
--- a/packages/DynamicSystemInstallationService/res/values-bg/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-bg/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Рестартиране"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Динамичната система е отхвърлена"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Динамичната система не може да се рестартира или зареди"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Деактивирането на динамичната система не бе успешно"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-bn/strings.xml b/packages/DynamicSystemInstallationService/res/values-bn/strings.xml
index 38ef649..87d0158 100644
--- a/packages/DynamicSystemInstallationService/res/values-bn/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-bn/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ডায়নামিক সিস্টেম রেডি হয়ে গেছে। সেটি ব্যবহার করা শুরু করতে আপনার ডিভাইস রিস্টার্ট করুন।"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ইনস্টল করা হচ্ছে"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ইনস্টল করা যায়নি"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ছবি যাচাই করা যায়নি। ইনস্টলেশন বন্ধ করুন।"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ইমেজ যাচাই করা যায়নি। ইনস্টলেশন বন্ধ করুন।"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"বর্তমানে ডায়নামিক সিস্টেম চালানো হচ্ছে। আসল Android ভার্সন ব্যবহার করার জন্য রিস্টার্ট করুন।"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"বাতিল করুন"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"বাতিল করুন"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"রিস্টার্ট করুন"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ডায়নামিক সিস্টেম বাতিল করা হয়েছে"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ডায়নামিক সিস্টেম রিস্টার্ট বা লোড করা যাচ্ছে না"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ডায়নামিক সিস্টেম বন্ধ করা যায়নি"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-bs/strings.xml b/packages/DynamicSystemInstallationService/res/values-bs/strings.xml
index 84ba540..7798424 100644
--- a/packages/DynamicSystemInstallationService/res/values-bs/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-bs/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dinamični sistem je spreman. Da ga počnete koristiti, ponovo pokrenite uređaj."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Instaliranje je u toku"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Instaliranje nije uspjelo"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Potvrda slike sistema nije uspjela. Prekini instalaciju."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Potvrda slike diska nije uspjela. Prekini instalaciju."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Dinamični sistem je sada aktivan. Ponovo pokrenite da koristite originalnu verziju Androida."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Otkaži"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Odbaci"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Ponovo pokreni"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dinamični sistem je odbačen"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Nije moguće ponovo pokrenuti ili učitati dinamični sistem"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Onemogućavanje dinamičnog sistema nije uspjelo"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ca/strings.xml b/packages/DynamicSystemInstallationService/res/values-ca/strings.xml
index 787e496..da6bd8a 100644
--- a/packages/DynamicSystemInstallationService/res/values-ca/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ca/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reinicia"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"S\'ha descartat el sistema dinàmic"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"No es pot reiniciar ni carregar el sistema dinàmic"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"No s\'ha pogut desactivar el sistema dinàmic"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-cs/strings.xml b/packages/DynamicSystemInstallationService/res/values-cs/strings.xml
index 3dfb23f..41e0bbe 100644
--- a/packages/DynamicSystemInstallationService/res/values-cs/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-cs/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dynamický systém je připraven. Chcete-li ho začít používat, restartujte zařízení."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Probíhá instalace"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Instalace se nezdařila"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Obraz se nepodařilo ověřit. Zrušte instalaci."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Obraz disku se nepodařilo ověřit. Zrušte instalaci."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Je spuštěn dynamický systém. Chcete-li použít původní verzi systému Android, restartujte zařízení."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Zrušit"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Zahodit"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Restartovat"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Zahodit dynamický systém"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Dynamický systém nelze znovu spustit nebo načíst"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dynamický systém se nepodařilo deaktivovat"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-da/strings.xml b/packages/DynamicSystemInstallationService/res/values-da/strings.xml
index 20005e7..252ae5a 100644
--- a/packages/DynamicSystemInstallationService/res/values-da/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-da/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Det dynamiske system er klar. Hvis du vil begynde at bruge det, skal du genstarte din enhed."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Installation i gang"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Installationen mislykkedes"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Billedet kunne ikke valideres. Afbryd installationen."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Systembilledet kunne ikke valideres. Afbryd installationen."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Der køres i øjeblikket et dynamisk system. Genstart for at bruge den oprindelige Android-version."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Annuller"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Afbryd"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Genstart"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Det dynamiske system blev slettet"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Det dynamiske system kan ikke genstartes eller indlæses"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Det dynamiske system kunne ikke deaktiveres"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-de/strings.xml b/packages/DynamicSystemInstallationService/res/values-de/strings.xml
index 3f000ea..382fc01 100644
--- a/packages/DynamicSystemInstallationService/res/values-de/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-de/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Neu starten"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dynamisches System verworfen"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Neustart und Laden des dynamischen Systems nicht möglich"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Fehler beim Deaktivieren des dynamischen Systems"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-el/strings.xml b/packages/DynamicSystemInstallationService/res/values-el/strings.xml
index 4d830dd..61dfd34 100644
--- a/packages/DynamicSystemInstallationService/res/values-el/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-el/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Επανεκκίνηση"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Οι δυναμικές συστήματος απορρίφθηκαν."</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Δεν είναι δυνατή η επανεκκίνηση ή η φόρτωση δυναμικών συστήματος"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Απέτυχε η απενεργοποίηση των δυναμικών συστήματος"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-en-rAU/strings.xml b/packages/DynamicSystemInstallationService/res/values-en-rAU/strings.xml
index d728631..62dba98 100644
--- a/packages/DynamicSystemInstallationService/res/values-en-rAU/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-en-rAU/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Restart"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Discarded dynamic system"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Can’t restart or load dynamic system"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Failed to disable dynamic system"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-en-rCA/strings.xml b/packages/DynamicSystemInstallationService/res/values-en-rCA/strings.xml
index d728631..62dba98 100644
--- a/packages/DynamicSystemInstallationService/res/values-en-rCA/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-en-rCA/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Restart"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Discarded dynamic system"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Can’t restart or load dynamic system"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Failed to disable dynamic system"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-en-rGB/strings.xml b/packages/DynamicSystemInstallationService/res/values-en-rGB/strings.xml
index d728631..62dba98 100644
--- a/packages/DynamicSystemInstallationService/res/values-en-rGB/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-en-rGB/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Restart"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Discarded dynamic system"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Can’t restart or load dynamic system"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Failed to disable dynamic system"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-en-rIN/strings.xml b/packages/DynamicSystemInstallationService/res/values-en-rIN/strings.xml
index d728631..62dba98 100644
--- a/packages/DynamicSystemInstallationService/res/values-en-rIN/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-en-rIN/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Restart"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Discarded dynamic system"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Can’t restart or load dynamic system"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Failed to disable dynamic system"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-en-rXC/strings.xml b/packages/DynamicSystemInstallationService/res/values-en-rXC/strings.xml
index 6ac3763..2e83672 100644
--- a/packages/DynamicSystemInstallationService/res/values-en-rXC/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-en-rXC/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‏‏‏‎‏‏‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‎‏‎‏‎‎‎‎‎‏‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‎‏‏‏‏‏‎‏‎‎‏‎Restart‎‏‎‎‏‎"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‎‎‎‎‎‎‏‏‎‏‏‎‏‏‏‏‎‏‏‎‎‏‎‎‎‎‏‎‎‏‎‏‎‎‏‎‏‏‏‏‏‏‎‏‎‏‎‏‏‏‏‎‎‏‏‎‏‎‎Discarded dynamic system‎‏‎‎‏‎"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‏‏‏‏‏‎‎‎‎‏‎‎‏‏‏‎‎‏‏‏‏‏‎‏‎‎‏‎‏‎‎‎‏‎‎‎‎‎‏‏‎‏‏‏‎‏‎‎‎‎‎‏‎‎‎‏‏‎Can’t restart or load dynamic system‎‏‎‎‏‎"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‏‏‎‎‏‏‎‎‏‎‏‎‎‏‏‎‏‏‏‎‎‏‏‎‎‏‏‎‎‎‎‏‎‏‎‏‎‎‏‎‎‏‏‏‏‎‎‏‎‎‎‎‏‏‏‎‏‎Failed to disable dynamic system‎‏‎‎‏‎"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-es-rUS/strings.xml b/packages/DynamicSystemInstallationService/res/values-es-rUS/strings.xml
index 9ec8196..1d8a48b 100644
--- a/packages/DynamicSystemInstallationService/res/values-es-rUS/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-es-rUS/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reiniciar"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Se descartó el sistema dinámico"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"No se puede reiniciar o cargar el sistema dinámico"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"No se pudo inhabilitar el sistema dinámico"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-es/strings.xml b/packages/DynamicSystemInstallationService/res/values-es/strings.xml
index cd9db07..fe47884 100644
--- a/packages/DynamicSystemInstallationService/res/values-es/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-es/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reiniciar"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Se ha descartado el sistema dinámico"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"No se ha podido reiniciar o cargar el sistema dinámico"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"No se ha podido inhabilitar el sistema dinámico"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-et/strings.xml b/packages/DynamicSystemInstallationService/res/values-et/strings.xml
index 64968b60..058d6b9 100644
--- a/packages/DynamicSystemInstallationService/res/values-et/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-et/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Taaskäivita"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dünaamilisest süsteemist loobuti"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Dünaamilist süsteemi ei saa taaskäivitada ega laadida"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dünaamilise süsteemi keelamine ebaõnnestus"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-eu/strings.xml b/packages/DynamicSystemInstallationService/res/values-eu/strings.xml
index 7c4a67d..6576edd 100644
--- a/packages/DynamicSystemInstallationService/res/values-eu/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-eu/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Berrabiarazi"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Baztertu da sistema dinamikoa"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Ezin da berrabiarazi edo kargatu sistema dinamikoa"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Ezin izan da desgaitu sistema dinamikoa"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-fa/strings.xml b/packages/DynamicSystemInstallationService/res/values-fa/strings.xml
index 7533e71..9976d56 100644
--- a/packages/DynamicSystemInstallationService/res/values-fa/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-fa/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"سیستم پویا آماده است. برای استفاده از آن، دستگاه را بازراه‌اندازی کنید."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"درحال نصب"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"نصب نشد"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"راستی‌آزمایی تصویر انجام نشد. نصب را لغو کنید."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"اعتبارسنجی نسخه دیسک انجام نشد. نصب را لغو کنید."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"‏درحال‌حاضر سیستم پویا اجرا می‌شود. برای استفاده از نسخه اصلی Android، بازراه‌اندازی کنید."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"لغو کردن"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"صرف‌نظر کردن"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"بازراه‌اندازی"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"از سیستم پویا صرف‌نظر شد"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"نمی‌توان سیستم پویا را بازراه‌اندازی یا بار کرد"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"سیستم پویا غیرفعال نشد"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-fi/strings.xml b/packages/DynamicSystemInstallationService/res/values-fi/strings.xml
index 948c333..f32fc37 100644
--- a/packages/DynamicSystemInstallationService/res/values-fi/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-fi/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dynaaminen järjestelmä on valmis. Aloita sen käyttö käynnistämällä laite uudelleen."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Asennus käynnissä"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Asennus epäonnistui"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Kuvavahvistus epäonnistui. Keskeytä asennus."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Levykuvan vahvistus epäonnistui. Keskeytä asennus."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Käyttää tällä hetkellä dynaamista järjestelmää. Käynnistä uudelleen käyttääksesi alkuperäistä Android-versiota."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Peruuta"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Hylkää"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Käynn. uudelleen"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dynaaminen järjestelmä hylätty"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Dynaamista järjestelmää ei voi käynnistää uudelleen tai ladata"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dynaamisen järjestelmän käytöstäpoisto epäonnistui"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-fr-rCA/strings.xml b/packages/DynamicSystemInstallationService/res/values-fr-rCA/strings.xml
index 6e2f235..f5e394a 100644
--- a/packages/DynamicSystemInstallationService/res/values-fr-rCA/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-fr-rCA/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Le système dynamique est prêt. Pour commencer à l\'utiliser, redémarrez votre appareil."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Installation en cours…"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Échec de l\'installation"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Impossible de valider l\'image. Annulation de l\'installation."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Impossible de valider l\'image. Annulez l\'installation."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Un système dynamique est en cours d\'exécution. Pour utiliser la version originale d\'Android, redémarrez l\'appareil."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Annuler"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Annuler"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Redémarrer"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Système dynamique supprimé"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Impossible de redémarrer ou de charger le système dynamique"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Échec de la désactivation du système dynamique"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-fr/strings.xml b/packages/DynamicSystemInstallationService/res/values-fr/strings.xml
index 67f7997..c4cd92d 100644
--- a/packages/DynamicSystemInstallationService/res/values-fr/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-fr/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Redémarrer"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Système dynamique supprimé"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Impossible de redémarrer ou de charger le système dynamique"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Échec de la désactivation du système dynamique"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-gl/strings.xml b/packages/DynamicSystemInstallationService/res/values-gl/strings.xml
index 8ea6d1c..58a80a7 100644
--- a/packages/DynamicSystemInstallationService/res/values-gl/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-gl/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reiniciar"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Descartouse o sistema dinámico"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Non se puido reiniciar nin cargar o sistema dinámico"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Produciuse un erro ao desactivar o sistema dinámico"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-gu/strings.xml b/packages/DynamicSystemInstallationService/res/values-gu/strings.xml
index aec1804..aa1c3c5 100644
--- a/packages/DynamicSystemInstallationService/res/values-gu/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-gu/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ફરી શરૂ કરો"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ડાઇનૅમિક સિસ્ટમ કાઢી નાખવામાં આવી"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ડાઇનૅમિક સિસ્ટમને ફરી શરૂ અથવા લોડ કરી શકાતી નથી"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ડાઇનૅમિક સિસ્ટમ બંધ કરવામાં નિષ્ફળ રહ્યાં"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-hi/strings.xml b/packages/DynamicSystemInstallationService/res/values-hi/strings.xml
index efedbe8..e2d535f 100644
--- a/packages/DynamicSystemInstallationService/res/values-hi/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-hi/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"रीस्टार्ट करें"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"डाइनैमिक सिस्टम खारिज किया गया"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"डाइनैमिक सिस्टम रीस्टार्ट या लोड नहीं हो सका"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"डाइनैमिक सिस्टम को बंद नहीं किया जा सका"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-hr/strings.xml b/packages/DynamicSystemInstallationService/res/values-hr/strings.xml
index 50ceaa1..1df6a81 100644
--- a/packages/DynamicSystemInstallationService/res/values-hr/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-hr/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dinamični sustav je spreman. Da biste ga počeli upotrebljavati, ponovno pokrenite svoj uređaj."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Instalacija u tijeku"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Instaliranje nije uspjelo"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Provjera slike nije uspjela. Prekini instalaciju."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Provjera slike diska nije uspjela. Prekini instalaciju."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Trenutačno je pokrenut dinamični sustav. Ponovno pokrenite kako biste upotrebljavali izvornu verziju Androida."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Otkaži"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Odbaci"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Pokreni"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Odbačeni dinamični sustav"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Nije moguće ponovno pokretanje ili učitavanje dinamičnog sustava"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Onemogućivanje dinamičnog sustava nije uspjelo"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-hu/strings.xml b/packages/DynamicSystemInstallationService/res/values-hu/strings.xml
index 94afa3b..2540ce6 100644
--- a/packages/DynamicSystemInstallationService/res/values-hu/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-hu/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"A dinamikus rendszer készen áll. A használatához indítsa újra az eszközt."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Telepítés…"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Sikertelen telepítés"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"A kép ellenőrzése nem sikerült. A telepítés megszakad."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"A lemezkép ellenőrzése nem sikerült. A telepítés megszakad."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Jelenleg dinamikus rendszert futtat. Az eredeti Android-verzió használatához indítsa újra az eszközt."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Mégse"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Elvetés"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Újraindítás"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Elvetett dinamikus rendszer"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Nem lehet újraindítani vagy betölteni a dinamikus rendszert"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Nem sikerült kikapcsolni a dinamikus rendszert"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-hy/strings.xml b/packages/DynamicSystemInstallationService/res/values-hy/strings.xml
index b0cd740..e85a291 100644
--- a/packages/DynamicSystemInstallationService/res/values-hy/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-hy/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Դինամիկ համակարգը պատրաստ է։ Այն օգտագործելու համար վերագործարկեք ձեր սարքը։"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Տեղադրում"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Չհաջողվեց տեղադրել"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Չհաջողվեց հաստատել պատկերը։ Չեղարկել տեղադրումը։"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Չհաջողվեց հաստատել սկավառակի պատկերը։ Չեղարկեք տեղադրումը։"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Աշխատեցվում է դինամիկ համակարգը։ Վերագործարկեք՝ Android-ի նախկին տարբերակին անցնելու համար։"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Չեղարկել"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Հրաժարվել"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Վերագործարկել"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Դինամիկ համակարգի գործարկումը չեղարկվեց"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Չհաջողվեց վերագործարկել կամ բեռնել դինամիկ համակարգը"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Չհաջողվեց անջատել դինամիկ համակարգը"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-in/strings.xml b/packages/DynamicSystemInstallationService/res/values-in/strings.xml
index 44b4aee..6986005 100644
--- a/packages/DynamicSystemInstallationService/res/values-in/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-in/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Mulai ulang"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dynamic System dihapus"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Tidak dapat memulai ulang atau memuat Dynamic System"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Gagal menonaktifkan sistem dinamis"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-is/strings.xml b/packages/DynamicSystemInstallationService/res/values-is/strings.xml
index 048d1bc..4499c14 100644
--- a/packages/DynamicSystemInstallationService/res/values-is/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-is/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Breytilegt kerfi er tilbúið. Endurræstu tækið til að byrja að nota það."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Uppsetning stendur yfir"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Uppsetning mistókst"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Ekki tókst að staðfesta mynd. Hættu við uppsetninguna."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Ekki tókst að staðfesta diskmynd. Hættu við uppsetninguna."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Tækið keyrir á breytilegu kerfi. Endurræstu til að nota upprunalega Android útgáfu."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Hætta við"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Fleygja"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Endurræsa"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Breytilegu kerfi fleygt"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Ekki tókst að endurræsa eða hlaða breytilegu kerfi"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Ekki tókst að slökkva á breytilegu kerfi"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-it/strings.xml b/packages/DynamicSystemInstallationService/res/values-it/strings.xml
index f70b381..2c91aeb 100644
--- a/packages/DynamicSystemInstallationService/res/values-it/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-it/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Riavvia"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Sistema dinamico annullato"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Impossibile riavviare o caricare il sistema dinamico"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Impossibile disattivare il sistema dinamico"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-iw/strings.xml b/packages/DynamicSystemInstallationService/res/values-iw/strings.xml
index aff7c82..2f539e3 100644
--- a/packages/DynamicSystemInstallationService/res/values-iw/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-iw/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"המערכת הדינמית מוכנה. כדי להתחיל להשתמש בה, יש להפעיל מחדש את המכשיר."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ההתקנה מתבצעת"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ההתקנה נכשלה"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"אימות התמונה נכשל. יש לבטל את ההתקנה."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"האימות של קובץ האימג\' נכשל. ההתקנה תבוטל."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"‏בשלב זה פועלת מערכת דינמית. כדי להשתמש בגרסת Android המקורית, יש לבצע הפעלה מחדש."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"ביטול"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"סגירה"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"הפעלה מחדש"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"המערכת הדינמית נסגרה"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"לא ניתן להפעיל מחדש או לטעון את המערכת הדינמית"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"השבתת המערכת הדינמית נכשלה"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ja/strings.xml b/packages/DynamicSystemInstallationService/res/values-ja/strings.xml
index 46c0930..2d5fc4f 100644
--- a/packages/DynamicSystemInstallationService/res/values-ja/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ja/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"再起動"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"動的システムを破棄しました"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"動的システムの再起動や読み込みを行えません"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"動的システムを無効にできませんでした"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ka/strings.xml b/packages/DynamicSystemInstallationService/res/values-ka/strings.xml
index f841a59..3cc1932 100644
--- a/packages/DynamicSystemInstallationService/res/values-ka/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ka/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"დინამიური სისტემა მზადაა. გადატვირთეთ მოწყობილობა მის გამოსაყენებლად."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ინსტალირდება"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ინსტალაცია ვერ მოხერხდა"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"სურათის ვალიდაცია ვერ მოხერხდა. ინსტალაციის შეწყვეტა."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"იმიჯის ვალიდაცია ვერ მოხერხდა. ინსტალაციის შეწყვეტა."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"ამჟამად გამოიყენება დინამიური სისტემა. გადატვირთეთ Android-ის ორიგინალი ვერსიის გამოსაყენებლად."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"გაუქმება"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"გაუქმება"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"გადატვირთვა"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"გაუქმებული დინამიური სისტემა"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"დინამიური სისტემის გადატვირთვა ან ჩატვირთვა ვერ ხერხდება"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"დინამიკური სისტემის გათიშვა ვარ მოხერხდა"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-kk/strings.xml b/packages/DynamicSystemInstallationService/res/values-kk/strings.xml
index d367b61..9aafc2f 100644
--- a/packages/DynamicSystemInstallationService/res/values-kk/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-kk/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Қайта қосу"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Динамикалық жүйе өшірілді."</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Динамикалық жүйені қайта қосу не жүктеу мүмкін емес."</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Динамикалық жүйе өшірілмеді."</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-km/strings.xml b/packages/DynamicSystemInstallationService/res/values-km/strings.xml
index 56a3716..502ae93 100644
--- a/packages/DynamicSystemInstallationService/res/values-km/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-km/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ប្រព័ន្ធឌីណាមិច​អាចប្រើ​បានហើយ។ ដើម្បីចាប់ផ្ដើមប្រើ​ប្រព័ន្ធឌីណាមិច សូមចាប់ផ្ដើម​ឧបករណ៍របស់អ្នក​ឡើងវិញ។"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ការដំឡើងកំពុង​ដំណើរការ"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ការដំឡើង​មិនបានសម្រេច"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"បញ្ជាក់​ភាពត្រឹមត្រូវ​នៃរូបភាព​មិនបានសម្រេច។ បោះបង់​ការដំឡើង។"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ការផ្ទៀងផ្ទាត់ច្បាប់ចម្លងថាស​មិនបានសម្រេច។ បោះបង់​ការដំឡើង។"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"បច្ចុប្បន្ន​កំពុងដំណើរការ​ប្រព័ន្ធឌីណាមិច។ ចាប់ផ្ដើម​ឡើងវិញ ដើម្បីប្រើ​កំណែ Android ដើម។"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"បោះបង់"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"លុបចោល"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ចាប់ផ្ដើមឡើងវិញ"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"បានលុបចោល​ប្រព័ន្ធឌីណាមិច"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"មិនអាច​ចាប់ផ្ដើមឡើងវិញ ឬផ្ទុក​ប្រព័ន្ធឌីណាមិច​បានទេ"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"មិនអាចបិទ​ប្រព័ន្ធឌីណាមិច​បានទេ"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-kn/strings.xml b/packages/DynamicSystemInstallationService/res/values-kn/strings.xml
index b4063df..cd5044d 100644
--- a/packages/DynamicSystemInstallationService/res/values-kn/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-kn/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ಡೈನಾಮಿಕ್ ಸಿಸ್ಟಂ ಸಿದ್ದವಾಗಿದೆ. ಇದನ್ನು ಬಳಸಲು, ನಿಮ್ಮ ಸಾಧನವನ್ನು ಮರುಪ್ರಾರಂಭಿಸಿ."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ಇನ್‌ಸ್ಟಾಲ್ ಆಗುತ್ತಿದೆ"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡಲು ವಿಫಲವಾಗಿದೆ"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ಚಿತ್ರದ ಮೌಲ್ಯೀಕರಣ ವಿಫಲವಾಗಿದೆ. ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡುವಿಕೆಯನ್ನು ರದ್ದುಗೊಳಿಸಿ."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ಇಮೇಜ್ ಮೌಲ್ಯೀಕರಣ ವಿಫಲವಾಗಿದೆ. ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡುವಿಕೆಯನ್ನು ರದ್ದುಗೊಳಿಸಿ."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"ಪ್ರಸ್ತುತವಾಗಿ ಡೈನಾಮಿಕ್ ಸಿಸ್ಟಂ ರನ್ ಆಗುತ್ತಿದೆ ಮೂಲ Android ಆವೃತ್ತಿ ಬಳಸಲು, ಮರುಪ್ರಾರಂಭಿಸಿ."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"ರದ್ದುಗೊಳಿಸಿ"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"ತ್ಯಜಿಸಿ"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ಮರುಪ್ರಾರಂಭಿಸಿ"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ಡೈನಮಿಕ್ ಸಿಸ್ಟಂ ಅನ್ನು ತ್ಯಜಿಸಲಾಗಿದೆ"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ಡೈನಾಮಿಕ್ ಸಿಸ್ಟಂ ಅನ್ನು ಮರುಪ್ರಾರಂಭಿಸಲು ಅಥವಾ ಲೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ಡೈನಾಮಿಕ್ ಸಿಸ್ಟಂ ಅನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ವಿಫಲವಾಗಿದೆ"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ko/strings.xml b/packages/DynamicSystemInstallationService/res/values-ko/strings.xml
index 24ac924..0db6d06 100644
--- a/packages/DynamicSystemInstallationService/res/values-ko/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ko/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"다시 시작"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"동적 시스템 삭제됨"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"동적 시스템을 다시 시작하거나 로드할 수 없음"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"동적 시스템을 사용 중지하는 데 실패함"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ky/strings.xml b/packages/DynamicSystemInstallationService/res/values-ky/strings.xml
index a4387e7..320faff 100644
--- a/packages/DynamicSystemInstallationService/res/values-ky/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ky/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Динамикалык система даяр. Аны колдонуу үчүн, түзмөктү өчүрүп күйгүзүңүз."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Орнотулууда"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Орнотулбай койду"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Сүрөт текшерилбей калды. Орнотууну токтотуңуз."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Дисктин сүрөтү текшерилбей калды. Орнотууну токтотуңуз."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Учурда динамикалык система колдонулууда. Android\'дин түпнуска версиясын колдонуу үчүн, өчүрүп күйгүзүңүз."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Жок"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Жоюу"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Өчүрүп күйгүзүү"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Динамикалык система жоюлду"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Динамикалык система өчүрүлүп күйгүзүлбөй же жүктөлбөй жатат"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Динамикалык система өчпөй койду"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-lo/strings.xml b/packages/DynamicSystemInstallationService/res/values-lo/strings.xml
index f17ca16..0ee3990 100644
--- a/packages/DynamicSystemInstallationService/res/values-lo/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-lo/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ລະບົບໄດນາມິກພ້ອມແລ້ວ. ກະລຸນາຣີສະຕາດອຸປະກອນຂອງທ່ານເພື່ອເລີ່ມນຳໃຊ້ມັນ."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ກຳລັງຕິດຕັ້ງຢູ່"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ຕິດຕັ້ງບໍ່ສຳເລັດ"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ການກວດສອບໄຟລ໌ຮູບບໍ່ສຳເລັດ. ຍົກເລີກການຕິດຕັ້ງ."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ກວດສອບໄຟລ໌ອິມເມກບໍ່ສຳເລັດ. ຍົກເລີກການຕິດຕັ້ງ."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"ຕອນນີ້ກຳລັງໃຊ້ລະບົບໄດນາມິກ. ກະລຸນາຣີສະຕາດເພື່ອໃຊ້ເວີຊັນ Android ຕົ້ນສະບັບ."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"ຍົກເລີກ"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"ປິດໄວ້"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ຣີສະຕາດ"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ລະບົບໄດນາມິກທີ່ຍົກເລີກແລ້ວ"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ບໍ່ສາມາດຣີສະຕາດ ຫຼື ໂຫຼດລະບົບໄດນາມິກໄດ້"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ປິດການນຳໃຊ້ລະບົບໄດນາມິກບໍ່ສຳເລັດ"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-lt/strings.xml b/packages/DynamicSystemInstallationService/res/values-lt/strings.xml
index 8128eb7..2352c22 100644
--- a/packages/DynamicSystemInstallationService/res/values-lt/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-lt/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dinaminė sistema paruošta. Jei norite pradėti ją naudoti, paleiskite įrenginį iš naujo."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Diegiama"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Įdiegti nepavyko"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Nepavyko patvirtinti vaizdo. Nutraukti diegimą."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Nepavyko patvirtinti atvaizdžio. Nutraukti diegimą."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Šiuo metu paleista dinaminė sistema. Paleiskite iš naujo, jei norite naudoti pradinę „Android“ versiją."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Atšaukti"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Atmesti"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Pal. iš naujo"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dinaminė sistema atmesta"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Nepavyko paleisti iš naujo ar įkelti dinaminės sistemos"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Nepavyko išjungti dinaminės sistemos"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-lv/strings.xml b/packages/DynamicSystemInstallationService/res/values-lv/strings.xml
index cfe7a08..4f83563 100644
--- a/packages/DynamicSystemInstallationService/res/values-lv/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-lv/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Restartēt"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dinamiskā sistēma tika atmesta"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Nevar restartēt vai ielādēt dinamisko sistēmu"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Neizdevās atspējot dinamisko sistēmu."</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-mk/strings.xml b/packages/DynamicSystemInstallationService/res/values-mk/strings.xml
index 21215aa..e205b73 100644
--- a/packages/DynamicSystemInstallationService/res/values-mk/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-mk/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Динамичниот систем е подготвен. За да започнете со користење, рестартирајте го уредот."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Инсталирањето е во тек"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Неуспешно инсталирање"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Проверката на сликата не успеа. Прекини ја инсталацијата."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Проверката на сликата на дискот не успеа. Прекини ја инсталацијата."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Во моментов се извршува динамичен систем. Рестартирајте за да ја користите оригиналната верзија на Android."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Откажи"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Отфрли"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Рестартирај"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Отфрлен динамичен систем"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Не може да го рестартира или вчита динамичниот систем"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Не успеа да се оневозможи динамичниот систем"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ml/strings.xml b/packages/DynamicSystemInstallationService/res/values-ml/strings.xml
index 951a0b9..2d4824a 100644
--- a/packages/DynamicSystemInstallationService/res/values-ml/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ml/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ഡെെനാമിക് സിസ്റ്റം തയ്യാറാണ്. അത് ഉപയോഗിച്ച് തുടങ്ങാൻ നിങ്ങളുടെ ഉപകരണം റീസ്റ്റാർട്ട് ചെയ്യുക."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ഇൻസ്‌റ്റാൾ ചെയ്യൽ പുരോഗതിയിലാണ്"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ഇൻസ്‌റ്റാൾ ചെയ്യാനായില്ല"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ചിത്രത്തിന്റെ മൂല്യനിർണ്ണയം നടത്താനായില്ല. ഇൻസ്‌റ്റലേഷൻ റദ്ദാക്കുക."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ഇമേജ് മൂല്യനിർണ്ണയം നടത്താനായില്ല. ഇൻസ്‌റ്റലേഷൻ റദ്ദാക്കുക."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"നിലവിൽ ഒരു ഡെെനാമിക് സിസ്റ്റം റൺ ചെയ്യുന്നുണ്ട്. ഒറിജിനൽ Android പതിപ്പ് ഉപയോഗിക്കാൻ റീസ്റ്റാർട്ട് ചെയ്യുക."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"റദ്ദാക്കുക"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"നിരസിക്കുക"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"റീസ്റ്റാർട്ട് ചെയ്യൂ"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ഡെെനാമിക് സിസ്റ്റം നിരസിച്ചു"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"റീസ്റ്റാർട്ട് ചെയ്യാനോ ഡെെനാമിക് സിസ്റ്റം ലോഡ് ചെയ്യാനോ ആവില്ല"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ഡൈനാമിക് സിസ്‌റ്റം പ്രവർത്തനരഹിതമാക്കാനായില്ല"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-mn/strings.xml b/packages/DynamicSystemInstallationService/res/values-mn/strings.xml
index d0965d0..367cc62 100644
--- a/packages/DynamicSystemInstallationService/res/values-mn/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-mn/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Дахин эхлүүлэх"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Динамик системийг устгасан"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Динамик системийг дахин эхлүүлэх эсвэл ачаалах боломжгүй байна"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Динамик системийг идэвхгүй болгож чадсангүй"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-mr/strings.xml b/packages/DynamicSystemInstallationService/res/values-mr/strings.xml
index 268e1d3..3b6741d 100644
--- a/packages/DynamicSystemInstallationService/res/values-mr/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-mr/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"डायनॅमिक सिस्टम तयार आहे. ती वापरणे सुरू करण्यासाठी, तुमचे डिव्हाइस रीस्टार्ट करा."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"इंस्टॉल प्रगतीपथावर आहे"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"इंस्टॉल करता आली नाही"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"इमेज प्रमाणीकरण करता आले नाही. इंस्टॉलेशन रद्द करा."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"इमेज प्रमाणित करता आली नाही. इंस्टॉलेशन रद्द करा."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"सध्या डायनॅमिक सिस्टम रन करत आहे. मूळ Android आवृत्ती वापरण्यासाठी रीस्टार्ट करा."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"रद्द करा"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"काढून टाका"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"रीस्टार्ट करा"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"डायनॅमिक सिस्टम काढून टाकली"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"डायनॅमिक सिस्टम रीस्टार्ट किंवा लोड करू शकत नाही"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"डायनॅमिक सिस्टम बंद करता आली नाही"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ms/strings.xml b/packages/DynamicSystemInstallationService/res/values-ms/strings.xml
index bba8b97..17b2c70 100644
--- a/packages/DynamicSystemInstallationService/res/values-ms/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ms/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Mulakan semula"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Sistem dinamik dibuang"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Tidak dapat memulakan semula atau memuatkan sistem dinamik"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Gagal melumpuhkan sistem dinamik"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-my/strings.xml b/packages/DynamicSystemInstallationService/res/values-my/strings.xml
index b2488ec..809f4dc 100644
--- a/packages/DynamicSystemInstallationService/res/values-my/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-my/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ပြောင်းလဲနိုင်သောစနစ် အသင့်ဖြစ်ပါပြီ။ ၎င်းကို စတင်အသုံးပြုရန် သင့်စက်ကို ပြန်စပါ။"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ထည့်သွင်းနေဆဲဖြစ်သည်"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ထည့်သွင်း၍မရပါ"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ပုံအတည်ပြု၍ မရပါ။ ထည့်သွင်းမှုကို ရပ်ပါ။"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ဒစ်ခ် မိတ္တူကို အတည်ပြု၍ မရပါ။ ထည့်သွင်းမှုကို ရပ်ပါ။"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"လက်ရှိတွင် ပြောင်းလဲနိုင်သောစနစ်ကို အသုံးပြုနေသည်။ မူလ Android ဗားရှင်း အသုံးပြုရန် ပြန်စတင်ပါ။"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"မလုပ်တော့"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"ဖယ်ပစ်ရန်"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ပြန်စရန်"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ပြောင်းလဲနိုင်သောစနစ်ကို ဖယ်လိုက်သည်"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ပြန်စ၍ မရပါ (သို့) ပြောင်းလဲနိုင်သောစနစ် ဖွင့်၍မရပါ"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ပြောင်းလဲနိုင်သောစနစ်ကို ပိတ်၍မရပါ"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-nb/strings.xml b/packages/DynamicSystemInstallationService/res/values-nb/strings.xml
index 36e3d69..2f8fce8 100644
--- a/packages/DynamicSystemInstallationService/res/values-nb/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-nb/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Det dynamiske systemet er klart. Start enheten din på nytt for å begynne å bruke det."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Installeringen pågår"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Installeringen mislyktes"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Bildebekreftelsen mislyktes. Avbryt installeringen."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Kunne ikke validere diskbildet. Avbryt installeringen."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Kjører et dynamisk system nå. Start på nytt for å bruke den opprinnelige Android-versjonen."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Avbryt"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Forkast"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Start på nytt"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Det dynamiske systemet er forkastet"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Det dynamiske systemet kan ikke startes på nytt eller lastes inn"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Kunne ikke slå av det dynamiske systemet"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ne/strings.xml b/packages/DynamicSystemInstallationService/res/values-ne/strings.xml
index ee92678..7afbfd9 100644
--- a/packages/DynamicSystemInstallationService/res/values-ne/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ne/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dynamic System तयार छ। यसको प्रयोग सुरु गर्न आफ्नो यन्त्र रिस्टार्ट गर्नुहोस्।"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"इन्स्टल हुँदै छ"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"स्थापना गर्न सकिएन"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"छवि पुष्टि गर्न सकिएन। स्थापना गर्ने प्रक्रिया रद्द गर्नुहोस्।"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"डिस्कको इमेज पुष्टि गर्न सकिएन। स्थापना गर्ने प्रक्रिया रद्द गर्नुहोस्।"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"हाल Dynamic System चलिरहेको छ। Android को मूल संस्करण प्रयोग गर्न यन्त्र रिस्टार्ट गर्नुहोस्।"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"रद्द गर्नुहोस्"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"खारेज गर्नुहोस्"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"रिस्टार्ट गर्नु…"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dynamic System खारेज गरियो"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"रिस्टार्ट गर्न वा Dynamic System लोड गर्न सकिएन"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"गतिशील प्रणाली अफ गर्न सकिएन"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-nl/strings.xml b/packages/DynamicSystemInstallationService/res/values-nl/strings.xml
index 2b9fa41..3bf7247 100644
--- a/packages/DynamicSystemInstallationService/res/values-nl/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-nl/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dynamisch systeem is klaar. Start je apparaat opnieuw op om het te gebruiken."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Installatie wordt uitgevoerd"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Installatie mislukt"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Valideren van afbeelding mislukt. Installatie afbreken."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Valideren van image mislukt. Installatie afbreken."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Er is momenteel een dynamisch systeem actief. Start je apparaat opnieuw op om de oorspronkelijke Android-versie te gebruiken."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Annuleren"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Niet opslaan"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Herstarten"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dynamisch systeem niet opgeslagen"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Kan dynamisch systeem niet opnieuw opstarten of laden"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Kan dynamisch systeem niet uitschakelen"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-or/strings.xml b/packages/DynamicSystemInstallationService/res/values-or/strings.xml
index e0c8470..05b9016 100644
--- a/packages/DynamicSystemInstallationService/res/values-or/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-or/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ଡାଇନାମିକ୍ ସିଷ୍ଟମ୍ ପ୍ରସ୍ତୁତ ଅଛି। ଏହାକୁ ବ୍ୟବହାର କରିବା ଆରମ୍ଭ କରିବାକୁ, ଆପଣଙ୍କ ଡିଭାଇସକୁ ରିଷ୍ଟାର୍ଟ କରନ୍ତୁ।"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ଇନଷ୍ଟଲ୍ ହେଉଛି"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ଇନଷ୍ଟଲ୍ କରିବା ବିଫଳ ହୋଇଛି"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ଛବି ବୈଧକରଣ ବିଫଳ ହୋଇଛି। ଇନଷ୍ଟଲେସନ୍ ରଦ୍ଦ କରନ୍ତୁ।"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ଇମେଜ୍ ବୈଧକରଣ ବିଫଳ ହୋଇଛି। ଇନଷ୍ଟଲେସନ୍ ରଦ୍ଦ କରନ୍ତୁ।"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"ବର୍ତ୍ତମାନ ଏକ ଡାଇନାମିକ୍ ସିଷ୍ଟମ୍ ଚାଲୁଛି। ମୂଳ Android ସଂସ୍କରଣ ବ୍ୟବହାର କରିବାକୁ ରିଷ୍ଟାର୍ଟ କରନ୍ତୁ।"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"ବାତିଲ୍ କରନ୍ତୁ"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"ଖାରଜ କରନ୍ତୁ"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ରିଷ୍ଟାର୍ଟ କରନ୍ତୁ"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ଡାଇନାମିକ୍ ସିଷ୍ଟମ୍ ଖାରଜ କରାଯାଇଛି"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ଡାଇନାମିକ୍ ସିଷ୍ଟମ୍ ରିଷ୍ଟାର୍ଟ କିମ୍ବା ଲୋଡ୍ କରାଯାଇପାରିବ ନାହିଁ"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ଡାଇନାମିକ୍ ସିଷ୍ଟମ୍ ଅକ୍ଷମ କରିବାରେ ବିଫଳ ହୋଇଛି"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-pa/strings.xml b/packages/DynamicSystemInstallationService/res/values-pa/strings.xml
index c5f7a3d..8f2fd18 100644
--- a/packages/DynamicSystemInstallationService/res/values-pa/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-pa/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ਪਰਿਵਰਤਨਸ਼ੀਲ ਸਿਸਟਮ ਤਿਆਰ ਹੈ। ਇਸ ਦੀ ਵਰਤੋਂ ਸ਼ੁਰੂ ਕਰਨ ਲਈ, ਆਪਣਾ ਡੀਵਾਈਸ ਮੁੜ-ਸ਼ੁਰੂ ਕਰੋ।"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ਸਥਾਪਨਾ ਜਾਰੀ ਹੈ"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ਸਥਾਪਤ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ਚਿੱਤਰ ਪ੍ਰਮਾਣਿਕਤਾ ਅਸਫਲ ਰਹੀ। ਸਥਾਪਨਾ ਨੂੰ ਰੱਦ ਕਰੋ।"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ਇਮੇਜ ਪ੍ਰਮਾਣਿਕਤਾ ਅਸਫਲ ਰਹੀ। ਸਥਾਪਨਾ ਨੂੰ ਰੱਦ ਕਰੋ।"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"ਫ਼ਿਲਹਾਲ ਪਰਿਵਰਤਨਸ਼ੀਲ ਸਿਸਟਮ ਚੱਲ ਰਿਹਾ ਹੈ। ਮੂਲ Android ਵਰਜਨ ਵਰਤਣ ਲਈ ਮੁੜ-ਸ਼ੁਰੂ ਕਰੋ।"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"ਰੱਦ ਕਰੋ"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"ਖਾਰਜ ਕਰੋ"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ਮੁੜ-ਸ਼ੁਰੂ ਕਰੋ"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ਪਰਿਵਰਤਨਸ਼ੀਲ ਸਿਸਟਮ ਰੱਦ ਕੀਤਾ ਗਿਆ"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ਪਰਿਵਰਤਨਸ਼ੀਲ ਸਿਸਟਮ ਮੁੜ-ਸ਼ੁਰੂ ਜਾਂ ਲੋਡ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ਪਰਿਵਰਤਨਸ਼ੀਲ ਸਿਸਟਮ ਨੂੰ ਬੰਦ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-pl/strings.xml b/packages/DynamicSystemInstallationService/res/values-pl/strings.xml
index bc7d5fe..9aa4558 100644
--- a/packages/DynamicSystemInstallationService/res/values-pl/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-pl/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Uruchom ponownie"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Usunięto system dynamiczny"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Nie można ponownie uruchomić lub wczytać systemu dynamicznego"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Nie udało się wyłączyć systemu dynamicznego"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-pt-rBR/strings.xml b/packages/DynamicSystemInstallationService/res/values-pt-rBR/strings.xml
index 31a9bb4..6513a9e 100644
--- a/packages/DynamicSystemInstallationService/res/values-pt-rBR/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-pt-rBR/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"O sistema dinâmico está pronto. Para começar a usá-lo, reinicie o dispositivo."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Instalação em andamento"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Falha na instalação"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Falha ao validar imagem. Cancele a instalação."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Falha ao validar imagem do disco. Cancele a instalação."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Um sistema dinâmico está sendo executado no momento. Reinicie para usar a versão original do Android."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Cancelar"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Descartar"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reiniciar"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Sistema dinâmico descartado"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Não é possível reiniciar ou carregar o sistema dinâmico"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Falha ao desativar o sistema dinâmico"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-pt-rPT/strings.xml b/packages/DynamicSystemInstallationService/res/values-pt-rPT/strings.xml
index d917c6a..4b1a92c 100644
--- a/packages/DynamicSystemInstallationService/res/values-pt-rPT/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-pt-rPT/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"O sistema dinâmico está pronto. Para o começar a utilizar, reinicie o dispositivo."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Instalação em curso"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Falha na instalação"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Falha ao validar a imagem. A instalação foi interrompida."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Falha ao validar a imagem. Interrompa a instalação."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Está atualmente em execução um sistema dinâmico. Reinicie para utilizar a versão original do Android."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Cancelar"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Rejeitar"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reiniciar"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Sistema dinâmico rejeitado"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Não é possível reiniciar ou carregar o sistema dinâmico."</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Falha ao desativar o sistema dinâmico"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-pt/strings.xml b/packages/DynamicSystemInstallationService/res/values-pt/strings.xml
index 31a9bb4..6513a9e 100644
--- a/packages/DynamicSystemInstallationService/res/values-pt/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-pt/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"O sistema dinâmico está pronto. Para começar a usá-lo, reinicie o dispositivo."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Instalação em andamento"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Falha na instalação"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Falha ao validar imagem. Cancele a instalação."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Falha ao validar imagem do disco. Cancele a instalação."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Um sistema dinâmico está sendo executado no momento. Reinicie para usar a versão original do Android."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Cancelar"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Descartar"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reiniciar"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Sistema dinâmico descartado"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Não é possível reiniciar ou carregar o sistema dinâmico"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Falha ao desativar o sistema dinâmico"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ro/strings.xml b/packages/DynamicSystemInstallationService/res/values-ro/strings.xml
index c211318..27b88db 100644
--- a/packages/DynamicSystemInstallationService/res/values-ro/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ro/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reporniți"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"S-a renunțat la sistemul dinamic"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Nu se poate reporni sau încărca sistemul dinamic"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Sistemul dinamic nu a fost dezactivat"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ru/strings.xml b/packages/DynamicSystemInstallationService/res/values-ru/strings.xml
index bf94c99..b36b4f9 100644
--- a/packages/DynamicSystemInstallationService/res/values-ru/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ru/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Перезапустить"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Динамическая система удалена."</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Не удается запустить или загрузить динамическую систему."</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Не удалось отключить динамическую систему."</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-si/strings.xml b/packages/DynamicSystemInstallationService/res/values-si/strings.xml
index e6a6ea2..ab0b977 100644
--- a/packages/DynamicSystemInstallationService/res/values-si/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-si/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ගතික පද්ධතිය සූදානම්ය. එය භාවිතා කිරීම ආරම්භ කිරීමට, ඔබගේ උපාංගය නැවත ආරම්භ කරන්න."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"ස්ථාපනය කෙරෙමින් පවතී"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ස්ථාපනය අසාර්ථක විය"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"රූප වලංගු කිරීම අසාර්ථක විය. ස්ථාපනය අවලංගු කරන්න"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"තැටි රූපය වලංගු කිරීම අසාර්ථක විය. ස්ථාපනය අවලංගු කරන්න"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"දැනට ගතික පද්ධතියක් ක්‍රියාත්මක කරයි. මුල් Android අනුවාදය භාවිතා කිරීමට නැවත ආරම්භ කරන්න."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"අවලංගු කරන්න"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"ඉවත ලන්න"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"යළි අරඹන්න"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ගතික පද්ධතිය ඉවත දමන ලදි"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ගතික පද්ධතිය නැවත ආරම්භ කිරීමට හෝ පූරණය කිරීමට නොහැක"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ගතික පද්ධතිය අබල කිරීමට අසමත් විය"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-sk/strings.xml b/packages/DynamicSystemInstallationService/res/values-sk/strings.xml
index 99390cf..01d6a73 100644
--- a/packages/DynamicSystemInstallationService/res/values-sk/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-sk/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dynamický systém je k dispozícii. Ak ho chcete začať používať, reštartujte zariadenie."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Prebieha inštalácia"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Nepodarilo sa nainštalovať"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Obrázok sa nepodarilo overiť. Prerušte inštaláciu."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Obraz disku sa nepodarilo overiť. Prerušte inštaláciu."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Momentálne je spustený dynamický systém. Ak chcete používať pôvodnú verziu Androidu, reštartujte."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Zrušiť"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Zahodiť"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Reštartovať"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Zahodený dynamický systém"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Nie je možné reštartovať alebo načítať dynamický systém"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dynamický systém sa nepodarilo deaktivovať"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-sl/strings.xml b/packages/DynamicSystemInstallationService/res/values-sl/strings.xml
index 3ffd741..1827a9d 100644
--- a/packages/DynamicSystemInstallationService/res/values-sl/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-sl/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Znova zaženi"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dinamični sistem je bil zavržen"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Dinamičnega sistema ni mogoče znova zagnati ali naložiti"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dinamičnega sistema ni bilo mogoče onemogočiti"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-sq/strings.xml b/packages/DynamicSystemInstallationService/res/values-sq/strings.xml
index 704b512..581a9e1 100644
--- a/packages/DynamicSystemInstallationService/res/values-sq/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-sq/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Rinis"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Sistemi dinamik u hoq"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Sistemi dinamik nuk mund të rinisej ose të ngarkohej"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Çaktivizimi i sistemit dinamik dështoi"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-sr/strings.xml b/packages/DynamicSystemInstallationService/res/values-sr/strings.xml
index 5e4540a..e0c6b2f 100644
--- a/packages/DynamicSystemInstallationService/res/values-sr/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-sr/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Динамични систем је спреман. Да бисте почели да га користите, рестартујте уређај."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Инсталира се"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Инсталирање није успело"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Валидација слике није успела. Откажите инсталацију."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Валидација слике диска није успела. Откажите инсталацију."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Тренутно је покренут динамични систем. Рестартујте да бисте користили оригиналну верзију Android-а."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Откажи"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Одбаци"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Рестартуј"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Динамични систем је одбачен"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Рестартовање или учитавање динамичног система није успело"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Онемогућавање динамичног система није успело"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-sv/strings.xml b/packages/DynamicSystemInstallationService/res/values-sv/strings.xml
index 546ffdd..3da2b18 100644
--- a/packages/DynamicSystemInstallationService/res/values-sv/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-sv/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Det dynamiska systemet är klart. Om du vill använda det startar du om enheten."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Installation pågår"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Installationen misslyckades"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Bildvalideringen misslyckades. Avbryt installationen."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Valideringen av diskavbildningen misslyckades. Avbryt installationen."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Ett dynamiskt system körs. Om du vill använda den ursprungliga Android-versionen startar du om."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Avbryt"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Ignorera"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Starta om"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Det dynamiska systemet ignorerades"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Det gick inte att starta om eller läsa in det dynamiska systemet"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Det gick inte att inaktivera det dynamiska systemet"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-sw/strings.xml b/packages/DynamicSystemInstallationService/res/values-sw/strings.xml
index 53414d5..2f18edb 100644
--- a/packages/DynamicSystemInstallationService/res/values-sw/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-sw/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dynamic system iko tayari. Ili uanze kuitumia, zima kisha uwashe kifaa chako."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Inasakinisha"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Imeshindwa kusakinisha"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Imeshindwa kuthibitisha picha. Ghairi usakinishaji."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Imeshindwa kuthibitisha nakala. Ghairi usakinishaji."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Inatumia Dynamic System kwa sasa. Zima kisha uwashe ili utumie toleo halisi la Android."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Ghairi"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Ondoa"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Zima kisha uwashe"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Umeondoa Dynamic System"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Imeshindwa kuzima na kuwasha au kupakia Dynamic System"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Imeshindwa kuzima Dynamic System"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ta/strings.xml b/packages/DynamicSystemInstallationService/res/values-ta/strings.xml
index e0aaaf7..6726a4a 100644
--- a/packages/DynamicSystemInstallationService/res/values-ta/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ta/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dynamic system தயாராக உள்ளது. இதைப் பயன்படுத்தத் தொடங்க உங்கள் சாதனத்தை மீண்டும் தொடங்கவும்."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"நிறுவப்படுகிறது"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"நிறுவ முடியவில்லை"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"படத்தைச் சரிபார்க்க முடியவில்லை. நிறுவலை ரத்துசெய்யவும்."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"டிஸ்க் இமேஜைச் சரிபார்க்க முடியவில்லை. நிறுவலை ரத்துசெய்யவும்."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Dynamic system தற்போது இயக்கத்தில் உள்ளது. அசல் Android பதிப்பைப் பயன்படுத்த மீண்டும் தொடங்கவும்."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"ரத்துசெய்"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"நிராகரி"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"மீண்டும் தொடங்கு"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dynamic system நிராகரிக்கப்பட்டது"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Dynamic systemமை மீண்டும் தொடங்கவோ ஏற்றவோ முடியவில்லை"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dynamic systemமை முடக்க இயலவில்லை"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-te/strings.xml b/packages/DynamicSystemInstallationService/res/values-te/strings.xml
index d497630..f014467 100644
--- a/packages/DynamicSystemInstallationService/res/values-te/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-te/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"రీస్టార్ట్ చేయి"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"డైనమిక్ సిస్టమ్ విస్మరించబడింది"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"డైనమిక్ సిస్టమ్‌ను రీస్టార్ట్ చేయడం లేదా లోడ్ చేయడం సాధ్యపడలేదు"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"డైనమిక్ సిస్టమ్‌ను డిజేబుల్ చేయడంలో విఫలమైంది"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-th/strings.xml b/packages/DynamicSystemInstallationService/res/values-th/strings.xml
index 786324f..24a55a9 100644
--- a/packages/DynamicSystemInstallationService/res/values-th/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-th/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ระบบแบบไดนามิกพร้อมแล้ว โปรดรีสตาร์ทอุปกรณ์เพื่อเริ่มใช้"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"กำลังติดตั้ง"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"ติดตั้งไม่สำเร็จ"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ตรวจสอบรูปภาพไม่สำเร็จ ล้มเลิกการติดตั้ง"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ตรวจสอบอิมเมจดิสก์ไม่สำเร็จ ล้มเลิกการติดตั้ง"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"ปัจจุบันใช้ระบบแบบไดนามิกอยู่ รีสตาร์ทเพื่อใช้ Android เวอร์ชันดั้งเดิม"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"ยกเลิก"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"ยกเลิก"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"รีสตาร์ท"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"ยกเลิกระบบแบบไดนามิกแล้ว"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"รีสตาร์ทหรือโหลดระบบแบบไดนามิกไม่ได้"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ปิดใช้ระบบไดนามิกไม่สำเร็จ"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-tl/strings.xml b/packages/DynamicSystemInstallationService/res/values-tl/strings.xml
index df39f7b..0ec7434 100644
--- a/packages/DynamicSystemInstallationService/res/values-tl/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-tl/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"I-restart"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Na-discard ang dynamic system"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Hindi ma-restart o ma-load ang dynamic system"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Hindi na-disable ang dynamic na system"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-tr/strings.xml b/packages/DynamicSystemInstallationService/res/values-tr/strings.xml
index 1446f96..c2f3dfa 100644
--- a/packages/DynamicSystemInstallationService/res/values-tr/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-tr/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dinamik sistem hazır. Kullanmaya başlamak için cihazınızı yeniden başlatın."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Yükleme devam ediyor"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Yükleme başarısız oldu"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Resim doğrulanamadı. Yüklemeyi iptal edin."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Görüntü doğrulanamadı. Yüklemeyi iptal edin."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Şu anda dinamik sistem çalıştırılıyor. Orijinal Android sürümünü kullanmak için cihazı yeniden başlatın."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"İptal"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Sil"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Yeniden başlat"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dinamik sistem silindi"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Dinamik sistem yeniden başlatılamıyor veya yüklenemiyor"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dinamik sistem devre dışı bırakılamadı"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-uk/strings.xml b/packages/DynamicSystemInstallationService/res/values-uk/strings.xml
index 9a44d97..2712fb2 100644
--- a/packages/DynamicSystemInstallationService/res/values-uk/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-uk/strings.xml
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Перезапустити"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Динамічну систему видалено"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Не вдається перезапустити пристрій або завантажити динамічну систему"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Не вдалося вимкнути динамічну систему"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-ur/strings.xml b/packages/DynamicSystemInstallationService/res/values-ur/strings.xml
index 48dddbe..2f96e81 100644
--- a/packages/DynamicSystemInstallationService/res/values-ur/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-ur/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"ڈائنیمک سسٹم تیار ہے۔ اس کا استعمال شروع کرنے کے لیے، اپنا آلہ ری سٹارٹ کریں۔"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"انسٹال جاری ہے"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"انسٹال ناکام ہو گیا"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"تصویر کی توثیق ناکام ہو گئی۔ انسٹالیشن منسوخ کریں-"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"ڈسک امیج کی توثیق ناکام ہو گئی۔ انسٹالیشن منسوخ کریں۔"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"‏فی الحال ہم ایک ڈائنیمک سسٹم چلا رہے ہیں۔ Android کا اصل ورژن استعمال کرنے کے لیے ری سٹارٹ کریں۔"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"منسوخ کریں"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"مسترد کریں"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"ری سٹارٹ کریں"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"مسترد کردہ ڈائنیمک سسٹم"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"ڈائنیمک سسٹم کو ری سٹارٹ یا لوڈ نہیں کر سکتے"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"ڈائنیمک سسٹم کو غیر فعال کرنے میں ناکام"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-uz/strings.xml b/packages/DynamicSystemInstallationService/res/values-uz/strings.xml
index 3f0227c..5597fb5 100644
--- a/packages/DynamicSystemInstallationService/res/values-uz/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-uz/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Dinamik tizim tayyor. Foydalanishni boshlash uchun qurilmani qayta ishga tushiring."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Oʻrnatilmoqda"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Oʻrnatilmadi"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Rasm tekshiruvi amalga oshmadi Oʻrnatishni bekor qilish."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Disk tasviri tekshiruvi amalga oshmadi. Oʻrnatishni bekor qiling."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Hozirda dinamik tizim ishga tushirilgan. Asl Android versiyasidan foydlanish uchun qayta ishga tushiring."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Bekor qilish"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Bekor qilish"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Boshidan"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Dinamik tizim bekor qilindi"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Dinamik tizim qayta ishga tushmadi yoki yuklanmadi"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Dinamik tizim faolsizlantirilmadi"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-vi/strings.xml b/packages/DynamicSystemInstallationService/res/values-vi/strings.xml
index 18c051c..83881aa 100644
--- a/packages/DynamicSystemInstallationService/res/values-vi/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-vi/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Hệ thống động đã sẵn sàng. Để bắt đầu sử dụng hệ thống này, hãy khởi động lại thiết bị của bạn."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Đang cài đặt"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Không cài đặt được"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Không xác thực được hình ảnh. Hủy cài đặt."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Không xác thực được ảnh ổ đĩa. Hủy cài đặt."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Thiết bị đang chạy một hệ thống động. Hãy khởi động lại để sử dụng Android phiên bản gốc."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Hủy"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Hủy"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Khởi động lại"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Đã hủy hệ thống động"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Không thể khởi động lại hoặc tải hệ thống động"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Không vô hiệu hóa được hệ thống động"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-zh-rCN/strings.xml b/packages/DynamicSystemInstallationService/res/values-zh-rCN/strings.xml
index b41d4e2..9a64aa1 100644
--- a/packages/DynamicSystemInstallationService/res/values-zh-rCN/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-zh-rCN/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"动态系统已准备就绪。重启您的设备即可开始使用动态系统。"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"正在安装"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"安装失败"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"图片验证失败。安装将中止。"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"映像验证失败。安装将中止。"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"目前正在运行动态系统。需重启才能使用原 Android 版本。"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"取消"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"舍弃"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"重启"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"已舍弃动态系统"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"无法重启或加载动态系统"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"无法停用动态系统"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-zh-rHK/strings.xml b/packages/DynamicSystemInstallationService/res/values-zh-rHK/strings.xml
index c830dae..f477c23 100644
--- a/packages/DynamicSystemInstallationService/res/values-zh-rHK/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-zh-rHK/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"動態系統已可供使用。如要開始使用,請重新啟動裝置。"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"安裝中"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"無法安裝"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"圖片驗證失敗,系統將取消安裝。"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"磁碟影像驗證失敗,系統將取消安裝。"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"系統目前正在執行動態系統。如要使用原本的 Android 版本,請重新啟動裝置。"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"取消"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"捨棄"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"重新啟動"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"已捨棄動態系統"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"無法重新啟動或載入動態系統"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"無法停用動態系統"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-zh-rTW/strings.xml b/packages/DynamicSystemInstallationService/res/values-zh-rTW/strings.xml
index e43c0f2..96fb5e7 100644
--- a/packages/DynamicSystemInstallationService/res/values-zh-rTW/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-zh-rTW/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"動態系統已可供使用。如要開始使用,請重新啟動裝置。"</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"安裝中"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"無法安裝"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"圖片驗證失敗,系統將取消安裝作業。"</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"映像檔驗證失敗,系統將取消安裝作業。"</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"系統目前正在執行動態系統。如要使用原本的 Android 版本,請重新啟動裝置。"</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"取消"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"捨棄"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"重新啟動"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"已捨棄動態系統"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"無法重新啟動或載入動態系統"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"無法停用動態系統"</string>
 </resources>
diff --git a/packages/DynamicSystemInstallationService/res/values-zu/strings.xml b/packages/DynamicSystemInstallationService/res/values-zu/strings.xml
index 4a48444..6ef965f 100644
--- a/packages/DynamicSystemInstallationService/res/values-zu/strings.xml
+++ b/packages/DynamicSystemInstallationService/res/values-zu/strings.xml
@@ -5,7 +5,7 @@
     <string name="notification_install_completed" msgid="6252047868415172643">"Uhlole Okunhlobonhlobo kulungile. Ukuze uqale ukuyisebenzisa, qalisa kabusha idivayisi yakho."</string>
     <string name="notification_install_inprogress" msgid="7383334330065065017">"Ukufaka kuyaqhubeka"</string>
     <string name="notification_install_failed" msgid="4066039210317521404">"Ukufaka kwehlulekile"</string>
-    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Ukuqinisekiswa kwesithombe kuhlulekile. Yekisa ukufakwa."</string>
+    <string name="notification_image_validation_failed" msgid="2720357826403917016">"Ukuqinisekiswa kwe-disk image kuhlulekile. Yekisa ukufakwa."</string>
     <string name="notification_dynsystem_in_use" msgid="1053194595682188396">"Manje iqalisa uhlole olunhlobonhlobo. Qalisa kabusha ukuze usebenzise inguqulo yangempela ye-Android."</string>
     <string name="notification_action_cancel" msgid="5929299408545961077">"Khansela"</string>
     <string name="notification_action_discard" msgid="1817481003134947493">"Lahla"</string>
@@ -13,4 +13,5 @@
     <string name="notification_action_reboot_to_origin" msgid="4013901243271889897">"Qala kabusha"</string>
     <string name="toast_dynsystem_discarded" msgid="1733249860276017050">"Kulahlwe uhlole olunhlobonhlobo"</string>
     <string name="toast_failed_to_reboot_to_dynsystem" msgid="6336737274625452067">"Ayikwazi ukuqalisa kabusha noma ukulayisha uhlole olunhlobonhlobo"</string>
+    <string name="toast_failed_to_disable_dynsystem" msgid="3285742944977744413">"Yehlulekile ukukhubaza isistimu eguqukayo"</string>
 </resources>
diff --git a/packages/EasterEgg/OWNERS b/packages/EasterEgg/OWNERS
new file mode 100644
index 0000000..2e96c97
--- /dev/null
+++ b/packages/EasterEgg/OWNERS
@@ -0,0 +1 @@
+include /packages/SystemUI/OWNERS
diff --git a/packages/ExternalStorageProvider/OWNERS b/packages/ExternalStorageProvider/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/packages/ExternalStorageProvider/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index f42bf19..11d1b0a 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -483,6 +483,13 @@
     }
 
     @Override
+    protected void onDocIdDeleted(String docId) {
+        Uri uri = DocumentsContract.buildDocumentUri(AUTHORITY, docId);
+        getContext().revokeUriPermission(uri, ~0);
+    }
+
+
+    @Override
     public Cursor queryRoots(String[] projection) throws FileNotFoundException {
         final MatrixCursor result = new MatrixCursor(resolveRootProjection(projection));
         synchronized (mRootsLock) {
diff --git a/packages/FusedLocation/OWNERS b/packages/FusedLocation/OWNERS
new file mode 100644
index 0000000..5ac6028
--- /dev/null
+++ b/packages/FusedLocation/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/location/OWNERS
diff --git a/packages/InputDevices/res/values-af/strings.xml b/packages/InputDevices/res/values-af/strings.xml
index eb89ee5..b75410a 100644
--- a/packages/InputDevices/res/values-af/strings.xml
+++ b/packages/InputDevices/res/values-af/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slowaaks"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Sloweens"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turks"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turks-F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Oekraïens"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabies"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grieks"</string>
diff --git a/packages/InputDevices/res/values-am/strings.xml b/packages/InputDevices/res/values-am/strings.xml
index 2970bfe..8301d96 100644
--- a/packages/InputDevices/res/values-am/strings.xml
+++ b/packages/InputDevices/res/values-am/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"ስሎቫክ"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"ስሎቫኒያ"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ቱርክኛ"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"ቱርክኛ F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ዩክሬን"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"አረብኛ"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ግሪክኛ"</string>
diff --git a/packages/InputDevices/res/values-ar/strings.xml b/packages/InputDevices/res/values-ar/strings.xml
index 7f7e51c..b7e0b74 100644
--- a/packages/InputDevices/res/values-ar/strings.xml
+++ b/packages/InputDevices/res/values-ar/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"السلوفاكية"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"السلوفينية"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"التركية"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"‏لوحة المفاتيح باللغة التركية F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"الأوكرانية"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"العربية"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"اليونانية"</string>
diff --git a/packages/InputDevices/res/values-as/strings.xml b/packages/InputDevices/res/values-as/strings.xml
index 48c6302..3f6f380 100644
--- a/packages/InputDevices/res/values-as/strings.xml
+++ b/packages/InputDevices/res/values-as/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"শ্ল\'ভাক"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"শ্ল\'ভেনিয়া"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"তুৰ্কী"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"টুৰ্কিছ F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ইউক্ৰেনিয়ান"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"আৰবী"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"গ্ৰীক"</string>
diff --git a/packages/InputDevices/res/values-az/strings.xml b/packages/InputDevices/res/values-az/strings.xml
index d85e988..85ebc97 100644
--- a/packages/InputDevices/res/values-az/strings.xml
+++ b/packages/InputDevices/res/values-az/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovak"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Sloven"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Türk"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Türkcə F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrayna"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Ərəb"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Yunan"</string>
diff --git a/packages/InputDevices/res/values-b+sr+Latn/strings.xml b/packages/InputDevices/res/values-b+sr+Latn/strings.xml
index 226e8ee4..2d1d230 100644
--- a/packages/InputDevices/res/values-b+sr+Latn/strings.xml
+++ b/packages/InputDevices/res/values-b+sr+Latn/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"slovačka"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"slovenačka"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"turska"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"turska F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukrajinska"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arapski"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"grčki"</string>
diff --git a/packages/InputDevices/res/values-be/strings.xml b/packages/InputDevices/res/values-be/strings.xml
index d180eec..cda250b 100644
--- a/packages/InputDevices/res/values-be/strings.xml
+++ b/packages/InputDevices/res/values-be/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Славацкая"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Славенская"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Турэцкая"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Турэцкая-F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Украінская"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Арабская"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Грэчаская"</string>
diff --git a/packages/InputDevices/res/values-bg/strings.xml b/packages/InputDevices/res/values-bg/strings.xml
index a1edb21..8bd279d 100644
--- a/packages/InputDevices/res/values-bg/strings.xml
+++ b/packages/InputDevices/res/values-bg/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"словашки"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"словенски"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"турски"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Турски (тип F)"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"украински"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Арабска клавиатурна подредба"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Гръцка клавиатурна подредба"</string>
diff --git a/packages/InputDevices/res/values-bn/strings.xml b/packages/InputDevices/res/values-bn/strings.xml
index 10029f4..1201442 100644
--- a/packages/InputDevices/res/values-bn/strings.xml
+++ b/packages/InputDevices/res/values-bn/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"স্লোভাক"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"স্লোভেনিয়ান"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"তুর্কি"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkish F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ইউক্রেনীয়"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"আরবি"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"গ্রীক"</string>
diff --git a/packages/InputDevices/res/values-bs/strings.xml b/packages/InputDevices/res/values-bs/strings.xml
index 436a3b0..b533dbe8 100644
--- a/packages/InputDevices/res/values-bs/strings.xml
+++ b/packages/InputDevices/res/values-bs/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"slovački"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"slovenački"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"turski"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"turski F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukrajinski"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arapski"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"grčki"</string>
diff --git a/packages/InputDevices/res/values-ca/strings.xml b/packages/InputDevices/res/values-ca/strings.xml
index 1f089e1..0c80ffb 100644
--- a/packages/InputDevices/res/values-ca/strings.xml
+++ b/packages/InputDevices/res/values-ca/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Eslovac"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Eslovè"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turc"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turc F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraïnès"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Àrab"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grec"</string>
diff --git a/packages/InputDevices/res/values-cs/strings.xml b/packages/InputDevices/res/values-cs/strings.xml
index b36861a..86a7ac5 100644
--- a/packages/InputDevices/res/values-cs/strings.xml
+++ b/packages/InputDevices/res/values-cs/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"slovenské"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"slovinské"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"turecké"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"turečtina F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukrajinské"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arabština"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"řečtina"</string>
diff --git a/packages/InputDevices/res/values-da/strings.xml b/packages/InputDevices/res/values-da/strings.xml
index 7e446fd..f3e8410 100644
--- a/packages/InputDevices/res/values-da/strings.xml
+++ b/packages/InputDevices/res/values-da/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovakisk"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovensk"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Tyrkisk"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Tyrkisk F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainsk"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabisk"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Græsk"</string>
diff --git a/packages/InputDevices/res/values-de/strings.xml b/packages/InputDevices/res/values-de/strings.xml
index c8a7ab1..80d65ce 100644
--- a/packages/InputDevices/res/values-de/strings.xml
+++ b/packages/InputDevices/res/values-de/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slowakisch"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slowenisch"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Türkisch"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Türkisch F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainisch"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabisch"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Griechisch"</string>
diff --git a/packages/InputDevices/res/values-el/strings.xml b/packages/InputDevices/res/values-el/strings.xml
index ff7cd02..436d583 100644
--- a/packages/InputDevices/res/values-el/strings.xml
+++ b/packages/InputDevices/res/values-el/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Σλοβακικά"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Σλοβενικά"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Τουρκικά"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Τουρκικά F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ουκρανικά"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Αραβικά"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Ελληνικά"</string>
diff --git a/packages/InputDevices/res/values-en-rAU/strings.xml b/packages/InputDevices/res/values-en-rAU/strings.xml
index 02a8e6d..51099d4 100644
--- a/packages/InputDevices/res/values-en-rAU/strings.xml
+++ b/packages/InputDevices/res/values-en-rAU/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovak"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovenian"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkish"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkish F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainian"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabic"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Greek"</string>
diff --git a/packages/InputDevices/res/values-en-rCA/strings.xml b/packages/InputDevices/res/values-en-rCA/strings.xml
index 02a8e6d..51099d4 100644
--- a/packages/InputDevices/res/values-en-rCA/strings.xml
+++ b/packages/InputDevices/res/values-en-rCA/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovak"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovenian"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkish"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkish F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainian"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabic"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Greek"</string>
diff --git a/packages/InputDevices/res/values-en-rGB/strings.xml b/packages/InputDevices/res/values-en-rGB/strings.xml
index 02a8e6d..51099d4 100644
--- a/packages/InputDevices/res/values-en-rGB/strings.xml
+++ b/packages/InputDevices/res/values-en-rGB/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovak"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovenian"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkish"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkish F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainian"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabic"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Greek"</string>
diff --git a/packages/InputDevices/res/values-en-rIN/strings.xml b/packages/InputDevices/res/values-en-rIN/strings.xml
index 02a8e6d..51099d4 100644
--- a/packages/InputDevices/res/values-en-rIN/strings.xml
+++ b/packages/InputDevices/res/values-en-rIN/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovak"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovenian"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkish"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkish F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainian"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabic"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Greek"</string>
diff --git a/packages/InputDevices/res/values-en-rXC/strings.xml b/packages/InputDevices/res/values-en-rXC/strings.xml
index a8d342f..9ab4632 100644
--- a/packages/InputDevices/res/values-en-rXC/strings.xml
+++ b/packages/InputDevices/res/values-en-rXC/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‏‎‎‏‎‎‎‏‎‎‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‎‎‏‏‏‎‏‏‎‏‎‎‏‏‎‏‏‎‏‏‎‏‎‏‎‏‏‎‎‎‎‎Slovak‎‏‎‎‏‎"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‎‎‎‎‎‏‎‏‏‏‎‏‎‎‎‏‎‏‏‏‏‎‎‏‎‎‎‏‏‏‎‏‏‎‏‏‏‏‎‎‎‏‎‎‎‎‎‏‎‎‎‏‏‎‎‎‎‎‎Slovenian‎‏‎‎‏‎"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‎‏‏‏‎‎‎‏‎‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎‎‏‏‏‏‎‏‏‎‎‏‏‎‎‏‏‏‎‎‏‎‏‏‏‏‎‎‎‏‎‎Turkish‎‏‎‎‏‎"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‎‏‎‏‏‎‏‎‏‎‎‏‏‏‎‎‎‏‏‎‏‎‏‎‏‏‏‏‎‏‏‏‎‎‏‏‎‏‏‏‎‏‏‏‎‏‎‎‏‎‎Turkish F‎‏‎‎‏‎"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‏‏‎‎‏‎‏‎‎‎‎‎‎‏‎‏‏‎‏‎‎‏‏‏‏‎‎‏‏‎‏‏‎‎‎‏‎‏‏‎‏‏‏‏‏‏‏‏‎‎‎‎‏‎Ukrainian‎‏‎‎‏‎"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‏‎‏‎‏‏‎‏‏‎‏‏‏‎‎‎‏‏‎‎‎‏‎‏‏‎‎‎‏‏‎‎‎‏‎‏‎‎‎‎‏‎‏‏‎‏‏‎‎‏‏‎‎‎‏‎‎‎‎Arabic‎‏‎‎‏‎"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‎‎‏‎‏‎‎‎‏‎‏‎‎‎‎‏‎‏‏‏‏‏‏‎‎‎‏‎‏‎‏‏‎‎‏‏‏‎‏‏‎‎‎‎‎‎‎‎‎‏‏‏‏‎‎‎‎Greek‎‏‎‎‏‎"</string>
diff --git a/packages/InputDevices/res/values-es-rUS/strings.xml b/packages/InputDevices/res/values-es-rUS/strings.xml
index 9090cb7..84f558d 100644
--- a/packages/InputDevices/res/values-es-rUS/strings.xml
+++ b/packages/InputDevices/res/values-es-rUS/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Eslovaco"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Esloveno"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turco"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turco F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraniano"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Árabe"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Griego"</string>
diff --git a/packages/InputDevices/res/values-es/strings.xml b/packages/InputDevices/res/values-es/strings.xml
index 66ea655..6f7fb01 100644
--- a/packages/InputDevices/res/values-es/strings.xml
+++ b/packages/InputDevices/res/values-es/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Eslovaco"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Esloveno"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turco"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turco F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraniano"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Árabe"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Griego"</string>
diff --git a/packages/InputDevices/res/values-et/strings.xml b/packages/InputDevices/res/values-et/strings.xml
index 9674a0d..9637aad 100644
--- a/packages/InputDevices/res/values-et/strings.xml
+++ b/packages/InputDevices/res/values-et/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovaki"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Sloveenia"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Türgi"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Türgi F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukraina"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Araabia"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Kreeka"</string>
diff --git a/packages/InputDevices/res/values-eu/strings.xml b/packages/InputDevices/res/values-eu/strings.xml
index 357b618..6295542 100644
--- a/packages/InputDevices/res/values-eu/strings.xml
+++ b/packages/InputDevices/res/values-eu/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Eslovakiarra"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Esloveniarra"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkiarra"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkiarra (F teklatua)"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainarra"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabiarra"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Greziarra"</string>
diff --git a/packages/InputDevices/res/values-fa/strings.xml b/packages/InputDevices/res/values-fa/strings.xml
index 5395d27..c0cdedd 100644
--- a/packages/InputDevices/res/values-fa/strings.xml
+++ b/packages/InputDevices/res/values-fa/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"اسلوواکی"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"اسلوونیایی"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ترکی"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkish F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"اوکراینی"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"عربی"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"یونانی"</string>
diff --git a/packages/InputDevices/res/values-fi/strings.xml b/packages/InputDevices/res/values-fi/strings.xml
index 4488a13..6d272e9 100644
--- a/packages/InputDevices/res/values-fi/strings.xml
+++ b/packages/InputDevices/res/values-fi/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"slovakki"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"sloveeni"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"turkki"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"turkki (F)"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukraina"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arabia"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"kreikka"</string>
diff --git a/packages/InputDevices/res/values-fr-rCA/strings.xml b/packages/InputDevices/res/values-fr-rCA/strings.xml
index e714e83..4d76704 100644
--- a/packages/InputDevices/res/values-fr-rCA/strings.xml
+++ b/packages/InputDevices/res/values-fr-rCA/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovaque"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovène"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turc"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turc F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainien"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabe"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grec"</string>
diff --git a/packages/InputDevices/res/values-fr/strings.xml b/packages/InputDevices/res/values-fr/strings.xml
index 0a022f1..ec45e2c 100644
--- a/packages/InputDevices/res/values-fr/strings.xml
+++ b/packages/InputDevices/res/values-fr/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovaque"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovène"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turc"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Clavier turc en F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainien"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabe"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grec"</string>
diff --git a/packages/InputDevices/res/values-gl/strings.xml b/packages/InputDevices/res/values-gl/strings.xml
index 0c86f81..f88e1bf 100644
--- a/packages/InputDevices/res/values-gl/strings.xml
+++ b/packages/InputDevices/res/values-gl/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Eslovaco"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Esloveno"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turco"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turco F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraíno"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Árabe"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grego"</string>
diff --git a/packages/InputDevices/res/values-gu/strings.xml b/packages/InputDevices/res/values-gu/strings.xml
index 8648389..6ad47cd 100644
--- a/packages/InputDevices/res/values-gu/strings.xml
+++ b/packages/InputDevices/res/values-gu/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"સ્લોવૅક"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"સ્લોવેનિયન"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ટર્કીશ"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"ટર્કિશ F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"યુક્રેનિયન"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"અરબી"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ગ્રીક"</string>
diff --git a/packages/InputDevices/res/values-hi/strings.xml b/packages/InputDevices/res/values-hi/strings.xml
index 6e674ed..e300db0 100644
--- a/packages/InputDevices/res/values-hi/strings.xml
+++ b/packages/InputDevices/res/values-hi/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"स्लोवाक"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"स्लोवेनियाई"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"तुर्की"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkish F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"यूक्रेनियाई"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"अरबी"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ग्रीक"</string>
diff --git a/packages/InputDevices/res/values-hr/strings.xml b/packages/InputDevices/res/values-hr/strings.xml
index cd2dcc1..e6097af 100644
--- a/packages/InputDevices/res/values-hr/strings.xml
+++ b/packages/InputDevices/res/values-hr/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"slovačka"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"slovenska"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"turska"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"turski F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukrajinska"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arapski"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"grčki"</string>
diff --git a/packages/InputDevices/res/values-hu/strings.xml b/packages/InputDevices/res/values-hu/strings.xml
index 1c7a89a..25daaa3 100644
--- a/packages/InputDevices/res/values-hu/strings.xml
+++ b/packages/InputDevices/res/values-hu/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"szlovák"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"szlovén"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"török"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"török F-billentyűzet"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukrán"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arab"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"görög"</string>
diff --git a/packages/InputDevices/res/values-hy/strings.xml b/packages/InputDevices/res/values-hy/strings.xml
index fff9fbc..fef21b7 100644
--- a/packages/InputDevices/res/values-hy/strings.xml
+++ b/packages/InputDevices/res/values-hy/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Սլովակերեն"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Սլովեներեն"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Թուրքերեն"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"թուրքերեն F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ուկրաիներեն"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Արաբերեն"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Հունարեն"</string>
diff --git a/packages/InputDevices/res/values-in/strings.xml b/packages/InputDevices/res/values-in/strings.xml
index 04a6dfa..fe4c0d1 100644
--- a/packages/InputDevices/res/values-in/strings.xml
+++ b/packages/InputDevices/res/values-in/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovakia"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovenia"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turki"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turki F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukraina"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arab"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Yunani"</string>
diff --git a/packages/InputDevices/res/values-is/strings.xml b/packages/InputDevices/res/values-is/strings.xml
index a60332a..b1d5f17 100644
--- a/packages/InputDevices/res/values-is/strings.xml
+++ b/packages/InputDevices/res/values-is/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slóvaskt"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slóvenskt"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Tyrkneskt"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Tyrkneskt F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Úkranískt"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabískt"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grískt"</string>
diff --git a/packages/InputDevices/res/values-it/strings.xml b/packages/InputDevices/res/values-it/strings.xml
index ac137e4..8e62c79 100644
--- a/packages/InputDevices/res/values-it/strings.xml
+++ b/packages/InputDevices/res/values-it/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovacco"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Sloveno"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turco"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turco F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraino"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabo"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Greco"</string>
diff --git a/packages/InputDevices/res/values-iw/strings.xml b/packages/InputDevices/res/values-iw/strings.xml
index 544dde2..39bee06 100644
--- a/packages/InputDevices/res/values-iw/strings.xml
+++ b/packages/InputDevices/res/values-iw/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"סלובקית"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"סלובנית"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"טורקית"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"‏טורקית F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"אוקראינית"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"ערבית"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"יוונית"</string>
diff --git a/packages/InputDevices/res/values-ja/strings.xml b/packages/InputDevices/res/values-ja/strings.xml
index 717cbb9..3f53f9f 100644
--- a/packages/InputDevices/res/values-ja/strings.xml
+++ b/packages/InputDevices/res/values-ja/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"スロバキア語"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"スロベニア語"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"トルコ語"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"トルコ語 F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ウクライナ語"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"アラビア語"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ギリシャ語"</string>
diff --git a/packages/InputDevices/res/values-ka/strings.xml b/packages/InputDevices/res/values-ka/strings.xml
index ee42b35..7b05bfd 100644
--- a/packages/InputDevices/res/values-ka/strings.xml
+++ b/packages/InputDevices/res/values-ka/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"სლოვაკური"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"სლოვენური"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"თურქული"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"თურქული F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"უკრაინული"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"არაბული"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ბერძნული"</string>
diff --git a/packages/InputDevices/res/values-kk/strings.xml b/packages/InputDevices/res/values-kk/strings.xml
index 6ebb403..ae15ca9 100644
--- a/packages/InputDevices/res/values-kk/strings.xml
+++ b/packages/InputDevices/res/values-kk/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Словак"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Словен"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Түрік"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Түрік тілі, F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Украин"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Араб"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Грек"</string>
diff --git a/packages/InputDevices/res/values-km/strings.xml b/packages/InputDevices/res/values-km/strings.xml
index a2c3262..af66b1e 100644
--- a/packages/InputDevices/res/values-km/strings.xml
+++ b/packages/InputDevices/res/values-km/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"ស្លូវ៉ាគី"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"ស្លូវ៉ានី"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ទួរគី"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"តួកគី F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"អ៊ុយក្រែន"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"អារ៉ាប់"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ក្រិក"</string>
diff --git a/packages/InputDevices/res/values-kn/strings.xml b/packages/InputDevices/res/values-kn/strings.xml
index 6cdee0b..739bdd6 100644
--- a/packages/InputDevices/res/values-kn/strings.xml
+++ b/packages/InputDevices/res/values-kn/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"ಸ್ಲೋವಾಕ್"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"ಸ್ಲೋವೇನಿಯನ್"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ಟರ್ಕಿಶ್‌"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"ಟರ್ಕಿಶ್ F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ಉಕ್ರೇನಿಯನ್"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"ಅರೇಬಿಕ್"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ಗ್ರೀಕ್"</string>
diff --git a/packages/InputDevices/res/values-ko/strings.xml b/packages/InputDevices/res/values-ko/strings.xml
index 8cd839d..db67b22 100644
--- a/packages/InputDevices/res/values-ko/strings.xml
+++ b/packages/InputDevices/res/values-ko/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"슬로바키아어"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"슬로베니아어"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"터키어"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"터키어 F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"우크라이나어"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"아랍어"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"그리스어"</string>
diff --git a/packages/InputDevices/res/values-ky/strings.xml b/packages/InputDevices/res/values-ky/strings.xml
index 60a997a..a47b71f 100644
--- a/packages/InputDevices/res/values-ky/strings.xml
+++ b/packages/InputDevices/res/values-ky/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Словак"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Словен"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"түркчө"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Түркчө F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Украин"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Арабча"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Грекче"</string>
diff --git a/packages/InputDevices/res/values-lo/strings.xml b/packages/InputDevices/res/values-lo/strings.xml
index 26e7ad4..94a531e 100644
--- a/packages/InputDevices/res/values-lo/strings.xml
+++ b/packages/InputDevices/res/values-lo/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"ສະໂລແວັກ"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"ສະໂລເວນຽນ"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ເຕີກິສ"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"ເທືຄິຊ-F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ຢູເຄຣນຽນ"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"ອາຣັບ"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ກ​ຣີກ"</string>
diff --git a/packages/InputDevices/res/values-lt/strings.xml b/packages/InputDevices/res/values-lt/strings.xml
index d0b855d..59842b0 100644
--- a/packages/InputDevices/res/values-lt/strings.xml
+++ b/packages/InputDevices/res/values-lt/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovakų k."</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovėnų k."</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkų k."</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkų F k."</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainiečių k."</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabų"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Graikų"</string>
diff --git a/packages/InputDevices/res/values-lv/strings.xml b/packages/InputDevices/res/values-lv/strings.xml
index beff9b57..06260582 100644
--- a/packages/InputDevices/res/values-lv/strings.xml
+++ b/packages/InputDevices/res/values-lv/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovāku"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovēņu"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turku"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turku F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukraiņu"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arābu"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grieķu"</string>
diff --git a/packages/InputDevices/res/values-mk/strings.xml b/packages/InputDevices/res/values-mk/strings.xml
index ce5e8f2..25f8d12 100644
--- a/packages/InputDevices/res/values-mk/strings.xml
+++ b/packages/InputDevices/res/values-mk/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Словачки"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Словенечки"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Турски"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Турски F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Украински"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"арапски"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"грчки"</string>
diff --git a/packages/InputDevices/res/values-ml/strings.xml b/packages/InputDevices/res/values-ml/strings.xml
index aafab0c..2f81db8 100644
--- a/packages/InputDevices/res/values-ml/strings.xml
+++ b/packages/InputDevices/res/values-ml/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"സ്ലോവാക്"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"സ്ലോവേനിയൻ"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ടർക്കിഷ്"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"ടർക്കിഷ്-എഫ്"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ഉക്രേനിയന്‍"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"അറബിക്"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ഗ്രീക്ക്"</string>
diff --git a/packages/InputDevices/res/values-mn/strings.xml b/packages/InputDevices/res/values-mn/strings.xml
index e9ff619..9720ce4 100644
--- a/packages/InputDevices/res/values-mn/strings.xml
+++ b/packages/InputDevices/res/values-mn/strings.xml
@@ -21,9 +21,9 @@
     <string name="keyboard_layout_bulgarian" msgid="8951224309972028398">"Болгар"</string>
     <string name="keyboard_layout_italian" msgid="6497079660449781213">"Итали"</string>
     <string name="keyboard_layout_danish" msgid="8036432066627127851">"Дани"</string>
-    <string name="keyboard_layout_norwegian" msgid="9090097917011040937">"Норвеги"</string>
+    <string name="keyboard_layout_norwegian" msgid="9090097917011040937">"Норвег"</string>
     <string name="keyboard_layout_swedish" msgid="732959109088479351">"Швед"</string>
-    <string name="keyboard_layout_finnish" msgid="5585659438924315466">"Финлянд"</string>
+    <string name="keyboard_layout_finnish" msgid="5585659438924315466">"Финланд"</string>
     <string name="keyboard_layout_croatian" msgid="4172229471079281138">"Хорват"</string>
     <string name="keyboard_layout_czech" msgid="1349256901452975343">"Чех"</string>
     <string name="keyboard_layout_czech_qwerty" msgid="3331402534128515501">"Чех хэлний QWERTY загвар"</string>
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Словак"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Словени"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Турк"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Турк F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Украйн"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Араб"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Грек"</string>
diff --git a/packages/InputDevices/res/values-mr/strings.xml b/packages/InputDevices/res/values-mr/strings.xml
index 711366a..68f70d1 100644
--- a/packages/InputDevices/res/values-mr/strings.xml
+++ b/packages/InputDevices/res/values-mr/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"स्लोव्हाक"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"स्लोव्हेनियन"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"तुर्की"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"तुर्कीश एफ"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"यूक्रेनियन"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"अरबी"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ग्रीक"</string>
diff --git a/packages/InputDevices/res/values-ms/strings.xml b/packages/InputDevices/res/values-ms/strings.xml
index 86241b3..d50e851 100644
--- a/packages/InputDevices/res/values-ms/strings.xml
+++ b/packages/InputDevices/res/values-ms/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Bahasa Slovakia"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Bahasa Slovenia"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Bahasa Turki"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turki F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Bahasa Ukraine"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Bahasa Arab"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Bahasa Greek"</string>
diff --git a/packages/InputDevices/res/values-my/strings.xml b/packages/InputDevices/res/values-my/strings.xml
index 57748db..60bdabb 100644
--- a/packages/InputDevices/res/values-my/strings.xml
+++ b/packages/InputDevices/res/values-my/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"စလိုဗက်"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"စလိုဗေးနီးယန်း"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"တူရကီ"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"တူရကီ F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ယူကရိန်း"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"အာရပ်"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ဂရိ"</string>
diff --git a/packages/InputDevices/res/values-nb/strings.xml b/packages/InputDevices/res/values-nb/strings.xml
index 6059b4c..61fa664 100644
--- a/packages/InputDevices/res/values-nb/strings.xml
+++ b/packages/InputDevices/res/values-nb/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovakisk"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovensk"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Tyrkisk"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Tyrkisk F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainsk"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabisk"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Gresk"</string>
diff --git a/packages/InputDevices/res/values-ne/strings.xml b/packages/InputDevices/res/values-ne/strings.xml
index 1b58fe8..ff5e9de5 100644
--- a/packages/InputDevices/res/values-ne/strings.xml
+++ b/packages/InputDevices/res/values-ne/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"स्लोवाक"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"स्लोवेनियाई"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"टर्किश"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"तुर्किस-F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"युक्रेनी"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"अरबी"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ग्रीक"</string>
diff --git a/packages/InputDevices/res/values-nl/strings.xml b/packages/InputDevices/res/values-nl/strings.xml
index 750ce14..1bc74c4 100644
--- a/packages/InputDevices/res/values-nl/strings.xml
+++ b/packages/InputDevices/res/values-nl/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slowaaks"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Sloveens"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turks"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turks F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Oekraïens"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabisch"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grieks"</string>
diff --git a/packages/InputDevices/res/values-or/strings.xml b/packages/InputDevices/res/values-or/strings.xml
index 2378dce..e1b6b2e 100644
--- a/packages/InputDevices/res/values-or/strings.xml
+++ b/packages/InputDevices/res/values-or/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"ସ୍ଲୋଭାକ୍"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"ସ୍ଲୋଭେନିଆନ୍"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ତୁର୍କିସ୍"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"ତୁର୍କିଶ୍ F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ୟୁକ୍ରାନିଆନ୍"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"ଆରବିକ୍‍"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ଗ୍ରୀକ୍"</string>
diff --git a/packages/InputDevices/res/values-pa/strings.xml b/packages/InputDevices/res/values-pa/strings.xml
index fa46d8f..5622a58 100644
--- a/packages/InputDevices/res/values-pa/strings.xml
+++ b/packages/InputDevices/res/values-pa/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"ਸਲੋਵਾਕ"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"ਸਲੋਵੀਅਨ"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ਤੁਰਕੀ"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"ਤੁਰਕੀ F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ਯੂਕਰੇਨੀਅਨ"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"ਅਰਬੀ"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ਯੂਨਾਨੀ"</string>
diff --git a/packages/InputDevices/res/values-pl/strings.xml b/packages/InputDevices/res/values-pl/strings.xml
index c375119..60fdaa0 100644
--- a/packages/InputDevices/res/values-pl/strings.xml
+++ b/packages/InputDevices/res/values-pl/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Słowacki"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Słoweński"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turecki"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turecka F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukraiński"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arabski"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"grecki"</string>
diff --git a/packages/InputDevices/res/values-pt-rBR/strings.xml b/packages/InputDevices/res/values-pt-rBR/strings.xml
index d6687c8..2d9de6b 100644
--- a/packages/InputDevices/res/values-pt-rBR/strings.xml
+++ b/packages/InputDevices/res/values-pt-rBR/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Eslovaco"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Esloveno"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turco"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turco F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraniano"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Árabe"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grego"</string>
diff --git a/packages/InputDevices/res/values-pt-rPT/strings.xml b/packages/InputDevices/res/values-pt-rPT/strings.xml
index 4f8a432..7a6b599 100644
--- a/packages/InputDevices/res/values-pt-rPT/strings.xml
+++ b/packages/InputDevices/res/values-pt-rPT/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Eslovaco"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Esloveno"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turco"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turco F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraniano"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Árabe"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grego"</string>
diff --git a/packages/InputDevices/res/values-pt/strings.xml b/packages/InputDevices/res/values-pt/strings.xml
index d6687c8..2d9de6b 100644
--- a/packages/InputDevices/res/values-pt/strings.xml
+++ b/packages/InputDevices/res/values-pt/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Eslovaco"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Esloveno"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turco"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turco F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraniano"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Árabe"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grego"</string>
diff --git a/packages/InputDevices/res/values-ro/strings.xml b/packages/InputDevices/res/values-ro/strings.xml
index 1b38bdd..23f864e 100644
--- a/packages/InputDevices/res/values-ro/strings.xml
+++ b/packages/InputDevices/res/values-ro/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovacă"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovenă"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turcă"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turcă F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ucraineană"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabă"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Greacă"</string>
diff --git a/packages/InputDevices/res/values-ru/strings.xml b/packages/InputDevices/res/values-ru/strings.xml
index cd37762..244cf0b 100644
--- a/packages/InputDevices/res/values-ru/strings.xml
+++ b/packages/InputDevices/res/values-ru/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"словацкий"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"словенский"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"турецкий"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"турецкий (тип F)"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"украинский"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"арабский"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"греческий"</string>
diff --git a/packages/InputDevices/res/values-si/strings.xml b/packages/InputDevices/res/values-si/strings.xml
index c136616..5709420 100644
--- a/packages/InputDevices/res/values-si/strings.xml
+++ b/packages/InputDevices/res/values-si/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"ස්ලෝවැක්"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"ස්ලෝවේනියානු"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"තුර්කි"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"තුර්කි F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"යුක්රේනියානු"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"අරාබි"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"ග්‍රීක"</string>
diff --git a/packages/InputDevices/res/values-sk/strings.xml b/packages/InputDevices/res/values-sk/strings.xml
index ee117ca..7764d3b 100644
--- a/packages/InputDevices/res/values-sk/strings.xml
+++ b/packages/InputDevices/res/values-sk/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"slovenské"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"slovinské"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"turecké"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turečtina F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukrajinské"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabčina"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Gréčtina"</string>
diff --git a/packages/InputDevices/res/values-sl/strings.xml b/packages/InputDevices/res/values-sl/strings.xml
index 91ba472..4d6dac5 100644
--- a/packages/InputDevices/res/values-sl/strings.xml
+++ b/packages/InputDevices/res/values-sl/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"slovaška"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"slovenska"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"turška"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turščina F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukrajinska"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arabščina"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"grščina"</string>
diff --git a/packages/InputDevices/res/values-sq/strings.xml b/packages/InputDevices/res/values-sq/strings.xml
index 3128025..05261e9 100644
--- a/packages/InputDevices/res/values-sq/strings.xml
+++ b/packages/InputDevices/res/values-sq/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"sllovakisht"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"sllovenisht"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"turqisht"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turqisht me F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ukrainisht"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"arabisht"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"greqisht"</string>
diff --git a/packages/InputDevices/res/values-sr/strings.xml b/packages/InputDevices/res/values-sr/strings.xml
index ab1faed..e7e81ee 100644
--- a/packages/InputDevices/res/values-sr/strings.xml
+++ b/packages/InputDevices/res/values-sr/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"словачка"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"словеначка"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"турска"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"турска F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"украјинска"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"арапски"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"грчки"</string>
diff --git a/packages/InputDevices/res/values-sv/strings.xml b/packages/InputDevices/res/values-sv/strings.xml
index a4c0fca..5203011 100644
--- a/packages/InputDevices/res/values-sv/strings.xml
+++ b/packages/InputDevices/res/values-sv/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovakiskt"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovenskt"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkiskt"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"turkiska, F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainskt"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabiska"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grekiska"</string>
diff --git a/packages/InputDevices/res/values-sw/strings.xml b/packages/InputDevices/res/values-sw/strings.xml
index 1e5c8d7..784a904 100644
--- a/packages/InputDevices/res/values-sw/strings.xml
+++ b/packages/InputDevices/res/values-sw/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Kislovakia"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Kislovenia"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Kituruki"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Kituruki F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Kiukrania"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Kiarabu"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Kigiriki"</string>
diff --git a/packages/InputDevices/res/values-ta/strings.xml b/packages/InputDevices/res/values-ta/strings.xml
index 8bd7170..f8d7920 100644
--- a/packages/InputDevices/res/values-ta/strings.xml
+++ b/packages/InputDevices/res/values-ta/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"ஸ்லோவாக்"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"ஸ்லோவேனியன்"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"டர்கிஷ்"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"டர்கிஷ் F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"உக்ரைனியன்"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"அரபிக்"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"கிரேக்கம்"</string>
diff --git a/packages/InputDevices/res/values-te/strings.xml b/packages/InputDevices/res/values-te/strings.xml
index b6caafd..cad5489 100644
--- a/packages/InputDevices/res/values-te/strings.xml
+++ b/packages/InputDevices/res/values-te/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"స్లోవక్"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"స్లోవేనియన్"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"టర్కిష్"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"టర్కిష్ ఎఫ్"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ఉక్రెయినియన్"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"అరబిక్"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"గ్రీక్"</string>
diff --git a/packages/InputDevices/res/values-th/strings.xml b/packages/InputDevices/res/values-th/strings.xml
index 1170f86..8c40a26 100644
--- a/packages/InputDevices/res/values-th/strings.xml
+++ b/packages/InputDevices/res/values-th/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"สโลวัก"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"สโลวีเนีย"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ตุรกี"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"ภาษาตุรกี F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"ยูเครน"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"ภาษาอารบิค"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"กรีก"</string>
diff --git a/packages/InputDevices/res/values-tl/strings.xml b/packages/InputDevices/res/values-tl/strings.xml
index 97b878b..16ac433 100644
--- a/packages/InputDevices/res/values-tl/strings.xml
+++ b/packages/InputDevices/res/values-tl/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovak"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovenian"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkish"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkish F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukrainian"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arabic"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Greek"</string>
diff --git a/packages/InputDevices/res/values-tr/strings.xml b/packages/InputDevices/res/values-tr/strings.xml
index 7e9b5e5..9bd79e6 100644
--- a/packages/InputDevices/res/values-tr/strings.xml
+++ b/packages/InputDevices/res/values-tr/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovakça"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovence"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Türkçe"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Türkçe F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukraynaca"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arapça"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Yunanca"</string>
diff --git a/packages/InputDevices/res/values-uk/strings.xml b/packages/InputDevices/res/values-uk/strings.xml
index db5de4c..81b2a20 100644
--- a/packages/InputDevices/res/values-uk/strings.xml
+++ b/packages/InputDevices/res/values-uk/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"словацька"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"словенська"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"турецька"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Турецька-F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"українська"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Арабська"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Грецька"</string>
diff --git a/packages/InputDevices/res/values-ur/strings.xml b/packages/InputDevices/res/values-ur/strings.xml
index bf9e5ad..412b1ea 100644
--- a/packages/InputDevices/res/values-ur/strings.xml
+++ b/packages/InputDevices/res/values-ur/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"سلوووک"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"سلووینیائی"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"ترکش"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"‏ترکی-F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"يُوکرينی"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"عربی"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"يونانی"</string>
diff --git a/packages/InputDevices/res/values-uz/strings.xml b/packages/InputDevices/res/values-uz/strings.xml
index 88e9f9f..264ea39 100644
--- a/packages/InputDevices/res/values-uz/strings.xml
+++ b/packages/InputDevices/res/values-uz/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Slovakcha"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Slovyancha"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Turkcha"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Turkcha F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Ukraincha"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Arab"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Grek"</string>
diff --git a/packages/InputDevices/res/values-vi/strings.xml b/packages/InputDevices/res/values-vi/strings.xml
index eabaa19..d3c0116 100644
--- a/packages/InputDevices/res/values-vi/strings.xml
+++ b/packages/InputDevices/res/values-vi/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Tiếng Slovak"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Tiếng Sloven"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Tiếng Thổ Nhĩ Kỳ"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"Tiếng Thổ Nhĩ Kỳ F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Tiếng Ukraina"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Tiếng Ả rập"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Tiếng Hy Lạp"</string>
diff --git a/packages/InputDevices/res/values-zh-rCN/strings.xml b/packages/InputDevices/res/values-zh-rCN/strings.xml
index 3eb4b2c..7fd1135 100644
--- a/packages/InputDevices/res/values-zh-rCN/strings.xml
+++ b/packages/InputDevices/res/values-zh-rCN/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"斯洛伐克语"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"斯洛文尼亚语"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"土耳其语"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"土耳其语 F 型键盘"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"乌克兰语"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"阿拉伯语"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"希腊语"</string>
diff --git a/packages/InputDevices/res/values-zh-rHK/strings.xml b/packages/InputDevices/res/values-zh-rHK/strings.xml
index 37cd533..017c954 100644
--- a/packages/InputDevices/res/values-zh-rHK/strings.xml
+++ b/packages/InputDevices/res/values-zh-rHK/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"斯洛伐克文"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"斯洛文尼亞文"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"土耳其文"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"土耳其文 F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"烏克蘭文"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"阿拉伯文"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"希臘文"</string>
diff --git a/packages/InputDevices/res/values-zh-rTW/strings.xml b/packages/InputDevices/res/values-zh-rTW/strings.xml
index 8d2de40..fd2c347 100644
--- a/packages/InputDevices/res/values-zh-rTW/strings.xml
+++ b/packages/InputDevices/res/values-zh-rTW/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"斯洛伐克文"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"斯洛維尼亞文"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"土耳其文"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"土耳其文 F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"烏克蘭文"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"阿拉伯文"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"希臘文"</string>
diff --git a/packages/InputDevices/res/values-zu/strings.xml b/packages/InputDevices/res/values-zu/strings.xml
index ddb688a..7bf2257 100644
--- a/packages/InputDevices/res/values-zu/strings.xml
+++ b/packages/InputDevices/res/values-zu/strings.xml
@@ -35,6 +35,7 @@
     <string name="keyboard_layout_slovak" msgid="2469379934672837296">"Isi-Slovak"</string>
     <string name="keyboard_layout_slovenian" msgid="1735933028924982368">"Isi-Slovenian"</string>
     <string name="keyboard_layout_turkish" msgid="7736163250907964898">"Isi-Turkish"</string>
+    <string name="keyboard_layout_turkish_f" msgid="9130320856010776018">"I-Turkish-F"</string>
     <string name="keyboard_layout_ukrainian" msgid="8176637744389480417">"Isi-Ukrainian"</string>
     <string name="keyboard_layout_arabic" msgid="5671970465174968712">"Isi-Arabic"</string>
     <string name="keyboard_layout_greek" msgid="7289253560162386040">"Isi-Greek"</string>
diff --git a/packages/MtpDocumentsProvider/OWNERS b/packages/MtpDocumentsProvider/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/packages/MtpDocumentsProvider/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/packages/PackageInstaller/res/values-kn/strings.xml b/packages/PackageInstaller/res/values-kn/strings.xml
index 19842eb..fa93f0d 100644
--- a/packages/PackageInstaller/res/values-kn/strings.xml
+++ b/packages/PackageInstaller/res/values-kn/strings.xml
@@ -69,7 +69,7 @@
     <string name="uninstall_failed_app" msgid="5506028705017601412">"<xliff:g id="PACKAGE_LABEL">%1$s</xliff:g> ಅನ್‌ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡುವಿಕೆ ಯಶಸ್ವಿಯಾಗಿಲ್ಲ."</string>
     <string name="uninstall_failed_device_policy_manager" msgid="785293813665540305">"ಸಕ್ರಿಯ ಸಾಧನ ನಿರ್ವಹಣೆ ಆ್ಯಪ್‌ ಅನ್‌ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
     <string name="uninstall_failed_device_policy_manager_of_user" msgid="4813104025494168064">"<xliff:g id="USERNAME">%1$s</xliff:g> ಗಾಗಿ ಸಕ್ರಿಯ ಸಾಧನ ನಿರ್ವಹಣೆ ಆ್ಯಪ್‌ ಅನ್‌ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
-    <string name="uninstall_all_blocked_profile_owner" msgid="2009393666026751501">"ಕೆಲವು ಬಳಕೆದಾರರು ಅಥವಾ ಪ್ರೊಫೈಲ್‌ಗಳಿಗೆ ಈ ಆಪ್‌ ಅಗತ್ಯ ಮತ್ತು ಇತರರ ಸಾಧನದಿಂದ ಅನ್‌ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡಲಾಗಿದೆ"</string>
+    <string name="uninstall_all_blocked_profile_owner" msgid="2009393666026751501">"ಕೆಲವು ಬಳಕೆದಾರರು ಅಥವಾ ಪ್ರೊಫೈಲ್‌ಗಳಿಗೆ ಈ ಆ್ಯಪ್‌ ಅಗತ್ಯ ಮತ್ತು ಇತರರ ಸಾಧನದಿಂದ ಅನ್‌ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡಲಾಗಿದೆ"</string>
     <string name="uninstall_blocked_profile_owner" msgid="6373897407002404848">"ಈ ಆ್ಯಪ್‌ಗೆ ನಿಮ್ಮ ಪ್ರೊಫೈಲ್‌‌ನ ಅಗತ್ಯವಿದೆ ಮತ್ತು ಅನ್‌ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ."</string>
     <string name="uninstall_blocked_device_owner" msgid="6724602931761073901">"ಈ ಆ್ಯಪ್‌ ನಿಮ್ಮ ಸಾಧನ ನಿರ್ವಾಹಕರಿಗೆ ಅಗತ್ಯವಿದೆ ಮತ್ತು ಅನ್‌ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ."</string>
     <string name="manage_device_administrators" msgid="3092696419363842816">"ಸಾಧನದ ನಿರ್ವಹಣೆ ಆ್ಯಪ್‌ಗಳನ್ನು ನಿರ್ವಹಿಸಿ"</string>
diff --git a/packages/PackageInstaller/res/values-mk/strings.xml b/packages/PackageInstaller/res/values-mk/strings.xml
index c625674..000e5d8 100644
--- a/packages/PackageInstaller/res/values-mk/strings.xml
+++ b/packages/PackageInstaller/res/values-mk/strings.xml
@@ -33,9 +33,9 @@
     <string name="install_failed_incompatible" product="tv" msgid="2890001324362291683">"Оваа апликација не е компатибилна со вашиот телевизор."</string>
     <string name="install_failed_incompatible" product="default" msgid="7254630419511645826">"Апликација што не е инсталирана како апликација не е компатибилна со вашиот телефон."</string>
     <string name="install_failed_invalid_apk" msgid="8581007676422623930">"Апликација што не е инсталирана како пакет се чини дека е неважечка."</string>
-    <string name="install_failed_msg" product="tablet" msgid="6298387264270562442">"<xliff:g id="APP_NAME">%1$s</xliff:g> не можеше да се инсталира на вашиот таблет."</string>
-    <string name="install_failed_msg" product="tv" msgid="1920009940048975221">"<xliff:g id="APP_NAME">%1$s</xliff:g> не можеше да се инсталира на вашиот телевизор."</string>
-    <string name="install_failed_msg" product="default" msgid="6484461562647915707">"<xliff:g id="APP_NAME">%1$s</xliff:g> не можеше да се инсталира на вашиот телефон."</string>
+    <string name="install_failed_msg" product="tablet" msgid="6298387264270562442">"<xliff:g id="APP_NAME">%1$s</xliff:g> не може да се инсталира на вашиот таблет."</string>
+    <string name="install_failed_msg" product="tv" msgid="1920009940048975221">"<xliff:g id="APP_NAME">%1$s</xliff:g> не може да се инсталира на вашиот телевизор."</string>
+    <string name="install_failed_msg" product="default" msgid="6484461562647915707">"<xliff:g id="APP_NAME">%1$s</xliff:g> не може да се инсталира на вашиот телефон."</string>
     <string name="launch" msgid="3952550563999890101">"Отвори"</string>
     <string name="unknown_apps_admin_dlg_text" msgid="4456572224020176095">"Вашиот администратор не дозволува инсталација на апликации добиени од непознати извори"</string>
     <string name="unknown_apps_user_restriction_dlg_text" msgid="151020786933988344">"Корисников не може да инсталира непознати апликации"</string>
@@ -43,13 +43,13 @@
     <string name="ok" msgid="7871959885003339302">"Во ред"</string>
     <string name="manage_applications" msgid="5400164782453975580">"Управување со апликациите"</string>
     <string name="out_of_space_dlg_title" msgid="4156690013884649502">"Нема простор"</string>
-    <string name="out_of_space_dlg_text" msgid="8727714096031856231">"<xliff:g id="APP_NAME">%1$s</xliff:g> не можеше да се инсталира. Ослободете простор и обидете се повторно."</string>
+    <string name="out_of_space_dlg_text" msgid="8727714096031856231">"<xliff:g id="APP_NAME">%1$s</xliff:g> не може да се инсталира. Ослободете простор и обидете се повторно."</string>
     <string name="app_not_found_dlg_title" msgid="5107924008597470285">"Апликацијата не е најдена"</string>
     <string name="app_not_found_dlg_text" msgid="5219983779377811611">"Апликацијата не е пронајдена во списокот инсталирани апликации."</string>
     <string name="user_is_not_allowed_dlg_title" msgid="6915293433252210232">"Не е дозволено"</string>
     <string name="user_is_not_allowed_dlg_text" msgid="3468447791330611681">"Тековниот корисник нема дозвола да ја изведе деинсталацијава."</string>
     <string name="generic_error_dlg_title" msgid="5863195085927067752">"Грешка"</string>
-    <string name="generic_error_dlg_text" msgid="5287861443265795232">"Не можеше да се деинсталира апликацијата."</string>
+    <string name="generic_error_dlg_text" msgid="5287861443265795232">"Не може да се деинсталира апликацијата."</string>
     <string name="uninstall_application_title" msgid="4045420072401428123">"Деинсталирај ја апликацијата"</string>
     <string name="uninstall_update_title" msgid="824411791011583031">"Деинсталирајте ажурирање"</string>
     <string name="uninstall_activity_text" msgid="1928194674397770771">"<xliff:g id="ACTIVITY_NAME">%1$s</xliff:g> е дел од следната апликација:"</string>
diff --git a/packages/PackageInstaller/res/values-ne/strings.xml b/packages/PackageInstaller/res/values-ne/strings.xml
index 495a05b..0b73271 100644
--- a/packages/PackageInstaller/res/values-ne/strings.xml
+++ b/packages/PackageInstaller/res/values-ne/strings.xml
@@ -37,7 +37,7 @@
     <string name="install_failed_msg" product="tv" msgid="1920009940048975221">"तपाईंको टिभी मा <xliff:g id="APP_NAME">%1$s</xliff:g> स्थापना गर्न सकिएन।"</string>
     <string name="install_failed_msg" product="default" msgid="6484461562647915707">"तपाईंको फोनमा <xliff:g id="APP_NAME">%1$s</xliff:g> स्थापना गर्न सकिएन।"</string>
     <string name="launch" msgid="3952550563999890101">"खोल्नुहोस्"</string>
-    <string name="unknown_apps_admin_dlg_text" msgid="4456572224020176095">"तपाईंका प्रशासकले अज्ञात स्रोतहरूबाट प्राप्त अनुप्रयोगहरूलाई स्थापना गर्ने अनुमति दिनुहुन्न"</string>
+    <string name="unknown_apps_admin_dlg_text" msgid="4456572224020176095">"तपाईंका प्रशासकले अज्ञात स्रोतहरूबाट प्राप्त एपहरूलाई स्थापना गर्ने अनुमति दिनुहुन्न"</string>
     <string name="unknown_apps_user_restriction_dlg_text" msgid="151020786933988344">"यी प्रयोगकर्ता अज्ञात एपहरू स्थापना गर्न सक्नुहुन्न"</string>
     <string name="install_apps_user_restriction_dlg_text" msgid="2154119597001074022">"यो प्रयोगकर्तालाई एपहरू स्थापना गर्ने अनुमति छैन"</string>
     <string name="ok" msgid="7871959885003339302">"ठिक छ"</string>
diff --git a/packages/PackageInstaller/res/values-pl/strings.xml b/packages/PackageInstaller/res/values-pl/strings.xml
index 5ce30c2..f67cb08 100644
--- a/packages/PackageInstaller/res/values-pl/strings.xml
+++ b/packages/PackageInstaller/res/values-pl/strings.xml
@@ -57,7 +57,7 @@
     <string name="uninstall_application_text_all_users" msgid="575491774380227119">"Chcesz odinstalować tę aplikację dla "<b>"wszystkich"</b>" użytkowników? Ta aplikacja i jej dane zostaną usunięte dla "<b>"wszystkich"</b>" użytkowników na urządzeniu."</string>
     <string name="uninstall_application_text_user" msgid="498072714173920526">"Chcesz odinstalować tę aplikację dla użytkownika <xliff:g id="USERNAME">%1$s</xliff:g>?"</string>
     <string name="uninstall_update_text" msgid="863648314632448705">"Przywrócić fabryczną wersję tej aplikacji? Wszystkie dane zostaną usunięte."</string>
-    <string name="uninstall_update_text_multiuser" msgid="8992883151333057227">"Przywrócić fabryczną wersję tej aplikacji? Wszystkie dane zostaną usunięte. Dotyczy to wszystkich użytkowników tego urządzenia, również tych korzystających z profilu do pracy."</string>
+    <string name="uninstall_update_text_multiuser" msgid="8992883151333057227">"Przywrócić fabryczną wersję tej aplikacji? Wszystkie dane zostaną usunięte. Dotyczy to wszystkich użytkowników tego urządzenia, również tych korzystających z profilu służbowego."</string>
     <string name="uninstall_keep_data" msgid="7002379587465487550">"Zachowaj <xliff:g id="SIZE">%1$s</xliff:g> danych aplikacji."</string>
     <string name="uninstalling_notification_channel" msgid="840153394325714653">"Aktywne odinstalowania"</string>
     <string name="uninstall_failure_notification_channel" msgid="1136405866767576588">"Nieudane odinstalowania"</string>
diff --git a/packages/PrintRecommendationService/OWNERS b/packages/PrintRecommendationService/OWNERS
new file mode 100644
index 0000000..2c7b881
--- /dev/null
+++ b/packages/PrintRecommendationService/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/print/OWNERS
diff --git a/packages/PrintSpooler/OWNERS b/packages/PrintSpooler/OWNERS
new file mode 100644
index 0000000..2c7b881
--- /dev/null
+++ b/packages/PrintSpooler/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/print/OWNERS
diff --git a/packages/PrintSpooler/res/values-fr-rCA/strings.xml b/packages/PrintSpooler/res/values-fr-rCA/strings.xml
index 3b7775a..082c148 100644
--- a/packages/PrintSpooler/res/values-fr-rCA/strings.xml
+++ b/packages/PrintSpooler/res/values-fr-rCA/strings.xml
@@ -57,6 +57,7 @@
     <string name="print_forget_printer" msgid="5035287497291910766">"Supprimer l\'imprimante"</string>
     <plurals name="print_search_result_count_utterance" formatted="false" msgid="6997663738361080868">
       <item quantity="one"><xliff:g id="COUNT_1">%1$s</xliff:g> imprimante trouvée</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%1$s</xliff:g> printers found</item>
       <item quantity="other"><xliff:g id="COUNT_1">%1$s</xliff:g> imprimante trouvées</item>
     </plurals>
     <string name="printer_extended_description_template" msgid="1366699227703381874">"<xliff:g id="PRINT_SERVICE_LABEL">%1$s</xliff:g> - <xliff:g id="PRINTER_DESCRIPTION">%2$s</xliff:g>"</string>
@@ -77,6 +78,7 @@
     <string name="all_services_title" msgid="5578662754874906455">"Tous les services"</string>
     <plurals name="print_services_recommendation_subtitle" formatted="false" msgid="5678487708807185138">
       <item quantity="one">Installer pour détecter <xliff:g id="COUNT_1">%1$s</xliff:g> imprimante</item>
+      <item quantity="many">Install to discover <xliff:g id="COUNT_1">%1$s</xliff:g> printers</item>
       <item quantity="other">Installer pour détecter <xliff:g id="COUNT_1">%1$s</xliff:g> imprimantes</item>
     </plurals>
     <string name="printing_notification_title_template" msgid="295903957762447362">"Impression de <xliff:g id="PRINT_JOB_NAME">%1$s</xliff:g> en cours…"</string>
diff --git a/packages/PrintSpooler/res/values-fr/strings.xml b/packages/PrintSpooler/res/values-fr/strings.xml
index f6e901d..560c5dc 100644
--- a/packages/PrintSpooler/res/values-fr/strings.xml
+++ b/packages/PrintSpooler/res/values-fr/strings.xml
@@ -57,6 +57,7 @@
     <string name="print_forget_printer" msgid="5035287497291910766">"Supprimer l\'imprimante"</string>
     <plurals name="print_search_result_count_utterance" formatted="false" msgid="6997663738361080868">
       <item quantity="one"><xliff:g id="COUNT_1">%1$s</xliff:g> imprimante trouvée</item>
+      <item quantity="many"><xliff:g id="COUNT_1">%1$s</xliff:g> printers found</item>
       <item quantity="other"><xliff:g id="COUNT_1">%1$s</xliff:g> imprimantes trouvées</item>
     </plurals>
     <string name="printer_extended_description_template" msgid="1366699227703381874">"<xliff:g id="PRINT_SERVICE_LABEL">%1$s</xliff:g> – <xliff:g id="PRINTER_DESCRIPTION">%2$s</xliff:g>"</string>
@@ -77,6 +78,7 @@
     <string name="all_services_title" msgid="5578662754874906455">"Tous les services"</string>
     <plurals name="print_services_recommendation_subtitle" formatted="false" msgid="5678487708807185138">
       <item quantity="one">Installer pour détecter <xliff:g id="COUNT_1">%1$s</xliff:g> imprimante</item>
+      <item quantity="many">Install to discover <xliff:g id="COUNT_1">%1$s</xliff:g> printers</item>
       <item quantity="other">Installer pour détecter <xliff:g id="COUNT_1">%1$s</xliff:g> imprimantes</item>
     </plurals>
     <string name="printing_notification_title_template" msgid="295903957762447362">"Impression de \"<xliff:g id="PRINT_JOB_NAME">%1$s</xliff:g>\" en cours…"</string>
diff --git a/packages/PrintSpooler/res/values-mk/strings.xml b/packages/PrintSpooler/res/values-mk/strings.xml
index 11d7867..504c956 100644
--- a/packages/PrintSpooler/res/values-mk/strings.xml
+++ b/packages/PrintSpooler/res/values-mk/strings.xml
@@ -63,7 +63,7 @@
     <string name="printer_info_desc" msgid="7181988788991581654">"Повеќе информации за овој печатач"</string>
     <string name="notification_channel_progress" msgid="872788690775721436">"Тековни работи за печатење"</string>
     <string name="notification_channel_failure" msgid="9042250774797916414">"Неуспешни работи за печатење"</string>
-    <string name="could_not_create_file" msgid="3425025039427448443">"Не можеше да се создаде датотека"</string>
+    <string name="could_not_create_file" msgid="3425025039427448443">"Не може да се создаде датотека"</string>
     <string name="print_services_disabled_toast" msgid="9089060734685174685">"Некои услуги за печатење се оневозможени"</string>
     <string name="print_searching_for_printers" msgid="6550424555079932867">"Пребарување печатачи"</string>
     <string name="print_no_print_services" msgid="8561247706423327966">"Нема овозможени услуги за печатење"</string>
@@ -102,7 +102,7 @@
     <item msgid="4061931020926489228">"Портрет"</item>
     <item msgid="3199660090246166812">"Пејзаж"</item>
   </string-array>
-    <string name="print_write_error_message" msgid="5787642615179572543">"Не можеше да се напише во датотеката"</string>
+    <string name="print_write_error_message" msgid="5787642615179572543">"Не може да се напише во датотеката"</string>
     <string name="print_error_default_message" msgid="8602678405502922346">"За жал, тоа не успеа. Обидете се повторно."</string>
     <string name="print_error_retry" msgid="1426421728784259538">"Обиди се повторно"</string>
     <string name="print_error_printer_unavailable" msgid="8985614415253203381">"Овој печатач не е достапен во моментов."</string>
diff --git a/packages/PrintSpooler/res/values-mr/strings.xml b/packages/PrintSpooler/res/values-mr/strings.xml
index 4d7e919..8119439 100644
--- a/packages/PrintSpooler/res/values-mr/strings.xml
+++ b/packages/PrintSpooler/res/values-mr/strings.xml
@@ -63,7 +63,7 @@
     <string name="printer_info_desc" msgid="7181988788991581654">"या प्रिंटर विषयी अधिक माहिती"</string>
     <string name="notification_channel_progress" msgid="872788690775721436">"प्रिंट कार्ये चालवणे"</string>
     <string name="notification_channel_failure" msgid="9042250774797916414">"अयशस्वी प्रिंट कार्ये"</string>
-    <string name="could_not_create_file" msgid="3425025039427448443">"फाईल तयार करणेे शक्य झाले नाही"</string>
+    <string name="could_not_create_file" msgid="3425025039427448443">"फाइल तयार करणेे शक्य झाले नाही"</string>
     <string name="print_services_disabled_toast" msgid="9089060734685174685">"काही प्रिंट सेवा अक्षम केल्या आहेत"</string>
     <string name="print_searching_for_printers" msgid="6550424555079932867">"प्रिंटर शोधत आहे"</string>
     <string name="print_no_print_services" msgid="8561247706423327966">"कोणत्याही प्रिंट सेवा सक्षम केलेल्या नाहीत"</string>
diff --git a/packages/PrintSpooler/res/values-uz/strings.xml b/packages/PrintSpooler/res/values-uz/strings.xml
index ea0a6ea..dbab903 100644
--- a/packages/PrintSpooler/res/values-uz/strings.xml
+++ b/packages/PrintSpooler/res/values-uz/strings.xml
@@ -94,7 +94,7 @@
     <item msgid="2762241247228983754">"Rang"</item>
   </string-array>
   <string-array name="duplex_mode_labels">
-    <item msgid="3882302912790928315">"Yo‘q"</item>
+    <item msgid="3882302912790928315">"Hech qanday"</item>
     <item msgid="7296563835355641719">"Uzun tomoni"</item>
     <item msgid="79513688117503758">"Qisqa tomoni"</item>
   </string-array>
diff --git a/packages/SettingsLib/HelpUtils/res/values-ar/strings.xml b/packages/SettingsLib/HelpUtils/res/values-ar/strings.xml
index 7ab3abc..5b12fc5 100644
--- a/packages/SettingsLib/HelpUtils/res/values-ar/strings.xml
+++ b/packages/SettingsLib/HelpUtils/res/values-ar/strings.xml
@@ -17,5 +17,5 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="help_feedback_label" msgid="7106780063063027882">"المساعدة والتعليقات"</string>
+    <string name="help_feedback_label" msgid="7106780063063027882">"المساعدة والملاحظات والآراء"</string>
 </resources>
diff --git a/packages/SettingsLib/HelpUtils/res/values-es/strings.xml b/packages/SettingsLib/HelpUtils/res/values-es/strings.xml
index 97ff5ef..97e3559 100644
--- a/packages/SettingsLib/HelpUtils/res/values-es/strings.xml
+++ b/packages/SettingsLib/HelpUtils/res/values-es/strings.xml
@@ -17,5 +17,5 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="help_feedback_label" msgid="7106780063063027882">"Ayuda y sugerencias"</string>
+    <string name="help_feedback_label" msgid="7106780063063027882">"Ayuda y comentarios"</string>
 </resources>
diff --git a/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_0.xml b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_0.xml
new file mode 100644
index 0000000..16e9190
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_0.xml
@@ -0,0 +1,31 @@
+<!--
+    Copyright (C) 2020 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT 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="25.50"
+    android:viewportHeight="25.50">
+    <group
+        android:translateX="0.77"
+        android:translateY="0.23" >
+        <path
+            android:pathData="M14,12h6.54l3.12,-3.89c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3C6.44,3 2.33,5.36 0.56,6.57C0.05,6.92 -0.05,7.63 0.33,8.11L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L14,20.13V12z"
+            android:fillColor="#FFFFFF"/>
+        <path
+            android:pathData="M22.71,15.67l-1.83,1.83l1.83,1.83c0.38,0.38 0.38,1 0,1.38v0c-0.38,0.38 -1,0.39 -1.38,0l-1.83,-1.83l-1.83,1.83c-0.38,0.38 -1,0.38 -1.38,0l-0.01,-0.01c-0.38,-0.38 -0.38,-1 0,-1.38l1.83,-1.83l-1.82,-1.82c-0.38,-0.38 -0.38,-1 0,-1.38l0.01,-0.01c0.38,-0.38 1,-0.38 1.38,0l1.82,1.82l1.82,-1.82c0.38,-0.38 1,-0.38 1.38,0l0,0C23.09,14.67 23.09,15.29 22.71,15.67z"
+            android:fillColor="#FFFFFF"/>
+    </group>
+</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_1.xml b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_1.xml
new file mode 100644
index 0000000..4c338c9
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_1.xml
@@ -0,0 +1,27 @@
+<!--
+    Copyright (C) 2020 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT 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.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09,-2.08L20.59,22L22,20.59l-2.08,-2.09L22,16.41z"/>
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M12,2.01C7.25,2.01 2.97,4.09 0,7.4L7.582,16.625C7.582,16.627 7.58,16.629 7.58,16.631L11.99,22L12,22L13,20.789L13,17.641L13,13.119C12.68,13.039 12.34,13 12,13C10.601,13 9.351,13.64 8.531,14.639L2.699,7.539C5.269,5.279 8.58,4.01 12,4.01C15.42,4.01 18.731,5.279 21.301,7.539L16.811,13L19.4,13L24,7.4C21.03,4.09 16.75,2.01 12,2.01z"/>
+</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_2.xml b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_2.xml
new file mode 100644
index 0000000..79037db
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_2.xml
@@ -0,0 +1,27 @@
+<!--
+    Copyright (C) 2020 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT 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.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09,-2.08L20.59,22L22,20.59l-2.08,-2.09L22,16.41z"/>
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M12,2C7.25,2 2.97,4.081 0,7.391L12,22L13,20.779L13,17.631L13,13L16.801,13L18,13L19.391,13L24,7.391C21.03,4.081 16.75,2 12,2zM12,4C14.747,4 17.423,4.819 19.701,6.313C20.259,6.678 20.795,7.085 21.301,7.529L17.389,12.287C16.029,10.868 14.119,9.99 12,9.99C9.88,9.99 7.969,10.869 6.609,12.289L2.699,7.529C5.269,5.269 8.58,4 12,4z"/>
+</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_3.xml b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_3.xml
new file mode 100644
index 0000000..21ad128
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_3.xml
@@ -0,0 +1,27 @@
+<!--
+    Copyright (C) 2020 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT 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.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09,-2.08L20.59,22L22,20.59l-2.08,-2.09L22,16.41z"/>
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M12,2C7.25,2 2.97,4.081 0,7.391L3.301,11.41L12,22L13,20.779L13,17.631L13,13L16.801,13L19.391,13L20.699,11.41C20.699,11.409 20.698,11.409 20.697,11.408L24,7.391C21.03,4.081 16.75,2 12,2zM12,4C15.42,4 18.731,5.269 21.301,7.529L19.35,9.9C17.43,8.1 14.86,6.99 12,6.99C9.14,6.99 6.57,8.1 4.65,9.9C4.65,9.901 4.649,9.902 4.648,9.902L2.699,7.529C5.269,5.269 8.58,4 12,4z"/>
+</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_4.xml b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_4.xml
new file mode 100644
index 0000000..2ec5ba3
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_show_x_wifi_signal_4.xml
@@ -0,0 +1,27 @@
+<!--
+    Copyright (C) 2020 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT 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.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M12,2C7.25,2 2.97,4.08 0,7.39L12,22l1,-1.22V13h6.39L24,7.39C21.03,4.08 16.75,2 12,2z"/>
+    <path
+        android:fillColor="@android:color/white"
+        android:pathData="M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09,-2.08L20.59,22L22,20.59l-2.08,-2.09L22,16.41z"/>
+</vector>
diff --git a/packages/SettingsLib/res/values-af/arrays.xml b/packages/SettingsLib/res/values-af/arrays.xml
index 8a02c77..93f00e7 100644
--- a/packages/SettingsLib/res/values-af/arrays.xml
+++ b/packages/SettingsLib/res/values-af/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Geaktiveer"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (verstek)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (verstek)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index 704d264..6751fa4 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Wys Bluetooth-toestelle sonder name"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Deaktiveer absolute volume"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Aktiveer Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Verbeterde konnektiwiteit"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP-weergawe"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Kies Bluetooth AVRCP-weergawe"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP-weergawe"</string>
diff --git a/packages/SettingsLib/res/values-am/arrays.xml b/packages/SettingsLib/res/values-am/arrays.xml
index 6a9334e..18696b1 100644
--- a/packages/SettingsLib/res/values-am/arrays.xml
+++ b/packages/SettingsLib/res/values-am/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ነቅቷል"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ነባሪ)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ነባሪ)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index 585924d..470e780 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"የብሉቱዝ መሣሪያዎችን ያለ ስሞች አሳይ"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ፍጹማዊ ድምፅን አሰናክል"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorscheን አንቃ"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"የተሻሻለ ተገናኝነት"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"የብሉቱዝ AVRCP ስሪት"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"የብሉቱዝ AVRCP ስሪት ይምረጡ"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"የብሉቱዝ MAP ስሪት"</string>
diff --git a/packages/SettingsLib/res/values-ar/arrays.xml b/packages/SettingsLib/res/values-ar/arrays.xml
index bb97618..d09b50e 100644
--- a/packages/SettingsLib/res/values-ar/arrays.xml
+++ b/packages/SettingsLib/res/values-ar/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"مفعّل"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"‏AVRCP 1.4 (التلقائي)"</item>
+    <item msgid="6603880723315236832">"‏AVRCP 1.5 (التلقائي)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index 08e9224..8c0814b 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -85,7 +85,7 @@
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"المكالمات الهاتفية"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"نقل الملف"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"جهاز الإرسال"</string>
-    <string name="bluetooth_profile_pan" msgid="1006235139308318188">"الدخول إلى الإنترنت"</string>
+    <string name="bluetooth_profile_pan" msgid="1006235139308318188">"استخدام الإنترنت"</string>
     <string name="bluetooth_profile_pbap" msgid="7064307749579335765">"مشاركة جهة الاتصال"</string>
     <string name="bluetooth_profile_pbap_summary" msgid="2955819694801952056">"استخدام مع مشاركة جهة الاتصال"</string>
     <string name="bluetooth_profile_pan_nap" msgid="7871974753822470050">"مشاركة اتصال الإنترنت"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"عرض أجهزة البلوتوث بدون أسماء"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"إيقاف مستوى الصوت المطلق"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"‏تفعيل Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"إمكانية اتصال محسّن"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"‏إصدار Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"‏اختيار إصدار Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"‏إصدار Bluetooth MAP"</string>
@@ -515,7 +514,7 @@
     <string name="media_transfer_this_device_name" msgid="2716555073132169240">"مكبر صوت الهاتف"</string>
     <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="help_label" msgid="3528360748637781274">"المساعدة والملاحظات والآراء"</string>
     <string name="storage_category" msgid="2287342585424631813">"مساحة التخزين"</string>
     <string name="shared_data_title" msgid="1017034836800864953">"البيانات المشتركة"</string>
     <string name="shared_data_summary" msgid="5516326713822885652">"عرض البيانات المشتركة وتعديلها"</string>
diff --git a/packages/SettingsLib/res/values-as/arrays.xml b/packages/SettingsLib/res/values-as/arrays.xml
index 503c13e..b619d3b 100644
--- a/packages/SettingsLib/res/values-as/arrays.xml
+++ b/packages/SettingsLib/res/values-as/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"সক্ষম কৰা আছে"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP ১.৪ (ডিফ’ল্ট)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ডিফ’ল্ট)"</item>
     <item msgid="1637054408779685086">"AVRCP ১.৩"</item>
-    <item msgid="8317734704797203949">"AVRCP ১.৫"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP ১.৬"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp১৩"</item>
-    <item msgid="4398977131424970917">"avrcp১৫"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp১৬"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml
index e0455cb..f993dba 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"নামবিহীন ব্লুটুথ ডিভাইচসমূহ দেখুৱাওক"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"পূৰ্ণ মাত্ৰাৰ ভলিউম অক্ষম কৰক"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche সক্ষম কৰক"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"উন্নত সংযোগ"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ব্লুটুথ AVRCP সংস্কৰণ"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ব্লুটুথ AVRCP সংস্কৰণ বাছনি কৰক"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ব্লুটুথ MAP সংস্কৰণ"</string>
diff --git a/packages/SettingsLib/res/values-az/arrays.xml b/packages/SettingsLib/res/values-az/arrays.xml
index 005bdf7..55ec9d8 100644
--- a/packages/SettingsLib/res/values-az/arrays.xml
+++ b/packages/SettingsLib/res/values-az/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Aktivdir"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Defolt)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Defolt)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index 6565d53..6a50661 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Bluetooth cihazlarını adsız göstərin"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Mütləq səs həcmi deaktiv edin"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche\'ni aktiv edin"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Təkmilləşdirilmiş Bağlantı"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP Versiya"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP Versiyasını seçin"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP Versiyası"</string>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/arrays.xml b/packages/SettingsLib/res/values-b+sr+Latn/arrays.xml
index 10c0d6c..2926067 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/arrays.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Omogućeno"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (podrazumevano)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (podrazumevano)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index 3ced29b..3f8c9fa 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -27,7 +27,7 @@
     <string name="wifi_disabled_generic" msgid="2651916945380294607">"Onemogućeno"</string>
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"IP konfiguracija je otkazala"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"Nije povezano zbog lošeg kvaliteta mreže"</string>
-    <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"Wi-Fi veza je otkazala"</string>
+    <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"WiFi veza je otkazala"</string>
     <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problem sa potvrdom identiteta"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"Povezivanje nije uspelo"</string>
     <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"Povezivanje sa „<xliff:g id="AP_NAME">%1$s</xliff:g>“ nije uspelo"</string>
@@ -131,12 +131,12 @@
     <string name="bluetooth_hearingaid_right_pairing_message" msgid="2655347721696331048">"Uparivanje desnog slušnog aparata…"</string>
     <string name="bluetooth_hearingaid_left_battery_level" msgid="7375621694748104876">"Levi – nivo baterije je <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
     <string name="bluetooth_hearingaid_right_battery_level" msgid="1850094448499089312">"Desni – nivo baterije je <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
-    <string name="accessibility_wifi_off" msgid="1195445715254137155">"Wi-Fi je isključen."</string>
-    <string name="accessibility_no_wifi" msgid="5297119459491085771">"Wi-Fi veza je prekinuta."</string>
-    <string name="accessibility_wifi_one_bar" msgid="6025652717281815212">"Wi-Fi signal ima jednu crtu."</string>
-    <string name="accessibility_wifi_two_bars" msgid="687800024970972270">"Wi-Fi signal ima dve crte."</string>
-    <string name="accessibility_wifi_three_bars" msgid="779895671061950234">"Wi-Fi signal ima tri crte."</string>
-    <string name="accessibility_wifi_signal_full" msgid="7165262794551355617">"Wi-Fi signal je najjači."</string>
+    <string name="accessibility_wifi_off" msgid="1195445715254137155">"WiFi je isključen."</string>
+    <string name="accessibility_no_wifi" msgid="5297119459491085771">"WiFi veza je prekinuta."</string>
+    <string name="accessibility_wifi_one_bar" msgid="6025652717281815212">"WiFi signal ima jednu crtu."</string>
+    <string name="accessibility_wifi_two_bars" msgid="687800024970972270">"WiFi signal ima dve crte."</string>
+    <string name="accessibility_wifi_three_bars" msgid="779895671061950234">"WiFi signal ima tri crte."</string>
+    <string name="accessibility_wifi_signal_full" msgid="7165262794551355617">"WiFi signal je najjači."</string>
     <string name="accessibility_wifi_security_type_none" msgid="162352241518066966">"Otvorena mreža"</string>
     <string name="accessibility_wifi_security_type_secured" msgid="2399774097343238942">"Bezbedna mreža"</string>
     <string name="process_kernel_label" msgid="950292573930336765">"Android OS"</string>
@@ -232,7 +232,7 @@
     <string name="adb_wireless_ip_addr_preference_title" msgid="8335132107715311730">"IP adresa i port"</string>
     <string name="adb_wireless_qrcode_pairing_title" msgid="1906409667944674707">"Skeniraj QR kôd"</string>
     <string name="adb_wireless_qrcode_pairing_description" msgid="6014121407143607851">"Uparite uređaj pomoću Wi‑Fi mreže tako što ćete skenirati QR kôd"</string>
-    <string name="adb_wireless_no_network_msg" msgid="2365795244718494658">"Povežite se na Wi-Fi mrežu"</string>
+    <string name="adb_wireless_no_network_msg" msgid="2365795244718494658">"Povežite se na WiFi mrežu"</string>
     <string name="keywords_adb_wireless" msgid="6507505581882171240">"adb, otklanjanje grešaka, programer"</string>
     <string name="bugreport_in_power" msgid="8664089072534638709">"Prečica za izveštaj o greškama"</string>
     <string name="bugreport_in_power_summary" msgid="1885529649381831775">"Prikaži dugme u meniju napajanja za pravljenje izveštaja o greškama"</string>
@@ -250,14 +250,13 @@
     <string name="debug_networking_category" msgid="6829757985772659599">"Umrežavanje"</string>
     <string name="wifi_display_certification" msgid="1805579519992520381">"Sertifikacija bežičnog ekrana"</string>
     <string name="wifi_verbose_logging" msgid="1785910450009679371">"Omogući detaljniju evidenciju za Wi‑Fi"</string>
-    <string name="wifi_scan_throttling" msgid="2985624788509913617">"Usporavanje Wi-Fi skeniranja"</string>
+    <string name="wifi_scan_throttling" msgid="2985624788509913617">"Usporavanje WiFi skeniranja"</string>
     <string name="wifi_enhanced_mac_randomization" msgid="5437378364995776979">"Nasumično MAC razvrstavanje po Wi‑Fi‑ju"</string>
     <string name="mobile_data_always_on" msgid="8275958101875563572">"Mobilni podaci su uvek aktivni"</string>
     <string name="tethering_hardware_offload" msgid="4116053719006939161">"Hardversko ubrzanje privezivanja"</string>
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Prikaži Bluetooth uređaje bez naziva"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Onemogući glavno podešavanje jačine zvuka"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Omogući Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Poboljšano povezivanje"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Verzija Bluetooth AVRCP-a"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Izaberite verziju Bluetooth AVRCP-a"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Verzija Bluetooth MAP-a"</string>
diff --git a/packages/SettingsLib/res/values-be/arrays.xml b/packages/SettingsLib/res/values-be/arrays.xml
index e05fd60..af3a161 100644
--- a/packages/SettingsLib/res/values-be/arrays.xml
+++ b/packages/SettingsLib/res/values-be/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Уключана"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (стандартная)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (стандартная)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index 7a83b3b..db61b039 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -81,7 +81,7 @@
     <string name="bluetooth_battery_level" msgid="2893696778200201555">"Узровень зараду: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
     <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"Л: акумулятар: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g>, П: акумулятар: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g>"</string>
     <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"Уключана"</string>
-    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Аўдыё медыяпрылады"</string>
+    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Аўдыя медыяфайлаў"</string>
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"Тэлефонныя выклікі"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"Перадача файлаў"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"Прылада ўводу"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Паказваць прылады Bluetooth без назваў"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Адключыць абсалютны гук"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Уключыць Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Палепшанае падключэнне"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Версія Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Выбраць версію Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Версія Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/res/values-bg/arrays.xml b/packages/SettingsLib/res/values-bg/arrays.xml
index a071baf..1b25bed 100644
--- a/packages/SettingsLib/res/values-bg/arrays.xml
+++ b/packages/SettingsLib/res/values-bg/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Активирано"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (по подразбиране)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (основно)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index d042c0f..747cb26 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Показване на устройствата с Bluetooth без имена"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Деактивиране на пълната сила на звука"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Активиране на Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Подобрена свързаност"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Версия на AVRCP за Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Избиране на версия на AVRCP за Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"MAP версия за Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-bn/arrays.xml b/packages/SettingsLib/res/values-bn/arrays.xml
index b19cde4..34cbc8f 100644
--- a/packages/SettingsLib/res/values-bn/arrays.xml
+++ b/packages/SettingsLib/res/values-bn/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"চালু করা আছে"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ডিফল্ট)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ডিফল্ট)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index dbec19b..e99d63e 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -211,9 +211,9 @@
     <string name="adb_wireless_error" msgid="721958772149779856">"সমস্যা"</string>
     <string name="adb_wireless_settings" msgid="2295017847215680229">"ওয়্যারলেস ডিবাগিং"</string>
     <string name="adb_wireless_list_empty_off" msgid="1713707973837255490">"কোন কোন ডিভাইস উপলভ্য আছে তা দেখে নিয়ে ব্যবহার করার জন্য, ওয়্যারলেস ডিবাগিং চালু করুন"</string>
-    <string name="adb_pair_method_qrcode_title" msgid="6982904096137468634">"QR কোড ব্যবহার করে ডিভাইস যোগ করুন"</string>
+    <string name="adb_pair_method_qrcode_title" msgid="6982904096137468634">"QR কোড ব্যবহার করে ডিভাইসের সাথে পেয়ার করুন"</string>
     <string name="adb_pair_method_qrcode_summary" msgid="7130694277228970888">"QR কোড স্ক্যানার ব্যবহার করে নতুন ডিভাইস যোগ করুন"</string>
-    <string name="adb_pair_method_code_title" msgid="1122590300445142904">"যোগ করার কোড ব্যবহার করে ডিভাইস যোগ করুন"</string>
+    <string name="adb_pair_method_code_title" msgid="1122590300445142904">"পেয়ারিং কোড ব্যবহার করে ডিভাইসের সাথে পেয়ার করুন"</string>
     <string name="adb_pair_method_code_summary" msgid="6370414511333685185">"ছয় সংখ্যার কোড ব্যবহার করে নতুন ডিভাইস যোগ করুন"</string>
     <string name="adb_paired_devices_title" msgid="5268997341526217362">"যোগ করা ডিভাইস"</string>
     <string name="adb_wireless_device_connected_summary" msgid="3039660790249148713">"এখন কানেক্ট রয়েছে"</string>
@@ -222,16 +222,16 @@
     <string name="adb_device_fingerprint_title_format" msgid="291504822917843701">"ডিভাইসে আঙ্গুলের ছাপ: <xliff:g id="FINGERPRINT_PARAM">%1$s</xliff:g>"</string>
     <string name="adb_wireless_connection_failed_title" msgid="664211177427438438">"কানেক্ট করা যায়নি"</string>
     <string name="adb_wireless_connection_failed_message" msgid="9213896700171602073">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>টি সঠিক নেটওয়ার্কে কানেক্ট আছে কিনা দেখে নিন"</string>
-    <string name="adb_pairing_device_dialog_title" msgid="7141739231018530210">"ডিভাইসের সাথে যোগ করুন"</string>
-    <string name="adb_pairing_device_dialog_pairing_code_label" msgid="3639239786669722731">"ওয়াই-ফাই যোগ করার কোড"</string>
-    <string name="adb_pairing_device_dialog_failed_title" msgid="3426758947882091735">"যোগ করা যায়নি"</string>
+    <string name="adb_pairing_device_dialog_title" msgid="7141739231018530210">"ডিভাইসের সাথে পেয়ার করুন"</string>
+    <string name="adb_pairing_device_dialog_pairing_code_label" msgid="3639239786669722731">"ওয়াই-ফাইয়ের সাথে পেয়ার করার কোড"</string>
+    <string name="adb_pairing_device_dialog_failed_title" msgid="3426758947882091735">"পেয়ার করা যায়নি"</string>
     <string name="adb_pairing_device_dialog_failed_msg" msgid="6611097519661997148">"ডিভাইসটি একই নেটওয়ার্কে কানেক্ট আছে কিনা দেখে নিন।"</string>
-    <string name="adb_wireless_qrcode_summary" msgid="8051414549011801917">"QR কোড স্ক্যান করে ওয়াই-ফাই ব্যবহার করে ডিভাইস যোগ করুন"</string>
+    <string name="adb_wireless_qrcode_summary" msgid="8051414549011801917">"QR কোড স্ক্যান করে ওয়াই-ফাই ব্যবহার করে ডিভাইসের সাথে পেয়ার করুন"</string>
     <string name="adb_wireless_verifying_qrcode_text" msgid="6123192424916029207">"ডিভাইস যোগ করা হচ্ছে…"</string>
     <string name="adb_qrcode_pairing_device_failed_msg" msgid="6936292092592914132">"ডিভাইস যোগ করা যায়নি। এটি দুটি কারণে হয়ে থাকে - QR কোডটি সঠিক নয় বা ডিভাইসটি একই নেটওয়ার্কে কানেক্ট করা নেই।"</string>
     <string name="adb_wireless_ip_addr_preference_title" msgid="8335132107715311730">"IP অ্যাড্রেস ও পোর্ট"</string>
     <string name="adb_wireless_qrcode_pairing_title" msgid="1906409667944674707">"QR কোড স্ক্যান করুন"</string>
-    <string name="adb_wireless_qrcode_pairing_description" msgid="6014121407143607851">"QR কোড স্ক্যান করে ওয়াই-ফাইয়ের সাহায্যে ডিভাইস যোগ করুন"</string>
+    <string name="adb_wireless_qrcode_pairing_description" msgid="6014121407143607851">"QR কোড স্ক্যান করে ওয়াই-ফাই ব্যবহার করে ডিভাইসের সাথে পেয়ার করুন"</string>
     <string name="adb_wireless_no_network_msg" msgid="2365795244718494658">"একটি ওয়াই-ফাই নেটওয়ার্কের সাথে কানেক্ট করুন"</string>
     <string name="keywords_adb_wireless" msgid="6507505581882171240">"adb, debug, dev"</string>
     <string name="bugreport_in_power" msgid="8664089072534638709">"ত্রুটি প্রতিবেদনের শর্টকাট"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"নামহীন ব্লুটুথ ডিভাইসগুলি দেখুন"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"চূড়ান্ত ভলিউম অক্ষম করুন"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche ফিচার চালু করুন"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"কানেক্টিভিটি উন্নত করা হয়েছে"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ব্লুটুথ AVRCP ভার্সন"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ব্লুটুথ AVRCP ভার্সন বেছে নিন"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ব্লুটুথ MAP ভার্সন"</string>
diff --git a/packages/SettingsLib/res/values-bs/arrays.xml b/packages/SettingsLib/res/values-bs/arrays.xml
index dc33bb0e..6d2f1f3 100644
--- a/packages/SettingsLib/res/values-bs/arrays.xml
+++ b/packages/SettingsLib/res/values-bs/arrays.xml
@@ -27,7 +27,7 @@
     <item msgid="8356618438494652335">"Autentifikacija…"</item>
     <item msgid="2837871868181677206">"Dobivanje IP adrese…"</item>
     <item msgid="4613015005934755724">"Povezano"</item>
-    <item msgid="3763530049995655072">"Suspendirano"</item>
+    <item msgid="3763530049995655072">"Obustavljeno"</item>
     <item msgid="7852381437933824454">"Prekidanje veze…"</item>
     <item msgid="5046795712175415059">"Isključen"</item>
     <item msgid="2473654476624070462">"Neuspješno"</item>
@@ -41,7 +41,7 @@
     <item msgid="3028983857109369308">"Autentifikacija s mrežom <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
     <item msgid="4287401332778341890">"Dobivanje IP adrese iz mreže <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
     <item msgid="1043944043827424501">"Povezano s mrežom <xliff:g id="NETWORK_NAME">%1$s</xliff:g>"</item>
-    <item msgid="7445993821842009653">"Suspendirano"</item>
+    <item msgid="7445993821842009653">"Obustavljeno"</item>
     <item msgid="1175040558087735707">"Prekidanje veze s mrežom <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
     <item msgid="699832486578171722">"Isključen"</item>
     <item msgid="522383512264986901">"Neuspješno"</item>
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Omogućeno"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (zadano)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (zadano)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index f26fe9d..671461b 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Prikaži Bluetooth uređaje bez naziva"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Onemogući apsolutnu jačinu zvuka"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Omogući Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Poboljšana povezivost"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP verzija"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Odaberite Bluetooth AVRCP verziju"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP verzija"</string>
@@ -474,7 +473,7 @@
     <string name="screen_zoom_summary_extremely_large" msgid="1438045624562358554">"Najveći"</string>
     <string name="screen_zoom_summary_custom" msgid="3468154096832912210">"Prilagodi (<xliff:g id="DENSITYDPI">%d</xliff:g>)"</string>
     <string name="content_description_menu_button" msgid="6254844309171779931">"Meni"</string>
-    <string name="retail_demo_reset_message" msgid="5392824901108195463">"Unesite lozinku da izvršite vraćanje na fabričke postavke u načinu demonstracije"</string>
+    <string name="retail_demo_reset_message" msgid="5392824901108195463">"Unesite lozinku da izvršite vraćanje na fabričke postavke u načinu rada za demonstraciju"</string>
     <string name="retail_demo_reset_next" msgid="3688129033843885362">"Naprijed"</string>
     <string name="retail_demo_reset_title" msgid="1866911701095959800">"Potrebna je lozinka"</string>
     <string name="active_input_method_subtypes" msgid="4232680535471633046">"Aktivne metode unosa"</string>
diff --git a/packages/SettingsLib/res/values-ca/arrays.xml b/packages/SettingsLib/res/values-ca/arrays.xml
index 950e469..4b24637 100644
--- a/packages/SettingsLib/res/values-ca/arrays.xml
+++ b/packages/SettingsLib/res/values-ca/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Activat"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (predeterminada)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (predeterminada)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index 3ca9d52..b040958 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -66,7 +66,7 @@
     <string name="bluetooth_disconnected" msgid="7739366554710388701">"Desconnectat"</string>
     <string name="bluetooth_disconnecting" msgid="7638892134401574338">"S\'està desconnectant..."</string>
     <string name="bluetooth_connecting" msgid="5871702668260192755">"S\'està connectant…"</string>
-    <string name="bluetooth_connected" msgid="8065345572198502293">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connectat"</string>
+    <string name="bluetooth_connected" msgid="8065345572198502293">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> Connectat"</string>
     <string name="bluetooth_pairing" msgid="4269046942588193600">"S\'està vinculant..."</string>
     <string name="bluetooth_connected_no_headset" msgid="2224101138659967604">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connectat (sense accés al telèfon)"</string>
     <string name="bluetooth_connected_no_a2dp" msgid="8566874395813947092">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connectat (sense contingut multimèdia)"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Mostra els dispositius Bluetooth sense el nom"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Desactiva el volum absolut"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Activa Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Connectivitat millorada"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versió AVRCP de Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Selecciona la versió AVRCP de Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versió MAP de Bluetooth"</string>
@@ -532,7 +531,7 @@
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"Perfil restringit"</string>
     <string name="user_add_user_title" msgid="5457079143694924885">"Vols afegir un usuari nou?"</string>
     <string name="user_add_user_message_long" msgid="1527434966294733380">"Pots compartir aquest dispositiu amb altres persones creant usuaris addicionals. Cada usuari té el seu propi espai, que pot personalitzar amb aplicacions i fons de pantalla, entre d\'altres. Els usuaris també poden ajustar opcions de configuració del dispositiu, com ara la Wi-Fi, que afecten els altres usuaris.\n\nQuan afegeixis un usuari nou, haurà de configurar el seu espai.\n\nTots els usuaris poden actualitzar les aplicacions de la resta. És possible que la configuració i els serveis d\'accessibilitat no es transfereixin a l\'usuari nou."</string>
-    <string name="user_add_user_message_short" msgid="3295959985795716166">"Quan s\'afegeix un usuari nou, aquest usuari ha de configurar el seu espai.\n\nQualsevol usuari pot actualitzar les aplicacions dels altres usuaris."</string>
+    <string name="user_add_user_message_short" msgid="3295959985795716166">"Quan s\'afegeix un usuari nou, aquesta persona ha de configurar el seu espai.\n\nQualsevol usuari pot actualitzar les aplicacions dels altres usuaris."</string>
     <string name="user_setup_dialog_title" msgid="8037342066381939995">"Vols configurar l\'usuari ara?"</string>
     <string name="user_setup_dialog_message" msgid="269931619868102841">"Assegura\'t que la persona estigui disponible per accedir al dispositiu i configurar el seu espai."</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Vols configurar el perfil ara?"</string>
diff --git a/packages/SettingsLib/res/values-cs/arrays.xml b/packages/SettingsLib/res/values-cs/arrays.xml
index 16358ee..27dce16 100644
--- a/packages/SettingsLib/res/values-cs/arrays.xml
+++ b/packages/SettingsLib/res/values-cs/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Zapnuto"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (výchozí)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (výchozí)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index a5532e0..0aef99f 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Zobrazovat zařízení Bluetooth bez názvů"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Zakázat absolutní hlasitost"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Zapnout funkci Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Lepší připojování"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Verze profilu Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Vyberte verzi profilu Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Verze MAP pro Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-da/arrays.xml b/packages/SettingsLib/res/values-da/arrays.xml
index b3ce257..efe4150 100644
--- a/packages/SettingsLib/res/values-da/arrays.xml
+++ b/packages/SettingsLib/res/values-da/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Aktiveret"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (standard)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (standard)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 8ca22d7..98068cb 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Vis Bluetooth-enheder uden navne"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Deaktiver absolut lydstyrke"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Aktivér Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Enhanced Connectivity"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"AVRCP-version for Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Vælg AVRCP-version for Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"MAP-version for Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-de/arrays.xml b/packages/SettingsLib/res/values-de/arrays.xml
index fdd799c..e7c4887 100644
--- a/packages/SettingsLib/res/values-de/arrays.xml
+++ b/packages/SettingsLib/res/values-de/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Aktiviert"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Standard)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Standard)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index 6b0ae2e2..0837ad3 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Bluetooth-Geräte ohne Namen anzeigen"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Absolute Lautstärkeregelung deaktivieren"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Bluetooth-Gabeldorsche aktivieren"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Verbesserte Konnektivität"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP-Version"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP-Version auswählen"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP-Version"</string>
diff --git a/packages/SettingsLib/res/values-el/arrays.xml b/packages/SettingsLib/res/values-el/arrays.xml
index 79f631f..838ca79 100644
--- a/packages/SettingsLib/res/values-el/arrays.xml
+++ b/packages/SettingsLib/res/values-el/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Ενεργοποιήθηκε"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Προεπιλογή)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Προεπιλογή)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index 4d7c882..1f9d977 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Εμφάνιση συσκευών Bluetooth χωρίς ονόματα"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Απενεργοποίηση απόλυτης έντασης"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Ενεργοποίηση Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Βελτιωμένη συνδεσιμότητα"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Έκδοση AVRCP Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Επιλογή έκδοσης AVRCP Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Έκδοση MAP Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-en-rAU/arrays.xml b/packages/SettingsLib/res/values-en-rAU/arrays.xml
index 97e598e..6569f18 100644
--- a/packages/SettingsLib/res/values-en-rAU/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rAU/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Enabled"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Default)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Default)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index cc3b2aa..abe61a9 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Show Bluetooth devices without names"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Disable absolute volume"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Enable Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Enhanced connectivity"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP version"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Select Bluetooth AVRCP Version"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP version"</string>
diff --git a/packages/SettingsLib/res/values-en-rCA/arrays.xml b/packages/SettingsLib/res/values-en-rCA/arrays.xml
index 97e598e..6569f18 100644
--- a/packages/SettingsLib/res/values-en-rCA/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rCA/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Enabled"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Default)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Default)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index a9f039a..959ad46 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Show Bluetooth devices without names"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Disable absolute volume"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Enable Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Enhanced connectivity"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP version"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Select Bluetooth AVRCP Version"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP version"</string>
diff --git a/packages/SettingsLib/res/values-en-rGB/arrays.xml b/packages/SettingsLib/res/values-en-rGB/arrays.xml
index 97e598e..6569f18 100644
--- a/packages/SettingsLib/res/values-en-rGB/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rGB/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Enabled"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Default)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Default)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index cc3b2aa..abe61a9 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Show Bluetooth devices without names"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Disable absolute volume"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Enable Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Enhanced connectivity"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP version"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Select Bluetooth AVRCP Version"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP version"</string>
diff --git a/packages/SettingsLib/res/values-en-rIN/arrays.xml b/packages/SettingsLib/res/values-en-rIN/arrays.xml
index 97e598e..6569f18 100644
--- a/packages/SettingsLib/res/values-en-rIN/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rIN/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Enabled"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Default)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Default)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index cc3b2aa..abe61a9 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Show Bluetooth devices without names"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Disable absolute volume"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Enable Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Enhanced connectivity"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP version"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Select Bluetooth AVRCP Version"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP version"</string>
diff --git a/packages/SettingsLib/res/values-en-rXC/arrays.xml b/packages/SettingsLib/res/values-en-rXC/arrays.xml
index eca7c75..cb702fe 100644
--- a/packages/SettingsLib/res/values-en-rXC/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rXC/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‏‏‎‏‎‎‏‎‎‎‏‎‏‏‎‏‏‎‏‏‎‏‏‏‏‎‏‏‎‏‏‎‏‎‏‏‏‏‎‏‎‏‏‏‏‏‎‏‎‏‏‏‎‎‏‎‎‎‎‎Enabled‎‏‎‎‏‎"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‎‏‎‏‏‎‏‏‎‎‏‎‎‏‏‎‏‎‎‏‏‏‎‎‏‎‎‎‎‎‏‎‏‏‎‎‏‏‎‏‎‏‏‎‏‏‏‏‎‎‎‎‎AVRCP 1.4 (Default)‎‏‎‎‏‎"</item>
+    <item msgid="6603880723315236832">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‏‎‏‏‏‎‏‎‎‏‎‏‏‎‏‏‎‎‏‎‏‎‎‎‎‏‏‏‎‏‏‎‏‏‎‎‎‏‎‎‎‎‎‏‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‎AVRCP 1.5 (Default)‎‏‎‎‏‎"</item>
     <item msgid="1637054408779685086">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‎‏‏‎‏‎‏‏‎‏‏‏‏‏‏‏‏‏‎‎‎‏‎‎‏‏‏‏‏‎‏‏‎‎‎‏‎‏‎‎‏‏‎‎‏‏‎‏‏‏‎‎‏‏‎‏‏‏‏‎‎AVRCP 1.3‎‏‎‎‏‎"</item>
-    <item msgid="8317734704797203949">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‎‏‏‎‏‏‎‏‏‏‎‏‎‎‎‎‏‏‏‏‎‏‎‎‏‎‏‎‎‎‎‏‏‏‏‎‏‏‎‎‎‎‎‎‎‏‏‏‏‎‏‏‏‏‎‏‏‎‏‎AVRCP 1.5‎‏‎‎‏‎"</item>
+    <item msgid="5896162189744596291">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‎‎‎‏‏‏‎‏‎‎‏‏‎‏‏‎‎‎‎‎‎‏‎‎‎‏‎‏‏‎‏‏‏‎‎‏‏‏‎‏‎‎‎‎‏‏‏‎‎‏‎‏‎‏‎‎‎‎‏‏‎AVRCP 1.4‎‏‎‎‏‎"</item>
     <item msgid="7556896992111771426">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‎‎‏‏‎‏‏‏‏‏‎‏‏‏‏‏‎‏‏‏‎‎‎‏‏‎‏‎‏‏‎‎‏‏‎‎‎‎‏‎‏‎‎‎‏‏‏‏‏‏‎‎‏‎‎‎‏‎‎AVRCP 1.6‎‏‎‎‏‎"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‏‏‎‎‎‏‏‎‏‏‎‎‏‏‏‎‏‎‏‏‏‏‏‏‏‏‏‏‏‎‎‎‏‏‎‎‎‏‎‎‎‏‏‎‎‏‏‏‎‏‏‏‎‎‏‎‎‏‏‎‎avrcp14‎‏‎‎‏‎"</item>
+    <item msgid="4041937689950033942">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‏‏‎‎‎‎‎‎‏‎‏‏‏‏‏‎‏‏‎‎‎‏‏‏‎‏‎‎‏‏‏‏‏‎‏‎‏‏‎‏‏‏‏‎‎‎‎‎‏‏‎‎‎‎‎‎‏‎‏‏‎‎avrcp15‎‏‎‎‏‎"</item>
     <item msgid="1613629084012791988">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‎‏‏‎‎‏‏‎‎‏‎‎‏‏‎‎‎‎‏‏‎‎‎‏‏‎‏‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‎‎‏‎‎‏‎‎‎‏‎‏‏‎‏‎‎‎avrcp13‎‏‎‎‏‎"</item>
-    <item msgid="4398977131424970917">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‏‏‏‎‏‎‎‎‎‏‏‎‎‎‏‎‎‏‏‏‎‎‏‏‎‎‏‎‎‏‏‏‎‏‏‎‏‏‎‏‎‎‏‏‎‏‏‏‏‏‎‎‎‏‎‏‎‎‏‎‏‎avrcp15‎‏‎‎‏‎"</item>
+    <item msgid="99467845610592181">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‎‎‏‏‎‏‏‎‎‎‎‏‎‏‏‎‎‎‎‏‎‏‏‏‏‎‏‎‏‎‎‎‎‏‎‎‎‎‏‏‎‎‎‏‎‏‎‏‎‏‏‏‏‎‏‏‎‏‎‏‎avrcp14‎‏‎‎‏‎"</item>
     <item msgid="1963366694959681026">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‎‏‏‎‎‏‏‏‏‏‏‎‏‎‎‎‏‏‏‏‎‎‏‏‎‏‏‎‏‎‏‎‎‎‎‏‏‏‎‎‏‏‏‏‎‎‎‏‏‏‎‎‎‎‎‎‎‏‎‎avrcp16‎‏‎‎‏‎"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-en-rXC/strings.xml b/packages/SettingsLib/res/values-en-rXC/strings.xml
index 41c20e0..738dd2a 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‎‏‏‎‎‏‏‎‏‎‎‎‏‎‎‏‏‏‎‏‏‎‎‏‏‏‎‏‏‏‏‎‎‎‏‎‎‎‏‏‎‎‏‏‏‎‏‏‏‎‎‏‏‏‏‏‏‏‎‏‏‎Show Bluetooth devices without names‎‏‎‎‏‎"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‎‏‎‎‎‎‏‎‎‏‏‏‏‏‎‎‎‎‎‏‏‎‏‎‎‏‏‎‎‎‏‎‏‏‏‏‎‎‎‏‏‎‎‏‎‏‏‏‎‎‏‏‏‏‏‎‏‎‏‎‎Disable absolute volume‎‏‎‎‏‎"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‏‏‎‏‎‎‏‏‎‏‏‎‎‎‏‏‎‏‎‎‏‏‏‎‏‎‏‎‎‏‎‏‏‎‎‎‏‏‎‏‏‎‎‏‏‎‏‎‏‏‎‎‎‎Enable Gabeldorsche‎‏‎‎‏‎"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‎‎‏‎‏‏‎‎‏‏‎‎‏‎‎‏‏‎‎‏‏‏‎‎‎‎‎‏‎‎‎‎‏‏‎‎‏‏‏‏‏‏‎‏‎‎‎Enhanced Connectivity‎‏‎‎‏‎"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‎‏‏‏‏‎‏‏‏‏‎‏‎‎‏‎‏‎‏‏‏‏‎‏‎‎‎‏‎‎‎‎‎‎‏‏‏‎‎‎‎‎‎‏‏‏‏‎‎‎‎‎‏‏‏‏‎‏‏‏‎Bluetooth AVRCP Version‎‏‎‎‏‎"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‏‎‎‏‏‏‎‎‏‎‏‏‏‎‏‏‏‏‎‎‎‏‏‏‏‏‏‏‎‎‎‎‎‎‎‏‎‎‎‏‎‎‎‏‏‎‎‎‎‏‎‏‏‎‎‎‎‎‏‎Select Bluetooth AVRCP Version‎‏‎‎‏‎"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‎‏‏‏‏‏‎‏‎‎‏‏‎‏‏‏‎‏‎‎‏‎‎‏‏‏‏‎‎‎‎‎‏‏‎‎‏‏‏‎‎‎‎‎‎‎‎‏‎‏‏‏‏‎‎‏‎‏‏‏‏‏‎Bluetooth MAP Version‎‏‎‎‏‎"</string>
diff --git a/packages/SettingsLib/res/values-es-rUS/arrays.xml b/packages/SettingsLib/res/values-es-rUS/arrays.xml
index ad58235..cfce9b6 100644
--- a/packages/SettingsLib/res/values-es-rUS/arrays.xml
+++ b/packages/SettingsLib/res/values-es-rUS/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Habilitado"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (predeterminado)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (predeterminado)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index 287a1ac..a39a0a2 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -196,7 +196,7 @@
     <string name="choose_profile" msgid="343803890897657450">"Elegir perfil"</string>
     <string name="category_personal" msgid="6236798763159385225">"Personal"</string>
     <string name="category_work" msgid="4014193632325996115">"Trabajo"</string>
-    <string name="development_settings_title" msgid="140296922921597393">"Opciones para programadores"</string>
+    <string name="development_settings_title" msgid="140296922921597393">"Opciones para desarrolladores"</string>
     <string name="development_settings_enable" msgid="4285094651288242183">"Activar opciones para programador"</string>
     <string name="development_settings_summary" msgid="8718917813868735095">"Establecer opciones para desarrollar aplicaciones"</string>
     <string name="development_settings_not_available" msgid="355070198089140951">"Las opciones de programador no están disponibles para este usuario."</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Mostrar dispositivos Bluetooth sin nombre"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Inhabilitar volumen absoluto"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Habilitar Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Conectividad mejorada"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versión de AVRCP del Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Selecciona la versión de AVRCP del Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versión de MAP de Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-es/arrays.xml b/packages/SettingsLib/res/values-es/arrays.xml
index 6e69c71..5682dd5 100644
--- a/packages/SettingsLib/res/values-es/arrays.xml
+++ b/packages/SettingsLib/res/values-es/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Habilitado"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Predeterminada)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (predeterminado)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index 9d34557..0c3a792 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Mostrar dispositivos Bluetooth sin nombre"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Inhabilitar volumen absoluto"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Habilitar Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Conectividad mejorada"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versión AVRCP de Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Selecciona la versión AVRCP de Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versión de MAP de Bluetooth"</string>
@@ -511,7 +510,7 @@
     <string name="media_transfer_this_device_name" msgid="2716555073132169240">"Altavoz del teléfono"</string>
     <string name="profile_connect_timeout_subtext" msgid="4043408193005851761">"No se ha podido conectar; reinicia el dispositivo"</string>
     <string name="media_transfer_wired_device_name" msgid="4447880899964056007">"Dispositivo de audio con cable"</string>
-    <string name="help_label" msgid="3528360748637781274">"Ayuda y sugerencias"</string>
+    <string name="help_label" msgid="3528360748637781274">"Ayuda y comentarios"</string>
     <string name="storage_category" msgid="2287342585424631813">"Almacenamiento"</string>
     <string name="shared_data_title" msgid="1017034836800864953">"Datos compartidos"</string>
     <string name="shared_data_summary" msgid="5516326713822885652">"Ver y modificar los datos compartidos"</string>
diff --git a/packages/SettingsLib/res/values-et/arrays.xml b/packages/SettingsLib/res/values-et/arrays.xml
index eb5f347..9015cfe 100644
--- a/packages/SettingsLib/res/values-et/arrays.xml
+++ b/packages/SettingsLib/res/values-et/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Lubatud"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (vaikeseade)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (vaikeseade)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index d003ef0..cbc3fef 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -81,7 +81,7 @@
     <string name="bluetooth_battery_level" msgid="2893696778200201555">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g> akut"</string>
     <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"V: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g> akut, P: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g> akut"</string>
     <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"Aktiivne"</string>
-    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Meedia heli"</string>
+    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Meediaheli"</string>
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"Telefonikõned"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"Failiedastus"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"Sisendseade"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Kuva ilma nimedeta Bluetoothi seadmed"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Keela absoluutne helitugevus"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Luba Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Täiustatud ühenduvus"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetoothi AVRCP versioon"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Valige Bluetoothi AVRCP versioon"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetoothi MAP-i versioon"</string>
diff --git a/packages/SettingsLib/res/values-eu/arrays.xml b/packages/SettingsLib/res/values-eu/arrays.xml
index 30ac525f7..0e94bba 100644
--- a/packages/SettingsLib/res/values-eu/arrays.xml
+++ b/packages/SettingsLib/res/values-eu/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Gaituta"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (lehenetsia)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (lehenetsia)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index eaf14f0..4a11aa7 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Erakutsi Bluetooth bidezko gailuak izenik gabe"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Desgaitu bolumen absolutua"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gaitu Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Konexio hobeak"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP bertsioa"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Hautatu Bluetooth AVRCP bertsioa"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAParen bertsioa"</string>
diff --git a/packages/SettingsLib/res/values-fa/arrays.xml b/packages/SettingsLib/res/values-fa/arrays.xml
index 94caa74..075f7e0 100644
--- a/packages/SettingsLib/res/values-fa/arrays.xml
+++ b/packages/SettingsLib/res/values-fa/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"فعال"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"‏AVRCP نسخه ۱.۴ (پیش‌فرض)"</item>
+    <item msgid="6603880723315236832">"‏AVRCP نسخه ۱.۵ (پیش‌فرض)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"‏AVRCP نسخه ۱.۴"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"‏avrcp نسخه ۱۴"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"‏avrcp نسخه ۱۴"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 77a6ce2..121da7b 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -28,7 +28,7 @@
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"‏پیکربندی IP انجام نشد"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"اتصال ناموفق به دلیل شبکه با کیفیت پایین"</string>
     <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"‏اتصال Wi-Fi برقرار نشد"</string>
-    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"مشکل احراز هویت"</string>
+    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"مشکل اصالت‌سنجی"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"برقراری اتصال ممکن نیست"</string>
     <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>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"نمایش دستگاه‌های بلوتوث بدون نام"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"غیرفعال کردن میزان صدای مطلق"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"‏فعال کردن Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"اتصال بهبودیافته"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"‏نسخه AVRCP بلوتوث"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"‏انتخاب نسخه AVRCP بلوتوث"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"‏نسخه MAP بلوتوث"</string>
diff --git a/packages/SettingsLib/res/values-fi/arrays.xml b/packages/SettingsLib/res/values-fi/arrays.xml
index edfd951..d233c56 100644
--- a/packages/SettingsLib/res/values-fi/arrays.xml
+++ b/packages/SettingsLib/res/values-fi/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Päällä"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (oletus)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (oletus)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index 3945e55..3d28f1d 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Näytä nimettömät Bluetooth-laitteet"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Poista yleinen äänenvoimakkuuden säätö käytöstä"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Ota Gabeldorsche käyttöön"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Parannetut yhteydet"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetoothin AVRCP-versio"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Valitse Bluetoothin AVRCP-versio"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetoothin MAP-versio"</string>
diff --git a/packages/SettingsLib/res/values-fr-rCA/arrays.xml b/packages/SettingsLib/res/values-fr-rCA/arrays.xml
index 02b374a..1db6540 100644
--- a/packages/SettingsLib/res/values-fr-rCA/arrays.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Activé"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (par défaut)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (par défaut)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index 140d4ce..6bb1a3a 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -142,7 +142,7 @@
     <string name="process_kernel_label" msgid="950292573930336765">"Système d\'exploitation Android"</string>
     <string name="data_usage_uninstalled_apps" msgid="1933665711856171491">"Applications supprimées"</string>
     <string name="data_usage_uninstalled_apps_users" msgid="5533981546921913295">"Applications et utilisateurs supprimés"</string>
-    <string name="data_usage_ota" msgid="7984667793701597001">"Mises à jour système"</string>
+    <string name="data_usage_ota" msgid="7984667793701597001">"Mises à jour du système"</string>
     <string name="tether_settings_title_usb" msgid="3728686573430917722">"Partage de connexion par USB"</string>
     <string name="tether_settings_title_wifi" msgid="4803402057533895526">"Point d\'accès Wi-Fi mobile"</string>
     <string name="tether_settings_title_bluetooth" msgid="916519902721399656">"Partage connexion Bluetooth"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Afficher les appareils Bluetooth sans nom"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Désactiver le volume absolu"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Activer le Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Connectivité améliorée"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Version du profil Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Sélectionner la version du profil Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Version du profil Bluetooth MAP"</string>
@@ -489,6 +488,7 @@
     <string name="wifi_status_mac_randomized" msgid="466382542497832189">"Les adresses MAC sont randomisées"</string>
     <plurals name="wifi_tether_connected_summary" formatted="false" msgid="6317236306047306139">
       <item quantity="one">%1$d appareil connecté</item>
+      <item quantity="many">%1$d devices connected</item>
       <item quantity="other">%1$d appareils connectés</item>
     </plurals>
     <string name="accessibility_manual_zen_more_time" msgid="5141801092071134235">"Plus longtemps."</string>
@@ -498,7 +498,7 @@
     <string name="zen_mode_enable_dialog_turn_on" msgid="6418297231575050426">"Activer"</string>
     <string name="zen_mode_settings_turn_on_dialog_title" msgid="2760567063190790696">"Activer le mode Ne pas déranger"</string>
     <string name="zen_mode_settings_summary_off" msgid="3832876036123504076">"Jamais"</string>
-    <string name="zen_interruption_level_priority" msgid="5392140786447823299">"Priorités seulement"</string>
+    <string name="zen_interruption_level_priority" msgid="5392140786447823299">"Prioritaires seulement"</string>
     <string name="zen_mode_and_condition" msgid="8877086090066332516">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
     <string name="zen_alarm_warning_indef" msgid="4146527909616457163">"Vous n\'entendrez pas votre prochaine alarme à <xliff:g id="WHEN">%1$s</xliff:g> sauf si vous désactivez préalablement cette option"</string>
     <string name="zen_alarm_warning" msgid="245729928048586280">"Vous n\'entendrez pas votre prochaine alarme à <xliff:g id="WHEN">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-fr/arrays.xml b/packages/SettingsLib/res/values-fr/arrays.xml
index 9ccaf09..7660925 100644
--- a/packages/SettingsLib/res/values-fr/arrays.xml
+++ b/packages/SettingsLib/res/values-fr/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Activé"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (par défaut)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (par défaut)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index bb5959e..8690dd8 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Afficher les appareils Bluetooth sans nom"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Désactiver le volume absolu"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Activer Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Connectivité améliorée"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Version Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Sélectionner la version Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Version Bluetooth MAP"</string>
@@ -489,6 +488,7 @@
     <string name="wifi_status_mac_randomized" msgid="466382542497832189">"La sélection des adresses MAC est aléatoire"</string>
     <plurals name="wifi_tether_connected_summary" formatted="false" msgid="6317236306047306139">
       <item quantity="one">%1$d appareil connecté</item>
+      <item quantity="many">%1$d devices connected</item>
       <item quantity="other">%1$d appareils connectés</item>
     </plurals>
     <string name="accessibility_manual_zen_more_time" msgid="5141801092071134235">"Plus longtemps."</string>
diff --git a/packages/SettingsLib/res/values-gl/arrays.xml b/packages/SettingsLib/res/values-gl/arrays.xml
index 5fad943..98f2072 100644
--- a/packages/SettingsLib/res/values-gl/arrays.xml
+++ b/packages/SettingsLib/res/values-gl/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Activada"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (predeterminado)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (predeterminado)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index f9d57c4..af43099 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Mostrar dispositivos Bluetooth sen nomes"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Desactivar volume absoluto"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Activar Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Conectividade mellorada"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versión de Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Selecciona a versión de Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versión de MAP de Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-gu/arrays.xml b/packages/SettingsLib/res/values-gu/arrays.xml
index 2a40a9e..1a3bf98 100644
--- a/packages/SettingsLib/res/values-gu/arrays.xml
+++ b/packages/SettingsLib/res/values-gu/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ચાલુ છે"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ડિફૉલ્ટ)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ડિફૉલ્ટ)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index 0ce52f8..417d6f2 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -33,11 +33,11 @@
     <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_default" msgid="7973529709744526285">"નેટવર્ક રેટિંગ પ્રદાતા દ્વારા આપમેળે કનેક્ટ થયું"</string>
+    <string name="connected_via_network_scorer_default" msgid="7973529709744526285">"નેટવર્ક રેટિંગ પ્રદાતા દ્વારા ઑટોમૅટિક રીતે કનેક્ટ થયું"</string>
     <string name="connected_via_passpoint" msgid="7735442932429075684">"%1$s દ્વારા કનેક્ટ થયેલ"</string>
     <string name="connected_via_app" msgid="3532267661404276584">"<xliff:g id="NAME">%1$s</xliff:g> દ્વારા કનેક્ટ થયેલ"</string>
     <string name="available_via_passpoint" msgid="1716000261192603682">"%1$s દ્વારા ઉપલબ્ધ"</string>
@@ -81,7 +81,7 @@
     <string name="bluetooth_battery_level" msgid="2893696778200201555">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g> બૅટરી"</string>
     <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"L: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g> બૅટરી, R: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g> બૅટરી"</string>
     <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"સક્રિય"</string>
-    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"મીડિયા ઑડિઓ"</string>
+    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"મીડિયા ઑડિયો"</string>
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"ફોન કૉલ"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"ફાઇલ સ્થાનાંતરણ"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"ઇનપુટ ઉપકરણ"</string>
@@ -113,7 +113,7 @@
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"ઇનપુટ માટે ઉપયોગ કરો"</string>
     <string name="bluetooth_hearing_aid_profile_summary_use_for" msgid="7689393730163320483">"શ્રવણ યંત્રો માટે ઉપયોગ કરો"</string>
     <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"જોડી"</string>
-    <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"જોડાણ બનાવો"</string>
+    <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"જોડી કરો"</string>
     <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>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"નામ વિનાના બ્લૂટૂથ ઉપકરણો બતાવો"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ચોક્કસ વૉલ્યૂમને અક્ષમ કરો"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche ચાલુ કરો"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"વિસ્તૃત કનેક્ટિવિટી"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"બ્લૂટૂથ AVRCP સંસ્કરણ"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"બ્લૂટૂથ AVRCP સંસ્કરણ પસંદ કરો"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"બ્લૂટૂથ MAP વર્ઝન"</string>
diff --git a/packages/SettingsLib/res/values-hi/arrays.xml b/packages/SettingsLib/res/values-hi/arrays.xml
index 3c744e1..36b16e6 100644
--- a/packages/SettingsLib/res/values-hi/arrays.xml
+++ b/packages/SettingsLib/res/values-hi/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"चालू है"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"एवीआरसीपी 1.4 (डिफ़ॉल्ट)"</item>
+    <item msgid="6603880723315236832">"एवीआरसीपी 1.5 (डिफ़ॉल्ट)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"एवीआरसीपी 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"एवीआरसीपी15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"एवीआरसीपी14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index f2de28e..6e734bc 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"बिना नाम वाले ब्लूटूथ डिवाइस दिखाएं"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ब्लूटूथ से आवाज़ के नियंत्रण की सुविधा रोकें"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche चालू करें"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"कनेक्टिविटी बेहतर बनाएं"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ब्लूटूथ एवीआरसीपी वर्शन"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ब्लूटूथ AVRCP वर्शन चुनें"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ब्लूटूथ का MAP वर्शन"</string>
diff --git a/packages/SettingsLib/res/values-hr/arrays.xml b/packages/SettingsLib/res/values-hr/arrays.xml
index c573e6c..82a1e4a 100644
--- a/packages/SettingsLib/res/values-hr/arrays.xml
+++ b/packages/SettingsLib/res/values-hr/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Omogućeno"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (zadano)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (zadano)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index 14e3330..3edc452 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Prikaži Bluetooth uređaje bez naziva"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Onemogući apsolutnu glasnoću"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Omogući Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Poboljšana povezivost"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Verzija AVRCP-a za Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Odaberite verziju AVRCP-a za Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Verzija MAP-a za Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-hu/arrays.xml b/packages/SettingsLib/res/values-hu/arrays.xml
index 608a9e03..d043af0 100644
--- a/packages/SettingsLib/res/values-hu/arrays.xml
+++ b/packages/SettingsLib/res/values-hu/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Engedélyezve"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (alapértelmezett)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (alapértelmezett)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index 5fbf3ac..d86d88b 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Név nélküli Bluetooth-eszközök megjelenítése"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Abszolút hangerő funkció letiltása"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"A Gabeldorsche engedélyezése"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Enhanced Connectivity"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"A Bluetooth AVRCP-verziója"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"A Bluetooth AVRCP-verziójának kiválasztása"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"A Bluetooth MAP-verziója"</string>
diff --git a/packages/SettingsLib/res/values-hy/arrays.xml b/packages/SettingsLib/res/values-hy/arrays.xml
index 141ce39..a279872 100644
--- a/packages/SettingsLib/res/values-hy/arrays.xml
+++ b/packages/SettingsLib/res/values-hy/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Միացված է"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (կանխադրված)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (կանխադրված)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index 3d25ff8..e434cac 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Ցուցադրել Bluetooth սարքերն առանց անունների"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Անջատել ձայնի բացարձակ ուժգնությունը"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Միացնել Gabeldorsche-ը"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Տվյալների լավացված փոխանակում"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP տարբերակը"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Ընտրել Bluetooth AVRCP տարբերակը"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP-ի տարբերակ"</string>
diff --git a/packages/SettingsLib/res/values-in/arrays.xml b/packages/SettingsLib/res/values-in/arrays.xml
index 5cdd954..3ab50cc 100644
--- a/packages/SettingsLib/res/values-in/arrays.xml
+++ b/packages/SettingsLib/res/values-in/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Diaktifkan"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Default)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Default)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index c68a438..ec2429b 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Tampilkan perangkat Bluetooth tanpa nama"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Nonaktifkan volume absolut"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Aktifkan Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Konektivitas Yang Disempurnakan"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versi AVRCP Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Pilih Versi AVRCP Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versi MAP Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-is/arrays.xml b/packages/SettingsLib/res/values-is/arrays.xml
index 07b2ef1..93274e4 100644
--- a/packages/SettingsLib/res/values-is/arrays.xml
+++ b/packages/SettingsLib/res/values-is/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Kveikt"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (sjálfgefið)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (sjálfgefið)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 0ebc341..caf2323 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Sýna Bluetooth-tæki án heita"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Slökkva á samstillingu hljóðstyrks"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Virkja Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Aukin tengigeta"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP-útgáfa"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Velja Bluetooth AVRCP-útgáfu"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP-útgáfa"</string>
diff --git a/packages/SettingsLib/res/values-it/arrays.xml b/packages/SettingsLib/res/values-it/arrays.xml
index 3018683..57c0c9b 100644
--- a/packages/SettingsLib/res/values-it/arrays.xml
+++ b/packages/SettingsLib/res/values-it/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Attiva"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (predefinita)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (versione predefinita)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index 50fdfc9..675aae0 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -66,7 +66,7 @@
     <string name="bluetooth_disconnected" msgid="7739366554710388701">"Disconnesso"</string>
     <string name="bluetooth_disconnecting" msgid="7638892134401574338">"Disconnessione…"</string>
     <string name="bluetooth_connecting" msgid="5871702668260192755">"Connessione…"</string>
-    <string name="bluetooth_connected" msgid="8065345572198502293">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connesso"</string>
+    <string name="bluetooth_connected" msgid="8065345572198502293">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> Connesso"</string>
     <string name="bluetooth_pairing" msgid="4269046942588193600">"Accoppiamento…"</string>
     <string name="bluetooth_connected_no_headset" msgid="2224101138659967604">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connesso (telefono escluso)"</string>
     <string name="bluetooth_connected_no_a2dp" msgid="8566874395813947092">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connesso (contenuti multimediali esclusi)"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Mostra dispositivi Bluetooth senza nome"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Disattiva volume assoluto"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Attiva Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Connettività migliorata"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versione Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Seleziona versione Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versione Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/res/values-iw/arrays.xml b/packages/SettingsLib/res/values-iw/arrays.xml
index 2f7f310..fa53ab8 100644
--- a/packages/SettingsLib/res/values-iw/arrays.xml
+++ b/packages/SettingsLib/res/values-iw/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"מופעל"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"‏AVRCP 1.4 (ברירת המחדל)"</item>
+    <item msgid="6603880723315236832">"‏AVRCP 1.5 (ברירת המחדל)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index fb7d00f..fff881c 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"‏הצגת מכשירי Bluetooth ללא שמות"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"השבת עוצמת קול מוחלטת"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"‏הפעלת Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"קישוריות משופרת"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"‏Bluetooth גרסה AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"‏בחר Bluetooth גרסה AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"‏גרסת Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/res/values-ja/arrays.xml b/packages/SettingsLib/res/values-ja/arrays.xml
index 91c2fa2..7a4e71b 100644
--- a/packages/SettingsLib/res/values-ja/arrays.xml
+++ b/packages/SettingsLib/res/values-ja/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"有効"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4(デフォルト)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5(デフォルト)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 3537cea..5e579b7 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Bluetooth デバイスを名前なしで表示"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"絶対音量を無効にする"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche を有効にする"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"接続強化"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP バージョン"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP バージョンを選択する"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP バージョン"</string>
diff --git a/packages/SettingsLib/res/values-ka/arrays.xml b/packages/SettingsLib/res/values-ka/arrays.xml
index 5a86eae..935cc46 100644
--- a/packages/SettingsLib/res/values-ka/arrays.xml
+++ b/packages/SettingsLib/res/values-ka/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ჩართულია"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ნაგულისხმევი)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ნაგულისხმევი)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index 9b671a8..1b5fae9 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Bluetooth-მოწყობილობების ჩვენება სახელების გარეშე"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ხმის აბსოლუტური სიძლიერის გათიშვა"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche-ის ჩართვა"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"კავშირის გაძლიერებული შესაძლებლობა"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth-ის AVRCP-ის ვერსია"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"აირჩიეთ Bluetooth-ის AVRCP-ის ვერსია"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP-ის ვერსია"</string>
diff --git a/packages/SettingsLib/res/values-kk/arrays.xml b/packages/SettingsLib/res/values-kk/arrays.xml
index fe5b5d2..faa8af8 100644
--- a/packages/SettingsLib/res/values-kk/arrays.xml
+++ b/packages/SettingsLib/res/values-kk/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Қосулы"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (әдепкі)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (әдепкі)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index 279aca0..9c290e9 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Bluetooth құрылғыларын атаусыз көрсету"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Абсолютті дыбыс деңгейін өшіру"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche функциясын іске қосу"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Жетілдірілген байланыс"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP нұсқасы"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP нұсқасын таңдау"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP нұсқасы"</string>
diff --git a/packages/SettingsLib/res/values-km/arrays.xml b/packages/SettingsLib/res/values-km/arrays.xml
index 24efd08..6f4589e 100644
--- a/packages/SettingsLib/res/values-km/arrays.xml
+++ b/packages/SettingsLib/res/values-km/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"បាន​បើក"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (លំនាំដើម)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (លំនាំដើម)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index 03065e8..0f1728c 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -85,7 +85,7 @@
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"ការហៅ​ទូរសព្ទ"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"ផ្ទេរ​ឯកសារ"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"ឧបករណ៍​បញ្ចូល"</string>
-    <string name="bluetooth_profile_pan" msgid="1006235139308318188">"ចូល​អ៊ីនធឺណិត"</string>
+    <string name="bluetooth_profile_pan" msgid="1006235139308318188">"ការចូលប្រើ​អ៊ីនធឺណិត"</string>
     <string name="bluetooth_profile_pbap" msgid="7064307749579335765">"ការ​ចែករំលែក​​ទំនាក់ទំនង"</string>
     <string name="bluetooth_profile_pbap_summary" msgid="2955819694801952056">"ប្រើ​សម្រាប់​ការ​ចែករំលែក​ទំនាក់ទំនង"</string>
     <string name="bluetooth_profile_pan_nap" msgid="7871974753822470050">"ចែករំលែក​ការ​តភ្ជាប់​អ៊ីនធឺណិត"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"បង្ហាញ​ឧបករណ៍​ប្ល៊ូធូស​គ្មានឈ្មោះ"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"បិទកម្រិតសំឡេងលឺខ្លាំង"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"បើក Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"ការតភ្ជាប់​ដែលបានធ្វើឱ្យប្រសើរឡើង"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"កំណែប្ល៊ូធូស AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ជ្រើសរើសកំណែប្ល៊ូធូស AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"កំណែ​ប៊្លូធូស MAP"</string>
diff --git a/packages/SettingsLib/res/values-kn/arrays.xml b/packages/SettingsLib/res/values-kn/arrays.xml
index 4d8bde2..7e543dd 100644
--- a/packages/SettingsLib/res/values-kn/arrays.xml
+++ b/packages/SettingsLib/res/values-kn/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ಡಿಫಾಲ್ಟ್)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ಡೀಫಾಲ್ಟ್)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index 71c5e49..4fbf22d 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"ಹೆಸರುಗಳಿಲ್ಲದ ಬ್ಲೂಟೂತ್ ಸಾಧನಗಳನ್ನು ತೋರಿಸಿ"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ಸಂಪೂರ್ಣ ವಾಲ್ಯೂಮ್‌ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"ವರ್ಧಿತ ಸಂಪರ್ಕ"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ಬ್ಲೂಟೂತ್ AVRCP ಆವೃತ್ತಿ"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ಬ್ಲೂಟೂತ್ AVRCP ಆವೃತ್ತಿಯನ್ನು ಆಯ್ಕೆ ಮಾಡಿ"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ಬ್ಲೂಟೂತ್ MAP ಆವೃತ್ತಿ"</string>
@@ -307,7 +306,7 @@
     <string name="adb_keys_warning_message" msgid="2968555274488101220">"ನೀವು ಹಿಂದೆ ಅಧಿಕೃತಗೊಳಿಸಿದ ಎಲ್ಲ ಕಂಪ್ಯೂಟರ್‌ಗಳಿಂದ USB ಡೀಬಗ್‌ಗೆ ಪ್ರವೇಶವನ್ನು ರದ್ದುಗೊಳಿಸುವುದೇ?"</string>
     <string name="dev_settings_warning_title" msgid="8251234890169074553">"ಅಭಿವೃದ್ಧಿಯ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಅನುಮತಿಸುವುದೇ?"</string>
     <string name="dev_settings_warning_message" msgid="37741686486073668">"ಈ ಸೆಟ್ಟಿಂಗ್‌ಗಳು ಅಭಿವೃದ್ಧಿಯ ಬಳಕೆಗೆ ಮಾತ್ರ. ಅವುಗಳು ನಿಮ್ಮ ಸಾಧನ ಮತ್ತು ಅಪ್ಲಿಕೇಶನ್‌‌ಗಳಿಗೆ ಧಕ್ಕೆ ಮಾಡಬಹುದು ಅಥವಾ ಅವು ಸರಿಯಾಗಿ ಕಾರ್ಯನಿರ್ವಹಿಸದಿರುವಂತೆ ಮಾಡಬಹುದು."</string>
-    <string name="verify_apps_over_usb_title" msgid="6031809675604442636">"USB ಮೂಲಕ ಆಪ್‌ ಪರಿಶೀಲಿಸಿ"</string>
+    <string name="verify_apps_over_usb_title" msgid="6031809675604442636">"USB ಮೂಲಕ ಆ್ಯಪ್‌ ಪರಿಶೀಲಿಸಿ"</string>
     <string name="verify_apps_over_usb_summary" msgid="1317933737581167839">"ಹಾನಿಮಾಡುವಂತಹ ವರ್ತನೆಗಾಗಿ ADB/ADT ಮೂಲಕ ಸ್ಥಾಪಿಸಲಾದ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಪರಿಶೀಲಿಸಿ."</string>
     <string name="bluetooth_show_devices_without_names_summary" msgid="780964354377854507">"ಹೆಸರುಗಳಿಲ್ಲದ (ಕೇವಲ MAC ವಿಳಾಸಗಳು ಮಾತ್ರ) ಬ್ಲೂಟೂತ್ ಸಾಧನಗಳನ್ನು ಪ್ರದರ್ಶಿಸಲಾಗುತ್ತದೆ"</string>
     <string name="bluetooth_disable_absolute_volume_summary" msgid="2006309932135547681">"ರಿಮೋಟ್ ಸಾಧನಗಳಲ್ಲಿ ಕಂಡುಬರುವ ಸ್ವೀಕಾರಾರ್ಹವಲ್ಲದ ಜೋರಾದ ವಾಲ್ಯೂಮ್ ಅಥವಾ ನಿಯಂತ್ರಣದ ಕೊರತೆಯಂತಹ ವಾಲ್ಯೂಮ್ ಸಮಸ್ಯೆಗಳಂತಹ ಸಂದರ್ಭದಲ್ಲಿ ಬ್ಲೂಟೂತ್‍ನ ನಿಚ್ಚಳ ವಾಲ್ಯೂಮ್ ವೈಶಿಷ್ಟ್ಯವನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸುತ್ತದೆ."</string>
diff --git a/packages/SettingsLib/res/values-ko/arrays.xml b/packages/SettingsLib/res/values-ko/arrays.xml
index 999f3ae..9a18c16 100644
--- a/packages/SettingsLib/res/values-ko/arrays.xml
+++ b/packages/SettingsLib/res/values-ko/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"사용 설정됨"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4(기본)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5(기본값)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index 6d24511..f13d9b8 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"이름이 없는 블루투스 기기 표시"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"절대 볼륨 사용 안함"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche 사용 설정"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"향상된 연결"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"블루투스 AVRCP 버전"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"블루투스 AVRCP 버전 선택"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"블루투스 MAP 버전"</string>
diff --git a/packages/SettingsLib/res/values-ky/arrays.xml b/packages/SettingsLib/res/values-ky/arrays.xml
index fd47dad..f5e812d 100644
--- a/packages/SettingsLib/res/values-ky/arrays.xml
+++ b/packages/SettingsLib/res/values-ky/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Иштетилди"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Демейки)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Демейки)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index 15322dd..5d34206 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -112,7 +112,7 @@
     <string name="bluetooth_opp_profile_summary_use_for" msgid="461981154387015457">"Файл өткөрүү үчүн колдонулсун"</string>
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"Киргизүү үчүн колдонулсун"</string>
     <string name="bluetooth_hearing_aid_profile_summary_use_for" msgid="7689393730163320483">"Угуу аппараттары үчүн колдонуу"</string>
-    <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"Жупташтыруу"</string>
+    <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"Байланыштыруу"</string>
     <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"ЖУПТАШТЫРУУ"</string>
     <string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Жок"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Жупташканда байланыштарыңыз менен чалуу таржымалыңызды пайдалана аласыз."</string>
@@ -223,7 +223,7 @@
     <string name="adb_wireless_connection_failed_title" msgid="664211177427438438">"Байланышкан жок"</string>
     <string name="adb_wireless_connection_failed_message" msgid="9213896700171602073">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> туура тармакка туташып турганын текшериңиз"</string>
     <string name="adb_pairing_device_dialog_title" msgid="7141739231018530210">"Түзмөктү жупташтыруу"</string>
-    <string name="adb_pairing_device_dialog_pairing_code_label" msgid="3639239786669722731">"Wi‑Fi жупташтыруучу коду"</string>
+    <string name="adb_pairing_device_dialog_pairing_code_label" msgid="3639239786669722731">"Wi‑Fi аркылуу байланыштыруу коду"</string>
     <string name="adb_pairing_device_dialog_failed_title" msgid="3426758947882091735">"Туташкан жок"</string>
     <string name="adb_pairing_device_dialog_failed_msg" msgid="6611097519661997148">"Түзмөк бир тармакка туташып турушу керек."</string>
     <string name="adb_wireless_qrcode_summary" msgid="8051414549011801917">"QR кодун скандап, түзмөктү Wi‑Fi аркылуу жупташтырыңыз"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Аталышсыз Bluetooth түзмөктөрү көрсөтүлсүн"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Үндүн абсолюттук деңгээли өчүрүлсүн"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche функциясын иштетүү"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Жакшыртылган туташуу"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP версиясы"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP версиясын тандоо"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP версиясы"</string>
diff --git a/packages/SettingsLib/res/values-lo/arrays.xml b/packages/SettingsLib/res/values-lo/arrays.xml
index 5e25ab0..a0fb2b8 100644
--- a/packages/SettingsLib/res/values-lo/arrays.xml
+++ b/packages/SettingsLib/res/values-lo/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ເປີດໃຊ້ແລ້ວ"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ຄ່າ​ເລີ່ມ​ຕົ້ນ)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ຄ່າເລີ່ມຕົ້ນ)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index 7a2c338..a72861e 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"ສະແດງອຸປະກອນ Bluetooth ທີ່ບໍ່ມີຊື່"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ປິດໃຊ້ລະດັບສຽງສົມບູນ"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"ເປີດໃຊ້ Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"ການເຊື່ອມຕໍ່ທີ່ເສີມແຕ່ງແລ້ວ"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ເວີຊັນ Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ເລືອກເວີຊັນ Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ເວີຊັນ Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/res/values-lt/arrays.xml b/packages/SettingsLib/res/values-lt/arrays.xml
index e4b55ab..90a77bf 100644
--- a/packages/SettingsLib/res/values-lt/arrays.xml
+++ b/packages/SettingsLib/res/values-lt/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Įgalinta"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (numatytoji)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (numatytoji)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index b73aa66..c72bf21 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Rodyti „Bluetooth“ įrenginius be pavadinimų"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Išjungti didžiausią garsą"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Įgalinti „Gabeldorsche“"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Patobulintas ryšys"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"„Bluetooth“ AVRCP versija"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Pasirinkite „Bluetooth“ AVRCP versiją"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"„Bluetooth“ MRK versija"</string>
diff --git a/packages/SettingsLib/res/values-lv/arrays.xml b/packages/SettingsLib/res/values-lv/arrays.xml
index b90cf22..5891727 100644
--- a/packages/SettingsLib/res/values-lv/arrays.xml
+++ b/packages/SettingsLib/res/values-lv/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Iespējots"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (noklusējuma)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (noklusējums)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"AVRCP15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"AVRCP14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index 8e5d24c..d95e57d 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Rādīt Bluetooth ierīces bez nosaukumiem"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Atspējot absolūto skaļumu"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Iespējot Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Uzlabota savienojamība"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP versija"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Atlasiet Bluetooth AVRCP versiju"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP versija"</string>
diff --git a/packages/SettingsLib/res/values-mk/arrays.xml b/packages/SettingsLib/res/values-mk/arrays.xml
index 85ca0cb..388e280 100644
--- a/packages/SettingsLib/res/values-mk/arrays.xml
+++ b/packages/SettingsLib/res/values-mk/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Овозможено"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Стандардно)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Стандардна)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.3"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index c4c7201..cf8e8dd 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -51,9 +51,9 @@
     <string name="connected_via_carrier" msgid="1968057009076191514">"Поврзано преку %1$s"</string>
     <string name="available_via_carrier" msgid="465598683092718294">"Достапно преку %1$s"</string>
     <string name="osu_opening_provider" msgid="4318105381295178285">"Се отвора <xliff:g id="PASSPOINTPROVIDER">%1$s</xliff:g>"</string>
-    <string name="osu_connect_failed" msgid="9107873364807159193">"Не можеше да се поврзе"</string>
+    <string name="osu_connect_failed" msgid="9107873364807159193">"Не може да се поврзе"</string>
     <string name="osu_completing_sign_up" msgid="8412636665040390901">"Се завршува регистрацијата…"</string>
-    <string name="osu_sign_up_failed" msgid="5605453599586001793">"Не можеше да се заврши регистрацијата. Допрете за да се обидете повторно."</string>
+    <string name="osu_sign_up_failed" msgid="5605453599586001793">"Не може да се заврши регистрацијата. Допрете за да се обидете повторно."</string>
     <string name="osu_sign_up_complete" msgid="7640183358878916847">"Регистрацијата е завршена. Се поврзува…"</string>
     <string name="speed_label_very_slow" msgid="8526005255731597666">"Многу бавна"</string>
     <string name="speed_label_slow" msgid="6069917670665664161">"Бавна"</string>
@@ -81,7 +81,7 @@
     <string name="bluetooth_battery_level" msgid="2893696778200201555">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g> батерија"</string>
     <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"Л: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g> батерија, Д: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g> батерија"</string>
     <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"Активен"</string>
-    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Аудио на медиуми"</string>
+    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Звук на аудио/видео"</string>
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"Телефонски повици"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"Пренос на датотека"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"Влезен уред"</string>
@@ -116,8 +116,8 @@
     <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"СПАРИ"</string>
     <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_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_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>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Прикажувај уреди со Bluetooth без имиња"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Оневозможете апсолутна јачина на звук"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Овозможи Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Подобрена поврзливост"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Верзија Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Изберете верзија Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Верзија на Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/res/values-ml/arrays.xml b/packages/SettingsLib/res/values-ml/arrays.xml
index 60eb24e..cb31d22 100644
--- a/packages/SettingsLib/res/values-ml/arrays.xml
+++ b/packages/SettingsLib/res/values-ml/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"പ്രവർത്തനക്ഷമമാക്കി"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ഡിഫോൾട്ട്)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ഡിഫോൾട്ട്)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index c95f8bf..3c281c8 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"പേരില്ലാത്ത Bluetooth ഉപകരണങ്ങൾ കാണിക്കുക"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"അബ്‌സൊല്യൂട്ട് വോളിയം പ്രവർത്തനരഹിതമാക്കുക"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche പ്രവർത്തനക്ഷമമാക്കുക"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"മെച്ചപ്പെടുത്തിയ കണക്റ്റിവിറ്റി"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP പതിപ്പ്"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP പതിപ്പ് തിരഞ്ഞെടുക്കുക"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP പതിപ്പ്"</string>
diff --git a/packages/SettingsLib/res/values-mn/arrays.xml b/packages/SettingsLib/res/values-mn/arrays.xml
index c5e87bc..6a33b48 100644
--- a/packages/SettingsLib/res/values-mn/arrays.xml
+++ b/packages/SettingsLib/res/values-mn/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Идэвхжүүлсэн"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Өгөгдмөл)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Өгөгдмөл)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
@@ -171,11 +171,11 @@
   </string-array>
   <string-array name="select_logd_size_summaries">
     <item msgid="409235464399258501">"Идэвхгүй"</item>
-    <item msgid="4195153527464162486">"лог буфер бүрт 64K"</item>
-    <item msgid="7464037639415220106">"лог буфер бүрт 256K"</item>
-    <item msgid="8539423820514360724">"лог буфер бүрт 1M"</item>
-    <item msgid="1984761927103140651">"лог буфер бүрт 4M"</item>
-    <item msgid="7892098981256010498">"лог буфер бүрт 16M"</item>
+    <item msgid="4195153527464162486">"лог буфер бүрд 64K"</item>
+    <item msgid="7464037639415220106">"лог буфер бүрд 256K"</item>
+    <item msgid="8539423820514360724">"лог буфер бүрд 1M"</item>
+    <item msgid="1984761927103140651">"лог буфер бүрд 4M"</item>
+    <item msgid="7892098981256010498">"лог буфер бүрд 16M"</item>
   </string-array>
   <string-array name="select_logpersist_titles">
     <item msgid="704720725704372366">"Идэвхгүй"</item>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index 8407db6..c1b58d5 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -28,7 +28,7 @@
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"IP тохируулга амжилтгүй"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"Сүлжээний чанар муу байгаа тул холбогдож чадсангүй"</string>
     <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"WiFi холболт амжилтгүй"</string>
-    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Гэрчлэлийн асуудал"</string>
+    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Баталгаажуулалтын асуудал"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"Холбогдож чадсангүй"</string>
     <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>
@@ -70,7 +70,7 @@
     <string name="bluetooth_pairing" msgid="4269046942588193600">"Хослуулж байна…"</string>
     <string name="bluetooth_connected_no_headset" msgid="2224101138659967604">"Холбогдсон (утас байхгүй)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
     <string name="bluetooth_connected_no_a2dp" msgid="8566874395813947092">"Холбогдсон (медиа байхгүй)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
-    <string name="bluetooth_connected_no_map" msgid="3381860077002724689">"Холбогдсон (зурвасын хандалт байхгүй)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
+    <string name="bluetooth_connected_no_map" msgid="3381860077002724689">"Холбогдсон (мессежийн хандалт байхгүй)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
     <string name="bluetooth_connected_no_headset_no_a2dp" msgid="2893204819854215433">"Холбогдсон (утас эсвэл медиа байхгүй)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
     <string name="bluetooth_connected_battery_level" msgid="5410325759372259950">"Холбогдсон, батерей <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g><xliff:g id="ACTIVE_DEVICE">%2$s</xliff:g>"</string>
     <string name="bluetooth_connected_no_headset_battery_level" msgid="2661863370509206428">"Холбогдсон (утас байхгүй), батерей <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g><xliff:g id="ACTIVE_DEVICE">%2$s</xliff:g>"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Нэргүй Bluetooth төхөөрөмжийг харуулах"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Үнэмлэхүй дууны түвшинг идэвхгүй болгох"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche-г идэвхжүүлэх"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Сайжруулсан холболт"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP хувилбар"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP хувилбарыг сонгох"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP хувилбар"</string>
@@ -288,7 +287,7 @@
     <string name="wifi_metered_label" msgid="8737187690304098638">"Хязгаартай"</string>
     <string name="wifi_unmetered_label" msgid="6174142840934095093">"Хязгааргүй"</string>
     <string name="select_logd_size_title" msgid="1604578195914595173">"Логгерын буферын хэмжээ"</string>
-    <string name="select_logd_size_dialog_title" msgid="2105401994681013578">"Лог буфер бүрт ногдох логгерын хэмжээг сонгоно уу"</string>
+    <string name="select_logd_size_dialog_title" msgid="2105401994681013578">"Лог буфер бүрд ногдох логгерын хэмжээг сонгоно уу"</string>
     <string name="dev_logpersist_clear_warning_title" msgid="8631859265777337991">"Нэвтрэгчийн тогтмол санг устгах уу?"</string>
     <string name="dev_logpersist_clear_warning_message" msgid="6447590867594287413">"Бид байнгын логоор хянаагүй үед таны төхөөрөмжтэй холбоотой нэвтрэгч өгөгдлийг устгах шаардлагатай."</string>
     <string name="select_logpersist_title" msgid="447071974007104196">"Төхөөрөмжид тогтмол нэвтрэгчийн өгөгдлийн сан"</string>
@@ -531,7 +530,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">"Та нэмэлт хэрэглэгч үүсгэх замаар бусад хүмүүстэй энэ төхөөрөмжийг хуваалцаж болно. Хэрэглэгч тус бүр апп, ханын цаас болон бусад зүйлээ өөрчлөх боломжтой хувийн орон зайтай байдаг. Түүнчлэн хэрэглэгч нь бүх хэрэглэгчид нөлөөлөх боломжтой Wi-Fi зэрэг төхөөрөмжийн тохиргоог өөрчлөх боломжтой.\n\nХэрэв та шинэ хэрэглэгч нэмэх бол тухайн хүн хувийн орон зайгаа бүрдүүлэх ёстой.\n\nХэрэглэгч бүр бусад бүх хэрэглэгчийн өмнөөс апп шинэчилж болно. Хүртээмжийн тохиргоо болон үйлчилгээг шинэ хэрэглэгчид шилжүүлэх боломжгүй байж болзошгүй."</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_setup_dialog_title" msgid="8037342066381939995">"Хэрэглэгчийг одоо тохируулах уу?"</string>
     <string name="user_setup_dialog_message" msgid="269931619868102841">"Хэрэглэгч төхөөрөмжийг авч өөрийн профайлыг тохируулах боломжтой эсэхийг шалгана уу"</string>
diff --git a/packages/SettingsLib/res/values-mr/arrays.xml b/packages/SettingsLib/res/values-mr/arrays.xml
index 3e6e3d0..8abf290 100644
--- a/packages/SettingsLib/res/values-mr/arrays.xml
+++ b/packages/SettingsLib/res/values-mr/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"सुरू केले"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (डीफॉल्ट)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (डीफॉल्ट)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index c50f365..49ecbd8 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -25,7 +25,7 @@
     <string name="wifi_remembered" msgid="3266709779723179188">"सेव्ह केले"</string>
     <string name="wifi_disconnected" msgid="7054450256284661757">"डिस्कनेक्ट केले"</string>
     <string name="wifi_disabled_generic" msgid="2651916945380294607">"अक्षम"</string>
-    <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"IP कॉन्फिगरेशन अयशस्वी"</string>
+    <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"IP कॉंफिगरेशन अयशस्वी"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"कमी दर्जाच्या नेटवर्कमुळे कनेक्ट केलेले नाही"</string>
     <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"WiFi कनेक्शन अयशस्वी"</string>
     <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"प्रमाणीकरण समस्या"</string>
@@ -97,7 +97,7 @@
     <string name="bluetooth_hearing_aid_profile_summary_connected" msgid="8191273236809964030">"श्रवण यंत्रांशी कनेक्ट केले आहे"</string>
     <string name="bluetooth_a2dp_profile_summary_connected" msgid="7422607970115444153">"मीडिया ऑडिओवर कनेक्ट केले"</string>
     <string name="bluetooth_headset_profile_summary_connected" msgid="2420981566026949688">"फोन ऑडिओ वर कनेक्ट केले"</string>
-    <string name="bluetooth_opp_profile_summary_connected" msgid="2393521801478157362">"फाईल स्थानांतर सर्व्हरवर कनेक्ट केले"</string>
+    <string name="bluetooth_opp_profile_summary_connected" msgid="2393521801478157362">"फाइल स्थानांतर सर्व्हरवर कनेक्ट केले"</string>
     <string name="bluetooth_map_profile_summary_connected" msgid="4141725591784669181">"नकाशाशी कनेक्ट केले"</string>
     <string name="bluetooth_sap_profile_summary_connected" msgid="1280297388033001037">"SAP शी कनेक्‍ट केले"</string>
     <string name="bluetooth_opp_profile_summary_not_connected" msgid="3959741824627764954">"फाइल स्थानांतर सर्व्हरशी कनेक्ट केले नाही"</string>
@@ -109,7 +109,7 @@
     <string name="bluetooth_sap_profile_summary_use_for" msgid="6204902866176714046">"SIM प्रवेशासाठी वापरा"</string>
     <string name="bluetooth_a2dp_profile_summary_use_for" msgid="7324694226276491807">"मीडिया ऑडिओसाठी वापरा"</string>
     <string name="bluetooth_headset_profile_summary_use_for" msgid="808970643123744170">"फोन ऑडिओसाठी वापरा"</string>
-    <string name="bluetooth_opp_profile_summary_use_for" msgid="461981154387015457">"फाईल स्थानांतरणासाठी वापरा"</string>
+    <string name="bluetooth_opp_profile_summary_use_for" msgid="461981154387015457">"फाइल स्थानांतरणासाठी वापरा"</string>
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"इनपुट साठी वापरा"</string>
     <string name="bluetooth_hearing_aid_profile_summary_use_for" msgid="7689393730163320483">"श्रवण यंत्रांसाठी वापरा"</string>
     <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"पेअर करा"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"नावांशिवाय ब्‍लूटूथ डिव्‍हाइस दाखवा"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"संपूर्ण आवाज बंद करा"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"गाबलडॉर्ष सुरू करा"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"वर्धित कनेक्टिव्हिटी"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ब्लूटूथ AVRCP आवृत्ती"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ब्लूटूथ AVRCP आवृत्ती निवडा"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ब्लूटूथ MAP आवृत्ती"</string>
@@ -269,8 +268,8 @@
     <string name="bluetooth_select_a2dp_codec_type_help_info" msgid="8647200416514412338">"फोन किंवा हेडसेटला सपोर्ट करत नाही म्हणजे ती निकामी झाली आहे"</string>
     <string name="bluetooth_select_a2dp_codec_bits_per_sample" msgid="6253965294594390806">"प्रति पॅटर्न ब्लूटूध ऑडिओ बिट"</string>
     <string name="bluetooth_select_a2dp_codec_bits_per_sample_dialog_title" msgid="4898693684282596143">"ब्लूटूथ ऑडिओ Codec ट्रिगर करा\nनिवड: बिट प्रति नमुना"</string>
-    <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="364277285688014427">"ब्लूटूथ ऑडिओ चॅनेल मोड"</string>
-    <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="2076949781460359589">"ब्लूटूथ ऑडिओ Codec ट्रिगर करा\nनिवड: चॅनेल मोड"</string>
+    <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="364277285688014427">"ब्लूटूथ ऑडिओ चॅनल मोड"</string>
+    <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="2076949781460359589">"ब्लूटूथ ऑडिओ Codec ट्रिगर करा\nनिवड: चॅनल मोड"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3233402355917446304">"ब्लूटूथ ऑडिओ LDAC कोडेक: प्लेबॅक गुणवत्ता"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7274396574659784285">"ब्लूटूथ ऑडिओ LDAC\nकोडेक निवड ट्रिगर करा: प्लेबॅक गुणवत्ता"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="2040810756832027227">"स्ट्रीमिंग: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
@@ -371,7 +370,7 @@
     <string name="app_process_limit_title" msgid="8361367869453043007">"पार्श्वभूमी प्रक्रिया मर्यादा"</string>
     <string name="show_all_anrs" msgid="9160563836616468726">"बॅकग्राउंड ANR दाखवा"</string>
     <string name="show_all_anrs_summary" msgid="8562788834431971392">"बॅकग्राउंड अ‍ॅप्ससाठी अ‍ॅप प्रतिसाद देत नाही दाखवते"</string>
-    <string name="show_notification_channel_warnings" msgid="3448282400127597331">"सूचना चॅनेल चेतावण्या दाखवा"</string>
+    <string name="show_notification_channel_warnings" msgid="3448282400127597331">"सूचना चॅनल चेतावण्या दाखवा"</string>
     <string name="show_notification_channel_warnings_summary" msgid="68031143745094339">"एखादे अ‍ॅप वैध चॅनेलशिवाय सूचना पोस्ट करते तेव्हा स्क्रीनवर चेतावणी देते"</string>
     <string name="force_allow_on_external" msgid="9187902444231637880">"बाह्यवर ॲप्सना अनुमती देण्याची सक्ती करा"</string>
     <string name="force_allow_on_external_summary" msgid="8525425782530728238">"manifest मूल्यांकडे दुर्लक्ष करून, कोणत्याही ॲपला बाह्य स्टोरेजवर लेखन केले जाण्यासाठी पात्र बनविते"</string>
@@ -405,11 +404,11 @@
     <string name="select_webview_provider_title" msgid="3917815648099445503">"वेबदृश्य अंमलबजावणी"</string>
     <string name="select_webview_provider_dialog_title" msgid="2444261109877277714">"वेबदृश्य अंमलबजावणी सेट करा"</string>
     <string name="select_webview_provider_toast_text" msgid="8512254949169359848">"ही निवड यापुढे वैध असणार नाही. पुन्हा प्रयत्न करा."</string>
-    <string name="convert_to_file_encryption" msgid="2828976934129751818">"फाईल कूटबद्धीकरणावर रूपांतरित करा"</string>
+    <string name="convert_to_file_encryption" msgid="2828976934129751818">"फाइल कूटबद्धीकरणावर रूपांतरित करा"</string>
     <string name="convert_to_file_encryption_enabled" msgid="840757431284311754">"रूपांतरित करा..."</string>
-    <string name="convert_to_file_encryption_done" msgid="8965831011811180627">"फाईल आधीपासून एंक्रिप्ट होती"</string>
-    <string name="title_convert_fbe" msgid="5780013350366495149">"फाईल आधारित कूटबद्धीकरणावर रूपांतरित करणे"</string>
-    <string name="convert_to_fbe_warning" msgid="34294381569282109">"फाईल आधारित कूटबद्धीकरणावर डेटा विभाजक रूपांतरित करा.\n !!चेतावणी!! हे आपल्‍या सर्व डेटास मिटवेल.\n हे वैशिष्ट्य अल्‍फा आहे आणि कदाचित योग्यरित्या कार्य करू शकत नाही.\n सुरू ठेवण्‍यासाठी \'पुसा आणि रूपांतरित करा...\' दाबा."</string>
+    <string name="convert_to_file_encryption_done" msgid="8965831011811180627">"फाइल आधीपासून एंक्रिप्ट होती"</string>
+    <string name="title_convert_fbe" msgid="5780013350366495149">"फाइल आधारित कूटबद्धीकरणावर रूपांतरित करणे"</string>
+    <string name="convert_to_fbe_warning" msgid="34294381569282109">"फाइल आधारित कूटबद्धीकरणावर डेटा विभाजक रूपांतरित करा.\n !!चेतावणी!! हे आपल्‍या सर्व डेटास मिटवेल.\n हे वैशिष्ट्य अल्‍फा आहे आणि कदाचित योग्यरित्या कार्य करू शकत नाही.\n सुरू ठेवण्‍यासाठी \'पुसा आणि रूपांतरित करा...\' दाबा."</string>
     <string name="button_convert_fbe" msgid="1159861795137727671">"पुसा आणि रुपांतरित करा..."</string>
     <string name="picture_color_mode" msgid="1013807330552931903">"चित्र रंग मोड"</string>
     <string name="picture_color_mode_desc" msgid="151780973768136200">"sRGB वापरा"</string>
@@ -526,7 +525,7 @@
     <string name="accessor_expires_text" msgid="4625619273236786252">"भाडेपट्टी <xliff:g id="DATE">%s</xliff:g> रोजी एक्स्पायर होईल"</string>
     <string name="delete_blob_text" msgid="2819192607255625697">"शेअर केलेला डेटा हटवा"</string>
     <string name="delete_blob_confirmation_text" msgid="7807446938920827280">"तुम्हाला नक्की हा शेअर केलेला डेटा हटवायचा आहे का?"</string>
-    <string name="user_add_user_item_summary" msgid="5748424612724703400">"वापरकर्त्यांकडे त्यांचे स्वत:चे अ‍ॅप्स आणि सामग्री आहे"</string>
+    <string name="user_add_user_item_summary" msgid="5748424612724703400">"वापरकर्त्यांकडे त्यांचे स्वत:चे अ‍ॅप्स आणि आशय आहे"</string>
     <string name="user_add_profile_item_summary" msgid="5418602404308968028">"तुम्ही आपल्या खात्यावरुन अ‍ॅप्स आणि सामग्रीमध्ये प्रवेश करण्यास प्रतिबंध करु शकता"</string>
     <string name="user_add_user_item_title" msgid="2394272381086965029">"वापरकर्ता"</string>
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"प्रतिबंधित प्रोफाईल"</string>
diff --git a/packages/SettingsLib/res/values-ms/arrays.xml b/packages/SettingsLib/res/values-ms/arrays.xml
index a2d314b..15fad67 100644
--- a/packages/SettingsLib/res/values-ms/arrays.xml
+++ b/packages/SettingsLib/res/values-ms/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Didayakan"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Lalai)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Lalai)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index a0a434f..68356df2 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Tunjukkan peranti Bluetooth tanpa nama"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Lumpuhkan kelantangan mutlak"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Dayakan Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Kesambungan Dipertingkat"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versi AVRCP Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Pilih Versi AVRCP Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versi MAP Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-my/arrays.xml b/packages/SettingsLib/res/values-my/arrays.xml
index 779d587..90bac81 100644
--- a/packages/SettingsLib/res/values-my/arrays.xml
+++ b/packages/SettingsLib/res/values-my/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ဖွင့်ထားသည်"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (မူလ)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (မူလ)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index fa49929..3729a83 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"အမည်မရှိသော ဘလူးတုသ်စက်ပစ္စည်းများကို ပြသရန်"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ပကတိ အသံနှုန်း သတ်မှတ်ချက် ပိတ်ရန်"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche ကို ဖွင့်ရန်"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"အရည်အသွေးမြှင့်တင်ထားသော ချိတ်ဆက်နိုင်မှု"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ဘလူးတုသ် AVRCP ဗားရှင်း"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ဘလူးတုသ် AVRCP ဗားရှင်းကို ရွေးပါ"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ဘလူးတုသ် MAP ဗားရှင်း"</string>
diff --git a/packages/SettingsLib/res/values-nb/arrays.xml b/packages/SettingsLib/res/values-nb/arrays.xml
index 8d005b3..275018b 100644
--- a/packages/SettingsLib/res/values-nb/arrays.xml
+++ b/packages/SettingsLib/res/values-nb/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Slått på"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (standard)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (standard)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index aeaba31..0e0e761 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Vis Bluetooth-enheter uten navn"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Slå av funksjonen for absolutt volum"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Aktiver Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Forbedret tilkobling"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP-versjon"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Velg Bluetooth AVRCP-versjon"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP-versjon"</string>
diff --git a/packages/SettingsLib/res/values-ne/arrays.xml b/packages/SettingsLib/res/values-ne/arrays.xml
index fb002c2..5ee6353 100644
--- a/packages/SettingsLib/res/values-ne/arrays.xml
+++ b/packages/SettingsLib/res/values-ne/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"सक्षम पारिएको छ"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP १.४ (पूर्वनिर्धारित)"</item>
+    <item msgid="6603880723315236832">"AVRCP १.५ (पूर्वनिर्धारित)"</item>
     <item msgid="1637054408779685086">"AVRCP १.३"</item>
-    <item msgid="8317734704797203949">"AVRCP १.५"</item>
+    <item msgid="5896162189744596291">"AVRCP १.४"</item>
     <item msgid="7556896992111771426">"AVRCP १.६"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp १३"</item>
-    <item msgid="4398977131424970917">"avrcp १५"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp १६"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index 32ea5a9..f768725 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -89,7 +89,7 @@
     <string name="bluetooth_profile_pbap" msgid="7064307749579335765">"सम्पर्क साझेदारी"</string>
     <string name="bluetooth_profile_pbap_summary" msgid="2955819694801952056">"सम्पर्क साझेदारीका लागि प्रयोग"</string>
     <string name="bluetooth_profile_pan_nap" msgid="7871974753822470050">"इन्टरनेट जडान साझेदारी गर्दै"</string>
-    <string name="bluetooth_profile_map" msgid="8907204701162107271">"पाठ सन्देशहरू"</string>
+    <string name="bluetooth_profile_map" msgid="8907204701162107271">"टेक्स्ट म्यासेजहरू"</string>
     <string name="bluetooth_profile_sap" msgid="8304170950447934386">"SIM पहुँच"</string>
     <string name="bluetooth_profile_a2dp_high_quality" msgid="4739440941324792775">"HD अडियो: <xliff:g id="CODEC_NAME">%1$s</xliff:g>"</string>
     <string name="bluetooth_profile_a2dp_high_quality_unknown_codec" msgid="2477639096903834374">"HD अडियो"</string>
@@ -112,7 +112,7 @@
     <string name="bluetooth_opp_profile_summary_use_for" msgid="461981154387015457">"फाइल ट्रान्सफरका लागि प्रयोग गर्नुहोस्"</string>
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"इनपुटको लागि प्रयोग गर्नुहोस्"</string>
     <string name="bluetooth_hearing_aid_profile_summary_use_for" msgid="7689393730163320483">"श्रवण यन्त्रहरूका लागि प्रयोग गर्नुहोस्"</string>
-    <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"जोडी"</string>
+    <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"जोडा बनाउनुहोस्"</string>
     <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"जोडी"</string>
     <string name="bluetooth_pairing_decline" msgid="6483118841204885890">"रद्द गर्नुहोस्"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"जब जडान हुन्छ जोडी अनुदानले तपाईँको सम्पर्कहरू पहुँच गर्छ र इतिहास सम्झाउँछ।"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"नामकरण नगरिएका ब्लुटुथ यन्त्रहरू देखाउनुहोस्"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"निरपेक्ष आवाज असक्षम गर्नुहोस्"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche सक्षम पार्नुहोस्"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"परिष्कृत जडान"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ब्लुटुथको AVRCP संस्करण"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ब्लुटुथको AVRCP संस्करण चयन गर्नुहोस्"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ब्लुटुथको MAP संस्करण"</string>
@@ -306,7 +305,7 @@
     <string name="adbwifi_warning_message" msgid="8005936574322702388">"वायरलेस डिबगिङ डिभलपमेन्ट प्रयोजनका लागि मात्रै हो। यसलाई आफ्ना कम्प्युटर र उपकरणका बिच डेटा प्रतिलिपि गर्न, सूचना नदिई आफ्नो उपकरणमा एपहरू स्थापना गर्न र लग डेटा पढ्न प्रयोग गर्नुहोस्।"</string>
     <string name="adb_keys_warning_message" msgid="2968555274488101220">"तपाईं पहिले नै अधिकृत गर्नुभएका सबै कम्प्यूटरबाट USB डिबग गर्नको लागि पहुँच रद्द गर्ने हो?"</string>
     <string name="dev_settings_warning_title" msgid="8251234890169074553">"विकास सेटिङहरू अनुमति दिने हो?"</string>
-    <string name="dev_settings_warning_message" msgid="37741686486073668">"यी सेटिङहरू केवल विकास प्रयोगको लागि विचार गरिएको हो। तिनीहरूले तपाईंको उपकरण र अनुप्रयोगहरूलाई विच्छेदन गर्न वा दुर्व्यवहार गर्न सक्दछ।"</string>
+    <string name="dev_settings_warning_message" msgid="37741686486073668">"यी सेटिङहरू केवल विकास प्रयोगको लागि विचार गरिएको हो। तिनीहरूले तपाईंको उपकरण र एपहरूलाई विच्छेदन गर्न वा दुर्व्यवहार गर्न सक्दछ।"</string>
     <string name="verify_apps_over_usb_title" msgid="6031809675604442636">"USB मा एपहरू रुजु गर्नुहोस्"</string>
     <string name="verify_apps_over_usb_summary" msgid="1317933737581167839">"हानिकारक व्यवहारको लागि ADB/ADT को माध्यमबाट स्थापित अनुप्रयोगहरूको जाँच गर्नुहोस्।"</string>
     <string name="bluetooth_show_devices_without_names_summary" msgid="780964354377854507">"नामकरण नगरिएका ब्लुटुथ यन्त्रहरू (MAC ठेगाना भएका मात्र) देखाइनेछ"</string>
diff --git a/packages/SettingsLib/res/values-nl/arrays.xml b/packages/SettingsLib/res/values-nl/arrays.xml
index 9b94ae50..bfbbae0 100644
--- a/packages/SettingsLib/res/values-nl/arrays.xml
+++ b/packages/SettingsLib/res/values-nl/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Ingeschakeld"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (standaard)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (standaard)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index 044401c..27f5dc9 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Bluetooth-apparaten zonder namen weergeven"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Absoluut volume uitschakelen"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche inschakelen"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Verbeterde connectiviteit"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth-AVRCP-versie"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth-AVRCP-versie selecteren"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"MAP-versie voor bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-or/arrays.xml b/packages/SettingsLib/res/values-or/arrays.xml
index 5928a87..4a3d5d7 100644
--- a/packages/SettingsLib/res/values-or/arrays.xml
+++ b/packages/SettingsLib/res/values-or/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ସକ୍ଷମ କରାଯାଇଛି"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ଡିଫଲ୍ଟ)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ଡିଫଲ୍ଟ)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index 8e5bf25..d200f50 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"ବ୍ଲୁଟୂଥ୍‍‌ ଡିଭାଇସ୍‌ଗୁଡ଼ିକୁ ନାମ ବିନା ଦେଖନ୍ତୁ"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ପୂର୍ଣ୍ଣ ଭଲ୍ୟୁମ୍‌ ଅକ୍ଷମ କରନ୍ତୁ"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"ଗାବେଲ୍‌ଡୋର୍ସ ସକ୍ରିୟ କରନ୍ତୁ"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"ଏନହାନ୍ସଡ୍ କନେକ୍ଟିଭିଟି"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ବ୍ଲୁଟୂଥ୍‌ AVRCP ଭର୍ସନ୍"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ବ୍ଲୁଟୂଥ୍‍‌ AVRCP ଭର୍ସନ୍‌"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"ବ୍ଲୁଟୁଥ୍ MAP ସଂସ୍କରଣ"</string>
diff --git a/packages/SettingsLib/res/values-pa/arrays.xml b/packages/SettingsLib/res/values-pa/arrays.xml
index 48e7fb4..d594f3b 100644
--- a/packages/SettingsLib/res/values-pa/arrays.xml
+++ b/packages/SettingsLib/res/values-pa/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ਚਾਲੂ"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ਪੂਰਵ-ਨਿਰਧਾਰਤ)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ਪੂਰਵ-ਨਿਰਧਾਰਤ)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index 1570013..354ee12 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"ਅਨਾਮ ਬਲੂਟੁੱਥ ਡੀਵਾਈਸਾਂ ਦਿਖਾਓ"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ਪੂਰਨ ਅਵਾਜ਼ ਨੂੰ ਬੰਦ ਕਰੋ"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche ਨੂੰ ਚਾਲੂ ਕਰੋ"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"ਵਿਸਤ੍ਰਿਤ ਕਨੈਕਟੀਵਿਟੀ"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"ਬਲੂਟੁੱਥ AVRCP ਵਰਜਨ"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"ਬਲੂਟੁੱਥ AVRCP ਵਰਜਨ ਚੁਣੋ"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP ਵਰਜਨ"</string>
diff --git a/packages/SettingsLib/res/values-pl/arrays.xml b/packages/SettingsLib/res/values-pl/arrays.xml
index 552ef6b..eb33323 100644
--- a/packages/SettingsLib/res/values-pl/arrays.xml
+++ b/packages/SettingsLib/res/values-pl/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Włączono"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (domyślna)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (domyślna)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index 1120c50..8089f25 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -148,7 +148,7 @@
     <string name="tether_settings_title_bluetooth" msgid="916519902721399656">"Tethering przez Bluetooth"</string>
     <string name="tether_settings_title_usb_bluetooth" msgid="1727111807207577322">"Tethering"</string>
     <string name="tether_settings_title_all" msgid="8910259483383010470">"Tethering i punkt dostępu"</string>
-    <string name="managed_user_title" msgid="449081789742645723">"Wszystkie aplikacje do pracy"</string>
+    <string name="managed_user_title" msgid="449081789742645723">"Wszystkie aplikacje służbowe"</string>
     <string name="user_guest" msgid="6939192779649870792">"Gość"</string>
     <string name="unknown" msgid="3544487229740637809">"Nieznana"</string>
     <string name="running_process_item_user_label" msgid="3988506293099805796">"Użytkownik: <xliff:g id="USER_NAME">%1$s</xliff:g>"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Pokaż urządzenia Bluetooth bez nazw"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Wyłącz głośność bezwzględną"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Włącz Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Lepsza obsługa połączeń"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Wersja AVRCP Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Wybierz wersję AVRCP Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Wersja MAP Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-pt-rBR/arrays.xml b/packages/SettingsLib/res/values-pt-rBR/arrays.xml
index ca154e5..81285aa 100644
--- a/packages/SettingsLib/res/values-pt-rBR/arrays.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Ativado"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (padrão)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (padrão)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index 4214a27..fb12ecc 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -147,7 +147,7 @@
     <string name="tether_settings_title_wifi" msgid="4803402057533895526">"Ponto de acesso portátil"</string>
     <string name="tether_settings_title_bluetooth" msgid="916519902721399656">"Tethering Bluetooth"</string>
     <string name="tether_settings_title_usb_bluetooth" msgid="1727111807207577322">"Tethering"</string>
-    <string name="tether_settings_title_all" msgid="8910259483383010470">"Tethering e acesso portátil"</string>
+    <string name="tether_settings_title_all" msgid="8910259483383010470">"Tethering e ponto de acesso"</string>
     <string name="managed_user_title" msgid="449081789742645723">"Todos os apps de trabalho"</string>
     <string name="user_guest" msgid="6939192779649870792">"Convidado"</string>
     <string name="unknown" msgid="3544487229740637809">"Desconhecido"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Mostrar dispositivos Bluetooth sem nomes"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Desativar volume absoluto"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Ativar Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Conectividade melhorada"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versão do Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Selecionar versão do Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versão MAP do Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-pt-rPT/arrays.xml b/packages/SettingsLib/res/values-pt-rPT/arrays.xml
index 527f740..019a5f6 100644
--- a/packages/SettingsLib/res/values-pt-rPT/arrays.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Ativado"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (predefinição)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (predefinição)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index 508cbfc..2d9f037 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Mostrar dispositivos Bluetooth sem nomes"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Desativar volume absoluto"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Ativar o Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Conetividade melhorada"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versão de Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Selecionar versão de Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versão do MAP do Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-pt/arrays.xml b/packages/SettingsLib/res/values-pt/arrays.xml
index ca154e5..81285aa 100644
--- a/packages/SettingsLib/res/values-pt/arrays.xml
+++ b/packages/SettingsLib/res/values-pt/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Ativado"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (padrão)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (padrão)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index 4214a27..fb12ecc 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -147,7 +147,7 @@
     <string name="tether_settings_title_wifi" msgid="4803402057533895526">"Ponto de acesso portátil"</string>
     <string name="tether_settings_title_bluetooth" msgid="916519902721399656">"Tethering Bluetooth"</string>
     <string name="tether_settings_title_usb_bluetooth" msgid="1727111807207577322">"Tethering"</string>
-    <string name="tether_settings_title_all" msgid="8910259483383010470">"Tethering e acesso portátil"</string>
+    <string name="tether_settings_title_all" msgid="8910259483383010470">"Tethering e ponto de acesso"</string>
     <string name="managed_user_title" msgid="449081789742645723">"Todos os apps de trabalho"</string>
     <string name="user_guest" msgid="6939192779649870792">"Convidado"</string>
     <string name="unknown" msgid="3544487229740637809">"Desconhecido"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Mostrar dispositivos Bluetooth sem nomes"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Desativar volume absoluto"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Ativar Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Conectividade melhorada"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versão do Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Selecionar versão do Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versão MAP do Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-ro/arrays.xml b/packages/SettingsLib/res/values-ro/arrays.xml
index 5d25101..48a3fa7 100644
--- a/packages/SettingsLib/res/values-ro/arrays.xml
+++ b/packages/SettingsLib/res/values-ro/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Activat"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (prestabilit)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (prestabilit)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index 663d3f7..728db17 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Afișați dispozitivele Bluetooth fără nume"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Dezactivați volumul absolut"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Activați Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Conectivitate îmbunătățită"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versiunea AVRCP pentru Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Selectați versiunea AVRCP pentru Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versiunea MAP pentru Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-ru/arrays.xml b/packages/SettingsLib/res/values-ru/arrays.xml
index f5367a4..5617aa6 100644
--- a/packages/SettingsLib/res/values-ru/arrays.xml
+++ b/packages/SettingsLib/res/values-ru/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Включено"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (по умолчанию)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (по умолчанию)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"AVRCP15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"AVRCP14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index 9c0a2f5..ff2115e 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Показывать Bluetooth-устройства без названий"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Отключить абсолютный уровень громкости"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Включить Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Улучшенный обмен данными"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Версия Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Выберите версию Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Версия Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/res/values-si/arrays.xml b/packages/SettingsLib/res/values-si/arrays.xml
index f8c871e..01d0dd2 100644
--- a/packages/SettingsLib/res/values-si/arrays.xml
+++ b/packages/SettingsLib/res/values-si/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"සබලයි"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (පෙරනිමි)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (පෙරනිමි)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index 8d0e93e..a883cc6 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"නම් නොමැති බ්ලූටූත් උපාංග පෙන්වන්න"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"නිරපේක්ෂ හඩ පරිමාව අබල කරන්න"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche සබල කරන්න"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"වැඩිදියුණු කළ සබැඳුම් හැකියාව"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"බ්ලූටූත් AVRCP අනුවාදය"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"බ්ලූටූත් AVRCP අනුවාදය තෝරන්න"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP අනුවාදය"</string>
diff --git a/packages/SettingsLib/res/values-sk/arrays.xml b/packages/SettingsLib/res/values-sk/arrays.xml
index f862d88..5dcf791 100644
--- a/packages/SettingsLib/res/values-sk/arrays.xml
+++ b/packages/SettingsLib/res/values-sk/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Aktivované"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (predvolené)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (predvolené)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index f39a741..cc1626c 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -81,7 +81,7 @@
     <string name="bluetooth_battery_level" msgid="2893696778200201555">"Batéria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
     <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"Ľ: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g> batérie, P: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g> batérie"</string>
     <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"Aktívne"</string>
-    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Zvuk medií"</string>
+    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Zvuk médií"</string>
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"Telefonické hovory"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"Prenos súborov"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"Vstupné zariadenie"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Zobrazovať zariadenia Bluetooth bez názvov"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Zakázať absolútnu hlasitosť"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Povoliť Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Zlepšené možnosti pripojenia"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Verzia rozhrania Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Zvoľte verziu rozhrania Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Verzia profilu Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/res/values-sl/arrays.xml b/packages/SettingsLib/res/values-sl/arrays.xml
index 80042a6..7ba23af 100644
--- a/packages/SettingsLib/res/values-sl/arrays.xml
+++ b/packages/SettingsLib/res/values-sl/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Omogočeno"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (privzeto)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (privzeto)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index 233c8e4..fd216e8 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Prikaži naprave Bluetooth brez imen"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Onemogočanje absolutne glasnosti"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Omogoči Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Izboljšana povezljivost"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Različica profila AVRCP za Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Izberite različico profila AVRCP za Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Različica profila MAP za Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-sq/arrays.xml b/packages/SettingsLib/res/values-sq/arrays.xml
index 1363e83..fccfc2f 100644
--- a/packages/SettingsLib/res/values-sq/arrays.xml
+++ b/packages/SettingsLib/res/values-sq/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Aktiv"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (I parazgjedhur)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (I parazgjedhur)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index 6af1062..002c7fc 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Shfaq pajisjet me Bluetooth pa emra"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Çaktivizo volumin absolut"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Aktivizo Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Lidhshmëria e përmirësuar"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Versioni AVRCP i Bluetooth-it"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Zgjidh versionin AVRCP të Bluetooth-it"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Versioni MAP i Bluetooth-it"</string>
diff --git a/packages/SettingsLib/res/values-sr/arrays.xml b/packages/SettingsLib/res/values-sr/arrays.xml
index a4e9156..11b4b76 100644
--- a/packages/SettingsLib/res/values-sr/arrays.xml
+++ b/packages/SettingsLib/res/values-sr/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Омогућено"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (подразумевано)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (подразумевано)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index 74c2aec..155565a 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -27,7 +27,7 @@
     <string name="wifi_disabled_generic" msgid="2651916945380294607">"Онемогућено"</string>
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"IP конфигурација је отказала"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"Није повезано због лошег квалитета мреже"</string>
-    <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"Wi-Fi веза је отказала"</string>
+    <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"WiFi веза је отказала"</string>
     <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Проблем са потврдом идентитета"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"Повезивање није успело"</string>
     <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"Повезивање са „<xliff:g id="AP_NAME">%1$s</xliff:g>“ није успело"</string>
@@ -131,12 +131,12 @@
     <string name="bluetooth_hearingaid_right_pairing_message" msgid="2655347721696331048">"Упаривање десног слушног апарата…"</string>
     <string name="bluetooth_hearingaid_left_battery_level" msgid="7375621694748104876">"Леви – ниво батерије је <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
     <string name="bluetooth_hearingaid_right_battery_level" msgid="1850094448499089312">"Десни – ниво батерије је <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
-    <string name="accessibility_wifi_off" msgid="1195445715254137155">"Wi-Fi је искључен."</string>
-    <string name="accessibility_no_wifi" msgid="5297119459491085771">"Wi-Fi веза је прекинута."</string>
-    <string name="accessibility_wifi_one_bar" msgid="6025652717281815212">"Wi-Fi сигнал има једну црту."</string>
-    <string name="accessibility_wifi_two_bars" msgid="687800024970972270">"Wi-Fi сигнал има две црте."</string>
-    <string name="accessibility_wifi_three_bars" msgid="779895671061950234">"Wi-Fi сигнал има три црте."</string>
-    <string name="accessibility_wifi_signal_full" msgid="7165262794551355617">"Wi-Fi сигнал је најјачи."</string>
+    <string name="accessibility_wifi_off" msgid="1195445715254137155">"WiFi је искључен."</string>
+    <string name="accessibility_no_wifi" msgid="5297119459491085771">"WiFi веза је прекинута."</string>
+    <string name="accessibility_wifi_one_bar" msgid="6025652717281815212">"WiFi сигнал има једну црту."</string>
+    <string name="accessibility_wifi_two_bars" msgid="687800024970972270">"WiFi сигнал има две црте."</string>
+    <string name="accessibility_wifi_three_bars" msgid="779895671061950234">"WiFi сигнал има три црте."</string>
+    <string name="accessibility_wifi_signal_full" msgid="7165262794551355617">"WiFi сигнал је најјачи."</string>
     <string name="accessibility_wifi_security_type_none" msgid="162352241518066966">"Отворена мрежа"</string>
     <string name="accessibility_wifi_security_type_secured" msgid="2399774097343238942">"Безбедна мрежа"</string>
     <string name="process_kernel_label" msgid="950292573930336765">"Android ОС"</string>
@@ -232,7 +232,7 @@
     <string name="adb_wireless_ip_addr_preference_title" msgid="8335132107715311730">"IP адреса и порт"</string>
     <string name="adb_wireless_qrcode_pairing_title" msgid="1906409667944674707">"Скенирај QR кôд"</string>
     <string name="adb_wireless_qrcode_pairing_description" msgid="6014121407143607851">"Упарите уређај помоћу Wi‑Fi мреже тако што ћете скенирати QR кôд"</string>
-    <string name="adb_wireless_no_network_msg" msgid="2365795244718494658">"Повежите се на Wi-Fi мрежу"</string>
+    <string name="adb_wireless_no_network_msg" msgid="2365795244718494658">"Повежите се на WiFi мрежу"</string>
     <string name="keywords_adb_wireless" msgid="6507505581882171240">"adb, отклањање грешака, програмер"</string>
     <string name="bugreport_in_power" msgid="8664089072534638709">"Пречица за извештај о грешкама"</string>
     <string name="bugreport_in_power_summary" msgid="1885529649381831775">"Прикажи дугме у менију напајања за прављење извештаја о грешкама"</string>
@@ -250,14 +250,13 @@
     <string name="debug_networking_category" msgid="6829757985772659599">"Умрежавање"</string>
     <string name="wifi_display_certification" msgid="1805579519992520381">"Сертификација бежичног екрана"</string>
     <string name="wifi_verbose_logging" msgid="1785910450009679371">"Омогући детаљнију евиденцију за Wi‑Fi"</string>
-    <string name="wifi_scan_throttling" msgid="2985624788509913617">"Успоравање Wi-Fi скенирања"</string>
+    <string name="wifi_scan_throttling" msgid="2985624788509913617">"Успоравање WiFi скенирања"</string>
     <string name="wifi_enhanced_mac_randomization" msgid="5437378364995776979">"Насумично MAC разврставање по Wi‑Fi‑ју"</string>
     <string name="mobile_data_always_on" msgid="8275958101875563572">"Мобилни подаци су увек активни"</string>
     <string name="tethering_hardware_offload" msgid="4116053719006939161">"Хардверско убрзање привезивања"</string>
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Прикажи Bluetooth уређаје без назива"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Онемогући главно подешавање јачине звука"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Омогући Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Побољшано повезивање"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Верзија Bluetooth AVRCP-а"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Изаберите верзију Bluetooth AVRCP-а"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Верзија Bluetooth MAP-а"</string>
diff --git a/packages/SettingsLib/res/values-sv/arrays.xml b/packages/SettingsLib/res/values-sv/arrays.xml
index b5b1186a..be68c71 100644
--- a/packages/SettingsLib/res/values-sv/arrays.xml
+++ b/packages/SettingsLib/res/values-sv/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Aktiverad"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (standard)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (standard)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index fe1b0a8..4371b72 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -112,7 +112,7 @@
     <string name="bluetooth_opp_profile_summary_use_for" msgid="461981154387015457">"Använd för filöverföring"</string>
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"Använd för inmatning"</string>
     <string name="bluetooth_hearing_aid_profile_summary_use_for" msgid="7689393730163320483">"Använd med hörapparater"</string>
-    <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"Parkoppling"</string>
+    <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"Parkoppla"</string>
     <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"PARKOPPLA"</string>
     <string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Avbryt"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Om du kopplar enheten får du tillgång till dina kontakter och din samtalshistorik när du är ansluten."</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Visa namnlösa Bluetooth-enheter"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Inaktivera Absolute volume"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Aktivera Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Förbättrad anslutning"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"AVRCP-version för Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Välj AVRCP-version för Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"MAP-version för Bluetooth"</string>
@@ -452,7 +451,7 @@
     <string name="battery_info_status_charging_fast" msgid="8027559755902954885">"Laddas snabbt"</string>
     <string name="battery_info_status_charging_slow" msgid="3190803837168962319">"Laddas långsamt"</string>
     <string name="battery_info_status_discharging" msgid="6962689305413556485">"Laddar inte"</string>
-    <string name="battery_info_status_not_charging" msgid="8330015078868707899">"Inkopplad, kan inte laddas just nu"</string>
+    <string name="battery_info_status_not_charging" msgid="8330015078868707899">"Ansluten, kan inte laddas just nu"</string>
     <string name="battery_info_status_full" msgid="4443168946046847468">"Fullt"</string>
     <string name="disabled_by_admin_summary_text" msgid="5343911767402923057">"Strys av administratören"</string>
     <string name="disabled" msgid="8017887509554714950">"Inaktiverad"</string>
diff --git a/packages/SettingsLib/res/values-sw/arrays.xml b/packages/SettingsLib/res/values-sw/arrays.xml
index af39356..da99b91 100644
--- a/packages/SettingsLib/res/values-sw/arrays.xml
+++ b/packages/SettingsLib/res/values-sw/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Imewashwa"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Chaguomsingi)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Chaguomsingi)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index 85275c1..e944c64 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -81,11 +81,11 @@
     <string name="bluetooth_battery_level" msgid="2893696778200201555">"Chaji ya betri ni <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
     <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"L: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g> ya betri, R: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g> ya betri"</string>
     <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"Kimeunganishwa"</string>
-    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Media ya sauti"</string>
+    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Sauti ya maudhui"</string>
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"Simu"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"Uhamishaji wa faili"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"Kifaa cha kuingiza"</string>
-    <string name="bluetooth_profile_pan" msgid="1006235139308318188">"Ufikiaji wa mtandao"</string>
+    <string name="bluetooth_profile_pan" msgid="1006235139308318188">"Ufikiaji wa intaneti"</string>
     <string name="bluetooth_profile_pbap" msgid="7064307749579335765">"Kushiriki anwani"</string>
     <string name="bluetooth_profile_pbap_summary" msgid="2955819694801952056">"Tumia kwa kushiriki anwani"</string>
     <string name="bluetooth_profile_pan_nap" msgid="7871974753822470050">"Kushiriki muunganisho wa tovuti"</string>
@@ -107,7 +107,7 @@
     <string name="bluetooth_pan_profile_summary_use_for" msgid="7422039765025340313">"Tumia kuunganisha kwenye intaneti"</string>
     <string name="bluetooth_map_profile_summary_use_for" msgid="4453622103977592583">"Tumia kwa ramani"</string>
     <string name="bluetooth_sap_profile_summary_use_for" msgid="6204902866176714046">"Tumia kwa ufikiaji wa SIM"</string>
-    <string name="bluetooth_a2dp_profile_summary_use_for" msgid="7324694226276491807">"Tumia kwa sauti ya media"</string>
+    <string name="bluetooth_a2dp_profile_summary_use_for" msgid="7324694226276491807">"Tumia kwa sauti ya maudhui"</string>
     <string name="bluetooth_headset_profile_summary_use_for" msgid="808970643123744170">"Tumia kwa sauti ya simu"</string>
     <string name="bluetooth_opp_profile_summary_use_for" msgid="461981154387015457">"Tumia kwa hali faili"</string>
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"Tumia kwa kuingiza"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Onyesha vifaa vya Bluetooth visivyo na majina"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Zima sauti kamili"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Washa Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Muunganisho Ulioboreshwa"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Toleo la Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Chagua Toleo la Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Toleo la Ramani ya Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-ta/arrays.xml b/packages/SettingsLib/res/values-ta/arrays.xml
index 0f19148..1c55954 100644
--- a/packages/SettingsLib/res/values-ta/arrays.xml
+++ b/packages/SettingsLib/res/values-ta/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"இயக்கப்பட்டது"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (இயல்பு)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (இயல்பு)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index 241644f..7837dd8 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"பெயர்கள் இல்லாத புளூடூத் சாதனங்களைக் காட்டு"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"அப்சல்யூட் ஒலியளவு அம்சத்தை முடக்கு"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorscheவை இயக்கு"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"மேம்படுத்தப்பட்ட இணைப்புநிலை"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"புளூடூத் AVRCP பதிப்பு"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"புளூடூத் AVRCP பதிப்பைத் தேர்ந்தெடு"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"புளூடூத்தின் MAP பதிப்பு"</string>
diff --git a/packages/SettingsLib/res/values-te/arrays.xml b/packages/SettingsLib/res/values-te/arrays.xml
index 23256ee..e1c0406 100644
--- a/packages/SettingsLib/res/values-te/arrays.xml
+++ b/packages/SettingsLib/res/values-te/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"ప్రారంభించబడింది"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (డిఫాల్ట్)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.4 (ఆటోమేటిక్ సెట్టింగ్)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.3"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
@@ -86,7 +86,7 @@
     <item msgid="8147982633566548515">"map14"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_titles">
-    <item msgid="2494959071796102843">"సిస్టమ్ ఎంపికను ఉపయోగించండి (డిఫాల్ట్)"</item>
+    <item msgid="2494959071796102843">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item>
     <item msgid="4055460186095649420">"SBC"</item>
     <item msgid="720249083677397051">"AAC"</item>
     <item msgid="1049450003868150455">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX">aptX™</xliff:g> ఆడియో"</item>
@@ -94,7 +94,7 @@
     <item msgid="3825367753087348007">"LDAC"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_summaries">
-    <item msgid="8868109554557331312">"సిస్టమ్ ఎంపికను ఉపయోగించండి (డిఫాల్ట్)"</item>
+    <item msgid="8868109554557331312">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item>
     <item msgid="9024885861221697796">"SBC"</item>
     <item msgid="4688890470703790013">"AAC"</item>
     <item msgid="8627333814413492563">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX">aptX™</xliff:g> ఆడియో"</item>
@@ -102,38 +102,38 @@
     <item msgid="2553206901068987657">"LDAC"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
-    <item msgid="926809261293414607">"సిస్టమ్ ఎంపికను ఉపయోగించండి (డిఫాల్ట్)"</item>
+    <item msgid="926809261293414607">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item>
     <item msgid="8003118270854840095">"44.1 kHz"</item>
     <item msgid="3208896645474529394">"48.0 kHz"</item>
     <item msgid="8420261949134022577">"88.2 kHz"</item>
     <item msgid="8887519571067543785">"96.0 kHz"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_summaries">
-    <item msgid="2284090879080331090">"సిస్టమ్ ఎంపికను ఉపయోగించండి (డిఫాల్ట్)"</item>
+    <item msgid="2284090879080331090">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item>
     <item msgid="1872276250541651186">"44.1 kHz"</item>
     <item msgid="8736780630001704004">"48.0 kHz"</item>
     <item msgid="7698585706868856888">"88.2 kHz"</item>
     <item msgid="8946330945963372966">"96.0 kHz"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_bits_per_sample_titles">
-    <item msgid="2574107108483219051">"సిస్టమ్ ఎంపికను ఉపయోగించండి (డిఫాల్ట్)"</item>
+    <item msgid="2574107108483219051">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item>
     <item msgid="4671992321419011165">"16 బిట్‌లు/నమూనా"</item>
     <item msgid="1933898806184763940">"24 బిట్‌లు/నమూనా"</item>
     <item msgid="1212577207279552119">"32 బిట్‌లు/నమూనా"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_bits_per_sample_summaries">
-    <item msgid="9196208128729063711">"సిస్టమ్ ఎంపికను ఉపయోగించండి (డిఫాల్ట్)"</item>
+    <item msgid="9196208128729063711">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item>
     <item msgid="1084497364516370912">"16 బిట్‌లు/నమూనా"</item>
     <item msgid="2077889391457961734">"24 బిట్‌లు/నమూనా"</item>
     <item msgid="3836844909491316925">"32 బిట్‌లు/నమూనా"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_channel_mode_titles">
-    <item msgid="3014194562841654656">"సిస్టమ్ ఎంపికను ఉపయోగించండి (డిఫాల్ట్)"</item>
+    <item msgid="3014194562841654656">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item>
     <item msgid="5982952342181788248">"మోనో"</item>
     <item msgid="927546067692441494">"స్టీరియో"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_channel_mode_summaries">
-    <item msgid="1997302811102880485">"సిస్టమ్ ఎంపికను ఉపయోగించండి (డిఫాల్ట్)"</item>
+    <item msgid="1997302811102880485">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item>
     <item msgid="8005696114958453588">"మోనో"</item>
     <item msgid="1333279807604675720">"స్టీరియో"</item>
   </string-array>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index 20955ba..d5f36a6 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -156,14 +156,14 @@
     <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_default_rate_title" msgid="3964187817364304022">"ప్రసంగం రేట్"</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>
     <string name="tts_default_pitch_summary" msgid="9132719475281551884">"సమన్వయం చేసిన ప్రసంగం యొక్క టోన్‌ను ప్రభావితం చేస్తుంది"</string>
     <string name="tts_default_lang_title" msgid="4698933575028098940">"భాష"</string>
     <string name="tts_lang_use_system" msgid="6312945299804012406">"సిస్టమ్ భాషను ఉపయోగించు"</string>
     <string name="tts_lang_not_selected" msgid="7927823081096056147">"భాష ఎంచుకోబడలేదు"</string>
-    <string name="tts_default_lang_summary" msgid="9042620014800063470">"చదవి వినిపించబడే వచనం కోసం భాష-నిర్దిష్ట వాయిస్‌ను సెట్ చేస్తుంది"</string>
+    <string name="tts_default_lang_summary" msgid="9042620014800063470">"టెక్స్ట్‌ను చదివి వినిపించేటప్పుడు, ఒక్కో భాషకు వాడాల్సిన నిర్దిష్ట వాయిస్‌ను సెట్ చేస్తుంది"</string>
     <string name="tts_play_example_title" msgid="1599468547216481684">"ఒక ఉదాహరణ వినండి"</string>
     <string name="tts_play_example_summary" msgid="634044730710636383">"ప్రసంగ సమన్వయం గురించి సంక్షిప్త ప్రదర్శనను ప్లే చేయి"</string>
     <string name="tts_install_data_title" msgid="1829942496472751703">"వాయిస్ డేటాను ఇన్‌స్టాల్ చేయి"</string>
@@ -196,7 +196,7 @@
     <string name="choose_profile" msgid="343803890897657450">"ప్రొఫైల్‌ను ఎంచుకోండి"</string>
     <string name="category_personal" msgid="6236798763159385225">"వ్యక్తిగతం"</string>
     <string name="category_work" msgid="4014193632325996115">"ఆఫీస్"</string>
-    <string name="development_settings_title" msgid="140296922921597393">"డెవలపర్ ఎంపికలు"</string>
+    <string name="development_settings_title" msgid="140296922921597393">"డెవలపర్ ఆప్షన్‌లు"</string>
     <string name="development_settings_enable" msgid="4285094651288242183">"డెవలపర్ ఎంపికలను ప్రారంభించండి"</string>
     <string name="development_settings_summary" msgid="8718917813868735095">"అనువర్తన అభివృద్ధి కోసం ఎంపికలను సెట్ చేయండి"</string>
     <string name="development_settings_not_available" msgid="355070198089140951">"ఈ వినియోగదారు కోసం డెవలపర్ ఎంపికలు అందుబాటులో లేవు"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"పేర్లు లేని బ్లూటూత్ పరికరాలు  చూపించు"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"సంపూర్ణ వాల్యూమ్‌‍ను నిలిపివేయి"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorscheను ఎనేబుల్ చేయి"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"మెరుగైన కనెక్టివిటీ"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"బ్లూటూత్ AVRCP వెర్షన్"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"బ్లూటూత్ AVRCP సంస్కరణను ఎంచుకోండి"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"బ్లూటూత్ MAP వెర్షన్‌"</string>
@@ -281,7 +280,7 @@
     <string name="private_dns_mode_provider" msgid="3619040641762557028">"ప్రైవేట్ DNS ప్రదాత హోస్ట్‌పేరు"</string>
     <string name="private_dns_mode_provider_hostname_hint" msgid="6564868953748514595">"DNS ప్రదాత యొక్క హోస్ట్‌పేరును నమోదు చేయండి"</string>
     <string name="private_dns_mode_provider_failure" msgid="8356259467861515108">"కనెక్ట్ చేయడం సాధ్యపడలేదు"</string>
-    <string name="wifi_display_certification_summary" msgid="8111151348106907513">"వైర్‌లెస్ ప్రదర్శన సర్టిఫికెట్ కోసం ఎంపికలను చూపు"</string>
+    <string name="wifi_display_certification_summary" msgid="8111151348106907513">"వైర్‌లెస్ డిస్‌ప్లే సర్టిఫికేషన్ ఆప్షన్‌లను చూపు"</string>
     <string name="wifi_verbose_logging_summary" msgid="4993823188807767892">"Wi‑Fi ఎంపికలో SSID RSSI ప్రకారం చూపబడే Wi‑Fi లాగింగ్ స్థాయిని పెంచండి"</string>
     <string name="wifi_scan_throttling_summary" msgid="2577105472017362814">"బ్యాటరీ శక్తి వినియోగాన్ని తగ్గించి &amp; నెట్‌వర్క్ పనితీరును మెరుగుపరుస్తుంది"</string>
     <string name="wifi_enhanced_mac_randomization_summary" msgid="1210663439867489931">"ఈ మోడ్ ఎనేబుల్ అయ్యాక, MAC ర్యాండమైజేషన్‌ను ఎనేబుల్ చేసిన నెట్‌వర్క్‌తో కనెక్ట్ అయ్యే ప్రతిసారీ ఈ పరికరం MAC అడ్రస్ మారవచ్చు."</string>
@@ -367,7 +366,7 @@
     <string name="overlay_display_devices_title" msgid="5411894622334469607">"ప్రత్యామ్నాయ ప్రదర్శనలను అనుకరించండి"</string>
     <string name="debug_applications_category" msgid="5394089406638954196">"యాప్‌లు"</string>
     <string name="immediately_destroy_activities" msgid="1826287490705167403">"కార్యకలాపాలను ఉంచవద్దు"</string>
-    <string name="immediately_destroy_activities_summary" msgid="6289590341144557614">"ప్రతి కార్యకలాపాన్ని వినియోగదారు నిష్క్రమించిన వెంటనే తొలగించండి"</string>
+    <string name="immediately_destroy_activities_summary" msgid="6289590341144557614">"యూజర్ నిష్క్రమించాక పూర్తి యాక్టివిటీ తొలగింపు"</string>
     <string name="app_process_limit_title" msgid="8361367869453043007">"బ్యాక్‌గ్రౌండ్ ప్రాసెస్ పరిమితి"</string>
     <string name="show_all_anrs" msgid="9160563836616468726">"బ్యాక్‌గ్రౌండ్ ANRలను చూపు"</string>
     <string name="show_all_anrs_summary" msgid="8562788834431971392">"నేపథ్య యాప్‌ల కోసం యాప్ ప్రతిస్పందించడం లేదు అనే డైలాగ్‌ను చూపు"</string>
@@ -473,7 +472,7 @@
     <string name="screen_zoom_summary_very_large" msgid="7317423942896999029">"చాలా పెద్దగా"</string>
     <string name="screen_zoom_summary_extremely_large" msgid="1438045624562358554">"అతి పెద్దగా"</string>
     <string name="screen_zoom_summary_custom" msgid="3468154096832912210">"అనుకూలం (<xliff:g id="DENSITYDPI">%d</xliff:g>)"</string>
-    <string name="content_description_menu_button" msgid="6254844309171779931">"మెను"</string>
+    <string name="content_description_menu_button" msgid="6254844309171779931">"మెనూ"</string>
     <string name="retail_demo_reset_message" msgid="5392824901108195463">"డెమో మోడ్‌లో ఫ్యాక్టరీ రీసెట్‌ను నిర్వహించడానికి పాస్‌వర్డ్‌ను నమోదు చేయండి"</string>
     <string name="retail_demo_reset_next" msgid="3688129033843885362">"తర్వాత"</string>
     <string name="retail_demo_reset_title" msgid="1866911701095959800">"పాస్‌వర్డ్ అవసరం"</string>
diff --git a/packages/SettingsLib/res/values-th/arrays.xml b/packages/SettingsLib/res/values-th/arrays.xml
index 8aac165..21fe6e4 100644
--- a/packages/SettingsLib/res/values-th/arrays.xml
+++ b/packages/SettingsLib/res/values-th/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"เปิดใช้"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (ค่าเริ่มต้น)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (ค่าเริ่มต้น)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
@@ -138,15 +138,15 @@
     <item msgid="1333279807604675720">"สเตอริโอ"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
-    <item msgid="1241278021345116816">"เพิ่มประสิทธิภาพสำหรับคุณภาพเสียง (990 kbps/909 kbps)"</item>
+    <item msgid="1241278021345116816">"เพิ่มประสิทธิภาพเพื่อคุณภาพเสียง (990 kbps/909 kbps)"</item>
     <item msgid="3523665555859696539">"คุณภาพเสียงและการเชื่อมต่อที่สมดุล (660 kbps/606 kbps)"</item>
-    <item msgid="886408010459747589">"เพิ่มประสิทธิภาพสำหรับคุณภาพการเชื่อมต่อ (330 kbps/303 kbps)"</item>
+    <item msgid="886408010459747589">"เพิ่มประสิทธิภาพเพื่อคุณภาพการเชื่อมต่อ (330 kbps/303 kbps)"</item>
     <item msgid="3808414041654351577">"ดีที่สุดเท่าที่ทำได้ (ปรับอัตราบิตอัตโนมัติ)"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
-    <item msgid="804499336721569838">"เพิ่มประสิทธิภาพสำหรับคุณภาพเสียง"</item>
+    <item msgid="804499336721569838">"เพิ่มประสิทธิภาพเพื่อคุณภาพเสียง"</item>
     <item msgid="7451422070435297462">"คุณภาพเสียงและการเชื่อมต่อที่สมดุล"</item>
-    <item msgid="6173114545795428901">"เพิ่มประสิทธิภาพสำหรับคุณภาพการเชื่อมต่อ"</item>
+    <item msgid="6173114545795428901">"เพิ่มประสิทธิภาพเพื่อคุณภาพการเชื่อมต่อ"</item>
     <item msgid="4349908264188040530">"ดีที่สุดเท่าที่ทำได้ (ปรับอัตราบิตอัตโนมัติ)"</item>
   </string-array>
   <string-array name="bluetooth_audio_active_device_summaries">
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index 8510a91..7468d04 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"แสดงอุปกรณ์บลูทูธที่ไม่มีชื่อ"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"ปิดใช้การควบคุมระดับเสียงของอุปกรณ์อื่น"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"เปิดใช้ Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"การเชื่อมต่อที่ปรับปรุงแล้ว"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"เวอร์ชันของบลูทูธ AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"เลือกเวอร์ชันของบลูทูธ AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"เวอร์ชัน MAP ของบลูทูธ"</string>
diff --git a/packages/SettingsLib/res/values-tl/arrays.xml b/packages/SettingsLib/res/values-tl/arrays.xml
index 9e08b8f..9f07cff 100644
--- a/packages/SettingsLib/res/values-tl/arrays.xml
+++ b/packages/SettingsLib/res/values-tl/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Naka-enable"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Default)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Default)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 8aeb392..5d4e975 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Ipakita ang mga Bluetooth device na walang pangalan"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"I-disable ang absolute volume"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"I-enable ang Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Pinagandang Pagkakonekta"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bersyon ng AVRCP ng Bluetooth"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Pumili ng Bersyon ng AVRCP ng Bluetooth"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bersyon ng MAP ng Bluetooth"</string>
diff --git a/packages/SettingsLib/res/values-tr/arrays.xml b/packages/SettingsLib/res/values-tr/arrays.xml
index cea17e5..fc90c9a 100644
--- a/packages/SettingsLib/res/values-tr/arrays.xml
+++ b/packages/SettingsLib/res/values-tr/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Etkin"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Varsayılan)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Varsayılan)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index e6d9380..f01f3fa 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Adsız Bluetooth cihazlarını göster"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Mutlak sesi iptal et"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche\'yi etkileştir"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Gelişmiş Bağlantı"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP Sürümü"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP Sürümünü seçin"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP Sürümü"</string>
diff --git a/packages/SettingsLib/res/values-uk/arrays.xml b/packages/SettingsLib/res/values-uk/arrays.xml
index 2d0abe0..4405c37 100644
--- a/packages/SettingsLib/res/values-uk/arrays.xml
+++ b/packages/SettingsLib/res/values-uk/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Увімкнено"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (за умовчанням)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (за умовчанням)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"acrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index cf1fafd..81e01b5 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -195,7 +195,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="development_settings_title" msgid="140296922921597393">"Параметри розробника"</string>
     <string name="development_settings_enable" msgid="4285094651288242183">"Увімкнути параметри розробника"</string>
     <string name="development_settings_summary" msgid="8718917813868735095">"Установити параметри для розробки програми"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Показувати пристрої Bluetooth без назв"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Вимкнути абсолютну гучність"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Увімкнути Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Покращене з\'єднання"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Версія Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Виберіть версію Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Версія Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/res/values-ur/arrays.xml b/packages/SettingsLib/res/values-ur/arrays.xml
index 3776503..f4c2500 100644
--- a/packages/SettingsLib/res/values-ur/arrays.xml
+++ b/packages/SettingsLib/res/values-ur/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"فعال"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"‏AVRCP 1.4 (ڈیفالٹ)"</item>
+    <item msgid="6603880723315236832">"‏AVRCP 1.5 (ڈیفالٹ)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index b7fbe6f..de90c9a 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -197,9 +197,9 @@
     <string name="category_personal" msgid="6236798763159385225">"ذاتی"</string>
     <string name="category_work" msgid="4014193632325996115">"دفتر"</string>
     <string name="development_settings_title" msgid="140296922921597393">"ڈویلپر کے اختیارات"</string>
-    <string name="development_settings_enable" msgid="4285094651288242183">"ڈیولپر کے اختیارات فعال کریں"</string>
+    <string name="development_settings_enable" msgid="4285094651288242183">"ڈویلپر کے اختیارات فعال کریں"</string>
     <string name="development_settings_summary" msgid="8718917813868735095">"ایپ ڈویلپمنٹ کیلئے اختیارات سیٹ کریں"</string>
-    <string name="development_settings_not_available" msgid="355070198089140951">"اس صارف کیلئے ڈیولپر کے اختیارات دستیاب نہیں ہیں"</string>
+    <string name="development_settings_not_available" msgid="355070198089140951">"اس صارف کیلئے ڈویلپر کے اختیارات دستیاب نہیں ہیں"</string>
     <string name="vpn_settings_not_available" msgid="2894137119965668920">"‏VPN ترتیبات اس صارف کیلئے دستیاب نہیں ہیں"</string>
     <string name="tethering_settings_not_available" msgid="266821736434699780">"ٹیدرنگ ترتیبات اس صارف کیلئے دستیاب نہیں ہیں"</string>
     <string name="apn_settings_not_available" msgid="1147111671403342300">"رسائی کی جگہ کے نام کی ترتیبات اس صارف کیلئے دستیاب نہیں ہیں"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"بغیر نام والے بلوٹوتھ آلات دکھائیں"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"مطلق والیوم کو غیر فعال کریں"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"‏Gabeldorsche فعال کریں"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"بہتر کردہ کنیکٹوٹی"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"‏بلوٹوتھ AVRCP ورژن"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"‏بلوٹوتھ AVRCP ورژن منتخب کریں"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"‏بلوٹوتھ MAP ورژن"</string>
diff --git a/packages/SettingsLib/res/values-uz/arrays.xml b/packages/SettingsLib/res/values-uz/arrays.xml
index 26153ad..0770dcc 100644
--- a/packages/SettingsLib/res/values-uz/arrays.xml
+++ b/packages/SettingsLib/res/values-uz/arrays.xml
@@ -25,7 +25,7 @@
     <item msgid="3288373008277313483">"Qidiruv…"</item>
     <item msgid="6050951078202663628">"Ulanmoqda…"</item>
     <item msgid="8356618438494652335">"Tasdiqdan o‘tilmoqda…"</item>
-    <item msgid="2837871868181677206">"IP manzil o‘zlashtirilmoqda…"</item>
+    <item msgid="2837871868181677206">"IP manzil olinmoqda…"</item>
     <item msgid="4613015005934755724">"Ulangan"</item>
     <item msgid="3763530049995655072">"Muzlatildi"</item>
     <item msgid="7852381437933824454">"Uzilmoqda…"</item>
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Yoniq"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (asosiy)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (asosiy)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index f81731a..2ae55fe 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -22,7 +22,7 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="wifi_fail_to_scan" msgid="2333336097603822490">"Tarmoqlarni tekshirib chiqishni iloji bo‘lmadi"</string>
     <string name="wifi_security_none" msgid="7392696451280611452">"Hech qanday"</string>
-    <string name="wifi_remembered" msgid="3266709779723179188">"Saqlandi"</string>
+    <string name="wifi_remembered" msgid="3266709779723179188">"Saqlangan"</string>
     <string name="wifi_disconnected" msgid="7054450256284661757">"Ulanmagan"</string>
     <string name="wifi_disabled_generic" msgid="2651916945380294607">"Yoqilmagan"</string>
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"IP manzilini sozlab bo‘lmadi"</string>
@@ -81,11 +81,11 @@
     <string name="bluetooth_battery_level" msgid="2893696778200201555">"Batareya quvvati: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
     <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"L: batareya quvvati: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g>, R: batareya quvvati: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g>"</string>
     <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"Faol"</string>
-    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Media audio"</string>
+    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"A2DP profili"</string>
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"Telefon chaqiruvlari"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"Fayl uzatish"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"Kiritish qurilmasi"</string>
-    <string name="bluetooth_profile_pan" msgid="1006235139308318188">"Internetga kirish"</string>
+    <string name="bluetooth_profile_pan" msgid="1006235139308318188">"Internetga ulanish"</string>
     <string name="bluetooth_profile_pbap" msgid="7064307749579335765">"Kontaktlarni ulashish"</string>
     <string name="bluetooth_profile_pbap_summary" msgid="2955819694801952056">"Kontaktlarni ulashish uchun ishlatilsin"</string>
     <string name="bluetooth_profile_pan_nap" msgid="7871974753822470050">"Internet aloqasi ulashmasi"</string>
@@ -112,7 +112,7 @@
     <string name="bluetooth_opp_profile_summary_use_for" msgid="461981154387015457">"Fayl almashinish uchun foydalanish"</string>
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"Kiritish qurilmasi sifatida foydalanish"</string>
     <string name="bluetooth_hearing_aid_profile_summary_use_for" msgid="7689393730163320483">"Eshitish apparatlari uchun foydalanish"</string>
-    <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"Biriktirish"</string>
+    <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"OK"</string>
     <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"ULANISH"</string>
     <string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Bekor qilish"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Agar ulanishga ruxsat bersangiz, ulangan vaqtda kontakt va qo‘ng‘iroqlaringiz tarixiga kirishi mumkin."</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Bluetooth qurilmalarini nomlarisiz ko‘rsatish"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Tovush balandligining mutlaq darajasini faolsizlantirish"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Gabeldorsche funksiyasini yoqish"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Kuchaytirilgan aloqa"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Bluetooth AVRCP versiyasi"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Bluetooth AVRCP versiyasini tanlang"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Bluetooth MAP versiyasi"</string>
@@ -430,8 +429,8 @@
     <skip />
     <string name="power_discharge_by_enhanced" msgid="563438403581662942">"Joriy holatda taxminan <xliff:g id="TIME">%1$s</xliff:g> gacha davom etadi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
     <string name="power_discharge_by_only_enhanced" msgid="3268796172652988877">"Joriy holatda taxminan <xliff:g id="TIME">%1$s</xliff:g> gacha davom etadi"</string>
-    <string name="power_discharge_by" msgid="4113180890060388350">"Taxminan <xliff:g id="TIME">%1$s</xliff:g> gacha davom etadi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
-    <string name="power_discharge_by_only" msgid="92545648425937000">"Taxminan <xliff:g id="TIME">%1$s</xliff:g> gacha davom etadi"</string>
+    <string name="power_discharge_by" msgid="4113180890060388350">"Taxminan <xliff:g id="TIME">%1$s</xliff:g> gacha yetadi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
+    <string name="power_discharge_by_only" msgid="92545648425937000">"Taxminan <xliff:g id="TIME">%1$s</xliff:g> gacha yetadi"</string>
     <string name="power_discharge_by_only_short" msgid="5883041507426914446">"<xliff:g id="TIME">%1$s</xliff:g> gacha"</string>
     <string name="power_suggestion_battery_run_out" msgid="6332089307827787087">"Batareya quvvati tugash vaqti: <xliff:g id="TIME">%1$s</xliff:g>"</string>
     <string name="power_remaining_less_than_duration_only" msgid="8956656616031395152">"<xliff:g id="THRESHOLD">%1$s</xliff:g>dan kam qoldi"</string>
diff --git a/packages/SettingsLib/res/values-vi/arrays.xml b/packages/SettingsLib/res/values-vi/arrays.xml
index 3a7e55a..635cf11 100644
--- a/packages/SettingsLib/res/values-vi/arrays.xml
+++ b/packages/SettingsLib/res/values-vi/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Đã bật"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (Mặc định)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (Mặc định)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index b7ccf8d..646b5b7 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -81,7 +81,7 @@
     <string name="bluetooth_battery_level" msgid="2893696778200201555">"Mức pin <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
     <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"Trái: Mức pin <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g>, Phải: Mức pin <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g>"</string>
     <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"Đang hoạt động"</string>
-    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Âm thanh của phương tiện"</string>
+    <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"Âm thanh nội dung nghe nhìn"</string>
     <string name="bluetooth_profile_headset" msgid="5395952236133499331">"Cuộc gọi điện thoại"</string>
     <string name="bluetooth_profile_opp" msgid="6692618568149493430">"Chuyển tệp"</string>
     <string name="bluetooth_profile_hid" msgid="2969922922664315866">"Thiết bị đầu vào"</string>
@@ -95,7 +95,7 @@
     <string name="bluetooth_profile_a2dp_high_quality_unknown_codec" msgid="2477639096903834374">"Âm thanh HD"</string>
     <string name="bluetooth_profile_hearing_aid" msgid="58154575573984914">"Thiết bị trợ thính"</string>
     <string name="bluetooth_hearing_aid_profile_summary_connected" msgid="8191273236809964030">"Đã kết nối với Thiết bị trợ thính"</string>
-    <string name="bluetooth_a2dp_profile_summary_connected" msgid="7422607970115444153">"Đã kết nối với âm thanh phương tiện"</string>
+    <string name="bluetooth_a2dp_profile_summary_connected" msgid="7422607970115444153">"Đã kết nối với âm thanh nội dung nghe nhìn"</string>
     <string name="bluetooth_headset_profile_summary_connected" msgid="2420981566026949688">"Đã kết nối với âm thanh điện thoại"</string>
     <string name="bluetooth_opp_profile_summary_connected" msgid="2393521801478157362">"Đã kết nối với máy chủ chuyển tệp"</string>
     <string name="bluetooth_map_profile_summary_connected" msgid="4141725591784669181">"Đã kết nối với bản đồ"</string>
@@ -107,7 +107,7 @@
     <string name="bluetooth_pan_profile_summary_use_for" msgid="7422039765025340313">"Sử dụng để truy cập Internet"</string>
     <string name="bluetooth_map_profile_summary_use_for" msgid="4453622103977592583">"Sử dụng cho bản đồ"</string>
     <string name="bluetooth_sap_profile_summary_use_for" msgid="6204902866176714046">"Sử dụng để truy cập SIM"</string>
-    <string name="bluetooth_a2dp_profile_summary_use_for" msgid="7324694226276491807">"Sử dụng cho âm thanh phương tiện"</string>
+    <string name="bluetooth_a2dp_profile_summary_use_for" msgid="7324694226276491807">"Sử dụng cho âm thanh nội dung nghe nhìn"</string>
     <string name="bluetooth_headset_profile_summary_use_for" msgid="808970643123744170">"Sử dụng cho âm thanh điện thoại"</string>
     <string name="bluetooth_opp_profile_summary_use_for" msgid="461981154387015457">"Sử dụng để chuyển tệp"</string>
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"Sử dụng để nhập"</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Hiển thị các thiết bị Bluetooth không có tên"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Vô hiệu hóa âm lượng tuyệt đối"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Bật tính năng Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Kết nối nâng cao"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Phiên bản Bluetooth AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Chọn phiên bản Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Phiên bản Bluetooth MAP"</string>
@@ -306,7 +305,7 @@
     <string name="adbwifi_warning_message" msgid="8005936574322702388">"Tính năng gỡ lỗi qua Wi-Fi chỉ dành cho mục đích phát triển. Hãy sử dụng tính năng này để sao chép dữ liệu giữa máy tính và thiết bị của bạn, cài đặt ứng dụng trên thiết bị mà không thông báo và đọc dữ liệu nhật ký."</string>
     <string name="adb_keys_warning_message" msgid="2968555274488101220">"Thu hồi quyền truy cập gỡ lỗi USB từ tất cả máy tính mà bạn đã ủy quyền trước đó?"</string>
     <string name="dev_settings_warning_title" msgid="8251234890169074553">"Cho phép cài đặt phát triển?"</string>
-    <string name="dev_settings_warning_message" msgid="37741686486073668">"Những cài đặt này chỉ dành cho mục đích phát triển. Chúng có thể làm cho thiết bị và ứng dụng trên thiết bị của bạn bị lỗi và hoạt động sai."</string>
+    <string name="dev_settings_warning_message" msgid="37741686486073668">"Những tùy chọn cài đặt này chỉ dành cho mục đích phát triển. Chúng có thể làm cho thiết bị và ứng dụng trên thiết bị của bạn bị lỗi và hoạt động không đúng cách."</string>
     <string name="verify_apps_over_usb_title" msgid="6031809675604442636">"Xác minh ứng dụng qua USB"</string>
     <string name="verify_apps_over_usb_summary" msgid="1317933737581167839">"Kiểm tra các ứng dụng được cài đặt qua ADB/ADT để xem có hoạt động gây hại hay không."</string>
     <string name="bluetooth_show_devices_without_names_summary" msgid="780964354377854507">"Các thiết bị Bluetooth không có tên (chỉ có địa chỉ MAC) sẽ được hiển thị"</string>
diff --git a/packages/SettingsLib/res/values-zh-rCN/arrays.xml b/packages/SettingsLib/res/values-zh-rCN/arrays.xml
index 05b1b70..29d04e9 100644
--- a/packages/SettingsLib/res/values-zh-rCN/arrays.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"已启用"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4(默认)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5(默认)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index 75c1333..c4dcfff 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"显示没有名称的蓝牙设备"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"停用绝对音量功能"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"启用“Gabeldorsche”"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"增强连接性"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"蓝牙 AVRCP 版本"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"选择蓝牙 AVRCP 版本"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"蓝牙 MAP 版本"</string>
diff --git a/packages/SettingsLib/res/values-zh-rHK/arrays.xml b/packages/SettingsLib/res/values-zh-rHK/arrays.xml
index 0b57af9..e7e2f84 100644
--- a/packages/SettingsLib/res/values-zh-rHK/arrays.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"已啟用"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (預設)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (預設)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index 26ddfb1..e04651c 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"顯示沒有名稱的藍牙裝置"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"停用絕對音量功能"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"啟用 Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"強化連線功能"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"藍牙 AVRCP 版本"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"選擇藍牙 AVRCP 版本"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"藍牙 MAP 版本"</string>
diff --git a/packages/SettingsLib/res/values-zh-rTW/arrays.xml b/packages/SettingsLib/res/values-zh-rTW/arrays.xml
index 7b25772..0fdc14e 100644
--- a/packages/SettingsLib/res/values-zh-rTW/arrays.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"已啟用"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"AVRCP 1.4 (預設)"</item>
+    <item msgid="6603880723315236832">"AVRCP 1.5 (預設)"</item>
     <item msgid="1637054408779685086">"AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"avrcp14"</item>
+    <item msgid="4041937689950033942">"avrcp15"</item>
     <item msgid="1613629084012791988">"avrcp13"</item>
-    <item msgid="4398977131424970917">"avrcp15"</item>
+    <item msgid="99467845610592181">"avrcp14"</item>
     <item msgid="1963366694959681026">"avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index 72ea043..a1ae6b6 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"顯示沒有名稱的藍牙裝置"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"停用絕對音量功能"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"啟用 Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"加強型連線"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"藍牙 AVRCP 版本"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"選取藍牙 AVRCP 版本"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"藍牙 MAP 版本"</string>
diff --git a/packages/SettingsLib/res/values-zu/arrays.xml b/packages/SettingsLib/res/values-zu/arrays.xml
index 517d1c8..2d43c67 100644
--- a/packages/SettingsLib/res/values-zu/arrays.xml
+++ b/packages/SettingsLib/res/values-zu/arrays.xml
@@ -64,15 +64,15 @@
     <item msgid="2779123106632690576">"Kunikwe amandla"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_versions">
-    <item msgid="8036025277512210160">"I-AVRCP 1.4 (Okuzenzakalelayo)"</item>
+    <item msgid="6603880723315236832">"I-AVRCP 1.5 (Okuzenzakalelayo)"</item>
     <item msgid="1637054408779685086">"I-AVRCP 1.3"</item>
-    <item msgid="8317734704797203949">"I-AVRCP 1.5"</item>
+    <item msgid="5896162189744596291">"I-AVRCP 1.4"</item>
     <item msgid="7556896992111771426">"I-AVRCP 1.6"</item>
   </string-array>
   <string-array name="bluetooth_avrcp_version_values">
-    <item msgid="8965800440990431014">"I-avrcp14"</item>
+    <item msgid="4041937689950033942">"I-avrcp15"</item>
     <item msgid="1613629084012791988">"I-avrcp13"</item>
-    <item msgid="4398977131424970917">"I-avrcp15"</item>
+    <item msgid="99467845610592181">"I-avrcp14"</item>
     <item msgid="1963366694959681026">"I-avrcp16"</item>
   </string-array>
   <string-array name="bluetooth_map_versions">
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index 6b8739f..3cef856 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -113,7 +113,7 @@
     <string name="bluetooth_hid_profile_summary_use_for" msgid="4289460627406490952">"Isetshenziselwa okufakwayo"</string>
     <string name="bluetooth_hearing_aid_profile_summary_use_for" msgid="7689393730163320483">"Sebenzisa izinsiza zokuzwa"</string>
     <string name="bluetooth_pairing_accept" msgid="2054232610815498004">"Bhangqa"</string>
-    <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"BHANQA"</string>
+    <string name="bluetooth_pairing_accept_all_caps" msgid="2734383073450506220">"BHANGQA"</string>
     <string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Khansela"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Ukubhanqa kunika ukufinyelela koxhumana nabo nomlando wekholi uma uxhumekile."</string>
     <string name="bluetooth_pairing_error_message" msgid="6626399020672335565">"Ayikwazanga ukuhlangana ne <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
@@ -257,7 +257,6 @@
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Bonisa amadivayisi e-Bluetooth ngaphandle kwamagama"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="1452342324349203434">"Khubaza ivolumu ngokuphelele"</string>
     <string name="bluetooth_enable_gabeldorsche" msgid="9131730396242883416">"Nika amandla i-Gabeldorsche"</string>
-    <string name="enhanced_connectivity" msgid="7201127377781666804">"Ukuxhumeka Okuthuthukisiwe"</string>
     <string name="bluetooth_select_avrcp_version_string" msgid="1710571610177659127">"Inguqulo ye-Bluetooth ye-AVRCP"</string>
     <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7846922290083709633">"Khetha inguqulo ye-Bluetooth AVRCP"</string>
     <string name="bluetooth_select_map_version_string" msgid="526308145174175327">"Inguqulo ye-Bluetooth MAP"</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index a43412e..b280806 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -49,11 +49,19 @@
     private static String sSharedSystemSharedLibPackageName;
 
     static final int[] WIFI_PIE = {
-            com.android.internal.R.drawable.ic_wifi_signal_0,
-            com.android.internal.R.drawable.ic_wifi_signal_1,
-            com.android.internal.R.drawable.ic_wifi_signal_2,
-            com.android.internal.R.drawable.ic_wifi_signal_3,
-            com.android.internal.R.drawable.ic_wifi_signal_4
+        com.android.internal.R.drawable.ic_wifi_signal_0,
+        com.android.internal.R.drawable.ic_wifi_signal_1,
+        com.android.internal.R.drawable.ic_wifi_signal_2,
+        com.android.internal.R.drawable.ic_wifi_signal_3,
+        com.android.internal.R.drawable.ic_wifi_signal_4
+    };
+
+    static final int[] SHOW_X_WIFI_PIE = {
+        R.drawable.ic_show_x_wifi_signal_0,
+        R.drawable.ic_show_x_wifi_signal_1,
+        R.drawable.ic_show_x_wifi_signal_2,
+        R.drawable.ic_show_x_wifi_signal_3,
+        R.drawable.ic_show_x_wifi_signal_4
     };
 
     public static void updateLocationEnabled(Context context, boolean enabled, int userId,
@@ -353,10 +361,22 @@
      * @throws IllegalArgumentException if an invalid RSSI level is given.
      */
     public static int getWifiIconResource(int level) {
+        return getWifiIconResource(false /* showX */, level);
+    }
+
+    /**
+     * Returns the Wifi icon resource for a given RSSI level.
+     *
+     * @param showX True if a connected Wi-Fi network has the problem which should show Pie+x
+     *              signal icon to users.
+     * @param level The number of bars to show (0-4)
+     * @throws IllegalArgumentException if an invalid RSSI level is given.
+     */
+    public static int getWifiIconResource(boolean showX, int level) {
         if (level < 0 || level >= WIFI_PIE.length) {
             throw new IllegalArgumentException("No Wifi icon found for level: " + level);
         }
-        return WIFI_PIE[level];
+        return showX ? SHOW_X_WIFI_PIE[level] : WIFI_PIE[level];
     }
 
     public static int getDefaultStorageManagerDaysToRetain(Resources resources) {
diff --git a/packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java b/packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java
index 9d06c84..72a6074 100644
--- a/packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java
@@ -465,7 +465,16 @@
             synchronized (mMediaDevicesLock) {
                 mMediaDevices.clear();
                 mMediaDevices.addAll(devices);
-                mMediaDevices.addAll(buildDisconnectedBluetoothDevice());
+                // Add disconnected bluetooth devices only when phone output device is available.
+                for (MediaDevice device : devices) {
+                    final int type = device.getDeviceType();
+                    if (type == MediaDevice.MediaDeviceType.TYPE_USB_C_AUDIO_DEVICE
+                            || type == MediaDevice.MediaDeviceType.TYPE_3POINT5_MM_AUDIO_DEVICE
+                            || type == MediaDevice.MediaDeviceType.TYPE_PHONE_DEVICE) {
+                        mMediaDevices.addAll(buildDisconnectedBluetoothDevice());
+                        break;
+                    }
+                }
             }
 
             final MediaDevice infoMediaDevice = mInfoMediaManager.getCurrentConnectedDevice();
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiEntryPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiEntryPreference.java
index a53bc9f..aad0d3a 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiEntryPreference.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiEntryPreference.java
@@ -64,6 +64,7 @@
     private final IconInjector mIconInjector;
     private WifiEntry mWifiEntry;
     private int mLevel = -1;
+    private boolean mShowX; // Shows the Wi-Fi signl icon of Pie+x when it's true.
     private CharSequence mContentDescription;
     private OnButtonClickListener mOnButtonClickListener;
 
@@ -136,9 +137,11 @@
     public void refresh() {
         setTitle(mWifiEntry.getTitle());
         final int level = mWifiEntry.getLevel();
-        if (level != mLevel) {
+        final boolean showX = mWifiEntry.shouldShowXLevelIcon();
+        if (level != mLevel || showX != mShowX) {
             mLevel = level;
-            updateIcon(mLevel);
+            mShowX = showX;
+            updateIcon(mShowX, mLevel);
             notifyChanged();
         }
 
@@ -184,13 +187,13 @@
     }
 
 
-    private void updateIcon(int level) {
+    private void updateIcon(boolean showX, int level) {
         if (level == -1) {
             setIcon(null);
             return;
         }
 
-        final Drawable drawable = mIconInjector.getIcon(level);
+        final Drawable drawable = mIconInjector.getIcon(showX, level);
         if (drawable != null) {
             drawable.setTintList(Utils.getColorAttr(getContext(),
                     android.R.attr.colorControlNormal));
@@ -260,8 +263,8 @@
             mContext = context;
         }
 
-        public Drawable getIcon(int level) {
-            return mContext.getDrawable(Utils.getWifiIconResource(level));
+        public Drawable getIcon(boolean showX, int level) {
+            return mContext.getDrawable(Utils.getWifiIconResource(showX, level));
         }
     }
 
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java
index b7ae3dc..c57d4ad 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java
@@ -13,6 +13,7 @@
 import static android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_PARTIAL_CONNECTIVITY;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
+import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
 
 import android.content.Context;
 import android.content.Intent;
@@ -189,10 +190,12 @@
                 }
             }
             updateStatusLabel();
+            mCallback.run();
         } else if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) {
             // Default to -200 as its below WifiManager.MIN_RSSI.
             updateRssi(intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200));
             updateStatusLabel();
+            mCallback.run();
         }
     }
 
@@ -218,13 +221,15 @@
             return;
         }
         NetworkCapabilities networkCapabilities;
-        final Network currentWifiNetwork = mWifiManager.getCurrentNetwork();
-        if (currentWifiNetwork != null && currentWifiNetwork.equals(mDefaultNetwork)) {
+        isDefaultNetwork = false;
+        if (mDefaultNetworkCapabilities != null) {
+            isDefaultNetwork = mDefaultNetworkCapabilities.hasTransport(
+                    NetworkCapabilities.TRANSPORT_WIFI);
+        }
+        if (isDefaultNetwork) {
             // Wifi is connected and the default network.
-            isDefaultNetwork = true;
             networkCapabilities = mDefaultNetworkCapabilities;
         } else {
-            isDefaultNetwork = false;
             networkCapabilities = mConnectivityManager.getNetworkCapabilities(
                     mWifiManager.getCurrentNetwork());
         }
@@ -246,6 +251,10 @@
                     statusLabel = mContext.getString(R.string.wifi_status_no_internet);
                 }
                 return;
+            } else if (!isDefaultNetwork && mDefaultNetworkCapabilities != null
+                    && mDefaultNetworkCapabilities.hasTransport(TRANSPORT_CELLULAR)) {
+                statusLabel = mContext.getString(R.string.wifi_connected_low_quality);
+                return;
             }
         }
 
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java
index a654fd4..8e850b2 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java
@@ -585,6 +585,7 @@
         when(device1.getId()).thenReturn(TEST_DEVICE_ID_1);
         when(device2.getId()).thenReturn(TEST_DEVICE_ID_2);
         when(device3.getId()).thenReturn(TEST_DEVICE_ID_3);
+        when(device1.getDeviceType()).thenReturn(MediaDevice.MediaDeviceType.TYPE_PHONE_DEVICE);
         when(mLocalMediaManager.mPhoneDevice.getId()).thenReturn("test_phone_id");
 
         assertThat(mLocalMediaManager.mMediaDevices).hasSize(2);
@@ -683,6 +684,7 @@
         when(device1.getId()).thenReturn(TEST_DEVICE_ID_1);
         when(device2.getId()).thenReturn(TEST_DEVICE_ID_2);
         when(device3.getId()).thenReturn(TEST_DEVICE_ID_3);
+        when(device1.getDeviceType()).thenReturn(MediaDevice.MediaDeviceType.TYPE_PHONE_DEVICE);
         when(mLocalMediaManager.mPhoneDevice.getId()).thenReturn("test_phone_id");
 
         assertThat(mLocalMediaManager.mMediaDevices).hasSize(2);
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/WifiEntryPreferenceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/WifiEntryPreferenceTest.java
index 46e699d..c21830b 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/WifiEntryPreferenceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/WifiEntryPreferenceTest.java
@@ -62,6 +62,17 @@
     @Mock
     private Drawable mMockDrawable4;
 
+    @Mock
+    private Drawable mMockShowXDrawable0;
+    @Mock
+    private Drawable mMockShowXDrawable1;
+    @Mock
+    private Drawable mMockShowXDrawable2;
+    @Mock
+    private Drawable mMockShowXDrawable3;
+    @Mock
+    private Drawable mMockShowXDrawable4;
+
     private static final String MOCK_TITLE = "title";
     private static final String MOCK_SUMMARY = "summary";
     private static final String FAKE_URI_STRING = "fakeuri";
@@ -75,11 +86,22 @@
         when(mMockWifiEntry.getTitle()).thenReturn(MOCK_TITLE);
         when(mMockWifiEntry.getSummary(false /* concise */)).thenReturn(MOCK_SUMMARY);
 
-        when(mMockIconInjector.getIcon(0)).thenReturn(mMockDrawable0);
-        when(mMockIconInjector.getIcon(1)).thenReturn(mMockDrawable1);
-        when(mMockIconInjector.getIcon(2)).thenReturn(mMockDrawable2);
-        when(mMockIconInjector.getIcon(3)).thenReturn(mMockDrawable3);
-        when(mMockIconInjector.getIcon(4)).thenReturn(mMockDrawable4);
+        when(mMockIconInjector.getIcon(false /* showX */, 0)).thenReturn(mMockDrawable0);
+        when(mMockIconInjector.getIcon(false /* showX */, 1)).thenReturn(mMockDrawable1);
+        when(mMockIconInjector.getIcon(false /* showX */, 2)).thenReturn(mMockDrawable2);
+        when(mMockIconInjector.getIcon(false /* showX */, 3)).thenReturn(mMockDrawable3);
+        when(mMockIconInjector.getIcon(false /* showX */, 4)).thenReturn(mMockDrawable4);
+
+        when(mMockIconInjector.getIcon(true /* showX */, 0))
+                .thenReturn(mMockShowXDrawable0);
+        when(mMockIconInjector.getIcon(true /* showX */, 1))
+                .thenReturn(mMockShowXDrawable1);
+        when(mMockIconInjector.getIcon(true /* showX */, 2))
+                .thenReturn(mMockShowXDrawable2);
+        when(mMockIconInjector.getIcon(true /* showX */, 3))
+                .thenReturn(mMockShowXDrawable3);
+        when(mMockIconInjector.getIcon(true /* showX */, 4))
+                .thenReturn(mMockShowXDrawable4);
     }
 
     @Test
@@ -155,6 +177,36 @@
     }
 
     @Test
+    public void levelChanged_showXWifiRefresh_shouldUpdateLevelIcon() {
+        final List<Drawable> iconList = new ArrayList<>();
+        when(mMockWifiEntry.shouldShowXLevelIcon()).thenReturn(true);
+        final WifiEntryPreference pref =
+                new WifiEntryPreference(mContext, mMockWifiEntry, mMockIconInjector);
+
+        when(mMockWifiEntry.getLevel()).thenReturn(0);
+        pref.refresh();
+        iconList.add(pref.getIcon());
+        when(mMockWifiEntry.getLevel()).thenReturn(1);
+        pref.refresh();
+        iconList.add(pref.getIcon());
+        when(mMockWifiEntry.getLevel()).thenReturn(2);
+        pref.refresh();
+        iconList.add(pref.getIcon());
+        when(mMockWifiEntry.getLevel()).thenReturn(3);
+        pref.refresh();
+        iconList.add(pref.getIcon());
+        when(mMockWifiEntry.getLevel()).thenReturn(4);
+        pref.refresh();
+        iconList.add(pref.getIcon());
+        when(mMockWifiEntry.getLevel()).thenReturn(-1);
+        pref.refresh();
+        iconList.add(pref.getIcon());
+
+        assertThat(iconList).containsExactly(mMockShowXDrawable0, mMockShowXDrawable1,
+                mMockShowXDrawable2, mMockShowXDrawable3, mMockShowXDrawable4, null);
+    }
+
+    @Test
     public void notNull_whenGetHelpUriString_shouldSetImageButtonVisible() {
         when(mMockWifiEntry.getHelpUriString()).thenReturn(FAKE_URI_STRING);
         final WifiEntryPreference pref =
diff --git a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
index d05e6e1..3055104 100644
--- a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
+++ b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
@@ -166,6 +166,9 @@
         Settings.Secure.PEOPLE_STRIP,
         Settings.Secure.MEDIA_CONTROLS_RESUME,
         Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE,
-        Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS
+        Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS,
+        Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED,
+        Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS,
+        Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT
     };
 }
diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
index fa810bd..f1846db 100644
--- a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
+++ b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
@@ -251,5 +251,9 @@
         VALIDATORS.put(
                 Secure.ACCESSIBILITY_BUTTON_TARGETS,
                 ACCESSIBILITY_SHORTCUT_TARGET_LIST_VALIDATOR);
+        VALIDATORS.put(Secure.ADAPTIVE_CONNECTIVITY_ENABLED, BOOLEAN_VALIDATOR);
+        VALIDATORS.put(
+                Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS, NONE_NEGATIVE_LONG_VALIDATOR);
+        VALIDATORS.put(Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
     }
 }
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 7c198c8..89a55e4 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -773,29 +773,29 @@
                 Settings.Global.GPU_DEBUG_LAYERS_GLES,
                 GlobalSettingsProto.Gpu.DEBUG_LAYERS_GLES);
         dumpSetting(s, p,
-                Settings.Global.GAME_DRIVER_ALL_APPS,
-                GlobalSettingsProto.Gpu.GAME_DRIVER_ALL_APPS);
+                Settings.Global.UPDATABLE_DRIVER_ALL_APPS,
+                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_ALL_APPS);
         dumpSetting(s, p,
-                Settings.Global.GAME_DRIVER_OPT_IN_APPS,
-                GlobalSettingsProto.Gpu.GAME_DRIVER_OPT_IN_APPS);
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS,
+                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS);
         dumpSetting(s, p,
-                Settings.Global.GAME_DRIVER_PRERELEASE_OPT_IN_APPS,
-                GlobalSettingsProto.Gpu.GAME_DRIVER_PRERELEASE_OPT_IN_APPS);
+                Settings.Global.UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS,
+                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS);
         dumpSetting(s, p,
-                Settings.Global.GAME_DRIVER_OPT_OUT_APPS,
-                GlobalSettingsProto.Gpu.GAME_DRIVER_OPT_OUT_APPS);
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS,
+                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS);
         dumpSetting(s, p,
-                Settings.Global.GAME_DRIVER_DENYLIST,
-                GlobalSettingsProto.Gpu.GAME_DRIVER_DENYLIST);
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLIST,
+                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_PRODUCTION_DENYLIST);
         dumpSetting(s, p,
-                Settings.Global.GAME_DRIVER_ALLOWLIST,
-                GlobalSettingsProto.Gpu.GAME_DRIVER_ALLOWLIST);
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST,
+                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST);
         dumpSetting(s, p,
-                Settings.Global.GAME_DRIVER_DENYLISTS,
-                GlobalSettingsProto.Gpu.GAME_DRIVER_DENYLISTS);
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS,
+                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS);
         dumpSetting(s, p,
-                Settings.Global.GAME_DRIVER_SPHAL_LIBRARIES,
-                GlobalSettingsProto.Gpu.GAME_DRIVER_SPHAL_LIBRARIES);
+                Settings.Global.UPDATABLE_DRIVER_SPHAL_LIBRARIES,
+                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_SPHAL_LIBRARIES);
         p.end(gpuToken);
 
         final long hdmiToken = p.start(GlobalSettingsProto.HDMI);
@@ -1875,6 +1875,15 @@
                 SecureSettingsProto.Assist.GESTURE_SETUP_COMPLETE);
         p.end(assistToken);
 
+        final long assistHandlesToken = p.start(SecureSettingsProto.ASSIST_HANDLES);
+        dumpSetting(s, p,
+                Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS,
+                SecureSettingsProto.AssistHandles.LEARNING_TIME_ELAPSED_MILLIS);
+        dumpSetting(s, p,
+                Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT,
+                SecureSettingsProto.AssistHandles.LEARNING_EVENT_COUNT);
+        p.end(assistHandlesToken);
+
         final long autofillToken = p.start(SecureSettingsProto.AUTOFILL);
         dumpSetting(s, p,
                 Settings.Secure.AUTOFILL_SERVICE,
@@ -1976,6 +1985,9 @@
         dumpSetting(s, p,
                 Settings.Secure.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS,
                 SecureSettingsProto.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS);
+        dumpSetting(s, p,
+                Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED,
+                SecureSettingsProto.ADAPTIVE_CONNECTIVITY_ENABLED);
 
         final long controlsToken = p.start(SecureSettingsProto.CONTROLS);
         dumpSetting(s, p,
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/WriteFallbackSettingsFilesJobService.java b/packages/SettingsProvider/src/com/android/providers/settings/WriteFallbackSettingsFilesJobService.java
index 6e5b889..66aa7ba 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/WriteFallbackSettingsFilesJobService.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/WriteFallbackSettingsFilesJobService.java
@@ -35,19 +35,17 @@
 public class WriteFallbackSettingsFilesJobService extends JobService {
     @Override
     public boolean onStartJob(final JobParameters params) {
-        switch (params.getJobId()) {
-            case WRITE_FALLBACK_SETTINGS_FILES_JOB_ID:
-                final List<String> settingsFiles = new ArrayList<>();
-                settingsFiles.add(params.getExtras().getString(TABLE_GLOBAL, ""));
-                settingsFiles.add(params.getExtras().getString(TABLE_SYSTEM, ""));
-                settingsFiles.add(params.getExtras().getString(TABLE_SECURE, ""));
-                settingsFiles.add(params.getExtras().getString(TABLE_SSAID, ""));
-                settingsFiles.add(params.getExtras().getString(TABLE_CONFIG, ""));
-                SettingsProvider.writeFallBackSettingsFiles(settingsFiles);
-                return true;
-            default:
-                return false;
+        if (params.getJobId() != WRITE_FALLBACK_SETTINGS_FILES_JOB_ID) {
+            return false;
         }
+        final List<String> settingsFiles = new ArrayList<>();
+        settingsFiles.add(params.getExtras().getString(TABLE_GLOBAL, ""));
+        settingsFiles.add(params.getExtras().getString(TABLE_SYSTEM, ""));
+        settingsFiles.add(params.getExtras().getString(TABLE_SECURE, ""));
+        settingsFiles.add(params.getExtras().getString(TABLE_SSAID, ""));
+        settingsFiles.add(params.getExtras().getString(TABLE_CONFIG, ""));
+        SettingsProvider.writeFallBackSettingsFiles(settingsFiles);
+        return false;
     }
 
     @Override
diff --git a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
index bc1c3f9..e90bb36 100644
--- a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
+++ b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
@@ -503,14 +503,14 @@
                     Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_PKGS,
                     Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_VALUES,
                     Settings.Global.GLOBAL_SETTINGS_ANGLE_ALLOWLIST,
-                    Settings.Global.GAME_DRIVER_ALL_APPS,
-                    Settings.Global.GAME_DRIVER_OPT_IN_APPS,
-                    Settings.Global.GAME_DRIVER_PRERELEASE_OPT_IN_APPS,
-                    Settings.Global.GAME_DRIVER_OPT_OUT_APPS,
-                    Settings.Global.GAME_DRIVER_DENYLISTS,
-                    Settings.Global.GAME_DRIVER_DENYLIST,
-                    Settings.Global.GAME_DRIVER_ALLOWLIST,
-                    Settings.Global.GAME_DRIVER_SPHAL_LIBRARIES,
+                    Settings.Global.UPDATABLE_DRIVER_ALL_APPS,
+                    Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS,
+                    Settings.Global.UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS,
+                    Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS,
+                    Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS,
+                    Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLIST,
+                    Settings.Global.UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST,
+                    Settings.Global.UPDATABLE_DRIVER_SPHAL_LIBRARIES,
                     Settings.Global.GLOBAL_SETTINGS_SHOW_ANGLE_IN_USE_DIALOG_BOX,
                     Settings.Global.GPU_DEBUG_LAYER_APP,
                     Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING,
diff --git a/packages/SharedStorageBackup/OWNERS b/packages/SharedStorageBackup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/packages/SharedStorageBackup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index a927997..757bbda 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -70,6 +70,7 @@
     <uses-permission android:name="android.permission.SET_PROCESS_LIMIT" />
     <uses-permission android:name="android.permission.SET_ALWAYS_FINISH" />
     <uses-permission android:name="android.permission.DUMP" />
+    <uses-permission android:name="android.permission.CONTROL_UI_TRACING" />
     <uses-permission android:name="android.permission.SIGNAL_PERSISTENT_PROCESSES" />
     <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
     <!-- Internal permissions granted to the shell. -->
@@ -275,6 +276,9 @@
     <uses-permission android:name="android.permission.MANAGE_NOTIFICATIONS"/>
     <uses-permission android:name="android.permission.ACCESS_LOCUS_ID_USAGE_STATS"/>
 
+    <!-- Permission needed for CTS test - MusicRecognitionManagerTest -->
+    <uses-permission android:name="android.permission.MANAGE_MUSIC_RECOGNITION" />
+
     <!-- Permissions required to test ambient display. -->
     <uses-permission android:name="android.permission.READ_DREAM_STATE"/>
     <uses-permission android:name="android.permission.WRITE_DREAM_STATE"/>
diff --git a/packages/Shell/res/values-mk/strings.xml b/packages/Shell/res/values-mk/strings.xml
index 3d18d30..0856198 100644
--- a/packages/Shell/res/values-mk/strings.xml
+++ b/packages/Shell/res/values-mk/strings.xml
@@ -31,7 +31,7 @@
     <string name="bugreport_confirm" msgid="5917407234515812495">"Извештаите за грешка содржат податоци од разни датотеки за евиденција на системот, вклучувајќи и податоци што можеби ги сметате за чувствителни (како што се користење на апликациите и податоци за локацијата). Извештаите за грешки споделувајте ги само со апликации и луѓе во кои имате доверба."</string>
     <string name="bugreport_confirm_dont_repeat" msgid="6179945398364357318">"Не покажувај повторно"</string>
     <string name="bugreport_storage_title" msgid="5332488144740527109">"Извештаи за грешки"</string>
-    <string name="bugreport_unreadable_text" msgid="586517851044535486">"Датотеката со извештај за грешка не можеше да се прочита"</string>
+    <string name="bugreport_unreadable_text" msgid="586517851044535486">"Датотеката со извештај за грешка не може да се прочита"</string>
     <string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"Не можевме да ги додадеме деталите на извештајот за грешки во zip-датотеката"</string>
     <string name="bugreport_unnamed" msgid="2800582406842092709">"неименувани"</string>
     <string name="bugreport_info_action" msgid="2158204228510576227">"Детали"</string>
diff --git a/packages/Shell/res/values-mr/strings.xml b/packages/Shell/res/values-mr/strings.xml
index 9595e28..a957184 100644
--- a/packages/Shell/res/values-mr/strings.xml
+++ b/packages/Shell/res/values-mr/strings.xml
@@ -31,8 +31,8 @@
     <string name="bugreport_confirm" msgid="5917407234515812495">"बग रीपोर्टांमध्ये तुम्ही संवेदनशील (अ‍ॅप-वापर आणि स्थान डेटा यासारखा) डेटा म्हणून विचार करता त्या डेटाच्या समावेशासह सिस्टीमच्या विविध लॉग फायलींमधील डेटा असतो. ज्या लोकांवर आणि अ‍ॅपवर तुमचा विश्वास आहे केवळ त्यांच्यासह हा बग रीपोर्ट शेअर करा."</string>
     <string name="bugreport_confirm_dont_repeat" msgid="6179945398364357318">"पुन्हा दर्शवू नका"</string>
     <string name="bugreport_storage_title" msgid="5332488144740527109">"बग रीपोर्ट"</string>
-    <string name="bugreport_unreadable_text" msgid="586517851044535486">"बग रीपोर्ट फाईल वाचणे शक्य झाले नाही"</string>
-    <string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"झिप फाईल मध्ये बग रीपोर्ट तपशील जोडणे शक्य झाले नाही"</string>
+    <string name="bugreport_unreadable_text" msgid="586517851044535486">"बग रीपोर्ट फाइल वाचणे शक्य झाले नाही"</string>
+    <string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"झिप फाइल मध्ये बग रीपोर्ट तपशील जोडणे शक्य झाले नाही"</string>
     <string name="bugreport_unnamed" msgid="2800582406842092709">"अनामित"</string>
     <string name="bugreport_info_action" msgid="2158204228510576227">"तपशील"</string>
     <string name="bugreport_screenshot_action" msgid="8677781721940614995">"स्क्रीनशॉट"</string>
diff --git a/packages/SoundPicker/res/values-kk/strings.xml b/packages/SoundPicker/res/values-kk/strings.xml
index 810192f..ad6d0e0 100644
--- a/packages/SoundPicker/res/values-kk/strings.xml
+++ b/packages/SoundPicker/res/values-kk/strings.xml
@@ -19,7 +19,7 @@
     <string name="ringtone_default" msgid="798836092118824500">"Әдепкі рингтон"</string>
     <string name="notification_sound_default" msgid="8133121186242636840">"Әдепкі хабарландыру дыбысы"</string>
     <string name="alarm_sound_default" msgid="4787646764557462649">"Әдепкі дабыл дыбысы"</string>
-    <string name="add_ringtone_text" msgid="6642389991738337529">"Рингтон енгізу"</string>
+    <string name="add_ringtone_text" msgid="6642389991738337529">"Рингтон қосу"</string>
     <string name="add_alarm_text" msgid="3545497316166999225">"Оятқыш енгізу"</string>
     <string name="add_notification_text" msgid="4431129543300614788">"Хабарландыру енгізу"</string>
     <string name="delete_ringtone_text" msgid="201443984070732499">"Жою"</string>
diff --git a/packages/SoundPicker/res/values-te/strings.xml b/packages/SoundPicker/res/values-te/strings.xml
index 6b8a62e..10b4e7c 100644
--- a/packages/SoundPicker/res/values-te/strings.xml
+++ b/packages/SoundPicker/res/values-te/strings.xml
@@ -17,8 +17,8 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="ringtone_default" msgid="798836092118824500">"డిఫాల్ట్ రింగ్‌టోన్"</string>
-    <string name="notification_sound_default" msgid="8133121186242636840">"డిఫాల్ట్ నోటిఫికేషన్ ధ్వని"</string>
-    <string name="alarm_sound_default" msgid="4787646764557462649">"డిఫాల్ట్ అలారం ధ్వని"</string>
+    <string name="notification_sound_default" msgid="8133121186242636840">"నోటిఫికేషన్ ఆటోమేటిక్ సౌండ్"</string>
+    <string name="alarm_sound_default" msgid="4787646764557462649">"అలారం ఆటోమేటిక్ సౌండ్"</string>
     <string name="add_ringtone_text" msgid="6642389991738337529">"రింగ్‌టోన్‌ను జోడించు"</string>
     <string name="add_alarm_text" msgid="3545497316166999225">"అలారాన్ని జోడించు"</string>
     <string name="add_notification_text" msgid="4431129543300614788">"నోటిఫికేషన్‌‌ని జోడించు"</string>
diff --git a/packages/SoundPicker/res/values-uz/strings.xml b/packages/SoundPicker/res/values-uz/strings.xml
index 9018e66..c39db5f 100644
--- a/packages/SoundPicker/res/values-uz/strings.xml
+++ b/packages/SoundPicker/res/values-uz/strings.xml
@@ -20,8 +20,8 @@
     <string name="notification_sound_default" msgid="8133121186242636840">"Standart bildirishnoma tovushi"</string>
     <string name="alarm_sound_default" msgid="4787646764557462649">"Standart signal tovushi"</string>
     <string name="add_ringtone_text" msgid="6642389991738337529">"Rington qo‘shish"</string>
-    <string name="add_alarm_text" msgid="3545497316166999225">"Signal qo‘shish"</string>
-    <string name="add_notification_text" msgid="4431129543300614788">"Bildirishnoma qo‘shish"</string>
+    <string name="add_alarm_text" msgid="3545497316166999225">"Signal kiritish"</string>
+    <string name="add_notification_text" msgid="4431129543300614788">"Bildirishnoma kiritish"</string>
     <string name="delete_ringtone_text" msgid="201443984070732499">"O‘chirish"</string>
     <string name="unable_to_add_ringtone" msgid="4583511263449467326">"Maxsus rington qo‘shib bo‘lmadi"</string>
     <string name="unable_to_delete_ringtone" msgid="6792301380142859496">"Maxsus ringtonni o‘chirib bo‘lmadi"</string>
diff --git a/packages/StatementService/Android.bp b/packages/StatementService/Android.bp
index 586292e..3831fd9 100644
--- a/packages/StatementService/Android.bp
+++ b/packages/StatementService/Android.bp
@@ -20,6 +20,7 @@
     platform_apis: true,
     privileged: true,
     libs: ["org.apache.http.legacy"],
+    uses_libs: ["org.apache.http.legacy"],
     static_libs: [
         "libprotobuf-java-nano",
         "volley",
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index a7ef5e6..6e74184 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -113,6 +113,7 @@
     <uses-permission android:name="android.permission.SET_ORIENTATION" />
     <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
     <uses-permission android:name="android.permission.MONITOR_INPUT" />
+    <uses-permission android:name="android.permission.INPUT_CONSUMER" />
 
     <!-- DreamManager -->
     <uses-permission android:name="android.permission.READ_DREAM_STATE" />
@@ -239,6 +240,9 @@
 
     <!-- Listen app op changes -->
     <uses-permission android:name="android.permission.WATCH_APPOPS" />
+    <uses-permission android:name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS" />
+    <!-- For handling silent audio recordings -->
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_ROUTING" />
 
     <!-- to read and change hvac values in a car -->
     <uses-permission android:name="android.car.permission.CONTROL_CAR_CLIMATE" />
@@ -266,6 +270,7 @@
     <!-- Permission to make accessibility service access Bubbles -->
     <uses-permission android:name="android.permission.ADD_TRUSTED_DISPLAY" />
 
+
     <protected-broadcast android:name="com.android.settingslib.action.REGISTER_SLICE_RECEIVER" />
     <protected-broadcast android:name="com.android.settingslib.action.UNREGISTER_SLICE_RECEIVER" />
     <protected-broadcast android:name="com.android.settings.flashlight.action.FLASHLIGHT_CHANGED" />
@@ -395,19 +400,15 @@
 
         <!-- Springboard for launching the share and edit activity. This needs to be in the main
              system ui process since we need to notify the status bar to dismiss the keyguard -->
-        <receiver android:name=".screenshot.GlobalScreenshot$ActionProxyReceiver"
-            android:exported="false" />
-
-        <!-- Callback for dismissing screenshot notification after a share target is picked -->
-        <receiver android:name=".screenshot.GlobalScreenshot$TargetChosenReceiver"
+        <receiver android:name=".screenshot.ActionProxyReceiver"
             android:exported="false" />
 
         <!-- Callback for deleting screenshot notification -->
-        <receiver android:name=".screenshot.GlobalScreenshot$DeleteScreenshotReceiver"
+        <receiver android:name=".screenshot.DeleteScreenshotReceiver"
             android:exported="false" />
 
         <!-- Callback for invoking a smart action from the screenshot notification. -->
-        <receiver android:name=".screenshot.GlobalScreenshot$SmartActionsReceiver"
+        <receiver android:name=".screenshot.SmartActionsReceiver"
                   android:exported="false"/>
 
         <!-- started from UsbDeviceSettingsManager -->
@@ -720,10 +721,9 @@
         <service android:name=".controls.controller.AuxiliaryPersistenceWrapper$DeletionJobService"
                  android:permission="android.permission.BIND_JOB_SERVICE"/>
 
-        <!-- started from ControlsFavoritingActivity -->
+        <!-- started from ControlsRequestReceiver -->
         <activity
             android:name=".controls.management.ControlsRequestDialog"
-            android:exported="true"
             android:theme="@style/Theme.ControlsRequestDialog"
             android:finishOnCloseSystemDialogs="true"
             android:showForAllUsers="true"
diff --git a/packages/SystemUI/OWNERS b/packages/SystemUI/OWNERS
index 17d2f9c..f884270 100644
--- a/packages/SystemUI/OWNERS
+++ b/packages/SystemUI/OWNERS
@@ -2,8 +2,11 @@
 
 dsandler@android.com
 
+aaliomer@google.com
 adamcohen@google.com
+alexflo@google.com
 asc@google.com
+awickham@google.com
 beverlyt@google.com
 brockman@google.com
 cinek@google.com
@@ -11,11 +14,16 @@
 dupin@google.com
 ethibodeau@google.com
 evanlaird@google.com
+gwasserman@google.com
 hwwang@google.com
 hyunyoungs@google.com
 jaggies@google.com
+jamesoleary@google.com
+jeffdq@google.com
 jjaggi@google.com
+jonmiranda@google.com
 joshmcgrath@google.com
+joshtrask@google.com
 juliacr@google.com
 juliatuttle@google.com
 kchyn@google.com
@@ -24,28 +32,38 @@
 lynhan@google.com
 madym@google.com
 mankoff@google.com
+mett@google.com
+mkephart@google.com
+mpietal@google.com
 mrcasey@google.com
 mrenouf@google.com
 nbenbernou@google.com
 nesciosquid@google.com
 ogunwale@google.com
 peanutbutter@google.com
+pinyaoting@google.com
 pixel@google.com
 roosa@google.com
+santie@google.com
 snoeberger@google.com
+sreyasr@google.com
 steell@google.com
+sfufa@google.com
 stwu@google.com
 sunnygoyal@google.com
 susikp@google.com
+thiruram@google.com
 tracyzhou@google.com
 tsuji@google.com
 twickham@google.com
+vadimt@google.com
+victortulias@google.com
 winsonc@google.com
+xuqiu@google.com
 zakcohen@google.com
 
 #Android Auto
 hseog@google.com
 
 #Android TV
-rgl@google.com
-
+rgl@google.com
\ No newline at end of file
diff --git a/packages/SystemUI/res-keyguard/drawable/kg_emergency_button_background.xml b/packages/SystemUI/res-keyguard/drawable/kg_emergency_button_background.xml
new file mode 100644
index 0000000..cc2089f
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/drawable/kg_emergency_button_background.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+    android:color="?attr/wallpaperTextColorSecondary">
+    <item android:id="@android:id/background">
+        <shape
+            android:color="@android:color/transparent">
+            <stroke android:width="1dp" android:color="?attr/wallpaperTextColorSecondary"/>
+            <corners android:radius="24dp"/>
+        </shape>
+    </item>
+    <item android:id="@android:id/mask">
+        <shape android:shape="rectangle">
+            <solid android:color="?attr/wallpaperTextColorSecondary"/>
+            <corners android:radius="24dp"/>
+        </shape>
+    </item>
+</ripple>
\ No newline at end of file
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_emergency_carrier_area.xml b/packages/SystemUI/res-keyguard/layout/keyguard_emergency_carrier_area.xml
index 3018a02..370576b 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_emergency_carrier_area.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_emergency_carrier_area.xml
@@ -33,6 +33,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         style="@style/Keyguard.TextView"
+        android:layout_marginBottom="8dp"
         android:singleLine="true"
         android:ellipsize="marquee"
         android:visibility="gone"
@@ -42,11 +43,9 @@
     <com.android.keyguard.EmergencyButton
         android:id="@+id/emergency_call_button"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:layout_marginTop="@dimen/eca_overlap"
+        android:layout_height="32dp"
+        android:layout_marginBottom="12dp"
         android:text="@*android:string/lockscreen_emergency_call"
-        style="@style/Keyguard.TextView.EmergencyButton"
-        android:textAllCaps="@bool/kg_use_all_caps" />
+        style="@style/Keyguard.TextView.EmergencyButton" />
 
 </com.android.keyguard.EmergencyCarrierArea>
diff --git a/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml b/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
index 3e858c2..2eafc2f 100644
--- a/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
@@ -65,6 +65,7 @@
     <string name="kg_wrong_pin" msgid="4160978845968732624">"NIP incorrect"</string>
     <plurals name="kg_too_many_failed_attempts_countdown" formatted="false" msgid="991400408675793914">
       <item quantity="one">Réessayer dans <xliff:g id="NUMBER">%d</xliff:g> seconde.</item>
+      <item quantity="many">Try again in <xliff:g id="NUMBER">%d</xliff:g> seconds.</item>
       <item quantity="other">Réessayer dans <xliff:g id="NUMBER">%d</xliff:g> secondes.</item>
     </plurals>
     <string name="kg_pattern_instructions" msgid="5376036737065051736">"Dessinez votre schéma"</string>
@@ -88,11 +89,13 @@
     <string name="kg_password_wrong_pin_code_pukked" msgid="8047350661459040581">"NIP de carte SIM incorrect. Vous devez maintenant communiquer avec votre fournisseur de services pour déverrouiller votre appareil."</string>
     <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="7030584350995485026">
       <item quantity="one">Le NIP de la carte SIM incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative.</item>
+      <item quantity="many">Incorrect SIM PIN code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts.</item>
       <item quantity="other">Le NIP de la carte SIM incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives.</item>
     </plurals>
     <string name="kg_password_wrong_puk_code_dead" msgid="3698285357028468617">"La carte SIM est inutilisable. Communiquez avec votre fournisseur de services."</string>
     <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="3937306685604862886">
       <item quantity="one">Le code PUK de la carte SIM est incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative avant que votre carte SIM devienne définitivement inutilisable.</item>
+      <item quantity="many">Incorrect SIM PUK code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts before SIM becomes permanently unusable.</item>
       <item quantity="other">Le code PUK de la carte SIM est incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives avant que votre carte SIM devienne définitivement inutilisable.</item>
     </plurals>
     <string name="kg_password_pin_failed" msgid="5136259126330604009">"Le déverrouillage par NIP de la carte SIM a échoué."</string>
@@ -114,24 +117,29 @@
     <string name="kg_prompt_reason_user_request" msgid="6015774877733717904">"L\'appareil a été verrouillé manuellement"</string>
     <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="1337428979661197957">
       <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le schéma.</item>
+      <item quantity="many">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm pattern.</item>
       <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le schéma.</item>
     </plurals>
     <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="6444519502336330270">
       <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le NIP.</item>
+      <item quantity="many">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm PIN.</item>
       <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le NIP.</item>
     </plurals>
     <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5343961527665116914">
       <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le mot de passe.</item>
+      <item quantity="many">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm password.</item>
       <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le mot de passe.</item>
     </plurals>
     <string name="kg_fingerprint_not_recognized" msgid="5982606907039479545">"Doigt non reconnu"</string>
     <string name="kg_face_not_recognized" msgid="7903950626744419160">"Doigt non reconnu"</string>
     <plurals name="kg_password_default_pin_message" formatted="false" msgid="7730152526369857818">
       <item quantity="one">Entrez le NIP de votre carte SIM. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative.</item>
+      <item quantity="many">Enter SIM PIN. You have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts.</item>
       <item quantity="other">Entrez le NIP de votre carte SIM. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives.</item>
     </plurals>
     <plurals name="kg_password_default_puk_message" formatted="false" msgid="571308542462946935">
       <item quantity="one">La carte SIM est maintenant désactivée. Entrez le code PUK pour continuer. Il vous reste <xliff:g id="_NUMBER_1">%d</xliff:g> tentative avant que votre carte SIM devienne définitivement inutilisable. Pour obtenir plus de détails, communiquez avec votre fournisseur de services.</item>
+      <item quantity="many">SIM is now disabled. Enter PUK code to continue. You have <xliff:g id="_NUMBER_1">%d</xliff:g> remaining attempts before SIM becomes permanently unusable. Contact carrier for details.</item>
       <item quantity="other">La carte SIM est maintenant désactivée. Entrez le code PUK pour continuer. Il vous reste <xliff:g id="_NUMBER_1">%d</xliff:g> tentatives avant que votre carte SIM devienne définitivement inutilisable. Pour obtenir plus de détails, communiquez avec votre fournisseur de services.</item>
     </plurals>
     <string name="clock_title_default" msgid="6342735240617459864">"Par défaut"</string>
diff --git a/packages/SystemUI/res-keyguard/values-fr/strings.xml b/packages/SystemUI/res-keyguard/values-fr/strings.xml
index 8551fab..824ea41 100644
--- a/packages/SystemUI/res-keyguard/values-fr/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-fr/strings.xml
@@ -65,6 +65,7 @@
     <string name="kg_wrong_pin" msgid="4160978845968732624">"Code incorrect"</string>
     <plurals name="kg_too_many_failed_attempts_countdown" formatted="false" msgid="991400408675793914">
       <item quantity="one">Réessayez dans <xliff:g id="NUMBER">%d</xliff:g> seconde.</item>
+      <item quantity="many">Try again in <xliff:g id="NUMBER">%d</xliff:g> seconds.</item>
       <item quantity="other">Réessayez dans <xliff:g id="NUMBER">%d</xliff:g> secondes.</item>
     </plurals>
     <string name="kg_pattern_instructions" msgid="5376036737065051736">"Dessinez votre schéma"</string>
@@ -88,11 +89,13 @@
     <string name="kg_password_wrong_pin_code_pukked" msgid="8047350661459040581">"Code PIN de la carte SIM incorrect. Vous devez désormais contacter votre opérateur pour déverrouiller votre appareil."</string>
     <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="7030584350995485026">
       <item quantity="one">Code PIN de la carte SIM incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative.</item>
+      <item quantity="many">Incorrect SIM PIN code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts.</item>
       <item quantity="other">Code PIN de la carte SIM incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives.</item>
     </plurals>
     <string name="kg_password_wrong_puk_code_dead" msgid="3698285357028468617">"La carte SIM est inutilisable. Contactez votre opérateur."</string>
     <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="3937306685604862886">
       <item quantity="one">Clé PUK de la carte SIM incorrecte. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative avant que votre carte SIM ne devienne définitivement inutilisable.</item>
+      <item quantity="many">Incorrect SIM PUK code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts before SIM becomes permanently unusable.</item>
       <item quantity="other">Clé PUK de la carte SIM incorrecte. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives avant que votre carte SIM ne devienne définitivement inutilisable.</item>
     </plurals>
     <string name="kg_password_pin_failed" msgid="5136259126330604009">"Échec du déverrouillage à l\'aide du code PIN de la carte SIM."</string>
@@ -114,24 +117,29 @@
     <string name="kg_prompt_reason_user_request" msgid="6015774877733717904">"Appareil verrouillé manuellement"</string>
     <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="1337428979661197957">
       <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le schéma.</item>
+      <item quantity="many">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm pattern.</item>
       <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le schéma.</item>
     </plurals>
     <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="6444519502336330270">
       <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le code.</item>
+      <item quantity="many">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm PIN.</item>
       <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le code.</item>
     </plurals>
     <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5343961527665116914">
       <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le mot de passe.</item>
+      <item quantity="many">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm password.</item>
       <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le mot de passe.</item>
     </plurals>
     <string name="kg_fingerprint_not_recognized" msgid="5982606907039479545">"Non reconnu"</string>
     <string name="kg_face_not_recognized" msgid="7903950626744419160">"Non reconnu"</string>
     <plurals name="kg_password_default_pin_message" formatted="false" msgid="7730152526369857818">
       <item quantity="one">Saisissez le code de la carte SIM. <xliff:g id="NUMBER_1">%d</xliff:g> tentative restante.</item>
+      <item quantity="many">Enter SIM PIN. You have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts.</item>
       <item quantity="other">Saisissez le code de la carte SIM. <xliff:g id="NUMBER_1">%d</xliff:g> tentatives restantes.</item>
     </plurals>
     <plurals name="kg_password_default_puk_message" formatted="false" msgid="571308542462946935">
       <item quantity="one">La carte SIM est maintenant désactivée. Saisissez le code PUK pour continuer. Il vous reste <xliff:g id="_NUMBER_1">%d</xliff:g> tentative avant que votre carte SIM ne devienne définitivement inutilisable. Pour de plus amples informations, veuillez contacter votre opérateur.</item>
+      <item quantity="many">SIM is now disabled. Enter PUK code to continue. You have <xliff:g id="_NUMBER_1">%d</xliff:g> remaining attempts before SIM becomes permanently unusable. Contact carrier for details.</item>
       <item quantity="other">La carte SIM est maintenant désactivée. Saisissez le code PUK pour continuer. Il vous reste <xliff:g id="_NUMBER_1">%d</xliff:g> tentatives avant que votre carte SIM ne devienne définitivement inutilisable. Pour de plus amples informations, veuillez contacter votre opérateur.</item>
     </plurals>
     <string name="clock_title_default" msgid="6342735240617459864">"Par défaut"</string>
diff --git a/packages/SystemUI/res-keyguard/values-gl/strings.xml b/packages/SystemUI/res-keyguard/values-gl/strings.xml
index 4607981..0948871 100644
--- a/packages/SystemUI/res-keyguard/values-gl/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-gl/strings.xml
@@ -72,7 +72,7 @@
     <string name="kg_sim_pin_instructions_multi" msgid="3639863309953109649">"Introduce o PIN da SIM para \"<xliff:g id="CARRIER">%1$s</xliff:g>\"."</string>
     <string name="kg_sim_lock_esim_instructions" msgid="5577169988158738030">"<xliff:g id="PREVIOUS_MSG">%1$s</xliff:g> Desactiva a eSIM para usar o dispositivo sen o servizo móbil."</string>
     <string name="kg_pin_instructions" msgid="822353548385014361">"Introduce o PIN"</string>
-    <string name="kg_password_instructions" msgid="324455062831719903">"Insire o teu contrasinal"</string>
+    <string name="kg_password_instructions" msgid="324455062831719903">"Escribe o teu contrasinal"</string>
     <string name="kg_puk_enter_puk_hint" msgid="3005288372875367017">"Agora a tarxeta SIM está desactivada. Introduce o código PUK para continuar. Ponte en contacto co operador para obter máis información."</string>
     <string name="kg_puk_enter_puk_hint_multi" msgid="4876780689904862943">"Agora a SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" está desactivada. Introduce o código PUK para continuar. Ponte en contacto co operador para obter máis información."</string>
     <string name="kg_puk_enter_pin_hint" msgid="6028432138916150399">"Introduce o código PIN desexado"</string>
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index 5f2a946..401f3e3 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -23,10 +23,13 @@
         <item name="android:textColor">?attr/wallpaperTextColorSecondary</item>
         <item name="android:textSize">@dimen/kg_status_line_font_size</item>
     </style>
-    <style name="Keyguard.TextView.EmergencyButton" parent="@android:style/DeviceDefault.ButtonBar">
+    <style name="Keyguard.TextView.EmergencyButton" parent="Theme.SystemUI">
         <item name="android:textColor">?attr/wallpaperTextColorSecondary</item>
-        <item name="android:textSize">@dimen/kg_status_line_font_size</item>
-        <item name="android:background">@null</item>
+        <item name="android:textSize">14dp</item>
+        <item name="android:background">@drawable/kg_emergency_button_background</item>
+        <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+        <item name="android:paddingLeft">12dp</item>
+        <item name="android:paddingRight">12dp</item>
     </style>
     <style name="Widget.TextView.NumPadKey" parent="@android:style/Widget.TextView">
         <item name="android:singleLine">true</item>
diff --git a/packages/SystemUI/res-product/values-de/strings.xml b/packages/SystemUI/res-product/values-de/strings.xml
index 5c8f842..a84413d 100644
--- a/packages/SystemUI/res-product/values-de/strings.xml
+++ b/packages/SystemUI/res-product/values-de/strings.xml
@@ -21,7 +21,7 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="dock_alignment_slow_charging" product="default" msgid="6997633396534416792">"Smartphone genau platzieren, um es schneller zu laden"</string>
     <string name="dock_alignment_not_charging" product="default" msgid="3980752926226749808">"Smartphone genau platzieren, um es kabellos zu laden"</string>
-    <string name="inattentive_sleep_warning_message" product="tv" msgid="6844464574089665063">"Das Android TV-Gerät wird gleich ausgeschaltet. Falls es eingeschaltet bleiben soll, drücke beispielsweise eine Taste oder berühre den Bildschirm."</string>
+    <string name="inattentive_sleep_warning_message" product="tv" msgid="6844464574089665063">"Das Android TV-Gerät wird gleich ausgeschaltet. Falls es eingeschaltet bleiben soll, drücke eine Taste."</string>
     <string name="inattentive_sleep_warning_message" product="default" msgid="5693904520452332224">"Das Gerät wird gleich ausgeschaltet. Falls es eingeschaltet bleiben soll, drücke beispielsweise eine Taste oder berühre den Bildschirm."</string>
     <string name="keyguard_missing_sim_message" product="tablet" msgid="5018086454277963787">"Keine SIM-Karte im Tablet."</string>
     <string name="keyguard_missing_sim_message" product="default" msgid="7053347843877341391">"Keine SIM-Karte im Smartphone."</string>
diff --git a/packages/SystemUI/res-product/values-pl/strings.xml b/packages/SystemUI/res-product/values-pl/strings.xml
index 9a9980a..5ac3d84 100644
--- a/packages/SystemUI/res-product/values-pl/strings.xml
+++ b/packages/SystemUI/res-product/values-pl/strings.xml
@@ -34,10 +34,10 @@
     <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="8110939900089863103">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> próbowano nieprawidłowo odblokować telefon. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach użytkownik zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
     <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="8509811676952707883">"Po raz <xliff:g id="NUMBER">%d</xliff:g> próbowano nieprawidłowo odblokować tablet. Użytkownik zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
     <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="3051962486994265014">"Po raz <xliff:g id="NUMBER">%d</xliff:g> próbowano nieprawidłowo odblokować telefon. Użytkownik zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="1049523640263353830">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> próbowano nieprawidłowo odblokować tablet. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach profil do pracy zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="3280816298678433681">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> próbowano nieprawidłowo odblokować telefon. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach profil do pracy zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4417100487251371559">"Po raz <xliff:g id="NUMBER">%d</xliff:g> próbowano nieprawidłowo odblokować tablet. Profil do pracy zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4682221342671290678">"Po raz <xliff:g id="NUMBER">%d</xliff:g> próbowano nieprawidłowo odblokować telefon. Profil do pracy zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
+    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="1049523640263353830">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> próbowano nieprawidłowo odblokować tablet. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach profil służbowy zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
+    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="3280816298678433681">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> próbowano nieprawidłowo odblokować telefon. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach profil służbowy zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
+    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4417100487251371559">"Po raz <xliff:g id="NUMBER">%d</xliff:g> próbowano nieprawidłowo odblokować tablet. Profil służbowy zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
+    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4682221342671290678">"Po raz <xliff:g id="NUMBER">%d</xliff:g> próbowano nieprawidłowo odblokować telefon. Profil służbowy zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
     <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="1860049973474855672">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> nieprawidłowo narysowano wzór odblokowania. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach konieczne będzie odblokowanie tabletu przy użyciu konta e-mail.\n\n Spróbuj ponownie za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
     <string name="kg_failed_attempts_almost_at_login" product="default" msgid="44112553371516141">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> nieprawidłowo narysowano wzór odblokowania. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach konieczne będzie odblokowanie telefonu przy użyciu konta e-mail.\n\n Spróbuj ponownie za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
     <string name="global_action_lock_message" product="default" msgid="7092460751050168771">"Odblokuj telefon, by wyświetlić więcej opcji"</string>
diff --git a/packages/SystemUI/res/drawable/privacy_chip_bg.xml b/packages/SystemUI/res/drawable/privacy_chip_bg.xml
new file mode 100644
index 0000000..827cf4a
--- /dev/null
+++ b/packages/SystemUI/res/drawable/privacy_chip_bg.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2020 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#242424" /> <!-- 14% of white -->
+    <padding android:paddingTop="@dimen/ongoing_appops_chip_bg_padding"
+        android:paddingBottom="@dimen/ongoing_appops_chip_bg_padding" />
+    <corners android:radius="@dimen/ongoing_appops_chip_bg_corner_radius" />
+</shape>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/controls_management.xml b/packages/SystemUI/res/layout/controls_management.xml
index ae7f44d..b9e711e 100644
--- a/packages/SystemUI/res/layout/controls_management.xml
+++ b/packages/SystemUI/res/layout/controls_management.xml
@@ -50,7 +50,7 @@
 
     <FrameLayout
         android:layout_width="match_parent"
-        android:layout_height="72dp">
+        android:layout_height="@dimen/controls_management_footer_height">
 
         <View
             android:layout_width="match_parent"
@@ -61,7 +61,8 @@
         <androidx.constraintlayout.widget.ConstraintLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:padding="@dimen/controls_management_footer_side_margin">
+            android:paddingHorizontal="@dimen/controls_management_footer_side_margin"
+            android:paddingVertical="@dimen/controls_management_footer_top_margin" >
 
             <Button
                 android:id="@+id/other_apps"
diff --git a/packages/SystemUI/res/layout/controls_management_favorites.xml b/packages/SystemUI/res/layout/controls_management_favorites.xml
index 4850e75..0ddd0e38 100644
--- a/packages/SystemUI/res/layout/controls_management_favorites.xml
+++ b/packages/SystemUI/res/layout/controls_management_favorites.xml
@@ -36,7 +36,7 @@
         android:layout_width="wrap_content"
         android:layout_height="@dimen/controls_management_page_indicator_height"
         android:layout_gravity="center"
-        android:layout_marginTop="@dimen/controls_management_list_margin"
+        android:layout_marginTop="@dimen/controls_management_indicator_top_margin"
         android:visibility="invisible" />
 
     <androidx.viewpager2.widget.ViewPager2
diff --git a/packages/SystemUI/res/layout/controls_structure_page.xml b/packages/SystemUI/res/layout/controls_structure_page.xml
index f048d62..412ed56 100644
--- a/packages/SystemUI/res/layout/controls_structure_page.xml
+++ b/packages/SystemUI/res/layout/controls_structure_page.xml
@@ -21,4 +21,4 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    android:layout_marginTop="@dimen/controls_management_zone_top_margin"/>
\ No newline at end of file
+    android:layout_marginTop="@dimen/controls_management_favorites_top_margin"/>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/global_screenshot_action_chip.xml b/packages/SystemUI/res/layout/global_screenshot_action_chip.xml
index 46396e3..4b3534b 100644
--- a/packages/SystemUI/res/layout/global_screenshot_action_chip.xml
+++ b/packages/SystemUI/res/layout/global_screenshot_action_chip.xml
@@ -32,6 +32,7 @@
         android:gravity="center">
         <ImageView
             android:id="@+id/screenshot_action_chip_icon"
+            android:tint="@*android:color/accent_device_default"
             android:layout_width="@dimen/screenshot_action_chip_icon_size"
             android:layout_height="@dimen/screenshot_action_chip_icon_size"
             android:layout_marginStart="@dimen/screenshot_action_chip_padding_start"
diff --git a/packages/SystemUI/res/layout/media_view.xml b/packages/SystemUI/res/layout/media_view.xml
index 3c641af..170f2c4 100644
--- a/packages/SystemUI/res/layout/media_view.xml
+++ b/packages/SystemUI/res/layout/media_view.xml
@@ -166,8 +166,7 @@
         android:layout_height="wrap_content"
         android:clickable="true"
         android:maxHeight="@dimen/qs_media_enabled_seekbar_height"
-        android:paddingTop="16dp"
-        android:paddingBottom="16dp"
+        android:paddingVertical="@dimen/qs_media_enabled_seekbar_vertical_padding"
         android:thumbTint="@color/media_primary_text"
         android:progressTint="@color/media_seekbar_progress"
         android:progressBackgroundTint="@color/media_disabled"
@@ -210,8 +209,98 @@
         android:layout_width="@dimen/qs_media_icon_size"
         android:layout_height="@dimen/qs_media_icon_size" />
 
-    <!-- Buttons to remove this view when no longer needed -->
-    <include
-        layout="@layout/qs_media_panel_options"
-        android:visibility="gone" />
+    <!-- Constraints are set here as they are the same regardless of host -->
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/qs_media_panel_outer_padding"
+        android:layout_marginStart="@dimen/qs_media_panel_outer_padding"
+        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
+        android:id="@+id/media_text"
+        android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
+        android:textColor="@color/media_primary_text"
+        android:text="@string/controls_media_title"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintBottom_toTopOf="@id/remove_text"
+        app:layout_constraintVertical_chainStyle="spread_inside"/>
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/qs_media_panel_outer_padding"
+        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
+        android:id="@+id/remove_text"
+        android:fontFamily="@*android:string/config_headlineFontFamily"
+        android:singleLine="true"
+        android:textColor="@color/media_primary_text"
+        android:text="@string/controls_media_close_session"
+        app:layout_constraintTop_toBottomOf="@id/media_text"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintBottom_toTopOf="@id/settings"/>
+
+    <FrameLayout
+        android:id="@+id/settings"
+        android:background="@drawable/qs_media_light_source"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/qs_media_panel_outer_padding"
+        android:paddingBottom="@dimen/qs_media_panel_outer_padding"
+        android:minWidth="48dp"
+        android:minHeight="48dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/remove_text">
+
+        <TextView
+            android:layout_gravity="bottom"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
+            android:textColor="@android:color/white"
+            android:text="@string/controls_media_settings_button" />
+    </FrameLayout>
+
+    <FrameLayout
+        android:id="@+id/cancel"
+        android:background="@drawable/qs_media_light_source"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
+        android:paddingBottom="@dimen/qs_media_panel_outer_padding"
+        android:minWidth="48dp"
+        android:minHeight="48dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/dismiss" >
+
+        <TextView
+            android:layout_gravity="bottom"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
+            android:textColor="@android:color/white"
+            android:text="@string/cancel" />
+    </FrameLayout>
+
+    <FrameLayout
+        android:id="@+id/dismiss"
+        android:background="@drawable/qs_media_light_source"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
+        android:paddingBottom="@dimen/qs_media_panel_outer_padding"
+        android:minWidth="48dp"
+        android:minHeight="48dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent">
+
+        <TextView
+            android:layout_gravity="bottom"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
+            android:textColor="@android:color/white"
+            android:text="@string/controls_media_dismiss_button"
+        />
+    </FrameLayout>
 </com.android.systemui.util.animation.TransitionLayout>
diff --git a/packages/SystemUI/res/layout/ongoing_privacy_chip.xml b/packages/SystemUI/res/layout/ongoing_privacy_chip.xml
new file mode 100644
index 0000000..3c30632
--- /dev/null
+++ b/packages/SystemUI/res/layout/ongoing_privacy_chip.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2020 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+
+<com.android.systemui.privacy.OngoingPrivacyChip
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/privacy_chip"
+    android:layout_height="match_parent"
+    android:layout_width="wrap_content"
+    android:layout_gravity="center_vertical|end"
+    android:focusable="true" >
+
+        <FrameLayout
+            android:id="@+id/background"
+            android:layout_height="@dimen/ongoing_appops_chip_height"
+            android:layout_width="wrap_content"
+            android:minWidth="48dp"
+            android:layout_gravity="center_vertical">
+                <LinearLayout
+                    android:id="@+id/icons_container"
+                    android:layout_height="match_parent"
+                    android:layout_width="wrap_content"
+                    android:gravity="center_vertical"
+                    />
+          </FrameLayout>
+</com.android.systemui.privacy.OngoingPrivacyChip>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/qs_footer_impl.xml b/packages/SystemUI/res/layout/qs_footer_impl.xml
index 5c00af5..436188a 100644
--- a/packages/SystemUI/res/layout/qs_footer_impl.xml
+++ b/packages/SystemUI/res/layout/qs_footer_impl.xml
@@ -62,7 +62,7 @@
                 android:gravity="center_vertical"
                 android:focusable="true"
                 android:singleLine="true"
-                android:ellipsize="end"
+                android:ellipsize="marquee"
                 android:textAppearance="@style/TextAppearance.QS.Status"
                 android:layout_marginEnd="4dp"
                 android:visibility="gone"/>
diff --git a/packages/SystemUI/res/layout/qs_media_panel_options.xml b/packages/SystemUI/res/layout/qs_media_panel_options.xml
deleted file mode 100644
index e72c0e8..0000000
--- a/packages/SystemUI/res/layout/qs_media_panel_options.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ 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
-  -->
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/qs_media_controls_options"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:gravity="center"
-    android:padding="16dp"
-    android:orientation="vertical">
-    <LinearLayout
-        android:layout_width="wrap_content"
-        android:layout_height="48dp"
-        android:layout_weight="1"
-        android:minWidth="48dp"
-        android:layout_gravity="start|bottom"
-        android:gravity="bottom"
-        android:id="@+id/remove"
-        android:orientation="horizontal">
-        <ImageView
-            android:layout_width="18dp"
-            android:layout_height="18dp"
-            android:id="@+id/remove_icon"
-            android:layout_marginEnd="16dp"
-            android:tint="@color/media_primary_text"
-            android:src="@drawable/ic_clear"/>
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:id="@+id/remove_text"
-            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
-            android:singleLine="true"
-            android:textColor="@color/media_primary_text"
-            android:text="@string/controls_media_close_session" />
-    </LinearLayout>
-    <TextView
-        android:id="@+id/cancel"
-        android:layout_width="wrap_content"
-        android:layout_height="48dp"
-        android:layout_weight="1"
-        android:minWidth="48dp"
-        android:layout_gravity="end|bottom"
-        android:gravity="bottom"
-        android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
-        android:textColor="@android:color/white"
-        android:text="@string/cancel" />
-</LinearLayout>
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml b/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
index be86e5f..3c74801 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
@@ -14,7 +14,7 @@
 ** See the License for the specific language governing permissions and
 ** limitations under the License.
 -->
-<FrameLayout
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:systemui="http://schemas.android.com/apk/res-auto"
     android:id="@+id/quick_status_bar_system_icons"
@@ -27,6 +27,13 @@
     android:clickable="true"
     android:paddingTop="@dimen/status_bar_padding_top" >
 
+    <LinearLayout
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:orientation="horizontal"
+        android:gravity="center_vertical|start" >
+
     <com.android.systemui.statusbar.policy.Clock
         android:id="@+id/clock"
         android:layout_width="wrap_content"
@@ -38,5 +45,23 @@
         android:singleLine="true"
         android:textAppearance="@style/TextAppearance.StatusBar.Clock"
         systemui:showDark="false" />
+    </LinearLayout>
 
-</FrameLayout>
+    <android.widget.Space
+        android:id="@+id/space"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_gravity="center_vertical|center_horizontal"
+        android:visibility="gone" />
+
+    <LinearLayout
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:orientation="horizontal"
+        android:gravity="center_vertical|end" >
+
+    <include layout="@layout/ongoing_privacy_chip" />
+
+    </LinearLayout>
+</LinearLayout>
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 431c196..a72c9aa 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Hervat"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Kanselleer"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Deel"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Vee uit"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Skermopname is gekanselleer"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Skermopname is gestoor, tik om te sien"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Skermopname is uitgevee"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Kon nie skermopname uitvee nie"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Kon nie toestemmings kry nie"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Kon nie skermopname begin nie"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Bo 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Bo 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Volskerm onder"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posisie <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dubbeltik om te wysig."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dubbeltik om by te voeg."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Skuif <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Verwyder <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Voeg <xliff:g id="TILE_NAME">%1$s</xliff:g> by posisie <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Skuif <xliff:g id="TILE_NAME">%1$s</xliff:g> na posisie <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"verwyder teël"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"voeg teël aan einde by"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Skuif teël"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Voeg teël by"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Skuif na <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Voeg by posisie <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posisie <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Kitsinstellingswysiger."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-kennisgewing: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Program sal dalk nie met verdeelde skerm werk nie."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Slaan oor na vorige"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Verander grootte"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Foon afgeskakel weens hitte"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Jou foon werk nou normaal"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Jou foon werk nou normaal.\nTik vir meer inligting"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Jou foon was te warm en dit het afgeskakel om af te koel. Jou foon werk nou normaal.\n\nJou foon kan dalk te warm word as jy:\n	• Hulpbron-intensiewe programme (soos dobbel-, video- of navigasieprogramme) gebruik\n	• Groot lêers af- of oplaai\n	• Jou foon in hoë temperature gebruik"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Sien versorgingstappe"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Foon raak warm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Sommige kenmerke is beperk terwyl foon afkoel"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Sommige kenmerke is beperk terwyl foon afkoel.\nTik vir meer inligting"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Jou foon sal outomaties probeer om af te koel. Jy kan steeds jou foon gebruik, maar dit sal dalk stadiger wees.\n\nJou foon sal normaalweg werk nadat dit afgekoel het."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Sien versorgingstappe"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Trek laaier uit"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Kan nie hierdie toestel laai nie. Trek die kragprop uit, en wees versigtig, want die kabel kan warm wees."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Sien versorgingstappe"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Instellings"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Het dit"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Stort SysUI-hoop"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> gebruik tans jou <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Programme gebruik tans jou <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" en "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ligging"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofoon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensors is af"</string>
     <string name="device_services" msgid="1549944177856658705">"Toesteldienste"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Titelloos"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Laai tans aanbevelings"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Versteek die huidige sessie."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Versteek"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Maak toe"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Hervat"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Instellings"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Onaktief, gaan program na"</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 30a09d3..d683860 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ከቆመበት ቀጥል"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"ይቅር"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"አጋራ"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ሰርዝ"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"የማያ ገጽ ቀረጻ ተሰርዟል"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"የማያ ገጽ ቀረጻ ተቀምጧል፣ ለመመልከት መታ ያድርጉ"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"የማያ ገጽ ቀረጻ ተሰርዟል"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"የማያ ገጽ ቀረጻን መሰረዝ ላይ ስህተት"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"ፈቃዶችን ማግኘት አልተቻለም"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"የማያ ገጽ ቀረጻን መጀመር ላይ ስህተት"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ከላይ 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ከላይ 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"የታች ሙሉ ማያ ገጽ"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ቦታ <xliff:g id="POSITION">%1$d</xliff:g>፣ <xliff:g id="TILE_NAME">%2$s</xliff:g>። ለማርትዕ ሁለቴ መታ ያድርጉ።"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>። ለማከል ሁለቴ መታ ያድርጉ።"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ን ይውሰዱ"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ን ያስወግዱ"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ን ወደ አቀማመጥ <xliff:g id="POSITION">%2$d</xliff:g> አክል"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ን ወደ አቀማመጥ <xliff:g id="POSITION">%2$d</xliff:g> አንቀሳቅስ"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"የፈጣን ቅንብሮች አርታዒ።"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"የ<xliff:g id="ID_1">%1$s</xliff:g> ማሳወቂያ፦ <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"መተግበሪያ ከተከፈለ ማያ ገጽ ጋር ላይሠራ ይችላል"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"ወደ ቀዳሚ ዝለል"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"መጠን ይቀይሩ"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ስልክ በሙቀት ምክንያት ጠፍቷል"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"የእርስዎ ስልክ አሁን በመደበኝነት እያሄደ ነው"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"የእርስዎ ስልክ በመደበኛ ሁኔታ እየሠራ ነው።\nለተጨማሪ መረጃ መታ ያድርጉ"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"የእርስዎ ስልክ በጣም ግሎ ነበር፣ ስለዚህ እንዲቀዘቅዝ ጠፍቷል። የእርስዎ ስልክ አሁን በመደበኝነት እያሄደ ነው።\n\nየሚከተሉትን ካደረጉ የእርስዎ በጣም ሊግል ይችላል፦\n	• ኃይል በጣም የሚጠቀሙ መተግበሪያዎችን (እንደ ጨዋታ፣ ቪዲዮ ወይም የአሰሳ መተግበሪያዎች ያሉ) ከተጠቀሙ\n	• ትላልቅ ፋይሎችን ካወረዱ ወይም ከሰቀሉ\n	• ስልክዎን በከፍተኛ ሙቀት ውስጥ ከተጠቀሙ"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"የእንክብካቤ ደረጃዎችን ይመልከቱ"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ስልኩ እየሞቀ ነው"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ስልኩ እየቀዘቀዘ ሳለ አንዳንድ ባህሪዎች ይገደባሉ"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"አንዳንድ ባሕሪያት ስልኩ እየቀዘቀዘ እያለ ውስን ይሆናሉ።\nለተጨማሪ መረጃ መታ ያድርጉ"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"የእርስዎ ስልክ በራስ-ሰር ለመቀዝቀዝ ይሞክራል። አሁንም ስልክዎን መጠቀም ይችላሉ፣ ነገር ግን ሊንቀራፈፍ ይችላል።\n\nአንዴ ስልክዎ ከቀዘቀዘ በኋላ በመደበኝነት ያሄዳል።"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"የእንክብካቤ ደረጃዎችን ይመልከቱ"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ኃይል መሙያን ይንቀሉ"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"የዚህን መሣሪያ ባትሪ መሙላት ላይ ችግር አለ። የኃይል አስማሚውን ይንቀሉትና ሊግል ስለሚችል ገመዱን ይጠብቁት።"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"የእንክብካቤ ደረጃዎችን ይመልከቱ"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ቅንብሮች"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"ገባኝ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI Heap አራግፍ"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> የእርስዎን <xliff:g id="TYPES_LIST">%2$s</xliff:g> እየተጠቀመ ነው።"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"መተግበሪያዎች የእርስዎን <xliff:g id="TYPES_LIST">%s</xliff:g> እየተጠቀሙ ነው።"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"፣ "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" እና "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"ካሜራ"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"አካባቢ"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"ማይክሮፎን"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"ዳሳሾች ጠፍተዋል"</string>
     <string name="device_services" msgid="1549944177856658705">"የመሣሪያ አገልግሎቶች"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"ርዕስ የለም"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"ምክሮችን በመጫን ላይ"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"ሚዲያ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"የአሁኑን ክፍለ-ጊዜ ደብቅ።"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"ደብቅ"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"አሰናብት"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"ከቆመበት ቀጥል"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ቅንብሮች"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"ንቁ ያልኾነ፣ መተግበሪያን ይፈትሹ"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 872bca8..05f796a 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"استئناف"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"إلغاء"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"مشاركة"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"حذف"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"تمّ إلغاء تسجيل الشاشة."</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"تمّ حفظ تسجيل الشاشة، انقر لعرضه."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"تمّ حذف تسجيل الشاشة."</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"حدث خطأ أثناء حذف تسجيل الشاشة."</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"تعذّر الحصول على أذونات."</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"حدث خطأ في بدء تسجيل الشاشة"</string>
@@ -904,12 +902,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ضبط حجم النافذة العلوية ليكون ٥٠%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ضبط حجم النافذة العلوية ليكون ٣٠%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"عرض النافذة السفلية بملء الشاشة"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"الموضع <xliff:g id="POSITION">%1$d</xliff:g>، <xliff:g id="TILE_NAME">%2$s</xliff:g>. انقر مرّتين للتعديل."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. انقر مرّتين للإضافة."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"نقل <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"إزالة <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"إضافة <xliff:g id="TILE_NAME">%1$s</xliff:g> إلى الموضع <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"نقل <xliff:g id="TILE_NAME">%1$s</xliff:g> إلى الموضع <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"برنامج تعديل الإعدادات السريعة."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"إشعار <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"يمكن ألا يعمل التطبيق مع وضع تقسيم الشاشة."</string>
@@ -942,11 +941,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"التخطي إلى السابق"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"تغيير الحجم"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"تم إيقاف الهاتف بسبب الحرارة"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"يعمل هاتفك الآن بشكل طبيعي"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"يعمل هاتفك الآن بشكل طبيعي.\nانقر للحصول على مزيد من المعلومات."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"ارتفعت درجة حرارة هاتفك بشدة، لذا تم إيقاف تشغيله لخفض درجة حرارته. يعمل هاتفك الآن بشكل طبيعي.\n\nقد ترتفع بشدة درجة حرارة هاتفك إذا:\n	• استخدمت تطبيقات كثيفة الاستخدام لموارد الجهاز (مثل الألعاب أو الفيديو أو تطبيقات التنقل)\n	• نزَّلت أو حمَّلت ملفات كبيرة الحجم\n	• استخدمت هاتفك وسط أجواء مرتفعة الحرارة"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"الاطّلاع على خطوات العناية"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"تزداد درجة حرارة الهاتف"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"يتم تقييد عمل بعض الميزات إلى أن تنخفض درجة حرارة الهاتف"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"يتم تقييد عمل بعض الميزات إلى أن تنخفض درجة حرارة الهاتف.\nانقر للحصول على مزيد من المعلومات."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"سيحاول الهاتف تخفيض درجة حرارته تلقائيًا. سيظل بإمكانك استخدام هاتفك، ولكن قد يعمل بشكل أبطأ.\n\nبعد أن تنخفض درجة حرارة الهاتف، سيستعيد سرعته المعتادة."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"الاطّلاع على خطوات العناية"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"فصل الشاحن"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"هناك مشكلة في شحن هذا الجهاز. يُرجى فصل محوِّل الطاقة بحرص لأن الكابل قد يكون ساخنًا."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"الاطّلاع على خطوات العناية"</string>
@@ -1008,6 +1009,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"الإعدادات"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"حسنًا"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"‏تفريغ ذاكرة SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"التطبيق <xliff:g id="APP">%1$s</xliff:g> يستخدم <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"تستخدم التطبيقات <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"، "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" و "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"الكاميرا"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"الموقع"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"الميكروفون"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"إيقاف أجهزة الاستشعار"</string>
     <string name="device_services" msgid="1549944177856658705">"خدمات الأجهزة"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"بلا عنوان"</string>
@@ -1090,7 +1098,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"جارٍ تحميل الاقتراحات"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"الوسائط"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"إخفاء الجلسة الحالية"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"إخفاء"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"إغلاق"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"استئناف التشغيل"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"الإعدادات"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"غير نشط، تحقّق من التطبيق."</string>
diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml
index 43bfa89..96f9770 100644
--- a/packages/SystemUI/res/values-as/strings.xml
+++ b/packages/SystemUI/res/values-as/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ৰখোৱাৰ পৰা পুনৰ আৰম্ভ কৰক"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"বাতিল কৰক"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"শ্বেয়াৰ কৰক"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"মচক"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"স্ক্রীণ ৰেকৰ্ড কৰাটো বাতিল কৰা হ’ল"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"স্ক্রীণ ৰেকৰ্ডিং ছেভ কৰা হ’ল, চাবলৈ টিপক"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"স্ক্রীণ ৰেকৰ্ডিং মচা হ’ল"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"স্ক্রীণ ৰেকৰ্ডিং মচি থাকোঁতে কিবা আসোঁৱাহ হ’ল"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"অনুমতি পাব পৰা নগ\'ল"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"স্ক্রীন ৰেকৰ্ড কৰা আৰম্ভ কৰোঁতে আসোঁৱাহ হৈছে"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"শীর্ষ স্ক্ৰীণখন ৫০% কৰক"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"শীর্ষ স্ক্ৰীণখন ৩০% কৰক"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"তলৰ স্ক্ৰীণখন সম্পূৰ্ণ স্ক্ৰীণ কৰক"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"অৱস্থান <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>। সম্পাদনা কৰিবৰ বাবে দুবাৰ টিপক।"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>। যোগ কৰিবলৈ দুবাৰ টিপক।"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> স্থানান্তৰ কৰক"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ক আঁতৰাওক"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"এই স্থান <xliff:g id="POSITION">%2$d</xliff:g>ত <xliff:g id="TILE_NAME">%1$s</xliff:g> যোগ কৰক"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ক এই স্থান <xliff:g id="POSITION">%2$d</xliff:g>লৈ যাওক"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ক্ষিপ্ৰ ছেটিংসমূহৰ সম্পাদক।"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> জাননী: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"বিভাজিত স্ক্ৰীণৰ সৈতে এপে হয়তো কাম নকৰিব।"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"আগৰটো মিডিয়ালৈ যাওক"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"আকাৰ সলনি কৰক"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"আপোনাৰ ফ\'নটো গৰম হোৱাৰ কাৰণে অফ কৰা হৈছিল"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"আপোনাৰ ফ\'নটো এতিয়া স্বাভাৱিকভাৱে চলি আছে"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"আপোনাৰ ফ’নটো এতিয়া স্বাভাৱিকভাৱে চলি আছে।\nঅধিক তথ্যৰ বাবে টিপক"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"আপোনাৰ ফ\'নটো অত্যধিক গৰম হোৱাৰ বাবে ইয়াক ঠাণ্ডা কৰিবলৈ অফ কৰা হৈছিল। আপোনাৰ ফ\'নটো এতিয়া স্বাভাৱিকভাৱে চলি আছে।\n\nআপোনাৰ ফ\'নটো গৰম হ\'ব পাৰে, যদিহে আপুনি:\n	• ফ\'নটোৰ হাৰ্ডৱেৰ অত্যধিক মাত্ৰাত ব্যৱহাৰ কৰা এপসমূহ চলালে (যেনে, ভিডিঅ\' গেইম, ভিডিঅ\', দিক্-নিৰ্দেশনা এপসমূহ)\n	• খুউব ডাঙৰ আকাৰৰ ফাইল আপল\'ড বা ডাউনল’ড কৰিলে\n	• আপোনাৰ ফ\'নটো উচ্চ তাপমাত্ৰাৰ পৰিৱেশত ব্যৱহাৰ কৰিলে"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"যত্ন লোৱাৰ পদক্ষেপসমূহ চাওক"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ফ\'নটো গৰম হ\'বলৈ ধৰিছে"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ফ\'নটো ঠাণ্ডা হৈ থকা সময়ত কিছুমান সুবিধা উপলব্ধ নহ’ব"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ফ’নটো ঠাণ্ডা হৈ থকাৰ সময়ত কিছুমান সুবিধা উপলব্ধ নহয়।\nঅধিক তথ্যৰ বাবে টিপক"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"আপোনাৰ ফ\'নটোৱে নিজে নিজে ঠাণ্ডা হ\'বলৈ স্বয়ংক্ৰিয়ভাৱে চেষ্টা কৰিব। আপুনি ফ\'নটো ব্যৱহাৰ কৰি থাকিব পাৰে কিন্তু ই লাহে লাহে চলিব পাৰে।\n\nফ\'নটো সম্পূৰ্ণভাৱে ঠাণ্ডা হোৱাৰ পিছত ই আগৰ নিচিনাকৈয়েই চলিব।"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"যত্ন লোৱাৰ পদক্ষেপসমূহ চাওক"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"চ্চার্জাৰ আনপ্লাগ কৰক"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"এই ডিভাইচটো চ্চার্জ কৰোঁতে কিবা সমস্যা হৈছে। পাৱাৰ এডাপ্টাৰটো আনপ্লাগ কৰক, কেব’লডাল গৰম হ’ব পাৰে গতিকে সাবধান হ’ব।"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"যত্ন লোৱাৰ পদক্ষেপসমূহ চাওক"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"সাধাৰণ বার্তাসমূহ"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"সঞ্চয়াগাৰ"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"ইংগিতবোৰ"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"তাৎক্ষণিক এপসমূহ"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> চলি আছে"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"ইনষ্ট\'ল নকৰাকৈয়েই এপটো খোলা হৈছে।"</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"ইনষ্ট\'ল নকৰাকৈয়েই এপটো খোলা হৈছে। অধিক জানিবলৈ টিপক।"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ছেটিংবোৰ"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"বুজি পালোঁ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI হীপ ডাম্প কৰক"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g>এ আপোনাৰ <xliff:g id="TYPES_LIST">%2$s</xliff:g> ব্যৱহাৰ কৰি আছে।"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"এপ্লিকেশ্বনসমূহে আপোনাৰ <xliff:g id="TYPES_LIST">%s</xliff:g> ব্যৱহাৰ কৰি আছে।"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" আৰু "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"কেমেৰা"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"অৱস্থান"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"মাইক্ৰ\'ফ\'ন"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"ছেন্সৰ অফ হৈ আছে"</string>
     <string name="device_services" msgid="1549944177856658705">"ডিভাইচ সেৱা"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"কোনো শিৰোনাম নাই"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"চুপাৰিছসমূহ ল’ড কৰি থকা হৈছে"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"মিডিয়া"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"বৰ্তমানৰ ছেশ্বনটো লুকুৱাওক।"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"লুকুৱাওক"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"অগ্ৰাহ্য কৰক"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"পুনৰ আৰম্ভ কৰক"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ছেটিংসমূহ"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"সক্ৰিয় নহয়, এপ্‌টো পৰীক্ষা কৰক"</string>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index c4693be..449956c 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Davam edin"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Ləğv edin"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Paylaşın"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Silin"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Ekranın video çəkimi ləğv edildi"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Ekranın video çəkimi yadda saxlanıldı. Baxmaq üçün klikləyin"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Ekranın video çəkimi silindi"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Ekranın video çəkiminin silinməsi zamanı xəta baş verdi"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"İcazələr əldə edilmədi"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Ekranın yazılması ilə bağlı xəta"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Yuxarı 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Yuxarı 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Aşağı tam ekran"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g> mövqeyi, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Redaktə etmək üçün iki dəfə tıklayın."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Əlavə etmək üçün iki dəfə tıklayın."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> köçürün"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> silin"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="POSITION">%2$d</xliff:g> pozisiyasına <xliff:g id="TILE_NAME">%1$s</xliff:g> əlavə edin"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g> pozisiyasına <xliff:g id="TILE_NAME">%1$s</xliff:g> köçürün"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"lövhəni silin"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"sona lövhə əlavə edin"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Lövhəni köçürün"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Lövhə əlavə edin"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"<xliff:g id="POSITION">%1$d</xliff:g> mövqeyinə köçürün"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"<xliff:g id="POSITION">%1$d</xliff:g> mövqeyinə əlavə edin"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"<xliff:g id="POSITION">%1$d</xliff:g> mövqeyi"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Sürətli ayarlar redaktoru."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> bildiriş: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Tətbiq bölünmüş ekran ilə işləməyə bilər."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Əvvəlkinə keçin"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Ölçüsünü dəyişin"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"İstiliyə görə telefon söndü"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefon indi normal işləyir"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefonunuz indi normal işləyir.\nƏtraflı məlumat üçün toxunun"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon çox isti idi və soyumaq üçün söndü. Hazırda telefon normal işləyir.\n\n Telefon bu hallarda çox isti ola bilər:\n 	• Çox resurslu tətbiq istifadə etsəniz (oyun, video və ya naviqasiya tətbiqi kimi)\n	• Böyük həcmli fayl endirsəniz və ya yükləsəniz\n	• Telefonu yüksək temperaturda istifadə etsəniz"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Ehtiyat tədbiri mərhələlərinə baxın"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon qızmağa başlayır"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Telefon soyuyana kimi bəzi funksiyalar məhdudlaşdırılır"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Telefon soyuyana kimi bəzi funksiyalar məhdudlaşdırılır.\nƏtraflı məlumat üçün toxunun"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefonunuz avtomatik olaraq soyumağa başlayacaq. Telefon istifadəsinə davam edə bilərsiniz, lakin sürəti yavaşlaya bilər.\n\nTelefonunuz soyuduqdan sonra normal işləyəcək."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Ehtiyat tədbiri mərhələlərinə baxın"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Adapteri cərəyandan ayırın"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Bu cihazın batareya yığmasında problem var. Adapteri cərəyandan ayırın. Ehtiyatlı olun, kabel isti ola bilər."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Ehtiyat tədbiri mərhələlərinə baxın"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Ayarlar"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Anladım"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> <xliff:g id="TYPES_LIST">%2$s</xliff:g> tətbiqlərindən istifadə edir."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Tətbiqlər <xliff:g id="TYPES_LIST">%s</xliff:g> istifadə edir."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" və "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"məkan"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensorlar deaktivdir"</string>
     <string name="device_services" msgid="1549944177856658705">"Cihaz Xidmətləri"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Başlıq yoxdur"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Tövsiyələr yüklənir"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Cari sessiyanı gizlədin."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Gizlədin"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"İmtina edin"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Davam edin"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Ayarlar"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Aktiv deyil, tətbiqi yoxlayı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 6ff5d5d..0a6a1b0 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -38,7 +38,7 @@
     <string name="battery_saver_confirmation_ok" msgid="5042136476802816494">"Uključi"</string>
     <string name="battery_saver_start_action" msgid="4553256017945469937">"Uključi Uštedu baterije"</string>
     <string name="status_bar_settings_settings_button" msgid="534331565185171556">"Podešavanja"</string>
-    <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"Wi-Fi"</string>
+    <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"WiFi"</string>
     <string name="status_bar_settings_auto_rotation" msgid="8329080442278431708">"Automatsko rotiranje ekrana"</string>
     <string name="status_bar_settings_mute_label" msgid="914392730086057522">"UGASI"</string>
     <string name="status_bar_settings_auto_brightness_label" msgid="2151934479226017725">"AUTOM."</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Nastavi"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Otkaži"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Deli"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Izbriši"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Snimanje ekrana je otkazano"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Snimak ekrana je sačuvan, dodirnite da biste pregledali"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Snimak ekrana je izbrisan"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Došlo je do problema pri brisanju snimka ekrana"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Preuzimanje dozvola nije uspelo"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Greška pri pokretanju snimanja ekrana"</string>
@@ -226,7 +224,7 @@
     <string name="data_connection_cdma" msgid="7678457855627313518">"1X"</string>
     <string name="data_connection_roaming" msgid="375650836665414797">"Roming"</string>
     <string name="data_connection_edge" msgid="6316755666481405762">"EDGE"</string>
-    <string name="accessibility_data_connection_wifi" msgid="4422160347472742434">"Wi-Fi"</string>
+    <string name="accessibility_data_connection_wifi" msgid="4422160347472742434">"WiFi"</string>
     <string name="accessibility_no_sim" msgid="1140839832913084973">"Nema SIM kartice."</string>
     <string name="accessibility_cell_data" msgid="172950885786007392">"Mobilni podaci"</string>
     <string name="accessibility_cell_data_on" msgid="691666434519443162">"Mobilni podaci su uključeni"</string>
@@ -265,8 +263,8 @@
     <string name="accessibility_desc_work_lock" msgid="4355620395354680575">"Zaključan ekran za posao"</string>
     <string name="accessibility_desc_close" msgid="8293708213442107755">"Zatvori"</string>
     <string name="accessibility_quick_settings_wifi" msgid="167707325133803052">"<xliff:g id="SIGNAL">%1$s</xliff:g>."</string>
-    <string name="accessibility_quick_settings_wifi_changed_off" msgid="2230487165558877262">"Wi-Fi je isključen."</string>
-    <string name="accessibility_quick_settings_wifi_changed_on" msgid="1490362586009027611">"Wi-Fi je uključen."</string>
+    <string name="accessibility_quick_settings_wifi_changed_off" msgid="2230487165558877262">"WiFi je isključen."</string>
+    <string name="accessibility_quick_settings_wifi_changed_on" msgid="1490362586009027611">"WiFi je uključen."</string>
     <string name="accessibility_quick_settings_mobile" msgid="1817825313718492906">"Mobilna mreža: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string>
     <string name="accessibility_quick_settings_battery" msgid="533594896310663853">"Baterija: <xliff:g id="STATE">%s</xliff:g>."</string>
     <string name="accessibility_quick_settings_airplane_off" msgid="1275658769368793228">"Režim rada u avionu je isključen."</string>
@@ -375,19 +373,19 @@
     <string name="quick_settings_user_label" msgid="1253515509432672496">"Ja"</string>
     <string name="quick_settings_user_title" msgid="8673045967216204537">"Korisnik"</string>
     <string name="quick_settings_user_new_user" msgid="3347905871336069666">"Novi korisnik"</string>
-    <string name="quick_settings_wifi_label" msgid="2879507532983487244">"Wi-Fi"</string>
+    <string name="quick_settings_wifi_label" msgid="2879507532983487244">"WiFi"</string>
     <string name="quick_settings_wifi_not_connected" msgid="4071097522427039160">"Veza nije uspostavljena"</string>
     <string name="quick_settings_wifi_no_network" msgid="6003178398713839313">"Nema mreže"</string>
-    <string name="quick_settings_wifi_off_label" msgid="4003379736176547594">"Wi-Fi je isključen"</string>
-    <string name="quick_settings_wifi_on_label" msgid="2489928193654318511">"Wi-Fi je uključen"</string>
-    <string name="quick_settings_wifi_detail_empty_text" msgid="483130889414601732">"Nije dostupna nijedna Wi-Fi mreža"</string>
+    <string name="quick_settings_wifi_off_label" msgid="4003379736176547594">"WiFi je isključen"</string>
+    <string name="quick_settings_wifi_on_label" msgid="2489928193654318511">"WiFi je uključen"</string>
+    <string name="quick_settings_wifi_detail_empty_text" msgid="483130889414601732">"Nije dostupna nijedna WiFi mreža"</string>
     <string name="quick_settings_wifi_secondary_label_transient" msgid="7501659015509357887">"Uključuje se..."</string>
     <string name="quick_settings_cast_title" msgid="2279220930629235211">"Prebacivanje ekrana"</string>
     <string name="quick_settings_casting" msgid="1435880708719268055">"Prebacivanje"</string>
     <string name="quick_settings_cast_device_default_name" msgid="6988469571141331700">"Neimenovani uređaj"</string>
     <string name="quick_settings_cast_device_default_description" msgid="2580520859212250265">"Spremno za prebacivanje"</string>
     <string name="quick_settings_cast_detail_empty_text" msgid="2846282280014617785">"Nije dostupan nijedan uređaj"</string>
-    <string name="quick_settings_cast_no_wifi" msgid="6980194769795014875">"Wi-Fi nije povezan"</string>
+    <string name="quick_settings_cast_no_wifi" msgid="6980194769795014875">"WiFi nije povezan"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="4980669966716685588">"Osvetljenost"</string>
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="2325362583903258677">"AUTOMATSKA"</string>
     <string name="quick_settings_inversion_label" msgid="5078769633069667698">"Obrni boje"</string>
@@ -643,8 +641,8 @@
     <string name="output_none_found" msgid="5488087293120982770">"Nije pronađen nijedan uređaj"</string>
     <string name="output_none_found_service_off" msgid="935667567681386368">"Nije pronađen nijedan uređaj. Probajte da uključite uslugu <xliff:g id="SERVICE">%1$s</xliff:g>"</string>
     <string name="output_service_bt" msgid="4315362133973911687">"Bluetooth"</string>
-    <string name="output_service_wifi" msgid="9003667810868222134">"Wi-Fi"</string>
-    <string name="output_service_bt_wifi" msgid="7186882540475524124">"Bluetooth i Wi-Fi"</string>
+    <string name="output_service_wifi" msgid="9003667810868222134">"WiFi"</string>
+    <string name="output_service_bt_wifi" msgid="7186882540475524124">"Bluetooth i WiFi"</string>
     <string name="system_ui_tuner" msgid="1471348823289954729">"Tjuner za korisnički interfejs sistema"</string>
     <string name="show_battery_percentage" msgid="6235377891802910455">"Prikazuj ugrađeni procenat baterije"</string>
     <string name="show_battery_percentage_summary" msgid="9053024758304102915">"Prikazivanje nivoa napunjenosti baterije u procentima unutar ikone na statusnoj traci kada se baterija ne puni"</string>
@@ -889,12 +887,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Gornji ekran 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Gornji ekran 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Režim celog ekrana za donji ekran"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. pozicija, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dvaput dodirnite da biste izmenili."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dvaput dodirnite da biste dodali."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Premesti pločicu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Ukloni pločicu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Dodajte „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ na poziciju <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Premestite „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ na poziciju <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"uklonili pločicu"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"dodali pločicu na kraj"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Premestite pločicu"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Dodajte pločicu"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Premestite na <xliff:g id="POSITION">%1$d</xliff:g>. poziciju"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Dodajte na <xliff:g id="POSITION">%1$d</xliff:g>. poziciju"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"<xliff:g id="POSITION">%1$d</xliff:g>. pozicija"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Uređivač za Brza podešavanja."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Obaveštenja za <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacija možda neće funkcionisati sa podeljenim ekranom."</string>
@@ -927,11 +926,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Pređi na prethodno"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Promenite veličinu"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefon se isključio zbog toplote"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefon sada normalno radi"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefon sada normalno radi.\nDodirnite za više informacija"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon je bio prevruć, pa se isključio da se ohladi. Sada radi normalno.\n\nTelefon može previše da se ugreje ako:\n	• Koristite aplikacije koje zahtevaju puno resursa (npr. video igre, video ili aplikacije za navigaciju)\n	• Preuzimate/otpremate velike datoteke\n	• Koristite telefon na visokoj temperaturi"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Pogledajte upozorenja"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon se zagrejao"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Neke funkcije su ograničene dok se telefon ne ohladi"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Neke funkcije su ograničene dok se telefon ne ohladi.\nDodirnite za više informacija"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefon će automatski pokušati da se ohladi. I dalje ćete moći da koristite telefon, ali će sporije reagovati.\n\nKada se telefon ohladi, normalno će raditi."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Pogledajte upozorenja"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Isključite punjač iz napajanja"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Došlo je do problema sa punjenjem ovog uređaja. Isključite adapter iz napajanja i budite pažljivi jer kabl može da bude topao."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Pogledajte upozorenja"</string>
@@ -964,7 +965,7 @@
     <string name="mobile_data" msgid="4564407557775397216">"Mobilni podaci"</string>
     <string name="mobile_data_text_format" msgid="6806501540022589786">"<xliff:g id="ID_1">%1$s</xliff:g> – <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="mobile_carrier_text_format" msgid="8912204177152950766">"<xliff:g id="CARRIER_NAME">%1$s</xliff:g>, <xliff:g id="MOBILE_DATA_TYPE">%2$s</xliff:g>"</string>
-    <string name="wifi_is_off" msgid="5389597396308001471">"Wi-Fi je isključen"</string>
+    <string name="wifi_is_off" msgid="5389597396308001471">"WiFi je isključen"</string>
     <string name="bt_is_off" msgid="7436344904889461591">"Bluetooth je isključen"</string>
     <string name="dnd_is_off" msgid="3185706903793094463">"Režim Ne uznemiravaj je isključen"</string>
     <string name="qs_dnd_prompt_auto_rule" msgid="3535469468310002616">"Automatsko pravilo (<xliff:g id="ID_1">%s</xliff:g>) je uključilo režim Ne uznemiravaj."</string>
@@ -976,7 +977,7 @@
     <string name="running_foreground_services_title" msgid="5137313173431186685">"Aplikacije pokrenute u pozadini"</string>
     <string name="running_foreground_services_msg" msgid="3009459259222695385">"Dodirnite za detalje o bateriji i potrošnji podataka"</string>
     <string name="mobile_data_disable_title" msgid="5366476131671617790">"Želite da isključite mobilne podatke?"</string>
-    <string name="mobile_data_disable_message" msgid="8604966027899770415">"Nećete imati pristup podacima ili internetu preko mobilnog operatera <xliff:g id="CARRIER">%s</xliff:g>. Internet će biti dostupan samo preko Wi-Fi veze."</string>
+    <string name="mobile_data_disable_message" msgid="8604966027899770415">"Nećete imati pristup podacima ili internetu preko mobilnog operatera <xliff:g id="CARRIER">%s</xliff:g>. Internet će biti dostupan samo preko WiFi veze."</string>
     <string name="mobile_data_disable_message_default_carrier" msgid="6496033312431658238">"mobilni operater"</string>
     <string name="touch_filtered_warning" msgid="8119511393338714836">"Podešavanja ne mogu da verifikuju vaš odgovor jer aplikacija skriva zahtev za dozvolu."</string>
     <string name="slice_permission_title" msgid="3262615140094151017">"Želite li da dozvolite aplikaciji <xliff:g id="APP_0">%1$s</xliff:g> da prikazuje isečke iz aplikacije <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
@@ -993,6 +994,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Podešavanja"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Važi"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Izdvoji SysUI mem."</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> koristi <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikacije koriste <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" i "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kameru"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"lokaciju"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Senzori su isključeni"</string>
     <string name="device_services" msgid="1549944177856658705">"Usluge za uređaje"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Bez naslova"</string>
@@ -1072,7 +1080,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Učitavaju se preporuke"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Mediji"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Sakrijte aktuelnu sesiju."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Sakrij"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Odbaci"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Nastavi"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Podešavanja"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Neaktivno. Vidite aplikaciju"</string>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 5416e03..b79d943 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Узнавіць"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Скасаваць"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Абагуліць"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Выдаліць"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Запіс экрана скасаваны"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Запіс экрана захаваны. Націсніце, каб прагледзець"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Запіс экрана выдалены"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Памылка выдалення запісу экрана"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Не ўдалося атрымаць дазволы"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Памылка пачатку запісу экрана"</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Верхні экран – 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Верхні экран – 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ніжні экран – поўнаэкранны рэжым"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Месца: <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Краніце двойчы, каб рэдагаваць."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Краніце двойчы, каб дадаць."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Перамясціць <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Выдаліць <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Дадаць \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" у наступнае месца: <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Перамясціць \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" у наступнае месца: <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Рэдактар хуткіх налад."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Апавяшчэнне <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Праграма можа не працаваць у рэжыме дзялення экрана."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Перайсці да папярэдняга"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Змяніць памер"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"З-за перагрэву тэл. выключыўся"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Тэлефон працуе нармальна"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Ваш тэлефон працуе нармальна.\nНацісніце, каб даведацца больш"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Ваш тэлефон пераграваўся, таму ён выключыўся, каб астыць. Зараз тэлефон працуе нармальна.\n\nТэлефон можа перагравацца пры:\n	• Выкарыстанні рэсурсаёмістых праграм (напрыклад, гульняў, відэа або праграм навігацыі)\n	• Спампоўцы або запампоўцы вялікіх файлаў\n	• Выкарыстанні тэлефона пры высокіх тэмпературах"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Глядзець паэтапную дапамогу"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Тэлефон награваецца"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Некаторыя функцыі абмежаваны, пакуль тэлефон астывае"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Некаторыя функцыі абмежаваны, пакуль тэлефон не астыне.\nНацісніце, каб даведацца больш"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Ваш тэлефон аўтаматычна паспрабуе астыць. Вы можаце па-ранейшаму карыстацца сваім тэлефонам, але ён можа працаваць больш павольна.\n\nПасля таго як ваш тэлефон астыне, ён будзе працаваць у звычайным рэжыме."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Глядзець паэтапную дапамогу"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Адключыце зарадную прыладу"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Узнікла праблема з зарадкай гэтай прылады. Адключыце адаптар сілкавання і праверце, ці не нагрэўся кабель."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Глядзець паэтапную дапамогу"</string>
@@ -998,6 +999,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Налады"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Зразумела"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Праграма \"<xliff:g id="APP">%1$s</xliff:g>\" выкарыстоўвае: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Праграмы выкарыстоўваюць: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" і "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камера"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"геалакацыя"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"мікрафон"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Датчыкі выкл."</string>
     <string name="device_services" msgid="1549944177856658705">"Сэрвісы прылады"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Без назвы"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Загружаюцца рэкамендацыі"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Мультымедыя"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Схаваць цяперашні сеанс."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Схаваць"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Адхіліць"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Узнавіць"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Налады"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Неактыўна, праверце праграму"</string>
diff --git a/packages/SystemUI/res/values-be/strings_tv.xml b/packages/SystemUI/res/values-be/strings_tv.xml
index c75a492..14a4e55 100644
--- a/packages/SystemUI/res/values-be/strings_tv.xml
+++ b/packages/SystemUI/res/values-be/strings_tv.xml
@@ -22,7 +22,7 @@
     <string name="notification_channel_tv_pip" msgid="844249465483874817">"Відарыс у відарысе"</string>
     <string name="pip_notification_unknown_title" msgid="4413256731340767259">"(Праграма без назвы)"</string>
     <string name="pip_close" msgid="5775212044472849930">"Закрыць PIP"</string>
-    <string name="pip_fullscreen" msgid="3877997489869475181">"Ва ўвесь экран"</string>
+    <string name="pip_fullscreen" msgid="3877997489869475181">"Поўнаэкранны рэжым"</string>
     <string name="mic_active" msgid="5766614241012047024">"Мікрафон актыўны"</string>
     <string name="app_accessed_mic" msgid="2754428675130470196">"Праграма \"%1$s\" атрымала доступ да мікрафона"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index afb4441..e742ab8 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Възобновяване"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Отказ"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Споделяне"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Изтриване"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Записването на екрана е анулирано"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Записът на екрана е запазен. Докоснете, за да го видите"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Записът на екрана е изтрит"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"При изтриването на записа на екрана възникна грешка"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Извличането на разрешенията не бе успешно."</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"При стартирането на записа на екрана възникна грешка"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Горен екран: 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Горен екран: 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Долен екран: Показване на цял екран"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Позиция <xliff:g id="POSITION">%1$d</xliff:g>, „<xliff:g id="TILE_NAME">%2$s</xliff:g>“. Докоснете двукратно, за да редактирате."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"„<xliff:g id="TILE_NAME">%1$s</xliff:g>“. Докоснете двукратно, за да добавите."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Преместване на „<xliff:g id="TILE_NAME">%1$s</xliff:g>“"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Премахване на „<xliff:g id="TILE_NAME">%1$s</xliff:g>“"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Добавете „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ на позиция <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Преместете „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ на позиция <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Редактор за бързи настройки."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Известие от <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Приложението може да не работи в режим на разделен екран."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Към предишния елемент"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Преоразмеряване"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Тел. се изкл. поради загряване"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Телефонът ви вече работи нормално"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Телефонът ви вече работи нормално.\nДокоснете за още информация"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Телефонът ви бе твърде горещ, затова се изключи с цел охлаждане. Вече работи нормално.\n\nТелефонът ви може да стане твърде горещ, ако:\n	• използвате приложения, които ползват голям обем ресурси (като например игри, видеосъдържание или приложения за навигация);\n	• изтегляте или качвате големи файлове;\n	• използвате устройството си при високи температури."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Вижте стъпките, които да предприемете"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Телефонът загрява"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Някои функции са ограничени, докато телефонът се охлажда"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Някои функции са ограничени, докато телефонът се охлажда.\nДокоснете за още информация"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Телефонът ви автоматично ще направи опит за охлаждане. Пак можете да го използвате, но той може да работи по-бавно.\n\nСлед като се охлади, ще работи нормално."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Вижте стъпките, които да предприемете"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Изключете зарядното устройство"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"При зареждането на това устройство възникна проблем. Изключете захранващия адаптер и внимавайте, тъй като кабелът може да е топъл."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Вижте стъпките, които да предприемете"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Настройки"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Разбрах"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> използва <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Някои приложения използват <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" и "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камерата"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"местополож."</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"микрофона"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Сензорите са изключени"</string>
     <string name="device_services" msgid="1549944177856658705">"Услуги за устройството"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Няма заглавие"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Препоръките се зареждат"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Мултимедия"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Скриване на текущата сесия."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Скриване"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Отхвърляне"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Възобновяване"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Настройки"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Неактивно, проверете прилож."</string>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index f9627ab..5598d91 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"আবার চালু করুন"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"বাতিল করুন"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"শেয়ার করুন"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"মুছুন"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"স্ক্রিন রেকর্ডিং বাতিল করা হয়েছে"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"স্ক্রিন রেকর্ডিং সেভ করা হয়েছে, দেখতে ট্যাপ করুন"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"স্ক্রিন রেকর্ডিং মুছে ফেলা হয়েছে"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"স্ক্রিন রেকডিং মুছে ফেলার সময় সমস্যা হয়েছে"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"অনুমতি পাওয়া যায়নি"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"স্ক্রিন রেকর্ডিং শুরু করার সময় সমস্যা হয়েছে"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"শীর্ষ ৫০%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"শীর্ষ ৩০%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"নীচের অংশ নিয়ে পূর্ণ স্ক্রিন"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g> লোকেশন, <xliff:g id="TILE_NAME">%2$s</xliff:g>৷ সম্পাদনা করতে দুবার আলতো চাপুন৷"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>৷ যোগ করতে দুবার আলতো চাপুন৷"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> সরান"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> সরান"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g>-এ যোগ করুন"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g>-এ সরান"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"দ্রুত সেটিংস সম্পাদক৷"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> বিজ্ঞপ্তি: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"অ্যাপ্লিকেশানটি বিভক্ত স্ক্রীনে কাজ নাও করতে পারে৷"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"পিছনে যাওয়ার জন্য এড়িয়ে যান"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"রিসাইজ করুন"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"আপনার ফোন গরম হওয়ার জন্য বন্ধ হয়ে গেছে"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"আপনার ফোন এখন ঠিক-ঠাক চলছে"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"আপনার ফোন এখন ভালভাবে কাজ করছে।\nআরও তথ্যের জন্য ট্যাপ করুন"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"আপনার ফোন খুব বেশি গরম হয়েছিল বলে ঠাণ্ডা হওয়ার জন্য বন্ধ হয়ে গেছে। আপনার ফোন ঠিক-ঠাক ভাবে চলছে না।\n\nআপনার ফোন খুব বেশি গরম হয়ে যাবে যদি আপনি:\n	•এমন অ্যাপ ব্যবহার করলে যেটি আপনার ডিভাইসের রিসোর্স বেশি ব্যবহার করে (যেমন গেমিং, ভিডিও বা নেভিগেশন অ্যাপ)\n	• বড় ফাইল ডাউনলোড বা আপলোড করলে\n	• বেশি তাপমাত্রায় আপনার ফোন ব্যবহার করলে"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"ডিভাইস রক্ষণাবেক্ষণের ধাপগুলি দেখুন"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ফোনটি গরম হচ্ছে"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ফোনটি ঠাণ্ডা হওয়ার সময় কিছু বৈশিষ্ট্য সীমিত হতে পারে"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ফোন ঠাণ্ডা না হওয়া পর্যন্ত কিছু ফিচার কাজ করে না।\nআরও তথ্যের জন্য ট্যাপ করুন"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"আপনার ফোনটি নিজে থেকেই ঠাণ্ডা হওয়ার চেষ্টা করবে৷ আপনি তবুও আপনার ফোন ব্যবহার করতে পারেন, কিন্তু এটি একটু ধীরে চলতে পারে৷\n\nআপনার ফোনটি পুরোপুরি ঠাণ্ডা হয়ে গেলে এটি স্বাভাবিকভাবে চলবে৷"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"ডিভাইস রক্ষণাবেক্ষণের ধাপগুলি দেখুন"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"চার্জার আনপ্লাগ করুন"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"এই ডিভাইস চার্জ করার সময় সমস্যা হয়েছে। চার্জিং কেবলটি হয়ত গরম হয়ে গেছে, পাওয়ার অ্যাডাপ্টারটি আনপ্লাগ করুন।"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"কী করতে হবে ধাপে ধাপে দেখুন"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"সাধারণ বার্তাগুলি"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"স্টোরেজ"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"হিন্ট"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"ইনস্ট্যান্ট অ্যাপ"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> চলছে"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"অ্যাপটি ইনস্টল না করে চালু করা হয়েছে।"</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"অ্যাপটি ইনস্টল না করে চালু করা হয়েছে। আরও জানতে ট্যাপ করুন।"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"সেটিংস"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"বুঝেছি"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> আপনার <xliff:g id="TYPES_LIST">%2$s</xliff:g> ব্যবহার করছে।"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"অ্যাপ্লিকেশনগুলি আপনার <xliff:g id="TYPES_LIST">%s</xliff:g> ব্যবহার করছে।"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" এবং "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"ক্যামেরা"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"লোকেশন"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"মাইক্রোফোন"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"সেন্সর বন্ধ"</string>
     <string name="device_services" msgid="1549944177856658705">"ডিভাইস সংক্রান্ত পরিষেবা"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"কোনও শীর্ষক নেই"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"সাজেশন লোড করা হচ্ছে"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"মিডিয়া"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"বর্তমান সেশন লুকান।"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"লুকান"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"খারিজ করুন"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"আবার চালু করুন"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"সেটিংস"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"বন্ধ আছে, অ্যাপ চেক করুন"</string>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index 5324303..4b30b14 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Nastavi"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Otkaži"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Dijeli"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Izbriši"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Snimanje ekrana je otkazano"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Snimak ekrana je sačuvan. Dodirnite za prikaz."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Snimak ekrana je izbrisan"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Greška prilikom brisanja snimka ekrana"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Dobijanje odobrenja nije uspjelo"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Greška pri pokretanju snimanja ekrana"</string>
@@ -651,9 +649,9 @@
     <string name="quick_settings" msgid="6211774484997470203">"Brze postavke"</string>
     <string name="status_bar" msgid="4357390266055077437">"Statusna traka"</string>
     <string name="overview" msgid="3522318590458536816">"Pregled"</string>
-    <string name="demo_mode" msgid="263484519766901593">"Način demonstracije Sistemskog UI-a"</string>
-    <string name="enable_demo_mode" msgid="3180345364745966431">"Omogući način demonstracije"</string>
-    <string name="show_demo_mode" msgid="3677956462273059726">"Prikaži način demonstracije"</string>
+    <string name="demo_mode" msgid="263484519766901593">"Način rada za demonstraciju Sistemskog UI-a"</string>
+    <string name="enable_demo_mode" msgid="3180345364745966431">"Omogući način rada za demonstraciju"</string>
+    <string name="show_demo_mode" msgid="3677956462273059726">"Prikaži način rada za demonstraciju"</string>
     <string name="status_bar_ethernet" msgid="5690979758988647484">"Ethernet"</string>
     <string name="status_bar_alarm" msgid="87160847643623352">"Alarm"</string>
     <string name="status_bar_work" msgid="5238641949837091056">"Profil za posao"</string>
@@ -889,12 +887,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Gore 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Gore 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Donji ekran kao cijeli ekran"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Pozicija <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dodirnite dvaput za uređivanje."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g> Dodirnite dvaput za dodavanje."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Pomjeri <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Ukloni <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Dodaj <xliff:g id="TILE_NAME">%1$s</xliff:g> na poziciju <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Premjesti <xliff:g id="TILE_NAME">%1$s</xliff:g> na poziciju <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"uklanjanje kartice"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"dodavanje kartice na kraj"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Pomjeranje kartice"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Dodavanje kartice"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Pomjeranje u položaj <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Dodavanje u položaj <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Položaj <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Uređivanje brzih postavki"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> obavještenje: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacija možda neće raditi na podijeljenom ekranu"</string>
@@ -927,11 +926,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Preskoči na prethodni"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Promjena veličine"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefon se isključio zbog pregrijavanja"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Vaš telefon sada radi normalno"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Vaš telefon sada radi normalno.\nDodirnite za više informacija"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Vaš telefon se pregrijao, pa se isključio da se ohladi. Telefon sada radi normalno.\n\nTelefon se može pregrijati ako:\n	• Koristite aplikacije koje troše puno resursa (kao što su aplikacije za igranje, videozapise ili navigaciju)\n	• Preuzimate ili otpremate velike fajlove\n	• Koristite telefon na visokim temperaturama"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Pogledajte korake za zaštitu"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon se pregrijava"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Neke funkcije su ograničene dok se telefon hladi"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Neke funkcije su ograničene dok se telefon hladi.\nDodirnite za više informacija"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Vaš telefon će se automatski pokušati ohladiti. I dalje možete koristi telefon, ali će možda raditi sporije.\n\nNakon što se ohladi, telefon će normalno raditi."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Pogledajte korake za zaštitu"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Isključite punjač"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Došlo je do problema prilikom punjenja ovog uređaja. Pažljivo isključite adapter za napajanje jer je moguće da je kabl vruć."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Prikaz koraka za zaštitu"</string>
@@ -993,6 +994,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Postavke"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Razumijem"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Izdvoji SysUI mem."</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> koristi <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikacije koriste <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" i "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kameru"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"lokaciju"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Senzori su isključeni"</string>
     <string name="device_services" msgid="1549944177856658705">"Usluge uređaja"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Bez naslova"</string>
@@ -1072,7 +1080,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Učitavanje preporuka"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Mediji"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Sakrijte trenutnu sesiju."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Sakrij"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Odbaci"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Nastavi"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Postavke"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Neaktivno, vidite aplikaciju"</string>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 51bd234..f457492 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -33,10 +33,10 @@
     <string name="invalid_charger_title" msgid="938685362320735167">"No es pot carregar per USB"</string>
     <string name="invalid_charger_text" msgid="2339310107232691577">"Fes servir el carregador original del dispositiu"</string>
     <string name="battery_low_why" msgid="2056750982959359863">"Configuració"</string>
-    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"Vols activar l\'estalvi de bateria?"</string>
+    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"Vols activar la funció Estalvi de bateria?"</string>
     <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"Sobre la funció Estalvi de bateria"</string>
     <string name="battery_saver_confirmation_ok" msgid="5042136476802816494">"Activa"</string>
-    <string name="battery_saver_start_action" msgid="4553256017945469937">"Activa l\'estalvi de bateria"</string>
+    <string name="battery_saver_start_action" msgid="4553256017945469937">"Activa la funció Estalvi de bateria"</string>
     <string name="status_bar_settings_settings_button" msgid="534331565185171556">"Configuració"</string>
     <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"Wi-Fi"</string>
     <string name="status_bar_settings_auto_rotation" msgid="8329080442278431708">"Gira pantalla automàticament"</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Reprèn"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancel·la"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Comparteix"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Suprimeix"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"S\'ha cancel·lat la gravació de la pantalla"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"S\'ha desat la gravació de la pantalla; toca per mostrar"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"S\'ha suprimit la gravació de la pantalla"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"S\'ha produït un error en suprimir la gravació de la pantalla"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"No s\'han pogut obtenir els permisos"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"S\'ha produït un error en iniciar la gravació de pantalla"</string>
@@ -447,7 +445,7 @@
     <string name="zen_priority_introduction" msgid="3159291973383796646">"No t\'interromprà cap so ni cap vibració, tret dels de les alarmes, recordatoris, esdeveniments i trucades de les persones que especifiquis. Continuaràs sentint tot allò que decideixis reproduir, com ara música, vídeos i jocs."</string>
     <string name="zen_alarms_introduction" msgid="3987266042682300470">"No t\'interromprà cap so ni cap vibració, tret dels de les alarmes. Continuaràs sentint tot allò que decideixis reproduir, com ara música, vídeos i jocs."</string>
     <string name="zen_priority_customize_button" msgid="4119213187257195047">"Personalitza"</string>
-    <string name="zen_silence_introduction_voice" msgid="853573681302712348">"Es bloquejaran TOTS els sons i totes les vibracions, inclosos els de vídeos, jocs, alarmes i música. Encara podràs fer trucades."</string>
+    <string name="zen_silence_introduction_voice" msgid="853573681302712348">"Es bloquejaran TOTS els sons i totes les vibracions, inclosos els de vídeos, jocs, alarmes i música. Encara podràs fer trucades telefòniques."</string>
     <string name="zen_silence_introduction" msgid="6117517737057344014">"Es bloquejaran TOTS els sons i totes les vibracions, inclosos els de vídeos, jocs, alarmes i música."</string>
     <string name="keyguard_more_overflow_text" msgid="5819512373606638727">"+<xliff:g id="NUMBER_OF_NOTIFICATIONS">%d</xliff:g>"</string>
     <string name="speed_bump_explanation" msgid="7248696377626341060">"Notificacions menys urgents a continuació"</string>
@@ -501,7 +499,7 @@
     <string name="user_remove_user_remove" msgid="8387386066949061256">"Suprimeix"</string>
     <string name="battery_saver_notification_title" msgid="8419266546034372562">"S\'ha activat l\'estalvi de bateria"</string>
     <string name="battery_saver_notification_text" msgid="2617841636449016951">"Redueix el rendiment i l\'ús de les dades en segon pla."</string>
-    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"Desactiva l\'estalvi de bateria"</string>
+    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"Desactiva la funció Estalvi de bateria"</string>
     <string name="media_projection_dialog_text" msgid="1755705274910034772">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> tindrà accés a tota la informació que es veu en pantalla o que es reprodueix al dispositiu mentre graves o emets contingut, com ara contrasenyes, detalls dels pagaments, fotos, missatges i àudio."</string>
     <string name="media_projection_dialog_service_text" msgid="958000992162214611">"El servei que ofereix aquesta funció tindrà accés a tota la informació visible a la teva pantalla o que es reprodueix al dispositiu mentre graves o emets contingut, com ara contrasenyes, detalls dels pagaments, fotos, missatges i àudio que reprodueixis."</string>
     <string name="media_projection_dialog_service_title" msgid="2888507074107884040">"Vols començar a gravar o emetre contingut?"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Pantalla superior al 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Pantalla superior al 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pantalla inferior completa"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posició <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Fes doble toc per editar-la."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Fes doble toc per afegir-ho."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mou <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Suprimeix <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Afegeix <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posició <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mou <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posició <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"suprimir el mosaic"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"afegir un mosaic al final"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mou el mosaic"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Afegeix un mosaic"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Mou a la posició <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Afegeix a la posició <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posició <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de configuració ràpida."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificació de <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"És possible que l\'aplicació no funcioni amb la pantalla dividida."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Torna a l\'anterior"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Canvia la mida"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telèfon apagat per la calor"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Ara el telèfon funciona de manera normal"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Ara el telèfon funciona correctament.\nToca per obtenir més informació"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"El telèfon s\'havia sobreescalfat i s\'ha apagat per refredar-se. Ara funciona amb normalitat.\n\nEs pot sobreescalfar si:\n	• utilitzes aplicacions que consumeixen molts recursos (com ara, videojocs, vídeos o aplicacions de navegació);\n	• baixes o penges fitxers grans;\n	• l\'utilitzes amb temperatures altes."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Mostra els passos de manteniment"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"El telèfon s\'està escalfant"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Algunes funcions estaran limitades mentre el telèfon es refreda"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Algunes funcions estan limitades mentre el telèfon es refreda.\nToca per obtenir més informació"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"El telèfon provarà de refredar-se automàticament. Podràs continuar utilitzant-lo, però és possible que funcioni més lentament.\n\nUn cop s\'hagi refredat, funcionarà amb normalitat."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Mostra els passos de manteniment"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Desconnecta el carregador"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"No es pot carregar el dispositiu. Desconnecta l\'adaptador de corrent amb compte, ja que el cable podria estar calent."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Mostra els pasos de manteniment"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Configuració"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Entesos"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Aboca espai de SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> està fent servir el següent: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Algunes aplicacions estan fent servir el següent: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" i "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"càmera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ubicació"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"micròfon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensors desactivats"</string>
     <string name="device_services" msgid="1549944177856658705">"Serveis per a dispositius"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sense títol"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Carregant les recomanacions"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Multimèdia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Amaga la sessió actual."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Amaga"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Ignora"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Reprèn"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Configuració"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactiu; comprova l\'aplicació"</string>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 484c631..ba2aad8 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Obnovit"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Zrušit"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Sdílet"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Smazat"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Nahrávání obrazovky bylo zrušeno"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Záznam obrazovky byl uložen, zobrazíte jej klepnutím"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Záznam obrazovky byl smazán"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Při mazání záznamu obrazovky došlo k chybě"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Nepodařilo se načíst oprávnění"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Při spouštění nahrávání obrazovky došlo k chybě"</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50 % nahoře"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30 % nahoře"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Dolní část na celou obrazovku"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Pozice <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dvojitým klepnutím ji upravíte."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dlaždici přidáte dvojitým klepnutím."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Přesunout dlaždici <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Odstranit dlaždici <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Přidat dlaždici <xliff:g id="TILE_NAME">%1$s</xliff:g> na pozici <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Přesunout dlaždici <xliff:g id="TILE_NAME">%1$s</xliff:g> na pozici <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"odstranit dlaždici"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"přidat dlaždici na konec"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Přesunout dlaždici"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Přidat dlaždici"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Přesunout na pozici <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Přidat dlaždici na pozici <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Pozice <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor rychlého nastavení"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Oznámení aplikace <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikace v režimu rozdělené obrazovky nemusí fungovat."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Přeskočit na předchozí"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Změnit velikost"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefon se vypnul z důvodu zahřátí"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Nyní telefon funguje jako obvykle."</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Nyní telefon funguje jako obvykle.\nKlepnutím zobrazíte další informace"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon byl příliš zahřátý, proto se vypnul, aby vychladl. Nyní telefon funguje jako obvykle.\n\nTelefon se může příliš zahřát v těchto případech:\n	• používání náročných aplikací (např. her, videí nebo navigace),\n	• stahování nebo nahrávání velkých souborů,\n	• používání telefonu při vysokých teplotách."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Zobrazit pokyny, co dělat"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon se zahřívá"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Některé funkce jsou při chladnutí omezeny"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Některé funkce jsou při chladnutí telefonu omezeny.\nKlepnutím zobrazíte další informace"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefon se automaticky pokusí vychladnout. Lze jej nadále používat, ale může být pomalejší.\n\nAž telefon vychladne, bude fungovat normálně."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Zobrazit pokyny, co dělat"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Odpojte nabíječku"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Při nabíjení zařízení došlo k problému. Odpojte napájecí adaptér (dávejte pozor, kabel může být horký)."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Zobrazit pokyny, co dělat"</string>
@@ -998,6 +999,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Nastavení"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Rozumím"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Výpis haldy SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Aplikace <xliff:g id="APP">%1$s</xliff:g> využívá tato oprávnění: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikace využívají tato oprávnění: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" a "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"fotoaparát"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"poloha"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Senzory jsou vypnuty"</string>
     <string name="device_services" msgid="1549944177856658705">"Služby zařízení"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Bez názvu"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Načítání doporučení"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Média"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Skrýt aktuální relaci."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Skrýt"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Zavřít"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Pokračovat"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Nastavení"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Neaktivní, zkontrolujte aplikaci"</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 334d896..c119d80 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Genoptag"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Annuller"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Del"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Slet"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Skærmoptagelsen er annulleret"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Skærmoptagelsen er gemt. Tryk for at se den."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Skærmoptagelsen er slettet"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Der opstod en fejl ved sletning af skærmoptagelsen"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Det lykkedes ikke et hente tilladelserne"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Skærmoptagelsen kunne ikke startes"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Øverste 50 %"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Øverste 30 %"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Vis nederste del i fuld skærm"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Tryk to gange for at redigere."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Tryk to gange for at tilføje."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Flyt <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Fjern <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Føj <xliff:g id="TILE_NAME">%1$s</xliff:g> til position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Flyt <xliff:g id="TILE_NAME">%1$s</xliff:g> til position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"fjern kortet"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"føj kortet til slutningen"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Flyt kortet"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Tilføj et kort"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Flyt til <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Føj til placering <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Placering <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Redigeringsværktøj til Kvikmenu."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-notifikation: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Appen fungerer muligvis ikke i opdelt skærm."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Gå til forrige"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Rediger størrelse"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefonen slukkede pga. varme"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Din telefon kører nu normalt"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Din telefon kører nu normalt.\nTryk for at få flere oplysninger"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Din telefon var blevet for varm, så den slukkede for at køle ned. Din telefon kører nu igen normalt. \n\nDin telefon kan blive for varm, hvis du:\n	• Bruger ressourcekrævende apps (f.eks. spil, video eller navigation)\n	• Downloader eller uploader store filer\n	• Bruger din telefon i varme omgivelser"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Se håndteringsvejledning"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefonen er ved at blive varm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Nogle funktioner er begrænsede, mens telefonen køler ned"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Nogle funktioner er begrænsede, mens telefonen køler ned.\nTryk for at få flere oplysninger"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Din telefon forsøger automatisk at køle ned. Du kan stadig bruge telefonen, men den kører muligvis langsommere.\n\nNår din telefon er kølet ned, fungerer den normalt igen."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Se håndteringsvejledning"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Frakobl opladeren"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Der er et problem med opladning af denne enhed. Frakobl strømadapteren, og vær forsigtig, da kablet kan være varmt."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Se vejledningen i pleje"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Indstillinger"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Gem SysUI-heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> anvender enhedens <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Apps anvender enhedens <xliff:g id="TYPES_LIST">%s</xliff:g>"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" og "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"placering"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Deaktiver sensorer"</string>
     <string name="device_services" msgid="1549944177856658705">"Enhedstjenester"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Ingen titel"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Indlæser anbefalinger"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Medie"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Skjul den aktuelle session."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Skjul"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Luk"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Genoptag"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Indstillinger"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inaktiv. Tjek appen"</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index f29a571..090698c 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -28,15 +28,15 @@
     <string name="battery_low_percent_format" msgid="4276661262843170964">"<xliff:g id="PERCENTAGE">%s</xliff:g> verbleibend"</string>
     <string name="battery_low_percent_format_hybrid" msgid="3985614339605686167">"Noch <xliff:g id="PERCENTAGE">%1$s</xliff:g> übrig; bei deinem Nutzungsmuster hast du noch ca. <xliff:g id="TIME">%2$s</xliff:g>"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="5917433188456218857">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> ausstehend; noch ca. <xliff:g id="TIME">%2$s</xliff:g>"</string>
-    <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"Noch <xliff:g id="PERCENTAGE">%s</xliff:g>. Der Stromsparmodus ist aktiviert."</string>
+    <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"Noch <xliff:g id="PERCENTAGE">%s</xliff:g>. Der Energiesparmodus ist aktiviert."</string>
     <string name="invalid_charger" msgid="4370074072117767416">"Aufladen über USB nicht möglich. Verwende das mit dem Gerät gelieferte Ladegerät."</string>
     <string name="invalid_charger_title" msgid="938685362320735167">"Aufladen über USB nicht möglich"</string>
     <string name="invalid_charger_text" msgid="2339310107232691577">"Verwende das mit dem Gerät gelieferte Ladegerät"</string>
     <string name="battery_low_why" msgid="2056750982959359863">"Einstellungen"</string>
-    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"Stromsparmodus aktivieren?"</string>
-    <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"Über den Stromsparmodus"</string>
+    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"Energiesparmodus aktivieren?"</string>
+    <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"Über den Energiesparmodus"</string>
     <string name="battery_saver_confirmation_ok" msgid="5042136476802816494">"Aktivieren"</string>
-    <string name="battery_saver_start_action" msgid="4553256017945469937">"Stromsparmodus aktivieren"</string>
+    <string name="battery_saver_start_action" msgid="4553256017945469937">"Energiesparmodus aktivieren"</string>
     <string name="status_bar_settings_settings_button" msgid="534331565185171556">"Einstellungen"</string>
     <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"WLAN"</string>
     <string name="status_bar_settings_auto_rotation" msgid="8329080442278431708">"Bildschirm automatisch drehen"</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Fortsetzen"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Abbrechen"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Teilen"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Löschen"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Bildschirmaufzeichnung abgebrochen"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Bildschirmaufzeichnung gespeichert, zum Ansehen tippen"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Bildschirmaufzeichnung gelöscht"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Fehler beim Löschen der Bildschirmaufzeichnung"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Berechtigungen nicht erhalten"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Fehler beim Start der Bildschirmaufzeichnung"</string>
@@ -421,7 +419,7 @@
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"An um <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"Bis <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_ui_mode_night_label" msgid="1398928270610780470">"Dunkles Design"</string>
-    <string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"Stromsparmodus"</string>
+    <string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"Energiesparmodus"</string>
     <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"An bei Sonnenuntergang"</string>
     <string name="quick_settings_dark_mode_secondary_label_until_sunrise" msgid="4404885070316716472">"Bis Sonnenaufgang"</string>
     <string name="quick_settings_dark_mode_secondary_label_on_at" msgid="5128758823486361279">"An um <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -499,9 +497,9 @@
     <string name="user_remove_user_title" msgid="9124124694835811874">"Nutzer entfernen?"</string>
     <string name="user_remove_user_message" msgid="6702834122128031833">"Alle Apps und Daten dieses Nutzers werden gelöscht."</string>
     <string name="user_remove_user_remove" msgid="8387386066949061256">"Entfernen"</string>
-    <string name="battery_saver_notification_title" msgid="8419266546034372562">"Stromsparmodus ist aktiviert"</string>
+    <string name="battery_saver_notification_title" msgid="8419266546034372562">"Energiesparmodus ist aktiviert"</string>
     <string name="battery_saver_notification_text" msgid="2617841636449016951">"Reduzierung der Leistung und Hintergrunddaten"</string>
-    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"Stromsparmodus deaktivieren"</string>
+    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"Energiesparmodus deaktivieren"</string>
     <string name="media_projection_dialog_text" msgid="1755705274910034772">"Die App \"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g>\" erhält Zugriff auf alle Informationen, die auf deinem Bildschirm sichtbar sind oder von deinem Gerät wiedergegeben werden, während du aufnimmst oder streamst. Dazu gehören beispielsweise angezeigte Passwörter und Zahlungsdetails, Fotos, Nachrichten und Audioinhalte."</string>
     <string name="media_projection_dialog_service_text" msgid="958000992162214611">"Der Anbieter dieser App erhält Zugriff auf alle Informationen, die auf deinem Bildschirm sichtbar sind oder von deinem Gerät wiedergegeben werden, während du aufnimmst oder streamst. Dazu gehören beispielsweise Passwörter, Zahlungsdetails, Fotos, Nachrichten und Audioinhalte."</string>
     <string name="media_projection_dialog_service_title" msgid="2888507074107884040">"Aufnahme oder Stream starten?"</string>
@@ -767,8 +765,8 @@
       <item quantity="one">%d Minute</item>
     </plurals>
     <string name="battery_panel_title" msgid="5931157246673665963">"Akkunutzung"</string>
-    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"Der Stromsparmodus ist beim Aufladen nicht verfügbar."</string>
-    <string name="battery_detail_switch_title" msgid="6940976502957380405">"Stromsparmodus"</string>
+    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"Der Energiesparmodus ist beim Aufladen nicht verfügbar."</string>
+    <string name="battery_detail_switch_title" msgid="6940976502957380405">"Energiesparmodus"</string>
     <string name="battery_detail_switch_summary" msgid="3668748557848025990">"Reduzierung der Leistung und Hintergrunddaten"</string>
     <string name="keyboard_key_button_template" msgid="8005673627272051429">"Taste <xliff:g id="NAME">%1$s</xliff:g>"</string>
     <string name="keyboard_key_home" msgid="3734400625170020657">"Pos1"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50 % oben"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30 % oben"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Vollbild unten"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Zum Bearbeiten doppeltippen."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Zum Hinzufügen doppeltippen."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> verschieben"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> entfernen"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> auf Position <xliff:g id="POSITION">%2$d</xliff:g> hinzufügen"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> auf Position <xliff:g id="POSITION">%2$d</xliff:g> verschieben"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"die Kachel zu entfernen"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"die Kachel am Ende hinzuzufügen"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Kachel verschieben"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Kachel hinzufügen"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Auf Position <xliff:g id="POSITION">%1$d</xliff:g> verschieben"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Zur Position <xliff:g id="POSITION">%1$d</xliff:g> hinzufügen"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor für Schnelleinstellungen."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Benachrichtigung von <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Die App funktioniert unter Umständen bei geteiltem Bildschirm nicht."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Rückwärts springen"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Größe anpassen"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Ausgeschaltet, da zu heiß"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Dein Smartphone funktioniert jetzt wieder normal"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Dein Smartphone funktioniert jetzt wieder normal.\nFür mehr Informationen tippen."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Dein Smartphone war zu heiß und wurde zum Abkühlen ausgeschaltet. Nun funktioniert es wieder normal.\n\nMögliche Ursachen:\n	• Verwendung ressourcenintensiver Apps (z. B. Spiele-, Video- oder Navigations-Apps)\n	• Download oder Upload großer Dateien \n	• Verwendung des Smartphones bei hohen Temperaturen"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Schritte zur Abkühlung des Geräts ansehen"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Smartphone wird warm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Einige Funktionen sind während der Abkühlphase des Smartphones eingeschränkt"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Einige Funktionen sind während der Abkühlphase des Smartphones eingeschränkt.\nFür mehr Informationen tippen."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Dein Smartphone kühlt sich automatisch ab. Du kannst dein Smartphone weiterhin nutzen, aber es reagiert möglicherweise langsamer.\n\nSobald dein Smartphone abgekühlt ist, funktioniert es wieder normal."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Schritte zur Abkühlung des Geräts ansehen"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Ladegerät vom Stromnetz trennen"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Beim Laden dieses Geräts ist ein Problem aufgetreten. Trenne das Netzteil vom Stromnetz. Sei dabei vorsichtig, denn das Netzteil oder das Kabel könnte heiß sein."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Schritte zur Fehlerbehebung ansehen"</string>
@@ -980,14 +981,21 @@
     <string name="slice_permission_checkbox" msgid="4242888137592298523">"<xliff:g id="APP">%1$s</xliff:g> darf Teile aus jeder beliebigen App anzeigen"</string>
     <string name="slice_permission_allow" msgid="6340449521277951123">"Zulassen"</string>
     <string name="slice_permission_deny" msgid="6870256451658176895">"Ablehnen"</string>
-    <string name="auto_saver_title" msgid="6873691178754086596">"Tippen zum Planen des Stromsparmodus"</string>
+    <string name="auto_saver_title" msgid="6873691178754086596">"Tippen zum Planen des Energiesparmodus"</string>
     <string name="auto_saver_text" msgid="3214960308353838764">"Aktivieren, wenn der Akku wahrscheinlich nicht mehr lange hält"</string>
     <string name="no_auto_saver_action" msgid="7467924389609773835">"Nein danke"</string>
-    <string name="auto_saver_enabled_title" msgid="4294726198280286333">"Geplanter Stromsparmodus aktiviert"</string>
-    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"Der Stromsparmodus wird bei einem Akkustand von <xliff:g id="PERCENTAGE">%d</xliff:g> %% automatisch aktiviert."</string>
+    <string name="auto_saver_enabled_title" msgid="4294726198280286333">"Geplanter Energiesparmodus aktiviert"</string>
+    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"Der Energiesparmodus wird bei einem Akkustand von <xliff:g id="PERCENTAGE">%d</xliff:g> %% automatisch aktiviert."</string>
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Einstellungen"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Ok"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> verwendet gerade Folgendes: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Apps verwenden gerade Folgendes: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" und "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"Kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"Standort"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"Mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensoren aus"</string>
     <string name="device_services" msgid="1549944177856658705">"Gerätedienste"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Kein Titel"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Empfehlungen werden geladen"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Medien"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Du kannst die aktuelle Sitzung ausblenden."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ausblenden"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Ablehnen"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Fortsetzen"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Einstellungen"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inaktiv – sieh in der App nach"</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index becbaa4..fae718d 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Συνέχιση"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Ακύρωση"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Κοινοποίηση"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Διαγραφή"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Η εγγραφή οθόνης ακυρώθηκε"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Η εγγραφή οθόνης αποθηκεύτηκε. Πατήστε για προβολή."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Η εγγραφή οθόνης διαγράφηκε"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Παρουσιάστηκε σφάλμα κατά τη διαγραφή της εγγραφής οθόνης"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Η λήψη αδειών απέτυχε"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Σφάλμα κατά την έναρξη της εγγραφής οθόνης"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Πάνω 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Πάνω 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Κάτω πλήρης οθόνη"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Θέση <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Πατήστε δύο φορές για επεξεργασία."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Πατήστε δύο φορές για προσθήκη."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Μετακίνηση <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Κατάργηση <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Προσθήκη <xliff:g id="TILE_NAME">%1$s</xliff:g> στη θέση <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Μετακίνηση <xliff:g id="TILE_NAME">%1$s</xliff:g> στη θέση <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Επεξεργασία γρήγορων ρυθμίσεων."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Ειδοποίηση <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Δεν είναι δυνατή η λειτουργία της εφαρμογής με διαχωρισμό οθόνης."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Μετάβαση στο προηγούμενο"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Αλλαγή μεγέθους"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Το τηλέφωνο απεν. λόγω ζέστης"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Το τηλέφωνο λειτουργεί πλέον κανονικά"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Το τηλέφωνο λειτουργεί πλέον κανονικά.\nΠατήστε για περισσότερες πληροφορίες."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Η θερμοκρασία του τηλεφώνου είναι πολύ υψηλή και απενεργοποιήθηκε για να κρυώσει. Πλέον, λειτουργεί κανονικά.\n\nΗ θερμοκρασία ενδέχεται να ανέβει κατά τη:\n	• Χρήση εφαρμογών υψηλής κατανάλωσης πόρων (όπως gaming, βίντεο ή περιήγησης)\n	• Λήψη/μεταφόρτωση μεγάλων αρχείων\n	• Χρήση σε υψηλές θερμοκρασίες"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Δείτε βήματα αντιμετώπισης."</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Αύξηση θερμοκρασίας τηλεφώνου"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Ορισμένες λειτουργίες περιορίζονται κατά τη μείωση της θερμοκρασίας"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Ορισμένες λειτουργίες περιορίζονται κατά τη μείωση της θερμοκρασίας.\nΠατήστε για περισσότερες πληροφορίες."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Το τηλέφωνό σας θα προσπαθήσει να μειώσει αυτόματα τη θερμοκρασία. Μπορείτε να εξακολουθήσετε να το χρησιμοποιείτε, αλλά είναι πιθανό να λειτουργεί πιο αργά.\n\nΜόλις μειωθεί η θερμοκρασία του τηλεφώνου σας, θα λειτουργεί ξανά κανονικά."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Δείτε βήματα αντιμετώπισης."</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Αποσυνδέστε τον φορτιστή"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Υπάρχει κάποιο πρόβλημα με τη φόρτιση αυτής της συσκευής. Αποσυνδέστε τον μετασχηματιστή με προσοχή, λαμβάνοντας υπόψη ότι το καλώδιο μπορεί να είναι ζεστό."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Δείτε βήματα αντιμετώπισης"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Ρυθμίσεις"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Το κατάλαβα"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Στιγμ. μνήμης SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Η εφαρμογή <xliff:g id="APP">%1$s</xliff:g> χρησιμοποιεί τις λειτουργίες <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Οι εφαρμογές χρησιμοποιούν τις λειτουργίες <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" και "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"κάμερα"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"τοποθεσία"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"μικρόφωνο"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Αισθητήρες ανενεργοί"</string>
     <string name="device_services" msgid="1549944177856658705">"Υπηρεσίες συσκευής"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Χωρίς τίτλο"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Φόρτωση προτάσεων"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Μέσα"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Απόκρυψη της τρέχουσας περιόδου λειτουργίας."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Απόκρυψη"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Παράβλεψη"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Συνέχιση"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Ρυθμίσεις"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Ανενεργό, έλεγχος εφαρμογής"</string>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 1581c15..275aa0b 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Resume"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancel"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Share"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Delete"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Screen recording cancelled"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Screen recording saved, tap to view"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Screen recording deleted"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Error deleting screen recording"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Failed to get permissions"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Error starting screen recording"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Remove <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Add <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"remove tile"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"add tile to end"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Move tile"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Add tile"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Move to <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Add to position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Skip to previous"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Resize"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Phone turned off due to heat"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Your phone is now running normally"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Your phone is now running normally.\nTap for more info"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Your phone was too hot, so it turned off to cool down. Your phone is now running normally.\n\nYour phone may get too hot if you:\n	• Use resource-intensive apps (such as gaming, video or navigation apps)\n	• Download or upload large files\n	• Use your phone in high temperatures"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"See care steps"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Phone is getting warm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Some features limited while phone cools down"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Some features are limited while phone cools down.\nTap for more info"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Your phone will automatically try to cool down. You can still use your phone, but it may run more slowly.\n\nOnce your phone has cooled down, it will run normally."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"See care steps"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Unplug charger"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"There’s an issue charging this device. Unplug the power adaptor, and take care as the cable may be warm."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"See care steps"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Settings"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> is using your <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Applications are using your <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" and "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"camera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"location"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microphone"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensors off"</string>
     <string name="device_services" msgid="1549944177856658705">"Device Services"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"No title"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Loading recommendations"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Hide the current session."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Hide"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Dismiss"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Resume"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Settings"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactive, check app"</string>
diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml
index 937bf17..c9937af 100644
--- a/packages/SystemUI/res/values-en-rCA/strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Resume"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancel"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Share"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Delete"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Screen recording cancelled"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Screen recording saved, tap to view"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Screen recording deleted"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Error deleting screen recording"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Failed to get permissions"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Error starting screen recording"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Remove <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Add <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"remove tile"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"add tile to end"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Move tile"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Add tile"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Move to <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Add to position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Skip to previous"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Resize"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Phone turned off due to heat"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Your phone is now running normally"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Your phone is now running normally.\nTap for more info"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Your phone was too hot, so it turned off to cool down. Your phone is now running normally.\n\nYour phone may get too hot if you:\n	• Use resource-intensive apps (such as gaming, video or navigation apps)\n	• Download or upload large files\n	• Use your phone in high temperatures"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"See care steps"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Phone is getting warm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Some features limited while phone cools down"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Some features are limited while phone cools down.\nTap for more info"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Your phone will automatically try to cool down. You can still use your phone, but it may run more slowly.\n\nOnce your phone has cooled down, it will run normally."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"See care steps"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Unplug charger"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"There’s an issue charging this device. Unplug the power adaptor, and take care as the cable may be warm."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"See care steps"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Settings"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> is using your <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Applications are using your <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" and "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"camera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"location"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microphone"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensors off"</string>
     <string name="device_services" msgid="1549944177856658705">"Device Services"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"No title"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Loading recommendations"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Hide the current session."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Hide"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Dismiss"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Resume"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Settings"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactive, check app"</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 1581c15..275aa0b 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Resume"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancel"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Share"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Delete"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Screen recording cancelled"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Screen recording saved, tap to view"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Screen recording deleted"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Error deleting screen recording"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Failed to get permissions"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Error starting screen recording"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Remove <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Add <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"remove tile"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"add tile to end"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Move tile"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Add tile"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Move to <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Add to position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Skip to previous"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Resize"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Phone turned off due to heat"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Your phone is now running normally"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Your phone is now running normally.\nTap for more info"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Your phone was too hot, so it turned off to cool down. Your phone is now running normally.\n\nYour phone may get too hot if you:\n	• Use resource-intensive apps (such as gaming, video or navigation apps)\n	• Download or upload large files\n	• Use your phone in high temperatures"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"See care steps"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Phone is getting warm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Some features limited while phone cools down"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Some features are limited while phone cools down.\nTap for more info"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Your phone will automatically try to cool down. You can still use your phone, but it may run more slowly.\n\nOnce your phone has cooled down, it will run normally."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"See care steps"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Unplug charger"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"There’s an issue charging this device. Unplug the power adaptor, and take care as the cable may be warm."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"See care steps"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Settings"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> is using your <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Applications are using your <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" and "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"camera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"location"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microphone"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensors off"</string>
     <string name="device_services" msgid="1549944177856658705">"Device Services"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"No title"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Loading recommendations"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Hide the current session."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Hide"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Dismiss"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Resume"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Settings"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactive, check app"</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 1581c15..275aa0b 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Resume"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancel"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Share"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Delete"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Screen recording cancelled"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Screen recording saved, tap to view"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Screen recording deleted"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Error deleting screen recording"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Failed to get permissions"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Error starting screen recording"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Remove <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Add <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"remove tile"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"add tile to end"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Move tile"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Add tile"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Move to <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Add to position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Skip to previous"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Resize"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Phone turned off due to heat"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Your phone is now running normally"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Your phone is now running normally.\nTap for more info"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Your phone was too hot, so it turned off to cool down. Your phone is now running normally.\n\nYour phone may get too hot if you:\n	• Use resource-intensive apps (such as gaming, video or navigation apps)\n	• Download or upload large files\n	• Use your phone in high temperatures"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"See care steps"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Phone is getting warm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Some features limited while phone cools down"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Some features are limited while phone cools down.\nTap for more info"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Your phone will automatically try to cool down. You can still use your phone, but it may run more slowly.\n\nOnce your phone has cooled down, it will run normally."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"See care steps"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Unplug charger"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"There’s an issue charging this device. Unplug the power adaptor, and take care as the cable may be warm."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"See care steps"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Settings"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> is using your <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Applications are using your <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" and "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"camera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"location"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microphone"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensors off"</string>
     <string name="device_services" msgid="1549944177856658705">"Device Services"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"No title"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Loading recommendations"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Hide the current session."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Hide"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Dismiss"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Resume"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Settings"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactive, check app"</string>
diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml
index 9a62afe..e206e0f 100644
--- a/packages/SystemUI/res/values-en-rXC/strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‎‎‎‎‎‎‎‎‏‏‏‎‎‎‏‎‏‎‎‎‎‎‏‏‏‎‏‎‏‎‎‏‏‎‎‎‎‎‏‏‎‎‎‎‎‎‎‎‎‏‏‏‎‏‏‏‎Resume‎‏‎‎‏‎"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‎‏‏‏‏‎‏‎‎‎‎‎‏‏‎‎‎‎‎‎‏‏‏‏‏‎‏‎‏‎‏‎‏‏‎‏‏‎‎‏‏‎‏‎‎‏‎‏‎‎‏‎‏‏‏‏‎‎Cancel‎‏‎‎‏‎"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‎‏‏‏‏‏‎‎‏‏‏‏‏‎‎‎‎‏‏‎‏‎‏‏‎‏‎‎‏‎‎‏‎‏‎‏‏‏‎‏‏‎‏‏‏‏‏‎‎‎‏‎‎‏‎‎Share‎‏‎‎‏‎"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‏‏‎‎‎‏‏‎‎‏‏‏‎‎‎‏‎‎‎‏‎‏‎‎‎‎‎‏‎‏‏‎‏‏‏‎‏‏‏‏‎‏‏‎‏‏‏‏‏‏‏‏‏‏‎‎‏‎‎Delete‎‏‎‎‏‎"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‎‎‏‎‏‎‎‎‏‏‏‎‏‎‏‎‎‏‎‎‏‎‏‏‎‎‏‏‎‏‎‏‎‏‎‏‎‏‏‏‎‎‏‏‎‏‎‏‏‎‏‏‏‎‏‏‎‏‎Screen recording canceled‎‏‎‎‏‎"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‎‏‏‎‎‏‏‏‎‏‎‏‎‏‏‏‏‎‎‏‏‎‏‎‏‎‎‏‎‏‏‏‏‎‎‏‎‎‏‎‎‎‏‎‎‏‏‎‎‎‏‎‏‎‎‏‎‎Screen recording saved, tap to view‎‏‎‎‏‎"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‏‏‎‎‏‎‎‎‏‎‎‎‏‏‎‏‎‎‎‏‏‏‏‎‏‎‏‎‏‎‏‎‏‎‏‏‎‎‏‎‏‎‎‎‏‏‏‏‏‏‎‏‏‎‎‏‎‏‎‎Screen recording deleted‎‏‎‎‏‎"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‏‏‏‏‎‏‎‏‏‎‎‎‎‏‎‏‏‎‎‎‎‏‏‎‏‏‎‏‏‏‏‎‎‎‏‏‎‏‏‏‏‎‎‎‎‎‎‎‏‎‏‏‎‏‎‏‎‎‎Error deleting screen recording‎‏‎‎‏‎"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‏‎‎‎‎‏‎‎‏‎‎‎‏‏‎‏‏‎‏‏‏‏‎‏‎‎‏‎‎‏‏‎‏‎‏‏‎‎‏‏‏‏‎‎‏‏‏‏‏‏‎‎‏‎‏‏‎‎Failed to get permissions‎‏‎‎‏‎"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎‎‏‎‏‎‎‏‎‏‎‎‎‏‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‎‎‏‏‎‏‎‏‎‏‎‏‎‎‏‏‏‎‏‎‎‎‎‎‎‎Error starting screen recording‎‏‎‎‏‎"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‏‎‎‎‏‎‏‏‎‎‎‎‎‎‏‏‏‏‎‎‎‏‏‏‏‏‎‎‎‎‎‎‎‏‎‎‏‎‏‏‏‏‎‎‎‏‎‏‎‎‏‎‏‎‏‎‏‎Top 50%‎‏‎‎‏‎"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‎‎‎‏‏‏‎‎‎‏‏‎‎‏‏‏‎‏‏‏‎‏‏‎‎‎‏‎‎‎‏‎‎‏‎‎‎‏‎‏‎‏‎‏‎‏‏‏‏‏‎‎‎‎‏‎‎‎Top 30%‎‏‎‎‏‎"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‏‎‎‎‎‏‏‎‏‏‎‎‎‏‏‎‏‏‎‎‎‎‏‏‎‏‏‎‏‏‎‏‏‏‏‏‎‏‎‎‎‎‏‏‎Bottom full screen‎‏‎‎‏‎"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‎‎‎‎‎‎‏‏‏‏‎‎‏‏‎‎‎‏‏‎‏‏‏‎‏‎‎‎‏‎‏‎‏‎‎‎‎‏‎‏‏‏‎‎‏‏‏‏‏‎‎‎‏‏‏‎Position ‎‏‎‎‏‏‎<xliff:g id="POSITION">%1$d</xliff:g>‎‏‎‎‏‏‏‎, ‎‏‎‎‏‏‎<xliff:g id="TILE_NAME">%2$s</xliff:g>‎‏‎‎‏‏‏‎. Double tap to edit.‎‏‎‎‏‎"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‏‎‎‏‏‏‏‏‎‎‎‎‎‎‏‏‎‎‏‏‏‎‎‎‎‏‎‎‎‏‎‎‎‏‏‏‏‎‎‏‎‏‎‏‎‎‏‎‎‎‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="TILE_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎. Double tap to add.‎‏‎‎‏‎"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‏‏‎‏‎‎‏‏‏‏‎‏‏‏‏‏‏‏‎‏‏‏‏‎‏‎‏‏‎‎‏‏‏‏‏‏‏‏‏‏‎‏‎‏‎‎‎‏‎‏‎‏‎‎‎‏‎‎Move ‎‏‎‎‏‏‎<xliff:g id="TILE_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‏‏‎‏‎‎‎‏‏‏‎‏‎‏‎‎‏‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‏‏‏‎‏‎‎‎‎‎‏‎‎‏‏‎‏‏‎‏‎‎‎‎Remove ‎‏‎‎‏‏‎<xliff:g id="TILE_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‏‎‏‎‎‏‎‏‎‎‎‏‎‎‏‎‎‎‎‏‏‎‎‎‎‎‏‏‏‎‏‏‏‎‏‎‎‏‎‎‎‎‏‏‏‏‎‎‎‎‏‏‎‎‎‎‏‎Add ‎‏‎‎‏‏‎<xliff:g id="TILE_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎ to position ‎‏‎‎‏‏‎<xliff:g id="POSITION">%2$d</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‏‎‎‏‏‎‎‎‏‎‏‏‎‏‏‎‎‏‎‏‏‏‏‎‏‏‏‏‎‎‏‎‎‏‏‎‏‏‏‎‏‎‏‏‎‎‎‏‏‏‎‏‏‎‏‎‏‎Move ‎‏‎‎‏‏‎<xliff:g id="TILE_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎ to position ‎‏‎‎‏‏‎<xliff:g id="POSITION">%2$d</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‎‏‏‎‎‎‎‏‏‎‎‏‎‏‎‏‏‏‏‏‏‎‏‎‎‏‏‎‏‏‎‎‏‎‏‏‎‎‏‎‏‏‎‏‏‎‏‏‎‎‎‎‎‏‎‎‎‎remove tile‎‏‎‎‏‎"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‏‎‎‎‎‏‏‎‎‏‏‎‎‎‎‎‏‎‎‏‏‏‏‎‎‎‎‏‎‏‎‎‎‏‎‏‎‏‏‎‏‎‏‎‎‏‏‏‏‏‎‏‎‎‏‎‎‏‎add tile to end‎‏‎‎‏‎"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‏‏‏‏‏‎‎‎‏‎‏‎‏‏‏‎‏‎‏‏‏‏‎‎‏‏‏‏‎‎‎‏‎‏‏‎‎‎‏‎‎‎‎‎‏‎‏‏‎‏‎‎‏‏‏‎‎‏‎Move tile‎‏‎‎‏‎"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‎‎‏‏‏‎‏‏‎‏‎‏‎‏‏‎‎‏‏‏‎‏‏‏‎‎‏‎‏‏‏‎‏‎‎‎‏‎‎‏‎‎‎‏‏‎‎‏‏‎‏‎‏‏‏‏‎‎‎Add tile‎‏‎‎‏‎"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‎‎‏‎‎‎‏‏‏‎‎‏‎‏‎‎‎‏‏‎‎‎‏‎‎‎‎‏‏‏‎‏‏‏‏‏‎‏‎‎‎‎‏‎‏‎‎‎‎‎‏‏‏‏‎‎‎Move to ‎‏‎‎‏‏‎<xliff:g id="POSITION">%1$d</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‎‎‏‏‏‎‎‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‎‎‎‏‏‎‎‏‎‏‏‎‎‎‎‏‎‎‏‎‎‏‎‎‎‎‎‎‎‎‏‎‎Add to position ‎‏‎‎‏‏‎<xliff:g id="POSITION">%1$d</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎‏‎‏‎‎‎‎‏‎‏‎‏‏‏‏‎‏‏‏‏‎‎‎‎‏‏‎‎‏‏‎‎‎‎‏‏‎‏‏‎‏‏‏‎‎‎‏‎‏‎‏‏‎‎Position ‎‏‎‎‏‏‎<xliff:g id="POSITION">%1$d</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‎‎‏‎‎‏‎‏‎‏‏‏‎‎‏‏‎‏‏‏‎‎‎‎‎‎‎‏‏‏‏‏‎‏‎‎‏‏‏‏‏‏‏‎‏‏‏‏‎‏‎‏‎‎‎‎‏‎Quick settings editor.‎‏‎‎‏‎"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‏‎‏‏‏‏‎‏‏‏‏‎‎‎‏‏‏‎‎‎‏‏‏‎‎‎‎‎‎‏‏‏‏‏‎‎‎‎‏‏‏‏‏‏‎‎‎‏‏‏‏‏‎‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="ID_1">%1$s</xliff:g>‎‏‎‎‏‏‏‎ notification: ‎‏‎‎‏‏‎<xliff:g id="ID_2">%2$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‏‎‎‎‏‎‎‏‏‏‎‏‏‏‏‏‎‏‎‏‏‎‏‎‏‏‎‎‎‏‎‎‎‏‎‎‏‏‎‎‏‎‏‎‏‏‏‏‎‎‎‏‎‎‎‎‏‎App may not work with split-screen.‎‏‎‎‏‎"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‏‏‏‏‏‏‎‎‎‎‎‏‎‏‏‎‎‏‎‏‏‏‎‎‏‏‎‎‏‎‎‏‏‎‎‏‎‎‎‏‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‎‏‎Skip to previous‎‏‎‎‏‎"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‎‎‏‎‏‎‎‎‎‏‏‎‎‏‎‏‏‎‎‎‎‏‏‎‎‎‏‏‏‏‎‏‎‏‏‎‏‎‎‎‎‎‏‏‎‎‎‏‏‎‎‎‎‏‎‎‎‎Resize‎‏‎‎‏‎"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‏‏‎‎‎‎‎‏‎‏‏‎‏‏‏‏‎‎‎‎‏‎‎‎‏‎‏‏‎‎‏‏‎‎‎‎‎‎‎‎‏‏‏‏‎‏‎‎‎‎‏‎‏‏‎‎‎‎Phone turned off due to heat‎‏‎‎‏‎"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‏‏‎‎‏‎‎‏‏‎‎‏‏‎‏‎‎‏‎‏‏‏‏‎‏‏‎‏‏‏‏‏‎‎‎‎‎‏‎‎‎‏‏‎‎‏‎‏‏‏‎‏‏‏‎‏‏‏‎Your phone is now running normally‎‏‎‎‏‎"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‎‏‎‎‏‏‏‏‎‏‏‎‏‏‏‎‎‏‏‏‏‎‎‎‎‎‎‎‏‎‎‎‎‎‎‎‏‎‎‎‏‎‏‎‎‎‏‏‏‎‎‎‏‏‏‎‎‎‎Your phone is now running normally.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Tap for more info‎‏‎‎‏‎"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‎‏‏‎‎‏‏‏‎‏‎‏‏‏‏‏‎‎‎‎‎‏‎‎‏‏‎‎‎‎‏‏‏‏‏‏‏‎‎‎‎‎‏‏‏‎‏‎‎‏‏‎‏‏‏‏‏‏‎Your phone was too hot, so it turned off to cool down. Your phone is now running normally.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Your phone may get too hot if you:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎	• Use resource-intensive apps (such as gaming, video, or navigation apps)‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎	• Download or upload large files‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎	• Use your phone in high temperatures‎‏‎‎‏‎"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‎‎‏‎‎‎‎‎‎‎‏‎‎‏‏‏‏‎‏‎‎‏‎‏‎‎‏‏‎‏‎‎‏‏‏‎‏‎‏‏‎‎‏‎‏‏‎‎‎‎‎‎‏‏‏‎‏‎‏‎See care steps‎‏‎‎‏‎"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‏‏‎‎‏‎‎‏‎‎‎‏‏‎‏‎‏‎‏‎‎‎‏‎‏‎‎‎‏‎‎‎‏‏‎‎‎‏‏‏‏‎‏‏‏‏‏‏‎‏‏‎‎‏‎‎‎Phone is getting warm‎‏‎‎‏‎"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‏‎‎‏‎‎‎‏‏‎‎‏‏‎‎‎‏‏‏‎‏‏‎‎‎‏‎‎‎‏‎‎‏‏‎‎‎‏‎‏‎‎‎‎‎‏‎‎‏‎‏‎‎‏‏‎‎‎‎Some features limited while phone cools down‎‏‎‎‏‎"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‎‏‏‎‏‏‏‎‏‎‎‎‎‎‏‎‏‏‏‏‏‎‏‎‎‏‏‏‎‎‏‎‏‎‏‎‏‎‏‎‎‎‎‎‎‏‏‏‎‏‎‎‎‎‏‏‎‏‎Some features limited while phone cools down.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Tap for more info‎‏‎‎‏‎"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‎‎‏‎‏‎‎‏‎‏‏‎‎‏‏‎‎‎‏‎‎‏‏‏‏‏‏‎‏‎‏‎‏‎‏‎‏‏‏‏‎‏‎‎‎‏‏‏‏‏‎‏‎‏‎‎‎‎‎Your phone will automatically try to cool down. You can still use your phone, but it may run slower.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Once your phone has cooled down, it will run normally.‎‏‎‎‏‎"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‏‏‎‏‎‏‏‏‎‏‎‎‎‏‎‏‎‏‎‏‏‏‏‎‎‏‏‏‏‏‏‎‏‏‎‎‏‏‎‎‏‏‏‎‏‏‎‏‏‎‎‎‎‏‎‎See care steps‎‏‎‎‏‎"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎‎‏‏‎‎‎‎‎‎‎‏‎‎‎‎‎‏‏‏‎‎‏‏‎‎‎‎‎‏‎‏‏‏‏‏‎‎‎‏‏‎‏‎‎‎‏‎‏‏‎‏‎‏‎‏‏‏‎Unplug charger‎‏‎‎‏‎"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‎‏‏‏‎‏‏‏‎‏‎‏‏‎‎‎‏‎‏‎‎‎‎‏‏‎‏‏‎‏‎‎‎‏‏‎‎‎‎‏‏‎‏‎‎‎‎‏‎‎‏‏‏‎‏‎‎‎‏‎There’s an issue charging this device. Unplug the power adapter, and take care as the cable may be warm.‎‏‎‎‏‎"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‎‎‏‏‏‏‏‏‏‏‏‏‎‎‎‏‏‏‎‏‏‏‏‏‎‏‏‎‏‎‏‏‎‎‏‎‏‎‎‏‏‏‎‏‎‏‎‏‎‎‏‏‏‏‎‎See care steps‎‏‎‎‏‎"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‎‏‎‏‎‎‏‏‎‏‎‏‏‎‏‎‏‏‎‏‏‎‏‎‏‏‏‎‎‎‎‎‎‏‎‏‏‎‎‎‎‏‎‎‏‏‎‏‏‎‏‎‎‏‎‏‏‎‎Settings‎‏‎‎‏‎"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‎‎‏‏‏‎‏‏‏‏‎‏‏‏‏‏‏‎‎‎‎‏‏‏‏‎‏‎‎‏‎‏‏‏‏‎‎‏‏‎‏‎‎‏‎‎‏‎‏‎‎‎‏‏‎‏‎‎Got it‎‏‎‎‏‎"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‏‎‎‎‏‏‎‎‏‎‏‎‎‎‏‏‏‏‏‎‎‏‏‏‏‎‎‏‎‏‏‏‏‎‏‎‎‎‏‎‏‎‏‎‎‎‎‎‏‎‏‎‎‎‎‏‏‎‎Dump SysUI Heap‎‏‎‎‏‎"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‏‎‎‏‏‎‏‏‎‏‎‏‎‏‏‎‎‎‏‏‏‎‎‎‎‎‎‎‏‏‏‎‎‏‎‏‏‎‎‏‏‎‎‎‎‎‏‏‏‏‎‏‏‎‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="APP">%1$s</xliff:g>‎‏‎‎‏‏‏‎ is using your ‎‏‎‎‏‏‎<xliff:g id="TYPES_LIST">%2$s</xliff:g>‎‏‎‎‏‏‏‎.‎‏‎‎‏‎"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‏‏‏‎‎‎‎‎‏‏‏‏‏‎‎‏‏‏‏‎‎‎‏‏‏‎‏‎‏‏‏‎‎‎‏‏‏‏‎‎‏‏‎‎‏‏‎‏‎‎‏‎‏‎‎‏‎‎Applications are using your ‎‏‎‎‏‏‎<xliff:g id="TYPES_LIST">%s</xliff:g>‎‏‎‎‏‏‏‎.‎‏‎‎‏‎"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‎‏‏‏‏‎‎‏‏‎‎‎‏‎‎‏‏‏‎‏‏‏‏‎‎‏‏‏‎‏‎‎‎‎‎‎‎‏‏‏‎‎‏‎‎‎‏‎‎‎‎‏‎‎‏‎‏‏‎, ‎‏‎‎‏‎ "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‎‏‏‏‏‎‏‏‏‏‏‎‎‏‏‎‎‏‏‎‎‏‎‎‏‎‎‏‎‏‏‏‎‏‏‎‎‎‏‎‏‏‏‎‏‏‎‏‎‏‎‎‏‎‎‏‏‏‎ and ‎‏‎‎‏‎ "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‎‏‎‏‎‎‏‏‎‎‎‎‏‎‏‎‏‏‏‏‎‏‏‏‏‎‏‎‏‏‎‏‏‎‎‏‎‎‎‎‎‎‎‎‏‎‏‏‎‏‏‏‏‎‎‎camera‎‏‎‎‏‎"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‏‏‎‎‏‏‏‎‏‏‏‎‎‏‎‎‎‏‏‎‏‏‏‏‏‏‏‎‏‎‎‏‎‎‎‏‏‏‏‏‏‎‎‏‎‏‏‏‎‎‎‏‏‏‏‎location‎‏‎‎‏‎"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‎‎‏‏‎‎‎‏‎‎‏‏‏‎‎‏‎‏‏‏‎‏‎‏‎‏‎‏‎‏‎‏‎‎‏‎‏‎‎‎‎‎‎‎‏‎‎‏‎‎‏‏‎‎‎microphone‎‏‎‎‏‎"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‎‏‏‏‏‎‏‏‏‏‎‏‎‎‏‎‎‏‏‏‎‏‎‎‎‏‎‏‎‎‏‏‎‎‎‏‏‎‏‎‏‎‏‏‎‏‎‏‏‏‎‎‎‏‏‏‎‎‎Sensors off‎‏‎‎‏‎"</string>
     <string name="device_services" msgid="1549944177856658705">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‏‎‏‏‎‎‎‎‎‏‎‏‎‎‎‎‎‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‏‏‎‏‏‎‏‎‏‎‎‏‎‏‏‏‏‎‏‎‎‎‏‎‎‎‏‎Device Services‎‏‎‎‏‎"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‎‏‏‏‎‏‎‎‏‎‎‏‎‏‏‏‏‏‎‎‎‎‎‎‎‏‏‏‎‎‏‎‎‏‏‎‎‎‏‏‏‎‎‏‏‎‏‏‏‎‎‏‏‏‏‎‏‎‎No title‎‏‎‎‏‎"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‏‎‎‎‎‏‏‎‏‎‎‏‏‎‏‎‏‏‎‏‎‏‏‎‏‏‏‏‏‎‎‏‎‎‏‎‏‎‏‏‏‎‎‎‏‎‎‏‎‎‎‏‎‏‎‏‎‎‎Loading recommendations‎‏‎‎‏‎"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‎‎‎‎‏‏‏‏‏‎‎‏‏‎‎‏‏‏‎‏‎‎‏‏‎‎‏‏‎‎‎‎‏‏‏‎‎‏‎‏‏‎‏‎‎‎‎‏‎‏‎‎‎‎‎‏‎‏‎Media‎‏‎‎‏‎"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‏‎‏‏‏‎‏‎‏‎‎‏‏‎‏‎‏‏‏‎‎‎‎‎‎‏‎‏‎‏‏‎‏‎‎‎‏‎‎‎‎‏‎‎‎‏‏‏‎‏‏‏‏‏‏‎‎‏‎Hide the current session.‎‏‎‎‏‎"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‏‎‎‏‎‎‎‎‎‎‎‏‎‏‎‎‏‎‎‏‎‎‎‏‏‎‏‏‎‏‎‎‏‏‎‏‎‏‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‏‏‎‎Hide‎‏‎‎‏‎"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‎‎‎‎‏‏‏‏‎‎‎‎‏‏‎‏‏‏‏‎‎‎‎‏‏‎‎‎‏‎‎‏‎‏‎‎‎‏‎‎‎‏‏‎‏‎‎‏‎‏‏‎‏‎‏‎Dismiss‎‏‎‎‏‎"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‏‎‏‏‎‏‎‏‎‏‎‎‏‏‏‏‏‎‏‏‎‏‎‎‎‏‎‏‏‏‏‏‎‎‎‏‏‎‎‏‎‏‎‎‏‎‎‎‏‏‏‎‎‎‎‏‎‏‎Resume‎‏‎‎‏‎"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‎‏‎‏‏‎‏‎‏‏‏‎‏‎‏‏‎‏‎‎‎‎‎‎‏‎‏‏‎‏‎‎‎‏‏‎‏‏‎‏‏‎‎‎‎‎‎‏‏‎‎‎‏‏‎‎‎‎Settings‎‏‎‎‏‎"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‏‎‎‎‎‎‏‎‏‏‎‎‎‏‏‏‎‎‎‏‏‏‎‏‎‎‎‏‎‏‎‏‎‎‏‏‏‏‎‏‏‎‏‎‎‎‎‏‎‎‏‏‏‏‏‏‎‎Inactive, check app‎‏‎‎‏‎"</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 66aa3e7..5f9bb50 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Reanudar"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancelar"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Compartir"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Borrar"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Se canceló la grabación de pantalla"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Se guardó la grabación de pantalla; presiona para verla"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Se borró la grabación de pantalla"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Error al borrar la grabación de pantalla"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Error al obtener permisos"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Error al iniciar la grabación de pantalla"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Superior: 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Superior: 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pantalla inferior completa"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posición <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Presiona dos veces para editarla."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Presiona dos veces para agregarlo."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Quitar <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Agregar <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posición <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posición <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"quitar tarjeta"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"agregar tarjeta al final"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mover la tarjeta"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Agregar tarjeta"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Mover a <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Agregar a la posición <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posición <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de Configuración rápida"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificación de <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Es posible que la app no funcione en el modo de pantalla dividida."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Anterior"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Cambiar el tamaño"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"El teléfono se apagó por calor"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Tu teléfono ya funciona correctamente"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Tu teléfono ahora se ejecuta con normalidad.\nPresiona para obtener más información"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Tu teléfono estaba muy caliente y se apagó para enfriarse. Ya funciona correctamente.\n\nTu teléfono puede calentarse en estos casos:\n	• Usas apps que consumen muchos recursos (como juegos, videos o navegación).\n	• Subes o descargas archivos grandes.\n	• Usas el teléfono en condiciones de temperatura alta."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Ver pasos de mantenimiento"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"El teléfono se está calentando"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Se limitarán algunas funciones mientras se enfría el teléfono"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Algunas funciones se limitan durante el enfriamiento del teléfono.\nPresiona para obtener más información"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Tu teléfono intentará enfriarse automáticamente. Podrás usarlo, pero es posible que funcione más lento.\n\nUna vez que se haya enfriado, volverá a funcionar correctamente."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Ver pasos de mantenimiento"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Desconectar cargador"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"No se puede cargar el dispositivo. Desconecta el adaptador de la corriente con cuidado, ya que el cable podría estar caliente."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Ver pasos de mantenimiento"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Configuración"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Entendido"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Volcar pila de SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> está usando tu <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Hay aplicaciones que están usando tu <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" y "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"cámara"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ubicación"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"micrófono"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Se desactivaron los sensores"</string>
     <string name="device_services" msgid="1549944177856658705">"Servicios del dispositivo"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sin título"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Cargando recomendaciones"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Contenido multimedia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Oculta la sesión actual."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ocultar"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Descartar"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Reanudar"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Configuración"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactivo. Verifica la app"</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index dc15bdc..926f271 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Seguir"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancelar"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Compartir"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Eliminar"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Se ha cancelado la grabación de la pantalla"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Se ha guardado la grabación de la pantalla; toca para verla"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Se ha eliminado la grabación de la pantalla"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"No se ha podido eliminar la grabación de la pantalla"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"No se han podido obtener los permisos"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"No se ha podido empezar a grabar la pantalla"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Superior 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Superior 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pantalla inferior completa"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posición <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toca dos veces para cambiarla."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toca dos veces para añadirlo."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Quitar <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Añadir <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posición <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posición <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"quitar icono"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"añadir icono al final"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mover icono"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Añadir icono"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Mover a <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Añadir a la posición <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posición <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de ajustes rápidos."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificación de <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Es posible que la aplicación no funcione con la pantalla dividida."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Volver al anterior"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Cambiar tamaño"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Teléfono apagado por calor"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"El teléfono ahora funciona con normalidad"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"El teléfono ya funciona con normalidad.\nToca para ver más información"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"El teléfono se había calentado demasiado y se ha apagado para enfriarse. Ahora funciona con normalidad.\n\nPuede calentarse demasiado si:\n	• Usas aplicaciones que consumen muchos recursos (p. ej., apps de juegos, vídeos o navegación)\n	• Descargas o subes archivos grandes\n	• Lo usas a altas temperaturas"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Ver pasos de mantenimiento"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"El teléfono se está calentando"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Se limitan algunas funciones mientras el teléfono se enfría"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Se han limitado algunas funciones mientras el teléfono se enfría.\nToca para ver más información"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"El teléfono intentará enfriarse. Puedes seguir utilizándolo, pero es posible que funcione con mayor lentitud.\n\nUna vez que se haya enfriado, funcionará con normalidad."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Ver pasos de mantenimiento"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Desconecta el cargador"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"No se puede cargar el dispositivo. Desconecta el adaptador de corriente con cuidado, ya que el cable puede estar caliente."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Ver pasos de mantenimiento"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Ajustes"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Entendido"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Volcar pila de SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> está usando tu <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Hay aplicaciones que usan tu <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" y "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"cámara"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ubicación"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"micrófono"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensores desactivados"</string>
     <string name="device_services" msgid="1549944177856658705">"Servicios del dispositivo"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sin título"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Cargando recomendaciones"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Multimedia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ocultar la sesión."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ocultar"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Cerrar"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Reanudar"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Ajustes"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactivo, comprobar aplicación"</string>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 89891bd..7e12f72 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Jätka"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Tühista"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Jaga"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Kustuta"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Ekraanikuva salvestamine on tühistatud"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Ekraanikuva salvestis on salvestatud, puudutage vaatamiseks"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Ekraanikuva salvestis on kustutatud"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Viga ekraanikuva salvestise kustutamisel"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Lubade hankimine ebaõnnestus"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Viga ekraanikuva salvestamise alustamisel"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Ülemine: 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Ülemine: 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Alumine täisekraan"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Asend <xliff:g id="POSITION">%1$d</xliff:g>, paan <xliff:g id="TILE_NAME">%2$s</xliff:g>. Topeltpuudutage muutmiseks."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Topeltpuudutage lisamiseks."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Paani <xliff:g id="TILE_NAME">%1$s</xliff:g> teisaldamine"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Paani <xliff:g id="TILE_NAME">%1$s</xliff:g> eemaldamine"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Lisage <xliff:g id="TILE_NAME">%1$s</xliff:g> asendisse <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Teisaldage <xliff:g id="TILE_NAME">%1$s</xliff:g> asendisse <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"paani eemaldamiseks"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"paani lõppu lisamiseks"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Teisalda paan"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Lisa paan"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Teisaldamine asendisse <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Lisamine asendisse <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Asend <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Kiirseadete redigeerija."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Teenuse <xliff:g id="ID_1">%1$s</xliff:g> märguanne: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Rakendus ei pruugi poolitatud ekraaniga töötada."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Eelmise juurde"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Suuruse muutmine"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Tel. lül. kuumuse tõttu välja"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefon töötab nüüd tavapäraselt"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefon töötab nüüd tavapäraselt.\nPuudutage lisateabe saamiseks."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon oli liiga kuum, seetõttu lülitus see jahtumiseks välja. Telefon töötab nüüd tavapäraselt.\n\nTelefon võib kuumaks minna:\n • ressursse koormavate rakenduste kasutamisel (nt mängu-, video- või navigatsioonirakendused)\n • suurte failide alla-/üleslaadimisel\n • telefoni kasutamisel kõrgel temperatuuril"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Vaadake hooldusjuhiseid"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon soojeneb"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Mõned funktsioonid on piiratud, kuni telefon jahtub"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Mõned funktsioonid on piiratud, kuni telefon jahtub.\nPuudutage lisateabe saamiseks."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Teie telefon proovib automaatselt maha jahtuda. Saate telefoni ikka kasutada, kuid see võib olla aeglasem.\n\nKui telefon on jahtunud, töötab see tavapäraselt."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Vaadake hooldusjuhiseid"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Eemaldage laadija vooluvõrgust"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Selle seadme laadimisega on probleem. Eemaldage toiteadapter ja olge ettevaatlik, sest kaabel võib olla soe."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Vaadake hooldusjuhiseid"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Seaded"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Selge"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> kasutab järgmisi: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Rakendused kasutavad järgmisi: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ja "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kaamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"asukoht"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Andurid on välja lülitatud"</string>
     <string name="device_services" msgid="1549944177856658705">"Seadme teenused"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Pealkiri puudub"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Soovituste laadimine"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Meedia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Peidetakse praegune seanss."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Peida"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Loobu"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Jätka"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Seaded"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Passiivne, vaadake rakendust"</string>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 050cb43..d5fd753 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Berrekin"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Utzi"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Partekatu"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Ezabatu"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Utzi zaio pantaila grabatzeari"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Gorde da pantailaren grabaketa; sakatu ikusteko"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Ezabatu da pantailaren grabaketa"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Errore bat gertatu da pantailaren grabaketa ezabatzean"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Ezin izan dira lortu baimenak"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Errore bat gertatu da pantaila grabatzen hastean"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Ezarri goialdea % 50en"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Ezarri goialdea % 30en"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ezarri behealdea pantaila osoan"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. posizioa, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Editatzeko, sakatu birritan."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Gehitzeko, sakatu birritan."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mugitu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Kendu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Gehitu <xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g>garren postuan"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Eraman <xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g>garren postura"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"kendu lauza"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"gehitu lauza amaieran"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mugitu lauza"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Gehitu lauza"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Eraman <xliff:g id="POSITION">%1$d</xliff:g>garren lekura"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Gehitu <xliff:g id="POSITION">%1$d</xliff:g>garren lekuan"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"<xliff:g id="POSITION">%1$d</xliff:g>garren lekua"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Ezarpen bizkorren editorea."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> zerbitzuaren jakinarazpena: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Baliteke aplikazioak ez funtzionatzea pantaila zatituan."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Saltatu aurrekora"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Aldatu tamaina"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Beroegi egoteagatik itzali da"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Orain, ohiko moduan dabil telefonoa"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Ohi bezala ari da funtzionatzen telefonoa orain.\nInformazio gehiago lortzeko, sakatu hau."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefonoa gehiegi berotu da, eta itzali egin da tenperatura jaisteko. Orain, ohiko moduan dabil.\n\nBerotzearen zergati posibleak:\n	• Baliabide asko behar dituzten aplikazioak erabiltzea (adib., jokoak, bideoak edo nabigazio-aplikazioak).\n	• Fitxategi handiak deskargatu edo kargatzea.\n	• Telefonoa giro beroetan erabiltzea."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Ikusi zaintzeko urratsak"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Berotzen ari da telefonoa"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Eginbide batzuk ezingo dira erabili telefonoa hoztu arte"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Eginbide batzuk ezingo dira erabili telefonoa hoztu arte.\nInformazio gehiago lortzeko, sakatu hau."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefonoa automatikoki saiatuko da hozten. Hoztu bitartean, telefonoa erabiltzen jarrai dezakezu, baina mantsoago funtziona lezake.\n\nTelefonoaren tenperatura jaitsi bezain laster, ohi bezala funtzionatzen jarraituko du."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Ikusi zaintzeko urratsak"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Deskonektatu kargagailua"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Arazo bat izan da gailua kargatzean. Deskonektatu egokigailua eta kontuz ibili, kablea bero egon baitaiteke."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Ikusi zaintzeko urratsak"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Ezarpenak"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Ados"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> <xliff:g id="TYPES_LIST">%2$s</xliff:g> erabiltzen ari da."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikazio batzuk <xliff:g id="TYPES_LIST">%s</xliff:g> erabiltzen ari dira."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" eta "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"kokapena"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofonoa"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sentsoreak desaktibatuta daude"</string>
     <string name="device_services" msgid="1549944177856658705">"Gailuetarako zerbitzuak"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Ez du izenik"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Gomendioak kargatzen"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Multimedia-edukia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ezkutatu uneko saioa."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ezkutatu"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Baztertu"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Berrekin"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Ezarpenak"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inaktibo; egiaztatu aplikazioa"</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 15cdb3b..c2da219 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ازسرگیری"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"لغو"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"هم‌رسانی"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"حذف"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"ضبط صفحه‌نمایش لغو شد"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"ضبط صفحه‌نمایش ذخیره شد، برای مشاهده ضربه بزنید"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"فایل ضبط صفحه‌نمایش حذف شد"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"خطا در حذف فایل ضبط صفحه‌نمایش"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"مجوزها دریافت نشدند"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"خطا هنگام شروع ضبط صفحه‌نمایش"</string>
@@ -144,7 +142,7 @@
     <string name="biometric_dialog_empty_space_description" msgid="3330555462071453396">"برای لغو راستی‌آزمایی ضربه بزنید"</string>
     <string name="biometric_dialog_face_icon_description_idle" msgid="4351777022315116816">"لطفاً دوباره امتحان کنید"</string>
     <string name="biometric_dialog_face_icon_description_authenticating" msgid="3401633342366146535">"درحال جستجوی چهره"</string>
-    <string name="biometric_dialog_face_icon_description_authenticated" msgid="2242167416140740920">"چهره احراز هویت شد"</string>
+    <string name="biometric_dialog_face_icon_description_authenticated" msgid="2242167416140740920">"چهره اصالت‌سنجی شد"</string>
     <string name="biometric_dialog_face_icon_description_confirmed" msgid="7918067993953940778">"تأیید شد"</string>
     <string name="biometric_dialog_tap_confirm" msgid="9166350738859143358">"برای تکمیل، روی تأیید ضربه بزنید"</string>
     <string name="biometric_dialog_authenticated" msgid="7337147327545272484">"راستی‌آزمایی‌شده"</string>
@@ -309,8 +307,8 @@
     <string name="accessibility_quick_settings_work_mode_changed_on" msgid="1105258550138313384">"حالت کار روشن شد."</string>
     <string name="accessibility_quick_settings_data_saver_changed_off" msgid="4910847127871603832">"صرفه‌جویی داده خاموش شد."</string>
     <string name="accessibility_quick_settings_data_saver_changed_on" msgid="6370606590802623078">"صرفه‌جویی داده روشن شد."</string>
-    <string name="accessibility_quick_settings_sensor_privacy_changed_off" msgid="7608378211873807353">"«حریم خصوصی حسگر» خاموش است."</string>
-    <string name="accessibility_quick_settings_sensor_privacy_changed_on" msgid="4267393685085328801">"«حریم خصوصی حسگر» روشن است."</string>
+    <string name="accessibility_quick_settings_sensor_privacy_changed_off" msgid="7608378211873807353">"«حریم‌خصوصی حسگر» خاموش است."</string>
+    <string name="accessibility_quick_settings_sensor_privacy_changed_on" msgid="4267393685085328801">"«حریم‌خصوصی حسگر» روشن است."</string>
     <string name="accessibility_brightness" msgid="5391187016177823721">"روشنایی نمایشگر"</string>
     <string name="accessibility_ambient_display_charging" msgid="7725523068728128968">"درحال شارژ شدن"</string>
     <string name="data_usage_disabled_dialog_3g_title" msgid="5716594205739750015">"‏داده 2G-3G موقتاً متوقف شده است"</string>
@@ -606,7 +604,7 @@
     <string name="screen_pinning_positive" msgid="3285785989665266984">"متوجه شدم"</string>
     <string name="screen_pinning_negative" msgid="6882816864569211666">"نه متشکرم"</string>
     <string name="screen_pinning_start" msgid="7483998671383371313">"برنامه پین شد"</string>
-    <string name="screen_pinning_exit" msgid="4553787518387346893">"پین برنامه برداشته شد"</string>
+    <string name="screen_pinning_exit" msgid="4553787518387346893">"سنجاق از برنامه برداشته شد"</string>
     <string name="quick_settings_reset_confirmation_title" msgid="463533331480997595">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> مخفی شود؟"</string>
     <string name="quick_settings_reset_confirmation_message" msgid="2320586180785674186">"دفعه بعد که آن را روشن کنید، در تنظیمات نشان داده می‌شود."</string>
     <string name="quick_settings_reset_confirmation_button" msgid="3341477479055016776">"پنهان کردن"</string>
@@ -788,8 +786,8 @@
     <string name="keyboard_key_media_previous" msgid="5637875709190955351">"قبلی"</string>
     <string name="keyboard_key_media_rewind" msgid="3450387734224327577">"عقب بردن"</string>
     <string name="keyboard_key_media_fast_forward" msgid="3572444327046911822">"جلو بردن سریع"</string>
-    <string name="keyboard_key_page_up" msgid="173914303254199845">"صفحه بعدی"</string>
-    <string name="keyboard_key_page_down" msgid="9035902490071829731">"صفحه قبلی"</string>
+    <string name="keyboard_key_page_up" msgid="173914303254199845">"صفحه بعد"</string>
+    <string name="keyboard_key_page_down" msgid="9035902490071829731">"صفحه قبل"</string>
     <string name="keyboard_key_forward_del" msgid="5325501825762733459">"حذف"</string>
     <string name="keyboard_key_move_home" msgid="3496502501803911971">"ابتدا"</string>
     <string name="keyboard_key_move_end" msgid="99190401463834854">"انتها"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"٪۵۰ بالا"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"٪۳۰ بالا"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"تمام‌صفحه پایین"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"موقعیت <xliff:g id="POSITION">%1$d</xliff:g>، <xliff:g id="TILE_NAME">%2$s</xliff:g>. برای ویرایش دو ضربه سریع بزنید."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. برای افزودن دو ضربه سریع بزنید."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"انتقال <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"حذف <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"افزودن <xliff:g id="TILE_NAME">%1$s</xliff:g> به موقعیت <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"انتقال <xliff:g id="TILE_NAME">%1$s</xliff:g> به موقعیت <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ویرایشگر تنظیمات سریع."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"اعلان <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"ممکن است برنامه با تقسیم صفحه کار نکند."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"رد شدن به قبلی"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"تغییر اندازه"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"تلفن به علت گرم شدن خاموش شد"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"اکنون تلفنتان عملکرد معمولش را دارد"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"اکنون عملکرد تلفنتان به حالت عادی برگشته است.\nبرای اطلاعات بیشتر ضربه بزنید"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"تلفنتان خیلی گرم شده بود، بنابراین خاموش شد تا خنک شود. اکنون تلفنتان عملکرد معمولش را دارد.\n\nتلفنتان خیلی گرم می‌شود، اگر:\n	• از برنامه‌های نیازمند پردازش زیاد (مانند بازی، برنامه‌های ویدیویی یا پیمایشی) استفاده کنید\n	• فایل‌های بزرگ بارگیری یا بارگذاری کنید\n	• در دماهای بالا از تلفنتان استفاده کنید"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"دیدن اقدامات محافظتی"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"تلفن درحال گرم شدن است"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"وقتی تلفن درحال خنک شدن است، بعضی از قابلیت‌ها محدود می‌شوند"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"وقتی تلفن درحال خنک شدن است، بعضی از ویژگی‌ها محدود می‌شوند.\nبرای اطلاعات بیشتر ضربه بزنید"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"تلفنتان به‌طور خودکار سعی می‌کند خنک شود. همچنان می‌توانید از تلفنتان استفاده کنید، اما ممکن است کندتر عمل کند.\n\nوقتی تلفن خنک شد، عملکرد عادی‌اش از سرگرفته می‌شود."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"دیدن اقدامات محافظتی"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"جدا کردن شارژر از برق"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"مشکلی در شارژ کردن این دستگاه وجود دارد. آداپتور برق را از برق جدا کنید و مراقب باشید زیرا ممکن است کابل گرم باشد."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"مشاهده مراحل احتیاط"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"تنظیمات"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"متوجه شدم"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> از <xliff:g id="TYPES_LIST">%2$s</xliff:g> شما استفاده می‌کند."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"برنامه‌ها از <xliff:g id="TYPES_LIST">%s</xliff:g> شما استفاده می‌‌کنند."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"، "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" و "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"دوربین"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"مکان"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"میکروفون"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"حسگرها خاموش است"</string>
     <string name="device_services" msgid="1549944177856658705">"سرویس‌های دستگاه"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"بدون عنوان"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"درحال بار کردن توصیه‌ها"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"رسانه"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"جلسه فعلی پنهان شود."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"پنهان کردن"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"رد کردن"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"ازسرگیری"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"تنظیمات"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"غیرفعال، برنامه را بررسی کنید"</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 7573d29..7b8cad3 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Jatka"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Peruuta"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Jaa"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Poista"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Näytön tallennus peruutettu"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Näyttötallenne tallennettu, katso napauttamalla"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Näyttötallenne poistettu"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Virhe poistettaessa näyttötallennetta"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Käyttöoikeuksien hakeminen epäonnistui."</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Virhe näytön tallennuksen aloituksessa"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Yläosa 50 %"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Yläosa 30 %"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Alaosa koko näytölle"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Paikka <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Muokkaa kaksoisnapauttamalla."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Lisää kaksoisnapauttamalla."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Siirrä <xliff:g id="TILE_NAME">%1$s</xliff:g>."</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Poista <xliff:g id="TILE_NAME">%1$s</xliff:g>."</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Siirrä <xliff:g id="TILE_NAME">%1$s</xliff:g> kohtaan <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Siirrä <xliff:g id="TILE_NAME">%1$s</xliff:g> kohtaan <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"poista kiekko"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"lisää kiekko loppuun"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Siirrä kiekkoa"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Lisää kiekko"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Siirrä paikkaan <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Lisää paikkaan <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Paikka <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Pika-asetusten muokkausnäkymä"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Ilmoitus kohteesta <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Sovellus ei ehkä toimi jaetulla näytöllä."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Siirry edelliseen"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Muuta kokoa"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Puhelin sammui kuumuuden takia"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Puhelimesi toimii nyt normaalisti."</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Puhelimesi toimii nyt normaalisti.\nLue lisää napauttamalla"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Puhelimesi oli liian kuuma, joten se sammui. Puhelimesi toimii nyt normaalisti.\n\nPuhelimesi voi kuumentua liikaa, jos\n	• käytät paljon resursseja vaativia sovelluksia (esim. pelejä, videoita tai navigointisovelluksia)\n	• lataat tai lähetät suuria tiedostoja\n	• käytät puhelintasi korkeissa lämpötiloissa."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Katso huoltovaiheet"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Puhelin lämpenee"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Joidenkin ominaisuuksien käyttöä on rajoitettu puhelimen jäähtymisen aikana."</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Joidenkin ominaisuuksien käyttöä on rajoitettu puhelimen jäähtymisen aikana.\nLue lisää napauttamalla"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Puhelimesi yrittää automaattisesti jäähdyttää itsensä. Voit silti käyttää puhelinta, mutta se voi toimia hitaammin.\n\nKun puhelin on jäähtynyt, se toimii normaalisti."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Katso huoltovaiheet"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Irrota laturi"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Laitetta ladattaessa tapahtui virhe. Irrota virtalähde varovasti – johto voi olla lämmin."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Katso huoltovaiheet"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Asetukset"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Selvä"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Luo SysUI-keon vedos"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> käyttää ominaisuuksia (<xliff:g id="TYPES_LIST">%2$s</xliff:g>)."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"<xliff:g id="TYPES_LIST">%s</xliff:g> ovat sovellusten käytössä."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ja "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"sijainti"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofoni"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Anturit pois päältä"</string>
     <string name="device_services" msgid="1549944177856658705">"Laitepalvelut"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Ei nimeä"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Ladataan suosituksia"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Piilota nykyinen käyttökerta."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Piilota"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Ohita"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Jatka"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Asetukset"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Epäaktiivinen, tarkista sovellus"</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index e87bafd..9e9eb85 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Reprendre"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Annuler"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Partager"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Supprimer"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"L\'enregistrement d\'écran a été annulé"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"L\'enregistrement d\'écran est terminé. Touchez ici pour l\'afficher."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"L\'enregistrement d\'écran a été supprimé"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Une erreur s\'est produite lors de la suppression de l\'enregistrement d\'écran"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Impossible d\'obtenir les autorisations"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Une erreur s\'est produite lors du démarrage de l\'enregistrement d\'écran"</string>
@@ -327,6 +325,7 @@
     <string name="notification_group_overflow_indicator" msgid="7605120293801012648">"+ <xliff:g id="NUMBER">%s</xliff:g>"</string>
     <plurals name="notification_group_overflow_description" formatted="false" msgid="91483442850649192">
       <item quantity="one"><xliff:g id="NUMBER_1">%s</xliff:g> autre notification à l\'intérieur.</item>
+      <item quantity="many"><xliff:g id="NUMBER_1">%s</xliff:g> more notifications inside.</item>
       <item quantity="other"><xliff:g id="NUMBER_1">%s</xliff:g> autres notifications à l\'intérieur.</item>
     </plurals>
     <string name="notification_summary_message_format" msgid="5158219088501909966">"<xliff:g id="CONTACT_NAME">%1$s</xliff:g> : <xliff:g id="MESSAGE_CONTENT">%2$s</xliff:g>"</string>
@@ -402,6 +401,7 @@
     <string name="quick_settings_hotspot_secondary_label_data_saver_enabled" msgid="1280433136266439372">"Écon. données activé"</string>
     <plurals name="quick_settings_hotspot_secondary_label_num_devices" formatted="false" msgid="3142308865165871976">
       <item quantity="one">%d appareil</item>
+      <item quantity="many">%d devices</item>
       <item quantity="other">%d appareils</item>
     </plurals>
     <string name="quick_settings_notifications_label" msgid="3379631363952582758">"Notifications"</string>
@@ -461,7 +461,7 @@
     <string name="camera_hint" msgid="4519495795000658637">"Balayez à partir de l\'icône pour accéder à l\'appareil photo"</string>
     <string name="interruption_level_none_with_warning" msgid="8394434073508145437">"Aucune interruption : le son des lecteurs d\'écran sera également désactivé."</string>
     <string name="interruption_level_none" msgid="219484038314193379">"Aucune interruption"</string>
-    <string name="interruption_level_priority" msgid="661294280016622209">"Priorités seulement"</string>
+    <string name="interruption_level_priority" msgid="661294280016622209">"Prioritaires seulement"</string>
     <string name="interruption_level_alarms" msgid="2457850481335846959">"Alarmes seulement"</string>
     <string name="interruption_level_none_twoline" msgid="8579382742855486372">"Aucune\ninterruption"</string>
     <string name="interruption_level_priority_twoline" msgid="8523482736582498083">"Priorités\nuniquement"</string>
@@ -494,6 +494,7 @@
     <string name="user_limit_reached_title" msgid="2429229448830346057">"Limite d\'utilisateurs atteinte"</string>
     <plurals name="user_limit_reached_message" formatted="false" msgid="2573535787802908398">
       <item quantity="one">Vous pouvez ajouter jusqu\'à <xliff:g id="COUNT">%d</xliff:g> utilisateur.</item>
+      <item quantity="many">You can add up to <xliff:g id="COUNT">%d</xliff:g> users.</item>
       <item quantity="other">Vous pouvez ajouter jusqu\'à <xliff:g id="COUNT">%d</xliff:g> utilisateurs.</item>
     </plurals>
     <string name="user_remove_user_title" msgid="9124124694835811874">"Supprimer l\'utilisateur?"</string>
@@ -718,7 +719,7 @@
     <string name="notification_channel_summary_bubble" msgid="7235935211580860537">"Garde votre attention à l\'aide d\'un raccourci flottant vers ce contenu."</string>
     <string name="notification_channel_summary_priority" msgid="7952654515769021553">"S\'affiche en haut de la section des conversations sous forme de bulle flottante et affiche la photo du profil sur l\'écran de verrouillage"</string>
     <string name="notification_conversation_channel_settings" msgid="2409977688430606835">"Paramètres"</string>
-    <string name="notification_priority_title" msgid="2079708866333537093">"Priorité"</string>
+    <string name="notification_priority_title" msgid="2079708866333537093">"Prioritaire"</string>
     <string name="no_shortcut" msgid="8257177117568230126">"<xliff:g id="APP_NAME">%1$s</xliff:g> ne prend pas en charge les fonctionnalités de conversation"</string>
     <string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Aucune bulle récente"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Les bulles récentes et les bulles ignorées s\'afficheront ici"</string>
@@ -760,10 +761,12 @@
     <string name="snoozed_for_time" msgid="7586689374860469469">"Reporté pour <xliff:g id="TIME_AMOUNT">%1$s</xliff:g>"</string>
     <plurals name="snoozeHourOptions" formatted="false" msgid="2066838694120718170">
       <item quantity="one">%d heure</item>
+      <item quantity="many">%d hours</item>
       <item quantity="other">%d heures</item>
     </plurals>
     <plurals name="snoozeMinuteOptions" formatted="false" msgid="8998483159208055980">
       <item quantity="one">%d minute</item>
+      <item quantity="many">%d minutes</item>
       <item quantity="other">%d minutes</item>
     </plurals>
     <string name="battery_panel_title" msgid="5931157246673665963">"Utilisation de la pile"</string>
@@ -884,12 +887,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50 % dans le haut"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30 % dans le haut"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Plein écran dans le bas"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Touchez deux fois pour modifier."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Touchez deux fois pour ajouter."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Déplacer <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Supprimer <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Ajouter <xliff:g id="TILE_NAME">%1$s</xliff:g> à la position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Déplacer <xliff:g id="TILE_NAME">%1$s</xliff:g> à la position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"retirer la tuile"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"ajouter la tuile à la fin"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Déplacer la tuile"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Ajouter la tuile"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Déplacer vers <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Ajouter à la position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Éditeur de paramètres rapides."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notification <xliff:g id="ID_1">%1$s</xliff:g> : <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Il est possible que l\'application ne fonctionne pas en mode Écran partagé."</string>
@@ -922,11 +926,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Revenir au précédent"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Redimensionner"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Tél. éteint car il surchauffait"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Votre téléphone fonctionne maintenant normalement"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Votre téléphone fonctionne maintenant de manière normale.\nTouchez pour en savoir plus"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Votre téléphone s\'est éteint, car il surchauffait. Il s\'est refroidi et fonctionne normalement.\n\nIl peut surchauffer si vous :\n	• Util. des applis utilisant beaucoup de ressources (jeux, vidéo, navigation, etc.)\n	• Téléchargez ou téléversez de gros fichiers\n	• Utilisez téléphone dans des températures élevées"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Afficher les étapes d\'entretien"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Le téléphone commence à chauffer"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Les fonctionnalités sont limitées pendant que le téléphone refroidit"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Certaines fonctionnalités sont limitées pendant que le téléphone refroidit.\nTouchez pour en savoir plus"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Votre téléphone va essayer de se refroidir automatiquement. Vous pouvez toujours l\'utiliser, mais il risque d\'être plus lent.\n\nUne fois refroidi, il fonctionnera normalement."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Afficher les étapes d\'entretien"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Débranchez le chargeur"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Il y a un problème avec la recharge de cet appareil. Débranchez l\'adaptateur d\'alimentation, et faites attention, car le câble pourrait être chaud."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Afficher les étapes d\'entretien"</string>
@@ -954,7 +960,7 @@
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> en cours d\'exécution"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"Application ouverte sans avoir été installée."</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"Application ouverte sans avoir été installée. Touchez ici pour en savoir plus."</string>
-    <string name="app_info" msgid="5153758994129963243">"Détails de l\'applic."</string>
+    <string name="app_info" msgid="5153758994129963243">"Détails de l\'appli"</string>
     <string name="go_to_web" msgid="636673528981366511">"Ouvrir le navigateur"</string>
     <string name="mobile_data" msgid="4564407557775397216">"Données cellulaires"</string>
     <string name="mobile_data_text_format" msgid="6806501540022589786">"<xliff:g id="ID_1">%1$s</xliff:g> : <xliff:g id="ID_2">%2$s</xliff:g>"</string>
@@ -988,6 +994,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Paramètres"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Copier mémoire SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> utilise votre <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Des applications utilisent votre <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" et "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"appareil photo"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"position"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microphone"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Capteurs désactivés"</string>
     <string name="device_services" msgid="1549944177856658705">"Services de l\'appareil"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sans titre"</string>
@@ -1032,6 +1045,7 @@
     <string name="controls_providers_title" msgid="6879775889857085056">"Sélectionnez l\'application pour laquelle ajouter des commandes"</string>
     <plurals name="controls_number_of_favorites" formatted="false" msgid="1057347832073807380">
       <item quantity="one"><xliff:g id="NUMBER_1">%s</xliff:g> commande ajoutée.</item>
+      <item quantity="many"><xliff:g id="NUMBER_1">%s</xliff:g> controls added.</item>
       <item quantity="other"><xliff:g id="NUMBER_1">%s</xliff:g> commandes ajoutées.</item>
     </plurals>
     <string name="controls_removed" msgid="3731789252222856959">"Supprimé"</string>
@@ -1066,7 +1080,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Chargement des recommandations…"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Commandes multimédias"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Masquer la session en cours."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Masquer"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Fermer"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Reprendre"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Paramètres"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Délai expiré, vérifiez l\'appli"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index d9ab397..5d1b3a1 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Reprendre"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Annuler"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Partager"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Supprimer"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Enregistrement de l\'écran annulé"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Enregistrement de l\'écran enregistré. Appuyez pour afficher"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Enregistrement de l\'écran supprimé"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Erreur lors de la suppression de l\'enregistrement de l\'écran"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Échec d\'obtention des autorisations"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Erreur lors du démarrage de l\'enregistrement de l\'écran"</string>
@@ -327,6 +325,7 @@
     <string name="notification_group_overflow_indicator" msgid="7605120293801012648">"<xliff:g id="NUMBER">%s</xliff:g> autres"</string>
     <plurals name="notification_group_overflow_description" formatted="false" msgid="91483442850649192">
       <item quantity="one"><xliff:g id="NUMBER_1">%s</xliff:g> autre notification à l\'intérieur.</item>
+      <item quantity="many"><xliff:g id="NUMBER_1">%s</xliff:g> more notifications inside.</item>
       <item quantity="other"><xliff:g id="NUMBER_1">%s</xliff:g> autres notifications à l\'intérieur.</item>
     </plurals>
     <string name="notification_summary_message_format" msgid="5158219088501909966">"<xliff:g id="CONTACT_NAME">%1$s</xliff:g> : <xliff:g id="MESSAGE_CONTENT">%2$s</xliff:g>"</string>
@@ -402,6 +401,7 @@
     <string name="quick_settings_hotspot_secondary_label_data_saver_enabled" msgid="1280433136266439372">"Écon. données activé"</string>
     <plurals name="quick_settings_hotspot_secondary_label_num_devices" formatted="false" msgid="3142308865165871976">
       <item quantity="one">%d appareil</item>
+      <item quantity="many">%d devices</item>
       <item quantity="other">%d appareils</item>
     </plurals>
     <string name="quick_settings_notifications_label" msgid="3379631363952582758">"Notifications"</string>
@@ -494,6 +494,7 @@
     <string name="user_limit_reached_title" msgid="2429229448830346057">"Limite nombre utilisateurs atteinte"</string>
     <plurals name="user_limit_reached_message" formatted="false" msgid="2573535787802908398">
       <item quantity="one">Vous pouvez ajouter <xliff:g id="COUNT">%d</xliff:g> profil utilisateur.</item>
+      <item quantity="many">You can add up to <xliff:g id="COUNT">%d</xliff:g> users.</item>
       <item quantity="other">Vous pouvez ajouter jusqu\'à <xliff:g id="COUNT">%d</xliff:g> profils utilisateur.</item>
     </plurals>
     <string name="user_remove_user_title" msgid="9124124694835811874">"Supprimer l\'utilisateur ?"</string>
@@ -760,10 +761,12 @@
     <string name="snoozed_for_time" msgid="7586689374860469469">"Répétée après <xliff:g id="TIME_AMOUNT">%1$s</xliff:g>"</string>
     <plurals name="snoozeHourOptions" formatted="false" msgid="2066838694120718170">
       <item quantity="one">%d heure</item>
+      <item quantity="many">%d hours</item>
       <item quantity="other">%d heures</item>
     </plurals>
     <plurals name="snoozeMinuteOptions" formatted="false" msgid="8998483159208055980">
       <item quantity="one">%d minute</item>
+      <item quantity="many">%d minutes</item>
       <item quantity="other">%d minutes</item>
     </plurals>
     <string name="battery_panel_title" msgid="5931157246673665963">"Utilisation batterie"</string>
@@ -857,7 +860,7 @@
     <string name="right_icon" msgid="1103955040645237425">"Icône droite"</string>
     <string name="drag_to_add_tiles" msgid="8933270127508303672">"Sélectionnez et faites glisser les icônes pour les ajouter"</string>
     <string name="drag_to_rearrange_tiles" msgid="2143204300089638620">"Sélectionnez et faites glisser les icônes pour réorganiser"</string>
-    <string name="drag_to_remove_tiles" msgid="4682194717573850385">"Faites glisser les tuiles ici pour les supprimer."</string>
+    <string name="drag_to_remove_tiles" msgid="4682194717573850385">"Faites glisser les icônes ici pour les supprimer."</string>
     <string name="drag_to_remove_disabled" msgid="933046987838658850">"Au minimum <xliff:g id="MIN_NUM_TILES">%1$d</xliff:g> tuiles sont nécessaires"</string>
     <string name="qs_edit" msgid="5583565172803472437">"Modifier"</string>
     <string name="tuner_time" msgid="2450785840990529997">"Heure"</string>
@@ -884,12 +887,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Écran du haut à 50 %"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Écran du haut à 30 %"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Écran du bas en plein écran"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, \"<xliff:g id="TILE_NAME">%2$s</xliff:g>\". Appuyer deux fois pour modifier."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Appuyer deux fois pour ajouter."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Déplacer \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\""</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Supprimer \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\""</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Ajouter l\'élément \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" à la position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Déplacer l\'élément \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" à la position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"supprimer la carte"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"ajouter la carte à la fin"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Déplacer la carte"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Ajouter une carte"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Déplacer vers <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Ajouter à la position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Éditeur de configuration rapide."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notification <xliff:g id="ID_1">%1$s</xliff:g> : <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Il est possible que l\'application ne fonctionne pas en mode Écran partagé."</string>
@@ -922,11 +926,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Passer au contenu précédent"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Redimensionner"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Tél. éteint car il surchauffait"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"À présent, votre téléphone fonctionne normalement"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"À présent, votre téléphone fonctionne normalement.\nAppuyer pour en savoir plus"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Votre téléphone s\'est éteint, car il surchauffait. Il s\'est refroidi et fonctionne normalement.\n\nIl peut surchauffer si vous :\n	• exécutez applis utilisant beaucoup de ressources (jeux, vidéo, navigation, etc.) ;\n	• téléchargez ou importez gros fichiers ;\n	• utilisez téléphone à des températures élevées."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Afficher les étapes d\'entretien"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Le téléphone chauffe"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Fonctionnalités limitées pendant le refroidissement du téléphone"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Fonctionnalités limitées pendant le refroidissement du téléphone.\nAppuyer pour en savoir plus"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Votre téléphone va essayer de se refroidir automatiquement. Vous pouvez toujours l\'utiliser, mais il risque d\'être plus lent.\n\nUne fois refroidi, il fonctionnera normalement."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Afficher les étapes d\'entretien"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Débrancher le chargeur"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Un problème est survenu lors de la recharge de cet appareil. Débranchez l\'adaptateur secteur en faisant attention, car le câble risque d\'être chaud."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Afficher les étapes d\'entretien"</string>
@@ -988,6 +994,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Paramètres"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Copier mémoire SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> utilise votre <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Des applications utilisent votre <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" et "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"appareil photo"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"position"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"micro"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Capteurs désactivés"</string>
     <string name="device_services" msgid="1549944177856658705">"Services pour l\'appareil"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sans titre"</string>
@@ -1032,6 +1045,7 @@
     <string name="controls_providers_title" msgid="6879775889857085056">"Sélectionnez l\'appli pour laquelle ajouter des commandes"</string>
     <plurals name="controls_number_of_favorites" formatted="false" msgid="1057347832073807380">
       <item quantity="one"><xliff:g id="NUMBER_1">%s</xliff:g> commande ajoutée.</item>
+      <item quantity="many"><xliff:g id="NUMBER_1">%s</xliff:g> controls added.</item>
       <item quantity="other"><xliff:g id="NUMBER_1">%s</xliff:g> commandes ajoutées.</item>
     </plurals>
     <string name="controls_removed" msgid="3731789252222856959">"Supprimé"</string>
@@ -1066,7 +1080,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Chargement des recommandations"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Multimédia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Masquer la session en cours."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Masquer"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Fermer"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Reprendre"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Paramètres"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Délai expiré, vérifier l\'appli"</string>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 2c47120..480da30 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Retomar"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancelar"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Compartir"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Eliminar"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Cancelouse a gravación de pantalla"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Gardouse a gravación de pantalla; toca esta notificación para visualizala"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Eliminouse a gravación de pantalla"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Produciuse un erro ao eliminar a gravación de pantalla"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Produciuse un erro ao obter os permisos"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Produciuse un erro ao iniciar a gravación da pantalla"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50 % arriba"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30 % arriba"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pantalla completa abaixo"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posición <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toca dúas veces o elemento para editalo."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toca dúas veces o elemento para engadilo"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Elimina <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Engadir \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" á posición <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" á posición <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"quitar tarxeta"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"engadir tarxeta ao final"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mover tarxeta"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Engadir tarxeta"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Mover a <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Engadir á posición <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posición <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de configuración rápida."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificación de <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Pode que a aplicación non funcione coa pantalla dividida."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Ir ao anterior"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Cambiar tamaño"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"O teléfono apagouse pola calor"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"O teu teléfono funciona agora con normalidade"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"O teléfono funciona con normalidade.\nToca para obter máis información"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"O teléfono estaba moi quente, apagouse para que arrefríe e agora funciona con normalidade.\n\nÉ posible que estea moi quente se:\n	• Usas aplicacións que requiren moitos recursos (como aplicacións de navegación, vídeos e xogos)\n	• Descargas/cargas ficheiros grandes\n	• Usas o teléfono a alta temperatura"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Ver pasos de mantemento"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"O teléfono está quentando"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"O uso dalgunhas funcións é limitado mentres o teléfono arrefría"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"O uso dalgunhas funcións é limitado mentres o teléfono arrefría.\nToca para obter máis información"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"O teléfono tentará arrefriar automaticamente. Podes utilizalo, pero é probable que funcione máis lento.\n\nUnha vez que arrefríe, funcionará con normalidade."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Ver pasos de mantemento"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Desconecta o cargador"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Produciuse un problema ao cargar este dispositivo. Desconecta o adaptador de corrente e ten coidado porque o cable pode estar quente."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Ver pasos de mantemento"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Configuración"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"De acordo"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Baleirado mem. SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> está utilizando <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Hai aplicacións que están utilizando <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" e "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"a cámara"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"a localiz."</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"o micrófono"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Desactivar sensores"</string>
     <string name="device_services" msgid="1549944177856658705">"Servizos do dispositivo"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sen título"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Cargando recomendacións"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Contido multimedia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Oculta a sesión actual."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ocultar"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Ignorar"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Retomar"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Configuración"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactivo. Comproba a app"</string>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index d793c72..664ad24 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ફરી શરૂ કરો"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"રદ કરો"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"શેર કરો"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ડિલીટ કરો"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"સ્ક્રીન રેકોર્ડિંગ રદ કર્યું"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"સ્ક્રીન રેકોર્ડિંગ સાચવ્યું, જોવા માટે ટૅપ કરો"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"સ્ક્રીન રેકોર્ડિંગ ડિલીટ કર્યું"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"સ્ક્રીન રેકોર્ડિંગ ડિલીટ કરવામાં ભૂલ આવી"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"પરવાનગીઓ મેળવવામાં નિષ્ફળ રહ્યાં"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"સ્ક્રીનને રેકૉર્ડ કરવાનું શરૂ કરવામાં ભૂલ"</string>
@@ -332,10 +330,10 @@
     <string name="notification_summary_message_format" msgid="5158219088501909966">"<xliff:g id="CONTACT_NAME">%1$s</xliff:g>: <xliff:g id="MESSAGE_CONTENT">%2$s</xliff:g>"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="6818779631806163080">"સૂચનાઓની સેટિંગ્સ"</string>
     <string name="status_bar_notification_app_settings_title" msgid="5050006438806013903">"<xliff:g id="APP_NAME">%s</xliff:g> સેટિંગ"</string>
-    <string name="accessibility_rotation_lock_off" msgid="3880436123632448930">"સ્ક્રીન આપમેળે ફરશે."</string>
+    <string name="accessibility_rotation_lock_off" msgid="3880436123632448930">"સ્ક્રીન ઑટોમૅટિક રીતે ફરશે."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="936972553861524360">"સ્ક્રીન લેન્ડસ્કેપ ઓરિએન્ટેશનમાં લૉક કરેલ છે."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="2356633398683813837">"સ્ક્રીન પોટ્રેટ ઓરિએન્ટેશનમાં લૉક કરેલ છે."</string>
-    <string name="accessibility_rotation_lock_off_changed" msgid="5772498370935088261">"સ્ક્રીન હવે આપમેળે ફરશે."</string>
+    <string name="accessibility_rotation_lock_off_changed" msgid="5772498370935088261">"સ્ક્રીન હવે ઑટોમૅટિક રીતે ફરશે."</string>
     <string name="accessibility_rotation_lock_on_landscape_changed" msgid="5785739044300729592">"સ્ક્રીન હવે લેન્ડસ્કેપ ઓરિએન્ટેશનમાં લૉક કરેલ છે."</string>
     <string name="accessibility_rotation_lock_on_portrait_changed" msgid="5580170829728987989">"સ્ક્રીન હવે પોટ્રેટ ઓરિએન્ટેશનમાં લૉક કરેલ છે."</string>
     <string name="dessert_case" msgid="9104973640704357717">"ડેઝર્ટ કેસ"</string>
@@ -555,7 +553,7 @@
     <string name="monitoring_description_two_named_vpns" msgid="3516830755681229463">"તમે <xliff:g id="VPN_APP_0">%1$s</xliff:g> અને <xliff:g id="VPN_APP_1">%2$s</xliff:g> સાથે કનેક્ટ થયાં છો, જે ઇમેઇલ, ઍપ્લિકેશનો અને વેબસાઇટ સહિત તમારી નેટવર્ક પ્રવૃત્તિનું નિરીક્ષણ કરી શકે છે."</string>
     <string name="monitoring_description_managed_profile_named_vpn" msgid="368812367182387320">"તમારી કાર્યાલયની પ્રોફાઇલ <xliff:g id="VPN_APP">%1$s</xliff:g> સાથે કનેક્ટ કરેલ છે, જે ઇમેઇલ, ઍપ્લિકેશનો અને વેબસાઇટો સહિતની તમારી નેટવર્ક પ્રવૃત્તિનું નિયમન કરી શકે છે."</string>
     <string name="monitoring_description_personal_profile_named_vpn" msgid="8179722332380953673">"તમારી વ્યક્તિગત પ્રોફાઇલ <xliff:g id="VPN_APP">%1$s</xliff:g> સાથે કનેક્ટ કરેલ છે, જે ઇમેઇલ, ઍપ્લિકેશનો અને વેબસાઇટો સહિતની તમારી નેટવર્ક પ્રવૃત્તિનું નિયમન કરી શકે છે."</string>
-    <string name="monitoring_description_do_header_generic" msgid="6130190408164834986">"તમારું ઉપકરણ <xliff:g id="DEVICE_OWNER_APP">%1$s</xliff:g> દ્વારા સંચાલિત થાય છે."</string>
+    <string name="monitoring_description_do_header_generic" msgid="6130190408164834986">"તમારું ડિવાઇસ <xliff:g id="DEVICE_OWNER_APP">%1$s</xliff:g> દ્વારા મેનેજ થાય છે."</string>
     <string name="monitoring_description_do_header_with_name" msgid="2696255132542779511">"<xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g>, તમારા ઉપકરણનું સંચાલન કરવા માટે <xliff:g id="DEVICE_OWNER_APP">%2$s</xliff:g> નો ઉપયોગ કરે છે."</string>
     <string name="monitoring_description_do_body" msgid="7700878065625769970">"વ્યવસ્થાપક સેટિંગ્સ, કૉર્પોરેટ ઍક્સેસ, ઍપ્સ, તમારા ઉપકરણ સંબંદ્ધ ડેટા અને ઉપકરણની સ્થાન માહિતીનું નિરીક્ષણ અને સંચાલન કરી શકે છે."</string>
     <string name="monitoring_description_do_learn_more_separator" msgid="1467280496376492558">" "</string>
@@ -572,8 +570,8 @@
     <string name="monitoring_description_app" msgid="376868879287922929">"તમે <xliff:g id="APPLICATION">%1$s</xliff:g> સાથે કનેક્ટ થયા છો, જે ઇમેઇલ, ઍપ્લિકેશનો અને વેબસાઇટો સહિતની તમારી નેટવર્ક પ્રવૃત્તિનું નિયમન કરી શકે છે."</string>
     <string name="monitoring_description_app_personal" msgid="1970094872688265987">"તમે <xliff:g id="APPLICATION">%1$s</xliff:g> સાથે કનેક્ટ થયાં છો, જે ઇમેઇલ્સ, ઍપ્લિકેશનો અને વેબસાઇટ્સ સહિતની તમારી વ્યક્તિગત નેટવર્ક પ્રવૃત્તિને મૉનિટર કરી શકે છે."</string>
     <string name="branded_monitoring_description_app_personal" msgid="1703511985892688885">"તમે <xliff:g id="APPLICATION">%1$s</xliff:g> સાથે કનેક્ટ થયાં છો, જે ઇમેઇલ્સ, ઍપ્લિકેશનો અને વેબસાઇટ્સ સહિત તમારી વ્યક્તિગત નેટવર્ક પ્રવૃત્તિને મૉનિટર કરી શકે છે."</string>
-    <string name="monitoring_description_app_work" msgid="3713084153786663662">"તમારી કાર્યાલયની પ્રોફાઇલ <xliff:g id="ORGANIZATION">%1$s</xliff:g> દ્વારા સંચાલિત થાય છે. આ પ્રોફાઇલ <xliff:g id="APPLICATION">%2$s</xliff:g> સાથે કનેક્ટ થયેલ છે, જે ઇમેઇલ, ઍપ્લિકેશનો અને વેબસાઇટો સહિત તમારા કાર્યાલયના નેટવર્કની પ્રવૃત્તિનું નિયમન કરી શકે છે.\n\nવધુ માહિતી માટે, તમારા વ્યવસ્થાપકનો સંપર્ક કરો."</string>
-    <string name="monitoring_description_app_personal_work" msgid="6175816356939166101">"તમારી કાર્યાલયની પ્રોફાઇલ <xliff:g id="ORGANIZATION">%1$s</xliff:g> દ્વારા સંચાલિત થાય છે. આ પ્રોફાઇલ <xliff:g id="APPLICATION_WORK">%2$s</xliff:g> સાથે કનેક્ટ કરેલ છે, જે ઇમેઇલ, ઍપ્લિકેશનો અને વેબસાઇટો સહિતની તમારી નેટવર્ક પ્રવૃત્તિનું નિયમન કરી શકે છે.\n\nતમે <xliff:g id="APPLICATION_PERSONAL">%3$s</xliff:g> સાથે પણ કનેક્ટ કરેલું છે, જે તમારી વ્યક્તિગત નેટવર્ક પ્રવૃત્તિનું નિયમન કરી શકે છે."</string>
+    <string name="monitoring_description_app_work" msgid="3713084153786663662">"તમારી કાર્યાલયની પ્રોફાઇલ <xliff:g id="ORGANIZATION">%1$s</xliff:g> દ્વારા મેનેજ થાય છે. આ પ્રોફાઇલ <xliff:g id="APPLICATION">%2$s</xliff:g> સાથે કનેક્ટ થયેલ છે, જે ઇમેઇલ, ઍપ અને વેબસાઇટ સહિત તમારા કાર્યાલયના નેટવર્કની પ્રવૃત્તિનું નિયમન કરી શકે છે.\n\nવધુ માહિતી માટે, તમારા વ્યવસ્થાપકનો સંપર્ક કરો."</string>
+    <string name="monitoring_description_app_personal_work" msgid="6175816356939166101">"તમારી કાર્યાલયની પ્રોફાઇલ <xliff:g id="ORGANIZATION">%1$s</xliff:g> દ્વારા મેનેજ થાય છે. આ પ્રોફાઇલ <xliff:g id="APPLICATION_WORK">%2$s</xliff:g> સાથે કનેક્ટ કરેલ છે, જે ઇમેઇલ, ઍપ અને વેબસાઇટ સહિતની તમારી નેટવર્ક પ્રવૃત્તિનું નિયમન કરી શકે છે.\n\nતમે <xliff:g id="APPLICATION_PERSONAL">%3$s</xliff:g> સાથે પણ કનેક્ટ કરેલું છે, જે તમારી વ્યક્તિગત નેટવર્ક પ્રવૃત્તિનું નિયમન કરી શકે છે."</string>
     <string name="keyguard_indication_trust_unlocked" msgid="7395154975733744547">"TrustAgent દ્વારા અનલૉક રાખેલું"</string>
     <string name="keyguard_indication_trust_disabled" msgid="6820793704816727918">"તમે ઉપકરણને મેન્યુઅલી અનલૉક કરશો નહીં ત્યાં સુધી તે લૉક રહેશે"</string>
     <string name="keyguard_indication_trust_unlocked_plugged_in" msgid="2323452175329362855">"<xliff:g id="KEYGUARD_INDICATION">%1$s</xliff:g>\n<xliff:g id="POWER_INDICATION">%2$s</xliff:g>"</string>
@@ -586,7 +584,7 @@
     <string name="accessibility_volume_settings" msgid="1458961116951564784">"સાઉન્ડ સેટિંગ"</string>
     <string name="accessibility_volume_expand" msgid="7653070939304433603">"વિસ્તૃત કરો"</string>
     <string name="accessibility_volume_collapse" msgid="2746845391013829996">"સંકુચિત કરો"</string>
-    <string name="volume_odi_captions_tip" msgid="8825655463280990941">"મીડિયામાં કૅપ્શન આપમેળે ઉમેરો"</string>
+    <string name="volume_odi_captions_tip" msgid="8825655463280990941">"મીડિયામાં કૅપ્શન ઑટોમૅટિક રીતે ઉમેરો"</string>
     <string name="accessibility_volume_close_odi_captions_tip" msgid="8924753283621160480">"કૅપ્શન ટિપ બંધ કરો"</string>
     <string name="volume_odi_captions_content_description" msgid="4172765742046013630">"કૅપ્શન ઓવરલે"</string>
     <string name="volume_odi_captions_hint_enable" msgid="2073091194012843195">"ચાલુ કરો"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"શીર્ષ 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"શીર્ષ 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"તળિયાની પૂર્ણ સ્ક્રીન"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"સ્થિતિ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. સંપાદિત કરવા માટે બે વાર ટૅપ કરો."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. ઉમેરવા માટે બે વાર ટૅપ કરો."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ખસેડો"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> દૂર કરો"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="POSITION">%2$d</xliff:g> જગ્યા પર <xliff:g id="TILE_NAME">%1$s</xliff:g>ને ઉમેરો"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g> જગ્યા પર <xliff:g id="TILE_NAME">%1$s</xliff:g>ને ખસેડો"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ઝડપી સેટિંગ્સ સંપાદક."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> નોટિફિકેશન: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"વિભાજિત-સ્ક્રીન સાથે ઍપ્લિકેશન કદાચ કામ ન કરે."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"પહેલાંના પર જાઓ"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"કદ બદલો"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ફોન વધુ પડતી ગરમીને લીધે બંધ થઇ ગયો છે"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"તમારો ફોન હવે સામાન્યપણે કાર્ય કરી રહ્યો છે"</string>
-    <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"તમારો ફોન અત્યંત ગરમ હતો, તેથી તે ઠંડો થવા આપમેળે બંધ થઇ ગયો છે. તમારો ફોન હવે સામાન્યપણે કાર્ય કરી રહ્યો છે.\n\nતમારો ફોન અત્યંત ગરમ થઇ શકે છે, જો તમે:\n • એવી ઍપ્લિકેશન વાપરતા હો જે સંસાધન સઘન રીતે વાપરતી હોય (જેમ કે ગેમિંગ, વીડિઓ, અથવા નેવિગેટ કરતી ઍપ્લિકેશનો)\n • મોટી ફાઇલો અપલોડ અથવા ડાઉનલોડ કરતા હો\n • તમારા ફોનનો ઉપયોગ ઉચ્ચ તાપમાનમાં કરતા હો"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"તમારો ફોન હવે સામાન્યપણે કાર્ય કરી રહ્યો છે.\nવધુ માહિતી માટે ટૅપ કરો"</string>
+    <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"તમારો ફોન અત્યંત ગરમ હતો, તેથી તે ઠંડો થવા ઑટોમૅટિક રીતે બંધ થઈ ગયો છે. તમારો ફોન હવે સામાન્યપણે કાર્ય કરી રહ્યો છે.\n\nતમારો ફોન અત્યંત ગરમ થઈ શકે છે, જો તમે:\n • એવી ઍપ વાપરતા હો જે સંસાધન સઘન રીતે વાપરતી હોય (જેમ કે ગેમિંગ, વીડિયો, અથવા નેવિગેટ કરતી ઍપ)\n • મોટી ફાઇલો અપલોડ અથવા ડાઉનલોડ કરતા હો\n • તમારા ફોનનો ઉપયોગ ઉચ્ચ તાપમાનમાં કરતા હો"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"સારસંભાળના પગલાં જુઓ"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ફોન ગરમ થઈ રહ્યો છે"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ફોન ઠંડો થાય ત્યાં સુધી કેટલીક સુવિધાઓ મર્યાદિત હોય છે"</string>
-    <string name="high_temp_dialog_message" msgid="3793606072661253968">"તમારો ફોન આપમેળે ઠંડો થવાનો પ્રયાસ કરશે. તમે હજી પણ તમારા ફોનનો ઉપયોગ કરી શકો છો, પરંતુ તે કદાચ થોડો ધીમો ચાલે.\n\nતમારો ફોન ઠંડો થઈ જવા પર, તે સામાન્ય રીતે ચાલશે."</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ફોન ઠંડો થાય ત્યાં સુધી અમુક સુવિધાઓ મર્યાદિત હોય છે.\nવધુ માહિતી માટે ટૅપ કરો"</string>
+    <string name="high_temp_dialog_message" msgid="3793606072661253968">"તમારો ફોન ઑટોમૅટિક રીતે ઠંડો થવાનો પ્રયાસ કરશે. તમે હજી પણ તમારા ફોનનો ઉપયોગ કરી શકો છો, પરંતુ તે કદાચ થોડો ધીમો ચાલે.\n\nતમારો ફોન ઠંડો થઈ જવા પર, તે સામાન્ય રીતે ચાલશે."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"સારસંભાળના પગલાં જુઓ"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ચાર્જરને અનપ્લગ કરો"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"આ ડિવાઇસને ચાર્જ કરવામાં કોઈ સમસ્યા છે. પાવર અડૅપ્ટર અનપ્લગ કરો અને કાળજી લેજો કદાચ કેબલ થોડો ગરમ થયો હોઈ શકે છે."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"સારસંભાળના પગલાં જુઓ"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"સામાન્ય સંદેશા"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"સ્ટોરેજ"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"હિન્ટ"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"ઝટપટ ઍપ્લિકેશન"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> ચાલી રહી છે"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"ઍપ ઇન્સ્ટૉલ કર્યા વિના ખુલી જાય છે."</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"ઍપ ઇન્સ્ટૉલ કર્યા વિના ખુલી જાય છે. વધુ જાણવા માટે ટૅપ કરો."</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"સેટિંગ"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"સમજાઈ ગયું"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> ઍપ તમારા <xliff:g id="TYPES_LIST">%2$s</xliff:g>નો ઉપયોગ કરી રહી છે."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ઍપ્લિકેશન તમારા <xliff:g id="TYPES_LIST">%s</xliff:g>નો ઉપયોગ કરી રહી છે."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" અને "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"કૅમેરા"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"સ્થાન"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"માઇક્રોફોન"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"સેન્સર બંધ છે"</string>
     <string name="device_services" msgid="1549944177856658705">"ડિવાઇસ સેવાઓ"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"કોઈ શીર્ષક નથી"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"સુઝાવ લોડ કરી રહ્યાં છીએ"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"મીડિયા"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"હાલનું સત્ર છુપાવો."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"છુપાવો"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"છોડી દો"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"ફરી શરૂ કરો"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"સેટિંગ"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"નિષ્ક્રિય, ઍપને ચેક કરો"</string>
diff --git a/packages/SystemUI/res/values-h740dp-port/dimens.xml b/packages/SystemUI/res/values-h740dp-port/dimens.xml
new file mode 100644
index 0000000..966066f
--- /dev/null
+++ b/packages/SystemUI/res/values-h740dp-port/dimens.xml
@@ -0,0 +1,27 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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>
+    <dimen name="qs_tile_height">106dp</dimen>
+    <dimen name="qs_tile_margin_vertical">24dp</dimen>
+
+    <!-- The height of the qs customize header. Should be
+         (qs_panel_padding_top (48dp) +  brightness_mirror_height (48dp) + qs_tile_margin_top (18dp)) -
+         (Toolbar_minWidth (56dp) + qs_tile_margin_top_bottom (12dp))
+    -->
+    <dimen name="qs_customize_header_min_height">46dp</dimen>
+    <dimen name="qs_tile_margin_top">18dp</dimen>
+</resources>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index b489088..be3d805 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"फिर से शुरू करें"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"रद्द करें"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"शेयर करें"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"मिटाएं"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"स्क्रीन रिकॉर्डिंग रद्द कर दी गई"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"स्क्रीन रिकॉर्डिंग सेव की गई, देखने के लिए टैप करें"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"स्क्रीन रिकॉर्डिंग मिटा दी गई"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"स्क्रीन रिकॉर्डिंग मिटाने में गड़बड़ी हुई"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"मंज़ूरी नहीं मिल सकी"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"स्क्रीन को रिकॉर्ड करने में गड़बड़ी आ रही है"</string>
@@ -886,12 +884,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ऊपर की स्क्रीन को 50% बनाएं"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ऊपर की स्क्रीन को 30% बनाएं"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"नीचे की स्क्रीन को फ़ुल स्क्रीन बनाएं"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"स्थिति <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. में बदलाव करने के लिए दो बार छूएं."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. जोड़ने के लिए दो बार छूएं."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> को ले जाएं"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> निकालें"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> काे क्रम संख्या <xliff:g id="POSITION">%2$d</xliff:g> पर जाेड़ें"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> काे क्रम संख्या <xliff:g id="POSITION">%2$d</xliff:g> पर ले जाएं"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"त्वरित सेटिंग संपादक."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> सूचना: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"हो सकता है कि ऐप्लिकेशन विभाजित स्क्रीन के साथ काम ना करे."</string>
@@ -924,11 +923,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"पिछले पर जाएं"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"आकार बदलें"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"गर्म होने की वजह से फ़ोन बंद हुआ"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"आपका फ़ोन अब सामान्य रूप से चल रहा है"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"आपका फ़ोन सामान्य रूप से काम कर रहा है.\nज़्यादा जानकारी के लिए टैप करें"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"फ़ोन बहुत गर्म हो गया था, इसलिए ठंडा होने के लिए बंद हो गया. फ़ोन अब अच्छे से चल रहा है.\n\nफ़ोन तब बहुत गर्म हो सकता है जब आप:\n	• ज़्यादा रिसॉर्स का इस्तेमाल करने वाले ऐप्लिकेशन चलाते हैं (जैसे गेमिंग, वीडियो या नेविगेशन ऐप्लिकेशन)\n	• बड़ी फ़ाइलें डाउनलोड या अपलोड करते हैं\n	• ज़्यादा तापमान में फ़ोन का इस्तेमाल करते हैं"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"डिवाइस के रखरखाव के तरीके देखें"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"फ़ोन गर्म हो रहा है"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"फ़ोन के ठंडा होने के दौरान कुछ सुविधाएं सीमित होती हैं"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"फ़ोन के ठंडा होने तक कुछ सुविधाएं काम नहीं करतीं.\nज़्यादा जानकारी के लिए टैप करें"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"आपका फ़ोन अपने आप ठंडा होने की कोशिश करेगा. आप अब भी अपने फ़ोन का उपयोग कर सकते हैं, लेकिन हो सकता है कि यह धीमी गति से चले.\n\nठंडा हो जाने पर आपका फ़ोन सामान्य रूप से चलेगा."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"डिवाइस के रखरखाव के तरीके देखें"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"चार्जर निकालें"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"इस डिवाइस को चार्ज करने में समस्या हुई. पावर अडैप्टर का प्लग निकालें. ऐसा करते समय सावधानी बरतें क्योंकि तार गर्म हो सकता है."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"प्रबंधन से जुड़े चरण देखें"</string>
@@ -952,7 +953,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"सामान्य संदेश"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"जगह"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"संकेत"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"झटपट ऐप्लिकेशन"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> चल रहा है"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"ऐप्लिकेशन इंस्टॉल किए बिना ही खुल गया है."</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"ऐप्लिकेशन इंस्टॉल किए बिना ही खुल गया है. ज़्यादा जानने के लिए टैप करें."</string>
@@ -990,6 +991,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"सेटिंग"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"ठीक है"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> आपकी <xliff:g id="TYPES_LIST">%2$s</xliff:g> का इस्तेमाल कर रहा है."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ऐप्लिकेशन आपकी <xliff:g id="TYPES_LIST">%s</xliff:g> का इस्तेमाल कर रहे हैं."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" और "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"कैमरा"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"जगह"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"माइक्रोफ़ोन"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"सेंसर बंद हैं"</string>
     <string name="device_services" msgid="1549944177856658705">"डिवाइस सेवाएं"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"कोई शीर्षक नहीं"</string>
@@ -1068,7 +1076,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"सुझाव लोड हो रहे हैं"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"मीडिया"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"इस मीडिया सेशन को छिपाएं."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"छिपाएं"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"खारिज करें"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"फिर से शुरू करें"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"सेटिंग"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"काम नहीं कर रहा, ऐप जांचें"</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 492b558..0b7a6dd 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Nastavi"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Odustani"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Dijeli"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Izbriši"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Snimanje zaslona otkazano"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Snimanje zaslona spremljeno je, dodirnite da biste ga pregledali"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Snimanje zaslona izbrisano"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Pogreška prilikom brisanja snimanja zaslona"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Dohvaćanje dopuštenja nije uspjelo"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Pogreška prilikom pokretanja snimanja zaslona"</string>
@@ -889,12 +887,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Gornji zaslon na 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Gornji zaslon na 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Donji zaslon u cijeli zaslon"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Položaj <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dodirnite dvaput da biste uredili."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dodirnite dvaput da biste dodali."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Premjesti <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Ukloni <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Dodajte pločicu <xliff:g id="TILE_NAME">%1$s</xliff:g> na položaj <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Premjestite pločicu <xliff:g id="TILE_NAME">%1$s</xliff:g> na položaj <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"uklanjanje kartice"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"dodavanje kartice na kraj"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Premještanje kartice"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Dodavanje kartice"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Premještanje u prostoriju <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Dodavanje na položaj <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Položaj <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Uređivač brzih postavki."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> obavijest: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacija možda neće funkcionirati s podijeljenim zaslonom."</string>
@@ -927,11 +926,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Preskoči na prethodno"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Promjena veličine"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefon se isključio zbog vrućine"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefon sada radi normalno"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefon sad radi normalno.\nDodirnite za više informacija"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon se pregrijao, stoga se isključio kako bi se ohladio Telefon sada radi normalno.\n\nTelefon se može pregrijati ako:\n	• upotrebljavate zahtjevne aplikacije (kao što su igre, aplikacije za videozapise ili navigaciju)\n	• preuzimate ili prenosite velike datoteke\n	• upotrebljavate telefon na visokim temperaturama."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Pročitajte upute za održavanje"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon se zagrijava"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Neke su značajke ograničene dok se telefon hladi"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Neke su značajke ograničene dok se telefon ne ohladi.\nDodirnite za više informacija"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefon će se automatski pokušati ohladiti. Možete ga nastaviti koristiti, no mogao bi raditi sporije.\n\nKad se ohladi, radit će normalno."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Pročitajte upute za održavanje"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Iskopčajte punjač"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Pojavio se problem s punjenjem uređaja. Iskopčajte pretvarač napona i pazite jer se kabel može zagrijati."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Pogledajte upute za održavanje"</string>
@@ -993,6 +994,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Postavke"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Shvaćam"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Izdvoji mem. SysUI-a"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Aplikacija <xliff:g id="APP">%1$s</xliff:g> upotrebljava <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikacije upotrebljavaju <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" i "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"fotoaparat"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"lokaciju"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Senzori su isključeni"</string>
     <string name="device_services" msgid="1549944177856658705">"Usluge uređaja"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Bez naslova"</string>
@@ -1072,7 +1080,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Učitavanje preporuka"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Mediji"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Sakrij trenutačnu sesiju."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Sakrij"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Odbaci"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Nastavi"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Postavke"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Neaktivno, provjerite aplik."</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 7fb95ac..7930178 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Folytatás"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Mégse"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Megosztás"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Törlés"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"A képernyő rögzítése megszakítva"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Képernyőfelvétel mentve, koppintson a megtekintéshez"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"A képernyőről készült felvétel törölve"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Hiba történt a képernyőről készült felvétel törlésekor"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Nincs engedély"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Hiba a képernyőrögzítés indításakor"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Felső 50%-ra"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Felső 30%-ra"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Alsó teljes képernyőre"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. pozíció: <xliff:g id="TILE_NAME">%2$s</xliff:g>. Koppintson duplán a szerkesztéshez."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Koppintson duplán a hozzáadáshoz."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"A(z) <xliff:g id="TILE_NAME">%1$s</xliff:g> áthelyezése"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"A(z) <xliff:g id="TILE_NAME">%1$s</xliff:g> eltávolítása"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> hozzáadása a következő pozícióhoz: <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> áthelyezése a következő pozícióba: <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"mozaik eltávolításához"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"mozaiknak a végéhez való hozzáadásához"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mozaik áthelyezése"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Mozaik hozzáadása"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Áthelyezés ide: <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Hozzáadás a következő pozícióhoz: <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>. hely"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Gyorsbeállítások szerkesztője"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-értesítések: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Lehet, hogy az alkalmazás nem működik osztott képernyős nézetben."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Ugrás az előzőre"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Átméretezés"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"A meleg miatt kikapcsolt"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"A telefon most már megfelelően működik"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefonja most már megfelelően működik.\nKoppintson, ha további információra van szüksége."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefonja túlmelegedett, így kikapcsolt, hogy lehűlhessen. Most már megfelelően működik.\n\nA telefon akkor melegedhet túl, ha Ön:\n	• Energiaigényes alkalmazásokat használ (például játékokat, videókat vagy navigációs alkalmazásokat)\n	• Nagy fájlokat tölt le vagy fel\n	• Melegben használja a telefonját"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Olvassa el a kímélő használat lépéseit"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"A telefon melegszik"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Bizonyos funkciók korlátozottan működnek a telefon hűlése közben"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Bizonyos funkciók korlátozottan működnek a telefon lehűlése közben.\nKoppintson, ha további információra van szüksége."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"A telefon automatikusan megpróbál lehűlni. Továbbra is tudja használni a telefont, de elképzelhető, hogy működése lelassul.\n\nAmint a telefon lehűl, újra a szokásos módon működik majd."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Olvassa el a kímélő használat lépéseit"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Húzza ki a töltőt"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Probléma adódott az eszköz töltése során. Húzza ki a hálózati adaptert. Vigyázzon, a kábel forró lehet."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Olvassa el a megfelelő használat lépéseit"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Beállítások"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Értem"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI-memória-kiírás"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"A(z) <xliff:g id="APP">%1$s</xliff:g> használja a következőket: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Több alkalmazás használja a következőket: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" és "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"helyadatok"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Érzékelők kikapcsolva"</string>
     <string name="device_services" msgid="1549944177856658705">"Eszközszolgáltatások"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Nincs cím"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Javaslatok betöltése…"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Média"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Jelenlegi munkamenet elrejtése."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Elrejtés"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Elvetés"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Folytatás"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Beállítások"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inaktív, ellenőrizze az appot"</string>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index 6591006..77c5141 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Վերսկսել"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Չեղարկել"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Կիսվել"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Ջնջել"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Էկրանի տեսագրումը չեղարկվեց"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Էկրանի տեսագրությունը պահվեց։ Հպեք՝ դիտելու համար:"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Էկրանի տեսագրությունը ջնջվեց"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Չհաջողվեց ջնջել տեսագրությունը"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Չհաջողվեց ստանալ անհրաժեշտ թույլտվությունները"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Չհաջողվեց սկսել տեսագրումը"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Վերևի էկրանը՝ 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Վերևի էկրանը՝ 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ներքևի էկրանը՝ լիաէկրան"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Դիրք <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>: Կրկնակի հպեք՝ փոխելու համար:"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>: Կրկնակի հպեք՝ ավելացնելու համար:"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Տեղափոխել <xliff:g id="TILE_NAME">%1$s</xliff:g> սալիկը"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Հեռացնել <xliff:g id="TILE_NAME">%1$s</xliff:g> սալիկը"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Ավելացնել <xliff:g id="TILE_NAME">%1$s</xliff:g> սալիկը դիրք <xliff:g id="POSITION">%2$d</xliff:g>-ում"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> սալիկը տեղափոխել դիրք <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Արագ կարգավորումների խմբագրիչ:"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ծանուցում՝ <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Հավելվածը չի կարող աշխատել տրոհված էկրանի ռեժիմում:"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Վերադառնալ նախորդին"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Փոխել չափը"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Հեռախոսն անջատվել էր տաքանալու պատճառով"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Հեռախոսն այժմ նորմալ աշխատում է"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Հեռախոսն այժմ նորմալ է աշխատում։\nՀպեք՝ ավելին իմանալու համար։"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Ձեր հեռախոսը չափազանց տաք էր, այդ պատճառով այն անջատվել է՝ հովանալու համար: Հեռախոսն այժմ նորմալ աշխատում է:\n\nՀեռախոսը կարող է տաքանալ, եթե՝\n	• Օգտագործում եք ռեսուրսատար հավելվածներ (օրինակ՝ խաղեր, տեսանյութեր կամ նավարկման հավելվածներ)\n	• Ներբեռնում կամ վերբեռնում եք ծանր ֆայլեր\n	• Օգտագործում եք ձեր հեռախոսը բարձր ջերմային պայմաններում"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Քայլեր գերտաքացման ահազանգի դեպքում"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Հեռախոսը տաքանում է"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Հովանալու ընթացքում հեռախոսի որոշ գործառույթներ սահմանափակ են"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Հովանալու ընթացքում հեռախոսի որոշ գործառույթներ սահմանափակ են։\nՀպեք՝ ավելին իմանալու համար։"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Ձեր հեռախոսն ավտոմատ կերպով կփորձի hովանալ: Կարող եք շարունակել օգտագործել հեռախոսը, սակայն հնարավոր է, որ այն ավելի դանդաղ աշխատի:\n\nՀովանալուց հետո հեռախոսը կաշխատի կանոնավոր կերպով:"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Քայլեր գերտաքացման ահազանգի դեպքում"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Անջատեք լիցքավորիչը հոսանքից"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Չհաջողվեց լիցքավորել սարքը: Անջատեք հոսանքի ադապտերը և ուշադիր եղեք՝ մալուխը կարող է տաքացած լինել:"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Քայլեր գերտաքացման ահազանգի դեպքում"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Կարգավորումներ"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Եղավ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> հավելվածն օգտագործում է ձեր <xliff:g id="TYPES_LIST">%2$s</xliff:g>:"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Հավելվածներն օգտագործում են ձեր <xliff:g id="TYPES_LIST">%s</xliff:g>:"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" և "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"տեսախցիկը"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"վայրը"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"խոսափողը"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Տվիչներն անջատած են"</string>
     <string name="device_services" msgid="1549944177856658705">"Սարքի ծառայություններ"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Անանուն"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Բեռնման խորհուրդներ"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Մեդիա"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Թաքցրեք ընթացիկ աշխատաշրջանը"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Թաքցնել"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Փակել"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Շարունակել"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Կարգավորումներ"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Ակտիվ չէ, ստուգեք հավելվածը"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index e4819bf..6216736 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Lanjutkan"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Batal"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Bagikan"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Hapus"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Rekaman layar dibatalkan"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Rekaman layar disimpan, ketuk untuk melihat"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Rekaman layar dihapus"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Error saat menghapus rekaman layar"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Gagal mendapatkan izin"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Terjadi error saat memulai perekaman layar"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Atas 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Atas 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Layar penuh di bawah"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posisi <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Ketuk dua kali untuk mengedit."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Ketuk dua kali untuk menambahkan."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Pindahkan <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Hapus <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Tambahkan <xliff:g id="TILE_NAME">%1$s</xliff:g> ke posisi <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Pindahkan <xliff:g id="TILE_NAME">%1$s</xliff:g> ke posisi <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"menghapus kartu"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"menambahkan kartu ke akhir"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Pindahkan kartu"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Tambahkan kartu"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Pindahkan ke <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Tambahkan ke posisi <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posisi <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor setelan cepat."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notifikasi <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikasi mungkin tidak berfungsi dengan layar terpisah."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Lewati ke sebelumnya"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Ubah ukuran"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Ponsel dimatikan karena panas"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Ponsel kini berfungsi normal"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Ponsel kini berfungsi normal.\nKetuk untuk info selengkapnya"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Ponsel menjadi terlalu panas, jadi dimatikan untuk mendinginkan. Ponsel kini berfungsi normal.\n\nPonsel dapat menjadi terlalu panas jika Anda:\n	• Menggunakan aplikasi yang menggunakan sumber daya secara intensif (seperti aplikasi game, video, atau navigasi)\n	• Mendownload atau mengupload file besar\n	• Menggunakan ponsel dalam suhu tinggi"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Lihat langkah-langkah perawatan"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Ponsel menjadi hangat"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Beberapa fitur dibatasi saat ponsel mendingin"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Beberapa fitur dibatasi saat ponsel mendingin.\nKetuk untuk info selengkapnya"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Ponsel akan otomatis mencoba mendingin. Anda tetap dapat menggunakan ponsel, tetapi mungkin berjalan lebih lambat.\n\nSetelah dingin, ponsel akan berjalan seperti biasa."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Lihat langkah-langkah perawatan"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Cabut pengisi daya"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Ada masalah saat mengisi daya perangkat ini. Cabut adaptor daya dan berhati-hatilah karena kabelnya mungkin panas."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Lihat langkah-langkah perawatan"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Setelan"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Oke"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Hapus Heap SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> menggunakan <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikasi menggunakan <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" dan "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"lokasi"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensor nonaktif"</string>
     <string name="device_services" msgid="1549944177856658705">"Layanan Perangkat"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Tanpa judul"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Memuat rekomendasi"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Menyembunyikan sesi saat ini."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Sembunyikan"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Tutup"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Lanjutkan"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Setelan"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Nonaktif, periksa aplikasi"</string>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index 507bdc9..4a0856c 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Halda áfram"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Hætta við"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Deila"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Eyða"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Hætt við skjáupptöku"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Skjáupptaka vistuð, ýttu til að skoða"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Skjáupptöku eytt"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Villa við að eyða skjáupptöku"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Ekki tókst að fá heimildir"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Villa við að hefja upptöku skjás"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Efri 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Efri 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Neðri á öllum skjánum"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Staða <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Ýttu tvisvar til að breyta."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Ýttu tvisvar til að bæta við."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Færa <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Fjarlægja <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Bæta <xliff:g id="TILE_NAME">%1$s</xliff:g> við í stöðu <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Færa <xliff:g id="TILE_NAME">%1$s</xliff:g> í stöðu <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"fjarlægja flís"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"bæta flís við aftast"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Færa flís"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Bæta flís við"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Færa í <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Bæta við í stöðu <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Staða <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Flýtistillingaritill."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> tilkynning: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Hugsanlega virkar forritið ekki ef skjánum er skipt upp."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Fara á fyrra"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Breyta stærð"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Slökkt var á símanum vegna hita"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Síminn virkar núna sem skyldi"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Síminn virkar nú eins og venjulega.\nÝttu til að fá frekari upplýsingar"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Síminn varð of heitur og því var slökkt á honum til að kæla hann. Síminn virkar núna sem skyldi.\n\nSíminn getur orðið of heitur ef þú:\n	• Notar plássfrek forrit (t.d. leikja-, myndbands- eða leiðsagnarforrit\n	• Sækir eða hleður upp stórum skrám\n	• Notar símann í miklum hita"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Sjá varúðarskref"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Síminn er að hitna"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Sumir eiginleikar eru takmarkaðir þegar síminn kælir sig"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Sumir eiginleikar eru takmarkaðir meðan síminn kælir sig.\nÝttu til að fá frekari upplýsingar"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Síminn reynir sjálfkrafa að kæla sig. Þú getur enn notað símann en hann gæti verið hægvirkari.\n\nEftir að síminn hefur kælt sig niður virkar hann eðlilega."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Sjá varúðarskref"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Taktu hleðslutækið úr sambandi"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Upp kom vandamál varðandi hleðslu tækisins. Taktu straumbreytinn úr sambandi og farðu varlega því snúran gæti verið heit."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Sjá varúðarskref"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Stillingar"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Ég skil"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Vista SysUI-gögn"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> er að nota <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Forrit eru að nota <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" og "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"myndavél"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"staðsetning"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"hljóðnemi"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Slökkt á skynjurum"</string>
     <string name="device_services" msgid="1549944177856658705">"Tækjaþjónusta"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Enginn titill"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Hleður tillögum"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Margmiðlunarefni"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Fela núverandi lotu."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Fela"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Hunsa"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Halda áfram"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Stillingar"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Óvirkt, athugaðu forrit"</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 5a735ae..e5e7638 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Riprendi"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Annulla"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Condividi"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"CANC"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Registrazione dello schermo annullata"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Registrazione dello schermo salvata. Tocca per visualizzarla."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Registrazione dello schermo eliminata"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Errore durante l\'eliminazione della registrazione dello schermo"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Impossibile ottenere le autorizzazioni"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Errore durante l\'avvio della registrazione dello schermo"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Schermata superiore al 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Schermata superiore al 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Schermata inferiore a schermo intero"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posizione <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Tocca due volte per modificare."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Tocca due volte per aggiungere."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Sposta <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Rimuovi <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Aggiungi il riquadro <xliff:g id="TILE_NAME">%1$s</xliff:g> alla posizione <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Sposta il riquadro <xliff:g id="TILE_NAME">%1$s</xliff:g> nella posizione <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"rimuovere il riquadro"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"aggiungere il riquadro alla fine"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Sposta riquadro"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Aggiungi riquadro"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Sposta nella posizione <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Aggiungi alla posizione <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posizione <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor di impostazioni rapide."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notifica di <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"L\'app potrebbe non funzionare con lo schermo diviso."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Passa ai contenuti precedenti"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Ridimensiona"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Il telefono si è spento perché surriscaldato"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Ora il telefono funziona normalmente"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Ora il telefono funziona normalmente.\nTocca per ulteriori informazioni"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Il telefono era surriscaldato e si è spento per raffreddarsi. Ora funziona normalmente.\n\nIl telefono può surriscaldarsi se:\n	• Utilizzi app che consumano molte risorse (ad esempio app di navigazione, giochi o video)\n	• Scarichi o carichi grandi file\n	• Lo utilizzi in presenza di alte temperature"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Leggi le misure da adottare"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Il telefono si sta scaldando"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Alcune funzioni limitate durante il raffreddamento del telefono"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Alcune funzionalità limitate durante il raffreddamento del telefono.\nTocca per ulteriori informazioni"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Il telefono cercherà automaticamente di raffreddarsi. Puoi comunque usarlo, ma potrebbe essere più lento.\n\nUna volta raffreddato, il telefono funzionerà normalmente."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Leggi le misure da adottare"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Scollega il caricabatterie"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Si è verificato un problema durante la ricarica del dispositivo. Scollega l\'alimentatore e presta attenzione perché il cavo potrebbe essere caldo."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Leggi le misure da adottare"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Impostazioni"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump heap SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"L\'app <xliff:g id="APP">%1$s</xliff:g> sta usando <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Le app stanno usando <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" e "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"Fotocamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"luogo"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"un microfono"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensori disattivati"</string>
     <string name="device_services" msgid="1549944177856658705">"Servizi del dispositivo"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Senza titolo"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Caricamento dei consigli"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Contenuti multimediali"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Nascondi la sessione attuale."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Nascondi"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Ignora"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Riprendi"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Impostazioni"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inattivo, controlla l\'app"</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 1b7e1e8..87233dc 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"המשך"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"ביטול"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"שיתוף"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"מחיקה"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"הקלטת המסך בוטלה"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"הקלטת המסך נשמרה, יש להקיש כדי להציג"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"הקלטת המסך נמחקה"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"שגיאה במחיקת הקלטת המסך"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"קבלת ההרשאות נכשלה"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"שגיאה בהפעלה של הקלטת המסך"</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"עליון 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"עליון 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"מסך תחתון מלא"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"מיקום <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. הקש פעמיים כדי לערוך."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. הקש פעמיים כדי להוסיף."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"הזזת <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"הסרת <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"הוספת <xliff:g id="TILE_NAME">%1$s</xliff:g> למיקום <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"העברת <xliff:g id="TILE_NAME">%1$s</xliff:g> למיקום <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"עורך הגדרות מהירות."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"התראות <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"ייתכן שהיישום לא יפעל עם מסך מפוצל."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"אפשר לדלג אל הקודם"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"שינוי גודל"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"הטלפון כבה עקב התחממות"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"הטלפון פועל כרגיל עכשיו"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"הטלפון פועל כרגיל עכשיו.\nיש להקיש כדי להציג מידע נוסף"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"הטלפון שלך התחמם יותר מדי וכבה כדי להתקרר. הטלפון פועל כרגיל עכשיו.\n\nייתכן שהטלפון יתחמם יותר מדי אם:\n	• תשתמש באפליקציות עתירות משאבים (כגון משחקים, אפליקציות וידאו או אפליקציות ניווט)\n	• תוריד או תעלה קבצים גדולים\n	• תשתמש בטלפון בטמפרטורות גבוהות"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"לצפייה בשלבי הטיפול"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"הטלפון מתחמם"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"חלק מהתכונות מוגבלות כל עוד הטלפון מתקרר"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"חלק מהתכונות מוגבלות כל עוד הטלפון מתקרר.\nיש להקיש כדי להציג מידע נוסף"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"קירור הטלפון ייעשה באופן אוטומטי. תוכל עדיין להשתמש בטלפון, אבל ייתכן שהוא יפעל לאט יותר.\n\nהטלפון יחזור לפעול כרגיל לאחר שיתקרר."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"לצפייה בשלבי הטיפול"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"יש לנתק את המטען"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"יש בעיה עם טעינת מכשיר זה. יש לנתק את מתאם המתח בזהירות כיוון שייתכן שהכבל חם."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"לצפייה בשלבי הטיפול"</string>
@@ -998,6 +999,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"הגדרות"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"הבנתי"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"‏ערימת Dump SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> משתמשת ב<xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"אפליקציות משתמשות ב<xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" וגם "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"מצלמה"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"מיקום"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"מיקרופון"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"החיישנים כבויים"</string>
     <string name="device_services" msgid="1549944177856658705">"שירותים למכשיר"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"ללא שם"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"בטעינת המלצות"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"מדיה"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"הסתרת הסשן הנוכחי."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"הסתרה"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"סגירה"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"המשך"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"הגדרות"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"לא פעיל, יש לבדוק את האפליקציה"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index ce1498b..2ad7ea7 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"再開"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"キャンセル"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"共有"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"削除"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"画面の録画をキャンセルしました"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"画面の録画を保存しました。タップで表示できます"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"画面の録画を削除しました"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"画面の録画の削除中にエラーが発生しました"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"権限を取得できませんでした"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"画面の録画中にエラーが発生しました"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"上 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"上 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"下部全画面"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ポジション <xliff:g id="POSITION">%1$d</xliff:g> の <xliff:g id="TILE_NAME">%2$s</xliff:g> を編集するにはダブルタップします。"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g> を追加するにはダブルタップします。"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> を移動します"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> を削除します"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> をポジション <xliff:g id="POSITION">%2$d</xliff:g> に追加"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> をポジション <xliff:g id="POSITION">%2$d</xliff:g> に移動"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"クイック設定エディタ"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> の通知: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"アプリは分割画面では動作しないことがあります。"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"前へスキップ"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"サイズ変更"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"高熱で電源が OFF になりました"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"お使いのスマートフォンは現在、正常に動作しています"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"お使いのスマートフォンは現在、正常に動作しています。\nタップして詳細を表示"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"スマートフォンが熱すぎたため電源が OFF になりました。現在は正常に動作しています。\n\nスマートフォンは以下の場合に熱くなる場合があります。\n	• リソースを集中的に使用する機能やアプリ(ゲームアプリ、動画アプリ、ナビアプリなど)を使用\n	• サイズの大きいファイルをダウンロードまたはアップロード\n	• 高温の場所で使用"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"取り扱いに関する手順をご覧ください"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"スマートフォンの温度が上昇中"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"スマートフォンのクールダウン中は一部の機能が制限されます"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"スマートフォンのクールダウン中は一部の機能が制限されます。\nタップして詳細を表示"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"スマートフォンは自動的にクールダウンを行います。その間もスマートフォンを使用できますが、動作が遅くなる可能性があります。\n\nクールダウンが完了すると、通常どおり動作します。"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"取り扱いに関する手順をご覧ください"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"充電器を電源から外してください"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"このデバイスの充電中に問題が発生しました。電源アダプターを電源から外してください。ケーブルが熱くなっている可能性がありますのでご注意ください。"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"取り扱いに関する手順をご覧ください"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"設定"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI ヒープのダンプ"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g>は<xliff:g id="TYPES_LIST">%2$s</xliff:g>を使用しています。"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"アプリは<xliff:g id="TYPES_LIST">%s</xliff:g>を使用しています。"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"、 "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" 、 "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"カメラ"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"現在地情報"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"マイク"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"センサー OFF"</string>
     <string name="device_services" msgid="1549944177856658705">"デバイス サービス"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"タイトルなし"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"候補を読み込んでいます"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"メディア"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"現在のセッションを非表示にします。"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"非表示"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"閉じる"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"再開"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"設定"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"無効: アプリをご確認ください"</string>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index bf86881..9ea9424 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"გაგრძელება"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"გაუქმება"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"გაზიარება"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"წაშლა"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"ეკრანის ჩაწერა გაუქმდა"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"ეკრანის ჩანაწერი შენახულია, შეეხეთ სანახავად"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"ეკრანის ჩანაწერი წაიშალა"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"ეკრანის ჩანაწერის წაშლისას წარმოიშვა შეცდომა"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"ნებართვების მიღება ვერ მოხერხდა"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"ეკრანის ჩაწერის დაწყებისას წარმოიქმნა შეცდომა"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ზედა ეკრანი — 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ზედა ეკრანი — 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ქვედა ნაწილის სრულ ეკრანზე გაშლა"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"პოზიცია <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. რედაქტირებისთვის, შეეხეთ ორმაგად."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. დასამატებლად, შეეხეთ ორმაგად."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-ის გადატანა"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-ის წაშლა"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-ის დამატება პოზიციაზე <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-ის გადატანა პოზიციაზე <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"სწრაფი პარამეტრების რედაქტორი."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> შეტყობინება: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"აპმა შეიძლება არ იმუშაოს გაყოფილი ეკრანის რეჟიმში."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"წინაზე გადასვლა"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"ზომის შეცვლა"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ტელეფონი გამოირთო გაცხელების გამო"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"თქვენი ტელეფონი ახლა ჩვეულებრივად მუშაობს"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"თქვენი ტელეფონი უკვე ნორმალურად მუშაობს.\nშეეხეთ დამატებითი ინფორმაციის მისაღებად"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"თქვენი ტელეფონი გამოირთო გასაგრილებლად, რადგან ის მეტისმეტად გაცხელდა. ახლა ის ჩვეულებრივად მუშაობს.\n\nტელეფონის გაცხელების მიზეზებია:\n	• რესურსტევადი აპების გამოყენება (მაგ. სათამაშო, ვიდეო ან ნავიგაციის აპების)\n	• დიდი ფაილების ჩამოტვირთვა ან ატვირთვა\n	• ტელეფონის გამოყენება მაღალი ტემპერატურისას"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"მისაღები ზომების გაცნობა"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ტელეფონი ცხელდება"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ზოგიერთი ფუნქცია შეზღუდული იქნება, სანამ ტელეფონი გაგრილდება"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ზოგიერთი ფუნქცია შეზღუდული იქნება, სანამ ტელეფონი გაგრილდება.\nშეეხეთ დამატებითი ინფორმაციის მისაღებად"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"თქვენი ტელეფონი გაგრილებას ავტომატურად შეეცდება. შეგიძლიათ გააგრძელოთ მისით სარგებლობა, თუმცა ტელეფონმა შეიძლება უფრო ნელა იმუშაოს.\n\nგაგრილების შემდგომ ის ჩვეულებრივად იმუშავებს."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"მისაღები ზომების გაცნობა"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"გამოაერთეთ დამტენი"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ამ მოწყობილობის დატენა ვერ ხერხდება პრობლემის გამო. გამოაერთეთ ელკვების ადაპტერი და გამოიჩინეთ სიფრთხილე, რადგან კაბელი შეიძლებოდა გაცხელებულიყო."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"მისაღები ზომების გაცნობა"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"პარამეტრები"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"გასაგებია"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI გროვის გამოტანა"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g>-ის მიერ გამოიყენება თქვენი <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"აპლიკაციების მიერ გამოიყენება თქვენი <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" და "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"კამერა"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"მდებარეობა"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"მიკროფონი"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"სენსორების გამორთვა"</string>
     <string name="device_services" msgid="1549944177856658705">"მოწყობილობის სერვისები"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"უსათაურო"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"მიმდინარეობს რეკომენდაციების ჩატვირთვა"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"მედია"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"დაიმალოს მიმდინარე სესია"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"დამალვა"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"დახურვა"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"გაგრძელება"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"პარამეტრები"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"არააქტიურია, გადაამოწმეთ აპი"</string>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index 2232f3f..47e38f9 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -33,8 +33,8 @@
     <string name="invalid_charger_title" msgid="938685362320735167">"USB арқылы зарядтау мүмкін емес"</string>
     <string name="invalid_charger_text" msgid="2339310107232691577">"Құрылғымен бірге берілген зарядтау құралын пайдаланыңыз"</string>
     <string name="battery_low_why" msgid="2056750982959359863">"Параметрлер"</string>
-    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"Battery Saver функциясын қосу керек пе?"</string>
-    <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"Battery Saver туралы ақпарат"</string>
+    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"Батареяны үнемдеу режимін қосу керек пе?"</string>
+    <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"Батареяны үнемдеу режимі туралы ақпарат"</string>
     <string name="battery_saver_confirmation_ok" msgid="5042136476802816494">"Қосу"</string>
     <string name="battery_saver_start_action" msgid="4553256017945469937">"Battery saver функциясын қосу"</string>
     <string name="status_bar_settings_settings_button" msgid="534331565185171556">"Параметрлер"</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Жалғастыру"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Бас тарту"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Бөлісу"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Жою"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Экранды бейнеге жазудан бас тартылды"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Экран бейне жазбасы сақталды, көру үшін түртіңіз"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Экран бейне жазбасы жойылды"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Экран бейне жазбасын жою кезінде қате кетті"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Рұқсаттар алынбады"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Экрандағы бейнені жазу кезінде қате шықты."</string>
@@ -499,7 +497,7 @@
     <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="battery_saver_notification_title" msgid="8419266546034372562">"Battery saver қосулы"</string>
+    <string name="battery_saver_notification_title" msgid="8419266546034372562">"Батареяны үнемдеу режимі қосулы"</string>
     <string name="battery_saver_notification_text" msgid="2617841636449016951">"Өнімділікті және фондық деректерді азайтады"</string>
     <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"Battery saver функциясын өшіру"</string>
     <string name="media_projection_dialog_text" msgid="1755705274910034772">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> жазу не трансляциялау кезінде экранда көрсетілетін немесе дыбысталатын барлық ақпаратты пайдалана алады. Бұған құпия сөздер, төлем туралы мәліметтер, суреттер, хабарлар және аудиоматериалдар кіреді."</string>
@@ -767,7 +765,7 @@
       <item quantity="one">%d минут</item>
     </plurals>
     <string name="battery_panel_title" msgid="5931157246673665963">"Батареяны пайдалану"</string>
-    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"Зарядтау кезінде Батарея үнемдегіш қол жетімді емес"</string>
+    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"Зарядтау кезінде Батареяны үнемдеу режимі істемейді"</string>
     <string name="battery_detail_switch_title" msgid="6940976502957380405">"Батареяны үнемдеу режимі"</string>
     <string name="battery_detail_switch_summary" msgid="3668748557848025990">"Өнімділікті және фондық деректерді азайтады"</string>
     <string name="keyboard_key_button_template" msgid="8005673627272051429">"<xliff:g id="NAME">%1$s</xliff:g> түймесі"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50% жоғарғы жақта"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30% жоғарғы жақта"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Төменгісін толық экранға шығару"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g> орны, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Өңдеу үшін екі рет түртіңіз."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Қосу үшін екі рет түртіңіз."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> жылжыту"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> жою"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> бөлшегін <xliff:g id="POSITION">%2$d</xliff:g>-позицияға енгізу"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> бөлшегін <xliff:g id="POSITION">%2$d</xliff:g>-позицияға жылжыту"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Жылдам параметрлер өңдегіші."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> хабарландыруы: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Қолданба бөлінген экранда жұмыс істемеуі мүмкін."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Алдыңғысына оралу"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Өлшемін өзгерту"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Телефон қызып кеткендіктен өшірілді"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Телефоныңыз қазір қалыпты жұмыс істеп тұр"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Телефоныңыз қалыпты жұмыс істеп тұр.\nТолығырақ ақпарат алу үшін түртіңіз."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Телефоныңыз қатты қызып кеткендіктен өшірілді. Телефоныңыз қазір қалыпты жұмыс істеп тұр.\n\nТелефоныңыз мына жағдайларда ыстық болуы мүмкін:\n	• Ресурстар талап ететін қолданбаларды пайдалану (ойын, бейне немесе навигация қолданбалары)\n	• Үлкен көлемді файлдарды жүктеу немесе жүктеп салу\n	• Телефонды жоғары температурада пайдалану"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Пайдалану нұсқаулығын қараңыз"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Телефон қызуда"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Телефон толық суығанға дейін, кейбір функциялардың жұмысы шектеледі"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Телефон толық суығанға дейін, кейбір функциялардың жұмысы шектеледі.\nТолығырақ ақпарат үшін түртіңіз."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Телефон автоматты түрде суи бастайды. Оны пайдалана бере аласыз, бірақ ол баяуырақ жұмыс істеуі мүмкін.\n\nТелефон суығаннан кейін, оның жұмысы қалпына келеді."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Пайдалану нұсқаулығын қараңыз"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Зарядтағышты ажыратыңыз"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Құрылғыны зарядтау кезінде ақау шықты. Қуат адаптерін ажыратыңыз. Кабель ыстық болуы мүмкін, абай болыңыз."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Пайдалану нұсқаулығын қараңыз"</string>
@@ -980,7 +981,7 @@
     <string name="slice_permission_checkbox" msgid="4242888137592298523">"<xliff:g id="APP">%1$s</xliff:g> қолданбасына кез келген қолданбаның үзіндісін көрсетуге рұқсат беру"</string>
     <string name="slice_permission_allow" msgid="6340449521277951123">"Рұқсат беру"</string>
     <string name="slice_permission_deny" msgid="6870256451658176895">"Тыйым салу"</string>
-    <string name="auto_saver_title" msgid="6873691178754086596">"Түймені түртіп, Battery Saver функциясын реттеңіз"</string>
+    <string name="auto_saver_title" msgid="6873691178754086596">"Түймені түртіп, Батареяны үнемдеу режимін реттеңіз"</string>
     <string name="auto_saver_text" msgid="3214960308353838764">"Батареяның заряды бітуге жақындағанда қосыңыз."</string>
     <string name="no_auto_saver_action" msgid="7467924389609773835">"Жоқ, рақмет"</string>
     <string name="auto_saver_enabled_title" msgid="4294726198280286333">"Battery Saver кестесі қосылды"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Параметрлер"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Түсінікті"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> қолданбасында <xliff:g id="TYPES_LIST">%2$s</xliff:g> пайдалануда."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Қолданбаларда <xliff:g id="TYPES_LIST">%s</xliff:g> пайдаланылуда."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" және "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камера"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"геодерек"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"микрофон"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Датчиктер өшірулі"</string>
     <string name="device_services" msgid="1549944177856658705">"Құрылғы қызметтері"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Атауы жоқ"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Жүктеуге қатысты ұсыныстар"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Мультимедиа"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ағымдағы сеансты жасыру"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Жасыру"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Жабу"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Жалғастыру"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Параметрлер"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Өшірулі. Қолданба тексеріңіз."</string>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index bdc3025..7ceeceb 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -28,15 +28,15 @@
     <string name="battery_low_percent_format" msgid="4276661262843170964">"នៅ​សល់ <xliff:g id="PERCENTAGE">%s</xliff:g>"</string>
     <string name="battery_low_percent_format_hybrid" msgid="3985614339605686167">"នៅសល់ <xliff:g id="PERCENTAGE">%1$s</xliff:g> អាច​ប្រើ​បាន​ប្រហែល <xliff:g id="TIME">%2$s</xliff:g> ទៀត​ផ្អែកលើ​ការប្រើប្រាស់​របស់អ្នក"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="5917433188456218857">"នៅសល់ <xliff:g id="PERCENTAGE">%1$s</xliff:g> អាច​ប្រើ​បាន​ប្រហែល <xliff:g id="TIME">%2$s</xliff:g> ទៀត"</string>
-    <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"នៅ​សល់ <xliff:g id="PERCENTAGE">%s</xliff:g> ។ កម្មវិធី​សន្សំ​ថ្ម​បានបើក។"</string>
+    <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"នៅ​សល់ <xliff:g id="PERCENTAGE">%s</xliff:g>។ មុខងារ​សន្សំ​ថ្មត្រូវបានបើក។"</string>
     <string name="invalid_charger" msgid="4370074072117767416">"មិន​អាច​សាក​តាម USB បានទេ។ សូម​ប្រើ​ឆ្នាំង​សាក​ដែល​ភ្ជាប់​មក​ជាមួយ​ឧបករណ៍​របស់អ្នក។"</string>
     <string name="invalid_charger_title" msgid="938685362320735167">"មិន​អាច​សាក​តាម USB បានទេ"</string>
     <string name="invalid_charger_text" msgid="2339310107232691577">"សូមប្រើ​ឆ្នាំង​សាក​ដែល​ភ្ជាប់​មក​ជាមួយ​ឧបករណ៍​របស់អ្នក"</string>
     <string name="battery_low_why" msgid="2056750982959359863">"ការកំណត់"</string>
-    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"បើក​កម្មវិធី​សន្សំ​ថ្ម?"</string>
-    <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"អំពី​កម្មវិធីសន្សំថ្ម"</string>
+    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"បើក​មុខងារ​សន្សំ​ថ្ម?"</string>
+    <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"អំពី​មុខងារ​សន្សំ​ថ្ម"</string>
     <string name="battery_saver_confirmation_ok" msgid="5042136476802816494">"បើក"</string>
-    <string name="battery_saver_start_action" msgid="4553256017945469937">"បើក​កម្មវិធី​សន្សំ​ថ្ម​"</string>
+    <string name="battery_saver_start_action" msgid="4553256017945469937">"បើក​មុខងារ​សន្សំ​ថ្ម"</string>
     <string name="status_bar_settings_settings_button" msgid="534331565185171556">"ការ​កំណត់"</string>
     <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"វ៉ាយហ្វាយ"</string>
     <string name="status_bar_settings_auto_rotation" msgid="8329080442278431708">"បង្វិល​អេក្រង់​ស្វ័យ​ប្រវត្តិ"</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"បន្ត"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"បោះបង់"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"ចែករំលែក"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"លុប"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"បាន​បោះបង់​ការថត​សកម្មភាព​អេក្រង់"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"បានរក្សាទុក​ការថត​សកម្មភាព​អេក្រង់។ សូមចុច​ដើម្បី​មើល"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"បានលុប​ការថត​សកម្មភាព​អេក្រង់"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"មានបញ្ហា​ក្នុងការ​លុបការថត​សកម្មភាព​អេក្រង់"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"មិនអាច​ទទួលបាន​ការអនុញ្ញាត​ទេ"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"មានបញ្ហា​ក្នុងការ​ចាប់ផ្ដើម​ថត​អេក្រង់"</string>
@@ -499,9 +497,9 @@
     <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="battery_saver_notification_title" msgid="8419266546034372562">"កម្មវិធីសន្សំថ្មបានបើក"</string>
+    <string name="battery_saver_notification_title" msgid="8419266546034372562">"មុខងារ​សន្សំ​ថ្មបានបើក"</string>
     <string name="battery_saver_notification_text" msgid="2617841636449016951">"ការ​បន្ថយ​ការ​ប្រតិបត្តិ និង​ទិន្នន័យ​ផ្ទៃ​ខាងក្រោយ"</string>
-    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"បិទ​កម្មវិធី​សន្សំ​ថ្ម"</string>
+    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"បិទ​មុខងារ​សន្សំ​ថ្ម"</string>
     <string name="media_projection_dialog_text" msgid="1755705274910034772">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> នឹងមានសិទ្ធិ​ចូលប្រើ​ព័ត៌មាន​ទាំងអស់​ដែលអាច​មើលឃើញ​នៅលើ​អេក្រង់​របស់អ្នក ឬដែលចាក់​ពីឧបករណ៍​របស់អ្នក នៅពេល​កំពុង​ថត ឬភ្ជាប់។ ព័ត៌មាន​នេះមាន​ដូចជា ពាក្យសម្ងាត់ ព័ត៌មាន​លម្អិត​អំពីការទូទាត់​ប្រាក់ រូបថត សារ និង​សំឡេង​ដែល​អ្នកចាក់​ជាដើម។"</string>
     <string name="media_projection_dialog_service_text" msgid="958000992162214611">"សេវាកម្មដែល​ផ្ដល់​មុខងារ​នេះ​នឹងមាន​សិទ្ធិ​ចូលប្រើ​ព័ត៌មាន​ទាំងអស់​ដែល​អាច​មើលឃើញ​នៅលើ​អេក្រង់​របស់អ្នក ឬ​ដែលចាក់​ពីឧបករណ៍​របស់អ្នក នៅពេល​កំពុង​ថត ឬភ្ជាប់។ ព័ត៌មាន​នេះមាន​ដូចជា ពាក្យសម្ងាត់ ព័ត៌មាន​លម្អិត​អំពីការទូទាត់​ប្រាក់ រូបថត សារ និង​សំឡេង​ដែល​អ្នកចាក់​ជាដើម។"</string>
     <string name="media_projection_dialog_service_title" msgid="2888507074107884040">"ចាប់ផ្ដើម​ថត ឬបញ្ជូន​មែនទេ?"</string>
@@ -767,7 +765,7 @@
       <item quantity="one">%d នាទី</item>
     </plurals>
     <string name="battery_panel_title" msgid="5931157246673665963">"ការប្រើប្រាស់ថ្ម"</string>
-    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"កម្មវិធីសន្សំថ្មមិនអាចប្រើបានអំឡុងពេលសាកថ្មទេ"</string>
+    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"មិនអាចប្រើមុខងារ​សន្សំ​ថ្មបានទេក្នុងអំឡុងពេលសាកថ្ម"</string>
     <string name="battery_detail_switch_title" msgid="6940976502957380405">"មុខងារ​សន្សំ​ថ្ម"</string>
     <string name="battery_detail_switch_summary" msgid="3668748557848025990">"កាត់បន្ថយប្រតិបត្តិការ និងទិន្នន័យផ្ទៃខាងក្រោយ"</string>
     <string name="keyboard_key_button_template" msgid="8005673627272051429">"ប៊ូតុង <xliff:g id="NAME">%1$s</xliff:g>"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ខាងលើ 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ខាងលើ 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"អេក្រង់ពេញខាងក្រោម"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ទីតាំង <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>, ប៉ះពីរដងដើម្បីកែ"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>, ប៉ះពីរដងដើម្បីបន្ថែម"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"ផ្លាស់ទី <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"យក <xliff:g id="TILE_NAME">%1$s</xliff:g> ចេញ"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"បញ្ចូល <xliff:g id="TILE_NAME">%1$s</xliff:g> ទៅទីតាំង <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"ផ្លាស់ទី <xliff:g id="TILE_NAME">%1$s</xliff:g> ទៅទីតាំង <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"កម្មវិធីកែការកំណត់រហ័ស"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ការជូនដំណឹង៖ <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"កម្មវិធីអាចនឹងមិនដំណើរការនៅលើអេក្រង់បំបែកទេ"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"រំលងទៅក្រោយ"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"ប្ដូរ​ទំហំ"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ទូរសព្ទ​បាន​បិទដោយសារ​វា​ឡើងកម្តៅ"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"ឥឡូវនេះ​ទូរសព្ទ​របស់អ្នក​កំពុង​ដំណើរការ​ធម្មតា"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"ឥឡូវនេះ ទូរសព្ទ​របស់អ្នក​កំពុងដំណើរការ​ជាធម្មតា។\nសូមចុច​ដើម្បីទទួលបាន​ព័ត៌មានបន្ថែម"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"ទូរសព្ទ​របស់អ្នក​ក្តៅពេក ដូច្នេះ​វាបាន​បិទ​ដើម្បី​បន្ថយ​កម្តៅ។ ឥឡូវនេះ ​ទូរសព្ទ​របស់អ្នក​កំពុង​ដំណើរការ​ធម្មតា។\n\nទូរសព្ទ​របស់អ្នក​អាចនឹង​ឡើង​កម្តៅ​ខ្លាំងជ្រុល ប្រសិន​បើអ្នក៖\n	• ប្រើប្រាស់​កម្មវិធី​ដែល​ប្រើប្រាស់ទិន្នន័យច្រើនក្នុងរយៈពេលខ្លី (ដូចជាហ្គេម វីដេអូ ឬកម្មវិធីរុករក)\n	• ទាញយក ឬ​បង្ហោះ​ឯកសារដែលមានទំហំធំ\n	• ប្រើប្រាស់​ទូរសព្ទ​របស់អ្នក​នៅកន្លែង​មានសីតុណ្ហភាព​ខ្ពស់"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"មើលជំហាន​ថែទាំ"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ទូរសព្ទ​នេះ​កំពុង​កើន​កម្តៅ"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"មុខងារ​មួយ​ចំនួន​នឹង​មិន​អាច​ប្រើ​បាន​ពេញលេញ​នោះ​ទេ ខណៈពេល​ដែល​ទូរសព្ទ​កំពុង​បញ្ចុះ​កម្តៅ"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"មុខងារ​មួយចំនួន​នឹងមិនអាច​ប្រើបានពេញលេញ​នោះទេ ខណៈពេល​ដែលទូរសព្ទ​កំពុងបញ្ចុះកម្ដៅ។\nសូមចុច​ដើម្បីទទួលបាន​ព័ត៌មានបន្ថែម"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"ទូរសព្ទ​របស់អ្នក​នឹង​ព្យាយាម​បញ្ចុះ​កម្តៅ​ដោយ​ស្វ័យប្រវត្តិ។ អ្នក​នៅតែ​អាច​ប្រើ​ទូរសព្ទ​របស់អ្នក​បាន​ដដែល​ ប៉ុន្តែ​វា​នឹង​ដំណើរ​ការ​យឺត​ជាង​មុន។\n\nបន្ទាប់​ពី​ទូរសព្ទ​របស់អ្នក​ត្រជាក់​ជាង​មុន​ហើយ វា​នឹង​ដំណើរការ​ដូច​ធម្មតា។"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"មើលជំហាន​ថែទាំ"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ផ្ដាច់ឆ្នាំងសាក"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"មាន​បញ្ហា​ក្នុងការសាកថ្ម​ឧបករណ៍​នេះ។ សូមផ្ដាច់​ឆ្នាំងសាក ហើយ​ប្រុងប្រយ័ត្ន ដោយសារ​ខ្សែ​អាចមាន​កម្ដៅ​ក្ដៅ។"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"មើលជំហាន​ថែទាំ"</string>
@@ -980,14 +981,21 @@
     <string name="slice_permission_checkbox" msgid="4242888137592298523">"អនុញ្ញាត​ឱ្យ <xliff:g id="APP">%1$s</xliff:g> បង្ហាញ​ស្ថិតិ​ប្រើប្រាស់​ពី​កម្មវិធី​នានា"</string>
     <string name="slice_permission_allow" msgid="6340449521277951123">"អនុញ្ញាត"</string>
     <string name="slice_permission_deny" msgid="6870256451658176895">"បដិសេធ"</string>
-    <string name="auto_saver_title" msgid="6873691178754086596">"ចុច​ដើម្បី​កំណត់​កាលវិភាគ​កម្មវិធី​សន្សំ​ថ្ម"</string>
+    <string name="auto_saver_title" msgid="6873691178754086596">"ចុច​ដើម្បី​កំណត់​កាលវិភាគ​មុខងារ​សន្សំ​ថ្ម"</string>
     <string name="auto_saver_text" msgid="3214960308353838764">"បើក​នៅពេល​ថ្ម​ទំនងជា​អស់"</string>
     <string name="no_auto_saver_action" msgid="7467924389609773835">"ទេ អរគុណ"</string>
-    <string name="auto_saver_enabled_title" msgid="4294726198280286333">"កាលវិភាគ​កម្មវិធី​សន្សំ​ថ្ម​បាន​បើក​ហើយ"</string>
-    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"កម្មវិធី​សន្សំ​ថ្ម​នឹង​បើក​ដោយ​ស្វ័យ​ប្រវត្តិ​ នៅពេល​ថ្ម​នៅ​សល់​តិច​ជាង <xliff:g id="PERCENTAGE">%d</xliff:g>%% ។"</string>
+    <string name="auto_saver_enabled_title" msgid="4294726198280286333">"កាលវិភាគ​មុខងារ​សន្សំ​ថ្មបាន​បើក​ហើយ"</string>
+    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"មុខងារ​សន្សំ​ថ្មនឹង​បើក​ដោយ​ស្វ័យ​ប្រវត្តិ​ នៅពេល​ថ្ម​នៅ​សល់​តិច​ជាង <xliff:g id="PERCENTAGE">%d</xliff:g>%%។"</string>
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ការកំណត់"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"យល់ហើយ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"ចម្លង SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> កំពុងប្រើ <xliff:g id="TYPES_LIST">%2$s</xliff:g> របស់អ្នក។"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"កម្មវិធី​កំពុងប្រើ <xliff:g id="TYPES_LIST">%s</xliff:g> របស់អ្នក។"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" និង "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"កាមេរ៉ា"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ទីតាំង"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"មីក្រូហ្វូន"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"បិទឧបករណ៍​ចាប់សញ្ញា"</string>
     <string name="device_services" msgid="1549944177856658705">"សេវាកម្មឧបករណ៍"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"គ្មាន​ចំណងជើង"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"កំពុងផ្ទុក​ការណែនាំ"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"មេឌៀ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"លាក់វគ្គ​បច្ចុប្បន្ន។"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"លាក់"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ច្រាន​ចោល"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"បន្ត"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ការកំណត់"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"អសកម្ម ពិនិត្យមើល​កម្មវិធី"</string>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index 38926cb..ab17beb 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ಮುಂದುವರಿಸಿ"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"ರದ್ದುಮಾಡಿ"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"ಹಂಚಿಕೊಳ್ಳಿ"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ಅಳಿಸಿ"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"ಸ್ಕ್ರೀನ್ ರೆಕಾರ್ಡಿಂಗ್ ಅನ್ನು ರದ್ದುಮಾಡಲಾಗಿದೆ"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"ಸ್ಕ್ರೀನ್ ರೆಕಾರ್ಡಿಂಗ್ ಅನ್ನು ಉಳಿಸಲಾಗಿದೆ, ವೀಕ್ಷಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"ಸ್ಕ್ರೀನ್ ರೆಕಾರ್ಡಿಂಗ್ ಅಳಿಸಲಾಗಿದೆ"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"ಸ್ಕ್ರೀನ್ ರೆಕಾರ್ಡಿಂಗ್ ಅಳಿಸುವಾಗ ದೋಷ ಕಂಡುಬಂದಿದೆ"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"ಅನುಮತಿಗಳನ್ನು ಪಡೆಯುವಲ್ಲಿ ವಿಫಲವಾಗಿದೆ"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"ಸ್ಕ್ರೀನ್ ರೆಕಾರ್ಡಿಂಗ್ ಪ್ರಾರಂಭಿಸುವಾಗ ದೋಷ ಕಂಡುಬಂದಿದೆ"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50% ಮೇಲಕ್ಕೆ"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30% ಮೇಲಕ್ಕೆ"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ಕೆಳಗಿನ ಪೂರ್ಣ ಪರದೆ"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ಸ್ಥಳ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. ಎಡಿಟ್ ಮಾಡಲು ಡಬಲ್ ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. ಸೇರಿಸಲು ಡಬಲ್ ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ಸರಿಸಿ"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ತೆಗೆದುಹಾಕಿ"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ಅನ್ನು <xliff:g id="POSITION">%2$d</xliff:g> ಗೆ ಸೇರಿಸಿ"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ಅನ್ನು <xliff:g id="POSITION">%2$d</xliff:g> ಗೆ ಸರಿಸಿ"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್‍ಗಳ ಎಡಿಟರ್."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ಅಧಿಸೂಚನೆ: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"ವಿಭಜಿಸಿದ ಪರದೆಯಲ್ಲಿ ಅಪ್ಲಿಕೇಶನ್ ಕೆಲಸ ಮಾಡದೇ ಇರಬಹುದು."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"ಹಿಂದಕ್ಕೆ ಸ್ಕಿಪ್‌ ಮಾಡಿ"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"ಮರುಗಾತ್ರಗೊಳಿಸಿ"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ಫೋನ್ ಬಿಸಿಯಾಗಿದ್ದರಿಂದ ಆಫ್ ಆಗಿದೆ"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"ಈಗ ನಿಮ್ಮ ಫೋನ್ ಎಂದಿನಂತೆ ಕೆಲಸ ಮಾಡುತ್ತಿದೆ"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"ನಿಮ್ಮ ಫೋನ್ ಈಗ ಎಂದಿನಂತೆ ರನ್ ಆಗುತ್ತಿದೆ.\nಇನ್ನಷ್ಟು ಮಾಹಿತಿಗಾಗಿ ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"ನಿಮ್ಮ ಫೋನ್ ತುಂಬಾ ಬಿಸಿಯಾಗಿತ್ತು, ತಣ್ಣಗಾಗಲು ಅದು ತಾನಾಗಿ ಆಫ್ ಆಗಿದೆ. ಈಗ ನಿಮ್ಮ ಫೋನ್ ಎಂದಿನಂತೆ ಕೆಲಸ ಮಾಡುತ್ತಿದೆ.\n\nನಿಮ್ಮ ಫೋನ್ ಬಿಸಿಯಾಗಲು ಕಾರಣಗಳು:\n	• ಹೆಚ್ಚು ಸಂಪನ್ಮೂಲ ಉಪಯೋಗಿಸುವ ಅಪ್ಲಿಕೇಶನ್‌ಗಳ ಬಳಕೆ (ಉದಾ, ಗೇಮಿಂಗ್, ವೀಡಿಯೊ/ನ್ಯಾವಿಗೇಶನ್ ಅಪ್ಲಿಕೇಶನ್‌ಗಳು)\n	• ದೊಡ್ಡ ಫೈಲ್‌ಗಳ ಡೌನ್‌ಲೋಡ್ ಅಥವಾ ಅಪ್‌ಲೋಡ್\n	• ಅಧಿಕ ಉಷ್ಣಾಂಶದಲ್ಲಿ ಫೋನಿನ ಬಳಕೆ"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"ಕಾಳಜಿಯ ಹಂತಗಳನ್ನು ವೀಕ್ಷಿಸಿ"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ಫೋನ್ ಬಿಸಿಯಾಗುತ್ತಿದೆ"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ಫೋನ್ ತಣ್ಣಗಾಗುವವರೆಗೂ ಕೆಲವು ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಸೀಮಿತಗೊಳಿಸುತ್ತದೆ"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ಫೋನ್ ತಣ್ಣಗಾಗುವವರೆಗೂ ಕೆಲವು ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಸೀಮಿತಗೊಳಿಸಲಾಗುತ್ತದೆ\nಇನ್ನಷ್ಟು ಮಾಹಿತಿಗಾಗಿ ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"ನಿಮ್ಮ ಫೋನ್ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ತಣ್ಣಗಾಗಲು ಪ್ರಯತ್ನಿಸುತ್ತದೆ. ನಿಮ್ಮ ಫೋನ್ ಅನ್ನು ನೀವು ಈಗಲೂ ಬಳಸಬಹುದಾಗಿರುತ್ತದೆ, ಆದರೆ ಇದು ನಿಧಾನವಾಗಿರಬಹುದು.\n\nಒಮ್ಮೆ ನಿಮ್ಮ ಫೋನ್ ತಣ್ಣಗಾದ ನಂತರ ಇದು ಸಾಮಾನ್ಯ ರೀತಿಯಲ್ಲಿ ಕಾರ್ಯನಿರ್ವಹಿಸುತ್ತದೆ."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"ಕಾಳಜಿಯ ಹಂತಗಳನ್ನು ವೀಕ್ಷಿಸಿ"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ಚಾರ್ಜರ್ ಅನ್‌ಪ್ಲಗ್ ಮಾಡಿ"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ಈ ಸಾಧನವನ್ನು ಚಾರ್ಜ್ ಮಾಡುತ್ತಿರುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ. ಪವರ್ ಅಡಾಪ್ಟರ್ ಅನ್ನು ಅನ್‌ಪ್ಲಗ್ ಮಾಡಿ ಮತ್ತು ಕೇಬಲ್ ಬೆಚ್ಚಗಿರಬೇಕೆಂದು ಜಾಗ್ರತೆ ವಹಿಸಿ."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"ಕಾಳಜಿ ಹಂತಗಳನ್ನು ನೋಡಿ"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"ಸಾಮಾನ್ಯ ಸಂದೇಶಗಳು"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"ಸಂಗ್ರಹಣೆ"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"ಸುಳಿವುಗಳು"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"ಇನ್‌ಸ್ಟಂಟ್ ಆ್ಯಪ್‌ಗಳು"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> ರನ್ ಆಗುತ್ತಿದೆ"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡದೆ ಆ್ಯಪ್‌ ತೆರೆಯಲಾಗಿದೆ."</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"ಇನ್‌ಸ್ಟಾಲ್‌ ಮಾಡದೆ ಆ್ಯಪ್‌ ತೆರೆಯಲಾಗಿದೆ. ಇನ್ನಷ್ಟು ತಿಳಿಯಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"ಅರ್ಥವಾಯಿತು"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"ನಿಮ್ಮ <xliff:g id="TYPES_LIST">%2$s</xliff:g> ಅನ್ನು <xliff:g id="APP">%1$s</xliff:g> ಬಳಸುತ್ತಿದೆ."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ನಿಮ್ಮ <xliff:g id="TYPES_LIST">%s</xliff:g> ಅನ್ನು ಆ್ಯಪ್‌ಗಳು ಬಳಸುತ್ತಿವೆ."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ಮತ್ತು "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"ಕ್ಯಾಮರಾ"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ಸ್ಥಳ"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"ಮೈಕ್ರೋಫೋನ್‌"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"ಸೆನ್ಸರ್‌ಗಳು ಆಫ್"</string>
     <string name="device_services" msgid="1549944177856658705">"ಸಾಧನ ಸೇವೆಗಳು"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"ಯಾವುದೇ ಶೀರ್ಷಿಕೆಯಿಲ್ಲ"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"ಶಿಫಾರಸುಗಳು ಲೋಡ್ ಆಗುತ್ತಿವೆ"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"ಮಾಧ್ಯಮ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"ಪ್ರಸ್ತುತ ಸೆಶನ್ ಅನ್ನು ಮರೆಮಾಡಿ."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"ಮರೆಮಾಡಿ"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ವಜಾಗೊಳಿಸಿ"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"ಪುನರಾರಂಭಿಸಿ"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"ನಿಷ್ಕ್ರಿಯ, ಆ್ಯಪ್ ಪರಿಶೀಲಿಸಿ"</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 959cbbc..36ab96c 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"재개"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"취소"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"공유"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"삭제"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"화면 녹화가 취소되었습니다."</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"화면 녹화본이 저장되었습니다. 확인하려면 탭하세요."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"화면 녹화가 삭제되었습니다."</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"화면 녹화는 삭제하는 중에 오류가 발생했습니다."</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"권한을 확보하지 못했습니다."</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"화면 녹화 시작 중 오류 발생"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"위쪽 화면 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"위쪽 화면 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"아래쪽 화면 전체화면"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"위치 <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. 수정하려면 두 번 탭하세요."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. 추가하려면 두 번 탭하세요."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> 이동"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> 삭제"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> 타일을 위치 <xliff:g id="POSITION">%2$d</xliff:g>에 추가"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> 타일을 위치 <xliff:g id="POSITION">%2$d</xliff:g>(으)로 이동"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"빠른 설정 편집기"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> 알림: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"앱이 분할 화면에서 작동하지 않을 수 있습니다."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"이전으로 건너뛰기"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"크기 조절"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"발열로 인해 휴대전화 전원이 종료됨"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"휴대전화가 정상적으로 실행 중입니다."</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"이제 휴대전화가 정상적으로 작동합니다.\n자세히 알아보려면 탭하세요."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"휴대전화가 과열되어 온도를 낮추기 위해 전원이 종료되었습니다. 지금은 휴대전화가 정상적으로 실행 중입니다.\n\n휴대전화가 과열되는 이유는 다음과 같습니다.\n	• 리소스를 많이 사용하는 앱 사용(예: 게임, 동영상 또는 내비게이션 앱)\n	• 대용량 파일을 다운로드 또는 업로드\n	• 온도가 높은 곳에서 휴대폰 사용"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"해결 방법 확인하기"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"휴대전화 온도가 높음"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"휴대전화 온도를 낮추는 동안 일부 기능이 제한됩니다."</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"휴대전화 온도를 낮추는 동안 일부 기능이 제한됩니다.\n자세히 알아보려면 탭하세요."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"휴대전화 온도를 자동으로 낮추려고 시도합니다. 휴대전화를 계속 사용할 수는 있지만 작동이 느려질 수도 있습니다.\n\n휴대전화 온도가 낮아지면 정상적으로 작동됩니다."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"해결 방법 확인하기"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"충전기를 연결 해제하세요"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"기기를 충전하는 중에 문제가 발생했습니다. 케이블이 뜨거울 수 있으므로 주의하여 전원 어댑터를 분리하세요."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"취해야 할 조치 확인"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"설정"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"확인"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g>이(가) <xliff:g id="TYPES_LIST">%2$s</xliff:g>을(를) 사용 중입니다."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"애플리케이션이 <xliff:g id="TYPES_LIST">%s</xliff:g>을(를) 사용 중입니다."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" 및 "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"카메라"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"위치"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"마이크"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"센서 사용 안함"</string>
     <string name="device_services" msgid="1549944177856658705">"기기 서비스"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"제목 없음"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"추천 제어 기능 로드 중"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"미디어"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"현재 세션을 숨깁니다."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"숨기기"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"닫기"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"다시 시작"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"설정"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"비활성. 앱을 확인하세요."</string>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index e7c9789..a420f71 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Улантуу"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Жокко чыгаруу"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Бөлүшүү"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Ооба"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Экранды жаздыруу жокко чыгарылды"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Экранды жаздыруу сакталды, көрүү үчүн таптап коюңуз"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Экранды жаздыруу өчүрүлдү"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Экранды жаздырууну өчүрүүдө ката кетти"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Уруксаттар алынбай калды"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Экранды жаздырууну баштоодо ката кетти"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Үстүнкү экранды 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Үстүнкү экранды 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ылдыйкы экранды толук экран режимине өткөрүү"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Орду - <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Түзөтүү үчүн эки жолу таптаңыз."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Кошуу үчүн эки жолу таптаңыз."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> дегенди жылдыруу"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> дегенди алып салуу"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> плиткасы <xliff:g id="POSITION">%2$d</xliff:g>-позицияга кошулсун"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> плиткасы <xliff:g id="POSITION">%2$d</xliff:g>-позицияга кошулсун"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Ыкчам жөндөөлөр түзөткүчү."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> эскертмеси: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Колдонмодо экран бөлүнбөшү мүмкүн."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Мурункусуна өткөрүп жиберүү"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Өлчөмүн өзгөртүү"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Телефон ысыгандыктан өчүрүлдү"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Телефонуңуз кадимкидей иштеп жатат"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Телефонуңуз кадимкидей иштеп жатат.\nКеңири маалымат алуу үчүн таптап коюңуз"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Телефонуңуз өтө ысып кеткендиктен, аны муздатуу үчүн өчүрүлдү. Эми телефонуңуз кадимкидей иштеп жатат.\n\nТелефонуңуз төмөнкү шарттарда ысып кетиши мүмкүн:\n	• Ашыкча ресурс короткон колдонмолорду (оюндар, видео же чабыттоо колдонмолору) пайдалансаңыз \n	• Ири көлөмдөгү файлдарды жүктөп алсаңыз же берсеңиз\n	• Телефонуңузду жогорку температураларда пайдалансаңыз"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Тейлөө кадамдарын көрүңүз"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Телефонуңуз ысып баратат"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Телефон сууганча айрым элементтердин иши чектелген"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Телефон сууганча айрым элементтердин иши чектелген.\nКеңири маалымат алуу үчүн таптап коюңуз"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Телефонуңуз автоматтык түрдө сууйт. Аны колдоно берсеңиз болот, бирок ал жайыраак иштеп калат.\n\nТелефонуңуз суугандан кийин адаттагыдай эле иштеп баштайт."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Тейлөө кадамдарын көрүңүз"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Кубаттагычты сууруңуз"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Бул түзмөктү кубаттоодо маселе келип чыкты. Кабель ысып кетиши мүмкүн, андыктан кубаттагыч адаптерин сууруп коюңуз."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Тейлөө кадамдарын көрүңүз"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Жөндөөлөр"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Түшүндүм"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> төмөнкүлөрдү колдонуп жатат: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Колдонмолор төмөнкүлөрдү пайдаланып жатышат: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" жана "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камера"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"жайгашкан жер"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"микрофон"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Сенсорлорду өчүрүү"</string>
     <string name="device_services" msgid="1549944177856658705">"Түзмөк кызматтары"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Аталышы жок"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Сунуштар жүктөлүүдө"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Медиа"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Учурдагы сеансты жашыруу."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Жашыруу"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Жабуу"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Улантуу"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Жөндөөлөр"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Жигерсиз. Колдонмону текшериңиз"</string>
diff --git a/packages/SystemUI/res/values-land/dimens.xml b/packages/SystemUI/res/values-land/dimens.xml
index 9e1b66f..b584dfe 100644
--- a/packages/SystemUI/res/values-land/dimens.xml
+++ b/packages/SystemUI/res/values-land/dimens.xml
@@ -47,4 +47,15 @@
 
     <dimen name="global_actions_power_dialog_item_height">130dp</dimen>
     <dimen name="global_actions_power_dialog_item_bottom_margin">35dp</dimen>
+
+    <dimen name="controls_management_top_padding">12dp</dimen>
+    <dimen name="controls_management_titles_margin">8dp</dimen>
+    <dimen name="controls_management_indicator_top_margin">8dp</dimen>
+    <dimen name="controls_management_list_margin">4dp</dimen>
+    <dimen name="controls_management_footer_height">56dp</dimen>
+    <dimen name="controls_management_zone_top_margin">24dp</dimen>
+
+    <!-- (footer_height -48dp)/2 -->
+    <dimen name="controls_management_footer_top_margin">4dp</dimen>
+    <dimen name="controls_management_favorites_top_margin">8dp</dimen>
 </resources>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index ce0deb3..0f7e2ca 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ສືບຕໍ່"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"ຍົກເລີກ"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"ແບ່ງປັນ"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ລຶບ"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"ຍົກເລີກການບັນທຶກໜ້າຈໍແລ້ວ"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"ຈັດເກັບການບັນທຶກໜ້າຈໍ, ແຕະເພື່ອເບິ່ງ"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"ລຶບການບັນທຶກໜ້າຈໍອອກແລ້ວ"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"ເກີດຄວາມຜິດພາດໃນການລຶບການບັນທຶກໜ້າຈໍ"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"ໂຫຼດສິດອະນຸຍາດບໍ່ສຳເລັດ"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"ເກີດຄວາມຜິດພາດໃນການບັນທຶກໜ້າຈໍ"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ເທິງສຸດ 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ເທິງສຸດ 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ເຕັມໜ້າຈໍລຸ່ມສຸດ"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ຕຳແໜ່ງ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. ແຕະສອງເທື່ອເພື່ອແກ້ໄຂ."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. ແຕະສອງເທື່ອເພື່ອເພີ່ມ."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"ຍ້າຍ <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"ລຶບ <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"ເພີ່ມ <xliff:g id="TILE_NAME">%1$s</xliff:g> ໄປຕຳແໜ່ງ <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"ຍ້າຍ <xliff:g id="TILE_NAME">%1$s</xliff:g> ໄປຕຳແໜ່ງ <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ຕົວແກ້ໄຂການຕັ້ງຄ່າດ່ວນ"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"ການແຈ້ງເຕືອນ <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"ແອັບອາດໃຊ້ບໍ່ໄດ້ກັບການແບ່ງໜ້າຈໍ."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"ຂ້າມໄປລາຍການກ່ອນນີ້"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"ປ່ຽນຂະໜາດ"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ປິດໂທລະສັບເນື່ອງຈາກຮ້ອນເກີນໄປ"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"ໂທລະສັບຂອງທ່ານຕອນນີ້ເຮັດວຽກປົກກະຕິແລ້ວ"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"ໂທລະສັບຂອງທ່ານຕອນນີ້ເຮັດວຽກປົກກະຕິແລ້ວ.\nແຕະເພື່ອເບິ່ງຂໍ້ມູນເພີ່ມເຕີມ"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"ໂທລະສັບຂອງທ່ານຮ້ອນເກີນໄປ, ດັ່ງນັ້ນມັນຈຶ່ງຖືກປິດໄວ້ເພື່ອໃຫ້ເຢັນກ່ອນ. ໂທລະສັບຂອງທ່ານຕອນນີ້ເຮັດວຽກປົກກະຕິແລ້ວ.\n\nໂທລະສັບຂອງທ່ານອາດຮ້ອນຫາກວ່າທ່ານ:\n	• ໃຊ້ແອັບທີ່ກິນຊັບພະຍາກອນຫຼາຍ (ເຊັ່ນ: ເກມ, ວິດີໂອ ຫຼື ແອັບການນຳທາງ)\n	• ດາວໂຫລດ ຫຼື ອັບໂຫລດຮູບພາບຂະໜາດໃຫຍ່\n	• ໃຊ້ໂທລະສັບຂອງທ່ານໃນບ່ອນທີ່ມີອຸນຫະພູມສູງ"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"ເບິ່ງຂັ້ນຕອນການເບິ່ງແຍງ"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ໂທລະສັບກຳລັງຮ້ອນຂຶ້ນ"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ຄຸນສົມບັດບາງຢ່າງຖືກຈຳກັດໄວ້ເນື່ອງໃນເວລາຫຼຸດອຸນຫະພູມຂອງໂທລະສັບ"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ຄຸນສົມບັດບາງຢ່າງຖືກຈຳກັດໄວ້ໃນເວລາຫຼຸດອຸນຫະພູມຂອງໂທລະສັບ.\nແຕະເພື່ອເບິ່ງຂໍ້ມູນເພີ່ມເຕີມ"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"ໂທລະສັບຂອງທ່ານຈະພະຍາຍາມລົດອຸນຫະພູມລົງ. ທ່ານຍັງຄົງສາມາດໃຊ້ໂທລະສັບຂອງທ່ານໄດ້ຢູ່, ແຕ່ມັນຈະເຮັດວຽກຊ້າລົງ.\n\nເມື່ອໂທລະສັບຂອງທ່ານບໍ່ຮ້ອນຫຼາຍແລ້ວ, ມັນຈະກັບມາເຮັດວຽກຕາມປົກກະຕິ."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"ເບິ່ງຂັ້ນຕອນການເບິ່ງແຍງ"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ຖອດສາຍສາກອອກ"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ເກີດບັນຫາໃນການສາກໄຟອຸປະກອນນີ້. ກະລຸນາຖອດສາຍສາກອອກ ແລະ ລະວັງເນື່ອງຈາກສາຍອາດຈະຍັງອຸ່ນຢູ່."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"ເບິ່ງຂັ້ນຕອນການເບິ່ງແຍງ"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ການຕັ້ງຄ່າ"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"ເຂົ້າໃຈແລ້ວ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> ກຳລັງໃຊ້ <xliff:g id="TYPES_LIST">%2$s</xliff:g> ຂອງທ່ານ."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ແອັບພລິເຄຊັນກຳລັງໃຊ້ <xliff:g id="TYPES_LIST">%s</xliff:g> ຂອງທ່ານ."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ແລະ "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"ກ້ອງຖ່າຍຮູບ"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ສະຖານທີ່"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"ໄມໂຄຣໂຟນ"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"ປິດການຮັບຮູ້ຢູ່"</string>
     <string name="device_services" msgid="1549944177856658705">"ບໍລິການອຸປະກອນ"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"ບໍ່ມີຊື່"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"ກຳລັງໂຫຼດຄຳແນະນຳ"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"ມີເດຍ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"ເຊື່ອງເຊດຊັນປັດຈຸບັນ."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"ເຊື່ອງ"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ປິດໄວ້"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"ສືບຕໍ່"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ການຕັ້ງຄ່າ"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"ບໍ່ເຮັດວຽກ, ກະລຸນາກວດສອບແອັບ"</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 24a68ab..27cf8ec 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Tęsti"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Atšaukti"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Bendrinti"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Ištrinti"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Ekrano įrašymas atšauktas"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Ekrano įrašas išsaugotas, palieskite ir peržiūrėkite"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Ekrano įrašas ištrintas"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Ištrinant ekrano įrašą įvyko klaida"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Nepavyko gauti leidimų"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Pradedant ekrano vaizdo įrašymą iškilo problema"</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Viršutinis ekranas 50 %"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Viršutinis ekranas 30 %"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Apatinis ekranas viso ekrano režimu"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g> padėtis, išklotinės elementas „<xliff:g id="TILE_NAME">%2$s</xliff:g>“. Dukart palieskite, kad redaguotumėte."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"Išklotinės elementas „<xliff:g id="TILE_NAME">%1$s</xliff:g>“. Dukart palieskite, kad pridėtumėte."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Perkelti išklotinės elementą „<xliff:g id="TILE_NAME">%1$s</xliff:g>“"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Pašalinti išklotinės elementą „<xliff:g id="TILE_NAME">%1$s</xliff:g>“"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Pridėti išklotinės elementą „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ į <xliff:g id="POSITION">%2$d</xliff:g> padėtį"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Perkelti išklotinės elementą „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ į <xliff:g id="POSITION">%2$d</xliff:g> padėtį"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"pašalintumėte išklotinės elementą"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"pridėtumėte išklotinės elementą gale"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Perkelti išklotinės elementą"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Pridėti išklotinės elementą"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Perkelkite į <xliff:g id="POSITION">%1$d</xliff:g> poziciją"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Pridėkite <xliff:g id="POSITION">%1$d</xliff:g> pozicijoje"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"<xliff:g id="POSITION">%1$d</xliff:g> pozicija"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Sparčiųjų nustatymų redagavimo priemonė."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"„<xliff:g id="ID_1">%1$s</xliff:g>“ pranešimas: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Programa gali neveikti naudojant skaidytą ekraną."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Praleisti ir eiti į ankstesnį"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Pakeisti dydį"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefonas išjungt., nes įkaito"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Dabar telefonas veikia įprastai"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefonas dabar veikia normaliai.\nPalietę gausite daugiau informacijos"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefonas per daug įkaito, todėl buvo išj., kad atvėstų. Dabar telefonas veikia įprastai.\n\nTelefonas gali per daug įkaisti, jei:\n	• esate įjungę daug išteklių naudoj. progr. (pvz., žaidimų, vaizdo įr. arba navig. progr.);\n	• atsis. arba įkeliate didelius failus;\n	• telefoną naudojate aukštoje temper."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Žr. priežiūros veiksmus"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefonas kaista"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Kai kurios funkcijos gali neveikti, kol telefonas vėsta"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Kai kurios funkcijos gali neveikti, kol telefonas vėsta.\nPalietę gausite daugiau informacijos"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefonas automatiškai bandys atvėsti. Telefoną vis tiek galėsite naudoti, tačiau jis gali veikti lėčiau.\n\nKai telefonas atvės, jis veiks įprastai."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Žr. priežiūros veiksmus"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Atjunkite kroviklį"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Įkraunant šį įrenginį iškilo problema. Atjunkite maitinimo adapterį. Būkite atsargūs, nes laidas gali būti įkaitęs."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Žr. priežiūros veiksmus"</string>
@@ -998,6 +999,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Nustatymai"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Supratau"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Pat. „SysUI“ krūvą"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Programa „<xliff:g id="APP">%1$s</xliff:g>“ naudoja: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Programos naudoja: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ir "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"fotoaparatą"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"vietovę"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofoną"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Jutikliai išjungti"</string>
     <string name="device_services" msgid="1549944177856658705">"Įrenginio paslaugos"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Nėra pavadinimo"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Įkeliamos rekomendacijos"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Medija"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Slėpti dabartinį seansą."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Slėpti"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Atsisakyti"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Tęsti"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Nustatymai"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Neaktyvu, patikrinkite progr."</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 5b53b08..8af578d 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Atsākt"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Atcelt"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Kopīgot"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Dzēst"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Ekrāna ierakstīšana ir atcelta."</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Ekrāna ieraksts ir saglabāts. Pieskarieties, lai to skatītu."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Ekrāna ieraksts ir izdzēsts."</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Dzēšot ekrāna ierakstu, radās kļūda."</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Neizdevās iegūt atļaujas."</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Sākot ierakstīt ekrāna saturu, radās kļūda."</string>
@@ -889,12 +887,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Augšdaļa 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Augšdaļa 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Apakšdaļu pa visu ekrānu"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. pozīcija, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Lai rediģētu, veiciet dubultskārienu."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Lai pievienotu, veiciet dubultskārienu."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Pārvietot elementu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Noņemt elementu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Pievienot elementu “<xliff:g id="TILE_NAME">%1$s</xliff:g>” <xliff:g id="POSITION">%2$d</xliff:g>. pozīcijā"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Pārvietot elementu “<xliff:g id="TILE_NAME">%1$s</xliff:g>” uz <xliff:g id="POSITION">%2$d</xliff:g>. pozīciju"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"noņemt elementu"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"pievienot elementu beigās"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Pārvietot elementu"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Pievienot elementu"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Pārvietot uz pozīciju numur <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Pievienot elementu pozīcijā numur <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Pozīcija numur <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Ātro iestatījumu redaktors."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> paziņojums: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Iespējams, lietotnē nedarbosies ekrāna sadalīšana."</string>
@@ -927,11 +926,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Pāriet uz iepriekšējo"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Mainīt lielumu"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Tālrunis izslēgts karstuma dēļ"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Tagad jūsu tālrunis darbojas normāli"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Tagad jūsu tālrunis darbojas normāli.\nPieskarieties, lai uzzinātu vairāk."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Jūsu tālrunis bija pārkarsis un tika izslēgts. Tagad tas darbojas normāli.\n\nTālrunis var sakarst, ja:\n	• tiek izmantotas lietotnes, kas patērē daudz enerģijas (piem., spēles, video lietotnes vai navigācija);\n	• tiek lejupielādēti/augšupielādēti lieli faili;\n	• tālrunis tiek lietots augstā temperatūrā."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Skatīt apkopes norādījumus"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Tālrunis kļūst silts"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Dažas funkcijas ir ierobežotas, kamēr tālrunis mēģina atdzist"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Dažas funkcijas ir ierobežotas, kamēr notiek tālruņa atdzišana.\nPieskarieties, lai uzzinātu vairāk."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Jūsu tālrunis automātiski mēģinās atdzist. Jūs joprojām varat izmantot tālruni, taču tas, iespējams, darbosies lēnāk.\n\nTiklīdz tālrunis būs atdzisis, tas darbosies normāli."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Skatīt apkopes norādījumus"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Lādētāja atvienošana"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Uzlādējot šo ierīci, radās problēma. Atvienojiet strāvas adapteri. Esiet uzmanīgs — vads var būt uzsilis."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Skatīt apkopes norādījumus"</string>
@@ -993,6 +994,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Iestatījumi"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Labi"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Lietotne <xliff:g id="APP">%1$s</xliff:g> izmanto funkcijas <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Lietojumprogrammas izmanto šādas funkcijas: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" un "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"atrašanās vieta"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofons"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensori izslēgti"</string>
     <string name="device_services" msgid="1549944177856658705">"Ierīces pakalpojumi"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Nav nosaukuma"</string>
@@ -1072,7 +1080,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Notiek ieteikumu ielāde"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Multivide"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Paslēpiet pašreizējo sesiju."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Paslēpt"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Nerādīt"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Atsākt"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Iestatījumi"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Neaktīva, pārbaudiet lietotni"</string>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index d63f99c..08612d7 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -82,7 +82,7 @@
     <string name="screenshot_saving_title" msgid="2298349784913287333">"Сликата на екранот се зачувува..."</string>
     <string name="screenshot_saved_title" msgid="8893267638659083153">"Сликата од екранот е зачувана"</string>
     <string name="screenshot_saved_text" msgid="7778833104901642442">"Допрете за да ја видите сликата од екранот"</string>
-    <string name="screenshot_failed_title" msgid="3259148215671936891">"Не можеше да се зачува слика од екранот"</string>
+    <string name="screenshot_failed_title" msgid="3259148215671936891">"Не може да се зачува слика од екранот"</string>
     <string name="screenshot_failed_to_save_unknown_text" msgid="1506621600548684129">"Повторно обидете се да направите слика од екранот"</string>
     <string name="screenshot_failed_to_save_text" msgid="8344173457344027501">"Сликата од екранот не може да се зачува поради ограничена меморија"</string>
     <string name="screenshot_failed_to_capture_text" msgid="7818288545874407451">"Апликацијата или вашата организација не дозволува снимање слики од екранот"</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Продолжи"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Откажи"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Сподели"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Избриши"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Снимањето екран е откажано"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Снимката од екранот е зачувана, допрете за да ја видите"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Снимката од екранот е избришана"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Грешка при бришењето на снимката од екранот"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Не успеаја да се добијат дозволи"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Грешка при почетокот на снимањето на екранот"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Горниот 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Горниот 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Долниот на цел екран"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Место <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Допрете двапати за уредување."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Допрете двапати за додавање."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Преместете <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Отстранете <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Додајте <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицијата <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Преместете <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицијата <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Уредник за брзи поставки."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Известување од <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Апликацијата можеби нема да работи во поделен екран."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Прескокни до претходната"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Промени големина"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Телефонот се исклучи поради загреаност"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Сега телефонот работи нормално"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Сега телефонот работи нормално.\nДопрете за повеќе информации"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Телефонот беше премногу загреан, така што се исклучи за да се олади. Сега работи нормално.\n\nТелефонот може премногу да се загрее ако:\n	• користите апликации што работат со многу ресурси (како што се, на пример, апликациите за видеа, навигација или игри)\n	• преземате или поставувате големи датотеки\n	•го користите телефонот на високи температури"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Прикажи ги чекорите за грижа за уредот"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Телефонот се загрева"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Некои функции се ограничени додека телефонот се лади"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Некои функции се ограничени додека телефонот се лади.\nДопрете за повеќе информации"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Телефонот автоматски ќе се обиде да се олади. Вие сепак ќе може да го користите, но тој може да работи побавно.\n\nОткако ќе се олади, ќе работи нормално."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Прикажи ги чекорите за грижа за уредот"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Исклучете го полначот"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Има проблем со полнењето на уредов. Исклучете го адаптерот за напојување и внимавајте зошто кабелот може да е топол."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Прикажи ги чекорите за грижа за уредот"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Поставки"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Сфатив"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Извади SysUI-слика"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> користи <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Апликациите користат <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" и "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камера"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"локација"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"микрофон"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Сензорите се исклучени"</string>
     <string name="device_services" msgid="1549944177856658705">"Услуги за уредот"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Без наслов"</string>
@@ -1047,7 +1055,7 @@
     <string name="controls_favorite_removed" msgid="5276978408529217272">"Сите контроли се отстранети"</string>
     <string name="controls_favorite_toast_no_changes" msgid="7094494210840877931">"Промените не се зачувани"</string>
     <string name="controls_favorite_see_other_apps" msgid="7709087332255283460">"Видете други апликации"</string>
-    <string name="controls_favorite_load_error" msgid="5126216176144877419">"Контролите не можеше да се вчитаат. Проверете ја апликацијата <xliff:g id="APP">%s</xliff:g> за да се уверите дека поставките за апликацијата не се променети."</string>
+    <string name="controls_favorite_load_error" msgid="5126216176144877419">"Контролите не може да се вчитаат. Проверете ја апликацијата <xliff:g id="APP">%s</xliff:g> за да се уверите дека поставките за апликацијата не се променети."</string>
     <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>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Се вчитуваат препораки"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Аудиовизуелни содржини"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Сокриј ја тековнава сесија."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Сокриј"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Отфрли"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Продолжи"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Поставки"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Неактивна, провери апликација"</string>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 0d3f360..9b5cb45 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"പുനരാരംഭിക്കുക"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"റദ്ദാക്കുക"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"പങ്കിടുക"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ഇല്ലാതാക്കുക"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"സ്ക്രീൻ റെക്കോർഡിംഗ് റദ്ദാക്കി"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"സ്ക്രീൻ റെക്കോർഡിംഗ് സംരക്ഷിച്ചു, കാണാൻ ടാപ്പ് ചെയ്യുക"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"സ്ക്രീൻ റെക്കോർഡിംഗ് ഇല്ലാതാക്കി"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"സ്ക്രീൻ റെക്കോർഡിംഗ് ഇല്ലാതാക്കുന്നതിൽ പിശക്"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"അനുമതികൾ ലഭിച്ചില്ല"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"സ്ക്രീൻ റെക്കോർഡിംഗ് ആരംഭിക്കുന്നതിൽ പിശക്"</string>
@@ -767,7 +765,7 @@
       <item quantity="one">%d മിനിറ്റ്</item>
     </plurals>
     <string name="battery_panel_title" msgid="5931157246673665963">"ബാറ്ററി ഉപയോഗം"</string>
-    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"ചാർജുചെയ്യുന്ന സമയത്ത് ബാറ്ററി ലാഭിക്കൽ നടക്കില്ല"</string>
+    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"ചാർജ് ചെയ്യുമ്പോൾ ബാറ്ററി ലാഭിക്കൽ സാധ്യമല്ല"</string>
     <string name="battery_detail_switch_title" msgid="6940976502957380405">"ബാറ്ററി ലാഭിക്കൽ"</string>
     <string name="battery_detail_switch_summary" msgid="3668748557848025990">"പ്രവർത്തനവും പശ്ചാത്തല ഡാറ്റയും കുറയ്‌ക്കുന്നു"</string>
     <string name="keyboard_key_button_template" msgid="8005673627272051429">"ബട്ടൺ <xliff:g id="NAME">%1$s</xliff:g>"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"മുകളിൽ 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"മുകളിൽ 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"താഴെ പൂർണ്ണ സ്ക്രീൻ"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"സ്ഥാനം <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. എഡിറ്റുചെയ്യുന്നതിന് രണ്ടുതവണ ടാപ്പുചെയ്യുക."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. ചേർക്കാൻ രണ്ടുതവണ ടാപ്പുചെയ്യുക."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> നീക്കുക"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> നീക്കംചെയ്യുക"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="POSITION">%2$d</xliff:g> സ്ഥാനത്തേയ്ക്ക് <xliff:g id="TILE_NAME">%1$s</xliff:g> ചേർക്കുക"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g> സ്ഥാനത്തേയ്ക്ക് <xliff:g id="TILE_NAME">%1$s</xliff:g> നീക്കുക"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ദ്രുത ക്രമീകരണ എഡിറ്റർ."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> അറിയിപ്പ്: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"സ്പ്ലിറ്റ്-സ്ക്രീനിനൊപ്പം ആപ്പ് പ്രവർത്തിച്ചേക്കില്ല."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"മുമ്പത്തേതിലേക്ക് പോകുക"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"വലുപ്പം മാറ്റുക"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ചൂട് കൂടിയതിനാൽ ഫോൺ ഓഫാക്കി"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"ഫോൺ ഇപ്പോൾ സാധാരണഗതിയിൽ പ്രവർത്തിക്കുന്നു"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"നിങ്ങളുടെ ഫോൺ ഇപ്പോൾ സാധാരണ ഗതിയിൽ പ്രവർത്തിക്കുന്നു.\nകൂടുതൽ വിവരങ്ങൾക്ക് ടാപ്പ് ചെയ്യുക"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"ഫോൺ ചൂടായിരിക്കുന്നതിനാൽ തണുക്കാൻ ഓഫാക്കിയിരിക്കുന്നു. ഫോൺ ഇപ്പോൾ സാധാരണഗതിയിൽ പ്രവർത്തിക്കുന്നു.\n\nഫോണിന് ചൂട് കൂടാൻ കാരണം:\n	• ഗെയിമിംഗ്, വീഡിയോ അല്ലെങ്കിൽ നാവിഗേഷൻ തുടങ്ങിയ റിസോഴ്സ്-ഇന്റൻസീവായ ആപ്പുകൾ ഉപയോഗിക്കുന്നത്\n	• വലിയ ഫയലുകൾ അപ്‌ലോഡോ ഡൗൺലോഡോ ചെയ്യുന്നത്\n	• ഉയർന്ന താപനിലയിൽ ഫോൺ ഉപയോഗിക്കുന്നത്"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"പരിപാലന നിർദ്ദേശങ്ങൾ കാണുക"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ഫോൺ ചൂടായിക്കൊണ്ടിരിക്കുന്നു"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ഫോൺ തണുത്തുകൊണ്ടിരിക്കുമ്പോൾ ചില ഫീച്ചറുകൾ പരിമിതപ്പെടുത്തപ്പെടും"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ഫോൺ തണുത്തുകൊണ്ടിരിക്കുമ്പോൾ ചില ഫീച്ചറുകൾ പരിമിതപ്പെടുത്തപ്പെടും.\nകൂടുതൽ വിവരങ്ങൾക്ക് ടാപ്പ് ചെയ്യുക"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"നിങ്ങളുടെ ഫോൺ സ്വയമേവ തണുക്കാൻ ശ്രമിക്കും. നിങ്ങൾക്ക് അപ്പോഴും ഫോൺ ഉപയോഗിക്കാമെങ്കിലും പ്രവർത്തനം മന്ദഗതിയിലായിരിക്കും.\n\nതണുത്തുകഴിഞ്ഞാൽ, ഫോൺ സാധാരണ ഗതിയിൽ പ്രവർത്തിക്കും."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"പരിപാലന നിർദ്ദേശങ്ങൾ കാണുക"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ചാർജർ അൺപ്ലഗ് ചെയ്യുക"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ഈ ഉപകരണം ചാർജ് ചെയ്യുന്നതിൽ തടസ്സമുണ്ട്. പവർ അഡാപ്റ്റർ അൺപ്ലഗ് ചെയ്യുക, കേബിളിന് ചൂടുണ്ടായിരിക്കുമെന്നതിനാൽ ശ്രദ്ധിക്കണം."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"മുൻകരുതൽ നടപടികൾ കാണുക"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"പൊതുവായ സന്ദേശങ്ങൾ"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"സ്റ്റോറേജ്"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"സൂചനകൾ"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"ഇൻസ്റ്റന്റ് ആപ്പ്"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> റണ്‍ ചെയ്യുന്നു"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"ഇൻസ്‌റ്റാൾ ചെയ്യാതെ ആപ്പ് തുറന്നു."</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"ഇൻസ്‌റ്റാൾ ചെയ്യാതെ ആപ്പ് തുറന്നു. കൂടുതലറിയാൻ ടാപ്പ് ചെയ്യുക."</string>
@@ -984,10 +985,17 @@
     <string name="auto_saver_text" msgid="3214960308353838764">"ബാറ്ററി ചാർജ് തീരാൻ സാധ്യതയുണ്ടെങ്കിൽ ഓണാക്കുക"</string>
     <string name="no_auto_saver_action" msgid="7467924389609773835">"വേണ്ട"</string>
     <string name="auto_saver_enabled_title" msgid="4294726198280286333">"ബാറ്ററി ലാഭിക്കൽ ഷെഡ്യൂൾ ഓണാക്കുക"</string>
-    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"ബാറ്ററി <xliff:g id="PERCENTAGE">%d</xliff:g>%% ൽ താഴെയാകുമ്പോൾ, ബാറ്ററി ലാഭിക്കൽ സ്വമേധയാ ഓണാകും."</string>
+    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"ബാറ്ററി <xliff:g id="PERCENTAGE">%d</xliff:g>%% ൽ താഴെയാകുമ്പോൾ, ബാറ്ററി ലാഭിക്കൽ സ്വയമേവ ഓണാകും."</string>
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ക്രമീകരണം"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"മനസ്സിലായി"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI ഹീപ്പ് ഡമ്പ് ചെയ്യുക"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> നിങ്ങളുടെ <xliff:g id="TYPES_LIST">%2$s</xliff:g> ഉപയോഗിക്കുന്നു."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ആപ്പുകൾ നിങ്ങളുടെ <xliff:g id="TYPES_LIST">%s</xliff:g> ഉപയോഗിക്കുന്നു."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" കൂടാതെ "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"ക്യാമറ"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ലൊക്കേഷന്‍"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"മൈക്രോഫോൺ"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"സെൻസറുകൾ ഓഫാണ്"</string>
     <string name="device_services" msgid="1549944177856658705">"ഉപകരണ സേവനങ്ങള്‍"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"പേരില്ല"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"നിർദ്ദേശങ്ങൾ ലോഡ് ചെയ്യുന്നു"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"മീഡിയ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"നിലവിലെ സെഷൻ മറയ്‌ക്കുക."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"മറയ്‌ക്കുക"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ഡിസ്‌മിസ് ചെയ്യുക"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"പുനരാരംഭിക്കുക"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ക്രമീകരണം"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"നിഷ്‌ക്രിയം, ആപ്പ് പരിശോധിക്കൂ"</string>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index f683e28..cc8b5fe 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -92,7 +92,7 @@
     <string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Дэлгэц бичлэг боловсруулж байна"</string>
     <string name="screenrecord_channel_description" msgid="4147077128486138351">"Дэлгэц бичих горимын үргэлжилж буй мэдэгдэл"</string>
     <string name="screenrecord_start_label" msgid="1750350278888217473">"Бичлэгийг эхлүүлэх үү?"</string>
-    <string name="screenrecord_description" msgid="1123231719680353736">"Бичих үед Андройд систем нь таны дэлгэц дээр харагдах эсвэл төхөөрөмж дээрээ тоглуулсан аливаа эмзэг мэдээллийг авах боломжтой. Үүнд нууц үг, төлбөрийн мэдээлэл, зураг, зурвас болон аудио багтана."</string>
+    <string name="screenrecord_description" msgid="1123231719680353736">"Бичих үед Андройд систем нь таны дэлгэц дээр харагдах эсвэл төхөөрөмж дээрээ тоглуулсан аливаа эмзэг мэдээллийг авах боломжтой. Үүнд нууц үг, төлбөрийн мэдээлэл, зураг, мессеж болон аудио багтана."</string>
     <string name="screenrecord_audio_label" msgid="6183558856175159629">"Аудио бичих"</string>
     <string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Төхөөрөмжийн аудио"</string>
     <string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Хөгжим, дуудлага болон хонхны ая зэрэг таны төхөөрөмжийн дуу"</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Үргэлжлүүлэх"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Цуцлах"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Хуваалцах"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Устгах"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Дэлгэцийн бичлэгийг цуцалсан"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Дэлгэцийн бичлэгийг хадгалсан. Харахын тулд товшино уу"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Дэлгэцийн бичлэгийг устгасан"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Дэлгэцийн бичлэгийг устгахад алдаа гарлаа"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Зөвшөөрөл авч чадсангүй"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Дэлгэцийн бичлэгийг эхлүүлэхэд алдаа гарлаа"</string>
@@ -506,7 +504,7 @@
     <string name="media_projection_dialog_service_text" msgid="958000992162214611">"Энэ функцийг ажиллуулж байгаа үйлчилгээ нь бичлэг хийх эсвэл дамжуулах үед таны дэлгэц дээр харагдах эсвэл таны төхөөрөмжөөс тоглуулах бүх мэдээлэлд хандах боломжтой байна. Үүнд нууц үг, төлбөрийн дэлгэрэнгүй, зураг болон таны тоглуулдаг аудио зэрэг мэдээлэл багтана."</string>
     <string name="media_projection_dialog_service_title" msgid="2888507074107884040">"Бичлэг хийх эсвэл дамжуулахыг эхлүүлэх үү?"</string>
     <string name="media_projection_dialog_title" msgid="3316063622495360646">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g>-тай бичлэг хийж эсвэл дамжуулж эхлэх үү?"</string>
-    <string name="media_projection_remember_text" msgid="6896767327140422951">"Дахиж үл харуулах"</string>
+    <string name="media_projection_remember_text" msgid="6896767327140422951">"Дахиж бүү харуул"</string>
     <string name="clear_all_notifications_text" msgid="348312370303046130">"Бүгдийг арилгах"</string>
     <string name="manage_notifications_text" msgid="6885645344647733116">"Удирдах"</string>
     <string name="manage_notifications_history_text" msgid="57055985396576230">"Түүх"</string>
@@ -551,29 +549,29 @@
     <string name="monitoring_description_managed_profile_ca_certificate" msgid="7904323416598435647">"Таны байгууллага таны ажлын профайлд сертификатын зөвшөөрөл суулгасан байна. Таны аюулгүй сүлжээний ачааллыг өөрчлөх эсвэл хянах боломжтой."</string>
     <string name="monitoring_description_ca_certificate" msgid="448923057059097497">"Сертификатын зөвшөөрлийг энэ төхөөрөмжид суулгасан байна. Таны аюулгүй сүлжээний ачааллыг өөрчлөх эсвэл хянах боломжтой."</string>
     <string name="monitoring_description_management_network_logging" msgid="216983105036994771">"Таны админ төхөөрөмжийн ачааллыг хянадаг сүлжээний логийг асаасан байна."</string>
-    <string name="monitoring_description_named_vpn" msgid="5749932930634037027">"Та имэйл, апп, вэб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="VPN_APP">%1$s</xliff:g>-д холбогдсон байна."</string>
-    <string name="monitoring_description_two_named_vpns" msgid="3516830755681229463">"Та имэйл, апп, вэб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="VPN_APP_0">%1$s</xliff:g>, <xliff:g id="VPN_APP_1">%2$s</xliff:g>-д холбогдсон байна."</string>
-    <string name="monitoring_description_managed_profile_named_vpn" msgid="368812367182387320">"Таны ажлын профайл <xliff:g id="VPN_APP">%1$s</xliff:g>-д холбогдсон байна. Энэ нь таны имэйл, апп, вэб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой."</string>
-    <string name="monitoring_description_personal_profile_named_vpn" msgid="8179722332380953673">"Таны хувийн профайлыг имэйл, апп, вэб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="VPN_APP">%1$s</xliff:g>-д холбосон байна."</string>
+    <string name="monitoring_description_named_vpn" msgid="5749932930634037027">"Та имэйл, апп, веб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="VPN_APP">%1$s</xliff:g>-д холбогдсон байна."</string>
+    <string name="monitoring_description_two_named_vpns" msgid="3516830755681229463">"Та имэйл, апп, веб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="VPN_APP_0">%1$s</xliff:g>, <xliff:g id="VPN_APP_1">%2$s</xliff:g>-д холбогдсон байна."</string>
+    <string name="monitoring_description_managed_profile_named_vpn" msgid="368812367182387320">"Таны ажлын профайл <xliff:g id="VPN_APP">%1$s</xliff:g>-д холбогдсон байна. Энэ нь таны имэйл, апп, веб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой."</string>
+    <string name="monitoring_description_personal_profile_named_vpn" msgid="8179722332380953673">"Таны хувийн профайлыг имэйл, апп, веб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="VPN_APP">%1$s</xliff:g>-д холбосон байна."</string>
     <string name="monitoring_description_do_header_generic" msgid="6130190408164834986">"Таны төхөөрөмжийг <xliff:g id="DEVICE_OWNER_APP">%1$s</xliff:g> удирддаг."</string>
     <string name="monitoring_description_do_header_with_name" msgid="2696255132542779511">"<xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g> таны төхөөрөмжийг удирдахын тулд <xliff:g id="DEVICE_OWNER_APP">%2$s</xliff:g>-г ашигладаг."</string>
     <string name="monitoring_description_do_body" msgid="7700878065625769970">"Таны админ тохиргоо, байгууллагын хандалт, апп, төхөөрөмжтэй холбоотой өгөгдөл болон таны төхөөрөмжийн байршлын мэдээллийг хянах, удирдах боломжтой."</string>
     <string name="monitoring_description_do_learn_more_separator" msgid="1467280496376492558">" "</string>
     <string name="monitoring_description_do_learn_more" msgid="645149183455573790">"Дэлгэрэнгүй үзэх"</string>
-    <string name="monitoring_description_do_body_vpn" msgid="7699280130070502303">"Таны имэйл, апп, вэб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="VPN_APP">%1$s</xliff:g>-д холбогдсон байна."</string>
+    <string name="monitoring_description_do_body_vpn" msgid="7699280130070502303">"Таны имэйл, апп, веб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="VPN_APP">%1$s</xliff:g>-д холбогдсон байна."</string>
     <string name="monitoring_description_vpn_settings_separator" msgid="8292589617720435430">" "</string>
     <string name="monitoring_description_vpn_settings" msgid="5264167033247632071">"VPN тохиргоог нээх"</string>
     <string name="monitoring_description_ca_cert_settings_separator" msgid="7107390013344435439">" "</string>
     <string name="monitoring_description_ca_cert_settings" msgid="8329781950135541003">"Итгэмжлэгдсэн мандат үнэмлэхийг нээх"</string>
     <string name="monitoring_description_network_logging" msgid="577305979174002252">"Таны админ төхөөрөмжийн ачааллыг хянадаг сүлжээний логийг асаасан байна.\n\nДэлгэрэнгүй мэдээлэл авах бол админтайгаа холбогдоно уу."</string>
-    <string name="monitoring_description_vpn" msgid="1685428000684586870">"Та апп-д VPN холболт хийхийг зөвшөөрсөн байна.\n\nЭнэхүү апп нь таны имэйл, апп, вэбсайт зэрэг төхөөрөмж болон сүлжээний үйл ажиллагааг хянах боломжтой."</string>
-    <string name="monitoring_description_vpn_profile_owned" msgid="4964237035412372751">"<xliff:g id="ORGANIZATION">%1$s</xliff:g> таны ажлын профайлыг удирддаг.\n\nТаны админ имэйл, апп болон вэб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой.\n\nДэлгэрэнгүй мэдээлэл авах бол админтайгаа холбогдоно уу.\n\nТа сүлжээний үйл ажиллагааг хянах боломжтой VPN-д холбогдсон байна."</string>
+    <string name="monitoring_description_vpn" msgid="1685428000684586870">"Та апп-д VPN холболт хийхийг зөвшөөрсөн байна.\n\nЭнэхүү апп нь таны имэйл, апп, вебсайт зэрэг төхөөрөмж болон сүлжээний үйл ажиллагааг хянах боломжтой."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="4964237035412372751">"<xliff:g id="ORGANIZATION">%1$s</xliff:g> таны ажлын профайлыг удирддаг.\n\nТаны админ имэйл, апп болон веб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой.\n\nДэлгэрэнгүй мэдээлэл авах бол админтайгаа холбогдоно уу.\n\nТа сүлжээний үйл ажиллагааг хянах боломжтой VPN-д холбогдсон байна."</string>
     <string name="legacy_vpn_name" msgid="4174223520162559145">"VPN"</string>
-    <string name="monitoring_description_app" msgid="376868879287922929">"Та <xliff:g id="APPLICATION">%1$s</xliff:g>-д холбогдсон бөгөөд энэ нь таны имэйл, апп, вэбсайт зэрэг сүлжээний үйл ажиллагааг хянах боломжтой."</string>
-    <string name="monitoring_description_app_personal" msgid="1970094872688265987">"Та <xliff:g id="APPLICATION">%1$s</xliff:g>-д холбогдсон бөгөөд энэ нь таны имэйл, апп, вэбсайт зэрэг сүлжээний хувийн үйл ажиллагааг хянах боломжтой."</string>
-    <string name="branded_monitoring_description_app_personal" msgid="1703511985892688885">"Та имэйл, апп, вэб хуудас зэрэг хувийн сүлжээнийхээ үйл ажиллагааг хянах боломжтой <xliff:g id="APPLICATION">%1$s</xliff:g>-д холбогдсон байна."</string>
-    <string name="monitoring_description_app_work" msgid="3713084153786663662">"Таны ажлын профайлыг <xliff:g id="ORGANIZATION">%1$s</xliff:g> удирддаг. Энэ нь таны имэйл, апп, вэб хуудас зэрэг ажлын сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="APPLICATION">%2$s</xliff:g>-д холбогдсон. \n\nДэлгэрэнгүй мэдээллийг авахын тулд админтай холбогдоно уу."</string>
-    <string name="monitoring_description_app_personal_work" msgid="6175816356939166101">"Таны ажлын профайлыг <xliff:g id="ORGANIZATION">%1$s</xliff:g> удирддаг. Энэ нь таны имэйл, апп, вэб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="APPLICATION_WORK">%2$s</xliff:g>-тай холбогдсон. \n\nМөн таны сүлжээний хувийн үйл ажиллагааг хянах боломжтой <xliff:g id="APPLICATION_PERSONAL">%3$s</xliff:g>-д холбогдсон байна."</string>
+    <string name="monitoring_description_app" msgid="376868879287922929">"Та <xliff:g id="APPLICATION">%1$s</xliff:g>-д холбогдсон бөгөөд энэ нь таны имэйл, апп, вебсайт зэрэг сүлжээний үйл ажиллагааг хянах боломжтой."</string>
+    <string name="monitoring_description_app_personal" msgid="1970094872688265987">"Та <xliff:g id="APPLICATION">%1$s</xliff:g>-д холбогдсон бөгөөд энэ нь таны имэйл, апп, вебсайт зэрэг сүлжээний хувийн үйл ажиллагааг хянах боломжтой."</string>
+    <string name="branded_monitoring_description_app_personal" msgid="1703511985892688885">"Та имэйл, апп, веб хуудас зэрэг хувийн сүлжээнийхээ үйл ажиллагааг хянах боломжтой <xliff:g id="APPLICATION">%1$s</xliff:g>-д холбогдсон байна."</string>
+    <string name="monitoring_description_app_work" msgid="3713084153786663662">"Таны ажлын профайлыг <xliff:g id="ORGANIZATION">%1$s</xliff:g> удирддаг. Энэ нь таны имэйл, апп, веб хуудас зэрэг ажлын сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="APPLICATION">%2$s</xliff:g>-д холбогдсон. \n\nДэлгэрэнгүй мэдээллийг авахын тулд админтай холбогдоно уу."</string>
+    <string name="monitoring_description_app_personal_work" msgid="6175816356939166101">"Таны ажлын профайлыг <xliff:g id="ORGANIZATION">%1$s</xliff:g> удирддаг. Энэ нь таны имэйл, апп, веб хуудас зэрэг сүлжээний үйл ажиллагааг хянах боломжтой <xliff:g id="APPLICATION_WORK">%2$s</xliff:g>-тай холбогдсон. \n\nМөн таны сүлжээний хувийн үйл ажиллагааг хянах боломжтой <xliff:g id="APPLICATION_PERSONAL">%3$s</xliff:g>-д холбогдсон байна."</string>
     <string name="keyguard_indication_trust_unlocked" msgid="7395154975733744547">"TrustAgent-р түгжээгүй байлгасан"</string>
     <string name="keyguard_indication_trust_disabled" msgid="6820793704816727918">"Таныг гараар нээх хүртэл төхөөрөмж түгжээтэй байх болно"</string>
     <string name="keyguard_indication_trust_unlocked_plugged_in" msgid="2323452175329362855">"<xliff:g id="KEYGUARD_INDICATION">%1$s</xliff:g>\n<xliff:g id="POWER_INDICATION">%2$s</xliff:g>"</string>
@@ -655,8 +653,8 @@
     <string name="status_bar_alarm" msgid="87160847643623352">"Сэрүүлэг"</string>
     <string name="status_bar_work" msgid="5238641949837091056">"Ажлын профайл"</string>
     <string name="status_bar_airplane" msgid="4848702508684541009">"Нислэгийн горим"</string>
-    <string name="add_tile" msgid="6239678623873086686">"Вэбсайтын цонх нэмэх"</string>
-    <string name="broadcast_tile" msgid="5224010633596487481">"Вэбсайтын цонх дамжуулах"</string>
+    <string name="add_tile" msgid="6239678623873086686">"Вебсайтын цонх нэмэх"</string>
+    <string name="broadcast_tile" msgid="5224010633596487481">"Вебсайтын цонх дамжуулах"</string>
     <string name="zen_alarm_warning_indef" msgid="5252866591716504287">"Та өмнө нь унтраагаагүй тохиолдолд <xliff:g id="WHEN">%1$s</xliff:g>-т сэрүүлгээ сонсохгүй"</string>
     <string name="zen_alarm_warning" msgid="7844303238486849503">"<xliff:g id="WHEN">%1$s</xliff:g>-т та дараагийн сэрүүлгээ сонсохгүй"</string>
     <string name="alarm_template" msgid="2234991538018805736">"<xliff:g id="WHEN">%1$s</xliff:g> цагт"</string>
@@ -864,12 +862,12 @@
   <string-array name="clock_options">
     <item msgid="3986445361435142273">"Цаг, минут, секундийг харуулах"</item>
     <item msgid="1271006222031257266">"Цаг, минутыг харуулах (өгөгдмөл)"</item>
-    <item msgid="6135970080453877218">"Энэ дүрс тэмдгийг бүү үзүүл"</item>
+    <item msgid="6135970080453877218">"Энэ дүрс тэмдгийг бүү харуул"</item>
   </string-array>
   <string-array name="battery_options">
     <item msgid="7714004721411852551">"Хувийг тогтмол харуулах"</item>
     <item msgid="3805744470661798712">"Цэнэглэх үед хувийг тогтмол харуулах (өгөгдмөл)"</item>
-    <item msgid="8619482474544321778">"Энэ дүрс тэмдгийг бүү үзүүл"</item>
+    <item msgid="8619482474544321778">"Энэ дүрс тэмдгийг бүү харуул"</item>
   </string-array>
     <string name="tuner_low_priority" msgid="8412666814123009820">"Бага ач холбогдолтой мэдэгдлийн дүрс тэмдгийг харуулах"</string>
     <string name="other" msgid="429768510980739978">"Бусад"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Дээд 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Дээд 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Доод бүтэн дэлгэц"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Байршил <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Засахын тулд 2 удаа дарна уу."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Нэмэхийн тулд 2 удаа дарна уу."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-г зөөх"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-г устгах"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-г <xliff:g id="POSITION">%2$d</xliff:g> байрлалд нэмэх"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-г байрлал <xliff:g id="POSITION">%2$d</xliff:g> руу зөөх"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Түргэн тохиргоо засварлагч."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> мэдэгдэл: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Апп хуваагдсан дэлгэцэд ажиллахгүй."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Өмнөх медиад очих"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Хэмжээг өөрчлөх"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Халснаас үүдэн утас унтарсан"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Таны утас одоо хэвийн ажиллаж байна"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Таны утас одоо хэвийн ажиллаж байна.\nДэлгэрэнгүй мэдээлэл авах бол товшино уу"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Таны утас хэт халсан тул хөргөхөөр унтраасан болно. Таны утас одоо хэвийн ажиллаж байна.\n\nХэрэв та дараахыг хийвэл таны утас хэт халж болзошгүй:\n	• Их хэмжээний нөөц хэрэглээний апп (тоглоом, видео эсвэл шилжилтийн апп зэрэг)\n	• Багтаамж ихтэй файл татах, байршуулах\n	• Утсаа өндөр температурт ашиглах"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Хянамж болгоомжийн алхмыг харах"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Утас халж эхэлж байна"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Таны утас хөрж байх зуур зарим онцлогийг хязгаарласан"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Утсыг хөрөх үед зарим онцлогийг хязгаарлана.\nДэлгэрэнгүй мэдээлэл авах бол товшино уу"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Таны утас автоматаар хөрөх болно. Та утсаа ашиглаж болох хэдий ч удаан ажиллаж болзошгүй.\n\nТаны утас хөрсний дараагаар хэвийн ажиллана."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Хянамж болгоомжийн алхмыг харах"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Цэнэглэгчийг салгана уу"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Энэ төхөөрөмжийг цэнэглэхэд асуудал гарлаа. Тэжээлийн залгуурыг салгана уу. Кабель халсан байж болзошгүй тул болгоомжтой байгаарай."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Хянамж болгоомжийн алхмыг харна уу"</string>
@@ -947,7 +948,7 @@
     <string name="notification_channel_alerts" msgid="3385787053375150046">"Сэрэмжлүүлэг"</string>
     <string name="notification_channel_battery" msgid="9219995638046695106">"Батарей"</string>
     <string name="notification_channel_screenshot" msgid="7665814998932211997">"Дэлгэцийн зураг дарах"</string>
-    <string name="notification_channel_general" msgid="4384774889645929705">"Энгийн зурвас"</string>
+    <string name="notification_channel_general" msgid="4384774889645929705">"Энгийн мессеж"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"Хадгалах сан"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"Заавар"</string>
     <string name="instant_apps" msgid="8337185853050247304">"Шуурхай апп"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Тохиргоо"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Ойлголоо"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> таны <xliff:g id="TYPES_LIST">%2$s</xliff:g>-г ашиглаж байна."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Аппууд таны <xliff:g id="TYPES_LIST">%s</xliff:g>-г ашиглаж байна."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" болон "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камер"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"байршил"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"микрофон"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Мэдрэгчийг унтраах"</string>
     <string name="device_services" msgid="1549944177856658705">"Төхөөрөмжийн үйлчилгээ"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Гарчиггүй"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Зөвлөмжүүдийг ачаалж байна"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Медиа"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Одоогийн харилцан үйлдлийг нуугаарай."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Нуух"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Хаах"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Үргэлжлүүлэх"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Тохиргоо"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Идэвхгүй байна, аппыг шалгана уу"</string>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index fc17d1e..caab00f 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -108,17 +108,15 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"पुन्हा सुरू करा"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"रद्द करा"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"शेअर करा"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"हटवा"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"स्क्रीन रेकॉर्डिंग रद्द केले"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"स्क्रीन रेकॉर्डिंग सेव्ह केली, पाहण्यासाठी टॅप करा"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"स्क्रीन रेकॉर्डिंग हटवले"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"स्क्रीन रेकॉर्डिंग हटवताना एरर आली"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"परवानग्या मिळवता आल्या नाहीत"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"स्क्रीन रेकॉर्डिंग सुरू करताना एरर आली"</string>
-    <string name="usb_preference_title" msgid="1439924437558480718">"USB फाईल स्थानांतरण पर्याय"</string>
+    <string name="usb_preference_title" msgid="1439924437558480718">"USB फाइल स्थानांतरण पर्याय"</string>
     <string name="use_mtp_button_title" msgid="5036082897886518086">"मीडिया प्लेअर म्हणून माउंट करा (MTP)"</string>
     <string name="use_ptp_button_title" msgid="7676427598943446826">"कॅमेरा म्हणून माउंट करा (PTP)"</string>
-    <string name="installer_cd_button_title" msgid="5499998592841984743">"Mac साठी Android फाईल स्थानांतर अ‍ॅप इंस्टॉल करा"</string>
+    <string name="installer_cd_button_title" msgid="5499998592841984743">"Mac साठी Android फाइल स्थानांतर अ‍ॅप इंस्टॉल करा"</string>
     <string name="accessibility_back" msgid="6530104400086152611">"मागे"</string>
     <string name="accessibility_home" msgid="5430449841237966217">"होम"</string>
     <string name="accessibility_menu" msgid="2701163794470513040">"मेनू"</string>
@@ -267,7 +265,7 @@
     <string name="accessibility_quick_settings_wifi" msgid="167707325133803052">"<xliff:g id="SIGNAL">%1$s</xliff:g>."</string>
     <string name="accessibility_quick_settings_wifi_changed_off" msgid="2230487165558877262">"Wifi बंद झाले."</string>
     <string name="accessibility_quick_settings_wifi_changed_on" msgid="1490362586009027611">"Wifi सुरू झाले."</string>
-    <string name="accessibility_quick_settings_mobile" msgid="1817825313718492906">"मोबाईल <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string>
+    <string name="accessibility_quick_settings_mobile" msgid="1817825313718492906">"मोबाइल <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string>
     <string name="accessibility_quick_settings_battery" msgid="533594896310663853">"बॅटरी <xliff:g id="STATE">%s</xliff:g>."</string>
     <string name="accessibility_quick_settings_airplane_off" msgid="1275658769368793228">"विमान मोड बंद."</string>
     <string name="accessibility_quick_settings_airplane_on" msgid="8106176561295294255">"विमान मोड सुरू."</string>
@@ -290,7 +288,7 @@
     <string name="accessibility_quick_settings_location_changed_off" msgid="5132776369388699133">"स्थान अहवाल बंद केला."</string>
     <string name="accessibility_quick_settings_location_changed_on" msgid="7159115433070112154">"स्थान अहवाल सुरू केला."</string>
     <string name="accessibility_quick_settings_alarm" msgid="558094529584082090">"<xliff:g id="TIME">%s</xliff:g> साठी अलार्म सेट केला."</string>
-    <string name="accessibility_quick_settings_close" msgid="2974895537860082341">"पॅनेल बंद करा."</string>
+    <string name="accessibility_quick_settings_close" msgid="2974895537860082341">"पॅनल बंद करा."</string>
     <string name="accessibility_quick_settings_more_time" msgid="7646479831704665284">"अधिक वेळ."</string>
     <string name="accessibility_quick_settings_less_time" msgid="9110364286464977870">"कमी वेळ."</string>
     <string name="accessibility_quick_settings_flashlight_off" msgid="7606563260714825190">"फ्लॅशलाइट बंद."</string>
@@ -300,8 +298,8 @@
     <string name="accessibility_quick_settings_flashlight_changed_on" msgid="4747870681508334200">"फ्लॅशलाइट सुरू केला."</string>
     <string name="accessibility_quick_settings_color_inversion_changed_off" msgid="7548045840282925393">"रंग उत्क्रमण बंद केले."</string>
     <string name="accessibility_quick_settings_color_inversion_changed_on" msgid="4711141858364404084">"रंग उत्क्रमण सुरू केले."</string>
-    <string name="accessibility_quick_settings_hotspot_changed_off" msgid="7002061268910095176">"मोबाईल हॉटस्पॉट बंद केला."</string>
-    <string name="accessibility_quick_settings_hotspot_changed_on" msgid="2576895346762408840">"मोबाईल हॉटस्पॉट सुरू केला."</string>
+    <string name="accessibility_quick_settings_hotspot_changed_off" msgid="7002061268910095176">"मोबाइल हॉटस्पॉट बंद केला."</string>
+    <string name="accessibility_quick_settings_hotspot_changed_on" msgid="2576895346762408840">"मोबाइल हॉटस्पॉट सुरू केला."</string>
     <string name="accessibility_casting_turned_off" msgid="1387906158563374962">"स्क्रीन कास्ट करणे थांबले."</string>
     <string name="accessibility_quick_settings_work_mode_off" msgid="562749867895549696">"कार्य मोड बंद."</string>
     <string name="accessibility_quick_settings_work_mode_on" msgid="2779253456042059110">"कार्य मोड सुरू."</string>
@@ -626,10 +624,10 @@
     <string name="qs_status_phone_vibrate" msgid="7055409506885541979">"फोन व्हायब्रेटवर आहे"</string>
     <string name="qs_status_phone_muted" msgid="3763664791309544103">"फोन म्यूट केला"</string>
     <string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. सशब्द करण्यासाठी टॅप करा."</string>
-    <string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. व्हायब्रेट सेट करण्यासाठी टॅप करा. प्रवेशयोग्यता सेवा नि:शब्द केल्या जाऊ शकतात."</string>
-    <string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. नि:शब्द करण्यासाठी टॅप करा. प्रवेशक्षमता सेवा नि:शब्द केल्या जाऊ शकतात."</string>
+    <string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. व्हायब्रेट सेट करण्यासाठी टॅप करा. प्रवेशयोग्यता सेवा म्यूट केल्या जाऊ शकतात."</string>
+    <string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. म्यूट करण्यासाठी टॅप करा. प्रवेशक्षमता सेवा म्यूट केल्या जाऊ शकतात."</string>
     <string name="volume_stream_content_description_vibrate_a11y" msgid="2742330052979397471">"%1$s. व्हायब्रेट सेट करण्यासाठी टॅप करा."</string>
-    <string name="volume_stream_content_description_mute_a11y" msgid="5743548478357238156">"%1$s. नि:शब्द करण्यासाठी टॅप करा."</string>
+    <string name="volume_stream_content_description_mute_a11y" msgid="5743548478357238156">"%1$s. म्यूट करण्यासाठी टॅप करा."</string>
     <string name="volume_ringer_hint_mute" msgid="4263821214125126614">"म्यूट करा"</string>
     <string name="volume_ringer_hint_unmute" msgid="6119086890306456976">"म्यूट काढून टाका"</string>
     <string name="volume_ringer_hint_vibrate" msgid="6211609047099337509">"व्हायब्रेट करा"</string>
@@ -723,7 +721,7 @@
     <string name="bubble_overflow_empty_title" msgid="3120029421991510842">"अलीकडील कोणतेही बबल नाहीत"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"अलीकडील बबल आणि डिसमिस केलेले बबल येथे दिसतील"</string>
     <string name="notification_unblockable_desc" msgid="2073030886006190804">"या सूचनांमध्ये सुधारणा केली जाऊ शकत नाही."</string>
-    <string name="notification_multichannel_desc" msgid="7414593090056236179">"या सूचनांचा संच येथे कॉन्फिगर केला जाऊ शकत नाही"</string>
+    <string name="notification_multichannel_desc" msgid="7414593090056236179">"या सूचनांचा संच येथे कॉंफिगर केला जाऊ शकत नाही"</string>
     <string name="notification_delegate_header" msgid="1264510071031479920">"प्रॉक्सी केलेल्या सूचना"</string>
     <string name="notification_channel_dialog_title" msgid="6856514143093200019">"सर्व <xliff:g id="APP_NAME">%1$s</xliff:g> वरील सूचना"</string>
     <string name="see_more_title" msgid="7409317011708185729">"आणखी पाहा"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"शीर्ष 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"शीर्ष 10"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"तळाशी फुल स्क्रीन"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"स्थिती <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. संपादित करण्यासाठी दोनदा टॅप करा."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g> . जोडण्यासाठी दोनदा टॅप करा."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> हलवा"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> काढा"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g> स्थानावर जोडा"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g> स्थानावर हलवा"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"द्रुत सेटिंग्ज संपादक."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> सूचना: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"अ‍ॅप कदाचित विभाजित-स्क्रीनसह कार्य करू शकत नाही."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"डावलून मागे जा"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"आकार बदला"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"तापल्‍यामुळे फोन बंद झाला"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"तुमचा फोन आता व्‍यवस्थित सुरू आहे"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"तुमचा फोन आता नेहमीप्रमाणे काम करत आहे.\nअधिक माहितीसाठी टॅप करा"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"तुमचा फोन खूप तापलाय, म्हणून तो थंड होण्यासाठी बंद झाला आहे. तुमचा फोन आता व्‍यवस्थित सुरू आहे.\n\nतुम्ही असे केल्यास तुमचा फोन खूप तापेल:\n	•संसाधन केंद्रित अ‍ॅप वापरणे (गेमिंग, व्हिडिओ किंवा नेव्हिगेशन अ‍ॅप यासारखे)\n	•मोठ्या फाइल डाउनलोड किंवा अपलोड करणे\n	•उच्च तापमानामध्ये तुमचा फोन वापरणे"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"काय काळजी घ्यावी ते पाहा"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"फोन ऊष्ण होत आहे"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"फोन थंड होत असताना काही वैशिष्‍ट्ये मर्यादित असतात"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"फोन थंड होईपर्यंत काही वैशिष्ट्ये मर्यादित केली.\nअधिक माहितीसाठी टॅप करा"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"तुमचा फोन स्वयंचलितपणे थंड होईल. तुम्ही अद्यापही तुमचा फोन वापरू शकता परंतु तो कदाचित धीमेपणे कार्य करेल.\n\nतुमचा फोन एकदा थंड झाला की, तो सामान्यपणे कार्य करेल."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"काय काळजी घ्यावी ते पाहा"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"चार्जर अनप्लग करा"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"हे डिव्हाइस चार्ज करताना समस्या आहे. पॉवर अडॅप्टर अनप्लग करा आणि शक्य तेवढी काळजी घ्या कदाचित केबल गरम असू शकते."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"काय काळजी घ्यावी ते पाहा"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"सर्वसाधारण मेसेज"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"स्टोरेज"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"सूचना"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"इन्सटंट अ‍ॅप्स"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> रन होत आहे"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"इंस्टॉल केल्याशिवाय अ‍ॅप उघडले."</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"इंस्टॉल केल्याशिवाय अ‍ॅप उघडले. अधिक जाणून घेण्यासाठी टॅप करा."</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"सेटिंग्ज"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"समजले"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI हीप डंप करा"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> तुमचे <xliff:g id="TYPES_LIST">%2$s</xliff:g> वापरत आहे."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ॲप्लिकेशन्स तुमचे <xliff:g id="TYPES_LIST">%s</xliff:g> वापरत आहे."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" आणि "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"कॅमेरा"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"स्थान"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"मायक्रोफोन"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"सेन्सर बंद आहेत"</string>
     <string name="device_services" msgid="1549944177856658705">"डिव्हाइस सेवा"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"शीर्षक नाही"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"शिफारशी लोड करत आहे"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"मीडिया"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"सध्याचे सेशन लपवा."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"लपवा"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"डिसमिस करा"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"पुन्हा सुरू करा"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"सेटिंग्ज"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"निष्क्रिय, ॲप तपासा"</string>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 84da74b..ee558d4 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Sambung semula"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Batal"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Kongsi"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Padam"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Rakaman skrin dibatalkan"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Rakaman skrin disimpan, ketik untuk melihat"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Rakaman skrin dipadamkan"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Ralat semasa memadamkan rakaman skrin"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Gagal mendapatkan kebenaran"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Ralat semasa memulakan rakaman skrin"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Atas 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Atas 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Skrin penuh bawah"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Kedudukan <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dwiketik untuk mengedit."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dwiketik untuk menambah."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Alihkan <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Alih keluar <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Tambahkan <xliff:g id="TILE_NAME">%1$s</xliff:g> pada kedudukan <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Alihkan <xliff:g id="TILE_NAME">%1$s</xliff:g> ke kedudukan <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"alih keluar jubin"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"tambahkan jubin pada bahagian hujung"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Alihkan jubin"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Tambahkan jubin"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Alih ke <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Tambahkan pada kedudukan <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Kedudukan <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor tetapan pantas."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Pemberitahuan <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Apl mungkin tidak berfungsi dengan skrin pisah."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Langkau ke sebelumnya"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Ubah saiz"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefon dimatikan kerana panas"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefon anda kini berjalan seperti biasa"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefon anda kini berjalan seperti biasa.\nKetik untuk mendapatkan maklumat lanjut"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon anda terlalu panas, jadi telefon itu telah dimatikan untuk menyejuk. Sekarang, telefon anda berjalan seperti biasa.\n\nTelefon anda mungkin menjadi terlalu panas jika anda:\n	• Menggunakan apl intensif sumber (seperti permainan, video atau apl navigasi)\n	• Memuat turun atau memuat naik fail besar\n	• Menggunakan telefon anda dalam suhu tinggi"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Lihat langkah penjagaan"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon semakin panas"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Sesetengah ciri adalah terhad semasa telefon menyejuk"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Sesetengah ciri adalah terhad semasa telefon menyejuk.\nKetik untuk mendapatkan maklumat lanjut"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefon anda akan cuba menyejuk secara automatik. Anda masih dapat menggunakan telefon itu tetapi telefon tersebut mungkin berjalan lebih perlahan.\n\nSetelah telefon anda sejuk, telefon itu akan berjalan seperti biasa."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Lihat langkah penjagaan"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Cabut palam pengejas"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Terdapat isu semasa mengecas peranti ini. Cabut palam penyesuai kuasa. Berhati-hati kerana kabel mungkin hangat."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Lihat langkah penjagaan"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Tetapan"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"DumpSys"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> sedang menggunakan <xliff:g id="TYPES_LIST">%2$s</xliff:g> anda."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikasi sedang menggunakan <xliff:g id="TYPES_LIST">%s</xliff:g> anda."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" dan "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"lokasi"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Penderia dimatikan"</string>
     <string name="device_services" msgid="1549944177856658705">"Perkhidmatan Peranti"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Tiada tajuk"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Memuatkan cadangan"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Sembunyikan sesi semasa."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Sembunyikan"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Tolak"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Sambung semula"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Tetapan"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Tidak aktif, semak apl"</string>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index 75d05d4..73f5b03d 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ဆက်လုပ်ရန်"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"မလုပ်တော့"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"မျှဝေရန်"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ဖျက်ရန်"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"ဖန်သားပြင် ရိုက်ကူးမှု ပယ်ဖျက်လိုက်ပါပြီ"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"ဖန်သားပြင် ရိုက်ကူးမှု သိမ်းထားသည်၊ ကြည့်ရန် တို့ပါ"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"ဖန်သားပြင် ရိုက်ကူးမှု ဖျက်ပြီးပါပြီ"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"ဖန်သားပြင် ရိုက်ကူးမှု ဖျက်ရာတွင် အမှားအယွင်းရှိနေသည်"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"ခွင့်ပြုချက် မရယူနိုင်ပါ"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"ဖန်သားပြင် ရိုက်ကူးမှု စတင်ရာတွင် အမှားအယွင်းရှိနေသည်"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"အပေါ်ဘက် မျက်နှာပြင် ၅၀%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"အပေါ်ဘက် မျက်နှာပြင် ၃၀%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"အောက်ခြေ မျက်နှာပြင်အပြည့်"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>၊ <xliff:g id="TILE_NAME">%2$s</xliff:g> နေရာ။ တည်းဖြတ်ရန် နှစ်ချက်တို့ပါ။"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>။ ပေါင်းထည့်ရန် နှစ်ချက်တို့ပါ။"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ကိုရွှေ့ပါ"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ကိုဖယ်ရှားပါ"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ကို အနေအထား <xliff:g id="POSITION">%2$d</xliff:g> သို့ ပေါင်းထည့်ရန်"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ကို အနေအထား <xliff:g id="POSITION">%2$d</xliff:g> သို့ ရွှေ့ရန်"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"မြန်ဆန်သည့် ဆက်တင်တည်းဖြတ်စနစ်"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> အကြောင်းကြားချက် − <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"မျက်နှာပြင် ခွဲခြမ်းပြသမှုဖြင့် အက်ပ်သည် အလုပ်လုပ်မည် မဟုတ်ပါ။"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"ယခင်တစ်ခုသို့ ပြန်သွားရန်"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"အရွယ်အစားပြောင်းရန်"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"အပူရှိန်ကြောင့်ဖုန်းပိတ်ထားသည်"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"သင်၏ဖုန်းသည် ပုံမှန် အလုပ်လုပ်နေပါသည်"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"သင့်ဖုန်းသည် ယခု ပုံမှန်အလုပ်လုပ်နေပါပြီ။\nနောက်ထပ်အချက်အလက်များအတွက် တို့ပါ"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"သင့်ဖုန်းအလွန်ပူနေသည့်အတွက် အေးသွားစေရန် ပိတ်ထားပါသည်။ ယခုပုံမှန် အလုပ်လုပ်ပါပြီ။\n\nအောက်ပါတို့ကိုသုံးလျှင် ပူလာပါမည်-\n	• အရင်းအမြစ်များသောအက်ပ်ကို သုံးခြင်း (ဥပမာ ဂိမ်းကစားခြင်း၊ ဗီဒီယိုကြည့်ခြင်း (သို့) လမ်းညွှန်အက်ပ်)\n	• ကြီးမားသောဖိုင်များ ဒေါင်းလုဒ် (သို့) အပ်လုဒ်လုပ်ခြင်း\n	• အပူရှိန်မြင့်သောနေရာတွင် သုံးခြင်း"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"ဂရုပြုစရာ အဆင့်များ ကြည့်ရန်"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ဖုန်း ပူနွေးလာပါပြီ"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ဖုန်းကို အေးအောင်ပြုလုပ်နေစဉ်တွင် အချို့ဝန်ဆောင်မှုများကို ကန့်သတ်ထားပါသည်"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ဖုန်းကို အေးအောင်ပြုလုပ်နေစဉ်တွင် အချို့ဝန်ဆောင်မှုများကို ကန့်သတ်ထားပါသည်။\nနောက်ထပ်အချက်အလက်များအတွက် တို့ပါ"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"သင့်ဖုန်းသည် အလိုအလျောက် ပြန်အေးသွားပါလိမ့်မည်။ ဖုန်းကို အသုံးပြုနိုင်ပါသေးသည် သို့သော် ပိုနှေးနိုင်ပါသည်။\n\nသင့်ဖုန်း အေးသွားသည်နှင့် ပုံမှန်အတိုင်း ပြန်အလုပ်လုပ်ပါလိမ့်မည်။"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"ဂရုပြုစရာ အဆင့်များ ကြည့်ရန်"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"အားသွင်းကိရိယာ ပလပ်ဖြုတ်ပါ"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ဤစက်ပစ္စည်းကို အားသွင်းရာတွင် ပြဿနာရှိနေသည်။ ပါဝါ ကြားခံကိရိယာကို ပလပ်ဖြုတ်ပါ။ ကေဘယ်ကြိုး ပူနွေးနေနိုင်သဖြင့် သတိထားပါ။"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"ဂရုပြုစရာ အဆင့်များ ကြည့်ရန်"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ဆက်တင်များ"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"ရပါပြီ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> က သင်၏ <xliff:g id="TYPES_LIST">%2$s</xliff:g> ကို အသုံးပြုနေသည်။"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"အပလီကေးရှင်းများက သင်၏ <xliff:g id="TYPES_LIST">%s</xliff:g> ကို အသုံးပြုနေသည်။"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"၊ "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" နှင့် "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"ကင်မရာ"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"တည်နေရာ"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"မိုက်ခရိုဖုန်း"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"အာရုံခံကိရိယာများ ပိတ်ထားသည်"</string>
     <string name="device_services" msgid="1549944177856658705">"စက်ပစ္စည်းဝန်ဆောင်မှုများ"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"ခေါင်းစဉ် မရှိပါ"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"အကြံပြုချက်များ ဖွင့်နေသည်"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"မီဒီယာ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"လက်ရှိ စက်ရှင်ကို ဖျောက်ထားမည်။"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"ဖျောက်ထားမည်"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ပယ်ရန်"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"ဆက်လုပ်ရန်"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ဆက်တင်များ"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"ရပ်နေသည်၊ အက်ပ်ကို စစ်ဆေးပါ"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index af8d6f6..745e3d8 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Gjenoppta"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Avbryt"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Del"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Slett"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Skjermopptak er avbrutt"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Skjermopptaket er lagret. Trykk for å se det"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Skjermopptaket er slettet"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Feil ved sletting av skjermopptaket"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Kunne ikke få tillatelser"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Feil ved start av skjermopptaket"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Sett størrelsen på den øverste delen av skjermen til 50 %"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Sett størrelsen på den øverste delen av skjermen til 30 %"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Utvid den nederste delen av skjermen til hele skjermen"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Plassering <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dobbelttrykk for å endre."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dobbelttrykk for å legge til."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Flytt <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Fjern <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Legg til <xliff:g id="TILE_NAME">%1$s</xliff:g> i posisjon <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Flytt <xliff:g id="TILE_NAME">%1$s</xliff:g> til posisjon <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"fjerne infobrikken"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"legge til en infobrikke på slutten"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Flytt infobrikken"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Legg til en infobrikke"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Flytt til <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Legg til posisjonen <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posisjon <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Redigeringsvindu for hurtiginnstillinger."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-varsel: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Det kan hende at appen ikke fungerer med delt skjerm."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Hopp til forrige"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Endre størrelse"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefon ble slått av pga varme"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefonen din kjører nå som normalt"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefonen kjører nå som normalt.\nTrykk for å se mer informasjon"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefonen din var for varm, så den ble slått av for å kjøles ned. Telefonen din kjører nå som normalt.\n\nTelefonen kan blir for varm hvis du:\n	• bruker ressurskrevende apper (for eksempel spill-, video- eller navigeringsapper)\n	• laster store filer opp eller ned\n	• bruker telefonen ved høy temperatur"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Se vedlikeholdstrinnene"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefonen begynner å bli varm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Enkelte funksjoner er begrenset mens telefonen kjøles ned"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Enkelte funksjoner er begrenset mens telefonen kjøles ned.\nTrykk for å se mer informasjon"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefonen din kommer til å prøve å kjøle seg ned automatisk. Du kan fremdeles bruke telefonen, men den kjører muligens saktere.\n\nTelefonen kommer til å kjøre som normalt, når den har kjølt seg ned."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Se vedlikeholdstrinnene"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Koble fra laderen"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Det oppsto et problem med lading av enheten. Koble fra strømadapteren, og vær forsiktig, kabelen kan være varm."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Se vedlikeholdstrinnene"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Innstillinger"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Greit"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI-heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> bruker <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Apper bruker <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" og "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"posisjon"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensorer er av"</string>
     <string name="device_services" msgid="1549944177856658705">"Enhetstjenester"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Ingen tittel"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Laster inn anbefalinger"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Medier"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Skjul den nåværende økten."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Skjul"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Lukk"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Gjenoppta"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Innstillinger"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inaktiv. Sjekk appen"</string>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index e0d20e6..e01ba71 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"जारी राख्नुहोस्"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"रद्द गर्नुहोस्"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"सेयर गर्नुहोस्"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"मेट्नुहोस्"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"स्क्रिन रेकर्ड गर्ने कार्य रद्द गरियो"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"स्क्रिन रेकर्डिङ सुरक्षित गरियो, हेर्न ट्याप गर्नुहोस्‌"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"स्क्रिनको रेकर्डिङ मेटाइयो"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"स्क्रिनको रेकर्डिङ मेट्ने क्रममा त्रुटि"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"अनुमति प्राप्त गर्न सकिएन"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"स्क्रिन रेकर्ड गर्न थाल्ने क्रममा त्रुटि भयो"</string>
@@ -368,7 +366,7 @@
     <string name="quick_settings_location_off_label" msgid="7923929131443915919">"स्थान बन्द छ"</string>
     <string name="quick_settings_media_device_label" msgid="8034019242363789941">"मिडिया उपकरण"</string>
     <string name="quick_settings_rssi_label" msgid="3397615415140356701">"RSSI"</string>
-    <string name="quick_settings_rssi_emergency_only" msgid="7499207215265078598">"आपतकालीन कल मात्र"</string>
+    <string name="quick_settings_rssi_emergency_only" msgid="7499207215265078598">"आपत्‌कालीन कल मात्र"</string>
     <string name="quick_settings_settings_label" msgid="2214639529565474534">"सेटिङहरू"</string>
     <string name="quick_settings_time_label" msgid="3352680970557509303">"समय"</string>
     <string name="quick_settings_user_label" msgid="1253515509432672496">"मलाई"</string>
@@ -686,8 +684,8 @@
     <string name="do_not_silence_block" msgid="4361847809775811849">"मौन नगर्नुहोस् वा नरोक्नुहोस्"</string>
     <string name="tuner_full_importance_settings" msgid="1388025816553459059">"सशक्त सूचना नियन्त्रण"</string>
     <string name="tuner_full_importance_settings_on" msgid="917981436602311547">"अन छ"</string>
-    <string name="tuner_full_importance_settings_off" msgid="5580102038749680829">"निष्क्रिय"</string>
-    <string name="power_notification_controls_description" msgid="1334963837572708952">"सशक्त सूचना नियन्त्रणहरू मार्फत तपाईं अनुप्रयाेगका सूचनाहरूका लागि ० देखि ५ सम्मको महत्व सम्बन्धी स्तर सेट गर्न सक्नुहुन्छ। \n\n"<b>"स्तर ५"</b>" \n- सूचनाको सूचीको माथिल्लो भागमा देखाउने \n- पूर्ण स्क्रिनमा अवरोधका लागि अनुमति दिने \n- सधैँ चियाउने \n\n"<b>"स्तर ४"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- सधैँ चियाउने \n\n"<b>"स्तर ३"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- कहिल्यै नचियाउने \n\n"<b>"स्तर २"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- कहिल्यै नचियाउने \n- कहिल्यै पनि आवाज ननिकाल्ने र कम्पन नगर्ने \n\n"<b>"स्तर १"</b>" \n- पूर्ण स्क्रिनमा अवरोध रोक्ने \n- कहिल्यै नचियाउने \n- कहिल्यै पनि आवाज ननिकाल्ने वा कम्पन नगर्ने \n- लक स्क्रिन र वस्तुस्थिति पट्टीबाट लुकाउने \n- सूचनाको सूचीको तल्लो भागमा देखाउने \n\n"<b>"स्तर ०"</b>" \n- अनुप्रयोगका सबै सूचनाहरूलाई रोक्ने"</string>
+    <string name="tuner_full_importance_settings_off" msgid="5580102038749680829">"अफ"</string>
+    <string name="power_notification_controls_description" msgid="1334963837572708952">"सशक्त सूचना नियन्त्रणहरू मार्फत तपाईं अनुप्रयाेगका सूचनाहरूका लागि ० देखि ५ सम्मको महत्व सम्बन्धी स्तर सेट गर्न सक्नुहुन्छ। \n\n"<b>"स्तर ५"</b>" \n- सूचनाको सूचीको माथिल्लो भागमा देखाउने \n- पूर्ण स्क्रिनमा अवरोधका लागि अनुमति दिने \n- सधैँ चियाउने \n\n"<b>"स्तर ४"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- सधैँ चियाउने \n\n"<b>"स्तर ३"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- कहिल्यै नचियाउने \n\n"<b>"स्तर २"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- कहिल्यै नचियाउने \n- कहिल्यै पनि आवाज ननिकाल्ने र कम्पन नगर्ने \n\n"<b>"स्तर १"</b>" \n- पूर्ण स्क्रिनमा अवरोध रोक्ने \n- कहिल्यै नचियाउने \n- कहिल्यै पनि आवाज ननिकाल्ने वा कम्पन नगर्ने \n- लक स्क्रिन र वस्तुस्थिति पट्टीबाट लुकाउने \n- सूचनाको सूचीको तल्लो भागमा देखाउने \n\n"<b>"स्तर ०"</b>" \n- एपका सबै सूचनाहरूलाई रोक्ने"</string>
     <string name="notification_header_default_channel" msgid="225454696914642444">"सूचनाहरू"</string>
     <string name="notification_channel_disabled" msgid="928065923928416337">"तपाईं अब उप्रान्त यी सूचनाहरू देख्नु हुने छैन"</string>
     <string name="notification_channel_minimized" msgid="6892672757877552959">"यी सूचनाहरू सानो बनाइने छ"</string>
@@ -707,7 +705,7 @@
     <string name="inline_silent_button_alert" msgid="5705343216858250354">"सतर्क गराउने"</string>
     <string name="inline_silent_button_keep_alerting" msgid="6577845442184724992">"सर्तक गराइरहनुहोस्"</string>
     <string name="inline_turn_off_notifications" msgid="8543989584403106071">"सूचनाहरू निष्क्रिय पार्नुहोस्"</string>
-    <string name="inline_keep_showing_app" msgid="4393429060390649757">"यो अनुप्रयोगका सूचनाहरू देखाउने क्रम जारी राख्ने हो?"</string>
+    <string name="inline_keep_showing_app" msgid="4393429060390649757">"यो एपका सूचनाहरू देखाउने क्रम जारी राख्ने हो?"</string>
     <string name="notification_silence_title" msgid="8608090968400832335">"मौन"</string>
     <string name="notification_alert_title" msgid="3656229781017543655">"पूर्वनिर्धारित"</string>
     <string name="notification_bubble_title" msgid="8330481035191903164">"बबल"</string>
@@ -826,7 +824,7 @@
     <string name="accessibility_data_saver_on" msgid="5394743820189757731">"डेटा सेभर सक्रिय छ"</string>
     <string name="accessibility_data_saver_off" msgid="58339669022107171">"डेटा सेभर बन्द छ"</string>
     <string name="switch_bar_on" msgid="1770868129120096114">"सक्रिय गर्नुहोस्"</string>
-    <string name="switch_bar_off" msgid="5669805115416379556">"निष्क्रिय"</string>
+    <string name="switch_bar_off" msgid="5669805115416379556">"अफ"</string>
     <string name="tile_unavailable" msgid="3095879009136616920">"उपलब्ध छैन"</string>
     <string name="nav_bar" msgid="4642708685386136807">"नेभिगेशन पट्टी"</string>
     <string name="nav_bar_layout" msgid="4716392484772899544">"लेआउट"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"माथिल्लो भाग ५०%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"माथिल्लो भाग ३०%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"तल्लो भाग फुल स्क्रिन"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"स्थिति <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>। सम्पादन गर्नाका लागि डबल ट्याप गर्नुहोस्।"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>। थप्नका लागि डबल ट्याप गर्नुहोस्।"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> लाई सार्नुहोस्"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> लाई हटाउनुहोस्"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> लाई <xliff:g id="POSITION">%2$d</xliff:g> स्थितिमा थप्नुहोस्"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> लाई <xliff:g id="POSITION">%2$d</xliff:g> स्थितिमा सार्नुहोस्"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"द्रुत सेटिङ सम्पादक।"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> को सूचना: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"अनुप्रयोगले विभाजित-स्क्रिनमा काम नगर्न सक्छ।"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"अघिल्लोमा जानुहोस्"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"आकार बदल्नुहोस्"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"फोन अति नै तातिएकाले चिसिन बन्द भयो"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"तपाईंको फोन अब सामान्य ढंगले चल्दै छ"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"तपाईंको फोन अहिले सामान्य रूपमा चलिरहेको छ।\nथप जानकारीका लागि ट्याप गर्नुहोस्"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"तपाईंको फोन अति नै तातिएकाले चिसिन बन्द भयो। तपाईंको फोन अब सामान्य ढंगले चल्दै छ।\n\nतपाईंले निम्न कुराहरू गर्नुभयो भने तपाईंको फोन अत्यन्त तातो हुनसक्छ:\n	• धेरै संसाधन खपत गर्ने एपहरूको प्रयोग (जस्तै गेमिङ, भिडियो वा नेभिगेसन एपहरू)\n	• ठूला फाइलहरूको डाउनलोड वा अपलोड\n	• उच्च तापक्रममा फोनको प्रयोग"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"यन्त्रको हेरचाह गर्ने तरिका हेर्नुहोस्"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"फोन तातो भइरहेको छ"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"फोन चिसो हुँदै गर्दा केही विशेषताहरूलाई सीमित गरिन्छ"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"फोन नचिस्सिँदासम्म केही सुविधाहरू उपलब्ध हुने छैनन्।\nथप जानकारीका लागि ट्याप गर्नुहोस्"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"तपाईंको फोन स्वतः चिसो हुने प्रयास गर्ने छ। तपाईं अझै पनि आफ्नो फोनको प्रयोग गर्न सक्नुहुन्छ तर त्यो अझ ढिलो चल्न सक्छ।\n\nचिसो भएपछि तपाईंको फोन सामान्य गतिमा चल्नेछ।"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"यन्त्रको हेरचाह गर्ने तरिका हेर्नुहोस्"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"चार्जर अनप्लग गर्नुहोस्‌"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"यो यन्त्र चार्ज गर्दा कुनै समस्या भयो। पावर एडाप्टर अनप्लग गर्नुहोस्‌ र केबल तातो हुन सक्ने भएकाले ध्यान दिनुहोस्‌।"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"हेरचाहसम्बन्धी चरणहरू हेर्नुहोस्‌"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"सेटिङहरू"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"बुझेँ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> ले तपाईंको <xliff:g id="TYPES_LIST">%2$s</xliff:g> प्रयोग गर्दै छ।"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"एपहरूले तपाईंको <xliff:g id="TYPES_LIST">%s</xliff:g> प्रयोग गर्दै छन्‌।"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" र "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"क्यामेरा"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"स्थान"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"माइक्रोफोन"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"सेन्सरहरू निष्क्रिय छन्"</string>
     <string name="device_services" msgid="1549944177856658705">"यन्त्रका सेवाहरू"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"शीर्षक छैन"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"सिफारिसहरू लोड गर्दै"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"मिडिया"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"हालको सत्र लुकाउनुहोस्।"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"लुकाउनुहोस्"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"हटाउनुहोस्"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"सुचारु गर्नुहोस्"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"सेटिङ"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"निष्क्रिय छ, एप जाँच गर्नु…"</string>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index a65794b..1c23345 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Hervatten"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Annuleren"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Delen"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Verwijderen"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Schermopname geannuleerd"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Schermopname opgeslagen, tik om te bekijken"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Schermopname verwijderd"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Fout bij verwijderen van schermopname"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Kan rechten niet ophalen"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Fout bij starten van schermopname"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Bovenste scherm 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Bovenste scherm 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Onderste scherm op volledig scherm"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Positie <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dubbeltik om te bewerken."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dubbeltik om toe te voegen."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> verplaatsen"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> verwijderen"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> toevoegen aan positie <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> verplaatsen naar positie <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"tegel verwijderen"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"tegel toevoegen aan einde"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Tegel verplaatsen"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Tegel toevoegen"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Verplaatsen naar <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Toevoegen aan positie <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Positie <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor voor \'Snelle instellingen\'."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-melding: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"App werkt mogelijk niet met gesplitst scherm."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Teruggaan naar vorige"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Formaat aanpassen"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefoon uitgezet wegens hitte"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Je telefoon presteert nu weer zoals gebruikelijk"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Je telefoon functioneert nu weer zoals gebruikelijk.\nTik voor meer informatie"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Je telefoon was te warm en is uitgeschakeld om af te koelen. Je telefoon presteert nu weer zoals gebruikelijk.\n\nJe telefoon kan warm worden als je:\n	• bronintensieve apps gebruikt (zoals game-, video-, of navigatie-apps),\n	• grote bestanden up- of downloadt,\n	• je telefoon gebruikt bij hoge temperaturen."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Onderhoudsstappen bekijken"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"De telefoon wordt warm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Bepaalde functies zijn beperkt terwijl de telefoon afkoelt"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Bepaalde functies zijn beperkt terwijl de telefoon afkoelt.\nTik voor meer informatie"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Je telefoon probeert automatisch af te koelen. Je kunt je telefoon nog steeds gebruiken, maar deze kan langzamer werken.\n\nZodra de telefoon is afgekoeld, werkt deze weer normaal."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Onderhoudsstappen bekijken"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Oplader loskoppelen"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Er is een probleem met het opladen van dit apparaat. Koppel de voedingsadapter los. Wees voorzichtig, want de kabel kan warm zijn."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Onderhoudsstappen bekijken"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Instellingen"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> gebruikt je <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Apps gebruiken je <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" en "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"camera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"locatie"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microfoon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensoren uit"</string>
     <string name="device_services" msgid="1549944177856658705">"Apparaatservices"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Geen titel"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Aanbevelingen laden"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"De huidige sessie verbergen."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Verbergen"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Sluiten"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Hervatten"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Instellingen"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactief, check de app"</string>
diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml
index 9527c3f..cdb3b04 100644
--- a/packages/SystemUI/res/values-or/strings.xml
+++ b/packages/SystemUI/res/values-or/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ପୁଣି ଚାଲୁ କରନ୍ତୁ"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"ବାତିଲ୍‌ କରନ୍ତୁ"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"ସେୟାର୍‍ କରନ୍ତୁ"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ଡିଲିଟ୍ କରନ୍ତୁ"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"ସ୍କ୍ରିନ୍‍ ରେକର୍ଡିଂ ବାତିଲ୍‌ କରିଦିଆଯାଇଛି"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"ସ୍କ୍ରିନ୍‍ ରେକର୍ଡିଂ ସେଭ୍‍ ହୋଇଛି, ଦେଖିବାକୁ ଟାପ୍‍ କରନ୍ତୁ"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"ସ୍କ୍ରିନ୍‍ ରେକର୍ଡିଂ ଡିଲିଟ୍‍ କରିଦିଆଯାଇଛି"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"ସ୍କ୍ରିନ୍‍ ରେକର୍ଡିଂ ଡିଲିଟ୍‍ କରିବାରେ ତ୍ରୁଟି"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"ଅନୁମତି ପାଇବାରେ ଅସଫଳ ହେଲା।"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"ସ୍କ୍ରିନ୍ ରେକର୍ଡିଂ ଆରମ୍ଭ କରିବାରେ ତ୍ରୁଟି"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ଉପର ଆଡ଼କୁ 50% କରନ୍ତୁ"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ଉପର ଆଡ଼କୁ 30% କରନ୍ତୁ"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ତଳ ଅଂଶର ପୂର୍ଣ୍ଣ ସ୍କ୍ରୀନ୍‍"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ଅବସ୍ଥାନ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>। ଏଡିଟ୍ କରିବାକୁ ଡବଲ୍‍-ଟାପ୍‍ କରନ୍ତୁ।"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>। ଯୋଡ଼ିବା ପାଇଁ ଡବଲ୍‍-ଟାପ୍‍ କରନ୍ତୁ।"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ନିଅନ୍ତୁ"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ବାହାର କରିଦିଅନ୍ତୁ"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="POSITION">%2$d</xliff:g> ଅବସ୍ଥାନକୁ <xliff:g id="TILE_NAME">%1$s</xliff:g> ଯୋଡନ୍ତୁ"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g> ଅବସ୍ଥାନକୁ <xliff:g id="TILE_NAME">%1$s</xliff:g> ଘୁଞ୍ଚାନ୍ତୁ"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ଦ୍ରୁତ ସେଟିଙ୍ଗ ଏଡିଟର୍।"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ବିଜ୍ଞପ୍ତି: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"ସ୍ପ୍ଲିଟ୍‍-ସ୍କ୍ରୀନରେ ଆପ୍‍ କାମ କରିନପାରେ।"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"ପୂର୍ବବର୍ତ୍ତୀକୁ ଛାଡ଼ନ୍ତୁ"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"ରିସାଇଜ୍ କରନ୍ତୁ"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ଗରମ ହେତୁ ଫୋନ୍‍ ଅଫ୍‍ କରିଦିଆଗଲା"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"ଆପଣଙ୍କ ଫୋନ୍‍ ବର୍ତ୍ତମାନ ସାମାନ୍ୟ ଅବସ୍ଥାରେ ଚାଲୁଛି"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"ଆପଣଙ୍କ ଫୋନ୍ ବର୍ତ୍ତମାନ ସାମାନ୍ୟ ରୂପେ ଚାଲୁଛି।\nଅଧିକ ସୂଚନା ପାଇଁ ଟାପ୍ କରନ୍ତୁ"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"ଆପଣଙ୍କ ଫୋନ୍‍ ବହୁତ ଗରମ ଥିଲା, ତେଣୁ ଏହାକୁ ଥଣ୍ଡା କରାଯିବାକୁ ଅଫ୍‍ କରିଦିଆଗଲା। ଆପଣଙ୍କ ଫୋନ୍‍ ବର୍ତ୍ତମାନ ସାମାନ୍ୟ ଅବସ୍ଥାରେ ଚାଲୁଛି।\n\nଆପଣଙ୍କ ଫୋନ୍‍ ଅଧିକ ଗରମ ହୋଇଯାଇପାରେ ଯଦି ଆପଣ:\n	• ରିସୋର୍ସ-ଇଣ୍ଟେନସିଭ୍‍ ଆପ୍‍ (ଯେପରିକି ଗେମିଙ୍ଗ, ଭିଡିଓ, କିମ୍ବା ନେଭିଗେସନ୍‍ ଆପ୍‍) ବ୍ୟବହାର କରନ୍ତି\n	• ବଡ ଫାଇଲ୍‍ ଡାଉନଲୋଡ୍ କିମ୍ବା ଅପଲୋଡ୍‍ କରନ୍ତି\n	• ଅଧିକ ତାପମାତ୍ରାରେ ଆପଣଙ୍କ ଫୋନ୍‍ ବ୍ୟବହାର କରନ୍ତି"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"ଯତ୍ନ ନେବା ପାଇଁ ଷ୍ଟେପଗୁଡ଼ିକ ଦେଖନ୍ତୁ"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ଫୋନ୍‍ ଗରମ ହୋଇଯାଉଛି"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ଫୋନ୍‍ ଥଣ୍ଡା ହେବା ସମୟରେ କିଛି ଫିଚର୍ ସୀମିତ ଭାବେ କାମ କରିଥାଏ"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ଫୋନ୍ ଥଣ୍ଡା ହେବା ସମୟରେ କିଛି ଫିଚର୍ ଠିକ ଭାବେ କାମ କରିନଥାଏ।\nଅଧିକ ସୂଚନା ପାଇଁ ଟାପ୍ କରନ୍ତୁ"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"ଆପଣଙ୍କ ଫୋନ୍‍ ସ୍ୱଚାଳିତ ଭାବେ ଥଣ୍ଡା ହେବାକୁ ଚେଷ୍ଟା କରିବ। ଆପଣ ତଥାପି ନିଜ ଫୋନ୍‍ ବ୍ୟବହାର କରିପାରିବେ, କିନ୍ତୁ ଏହା ଧୀରେ ଚାଲିପାରେ।\n\nଆପଣଙ୍କ ଫୋନ୍‍ ଥଣ୍ଡା ହୋଇଯିବାପରେ, ଏହା ସାମାନ୍ୟ ଭାବେ ଚାଲିବ।"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"ଯତ୍ନ ନେବା ପାଇଁ ଷ୍ଟେପଗୁଡ଼ିକ ଦେଖନ୍ତୁ"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ଚାର୍ଜର୍‍ ଅନ୍‍ପ୍ଲଗ୍‌ କରନ୍ତୁ"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ଏହି ଡିଭାଇସ୍ ଚାର୍ଜ କରିବାରେ ଗୋଟିଏ ସମସ୍ୟା ଅଛି। ଯେହେତୁ କେବଳ ଗରମ ହୋଇଯାଇପାରେ, ତେଣୁ ପାୱାର୍ ଆଡପ୍ଟର୍ ଅନ୍‌ପ୍ଲଗ୍‌ କରନ୍ତୁ ଏବଂ ଯତ୍ନ ନିଅନ୍ତୁ।"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"ସେବା ସମ୍ବନ୍ଧିତ ଷ୍ଟେପ୍‌ଗୁଡ଼ିକ ଦେଖନ୍ତୁ"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"ସାଧାରଣ ମେସେଜ୍"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"ଷ୍ଟୋରେଜ୍‌"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"ହିଣ୍ଟ"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"ଇନଷ୍ଟାଣ୍ଟ ଆପ୍‌"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> ଚାଲୁଛି"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"ଇନ୍‍ଷ୍ଟଲ୍‍ ନହୋଇ ଆପ୍‍ ଖୋଲିଛି।"</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"ଇନ୍‍ଷ୍ଟଲ୍‍ ନହୋଇ ଆପ୍‍ ଖୋଲିଛି। ଅଧିକ ଜାଣିବା ପାଇଁ ଟାପ୍‍ କରନ୍ତୁ।"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ସେଟିଂସ୍"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"ବୁଝିଗଲି"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI ହିପ୍ ଡମ୍ପ୍ କରନ୍ତୁ"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> ଆପଣଙ୍କ <xliff:g id="TYPES_LIST">%2$s</xliff:g> ବ୍ୟବହାର କରୁଛନ୍ତି।"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ଆପ୍ଲିକେସନ୍‍ଗୁଡିକ ଆପଣଙ୍କ <xliff:g id="TYPES_LIST">%s</xliff:g> ବ୍ୟବହାର କରୁଛନ୍ତି।"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ଏବଂ "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"କ୍ୟାମେରା"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ଲୋକେସନ୍‍"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"ମାଇକ୍ରୋଫୋନ୍"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"ସେନ୍ସର୍‍ଗୁଡ଼ିକ ବନ୍ଦ ଅଛି"</string>
     <string name="device_services" msgid="1549944177856658705">"ଡିଭାଇସ୍‍ ସେବାଗୁଡିକ"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"କୌଣସି ଶୀର୍ଷକ ନାହିଁ"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"ସୁପାରିଶଗୁଡ଼ିକ ଲୋଡ୍ କରାଯାଉଛି"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"ମିଡିଆ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"ବର୍ତ୍ତମାନର ସେସନ୍ ଲୁଚାନ୍ତୁ।"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"ଲୁଚାନ୍ତୁ"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ଖାରଜ କରନ୍ତୁ"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"ପୁଣି ଆରମ୍ଭ କରନ୍ତୁ"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ସେଟିଂସ୍"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"ନିଷ୍କ୍ରିୟ ଅଛି, ଆପ ଯାଞ୍ଚ କରନ୍ତୁ"</string>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index e1d4a63..3927dd3 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ਮੁੜ-ਚਾਲੂ ਕਰੋ"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"ਰੱਦ ਕਰੋ"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"ਸਾਂਝਾ ਕਰੋ"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ਮਿਟਾਓ"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"ਸਕ੍ਰੀਨ ਦੀ ਰਿਕਾਰਡਿੰਗ ਰੱਦ ਕੀਤੀ ਗਈ"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"ਸਕ੍ਰੀਨ ਰਿਕਾਰਡਿੰਗ ਰੱਖਿਅਤ ਕੀਤੀ ਗਈ, ਦੇਖਣ ਲਈ ਟੈਪ ਕਰੋ"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"ਸਕ੍ਰੀਨ ਰਿਕਾਰਡਿੰਗ ਨੂੰ ਮਿਟਾਇਆ ਗਿਆ"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"ਸਕ੍ਰੀਨ ਰਿਕਾਰਡਿੰਗ ਨੂੰ ਮਿਟਾਉਣ ਦੌਰਾਨ ਗੜਬੜ ਹੋਈ"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"ਇਜਾਜ਼ਤਾਂ ਪ੍ਰਾਪਤ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"ਸਕ੍ਰੀਨ ਰਿਕਾਰਡਿੰਗ ਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਵੇਲੇ ਗੜਬੜ ਹੋਈ"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ਉੱਪਰ 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ਉੱਪਰ 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ਹੇਠਾਂ ਪੂਰੀ ਸਕ੍ਰੀਨ"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ਸਥਿਤੀ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>। ਸੰਪਾਦਨ ਲਈ ਦੋ ਵਾਰ ਟੈਪ ਕਰੋ।"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>। ਸ਼ਾਮਲ ਕਰਨ ਲਈ ਦੋ ਵਾਰ ਟੈਪ ਕਰੋ।"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ਨੂੰ ਤਬਦੀਲ ਕਰੋ"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ਹਟਾਓ"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ਨੂੰ <xliff:g id="POSITION">%2$d</xliff:g> ਸਥਾਨ \'ਤੇ ਸ਼ਾਮਲ ਕਰੋ"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ਨੂੰ <xliff:g id="POSITION">%2$d</xliff:g> ਸਥਾਨ \'ਤੇ ਲਿਜਾਓ"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ਤਤਕਾਲ ਸੈਟਿੰਗਾਂ ਸੰਪਾਦਕ।"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ਸੂਚਨਾ: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਐਪ ਸਪਲਿਟ-ਸਕ੍ਰੀਨ ਨਾਲ ਕੰਮ ਨਾ ਕਰੇ।"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"ਪਿਛਲੇ \'ਤੇ ਜਾਓ"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"ਆਕਾਰ ਬਦਲੋ"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"ਗਰਮ ਹੋਣ ਕਾਰਨ ਫ਼ੋਨ ਬੰਦ ਹੋ ਗਿਆ"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"ਤੁਹਾਡਾ ਫ਼ੋਨ ਹੁਣ ਸਹੀ ਚੱਲ ਰਿਹਾ ਹੈ"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"ਤੁਹਾਡਾ ਫ਼ੋਨ ਹੁਣ ਸਹੀ ਚੱਲ ਰਿਹਾ ਹੈ।\nਵਧੇਰੇ ਜਾਣਕਾਰੀ ਲਈ ਟੈਪ ਕਰੋ"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">\n"ਤੁਹਾਡਾ ਫ਼ੋਨ ਬਹੁਤ ਗਰਮ ਸੀ, ਇਸ ਲਈ ਇਹ ਠੰਡਾ ਹੋਣ ਵਾਸਤੇ ਬੰਦ ਹੋ ਗਿਆ ਸੀ। ਤੁਹਾਡਾ ਫ਼ੋਨ ਹੁਣ ਸਹੀ ਚੱਲ ਰਿਹਾ ਹੈ।\n\nਤੁਹਾਡਾ ਫ਼ੋਨ ਬਹੁਤ ਗਰਮ ਹੋ ਸਕਦਾ ਹੈ ਜੇ:\n	• ਤੁਸੀਂ ਸਰੋਤਾਂ ਦੀ ਵੱਧ ਵਰਤੋਂ ਵਾਲੀਆਂ ਐਪਾਂ (ਜਿਵੇਂ ਗੇਮਿੰਗ, ਵੀਡੀਓ, ਜਾਂ ਦਿਸ਼ਾ-ਨਿਰਦੇਸ਼ ਐਪਾਂ) ਵਰਤਦੇ ਹੋ 	• ਵੱਡੀਆਂ ਫ਼ਾਈਲਾਂ ਡਾਊਨਲੋਡ ਜਾਂ ਅੱਪਲੋਡ ਕਰਦੇ ਹੋ\n	• ਆਪਣੇ ਫ਼ੋਨ ਨੂੰ ਉੱਚ ਤਾਪਮਾਨਾਂ ਵਿੱਚ ਵਰਤਦੇ ਹੋ"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"ਦੇਖਭਾਲ ਦੇ ਪੜਾਅ ਦੇਖੋ"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ਫ਼ੋਨ ਗਰਮ ਹੋ ਰਿਹਾ ਹੈ"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ਫ਼ੋਨ ਦੇ ਠੰਡਾ ਹੋਣ ਦੇ ਦੌਰਾਨ ਕੁਝ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਸੀਮਿਤ ਹੁੰਦੀਆਂ ਹਨ"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ਫ਼ੋਨ ਦੇ ਠੰਡਾ ਹੋਣ ਦੇ ਦੌਰਾਨ ਕੁਝ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਸੀਮਤ ਹੁੰਦੀਆਂ ਹਨ।\nਵਧੇਰੇ ਜਾਣਕਾਰੀ ਲਈ ਟੈਪ ਕਰੋ"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"ਤੁਹਾਡਾ ਫ਼ੋਨ ਸਵੈਚਲਿਤ ਰੂਪ ਵਿੱਚ ਠੰਡਾ ਹੋਣ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੇਗਾ। ਤੁਸੀਂ ਹਾਲੇ ਵੀ ਆਪਣੇ ਫ਼ੋਨ ਨੂੰ ਵਰਤ ਸਕਦੇ ਹੋ, ਪਰੰਤੂ ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਇਹ ਵਧੇਰੇ ਹੌਲੀ ਚੱਲੇ।\n\nਇੱਕ ਵਾਰ ਠੰਡਾ ਹੋਣ ਤੋਂ ਬਾਅਦ ਤੁਹਾਡਾ ਫ਼ੋਨ ਸਧਾਰਨ ਤੌਰ \'ਤੇ ਚੱਲੇਗਾ।"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"ਦੇਖਭਾਲ ਦੇ ਪੜਾਅ ਦੇਖੋ"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ਚਾਰਜਰ ਨੂੰ ਕੱਢੋ"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ਇਸ ਡੀਵਾਈਸ ਨੂੰ ਚਾਰਜ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਆ ਗਈ ਹੈ। ਪਾਵਰ ਅਡਾਪਟਰ ਨੂੰ ਕੱਢੋ ਅਤੇ ਧਿਆਨ ਰੱਖੋ ਸ਼ਾਇਦ ਕੇਬਲ ਗਰਮ ਹੋਵੇ।"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"ਦੇਖਭਾਲ ਦੇ ਪੜਾਅ ਦੇਖੋ"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"ਆਮ ਸੁਨੇਹੇ"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"ਸਟੋਰੇਜ"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"ਸੰਕੇਤ"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"ਤਤਕਾਲ ਐਪਾਂ"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> ਚੱਲ ਰਹੀ ਹੈ"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"ਸਥਾਪਤ ਕੀਤੇ ਬਿਨਾਂ ਐਪ ਖੋਲ੍ਹੀ ਗਈ।"</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"ਸਥਾਪਤ ਕੀਤੇ ਬਿਨਾਂ ਐਪ ਖੋਲ੍ਹੀ ਗਈ। ਹੋਰ ਜਾਣਨ ਲਈ ਟੈਪ ਕਰੋ।"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ਸੈਟਿੰਗਾਂ"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"ਸਮਝ ਲਿਆ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI ਹੀਪ ਡੰਪ ਕਰੋ"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> ਤੁਹਾਡੇ <xliff:g id="TYPES_LIST">%2$s</xliff:g> ਦੀ ਵਰਤੋਂ ਕਰ ਰਹੀ ਹੈ।"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ਐਪਲੀਕੇਸ਼ਨਾਂ ਤੁਹਾਡੇ <xliff:g id="TYPES_LIST">%s</xliff:g> ਦੀ ਵਰਤੋਂ ਕਰ ਰਹੀਆਂ ਹਨ।"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ਅਤੇ "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"ਕੈਮਰਾ"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ਟਿਕਾਣਾ"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"ਮਾਈਕ੍ਰੋਫ਼ੋਨ"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"ਸੈਂਸਰ ਬੰਦ ਕਰੋ"</string>
     <string name="device_services" msgid="1549944177856658705">"ਡੀਵਾਈਸ ਸੇਵਾਵਾਂ"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"ਕੋਈ ਸਿਰਲੇਖ ਨਹੀਂ"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"ਸਿਫ਼ਾਰਸ਼ਾਂ ਲੋਡ ਹੋ ਰਹੀਆਂ ਹਨ"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"ਮੀਡੀਆ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"ਮੌਜੂਦਾ ਸੈਸ਼ਨ ਨੂੰ ਲੁਕਾਓ।"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"ਲੁਕਾਓ"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ਖਾਰਜ ਕਰੋ"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"ਮੁੜ-ਚਾਲੂ ਕਰੋ"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ਸੈਟਿੰਗਾਂ"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"ਅਕਿਰਿਆਸ਼ੀਲ, ਐਪ ਦੀ ਜਾਂਚ ਕਰੋ"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index badaf47..9aae6ce 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Wznów"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Anuluj"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Udostępnij"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Usuń"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Anulowano nagrywanie zawartości ekranu"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Zapisano nagranie zawartości ekranu – kliknij, by je obejrzeć"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Usunięto nagranie zawartości ekranu"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Błąd podczas usuwania nagrania zawartości ekranu"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Nie udało się uzyskać uprawnień"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Błąd podczas rozpoczynania rejestracji zawartości ekranu"</string>
@@ -535,8 +533,8 @@
     <string name="quick_settings_disclosure_named_management" msgid="3476472755775165827">"Właściciel tego urządzenia: <xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g>"</string>
     <string name="quick_settings_disclosure_management_vpns" msgid="371835422690053154">"To urządzenie należy do Twojej organizacji i jest połączone z sieciami VPN"</string>
     <string name="quick_settings_disclosure_named_management_vpns" msgid="4046375645500668555">"To urządzenie należy do organizacji <xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g> i jest połączone z sieciami VPN"</string>
-    <string name="quick_settings_disclosure_managed_profile_monitoring" msgid="1423899084754272514">"Twoja organizacja może monitorować ruch w sieci w Twoim profilu do pracy"</string>
-    <string name="quick_settings_disclosure_named_managed_profile_monitoring" msgid="8321469176706219860">"Organizacja <xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g> może monitorować ruch w sieci w Twoim profilu do pracy"</string>
+    <string name="quick_settings_disclosure_managed_profile_monitoring" msgid="1423899084754272514">"Twoja organizacja może monitorować ruch w sieci w Twoim profilu służbowym"</string>
+    <string name="quick_settings_disclosure_named_managed_profile_monitoring" msgid="8321469176706219860">"Organizacja <xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g> może monitorować ruch w sieci w Twoim profilu służbowym"</string>
     <string name="quick_settings_disclosure_monitoring" msgid="8548019955631378680">"Sieć może być monitorowana"</string>
     <string name="quick_settings_disclosure_vpns" msgid="7213546797022280246">"To urządzenie jest połączone z sieciami VPN"</string>
     <string name="quick_settings_disclosure_managed_profile_named_vpn" msgid="8117568745060010789">"Twój profil służbowy jest połączony z siecią <xliff:g id="VPN_APP">%1$s</xliff:g>"</string>
@@ -554,7 +552,7 @@
     <string name="monitoring_description_named_management" msgid="505833016545056036">"To urządzenie należy do organizacji <xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g>.\n\nAdministrator IT może monitorować ustawienia, firmowe uprawnienia dostępu, aplikacje, dane dotyczące urządzenia i lokalizacji oraz nimi zarządzać.\n\nAby dowiedzieć się więcej, skontaktuj się z administratorem IT."</string>
     <string name="monitoring_description_management" msgid="4308879039175729014">"To urządzenie należy do Twojej organizacji.\n\nAdministrator IT może monitorować ustawienia, firmowe uprawnienia dostępu, aplikacje, dane dotyczące urządzenia i lokalizacji oraz nimi zarządzać.\n\nAby dowiedzieć się więcej, skontaktuj się z administratorem IT."</string>
     <string name="monitoring_description_management_ca_certificate" msgid="7785013130658110130">"Twoja organizacja zainstalowała urząd certyfikacji na tym urządzeniu. Zabezpieczony ruch w sieci może być monitorowany i zmieniany."</string>
-    <string name="monitoring_description_managed_profile_ca_certificate" msgid="7904323416598435647">"Twoja organizacja zainstalowała urząd certyfikacji w Twoim profilu do pracy. Zabezpieczony ruch w sieci może być monitorowany i zmieniany."</string>
+    <string name="monitoring_description_managed_profile_ca_certificate" msgid="7904323416598435647">"Twoja organizacja zainstalowała urząd certyfikacji w Twoim profilu służbowym. Zabezpieczony ruch w sieci może być monitorowany i zmieniany."</string>
     <string name="monitoring_description_ca_certificate" msgid="448923057059097497">"Urząd certyfikacji zainstalowany na tym urządzeniu. Twój zabezpieczony ruch w sieci może być monitorowany i zmieniany."</string>
     <string name="monitoring_description_management_network_logging" msgid="216983105036994771">"Administrator włączył rejestrowanie sieciowe, które pozwala monitorować ruch na Twoim urządzeniu."</string>
     <string name="monitoring_description_named_vpn" msgid="5749932930634037027">"Łączysz się z aplikacją <xliff:g id="VPN_APP">%1$s</xliff:g>, która może monitorować Twoją aktywność w sieci, w tym e-maile, aplikacje i strony internetowe."</string>
@@ -573,13 +571,13 @@
     <string name="monitoring_description_ca_cert_settings" msgid="8329781950135541003">"Otwórz zaufane certyfikaty"</string>
     <string name="monitoring_description_network_logging" msgid="577305979174002252">"Administrator włączył rejestrowanie sieciowe, które pozwala monitorować ruch na Twoim urządzeniu.\n\nAby dowiedzieć się więcej, skontaktuj się z administratorem."</string>
     <string name="monitoring_description_vpn" msgid="1685428000684586870">"Aplikacja otrzymała od Ciebie uprawnienia do konfigurowania połączenia VPN.\n\nMoże ona monitorować Twoją aktywność na urządzeniu i w sieci, w tym e-maile, aplikacje i strony internetowe."</string>
-    <string name="monitoring_description_vpn_profile_owned" msgid="4964237035412372751">"Twoim profilem do pracy zarządza <xliff:g id="ORGANIZATION">%1$s</xliff:g>.\n\nAdministrator może monitorować Twoją aktywność w sieci, w tym e-maile, aplikacje i strony internetowe.\n\nAby dowiedzieć się więcej, skontaktuj się z administratorem.\n\nŁączysz się też z siecią VPN, która może monitorować Twoją aktywność w sieci."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="4964237035412372751">"Twoim profilem służbowym zarządza <xliff:g id="ORGANIZATION">%1$s</xliff:g>.\n\nAdministrator może monitorować Twoją aktywność w sieci, w tym e-maile, aplikacje i strony internetowe.\n\nAby dowiedzieć się więcej, skontaktuj się z administratorem.\n\nŁączysz się też z siecią VPN, która może monitorować Twoją aktywność w sieci."</string>
     <string name="legacy_vpn_name" msgid="4174223520162559145">"VPN"</string>
     <string name="monitoring_description_app" msgid="376868879287922929">"Łączysz się z aplikacją <xliff:g id="APPLICATION">%1$s</xliff:g>, która może monitorować Twoją aktywność w sieci, w tym e-maile, aplikacje i strony internetowe."</string>
     <string name="monitoring_description_app_personal" msgid="1970094872688265987">"Masz połączenie z aplikacją <xliff:g id="APPLICATION">%1$s</xliff:g>, która może monitorować Twoją prywatną aktywność w sieci, w tym e-maile, aplikacje i strony internetowe."</string>
     <string name="branded_monitoring_description_app_personal" msgid="1703511985892688885">"Masz połączenie z aplikacją <xliff:g id="APPLICATION">%1$s</xliff:g>, która może monitorować Twoją prywatną aktywność w sieci, w tym e-maile, aplikacje i strony internetowe."</string>
-    <string name="monitoring_description_app_work" msgid="3713084153786663662">"Organizacja <xliff:g id="ORGANIZATION">%1$s</xliff:g> zarządza Twoim profilem do pracy. Profil jest połączony z aplikacją <xliff:g id="APPLICATION">%2$s</xliff:g>, która może monitorować Twoją aktywność w sieci, w tym e-maile, aplikacje i strony internetowe.\n\nSkontaktuj się z administratorem, aby uzyskać więcej informacji."</string>
-    <string name="monitoring_description_app_personal_work" msgid="6175816356939166101">"Organizacja <xliff:g id="ORGANIZATION">%1$s</xliff:g> zarządza Twoim profilem do pracy. Profil jest połączony z aplikacją <xliff:g id="APPLICATION_WORK">%2$s</xliff:g>, która może monitorować Twoją aktywność w sieci, w tym e-maile, aplikacje i strony internetowe.\n\nMasz też połączenie z aplikacją <xliff:g id="APPLICATION_PERSONAL">%3$s</xliff:g>, która może monitorować Twoją osobistą aktywność w sieci."</string>
+    <string name="monitoring_description_app_work" msgid="3713084153786663662">"Organizacja <xliff:g id="ORGANIZATION">%1$s</xliff:g> zarządza Twoim profilem służbowym. Profil jest połączony z aplikacją <xliff:g id="APPLICATION">%2$s</xliff:g>, która może monitorować Twoją aktywność w sieci, w tym e-maile, aplikacje i strony internetowe.\n\nSkontaktuj się z administratorem, aby uzyskać więcej informacji."</string>
+    <string name="monitoring_description_app_personal_work" msgid="6175816356939166101">"Organizacja <xliff:g id="ORGANIZATION">%1$s</xliff:g> zarządza Twoim profilem służbowym. Profil jest połączony z aplikacją <xliff:g id="APPLICATION_WORK">%2$s</xliff:g>, która może monitorować Twoją aktywność w sieci, w tym e-maile, aplikacje i strony internetowe.\n\nMasz też połączenie z aplikacją <xliff:g id="APPLICATION_PERSONAL">%3$s</xliff:g>, która może monitorować Twoją osobistą aktywność w sieci."</string>
     <string name="keyguard_indication_trust_unlocked" msgid="7395154975733744547">"Blokada anulowana przez agenta zaufania"</string>
     <string name="keyguard_indication_trust_disabled" msgid="6820793704816727918">"Urządzenie pozostanie zablokowane, aż odblokujesz je ręcznie"</string>
     <string name="keyguard_indication_trust_unlocked_plugged_in" msgid="2323452175329362855">"<xliff:g id="KEYGUARD_INDICATION">%1$s</xliff:g>\n<xliff:g id="POWER_INDICATION">%2$s</xliff:g>"</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50% górnej części ekranu"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30% górnej części ekranu"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Dolna część ekranu na pełnym ekranie"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Położenie <xliff:g id="POSITION">%1$d</xliff:g>, kafelek <xliff:g id="TILE_NAME">%2$s</xliff:g>. Kliknij dwukrotnie, by edytować."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"Kafelek <xliff:g id="TILE_NAME">%1$s</xliff:g>. Kliknij dwukrotnie, by dodać."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Przenieś kafelek <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Usuń kafelek <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Dodaj kafelek <xliff:g id="TILE_NAME">%1$s</xliff:g> w położeniu <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Przenieś kafelek <xliff:g id="TILE_NAME">%1$s</xliff:g> w położenie <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"usunąć kartę"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"dodać kartę na końcu"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Przenieś kartę"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Dodaj kartę"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Przenieś do pozycji <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Dodaj w pozycji <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Pozycja <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Edytor szybkich ustawień."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Powiadomienie z aplikacji <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacja może nie działać przy podzielonym ekranie."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Wstecz"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Zmień rozmiar"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefon wyłączony: przegrzanie"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefon działa teraz normalnie"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefon działa teraz normalnie\nKliknij, by dowiedzieć się więcej"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon był zbyt gorący i wyłączył się, by obniżyć temperaturę. Urządzenie działa teraz normalnie.\n\nTelefon może się przegrzać, gdy:\n	• Używasz aplikacji zużywających dużo zasobów (np. gier, nawigacji czy odtwarzaczy filmów)\n	• Pobierasz lub przesyłasz duże pliki\n	• Używasz telefonu w wysokiej temperaturze"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Zobacz instrukcję postępowania"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon się nagrzewa"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Podczas obniżania temperatury telefonu niektóre funkcje są ograniczone"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Podczas obniżania temperatury telefonu niektóre funkcje są ograniczone\nKliknij, by dowiedzieć się więcej"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefon automatycznie podejmie próbę obniżenia temperatury. Możesz go wciąż używać, ale telefon może działać wolniej.\n\nGdy temperatura się obniży, telefon będzie działał normalnie."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Zobacz instrukcję postępowania"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Odłącz ładowarkę"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Podczas ładowania tego urządzenia wystąpił błąd. Odłącz zasilacz, zwracając uwagę na kabel, który może być gorący."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Zobacz instrukcję postępowania"</string>
@@ -998,6 +999,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Ustawienia"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Zrzut stosu SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Aplikacja <xliff:g id="APP">%1$s</xliff:g> używa: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikacje używają: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" i "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"aparat"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"lokalizacja"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Wyłącz czujniki"</string>
     <string name="device_services" msgid="1549944177856658705">"Usługi urządzenia"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Bez tytułu"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Wczytuję rekomendacje"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Multimedia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ukryj bieżącą sesję."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ukryj"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Odrzuć"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Wznów"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Ustawienia"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Nieaktywny, sprawdź aplikację"</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index aa92135..33b6a16 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Retomar"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancelar"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Compartilhar"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Excluir"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Gravação de tela cancelada"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Gravação de tela salva, toque para ver"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Gravação de tela excluída"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Erro ao excluir a gravação de tela"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Não foi possível acessar as permissões"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Erro ao iniciar a gravação de tela"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Parte superior a 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Parte superior a 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Parte inferior em tela cheia"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posição <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toque duas vezes para editar."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toque duas vezes para adicionar."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Remove <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Adicionar <xliff:g id="TILE_NAME">%1$s</xliff:g> à posição <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> para a posição <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"remover o bloco"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"adicionar o bloco ao final"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mover bloco"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Adicionar bloco"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Mover para <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Adicionar à posição <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posição <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de configurações rápidas."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificação do <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"É possível que o app não funcione com o recurso de divisão de tela."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Pular para a anterior"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Redimensionar"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"O smartphone foi desligado devido ao aquecimento"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"O smartphone está sendo executado normalmente agora"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"O smartphone está funcionando normalmente agora.\nToque para saber mais"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"O smartphone estava muito quente e foi desligado para resfriar. Agora, ele está sendo executado normalmente.\n\nO smartphone pode ficar quente demais se você:\n	• usar apps que consomem muitos recursos (como apps de jogos, vídeos ou navegação);\n	• fizer o download ou upload de arquivos grandes;\n	• usar o smartphone em temperaturas altas."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Ver etapas de cuidado"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"O smartphone está esquentando"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Alguns recursos ficam limitados enquanto o smartphone é resfriado"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Alguns recursos ficam limitados enquanto o smartphone é resfriado.\nToque para saber mais"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Seu smartphone tentará se resfriar automaticamente. Você ainda poderá usá-lo, mas talvez ele fique mais lento.\n\nQuando o smartphone estiver resfriado, ele voltará ao normal."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Ver etapas de cuidado"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Desconecte o carregador"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Ocorreu um problema com o carregamento deste dispositivo. Desconecte o adaptador de energia com cuidado, já que o cabo pode estar quente."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Ver etapas de cuidado"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Configurações"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Ok"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Despejar heap SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"O app <xliff:g id="APP">%1$s</xliff:g> está usando <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplicativos estão usando <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" e "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"câmera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"localização"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microfone"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensores desativados"</string>
     <string name="device_services" msgid="1549944177856658705">"Serviços do dispositivo"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sem título"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Carregando recomendações"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Mídia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ocultar a sessão atual."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ocultar"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Dispensar"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Retomar"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Configurações"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inativo, verifique o app"</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 8ea6d45..9c69703 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Retomar"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancelar"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Partilhar"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Eliminar"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Gravação de ecrã cancelada."</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Gravação de ecrã guardada. Toque para ver."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Gravação de ecrã eliminada."</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Erro ao eliminar a gravação de ecrã."</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Falha ao obter as autorizações."</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Ocorreu um erro ao iniciar a gravação do ecrã."</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50% no ecrã superior"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30% no ecrã superior"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ecrã inferior inteiro"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posição <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toque duas vezes para editar."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toque duas vezes para adicionar."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Remover <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Adicionar <xliff:g id="TILE_NAME">%1$s</xliff:g> à posição <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> para a posição <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"remover o cartão"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"adicionar o cartão ao final"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mover cartão"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Adicionar cartão"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Mova para <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Adicione à posição <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posição <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de definições rápidas."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificação do <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"A app pode não funcionar com o ecrã dividido."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Mudar para o anterior"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Redimensionar"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telem. deslig. devido ao calor"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"O telemóvel está a funcionar normalmente"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"O seu telemóvel já está a funcionar normalmente.\nToque para obter mais informações."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"O telemóvel estava muito quente, por isso desligou-se para arrefecer. Agora funciona normalmente.\n\nO telemóvel pode sobreaquecer se:\n	• Utilizar aplicações que utilizam mais recursos (jogos, vídeo ou aplicações de navegação)\n	• Transferir ou carregar ficheiros grandes\n	• Utilizar em altas temperaturas"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Veja os passos de manutenção"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"O telemóvel está a aquecer"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Algumas funcionalidades são limitadas enquanto o telemóvel arrefece"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Algumas funcionalidades são limitadas enquanto o telemóvel arrefece.\nToque para obter mais informações."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"O telemóvel tenta arrefecer automaticamente. Pode continuar a utilizá-lo, mas este poderá funcionar mais lentamente.\n\nAssim que o telemóvel tiver arrefecido, funcionará normalmente."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Veja os passos de manutenção"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Desligar o carregador"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Ocorreu um problema ao carregar este dispositivo. Desligue o transformador e tenha cuidado porque o cabo pode estar quente."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Ver os passos a ter em consideração"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Definições"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Despejar pilha SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"A app <xliff:g id="APP">%1$s</xliff:g> está a utilizar o(a) <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"As aplicações estão a utilizar o(a) <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" e "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"câmara"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"localização"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microfone"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensores desativados"</string>
     <string name="device_services" msgid="1549944177856658705">"Serviços do dispositivo"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sem título"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"A carregar recomendações…"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Multimédia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Oculte a sessão atual."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ocultar"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Ignorar"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Retomar"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Definições"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inativa. Consulte a app."</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index aa92135..33b6a16 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Retomar"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Cancelar"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Compartilhar"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Excluir"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Gravação de tela cancelada"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Gravação de tela salva, toque para ver"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Gravação de tela excluída"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Erro ao excluir a gravação de tela"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Não foi possível acessar as permissões"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Erro ao iniciar a gravação de tela"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Parte superior a 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Parte superior a 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Parte inferior em tela cheia"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posição <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toque duas vezes para editar."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toque duas vezes para adicionar."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Remove <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Adicionar <xliff:g id="TILE_NAME">%1$s</xliff:g> à posição <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> para a posição <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"remover o bloco"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"adicionar o bloco ao final"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mover bloco"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Adicionar bloco"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Mover para <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Adicionar à posição <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posição <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de configurações rápidas."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificação do <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"É possível que o app não funcione com o recurso de divisão de tela."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Pular para a anterior"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Redimensionar"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"O smartphone foi desligado devido ao aquecimento"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"O smartphone está sendo executado normalmente agora"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"O smartphone está funcionando normalmente agora.\nToque para saber mais"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"O smartphone estava muito quente e foi desligado para resfriar. Agora, ele está sendo executado normalmente.\n\nO smartphone pode ficar quente demais se você:\n	• usar apps que consomem muitos recursos (como apps de jogos, vídeos ou navegação);\n	• fizer o download ou upload de arquivos grandes;\n	• usar o smartphone em temperaturas altas."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Ver etapas de cuidado"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"O smartphone está esquentando"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Alguns recursos ficam limitados enquanto o smartphone é resfriado"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Alguns recursos ficam limitados enquanto o smartphone é resfriado.\nToque para saber mais"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Seu smartphone tentará se resfriar automaticamente. Você ainda poderá usá-lo, mas talvez ele fique mais lento.\n\nQuando o smartphone estiver resfriado, ele voltará ao normal."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Ver etapas de cuidado"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Desconecte o carregador"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Ocorreu um problema com o carregamento deste dispositivo. Desconecte o adaptador de energia com cuidado, já que o cabo pode estar quente."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Ver etapas de cuidado"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Configurações"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Ok"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Despejar heap SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"O app <xliff:g id="APP">%1$s</xliff:g> está usando <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplicativos estão usando <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" e "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"câmera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"localização"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microfone"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensores desativados"</string>
     <string name="device_services" msgid="1549944177856658705">"Serviços do dispositivo"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Sem título"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Carregando recomendações"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Mídia"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ocultar a sessão atual."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ocultar"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Dispensar"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Retomar"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Configurações"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inativo, verifique o app"</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 7d58bfb..0abfc56 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Reluați"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Anulați"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Trimiteți"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Ștergeți"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Înregistrarea ecranului a fost anulată"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Înregistrarea ecranului a fost salvată. Atingeți pentru vizualizare"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Înregistrarea ecranului a fost ștearsă."</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Eroare la ștergerea înregistrării ecranului"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Nu s-au obținut permisiunile"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Eroare la începerea înregistrării ecranului"</string>
@@ -889,12 +887,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Partea de sus: 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Partea de sus: 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Partea de jos pe ecran complet"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Poziția <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Atingeți de două ori pentru a edita."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Atingeți de două ori pentru a adăuga."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mutați <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Eliminați <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Adăugați <xliff:g id="TILE_NAME">%1$s</xliff:g> pe poziția <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mutați <xliff:g id="TILE_NAME">%1$s</xliff:g> pe poziția <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"eliminați cardul"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"adăugați cardul la sfârșit"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Mutați cardul"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Adăugați un card"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Mutați pe poziția <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Adăugați pe poziția <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Poziția <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editorul pentru setări rapide."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificare <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Este posibil ca aplicația să nu funcționeze cu ecranul împărțit."</string>
@@ -927,11 +926,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Treceți la cel anterior"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Redimensionați"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefonul s-a oprit din cauza încălzirii"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Acum telefonul funcționează normal"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Acum telefonul funcționează normal.\nAtingeți pentru mai multe informații"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefonul se încălzise prea mult și s-a oprit pentru a se răci. Acum telefonul funcționează normal.\n\nTelefonul s-ar putea încălzi prea mult dacă:\n	• folosiți aplicații care consumă multe resurse (de ex., jocuri, aplicații video/de navigare);\n	• descărcați/încărcați fișiere mari;\n	• folosiți telefonul la temperaturi ridicate."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Vedeți pașii pentru îngrijire"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefonul se încălzește"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Anumite funcții sunt limitate în timp ce telefonul se răcește"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Anumite funcții sunt limitate în timp ce telefonul se răcește.\nAtingeți pentru mai multe informații"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefonul va încerca automat să se răcească. Puteți folosi telefonul în continuare, dar este posibil să funcționeze mai lent.\n\nDupă ce se răcește, telefonul va funcționa normal."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Vedeți pașii pentru îngrijire"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Deconectați încărcătorul"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Există o problemă la încărcarea acestui dispozitiv. Deconectați adaptorul de curent și aveți grijă, deoarece cablul poate fi cald."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Vedeți pașii pentru îngrijire"</string>
@@ -993,6 +994,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Setări"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Extrageți memoria SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> folosește <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplicațiile folosesc <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" și "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"cameră foto"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"locație"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"microfon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Senzori dezactivați"</string>
     <string name="device_services" msgid="1549944177856658705">"Servicii pentru dispozitiv"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Fără titlu"</string>
@@ -1072,7 +1080,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Se încarcă recomandările"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ascunde sesiunea actuală."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ascunde"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Închideți"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Reia"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Setări"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inactiv, verificați aplicația"</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index d2e8886..27ed4ea 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Возобновить"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Отмена"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Поделиться"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Удалить"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Запись видео с экрана отменена"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Запись видео с экрана сохранена. Чтобы открыть ее, нажмите на уведомление."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Запись видео с экрана удалена"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Не удалось удалить запись видео с экрана"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Не удалось получить необходимые разрешения"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Не удалось начать запись видео с экрана."</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Верхний на 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Верхний на 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Нижний во весь экран"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Позиция <xliff:g id="POSITION">%1$d</xliff:g>, кнопка \"<xliff:g id="TILE_NAME">%2$s</xliff:g>\". Чтобы изменить, нажмите дважды."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"Кнопка \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\". Чтобы добавить, нажмите дважды."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Переместить кнопку \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\""</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Удалить кнопку \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\""</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Добавить значок <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицию <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Переместить значок <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицию <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Редактор быстрых настроек."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Уведомление <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Приложение не поддерживает разделение экрана."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Перейти к предыдущему"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Изменить размер"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Телефон выключился из-за перегрева"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Сейчас телефон работает нормально"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Сейчас телефон работает нормально.\nНажмите, чтобы получить дополнительную информацию"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Ваш телефон выключился из-за перегрева. Сейчас он работает нормально.\n\nВозможные причины перегрева телефона:\n	• использование ресурсоемких игр и приложений, связанных с видео или навигацией);\n	• скачивание или загрузка больших файлов;\n	• высокая температура окружающей среды."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Подробнее о действиях при перегреве…"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Телефон нагревается"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Пока телефон не остынет, некоторые функции могут быть недоступны."</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Пока телефон не остынет, некоторые функции могут быть недоступны.\nНажмите, чтобы получить дополнительную информацию"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Ваш телефон остынет автоматически.\n\nОбратите внимание, что до тех пор он может работать медленнее, чем обычно."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Подробнее о действиях при перегреве…"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Отключите зарядное устройство"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Во время зарядки возникла проблема. Отключите адаптер питания. Будьте осторожны, кабель может быть горячим."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Подробнее о действиях при перегреве…"</string>
@@ -998,6 +999,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Открыть настройки"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"ОК"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Передача SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"В приложении \"<xliff:g id="APP">%1$s</xliff:g>\" используется <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"В приложениях используется <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" и "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камера"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"местоположение"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"микрофон"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Датчики отключены"</string>
     <string name="device_services" msgid="1549944177856658705">"Сервисы устройства"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Без названия"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Загрузка рекомендаций…"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Медиа"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Скрыть текущий сеанс?"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Скрыть"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Скрыть"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Возобновить"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Настройки"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Нет ответа. Проверьте приложение."</string>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index bffc5f2..8ec42dc 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"නැවත අරඹන්න"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"අවලංගු කරන්න"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"බෙදා ගන්න"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"මකන්න"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"තිර පටිගත කිරීම අවලංගු කරන ලදී"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"තිර පටිගත කිරීම සුරකින ලදී, බැලීමට තට්ටු කරන්න"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"තිර පටිගත කිරීම මකන ලදී"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"තිර පටිගත කිරීම මැකීමේ දෝෂයකි"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"අවසර ලබා ගැනීමට අසමත් විය"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"තිර පටිගත කිරීම ආරම්භ කිරීමේ දෝෂයකි"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ඉහළම 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ඉහළම 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"පහළ පූර්ණ තිරය"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ස්ථානය <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. වෙනස් කිරීමට දෙවරක් තට්ටු කරන්න."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. එක් කිරීමට දෙවරක් තට්ටු කරන්න."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ගෙන යන්න"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ඉවත් කරන්න"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> තත්ත්වයට <xliff:g id="POSITION">%2$d</xliff:g> එක් කරන්න"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> තත්ත්වයට <xliff:g id="POSITION">%2$d</xliff:g> ගෙන යන්න"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ඉක්මන් සැකසුම් සංස්කාරකය."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> දැනුම්දීම: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"යෙදුම බෙදුම්-තිරය සමග ක්‍රියා නොකළ හැකිය."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"පෙර එකට පනින්න"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"ප්‍රතිප්‍රමාණ කරන්න"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"දුරකථනය රත් වීම නිසා ක්‍රියාවිරහිත කරන ලදී"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"ඔබගේ දුරකථනය දැන් සාමාන්‍ය ලෙස ධාවනය වේ"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"ඔබගේ දුරකථනය දැන් සාමාන්‍ය ලෙස ධාවනය වේ.\nතව තතු සඳහා තට්ටු කරන්න"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"ඔබේ දුරකථනය ඉතාම උණුසුම්ය, එම නිසා එය සිසිල් වීමට ක්‍රියාවිරහිත කරන ලදී. ධැන් ඔබේ දුරකථනය සාමාන්‍ය පරිදි ධාවනය වේ.\n\nඔබ පහත දේවල් සිදු කළහොත් ඔබේ දුරකථනය ඉතාම උණුසුම් විය හැකිය:\n	• සම්පත්-දැඩි සත්කාරක යෙදුම් භාවිතය (ක්‍රීඩා, වීඩියෝ, හෝ සංචලන යෙදුම් යනාදී)\n	• විශාල ගොනු බාගැනීම හෝ උඩුගත කිරීම\n	• ඔබේ දුරකථනය අධික උෂ්ණත්වයේදී භාවිත කිරීම"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"රැකවරණ පියවර බලන්න"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"දුරකථනය උණුසුම් වෙමින්"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"දුරකථනය සිසිල් වන අතරතුර සමහර විශේෂාංග සීමිත විය හැකිය"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"දුරකථනය සිසිල් වන අතරතුර සමහර විශේෂාංග සීමිත විය හැකිය.\nතව තතු සඳහා තට්ටු කරන්න"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"ඔබගේ දුරකථනය ස්වයංක්‍රියව සිසිල් වීමට උත්සාහ කරනු ඇත. ඔබට තවම ඔබේ දුරකථනය භාවිත කළ හැකිය, නමුත් එය සෙමින් ධාවනය විය හැකිය.\n\nඔබේ දුරකථනය සිසිල් වූ පසු, එය සාමාන්‍ය ලෙස ධාවනය වනු ඇත."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"රැකවරණ පියවර බලන්න"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"චාජරය පේනුවෙන් ඉවත් කරන්න"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"මෙම උපාංගය ආරෝපණ කිරීමේ ගැටලුවක් තිබේ බල ඇඩැප්ටරය ගලවා කේබලය උණුසුම් විය හැකි බැවින් පරෙස්සම් වන්න."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"රැකවරණ පියවර බලන්න"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"සැකසීම්"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"තේරුණා"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> ඔබේ <xliff:g id="TYPES_LIST">%2$s</xliff:g> භාවිත කරමින් සිටී."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"යෙදුම් ඔබේ <xliff:g id="TYPES_LIST">%s</xliff:g> භාවිත කරමින් සිටී."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" සහ "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"කැමරාව"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ස්ථානය"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"මයික්‍රෝෆෝනය"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"සංවේදක ක්‍රියාවිරහිතයි"</string>
     <string name="device_services" msgid="1549944177856658705">"උපාංග සේවා"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"මාතෘකාවක් නැත"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"නිර්දේශ පූරණය කරමින්"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"මාධ්‍ය"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"වත්මන් සැසිය සඟවන්න."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"සඟවන්න"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ඉවත ලන්න"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"නැවත පටන් ගන්න"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"සැකසීම්"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"අක්‍රියයි, යෙදුම පරීක්ෂා කරන්න"</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 9ffd9a5..94bff94 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Obnoviť"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Zrušiť"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Zdieľať"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Odstrániť"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Záznam obrazovky bol zrušený"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Záznam obrazovky bol uložený, zobrazíte ho klepnutím"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Záznam obrazovky bol odstránený"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Pri odstraňovaní záznamu obrazovky sa vyskytla chyba"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Nepodarilo sa získať povolenia"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Pri spustení nahrávania obrazovky sa vyskytla chyba"</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Horná – 50 %"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Horná – 30 %"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Dolná – na celú obrazovku"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Pozícia <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Upravíte ju dvojitým klepnutím."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Pridáte ju dvojitým klepnutím."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Presunúť dlaždicu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Odstrániť dlaždicu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Pridať <xliff:g id="TILE_NAME">%1$s</xliff:g> na pozíciu <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Presunúť <xliff:g id="TILE_NAME">%1$s</xliff:g> na pozíciu <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"odstrániť kartu"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"pridať kartu na koniec"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Presunúť kartu"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Pridať kartu"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Presunúť na <xliff:g id="POSITION">%1$d</xliff:g>. pozíciu"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Pridať na <xliff:g id="POSITION">%1$d</xliff:g>. pozíciu"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"<xliff:g id="POSITION">%1$d</xliff:g>. pozícia"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor rýchlych nastavení"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Upozornenie <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikácia nemusí fungovať so zapnutou rozdelenou obrazovkou."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Preskočiť na predchádzajúce"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Zmeniť veľkosť"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefón sa vypol z dôvodu prehriatia"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Teraz telefón funguje ako obvykle"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Teraz telefón funguje ako obvykle.\nViac sa dozviete po klepnutí."</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefón bol príliš horúci, preto sa vypol, aby vychladol. Teraz funguje ako obvykle.\n\nTelefón sa môže príliš zahriať v týchto prípadoch:\n	• používanie náročných aplikácií (napr. hier, videí alebo navigácie);\n	• sťahovanie alebo nahrávanie veľkých súborov;\n	• používanie telefónu pri vysokých teplotách."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Zobraziť opatrenia"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Teplota telefónu stúpa"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Niektoré funkcie budú obmedzené, dokým neklesne teplota telefónu"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Niektoré funkcie budú obmedzené, dokým neklesne teplota telefónu.\nViac sa dozviete po klepnutí."</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Váš telefón sa automaticky pokúsi schladiť. Môžete ho naďalej používať, ale môže fungovať pomalšie.\n\nPo poklese teploty bude telefón fungovať ako normálne."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Zobraziť opatrenia"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Odpojte nabíjačku"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Vyskytol sa problém s nabíjaním tohto zariadenia. Odpojte nabíjačku a postupujte opatrne, pretože kábel môže byť horúci."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Zobraziť opatrenia"</string>
@@ -998,6 +999,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Nastavenia"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Dobre"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> používa zoznam <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikácie používajú zoznam <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" a "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"fotoaparát"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"poloha"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofón"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Senzory sú vypnuté"</string>
     <string name="device_services" msgid="1549944177856658705">"Služby zariadenia"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Bez názvu"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Načítavajú sa odporúčania"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Médiá"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Skryť aktuálnu reláciu."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Skryť"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Zavrieť"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Pokračovať"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Nastavenia"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Neaktívne, preverte aplikáciu"</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index e1f6fc7..f45c673 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Nadaljuj"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Prekliči"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Deli"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Izbriši"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Snemanje zaslona je preklicano"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Videoposnetek zaslona je shranjen, dotaknite se za ogled"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Videoposnetek zaslona je izbrisan"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Napaka pri brisanju videoposnetka zaslona"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Dovoljenj ni bilo mogoče pridobiti"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Napaka pri začenjanju snemanja zaslona"</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Zgornji 50 %"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Zgornji 30 %"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Spodnji v celozaslonski način"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Položaj <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Če želite urediti, se dvakrat dotaknite."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Če želite dodati, se dvakrat dotaknite."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Premik tega: <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Odstranitev tega: <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Dodaj ploščico <xliff:g id="TILE_NAME">%1$s</xliff:g> na položaj <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Premakni ploščico <xliff:g id="TILE_NAME">%1$s</xliff:g> na položaj <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"odstranitev ploščice"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"dodajanje ploščice na konec"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Premik ploščice"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Dodajanje ploščice"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Premik na položaj <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Dodajanje na položaj <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Položaj <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Urejevalnik hitrih nastavitev."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Obvestilo za <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacija morda ne deluje v načinu razdeljenega zaslona."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Preskoči na prejšnjega"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Spremeni velikost"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Tel. izklopljen zaradi vročine"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Zdaj telefon normalno deluje"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefon zdaj deluje normalno.\nDotaknite se za več informacij"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon je bil prevroč, zato se je izklopil, da se ohladi. Zdaj normalno deluje.\n\nTelefon lahko postane prevroč ob:\n	• uporabi aplikacij, ki intenzivno porabljajo sredstva (npr. za igranje iger, videoposnetke ali navigacijo)\n	• prenosu ali nalaganju velikih datotek\n	• uporabi telefona pri visokih temp."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Oglejte si navodila za ukrepanje"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon se segreva"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Nekatere funkcije bodo med ohlajanjem omejene."</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Nekatere funkcije bodo med ohlajanjem telefona omejene.\nDotaknite se za več informacij"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefon se bo samodejno poskusil ohladiti. Še naprej ga lahko uporabljate, vendar bo morda deloval počasneje.\n\nKo se telefon ohladi, bo zopet deloval kot običajno."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Oglejte si navodila za ukrepanje"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Odklopite polnilnik"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Pri polnjenju te naprave je prišlo do težave. Previdno odklopite napajalnik, ker se je kabel morda segrel."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Oglejte si navodila za ukrepanje"</string>
@@ -998,6 +999,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Nastavitve"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"V redu"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Izvoz kopice SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Aplikacija <xliff:g id="APP">%1$s</xliff:g> uporablja <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikacije uporabljajo <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" in "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"fotoaparat"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"lokacijo"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Izklop za tipala"</string>
     <string name="device_services" msgid="1549944177856658705">"Storitve naprave"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Brez naslova"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Nalaganje priporočil"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Predstavnost"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Skrije trenutno sejo."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Skrij"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Opusti"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Nadaljuj"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Nastavitve"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Neaktivno, poglejte aplikacijo"</string>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index 1f4b7cd..912b25e 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Vazhdo"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Anulo"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Ndaj"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Fshi"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Regjistrimi i ekranit u anulua"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Regjistrimi i ekranit u ruajt, trokit për ta parë"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Regjistrimi i ekranit u fshi"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Gabim gjatë fshirjes së regjistrimit të ekranit"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Marrja e lejeve dështoi"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Gabim gjatë nisjes së regjistrimit të ekranit"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Lart 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Lart 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ekrani i plotë poshtë"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Pozicioni <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Trokit dy herë për ta redaktuar."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Trokit dy herë për ta shtuar."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Zhvendose <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Hiqe <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Shto <xliff:g id="TILE_NAME">%1$s</xliff:g> te pozicioni <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Zhvendos <xliff:g id="TILE_NAME">%1$s</xliff:g> te pozicioni <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"hiq pllakëzën"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"shto pllakëzën në fund"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Zhvendos pllakëzën"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Shto pllakëzën"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Zhvendos te <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Shto te pozicioni <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Pozicioni <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Redaktori i cilësimeve të shpejta."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Njoftim nga <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacioni mund të mos funksionojë me ekranin e ndarë."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Kalo tek e mëparshmja"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Ndrysho përmasat"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefoni u fik për shkak të nxehtësisë"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefoni tani punon normalisht"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefoni tani punon normalisht.\nTrokit për më shumë informacione"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefoni yt ishte tepër i nxehtë, prandaj u fik për t\'u ftohur. Telefoni tani punon normalisht.\n\nTelefoni mund të nxehet së tepërmi nëse ti:\n	• Përdor aplikacione intensive për burimet (siç janë aplikacionet e lojërave, videove apo aplikacionet e navigimit)\n	• Shkarkon ose ngarkon skedarë të mëdhenj\n	• E përdor telefonin në temperatura të larta"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Shiko hapat për kujdesin"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefoni po bëhet i ngrohtë"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Disa funksione janë të kufizuara kur telefoni është duke u ftohur"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Disa veçori janë të kufizuara kur telefoni është duke u ftohur.\nTrokit për më shumë informacione"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefoni yt do të përpiqet automatikisht që të ftohet. Mund ta përdorësh përsëri telefonin, por ai mund të punojë më ngadalë.\n\nPasi telefoni të jetë ftohur, ai do të punojë si normalisht."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Shiko hapat për kujdesin"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Shkëput karikuesin"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Ka një problem me karikimin e kësaj pajisjeje. Hiqe spinën dhe trego kujdes pasi kablloja mund të jetë e ngrohtë."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Shiko hapat për kujdesin"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Cilësimet"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"E kuptova"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Hidh grumbullin SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> po përdor <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Aplikacionet po përdorin <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" dhe "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamerën"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"vendndodhjen"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofonin"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensorët joaktivë"</string>
     <string name="device_services" msgid="1549944177856658705">"Shërbimet e pajisjes"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Pa titull"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Po ngarkon rekomandimet"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Fshih sesionin aktual."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Fshih"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Hiq"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Vazhdo"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Cilësimet"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Joaktive, kontrollo aplikacionin"</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 7091fe9..9b812df 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -38,7 +38,7 @@
     <string name="battery_saver_confirmation_ok" msgid="5042136476802816494">"Укључи"</string>
     <string name="battery_saver_start_action" msgid="4553256017945469937">"Укључи Уштеду батерије"</string>
     <string name="status_bar_settings_settings_button" msgid="534331565185171556">"Подешавања"</string>
-    <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"Wi-Fi"</string>
+    <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"WiFi"</string>
     <string name="status_bar_settings_auto_rotation" msgid="8329080442278431708">"Аутоматско ротирање екрана"</string>
     <string name="status_bar_settings_mute_label" msgid="914392730086057522">"УГАСИ"</string>
     <string name="status_bar_settings_auto_brightness_label" msgid="2151934479226017725">"АУТОM."</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Настави"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Откажи"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Дели"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Избриши"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Снимање екрана је отказано"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Снимак екрана је сачуван, додирните да бисте прегледали"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Снимак екрана је избрисан"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Дошло је до проблема при брисању снимка екрана"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Преузимање дозвола није успело"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Грешка при покретању снимања екрана"</string>
@@ -226,7 +224,7 @@
     <string name="data_connection_cdma" msgid="7678457855627313518">"1X"</string>
     <string name="data_connection_roaming" msgid="375650836665414797">"Роминг"</string>
     <string name="data_connection_edge" msgid="6316755666481405762">"EDGE"</string>
-    <string name="accessibility_data_connection_wifi" msgid="4422160347472742434">"Wi-Fi"</string>
+    <string name="accessibility_data_connection_wifi" msgid="4422160347472742434">"WiFi"</string>
     <string name="accessibility_no_sim" msgid="1140839832913084973">"Нема SIM картице."</string>
     <string name="accessibility_cell_data" msgid="172950885786007392">"Мобилни подаци"</string>
     <string name="accessibility_cell_data_on" msgid="691666434519443162">"Мобилни подаци су укључени"</string>
@@ -265,8 +263,8 @@
     <string name="accessibility_desc_work_lock" msgid="4355620395354680575">"Закључан екран за посао"</string>
     <string name="accessibility_desc_close" msgid="8293708213442107755">"Затвори"</string>
     <string name="accessibility_quick_settings_wifi" msgid="167707325133803052">"<xliff:g id="SIGNAL">%1$s</xliff:g>."</string>
-    <string name="accessibility_quick_settings_wifi_changed_off" msgid="2230487165558877262">"Wi-Fi је искључен."</string>
-    <string name="accessibility_quick_settings_wifi_changed_on" msgid="1490362586009027611">"Wi-Fi је укључен."</string>
+    <string name="accessibility_quick_settings_wifi_changed_off" msgid="2230487165558877262">"WiFi је искључен."</string>
+    <string name="accessibility_quick_settings_wifi_changed_on" msgid="1490362586009027611">"WiFi је укључен."</string>
     <string name="accessibility_quick_settings_mobile" msgid="1817825313718492906">"Мобилна мрежа: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string>
     <string name="accessibility_quick_settings_battery" msgid="533594896310663853">"Батерија: <xliff:g id="STATE">%s</xliff:g>."</string>
     <string name="accessibility_quick_settings_airplane_off" msgid="1275658769368793228">"Режим рада у авиону је искључен."</string>
@@ -375,19 +373,19 @@
     <string name="quick_settings_user_label" msgid="1253515509432672496">"Ја"</string>
     <string name="quick_settings_user_title" msgid="8673045967216204537">"Корисник"</string>
     <string name="quick_settings_user_new_user" msgid="3347905871336069666">"Нови корисник"</string>
-    <string name="quick_settings_wifi_label" msgid="2879507532983487244">"Wi-Fi"</string>
+    <string name="quick_settings_wifi_label" msgid="2879507532983487244">"WiFi"</string>
     <string name="quick_settings_wifi_not_connected" msgid="4071097522427039160">"Веза није успостављена"</string>
     <string name="quick_settings_wifi_no_network" msgid="6003178398713839313">"Нема мреже"</string>
-    <string name="quick_settings_wifi_off_label" msgid="4003379736176547594">"Wi-Fi је искључен"</string>
-    <string name="quick_settings_wifi_on_label" msgid="2489928193654318511">"Wi-Fi је укључен"</string>
-    <string name="quick_settings_wifi_detail_empty_text" msgid="483130889414601732">"Није доступна ниједна Wi-Fi мрежа"</string>
+    <string name="quick_settings_wifi_off_label" msgid="4003379736176547594">"WiFi је искључен"</string>
+    <string name="quick_settings_wifi_on_label" msgid="2489928193654318511">"WiFi је укључен"</string>
+    <string name="quick_settings_wifi_detail_empty_text" msgid="483130889414601732">"Није доступна ниједна WiFi мрежа"</string>
     <string name="quick_settings_wifi_secondary_label_transient" msgid="7501659015509357887">"Укључује се..."</string>
     <string name="quick_settings_cast_title" msgid="2279220930629235211">"Пребацивање екрана"</string>
     <string name="quick_settings_casting" msgid="1435880708719268055">"Пребацивање"</string>
     <string name="quick_settings_cast_device_default_name" msgid="6988469571141331700">"Неименовани уређај"</string>
     <string name="quick_settings_cast_device_default_description" msgid="2580520859212250265">"Спремно за пребацивање"</string>
     <string name="quick_settings_cast_detail_empty_text" msgid="2846282280014617785">"Није доступан ниједан уређај"</string>
-    <string name="quick_settings_cast_no_wifi" msgid="6980194769795014875">"Wi-Fi није повезан"</string>
+    <string name="quick_settings_cast_no_wifi" msgid="6980194769795014875">"WiFi није повезан"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="4980669966716685588">"Осветљеност"</string>
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="2325362583903258677">"АУТОМАТСКА"</string>
     <string name="quick_settings_inversion_label" msgid="5078769633069667698">"Обрни боје"</string>
@@ -643,8 +641,8 @@
     <string name="output_none_found" msgid="5488087293120982770">"Није пронађен ниједан уређај"</string>
     <string name="output_none_found_service_off" msgid="935667567681386368">"Није пронађен ниједан уређај. Пробајте да укључите услугу <xliff:g id="SERVICE">%1$s</xliff:g>"</string>
     <string name="output_service_bt" msgid="4315362133973911687">"Bluetooth"</string>
-    <string name="output_service_wifi" msgid="9003667810868222134">"Wi-Fi"</string>
-    <string name="output_service_bt_wifi" msgid="7186882540475524124">"Bluetooth и Wi-Fi"</string>
+    <string name="output_service_wifi" msgid="9003667810868222134">"WiFi"</string>
+    <string name="output_service_bt_wifi" msgid="7186882540475524124">"Bluetooth и WiFi"</string>
     <string name="system_ui_tuner" msgid="1471348823289954729">"Тјунер за кориснички интерфејс система"</string>
     <string name="show_battery_percentage" msgid="6235377891802910455">"Приказуј уграђени проценат батерије"</string>
     <string name="show_battery_percentage_summary" msgid="9053024758304102915">"Приказивање нивоа напуњености батерије у процентима унутар иконе на статусној траци када се батерија не пуни"</string>
@@ -889,12 +887,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Горњи екран 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Горњи екран 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Режим целог екрана за доњи екран"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. позиција, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Двапут додирните да бисте изменили."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Двапут додирните да бисте додали."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Премести плочицу <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Уклони плочицу <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Додајте „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ на позицију <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Преместите „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ на позицију <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Уређивач за Брза подешавања."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Обавештења за <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Апликација можда неће функционисати са подељеним екраном."</string>
@@ -927,11 +926,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Пређи на претходно"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Промените величину"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Телефон се искључио због топлоте"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Телефон сада нормално ради"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Телефон сада нормално ради.\nДодирните за више информација"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Телефон је био преврућ, па се искључио да се охлади. Сада ради нормално.\n\nТелефон може превише да се угреје ако:\n	• Користите апликације које захтевају пуно ресурса (нпр. видео игре, видео или апликације за навигацију)\n	• Преузимате/отпремате велике датотеке\n	• Користите телефон на високој температури"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Погледајте упозорења"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Телефон се загрејао"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Неке функције су ограничене док се телефон не охлади"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Неке функције су ограничене док се телефон не охлади.\nДодирните за више информација"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Телефон ће аутоматски покушати да се охлади. И даље ћете моћи да користите телефон, али ће спорије реаговати.\n\nКада се телефон охлади, нормално ће радити."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Погледајте упозорења"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Искључите пуњач из напајања"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Дошло је до проблема са пуњењем овог уређаја. Искључите адаптер из напајања и будите пажљиви јер кабл може да буде топао."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Погледајте упозорења"</string>
@@ -964,7 +965,7 @@
     <string name="mobile_data" msgid="4564407557775397216">"Мобилни подаци"</string>
     <string name="mobile_data_text_format" msgid="6806501540022589786">"<xliff:g id="ID_1">%1$s</xliff:g> – <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="mobile_carrier_text_format" msgid="8912204177152950766">"<xliff:g id="CARRIER_NAME">%1$s</xliff:g>, <xliff:g id="MOBILE_DATA_TYPE">%2$s</xliff:g>"</string>
-    <string name="wifi_is_off" msgid="5389597396308001471">"Wi-Fi је искључен"</string>
+    <string name="wifi_is_off" msgid="5389597396308001471">"WiFi је искључен"</string>
     <string name="bt_is_off" msgid="7436344904889461591">"Bluetooth је искључен"</string>
     <string name="dnd_is_off" msgid="3185706903793094463">"Режим Не узнемиравај је искључен"</string>
     <string name="qs_dnd_prompt_auto_rule" msgid="3535469468310002616">"Аутоматско правило (<xliff:g id="ID_1">%s</xliff:g>) је укључило режим Не узнемиравај."</string>
@@ -976,7 +977,7 @@
     <string name="running_foreground_services_title" msgid="5137313173431186685">"Апликације покренуте у позадини"</string>
     <string name="running_foreground_services_msg" msgid="3009459259222695385">"Додирните за детаље о батерији и потрошњи података"</string>
     <string name="mobile_data_disable_title" msgid="5366476131671617790">"Желите да искључите мобилне податке?"</string>
-    <string name="mobile_data_disable_message" msgid="8604966027899770415">"Нећете имати приступ подацима или интернету преко мобилног оператера <xliff:g id="CARRIER">%s</xliff:g>. Интернет ће бити доступан само преко Wi-Fi везе."</string>
+    <string name="mobile_data_disable_message" msgid="8604966027899770415">"Нећете имати приступ подацима или интернету преко мобилног оператера <xliff:g id="CARRIER">%s</xliff:g>. Интернет ће бити доступан само преко WiFi везе."</string>
     <string name="mobile_data_disable_message_default_carrier" msgid="6496033312431658238">"мобилни оператер"</string>
     <string name="touch_filtered_warning" msgid="8119511393338714836">"Подешавања не могу да верификују ваш одговор јер апликација скрива захтев за дозволу."</string>
     <string name="slice_permission_title" msgid="3262615140094151017">"Желите ли да дозволите апликацији <xliff:g id="APP_0">%1$s</xliff:g> да приказује исечке из апликације <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
@@ -993,6 +994,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Подешавања"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Важи"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Издвоји SysUI мем."</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> користи <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Апликације користе <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" и "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камеру"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"локацију"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"микрофон"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Сензори су искључени"</string>
     <string name="device_services" msgid="1549944177856658705">"Услуге за уређаје"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Без наслова"</string>
@@ -1072,7 +1080,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Учитавају се препоруке"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Медији"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Сакријте актуелну сесију."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Сакриј"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Одбаци"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Настави"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Подешавања"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Неактивно. Видите апликацију"</string>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index e455f8e..3e9310e 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Återuppta"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Avbryt"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Dela"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Radera"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Skärminspelningen har avbrutits"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Skärminspelningen har sparats, tryck här om du vill titta på den"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Skärminspelningen har raderats"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Det gick inte att radera skärminspelningen"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Behörighet saknas"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Det gick inte att starta skärminspelningen"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Övre 50 %"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Övre 30 %"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Helskärm på nedre skärm"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Tryck snabbt två gånger för att redigera positionen."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Lägg till genom att trycka snabbt två gånger."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Flytta <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Ta bort <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Lägg till <xliff:g id="TILE_NAME">%1$s</xliff:g> på position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Flytta <xliff:g id="TILE_NAME">%1$s</xliff:g> till position <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"ta bort ruta"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"lägg till ruta i slutet"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Flytta ruta"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Lägg till ruta"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Flytta till <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Lägg till på position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Position <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Redigerare för snabbinställningar."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-avisering: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Appen kanske inte fungerar med delad skärm."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Hoppa till föregående"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Ändra storlek"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Mobilen stängdes av pga. värme"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Mobilen fungerar nu som vanligt"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefonen fungerar nu som vanligt.\nTryck för mer information"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Mobilen var för varm och stängdes av för att kylas ned. Den fungerar nu som vanligt.\n\nMobilen kan bli för varm om du\n	• använder resurskrävande appar (till exempel spel-, video- eller navigeringsappar)\n	• laddar ned eller laddar upp stora filer\n	• använder mobilen vid höga temperaturer."</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Visa alla skötselråd"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Mobilen börjar bli varm"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Vissa funktioner är begränsade medan mobilen svalnar"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Vissa funktioner är begränsade medan telefonen svalnar.\nTryck för mer information"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Mobilen försöker svalna automatiskt. Du kan fortfarande använda mobilen, men den kan vara långsammare än vanligt.\n\nMobilen fungerar som vanligt när den har svalnat."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Visa alla skötselråd"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Koppla ur laddaren"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Det går inte att ladda denna enhet. Koppla ur nätadaptern, men var försiktig eftersom kabeln kan vara varm."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Visa alla skötselråd"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Inställningar"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI-heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="TYPES_LIST">%2$s</xliff:g> används av <xliff:g id="APP">%1$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"<xliff:g id="TYPES_LIST">%s</xliff:g> används av appar."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" och "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"plats"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensorer har inaktiverats"</string>
     <string name="device_services" msgid="1549944177856658705">"Enhetstjänster"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Ingen titel"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Rekommendationer läses in"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Dölj den aktuella sessionen."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Dölj"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Stäng"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Återuppta"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Inställningar"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Inaktiv, kolla appen"</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 709ebc3..f5f9c24 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Endelea"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Ghairi"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Shiriki"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Futa"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Imeghairi mchakato wa kurekodi skrini"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Imehifadhi rekodi ya skrini, gusa ili uangalie"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Imefuta rekodi ya skrini"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Hitilafu imetokea wakati wa kufuta rekodi ya skrini"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Imeshindwa kupata ruhusa"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Hitilafu imetokea wakati wa kuanza kurekodi skrini"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Juu 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Juu 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Skrini nzima ya chini"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Nafasi ya <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Gusa mara mbili ili ubadilishe."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Gusa mara mbili ili uongeze."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Hamisha <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Ondoa <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Ongeza <xliff:g id="TILE_NAME">%1$s</xliff:g> kwenye nafasi ya <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Sogeza <xliff:g id="TILE_NAME">%1$s</xliff:g> kwenye nafasi ya <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"ondoa kigae"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"ongeza kigae mwishoni"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Hamisha kigae"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Ongeza kigae"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Hamishia kwenye <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Ongeza kwenye nafasi ya <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Nafasi ya <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Kihariri cha Mipangilio ya haraka."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Arifa kutoka <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Huenda programu isifanye kazi kwenye skrini inayogawanywa."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Ruka ufikie iliyotangulia"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Badilisha ukubwa"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Simu ilizima kutokana na joto"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Simu yako sasa inafanya kazi ipasavyo"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Simu yako sasa inafanya kazi ipasavyo.\nGusa ili upate maelezo zaidi"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Simu yako ilikuwa moto sana, kwa hivyo ilijizima ili ipoe. Simu yako sasa inafanya kazi ipasavyo.\n\nSimu yako inaweza kuwa moto sana ikiwa:\n	• Unatumia programu zinazotumia vipengee vingi (kama vile michezo ya video, video au programu za uelekezaji)\n	• Unapakua au upakie faili kubwa\n	• Unatumia simu yako katika maeneo yenye halijoto ya juu"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Angalia hatua za utunzaji"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Joto la simu linaongezeka"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Baadhi ya vipengele havitatumika kwenye simu wakati inapoa"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Baadhi ya vipengele havitatumika kwenye simu wakati inapoa.\nGusa ili upate maelezo zaidi"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Simu yako itajaribu kupoa kiotomatiki. Bado unaweza kutumia simu yako, lakini huenda ikafanya kazi polepole. \n\nPindi simu yako itakapopoa, itaendelea kufanya kazi kama kawaida."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Angalia hatua za utunzaji"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Chomoa chaja"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Kuna tatizo la kuchaji kifaa hiki. Chomoa adapta ya nishati na uwe mwangalifu, huenda kebo ni moto."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Angalia hatua za ulinzi"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Mipangilio"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Nimeelewa"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> inatumia <xliff:g id="TYPES_LIST">%2$s</xliff:g> yako."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Programu zinatumia <xliff:g id="TYPES_LIST">%s</xliff:g> yako."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" na "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"mahali"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"maikrofoni"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Umezima vitambuzi"</string>
     <string name="device_services" msgid="1549944177856658705">"Huduma za Kifaa"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Wimbo hauna jina"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Inapakia mapendekezo"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Maudhui"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ficha kipindi cha sasa."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ficha"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Ondoa"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Endelea"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Mipangilio"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Haitumiki, angalia programu"</string>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index 4ff4c2f..e052ed9 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"மீண்டும் தொடங்கு"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"ரத்துசெய்"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"பகிர்"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"நீக்கு"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"திரை ரெக்கார்டிங் ரத்துசெய்யப்பட்டது"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"திரை ரெக்கார்டிங் சேமிக்கப்பட்டது, பார்க்கத் தட்டவும்"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"திரை ரெக்கார்டிங் நீக்கப்பட்டது"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"திரை ரெக்கார்டிங்கை நீக்குவதில் பிழை"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"அனுமதிகளைப் பெற இயலவில்லை"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"ஸ்கிரீன் ரெக்கார்டிங்கைத் தொடங்குவதில் பிழை"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"மேலே 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"மேலே 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"கீழ்ப்புறம் முழுத் திரை"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"நிலை <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. திருத்த, இருமுறை தட்டவும்."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. சேர்க்க, இருமுறை தட்டவும்."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ஐ நகர்த்தவும்"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ஐ அகற்றவும்"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"நிலைப்பாடு <xliff:g id="POSITION">%2$d</xliff:g> இல் <xliff:g id="TILE_NAME">%1$s</xliff:g>ஐச் சேர்க்கும்"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"நிலைப்பாடு <xliff:g id="POSITION">%2$d</xliff:g>க்கு <xliff:g id="TILE_NAME">%1$s</xliff:g>ஐ நகர்த்தும்"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"விரைவு அமைப்புகள் திருத்தி."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> அறிவிப்பு: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"திரைப் பிரிப்பில் ஆப்ஸ் வேலைசெய்யாமல் போகக்கூடும்."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"முந்தையதற்குச் செல்"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"அளவு மாற்று"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"வெப்பத்தினால் ஃபோன் ஆஃப் செய்யப்பட்டது"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"இப்போது உங்கள் ஃபோன் இயல்புநிலையில் இயங்குகிறது"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"இப்போது உங்கள் மொபைல் இயல்புநிலையில் இயங்குகிறது.\nமேலும் தகவலுக்கு தட்டவும்"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"உங்கள் ஃபோன் அதிகமாகச் சூடானதால், அதன் சூட்டைக் குறைக்க, ஆஃப் செய்யப்பட்டது. இப்போது உங்கள் ஃபோன் இயல்புநிலையில் இயங்குகிறது.\n\nபின்வருவனவற்றைச் செய்தால், ஃபோன் சூடாகலாம்:\n	• அதிகளவு தரவைப் பயன்படுத்தும் ஆப்ஸை (எ.கா: கேமிங், வீடியோ (அ) வழிகாட்டுதல் ஆப்ஸ்) பயன்படுத்துவது\n	• பெரிய கோப்புகளைப் பதிவிறக்குவது/பதிவேற்றுவது\n	• அதிக வெப்பநிலையில் ஃபோனைப் பயன்படுத்துவது"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"மேலும் விவரங்களுக்கு இதைப் பார்க்கவும்"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"மொபைல் சூடாகிறது"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"மொபைலின் வெப்ப அளவு குறையும் போது, சில அம்சங்களைப் பயன்படுத்த முடியாது"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"மொபைலின் வெப்ப அளவு குறையும் வரை சில அம்சங்களைப் பயன்படுத்த முடியாது.\nமேலும் தகவலுக்கு தட்டவும்"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"உங்கள் மொபைலின் வெப்ப அளவு தானாகவே குறையும். தொடர்ந்து நீங்கள் மொபைலைப் பயன்படுத்தலாம், ஆனால் அதன் வேகம் குறைவாக இருக்கக்கூடும்.\n\nமொபைலின் வெப்ப அளவு குறைந்தவுடன், அது இயல்பு நிலையில் இயங்கும்."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"மேலும் விவரங்களுக்கு இதைப் பார்க்கவும்"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"சார்ஜரைத் துண்டிக்கவும்"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"இந்தச் சாதனத்தைச் சார்ஜ் செய்வதில் சிக்கல் உள்ளது. பவர் அடாப்டரைத் துண்டிக்கவும், கேபிள் சூடாக இருக்கக்கூடும் என்பதால் கவனமாகக் கையாளவும்."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"மேலும் விவரங்களுக்கு இதைப் பார்க்கவும்"</string>
@@ -950,7 +951,7 @@
     <string name="notification_channel_general" msgid="4384774889645929705">"பொதுச் செய்திகள்"</string>
     <string name="notification_channel_storage" msgid="2720725707628094977">"சேமிப்பிடம்"</string>
     <string name="notification_channel_hints" msgid="7703783206000346876">"குறிப்புகள்"</string>
-    <string name="instant_apps" msgid="8337185853050247304">"இன்ஸ்டண்ட் ஆப்ஸ்"</string>
+    <string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
     <string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> இயங்குகிறது"</string>
     <string name="instant_apps_message" msgid="6112428971833011754">"நிறுவ வேண்டிய தேவையில்லாமல் ஆப்ஸ் திறக்கப்பட்டது."</string>
     <string name="instant_apps_message_with_help" msgid="1816952263531203932">"நிறுவ வேண்டிய தேவையில்லாமல் ஆப்ஸ் திறக்கப்பட்டது. மேலும் அறியத் தட்டவும்."</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"அமைப்புகள்"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"சரி"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"உங்கள் <xliff:g id="TYPES_LIST">%2$s</xliff:g>ஐ <xliff:g id="APP">%1$s</xliff:g> ஆப்ஸ் பயன்படுத்துகிறது."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"உங்கள் <xliff:g id="TYPES_LIST">%s</xliff:g> ஆகியவற்றை ஆப்ஸ் பயன்படுத்துகின்றன."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" மற்றும் "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"கேமரா"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"இருப்பிடம்"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"மைக்ரோஃபோன்"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"சென்சார்களை ஆஃப் செய்தல்"</string>
     <string name="device_services" msgid="1549944177856658705">"சாதன சேவைகள்"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"தலைப்பு இல்லை"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"பரிந்துரைகளை ஏற்றுகிறது"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"மீடியா"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"இந்த அமர்வை மறையுங்கள்."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"மறை"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"மூடுக"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"தொடர்க"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"அமைப்புகள்"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"செயலில் இல்லை , சரிபார்க்கவும்"</string>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index f972a68..04438db 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"కొనసాగించు"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"రద్దు చేయి"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"షేర్ చేయి"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"తొలగించు"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"స్క్రీన్ రికార్డ్ రద్దు చేయబడింది"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"స్క్రీన్ రికార్డింగ్ సేవ్ చేయబడింది, చూడటం కోసం నొక్కండి"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"స్క్రీన్ రికార్డింగ్ తొలగించబడింది"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"స్క్రీన్ రికార్డింగ్‌ని తొలగిస్తున్నప్పుడు ఎర్రర్ ఏర్పడింది"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"అనుమతులను పొందడం విఫలమైంది"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"స్క్రీన్ రికార్డింగ్ ప్రారంభించడంలో ఎర్రర్ ఏర్పడింది"</string>
@@ -121,7 +119,7 @@
     <string name="installer_cd_button_title" msgid="5499998592841984743">"Macకు Android ఫైల్ బదిలీ యాప్ ఇన్‌స్టాల్ చేయండి"</string>
     <string name="accessibility_back" msgid="6530104400086152611">"వెనుకకు"</string>
     <string name="accessibility_home" msgid="5430449841237966217">"హోమ్"</string>
-    <string name="accessibility_menu" msgid="2701163794470513040">"మెను"</string>
+    <string name="accessibility_menu" msgid="2701163794470513040">"మెనూ"</string>
     <string name="accessibility_accessibility_button" msgid="4089042473497107709">"యాక్సెస్ సామర్థ్యం"</string>
     <string name="accessibility_rotate_button" msgid="1238584767612362586">"స్క్రీన్‌ను తిప్పండి"</string>
     <string name="accessibility_recent" msgid="901641734769533575">"ఓవర్‌వ్యూ"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ఎగువ 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ఎగువ 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"దిగువ పూర్తి స్క్రీన్"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"స్థానం <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. సవరించడానికి రెండుసార్లు నొక్కండి."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. జోడించడానికి రెండుసార్లు నొక్కండి."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ని తరలిస్తుంది"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ని తీసివేస్తుంది"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"స్థానం <xliff:g id="POSITION">%2$d</xliff:g>కి <xliff:g id="TILE_NAME">%1$s</xliff:g>ని జోడించండి"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"స్థానం <xliff:g id="POSITION">%2$d</xliff:g>కి <xliff:g id="TILE_NAME">%1$s</xliff:g>ని తరలించండి"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"శీఘ్ర సెట్టింగ్‌ల ఎడిటర్."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> నోటిఫికేషన్: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"స్క్రీన్ విభజనతో యాప్‌ పని చేయకపోవచ్చు."</string>
@@ -913,7 +912,7 @@
     <string name="pip_phone_close" msgid="8801864042095341824">"మూసివేయి"</string>
     <string name="pip_phone_settings" msgid="5687538631925004341">"సెట్టింగ్‌లు"</string>
     <string name="pip_phone_dismiss_hint" msgid="5825740708095316710">"తీసివేయడానికి కిందికి లాగండి"</string>
-    <string name="pip_menu_title" msgid="6365909306215631910">"మెను"</string>
+    <string name="pip_menu_title" msgid="6365909306215631910">"మెనూ"</string>
     <string name="pip_notification_title" msgid="8661573026059630525">"<xliff:g id="NAME">%s</xliff:g> చిత్రంలో చిత్రం రూపంలో ఉంది"</string>
     <string name="pip_notification_message" msgid="4991831338795022227">"<xliff:g id="NAME">%s</xliff:g> ఈ లక్షణాన్ని ఉపయోగించకూడదు అని మీరు అనుకుంటే, సెట్టింగ్‌లను తెరవడానికి ట్యాప్ చేసి, దీన్ని ఆఫ్ చేయండి."</string>
     <string name="pip_play" msgid="333995977693142810">"ప్లే చేయి"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"దాటవేసి మునుపటి దానికి వెళ్లు"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"పరిమాణం మార్చు"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"వేడెక్కినందుకు ఫోన్ ఆఫ్ చేయబడింది"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"మీ ఫోన్ ఇప్పుడు సాధారణంగా పని చేస్తుంది"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"మీ ఫోన్ ఇప్పుడు సాధారణంగా పని చేస్తోంది.\nమరింత సమాచారం కోసం ట్యాప్ చేయండి"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"మీ ఫోన్ చాలా వేడిగా ఉంది, కనుక చల్లబర్చడానికి ఆఫ్ చేయబడింది. మీ ఫోన్ ఇప్పుడు సాధారణంగా పని చేస్తుంది.\n\nమీరు ఇలా చేస్తే మీ ఫోన్ చాలా వేడెక్కవచ్చు:\n	• వనరు-ఆధారిత అనువర్తనాలు (గేమింగ్, వీడియో లేదా నావిగేషన్ వంటి అనువర్తనాలు) ఉపయోగించడం\n	• పెద్ద ఫైల్‌లను డౌన్‌లోడ్ లేదా అప్‌లోడ్ చేయడం\n	• అధిక ఉష్ణోగ్రతలలో మీ ఫోన్‌ని ఉపయోగించడం"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"తీసుకోవాల్సిన జాగ్రత్తలు ఏమిటో చూడండి"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"ఫోన్ వేడెక్కుతోంది"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ఫోన్‌ను చల్లబరిచే క్రమంలో కొన్ని లక్షణాలు పరిమితం చేయబడ్డాయి"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ఫోన్‌ను చల్లబరిచే క్రమంలో కొన్ని ఫీచర్లు పరిమితం చేయబడ్డాయి.\nమరింత సమాచారం కోసం ట్యాప్ చేయండి"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"మీ ఫోన్ స్వయంచాలకంగా చల్లబడటానికి ప్రయత్నిస్తుంది. మీరు ఇప్పటికీ మీ ఫోన్‌ను ఉపయోగించవచ్చు, కానీ దాని పనితీరు నెమ్మదిగా ఉండవచ్చు.\n\nమీ ఫోన్ చల్లబడిన తర్వాత, అది సాధారణ రీతిలో పని చేస్తుంది."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"తీసుకోవాల్సిన జాగ్రత్తలు ఏమిటో చూడండి"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ప్లగ్ నుండి ఛార్జర్‌ తీసివేయండి"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ఈ పరికరాన్ని ఛార్జ్ చేయడంలో సమస్య ఉంది. పవర్ అడాప్టర్‌ను ప్లగ్ నుండి తీసివేసి, కేబుల్ ఏమైనా వేడిగా అయితే తగిన జాగ్రత్తలు తీసుకోండి."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"తీసుకోవాల్సిన జాగ్రత్తలు ఏమిటో చూడండి"</string>
@@ -942,7 +943,7 @@
     <string name="tuner_minus" msgid="5258518368944598545">"తీసివేత చిహ్నం"</string>
     <string name="tuner_left" msgid="5758862558405684490">"ఎడమ"</string>
     <string name="tuner_right" msgid="8247571132790812149">"కుడి"</string>
-    <string name="tuner_menu" msgid="363690665924769420">"మెను"</string>
+    <string name="tuner_menu" msgid="363690665924769420">"మెనూ"</string>
     <string name="tuner_app" msgid="6949280415826686972">"<xliff:g id="APP">%1$s</xliff:g> అనురవర్తనం"</string>
     <string name="notification_channel_alerts" msgid="3385787053375150046">"హెచ్చరికలు"</string>
     <string name="notification_channel_battery" msgid="9219995638046695106">"బ్యాటరీ"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"సెట్టింగ్‌లు"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"అర్థమైంది"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"డంప్ SysUI హీప్"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> మీ <xliff:g id="TYPES_LIST">%2$s</xliff:g>ని ఉపయోగిస్తోంది."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"అప్లికేషన్‌లు మీ <xliff:g id="TYPES_LIST">%s</xliff:g>ని ఉపయోగిస్తున్నాయి."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" మరియు "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"కెమెరా"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"లొకేషన్"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"మైక్రోఫోన్"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"సెన్సార్‌లు ఆఫ్"</string>
     <string name="device_services" msgid="1549944177856658705">"పరికర సేవలు"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"శీర్షిక లేదు"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"సిఫార్సులు లోడ్ అవుతున్నాయి"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"మీడియా"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"ప్రస్తుత సెషన్‌ను దాచు."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"దాచు"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"విస్మరించు"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"కొనసాగించండి"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"సెట్టింగ్‌లు"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"ఇన్‌యాక్టివ్, యాప్ చెక్ చేయండి"</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index a1c740e..6ea105f 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"ทำต่อ"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"ยกเลิก"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"แชร์"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"ลบ"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"ยกเลิกการบันทึกหน้าจอแล้ว"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"บันทึกการบันทึกหน้าจอแล้ว แตะเพื่อดู"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"ลบการบันทึกหน้าจอแล้ว"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"เกิดข้อผิดพลาดในการลบการบันทึกหน้าจอ"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"ขอสิทธิ์ไม่สำเร็จ"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"เกิดข้อผิดพลาดขณะเริ่มบันทึกหน้าจอ"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ด้านบน 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ด้านบน 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"เต็มหน้าจอด้านล่าง"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ตำแหน่ง <xliff:g id="POSITION">%1$d</xliff:g> <xliff:g id="TILE_NAME">%2$s</xliff:g> แตะ 2 ครั้งเพื่อแก้ไข"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g> แตะ 2 ครั้งเพื่อเพิ่ม"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"ย้าย <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"นำ <xliff:g id="TILE_NAME">%1$s</xliff:g> ออก"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"เพิ่ม <xliff:g id="TILE_NAME">%1$s</xliff:g> ไปยังตำแหน่ง <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"ย้าย <xliff:g id="TILE_NAME">%1$s</xliff:g> ไปยังตำแหน่ง <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ตัวแก้ไขการตั้งค่าด่วน"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> การแจ้งเตือน: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"แอปอาจใช้ไม่ได้กับโหมดแยกหน้าจอ"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"ข้ามไปรายการก่อนหน้า"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"ปรับขนาด"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"โทรศัพท์ปิดไปเพราะร้อนมาก"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"ขณะนี้โทรศัพท์ทำงานเป็นปกติ"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"ขณะนี้โทรศัพท์ทำงานเป็นปกติ\nแตะเพื่อดูข้อมูลเพิ่มเติม"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"โทรศัพท์ร้อนเกินไปจึงปิดเครื่องเพื่อให้เย็นลง ขณะนี้โทรศัพท์ทำงานเป็นปกติ\n\nโทรศัพท์อาจร้อนเกินไปหากคุณ\n	• ใช้แอปที่ใช้ทรัพยากรมาก (เช่น เกม วิดีโอ หรือแอปการนำทาง)\n	• ดาวน์โหลดหรืออัปโหลดไฟล์ขนาดใหญ่\n	• ใช้โทรศัพท์ในอุณหภูมิที่สูง"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"ดูขั้นตอนในการดูแลรักษา"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"โทรศัพท์เริ่มเครื่องร้อน"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"ฟีเจอร์บางอย่างจะใช้งานได้จำกัดขณะโทรศัพท์ลดอุณหภูมิลง"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"ฟีเจอร์บางอย่างจะใช้งานได้จำกัดขณะโทรศัพท์เย็นลง\nแตะเพื่อดูข้อมูลเพิ่มเติม"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"โทรศัพท์จะพยายามลดอุณหภูมิลงโดยอัตโนมัติ คุณยังสามารถใช้โทรศัพท์ได้ แต่โทรศัพท์อาจทำงานช้าลง\n\nโทรศัพท์จะทำงานตามปกติเมื่อเย็นลงแล้ว"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"ดูขั้นตอนในการดูแลรักษา"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"ถอดปลั๊กที่ชาร์จ"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"พบปัญหาในการชาร์จอุปกรณ์นี้ ถอดปลั๊กอะแดปเตอร์ด้วยความระมัดระวังเพราะสายอาจร้อน"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"ดูขั้นตอนในการดูแลรักษา"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"การตั้งค่า"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"รับทราบ"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> ใช้<xliff:g id="TYPES_LIST">%2$s</xliff:g>ของคุณอยู่"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"หลายแอปพลิเคชันใช้<xliff:g id="TYPES_LIST">%s</xliff:g>ของคุณอยู่"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" และ "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"กล้องถ่ายรูป"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"ตำแหน่ง"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"ไมโครโฟน"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"ปิดเซ็นเซอร์"</string>
     <string name="device_services" msgid="1549944177856658705">"บริการของอุปกรณ์"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"ไม่มีชื่อ"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"กำลังโหลดคำแนะนำ"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"สื่อ"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"ซ่อนเซสชันปัจจุบัน"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"ซ่อน"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"ปิด"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"เล่นต่อ"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"การตั้งค่า"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"ไม่มีการใช้งาน โปรดตรวจสอบแอป"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index e935ff8..b0123bb 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -28,15 +28,15 @@
     <string name="battery_low_percent_format" msgid="4276661262843170964">"<xliff:g id="PERCENTAGE">%s</xliff:g> na lang ang natitira"</string>
     <string name="battery_low_percent_format_hybrid" msgid="3985614339605686167">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> na lang ang natitira, humigit-kumulang <xliff:g id="TIME">%2$s</xliff:g> ang natitira batay sa iyong paggamit"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="5917433188456218857">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> na lang ang natitira, humigit-kumulang <xliff:g id="TIME">%2$s</xliff:g> ang natitira"</string>
-    <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"<xliff:g id="PERCENTAGE">%s</xliff:g> na lang ang natitira. Naka-on ang Pangtipid sa Baterya."</string>
+    <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"<xliff:g id="PERCENTAGE">%s</xliff:g> na lang ang natitira. Naka-on ang Pantipid ng Baterya."</string>
     <string name="invalid_charger" msgid="4370074072117767416">"Hindi makapag-charge sa pamamagitan ng USB. Gamitin ang charger na kasama ng iyong device."</string>
     <string name="invalid_charger_title" msgid="938685362320735167">"Hindi makapag-charge sa pamamagitan ng USB"</string>
     <string name="invalid_charger_text" msgid="2339310107232691577">"Gamitin ang charger na kasama ng iyong device"</string>
     <string name="battery_low_why" msgid="2056750982959359863">"Mga Setting"</string>
-    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"I-on ang Pangtipid sa Baterya?"</string>
-    <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"Tungkol sa Pangtipid sa Baterya"</string>
+    <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"I-on ang Pantipid ng Baterya?"</string>
+    <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"Tungkol sa Pantipid ng Baterya"</string>
     <string name="battery_saver_confirmation_ok" msgid="5042136476802816494">"I-on"</string>
-    <string name="battery_saver_start_action" msgid="4553256017945469937">"I-on ang Pangtipid sa Baterya"</string>
+    <string name="battery_saver_start_action" msgid="4553256017945469937">"I-on ang Pantipid ng Baterya"</string>
     <string name="status_bar_settings_settings_button" msgid="534331565185171556">"Mga Setting"</string>
     <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"Wi-Fi"</string>
     <string name="status_bar_settings_auto_rotation" msgid="8329080442278431708">"I-auto rotate ang screen"</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Ituloy"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Kanselahin"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Ibahagi"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"I-delete"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Kinansela ang pag-record ng screen"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Na-save ang pag-record ng screen, i-tap para tingnan"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Na-delete ang pag-record ng screen"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Error sa pag-delete sa pag-record ng screen"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Hindi nakuha ang mga pahintulot"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Nagkaroon ng error sa pagsisimula ng pag-record ng screen"</string>
@@ -421,7 +419,7 @@
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Mao-on sa ganap na <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"Hanggang <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_ui_mode_night_label" msgid="1398928270610780470">"Madilim na tema"</string>
-    <string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"Pangtipid sa Baterya"</string>
+    <string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"Pantipid ng Baterya"</string>
     <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"Mao-on sa sunset"</string>
     <string name="quick_settings_dark_mode_secondary_label_until_sunrise" msgid="4404885070316716472">"Hanggang sunrise"</string>
     <string name="quick_settings_dark_mode_secondary_label_on_at" msgid="5128758823486361279">"Ma-o-on nang <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -499,9 +497,9 @@
     <string name="user_remove_user_title" msgid="9124124694835811874">"Gusto mo bang alisin ang user?"</string>
     <string name="user_remove_user_message" msgid="6702834122128031833">"Made-delete ang lahat ng app at data ng user na ito."</string>
     <string name="user_remove_user_remove" msgid="8387386066949061256">"Alisin"</string>
-    <string name="battery_saver_notification_title" msgid="8419266546034372562">"Naka-on ang Pangtipid sa Baterya"</string>
+    <string name="battery_saver_notification_title" msgid="8419266546034372562">"Naka-on ang Pantipid ng Baterya"</string>
     <string name="battery_saver_notification_text" msgid="2617841636449016951">"Binabawasan ang performance at data sa background"</string>
-    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"I-off ang Pangtipid sa Baterya"</string>
+    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"I-off ang Pantipid ng Baterya"</string>
     <string name="media_projection_dialog_text" msgid="1755705274910034772">"Magkakaroon ng access ang <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> sa lahat ng impormasyong nakikita sa iyong screen o pine-play mula sa device mo habang nagre-record o nagka-cast. Kasama rito ang impormasyong tulad ng mga password, detalye ng pagbabayad, larawan, mensahe, at audio na pine-play mo."</string>
     <string name="media_projection_dialog_service_text" msgid="958000992162214611">"Ang serbisyong nagbibigay ng function na ito ay magkakaroon ng access sa lahat ng impormasyong nakikita sa iyong screen o pine-play mula sa device mo habang nagre-record o nagka-cast. Kasama rito ang impormasyong tulad ng mga password, detalye ng pagbabayad, larawan, mensahe, at audio na pine-play mo."</string>
     <string name="media_projection_dialog_service_title" msgid="2888507074107884040">"Magsimulang mag-record o mag-cast?"</string>
@@ -767,8 +765,8 @@
       <item quantity="other">%d na minuto</item>
     </plurals>
     <string name="battery_panel_title" msgid="5931157246673665963">"Paggamit ng baterya"</string>
-    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"Hindi available ang Pangtipid sa Baterya kapag nagcha-charge"</string>
-    <string name="battery_detail_switch_title" msgid="6940976502957380405">"Pangtipid sa Baterya"</string>
+    <string name="battery_detail_charging_summary" msgid="8821202155297559706">"Hindi available ang Pantipid ng Baterya kapag nagcha-charge"</string>
+    <string name="battery_detail_switch_title" msgid="6940976502957380405">"Pantipid ng Baterya"</string>
     <string name="battery_detail_switch_summary" msgid="3668748557848025990">"Binabawasan ang performance at data sa background"</string>
     <string name="keyboard_key_button_template" msgid="8005673627272051429">"Button na <xliff:g id="NAME">%1$s</xliff:g>"</string>
     <string name="keyboard_key_home" msgid="3734400625170020657">"Home"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Gawing 50% ang nasa itaas"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Gawing 30% ang nasa itaas"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"I-full screen ang nasa ibaba"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posisyon <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. I-double tap upang i-edit."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. I-double tap upang idagdag."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Ilipat ang <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Alisin ang <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Idagdag ang <xliff:g id="TILE_NAME">%1$s</xliff:g> sa posisyong <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Ilipat ang <xliff:g id="TILE_NAME">%1$s</xliff:g> sa posisyong <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"alisin ang tile"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"idagdag ang tile sa dulo"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Ilipat ang tile"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Magdagdag ng tile"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Ilipat sa <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Idagdag sa posisyong <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Posisyon <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor ng Mga mabilisang setting."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notification sa <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Maaaring hindi gumana ang app sa split-screen."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Lumaktaw sa nakaraan"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"I-resize"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Na-off ang telepono dahil sa init"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Maayos na ngayong gumagana ang iyong telepono"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Maayos na ngayong gumagana ang iyong telepono.\nMag-tap para sa higit pang impormasyon"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Napakainit ng telepono, kaya nag-off ito para lumamig. Maayos na itong gumagana.\n\nMaaaring lubos na uminit ang telepono kapag:\n	• Gumamit ka ng resource-intensive na app (gaya ng app para sa gaming, video, o navigation)\n	• Nag-download o nag-upload ka ng malaking file\n • Ginamit mo ito sa mainit na lugar"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Tingnan ang mga hakbang sa pangangalaga"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Umiinit ang telepono"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Limitado ang ilang feature habang nagku-cool down ang telepono"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Limitado ang ilang feature habang nagku-cool down ang telepono.\nMag-tap para sa higit pang impormasyon"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Awtomatikong susubukan ng iyong telepono na mag-cool down. Magagamit mo pa rin ang iyong telepono, ngunit maaaring mas mabagal ang paggana nito.\n\nKapag nakapag-cool down na ang iyong telepono, gagana na ito nang normal."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Tingnan ang mga hakbang sa pangangalaga"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Hugutin ang charger"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"May isyu sa pag-charge ng device na ito. Hugutin ang power adapter at mag-ingat dahil maaaring mainit ang cable."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Tingnan ang mga hakbang sa pangangalaga"</string>
@@ -980,14 +981,21 @@
     <string name="slice_permission_checkbox" msgid="4242888137592298523">"Payagan ang <xliff:g id="APP">%1$s</xliff:g> na ipakita ang mga slice mula sa anumang app"</string>
     <string name="slice_permission_allow" msgid="6340449521277951123">"Payagan"</string>
     <string name="slice_permission_deny" msgid="6870256451658176895">"Tanggihan"</string>
-    <string name="auto_saver_title" msgid="6873691178754086596">"I-tap para iiskedyul ang Pangtipid sa Baterya"</string>
+    <string name="auto_saver_title" msgid="6873691178754086596">"I-tap para iiskedyul ang Pantipid ng Baterya"</string>
     <string name="auto_saver_text" msgid="3214960308353838764">"I-on kapag malamang na maubos ang baterya"</string>
     <string name="no_auto_saver_action" msgid="7467924389609773835">"Hindi, salamat na lang"</string>
-    <string name="auto_saver_enabled_title" msgid="4294726198280286333">"Na-on ang iskedyul ng Pangtipid sa Baterya"</string>
-    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"Awtomatikong mao-on ang Pangtipid sa Baterya kapag mas mababa na sa <xliff:g id="PERCENTAGE">%d</xliff:g>%% ang baterya."</string>
+    <string name="auto_saver_enabled_title" msgid="4294726198280286333">"Na-on ang iskedyul ng Pantipid ng Baterya"</string>
+    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"Awtomatikong mao-on ang Pantipid ng Baterya kapag mas mababa na sa <xliff:g id="PERCENTAGE">%d</xliff:g>%% ang baterya."</string>
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Mga Setting"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Ginagamit ng <xliff:g id="APP">%1$s</xliff:g> ang iyong <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Ginagamit ng mga application ang iyong <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" at "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"camera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"lokasyon"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikropono"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Naka-off ang mga sensor"</string>
     <string name="device_services" msgid="1549944177856658705">"Mga Serbisyo ng Device"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Walang pamagat"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Nilo-load ang rekomendasyon"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Itago ang kasalukuyang session."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Itago"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"I-dismiss"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Ituloy"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Mga Setting"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Hindi aktibo, tingnan ang app"</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 2841852..da5db75 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Devam ettir"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"İptal"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Paylaş"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Sil"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Ekran kaydı iptal edildi"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Ekran kaydı tamamlandı, görüntülemek için dokunun"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Ekran kaydı silindi"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Ekran kaydı silinirken hata oluştu"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"İzinler alınamadı"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Ekran kaydı başlatılırken hata oluştu"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Üstte %50"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Üstte %30"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Altta tam ekran"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. konum, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Düzenlemek için iki kez dokunun."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Eklemek için iki kez dokunun."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> kutusunu taşı"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> kutusunu kaldır"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="TILE_NAME">%1$s</xliff:g> öğesini <xliff:g id="POSITION">%2$d</xliff:g> konumuna ekle"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> öğesini <xliff:g id="POSITION">%2$d</xliff:g> konumuna taşı"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"Karoyu kaldırmak için"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"Sona karo eklemek için"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Karoyu taşı"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Karo ekle"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"<xliff:g id="POSITION">%1$d</xliff:g> konumuna taşı"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"<xliff:g id="POSITION">%1$d</xliff:g> konumuna ekle"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Konum: <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Hızlı ayar düzenleyicisi."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> bildirimi: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Uygulama bölünmüş ekranda çalışmayabilir."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Öncekine atla"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Yeniden boyutlandır"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Telefon ısındığından kapatıldı"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefonunuz şu anda normal bir şekilde çalışıyor"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Telefonunuz şu anda normal bir şekilde çalışıyor.\nDaha fazla bilgi için dokunun"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefonunuz çok ısındığından soğuması için kapatıldı ve şu anda normal bir şekilde çalışıyor.\n\nTelefon şu koşullarda çok ısınabilir:\n	• Yoğun kaynak gerektiren uygulamalar (oyun, video veya gezinme uygulamaları gibi) kullanma\n	• Büyük dosyalar indirme veya yükleme\n	• Telefonu sıcak yerlerde kullanma"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Bakımla ilgili adımlara bakın"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon ısınıyor"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Telefon soğurken bazı özellikler sınırlı olarak kullanılabilir"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Telefon soğurken bazı özellikler sınırlı olarak kullanılabilir.\nDaha fazla bilgi için dokunun"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefonunuz otomatik olarak soğumaya çalışacak. Bu sırada telefonunuzu kullanmaya devam edebilirsiniz ancak uygulamalar daha yavaş çalışabilir.\n\nTelefonunuz soğuduktan sonra normal şekilde çalışacaktır."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Bakımla ilgili adımlara bakın"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Şarj cihazını çıkarın"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Bu cihaz şarj edilirken bir sorun oluştu. Güç adaptörünün fişini çekin. Kablo sıcak olabileceğinden fişi çekerken dikkatli olun."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Bakımla ilgili adımlara bakın"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Ayarlar"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Anladım"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"SysUI Yığın Dökümü"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> şunları kullanıyor: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Uygulamalar şunları kullanıyor: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" ve "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"konum"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensörler kapalı"</string>
     <string name="device_services" msgid="1549944177856658705">"Cihaz Hizmetleri"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Başlıksız"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Öneriler yükleniyor"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Medya"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Mevcut oturumu gizle."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Gizle"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Kapat"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Devam ettir"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Ayarlar"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Devre dışı, uygulamaya bakın"</string>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 0b8106c..5689891 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -28,7 +28,7 @@
     <string name="battery_low_percent_format" msgid="4276661262843170964">"Залишилося <xliff:g id="PERCENTAGE">%s</xliff:g>"</string>
     <string name="battery_low_percent_format_hybrid" msgid="3985614339605686167">"На основі використання залишилося <xliff:g id="PERCENTAGE">%1$s</xliff:g> – близько <xliff:g id="TIME">%2$s</xliff:g>"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="5917433188456218857">"Залишилося <xliff:g id="PERCENTAGE">%1$s</xliff:g> – близько <xliff:g id="TIME">%2$s</xliff:g>"</string>
-    <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"Залишилося <xliff:g id="PERCENTAGE">%s</xliff:g>. Увімкнено режим економії заряду акумулятора."</string>
+    <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"Залишилося <xliff:g id="PERCENTAGE">%s</xliff:g>. Увімкнено режим енергозбереження."</string>
     <string name="invalid_charger" msgid="4370074072117767416">"Не вдається зарядити через USB. Використовуйте зарядний пристрій, який входить у комплект пристрою."</string>
     <string name="invalid_charger_title" msgid="938685362320735167">"Не вдається зарядити через USB"</string>
     <string name="invalid_charger_text" msgid="2339310107232691577">"Використовуйте зарядний пристрій, який входить у комплект пристрою"</string>
@@ -36,7 +36,7 @@
     <string name="battery_saver_confirmation_title" msgid="1234998463717398453">"Увімкнути режим енергозбереження?"</string>
     <string name="battery_saver_confirmation_title_generic" msgid="2299231884234959849">"Про режим енергозбереження"</string>
     <string name="battery_saver_confirmation_ok" msgid="5042136476802816494">"Увімкнути"</string>
-    <string name="battery_saver_start_action" msgid="4553256017945469937">"Увімкнути режим економії заряду акумулятора"</string>
+    <string name="battery_saver_start_action" msgid="4553256017945469937">"Увімкнути режим енергозбереження"</string>
     <string name="status_bar_settings_settings_button" msgid="534331565185171556">"Налаштування"</string>
     <string name="status_bar_settings_wifi_button" msgid="7243072479837270946">"Wi-Fi"</string>
     <string name="status_bar_settings_auto_rotation" msgid="8329080442278431708">"Автообертання екрана"</string>
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Відновити"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Скасувати"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Поділитися"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Видалити"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Запис екрана скасовано"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Запис екрана збережено. Натисніть, щоб переглянути"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Запис екрана видалено"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Не вдалося видалити запис екрана"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Не вдалось отримати дозволи"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Не вдалося почати запис екрана"</string>
@@ -507,7 +505,7 @@
     <string name="user_remove_user_remove" msgid="8387386066949061256">"Видалити"</string>
     <string name="battery_saver_notification_title" msgid="8419266546034372562">"Режим енергозбереження ввімкнено"</string>
     <string name="battery_saver_notification_text" msgid="2617841636449016951">"Знижується продуктивність і обмежуються фонові дані"</string>
-    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"Вимкнути режим економії заряду акумулятора"</string>
+    <string name="battery_saver_notification_action_text" msgid="6022091913807026887">"Вимкнути режим енергозбереження"</string>
     <string name="media_projection_dialog_text" msgid="1755705274910034772">"Додаток <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> матиме доступ до всієї інформації, яка з\'являється на екрані або відтворюється на пристрої під час запису чи трансляції, зокрема до паролів, інформації про платежі, фотографій, повідомлень і аудіофайлів."</string>
     <string name="media_projection_dialog_service_text" msgid="958000992162214611">"Сервіс, що надає цю функцію, матиме доступ до всієї інформації, яка з\'являється на екрані або відтворюється на пристрої під час запису чи трансляції, зокрема до паролів, інформації про платежі, фотографій, повідомлень і аудіофайлів."</string>
     <string name="media_projection_dialog_service_title" msgid="2888507074107884040">"Почати запис або трансляцію?"</string>
@@ -894,12 +892,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Верхнє вікно на 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Верхнє вікно на 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Нижнє вікно на весь екран"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Позиція <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Двічі торкніться, щоб змінити."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Двічі торкніться, щоб додати."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Перемістити <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Видалити <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Додати <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицію <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Перемістити <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицію <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Редактор швидких налаштувань."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Сповіщення <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Додаток може не працювати в режимі розділеного екрана."</string>
@@ -932,11 +931,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Перейти назад"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Змінити розмір"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Телефон перегрівся й вимкнувся"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Зараз телефон працює, як зазвичай"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Зараз телефон працює як зазвичай.\nНатисніть, щоб дізнатися більше"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Телефон перегрівся, тому вимкнувся, щоб охолонути. Зараз він працює, як зазвичай.\n\nТелефон перегрівається, якщо ви:\n	• використовуєте ресурсомісткі додатки (ігри, відео, навігація)\n	• завантажуєте великі файли на телефон або з нього\n	• використовуєте телефон за високої температури"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Переглянути запобіжні заходи"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Телефон нагрівається"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Під час охолодження деякі функції обмежуються"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Під час охолодження деякі функції обмежуються.\nНатисніть, щоб дізнатися більше"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Ваш телефон охолоджуватиметься автоматично. Ви можете далі користуватися телефоном, але він може працювати повільніше.\n\nКоли телефон охолоне, він працюватиме належним чином."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Переглянути запобіжні заходи"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Відключіть зарядний пристрій"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Виникла проблема із заряджанням пристрою. Відключіть адаптер живлення, однак будьте обережні, оскільки кабель може бути гарячим."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Переглянути застереження"</string>
@@ -990,14 +991,21 @@
     <string name="slice_permission_checkbox" msgid="4242888137592298523">"Дозволити додатку <xliff:g id="APP">%1$s</xliff:g> показувати фрагменти будь-якого додатка"</string>
     <string name="slice_permission_allow" msgid="6340449521277951123">"Дозволити"</string>
     <string name="slice_permission_deny" msgid="6870256451658176895">"Заборонити"</string>
-    <string name="auto_saver_title" msgid="6873691178754086596">"Торкніться, щоб увімкнути автоматичний режим економії заряду акумулятора"</string>
+    <string name="auto_saver_title" msgid="6873691178754086596">"Торкніться, щоб налаштувати режим енергозбереження"</string>
     <string name="auto_saver_text" msgid="3214960308353838764">"Вмикати, коли заряд акумулятора закінчується"</string>
     <string name="no_auto_saver_action" msgid="7467924389609773835">"Ні, дякую"</string>
     <string name="auto_saver_enabled_title" msgid="4294726198280286333">"Автоматичний перехід у режим енергозбереження ввімкнено"</string>
-    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"Режим економії заряду акумулятора вмикається автоматично, коли рівень заряду нижчий за <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
+    <string name="auto_saver_enabled_text" msgid="7889491183116752719">"Режим енергозбереження вмикається автоматично, коли рівень заряду нижчий за <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Налаштування"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"Додаток <xliff:g id="APP">%1$s</xliff:g> використовує <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Додатки використовують <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" і "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"камеру"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"місце"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"мікрофон"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Датчики вимкнено"</string>
     <string name="device_services" msgid="1549944177856658705">"Сервіси на пристрої"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Без назви"</string>
@@ -1078,7 +1086,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Завантаження рекомендацій"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Медіа"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Приховати поточний сеанс."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Приховати"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Закрити"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Відновити"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Налаштування"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Неактивно, перейдіть у додаток"</string>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index aea5f5a..70e313d 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"دوبارہ شروع کریں"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"منسوخ کریں"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"اشتراک کریں"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"حذف کریں"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"اسکرین ریکارڈنگ منسوخ ہو گئی"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"اسکرین ریکارڈنگ محفوظ ہو گئی، دیکھنے کیلئے تھپتھپائیں"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"اسکرین ریکارڈنگ حذف ہو گئی"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"اسکرین ریکارڈنگ کو حذف کرنے میں خرابی"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"اجازتیں حاصل کرنے میں ناکامی"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"اسکرین ریکارڈنگ شروع کرنے میں خرابی"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"اوپر %50"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"اوپر %30"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"نچلی فل اسکرین"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"پوزیشن <xliff:g id="POSITION">%1$d</xliff:g>، <xliff:g id="TILE_NAME">%2$s</xliff:g>۔ ترمیم کرنے کیلئے دو بار تھپتھپائیں۔"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>۔ شامل کرنے کیلئے دو بار تھپتھپائیں۔"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> کو منتقل کریں"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ہٹائیں"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"پوزیشن <xliff:g id="TILE_NAME">%1$s</xliff:g> میں <xliff:g id="POSITION">%2$d</xliff:g> شامل کریں"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> کو پوزیشن <xliff:g id="POSITION">%2$d</xliff:g> میں منتقل کریں"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"فوری ترتیبات کا ایڈیٹر۔"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> اطلاع: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"ممکن ہے کہ ایپ سپلٹ اسکرین کے ساتھ کام نہ کرے۔"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"نظرانداز کرکے پچھلے پر جائیں"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"سائز تبدیل کریں"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"حرارت کی وجہ سے فون آف ہو گیا"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"آپ کا فون اب حسب معمول کام کر رہا ہے"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"آپ کا فون اب حسب معمول چل رہا ہے۔\nمزید معلومات کیلئے تھپتھپائیں"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"آپ کا فون کافی گرم ہو گيا تھا، اس لئے سرد ہونے کیلئے یہ آف ہو گیا۔ اب آپ کا فون حسب معمول کام کر رہا ہے۔\n\nمندرجہ ذیل چیزیں کرنے پر آپ کا فون کافی گرم ہو سکتا ہے:\n	• ماخذ کا زیادہ استعمال کرنے والی ایپس (جیسے کہ گیمنگ، ویڈیو، یا نیویگیشن ایپس) کا استعمال کرنا\n	• بڑی فائلز ڈاؤن لوڈ یا اپ لوڈ کرنا\n	• اعلی درجہ حرارت میں فون کا استعمال کرنا"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"نگہداشت کے اقدامات ملاحظہ کریں"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"فون گرم ہو رہا ہے"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"فون کے ٹھنڈے ہو جانے تک کچھ خصوصیات محدود ہیں"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"فون کے ٹھنڈے ہو جانے تک کچھ خصوصیات محدود ہیں۔\nمزید معلومات کیلئے تھپتھپائیں"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"آپ کا فون خودکار طور پر ٹھنڈا ہونے کی کوشش کرے گا۔ آپ ابھی بھی اپنا فون استعمال کر سکتے ہیں، مگر ہو سکتا ہے یہ سست چلے۔\n\nایک بار آپ کا فون ٹھنڈا ہوجائے تو یہ معمول کے مطابق چلے گا۔"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"نگہداشت کے اقدامات ملاحظہ کریں"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"چارجر ان پلگ کریں"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"اس آلہ کو چارج کرنے میں ایک مسئلہ ہے۔ پاور ایڈاپٹر کو ان پلگ کریں اور دھیان دیں کیونکہ تار گرم ہو سکتا ہے۔"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"نگہداشت کے اقدامات ملاحظہ کریں"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"ترتیبات"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"سمجھ آ گئی"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> آپ کی <xliff:g id="TYPES_LIST">%2$s</xliff:g> کا استعمال کر رہی ہے۔"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"ایپلیکیشنز آپ کی <xliff:g id="TYPES_LIST">%s</xliff:g> کا استعمال کر رہی ہیں۔"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"، "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" اور "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"کیمرا"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"مقام"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"مائیکروفون"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"سینسرز آف ہیں"</string>
     <string name="device_services" msgid="1549944177856658705">"آلہ کی سروس"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"کوئی عنوان نہیں ہے"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"تجاویز لوڈ ہو رہی ہیں"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"میڈیا"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"موجودہ سیشن چھپائیں۔"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"چھپائیں"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"برخاست کریں"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"دوبارہ شروع کریں"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"ترتیبات"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"غیر فعال، ایپ چیک کریں"</string>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index 18891da..51124aa 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Davom etish"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Bekor qilish"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Ulashish"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"O‘chirish"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Ekrandan yozib olish bekor qilindi"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Ekrandan yozib olingan video saqlandi. Uni ochish uchun bildirishnomani bosing."</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Ekrandan yozib olingan video o‘chirib tashlandi"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Ekrandan yozib olingan vi olib tashlanmadi"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Zarur ruxsatlar olinmadi"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Ekranni yozib olish boshlanmadi"</string>
@@ -768,7 +766,7 @@
     </plurals>
     <string name="battery_panel_title" msgid="5931157246673665963">"Batareya sarfi"</string>
     <string name="battery_detail_charging_summary" msgid="8821202155297559706">"Quvvat tejash rejimidan quvvatlash vaqtida foydalanib bo‘lmaydi"</string>
-    <string name="battery_detail_switch_title" msgid="6940976502957380405">"Quvvat tejash rejimi"</string>
+    <string name="battery_detail_switch_title" msgid="6940976502957380405">"Quvvat tejash"</string>
     <string name="battery_detail_switch_summary" msgid="3668748557848025990">"Unumdorlik pasayadi va fonda internetdan foydalanish cheklanadi"</string>
     <string name="keyboard_key_button_template" msgid="8005673627272051429">"<xliff:g id="NAME">%1$s</xliff:g> tugmasi"</string>
     <string name="keyboard_key_home" msgid="3734400625170020657">"Bosh ekran"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Tepada 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Tepada 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pastda to‘liq ekran"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>-joy, “<xliff:g id="TILE_NAME">%2$s</xliff:g>” tugmasi. Tahrirlash uchun ustiga ikki marta bosing."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"“<xliff:g id="TILE_NAME">%1$s</xliff:g>” tugmasi. Qo‘shish uchun ustiga ikki marta bosing."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"“<xliff:g id="TILE_NAME">%1$s</xliff:g>” tugmasini ko‘chirish"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"<xliff:g id="TILE_NAME">%1$s</xliff:g> tugmasini olib tashlash"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"<xliff:g id="POSITION">%2$d</xliff:g>-joyga buni qo‘shish: <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g>-joyga buni ko‘chirish: <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"katakchani olib tashlash"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"oxiriga katakcha kiritish"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Katakchani boshqa joyga olish"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Katakcha kiritish"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Bu joyga olish: <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Bu joyga kiritish: <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Joylashuv: <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Tezkor sozlamalar muharriri"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> bildirishnomasi: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Ilova ekranni ikkiga bo‘lish rejimini qo‘llab-quvvatlamaydi."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Avvalgisiga qaytish"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Oʻlchamini oʻzgartirish"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Qizigani uchun o‘chirildi"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Telefoningiz hozir normal holatda ishlayapti"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Endi telefoningiz normal holatda ishlayapti.\nBatafsil axborot uchun bosing"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Telefon qizib ketganligi sababli sovitish uchun o‘chirib qo‘yilgan. Endi telefoningiz normal holatda ishlayapti.\n\nTelefon bu hollarda qizib ketishi mumkin:\n	• Resurstalab ilovalar ishlatilganda (masalan, o‘yin, video yoki navigatsiya ilovalari)\n	• Katta faylni yuklab olishda yoki yuklashda\n	• Telefondan yuqori haroratda foydalanganda"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Batafsil axborot"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Telefon qizib ketdi"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Telefon sovish paytida ayrim funksiyalar ishlamasligi mumkin"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Telefon sovib qolganda ayrim funksiyalari ishlamasligi mumkin.\nBatafsil axborot uchun bosing"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Telefon avtomatik ravishda o‘zini sovitadi. Telefoningizdan foydalanishda davom etishingiz mumkin, lekin u sekinroq ishlashi mumkin.\n\nTelefon sovishi bilan normal holatda ishlashni boshlaydi."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Batafsil axborot"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Quvvatlash moslamasini uzing"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Bu qurilmani quvvatlashda muammo bor. Quvvat adapteri va kabelni tarmoqdan uzing, ular qizib ketgan boʻlishi mumkin."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Batafsil axborot"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Sozlamalar"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> ishlatmoqda: <xliff:g id="TYPES_LIST">%2$s</xliff:g>."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Ilovalarda ishlatilmoqda: <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" va "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"kamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"joylashuv"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"mikrofon"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Sensorlar nofaol"</string>
     <string name="device_services" msgid="1549944177856658705">"Qurilma xizmatlari"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Nomsiz"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Tavsiyalar yuklanmoqda"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Media"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Joriy seans berkitilsin."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Berkitish"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Yopish"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Davom etish"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Sozlamalar"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Nofaol. Ilovani tekshiring"</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 768bf98..b70d70d 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Tiếp tục"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Hủy"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Chia sẻ"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Xóa"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Đã hủy bản ghi màn hình"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Đã lưu bản ghi màn hình, nhấn để xem"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Đã xóa bản ghi màn hình"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Lỗi khi xóa bản ghi màn hình"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Không được cấp đủ quyền"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Lỗi khi bắt đầu ghi màn hình"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Trên 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Trên 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Toàn màn hình phía dưới"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Vị trí <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Nhấn đúp để chỉnh sửa."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Nhấn đúp để thêm."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Di chuyển <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Xóa <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Thêm <xliff:g id="TILE_NAME">%1$s</xliff:g> vào vị trí <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Di chuyển <xliff:g id="TILE_NAME">%1$s</xliff:g> đến vị trí <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"xóa ô"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"thêm ô vào cuối"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Di chuyển ô"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Thêm ô"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Di chuyển tới <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Thêm vào vị trí <xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Vị trí <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Trình chỉnh sửa cài đặt nhanh."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Thông báo của <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Ứng dụng có thể không hoạt động với tính năng chia đôi màn hình."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Chuyển về mục trước"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Đổi kích thước"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Điện thoại đã tắt do nhiệt"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Điện thoại của bạn hiện đang chạy bình thường"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Điện thoại của bạn đang chạy bình thường.\nHãy nhấn để biết thêm thông tin"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Do quá nóng nên điện thoại đã tắt để hạ nhiệt. Hiện điện thoại của bạn đang chạy bình thường.\n\nĐiện thoại có thể bị quá nóng nếu bạn:\n	• Dùng các ứng dụng tốn nhiều tài nguyên (như ứng dụng trò chơi, video hoặc điều hướng)\n	• Tải xuống hoặc tải lên tệp có dung lượng lớn\n	• Dùng điện thoại ở nhiệt độ cao"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Xem các bước chăm sóc"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Điện thoại đang nóng lên"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Một số tính năng bị hạn chế trong khi điện thoại nguội dần"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Một số tính năng bị hạn chế trong khi điện thoại nguội dần.\nHãy nhấn để biết thêm thông tin"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Điện thoại của bạn sẽ tự động nguội dần. Bạn vẫn có thể sử dụng điện thoại, nhưng điện thoại có thể chạy chậm hơn. \n\nSau khi đã nguội, điện thoại sẽ chạy bình thường."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Xem các bước chăm sóc"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Rút phích cắm bộ sạc"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Đã xảy ra sự cố khi sạc thiết bị này. Hãy rút phích cắm bộ chuyển đổi điện và cẩn thận vì dây cáp có thể nóng."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Xem các bước chăm sóc"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Cài đặt"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"OK"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Trích xuất bộ nhớ SysUI"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g> đang dùng <xliff:g id="TYPES_LIST">%2$s</xliff:g> của bạn."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Các ứng dụng đang dùng <xliff:g id="TYPES_LIST">%s</xliff:g> của bạn."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" và "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"máy ảnh"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"vị trí"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"micrô"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Tắt cảm biến"</string>
     <string name="device_services" msgid="1549944177856658705">"Dịch vụ cho thiết bị"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Không có tiêu đề"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Đang tải các đề xuất"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Nội dung nghe nhìn"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Ẩn phiên hiện tại."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Ẩn"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Đóng"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Tiếp tục"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Cài đặt"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Không hoạt động, hãy kiểm tra ứng dụng"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 489203f..c5fe4dd 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"继续"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"取消"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"分享"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"删除"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"已取消录制屏幕"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"屏幕录制内容已保存,点按即可查看"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"已删除屏幕录制内容"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"删除屏幕录制内容时出错"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"无法获取权限"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"启动屏幕录制时出错"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"顶部 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"顶部 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"底部全屏"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"位置 <xliff:g id="POSITION">%1$d</xliff:g>,<xliff:g id="TILE_NAME">%2$s</xliff:g>。点按两次即可修改。"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>。点按两次即可添加。"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"移动<xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"移除<xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"将“<xliff:g id="TILE_NAME">%1$s</xliff:g>”添加到位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"将“<xliff:g id="TILE_NAME">%1$s</xliff:g>”移动到位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"快捷设置编辑器。"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>通知:<xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"应用可能无法在分屏模式下正常运行。"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"跳到上一个"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"调整大小"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"手机因严重发热而自动关机"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"现在,您的手机已恢复正常运行"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"现在,您的手机已恢复正常运行。\n点按即可了解详情"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"由于发热严重,因此您的手机执行了自动关机以降温。现在,您的手机已恢复正常运行。\n\n以下情况可能会导致您的手机严重发热:\n • 使用占用大量资源的应用(例如游戏、视频或导航应用)\n • 下载或上传大型文件\n • 在高温环境下使用手机"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"查看处理步骤"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"手机温度上升中"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"手机降温时,部分功能的使用会受限制"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"手机降温时,部分功能的使用会受限制。\n点按即可了解详情"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"您的手机将自动尝试降温。您依然可以使用您的手机,但是手机运行速度可能会更慢。\n\n手机降温后,就会恢复正常的运行速度。"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"查看处理步骤"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"拔下充电器"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"为此设备充电时出现问题。这可能是由数据线太热所导致,请拔下电源适配器并采取相应的处理措施。"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"查看处理步骤"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"设置"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"知道了"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"转储 SysUI 堆"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"<xliff:g id="APP">%1$s</xliff:g>正在使用您的<xliff:g id="TYPES_LIST">%2$s</xliff:g>。"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"有多个应用正在使用您的<xliff:g id="TYPES_LIST">%s</xliff:g>。"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"、 "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" 和 "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"相机"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"位置信息"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"麦克风"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"已关闭传感器"</string>
     <string name="device_services" msgid="1549944177856658705">"设备服务"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"无标题"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"正在加载推荐内容"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"媒体"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"隐藏当前会话。"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"隐藏"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"关闭"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"继续播放"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"设置"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"无效,请检查应用"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index e1d398d..9ec6775 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"繼續"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"取消"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"分享"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"刪除"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"已取消錄影畫面"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"已儲存錄影畫面,輕按即可查看"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"已刪除錄影畫面"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"刪除錄影畫面時發生錯誤"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"無法獲得權限"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"開始錄影畫面時發生錯誤"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"頂部 50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"頂部 30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"底部全螢幕"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"位置 <xliff:g id="POSITION">%1$d</xliff:g>,<xliff:g id="TILE_NAME">%2$s</xliff:g>。輕按兩下即可編輯。"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>。輕按兩下即可新增。"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"移動 <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"移除 <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"將「<xliff:g id="TILE_NAME">%1$s</xliff:g>」加去位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"將「<xliff:g id="TILE_NAME">%1$s</xliff:g>」移去位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"快速設定編輯工具。"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> 通知:<xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"應用程式可能無法在分割畫面中運作。"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"跳到上一個"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"調整大小"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"手機因過熱而關上"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"您的手機現已正常運作"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"您的手機現已正常運作。\n輕按即可瞭解詳情"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"您的手機之前因過熱而關上降溫。手機現已正常運作。\n\n以下情況可能會導致手機過熱:\n	• 使用耗用大量資源的應用程式 (例如遊戲、影片或導航應用程式)\n	• 下載或上載大型檔案\n	• 在高溫環境下使用手機"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"查看保養步驟"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"手機溫度正在上升"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"手機降溫時,部分功能會受限制"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"手機降溫時,部分功能會受限制。\n輕按即可瞭解詳情"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"手機會自動嘗試降溫。您仍可以使用手機,但手機的運作速度可能較慢。\n\n手機降溫後便會恢復正常。"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"查看保養步驟"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"拔下充電器"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"為此裝置充電時發生問題。請拔除電源適配器並注意安全,因為連接線可能會發熱。"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"查看保養步驟"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"設定"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"知道了"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"「<xliff:g id="APP">%1$s</xliff:g>」正在使用<xliff:g id="TYPES_LIST">%2$s</xliff:g>。"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"有多個應用程式正在使用<xliff:g id="TYPES_LIST">%s</xliff:g>。"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"、 "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" 和 "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"相機"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"位置"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"麥克風"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"感應器已關閉"</string>
     <string name="device_services" msgid="1549944177856658705">"裝置服務"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"無標題"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"正在載入建議"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"媒體"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"隱藏目前的工作階段。"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"隱藏"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"關閉"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"繼續播放"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"設定"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"已停用,請檢查應用程式"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 7ecb7d2..828e86f 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"繼續"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"取消"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"分享"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"刪除"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"已取消錄製螢幕畫面"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"已儲存螢幕畫面錄製內容,輕觸即可查看"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"已刪除螢幕畫面錄製內容"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"刪除螢幕畫面錄製內容時發生錯誤"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"無法取得權限"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"開始錄製螢幕畫面時發生錯誤"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"以 50% 的螢幕空間顯示頂端畫面"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"以 30% 的螢幕空間顯示頂端畫面"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"以全螢幕顯示底部畫面"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"位置 <xliff:g id="POSITION">%1$d</xliff:g>,<xliff:g id="TILE_NAME">%2$s</xliff:g>。輕觸兩下即可編輯。"</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>。輕觸兩下即可新增。"</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"移動 <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"移除 <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"將 <xliff:g id="TILE_NAME">%1$s</xliff:g> 新增到位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"將 <xliff:g id="TILE_NAME">%1$s</xliff:g> 移到位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <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_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>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"快速設定編輯器。"</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> 通知:<xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"應用程式可能無法在分割畫面中運作。"</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"跳到上一個"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"調整大小"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"手機先前過熱,因此關閉電源"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"手機現在已恢復正常運作"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"手機現在已恢復正常運作。\n輕觸即可瞭解詳情"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"手機先前的溫度過高,因此關閉了電源以進行降溫。手機現在已恢復正常運作。\n\n以下情況可能會導致你的手機溫度過高:\n	• 使用需要密集處理資料的應用程式 (例如遊戲、影片或導航應用程式)\n	• 下載或上傳大型檔案\n	• 在高溫環境下使用手機"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"查看處理步驟"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"手機變熱"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"手機降溫時,部分功能會受限"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"手機降溫時,某些功能會受限。\n輕觸即可瞭解詳情"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"手機會自動嘗試降溫。你仍可繼續使用手機,但是手機的運作速度可能會較慢。\n\n手機降溫完畢後,就會恢復正常的運作速度。"</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"查看處理步驟"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"拔除充電器"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"為這個裝置充電時發生問題。這可能是因為傳輸線過熱所致,請拔除電源變壓器並採取處理措施。"</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"查看處理步驟"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"設定"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"我知道了"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"「<xliff:g id="APP">%1$s</xliff:g>」正在使用<xliff:g id="TYPES_LIST">%2$s</xliff:g>。"</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"有多個應用程式正在使用<xliff:g id="TYPES_LIST">%s</xliff:g>。"</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">"、 "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" 和 "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"相機"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"位置"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"麥克風"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"已關閉感應器"</string>
     <string name="device_services" msgid="1549944177856658705">"裝置服務"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"無標題"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"正在載入建議控制項"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"媒體"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"隱藏目前的工作階段。"</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"隱藏"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"關閉"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"繼續播放"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"設定"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"無效,請查看應用程式"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 9e0dc3c..719a6d0 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -108,10 +108,8 @@
     <string name="screenrecord_resume_label" msgid="4972223043729555575">"Qalisa kabusha"</string>
     <string name="screenrecord_cancel_label" msgid="7850926573274483294">"Khansela"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Yabelana"</string>
-    <string name="screenrecord_delete_label" msgid="1376347010553987058">"Susa"</string>
     <string name="screenrecord_cancel_success" msgid="1775448688137393901">"Ukurekhoda isikrini kukhanseliwe"</string>
     <string name="screenrecord_save_message" msgid="490522052388998226">"Ukurekhoda isikrini kulondoloziwe, thepha ukuze ubuke"</string>
-    <string name="screenrecord_delete_description" msgid="1604522770162810570">"Ukurekhoda isikrini kususiwe"</string>
     <string name="screenrecord_delete_error" msgid="2870506119743013588">"Iphutha lokususa ukurekhoda isikrini"</string>
     <string name="screenrecord_permission_error" msgid="7856841237023137686">"Yehlulekile ukuthola izimvume"</string>
     <string name="screenrecord_start_error" msgid="2200660692479682368">"Iphutha lokuqala ukurekhoda isikrini"</string>
@@ -884,12 +882,13 @@
     <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Okuphezulu okungu-50%"</string>
     <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Okuphezulu okungu-30%"</string>
     <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ngaphansi kwesikrini esigcwele"</string>
-    <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Isimo esingu-<xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Thepha kabili ukuze uhlele."</string>
-    <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Thepha kabili ukuze ungeze."</string>
-    <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Hambisa i-<xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_remove_tile" msgid="3406781901949899624">"Susa i-<xliff:g id="TILE_NAME">%1$s</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_add" msgid="6289879620154587233">"Engeza i-<xliff:g id="TILE_NAME">%1$s</xliff:g> ukuze ubeke i-<xliff:g id="POSITION">%2$d</xliff:g>"</string>
-    <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Hambisa i-<xliff:g id="TILE_NAME">%1$s</xliff:g> ukuze ubeke i-<xliff:g id="POSITION">%2$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"susa ithayela"</string>
+    <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"engeza ithayela ekugcineni"</string>
+    <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Hambisa ithayela"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Engeza ithayela"</string>
+    <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Hambisa ku-<xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Engeza kusikhundla se-<xliff:g id="POSITION">%1$d</xliff:g>"</string>
+    <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Isikhundla se-<xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Isihleli sezilungiselelo ezisheshayo."</string>
     <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> isaziso: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="4689301323912928801">"Izinhlelo zokusebenza kungenzeka zingasebenzi ngesikrini esihlukanisiwe."</string>
@@ -922,11 +921,13 @@
     <string name="pip_skip_to_prev" msgid="3742589641443049237">"Yeqela kokwangaphambilini"</string>
     <string name="accessibility_action_pip_resize" msgid="8237306972921160456">"Shintsha usayizi"</string>
     <string name="thermal_shutdown_title" msgid="2702966892682930264">"Ifoni ivaliwe ngenxa yokushisa"</string>
-    <string name="thermal_shutdown_message" msgid="7432744214105003895">"Ifoni yakho manje isebenza kahle"</string>
+    <string name="thermal_shutdown_message" msgid="6142269839066172984">"Ifoni yakho manje isebenza ngokuvamile.\nThepha ukuze uthole ulwazi olungeziwe"</string>
     <string name="thermal_shutdown_dialog_message" msgid="6745684238183492031">"Ifoni yakho ibishisa kakhulu, ngakho-ke yacisha ukuze iphole. Ifoni yakho manje isebenza ngokuvamile.\n\nIfoni yakho ingashisa kakhulu uma:\n	• Usebenzisa izinhlelo zokusebenza ezinkulu (njegegeyimu, ividiyo, noma izinhlelo zokusebenza zokuzula)\n	• Landa noma layisha amafayela amakhulu\n	• Sebenzisa ifoni yakho kumathempelesha aphezulu"</string>
+    <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Bona izinyathelo zokunakekelwa"</string>
     <string name="high_temp_title" msgid="2218333576838496100">"Ifoni iyafudumala"</string>
-    <string name="high_temp_notif_message" msgid="163928048626045592">"Ezinye izici zikhawulelwe ngenkathi ifoni iphola"</string>
+    <string name="high_temp_notif_message" msgid="1277346543068257549">"Ezinye izici zikhawulelwe ngenkathi ifoni iphola.\nThepha mayelana nolwazi olwengeziwe"</string>
     <string name="high_temp_dialog_message" msgid="3793606072661253968">"Ifoni yakho izozama ngokuzenzakalela ukuphola. Ungasasebenzisa ifoni yakho, kodwa ingasebenza ngokungasheshi.\n\nUma ifoni yakho isipholile, izosebenza ngokuvamile."</string>
+    <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Bona izinyathelo zokunakekelwa"</string>
     <string name="high_temp_alarm_title" msgid="2359958549570161495">"Khipha ishaja"</string>
     <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"Kukhona inkinga yokushaja le divayisi. Khipha i-adaptha yamandla, uphinde unakekele njengoba ikhebuli kungenzeka lifudumele."</string>
     <string name="high_temp_alarm_help_care_steps" msgid="5017002218341329566">"Bona izinyathelo zokunakekelwa"</string>
@@ -988,6 +989,13 @@
     <string name="open_saver_setting_action" msgid="2111461909782935190">"Izilungiselelo"</string>
     <string name="auto_saver_okay_action" msgid="7815925750741935386">"Ngiyezwa"</string>
     <string name="heap_dump_tile_name" msgid="2464189856478823046">"I-Dump SysUI Heap"</string>
+    <string name="ongoing_privacy_chip_content_single_app" msgid="2969750601815230385">"I-<xliff:g id="APP">%1$s</xliff:g> isebenzisa i-<xliff:g id="TYPES_LIST">%2$s</xliff:g> yakho."</string>
+    <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Izinhlelo zokusebenza zisebenzisa i-<xliff:g id="TYPES_LIST">%s</xliff:g> yakho."</string>
+    <string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
+    <string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" kanye "</string>
+    <string name="privacy_type_camera" msgid="7974051382167078332">"ikhamera"</string>
+    <string name="privacy_type_location" msgid="7991481648444066703">"indawo"</string>
+    <string name="privacy_type_microphone" msgid="9136763906797732428">"imakrofoni"</string>
     <string name="sensor_privacy_mode" msgid="4462866919026513692">"Izinzwa zivaliwe"</string>
     <string name="device_services" msgid="1549944177856658705">"Amasevisi edivayisi"</string>
     <string name="music_controls_no_title" msgid="4166497066552290938">"Asikho isihloko"</string>
@@ -1066,7 +1074,7 @@
     <string name="controls_seeding_in_progress" msgid="3033855341410264148">"Ilayisha izincomo"</string>
     <string name="controls_media_title" msgid="1746947284862928133">"Imidiya"</string>
     <string name="controls_media_close_session" msgid="3957093425905475065">"Fihla iseshini yamanje."</string>
-    <string name="controls_media_dismiss_button" msgid="4485675693008031646">"Fihla"</string>
+    <string name="controls_media_dismiss_button" msgid="9081375542265132213">"Cashisa"</string>
     <string name="controls_media_resume" msgid="1933520684481586053">"Qalisa kabusha"</string>
     <string name="controls_media_settings_button" msgid="5815790345117172504">"Izilungiselelo"</string>
     <string name="controls_error_timeout" msgid="794197289772728958">"Akusebenzi, hlola uhlelo lokusebenza"</string>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 01abc77..0097738 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -510,6 +510,8 @@
         <item>com.android.systemui</item>
     </string-array>
 
+    <integer name="ongoing_appops_dialog_max_apps">5</integer>
+
     <!-- Launcher package name for overlaying icons. -->
     <string name="launcher_overlayable_package" translatable="false">com.android.launcher3</string>
 
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index eb8758c..f07627a 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -482,20 +482,21 @@
     <!-- The size of the gesture span needed to activate the "pull" notification expansion -->
     <dimen name="pull_span_min">25dp</dimen>
 
-    <dimen name="qs_tile_height">106dp</dimen>
+    <dimen name="qs_tile_height">96dp</dimen>
     <!--notification_side_paddings + notification_content_margin_start - (qs_quick_tile_size - qs_tile_background_size) / 2 -->
     <dimen name="qs_tile_layout_margin_side">18dp</dimen>
     <dimen name="qs_tile_margin_horizontal">18dp</dimen>
     <dimen name="qs_tile_margin_horizontal_two_line">2dp</dimen>
-    <dimen name="qs_tile_margin_vertical">24dp</dimen>
+    <dimen name="qs_tile_margin_vertical">2dp</dimen>
     <dimen name="qs_tile_margin_top_bottom">12dp</dimen>
     <dimen name="qs_tile_margin_top_bottom_negative">-12dp</dimen>
     <!-- The height of the qs customize header. Should be
-         (qs_panel_padding_top (48dp) +  brightness_mirror_height (48dp) + qs_tile_margin_top (18dp)) -
+         (qs_panel_padding_top (48dp) +  brightness_mirror_height (48dp) + qs_tile_margin_top (0dp)) -
          (Toolbar_minWidth (56dp) + qs_tile_margin_top_bottom (12dp))
     -->
-    <dimen name="qs_customize_header_min_height">46dp</dimen>
-    <dimen name="qs_tile_margin_top">18dp</dimen>
+    <dimen name="qs_customize_header_min_height">28dp</dimen>
+    <dimen name="qs_tile_margin_top">0dp</dimen>
+    <dimen name="qs_tile_icon_background_stroke_width">-1dp</dimen>
     <dimen name="qs_tile_background_size">44dp</dimen>
     <dimen name="qs_quick_tile_size">48dp</dimen>
     <dimen name="qs_quick_tile_padding">12dp</dimen>
@@ -1175,6 +1176,23 @@
 
     <!-- How much into a DisplayCutout's bounds we can go, on each side -->
     <dimen name="display_cutout_margin_consumption">0px</dimen>
+
+    <!-- Height of the Ongoing App Ops chip -->
+    <dimen name="ongoing_appops_chip_height">32dp</dimen>
+    <!-- Padding between background of Ongoing App Ops chip and content -->
+    <dimen name="ongoing_appops_chip_bg_padding">8dp</dimen>
+    <!-- Side padding between background of Ongoing App Ops chip and content -->
+    <dimen name="ongoing_appops_chip_side_padding">8dp</dimen>
+    <!-- Margin between icons of Ongoing App Ops chip when QQS-->
+    <dimen name="ongoing_appops_chip_icon_margin_collapsed">0dp</dimen>
+    <!-- Margin between icons of Ongoing App Ops chip when QS-->
+    <dimen name="ongoing_appops_chip_icon_margin_expanded">2dp</dimen>
+    <!-- Icon size of Ongoing App Ops chip -->
+    <dimen name="ongoing_appops_chip_icon_size">@dimen/status_bar_icon_drawing_size</dimen>
+    <!-- Radius of Ongoing App Ops chip corners -->
+    <dimen name="ongoing_appops_chip_bg_corner_radius">16dp</dimen>
+
+
     <!-- How much each bubble is elevated. -->
     <dimen name="bubble_elevation">1dp</dimen>
     <!-- How much the bubble flyout text container is elevated. -->
@@ -1278,6 +1296,8 @@
     <dimen name="qs_footer_horizontal_margin">22dp</dimen>
     <dimen name="qs_media_disabled_seekbar_height">1dp</dimen>
     <dimen name="qs_media_enabled_seekbar_height">3dp</dimen>
+    <dimen name="qs_media_enabled_seekbar_vertical_padding">15dp</dimen>
+    <dimen name="qs_media_disabled_seekbar_vertical_padding">16dp</dimen>
 
     <dimen name="magnification_border_size">5dp</dimen>
     <dimen name="magnification_frame_move_short">5dp</dimen>
@@ -1333,15 +1353,19 @@
     <dimen name="controls_management_side_padding">16dp</dimen>
     <dimen name="controls_management_titles_margin">16dp</dimen>
     <dimen name="controls_management_footer_side_margin">8dp</dimen>
+    <dimen name="controls_management_footer_top_margin">@dimen/controls_management_footer_side_margin</dimen>
     <dimen name="controls_management_list_margin">16dp</dimen>
+    <dimen name="controls_management_indicator_top_margin">@dimen/controls_management_list_margin</dimen>
     <dimen name="controls_management_apps_list_margin">64dp</dimen>
     <dimen name="controls_management_editing_list_margin">48dp</dimen>
     <dimen name="controls_management_editing_divider_margin">24dp</dimen>
     <dimen name="controls_management_apps_extra_side_margin">8dp</dimen>
     <dimen name="controls_management_zone_top_margin">32dp</dimen>
+    <dimen name="controls_management_favorites_top_margin">@dimen/controls_management_zone_top_margin</dimen>
     <dimen name="controls_management_status_side_margin">16dp</dimen>
     <dimen name="controls_management_page_indicator_height">24dp</dimen>
     <dimen name="controls_management_checkbox_size">25dp</dimen>
+    <dimen name="controls_management_footer_height">72dp</dimen>
     <dimen name="controls_title_size">24sp</dimen>
     <dimen name="controls_subtitle_size">16sp</dimen>
 
@@ -1354,7 +1378,7 @@
     <dimen name="controls_app_divider_height">2dp</dimen>
     <dimen name="controls_app_divider_side_margin">32dp</dimen>
 
-    <dimen name="controls_card_margin">2dp</dimen>
+    <dimen name="controls_card_margin">@dimen/control_base_item_margin</dimen>
     <item name="control_card_elevation" type="dimen" format="float">15</item>
 
     <dimen name="controls_dialog_padding">32dp</dimen>
diff --git a/packages/SystemUI/res/values/donottranslate.xml b/packages/SystemUI/res/values/donottranslate.xml
index 67293c5..f05be06 100644
--- a/packages/SystemUI/res/values/donottranslate.xml
+++ b/packages/SystemUI/res/values/donottranslate.xml
@@ -21,5 +21,5 @@
     <string name="system_ui_date_pattern" translatable="false">@*android:string/system_ui_date_pattern</string>
 
     <!-- Date format for the always on display.  -->
-    <item type="string" name="system_ui_aod_date_pattern" translatable="false">eeeMMMd</item>
+    <item type="string" name="system_ui_aod_date_pattern" translatable="false">EEEMMMd</item>
 </resources>
diff --git a/packages/SystemUI/res/values/ids.xml b/packages/SystemUI/res/values/ids.xml
index 8212d61..b8e8db5 100644
--- a/packages/SystemUI/res/values/ids.xml
+++ b/packages/SystemUI/res/values/ids.xml
@@ -92,6 +92,8 @@
 
     <item type="id" name="requires_remeasuring"/>
 
+    <item type="id" name="secondary_home_handle" />
+
     <!-- Whether the icon is from a notification for which targetSdk < L -->
     <item type="id" name="icon_is_pre_L"/>
 
@@ -175,6 +177,9 @@
     <item type="id" name="accessibility_action_controls_move_before" />
     <item type="id" name="accessibility_action_controls_move_after" />
 
+    <item type="id" name="accessibility_action_qs_move_to_position" />
+    <item type="id" name="accessibility_action_qs_add_to_position" />
+
     <!-- Accessibility actions for PIP -->
     <item type="id" name="action_pip_resize" />
 </resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index db45a60..77ce39f 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -278,14 +278,10 @@
     <string name="screenrecord_cancel_label">Cancel</string>
     <!-- Label for notification action to share screen recording [CHAR LIMIT=35] -->
     <string name="screenrecord_share_label">Share</string>
-    <!-- Label for notification action to delete a screen recording file [CHAR LIMIT=35] -->
-    <string name="screenrecord_delete_label">Delete</string>
     <!-- A toast message shown after successfully canceling a screen recording [CHAR LIMIT=NONE] -->
     <string name="screenrecord_cancel_success">Screen recording canceled</string>
     <!-- Notification text shown after saving a screen recording to prompt the user to view it [CHAR LIMIT=100] -->
     <string name="screenrecord_save_message">Screen recording saved, tap to view</string>
-    <!-- A toast message shown after successfully deleting a screen recording [CHAR LIMIT=NONE] -->
-    <string name="screenrecord_delete_description">Screen recording deleted</string>
     <!-- A toast message shown when there is an error deleting a screen recording [CHAR LIMIT=NONE] -->
     <string name="screenrecord_delete_error">Error deleting screen recording</string>
     <!-- A toast message shown when the screen recording cannot be started due to insufficient permissions [CHAR LIMIT=NONE] -->
@@ -2271,23 +2267,26 @@
     <!-- Accessibility action for moving docked stack divider to make the bottom screen full screen [CHAR LIMIT=NONE] -->
     <string name="accessibility_action_divider_bottom_full">Bottom full screen</string>
 
-    <!-- Accessibility description of a QS tile while editing positions [CHAR LIMIT=NONE] -->
-    <string name="accessibility_qs_edit_tile_label">Position <xliff:g id="position" example="2">%1$d</xliff:g>, <xliff:g id="tile_name" example="Wi-Fi">%2$s</xliff:g>. Double tap to edit.</string>
+    <!-- Accessibility description of action to remove QS tile on click. It will read as "Double-tap to remove tile" in screen readers [CHAR LIMIT=NONE] -->
+    <string name="accessibility_qs_edit_remove_tile_action">remove tile</string>
 
-    <!-- Accessibility description of a QS tile while editing positions [CHAR LIMIT=NONE] -->
-    <string name="accessibility_qs_edit_add_tile_label"><xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g>. Double tap to add.</string>
+    <!-- Accessibility action of action to add QS tile to end. It will read as "Double-tap to add tile to end" in screen readers [CHAR LIMIT=NONE] -->
+    <string name="accessibility_qs_edit_tile_add_action">add tile to end</string>
 
-    <!-- Accessibility description of option to move QS tile [CHAR LIMIT=NONE] -->
-    <string name="accessibility_qs_edit_move_tile">Move <xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g></string>
+    <!-- Accessibility action for context menu to move QS tile [CHAR LIMIT=NONE] -->
+    <string name="accessibility_qs_edit_tile_start_move">Move tile</string>
 
-    <!-- Accessibility description of option to remove QS tile [CHAR LIMIT=NONE] -->
-    <string name="accessibility_qs_edit_remove_tile">Remove <xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g></string>
+    <!-- Accessibility action for context menu to add QS tile [CHAR LIMIT=NONE] -->
+    <string name="accessibility_qs_edit_tile_start_add">Add tile</string>
 
-    <!-- Accessibility action when QS tile is to be added [CHAR LIMIT=NONE] -->
-    <string name="accessibility_qs_edit_tile_add">Add <xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g> to position <xliff:g id="position" example="5">%2$d</xliff:g></string>
+    <!-- Accessibility description when QS tile is to be moved, indicating the destination position [CHAR LIMIT=NONE] -->
+    <string name="accessibility_qs_edit_tile_move_to_position">Move to <xliff:g id="position" example="5">%1$d</xliff:g></string>
 
-    <!-- Accessibility action when QS tile is to be moved [CHAR LIMIT=NONE] -->
-    <string name="accessibility_qs_edit_tile_move">Move <xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g> to position <xliff:g id="position" example="5">%2$d</xliff:g></string>
+    <!-- Accessibility description when QS tile is to be added, indicating the destination position [CHAR LIMIT=NONE] -->
+    <string name="accessibility_qs_edit_tile_add_to_position">Add to position <xliff:g id="position" example="5">%1$d</xliff:g></string>
+
+    <!-- Accessibility description indicating the currently selected tile's position. Only used for tiles that are currently in use [CHAR LIMIT=NONE] -->
+    <string name="accessibility_qs_edit_position">Position <xliff:g id="position" example="5">%1$d</xliff:g></string>
 
     <!-- Accessibility label for window when QS editing is happening [CHAR LIMIT=NONE] -->
     <string name="accessibility_desc_quick_settings_edit">Quick settings editor.</string>
@@ -2404,17 +2403,26 @@
 
     <!-- Title for notification & dialog that the user's phone last shut down because it got too hot. [CHAR LIMIT=40] -->
     <string name="thermal_shutdown_title">Phone turned off due to heat</string>
-    <!-- Message body for notification that user's phone last shut down because it got too hot. [CHAR LIMIT=100] -->
-    <string name="thermal_shutdown_message">Your phone is now running normally</string>
-    <!-- Text body for dialog alerting user that their phone last shut down because it got too hot. [CHAR LIMIT=450] -->
+    <!-- Message body for notification that user's phone last shut down because it got too hot. [CHAR LIMIT=120] -->
+    <string name="thermal_shutdown_message">Your phone is now running normally.\nTap for more info</string>
+    <!-- Text body for dialog alerting user that their phone last shut down because it got too hot. [CHAR LIMIT=500] -->
     <string name="thermal_shutdown_dialog_message">Your phone was too hot, so it turned off to cool down. Your phone is now running normally.\n\nYour phone may get too hot if you:\n\t&#8226; Use resource-intensive apps (such as gaming, video, or navigation apps)\n\t&#8226; Download or upload large files\n\t&#8226; Use your phone in high temperatures</string>
+    <!-- Text help link for care instructions for overheating devices [CHAR LIMIT=40] -->
+    <string name="thermal_shutdown_dialog_help_text">See care steps</string>
+    <!-- URL for care instructions for overheating devices -->
+    <string name="thermal_shutdown_dialog_help_url" translatable="false"></string>
 
     <!-- Title for notification (and dialog) that user's phone has reached a certain temperature and may start to slow down in order to cool down. [CHAR LIMIT=30] -->
     <string name="high_temp_title">Phone is getting warm</string>
-    <!-- Message body for notification that user's phone has reached a certain temperature and may start to slow down in order to cool down. [CHAR LIMIT=100] -->
-    <string name="high_temp_notif_message">Some features limited while phone cools down</string>
-    <!-- Text body for dialog alerting user that their phone has reached a certain temperature and may start to slow down in order to cool down. [CHAR LIMIT=300] -->
+    <!-- Message body for notification that user's phone has reached a certain temperature and may start to slow down in order to cool down. [CHAR LIMIT=120] -->
+    <string name="high_temp_notif_message">Some features limited while phone cools down.\nTap for more info</string>
+    <!-- Text body for dialog alerting user that their phone has reached a certain temperature and may start to slow down in order to cool down. [CHAR LIMIT=350] -->
     <string name="high_temp_dialog_message">Your phone will automatically try to cool down. You can still use your phone, but it may run slower.\n\nOnce your phone has cooled down, it will run normally.</string>
+    <!-- Text help link for care instructions for overheating devices [CHAR LIMIT=40] -->
+    <string name="high_temp_dialog_help_text">See care steps</string>
+    <!-- URL for care instructions for overheating devices -->
+    <string name="high_temp_dialog_help_url" translatable="false"></string>
+
     <!-- Title for alarm dialog alerting user the usb adapter has reached a certain temperature that should disconnect charging cable immediately. [CHAR LIMIT=30] -->
     <string name="high_temp_alarm_title">Unplug charger</string>
     <!-- Text body for dialog alerting user the usb adapter has reached a certain temperature that should disconnect charging cable immediately. [CHAR LIMIT=300] -->
@@ -2608,6 +2616,27 @@
          app for debugging. Will not be seen by users. [CHAR LIMIT=20] -->
     <string name="heap_dump_tile_name">Dump SysUI Heap</string>
 
+    <!-- Content description for ongoing privacy chip. Use with a single app [CHAR LIMIT=NONE]-->
+    <string name="ongoing_privacy_chip_content_single_app"><xliff:g id="app" example="Example App">%1$s</xliff:g> is using your <xliff:g id="types_list" example="camera, location">%2$s</xliff:g>.</string>
+
+    <!-- Content description for ongoing privacy chip. Use with multiple apps [CHAR LIMIT=NONE]-->
+    <string name="ongoing_privacy_chip_content_multiple_apps">Applications are using your <xliff:g id="types_list" example="camera, location">%s</xliff:g>.</string>
+
+    <!-- Separator for types. Include spaces before and after if needed [CHAR LIMIT=10] -->
+    <string name="ongoing_privacy_dialog_separator">,\u0020</string>
+
+    <!-- Separator for types, before last type. Include spaces before and after if needed [CHAR LIMIT=10] -->
+    <string name="ongoing_privacy_dialog_last_separator">\u0020and\u0020</string>
+
+    <!-- Text for camera app op [CHAR LIMIT=20]-->
+    <string name="privacy_type_camera">camera</string>
+
+    <!-- Text for location app op [CHAR LIMIT=20]-->
+    <string name="privacy_type_location">location</string>
+
+    <!-- Text for microphone app op [CHAR LIMIT=20]-->
+    <string name="privacy_type_microphone">microphone</string>
+
     <!-- Text for the quick setting tile for sensor privacy [CHAR LIMIT=30] -->
     <string name="sensor_privacy_mode">Sensors off</string>
 
@@ -2792,7 +2821,7 @@
     <!-- Explanation for closing controls associated with a specific media session [CHAR_LIMIT=NONE] -->
     <string name="controls_media_close_session">Hide the current session.</string>
     <!-- Label for a button that will hide media controls [CHAR_LIMIT=30] -->
-    <string name="controls_media_dismiss_button">Hide</string>
+    <string name="controls_media_dismiss_button">Dismiss</string>
     <!-- Label for button to resume media playback [CHAR_LIMIT=NONE] -->
     <string name="controls_media_resume">Resume</string>
     <!-- Label for button to go to media control settings screen [CHAR_LIMIT=30] -->
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java
index 4d968f1..73dc60d 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java
@@ -26,6 +26,17 @@
 
     private static final String TAG = "WallpaperEngineCompat";
 
+    /**
+     * Returns true if {@link IWallpaperEngine#scalePreview(Rect)} is available.
+     */
+    public static boolean supportsScalePreview() {
+        try {
+            return IWallpaperEngine.class.getMethod("scalePreview", Rect.class) != null;
+        } catch (NoSuchMethodException | SecurityException e) {
+            return false;
+        }
+    }
+
     private final IWallpaperEngine mWrappedEngine;
 
     public WallpaperEngineCompat(IWallpaperEngine wrappedEngine) {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java
index 1c47aa0..1f22d48 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java
@@ -257,31 +257,16 @@
         @Override
         public void run() {
             if (DEBUG) {
-                Log.v(TAG, "call supplyPinReportResultForSubscriber(subid=" + mSubId + ")");
+                Log.v(TAG, "call supplyIccLockPin(subid=" + mSubId + ")");
             }
             TelephonyManager telephonyManager =
                     ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))
                             .createForSubscriptionId(mSubId);
-            final PinResult result = telephonyManager.supplyPinReportPinResult(mPin);
-            if (result == null) {
-                Log.e(TAG, "Error result for supplyPinReportResult.");
-                post(new Runnable() {
-                    @Override
-                    public void run() {
-                        onSimCheckResponse(PinResult.getDefaultFailedResult());
-                    }
-                });
-            } else {
-                if (DEBUG) {
-                    Log.v(TAG, "supplyPinReportResult returned: " + result.toString());
-                }
-                post(new Runnable() {
-                    @Override
-                    public void run() {
-                        onSimCheckResponse(result);
-                    }
-                });
+            final PinResult result = telephonyManager.supplyIccLockPin(mPin);
+            if (DEBUG) {
+                Log.v(TAG, "supplyIccLockPin returned: " + result.toString());
             }
+            post(() -> onSimCheckResponse(result));
         }
     }
 
@@ -341,8 +326,8 @@
                             }
                             resetPasswordText(true /* animate */,
                                     /* announce */
-                                    result.getType() != PinResult.PIN_RESULT_TYPE_SUCCESS);
-                            if (result.getType() == PinResult.PIN_RESULT_TYPE_SUCCESS) {
+                                    result.getResult() != PinResult.PIN_RESULT_TYPE_SUCCESS);
+                            if (result.getResult() == PinResult.PIN_RESULT_TYPE_SUCCESS) {
                                 Dependency.get(KeyguardUpdateMonitor.class)
                                         .reportSimUnlocked(mSubId);
                                 mRemainingAttempts = -1;
@@ -352,7 +337,7 @@
                                 }
                             } else {
                                 mShowDefaultMessage = false;
-                                if (result.getType() == PinResult.PIN_RESULT_TYPE_INCORRECT) {
+                                if (result.getResult() == PinResult.PIN_RESULT_TYPE_INCORRECT) {
                                     if (result.getAttemptsRemaining() <= 2) {
                                         // this is getting critical - show dialog
                                         getSimRemainingAttemptsDialog(
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
index 4c5e7ee..31fc760 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
@@ -319,30 +319,17 @@
 
         @Override
         public void run() {
-            if (DEBUG) Log.v(TAG, "call supplyPukReportResult()");
+            if (DEBUG) {
+                Log.v(TAG, "call supplyIccLockPuk(subid=" + mSubId + ")");
+            }
             TelephonyManager telephonyManager =
                     ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))
                             .createForSubscriptionId(mSubId);
-            final PinResult result = telephonyManager.supplyPukReportPinResult(mPuk, mPin);
-            if (result == null) {
-                Log.e(TAG, "Error result for supplyPukReportResult.");
-                post(new Runnable() {
-                    @Override
-                    public void run() {
-                        onSimLockChangedResponse(PinResult.getDefaultFailedResult());
-                    }
-                });
-            } else {
-                if (DEBUG) {
-                    Log.v(TAG, "supplyPukReportResult returned: " + result.toString());
-                }
-                post(new Runnable() {
-                    @Override
-                    public void run() {
-                        onSimLockChangedResponse(result);
-                    }
-                });
+            final PinResult result = telephonyManager.supplyIccLockPuk(mPuk, mPin);
+            if (DEBUG) {
+                Log.v(TAG, "supplyIccLockPuk returned: " + result.toString());
             }
+            post(() -> onSimLockChangedResponse(result));
         }
     }
 
@@ -415,8 +402,8 @@
                             }
                             resetPasswordText(true /* animate */,
                                     /* announce */
-                                    result.getType() != PinResult.PIN_RESULT_TYPE_SUCCESS);
-                            if (result.getType() == PinResult.PIN_RESULT_TYPE_SUCCESS) {
+                                    result.getResult() != PinResult.PIN_RESULT_TYPE_SUCCESS);
+                            if (result.getResult() == PinResult.PIN_RESULT_TYPE_SUCCESS) {
                                 Dependency.get(KeyguardUpdateMonitor.class)
                                         .reportSimUnlocked(mSubId);
                                 mRemainingAttempts = -1;
@@ -427,7 +414,7 @@
                                 }
                             } else {
                                 mShowDefaultMessage = false;
-                                if (result.getType() == PinResult.PIN_RESULT_TYPE_INCORRECT) {
+                                if (result.getResult() == PinResult.PIN_RESULT_TYPE_INCORRECT) {
                                     // show message
                                     mSecurityMessageDisplay.setMessage(getPukPasswordErrorMessage(
                                             result.getAttemptsRemaining(), false));
@@ -448,8 +435,8 @@
                                 if (DEBUG) Log.d(LOG_TAG, "verifyPasswordAndUnlock "
                                         + " UpdateSim.onSimCheckResponse: "
                                         + " attemptsRemaining=" + result.getAttemptsRemaining());
-                                mStateMachine.reset();
                             }
+                            mStateMachine.reset();
                             mCheckSimPukThread = null;
                         }
                     });
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 3acbfb8..60541eb 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -286,11 +286,11 @@
     private final Executor mBackgroundExecutor;
 
     /**
-     * Short delay before restarting biometric authentication after a successful try
-     * This should be slightly longer than the time between on<biometric>Authenticated
-     * (e.g. onFingerprintAuthenticated) and setKeyguardGoingAway(true).
+     * Short delay before restarting fingerprint authentication after a successful try. This should
+     * be slightly longer than the time between onFingerprintAuthenticated and
+     * setKeyguardGoingAway(true).
      */
-    private static final int BIOMETRIC_CONTINUE_DELAY_MS = 500;
+    private static final int FINGERPRINT_CONTINUE_DELAY_MS = 500;
 
     // If the HAL dies or is unable to authenticate, keyguard should retry after a short delay
     private int mHardwareFingerprintUnavailableRetryCount = 0;
@@ -598,7 +598,7 @@
         }
 
         mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_BIOMETRIC_AUTHENTICATION_CONTINUE),
-                BIOMETRIC_CONTINUE_DELAY_MS);
+                FINGERPRINT_CONTINUE_DELAY_MS);
 
         // Only authenticate fingerprint once when assistant is visible
         mAssistantVisible = false;
@@ -780,9 +780,6 @@
             }
         }
 
-        mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_BIOMETRIC_AUTHENTICATION_CONTINUE),
-                BIOMETRIC_CONTINUE_DELAY_MS);
-
         // Only authenticate face once when assistant is visible
         mAssistantVisible = false;
 
@@ -1072,6 +1069,15 @@
                 STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN);
     }
 
+    private boolean isEncryptedOrLockdown(int userId) {
+        final int strongAuth = mStrongAuthTracker.getStrongAuthForUser(userId);
+        final boolean isLockDown =
+                containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW)
+                        || containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN);
+        final boolean isEncrypted = containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_BOOT);
+        return isEncrypted || isLockDown;
+    }
+
     public boolean userNeedsStrongAuth() {
         return mStrongAuthTracker.getStrongAuthForUser(getCurrentUser())
                 != LockPatternUtils.StrongAuthTracker.STRONG_AUTH_NOT_REQUIRED;
@@ -1248,6 +1254,10 @@
         }
     };
 
+    // Trigger the fingerprint success path so the bouncer can be shown
+    private final FingerprintManager.FingerprintDetectionCallback mFingerprintDetectionCallback
+            = this::handleFingerprintAuthenticated;
+
     private FingerprintManager.AuthenticationCallback mFingerprintAuthenticationCallback
             = new AuthenticationCallback() {
 
@@ -2050,8 +2060,15 @@
                 mFingerprintCancelSignal.cancel();
             }
             mFingerprintCancelSignal = new CancellationSignal();
-            mFpm.authenticate(null, mFingerprintCancelSignal, 0, mFingerprintAuthenticationCallback,
-                    null, userId);
+
+            if (isEncryptedOrLockdown(userId)) {
+                mFpm.detectFingerprint(mFingerprintCancelSignal, mFingerprintDetectionCallback,
+                        userId);
+            } else {
+                mFpm.authenticate(null, mFingerprintCancelSignal, 0,
+                        mFingerprintAuthenticationCallback, null, userId);
+            }
+
             setFingerprintRunningState(BIOMETRIC_STATE_RUNNING);
         }
     }
@@ -2087,7 +2104,7 @@
 
     private boolean isUnlockWithFingerprintPossible(int userId) {
         return mFpm != null && mFpm.isHardwareDetected() && !isFingerprintDisabled(userId)
-                && mFpm.getEnrolledFingerprints(userId).size() > 0;
+                && mFpm.hasEnrolledTemplates(userId);
     }
 
     private boolean isUnlockWithFacePossible(int userId) {
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index d1df276..7c36713 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -54,6 +54,7 @@
 import com.android.systemui.plugins.statusbar.StatusBarStateController;
 import com.android.systemui.power.EnhancedEstimates;
 import com.android.systemui.power.PowerUI;
+import com.android.systemui.privacy.PrivacyItemController;
 import com.android.systemui.recents.OverviewProxyService;
 import com.android.systemui.recents.Recents;
 import com.android.systemui.screenrecord.RecordingController;
@@ -315,6 +316,7 @@
     @Inject Lazy<SensorPrivacyManager> mSensorPrivacyManager;
     @Inject Lazy<AutoHideController> mAutoHideController;
     @Inject Lazy<ForegroundServiceNotificationListener> mForegroundServiceNotificationListener;
+    @Inject Lazy<PrivacyItemController> mPrivacyItemController;
     @Inject @Background Lazy<Looper> mBgLooper;
     @Inject @Background Lazy<Handler> mBgHandler;
     @Inject @Main Lazy<Looper> mMainLooper;
@@ -516,6 +518,7 @@
         mProviders.put(ForegroundServiceNotificationListener.class,
                 mForegroundServiceNotificationListener::get);
         mProviders.put(ClockManager.class, mClockManager::get);
+        mProviders.put(PrivacyItemController.class, mPrivacyItemController::get);
         mProviders.put(ActivityManagerWrapper.class, mActivityManagerWrapper::get);
         mProviders.put(DevicePolicyManagerWrapper.class, mDevicePolicyManagerWrapper::get);
         mProviders.put(PackageManagerWrapper.class, mPackageManagerWrapper::get);
diff --git a/packages/SystemUI/src/com/android/systemui/Prefs.java b/packages/SystemUI/src/com/android/systemui/Prefs.java
index 0218cd2..d1149d3 100644
--- a/packages/SystemUI/src/com/android/systemui/Prefs.java
+++ b/packages/SystemUI/src/com/android/systemui/Prefs.java
@@ -74,6 +74,7 @@
             Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP,
             Key.HAS_SEEN_BUBBLES_EDUCATION,
             Key.HAS_SEEN_BUBBLES_MANAGE_EDUCATION,
+            Key.HAS_SEEN_REVERSE_BOTTOM_SHEET,
             Key.CONTROLS_STRUCTURE_SWIPE_TOOLTIP_COUNT
     })
     public @interface Key {
@@ -122,6 +123,7 @@
         String HAS_SEEN_ODI_CAPTIONS_TOOLTIP = "HasSeenODICaptionsTooltip";
         String HAS_SEEN_BUBBLES_EDUCATION = "HasSeenBubblesOnboarding";
         String HAS_SEEN_BUBBLES_MANAGE_EDUCATION = "HasSeenBubblesManageOnboarding";
+        String HAS_SEEN_REVERSE_BOTTOM_SHEET = "HasSeenReverseBottomSheet";
         String CONTROLS_STRUCTURE_SWIPE_TOOLTIP_COUNT = "ControlsStructureSwipeTooltipCount";
         /** Tracks whether the user has seen the onboarding screen for priority conversations */
         String HAS_SEEN_PRIORITY_ONBOARDING = "HasUserSeenPriorityOnboarding";
diff --git a/packages/SystemUI/src/com/android/systemui/appops/AppOpItem.java b/packages/SystemUI/src/com/android/systemui/appops/AppOpItem.java
index 7e5b426..93a8df4 100644
--- a/packages/SystemUI/src/com/android/systemui/appops/AppOpItem.java
+++ b/packages/SystemUI/src/com/android/systemui/appops/AppOpItem.java
@@ -25,7 +25,9 @@
     private int mUid;
     private String mPackageName;
     private long mTimeStarted;
-    private String mState;
+    private StringBuilder mState;
+    // This is only used for items with mCode == AppOpsManager.OP_RECORD_AUDIO
+    private boolean mSilenced;
 
     public AppOpItem(int code, int uid, String packageName, long timeStarted) {
         this.mCode = code;
@@ -36,9 +38,8 @@
                 .append("AppOpItem(")
                 .append("Op code=").append(code).append(", ")
                 .append("UID=").append(uid).append(", ")
-                .append("Package name=").append(packageName)
-                .append(")")
-                .toString();
+                .append("Package name=").append(packageName).append(", ")
+                .append("Paused=");
     }
 
     public int getCode() {
@@ -57,8 +58,16 @@
         return mTimeStarted;
     }
 
+    public void setSilenced(boolean silenced) {
+        mSilenced = silenced;
+    }
+
+    public boolean isSilenced() {
+        return mSilenced;
+    }
+
     @Override
     public String toString() {
-        return mState;
+        return mState.append(mSilenced).append(")").toString();
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java b/packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java
index 941de2d..2b9514f 100644
--- a/packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java
@@ -16,18 +16,31 @@
 
 package com.android.systemui.appops;
 
+import static android.media.AudioManager.ACTION_MICROPHONE_MUTE_CHANGED;
+
 import android.app.AppOpsManager;
+import android.content.BroadcastReceiver;
 import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.location.LocationManager;
+import android.media.AudioManager;
+import android.media.AudioRecordingConfiguration;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.UserHandle;
 import android.util.ArrayMap;
 import android.util.ArraySet;
 import android.util.Log;
+import android.util.SparseArray;
+
+import androidx.annotation.WorkerThread;
 
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.systemui.Dumpable;
+import com.android.systemui.broadcast.BroadcastDispatcher;
 import com.android.systemui.dagger.qualifiers.Background;
 import com.android.systemui.dump.DumpManager;
 
@@ -47,7 +60,7 @@
  * NotificationPresenter to be displayed to the user.
  */
 @Singleton
-public class AppOpsControllerImpl implements AppOpsController,
+public class AppOpsControllerImpl extends BroadcastReceiver implements AppOpsController,
         AppOpsManager.OnOpActiveChangedInternalListener,
         AppOpsManager.OnOpNotedListener, Dumpable {
 
@@ -57,23 +70,38 @@
     private static final long NOTED_OP_TIME_DELAY_MS = 5000;
     private static final String TAG = "AppOpsControllerImpl";
     private static final boolean DEBUG = false;
-    private final Context mContext;
 
+    private final BroadcastDispatcher mDispatcher;
     private final AppOpsManager mAppOps;
+    private final AudioManager mAudioManager;
+    private final LocationManager mLocationManager;
+
+    // mLocationProviderPackages are cached and updated only occasionally
+    private static final long LOCATION_PROVIDER_UPDATE_FREQUENCY_MS = 30000;
+    private long mLastLocationProviderPackageUpdate;
+    private List<String> mLocationProviderPackages;
+
     private H mBGHandler;
     private final List<AppOpsController.Callback> mCallbacks = new ArrayList<>();
     private final ArrayMap<Integer, Set<Callback>> mCallbacksByCode = new ArrayMap<>();
+    private final PermissionFlagsCache mFlagsCache;
     private boolean mListening;
+    private boolean mMicMuted;
 
     @GuardedBy("mActiveItems")
     private final List<AppOpItem> mActiveItems = new ArrayList<>();
     @GuardedBy("mNotedItems")
     private final List<AppOpItem> mNotedItems = new ArrayList<>();
+    @GuardedBy("mActiveItems")
+    private final SparseArray<ArrayList<AudioRecordingConfiguration>> mRecordingsByUid =
+            new SparseArray<>();
 
     protected static final int[] OPS = new int[] {
             AppOpsManager.OP_CAMERA,
+            AppOpsManager.OP_PHONE_CALL_CAMERA,
             AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
             AppOpsManager.OP_RECORD_AUDIO,
+            AppOpsManager.OP_PHONE_CALL_MICROPHONE,
             AppOpsManager.OP_COARSE_LOCATION,
             AppOpsManager.OP_FINE_LOCATION
     };
@@ -82,14 +110,22 @@
     public AppOpsControllerImpl(
             Context context,
             @Background Looper bgLooper,
-            DumpManager dumpManager) {
-        mContext = context;
+            DumpManager dumpManager,
+            PermissionFlagsCache cache,
+            AudioManager audioManager,
+            BroadcastDispatcher dispatcher
+    ) {
+        mDispatcher = dispatcher;
         mAppOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
+        mFlagsCache = cache;
         mBGHandler = new H(bgLooper);
         final int numOps = OPS.length;
         for (int i = 0; i < numOps; i++) {
             mCallbacksByCode.put(OPS[i], new ArraySet<>());
         }
+        mAudioManager = audioManager;
+        mMicMuted = audioManager.isMicrophoneMute();
+        mLocationManager = context.getSystemService(LocationManager.class);
         dumpManager.registerDumpable(TAG, this);
     }
 
@@ -104,12 +140,22 @@
         if (listening) {
             mAppOps.startWatchingActive(OPS, this);
             mAppOps.startWatchingNoted(OPS, this);
+            mAudioManager.registerAudioRecordingCallback(mAudioRecordingCallback, mBGHandler);
+            mBGHandler.post(() -> mAudioRecordingCallback.onRecordingConfigChanged(
+                    mAudioManager.getActiveRecordingConfigurations()));
+            mDispatcher.registerReceiverWithHandler(this,
+                    new IntentFilter(ACTION_MICROPHONE_MUTE_CHANGED), mBGHandler);
+
         } else {
             mAppOps.stopWatchingActive(this);
             mAppOps.stopWatchingNoted(this);
+            mAudioManager.unregisterAudioRecordingCallback(mAudioRecordingCallback);
+
             mBGHandler.removeCallbacksAndMessages(null); // null removes all
+            mDispatcher.unregisterReceiver(this);
             synchronized (mActiveItems) {
                 mActiveItems.clear();
+                mRecordingsByUid.clear();
             }
             synchronized (mNotedItems) {
                 mNotedItems.clear();
@@ -182,9 +228,12 @@
             AppOpItem item = getAppOpItemLocked(mActiveItems, code, uid, packageName);
             if (item == null && active) {
                 item = new AppOpItem(code, uid, packageName, System.currentTimeMillis());
+                if (code == AppOpsManager.OP_RECORD_AUDIO) {
+                    item.setSilenced(isAnyRecordingPausedLocked(uid));
+                }
                 mActiveItems.add(item);
                 if (DEBUG) Log.w(TAG, "Added item: " + item.toString());
-                return true;
+                return !item.isSilenced();
             } else if (item != null && !active) {
                 mActiveItems.remove(item);
                 if (DEBUG) Log.w(TAG, "Removed item: " + item.toString());
@@ -208,7 +257,7 @@
             active = getAppOpItemLocked(mActiveItems, code, uid, packageName) != null;
         }
         if (!active) {
-            notifySuscribers(code, uid, packageName, false);
+            notifySuscribersWorker(code, uid, packageName, false);
         }
     }
 
@@ -231,10 +280,94 @@
     }
 
     /**
+     * Does the app-op code refer to a user sensitive permission for the specified user id
+     * and package. Only user sensitive permission should be shown to the user by default.
+     *
+     * @param appOpCode The code of the app-op.
+     * @param uid The uid of the user.
+     * @param packageName The name of the package.
+     *
+     * @return {@code true} iff the app-op item is user sensitive
+     */
+    private boolean isUserSensitive(int appOpCode, int uid, String packageName) {
+        String permission = AppOpsManager.opToPermission(appOpCode);
+        if (permission == null) {
+            return false;
+        }
+        int permFlags = mFlagsCache.getPermissionFlags(permission,
+                packageName, uid);
+        return (permFlags & PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED) != 0;
+    }
+
+    /**
+     * Does the app-op item refer to an operation that should be shown to the user.
+     * Only specficic ops (like SYSTEM_ALERT_WINDOW) or ops that refer to user sensitive
+     * permission should be shown to the user by default.
+     *
+     * @param item The item
+     *
+     * @return {@code true} iff the app-op item should be shown to the user
+     */
+    private boolean isUserVisible(AppOpItem item) {
+        return isUserVisible(item.getCode(), item.getUid(), item.getPackageName());
+    }
+
+    /**
+     * Checks if a package is the current location provider.
+     *
+     * <p>Data is cached to avoid too many calls into system server
+     *
+     * @param packageName The package that might be the location provider
+     *
+     * @return {@code true} iff the package is the location provider.
+     */
+    private boolean isLocationProvider(String packageName) {
+        long now = System.currentTimeMillis();
+
+        if (mLastLocationProviderPackageUpdate + LOCATION_PROVIDER_UPDATE_FREQUENCY_MS < now) {
+            mLastLocationProviderPackageUpdate = now;
+            mLocationProviderPackages = mLocationManager.getProviderPackages(
+                    LocationManager.FUSED_PROVIDER);
+        }
+
+        return mLocationProviderPackages.contains(packageName);
+    }
+
+    /**
+     * Does the app-op, uid and package name, refer to an operation that should be shown to the
+     * user. Only specficic ops (like {@link AppOpsManager.OP_SYSTEM_ALERT_WINDOW}) or
+     * ops that refer to user sensitive permission should be shown to the user by default.
+     *
+     * @param item The item
+     *
+     * @return {@code true} iff the app-op for should be shown to the user
+     */
+    private boolean isUserVisible(int appOpCode, int uid, String packageName) {
+        // currently OP_SYSTEM_ALERT_WINDOW and OP_MONITOR_HIGH_POWER_LOCATION
+        // does not correspond to a platform permission
+        // which may be user sensitive, so for now always show it to the user.
+        if (appOpCode == AppOpsManager.OP_SYSTEM_ALERT_WINDOW
+                || appOpCode == AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION
+                || appOpCode == AppOpsManager.OP_PHONE_CALL_CAMERA
+                || appOpCode == AppOpsManager.OP_PHONE_CALL_MICROPHONE) {
+            return true;
+        }
+
+        if (appOpCode == AppOpsManager.OP_CAMERA && isLocationProvider(packageName)) {
+            return true;
+        }
+
+        return isUserSensitive(appOpCode, uid, packageName);
+    }
+
+    /**
      * Returns a copy of the list containing all the active AppOps that the controller tracks.
      *
+     * Call from a worker thread as it may perform long operations.
+     *
      * @return List of active AppOps information
      */
+    @WorkerThread
     public List<AppOpItem> getActiveAppOps() {
         return getActiveAppOpsForUser(UserHandle.USER_ALL);
     }
@@ -243,10 +376,13 @@
      * Returns a copy of the list containing all the active AppOps that the controller tracks, for
      * a given user id.
      *
+     * Call from a worker thread as it may perform long operations.
+     *
      * @param userId User id to track, can be {@link UserHandle#USER_ALL}
      *
      * @return List of active AppOps information for that user id
      */
+    @WorkerThread
     public List<AppOpItem> getActiveAppOpsForUser(int userId) {
         List<AppOpItem> list = new ArrayList<>();
         synchronized (mActiveItems) {
@@ -254,7 +390,8 @@
             for (int i = 0; i < numActiveItems; i++) {
                 AppOpItem item = mActiveItems.get(i);
                 if ((userId == UserHandle.USER_ALL
-                        || UserHandle.getUserId(item.getUid()) == userId)) {
+                        || UserHandle.getUserId(item.getUid()) == userId)
+                        && isUserVisible(item) && !item.isSilenced()) {
                     list.add(item);
                 }
             }
@@ -264,7 +401,8 @@
             for (int i = 0; i < numNotedItems; i++) {
                 AppOpItem item = mNotedItems.get(i);
                 if ((userId == UserHandle.USER_ALL
-                        || UserHandle.getUserId(item.getUid()) == userId)) {
+                        || UserHandle.getUserId(item.getUid()) == userId)
+                        && isUserVisible(item)) {
                     list.add(item);
                 }
             }
@@ -272,6 +410,10 @@
         return list;
     }
 
+    private void notifySuscribers(int code, int uid, String packageName, boolean active) {
+        mBGHandler.post(() -> notifySuscribersWorker(code, uid, packageName, active));
+    }
+
     @Override
     public void onOpActiveChanged(int code, int uid, String packageName, boolean active) {
         if (DEBUG) {
@@ -289,7 +431,7 @@
         // If active is false, we only send the update if the op is not actively noted (prevent
         // early removal)
         if (!alsoNoted) {
-            mBGHandler.post(() -> notifySuscribers(code, uid, packageName, active));
+            notifySuscribers(code, uid, packageName, active);
         }
     }
 
@@ -307,12 +449,12 @@
             alsoActive = getAppOpItemLocked(mActiveItems, code, uid, packageName) != null;
         }
         if (!alsoActive) {
-            mBGHandler.post(() -> notifySuscribers(code, uid, packageName, true));
+            notifySuscribers(code, uid, packageName, true);
         }
     }
 
-    private void notifySuscribers(int code, int uid, String packageName, boolean active) {
-        if (mCallbacksByCode.containsKey(code)) {
+    private void notifySuscribersWorker(int code, int uid, String packageName, boolean active) {
+        if (mCallbacksByCode.containsKey(code) && isUserVisible(code, uid, packageName)) {
             if (DEBUG) Log.d(TAG, "Notifying of change in package " + packageName);
             for (Callback cb: mCallbacksByCode.get(code)) {
                 cb.onActiveStateChanged(code, uid, packageName, active);
@@ -337,6 +479,70 @@
 
     }
 
+    private boolean isAnyRecordingPausedLocked(int uid) {
+        if (mMicMuted) {
+            return true;
+        }
+        List<AudioRecordingConfiguration> configs = mRecordingsByUid.get(uid);
+        if (configs == null) return false;
+        int configsNum = configs.size();
+        for (int i = 0; i < configsNum; i++) {
+            AudioRecordingConfiguration config = configs.get(i);
+            if (config.isClientSilenced()) return true;
+        }
+        return false;
+    }
+
+    private void updateRecordingPausedStatus() {
+        synchronized (mActiveItems) {
+            int size = mActiveItems.size();
+            for (int i = 0; i < size; i++) {
+                AppOpItem item = mActiveItems.get(i);
+                if (item.getCode() == AppOpsManager.OP_RECORD_AUDIO) {
+                    boolean paused = isAnyRecordingPausedLocked(item.getUid());
+                    if (item.isSilenced() != paused) {
+                        item.setSilenced(paused);
+                        notifySuscribers(
+                                item.getCode(),
+                                item.getUid(),
+                                item.getPackageName(),
+                                !item.isSilenced()
+                        );
+                    }
+                }
+            }
+        }
+    }
+
+    private AudioManager.AudioRecordingCallback mAudioRecordingCallback =
+            new AudioManager.AudioRecordingCallback() {
+        @Override
+        public void onRecordingConfigChanged(List<AudioRecordingConfiguration> configs) {
+            synchronized (mActiveItems) {
+                mRecordingsByUid.clear();
+                final int recordingsCount = configs.size();
+                for (int i = 0; i < recordingsCount; i++) {
+                    AudioRecordingConfiguration recording = configs.get(i);
+
+                    ArrayList<AudioRecordingConfiguration> recordings = mRecordingsByUid.get(
+                            recording.getClientUid());
+                    if (recordings == null) {
+                        recordings = new ArrayList<>();
+                        mRecordingsByUid.put(recording.getClientUid(), recordings);
+                    }
+                    recordings.add(recording);
+                }
+            }
+            updateRecordingPausedStatus();
+        }
+    };
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        mMicMuted = mAudioManager.isMicrophoneMute();
+        updateRecordingPausedStatus();
+    }
+
     protected class H extends Handler {
         H(Looper looper) {
             super(looper);
diff --git a/packages/SystemUI/src/com/android/systemui/appops/PermissionFlagsCache.kt b/packages/SystemUI/src/com/android/systemui/appops/PermissionFlagsCache.kt
new file mode 100644
index 0000000..9248b4f8
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/appops/PermissionFlagsCache.kt
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.appops
+
+import android.content.pm.PackageManager
+import android.os.UserHandle
+import androidx.annotation.WorkerThread
+import com.android.systemui.dagger.qualifiers.Background
+import java.util.concurrent.Executor
+import javax.inject.Inject
+import javax.inject.Singleton
+
+private data class PermissionFlagKey(
+    val permission: String,
+    val packageName: String,
+    val uid: Int
+)
+
+/**
+ * Cache for PackageManager's PermissionFlags.
+ *
+ * After a specific `{permission, package, uid}` has been requested, updates to it will be tracked,
+ * and changes to the uid will trigger new requests (in the background).
+ */
+@Singleton
+class PermissionFlagsCache @Inject constructor(
+    private val packageManager: PackageManager,
+    @Background private val executor: Executor
+) : PackageManager.OnPermissionsChangedListener {
+
+    private val permissionFlagsCache =
+            mutableMapOf<Int, MutableMap<PermissionFlagKey, Int>>()
+    private var listening = false
+
+    override fun onPermissionsChanged(uid: Int) {
+        executor.execute {
+            // Only track those that we've seen before
+            val keys = permissionFlagsCache.get(uid)
+            if (keys != null) {
+                keys.mapValuesTo(keys) {
+                    getFlags(it.key)
+                }
+            }
+        }
+    }
+
+    /**
+     * Retrieve permission flags from cache or PackageManager. There parameters will be passed
+     * directly to [PackageManager].
+     *
+     * Calls to this method should be done from a background thread.
+     */
+    @WorkerThread
+    fun getPermissionFlags(permission: String, packageName: String, uid: Int): Int {
+        if (!listening) {
+            listening = true
+            packageManager.addOnPermissionsChangeListener(this)
+        }
+        val key = PermissionFlagKey(permission, packageName, uid)
+        return permissionFlagsCache.getOrPut(uid, { mutableMapOf() }).get(key) ?: run {
+            getFlags(key).also {
+                permissionFlagsCache.get(uid)?.put(key, it)
+            }
+        }
+    }
+
+    private fun getFlags(key: PermissionFlagKey): Int {
+        return packageManager.getPermissionFlags(key.permission, key.packageName,
+                UserHandle.getUserHandleForUid(key.uid))
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java b/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
index 8e49d58..0085710 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
@@ -26,6 +26,8 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.ResolveInfo;
+import android.database.ContentObserver;
+import android.net.Uri;
 import android.os.Handler;
 import android.provider.Settings;
 
@@ -66,8 +68,10 @@
 @Singleton
 final class AssistHandleReminderExpBehavior implements BehaviorController {
 
-    private static final String LEARNING_TIME_ELAPSED_KEY = "reminder_exp_learning_time_elapsed";
-    private static final String LEARNING_EVENT_COUNT_KEY = "reminder_exp_learning_event_count";
+    private static final Uri LEARNING_TIME_ELAPSED_URI =
+            Settings.Secure.getUriFor(Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS);
+    private static final Uri LEARNING_EVENT_COUNT_URI =
+            Settings.Secure.getUriFor(Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT);
     private static final String LEARNED_HINT_LAST_SHOWN_KEY =
             "reminder_exp_learned_hint_last_shown";
     private static final long DEFAULT_LEARNING_TIME_MS = TimeUnit.DAYS.toMillis(10);
@@ -181,6 +185,7 @@
     private boolean mIsNavBarHidden;
     private boolean mIsLauncherShowing;
     private int mConsecutiveTaskSwitches;
+    @Nullable private ContentObserver mSettingObserver;
 
     /** Whether user has learned the gesture. */
     private boolean mIsLearned;
@@ -248,9 +253,22 @@
         mWakefulnessLifecycle.get().addObserver(mWakefulnessLifecycleObserver);
 
         mLearningTimeElapsed = Settings.Secure.getLong(
-                context.getContentResolver(), LEARNING_TIME_ELAPSED_KEY, /* default = */ 0);
+                context.getContentResolver(),
+                Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS,
+                /* default = */ 0);
         mLearningCount = Settings.Secure.getInt(
-                context.getContentResolver(), LEARNING_EVENT_COUNT_KEY, /* default = */ 0);
+                context.getContentResolver(),
+                Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT,
+                /* default = */ 0);
+        mSettingObserver = new SettingsObserver(context, mHandler);
+        context.getContentResolver().registerContentObserver(
+                LEARNING_TIME_ELAPSED_URI,
+                /* notifyForDescendants = */ true,
+                mSettingObserver);
+        context.getContentResolver().registerContentObserver(
+                LEARNING_EVENT_COUNT_URI,
+                /* notifyForDescendants = */ true,
+                mSettingObserver);
         mLearnedHintLastShownEpochDay = Settings.Secure.getLong(
                 context.getContentResolver(), LEARNED_HINT_LAST_SHOWN_KEY, /* default = */ 0);
         mLastLearningTimestamp = mClock.currentTimeMillis();
@@ -264,8 +282,20 @@
         if (mContext != null) {
             mBroadcastDispatcher.get().unregisterReceiver(mDefaultHomeBroadcastReceiver);
             mBootCompleteCache.get().removeListener(mBootCompleteListener);
-            Settings.Secure.putLong(mContext.getContentResolver(), LEARNING_TIME_ELAPSED_KEY, 0);
-            Settings.Secure.putInt(mContext.getContentResolver(), LEARNING_EVENT_COUNT_KEY, 0);
+            mContext.getContentResolver().unregisterContentObserver(mSettingObserver);
+            mSettingObserver = null;
+            // putString to use overrideableByRestore
+            Settings.Secure.putString(
+                    mContext.getContentResolver(),
+                    Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS,
+                    Long.toString(0L),
+                    /* overrideableByRestore = */ true);
+            // putString to use overrideableByRestore
+            Settings.Secure.putString(
+                    mContext.getContentResolver(),
+                    Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT,
+                    Integer.toString(0),
+                    /* overrideableByRestore = */ true);
             Settings.Secure.putLong(mContext.getContentResolver(), LEARNED_HINT_LAST_SHOWN_KEY, 0);
             mContext = null;
         }
@@ -282,8 +312,12 @@
             return;
         }
 
-        Settings.Secure.putLong(
-                mContext.getContentResolver(), LEARNING_EVENT_COUNT_KEY, ++mLearningCount);
+        // putString to use overrideableByRestore
+        Settings.Secure.putString(
+                mContext.getContentResolver(),
+                Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT,
+                Integer.toString(++mLearningCount),
+                /* overrideableByRestore = */ true);
     }
 
     @Override
@@ -460,8 +494,12 @@
         mIsLearned =
                 mLearningCount >= getLearningCount() || mLearningTimeElapsed >= getLearningTimeMs();
 
-        mHandler.post(() -> Settings.Secure.putLong(
-                mContext.getContentResolver(), LEARNING_TIME_ELAPSED_KEY, mLearningTimeElapsed));
+        // putString to use overrideableByRestore
+        mHandler.post(() -> Settings.Secure.putString(
+                mContext.getContentResolver(),
+                Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS,
+                Long.toString(mLearningTimeElapsed),
+                /* overrideableByRestore = */ true));
     }
 
     private void resetConsecutiveTaskSwitches() {
@@ -589,4 +627,32 @@
                 + "="
                 + getShowWhenTaught());
     }
+
+    private final class SettingsObserver extends ContentObserver {
+
+        private final Context mContext;
+
+        SettingsObserver(Context context, Handler handler) {
+            super(handler);
+            mContext = context;
+        }
+
+        @Override
+        public void onChange(boolean selfChange, @Nullable Uri uri) {
+            if (LEARNING_TIME_ELAPSED_URI.equals(uri)) {
+                mLastLearningTimestamp = mClock.currentTimeMillis();
+                mLearningTimeElapsed = Settings.Secure.getLong(
+                        mContext.getContentResolver(),
+                        Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS,
+                        /* default = */ 0);
+            } else if (LEARNING_EVENT_COUNT_URI.equals(uri)) {
+                mLearningCount = Settings.Secure.getInt(
+                        mContext.getContentResolver(),
+                        Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT,
+                        /* default = */ 0);
+            }
+
+            super.onChange(selfChange, uri);
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistantSessionEvent.kt b/packages/SystemUI/src/com/android/systemui/assist/AssistantSessionEvent.kt
index 8b953fa..be089b1 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/AssistantSessionEvent.kt
+++ b/packages/SystemUI/src/com/android/systemui/assist/AssistantSessionEvent.kt
@@ -21,7 +21,7 @@
 
 enum class AssistantSessionEvent(private val id: Int) : UiEventLogger.UiEventEnum {
     @UiEvent(doc = "Unknown assistant session event")
-    ASSISTANT_SESSION_UNKNOWN(523),
+    ASSISTANT_SESSION_UNKNOWN(0),
 
     @UiEvent(doc = "Assistant session dismissed due to timeout")
     ASSISTANT_SESSION_TIMEOUT_DISMISS(524),
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java b/packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java
index c6d1286..b71e3ad 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java
@@ -286,6 +286,15 @@
     }
 
     /**
+     * Sets whether this bubble is considered visually interruptive. Normally pulled from the
+     * {@link NotificationEntry}, this method is purely for testing.
+     */
+    @VisibleForTesting
+    void setVisuallyInterruptiveForTest(boolean visuallyInterruptive) {
+        mIsVisuallyInterruptive = visuallyInterruptive;
+    }
+
+    /**
      * Starts a task to inflate & load any necessary information to display a bubble.
      *
      * @param callback the callback to notify one the bubble is ready to be displayed.
@@ -411,6 +420,7 @@
             } else if (mIntent != null && entry.getBubbleMetadata().getIntent() == null) {
                 // Was an intent bubble now it's a shortcut bubble... still unregister the listener
                 mIntent.unregisterCancelListener(mIntentCancelListener);
+                mIntentActive = false;
                 mIntent = null;
             }
             mDeleteIntent = entry.getBubbleMetadata().getDeleteIntent();
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index e252195..5deae92 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -133,7 +133,8 @@
     @IntDef({DISMISS_USER_GESTURE, DISMISS_AGED, DISMISS_TASK_FINISHED, DISMISS_BLOCKED,
             DISMISS_NOTIF_CANCEL, DISMISS_ACCESSIBILITY_ACTION, DISMISS_NO_LONGER_BUBBLE,
             DISMISS_USER_CHANGED, DISMISS_GROUP_CANCELLED, DISMISS_INVALID_INTENT,
-            DISMISS_OVERFLOW_MAX_REACHED, DISMISS_SHORTCUT_REMOVED, DISMISS_PACKAGE_REMOVED})
+            DISMISS_OVERFLOW_MAX_REACHED, DISMISS_SHORTCUT_REMOVED, DISMISS_PACKAGE_REMOVED,
+            DISMISS_NO_BUBBLE_UP})
     @Target({FIELD, LOCAL_VARIABLE, PARAMETER})
     @interface DismissReason {}
 
@@ -150,6 +151,7 @@
     static final int DISMISS_OVERFLOW_MAX_REACHED = 11;
     static final int DISMISS_SHORTCUT_REMOVED = 12;
     static final int DISMISS_PACKAGE_REMOVED = 13;
+    static final int DISMISS_NO_BUBBLE_UP = 14;
 
     private final Context mContext;
     private final NotificationEntryManager mNotificationEntryManager;
@@ -168,6 +170,12 @@
     @Nullable private BubbleStackView mStackView;
     private BubbleIconFactory mBubbleIconFactory;
 
+    /**
+     * The relative position of the stack when we removed it and nulled it out. If the stack is
+     * re-created, it will re-appear at this position.
+     */
+    @Nullable private BubbleStackView.RelativeStackPosition mPositionFromRemovedStack;
+
     // Tracks the id of the current (foreground) user.
     private int mCurrentUserId;
     // Saves notification keys of active bubbles when users are switched.
@@ -398,7 +406,8 @@
             if (bubble.getBubbleIntent() == null) {
                 return;
             }
-            if (bubble.isIntentActive()) {
+            if (bubble.isIntentActive()
+                    || mBubbleData.hasBubbleInStackWithKey(bubble.getKey())) {
                 bubble.setPendingIntentCanceled();
                 return;
             }
@@ -718,6 +727,7 @@
                     mContext, mBubbleData, mSurfaceSynchronizer, mFloatingContentCoordinator,
                     mSysUiState, this::onAllBubblesAnimatedOut, this::onImeVisibilityChanged,
                     this::hideCurrentInputMethod);
+            mStackView.setStackStartPosition(mPositionFromRemovedStack);
             mStackView.addView(mBubbleScrim);
             if (mExpandListener != null) {
                 mStackView.setExpandListener(mExpandListener);
@@ -787,6 +797,7 @@
         try {
             mAddedToWindowManager = false;
             if (mStackView != null) {
+                mPositionFromRemovedStack = mStackView.getRelativeStackPosition();
                 mWindowManager.removeView(mStackView);
                 mStackView.removeView(mBubbleScrim);
                 mStackView = null;
@@ -1109,8 +1120,17 @@
         if (notif.getImportance() >= NotificationManager.IMPORTANCE_HIGH) {
             notif.setInterruption();
         }
-        Bubble bubble = mBubbleData.getOrCreateBubble(notif, null /* persistedBubble */);
-        inflateAndAdd(bubble, suppressFlyout, showInShade);
+        if (!notif.getRanking().visuallyInterruptive()
+                && (notif.getBubbleMetadata() != null
+                    && !notif.getBubbleMetadata().getAutoExpandBubble())
+                && mBubbleData.hasOverflowBubbleWithKey(notif.getKey())) {
+            // Update the bubble but don't promote it out of overflow
+            Bubble b = mBubbleData.getOverflowBubbleWithKey(notif.getKey());
+            b.setEntry(notif);
+        } else {
+            Bubble bubble = mBubbleData.getOrCreateBubble(notif, null /* persistedBubble */);
+            inflateAndAdd(bubble, suppressFlyout, showInShade);
+        }
     }
 
     void inflateAndAdd(Bubble bubble, boolean suppressFlyout, boolean showInShade) {
@@ -1234,8 +1254,18 @@
             rankingMap.getRanking(key, mTmpRanking);
             boolean isActiveBubble = mBubbleData.hasAnyBubbleWithKey(key);
             if (isActiveBubble && !mTmpRanking.canBubble()) {
-                mBubbleData.dismissBubbleWithKey(entry.getKey(),
-                        BubbleController.DISMISS_BLOCKED);
+                // If this entry is no longer allowed to bubble, dismiss with the BLOCKED reason.
+                // This means that the app or channel's ability to bubble has been revoked.
+                mBubbleData.dismissBubbleWithKey(
+                        key, BubbleController.DISMISS_BLOCKED);
+            } else if (isActiveBubble
+                    && !mNotificationInterruptStateProvider.shouldBubbleUp(entry)) {
+                // If this entry is allowed to bubble, but cannot currently bubble up, dismiss it.
+                // This happens when DND is enabled and configured to hide bubbles. Dismissing with
+                // the reason DISMISS_NO_BUBBLE_UP will retain the underlying notification, so that
+                // the bubble will be re-created if shouldBubbleUp returns true.
+                mBubbleData.dismissBubbleWithKey(
+                        key, BubbleController.DISMISS_NO_BUBBLE_UP);
             } else if (entry != null && mTmpRanking.isBubble() && !isActiveBubble) {
                 entry.setFlagBubble(true);
                 onEntryUpdated(entry);
@@ -1312,8 +1342,10 @@
                     mStackView.removeBubble(bubble);
                 }
 
-                // If the bubble is removed for user switching, leave the notification in place.
-                if (reason == DISMISS_USER_CHANGED) {
+                // Leave the notification in place if we're dismissing due to user switching, or
+                // because DND is suppressing the bubble. In both of those cases, we need to be able
+                // to restore the bubble from the notification later.
+                if (reason == DISMISS_USER_CHANGED || reason == DISMISS_NO_BUBBLE_UP) {
                     continue;
                 }
                 if (reason == DISMISS_NOTIF_CANCEL) {
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java
index d2dc506..85ea8bc 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java
@@ -277,7 +277,8 @@
         } else {
             // Updates an existing bubble
             bubble.setSuppressFlyout(suppressFlyout);
-            doUpdate(bubble);
+            // If there is no flyout, we probably shouldn't show the bubble at the top
+            doUpdate(bubble, !suppressFlyout /* reorder */);
         }
 
         if (bubble.shouldAutoExpand()) {
@@ -431,12 +432,12 @@
         }
     }
 
-    private void doUpdate(Bubble bubble) {
+    private void doUpdate(Bubble bubble, boolean reorder) {
         if (DEBUG_BUBBLE_DATA) {
             Log.d(TAG, "doUpdate: " + bubble);
         }
         mStateChange.updatedBubble = bubble;
-        if (!isExpanded()) {
+        if (!isExpanded() && reorder) {
             int prevPos = mBubbles.indexOf(bubble);
             mBubbles.remove(bubble);
             mBubbles.add(0, bubble);
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
index 3d31712..58d5776 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
@@ -301,12 +301,11 @@
 
         mActivityView = new ActivityView(mContext, null /* attrs */, 0 /* defStyle */,
                 true /* singleTaskInstance */, false /* usePublicVirtualDisplay*/,
-                true /* disableSurfaceViewBackgroundLayer */);
+                true /* disableSurfaceViewBackgroundLayer */, true /* useTrustedDisplay */);
 
         // Set ActivityView's alpha value as zero, since there is no view content to be shown.
         setContentVisibility(false);
 
-        mActivityViewContainer.setBackgroundColor(Color.WHITE);
         mActivityViewContainer.setOutlineProvider(new ViewOutlineProvider() {
             @Override
             public void getOutline(View view, Outline outline) {
@@ -434,9 +433,11 @@
     }
 
     void applyThemeAttrs() {
-        final TypedArray ta = mContext.obtainStyledAttributes(
-                new int[] {android.R.attr.dialogCornerRadius});
+        final TypedArray ta = mContext.obtainStyledAttributes(new int[] {
+                android.R.attr.dialogCornerRadius,
+                android.R.attr.colorBackgroundFloating});
         mCornerRadius = ta.getDimensionPixelSize(0, 0);
+        mActivityViewContainer.setBackgroundColor(ta.getColor(1, Color.WHITE));
         ta.recycle();
 
         if (mActivityView != null && ScreenDecorationsUtils.supportsRoundedCornersOnWindows(
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java
index 40a93e1..d017bc0 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java
@@ -24,7 +24,8 @@
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.graphics.Paint;
-import android.graphics.Rect;
+import android.graphics.Path;
+import android.graphics.drawable.AdaptiveIconDrawable;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Icon;
@@ -41,15 +42,15 @@
  */
 public class BubbleIconFactory extends BaseIconFactory {
 
+    private int mBadgeSize;
+
     protected BubbleIconFactory(Context context) {
         super(context, context.getResources().getConfiguration().densityDpi,
                 context.getResources().getDimensionPixelSize(R.dimen.individual_bubble_size));
-    }
-
-    int getBadgeSize() {
-        return mContext.getResources().getDimensionPixelSize(
+        mBadgeSize = mContext.getResources().getDimensionPixelSize(
                 com.android.launcher3.icons.R.dimen.profile_badge_size);
     }
+
     /**
      * Returns the drawable that the developer has provided to display in the bubble.
      */
@@ -79,25 +80,34 @@
      * will include the workprofile indicator on the badge if appropriate.
      */
     BitmapInfo getBadgeBitmap(Drawable userBadgedAppIcon, boolean isImportantConversation) {
-        Bitmap userBadgedBitmap = createIconBitmap(
-                userBadgedAppIcon, 1f, getBadgeSize());
-        ShadowGenerator shadowGenerator = new ShadowGenerator(getBadgeSize());
-        if (!isImportantConversation) {
-            Canvas c = new Canvas();
-            c.setBitmap(userBadgedBitmap);
-            shadowGenerator.recreateIcon(Bitmap.createBitmap(userBadgedBitmap), c);
-            return createIconBitmap(userBadgedBitmap);
-        } else {
-            float ringStrokeWidth = mContext.getResources().getDimensionPixelSize(
+        ShadowGenerator shadowGenerator = new ShadowGenerator(mBadgeSize);
+        Bitmap userBadgedBitmap = createIconBitmap(userBadgedAppIcon, 1f, mBadgeSize);
+
+        if (userBadgedAppIcon instanceof AdaptiveIconDrawable) {
+            userBadgedBitmap = Bitmap.createScaledBitmap(
+                    getCircleBitmap((AdaptiveIconDrawable) userBadgedAppIcon, /* size */
+                            userBadgedAppIcon.getIntrinsicWidth()),
+                    mBadgeSize, mBadgeSize, /* filter */ true);
+        }
+
+        if (isImportantConversation) {
+            final float ringStrokeWidth = mContext.getResources().getDimensionPixelSize(
                     com.android.internal.R.dimen.importance_ring_stroke_width);
-            int importantConversationColor = mContext.getResources().getColor(
+            final int importantConversationColor = mContext.getResources().getColor(
                     com.android.settingslib.R.color.important_conversation, null);
             Bitmap badgeAndRing = Bitmap.createBitmap(userBadgedBitmap.getWidth(),
                     userBadgedBitmap.getHeight(), userBadgedBitmap.getConfig());
             Canvas c = new Canvas(badgeAndRing);
-            Rect dest = new Rect((int) ringStrokeWidth, (int) ringStrokeWidth,
-                    c.getHeight() - (int) ringStrokeWidth, c.getWidth() - (int) ringStrokeWidth);
-            c.drawBitmap(userBadgedBitmap, null, dest, null);
+
+            final int bitmapTop = (int) ringStrokeWidth;
+            final int bitmapLeft = (int) ringStrokeWidth;
+            final int bitmapWidth = c.getWidth() - 2 * (int) ringStrokeWidth;
+            final int bitmapHeight = c.getHeight() - 2 * (int) ringStrokeWidth;
+
+            Bitmap scaledBitmap = Bitmap.createScaledBitmap(userBadgedBitmap, bitmapWidth,
+                    bitmapHeight, /* filter */ true);
+            c.drawBitmap(scaledBitmap, bitmapTop, bitmapLeft, /* paint */null);
+
             Paint ringPaint = new Paint();
             ringPaint.setStyle(Paint.Style.STROKE);
             ringPaint.setColor(importantConversationColor);
@@ -105,11 +115,48 @@
             ringPaint.setStrokeWidth(ringStrokeWidth);
             c.drawCircle(c.getWidth() / 2, c.getHeight() / 2, c.getWidth() / 2 - ringStrokeWidth,
                     ringPaint);
+
             shadowGenerator.recreateIcon(Bitmap.createBitmap(badgeAndRing), c);
             return createIconBitmap(badgeAndRing);
+        } else {
+            Canvas c = new Canvas();
+            c.setBitmap(userBadgedBitmap);
+            shadowGenerator.recreateIcon(Bitmap.createBitmap(userBadgedBitmap), c);
+            return createIconBitmap(userBadgedBitmap);
         }
     }
 
+    public Bitmap getCircleBitmap(AdaptiveIconDrawable icon, int size) {
+        Drawable foreground = icon.getForeground();
+        Drawable background = icon.getBackground();
+        Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
+        Canvas canvas = new Canvas();
+        canvas.setBitmap(bitmap);
+
+        // Clip canvas to circle.
+        Path circlePath = new Path();
+        circlePath.addCircle(/* x */ size / 2f,
+                /* y */ size / 2f,
+                /* radius */ size / 2f,
+                Path.Direction.CW);
+        canvas.clipPath(circlePath);
+
+        // Draw background.
+        background.setBounds(0, 0, size, size);
+        background.draw(canvas);
+
+        // Draw foreground. The foreground and background drawables are derived from adaptive icons
+        // Some icon shapes fill more space than others, so adaptive icons are normalized to about
+        // the same size. This size is smaller than the original bounds, so we estimate
+        // the difference in this offset.
+        int offset = size / 5;
+        foreground.setBounds(-offset, -offset, size + offset, size + offset);
+        foreground.draw(canvas);
+
+        canvas.setBitmap(null);
+        return bitmap;
+    }
+
     /**
      * Returns a {@link BitmapInfo} for the entire bubble icon including the badge.
      */
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleLoggerImpl.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleLoggerImpl.java
index c1dd8c3..48a9b917 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleLoggerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleLoggerImpl.java
@@ -30,10 +30,6 @@
      * @param e UI event
      */
     public void log(Bubble b, UiEventEnum e) {
-        if (b.getInstanceId() == null) {
-            // Added from persistence -- TODO log this with specific event?
-            return;
-        }
         logWithInstanceId(e, b.getAppUid(), b.getPackageName(), b.getInstanceId());
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
index 749b537..f2d8732 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
@@ -258,13 +258,8 @@
 
     /** Layout change listener that moves the stack to the nearest valid position on rotation. */
     private OnLayoutChangeListener mOrientationChangedListener;
-    /** Whether the stack was on the left side of the screen prior to rotation. */
-    private boolean mWasOnLeftBeforeRotation = false;
-    /**
-     * How far down the screen the stack was before rotation, in terms of percentage of the way down
-     * the allowable region. Defaults to -1 if not set.
-     */
-    private float mVerticalPosPercentBeforeRotation = -1;
+
+    @Nullable private RelativeStackPosition mRelativeStackPositionBeforeRotation;
 
     private int mMaxBubbles;
     private int mBubbleSize;
@@ -967,9 +962,10 @@
                         mExpandedViewContainer.setTranslationY(getExpandedViewY());
                         mExpandedViewContainer.setAlpha(1f);
                     }
-                    if (mVerticalPosPercentBeforeRotation >= 0) {
-                        mStackAnimationController.moveStackToSimilarPositionAfterRotation(
-                                mWasOnLeftBeforeRotation, mVerticalPosPercentBeforeRotation);
+                    if (mRelativeStackPositionBeforeRotation != null) {
+                        mStackAnimationController.setStackPosition(
+                                mRelativeStackPositionBeforeRotation);
+                        mRelativeStackPositionBeforeRotation = null;
                     }
                     removeOnLayoutChangeListener(mOrientationChangedListener);
                 };
@@ -1231,13 +1227,7 @@
                 com.android.internal.R.dimen.status_bar_height);
         mBubblePaddingTop = res.getDimensionPixelSize(R.dimen.bubble_padding_top);
 
-        final RectF allowablePos = mStackAnimationController.getAllowableStackPositionRegion();
-        mWasOnLeftBeforeRotation = mStackAnimationController.isStackOnLeftSide();
-        mVerticalPosPercentBeforeRotation =
-                (mStackAnimationController.getStackPosition().y - allowablePos.top)
-                        / (allowablePos.bottom - allowablePos.top);
-        mVerticalPosPercentBeforeRotation =
-                Math.max(0f, Math.min(1f, mVerticalPosPercentBeforeRotation));
+        mRelativeStackPositionBeforeRotation = mStackAnimationController.getRelativeStackPosition();
         addOnLayoutChangeListener(mOrientationChangedListener);
         hideFlyoutImmediate();
 
@@ -1506,7 +1496,7 @@
         if (getBubbleCount() == 0 && mShouldShowUserEducation) {
             // Override the default stack position if we're showing user education.
             mStackAnimationController.setStackPosition(
-                    mStackAnimationController.getDefaultStartPosition());
+                    mStackAnimationController.getStartPosition());
         }
 
         if (getBubbleCount() == 0) {
@@ -1586,6 +1576,11 @@
             Log.d(TAG, "setSelectedBubble: " + bubbleToSelect);
         }
 
+        if (bubbleToSelect == null) {
+            mBubbleData.setShowingOverflow(false);
+            return;
+        }
+
         // Ignore this new bubble only if it is the exact same bubble object. Otherwise, we'll want
         // to re-render it even if it has the same key (equals() returns true). If the currently
         // expanded bubble is removed and instantly re-added, we'll get back a new Bubble instance
@@ -1594,10 +1589,11 @@
         if (mExpandedBubble == bubbleToSelect) {
             return;
         }
-        if (bubbleToSelect == null || bubbleToSelect.getKey() != BubbleOverflow.KEY) {
-            mBubbleData.setShowingOverflow(false);
-        } else {
+
+        if (bubbleToSelect.getKey() == BubbleOverflow.KEY) {
             mBubbleData.setShowingOverflow(true);
+        } else {
+            mBubbleData.setShowingOverflow(false);
         }
 
         if (mIsExpanded && mIsExpansionAnimating) {
@@ -1715,7 +1711,7 @@
             // Post so we have height of mUserEducationView
             mUserEducationView.post(() -> {
                 final int viewHeight = mUserEducationView.getHeight();
-                PointF stackPosition = mStackAnimationController.getDefaultStartPosition();
+                PointF stackPosition = mStackAnimationController.getStartPosition();
                 final float translationY = stackPosition.y + (mBubbleSize / 2) - (viewHeight / 2);
                 mUserEducationView.setTranslationY(translationY);
                 mUserEducationView.animate()
@@ -2871,10 +2867,18 @@
                 .floatValue();
     }
 
+    public void setStackStartPosition(RelativeStackPosition position) {
+        mStackAnimationController.setStackStartPosition(position);
+    }
+
     public PointF getStackPosition() {
         return mStackAnimationController.getStackPosition();
     }
 
+    public RelativeStackPosition getRelativeStackPosition() {
+        return mStackAnimationController.getRelativeStackPosition();
+    }
+
     /**
      * Logs the bubble UI event.
      *
@@ -2938,4 +2942,47 @@
         }
         return bubbles;
     }
+
+    /**
+     * Representation of stack position that uses relative properties rather than absolute
+     * coordinates. This is used to maintain similar stack positions across configuration changes.
+     */
+    public static class RelativeStackPosition {
+        /** Whether to place the stack at the leftmost allowed position. */
+        private boolean mOnLeft;
+
+        /**
+         * How far down the vertically allowed region to place the stack. For example, if the stack
+         * allowed region is between y = 100 and y = 1100 and this is 0.2f, we'll place the stack at
+         * 100 + (0.2f * 1000) = 300.
+         */
+        private float mVerticalOffsetPercent;
+
+        public RelativeStackPosition(boolean onLeft, float verticalOffsetPercent) {
+            mOnLeft = onLeft;
+            mVerticalOffsetPercent = clampVerticalOffsetPercent(verticalOffsetPercent);
+        }
+
+        /** Constructs a relative position given a region and a point in that region. */
+        public RelativeStackPosition(PointF position, RectF region) {
+            mOnLeft = position.x < region.width() / 2;
+            mVerticalOffsetPercent =
+                    clampVerticalOffsetPercent((position.y - region.top) / region.height());
+        }
+
+        /** Ensures that the offset percent is between 0f and 1f. */
+        private float clampVerticalOffsetPercent(float offsetPercent) {
+            return Math.max(0f, Math.min(1f, offsetPercent));
+        }
+
+        /**
+         * Given an allowable stack position region, returns the point within that region
+         * represented by this relative position.
+         */
+        public PointF getAbsolutePositionInRegion(RectF region) {
+            return new PointF(
+                    mOnLeft ? region.left : region.right,
+                    region.top + mVerticalOffsetPercent * region.height());
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java b/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java
index b378469..e835ea2 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java
@@ -35,6 +35,7 @@
 import androidx.dynamicanimation.animation.SpringForce;
 
 import com.android.systemui.R;
+import com.android.systemui.bubbles.BubbleStackView;
 import com.android.systemui.util.FloatingContentCoordinator;
 import com.android.systemui.util.animation.PhysicsAnimator;
 import com.android.systemui.util.magnetictarget.MagnetizedObject;
@@ -125,6 +126,9 @@
      */
     private Rect mAnimatingToBounds = new Rect();
 
+    /** Initial starting location for the stack. */
+    @Nullable private BubbleStackView.RelativeStackPosition mStackStartPosition;
+
     /** Whether or not the stack's start position has been set. */
     private boolean mStackMovedToStartPosition = false;
 
@@ -431,21 +435,6 @@
         return stackPos;
     }
 
-    /**
-     * Moves the stack in response to rotation. We keep it in the most similar position by keeping
-     * it on the same side, and positioning it the same percentage of the way down the screen
-     * (taking status bar/nav bar into account by using the allowable region's height).
-     */
-    public void moveStackToSimilarPositionAfterRotation(boolean wasOnLeft, float verticalPercent) {
-        final RectF allowablePos = getAllowableStackPositionRegion();
-        final float allowableRegionHeight = allowablePos.bottom - allowablePos.top;
-
-        final float x = wasOnLeft ? allowablePos.left : allowablePos.right;
-        final float y = (allowableRegionHeight * verticalPercent) + allowablePos.top;
-
-        setStackPosition(new PointF(x, y));
-    }
-
     /** Description of current animation controller state. */
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("StackAnimationController state:");
@@ -815,7 +804,7 @@
         } else {
             // When all children are removed ensure stack position is sane
             setStackPosition(mRestingStackPosition == null
-                    ? getDefaultStartPosition()
+                    ? getStartPosition()
                     : mRestingStackPosition);
 
             // Remove the stack from the coordinator since we don't have any bubbles and aren't
@@ -868,7 +857,7 @@
         mLayout.setVisibility(View.INVISIBLE);
         mLayout.post(() -> {
             setStackPosition(mRestingStackPosition == null
-                    ? getDefaultStartPosition()
+                    ? getStartPosition()
                     : mRestingStackPosition);
             mStackMovedToStartPosition = true;
             mLayout.setVisibility(View.VISIBLE);
@@ -938,15 +927,47 @@
         }
     }
 
-    /** Returns the default stack position, which is on the top left. */
-    public PointF getDefaultStartPosition() {
-        boolean isRtl = mLayout != null
-                && mLayout.getResources().getConfiguration().getLayoutDirection()
-                == View.LAYOUT_DIRECTION_RTL;
-        return new PointF(isRtl
-                        ? getAllowableStackPositionRegion().right
-                        : getAllowableStackPositionRegion().left,
-                getAllowableStackPositionRegion().top + mStackStartingVerticalOffset);
+    public void setStackPosition(BubbleStackView.RelativeStackPosition position) {
+        setStackPosition(position.getAbsolutePositionInRegion(getAllowableStackPositionRegion()));
+    }
+
+    public BubbleStackView.RelativeStackPosition getRelativeStackPosition() {
+        return new BubbleStackView.RelativeStackPosition(
+                mStackPosition, getAllowableStackPositionRegion());
+    }
+
+    /**
+     * Sets the starting position for the stack, where it will be located when the first bubble is
+     * added.
+     */
+    public void setStackStartPosition(BubbleStackView.RelativeStackPosition position) {
+        mStackStartPosition = position;
+    }
+
+    /**
+     * Returns the starting stack position. If {@link #setStackStartPosition} was called, this will
+     * return that position - otherwise, a reasonable default will be returned.
+     */
+    @Nullable public PointF getStartPosition() {
+        if (mLayout == null) {
+            return null;
+        }
+
+        if (mStackStartPosition == null) {
+            // Start on the left if we're in LTR, right otherwise.
+            final boolean startOnLeft =
+                    mLayout.getResources().getConfiguration().getLayoutDirection()
+                            != View.LAYOUT_DIRECTION_RTL;
+
+            final float startingVerticalOffset = mLayout.getResources().getDimensionPixelOffset(
+                    R.dimen.bubble_stack_starting_offset_y);
+
+            mStackStartPosition = new BubbleStackView.RelativeStackPosition(
+                    startOnLeft,
+                    startingVerticalOffset / getAllowableStackPositionRegion().height());
+        }
+
+        return mStackStartPosition.getAbsolutePositionInRegion(getAllowableStackPositionRegion());
     }
 
     private boolean isStackPositionSet() {
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/brightline/DistanceClassifier.java b/packages/SystemUI/src/com/android/systemui/classifier/brightline/DistanceClassifier.java
index 0329183..9fa2557 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/brightline/DistanceClassifier.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/brightline/DistanceClassifier.java
@@ -112,7 +112,6 @@
 
     private DistanceVectors calculateDistances() {
         // This code assumes that there will be no missed DOWN or UP events.
-        VelocityTracker velocityTracker = VelocityTracker.obtain();
         List<MotionEvent> motionEvents = getRecentMotionEvents();
 
         if (motionEvents.size() < 3) {
@@ -120,6 +119,8 @@
             return new DistanceVectors(0, 0, 0, 0);
         }
 
+        VelocityTracker velocityTracker = VelocityTracker.obtain();
+
         for (MotionEvent motionEvent : motionEvents) {
             velocityTracker.addMovement(motionEvent);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/controls/CustomIconCache.kt b/packages/SystemUI/src/com/android/systemui/controls/CustomIconCache.kt
new file mode 100644
index 0000000..cca0f16
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/controls/CustomIconCache.kt
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.controls
+
+import android.content.ComponentName
+import android.graphics.drawable.Icon
+import androidx.annotation.GuardedBy
+import javax.inject.Inject
+import javax.inject.Singleton
+
+/**
+ * Icon cache for custom icons sent with controls.
+ *
+ * It assumes that only one component can be current at the time, to minimize the number of icons
+ * stored at a given time.
+ */
+@Singleton
+class CustomIconCache @Inject constructor() {
+
+    private var currentComponent: ComponentName? = null
+    @GuardedBy("cache")
+    private val cache: MutableMap<String, Icon> = LinkedHashMap()
+
+    /**
+     * Store an icon in the cache.
+     *
+     * If the icons currently stored do not correspond to the component to be stored, the cache is
+     * cleared first.
+     */
+    fun store(component: ComponentName, controlId: String, icon: Icon?) {
+        if (component != currentComponent) {
+            clear()
+            currentComponent = component
+        }
+        synchronized(cache) {
+            if (icon != null) {
+                cache.put(controlId, icon)
+            } else {
+                cache.remove(controlId)
+            }
+        }
+    }
+
+    /**
+     * Retrieves a custom icon stored in the cache.
+     *
+     * It will return null if the component requested is not the one whose icons are stored, or if
+     * there is no icon cached for that id.
+     */
+    fun retrieve(component: ComponentName, controlId: String): Icon? {
+        if (component != currentComponent) return null
+        return synchronized(cache) {
+            cache.get(controlId)
+        }
+    }
+
+    private fun clear() {
+        synchronized(cache) {
+            cache.clear()
+        }
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt
index 1bda841..d930c98 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt
@@ -87,6 +87,10 @@
      * @param list a list of favorite controls. The list will be stored in the same order.
      */
     fun storeFavorites(structures: List<StructureInfo>) {
+        if (structures.isEmpty() && !file.exists()) {
+            // Do not create a new file to store nothing
+            return
+        }
         executor.execute {
             Log.d(TAG, "Saving data to file: $file")
             val atomicFile = AtomicFile(file)
diff --git a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt
index ec8bfc6..977e46a 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt
@@ -76,7 +76,8 @@
         private const val LOAD_TIMEOUT_SECONDS = 20L // seconds
         private const val MAX_BIND_RETRIES = 5
         private const val DEBUG = true
-        private val BIND_FLAGS = Context.BIND_AUTO_CREATE or Context.BIND_FOREGROUND_SERVICE
+        private val BIND_FLAGS = Context.BIND_AUTO_CREATE or Context.BIND_FOREGROUND_SERVICE or
+            Context.BIND_NOT_PERCEPTIBLE
     }
 
     private val intent = Intent().apply {
diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/ControlAdapter.kt b/packages/SystemUI/src/com/android/systemui/controls/management/ControlAdapter.kt
index c683a87..40662536 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/management/ControlAdapter.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/management/ControlAdapter.kt
@@ -72,8 +72,13 @@
             TYPE_CONTROL -> {
                 ControlHolder(
                     layoutInflater.inflate(R.layout.controls_base_item, parent, false).apply {
-                        layoutParams.apply {
+                        (layoutParams as ViewGroup.MarginLayoutParams).apply {
                             width = ViewGroup.LayoutParams.MATCH_PARENT
+                            // Reset margins as they will be set through the decoration
+                            topMargin = 0
+                            bottomMargin = 0
+                            leftMargin = 0
+                            rightMargin = 0
                         }
                         elevation = this@ControlAdapter.elevation
                         background = parent.context.getDrawable(
@@ -258,6 +263,7 @@
         val context = itemView.context
         val fg = context.getResources().getColorStateList(ri.foreground, context.getTheme())
 
+        icon.imageTintList = null
         ci.customIcon?.let {
             icon.setImageIcon(it)
         } ?: run {
@@ -386,7 +392,7 @@
         val type = parent.adapter?.getItemViewType(position)
         if (type == ControlAdapter.TYPE_CONTROL) {
             outRect.apply {
-                top = topMargin
+                top = topMargin * 2 // Use double margin, as we are not setting bottom
                 left = sideMargins
                 right = sideMargins
                 bottom = 0
diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt
index ff40a8a..f68388d 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt
@@ -29,6 +29,7 @@
 import androidx.recyclerview.widget.RecyclerView
 import com.android.systemui.R
 import com.android.systemui.broadcast.BroadcastDispatcher
+import com.android.systemui.controls.CustomIconCache
 import com.android.systemui.controls.controller.ControlsControllerImpl
 import com.android.systemui.controls.controller.StructureInfo
 import com.android.systemui.globalactions.GlobalActionsComponent
@@ -42,7 +43,8 @@
 class ControlsEditingActivity @Inject constructor(
     private val controller: ControlsControllerImpl,
     broadcastDispatcher: BroadcastDispatcher,
-    private val globalActionsComponent: GlobalActionsComponent
+    private val globalActionsComponent: GlobalActionsComponent,
+    private val customIconCache: CustomIconCache
 ) : LifecycleActivity() {
 
     companion object {
@@ -170,7 +172,7 @@
 
     private fun setUpList() {
         val controls = controller.getFavoritesForStructure(component, structure)
-        model = FavoritesModel(component, controls, favoritesModelCallback)
+        model = FavoritesModel(customIconCache, component, controls, favoritesModelCallback)
         val elevation = resources.getFloat(R.dimen.control_card_elevation)
         val recyclerView = requireViewById<RecyclerView>(R.id.list)
         recyclerView.alpha = 0.0f
diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsModel.kt b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsModel.kt
index 4ef64a5..ad0e7a5 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsModel.kt
@@ -114,11 +114,27 @@
     val controlStatus: ControlStatus
 ) : ElementWrapper(), ControlInterface by controlStatus
 
+private fun nullIconGetter(_a: ComponentName, _b: String): Icon? = null
+
 data class ControlInfoWrapper(
     override val component: ComponentName,
     val controlInfo: ControlInfo,
     override var favorite: Boolean
 ) : ElementWrapper(), ControlInterface {
+
+    var customIconGetter: (ComponentName, String) -> Icon? = ::nullIconGetter
+        private set
+
+    // Separate constructor so the getter is not used in auto-generated methods
+    constructor(
+        component: ComponentName,
+        controlInfo: ControlInfo,
+        favorite: Boolean,
+        customIconGetter: (ComponentName, String) -> Icon?
+    ): this(component, controlInfo, favorite) {
+        this.customIconGetter = customIconGetter
+    }
+
     override val controlId: String
         get() = controlInfo.controlId
     override val title: CharSequence
@@ -128,8 +144,7 @@
     override val deviceType: Int
         get() = controlInfo.deviceType
     override val customIcon: Icon?
-        // Will need to address to support for edit activity
-        get() = null
+        get() = customIconGetter(component, controlId)
 }
 
 data class DividerWrapper(
diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/FavoritesModel.kt b/packages/SystemUI/src/com/android/systemui/controls/management/FavoritesModel.kt
index 5242501..f9ce636 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/management/FavoritesModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/management/FavoritesModel.kt
@@ -21,6 +21,7 @@
 import androidx.recyclerview.widget.ItemTouchHelper
 import androidx.recyclerview.widget.RecyclerView
 import com.android.systemui.controls.ControlInterface
+import com.android.systemui.controls.CustomIconCache
 import com.android.systemui.controls.controller.ControlInfo
 import java.util.Collections
 
@@ -35,6 +36,7 @@
  * @property favoritesModelCallback callback to notify on first change and empty favorites
  */
 class FavoritesModel(
+    private val customIconCache: CustomIconCache,
     private val componentName: ComponentName,
     favorites: List<ControlInfo>,
     private val favoritesModelCallback: FavoritesModelCallback
@@ -83,7 +85,7 @@
         }
 
     override val elements: List<ElementWrapper> = favorites.map {
-        ControlInfoWrapper(componentName, it, true)
+        ControlInfoWrapper(componentName, it, true, customIconCache::retrieve)
     } + DividerWrapper()
 
     /**
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt
index 22d6b6b..e15380b 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt
@@ -92,7 +92,7 @@
     override fun setValue(cvh: ControlViewHolder, templateId: String, newValue: Float) {
         bouncerOrRun(Action(cvh.cws.ci.controlId, {
             cvh.action(FloatAction(templateId, newValue))
-        }, true /* blockable */))
+        }, false /* blockable */))
     }
 
     override fun longPress(cvh: ControlViewHolder) {
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
index 1eb7e21..5a52597 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
@@ -44,6 +44,7 @@
 import android.widget.TextView
 import com.android.systemui.R
 import com.android.systemui.controls.ControlsServiceInfo
+import com.android.systemui.controls.CustomIconCache
 import com.android.systemui.controls.controller.ControlInfo
 import com.android.systemui.controls.controller.ControlsController
 import com.android.systemui.controls.controller.StructureInfo
@@ -75,7 +76,8 @@
     @Main val sharedPreferences: SharedPreferences,
     val controlActionCoordinator: ControlActionCoordinator,
     private val activityStarter: ActivityStarter,
-    private val shadeController: ShadeController
+    private val shadeController: ShadeController,
+    private val iconCache: CustomIconCache
 ) : ControlsUiController {
 
     companion object {
@@ -102,6 +104,7 @@
     private var hidden = true
     private lateinit var dismissGlobalActions: Runnable
     private val popupThemedContext = ContextThemeWrapper(context, R.style.Control_ListPopupWindow)
+    private var retainCache = false
 
     private val collator = Collator.getInstance(context.resources.configuration.locales[0])
     private val localeComparator = compareBy<SelectionItem, CharSequence>(collator) {
@@ -147,6 +150,7 @@
         this.parent = parent
         this.dismissGlobalActions = dismissGlobalActions
         hidden = false
+        retainCache = false
 
         allStructures = controlsController.get().getFavorites()
         selectedStructure = loadPreference(allStructures)
@@ -233,6 +237,8 @@
         }
         putIntentExtras(i, si)
         startActivity(context, i)
+
+        retainCache = true
     }
 
     private fun putIntentExtras(intent: Intent, si: StructureInfo) {
@@ -495,13 +501,14 @@
 
         controlsListingController.get().removeCallback(listingCallback)
 
-        RenderInfo.clearCache()
+        if (!retainCache) RenderInfo.clearCache()
     }
 
     override fun onRefreshState(componentName: ComponentName, controls: List<Control>) {
         controls.forEach { c ->
             controlsById.get(ControlKey(componentName, c.getControlId()))?.let {
                 Log.d(ControlsUiController.TAG, "onRefreshState() for id: " + c.getControlId())
+                iconCache.store(componentName, c.controlId, c.customIcon)
                 val cws = ControlWithState(componentName, it.ci, c)
                 val key = ControlKey(componentName, c.getControlId())
                 controlsById.put(key, cws)
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DefaultBroadcastReceiverBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/DefaultBroadcastReceiverBinder.java
index 56d0fa2..6e8d63b 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/DefaultBroadcastReceiverBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DefaultBroadcastReceiverBinder.java
@@ -18,7 +18,9 @@
 
 import android.content.BroadcastReceiver;
 
-import com.android.systemui.screenshot.GlobalScreenshot.ActionProxyReceiver;
+import com.android.systemui.screenshot.ActionProxyReceiver;
+import com.android.systemui.screenshot.DeleteScreenshotReceiver;
+import com.android.systemui.screenshot.SmartActionsReceiver;
 
 import dagger.Binds;
 import dagger.Module;
@@ -30,10 +32,31 @@
  */
 @Module
 public abstract class DefaultBroadcastReceiverBinder {
-    /** */
+    /**
+     *
+     */
     @Binds
     @IntoMap
     @ClassKey(ActionProxyReceiver.class)
     public abstract BroadcastReceiver bindActionProxyReceiver(
             ActionProxyReceiver broadcastReceiver);
+
+    /**
+     *
+     */
+    @Binds
+    @IntoMap
+    @ClassKey(DeleteScreenshotReceiver.class)
+    public abstract BroadcastReceiver bindDeleteScreenshotReceiver(
+            DeleteScreenshotReceiver broadcastReceiver);
+
+    /**
+     *
+     */
+    @Binds
+    @IntoMap
+    @ClassKey(SmartActionsReceiver.class)
+    public abstract BroadcastReceiver bindSmartActionsReceiver(
+            SmartActionsReceiver broadcastReceiver);
+
 }
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java
index f683a63..8472b1b 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java
@@ -42,6 +42,7 @@
 import android.hardware.display.DisplayManager;
 import android.media.AudioManager;
 import android.media.MediaRouter2Manager;
+import android.media.session.MediaSessionManager;
 import android.net.ConnectivityManager;
 import android.net.NetworkScoreManager;
 import android.net.wifi.WifiManager;
@@ -219,6 +220,11 @@
     }
 
     @Provides
+    static MediaSessionManager provideMediaSessionManager(Context context) {
+        return context.getSystemService(MediaSessionManager.class);
+    }
+
+    @Provides
     @Singleton
     static NetworkScoreManager provideNetworkScoreManager(Context context) {
         return context.getSystemService(NetworkScoreManager.class);
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java
index aeba64a..cd0ba29 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java
@@ -103,7 +103,7 @@
 
     @Binds
     @Singleton
-    public abstract QSFactory provideQSFactory(QSFactoryImpl qsFactoryImpl);
+    public abstract QSFactory bindQSFactory(QSFactoryImpl qsFactoryImpl);
 
     @Binds
     abstract DockManager bindDockManager(DockManagerImpl dockManager);
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java b/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
index ae7d82a..253a35c 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
@@ -430,8 +430,12 @@
         /** Give the Part a chance to clean itself up. */
         default void destroy() {}
 
-        /** Alerts that the screenstate is being changed. */
-        default void onScreenState(int state) {}
+        /**
+         *  Alerts that the screenstate is being changed.
+         *  Note: This may be called from within a call to transitionTo, so local DozeState may not
+         *  be accurate nor match with the new displayState.
+         */
+        default void onScreenState(int displayState) {}
     }
 
     /** A wrapper interface for {@link android.service.dreams.DreamService} */
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
index 64cfb4b..a11997b 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
@@ -69,7 +69,6 @@
      * --ei brightness_bucket 1}
      */
     private int mDebugBrightnessBucket = -1;
-    private DozeMachine.State mState;
 
     @VisibleForTesting
     public DozeScreenBrightness(Context context, DozeMachine.Service service,
@@ -109,7 +108,6 @@
 
     @Override
     public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) {
-        mState = newState;
         switch (newState) {
             case INITIALIZED:
             case DOZE:
@@ -127,10 +125,7 @@
 
     @Override
     public void onScreenState(int state) {
-        if (!mScreenOff
-                && (mState == DozeMachine.State.DOZE_AOD
-                     || mState == DozeMachine.State.DOZE_AOD_DOCKED)
-                && (state == Display.STATE_DOZE || state == Display.STATE_DOZE_SUSPEND)) {
+        if (state == Display.STATE_DOZE || state == Display.STATE_DOZE_SUSPEND) {
             setLightSensorEnabled(true);
         } else {
             setLightSensorEnabled(false);
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 2702bc4..ff25439a 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -149,6 +149,7 @@
 import java.util.concurrent.Executor;
 
 import javax.inject.Inject;
+import javax.inject.Provider;
 
 /**
  * Helper to show the global actions dialog.  Each item is an {@link Action} that may show depending
@@ -402,7 +403,7 @@
                         if (mDialog != null) {
                             if (!mDialog.isShowingControls() && shouldShowControls()) {
                                 mDialog.showControls(mControlsUiControllerOptional.get());
-                            } else if (shouldShowLockMessage()) {
+                            } else if (shouldShowLockMessage(mDialog)) {
                                 mDialog.showLockMessage();
                             }
                         }
@@ -699,19 +700,17 @@
         mPowerAdapter = new MyPowerOptionsAdapter();
 
         mDepthController.setShowingHomeControls(true);
-        GlobalActionsPanelPlugin.PanelViewController walletViewController =
-                getWalletViewController();
         ControlsUiController uiController = null;
         if (mControlsUiControllerOptional.isPresent() && shouldShowControls()) {
             uiController = mControlsUiControllerOptional.get();
         }
         ActionsDialog dialog = new ActionsDialog(mContext, mAdapter, mOverflowAdapter,
-                walletViewController, mDepthController, mSysuiColorExtractor,
+                this::getWalletViewController, mDepthController, mSysuiColorExtractor,
                 mStatusBarService, mNotificationShadeWindowController,
                 controlsAvailable(), uiController,
                 mSysUiState, this::onRotate, mKeyguardShowing, mPowerAdapter);
 
-        if (shouldShowLockMessage()) {
+        if (shouldShowLockMessage(dialog)) {
             dialog.showLockMessage();
         }
         dialog.setCanceledOnTouchOutside(false); // Handled by the custom class.
@@ -2144,7 +2143,8 @@
         private MultiListLayout mGlobalActionsLayout;
         private Drawable mBackgroundDrawable;
         private final SysuiColorExtractor mColorExtractor;
-        private final GlobalActionsPanelPlugin.PanelViewController mWalletViewController;
+        private final Provider<GlobalActionsPanelPlugin.PanelViewController> mWalletFactory;
+        @Nullable private GlobalActionsPanelPlugin.PanelViewController mWalletViewController;
         private boolean mKeyguardShowing;
         private boolean mShowing;
         private float mScrimAlpha;
@@ -2164,7 +2164,7 @@
         private TextView mLockMessage;
 
         ActionsDialog(Context context, MyAdapter adapter, MyOverflowAdapter overflowAdapter,
-                GlobalActionsPanelPlugin.PanelViewController walletViewController,
+                Provider<GlobalActionsPanelPlugin.PanelViewController> walletFactory,
                 NotificationShadeDepthController depthController,
                 SysuiColorExtractor sysuiColorExtractor, IStatusBarService statusBarService,
                 NotificationShadeWindowController notificationShadeWindowController,
@@ -2185,6 +2185,7 @@
             mSysUiState = sysuiState;
             mOnRotateCallback = onRotateCallback;
             mKeyguardShowing = keyguardShowing;
+            mWalletFactory = walletFactory;
 
             // Window initialization
             Window window = getWindow();
@@ -2207,7 +2208,6 @@
             window.getAttributes().setFitInsetsTypes(0 /* types */);
             setTitle(R.string.global_actions);
 
-            mWalletViewController = walletViewController;
             initializeLayout();
         }
 
@@ -2220,8 +2220,13 @@
             mControlsUiController.show(mControlsView, this::dismissForControlsActivity);
         }
 
+        private boolean isWalletViewAvailable() {
+            return mWalletViewController != null && mWalletViewController.getPanelContent() != null;
+        }
+
         private void initializeWalletView() {
-            if (mWalletViewController == null || mWalletViewController.getPanelContent() == null) {
+            mWalletViewController = mWalletFactory.get();
+            if (!isWalletViewAvailable()) {
                 return;
             }
 
@@ -2527,6 +2532,8 @@
         private void dismissWallet() {
             if (mWalletViewController != null) {
                 mWalletViewController.onDismissed();
+                // The wallet controller should not be re-used after being dismissed.
+                mWalletViewController = null;
             }
         }
 
@@ -2668,18 +2675,12 @@
                 && !mControlsServiceInfos.isEmpty();
     }
 
-    private boolean walletViewAvailable() {
-        GlobalActionsPanelPlugin.PanelViewController walletViewController =
-                getWalletViewController();
-        return walletViewController != null && walletViewController.getPanelContent() != null;
-    }
-
-    private boolean shouldShowLockMessage() {
+    private boolean shouldShowLockMessage(ActionsDialog dialog) {
         boolean isLockedAfterBoot = mLockPatternUtils.getStrongAuthForUser(getCurrentUser().id)
                 == STRONG_AUTH_REQUIRED_AFTER_BOOT;
         return !mKeyguardStateController.isUnlocked()
                 && (!mShowLockScreenCardsAndControls || isLockedAfterBoot)
-                && (controlsAvailable() || walletViewAvailable());
+                && (controlsAvailable() || dialog.isWalletViewAvailable());
     }
 
     private void onPowerMenuLockScreenSettingsChanged() {
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaBrowserFactory.java b/packages/SystemUI/src/com/android/systemui/media/MediaBrowserFactory.java
new file mode 100644
index 0000000..aca033e
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaBrowserFactory.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.media.browse.MediaBrowser;
+import android.os.Bundle;
+
+import javax.inject.Inject;
+
+/**
+ * Testable wrapper around {@link MediaBrowser} constructor
+ */
+public class MediaBrowserFactory {
+    private final Context mContext;
+
+    @Inject
+    public MediaBrowserFactory(Context context) {
+        mContext = context;
+    }
+
+    /**
+     * Creates a new MediaBrowser
+     *
+     * @param serviceComponent
+     * @param callback
+     * @param rootHints
+     * @return
+     */
+    public MediaBrowser create(ComponentName serviceComponent,
+            MediaBrowser.ConnectionCallback callback, Bundle rootHints) {
+        return new MediaBrowser(mContext, serviceComponent, callback, rootHints);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt b/packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt
index e12b7dd..d8d9bd7 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt
@@ -11,6 +11,7 @@
 import android.view.View
 import android.view.ViewGroup
 import android.widget.LinearLayout
+import androidx.annotation.VisibleForTesting
 import com.android.systemui.R
 import com.android.systemui.dagger.qualifiers.Main
 import com.android.systemui.plugins.ActivityStarter
@@ -22,6 +23,7 @@
 import com.android.systemui.util.animation.UniqueObjectHostView
 import com.android.systemui.util.animation.requiresRemeasuring
 import com.android.systemui.util.concurrency.DelayableExecutor
+import java.util.TreeMap
 import javax.inject.Inject
 import javax.inject.Provider
 import javax.inject.Singleton
@@ -41,7 +43,7 @@
     private val mediaHostStatesManager: MediaHostStatesManager,
     private val activityStarter: ActivityStarter,
     @Main executor: DelayableExecutor,
-    mediaManager: MediaDataFilter,
+    private val mediaManager: MediaDataManager,
     configurationController: ConfigurationController,
     falsingManager: FalsingManager
 ) {
@@ -103,13 +105,12 @@
     private val mediaCarousel: MediaScrollView
     private val mediaCarouselScrollHandler: MediaCarouselScrollHandler
     val mediaFrame: ViewGroup
-    val mediaPlayers: MutableMap<String, MediaControlPanel> = mutableMapOf()
     private lateinit var settingsButton: View
-    private val mediaData: MutableMap<String, MediaData> = mutableMapOf()
     private val mediaContent: ViewGroup
     private val pageIndicator: PageIndicator
     private val visualStabilityCallback: VisualStabilityManager.Callback
     private var needsReordering: Boolean = false
+    private var keysNeedRemoval = mutableSetOf<String>()
     private var isRtl: Boolean = false
         set(value) {
             if (value != field) {
@@ -123,7 +124,7 @@
         set(value) {
             if (field != value) {
                 field = value
-                for (player in mediaPlayers.values) {
+                for (player in MediaPlayerData.players()) {
                     player.setListening(field)
                 }
             }
@@ -135,6 +136,7 @@
         }
 
         override fun onOverlayChanged() {
+            recreatePlayers()
             inflateSettingsButton()
         }
 
@@ -150,7 +152,7 @@
         pageIndicator = mediaFrame.requireViewById(R.id.media_page_indicator)
         mediaCarouselScrollHandler = MediaCarouselScrollHandler(mediaCarousel, pageIndicator,
                 executor, mediaManager::onSwipeToDismiss, this::updatePageIndicatorLocation,
-                falsingManager)
+                this::closeGuts, falsingManager)
         isRtl = context.resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL
         inflateSettingsButton()
         mediaContent = mediaCarousel.requireViewById(R.id.media_carousel)
@@ -160,6 +162,10 @@
                 needsReordering = false
                 reorderAllPlayers()
             }
+
+            keysNeedRemoval.forEach { removePlayer(it) }
+            keysNeedRemoval.clear()
+
             // Let's reset our scroll position
             mediaCarouselScrollHandler.scrollToStart()
         }
@@ -167,20 +173,23 @@
                 true /* persistent */)
         mediaManager.addListener(object : MediaDataManager.Listener {
             override fun onMediaDataLoaded(key: String, oldKey: String?, data: MediaData) {
-                oldKey?.let { mediaData.remove(it) }
-                if (!data.active && !Utils.useMediaResumption(context)) {
-                    // This view is inactive, let's remove this! This happens e.g when dismissing /
-                    // timing out a view. We still have the data around because resumption could
-                    // be on, but we should save the resources and release this.
-                    onMediaDataRemoved(key)
+                addOrUpdatePlayer(key, oldKey, data)
+                val canRemove = data.isPlaying?.let { !it } ?: data.isClearable && !data.active
+                if (canRemove && !Utils.useMediaResumption(context)) {
+                    // This view isn't playing, let's remove this! This happens e.g when
+                    // dismissing/timing out a view. We still have the data around because
+                    // resumption could be on, but we should save the resources and release this.
+                    if (visualStabilityManager.isReorderingAllowed) {
+                        onMediaDataRemoved(key)
+                    } else {
+                        keysNeedRemoval.add(key)
+                    }
                 } else {
-                    mediaData.put(key, data)
-                    addOrUpdatePlayer(key, oldKey, data)
+                    keysNeedRemoval.remove(key)
                 }
             }
 
             override fun onMediaDataRemoved(key: String) {
-                mediaData.remove(key)
                 removePlayer(key)
             }
         })
@@ -223,53 +232,36 @@
     }
 
     private fun reorderAllPlayers() {
-        for (mediaPlayer in mediaPlayers.values) {
-            val view = mediaPlayer.view?.player
-            if (mediaPlayer.isPlaying && mediaContent.indexOfChild(view) != 0) {
-                mediaContent.removeView(view)
-                mediaContent.addView(view, 0)
+        mediaContent.removeAllViews()
+        for (mediaPlayer in MediaPlayerData.players()) {
+            mediaPlayer.view?.let {
+                mediaContent.addView(it.player)
             }
         }
         mediaCarouselScrollHandler.onPlayersChanged()
     }
 
     private fun addOrUpdatePlayer(key: String, oldKey: String?, data: MediaData) {
-        // If the key was changed, update entry
-        val oldData = mediaPlayers[oldKey]
-        if (oldData != null) {
-            val oldData = mediaPlayers.remove(oldKey)
-            mediaPlayers.put(key, oldData!!)?.let {
-                Log.wtf(TAG, "new key $key already exists when migrating from $oldKey")
-            }
-        }
-        var existingPlayer = mediaPlayers[key]
+        val existingPlayer = MediaPlayerData.getMediaPlayer(key, oldKey)
         if (existingPlayer == null) {
-            existingPlayer = mediaControlPanelFactory.get()
-            existingPlayer.attach(PlayerViewHolder.create(LayoutInflater.from(context),
-                    mediaContent))
-            existingPlayer.mediaViewController.sizeChangedListener = this::updateCarouselDimensions
-            mediaPlayers[key] = existingPlayer
+            var newPlayer = mediaControlPanelFactory.get()
+            newPlayer.attach(PlayerViewHolder.create(LayoutInflater.from(context), mediaContent))
+            newPlayer.mediaViewController.sizeChangedListener = this::updateCarouselDimensions
             val lp = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                     ViewGroup.LayoutParams.WRAP_CONTENT)
-            existingPlayer.view?.player?.setLayoutParams(lp)
-            existingPlayer.bind(data)
-            existingPlayer.setListening(currentlyExpanded)
-            updatePlayerToState(existingPlayer, noAnimation = true)
-            if (existingPlayer.isPlaying) {
-                mediaContent.addView(existingPlayer.view?.player, 0)
-            } else {
-                mediaContent.addView(existingPlayer.view?.player)
-            }
+            newPlayer.view?.player?.setLayoutParams(lp)
+            newPlayer.bind(data, key)
+            newPlayer.setListening(currentlyExpanded)
+            MediaPlayerData.addMediaPlayer(key, data, newPlayer)
+            updatePlayerToState(newPlayer, noAnimation = true)
+            reorderAllPlayers()
         } else {
-            existingPlayer.bind(data)
-            if (existingPlayer.isPlaying &&
-                    mediaContent.indexOfChild(existingPlayer.view?.player) != 0) {
-                if (visualStabilityManager.isReorderingAllowed) {
-                    mediaContent.removeView(existingPlayer.view?.player)
-                    mediaContent.addView(existingPlayer.view?.player, 0)
-                } else {
-                    needsReordering = true
-                }
+            existingPlayer.bind(data, key)
+            MediaPlayerData.addMediaPlayer(key, data, existingPlayer)
+            if (visualStabilityManager.isReorderingAllowed) {
+                reorderAllPlayers()
+            } else {
+                needsReordering = true
             }
         }
         updatePageIndicator()
@@ -277,29 +269,30 @@
         mediaCarousel.requiresRemeasuring = true
         // Check postcondition: mediaContent should have the same number of children as there are
         // elements in mediaPlayers.
-        if (mediaPlayers.size != mediaContent.childCount) {
+        if (MediaPlayerData.players().size != mediaContent.childCount) {
             Log.wtf(TAG, "Size of players list and number of views in carousel are out of sync")
         }
     }
 
-    private fun removePlayer(key: String) {
-        val removed = mediaPlayers.remove(key)
+    private fun removePlayer(key: String, dismissMediaData: Boolean = true) {
+        val removed = MediaPlayerData.removeMediaPlayer(key)
         removed?.apply {
             mediaCarouselScrollHandler.onPrePlayerRemoved(removed)
             mediaContent.removeView(removed.view?.player)
             removed.onDestroy()
             mediaCarouselScrollHandler.onPlayersChanged()
             updatePageIndicator()
+
+            if (dismissMediaData) {
+                // Inform the media manager of a potentially late dismissal
+                mediaManager.dismissMediaData(key, 0L)
+            }
         }
     }
 
     private fun recreatePlayers() {
-        // Note that this will scramble the order of players. Actively playing sessions will, at
-        // least, still be put in the front. If we want to maintain order, then more work is
-        // needed.
-        mediaData.forEach {
-            key, data ->
-            removePlayer(key)
+        MediaPlayerData.mediaData().forEach { (key, data) ->
+            removePlayer(key, dismissMediaData = false)
             addOrUpdatePlayer(key = key, oldKey = null, data = data)
         }
     }
@@ -337,7 +330,7 @@
             currentStartLocation = startLocation
             currentEndLocation = endLocation
             currentTransitionProgress = progress
-            for (mediaPlayer in mediaPlayers.values) {
+            for (mediaPlayer in MediaPlayerData.players()) {
                 updatePlayerToState(mediaPlayer, immediately)
             }
             maybeResetSettingsCog()
@@ -386,7 +379,7 @@
     private fun updateCarouselDimensions() {
         var width = 0
         var height = 0
-        for (mediaPlayer in mediaPlayers.values) {
+        for (mediaPlayer in MediaPlayerData.players()) {
             val controller = mediaPlayer.mediaViewController
             // When transitioning the view to gone, the view gets smaller, but the translation
             // Doesn't, let's add the translation
@@ -448,7 +441,7 @@
             this.desiredLocation = desiredLocation
             this.desiredHostState = it
             currentlyExpanded = it.expansion > 0
-            for (mediaPlayer in mediaPlayers.values) {
+            for (mediaPlayer in MediaPlayerData.players()) {
                 if (animate) {
                     mediaPlayer.mediaViewController.animatePendingStateChange(
                             duration = duration,
@@ -469,6 +462,12 @@
         }
     }
 
+    fun closeGuts() {
+        MediaPlayerData.players().forEach {
+            it.closeGuts(true)
+        }
+    }
+
     /**
      * Update the size of the carousel, remeasuring it if necessary.
      */
@@ -491,3 +490,49 @@
         }
     }
 }
+
+@VisibleForTesting
+internal object MediaPlayerData {
+    private data class MediaSortKey(
+        val data: MediaData,
+        val updateTime: Long = 0
+    )
+
+    private val comparator =
+        compareByDescending<MediaSortKey> { it.data.isPlaying }
+        .thenByDescending { it.data.isLocalSession }
+        .thenByDescending { !it.data.resumption }
+        .thenByDescending { it.updateTime }
+
+    private val mediaPlayers = TreeMap<MediaSortKey, MediaControlPanel>(comparator)
+    private val mediaData: MutableMap<String, MediaSortKey> = mutableMapOf()
+
+    fun addMediaPlayer(key: String, data: MediaData, player: MediaControlPanel) {
+        removeMediaPlayer(key)
+        val sortKey = MediaSortKey(data, System.currentTimeMillis())
+        mediaData.put(key, sortKey)
+        mediaPlayers.put(sortKey, player)
+    }
+
+    fun getMediaPlayer(key: String, oldKey: String?): MediaControlPanel? {
+        // If the key was changed, update entry
+        oldKey?.let {
+            if (it != key) {
+                mediaData.remove(it)?.let { sortKey -> mediaData.put(key, sortKey) }
+            }
+        }
+        return mediaData.get(key)?.let { mediaPlayers.get(it) }
+    }
+
+    fun removeMediaPlayer(key: String) = mediaData.remove(key)?.let { mediaPlayers.remove(it) }
+
+    fun mediaData() = mediaData.entries.map { e -> Pair(e.key, e.value.data) }
+
+    fun players() = mediaPlayers.values
+
+    @VisibleForTesting
+    fun clear() {
+        mediaData.clear()
+        mediaPlayers.clear()
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaCarouselScrollHandler.kt b/packages/SystemUI/src/com/android/systemui/media/MediaCarouselScrollHandler.kt
index 3096908..77cac50 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaCarouselScrollHandler.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaCarouselScrollHandler.kt
@@ -56,6 +56,7 @@
     private val mainExecutor: DelayableExecutor,
     private val dismissCallback: () -> Unit,
     private var translationChangedListener: () -> Unit,
+    private val closeGuts: () -> Unit,
     private val falsingManager: FalsingManager
 ) {
     /**
@@ -452,6 +453,7 @@
         val nowScrolledIn = scrollIntoCurrentMedia != 0
         if (newIndex != activeMediaIndex || wasScrolledIn != nowScrolledIn) {
             activeMediaIndex = newIndex
+            closeGuts()
             updatePlayerVisibilities()
         }
         val relativeLocation = activeMediaIndex.toFloat() + if (playerWidthPlusPadding > 0)
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java b/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java
index 3fc162e..810cecc 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java
@@ -16,6 +16,8 @@
 
 package com.android.systemui.media;
 
+import static android.provider.Settings.ACTION_MEDIA_CONTROLS_SETTINGS;
+
 import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
@@ -45,6 +47,7 @@
 import com.android.systemui.R;
 import com.android.systemui.dagger.qualifiers.Background;
 import com.android.systemui.plugins.ActivityStarter;
+import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
 import com.android.systemui.util.animation.TransitionLayout;
 
 import java.util.List;
@@ -52,6 +55,8 @@
 
 import javax.inject.Inject;
 
+import dagger.Lazy;
+
 /**
  * A view controller used for Media Playback.
  */
@@ -59,6 +64,8 @@
     private static final String TAG = "MediaControlPanel";
     private static final float DISABLED_ALPHA = 0.38f;
 
+    private static final Intent SETTINGS_INTENT = new Intent(ACTION_MEDIA_CONTROLS_SETTINGS);
+
     // Button IDs for QS controls
     static final int[] ACTION_IDS = {
             R.id.action0,
@@ -75,9 +82,12 @@
 
     private Context mContext;
     private PlayerViewHolder mViewHolder;
+    private String mKey;
     private MediaViewController mMediaViewController;
     private MediaSession.Token mToken;
     private MediaController mController;
+    private KeyguardDismissUtil mKeyguardDismissUtil;
+    private Lazy<MediaDataManager> mMediaDataManagerLazy;
     private int mBackgroundColor;
     private int mAlbumArtSize;
     private int mAlbumArtRadius;
@@ -93,12 +103,15 @@
     @Inject
     public MediaControlPanel(Context context, @Background Executor backgroundExecutor,
             ActivityStarter activityStarter, MediaViewController mediaViewController,
-            SeekBarViewModel seekBarViewModel) {
+            SeekBarViewModel seekBarViewModel, Lazy<MediaDataManager> lazyMediaDataManager,
+            KeyguardDismissUtil keyguardDismissUtil) {
         mContext = context;
         mBackgroundExecutor = backgroundExecutor;
         mActivityStarter = activityStarter;
         mSeekBarViewModel = seekBarViewModel;
         mMediaViewController = mediaViewController;
+        mMediaDataManagerLazy = lazyMediaDataManager;
+        mKeyguardDismissUtil = keyguardDismissUtil;
         loadDimens();
 
         mViewOutlineProvider = new ViewOutlineProvider() {
@@ -174,15 +187,31 @@
         mSeekBarViewModel.getProgress().observeForever(mSeekBarObserver);
         mSeekBarViewModel.attachTouchHandlers(vh.getSeekBar());
         mMediaViewController.attach(player);
+
+        mViewHolder.getPlayer().setOnLongClickListener(v -> {
+            if (!mMediaViewController.isGutsVisible()) {
+                mMediaViewController.openGuts();
+                return true;
+            } else {
+                return false;
+            }
+        });
+        mViewHolder.getCancel().setOnClickListener(v -> {
+            closeGuts();
+        });
+        mViewHolder.getSettings().setOnClickListener(v -> {
+            mActivityStarter.startActivity(SETTINGS_INTENT, true /* dismissShade */);
+        });
     }
 
     /**
      * Bind this view based on the data given
      */
-    public void bind(@NonNull MediaData data) {
+    public void bind(@NonNull MediaData data, String key) {
         if (mViewHolder == null) {
             return;
         }
+        mKey = key;
         MediaSession.Token token = data.getToken();
         mBackgroundColor = data.getBackgroundColor();
         if (mToken == null || !mToken.equals(token)) {
@@ -205,6 +234,7 @@
         PendingIntent clickIntent = data.getClickIntent();
         if (clickIntent != null) {
             mViewHolder.getPlayer().setOnClickListener(v -> {
+                if (mMediaViewController.isGutsVisible()) return;
                 mActivityStarter.postStartActivityDismissingKeyguard(clickIntent);
             });
         }
@@ -329,14 +359,38 @@
         final MediaController controller = getController();
         mBackgroundExecutor.execute(() -> mSeekBarViewModel.updateController(controller));
 
-        // Set up long press menu
-        // TODO: b/156036025 bring back media guts
+        // Dismiss
+        mViewHolder.getDismiss().setOnClickListener(v -> {
+            if (mKey != null) {
+                closeGuts();
+                mKeyguardDismissUtil.executeWhenUnlocked(() -> {
+                    mMediaDataManagerLazy.get().dismissMediaData(mKey,
+                            MediaViewController.GUTS_ANIMATION_DURATION + 100);
+                    return true;
+                }, /* requiresShadeOpen */ true);
+            } else {
+                Log.w(TAG, "Dismiss media with null notification. Token uid="
+                        + data.getToken().getUid());
+            }
+        });
 
         // TODO: We don't need to refresh this state constantly, only if the state actually changed
         // to something which might impact the measurement
         mMediaViewController.refreshState();
     }
 
+    /**
+     * Close the guts for this player.
+     * @param immediate {@code true} if it should be closed without animation
+     */
+    public void closeGuts(boolean immediate) {
+        mMediaViewController.closeGuts(immediate);
+    }
+
+    private void closeGuts() {
+        closeGuts(false);
+    }
+
     @UiThread
     private Drawable scaleDrawable(Icon icon) {
         if (icon == null) {
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaData.kt b/packages/SystemUI/src/com/android/systemui/media/MediaData.kt
index dafc52a..40a879a 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaData.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaData.kt
@@ -82,6 +82,10 @@
      */
     var resumeAction: Runnable?,
     /**
+     * Local or remote playback
+     */
+    var isLocalSession: Boolean = true,
+    /**
      * Indicates that this player is a resumption player (ie. It only shows a play actions which
      * will start the app and start playing).
      */
@@ -90,7 +94,17 @@
      * Notification key for cancelling a media player after a timeout (when not using resumption.)
      */
     val notificationKey: String? = null,
-    var hasCheckedForResume: Boolean = false
+    var hasCheckedForResume: Boolean = false,
+
+    /**
+     * If apps do not report PlaybackState, set as null to imply 'undetermined'
+     */
+    val isPlaying: Boolean? = null,
+
+    /**
+     * Set from the notification and used as fallback when PlaybackState cannot be determined
+     */
+    val isClearable: Boolean = true
 )
 
 /** State of a media action. */
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaDataCombineLatest.kt b/packages/SystemUI/src/com/android/systemui/media/MediaDataCombineLatest.kt
index e8f0e06..aa3699e 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaDataCombineLatest.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaDataCombineLatest.kt
@@ -17,57 +17,48 @@
 package com.android.systemui.media
 
 import javax.inject.Inject
-import javax.inject.Singleton
 
 /**
- * Combines updates from [MediaDataManager] with [MediaDeviceManager].
+ * Combines [MediaDataManager.Listener] events with [MediaDeviceManager.Listener] events.
  */
-@Singleton
-class MediaDataCombineLatest @Inject constructor(
-    private val dataSource: MediaDataManager,
-    private val deviceSource: MediaDeviceManager
-) {
+class MediaDataCombineLatest @Inject constructor() : MediaDataManager.Listener,
+        MediaDeviceManager.Listener {
+
     private val listeners: MutableSet<MediaDataManager.Listener> = mutableSetOf()
     private val entries: MutableMap<String, Pair<MediaData?, MediaDeviceData?>> = mutableMapOf()
 
-    init {
-        dataSource.addListener(object : MediaDataManager.Listener {
-            override fun onMediaDataLoaded(key: String, oldKey: String?, data: MediaData) {
-                if (oldKey != null && !oldKey.equals(key)) {
-                    val s = entries[oldKey]?.second
-                    entries[key] = data to entries[oldKey]?.second
-                    entries.remove(oldKey)
-                } else {
-                    entries[key] = data to entries[key]?.second
-                }
-                update(key, oldKey)
-            }
-            override fun onMediaDataRemoved(key: String) {
-                remove(key)
-            }
-        })
-        deviceSource.addListener(object : MediaDeviceManager.Listener {
-            override fun onMediaDeviceChanged(key: String, data: MediaDeviceData?) {
-                entries[key] = entries[key]?.first to data
-                update(key, key)
-            }
-            override fun onKeyRemoved(key: String) {
-                remove(key)
-            }
-        })
+    override fun onMediaDataLoaded(key: String, oldKey: String?, data: MediaData) {
+        if (oldKey != null && oldKey != key && entries.contains(oldKey)) {
+            entries[key] = data to entries.remove(oldKey)?.second
+            update(key, oldKey)
+        } else {
+            entries[key] = data to entries[key]?.second
+            update(key, key)
+        }
     }
 
-    /**
-     * Get a map of all non-null data entries
-     */
-    fun getData(): Map<String, MediaData> {
-        return entries.filter {
-            (key, pair) -> pair.first != null && pair.second != null
-        }.mapValues {
-            (key, pair) -> pair.first!!.copy(device = pair.second)
+    override fun onMediaDataRemoved(key: String) {
+        remove(key)
+    }
+
+    override fun onMediaDeviceChanged(
+        key: String,
+        oldKey: String?,
+        data: MediaDeviceData?
+    ) {
+        if (oldKey != null && oldKey != key && entries.contains(oldKey)) {
+            entries[key] = entries.remove(oldKey)?.first to data
+            update(key, oldKey)
+        } else {
+            entries[key] = entries[key]?.first to data
+            update(key, key)
         }
     }
 
+    override fun onKeyRemoved(key: String) {
+        remove(key)
+    }
+
     /**
      * Add a listener for [MediaData] changes that has been combined with latest [MediaDeviceData].
      */
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaDataFilter.kt b/packages/SystemUI/src/com/android/systemui/media/MediaDataFilter.kt
index 662831e..1f580a9 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaDataFilter.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaDataFilter.kt
@@ -24,32 +24,32 @@
 import com.android.systemui.statusbar.NotificationLockscreenUserManager
 import java.util.concurrent.Executor
 import javax.inject.Inject
-import javax.inject.Singleton
 
 private const val TAG = "MediaDataFilter"
+private const val DEBUG = true
 
 /**
  * Filters data updates from [MediaDataCombineLatest] based on the current user ID, and handles user
  * switches (removing entries for the previous user, adding back entries for the current user)
  *
- * This is added downstream of [MediaDataManager] since we may still need to handle callbacks from
- * background users (e.g. timeouts) that UI classes should ignore.
- * Instead, UI classes should listen to this so they can stay in sync with the current user.
+ * This is added at the end of the pipeline since we may still need to handle callbacks from
+ * background users (e.g. timeouts).
  */
-@Singleton
 class MediaDataFilter @Inject constructor(
-    private val dataSource: MediaDataCombineLatest,
     private val broadcastDispatcher: BroadcastDispatcher,
     private val mediaResumeListener: MediaResumeListener,
-    private val mediaDataManager: MediaDataManager,
     private val lockscreenUserManager: NotificationLockscreenUserManager,
     @Main private val executor: Executor
 ) : MediaDataManager.Listener {
     private val userTracker: CurrentUserTracker
-    private val listeners: MutableSet<MediaDataManager.Listener> = mutableSetOf()
+    private val _listeners: MutableSet<MediaDataManager.Listener> = mutableSetOf()
+    internal val listeners: Set<MediaDataManager.Listener>
+        get() = _listeners.toSet()
+    internal lateinit var mediaDataManager: MediaDataManager
 
-    // The filtered mediaEntries, which will be a subset of all mediaEntries in MediaDataManager
-    private val mediaEntries: LinkedHashMap<String, MediaData> = LinkedHashMap()
+    private val allEntries: LinkedHashMap<String, MediaData> = LinkedHashMap()
+    // The filtered userEntries, which will be a subset of all userEntries in MediaDataManager
+    private val userEntries: LinkedHashMap<String, MediaData> = LinkedHashMap()
 
     init {
         userTracker = object : CurrentUserTracker(broadcastDispatcher) {
@@ -59,31 +59,34 @@
             }
         }
         userTracker.startTracking()
-        dataSource.addListener(this)
     }
 
     override fun onMediaDataLoaded(key: String, oldKey: String?, data: MediaData) {
+        if (oldKey != null && oldKey != key) {
+            allEntries.remove(oldKey)
+        }
+        allEntries.put(key, data)
+
         if (!lockscreenUserManager.isCurrentProfile(data.userId)) {
             return
         }
 
-        if (oldKey != null) {
-            mediaEntries.remove(oldKey)
+        if (oldKey != null && oldKey != key) {
+            userEntries.remove(oldKey)
         }
-        mediaEntries.put(key, data)
+        userEntries.put(key, data)
 
         // Notify listeners
-        val listenersCopy = listeners.toSet()
-        listenersCopy.forEach {
+        listeners.forEach {
             it.onMediaDataLoaded(key, oldKey, data)
         }
     }
 
     override fun onMediaDataRemoved(key: String) {
-        mediaEntries.remove(key)?.let {
+        allEntries.remove(key)
+        userEntries.remove(key)?.let {
             // Only notify listeners if something actually changed
-            val listenersCopy = listeners.toSet()
-            listenersCopy.forEach {
+            listeners.forEach {
                 it.onMediaDataRemoved(key)
             }
         }
@@ -92,22 +95,22 @@
     @VisibleForTesting
     internal fun handleUserSwitched(id: Int) {
         // If the user changes, remove all current MediaData objects and inform listeners
-        val listenersCopy = listeners.toSet()
-        val keyCopy = mediaEntries.keys.toMutableList()
+        val listenersCopy = listeners
+        val keyCopy = userEntries.keys.toMutableList()
         // Clear the list first, to make sure callbacks from listeners if we have any entries
         // are up to date
-        mediaEntries.clear()
+        userEntries.clear()
         keyCopy.forEach {
-            Log.d(TAG, "Removing $it after user change")
+            if (DEBUG) Log.d(TAG, "Removing $it after user change")
             listenersCopy.forEach { listener ->
                 listener.onMediaDataRemoved(it)
             }
         }
 
-        dataSource.getData().forEach { (key, data) ->
+        allEntries.forEach { (key, data) ->
             if (lockscreenUserManager.isCurrentProfile(data.userId)) {
-                Log.d(TAG, "Re-adding $key after user change")
-                mediaEntries.put(key, data)
+                if (DEBUG) Log.d(TAG, "Re-adding $key after user change")
+                userEntries.put(key, data)
                 listenersCopy.forEach { listener ->
                     listener.onMediaDataLoaded(key, null, data)
                 }
@@ -119,7 +122,8 @@
      * Invoked when the user has dismissed the media carousel
      */
     fun onSwipeToDismiss() {
-        val mediaKeys = mediaEntries.keys.toSet()
+        if (DEBUG) Log.d(TAG, "Media carousel swiped away")
+        val mediaKeys = userEntries.keys.toSet()
         mediaKeys.forEach {
             mediaDataManager.setTimedOut(it, timedOut = true)
         }
@@ -128,26 +132,20 @@
     /**
      * Are there any media notifications active?
      */
-    fun hasActiveMedia() = mediaEntries.any { it.value.active }
+    fun hasActiveMedia() = userEntries.any { it.value.active }
 
     /**
      * Are there any media entries we should display?
-     * If resumption is enabled, this will include inactive players
-     * If resumption is disabled, we only want to show active players
      */
-    fun hasAnyMedia() = if (mediaResumeListener.isResumptionEnabled()) {
-        mediaEntries.isNotEmpty()
-    } else {
-        hasActiveMedia()
-    }
+    fun hasAnyMedia() = userEntries.isNotEmpty()
 
     /**
      * Add a listener for filtered [MediaData] changes
      */
-    fun addListener(listener: MediaDataManager.Listener) = listeners.add(listener)
+    fun addListener(listener: MediaDataManager.Listener) = _listeners.add(listener)
 
     /**
      * Remove a listener that was registered with addListener
      */
-    fun removeListener(listener: MediaDataManager.Listener) = listeners.remove(listener)
-}
\ No newline at end of file
+    fun removeListener(listener: MediaDataManager.Listener) = _listeners.remove(listener)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt b/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt
index 08b700b..436d451 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt
@@ -31,6 +31,7 @@
 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.net.Uri
 import android.os.UserHandle
@@ -44,10 +45,12 @@
 import com.android.systemui.dagger.qualifiers.Background
 import com.android.systemui.dagger.qualifiers.Main
 import com.android.systemui.dump.DumpManager
+import com.android.systemui.statusbar.NotificationMediaManager.isPlayingState
 import com.android.systemui.statusbar.notification.MediaNotificationProcessor
 import com.android.systemui.statusbar.notification.row.HybridGroupManager
 import com.android.systemui.util.Assert
 import com.android.systemui.util.Utils
+import com.android.systemui.util.concurrency.DelayableExecutor
 import java.io.FileDescriptor
 import java.io.IOException
 import java.io.PrintWriter
@@ -63,6 +66,7 @@
 )
 
 private const val TAG = "MediaDataManager"
+private const val DEBUG = true
 private const val DEFAULT_LUMINOSITY = 0.25f
 private const val LUMINOSITY_THRESHOLD = 0.05f
 private const val SATURATION_MULTIPLIER = 0.8f
@@ -89,31 +93,47 @@
 class MediaDataManager(
     private val context: Context,
     @Background private val backgroundExecutor: Executor,
-    @Main private val foregroundExecutor: Executor,
+    @Main private val foregroundExecutor: DelayableExecutor,
     private val mediaControllerFactory: MediaControllerFactory,
     private val broadcastDispatcher: BroadcastDispatcher,
     dumpManager: DumpManager,
     mediaTimeoutListener: MediaTimeoutListener,
     mediaResumeListener: MediaResumeListener,
+    mediaSessionBasedFilter: MediaSessionBasedFilter,
+    mediaDeviceManager: MediaDeviceManager,
+    mediaDataCombineLatest: MediaDataCombineLatest,
+    private val mediaDataFilter: MediaDataFilter,
     private var useMediaResumption: Boolean,
     private val useQsMediaPlayer: Boolean
 ) : Dumpable {
 
-    private val listeners: MutableSet<Listener> = mutableSetOf()
+    // Internal listeners are part of the internal pipeline. External listeners (those registered
+    // with [MediaDeviceManager.addListener]) receive events after they have propagated through
+    // the internal pipeline.
+    // Another way to think of the distinction between internal and external listeners is the
+    // following. Internal listeners are listeners that MediaDataManager depends on, and external
+    // listeners are listeners that depend on MediaDataManager.
+    // TODO(b/159539991#comment5): Move internal listeners to separate package.
+    private val internalListeners: MutableSet<Listener> = mutableSetOf()
     private val mediaEntries: LinkedHashMap<String, MediaData> = LinkedHashMap()
 
     @Inject
     constructor(
         context: Context,
         @Background backgroundExecutor: Executor,
-        @Main foregroundExecutor: Executor,
+        @Main foregroundExecutor: DelayableExecutor,
         mediaControllerFactory: MediaControllerFactory,
         dumpManager: DumpManager,
         broadcastDispatcher: BroadcastDispatcher,
         mediaTimeoutListener: MediaTimeoutListener,
-        mediaResumeListener: MediaResumeListener
+        mediaResumeListener: MediaResumeListener,
+        mediaSessionBasedFilter: MediaSessionBasedFilter,
+        mediaDeviceManager: MediaDeviceManager,
+        mediaDataCombineLatest: MediaDataCombineLatest,
+        mediaDataFilter: MediaDataFilter
     ) : this(context, backgroundExecutor, foregroundExecutor, mediaControllerFactory,
             broadcastDispatcher, dumpManager, mediaTimeoutListener, mediaResumeListener,
+            mediaSessionBasedFilter, mediaDeviceManager, mediaDataCombineLatest, mediaDataFilter,
             Utils.useMediaResumption(context), Utils.useQsMediaPlayer(context))
 
     private val appChangeReceiver = object : BroadcastReceiver() {
@@ -136,12 +156,26 @@
 
     init {
         dumpManager.registerDumpable(TAG, this)
+
+        // Initialize the internal processing pipeline. The listeners at the front of the pipeline
+        // are set as internal listeners so that they receive events. From there, events are
+        // propagated through the pipeline. The end of the pipeline is currently mediaDataFilter,
+        // so it is responsible for dispatching events to external listeners. To achieve this,
+        // external listeners that are registered with [MediaDataManager.addListener] are actually
+        // registered as listeners to mediaDataFilter.
+        addInternalListener(mediaTimeoutListener)
+        addInternalListener(mediaResumeListener)
+        addInternalListener(mediaSessionBasedFilter)
+        mediaSessionBasedFilter.addListener(mediaDeviceManager)
+        mediaSessionBasedFilter.addListener(mediaDataCombineLatest)
+        mediaDeviceManager.addListener(mediaDataCombineLatest)
+        mediaDataCombineLatest.addListener(mediaDataFilter)
+
+        // Set up links back into the pipeline for listeners that need to send events upstream.
         mediaTimeoutListener.timeoutCallback = { token: String, timedOut: Boolean ->
             setTimedOut(token, timedOut) }
-        addListener(mediaTimeoutListener)
-
         mediaResumeListener.setManager(this)
-        addListener(mediaResumeListener)
+        mediaDataFilter.mediaDataManager = this
 
         val suspendFilter = IntentFilter(Intent.ACTION_PACKAGES_SUSPENDED)
         broadcastDispatcher.registerReceiver(appChangeReceiver, suspendFilter, null, UserHandle.ALL)
@@ -179,13 +213,9 @@
 
     private fun removeAllForPackage(packageName: String) {
         Assert.isMainThread()
-        val listenersCopy = listeners.toSet()
         val toRemove = mediaEntries.filter { it.value.packageName == packageName }
         toRemove.forEach {
-            mediaEntries.remove(it.key)
-            listenersCopy.forEach { listener ->
-                listener.onMediaDataRemoved(it.key)
-            }
+            removeEntry(it.key)
         }
     }
 
@@ -245,15 +275,48 @@
     /**
      * Add a listener for changes in this class
      */
-    fun addListener(listener: Listener) = listeners.add(listener)
+    fun addListener(listener: Listener) {
+        // mediaDataFilter is the current end of the internal pipeline. Register external
+        // listeners as listeners to it.
+        mediaDataFilter.addListener(listener)
+    }
 
     /**
      * Remove a listener for changes in this class
      */
-    fun removeListener(listener: Listener) = listeners.remove(listener)
+    fun removeListener(listener: Listener) {
+        // Since mediaDataFilter is the current end of the internal pipelie, external listeners
+        // have been registered to it. So, they need to be removed from it too.
+        mediaDataFilter.removeListener(listener)
+    }
 
     /**
-     * Called whenever the player has been paused or stopped for a while.
+     * Add a listener for internal events.
+     */
+    private fun addInternalListener(listener: Listener) = internalListeners.add(listener)
+
+    /**
+     * Notify internal listeners of loaded event.
+     *
+     * External listeners registered with [addListener] will be notified after the event propagates
+     * through the internal listener pipeline.
+     */
+    private fun notifyMediaDataLoaded(key: String, oldKey: String?, info: MediaData) {
+        internalListeners.forEach { it.onMediaDataLoaded(key, oldKey, info) }
+    }
+
+    /**
+     * Notify internal listeners of removed event.
+     *
+     * External listeners registered with [addListener] will be notified after the event propagates
+     * through the internal listener pipeline.
+     */
+    private fun notifyMediaDataRemoved(key: String) {
+        internalListeners.forEach { it.onMediaDataRemoved(key) }
+    }
+
+    /**
+     * Called whenever the player has been paused or stopped for a while, or swiped from QQS.
      * This will make the player not active anymore, hiding it from QQS and Keyguard.
      * @see MediaData.active
      */
@@ -263,10 +326,30 @@
                 return
             }
             it.active = !timedOut
+            if (DEBUG) Log.d(TAG, "Updating $token timedOut: $timedOut")
             onMediaDataLoaded(token, token, it)
         }
     }
 
+    private fun removeEntry(key: String) {
+        mediaEntries.remove(key)
+        notifyMediaDataRemoved(key)
+    }
+
+    fun dismissMediaData(key: String, delay: Long) {
+        backgroundExecutor.execute {
+            mediaEntries[key]?.let { mediaData ->
+                if (mediaData.isLocalSession) {
+                    mediaData.token?.let {
+                        val mediaController = mediaControllerFactory.create(it)
+                        mediaController.transportControls.stop()
+                    }
+                }
+            }
+        }
+        foregroundExecutor.executeDelayed({ removeEntry(key) }, delay)
+    }
+
     private fun loadMediaDataInBgForResumption(
         userId: Int,
         desc: MediaDescription,
@@ -283,7 +366,9 @@
             return
         }
 
-        Log.d(TAG, "adding track for $userId from browser: $desc")
+        if (DEBUG) {
+            Log.d(TAG, "adding track for $userId from browser: $desc")
+        }
 
         // Album art
         var artworkBitmap = desc.iconBitmap
@@ -314,20 +399,16 @@
     ) {
         val token = sbn.notification.extras.getParcelable(Notification.EXTRA_MEDIA_SESSION)
                 as MediaSession.Token?
-        val metadata = mediaControllerFactory.create(token).metadata
-
-        if (metadata == null) {
-            // TODO: handle this better, removing media notification
-            return
-        }
+        val mediaController = mediaControllerFactory.create(token)
+        val metadata = mediaController.metadata
 
         // Foreground and Background colors computed from album art
         val notif: Notification = sbn.notification
-        var artworkBitmap = metadata.getBitmap(MediaMetadata.METADATA_KEY_ART)
+        var artworkBitmap = metadata?.getBitmap(MediaMetadata.METADATA_KEY_ART)
         if (artworkBitmap == null) {
-            artworkBitmap = metadata.getBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART)
+            artworkBitmap = metadata?.getBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART)
         }
-        if (artworkBitmap == null) {
+        if (artworkBitmap == null && metadata != null) {
             artworkBitmap = loadBitmapFromUri(metadata)
         }
         val artWorkIcon = if (artworkBitmap == null) {
@@ -364,16 +445,16 @@
                 sbn.user.identifier)
 
         // Song name
-        var song: CharSequence? = metadata.getString(MediaMetadata.METADATA_KEY_DISPLAY_TITLE)
+        var song: CharSequence? = metadata?.getString(MediaMetadata.METADATA_KEY_DISPLAY_TITLE)
         if (song == null) {
-            song = metadata.getString(MediaMetadata.METADATA_KEY_TITLE)
+            song = metadata?.getString(MediaMetadata.METADATA_KEY_TITLE)
         }
         if (song == null) {
             song = HybridGroupManager.resolveTitle(notif)
         }
 
         // Artist name
-        var artist: CharSequence? = metadata.getString(MediaMetadata.METADATA_KEY_ARTIST)
+        var artist: CharSequence? = metadata?.getString(MediaMetadata.METADATA_KEY_ARTIST)
         if (artist == null) {
             artist = HybridGroupManager.resolveText(notif)
         }
@@ -389,7 +470,7 @@
         if (actions != null) {
             for ((index, action) in actions.withIndex()) {
                 if (action.getIcon() == null) {
-                    Log.i(TAG, "No icon for action $index ${action.title}")
+                    if (DEBUG) Log.i(TAG, "No icon for action $index ${action.title}")
                     actionsToShowCollapsed.remove(index)
                     continue
                 }
@@ -412,6 +493,10 @@
             }
         }
 
+        val isLocalSession = mediaController.playbackInfo?.playbackType ==
+            MediaController.PlaybackInfo.PLAYBACK_TYPE_LOCAL ?: true
+        val isPlaying = mediaController.playbackState?.let { isPlayingState(it.state) } ?: null
+
         foregroundExecutor.execute {
             val resumeAction: Runnable? = mediaEntries[key]?.resumeAction
             val hasCheckedForResume = mediaEntries[key]?.hasCheckedForResume == true
@@ -419,8 +504,9 @@
             onMediaDataLoaded(key, oldKey, MediaData(sbn.normalizedUserId, true, bgColor, app,
                     smallIconDrawable, artist, song, artWorkIcon, actionIcons,
                     actionsToShowCollapsed, sbn.packageName, token, notif.contentIntent, null,
-                    active, resumeAction = resumeAction, notificationKey = key,
-                    hasCheckedForResume = hasCheckedForResume))
+                    active, resumeAction = resumeAction, isLocalSession = isLocalSession,
+                    notificationKey = key, hasCheckedForResume = hasCheckedForResume,
+                    isPlaying = isPlaying, isClearable = sbn.isClearable()))
         }
     }
 
@@ -433,7 +519,7 @@
             if (!TextUtils.isEmpty(uriString)) {
                 val albumArt = loadBitmapFromUri(Uri.parse(uriString))
                 if (albumArt != null) {
-                    Log.d(TAG, "loaded art from $uri")
+                    if (DEBUG) Log.d(TAG, "loaded art from $uri")
                     return albumArt
                 }
             }
@@ -464,7 +550,10 @@
                 decoder, info, source -> decoder.isMutableRequired = true
             }
         } catch (e: IOException) {
-            e.printStackTrace()
+            Log.e(TAG, "Unable to load bitmap", e)
+            null
+        } catch (e: RuntimeException) {
+            Log.e(TAG, "Unable to load bitmap", e)
             null
         }
     }
@@ -509,10 +598,7 @@
         if (mediaEntries.containsKey(key)) {
             // Otherwise this was removed already
             mediaEntries.put(key, data)
-            val listenersCopy = listeners.toSet()
-            listenersCopy.forEach {
-                it.onMediaDataLoaded(key, oldKey, data)
-            }
+            notifyMediaDataLoaded(key, oldKey, data)
         }
     }
 
@@ -520,7 +606,7 @@
         Assert.isMainThread()
         val removed = mediaEntries.remove(key)
         if (useMediaResumption && removed?.resumeAction != null) {
-            Log.d(TAG, "Not removing $key because resumable")
+            if (DEBUG) Log.d(TAG, "Not removing $key because resumable")
             // Move to resume key (aka package name) if that key doesn't already exist.
             val resumeAction = getResumeMediaAction(removed.resumeAction!!)
             val updated = removed.copy(token = null, actions = listOf(resumeAction),
@@ -528,31 +614,21 @@
             val pkg = removed?.packageName
             val migrate = mediaEntries.put(pkg, updated) == null
             // Notify listeners of "new" controls when migrating or removed and update when not
-            val listenersCopy = listeners.toSet()
             if (migrate) {
-                listenersCopy.forEach {
-                    it.onMediaDataLoaded(pkg, key, updated)
-                }
+                notifyMediaDataLoaded(pkg, key, updated)
             } else {
                 // Since packageName is used for the key of the resumption controls, it is
                 // possible that another notification has already been reused for the resumption
                 // controls of this package. In this case, rather than renaming this player as
                 // packageName, just remove it and then send a update to the existing resumption
                 // controls.
-                listenersCopy.forEach {
-                    it.onMediaDataRemoved(key)
-                }
-                listenersCopy.forEach {
-                    it.onMediaDataLoaded(pkg, pkg, updated)
-                }
+                notifyMediaDataRemoved(key)
+                notifyMediaDataLoaded(pkg, pkg, updated)
             }
             return
         }
         if (removed != null) {
-            val listenersCopy = listeners.toSet()
-            listenersCopy.forEach {
-                it.onMediaDataRemoved(key)
-            }
+            notifyMediaDataRemoved(key)
         }
     }
 
@@ -565,17 +641,31 @@
 
         if (!useMediaResumption) {
             // Remove any existing resume controls
-            val listenersCopy = listeners.toSet()
             val filtered = mediaEntries.filter { !it.value.active }
             filtered.forEach {
                 mediaEntries.remove(it.key)
-                listenersCopy.forEach { listener ->
-                    listener.onMediaDataRemoved(it.key)
-                }
+                notifyMediaDataRemoved(it.key)
             }
         }
     }
 
+    /**
+     * Invoked when the user has dismissed the media carousel
+     */
+    fun onSwipeToDismiss() = mediaDataFilter.onSwipeToDismiss()
+
+    /**
+     * Are there any media notifications active?
+     */
+    fun hasActiveMedia() = mediaDataFilter.hasActiveMedia()
+
+    /**
+     * Are there any media entries we should display?
+     * If resumption is enabled, this will include inactive players
+     * If resumption is disabled, we only want to show active players
+     */
+    fun hasAnyMedia() = mediaDataFilter.hasAnyMedia()
+
     interface Listener {
 
         /**
@@ -595,7 +685,8 @@
 
     override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
         pw.apply {
-            println("listeners: $listeners")
+            println("internalListeners: $internalListeners")
+            println("externalListeners: ${mediaDataFilter.listeners}")
             println("mediaEntries: $mediaEntries")
             println("useMediaResumption: $useMediaResumption")
         }
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt b/packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt
index 7ae2dc5..a993d00 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt
@@ -16,37 +16,40 @@
 
 package com.android.systemui.media
 
-import android.content.Context
 import android.media.MediaRouter2Manager
 import android.media.session.MediaController
+import androidx.annotation.AnyThread
+import androidx.annotation.MainThread
+import androidx.annotation.WorkerThread
 import com.android.settingslib.media.LocalMediaManager
 import com.android.settingslib.media.MediaDevice
-import com.android.systemui.dagger.qualifiers.Main
 import com.android.systemui.Dumpable
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.dagger.qualifiers.Main
 import com.android.systemui.dump.DumpManager
 import java.io.FileDescriptor
 import java.io.PrintWriter
 import java.util.concurrent.Executor
 import javax.inject.Inject
-import javax.inject.Singleton
+
+private const val PLAYBACK_TYPE_UNKNOWN = 0
 
 /**
  * Provides information about the route (ie. device) where playback is occurring.
  */
-@Singleton
 class MediaDeviceManager @Inject constructor(
-    private val context: Context,
+    private val controllerFactory: MediaControllerFactory,
     private val localMediaManagerFactory: LocalMediaManagerFactory,
     private val mr2manager: MediaRouter2Manager,
     @Main private val fgExecutor: Executor,
-    private val mediaDataManager: MediaDataManager,
-    private val dumpManager: DumpManager
+    @Background private val bgExecutor: Executor,
+    dumpManager: DumpManager
 ) : MediaDataManager.Listener, Dumpable {
+
     private val listeners: MutableSet<Listener> = mutableSetOf()
-    private val entries: MutableMap<String, Token> = mutableMapOf()
+    private val entries: MutableMap<String, Entry> = mutableMapOf()
 
     init {
-        mediaDataManager.addListener(this)
         dumpManager.registerDumpable(javaClass.name, this)
     }
 
@@ -69,9 +72,10 @@
         if (entry == null || entry?.token != data.token) {
             entry?.stop()
             val controller = data.token?.let {
-                MediaController(context, it)
+                controllerFactory.create(it)
             }
-            entry = Token(key, controller, localMediaManagerFactory.create(data.packageName))
+            entry = Entry(key, oldKey, controller,
+                    localMediaManagerFactory.create(data.packageName))
             entries[key] = entry
             entry.start()
         }
@@ -98,66 +102,98 @@
         }
     }
 
-    private fun processDevice(key: String, device: MediaDevice?) {
+    @MainThread
+    private fun processDevice(key: String, oldKey: String?, device: MediaDevice?) {
         val enabled = device != null
         val data = MediaDeviceData(enabled, device?.iconWithoutBackground, device?.name)
         listeners.forEach {
-            it.onMediaDeviceChanged(key, data)
+            it.onMediaDeviceChanged(key, oldKey, data)
         }
     }
 
     interface Listener {
         /** Called when the route has changed for a given notification. */
-        fun onMediaDeviceChanged(key: String, data: MediaDeviceData?)
+        fun onMediaDeviceChanged(key: String, oldKey: String?, data: MediaDeviceData?)
         /** Called when the notification was removed. */
         fun onKeyRemoved(key: String)
     }
 
-    private inner class Token(
+    private inner class Entry(
         val key: String,
+        val oldKey: String?,
         val controller: MediaController?,
         val localMediaManager: LocalMediaManager
-    ) : LocalMediaManager.DeviceCallback {
+    ) : LocalMediaManager.DeviceCallback, MediaController.Callback() {
+
         val token
             get() = controller?.sessionToken
         private var started = false
+        private var playbackType = PLAYBACK_TYPE_UNKNOWN
         private var current: MediaDevice? = null
             set(value) {
                 if (!started || value != field) {
                     field = value
-                    processDevice(key, value)
+                    fgExecutor.execute {
+                        processDevice(key, oldKey, value)
+                    }
                 }
             }
-        fun start() {
+
+        @AnyThread
+        fun start() = bgExecutor.execute {
             localMediaManager.registerCallback(this)
             localMediaManager.startScan()
+            playbackType = controller?.playbackInfo?.playbackType ?: PLAYBACK_TYPE_UNKNOWN
+            controller?.registerCallback(this)
             updateCurrent()
             started = true
         }
-        fun stop() {
+
+        @AnyThread
+        fun stop() = bgExecutor.execute {
             started = false
+            controller?.unregisterCallback(this)
             localMediaManager.stopScan()
             localMediaManager.unregisterCallback(this)
         }
+
         fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<String>) {
-            val route = controller?.let {
+            val routingSession = controller?.let {
                 mr2manager.getRoutingSessionForMediaController(it)
             }
+            val selectedRoutes = routingSession?.let {
+                mr2manager.getSelectedRoutes(it)
+            }
             with(pw) {
                 println("    current device is ${current?.name}")
                 val type = controller?.playbackInfo?.playbackType
-                println("    PlaybackType=$type (1 for local, 2 for remote)")
-                println("    route=$route")
+                println("    PlaybackType=$type (1 for local, 2 for remote) cached=$playbackType")
+                println("    routingSession=$routingSession")
+                println("    selectedRoutes=$selectedRoutes")
             }
         }
-        override fun onDeviceListUpdate(devices: List<MediaDevice>?) = fgExecutor.execute {
+
+        @WorkerThread
+        override fun onAudioInfoChanged(info: MediaController.PlaybackInfo?) {
+            val newPlaybackType = info?.playbackType ?: PLAYBACK_TYPE_UNKNOWN
+            if (newPlaybackType == playbackType) {
+                return
+            }
+            playbackType = newPlaybackType
             updateCurrent()
         }
+
+        override fun onDeviceListUpdate(devices: List<MediaDevice>?) = bgExecutor.execute {
+            updateCurrent()
+        }
+
         override fun onSelectedDeviceStateChanged(device: MediaDevice, state: Int) {
-            fgExecutor.execute {
+            bgExecutor.execute {
                 updateCurrent()
             }
         }
+
+        @WorkerThread
         private fun updateCurrent() {
             val device = localMediaManager.getCurrentConnectedDevice()
             controller?.let {
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt b/packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt
index fc33391..b31390c 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt
@@ -293,6 +293,13 @@
         return viewHost
     }
 
+    /**
+     * Close the guts in all players in [MediaCarouselController].
+     */
+    fun closeGuts() {
+        mediaCarouselController.closeGuts()
+    }
+
     private fun createUniqueObjectHost(): UniqueObjectHostView {
         val viewHost = UniqueObjectHostView(context)
         viewHost.addOnAttachStateChangeListener(object : View.OnAttachStateChangeListener {
@@ -382,6 +389,14 @@
         if (isCurrentlyInGuidedTransformation()) {
             return false
         }
+        // This is an invalid transition, and can happen when using the camera gesture from the
+        // lock screen. Disallow.
+        if (previousLocation == LOCATION_LOCKSCREEN &&
+            desiredLocation == LOCATION_QQS &&
+            statusbarState == StatusBarState.SHADE) {
+            return false
+        }
+
         if (currentLocation == LOCATION_QQS &&
                 previousLocation == LOCATION_LOCKSCREEN &&
                 (statusBarStateController.leaveOpenOnKeyguardHide() ||
@@ -597,8 +612,8 @@
             // When collapsing on the lockscreen, we want to remain in QS
             return LOCATION_QS
         }
-        if (location != LOCATION_LOCKSCREEN && desiredLocation == LOCATION_LOCKSCREEN
-                && !fullyAwake) {
+        if (location != LOCATION_LOCKSCREEN && desiredLocation == LOCATION_LOCKSCREEN &&
+                !fullyAwake) {
             // When unlocking from dozing / while waking up, the media shouldn't be transitioning
             // in an animated way. Let's keep it in the lockscreen until we're fully awake and
             // reattach it without an animation
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaHost.kt b/packages/SystemUI/src/com/android/systemui/media/MediaHost.kt
index 3598719..ce184aa 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaHost.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaHost.kt
@@ -14,7 +14,7 @@
 class MediaHost @Inject constructor(
     private val state: MediaHostStateHolder,
     private val mediaHierarchyManager: MediaHierarchyManager,
-    private val mediaDataFilter: MediaDataFilter,
+    private val mediaDataManager: MediaDataManager,
     private val mediaHostStatesManager: MediaHostStatesManager
 ) : MediaHostState by state {
     lateinit var hostView: UniqueObjectHostView
@@ -79,12 +79,12 @@
                 // be a delay until the views and the controllers are initialized, leaving us
                 // with either a blank view or the controllers not yet initialized and the
                 // measuring wrong
-                mediaDataFilter.addListener(listener)
+                mediaDataManager.addListener(listener)
                 updateViewVisibility()
             }
 
             override fun onViewDetachedFromWindow(v: View?) {
-                mediaDataFilter.removeListener(listener)
+                mediaDataManager.removeListener(listener)
             }
         })
 
@@ -113,9 +113,9 @@
 
     private fun updateViewVisibility() {
         visible = if (showsOnlyActiveMedia) {
-            mediaDataFilter.hasActiveMedia()
+            mediaDataManager.hasActiveMedia()
         } else {
-            mediaDataFilter.hasAnyMedia()
+            mediaDataManager.hasAnyMedia()
         }
         val newVisibility = if (visible) View.VISIBLE else View.GONE
         if (newVisibility != hostView.visibility) {
@@ -289,4 +289,4 @@
      * Get a copy of this view state, deepcopying all appropriate members
      */
     fun copy(): MediaHostState
-}
\ No newline at end of file
+}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt b/packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt
index 4ec746f..936db87 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt
@@ -28,6 +28,7 @@
 import android.provider.Settings
 import android.service.media.MediaBrowserService
 import android.util.Log
+import com.android.internal.annotations.VisibleForTesting
 import com.android.systemui.broadcast.BroadcastDispatcher
 import com.android.systemui.dagger.qualifiers.Background
 import com.android.systemui.tuner.TunerService
@@ -47,7 +48,8 @@
     private val context: Context,
     private val broadcastDispatcher: BroadcastDispatcher,
     @Background private val backgroundExecutor: Executor,
-    private val tunerService: TunerService
+    private val tunerService: TunerService,
+    private val mediaBrowserFactory: ResumeMediaBrowserFactory
 ) : MediaDataManager.Listener {
 
     private var useMediaResumption: Boolean = Utils.useMediaResumption(context)
@@ -58,7 +60,8 @@
     private var mediaBrowser: ResumeMediaBrowser? = null
     private var currentUserId: Int = context.userId
 
-    private val userChangeReceiver = object : BroadcastReceiver() {
+    @VisibleForTesting
+    val userChangeReceiver = object : BroadcastReceiver() {
         override fun onReceive(context: Context, intent: Intent) {
             if (Intent.ACTION_USER_UNLOCKED == intent.action) {
                 loadMediaResumptionControls()
@@ -116,8 +119,6 @@
         }, Settings.Secure.MEDIA_CONTROLS_RESUME)
     }
 
-    fun isResumptionEnabled() = useMediaResumption
-
     private fun loadSavedComponents() {
         // Make sure list is empty (if we switched users)
         resumeComponents.clear()
@@ -144,7 +145,7 @@
         }
 
         resumeComponents.forEach {
-            val browser = ResumeMediaBrowser(context, mediaBrowserCallback, it)
+            val browser = mediaBrowserFactory.create(mediaBrowserCallback, it)
             browser.findRecentMedia()
         }
     }
@@ -183,14 +184,10 @@
     private fun tryUpdateResumptionList(key: String, componentName: ComponentName) {
         Log.d(TAG, "Testing if we can connect to $componentName")
         mediaBrowser?.disconnect()
-        mediaBrowser = ResumeMediaBrowser(context,
+        mediaBrowser = mediaBrowserFactory.create(
                 object : ResumeMediaBrowser.Callback() {
                     override fun onConnected() {
-                        Log.d(TAG, "yes we can resume with $componentName")
-                        mediaDataManager.setResumeAction(key, getResumeAction(componentName))
-                        updateResumptionList(componentName)
-                        mediaBrowser?.disconnect()
-                        mediaBrowser = null
+                        Log.d(TAG, "Connected to $componentName")
                     }
 
                     override fun onError() {
@@ -199,6 +196,19 @@
                         mediaBrowser?.disconnect()
                         mediaBrowser = null
                     }
+
+                    override fun addTrack(
+                        desc: MediaDescription,
+                        component: ComponentName,
+                        browser: ResumeMediaBrowser
+                    ) {
+                        // Since this is a test, just save the component for later
+                        Log.d(TAG, "Can get resumable media from $componentName")
+                        mediaDataManager.setResumeAction(key, getResumeAction(componentName))
+                        updateResumptionList(componentName)
+                        mediaBrowser?.disconnect()
+                        mediaBrowser = null
+                    }
                 },
                 componentName)
         mediaBrowser?.testConnection()
@@ -235,7 +245,7 @@
     private fun getResumeAction(componentName: ComponentName): Runnable {
         return Runnable {
             mediaBrowser?.disconnect()
-            mediaBrowser = ResumeMediaBrowser(context,
+            mediaBrowser = mediaBrowserFactory.create(
                 object : ResumeMediaBrowser.Callback() {
                     override fun onConnected() {
                         if (mediaBrowser?.token == null) {
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaSessionBasedFilter.kt b/packages/SystemUI/src/com/android/systemui/media/MediaSessionBasedFilter.kt
new file mode 100644
index 0000000..f695622
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaSessionBasedFilter.kt
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media
+
+import android.content.ComponentName
+import android.content.Context
+import android.media.session.MediaController
+import android.media.session.MediaController.PlaybackInfo
+import android.media.session.MediaSession
+import android.media.session.MediaSessionManager
+import android.util.Log
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.statusbar.phone.NotificationListenerWithPlugins
+import java.util.concurrent.Executor
+import javax.inject.Inject
+
+private const val TAG = "MediaSessionBasedFilter"
+
+/**
+ * Filters media loaded events for local media sessions while an app is casting.
+ *
+ * When an app is casting there can be one remote media sessions and potentially more local media
+ * sessions. In this situation, there should only be a media object for the remote session. To
+ * achieve this, update events for the local session need to be filtered.
+ */
+class MediaSessionBasedFilter @Inject constructor(
+    context: Context,
+    private val sessionManager: MediaSessionManager,
+    @Main private val foregroundExecutor: Executor,
+    @Background private val backgroundExecutor: Executor
+) : MediaDataManager.Listener {
+
+    private val listeners: MutableSet<MediaDataManager.Listener> = mutableSetOf()
+
+    // Keep track of MediaControllers for a given package to check if an app is casting and it
+    // filter loaded events for local sessions.
+    private val packageControllers: LinkedHashMap<String, MutableList<MediaController>> =
+            LinkedHashMap()
+
+    // Keep track of the key used for the session tokens. This information is used to know when to
+    // dispatch a removed event so that a media object for a local session will be removed.
+    private val keyedTokens: MutableMap<String, MutableSet<MediaSession.Token>> = mutableMapOf()
+
+    // Keep track of which media session tokens have associated notifications.
+    private val tokensWithNotifications: MutableSet<MediaSession.Token> = mutableSetOf()
+
+    private val sessionListener = object : MediaSessionManager.OnActiveSessionsChangedListener {
+        override fun onActiveSessionsChanged(controllers: List<MediaController>) {
+            handleControllersChanged(controllers)
+        }
+    }
+
+    init {
+        backgroundExecutor.execute {
+            val name = ComponentName(context, NotificationListenerWithPlugins::class.java)
+            sessionManager.addOnActiveSessionsChangedListener(sessionListener, name)
+            handleControllersChanged(sessionManager.getActiveSessions(name))
+        }
+    }
+
+    /**
+     * Add a listener for filtered [MediaData] changes
+     */
+    fun addListener(listener: MediaDataManager.Listener) = listeners.add(listener)
+
+    /**
+     * Remove a listener that was registered with addListener
+     */
+    fun removeListener(listener: MediaDataManager.Listener) = listeners.remove(listener)
+
+    /**
+     * May filter loaded events by not passing them along to listeners.
+     *
+     * If an app has only one session with playback type PLAYBACK_TYPE_REMOTE, then assuming that
+     * the app is casting. Sometimes apps will send redundant updates to a local session with
+     * playback type PLAYBACK_TYPE_LOCAL. These updates should be filtered to improve the usability
+     * of the media controls.
+     */
+    override fun onMediaDataLoaded(key: String, oldKey: String?, info: MediaData) {
+        backgroundExecutor.execute {
+            info.token?.let {
+                tokensWithNotifications.add(it)
+            }
+            val isMigration = oldKey != null && key != oldKey
+            if (isMigration) {
+                keyedTokens.remove(oldKey)?.let { removed -> keyedTokens.put(key, removed) }
+            }
+            if (info.token != null) {
+                keyedTokens.get(key)?.let {
+                    tokens ->
+                    tokens.add(info.token)
+                } ?: run {
+                    val tokens = mutableSetOf(info.token)
+                    keyedTokens.put(key, tokens)
+                }
+            }
+            // Determine if an app is casting by checking if it has a session with playback type
+            // PLAYBACK_TYPE_REMOTE.
+            val remoteControllers = packageControllers.get(info.packageName)?.filter {
+                it.playbackInfo?.playbackType == PlaybackInfo.PLAYBACK_TYPE_REMOTE
+            }
+            // Limiting search to only apps with a single remote session.
+            val remote = if (remoteControllers?.size == 1) remoteControllers.firstOrNull() else null
+            if (isMigration || remote == null || remote.sessionToken == info.token ||
+                    !tokensWithNotifications.contains(remote.sessionToken)) {
+                // Not filtering in this case. Passing the event along to listeners.
+                dispatchMediaDataLoaded(key, oldKey, info)
+            } else {
+                // Filtering this event because the app is casting and the loaded events is for a
+                // local session.
+                Log.d(TAG, "filtering key=$key local=${info.token} remote=${remote?.sessionToken}")
+                // If the local session uses a different notification key, then lets go a step
+                // farther and dismiss the media data so that media controls for the local session
+                // don't hang around while casting.
+                if (!keyedTokens.get(key)!!.contains(remote.sessionToken)) {
+                    dispatchMediaDataRemoved(key)
+                }
+            }
+        }
+    }
+
+    override fun onMediaDataRemoved(key: String) {
+        // Queue on background thread to ensure ordering of loaded and removed events is maintained.
+        backgroundExecutor.execute {
+            keyedTokens.remove(key)
+            dispatchMediaDataRemoved(key)
+        }
+    }
+
+    private fun dispatchMediaDataLoaded(key: String, oldKey: String?, info: MediaData) {
+        foregroundExecutor.execute {
+            listeners.toSet().forEach { it.onMediaDataLoaded(key, oldKey, info) }
+        }
+    }
+
+    private fun dispatchMediaDataRemoved(key: String) {
+        foregroundExecutor.execute {
+            listeners.toSet().forEach { it.onMediaDataRemoved(key) }
+        }
+    }
+
+    private fun handleControllersChanged(controllers: List<MediaController>) {
+        packageControllers.clear()
+        controllers.forEach {
+            controller ->
+            packageControllers.get(controller.packageName)?.let {
+                tokens ->
+                tokens.add(controller)
+            } ?: run {
+                val tokens = mutableListOf(controller)
+                packageControllers.put(controller.packageName, tokens)
+            }
+        }
+        tokensWithNotifications.retainAll(controllers.map { it.sessionToken })
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaTimeoutListener.kt b/packages/SystemUI/src/com/android/systemui/media/MediaTimeoutListener.kt
index 8662aac..dcb7767 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaTimeoutListener.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaTimeoutListener.kt
@@ -54,32 +54,35 @@
         if (mediaListeners.containsKey(key)) {
             return
         }
-        // Having an old key means that we're migrating from/to resumption. We should invalidate
-        // the old listener and create a new one.
+        // Having an old key means that we're migrating from/to resumption. We should update
+        // the old listener to make sure that events will be dispatched to the new location.
         val migrating = oldKey != null && key != oldKey
         var wasPlaying = false
         if (migrating) {
-            if (mediaListeners.containsKey(oldKey)) {
-                val oldListener = mediaListeners.remove(oldKey)
-                wasPlaying = oldListener?.playing ?: false
-                oldListener?.destroy()
+            val reusedListener = mediaListeners.remove(oldKey)
+            if (reusedListener != null) {
+                wasPlaying = reusedListener.playing ?: false
                 if (DEBUG) Log.d(TAG, "migrating key $oldKey to $key, for resumption")
+                reusedListener.mediaData = data
+                reusedListener.key = key
+                mediaListeners[key] = reusedListener
+                if (wasPlaying != reusedListener.playing) {
+                    // If a player becomes active because of a migration, we'll need to broadcast
+                    // its state. Doing it now would lead to reentrant callbacks, so let's wait
+                    // until we're done.
+                    mainExecutor.execute {
+                        if (mediaListeners[key]?.playing == true) {
+                            if (DEBUG) Log.d(TAG, "deliver delayed playback state for $key")
+                            timeoutCallback.invoke(key, false /* timedOut */)
+                        }
+                    }
+                }
+                return
             } else {
                 Log.w(TAG, "Old key $oldKey for player $key doesn't exist. Continuing...")
             }
         }
         mediaListeners[key] = PlaybackStateListener(key, data)
-
-        // If a player becomes active because of a migration, we'll need to broadcast its state.
-        // Doing it now would lead to reentrant callbacks, so let's wait until we're done.
-        if (migrating && mediaListeners[key]?.playing != wasPlaying) {
-            mainExecutor.execute {
-                if (mediaListeners[key]?.playing == true) {
-                    if (DEBUG) Log.d(TAG, "deliver delayed playback state for $key")
-                    timeoutCallback.invoke(key, false /* timedOut */)
-                }
-            }
-        }
     }
 
     override fun onMediaDataRemoved(key: String) {
@@ -91,30 +94,39 @@
     }
 
     private inner class PlaybackStateListener(
-        private val key: String,
+        var key: String,
         data: MediaData
     ) : MediaController.Callback() {
 
         var timedOut = false
         var playing: Boolean? = null
 
+        var mediaData: MediaData = data
+            set(value) {
+                mediaController?.unregisterCallback(this)
+                field = value
+                mediaController = if (field.token != null) {
+                    mediaControllerFactory.create(field.token)
+                } else {
+                    null
+                }
+                mediaController?.registerCallback(this)
+                // Let's register the cancellations, but not dispatch events now.
+                // Timeouts didn't happen yet and reentrant events are troublesome.
+                processState(mediaController?.playbackState, dispatchEvents = false)
+            }
+
         // Resume controls may have null token
-        private val mediaController = if (data.token != null) {
-            mediaControllerFactory.create(data.token)
-        } else {
-            null
-        }
+        private var mediaController: MediaController? = null
         private var cancellation: Runnable? = null
 
         init {
-            mediaController?.registerCallback(this)
-            // Let's register the cancellations, but not dispatch events now.
-            // Timeouts didn't happen yet and reentrant events are troublesome.
-            processState(mediaController?.playbackState, dispatchEvents = false)
+            mediaData = data
         }
 
         fun destroy() {
             mediaController?.unregisterCallback(this)
+            cancellation?.run()
         }
 
         override fun onPlaybackStateChanged(state: PlaybackState?) {
@@ -171,4 +183,4 @@
             cancellation = null
         }
     }
-}
\ No newline at end of file
+}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaViewController.kt b/packages/SystemUI/src/com/android/systemui/media/MediaViewController.kt
index 38817d7..92eeed4 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaViewController.kt
@@ -37,6 +37,11 @@
     private val mediaHostStatesManager: MediaHostStatesManager
 ) {
 
+    companion object {
+        @JvmField
+        val GUTS_ANIMATION_DURATION = 500L
+    }
+
     /**
      * A listener when the current dimensions of the player change
      */
@@ -169,6 +174,12 @@
      */
     val expandedLayout = ConstraintSet()
 
+    /**
+     * Whether the guts are visible for the associated player.
+     */
+    var isGutsVisible = false
+        private set
+
     init {
         collapsedLayout.load(context, R.xml.media_collapsed)
         expandedLayout.load(context, R.xml.media_expanded)
@@ -189,6 +200,37 @@
         configurationController.removeCallback(configurationListener)
     }
 
+    /**
+     * Show guts with an animated transition.
+     */
+    fun openGuts() {
+        if (isGutsVisible) return
+        isGutsVisible = true
+        animatePendingStateChange(GUTS_ANIMATION_DURATION, 0L)
+        setCurrentState(currentStartLocation,
+                currentEndLocation,
+                currentTransitionProgress,
+                applyImmediately = false)
+    }
+
+    /**
+     * Close the guts for the associated player.
+     *
+     * @param immediate if `false`, it will animate the transition.
+     */
+    @JvmOverloads
+    fun closeGuts(immediate: Boolean = false) {
+        if (!isGutsVisible) return
+        isGutsVisible = false
+        if (!immediate) {
+            animatePendingStateChange(GUTS_ANIMATION_DURATION, 0L)
+        }
+        setCurrentState(currentStartLocation,
+                currentEndLocation,
+                currentTransitionProgress,
+                applyImmediately = immediate)
+    }
+
     private fun ensureAllMeasurements() {
         val mediaStates = mediaHostStatesManager.mediaHostStates
         for (entry in mediaStates) {
@@ -203,6 +245,24 @@
             if (expansion > 0) expandedLayout else collapsedLayout
 
     /**
+     * Set the views to be showing/hidden based on the [isGutsVisible] for a given
+     * [TransitionViewState].
+     */
+    private fun setGutsViewState(viewState: TransitionViewState) {
+        PlayerViewHolder.controlsIds.forEach { id ->
+            viewState.widgetStates.get(id)?.let { state ->
+                // Make sure to use the unmodified state if guts are not visible
+                state.alpha = if (isGutsVisible) 0f else state.alpha
+                state.gone = if (isGutsVisible) true else state.gone
+            }
+        }
+        PlayerViewHolder.gutsIds.forEach { id ->
+            viewState.widgetStates.get(id)?.alpha = if (isGutsVisible) 1f else 0f
+            viewState.widgetStates.get(id)?.gone = !isGutsVisible
+        }
+    }
+
+    /**
      * Obtain a new viewState for a given media state. This usually returns a cached state, but if
      * it's not available, it will recreate one by measuring, which may be expensive.
      */
@@ -211,7 +271,7 @@
             return null
         }
         // Only a subset of the state is relevant to get a valid viewState. Let's get the cachekey
-        var cacheKey = getKey(state, tmpKey)
+        var cacheKey = getKey(state, isGutsVisible, tmpKey)
         val viewState = viewStates[cacheKey]
         if (viewState != null) {
             // we already have cached this measurement, let's continue
@@ -228,6 +288,7 @@
                         constraintSetForExpansion(state.expansion),
                         TransitionViewState())
 
+                setGutsViewState(result)
                 // We don't want to cache interpolated or null states as this could quickly fill up
                 // our cache. We only cache the start and the end states since the interpolation
                 // is cheap
@@ -252,11 +313,12 @@
         return result
     }
 
-    private fun getKey(state: MediaHostState, result: CacheKey): CacheKey {
+    private fun getKey(state: MediaHostState, guts: Boolean, result: CacheKey): CacheKey {
         result.apply {
             heightMeasureSpec = state.measurementInput?.heightMeasureSpec ?: 0
             widthMeasureSpec = state.measurementInput?.widthMeasureSpec ?: 0
             expansion = state.expansion
+            gutsVisible = guts
         }
         return result
     }
@@ -432,5 +494,6 @@
 private data class CacheKey(
     var widthMeasureSpec: Int = -1,
     var heightMeasureSpec: Int = -1,
-    var expansion: Float = 0.0f
+    var expansion: Float = 0.0f,
+    var gutsVisible: Boolean = false
 )
diff --git a/packages/SystemUI/src/com/android/systemui/media/PlayerViewHolder.kt b/packages/SystemUI/src/com/android/systemui/media/PlayerViewHolder.kt
index 600fdc2..666a603 100644
--- a/packages/SystemUI/src/com/android/systemui/media/PlayerViewHolder.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/PlayerViewHolder.kt
@@ -59,6 +59,11 @@
     val action3 = itemView.requireViewById<ImageButton>(R.id.action3)
     val action4 = itemView.requireViewById<ImageButton>(R.id.action4)
 
+    // Settings screen
+    val cancel = itemView.requireViewById<View>(R.id.cancel)
+    val dismiss = itemView.requireViewById<View>(R.id.dismiss)
+    val settings = itemView.requireViewById<View>(R.id.settings)
+
     init {
         (player.background as IlluminationDrawable).let {
             it.registerLightSource(seamless)
@@ -67,6 +72,9 @@
             it.registerLightSource(action2)
             it.registerLightSource(action3)
             it.registerLightSource(action4)
+            it.registerLightSource(cancel)
+            it.registerLightSource(dismiss)
+            it.registerLightSource(settings)
         }
     }
 
@@ -83,9 +91,6 @@
         }
     }
 
-    // Settings screen
-    val options = itemView.requireViewById<View>(R.id.qs_media_controls_options)
-
     companion object {
         /**
          * Creates a PlayerViewHolder.
@@ -105,5 +110,29 @@
                 progressTimes.layoutDirection = View.LAYOUT_DIRECTION_LTR
             }
         }
+
+        val controlsIds = setOf(
+                R.id.icon,
+                R.id.app_name,
+                R.id.album_art,
+                R.id.header_title,
+                R.id.header_artist,
+                R.id.media_seamless,
+                R.id.notification_media_progress_time,
+                R.id.media_progress_bar,
+                R.id.action0,
+                R.id.action1,
+                R.id.action2,
+                R.id.action3,
+                R.id.action4,
+                R.id.icon
+        )
+        val gutsIds = setOf(
+                R.id.media_text,
+                R.id.remove_text,
+                R.id.cancel,
+                R.id.dismiss,
+                R.id.settings
+        )
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/media/ResumeMediaBrowser.java b/packages/SystemUI/src/com/android/systemui/media/ResumeMediaBrowser.java
index 68b6785..a4d4436 100644
--- a/packages/SystemUI/src/com/android/systemui/media/ResumeMediaBrowser.java
+++ b/packages/SystemUI/src/com/android/systemui/media/ResumeMediaBrowser.java
@@ -30,6 +30,8 @@
 import android.text.TextUtils;
 import android.util.Log;
 
+import com.android.internal.annotations.VisibleForTesting;
+
 import java.util.List;
 
 /**
@@ -46,6 +48,7 @@
     private static final String TAG = "ResumeMediaBrowser";
     private final Context mContext;
     private final Callback mCallback;
+    private MediaBrowserFactory mBrowserFactory;
     private MediaBrowser mMediaBrowser;
     private ComponentName mComponentName;
 
@@ -55,10 +58,12 @@
      * @param callback used to report media items found
      * @param componentName Component name of the MediaBrowserService this browser will connect to
      */
-    public ResumeMediaBrowser(Context context, Callback callback, ComponentName componentName) {
+    public ResumeMediaBrowser(Context context, Callback callback, ComponentName componentName,
+            MediaBrowserFactory browserFactory) {
         mContext = context;
         mCallback = callback;
         mComponentName = componentName;
+        mBrowserFactory = browserFactory;
     }
 
     /**
@@ -74,7 +79,7 @@
         disconnect();
         Bundle rootHints = new Bundle();
         rootHints.putBoolean(MediaBrowserService.BrowserRoot.EXTRA_RECENT, true);
-        mMediaBrowser = new MediaBrowser(mContext,
+        mMediaBrowser = mBrowserFactory.create(
                 mComponentName,
                 mConnectionCallback,
                 rootHints);
@@ -88,17 +93,19 @@
                 List<MediaBrowser.MediaItem> children) {
             if (children.size() == 0) {
                 Log.d(TAG, "No children found for " + mComponentName);
-                return;
-            }
-            // We ask apps to return a playable item as the first child when sending
-            // a request with EXTRA_RECENT; if they don't, no resume controls
-            MediaBrowser.MediaItem child = children.get(0);
-            MediaDescription desc = child.getDescription();
-            if (child.isPlayable() && mMediaBrowser != null) {
-                mCallback.addTrack(desc, mMediaBrowser.getServiceComponent(),
-                        ResumeMediaBrowser.this);
+                mCallback.onError();
             } else {
-                Log.d(TAG, "Child found but not playable for " + mComponentName);
+                // We ask apps to return a playable item as the first child when sending
+                // a request with EXTRA_RECENT; if they don't, no resume controls
+                MediaBrowser.MediaItem child = children.get(0);
+                MediaDescription desc = child.getDescription();
+                if (child.isPlayable() && mMediaBrowser != null) {
+                    mCallback.addTrack(desc, mMediaBrowser.getServiceComponent(),
+                            ResumeMediaBrowser.this);
+                } else {
+                    Log.d(TAG, "Child found but not playable for " + mComponentName);
+                    mCallback.onError();
+                }
             }
             disconnect();
         }
@@ -131,7 +138,7 @@
             Log.d(TAG, "Service connected for " + mComponentName);
             if (mMediaBrowser != null && mMediaBrowser.isConnected()) {
                 String root = mMediaBrowser.getRoot();
-                if (!TextUtils.isEmpty(root)) {
+                if (!TextUtils.isEmpty(root) && mMediaBrowser != null) {
                     mCallback.onConnected();
                     mMediaBrowser.subscribe(root, mSubscriptionCallback);
                     return;
@@ -182,7 +189,7 @@
         disconnect();
         Bundle rootHints = new Bundle();
         rootHints.putBoolean(MediaBrowserService.BrowserRoot.EXTRA_RECENT, true);
-        mMediaBrowser = new MediaBrowser(mContext, mComponentName,
+        mMediaBrowser = mBrowserFactory.create(mComponentName,
                 new MediaBrowser.ConnectionCallback() {
                     @Override
                     public void onConnected() {
@@ -192,7 +199,7 @@
                             return;
                         }
                         MediaSession.Token token = mMediaBrowser.getSessionToken();
-                        MediaController controller = new MediaController(mContext, token);
+                        MediaController controller = createMediaController(token);
                         controller.getTransportControls();
                         controller.getTransportControls().prepare();
                         controller.getTransportControls().play();
@@ -212,6 +219,11 @@
         mMediaBrowser.connect();
     }
 
+    @VisibleForTesting
+    protected MediaController createMediaController(MediaSession.Token token) {
+        return new MediaController(mContext, token);
+    }
+
     /**
      * Get the media session token
      * @return the token, or null if the MediaBrowser is null or disconnected
@@ -235,42 +247,19 @@
 
     /**
      * Used to test if SystemUI is allowed to connect to the given component as a MediaBrowser.
-     * ResumeMediaBrowser.Callback#onError or ResumeMediaBrowser.Callback#onConnected will be called
-     * depending on whether it was successful.
+     * If it can connect, ResumeMediaBrowser.Callback#onConnected will be called. If valid media is
+     * found, then ResumeMediaBrowser.Callback#addTrack will also be called. This allows for more
+     * detailed logging if the service has issues. If it cannot connect, or cannot find valid media,
+     * then ResumeMediaBrowser.Callback#onError will be called.
      * ResumeMediaBrowser#disconnect should be called after this to ensure the connection is closed.
      */
     public void testConnection() {
         disconnect();
-        final MediaBrowser.ConnectionCallback connectionCallback =
-                new MediaBrowser.ConnectionCallback() {
-                    @Override
-                    public void onConnected() {
-                        Log.d(TAG, "connected");
-                        if (mMediaBrowser == null || !mMediaBrowser.isConnected()
-                                || TextUtils.isEmpty(mMediaBrowser.getRoot())) {
-                            mCallback.onError();
-                        } else {
-                            mCallback.onConnected();
-                        }
-                    }
-
-                    @Override
-                    public void onConnectionSuspended() {
-                        Log.d(TAG, "suspended");
-                        mCallback.onError();
-                    }
-
-                    @Override
-                    public void onConnectionFailed() {
-                        Log.d(TAG, "failed");
-                        mCallback.onError();
-                    }
-                };
         Bundle rootHints = new Bundle();
         rootHints.putBoolean(MediaBrowserService.BrowserRoot.EXTRA_RECENT, true);
-        mMediaBrowser = new MediaBrowser(mContext,
+        mMediaBrowser = mBrowserFactory.create(
                 mComponentName,
-                connectionCallback,
+                mConnectionCallback,
                 rootHints);
         mMediaBrowser.connect();
     }
diff --git a/packages/SystemUI/src/com/android/systemui/media/ResumeMediaBrowserFactory.java b/packages/SystemUI/src/com/android/systemui/media/ResumeMediaBrowserFactory.java
new file mode 100644
index 0000000..2261aa5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/media/ResumeMediaBrowserFactory.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media;
+
+import android.content.ComponentName;
+import android.content.Context;
+
+import javax.inject.Inject;
+
+/**
+ * Testable wrapper around {@link ResumeMediaBrowser} constructor
+ */
+public class ResumeMediaBrowserFactory {
+    private final Context mContext;
+    private final MediaBrowserFactory mBrowserFactory;
+
+    @Inject
+    public ResumeMediaBrowserFactory(Context context, MediaBrowserFactory browserFactory) {
+        mContext = context;
+        mBrowserFactory = browserFactory;
+    }
+
+    /**
+     * Creates a new ResumeMediaBrowser.
+     *
+     * @param callback will be called on connection or error, and addTrack when media item found
+     * @param componentName component to browse
+     * @return
+     */
+    public ResumeMediaBrowser create(ResumeMediaBrowser.Callback callback,
+            ComponentName componentName) {
+        return new ResumeMediaBrowser(mContext, callback, componentName, mBrowserFactory);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt b/packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt
index c2631c9..d789501 100644
--- a/packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt
@@ -28,10 +28,14 @@
  */
 class SeekBarObserver(private val holder: PlayerViewHolder) : Observer<SeekBarViewModel.Progress> {
 
-    val seekBarDefaultMaxHeight = holder.seekBar.context.resources
+    val seekBarEnabledMaxHeight = holder.seekBar.context.resources
         .getDimensionPixelSize(R.dimen.qs_media_enabled_seekbar_height)
     val seekBarDisabledHeight = holder.seekBar.context.resources
         .getDimensionPixelSize(R.dimen.qs_media_disabled_seekbar_height)
+    val seekBarEnabledVerticalPadding = holder.seekBar.context.resources
+            .getDimensionPixelSize(R.dimen.qs_media_enabled_seekbar_vertical_padding)
+    val seekBarDisabledVerticalPadding = holder.seekBar.context.resources
+            .getDimensionPixelSize(R.dimen.qs_media_disabled_seekbar_vertical_padding)
 
     /** Updates seek bar views when the data model changes. */
     @UiThread
@@ -39,6 +43,7 @@
         if (!data.enabled) {
             if (holder.seekBar.maxHeight != seekBarDisabledHeight) {
                 holder.seekBar.maxHeight = seekBarDisabledHeight
+                setVerticalPadding(seekBarDisabledVerticalPadding)
             }
             holder.seekBar.setEnabled(false)
             holder.seekBar.getThumb().setAlpha(0)
@@ -51,14 +56,9 @@
         holder.seekBar.getThumb().setAlpha(if (data.seekAvailable) 255 else 0)
         holder.seekBar.setEnabled(data.seekAvailable)
 
-        if (holder.seekBar.maxHeight != seekBarDefaultMaxHeight) {
-            holder.seekBar.maxHeight = seekBarDefaultMaxHeight
-        }
-
-        data.elapsedTime?.let {
-            holder.seekBar.setProgress(it)
-            holder.elapsedTimeView.setText(DateUtils.formatElapsedTime(
-                    it / DateUtils.SECOND_IN_MILLIS))
+        if (holder.seekBar.maxHeight != seekBarEnabledMaxHeight) {
+            holder.seekBar.maxHeight = seekBarEnabledMaxHeight
+            setVerticalPadding(seekBarEnabledVerticalPadding)
         }
 
         data.duration?.let {
@@ -66,5 +66,18 @@
             holder.totalTimeView.setText(DateUtils.formatElapsedTime(
                     it / DateUtils.SECOND_IN_MILLIS))
         }
+
+        data.elapsedTime?.let {
+            holder.seekBar.setProgress(it)
+            holder.elapsedTimeView.setText(DateUtils.formatElapsedTime(
+                    it / DateUtils.SECOND_IN_MILLIS))
+        }
+    }
+
+    @UiThread
+    fun setVerticalPadding(padding: Int) {
+        val leftPadding = holder.seekBar.paddingLeft
+        val rightPadding = holder.seekBar.paddingRight
+        holder.seekBar.setPadding(leftPadding, padding, rightPadding, padding)
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt b/packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt
index 1dca3f1..9e326aa 100644
--- a/packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt
@@ -71,7 +71,7 @@
 
 /** ViewModel for seek bar in QS media player. */
 class SeekBarViewModel @Inject constructor(@Background private val bgExecutor: RepeatableExecutor) {
-    private var _data = Progress(false, false, null, null)
+    private var _data = Progress(false, false, null, 0)
         set(value) {
             field = value
             _progress.postValue(value)
@@ -186,10 +186,10 @@
         val mediaMetadata = controller?.metadata
         val seekAvailable = ((playbackState?.actions ?: 0L) and PlaybackState.ACTION_SEEK_TO) != 0L
         val position = playbackState?.position?.toInt()
-        val duration = mediaMetadata?.getLong(MediaMetadata.METADATA_KEY_DURATION)?.toInt()
+        val duration = mediaMetadata?.getLong(MediaMetadata.METADATA_KEY_DURATION)?.toInt() ?: 0
         val enabled = if (playbackState == null ||
                 playbackState?.getState() == PlaybackState.STATE_NONE ||
-                (duration != null && duration <= 0)) false else true
+                (duration <= 0)) false else true
         _data = Progress(enabled, seekAvailable, position, duration)
         checkIfPollingNeeded()
     }
@@ -408,6 +408,6 @@
         val enabled: Boolean,
         val seekAvailable: Boolean,
         val elapsedTime: Int?,
-        val duration: Int?
+        val duration: Int
     )
 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java b/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java
index ead1786..7201931 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java
@@ -21,7 +21,6 @@
 import android.animation.RectEvaluator;
 import android.animation.ValueAnimator;
 import android.annotation.IntDef;
-import android.content.Context;
 import android.graphics.Rect;
 import android.view.SurfaceControl;
 
@@ -56,13 +55,15 @@
     public static final int TRANSITION_DIRECTION_TO_PIP = 2;
     public static final int TRANSITION_DIRECTION_TO_FULLSCREEN = 3;
     public static final int TRANSITION_DIRECTION_TO_SPLIT_SCREEN = 4;
+    public static final int TRANSITION_DIRECTION_REMOVE_STACK = 5;
 
     @IntDef(prefix = { "TRANSITION_DIRECTION_" }, value = {
             TRANSITION_DIRECTION_NONE,
             TRANSITION_DIRECTION_SAME,
             TRANSITION_DIRECTION_TO_PIP,
             TRANSITION_DIRECTION_TO_FULLSCREEN,
-            TRANSITION_DIRECTION_TO_SPLIT_SCREEN
+            TRANSITION_DIRECTION_TO_SPLIT_SCREEN,
+            TRANSITION_DIRECTION_REMOVE_STACK
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface TransitionDirection {}
@@ -88,7 +89,7 @@
             });
 
     @Inject
-    PipAnimationController(Context context, PipSurfaceTransactionHelper helper) {
+    PipAnimationController(PipSurfaceTransactionHelper helper) {
         mSurfaceTransactionHelper = helper;
     }
 
@@ -338,6 +339,10 @@
 
                 @Override
                 void onStartTransaction(SurfaceControl leash, SurfaceControl.Transaction tx) {
+                    if (getTransitionDirection() == TRANSITION_DIRECTION_REMOVE_STACK) {
+                        // while removing the pip stack, no extra work needs to be done here.
+                        return;
+                    }
                     getSurfaceTransactionHelper()
                             .resetScale(tx, leash, getDestinationBounds())
                             .crop(tx, leash, getDestinationBounds())
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipBoundsHandler.java b/packages/SystemUI/src/com/android/systemui/pip/PipBoundsHandler.java
index 8bbd15b..583953c 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/PipBoundsHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipBoundsHandler.java
@@ -177,7 +177,7 @@
         }
         if (isValidPictureInPictureAspectRatio(mAspectRatio)) {
             transformBoundsToAspectRatio(normalBounds, mAspectRatio,
-                    false /* useCurrentMinEdgeSize */);
+                    false /* useCurrentMinEdgeSize */, false /* useCurrentSize */);
         }
         displayInfo.copyFrom(mDisplayInfo);
     }
@@ -278,7 +278,9 @@
             destinationBounds = new Rect(bounds);
         }
         if (isValidPictureInPictureAspectRatio(aspectRatio)) {
-            transformBoundsToAspectRatio(destinationBounds, aspectRatio, useCurrentMinEdgeSize);
+            boolean useCurrentSize = bounds == null && mReentrySize != null;
+            transformBoundsToAspectRatio(destinationBounds, aspectRatio, useCurrentMinEdgeSize,
+                    useCurrentSize);
         }
         mAspectRatio = aspectRatio;
         return destinationBounds;
@@ -384,7 +386,8 @@
      * @param stackBounds
      */
     public void transformBoundsToAspectRatio(Rect stackBounds) {
-        transformBoundsToAspectRatio(stackBounds, mAspectRatio, true);
+        transformBoundsToAspectRatio(stackBounds, mAspectRatio, true /* useCurrentMinEdgeSize */,
+                true /* useCurrentSize */);
     }
 
     /**
@@ -392,18 +395,16 @@
      * specified aspect ratio.
      */
     private void transformBoundsToAspectRatio(Rect stackBounds, float aspectRatio,
-            boolean useCurrentMinEdgeSize) {
+            boolean useCurrentMinEdgeSize, boolean useCurrentSize) {
         // Save the snap fraction and adjust the size based on the new aspect ratio.
         final float snapFraction = mSnapAlgorithm.getSnapFraction(stackBounds,
                 getMovementBounds(stackBounds));
-        final int minEdgeSize;
+        final int minEdgeSize = useCurrentMinEdgeSize ? mCurrentMinSize : mDefaultMinSize;
         final Size size;
-        if (useCurrentMinEdgeSize) {
-            minEdgeSize = mCurrentMinSize;
+        if (useCurrentMinEdgeSize || useCurrentSize) {
             size = mSnapAlgorithm.getSizeForAspectRatio(
                     new Size(stackBounds.width(), stackBounds.height()), aspectRatio, minEdgeSize);
         } else {
-            minEdgeSize = mDefaultMinSize;
             size = mSnapAlgorithm.getSizeForAspectRatio(aspectRatio, minEdgeSize,
                     mDisplayInfo.logicalWidth, mDisplayInfo.logicalHeight);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java b/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java
index 0141dee..54df53d 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java
@@ -24,6 +24,7 @@
 import static com.android.systemui.pip.PipAnimationController.ANIM_TYPE_ALPHA;
 import static com.android.systemui.pip.PipAnimationController.ANIM_TYPE_BOUNDS;
 import static com.android.systemui.pip.PipAnimationController.TRANSITION_DIRECTION_NONE;
+import static com.android.systemui.pip.PipAnimationController.TRANSITION_DIRECTION_REMOVE_STACK;
 import static com.android.systemui.pip.PipAnimationController.TRANSITION_DIRECTION_SAME;
 import static com.android.systemui.pip.PipAnimationController.TRANSITION_DIRECTION_TO_FULLSCREEN;
 import static com.android.systemui.pip.PipAnimationController.TRANSITION_DIRECTION_TO_PIP;
@@ -39,7 +40,6 @@
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.pm.ActivityInfo;
-import android.content.res.Configuration;
 import android.graphics.Rect;
 import android.os.Handler;
 import android.os.IBinder;
@@ -94,15 +94,46 @@
     private static final int MSG_FINISH_RESIZE = 4;
     private static final int MSG_RESIZE_USER = 5;
 
+    // Not a complete set of states but serves what we want right now.
+    private enum State {
+        UNDEFINED(0),
+        TASK_APPEARED(1),
+        ENTERING_PIP(2),
+        EXITING_PIP(3);
+
+        private final int mStateValue;
+
+        State(int value) {
+            mStateValue = value;
+        }
+
+        private boolean isInPip() {
+            return mStateValue >= TASK_APPEARED.mStateValue
+                    && mStateValue != EXITING_PIP.mStateValue;
+        }
+
+        /**
+         * Resize request can be initiated in other component, ignore if we are no longer in PIP,
+         * still waiting for animation or we're exiting from it.
+         *
+         * @return {@code true} if the resize request should be blocked/ignored.
+         */
+        private boolean shouldBlockResizeRequest() {
+            return mStateValue < ENTERING_PIP.mStateValue
+                    || mStateValue == EXITING_PIP.mStateValue;
+        }
+    }
+
     private final Handler mMainHandler;
     private final Handler mUpdateHandler;
     private final PipBoundsHandler mPipBoundsHandler;
     private final PipAnimationController mPipAnimationController;
+    private final PipUiEventLogger mPipUiEventLoggerLogger;
     private final List<PipTransitionCallback> mPipTransitionCallbacks = new ArrayList<>();
     private final Rect mLastReportedBounds = new Rect();
     private final int mEnterExitAnimationDuration;
     private final PipSurfaceTransactionHelper mSurfaceTransactionHelper;
-    private final Map<IBinder, Configuration> mInitialState = new HashMap<>();
+    private final Map<IBinder, PipWindowConfigurationCompact> mCompactState = new HashMap<>();
     private final Divider mSplitDivider;
 
     // These callbacks are called on the update thread
@@ -187,8 +218,7 @@
     private ActivityManager.RunningTaskInfo mTaskInfo;
     private WindowContainerToken mToken;
     private SurfaceControl mLeash;
-    private boolean mInPip;
-    private boolean mExitingPip;
+    private State mState = State.UNDEFINED;
     private @PipAnimationController.AnimationType int mOneShotAnimationType = ANIM_TYPE_BOUNDS;
     private PipSurfaceTransactionHelper.SurfaceControlTransactionFactory
             mSurfaceControlTransactionFactory;
@@ -200,12 +230,15 @@
      */
     private boolean mShouldDeferEnteringPip;
 
+    private @ActivityInfo.ScreenOrientation int mRequestedOrientation;
+
     @Inject
     public PipTaskOrganizer(Context context, @NonNull PipBoundsHandler boundsHandler,
             @NonNull PipSurfaceTransactionHelper surfaceTransactionHelper,
             @Nullable Divider divider,
             @NonNull DisplayController displayController,
-            @NonNull PipAnimationController pipAnimationController) {
+            @NonNull PipAnimationController pipAnimationController,
+            @NonNull PipUiEventLogger pipUiEventLogger) {
         mMainHandler = new Handler(Looper.getMainLooper());
         mUpdateHandler = new Handler(PipUpdateThread.get().getLooper(), mUpdateCallbacks);
         mPipBoundsHandler = boundsHandler;
@@ -213,6 +246,7 @@
                 .getInteger(R.integer.config_pipResizeAnimationDuration);
         mSurfaceTransactionHelper = surfaceTransactionHelper;
         mPipAnimationController = pipAnimationController;
+        mPipUiEventLoggerLogger = pipUiEventLogger;
         mSurfaceControlTransactionFactory = SurfaceControl.Transaction::new;
         mSplitDivider = divider;
         displayController.addDisplayWindowListener(this);
@@ -236,11 +270,11 @@
     }
 
     public boolean isInPip() {
-        return mInPip;
+        return mState.isInPip();
     }
 
     public boolean isDeferringEnterPipAnimation() {
-        return mInPip && mShouldDeferEnteringPip;
+        return mState.isInPip() && mShouldDeferEnteringPip;
     }
 
     /**
@@ -269,21 +303,31 @@
      * @param animationDurationMs duration in millisecond for the exiting PiP transition
      */
     public void exitPip(int animationDurationMs) {
-        if (!mInPip || mExitingPip || mToken == null) {
+        if (!mState.isInPip() || mToken == null) {
             Log.wtf(TAG, "Not allowed to exitPip in current state"
-                    + " mInPip=" + mInPip + " mExitingPip=" + mExitingPip + " mToken=" + mToken);
+                    + " mState=" + mState + " mToken=" + mToken);
             return;
         }
 
-        final Configuration initialConfig = mInitialState.remove(mToken.asBinder());
-        final boolean orientationDiffers = initialConfig.windowConfiguration.getRotation()
+        final PipWindowConfigurationCompact config = mCompactState.remove(mToken.asBinder());
+        if (config == null) {
+            Log.wtf(TAG, "Token not in record, this should not happen mToken=" + mToken);
+            return;
+        }
+
+        mPipUiEventLoggerLogger.log(
+                PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_EXPAND_TO_FULLSCREEN);
+        config.syncWithScreenOrientation(mRequestedOrientation,
+                mPipBoundsHandler.getDisplayRotation());
+        final boolean orientationDiffers = config.getRotation()
                 != mPipBoundsHandler.getDisplayRotation();
         final WindowContainerTransaction wct = new WindowContainerTransaction();
-        final Rect destinationBounds = initialConfig.windowConfiguration.getBounds();
+        final Rect destinationBounds = config.getBounds();
         final int direction = syncWithSplitScreenBounds(destinationBounds)
                 ? TRANSITION_DIRECTION_TO_SPLIT_SCREEN
                 : TRANSITION_DIRECTION_TO_FULLSCREEN;
         if (orientationDiffers) {
+            mState = State.EXITING_PIP;
             // Send started callback though animation is ignored.
             sendOnPipTransitionStarted(direction);
             // Don't bother doing an animation if the display rotation differs or if it's in
@@ -292,7 +336,6 @@
             WindowOrganizer.applyTransaction(wct);
             // Send finished callback though animation is ignored.
             sendOnPipTransitionFinished(direction);
-            mInPip = false;
         } else {
             final SurfaceControl.Transaction tx =
                     mSurfaceControlTransactionFactory.getTransaction();
@@ -311,11 +354,10 @@
                     scheduleAnimateResizePip(mLastReportedBounds, destinationBounds,
                             null /* sourceHintRect */, direction, animationDurationMs,
                             null /* updateBoundsCallback */);
-                    mInPip = false;
+                    mState = State.EXITING_PIP;
                 }
             });
         }
-        mExitingPip = true;
     }
 
     private void applyWindowingModeChangeOnExit(WindowContainerTransaction wct, int direction) {
@@ -332,26 +374,35 @@
      * Removes PiP immediately.
      */
     public void removePip() {
-        if (!mInPip || mExitingPip ||  mToken == null) {
+        if (!mState.isInPip() ||  mToken == null) {
             Log.wtf(TAG, "Not allowed to removePip in current state"
-                    + " mInPip=" + mInPip + " mExitingPip=" + mExitingPip + " mToken=" + mToken);
+                    + " mState=" + mState + " mToken=" + mToken);
             return;
         }
-        getUpdateHandler().post(() -> {
-            try {
-                // Reset the task bounds first to ensure the activity configuration is reset as well
-                final WindowContainerTransaction wct = new WindowContainerTransaction();
-                wct.setBounds(mToken, null);
-                WindowOrganizer.applyTransaction(wct);
 
-                ActivityTaskManager.getService().removeStacksInWindowingModes(
-                        new int[]{ WINDOWING_MODE_PINNED });
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to remove PiP", e);
-            }
-        });
-        mInitialState.remove(mToken.asBinder());
-        mExitingPip = true;
+        // removePipImmediately is expected when the following animation finishes.
+        mUpdateHandler.post(() -> mPipAnimationController
+                .getAnimator(mLeash, mLastReportedBounds, 1f, 0f)
+                .setTransitionDirection(TRANSITION_DIRECTION_REMOVE_STACK)
+                .setPipAnimationCallback(mPipAnimationCallback)
+                .setDuration(mEnterExitAnimationDuration)
+                .start());
+        mCompactState.remove(mToken.asBinder());
+        mState = State.EXITING_PIP;
+    }
+
+    private void removePipImmediately() {
+        try {
+            // Reset the task bounds first to ensure the activity configuration is reset as well
+            final WindowContainerTransaction wct = new WindowContainerTransaction();
+            wct.setBounds(mToken, null);
+            WindowOrganizer.applyTransaction(wct);
+
+            ActivityTaskManager.getService().removeStacksInWindowingModes(
+                    new int[]{ WINDOWING_MODE_PINNED });
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to remove PiP", e);
+        }
     }
 
     @Override
@@ -359,11 +410,15 @@
         Objects.requireNonNull(info, "Requires RunningTaskInfo");
         mTaskInfo = info;
         mToken = mTaskInfo.token;
-        mInPip = true;
-        mExitingPip = false;
+        mState = State.TASK_APPEARED;
         mLeash = leash;
-        mInitialState.put(mToken.asBinder(), new Configuration(mTaskInfo.configuration));
+        mCompactState.put(mToken.asBinder(),
+                new PipWindowConfigurationCompact(mTaskInfo.configuration.windowConfiguration));
         mPictureInPictureParams = mTaskInfo.pictureInPictureParams;
+        mRequestedOrientation = info.requestedOrientation;
+
+        mPipUiEventLoggerLogger.setTaskInfo(mTaskInfo);
+        mPipUiEventLoggerLogger.log(PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_ENTER);
 
         if (mShouldDeferEnteringPip) {
             if (DEBUG) Log.d(TAG, "Defer entering PiP animation, fixed rotation is ongoing");
@@ -387,6 +442,7 @@
             scheduleAnimateResizePip(currentBounds, destinationBounds, sourceHintRect,
                     TRANSITION_DIRECTION_TO_PIP, mEnterExitAnimationDuration,
                     null /* updateBoundsCallback */);
+            mState = State.ENTERING_PIP;
         } else if (mOneShotAnimationType == ANIM_TYPE_ALPHA) {
             enterPipWithAlphaAnimation(destinationBounds, mEnterExitAnimationDuration);
             mOneShotAnimationType = ANIM_TYPE_BOUNDS;
@@ -432,6 +488,9 @@
                         .setPipAnimationCallback(mPipAnimationCallback)
                         .setDuration(durationMs)
                         .start());
+                // mState is set right after the animation is kicked off to block any resize
+                // requests such as offsetPip that may have been called prior to the transition.
+                mState = State.ENTERING_PIP;
             }
         });
     }
@@ -484,7 +543,7 @@
      */
     @Override
     public void onTaskVanished(ActivityManager.RunningTaskInfo info) {
-        if (!mInPip) {
+        if (!mState.isInPip()) {
             return;
         }
         final WindowContainerToken token = info.token;
@@ -495,13 +554,15 @@
         }
         mShouldDeferEnteringPip = false;
         mPictureInPictureParams = null;
-        mInPip = false;
-        mExitingPip = false;
+        mState = State.UNDEFINED;
+        mPipUiEventLoggerLogger.setTaskInfo(null);
     }
 
     @Override
     public void onTaskInfoChanged(ActivityManager.RunningTaskInfo info) {
         Objects.requireNonNull(mToken, "onTaskInfoChanged requires valid existing mToken");
+        mRequestedOrientation = info.requestedOrientation;
+        // check PictureInPictureParams for aspect ratio change.
         final PictureInPictureParams newParams = info.pictureInPictureParams;
         if (newParams == null || !applyPictureInPictureParams(newParams)) {
             Log.d(TAG, "Ignored onTaskInfoChanged with PiP param: " + newParams);
@@ -528,7 +589,7 @@
 
     @Override
     public void onFixedRotationFinished(int displayId) {
-        if (mShouldDeferEnteringPip && mInPip) {
+        if (mShouldDeferEnteringPip && mState.isInPip()) {
             final Rect destinationBounds = mPipBoundsHandler.getDestinationBounds(
                     mTaskInfo.topActivity, getAspectRatioOrDefault(mPictureInPictureParams),
                     null /* bounds */, getMinimalSize(mTaskInfo.topActivityInfo));
@@ -539,8 +600,6 @@
     }
 
     /**
-     * TODO(b/152809058): consolidate the display info handling logic in SysUI
-     *
      * @param destinationBoundsOut the current destination bounds will be populated to this param
      */
     @SuppressWarnings("unchecked")
@@ -551,7 +610,7 @@
                 mPipAnimationController.getCurrentAnimator();
         if (animator == null || !animator.isRunning()
                 || animator.getTransitionDirection() != TRANSITION_DIRECTION_TO_PIP) {
-            if (mInPip && fromRotation) {
+            if (mState.isInPip() && fromRotation) {
                 // If we are rotating while there is a current animation, immediately cancel the
                 // animation (remove the listeners so we don't trigger the normal finish resize
                 // call that should only happen on the update thread)
@@ -612,7 +671,7 @@
      * {@link PictureInPictureParams} would affect the bounds.
      */
     private boolean applyPictureInPictureParams(@NonNull PictureInPictureParams params) {
-        final boolean changed = (mPictureInPictureParams == null) ? true : !Objects.equals(
+        final boolean changed = (mPictureInPictureParams == null) || !Objects.equals(
                 mPictureInPictureParams.getAspectRatioRational(), params.getAspectRatioRational());
         if (changed) {
             mPictureInPictureParams = params;
@@ -637,10 +696,10 @@
     private void scheduleAnimateResizePip(Rect currentBounds, Rect destinationBounds,
             Rect sourceHintRect, @PipAnimationController.TransitionDirection int direction,
             int durationMs, Consumer<Rect> updateBoundsCallback) {
-        if (!mInPip) {
+        if (!mState.isInPip()) {
             // TODO: tend to use shouldBlockResizeRequest here as well but need to consider
             // the fact that when in exitPip, scheduleAnimateResizePip is executed in the window
-            // container transaction callback and we want to set the mExitingPip immediately.
+            // container transaction callback and we want to set the mState immediately.
             return;
         }
 
@@ -697,7 +756,7 @@
     private void scheduleFinishResizePip(Rect destinationBounds,
             @PipAnimationController.TransitionDirection int direction,
             Consumer<Rect> updateBoundsCallback) {
-        if (shouldBlockResizeRequest()) {
+        if (mState.shouldBlockResizeRequest()) {
             return;
         }
 
@@ -716,7 +775,7 @@
         mSurfaceTransactionHelper
                 .crop(tx, mLeash, destinationBounds)
                 .resetScale(tx, mLeash, destinationBounds)
-                .round(tx, mLeash, mInPip);
+                .round(tx, mLeash, mState.isInPip());
         return tx;
     }
 
@@ -725,7 +784,7 @@
      */
     public void scheduleOffsetPip(Rect originalBounds, int offset, int duration,
             Consumer<Rect> updateBoundsCallback) {
-        if (shouldBlockResizeRequest()) {
+        if (mState.shouldBlockResizeRequest()) {
             return;
         }
         if (mShouldDeferEnteringPip) {
@@ -770,7 +829,7 @@
         final SurfaceControl.Transaction tx = mSurfaceControlTransactionFactory.getTransaction();
         mSurfaceTransactionHelper
                 .crop(tx, mLeash, destinationBounds)
-                .round(tx, mLeash, mInPip);
+                .round(tx, mLeash, mState.isInPip());
         tx.apply();
     }
 
@@ -803,7 +862,10 @@
                     + "directly");
         }
         mLastReportedBounds.set(destinationBounds);
-        if (isInPipDirection(direction) && type == ANIM_TYPE_ALPHA) {
+        if (direction == TRANSITION_DIRECTION_REMOVE_STACK) {
+            removePipImmediately();
+            return;
+        } else if (isInPipDirection(direction) && type == ANIM_TYPE_ALPHA) {
             return;
         }
 
@@ -899,16 +961,6 @@
     }
 
     /**
-     * Resize request can be initiated in other component, ignore if we are no longer in PIP
-     * or we're exiting from it.
-     *
-     * @return {@code true} if the resize request should be blocked/ignored.
-     */
-    private boolean shouldBlockResizeRequest() {
-        return !mInPip || mExitingPip;
-    }
-
-    /**
      * Sync with {@link #mSplitDivider} on destination bounds if PiP is going to split screen.
      *
      * @param destinationBoundsOut contain the updated destination bounds if applicable
@@ -936,14 +988,14 @@
         pw.println(innerPrefix + "mToken=" + mToken
                 + " binder=" + (mToken != null ? mToken.asBinder() : null));
         pw.println(innerPrefix + "mLeash=" + mLeash);
-        pw.println(innerPrefix + "mInPip=" + mInPip);
+        pw.println(innerPrefix + "mState=" + mState);
         pw.println(innerPrefix + "mOneShotAnimationType=" + mOneShotAnimationType);
         pw.println(innerPrefix + "mPictureInPictureParams=" + mPictureInPictureParams);
         pw.println(innerPrefix + "mLastReportedBounds=" + mLastReportedBounds);
         pw.println(innerPrefix + "mInitialState:");
-        for (Map.Entry<IBinder, Configuration> e : mInitialState.entrySet()) {
+        for (Map.Entry<IBinder, PipWindowConfigurationCompact> e : mCompactState.entrySet()) {
             pw.println(innerPrefix + "  binder=" + e.getKey()
-                    + " winConfig=" + e.getValue().windowConfiguration);
+                    + " config=" + e.getValue());
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipUiEventLogger.java b/packages/SystemUI/src/com/android/systemui/pip/PipUiEventLogger.java
new file mode 100644
index 0000000..9702035
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipUiEventLogger.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.pip;
+
+import android.app.TaskInfo;
+import android.content.pm.PackageManager;
+
+import com.android.internal.logging.UiEvent;
+import com.android.internal.logging.UiEventLogger;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+
+/**
+ * Helper class that ends PiP log to UiEvent, see also go/uievent
+ */
+@Singleton
+public class PipUiEventLogger {
+
+    private static final int INVALID_PACKAGE_UID = -1;
+
+    private final UiEventLogger mUiEventLogger;
+    private final PackageManager mPackageManager;
+
+    private String mPackageName;
+    private int mPackageUid = INVALID_PACKAGE_UID;
+
+    @Inject
+    public PipUiEventLogger(UiEventLogger uiEventLogger, PackageManager packageManager) {
+        mUiEventLogger = uiEventLogger;
+        mPackageManager = packageManager;
+    }
+
+    public void setTaskInfo(TaskInfo taskInfo) {
+        if (taskInfo == null) {
+            mPackageName = null;
+            mPackageUid = INVALID_PACKAGE_UID;
+        } else {
+            mPackageName = taskInfo.topActivity.getPackageName();
+            mPackageUid = getUid(mPackageName, taskInfo.userId);
+        }
+    }
+
+    /**
+     * Sends log via UiEvent, reference go/uievent for how to debug locally
+     */
+    public void log(PipUiEventEnum event) {
+        if (mPackageName == null || mPackageUid == INVALID_PACKAGE_UID) {
+            return;
+        }
+        mUiEventLogger.log(event, mPackageUid, mPackageName);
+    }
+
+    private int getUid(String packageName, int userId) {
+        int uid = INVALID_PACKAGE_UID;
+        try {
+            uid = mPackageManager.getApplicationInfoAsUser(
+                    packageName, 0 /* ApplicationInfoFlags */, userId).uid;
+        } catch (PackageManager.NameNotFoundException e) {
+            // do nothing.
+        }
+        return uid;
+    }
+
+    /**
+     * Enums for logging the PiP events to UiEvent
+     */
+    public enum PipUiEventEnum implements UiEventLogger.UiEventEnum {
+        @UiEvent(doc = "Activity enters picture-in-picture mode")
+        PICTURE_IN_PICTURE_ENTER(603),
+
+        @UiEvent(doc = "Expands from picture-in-picture to fullscreen")
+        PICTURE_IN_PICTURE_EXPAND_TO_FULLSCREEN(604),
+
+        @UiEvent(doc = "Removes picture-in-picture by tap close button")
+        PICTURE_IN_PICTURE_TAP_TO_REMOVE(605),
+
+        @UiEvent(doc = "Removes picture-in-picture by drag to dismiss area")
+        PICTURE_IN_PICTURE_DRAG_TO_REMOVE(606),
+
+        @UiEvent(doc = "Shows picture-in-picture menu")
+        PICTURE_IN_PICTURE_SHOW_MENU(607),
+
+        @UiEvent(doc = "Hides picture-in-picture menu")
+        PICTURE_IN_PICTURE_HIDE_MENU(608),
+
+        @UiEvent(doc = "Changes the aspect ratio of picture-in-picture window. This is inherited"
+                + " from previous Tron-based logging and currently not in use.")
+        PICTURE_IN_PICTURE_CHANGE_ASPECT_RATIO(609),
+
+        @UiEvent(doc = "User resize of the picture-in-picture window")
+        PICTURE_IN_PICTURE_RESIZE(610);
+
+        private final int mId;
+
+        PipUiEventEnum(int id) {
+            mId = id;
+        }
+
+        @Override
+        public int getId() {
+            return mId;
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipWindowConfigurationCompact.java b/packages/SystemUI/src/com/android/systemui/pip/PipWindowConfigurationCompact.java
new file mode 100644
index 0000000..ba104d6
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipWindowConfigurationCompact.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.pip;
+
+import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+import static android.view.Surface.ROTATION_0;
+import static android.view.Surface.ROTATION_180;
+import static android.view.Surface.ROTATION_270;
+import static android.view.Surface.ROTATION_90;
+
+import android.app.WindowConfiguration;
+import android.content.pm.ActivityInfo;
+import android.graphics.Rect;
+import android.view.Surface;
+
+/**
+ * Compact {@link WindowConfiguration} for PiP usage and supports operations such as rotate.
+ */
+class PipWindowConfigurationCompact {
+    private @Surface.Rotation int mRotation;
+    private Rect mBounds;
+
+    PipWindowConfigurationCompact(WindowConfiguration windowConfiguration) {
+        mRotation = windowConfiguration.getRotation();
+        mBounds = windowConfiguration.getBounds();
+    }
+
+    @Surface.Rotation int getRotation() {
+        return mRotation;
+    }
+
+    Rect getBounds() {
+        return mBounds;
+    }
+
+    void syncWithScreenOrientation(@ActivityInfo.ScreenOrientation int screenOrientation,
+            @Surface.Rotation int displayRotation) {
+        if (mBounds.top != 0 || mBounds.left != 0) {
+            // Supports fullscreen bounds like (0, 0, width, height) only now.
+            return;
+        }
+        boolean rotateNeeded = false;
+        if (ActivityInfo.isFixedOrientationPortrait(screenOrientation)
+                && (mRotation == ROTATION_90 || mRotation == ROTATION_270)) {
+            mRotation = ROTATION_0;
+            rotateNeeded = true;
+        } else if (ActivityInfo.isFixedOrientationLandscape(screenOrientation)
+                && (mRotation == ROTATION_0 || mRotation == ROTATION_180)) {
+            mRotation = ROTATION_90;
+            rotateNeeded = true;
+        } else if (screenOrientation == SCREEN_ORIENTATION_UNSPECIFIED
+                && mRotation != displayRotation) {
+            mRotation = displayRotation;
+            rotateNeeded = true;
+        }
+        if (rotateNeeded) {
+            mBounds.set(0, 0, mBounds.height(), mBounds.width());
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "PipWindowConfigurationCompact(rotation=" + mRotation
+                + " bounds=" + mBounds + ")";
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index 7d35416..9d9c5a6 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -46,6 +46,7 @@
 import com.android.systemui.pip.PipBoundsHandler;
 import com.android.systemui.pip.PipSnapAlgorithm;
 import com.android.systemui.pip.PipTaskOrganizer;
+import com.android.systemui.pip.PipUiEventLogger;
 import com.android.systemui.shared.recents.IPinnedStackAnimationListener;
 import com.android.systemui.shared.system.ActivityManagerWrapper;
 import com.android.systemui.shared.system.InputConsumerController;
@@ -229,7 +230,10 @@
 
         @Override
         public void onAspectRatioChanged(float aspectRatio) {
-            mHandler.post(() -> mPipBoundsHandler.onAspectRatioChanged(aspectRatio));
+            mHandler.post(() -> {
+                mPipBoundsHandler.onAspectRatioChanged(aspectRatio);
+                mTouchHandler.onAspectRatioChanged();
+            });
         }
     }
 
@@ -241,7 +245,8 @@
             PipBoundsHandler pipBoundsHandler,
             PipSnapAlgorithm pipSnapAlgorithm,
             PipTaskOrganizer pipTaskOrganizer,
-            SysUiState sysUiState) {
+            SysUiState sysUiState,
+            PipUiEventLogger pipUiEventLogger) {
         mContext = context;
         mActivityManager = ActivityManager.getService();
 
@@ -262,7 +267,8 @@
                 mInputConsumerController);
         mTouchHandler = new PipTouchHandler(context, mActivityManager,
                 mMenuController, mInputConsumerController, mPipBoundsHandler, mPipTaskOrganizer,
-                floatingContentCoordinator, deviceConfig, pipSnapAlgorithm, sysUiState);
+                floatingContentCoordinator, deviceConfig, pipSnapAlgorithm, sysUiState,
+                pipUiEventLogger);
         mAppOpsListener = new PipAppOpsListener(context, mActivityManager,
                 mTouchHandler.getMotionHelper());
         displayController.addDisplayChangingController(mRotationController);
@@ -355,17 +361,8 @@
     @Override
     public void onPipTransitionStarted(ComponentName activity, int direction) {
         if (isOutPipDirection(direction)) {
-            // On phones, the expansion animation that happens on pip tap before restoring
-            // to fullscreen makes it so that the bounds received here are the expanded
-            // bounds. We want to restore to the unexpanded bounds when re-entering pip,
-            // so we save the bounds before expansion (normal) instead of the current
-            // bounds.
-            mReentryBounds.set(mTouchHandler.getNormalBounds());
-            // Apply the snap fraction of the current bounds to the normal bounds.
-            final Rect bounds = mPipTaskOrganizer.getLastReportedBounds();
-            float snapFraction = mPipBoundsHandler.getSnapFraction(bounds);
-            mPipBoundsHandler.applySnapFraction(mReentryBounds, snapFraction);
-            // Save reentry bounds (normal non-expand bounds with current position applied).
+            // Exiting PIP, save the reentry bounds to restore to when re-entering.
+            updateReentryBounds();
             mPipBoundsHandler.onSaveReentryBounds(activity, mReentryBounds);
         }
         // Disable touches while the animation is running
@@ -379,6 +376,18 @@
         }
     }
 
+    /**
+     * Update the bounds used to save the re-entry size and snap fraction when exiting PIP.
+     */
+    public void updateReentryBounds() {
+        final Rect reentryBounds = mTouchHandler.getUserResizeBounds();
+        // Apply the snap fraction of the current bounds to the normal bounds.
+        final Rect bounds = mPipTaskOrganizer.getLastReportedBounds();
+        float snapFraction = mPipBoundsHandler.getSnapFraction(bounds);
+        mPipBoundsHandler.applySnapFraction(reentryBounds, snapFraction);
+        mReentryBounds.set(reentryBounds);
+    }
+
     @Override
     public void onPipTransitionFinished(ComponentName activity, int direction) {
         onPipTransitionFinishedOrCanceled(direction);
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
index 2a83aa0..586399c 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
@@ -562,8 +562,10 @@
 
                     // TODO: Check if the action drawable has changed before we reload it
                     action.getIcon().loadDrawableAsync(this, d -> {
-                        d.setTint(Color.WHITE);
-                        actionView.setImageDrawable(d);
+                        if (d != null) {
+                            d.setTint(Color.WHITE);
+                            actionView.setImageDrawable(d);
+                        }
                     }, mHandler);
                     actionView.setContentDescription(action.getContentDescription());
                     if (action.isEnabled()) {
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java
index 8a2e4ae..9f0b1de 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java
@@ -26,9 +26,10 @@
 import android.util.Log;
 import android.view.Choreographer;
 
+import androidx.dynamicanimation.animation.AnimationHandler;
+import androidx.dynamicanimation.animation.AnimationHandler.FrameCallbackScheduler;
 import androidx.dynamicanimation.animation.SpringForce;
 
-import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
 import com.android.systemui.pip.PipSnapAlgorithm;
 import com.android.systemui.pip.PipTaskOrganizer;
 import com.android.systemui.util.FloatingContentCoordinator;
@@ -74,9 +75,6 @@
     /** The region that all of PIP must stay within. */
     private final Rect mFloatingAllowedArea = new Rect();
 
-    private final SfVsyncFrameCallbackProvider mSfVsyncFrameProvider =
-            new SfVsyncFrameCallbackProvider();
-
     /**
      * Temporary bounds used when PIP is being dragged or animated. These bounds are applied to PIP
      * using {@link PipTaskOrganizer#scheduleUserResizePip}, so that we can animate shrinking into
@@ -94,8 +92,13 @@
     /** Coordinator instance for resolving conflicts with other floating content. */
     private FloatingContentCoordinator mFloatingContentCoordinator;
 
-    /** Callback that re-sizes PIP to the animated bounds. */
-    private final Choreographer.FrameCallback mResizePipVsyncCallback;
+    private ThreadLocal<AnimationHandler> mSfAnimationHandlerThreadLocal =
+            ThreadLocal.withInitial(() -> {
+                FrameCallbackScheduler scheduler = runnable ->
+                        Choreographer.getSfInstance().postFrameCallback(t -> runnable.run());
+                AnimationHandler handler = new AnimationHandler(scheduler);
+                return handler;
+            });
 
     /**
      * PhysicsAnimator instance for animating {@link #mTemporaryBounds} using physics animations.
@@ -171,16 +174,15 @@
         mSnapAlgorithm = snapAlgorithm;
         mFloatingContentCoordinator = floatingContentCoordinator;
         mPipTaskOrganizer.registerPipTransitionCallback(mPipTransitionCallback);
+        mTemporaryBoundsPhysicsAnimator.setCustomAnimationHandler(
+                mSfAnimationHandlerThreadLocal.get());
 
-        mResizePipVsyncCallback = l -> {
+        mResizePipUpdateListener = (target, values) -> {
             if (!mTemporaryBounds.isEmpty()) {
                 mPipTaskOrganizer.scheduleUserResizePip(
                         mBounds, mTemporaryBounds, null);
             }
         };
-
-        mResizePipUpdateListener = (target, values) ->
-                mSfVsyncFrameProvider.postFrameCallback(mResizePipVsyncCallback);
     }
 
     @NonNull
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java
index 1ca53f9..badd883 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java
@@ -53,12 +53,12 @@
 import com.android.systemui.model.SysUiState;
 import com.android.systemui.pip.PipBoundsHandler;
 import com.android.systemui.pip.PipTaskOrganizer;
+import com.android.systemui.pip.PipUiEventLogger;
 import com.android.systemui.util.DeviceConfigProxy;
 
 import java.io.PrintWriter;
 import java.util.concurrent.Executor;
 import java.util.function.Function;
-import java.util.function.Supplier;
 
 /**
  * Helper on top of PipTouchHandler that handles inputs OUTSIDE of the PIP window, which is used to
@@ -80,6 +80,7 @@
     private final Context mContext;
     private final PipBoundsHandler mPipBoundsHandler;
     private final PipMotionHelper mMotionHelper;
+    private final PipMenuActivityController mMenuController;
     private final int mDisplayId;
     private final Executor mMainExecutor;
     private final SysUiState mSysUiState;
@@ -89,6 +90,7 @@
     private final Point mMaxSize = new Point();
     private final Point mMinSize = new Point();
     private final Rect mLastResizeBounds = new Rect();
+    private final Rect mUserResizeBounds = new Rect();
     private final Rect mLastDownBounds = new Rect();
     private final Rect mDragCornerSize = new Rect();
     private final Rect mTmpTopLeftCorner = new Rect();
@@ -110,22 +112,26 @@
     private InputMonitor mInputMonitor;
     private InputEventReceiver mInputEventReceiver;
     private PipTaskOrganizer mPipTaskOrganizer;
+    private PipUiEventLogger mPipUiEventLogger;
 
     private int mCtrlType;
 
     public PipResizeGestureHandler(Context context, PipBoundsHandler pipBoundsHandler,
             PipMotionHelper motionHelper, DeviceConfigProxy deviceConfig,
-            PipTaskOrganizer pipTaskOrganizer, Function<Rect, Rect> movementBoundsSupplier,
-            Runnable updateMovementBoundsRunnable, SysUiState sysUiState) {
+            PipTaskOrganizer pipTaskOrganizer, PipMenuActivityController pipMenuController,
+            Function<Rect, Rect> movementBoundsSupplier, Runnable updateMovementBoundsRunnable,
+            SysUiState sysUiState, PipUiEventLogger pipUiEventLogger) {
         mContext = context;
         mDisplayId = context.getDisplayId();
         mMainExecutor = context.getMainExecutor();
         mPipBoundsHandler = pipBoundsHandler;
+        mMenuController = pipMenuController;
         mMotionHelper = motionHelper;
         mPipTaskOrganizer = pipTaskOrganizer;
         mMovementBoundsSupplier = movementBoundsSupplier;
         mUpdateMovementBoundsRunnable = updateMovementBoundsRunnable;
         mSysUiState = sysUiState;
+        mPipUiEventLogger = pipUiEventLogger;
 
         context.getDisplay().getRealSize(mMaxSize);
         reloadResources();
@@ -182,6 +188,7 @@
 
     void onActivityUnpinned() {
         mIsAttached = false;
+        mUserResizeBounds.setEmpty();
         updateIsEnabled();
     }
 
@@ -317,6 +324,10 @@
                         mInputMonitor.pilferPointers();
                     }
                     if (mThresholdCrossed) {
+                        if (mMenuController.isMenuActivityVisible()) {
+                            mMenuController.hideMenuWithoutResize();
+                            mMenuController.hideMenu();
+                        }
                         final Rect currentPipBounds = mMotionHelper.getBounds();
                         mLastResizeBounds.set(TaskResizingAlgorithm.resizeDrag(x, y,
                                 mDownPoint.x, mDownPoint.y, currentPipBounds, mCtrlType, mMinSize.x,
@@ -330,6 +341,7 @@
                 case MotionEvent.ACTION_UP:
                 case MotionEvent.ACTION_CANCEL:
                     if (!mLastResizeBounds.isEmpty()) {
+                        mUserResizeBounds.set(mLastResizeBounds);
                         mPipTaskOrganizer.scheduleFinishResizePip(mLastResizeBounds,
                                 (Rect bounds) -> {
                                     new Handler(Looper.getMainLooper()).post(() -> {
@@ -338,6 +350,8 @@
                                         resetState();
                                     });
                                 });
+                        mPipUiEventLogger.log(
+                                PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_RESIZE);
                     } else {
                         resetState();
                     }
@@ -352,6 +366,18 @@
         mThresholdCrossed = false;
     }
 
+    void setUserResizeBounds(Rect bounds) {
+        mUserResizeBounds.set(bounds);
+    }
+
+    void invalidateUserResizeBounds() {
+        mUserResizeBounds.setEmpty();
+    }
+
+    Rect getUserResizeBounds() {
+        return mUserResizeBounds;
+    }
+
     void updateMaxSize(int maxX, int maxY) {
         mMaxSize.set(maxX, maxY);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
index a8130a1..11e609b 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
@@ -34,7 +34,6 @@
 import android.os.Handler;
 import android.os.RemoteException;
 import android.util.Log;
-import android.util.Pair;
 import android.util.Size;
 import android.view.Gravity;
 import android.view.IPinnedStackController;
@@ -55,13 +54,13 @@
 import androidx.dynamicanimation.animation.SpringForce;
 
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.os.logging.MetricsLoggerWrapper;
 import com.android.systemui.R;
 import com.android.systemui.model.SysUiState;
 import com.android.systemui.pip.PipAnimationController;
 import com.android.systemui.pip.PipBoundsHandler;
 import com.android.systemui.pip.PipSnapAlgorithm;
 import com.android.systemui.pip.PipTaskOrganizer;
+import com.android.systemui.pip.PipUiEventLogger;
 import com.android.systemui.shared.system.InputConsumerController;
 import com.android.systemui.util.DeviceConfigProxy;
 import com.android.systemui.util.DismissCircleView;
@@ -94,6 +93,8 @@
     private final WindowManager mWindowManager;
     private final IActivityManager mActivityManager;
     private final PipBoundsHandler mPipBoundsHandler;
+    private final PipUiEventLogger mPipUiEventLogger;
+
     private PipResizeGestureHandler mPipResizeGestureHandler;
     private IPinnedStackController mPinnedStackController;
 
@@ -132,9 +133,6 @@
 
     // The current movement bounds
     private Rect mMovementBounds = new Rect();
-    // The current resized bounds, changed by user resize.
-    // This is used during expand/un-expand to save/restore the user's resized size.
-    @VisibleForTesting Rect mResizedBounds = new Rect();
 
     // The reference inset bounds, used to determine the dismiss fraction
     private Rect mInsetBounds = new Rect();
@@ -198,11 +196,7 @@
 
         @Override
         public void onPipDismiss() {
-            Pair<ComponentName, Integer> topPipActivity = PipUtils.getTopPipActivity(mContext,
-                    mActivityManager);
-            if (topPipActivity.first != null) {
-                MetricsLoggerWrapper.logPictureInPictureDismissByTap(mContext, topPipActivity);
-            }
+            mPipUiEventLogger.log(PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_TAP_TO_REMOVE);
             mTouchState.removeDoubleTapTimeoutCallback();
             mMotionHelper.dismissPip();
         }
@@ -223,7 +217,8 @@
             FloatingContentCoordinator floatingContentCoordinator,
             DeviceConfigProxy deviceConfig,
             PipSnapAlgorithm pipSnapAlgorithm,
-            SysUiState sysUiState) {
+            SysUiState sysUiState,
+            PipUiEventLogger pipUiEventLogger) {
         // Initialize the Pip input consumer
         mContext = context;
         mActivityManager = activityManager;
@@ -237,8 +232,8 @@
                 mSnapAlgorithm, floatingContentCoordinator);
         mPipResizeGestureHandler =
                 new PipResizeGestureHandler(context, pipBoundsHandler, mMotionHelper,
-                        deviceConfig, pipTaskOrganizer, this::getMovementBounds,
-                        this::updateMovementBounds, sysUiState);
+                        deviceConfig, pipTaskOrganizer, menuController, this::getMovementBounds,
+                        this::updateMovementBounds, sysUiState, pipUiEventLogger);
         mTouchState = new PipTouchState(ViewConfiguration.get(context), mHandler,
                 () -> mMenuController.showMenuWithDelay(MENU_STATE_FULL, mMotionHelper.getBounds(),
                         true /* allowMenuTimeout */, willResizeMenu(), shouldShowResizeHandle()),
@@ -259,6 +254,8 @@
                 pipTaskOrganizer, pipSnapAlgorithm, this::onAccessibilityShowMenu,
                 this::updateMovementBounds, mHandler);
 
+        mPipUiEventLogger = pipUiEventLogger;
+
         mTargetView = new DismissCircleView(context);
         mTargetViewContainer = new FrameLayout(context);
         mTargetViewContainer.setBackgroundDrawable(
@@ -303,11 +300,8 @@
                     hideDismissTarget();
                 });
 
-                Pair<ComponentName, Integer> topPipActivity = PipUtils.getTopPipActivity(mContext,
-                        mActivityManager);
-                if (topPipActivity.first != null) {
-                    MetricsLoggerWrapper.logPictureInPictureDismissByDrag(mContext, topPipActivity);
-                }
+                mPipUiEventLogger.log(
+                        PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_DRAG_TO_REMOVE);
             }
         });
 
@@ -379,7 +373,6 @@
 
             mFloatingContentCoordinator.onContentRemoved(mMotionHelper);
         }
-        mResizedBounds.setEmpty();
         mPipResizeGestureHandler.onActivityUnpinned();
     }
 
@@ -389,9 +382,8 @@
         mMotionHelper.synchronizePinnedStackBounds();
         updateMovementBounds();
         if (direction == TRANSITION_DIRECTION_TO_PIP) {
-            // updates mResizedBounds only if it's an entering PiP animation
-            // mResized should be otherwise updated in setMenuState.
-            mResizedBounds.set(mMotionHelper.getBounds());
+            // Set the initial bounds as the user resize bounds.
+            mPipResizeGestureHandler.setUserResizeBounds(mMotionHelper.getBounds());
         }
 
         if (mShowPipMenuOnAnimationEnd) {
@@ -430,8 +422,21 @@
         }
     }
 
+    /**
+     * Responds to IPinnedStackListener on resetting aspect ratio for the pinned window.
+     */
+    public void onAspectRatioChanged() {
+        mPipResizeGestureHandler.invalidateUserResizeBounds();
+    }
+
     public void onMovementBoundsChanged(Rect insetBounds, Rect normalBounds, Rect curBounds,
             boolean fromImeAdjustment, boolean fromShelfAdjustment, int displayRotation) {
+        // Set the user resized bounds equal to the new normal bounds in case they were
+        // invalidated (e.g. by an aspect ratio change).
+        if (mPipResizeGestureHandler.getUserResizeBounds().isEmpty()) {
+            mPipResizeGestureHandler.setUserResizeBounds(normalBounds);
+        }
+
         final int bottomOffset = mIsImeShowing ? mImeHeight : 0;
         final boolean fromDisplayRotationChanged = (mDisplayRotation != displayRotation);
         if (fromDisplayRotationChanged) {
@@ -804,9 +809,7 @@
             // Save the current snap fraction and if we do not drag or move the PiP, then
             // we store back to this snap fraction.  Otherwise, we'll reset the snap
             // fraction and snap to the closest edge.
-            // Also save the current resized bounds so when the menu disappears, we can restore it.
             if (resize) {
-                mResizedBounds.set(mMotionHelper.getBounds());
                 Rect expandedBounds = new Rect(mExpandedBounds);
                 mSavedSnapFraction = mMotionHelper.animateToExpandedState(expandedBounds,
                         mMovementBounds, mExpandedMovementBounds, callback);
@@ -835,7 +838,7 @@
                 }
 
                 if (mDeferResizeToNormalBoundsUntilRotation == -1) {
-                    Rect restoreBounds = new Rect(mResizedBounds);
+                    Rect restoreBounds = new Rect(getUserResizeBounds());
                     Rect restoredMovementBounds = new Rect();
                     mSnapAlgorithm.getMovementBounds(restoreBounds, mInsetBounds,
                             restoredMovementBounds, mIsImeShowing ? mImeHeight : 0);
@@ -852,8 +855,10 @@
         // If pip menu has dismissed, we should register the A11y ActionReplacingConnection for pip
         // as well, or it can't handle a11y focus and pip menu can't perform any action.
         onRegistrationChanged(menuState == MENU_STATE_NONE);
-        if (menuState != MENU_STATE_CLOSE) {
-            MetricsLoggerWrapper.logPictureInPictureMenuVisible(mContext, menuState == MENU_STATE_FULL);
+        if (menuState == MENU_STATE_NONE) {
+            mPipUiEventLogger.log(PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_HIDE_MENU);
+        } else if (menuState == MENU_STATE_FULL) {
+            mPipUiEventLogger.log(PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_SHOW_MENU);
         }
     }
 
@@ -886,6 +891,10 @@
         return mNormalBounds;
     }
 
+    Rect getUserResizeBounds() {
+        return mPipResizeGestureHandler.getUserResizeBounds();
+    }
+
     /**
      * Gesture controlling normal movement of the PIP.
      */
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index 10b04c0..6abbbbe 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -24,6 +24,7 @@
 import android.content.BroadcastReceiver;
 import android.content.ContentResolver;
 import android.content.Context;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.media.AudioAttributes;
@@ -376,13 +377,15 @@
             return;
         }
         mHighTempWarning = true;
+        final String message = mContext.getString(R.string.high_temp_notif_message);
         final Notification.Builder nb =
                 new Notification.Builder(mContext, NotificationChannels.ALERTS)
                         .setSmallIcon(R.drawable.ic_device_thermostat_24)
                         .setWhen(0)
                         .setShowWhen(false)
                         .setContentTitle(mContext.getString(R.string.high_temp_title))
-                        .setContentText(mContext.getString(R.string.high_temp_notif_message))
+                        .setContentText(message)
+                        .setStyle(new Notification.BigTextStyle().bigText(message))
                         .setVisibility(Notification.VISIBILITY_PUBLIC)
                         .setContentIntent(pendingBroadcast(ACTION_CLICKED_TEMP_WARNING))
                         .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_TEMP_WARNING))
@@ -402,6 +405,23 @@
         d.setPositiveButton(com.android.internal.R.string.ok, null);
         d.setShowForAllUsers(true);
         d.setOnDismissListener(dialog -> mHighTempDialog = null);
+        final String url = mContext.getString(R.string.high_temp_dialog_help_url);
+        if (!url.isEmpty()) {
+            d.setNeutralButton(R.string.high_temp_dialog_help_text,
+                    new DialogInterface.OnClickListener() {
+                        @Override
+                        public void onClick(DialogInterface dialog, int which) {
+                            final Intent helpIntent =
+                                    new Intent(Intent.ACTION_VIEW)
+                                            .setData(Uri.parse(url))
+                                            .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                            Dependency.get(ActivityStarter.class).startActivity(helpIntent,
+                                    true /* dismissShade */, resultCode -> {
+                                        mHighTempDialog = null;
+                                    });
+                        }
+                    });
+        }
         d.show();
         mHighTempDialog = d;
     }
@@ -420,19 +440,38 @@
         d.setPositiveButton(com.android.internal.R.string.ok, null);
         d.setShowForAllUsers(true);
         d.setOnDismissListener(dialog -> mThermalShutdownDialog = null);
+        final String url = mContext.getString(R.string.thermal_shutdown_dialog_help_url);
+        if (!url.isEmpty()) {
+            d.setNeutralButton(R.string.thermal_shutdown_dialog_help_text,
+                    new DialogInterface.OnClickListener() {
+                        @Override
+                        public void onClick(DialogInterface dialog, int which) {
+                            final Intent helpIntent =
+                                    new Intent(Intent.ACTION_VIEW)
+                                            .setData(Uri.parse(url))
+                                            .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                            Dependency.get(ActivityStarter.class).startActivity(helpIntent,
+                                    true /* dismissShade */, resultCode -> {
+                                        mThermalShutdownDialog = null;
+                                    });
+                        }
+                    });
+        }
         d.show();
         mThermalShutdownDialog = d;
     }
 
     @Override
     public void showThermalShutdownWarning() {
+        final String message = mContext.getString(R.string.thermal_shutdown_message);
         final Notification.Builder nb =
                 new Notification.Builder(mContext, NotificationChannels.ALERTS)
                         .setSmallIcon(R.drawable.ic_device_thermostat_24)
                         .setWhen(0)
                         .setShowWhen(false)
                         .setContentTitle(mContext.getString(R.string.thermal_shutdown_title))
-                        .setContentText(mContext.getString(R.string.thermal_shutdown_message))
+                        .setContentText(message)
+                        .setStyle(new Notification.BigTextStyle().bigText(message))
                         .setVisibility(Notification.VISIBILITY_PUBLIC)
                         .setContentIntent(pendingBroadcast(ACTION_CLICKED_THERMAL_SHUTDOWN_WARNING))
                         .setDeleteIntent(
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
new file mode 100644
index 0000000..48769cd
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT 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.privacy
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.Gravity
+import android.view.ViewGroup
+import android.widget.FrameLayout
+import android.widget.ImageView
+import android.widget.LinearLayout
+import com.android.systemui.R
+
+class OngoingPrivacyChip @JvmOverloads constructor(
+    context: Context,
+    attrs: AttributeSet? = null,
+    defStyleAttrs: Int = 0,
+    defStyleRes: Int = 0
+) : FrameLayout(context, attrs, defStyleAttrs, defStyleRes) {
+
+    private val iconMarginExpanded = context.resources.getDimensionPixelSize(
+                    R.dimen.ongoing_appops_chip_icon_margin_expanded)
+    private val iconMarginCollapsed = context.resources.getDimensionPixelSize(
+                    R.dimen.ongoing_appops_chip_icon_margin_collapsed)
+    private val iconSize =
+            context.resources.getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_size)
+    private val iconColor = context.resources.getColor(
+            R.color.status_bar_clock_color, context.theme)
+    private val sidePadding =
+            context.resources.getDimensionPixelSize(R.dimen.ongoing_appops_chip_side_padding)
+    private val backgroundDrawable = context.getDrawable(R.drawable.privacy_chip_bg)
+    private lateinit var iconsContainer: LinearLayout
+    private lateinit var back: FrameLayout
+    var expanded = false
+        set(value) {
+            if (value != field) {
+                field = value
+                updateView()
+            }
+        }
+
+    var builder = PrivacyChipBuilder(context, emptyList<PrivacyItem>())
+    var privacyList = emptyList<PrivacyItem>()
+        set(value) {
+            field = value
+            builder = PrivacyChipBuilder(context, value)
+            updateView()
+        }
+
+    override fun onFinishInflate() {
+        super.onFinishInflate()
+
+        back = requireViewById(R.id.background)
+        iconsContainer = requireViewById(R.id.icons_container)
+    }
+
+    // Should only be called if the builder icons or app changed
+    private fun updateView() {
+        back.background = if (expanded) backgroundDrawable else null
+        val padding = if (expanded) sidePadding else 0
+        back.setPaddingRelative(padding, 0, padding, 0)
+        fun setIcons(chipBuilder: PrivacyChipBuilder, iconsContainer: ViewGroup) {
+            iconsContainer.removeAllViews()
+            chipBuilder.generateIcons().forEachIndexed { i, it ->
+                it.mutate()
+                it.setTint(iconColor)
+                val image = ImageView(context).apply {
+                    setImageDrawable(it)
+                    scaleType = ImageView.ScaleType.CENTER_INSIDE
+                }
+                iconsContainer.addView(image, iconSize, iconSize)
+                if (i != 0) {
+                    val lp = image.layoutParams as MarginLayoutParams
+                    lp.marginStart = if (expanded) iconMarginExpanded else iconMarginCollapsed
+                    image.layoutParams = lp
+                }
+            }
+        }
+
+        if (!privacyList.isEmpty()) {
+            generateContentDescription()
+            setIcons(builder, iconsContainer)
+            val lp = iconsContainer.layoutParams as FrameLayout.LayoutParams
+            lp.gravity = Gravity.CENTER_VERTICAL or
+                    (if (expanded) Gravity.CENTER_HORIZONTAL else Gravity.END)
+            iconsContainer.layoutParams = lp
+        } else {
+            iconsContainer.removeAllViews()
+        }
+        requestLayout()
+    }
+
+    private fun generateContentDescription() {
+        val typesText = builder.joinTypes()
+        contentDescription = context.getString(
+                R.string.ongoing_privacy_chip_content_multiple_apps, typesText)
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyChipBuilder.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyChipBuilder.kt
new file mode 100644
index 0000000..1d2e747
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyChipBuilder.kt
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT 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.privacy
+
+import android.content.Context
+import com.android.systemui.R
+
+class PrivacyChipBuilder(private val context: Context, itemsList: List<PrivacyItem>) {
+
+    val appsAndTypes: List<Pair<PrivacyApplication, List<PrivacyType>>>
+    val types: List<PrivacyType>
+    private val separator = context.getString(R.string.ongoing_privacy_dialog_separator)
+    private val lastSeparator = context.getString(R.string.ongoing_privacy_dialog_last_separator)
+
+    init {
+        appsAndTypes = itemsList.groupBy({ it.application }, { it.privacyType })
+                .toList()
+                .sortedWith(compareBy({ -it.second.size }, // Sort by number of AppOps
+                        { it.second.min() })) // Sort by "smallest" AppOpp (Location is largest)
+        types = itemsList.map { it.privacyType }.distinct().sorted()
+    }
+
+    fun generateIcons() = types.map { it.getIcon(context) }
+
+    private fun <T> List<T>.joinWithAnd(): StringBuilder {
+        return subList(0, size - 1).joinTo(StringBuilder(), separator = separator).apply {
+            append(lastSeparator)
+            append(this@joinWithAnd.last())
+        }
+    }
+
+    fun joinTypes(): String {
+        return when (types.size) {
+            0 -> ""
+            1 -> types[0].getName(context)
+            else -> types.map { it.getName(context) }.joinWithAnd().toString()
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyChipEvent.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyChipEvent.kt
new file mode 100644
index 0000000..1f24fde
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyChipEvent.kt
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.privacy
+
+import com.android.internal.logging.UiEvent
+import com.android.internal.logging.UiEventLogger
+
+enum class PrivacyChipEvent(private val _id: Int) : UiEventLogger.UiEventEnum {
+    @UiEvent(doc = "Privacy chip is viewed by the user. Logged at most once per time QS is visible")
+    ONGOING_INDICATORS_CHIP_VIEW(601),
+
+    @UiEvent(doc = "Privacy chip is clicked")
+    ONGOING_INDICATORS_CHIP_CLICK(602);
+
+    override fun getId() = _id
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItem.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItem.kt
new file mode 100644
index 0000000..3da1363
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItem.kt
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT 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.privacy
+
+import android.content.Context
+import com.android.systemui.R
+
+typealias Privacy = PrivacyType
+
+enum class PrivacyType(val nameId: Int, val iconId: Int) {
+    // This is uses the icons used by the corresponding permission groups in the AndroidManifest
+    TYPE_CAMERA(R.string.privacy_type_camera,
+            com.android.internal.R.drawable.perm_group_camera),
+    TYPE_MICROPHONE(R.string.privacy_type_microphone,
+            com.android.internal.R.drawable.perm_group_microphone),
+    TYPE_LOCATION(R.string.privacy_type_location,
+            com.android.internal.R.drawable.perm_group_location);
+
+    fun getName(context: Context) = context.resources.getString(nameId)
+
+    fun getIcon(context: Context) = context.resources.getDrawable(iconId, context.theme)
+}
+
+data class PrivacyItem(val privacyType: PrivacyType, val application: PrivacyApplication)
+
+data class PrivacyApplication(val packageName: String, val uid: Int)
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
new file mode 100644
index 0000000..59118bf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
@@ -0,0 +1,337 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.privacy
+
+import android.app.ActivityManager
+import android.app.AppOpsManager
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import android.content.IntentFilter
+import android.os.UserHandle
+import android.os.UserManager
+import android.provider.DeviceConfig
+import com.android.internal.annotations.VisibleForTesting
+import com.android.internal.config.sysui.SystemUiDeviceConfigFlags
+import com.android.systemui.Dumpable
+import com.android.systemui.appops.AppOpItem
+import com.android.systemui.appops.AppOpsController
+import com.android.systemui.broadcast.BroadcastDispatcher
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.dump.DumpManager
+import com.android.systemui.util.DeviceConfigProxy
+import com.android.systemui.util.concurrency.DelayableExecutor
+import java.io.FileDescriptor
+import java.io.PrintWriter
+import java.lang.ref.WeakReference
+import java.util.concurrent.Executor
+import javax.inject.Inject
+import javax.inject.Singleton
+
+@Singleton
+class PrivacyItemController @Inject constructor(
+    private val appOpsController: AppOpsController,
+    @Main uiExecutor: DelayableExecutor,
+    @Background private val bgExecutor: Executor,
+    private val broadcastDispatcher: BroadcastDispatcher,
+    private val deviceConfigProxy: DeviceConfigProxy,
+    private val userManager: UserManager,
+    dumpManager: DumpManager
+) : Dumpable {
+
+    @VisibleForTesting
+    internal companion object {
+        val OPS_MIC_CAMERA = intArrayOf(AppOpsManager.OP_CAMERA,
+                AppOpsManager.OP_PHONE_CALL_CAMERA, AppOpsManager.OP_RECORD_AUDIO,
+                AppOpsManager.OP_PHONE_CALL_MICROPHONE)
+        val OPS_LOCATION = intArrayOf(
+                AppOpsManager.OP_COARSE_LOCATION,
+                AppOpsManager.OP_FINE_LOCATION)
+        val OPS = OPS_MIC_CAMERA + OPS_LOCATION
+        val intentFilter = IntentFilter().apply {
+            addAction(Intent.ACTION_USER_SWITCHED)
+            addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABLE)
+            addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE)
+        }
+        const val TAG = "PrivacyItemController"
+        private const val ALL_INDICATORS =
+                SystemUiDeviceConfigFlags.PROPERTY_PERMISSIONS_HUB_ENABLED
+        private const val MIC_CAMERA = SystemUiDeviceConfigFlags.PROPERTY_MIC_CAMERA_ENABLED
+    }
+
+    @VisibleForTesting
+    internal var privacyList = emptyList<PrivacyItem>()
+        @Synchronized get() = field.toList() // Returns a shallow copy of the list
+        @Synchronized set
+
+    fun isAllIndicatorsEnabled(): Boolean {
+        return deviceConfigProxy.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
+                ALL_INDICATORS, false)
+    }
+
+    private fun isMicCameraEnabled(): Boolean {
+        return deviceConfigProxy.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
+                MIC_CAMERA, false)
+    }
+
+    private var currentUserIds = emptyList<Int>()
+    private var listening = false
+    private val callbacks = mutableListOf<WeakReference<Callback>>()
+    private val internalUiExecutor = MyExecutor(WeakReference(this), uiExecutor)
+
+    private val notifyChanges = Runnable {
+        val list = privacyList
+        callbacks.forEach { it.get()?.onPrivacyItemsChanged(list) }
+    }
+
+    private val updateListAndNotifyChanges = Runnable {
+        updatePrivacyList()
+        uiExecutor.execute(notifyChanges)
+    }
+
+    var allIndicatorsAvailable = isAllIndicatorsEnabled()
+        private set
+    var micCameraAvailable = isMicCameraEnabled()
+        private set
+
+    private val devicePropertiesChangedListener =
+            object : DeviceConfig.OnPropertiesChangedListener {
+        override fun onPropertiesChanged(properties: DeviceConfig.Properties) {
+                if (DeviceConfig.NAMESPACE_PRIVACY.equals(properties.getNamespace()) &&
+                        (properties.keyset.contains(ALL_INDICATORS) ||
+                                properties.keyset.contains(MIC_CAMERA))) {
+
+                    // Running on the ui executor so can iterate on callbacks
+                    if (properties.keyset.contains(ALL_INDICATORS)) {
+                        allIndicatorsAvailable = properties.getBoolean(ALL_INDICATORS, false)
+                        callbacks.forEach { it.get()?.onFlagAllChanged(allIndicatorsAvailable) }
+                    }
+
+                    if (properties.keyset.contains(MIC_CAMERA)) {
+                        micCameraAvailable = properties.getBoolean(MIC_CAMERA, false)
+                        callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) }
+                    }
+                    internalUiExecutor.updateListeningState()
+                }
+            }
+        }
+
+    private val cb = object : AppOpsController.Callback {
+        override fun onActiveStateChanged(
+            code: Int,
+            uid: Int,
+            packageName: String,
+            active: Boolean
+        ) {
+            // Check if we care about this code right now
+            if (!allIndicatorsAvailable && code in OPS_LOCATION) {
+                return
+            }
+            val userId = UserHandle.getUserId(uid)
+            if (userId in currentUserIds) {
+                update(false)
+            }
+        }
+    }
+
+    @VisibleForTesting
+    internal var userSwitcherReceiver = Receiver()
+        set(value) {
+            unregisterReceiver()
+            field = value
+            if (listening) registerReceiver()
+        }
+
+    init {
+        deviceConfigProxy.addOnPropertiesChangedListener(
+                DeviceConfig.NAMESPACE_PRIVACY,
+                uiExecutor,
+                devicePropertiesChangedListener)
+        dumpManager.registerDumpable(TAG, this)
+    }
+
+    private fun unregisterReceiver() {
+        broadcastDispatcher.unregisterReceiver(userSwitcherReceiver)
+    }
+
+    private fun registerReceiver() {
+        broadcastDispatcher.registerReceiver(userSwitcherReceiver, intentFilter,
+                null /* handler */, UserHandle.ALL)
+    }
+
+    private fun update(updateUsers: Boolean) {
+        bgExecutor.execute {
+            if (updateUsers) {
+                val currentUser = ActivityManager.getCurrentUser()
+                currentUserIds = userManager.getProfiles(currentUser).map { it.id }
+            }
+            updateListAndNotifyChanges.run()
+        }
+    }
+
+    /**
+     * Updates listening status based on whether there are callbacks and the indicators are enabled.
+     *
+     * Always listen to all OPS so we don't have to figure out what we should be listening to. We
+     * still have to filter anyway. Updates are filtered in the callback.
+     *
+     * This is only called from private (add/remove)Callback and from the config listener, all in
+     * main thread.
+     */
+    private fun setListeningState() {
+        val listen = !callbacks.isEmpty() and (allIndicatorsAvailable || micCameraAvailable)
+        if (listening == listen) return
+        listening = listen
+        if (listening) {
+            appOpsController.addCallback(OPS, cb)
+            registerReceiver()
+            update(true)
+        } else {
+            appOpsController.removeCallback(OPS, cb)
+            unregisterReceiver()
+            // Make sure that we remove all indicators and notify listeners if we are not
+            // listening anymore due to indicators being disabled
+            update(false)
+        }
+    }
+
+    private fun addCallback(callback: WeakReference<Callback>) {
+        callbacks.add(callback)
+        if (callbacks.isNotEmpty() && !listening) {
+            internalUiExecutor.updateListeningState()
+        }
+        // Notify this callback if we didn't set to listening
+        else if (listening) {
+            internalUiExecutor.execute(NotifyChangesToCallback(callback.get(), privacyList))
+        }
+    }
+
+    private fun removeCallback(callback: WeakReference<Callback>) {
+        // Removes also if the callback is null
+        callbacks.removeIf { it.get()?.equals(callback.get()) ?: true }
+        if (callbacks.isEmpty()) {
+            internalUiExecutor.updateListeningState()
+        }
+    }
+
+    fun addCallback(callback: Callback) {
+        internalUiExecutor.addCallback(callback)
+    }
+
+    fun removeCallback(callback: Callback) {
+        internalUiExecutor.removeCallback(callback)
+    }
+
+    private fun updatePrivacyList() {
+        if (!listening) {
+            privacyList = emptyList()
+            return
+        }
+        val list = currentUserIds.flatMap { appOpsController.getActiveAppOpsForUser(it) }
+                .mapNotNull { toPrivacyItem(it) }.distinct()
+        privacyList = list
+    }
+
+    private fun toPrivacyItem(appOpItem: AppOpItem): PrivacyItem? {
+        val type: PrivacyType = when (appOpItem.code) {
+            AppOpsManager.OP_PHONE_CALL_CAMERA,
+            AppOpsManager.OP_CAMERA -> PrivacyType.TYPE_CAMERA
+            AppOpsManager.OP_COARSE_LOCATION,
+            AppOpsManager.OP_FINE_LOCATION -> PrivacyType.TYPE_LOCATION
+            AppOpsManager.OP_PHONE_CALL_MICROPHONE,
+            AppOpsManager.OP_RECORD_AUDIO -> PrivacyType.TYPE_MICROPHONE
+            else -> return null
+        }
+        if (type == PrivacyType.TYPE_LOCATION && !allIndicatorsAvailable) return null
+        val app = PrivacyApplication(appOpItem.packageName, appOpItem.uid)
+        return PrivacyItem(type, app)
+    }
+
+    // Used by containing class to get notified of changes
+    interface Callback {
+        fun onPrivacyItemsChanged(privacyItems: List<PrivacyItem>)
+
+        @JvmDefault
+        fun onFlagAllChanged(flag: Boolean) {}
+
+        @JvmDefault
+        fun onFlagMicCameraChanged(flag: Boolean) {}
+    }
+
+    internal inner class Receiver : BroadcastReceiver() {
+        override fun onReceive(context: Context, intent: Intent) {
+            if (intentFilter.hasAction(intent.action)) {
+                update(true)
+            }
+        }
+    }
+
+    private class NotifyChangesToCallback(
+        private val callback: Callback?,
+        private val list: List<PrivacyItem>
+    ) : Runnable {
+        override fun run() {
+            callback?.onPrivacyItemsChanged(list)
+        }
+    }
+
+    override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+        pw.println("PrivacyItemController state:")
+        pw.println("  Listening: $listening")
+        pw.println("  Current user ids: $currentUserIds")
+        pw.println("  Privacy Items:")
+        privacyList.forEach {
+            pw.print("    ")
+            pw.println(it.toString())
+        }
+        pw.println("  Callbacks:")
+        callbacks.forEach {
+            it.get()?.let {
+                pw.print("    ")
+                pw.println(it.toString())
+            }
+        }
+    }
+
+    private class MyExecutor(
+        private val outerClass: WeakReference<PrivacyItemController>,
+        private val delegate: DelayableExecutor
+    ) : Executor {
+
+        private var listeningCanceller: Runnable? = null
+
+        override fun execute(command: Runnable) {
+            delegate.execute(command)
+        }
+
+        fun updateListeningState() {
+            listeningCanceller?.run()
+            listeningCanceller = delegate.executeDelayed({
+                outerClass.get()?.setListeningState()
+            }, 0L)
+        }
+
+        fun addCallback(callback: Callback) {
+            outerClass.get()?.addCallback(WeakReference(callback))
+        }
+
+        fun removeCallback(callback: Callback) {
+            outerClass.get()?.removeCallback(WeakReference(callback))
+        }
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
index 3eed8ad..44803ae 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
@@ -177,6 +177,16 @@
     }
 
     @Override
+    public void endFakeDrag() {
+        try {
+            super.endFakeDrag();
+        } catch (NullPointerException e) {
+            // Not sure what's going on. Let's log it
+            Log.e(TAG, "endFakeDrag called without velocityTracker", e);
+        }
+    }
+
+    @Override
     public void computeScroll() {
         if (!mScroller.isFinished() && mScroller.computeScrollOffset()) {
             if (!isFakeDragging()) {
@@ -185,7 +195,9 @@
             fakeDragBy(getScrollX() - mScroller.getCurrX());
         } else if (isFakeDragging()) {
             endFakeDrag();
-            mBounceAnimatorSet.start();
+            if (mBounceAnimatorSet != null) {
+                mBounceAnimatorSet.start();
+            }
             setOffscreenPageLimit(1);
         }
         super.computeScroll();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFooterImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSFooterImpl.java
index c4bb4e8..6e4ab9a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFooterImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFooterImpl.java
@@ -78,6 +78,8 @@
     private SettingsButton mSettingsButton;
     protected View mSettingsContainer;
     private PageIndicator mPageIndicator;
+    private TextView mBuildText;
+    private boolean mShouldShowBuildText;
 
     private boolean mQsDisabled;
     private QSPanel mQsPanel;
@@ -147,6 +149,7 @@
 
         mActionsContainer = findViewById(R.id.qs_footer_actions_container);
         mEditContainer = findViewById(R.id.qs_footer_actions_edit_container);
+        mBuildText = findViewById(R.id.build);
 
         // RenderThread is doing more harm than good when touching the header (to expand quick
         // settings), so disable it for this view
@@ -162,16 +165,19 @@
     }
 
     private void setBuildText() {
-        TextView v = findViewById(R.id.build);
-        if (v == null) return;
+        if (mBuildText == null) return;
         if (DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)) {
-            v.setText(mContext.getString(
+            mBuildText.setText(mContext.getString(
                     com.android.internal.R.string.bugreport_status,
                     Build.VERSION.RELEASE_OR_CODENAME,
                     Build.ID));
-            v.setVisibility(View.VISIBLE);
+            // Set as selected for marquee before its made visible, then it won't be announced when
+            // it's made visible.
+            mBuildText.setSelected(true);
+            mShouldShowBuildText = true;
         } else {
-            v.setVisibility(View.GONE);
+            mShouldShowBuildText = false;
+            mBuildText.setSelected(false);
         }
     }
 
@@ -321,6 +327,8 @@
         mMultiUserSwitch.setVisibility(showUserSwitcher() ? View.VISIBLE : View.INVISIBLE);
         mEditContainer.setVisibility(isDemo || !mExpanded ? View.INVISIBLE : View.VISIBLE);
         mSettingsButton.setVisibility(isDemo || !mExpanded ? View.INVISIBLE : View.VISIBLE);
+
+        mBuildText.setVisibility(mExpanded && mShouldShowBuildText ? View.VISIBLE : View.GONE);
     }
 
     private boolean showUserSwitcher() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index b07b1a9..58c723c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -31,6 +31,7 @@
 import android.graphics.Rect;
 import android.media.AudioManager;
 import android.os.Handler;
+import android.os.Looper;
 import android.provider.AlarmClock;
 import android.provider.Settings;
 import android.service.notification.ZenModeConfig;
@@ -46,7 +47,9 @@
 import android.view.WindowInsets;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
+import android.widget.Space;
 import android.widget.TextView;
 
 import androidx.annotation.NonNull;
@@ -55,6 +58,7 @@
 import androidx.lifecycle.LifecycleOwner;
 import androidx.lifecycle.LifecycleRegistry;
 
+import com.android.internal.logging.UiEventLogger;
 import com.android.settingslib.Utils;
 import com.android.systemui.BatteryMeterView;
 import com.android.systemui.DualToneHandler;
@@ -63,6 +67,11 @@
 import com.android.systemui.plugins.ActivityStarter;
 import com.android.systemui.plugins.DarkIconDispatcher;
 import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
+import com.android.systemui.privacy.OngoingPrivacyChip;
+import com.android.systemui.privacy.PrivacyChipBuilder;
+import com.android.systemui.privacy.PrivacyChipEvent;
+import com.android.systemui.privacy.PrivacyItem;
+import com.android.systemui.privacy.PrivacyItemController;
 import com.android.systemui.qs.QSDetail.Callback;
 import com.android.systemui.qs.carrier.QSCarrierGroup;
 import com.android.systemui.statusbar.CommandQueue;
@@ -101,7 +110,6 @@
     private static final int TOOLTIP_NOT_YET_SHOWN_COUNT = 0;
     public static final int MAX_TOOLTIP_SHOWN_COUNT = 2;
 
-    private final Handler mHandler = new Handler();
     private final NextAlarmController mAlarmController;
     private final ZenModeController mZenController;
     private final StatusBarIconController mStatusBarIconController;
@@ -140,9 +148,15 @@
     private View mRingerContainer;
     private Clock mClockView;
     private DateView mDateView;
+    private OngoingPrivacyChip mPrivacyChip;
+    private Space mSpace;
     private BatteryMeterView mBatteryRemainingIcon;
     private RingerModeTracker mRingerModeTracker;
+    private boolean mAllIndicatorsEnabled;
+    private boolean mMicCameraIndicatorsEnabled;
 
+    private PrivacyItemController mPrivacyItemController;
+    private final UiEventLogger mUiEventLogger;
     // Used for RingerModeTracker
     private final LifecycleRegistry mLifecycle = new LifecycleRegistry(this);
 
@@ -156,22 +170,56 @@
     private int mCutOutPaddingRight;
     private float mExpandedHeaderAlpha = 1.0f;
     private float mKeyguardExpansionFraction;
+    private boolean mPrivacyChipLogged = false;
+
+    private PrivacyItemController.Callback mPICCallback = new PrivacyItemController.Callback() {
+        @Override
+        public void onPrivacyItemsChanged(List<PrivacyItem> privacyItems) {
+            mPrivacyChip.setPrivacyList(privacyItems);
+            setChipVisibility(!privacyItems.isEmpty());
+        }
+
+        @Override
+        public void onFlagAllChanged(boolean flag) {
+            if (mAllIndicatorsEnabled != flag) {
+                mAllIndicatorsEnabled = flag;
+                update();
+            }
+        }
+
+        @Override
+        public void onFlagMicCameraChanged(boolean flag) {
+            if (mMicCameraIndicatorsEnabled != flag) {
+                mMicCameraIndicatorsEnabled = flag;
+                update();
+            }
+        }
+
+        private void update() {
+            StatusIconContainer iconContainer = requireViewById(R.id.statusIcons);
+            iconContainer.setIgnoredSlots(getIgnoredIconSlots());
+            setChipVisibility(!mPrivacyChip.getPrivacyList().isEmpty());
+        }
+    };
 
     @Inject
     public QuickStatusBarHeader(@Named(VIEW_CONTEXT) Context context, AttributeSet attrs,
             NextAlarmController nextAlarmController, ZenModeController zenModeController,
             StatusBarIconController statusBarIconController,
-            ActivityStarter activityStarter,
-            CommandQueue commandQueue, RingerModeTracker ringerModeTracker) {
+            ActivityStarter activityStarter, PrivacyItemController privacyItemController,
+            CommandQueue commandQueue, RingerModeTracker ringerModeTracker,
+            UiEventLogger uiEventLogger) {
         super(context, attrs);
         mAlarmController = nextAlarmController;
         mZenController = zenModeController;
         mStatusBarIconController = statusBarIconController;
         mActivityStarter = activityStarter;
+        mPrivacyItemController = privacyItemController;
         mDualToneHandler = new DualToneHandler(
                 new ContextThemeWrapper(context, R.style.QSHeaderTheme));
         mCommandQueue = commandQueue;
         mRingerModeTracker = ringerModeTracker;
+        mUiEventLogger = uiEventLogger;
     }
 
     @Override
@@ -198,8 +246,11 @@
         mRingerModeTextView = findViewById(R.id.ringer_mode_text);
         mRingerContainer = findViewById(R.id.ringer_container);
         mRingerContainer.setOnClickListener(this::onClick);
+        mPrivacyChip = findViewById(R.id.privacy_chip);
+        mPrivacyChip.setOnClickListener(this::onClick);
         mCarrierGroup = findViewById(R.id.carrier_group);
 
+
         updateResources();
 
         Rect tintArea = new Rect(0, 0, 0, 0);
@@ -219,6 +270,7 @@
         mClockView = findViewById(R.id.clock);
         mClockView.setOnClickListener(this);
         mDateView = findViewById(R.id.date);
+        mSpace = findViewById(R.id.space);
 
         // Tint for the battery icons are handled in setupHost()
         mBatteryRemainingIcon = findViewById(R.id.batteryRemainingIcon);
@@ -229,6 +281,9 @@
         mBatteryRemainingIcon.setPercentShowMode(BatteryMeterView.MODE_ESTIMATE);
         mRingerModeTextView.setSelected(true);
         mNextAlarmTextView.setSelected(true);
+
+        mAllIndicatorsEnabled = mPrivacyItemController.getAllIndicatorsAvailable();
+        mMicCameraIndicatorsEnabled = mPrivacyItemController.getMicCameraAvailable();
     }
 
     public QuickQSPanel getHeaderQsPanel() {
@@ -237,10 +292,16 @@
 
     private List<String> getIgnoredIconSlots() {
         ArrayList<String> ignored = new ArrayList<>();
-        ignored.add(mContext.getResources().getString(
-                com.android.internal.R.string.status_bar_camera));
-        ignored.add(mContext.getResources().getString(
-                com.android.internal.R.string.status_bar_microphone));
+        if (getChipEnabled()) {
+            ignored.add(mContext.getResources().getString(
+                    com.android.internal.R.string.status_bar_camera));
+            ignored.add(mContext.getResources().getString(
+                    com.android.internal.R.string.status_bar_microphone));
+            if (mAllIndicatorsEnabled) {
+                ignored.add(mContext.getResources().getString(
+                        com.android.internal.R.string.status_bar_location));
+            }
+        }
 
         return ignored;
     }
@@ -256,6 +317,20 @@
         }
     }
 
+    private void setChipVisibility(boolean chipVisible) {
+        if (chipVisible && getChipEnabled()) {
+            mPrivacyChip.setVisibility(View.VISIBLE);
+            // Makes sure that the chip is logged as viewed at most once each time QS is opened
+            // mListening makes sure that the callback didn't return after the user closed QS
+            if (!mPrivacyChipLogged && mListening) {
+                mPrivacyChipLogged = true;
+                mUiEventLogger.log(PrivacyChipEvent.ONGOING_INDICATORS_CHIP_VIEW);
+            }
+        } else {
+            mPrivacyChip.setVisibility(View.GONE);
+        }
+    }
+
     private boolean updateRingerStatus() {
         boolean isOriginalVisible = mRingerModeTextView.getVisibility() == View.VISIBLE;
         CharSequence originalRingerText = mRingerModeTextView.getText();
@@ -363,6 +438,7 @@
 
         updateStatusIconAlphaAnimator();
         updateHeaderTextContainerAlphaAnimator();
+        updatePrivacyChipAlphaAnimator();
     }
 
     private void updateStatusIconAlphaAnimator() {
@@ -377,6 +453,12 @@
                 .build();
     }
 
+    private void updatePrivacyChipAlphaAnimator() {
+        mPrivacyChipAlphaAnimator = new TouchAnimator.Builder()
+                .addFloat(mPrivacyChip, "alpha", 1, 0, 1)
+                .build();
+    }
+
     public void setExpanded(boolean expanded) {
         if (mExpanded == expanded) return;
         mExpanded = expanded;
@@ -415,6 +497,10 @@
                 mHeaderTextContainerView.setVisibility(INVISIBLE);
             }
         }
+        if (mPrivacyChipAlphaAnimator != null) {
+            mPrivacyChip.setExpanded(expansionFraction > 0.5);
+            mPrivacyChipAlphaAnimator.setPosition(keyguardExpansionFraction);
+        }
         if (expansionFraction < 1 && expansionFraction > 0.99) {
             if (mHeaderQsPanel.switchTileLayout()) {
                 updateResources();
@@ -453,6 +539,31 @@
         Pair<Integer, Integer> padding =
                 StatusBarWindowView.paddingNeededForCutoutAndRoundedCorner(
                         cutout, cornerCutoutPadding, -1);
+        if (padding == null) {
+            mSystemIconsView.setPaddingRelative(
+                    getResources().getDimensionPixelSize(R.dimen.status_bar_padding_start), 0,
+                    getResources().getDimensionPixelSize(R.dimen.status_bar_padding_end), 0);
+        } else {
+            mSystemIconsView.setPadding(padding.first, 0, padding.second, 0);
+
+        }
+        LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mSpace.getLayoutParams();
+        boolean cornerCutout = cornerCutoutPadding != null
+                && (cornerCutoutPadding.first == 0 || cornerCutoutPadding.second == 0);
+        if (cutout != null) {
+            Rect topCutout = cutout.getBoundingRectTop();
+            if (topCutout.isEmpty() || cornerCutout) {
+                mHasTopCutout = false;
+                lp.width = 0;
+                mSpace.setVisibility(View.GONE);
+            } else {
+                mHasTopCutout = true;
+                lp.width = topCutout.width();
+                mSpace.setVisibility(View.VISIBLE);
+            }
+        }
+        mSpace.setLayoutParams(lp);
+        setChipVisibility(mPrivacyChip.getVisibility() == View.VISIBLE);
         mCutOutPaddingLeft = padding.first;
         mCutOutPaddingRight = padding.second;
         mWaterfallTopInset = cutout == null ? 0 : cutout.getWaterfallInsets().top;
@@ -513,10 +624,16 @@
             mZenController.addCallback(this);
             mAlarmController.addCallback(this);
             mLifecycle.setCurrentState(Lifecycle.State.RESUMED);
+            // Get the most up to date info
+            mAllIndicatorsEnabled = mPrivacyItemController.getAllIndicatorsAvailable();
+            mMicCameraIndicatorsEnabled = mPrivacyItemController.getMicCameraAvailable();
+            mPrivacyItemController.addCallback(mPICCallback);
         } else {
             mZenController.removeCallback(this);
             mAlarmController.removeCallback(this);
             mLifecycle.setCurrentState(Lifecycle.State.CREATED);
+            mPrivacyItemController.removeCallback(mPICCallback);
+            mPrivacyChipLogged = false;
         }
     }
 
@@ -534,6 +651,17 @@
                 mActivityStarter.postStartActivityDismissingKeyguard(new Intent(
                         AlarmClock.ACTION_SHOW_ALARMS), 0);
             }
+        } else if (v == mPrivacyChip) {
+            // Makes sure that the builder is grabbed as soon as the chip is pressed
+            PrivacyChipBuilder builder = mPrivacyChip.getBuilder();
+            if (builder.getAppsAndTypes().size() == 0) return;
+            Handler mUiHandler = new Handler(Looper.getMainLooper());
+            mUiEventLogger.log(PrivacyChipEvent.ONGOING_INDICATORS_CHIP_CLICK);
+            mUiHandler.post(() -> {
+                mActivityStarter.postStartActivityDismissingKeyguard(
+                        new Intent(Intent.ACTION_REVIEW_ONGOING_PERMISSION_USAGE), 0);
+                mHost.collapsePanels();
+            });
         } else if (v == mRingerContainer && mRingerContainer.isVisibleToUser()) {
             mActivityStarter.postStartActivityDismissingKeyguard(new Intent(
                     Settings.ACTION_SOUND_SETTINGS), 0);
@@ -640,4 +768,8 @@
             updateHeaderTextContainerAlphaAnimator();
         }
     }
+
+    private boolean getChipEnabled() {
+        return mMicCameraIndicatorsEnabled || mAllIndicatorsEnabled;
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
index e738cec..bffeb3e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
@@ -14,11 +14,8 @@
 
 package com.android.systemui.qs.customize;
 
-import android.app.AlertDialog;
-import android.app.AlertDialog.Builder;
 import android.content.ComponentName;
 import android.content.Context;
-import android.content.DialogInterface;
 import android.content.res.Resources;
 import android.graphics.Canvas;
 import android.graphics.drawable.Drawable;
@@ -28,10 +25,11 @@
 import android.view.View.OnClickListener;
 import android.view.View.OnLayoutChangeListener;
 import android.view.ViewGroup;
-import android.view.accessibility.AccessibilityManager;
 import android.widget.FrameLayout;
 import android.widget.TextView;
 
+import androidx.annotation.NonNull;
+import androidx.core.view.AccessibilityDelegateCompat;
 import androidx.core.view.ViewCompat;
 import androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup;
 import androidx.recyclerview.widget.ItemTouchHelper;
@@ -49,7 +47,6 @@
 import com.android.systemui.qs.customize.TileQueryHelper.TileStateListener;
 import com.android.systemui.qs.external.CustomTile;
 import com.android.systemui.qs.tileimpl.QSIconViewImpl;
-import com.android.systemui.statusbar.phone.SystemUIDialog;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -78,10 +75,10 @@
     private final List<TileInfo> mTiles = new ArrayList<>();
     private final ItemTouchHelper mItemTouchHelper;
     private final ItemDecoration mDecoration;
-    private final AccessibilityManager mAccessibilityManager;
     private final int mMinNumTiles;
     private int mEditIndex;
     private int mTileDividerIndex;
+    private int mFocusIndex;
     private boolean mNeedsFocus;
     private List<String> mCurrentSpecs;
     private List<TileInfo> mOtherTiles;
@@ -90,17 +87,28 @@
     private Holder mCurrentDrag;
     private int mAccessibilityAction = ACTION_NONE;
     private int mAccessibilityFromIndex;
-    private CharSequence mAccessibilityFromLabel;
     private QSTileHost mHost;
     private final UiEventLogger mUiEventLogger;
+    private final AccessibilityDelegateCompat mAccessibilityDelegate;
+    private RecyclerView mRecyclerView;
 
     public TileAdapter(Context context, UiEventLogger uiEventLogger) {
         mContext = context;
         mUiEventLogger = uiEventLogger;
-        mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
         mItemTouchHelper = new ItemTouchHelper(mCallbacks);
         mDecoration = new TileItemDecoration(context);
         mMinNumTiles = context.getResources().getInteger(R.integer.quick_settings_min_num_tiles);
+        mAccessibilityDelegate = new TileAdapterDelegate();
+    }
+
+    @Override
+    public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
+        mRecyclerView = recyclerView;
+    }
+
+    @Override
+    public void onDetachedFromRecyclerView(@NonNull RecyclerView recyclerView) {
+        mRecyclerView = null;
     }
 
     public void setHost(QSTileHost host) {
@@ -130,7 +138,6 @@
             // Remove blank tile from last spot
             mTiles.remove(--mEditIndex);
             // Update the tile divider position
-            mTileDividerIndex--;
             notifyDataSetChanged();
         }
         mAccessibilityAction = ACTION_NONE;
@@ -241,14 +248,12 @@
     }
 
     private void setSelectableForHeaders(View view) {
-        if (mAccessibilityManager.isTouchExplorationEnabled()) {
-            final boolean selectable = mAccessibilityAction == ACTION_NONE;
-            view.setFocusable(selectable);
-            view.setImportantForAccessibility(selectable
-                    ? View.IMPORTANT_FOR_ACCESSIBILITY_YES
-                    : View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
-            view.setFocusableInTouchMode(selectable);
-        }
+        final boolean selectable = mAccessibilityAction == ACTION_NONE;
+        view.setFocusable(selectable);
+        view.setImportantForAccessibility(selectable
+                ? View.IMPORTANT_FOR_ACCESSIBILITY_YES
+                : View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
+        view.setFocusableInTouchMode(selectable);
     }
 
     @Override
@@ -285,12 +290,11 @@
             holder.mTileView.setVisibility(View.VISIBLE);
             holder.mTileView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
             holder.mTileView.setContentDescription(mContext.getString(
-                    R.string.accessibility_qs_edit_tile_add, mAccessibilityFromLabel,
-                    position));
+                    R.string.accessibility_qs_edit_tile_add_to_position, position));
             holder.mTileView.setOnClickListener(new OnClickListener() {
                 @Override
                 public void onClick(View v) {
-                    selectPosition(holder.getAdapterPosition(), v);
+                    selectPosition(holder.getLayoutPosition());
                 }
             });
             focusOnHolder(holder);
@@ -299,54 +303,49 @@
 
         TileInfo info = mTiles.get(position);
 
-        if (position > mEditIndex) {
+        final boolean selectable = 0 < position && position < mEditIndex;
+        if (selectable && mAccessibilityAction == ACTION_ADD) {
             info.state.contentDescription = mContext.getString(
-                    R.string.accessibility_qs_edit_add_tile_label, info.state.label);
-        } else if (mAccessibilityAction == ACTION_ADD) {
+                    R.string.accessibility_qs_edit_tile_add_to_position, position);
+        } else if (selectable && mAccessibilityAction == ACTION_MOVE) {
             info.state.contentDescription = mContext.getString(
-                    R.string.accessibility_qs_edit_tile_add, mAccessibilityFromLabel, position);
-        } else if (mAccessibilityAction == ACTION_MOVE) {
-            info.state.contentDescription = mContext.getString(
-                    R.string.accessibility_qs_edit_tile_move, mAccessibilityFromLabel, position);
+                    R.string.accessibility_qs_edit_tile_move_to_position, position);
         } else {
-            info.state.contentDescription = mContext.getString(
-                    R.string.accessibility_qs_edit_tile_label, position, info.state.label);
+            info.state.contentDescription = info.state.label;
         }
+        info.state.expandedAccessibilityClassName = "";
+
         holder.mTileView.handleStateChanged(info.state);
         holder.mTileView.setShowAppLabel(position > mEditIndex && !info.isSystem);
+        holder.mTileView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
+        holder.mTileView.setClickable(true);
+        holder.mTileView.setOnClickListener(null);
+        holder.mTileView.setFocusable(true);
+        holder.mTileView.setFocusableInTouchMode(true);
 
-        if (mAccessibilityManager.isTouchExplorationEnabled()) {
-            final boolean selectable = mAccessibilityAction == ACTION_NONE || position < mEditIndex;
+        if (mAccessibilityAction != ACTION_NONE) {
             holder.mTileView.setClickable(selectable);
             holder.mTileView.setFocusable(selectable);
+            holder.mTileView.setFocusableInTouchMode(selectable);
             holder.mTileView.setImportantForAccessibility(selectable
                     ? View.IMPORTANT_FOR_ACCESSIBILITY_YES
                     : View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
-            holder.mTileView.setFocusableInTouchMode(selectable);
             if (selectable) {
                 holder.mTileView.setOnClickListener(new OnClickListener() {
                     @Override
                     public void onClick(View v) {
-                        int position = holder.getAdapterPosition();
+                        int position = holder.getLayoutPosition();
                         if (position == RecyclerView.NO_POSITION) return;
                         if (mAccessibilityAction != ACTION_NONE) {
-                            selectPosition(position, v);
-                        } else {
-                            if (position < mEditIndex && canRemoveTiles()) {
-                                showAccessibilityDialog(position, v);
-                            } else if (position < mEditIndex && !canRemoveTiles()) {
-                                startAccessibleMove(position);
-                            } else {
-                                startAccessibleAdd(position);
-                            }
+                            selectPosition(position);
                         }
                     }
                 });
-                if (position == mAccessibilityFromIndex) {
-                    focusOnHolder(holder);
-                }
             }
         }
+        if (position == mFocusIndex) {
+            focusOnHolder(holder);
+        }
     }
 
     private void focusOnHolder(Holder holder) {
@@ -360,9 +359,13 @@
                         int oldLeft, int oldTop, int oldRight, int oldBottom) {
                     holder.mTileView.removeOnLayoutChangeListener(this);
                     holder.mTileView.requestFocus();
+                    if (mAccessibilityAction == ACTION_NONE) {
+                        holder.mTileView.clearFocus();
+                    }
                 }
             });
             mNeedsFocus = false;
+            mFocusIndex = RecyclerView.NO_POSITION;
         }
     }
 
@@ -370,72 +373,77 @@
         return mCurrentSpecs.size() > mMinNumTiles;
     }
 
-    private void selectPosition(int position, View v) {
+    private void selectPosition(int position) {
         if (mAccessibilityAction == ACTION_ADD) {
             // Remove the placeholder.
             mTiles.remove(mEditIndex--);
-            notifyItemRemoved(mEditIndex);
         }
         mAccessibilityAction = ACTION_NONE;
-        move(mAccessibilityFromIndex, position, v);
+        move(mAccessibilityFromIndex, position, false);
+        mFocusIndex = position;
+        mNeedsFocus = true;
         notifyDataSetChanged();
     }
 
-    private void showAccessibilityDialog(final int position, final View v) {
-        final TileInfo info = mTiles.get(position);
-        CharSequence[] options = new CharSequence[] {
-                mContext.getString(R.string.accessibility_qs_edit_move_tile, info.state.label),
-                mContext.getString(R.string.accessibility_qs_edit_remove_tile, info.state.label),
-        };
-        AlertDialog dialog = new Builder(mContext)
-                .setItems(options, new DialogInterface.OnClickListener() {
-                    @Override
-                    public void onClick(DialogInterface dialog, int which) {
-                        if (which == 0) {
-                            startAccessibleMove(position);
-                        } else {
-                            move(position, info.isSystem ? mEditIndex : mTileDividerIndex, v);
-                            notifyItemChanged(mTileDividerIndex);
-                            notifyDataSetChanged();
-                        }
-                    }
-                }).setNegativeButton(android.R.string.cancel, null)
-                .create();
-        SystemUIDialog.setShowForAllUsers(dialog, true);
-        SystemUIDialog.applyFlags(dialog);
-        dialog.show();
-    }
-
     private void startAccessibleAdd(int position) {
         mAccessibilityFromIndex = position;
-        mAccessibilityFromLabel = mTiles.get(position).state.label;
         mAccessibilityAction = ACTION_ADD;
         // Add placeholder for last slot.
         mTiles.add(mEditIndex++, null);
         // Update the tile divider position
         mTileDividerIndex++;
+        mFocusIndex = mEditIndex - 1;
         mNeedsFocus = true;
+        if (mRecyclerView != null) {
+            mRecyclerView.post(() -> mRecyclerView.smoothScrollToPosition(mFocusIndex));
+        }
         notifyDataSetChanged();
     }
 
     private void startAccessibleMove(int position) {
         mAccessibilityFromIndex = position;
-        mAccessibilityFromLabel = mTiles.get(position).state.label;
         mAccessibilityAction = ACTION_MOVE;
+        mFocusIndex = position;
         mNeedsFocus = true;
         notifyDataSetChanged();
     }
 
+    private boolean canRemoveFromPosition(int position) {
+        return canRemoveTiles() && isCurrentTile(position);
+    }
+
+    private boolean isCurrentTile(int position) {
+        return position < mEditIndex;
+    }
+
+    private boolean canAddFromPosition(int position) {
+        return position > mEditIndex;
+    }
+
+    private void addFromPosition(int position) {
+        if (!canAddFromPosition(position)) return;
+        move(position, mEditIndex);
+    }
+
+    private void removeFromPosition(int position) {
+        if (!canRemoveFromPosition(position)) return;
+        TileInfo info = mTiles.get(position);
+        move(position, info.isSystem ? mEditIndex : mTileDividerIndex);
+    }
+
     public SpanSizeLookup getSizeLookup() {
         return mSizeLookup;
     }
 
-    private boolean move(int from, int to, View v) {
+    private boolean move(int from, int to) {
+        return move(from, to, true);
+    }
+
+    private boolean move(int from, int to, boolean notify) {
         if (to == from) {
             return true;
         }
-        CharSequence fromLabel = mTiles.get(from).state.label;
-        move(from, to, mTiles);
+        move(from, to, mTiles, notify);
         updateDividerLocations();
         if (to >= mEditIndex) {
             mUiEventLogger.log(QSEditEvent.QS_EDIT_REMOVE, 0, strip(mTiles.get(to)));
@@ -477,9 +485,11 @@
         return spec;
     }
 
-    private <T> void move(int from, int to, List<T> list) {
+    private <T> void move(int from, int to, List<T> list, boolean notify) {
         list.add(to, list.remove(from));
-        notifyItemMoved(from, to);
+        if (notify) {
+            notifyItemMoved(from, to);
+        }
     }
 
     public class Holder extends ViewHolder {
@@ -491,6 +501,8 @@
                 mTileView = (CustomizeTileView) ((FrameLayout) itemView).getChildAt(0);
                 mTileView.setBackground(null);
                 mTileView.getIcon().disableAnimation();
+                mTileView.setTag(this);
+                ViewCompat.setAccessibilityDelegate(mTileView, mAccessibilityDelegate);
             }
         }
 
@@ -527,6 +539,46 @@
                     .setDuration(DRAG_LENGTH)
                     .alpha(.6f);
         }
+
+        boolean canRemove() {
+            return canRemoveFromPosition(getLayoutPosition());
+        }
+
+        boolean canAdd() {
+            return canAddFromPosition(getLayoutPosition());
+        }
+
+        void toggleState() {
+            if (canAdd()) {
+                add();
+            } else {
+                remove();
+            }
+        }
+
+        private void add() {
+            addFromPosition(getLayoutPosition());
+        }
+
+        private void remove() {
+            removeFromPosition(getLayoutPosition());
+        }
+
+        boolean isCurrentTile() {
+            return TileAdapter.this.isCurrentTile(getLayoutPosition());
+        }
+
+        void startAccessibleAdd() {
+            TileAdapter.this.startAccessibleAdd(getLayoutPosition());
+        }
+
+        void startAccessibleMove() {
+            TileAdapter.this.startAccessibleMove(getLayoutPosition());
+        }
+
+        boolean canTakeAccessibleAction() {
+            return mAccessibilityAction == ACTION_NONE;
+        }
     }
 
     private final SpanSizeLookup mSizeLookup = new SpanSizeLookup() {
@@ -648,7 +700,7 @@
                     to == 0 || to == RecyclerView.NO_POSITION) {
                 return false;
             }
-            return move(from, to, target.itemView);
+            return move(from, to);
         }
 
         @Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapterDelegate.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapterDelegate.java
new file mode 100644
index 0000000..1e426ad
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapterDelegate.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.qs.customize;
+
+import android.os.Bundle;
+import android.view.View;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+import androidx.core.view.AccessibilityDelegateCompat;
+import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
+
+import com.android.systemui.R;
+
+import java.util.List;
+
+/**
+ * Accessibility delegate for {@link TileAdapter} views.
+ *
+ * This delegate will populate the accessibility info with the proper actions that can be taken for
+ * the different tiles:
+ * <ul>
+ *   <li>Add to end if the tile is not a current tile (by double tap).</li>
+ *   <li>Add to a given position (by context menu). This will let the user select a position.</li>
+ *   <li>Remove, if the tile is a current tile (by double tap).</li>
+ *   <li>Move to a given position (by context menu). This will let the user select a position.</li>
+ * </ul>
+ *
+ * This only handles generating the associated actions. The logic for selecting positions is handled
+ * by {@link TileAdapter}.
+ *
+ * In order for the delegate to work properly, the asociated {@link TileAdapter.Holder} should be
+ * passed along with the view using {@link View#setTag}.
+ */
+class TileAdapterDelegate extends AccessibilityDelegateCompat {
+
+    private static final int MOVE_TO_POSITION_ID = R.id.accessibility_action_qs_move_to_position;
+    private static final int ADD_TO_POSITION_ID = R.id.accessibility_action_qs_add_to_position;
+
+    private TileAdapter.Holder getHolder(View view) {
+        return (TileAdapter.Holder) view.getTag();
+    }
+
+    @Override
+    public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
+        super.onInitializeAccessibilityNodeInfo(host, info);
+        TileAdapter.Holder holder = getHolder(host);
+        info.setCollectionItemInfo(null);
+        info.setStateDescription("");
+        if (holder == null || !holder.canTakeAccessibleAction()) {
+            // If there's not a holder (not a regular Tile) or an action cannot be taken
+            // because we are in the middle of an accessibility action, don't create a special node.
+            return;
+        }
+
+        addClickAction(host, info, holder);
+        maybeAddActionAddToPosition(host, info, holder);
+        maybeAddActionMoveToPosition(host, info, holder);
+
+        if (holder.isCurrentTile()) {
+            info.setStateDescription(host.getContext().getString(
+                    R.string.accessibility_qs_edit_position, holder.getLayoutPosition()));
+        }
+    }
+
+    @Override
+    public boolean performAccessibilityAction(View host, int action, Bundle args) {
+        TileAdapter.Holder holder = getHolder(host);
+
+        if (holder == null || !holder.canTakeAccessibleAction()) {
+            // If there's not a holder (not a regular Tile) or an action cannot be taken
+            // because we are in the middle of an accessibility action, perform the default action.
+            return super.performAccessibilityAction(host, action, args);
+        }
+        if (action == AccessibilityNodeInfo.ACTION_CLICK) {
+            holder.toggleState();
+            return true;
+        } else if (action == MOVE_TO_POSITION_ID) {
+            holder.startAccessibleMove();
+            return true;
+        } else if (action == ADD_TO_POSITION_ID) {
+            holder.startAccessibleAdd();
+            return true;
+        } else {
+            return super.performAccessibilityAction(host, action, args);
+        }
+    }
+
+    private void addClickAction(
+            View host, AccessibilityNodeInfoCompat info, TileAdapter.Holder holder) {
+        String clickActionString;
+        if (holder.canAdd()) {
+            clickActionString = host.getContext().getString(
+                    R.string.accessibility_qs_edit_tile_add_action);
+        } else if (holder.canRemove()) {
+            clickActionString = host.getContext().getString(
+                    R.string.accessibility_qs_edit_remove_tile_action);
+        } else {
+            // Remove the default click action if tile can't either be added or removed (for example
+            // if there's the minimum number of tiles)
+            List<AccessibilityNodeInfoCompat.AccessibilityActionCompat> listOfActions =
+                    info.getActionList(); // This is a copy
+            int numActions = listOfActions.size();
+            for (int i = 0; i < numActions; i++) {
+                if (listOfActions.get(i).getId() == AccessibilityNodeInfo.ACTION_CLICK) {
+                    info.removeAction(listOfActions.get(i));
+                }
+            }
+            return;
+        }
+
+        AccessibilityNodeInfoCompat.AccessibilityActionCompat action =
+                new AccessibilityNodeInfoCompat.AccessibilityActionCompat(
+                        AccessibilityNodeInfo.ACTION_CLICK, clickActionString);
+        info.addAction(action);
+    }
+
+    private void maybeAddActionMoveToPosition(
+            View host, AccessibilityNodeInfoCompat info, TileAdapter.Holder holder) {
+        if (holder.isCurrentTile()) {
+            AccessibilityNodeInfoCompat.AccessibilityActionCompat action =
+                    new AccessibilityNodeInfoCompat.AccessibilityActionCompat(MOVE_TO_POSITION_ID,
+                            host.getContext().getString(
+                                    R.string.accessibility_qs_edit_tile_start_move));
+            info.addAction(action);
+        }
+    }
+
+    private void maybeAddActionAddToPosition(
+            View host, AccessibilityNodeInfoCompat info, TileAdapter.Holder holder) {
+        if (holder.canAdd()) {
+            AccessibilityNodeInfoCompat.AccessibilityActionCompat action =
+                    new AccessibilityNodeInfoCompat.AccessibilityActionCompat(ADD_TO_POSITION_ID,
+                            host.getContext().getString(
+                                    R.string.accessibility_qs_edit_tile_start_add));
+            info.addAction(action);
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BatterySaverTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BatterySaverTile.java
index f249504..7150e43 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BatterySaverTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BatterySaverTile.java
@@ -111,6 +111,7 @@
                 : mPowerSave ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
         state.icon = mIcon;
         state.label = mContext.getString(R.string.battery_detail_switch_title);
+        state.secondaryLabel = "";
         state.contentDescription = state.label;
         state.value = mPowerSave;
         state.expandedAccessibilityClassName = Switch.class.getName();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
index 077c7aa..33e98d8 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
@@ -118,7 +118,8 @@
             return;
         }
         String carrierName = mController.getMobileDataNetworkName();
-        if (TextUtils.isEmpty(carrierName)) {
+        boolean isInService = mController.isMobileDataNetworkInService();
+        if (TextUtils.isEmpty(carrierName) || !isInService) {
             carrierName = mContext.getString(R.string.mobile_data_disable_message_default_carrier);
         }
         AlertDialog dialog = new Builder(mContext)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
index 2f58272..acd2846 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
@@ -60,7 +60,7 @@
     private static final String PATTERN_HOUR_MINUTE = "h:mm a";
     private static final String PATTERN_HOUR_NINUTE_24 = "HH:mm";
 
-    private final ColorDisplayManager mManager;
+    private ColorDisplayManager mManager;
     private final LocationController mLocationController;
     private NightDisplayListener mListener;
     private boolean mIsListening;
@@ -105,6 +105,8 @@
             mListener.setCallback(null);
         }
 
+        mManager = getHost().getUserContext().getSystemService(ColorDisplayManager.class);
+
         // Make a new controller for the new user.
         mListener = new NightDisplayListener(mContext, newUserId, new Handler(Looper.myLooper()));
         if (mIsListening) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/UiModeNightTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/UiModeNightTile.java
index 7b83c20..f777553 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/UiModeNightTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/UiModeNightTile.java
@@ -50,16 +50,15 @@
     public static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("hh:mm a");
     private final Icon mIcon = ResourceIcon.get(
             com.android.internal.R.drawable.ic_qs_ui_mode_night);
-    private final UiModeManager mUiModeManager;
+    private UiModeManager mUiModeManager;
     private final BatteryController mBatteryController;
     private final LocationController mLocationController;
-
     @Inject
     public UiModeNightTile(QSHost host, ConfigurationController configurationController,
             BatteryController batteryController, LocationController locationController) {
         super(host);
         mBatteryController = batteryController;
-        mUiModeManager = mContext.getSystemService(UiModeManager.class);
+        mUiModeManager = host.getUserContext().getSystemService(UiModeManager.class);
         mLocationController = locationController;
         configurationController.observe(getLifecycle(), this);
         batteryController.observe(getLifecycle(), this);
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java
index 476ec79..8ec3db5 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java
@@ -21,7 +21,6 @@
 import android.app.NotificationManager;
 import android.app.PendingIntent;
 import android.app.Service;
-import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
@@ -42,6 +41,7 @@
 import com.android.systemui.R;
 import com.android.systemui.dagger.qualifiers.LongRunning;
 import com.android.systemui.settings.CurrentUserContextTracker;
+import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
 
 import java.io.IOException;
 import java.util.concurrent.Executor;
@@ -69,10 +69,9 @@
     private static final String ACTION_STOP_NOTIF =
             "com.android.systemui.screenrecord.STOP_FROM_NOTIF";
     private static final String ACTION_SHARE = "com.android.systemui.screenrecord.SHARE";
-    private static final String ACTION_DELETE = "com.android.systemui.screenrecord.DELETE";
 
     private final RecordingController mController;
-
+    private final KeyguardDismissUtil mKeyguardDismissUtil;
     private ScreenRecordingAudioSource mAudioSource;
     private boolean mShowTaps;
     private boolean mOriginalShowTaps;
@@ -85,12 +84,13 @@
     @Inject
     public RecordingService(RecordingController controller, @LongRunning Executor executor,
             UiEventLogger uiEventLogger, NotificationManager notificationManager,
-            CurrentUserContextTracker userContextTracker) {
+            CurrentUserContextTracker userContextTracker, KeyguardDismissUtil keyguardDismissUtil) {
         mController = controller;
         mLongExecutor = executor;
         mUiEventLogger = uiEventLogger;
         mNotificationManager = notificationManager;
         mUserContextTracker = userContextTracker;
+        mKeyguardDismissUtil = keyguardDismissUtil;
     }
 
     /**
@@ -170,33 +170,17 @@
                 Intent shareIntent = new Intent(Intent.ACTION_SEND)
                         .setType("video/mp4")
                         .putExtra(Intent.EXTRA_STREAM, shareUri);
-                String shareLabel = getResources().getString(R.string.screenrecord_share_label);
+                mKeyguardDismissUtil.executeWhenUnlocked(() -> {
+                    String shareLabel = getResources().getString(R.string.screenrecord_share_label);
+                    startActivity(Intent.createChooser(shareIntent, shareLabel)
+                            .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
+                    // Remove notification
+                    mNotificationManager.cancelAsUser(null, NOTIFICATION_VIEW_ID, currentUser);
+                    return false;
+                }, false);
 
                 // Close quick shade
                 sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
-
-                // Remove notification
-                mNotificationManager.cancelAsUser(null, NOTIFICATION_VIEW_ID, currentUser);
-
-                startActivity(Intent.createChooser(shareIntent, shareLabel)
-                        .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
-                break;
-            case ACTION_DELETE:
-                // Close quick shade
-                sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
-
-                ContentResolver resolver = getContentResolver();
-                Uri uri = Uri.parse(intent.getStringExtra(EXTRA_PATH));
-                resolver.delete(uri, null, null);
-
-                Toast.makeText(
-                        this,
-                        R.string.screenrecord_delete_description,
-                        Toast.LENGTH_LONG).show();
-
-                // Remove notification
-                mNotificationManager.cancelAsUser(null, NOTIFICATION_VIEW_ID, currentUser);
-                Log.d(TAG, "Deleted recording " + uri);
                 break;
         }
         return Service.START_STICKY;
@@ -307,16 +291,6 @@
                         PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE))
                 .build();
 
-        Notification.Action deleteAction = new Notification.Action.Builder(
-                Icon.createWithResource(this, R.drawable.ic_screenrecord),
-                getResources().getString(R.string.screenrecord_delete_label),
-                PendingIntent.getService(
-                        this,
-                        REQUEST_CODE,
-                        getDeleteIntent(this, uri.toString()),
-                        PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE))
-                .build();
-
         Bundle extras = new Bundle();
         extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME,
                 getResources().getString(R.string.screenrecord_name));
@@ -330,7 +304,6 @@
                         viewIntent,
                         PendingIntent.FLAG_IMMUTABLE))
                 .addAction(shareAction)
-                .addAction(deleteAction)
                 .setAutoCancel(true)
                 .addExtras(extras);
 
@@ -409,11 +382,6 @@
                 .putExtra(EXTRA_PATH, path);
     }
 
-    private static Intent getDeleteIntent(Context context, String path) {
-        return new Intent(context, RecordingService.class).setAction(ACTION_DELETE)
-                .putExtra(EXTRA_PATH, path);
-    }
-
     @Override
     public void onInfo(MediaRecorder mr, int what, int extra) {
         Log.d(TAG, "Media recorder info: " + what);
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java b/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java
new file mode 100644
index 0000000..3fd7f945
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.screenshot;
+
+import static com.android.systemui.screenshot.GlobalScreenshot.ACTION_TYPE_EDIT;
+import static com.android.systemui.screenshot.GlobalScreenshot.ACTION_TYPE_SHARE;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ACTION_INTENT;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_DISALLOW_ENTER_PIP;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ID;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_SMART_ACTIONS_ENABLED;
+import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_SCREENSHOT;
+
+import android.app.ActivityOptions;
+import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+import com.android.systemui.shared.system.ActivityManagerWrapper;
+import com.android.systemui.statusbar.phone.StatusBar;
+
+import java.util.Optional;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import javax.inject.Inject;
+
+/**
+ * Receiver to proxy the share or edit intent, used to clean up the notification and send
+ * appropriate signals to the system (ie. to dismiss the keyguard if necessary).
+ */
+public class ActionProxyReceiver extends BroadcastReceiver {
+    private static final String TAG = "ActionProxyReceiver";
+
+    private static final int CLOSE_WINDOWS_TIMEOUT_MILLIS = 3000;
+    private final StatusBar mStatusBar;
+    private final ActivityManagerWrapper mActivityManagerWrapper;
+    private final ScreenshotSmartActions mScreenshotSmartActions;
+
+    @Inject
+    public ActionProxyReceiver(Optional<StatusBar> statusBar,
+            ActivityManagerWrapper activityManagerWrapper,
+            ScreenshotSmartActions screenshotSmartActions) {
+        mStatusBar = statusBar.orElse(null);
+        mActivityManagerWrapper = activityManagerWrapper;
+        mScreenshotSmartActions = screenshotSmartActions;
+    }
+
+    @Override
+    public void onReceive(Context context, final Intent intent) {
+        Runnable startActivityRunnable = () -> {
+            try {
+                mActivityManagerWrapper.closeSystemWindows(
+                        SYSTEM_DIALOG_REASON_SCREENSHOT).get(
+                        CLOSE_WINDOWS_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
+            } catch (TimeoutException | InterruptedException | ExecutionException e) {
+                Log.e(TAG, "Unable to share screenshot", e);
+                return;
+            }
+
+            PendingIntent actionIntent = intent.getParcelableExtra(EXTRA_ACTION_INTENT);
+            ActivityOptions opts = ActivityOptions.makeBasic();
+            opts.setDisallowEnterPictureInPictureWhileLaunching(
+                    intent.getBooleanExtra(EXTRA_DISALLOW_ENTER_PIP, false));
+            try {
+                actionIntent.send(context, 0, null, null, null, null, opts.toBundle());
+            } catch (PendingIntent.CanceledException e) {
+                Log.e(TAG, "Pending intent canceled", e);
+            }
+
+        };
+
+        if (mStatusBar != null) {
+            mStatusBar.executeRunnableDismissingKeyguard(startActivityRunnable, null,
+                    true /* dismissShade */, true /* afterKeyguardGone */,
+                    true /* deferred */);
+        } else {
+            startActivityRunnable.run();
+        }
+
+        if (intent.getBooleanExtra(EXTRA_SMART_ACTIONS_ENABLED, false)) {
+            String actionType = Intent.ACTION_EDIT.equals(intent.getAction())
+                    ? ACTION_TYPE_EDIT
+                    : ACTION_TYPE_SHARE;
+            mScreenshotSmartActions.notifyScreenshotAction(
+                    context, intent.getStringExtra(EXTRA_ID), actionType, false);
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/DeleteImageInBackgroundTask.java b/packages/SystemUI/src/com/android/systemui/screenshot/DeleteImageInBackgroundTask.java
deleted file mode 100644
index 8c48655..0000000
--- a/packages/SystemUI/src/com/android/systemui/screenshot/DeleteImageInBackgroundTask.java
+++ /dev/null
@@ -1,43 +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.screenshot;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.net.Uri;
-import android.os.AsyncTask;
-
-/**
- * An AsyncTask that deletes an image from the media store in the background.
- */
-class DeleteImageInBackgroundTask extends AsyncTask<Uri, Void, Void> {
-    private Context mContext;
-
-    DeleteImageInBackgroundTask(Context context) {
-        mContext = context;
-    }
-
-    @Override
-    protected Void doInBackground(Uri... params) {
-        if (params.length != 1) return null;
-
-        Uri screenshotUri = params[0];
-        ContentResolver resolver = mContext.getContentResolver();
-        resolver.delete(screenshotUri, null, null);
-        return null;
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/DeleteScreenshotReceiver.java b/packages/SystemUI/src/com/android/systemui/screenshot/DeleteScreenshotReceiver.java
new file mode 100644
index 0000000..9028bb5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/DeleteScreenshotReceiver.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.screenshot;
+
+import static com.android.systemui.screenshot.GlobalScreenshot.ACTION_TYPE_DELETE;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ID;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_SMART_ACTIONS_ENABLED;
+import static com.android.systemui.screenshot.GlobalScreenshot.SCREENSHOT_URI_ID;
+
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+
+import com.android.systemui.dagger.qualifiers.Background;
+
+import java.util.concurrent.Executor;
+
+import javax.inject.Inject;
+
+/**
+ * Removes the file at a provided URI.
+ */
+public class DeleteScreenshotReceiver extends BroadcastReceiver {
+
+    private final ScreenshotSmartActions mScreenshotSmartActions;
+    private final Executor mBackgroundExecutor;
+
+    @Inject
+    public DeleteScreenshotReceiver(ScreenshotSmartActions screenshotSmartActions,
+            @Background Executor backgroundExecutor) {
+        mScreenshotSmartActions = screenshotSmartActions;
+        mBackgroundExecutor = backgroundExecutor;
+    }
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        if (!intent.hasExtra(SCREENSHOT_URI_ID)) {
+            return;
+        }
+
+        // And delete the image from the media store
+        final Uri uri = Uri.parse(intent.getStringExtra(SCREENSHOT_URI_ID));
+        mBackgroundExecutor.execute(() -> {
+            ContentResolver resolver = context.getContentResolver();
+            resolver.delete(uri, null, null);
+        });
+        if (intent.getBooleanExtra(EXTRA_SMART_ACTIONS_ENABLED, false)) {
+            mScreenshotSmartActions.notifyScreenshotAction(
+                    context, intent.getStringExtra(EXTRA_ID), ACTION_TYPE_DELETE, false);
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index d6e1a16..c3c947b 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -21,8 +21,6 @@
 import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
 import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
 
-import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_SCREENSHOT;
-
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.animation.AnimatorSet;
@@ -30,13 +28,10 @@
 import android.annotation.Nullable;
 import android.annotation.SuppressLint;
 import android.app.ActivityManager;
-import android.app.ActivityOptions;
 import android.app.Notification;
 import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
-import android.content.Intent;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
@@ -57,13 +52,11 @@
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
-import android.os.PowerManager;
 import android.os.RemoteException;
 import android.provider.Settings;
 import android.util.DisplayMetrics;
 import android.util.Log;
 import android.util.MathUtils;
-import android.util.Slog;
 import android.view.Display;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
@@ -88,23 +81,15 @@
 import com.android.internal.logging.UiEventLogger;
 import com.android.systemui.R;
 import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.shared.system.ActivityManagerWrapper;
 import com.android.systemui.shared.system.QuickStepContract;
-import com.android.systemui.statusbar.phone.StatusBar;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Optional;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 import java.util.function.Consumer;
 
 import javax.inject.Inject;
 import javax.inject.Singleton;
 
-import dagger.Lazy;
-
 /**
  * Class for handling device screen shots
  */
@@ -193,6 +178,7 @@
     private final UiEventLogger mUiEventLogger;
 
     private final Context mContext;
+    private final ScreenshotSmartActions mScreenshotSmartActions;
     private final WindowManager mWindowManager;
     private final WindowManager.LayoutParams mWindowLayoutParams;
     private final Display mDisplay;
@@ -214,9 +200,9 @@
     private Animator mScreenshotAnimation;
     private Runnable mOnCompleteRunnable;
     private Animator mDismissAnimation;
-    private boolean mInDarkMode = false;
-    private boolean mDirectionLTR = true;
-    private boolean mOrientationPortrait = true;
+    private boolean mInDarkMode;
+    private boolean mDirectionLTR;
+    private boolean mOrientationPortrait;
 
     private float mCornerSizeX;
     private float mDismissDeltaY;
@@ -245,15 +231,14 @@
         }
     };
 
-    /**
-     * @param context everything needs a context :(
-     */
     @Inject
     public GlobalScreenshot(
             Context context, @Main Resources resources,
+            ScreenshotSmartActions screenshotSmartActions,
             ScreenshotNotificationsController screenshotNotificationsController,
             UiEventLogger uiEventLogger) {
         mContext = context;
+        mScreenshotSmartActions = screenshotSmartActions;
         mNotificationsController = screenshotNotificationsController;
         mUiEventLogger = uiEventLogger;
 
@@ -320,6 +305,104 @@
         inoutInfo.touchableRegion.set(touchRegion);
     }
 
+    void takeScreenshotFullscreen(Consumer<Uri> finisher, Runnable onComplete) {
+        mOnCompleteRunnable = onComplete;
+
+        mDisplay.getRealMetrics(mDisplayMetrics);
+        takeScreenshotInternal(
+                finisher,
+                new Rect(0, 0, mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels));
+    }
+
+    void handleImageAsScreenshot(Bitmap screenshot, Rect screenshotScreenBounds,
+            Insets visibleInsets, int taskId, int userId, ComponentName topComponent,
+            Consumer<Uri> finisher, Runnable onComplete) {
+        // TODO: use task Id, userId, topComponent for smart handler
+
+        mOnCompleteRunnable = onComplete;
+        if (aspectRatiosMatch(screenshot, visibleInsets, screenshotScreenBounds)) {
+            saveScreenshot(screenshot, finisher, screenshotScreenBounds, visibleInsets, false);
+        } else {
+            saveScreenshot(screenshot, finisher,
+                    new Rect(0, 0, screenshot.getWidth(), screenshot.getHeight()), Insets.NONE,
+                    true);
+        }
+    }
+
+    /**
+     * Displays a screenshot selector
+     */
+    @SuppressLint("ClickableViewAccessibility")
+    void takeScreenshotPartial(final Consumer<Uri> finisher, Runnable onComplete) {
+        dismissScreenshot("new screenshot requested", true);
+        mOnCompleteRunnable = onComplete;
+
+        mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
+        mScreenshotSelectorView.setOnTouchListener((v, event) -> {
+            ScreenshotSelectorView view = (ScreenshotSelectorView) v;
+            switch (event.getAction()) {
+                case MotionEvent.ACTION_DOWN:
+                    view.startSelection((int) event.getX(), (int) event.getY());
+                    return true;
+                case MotionEvent.ACTION_MOVE:
+                    view.updateSelection((int) event.getX(), (int) event.getY());
+                    return true;
+                case MotionEvent.ACTION_UP:
+                    view.setVisibility(View.GONE);
+                    mWindowManager.removeView(mScreenshotLayout);
+                    final Rect rect = view.getSelectionRect();
+                    if (rect != null) {
+                        if (rect.width() != 0 && rect.height() != 0) {
+                            // Need mScreenshotLayout to handle it after the view disappears
+                            mScreenshotLayout.post(() -> takeScreenshotInternal(finisher, rect));
+                        }
+                    }
+
+                    view.stopSelection();
+                    return true;
+            }
+
+            return false;
+        });
+        mScreenshotLayout.post(() -> {
+            mScreenshotSelectorView.setVisibility(View.VISIBLE);
+            mScreenshotSelectorView.requestFocus();
+        });
+    }
+
+    /**
+     * Cancels screenshot request
+     */
+    void stopScreenshot() {
+        // If the selector layer still presents on screen, we remove it and resets its state.
+        if (mScreenshotSelectorView.getSelectionRect() != null) {
+            mWindowManager.removeView(mScreenshotLayout);
+            mScreenshotSelectorView.stopSelection();
+        }
+    }
+
+    /**
+     * Clears current screenshot
+     */
+    void dismissScreenshot(String reason, boolean immediate) {
+        Log.v(TAG, "clearing screenshot: " + reason);
+        mScreenshotHandler.removeMessages(MESSAGE_CORNER_TIMEOUT);
+        mScreenshotLayout.getViewTreeObserver().removeOnComputeInternalInsetsListener(this);
+        if (!immediate) {
+            mDismissAnimation = createScreenshotDismissAnimation();
+            mDismissAnimation.addListener(new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    super.onAnimationEnd(animation);
+                    clearScreenshot();
+                }
+            });
+            mDismissAnimation.start();
+        } else {
+            clearScreenshot();
+        }
+    }
+
     private void onConfigChanged(Configuration newConfig) {
         boolean needsUpdate = false;
         // dark mode
@@ -408,15 +491,12 @@
             }
             return mScreenshotLayout.onApplyWindowInsets(insets);
         });
-        mScreenshotLayout.setOnKeyListener(new View.OnKeyListener() {
-            @Override
-            public boolean onKey(View v, int keyCode, KeyEvent event) {
-                if (keyCode == KeyEvent.KEYCODE_BACK) {
-                    dismissScreenshot("back pressed", true);
-                    return true;
-                }
-                return false;
+        mScreenshotLayout.setOnKeyListener((v, keyCode, event) -> {
+            if (keyCode == KeyEvent.KEYCODE_BACK) {
+                dismissScreenshot("back pressed", false);
+                return true;
             }
+            return false;
         });
         // Get focus so that the key events go to the layout.
         mScreenshotLayout.setFocusableInTouchMode(true);
@@ -471,61 +551,27 @@
     }
 
     /**
-     * Updates the window focusability.  If the window is already showing, then it updates the
-     * window immediately, otherwise the layout params will be applied when the window is next
-     * shown.
-     */
-    private void setWindowFocusable(boolean focusable) {
-        if (focusable) {
-            mWindowLayoutParams.flags &= ~FLAG_NOT_FOCUSABLE;
-        } else {
-            mWindowLayoutParams.flags |= FLAG_NOT_FOCUSABLE;
-        }
-        if (mScreenshotLayout.isAttachedToWindow()) {
-            mWindowManager.updateViewLayout(mScreenshotLayout, mWindowLayoutParams);
-        }
-    }
-
-    /**
-     * Creates a new worker thread and saves the screenshot to the media store.
-     */
-    private void saveScreenshotInWorkerThread(
-            Consumer<Uri> finisher, @Nullable ActionsReadyListener actionsReadyListener) {
-        SaveImageInBackgroundData data = new SaveImageInBackgroundData();
-        data.image = mScreenBitmap;
-        data.finisher = finisher;
-        data.mActionsReadyListener = actionsReadyListener;
-
-        if (mSaveInBgTask != null) {
-            // just log success/failure for the pre-existing screenshot
-            mSaveInBgTask.setActionsReadyListener(new ActionsReadyListener() {
-                @Override
-                void onActionsReady(SavedImageData imageData) {
-                    logSuccessOnActionsReady(imageData);
-                }
-            });
-        }
-
-        mSaveInBgTask = new SaveImageInBackgroundTask(mContext, data);
-        mSaveInBgTask.execute();
-    }
-
-    /**
      * Takes a screenshot of the current display and shows an animation.
      */
-    private void takeScreenshot(Consumer<Uri> finisher, Rect crop) {
+    private void takeScreenshotInternal(Consumer<Uri> finisher, Rect crop) {
         // copy the input Rect, since SurfaceControl.screenshot can mutate it
         Rect screenRect = new Rect(crop);
         int rot = mDisplay.getRotation();
         int width = crop.width();
         int height = crop.height();
-        takeScreenshot(SurfaceControl.screenshot(crop, width, height, rot), finisher, screenRect,
+        saveScreenshot(SurfaceControl.screenshot(crop, width, height, rot), finisher, screenRect,
                 Insets.NONE, true);
     }
 
-    private void takeScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect,
+    private void saveScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect,
             Insets screenInsets, boolean showFlash) {
-        dismissScreenshot("new screenshot requested", true);
+        if (mScreenshotLayout.isAttachedToWindow()) {
+            // if we didn't already dismiss for another reason
+            if (mDismissAnimation == null || !mDismissAnimation.isRunning()) {
+                mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_REENTERED);
+            }
+            dismissScreenshot("new screenshot requested", true);
+        }
 
         mScreenBitmap = screenshot;
 
@@ -561,85 +607,6 @@
         startAnimation(finisher, screenRect, screenInsets, showFlash);
     }
 
-    void takeScreenshot(Consumer<Uri> finisher, Runnable onComplete) {
-        mOnCompleteRunnable = onComplete;
-
-        mDisplay.getRealMetrics(mDisplayMetrics);
-        takeScreenshot(
-                finisher,
-                new Rect(0, 0, mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels));
-    }
-
-    void handleImageAsScreenshot(Bitmap screenshot, Rect screenshotScreenBounds,
-            Insets visibleInsets, int taskId, int userId, ComponentName topComponent,
-            Consumer<Uri> finisher, Runnable onComplete) {
-        // TODO: use task Id, userId, topComponent for smart handler
-
-        mOnCompleteRunnable = onComplete;
-        if (aspectRatiosMatch(screenshot, visibleInsets, screenshotScreenBounds)) {
-            takeScreenshot(screenshot, finisher, screenshotScreenBounds, visibleInsets, false);
-        } else {
-            takeScreenshot(screenshot, finisher,
-                    new Rect(0, 0, screenshot.getWidth(), screenshot.getHeight()), Insets.NONE,
-                    true);
-        }
-    }
-
-    /**
-     * Displays a screenshot selector
-     */
-    @SuppressLint("ClickableViewAccessibility")
-    void takeScreenshotPartial(final Consumer<Uri> finisher, Runnable onComplete) {
-        dismissScreenshot("new screenshot requested", true);
-        mOnCompleteRunnable = onComplete;
-
-        mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
-        mScreenshotSelectorView.setOnTouchListener(new View.OnTouchListener() {
-            @Override
-            public boolean onTouch(View v, MotionEvent event) {
-                ScreenshotSelectorView view = (ScreenshotSelectorView) v;
-                switch (event.getAction()) {
-                    case MotionEvent.ACTION_DOWN:
-                        view.startSelection((int) event.getX(), (int) event.getY());
-                        return true;
-                    case MotionEvent.ACTION_MOVE:
-                        view.updateSelection((int) event.getX(), (int) event.getY());
-                        return true;
-                    case MotionEvent.ACTION_UP:
-                        view.setVisibility(View.GONE);
-                        mWindowManager.removeView(mScreenshotLayout);
-                        final Rect rect = view.getSelectionRect();
-                        if (rect != null) {
-                            if (rect.width() != 0 && rect.height() != 0) {
-                                // Need mScreenshotLayout to handle it after the view disappears
-                                mScreenshotLayout.post(() -> takeScreenshot(finisher, rect));
-                            }
-                        }
-
-                        view.stopSelection();
-                        return true;
-                }
-
-                return false;
-            }
-        });
-        mScreenshotLayout.post(() -> {
-            mScreenshotSelectorView.setVisibility(View.VISIBLE);
-            mScreenshotSelectorView.requestFocus();
-        });
-    }
-
-    /**
-     * Cancels screenshot request
-     */
-    void stopScreenshot() {
-        // If the selector layer still presents on screen, we remove it and resets its state.
-        if (mScreenshotSelectorView.getSelectionRect() != null) {
-            mWindowManager.removeView(mScreenshotLayout);
-            mScreenshotSelectorView.stopSelection();
-        }
-    }
-
     /**
      * Save the bitmap but don't show the normal screenshot UI.. just a toast (or notification on
      * failure).
@@ -670,55 +637,70 @@
         });
     }
 
-    private boolean isUserSetupComplete() {
-        return Settings.Secure.getInt(mContext.getContentResolver(),
-                SETTINGS_SECURE_USER_SETUP_COMPLETE, 0) == 1;
+    /**
+     * Starts the animation after taking the screenshot
+     */
+    private void startAnimation(final Consumer<Uri> finisher, Rect screenRect, Insets screenInsets,
+            boolean showFlash) {
+        mScreenshotHandler.post(() -> {
+            if (!mScreenshotLayout.isAttachedToWindow()) {
+                mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
+            }
+            mScreenshotAnimatedView.setImageDrawable(
+                    createScreenDrawable(mScreenBitmap, screenInsets));
+            setAnimatedViewSize(screenRect.width(), screenRect.height());
+            // Show when the animation starts
+            mScreenshotAnimatedView.setVisibility(View.GONE);
+
+            mScreenshotPreview.setImageDrawable(createScreenDrawable(mScreenBitmap, screenInsets));
+            // make static preview invisible (from gone) so we can query its location on screen
+            mScreenshotPreview.setVisibility(View.INVISIBLE);
+
+            mScreenshotHandler.post(() -> {
+                mScreenshotLayout.getViewTreeObserver().addOnComputeInternalInsetsListener(this);
+
+                mScreenshotAnimation =
+                        createScreenshotDropInAnimation(screenRect, showFlash);
+
+                saveScreenshotInWorkerThread(finisher, new ActionsReadyListener() {
+                    @Override
+                    void onActionsReady(SavedImageData imageData) {
+                        showUiOnActionsReady(imageData);
+                    }
+                });
+
+                // Play the shutter sound to notify that we've taken a screenshot
+                mCameraSound.play(MediaActionSound.SHUTTER_CLICK);
+
+                mScreenshotPreview.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+                mScreenshotPreview.buildLayer();
+                mScreenshotAnimation.start();
+            });
+        });
     }
 
     /**
-     * Clears current screenshot
+     * Creates a new worker thread and saves the screenshot to the media store.
      */
-    void dismissScreenshot(String reason, boolean immediate) {
-        Log.v(TAG, "clearing screenshot: " + reason);
-        mScreenshotHandler.removeMessages(MESSAGE_CORNER_TIMEOUT);
-        mScreenshotLayout.getViewTreeObserver().removeOnComputeInternalInsetsListener(this);
-        if (!immediate) {
-            mDismissAnimation = createScreenshotDismissAnimation();
-            mDismissAnimation.addListener(new AnimatorListenerAdapter() {
+    private void saveScreenshotInWorkerThread(
+            Consumer<Uri> finisher, @Nullable ActionsReadyListener actionsReadyListener) {
+        SaveImageInBackgroundData data = new SaveImageInBackgroundData();
+        data.image = mScreenBitmap;
+        data.finisher = finisher;
+        data.mActionsReadyListener = actionsReadyListener;
+
+        if (mSaveInBgTask != null) {
+            // just log success/failure for the pre-existing screenshot
+            mSaveInBgTask.setActionsReadyListener(new ActionsReadyListener() {
                 @Override
-                public void onAnimationEnd(Animator animation) {
-                    super.onAnimationEnd(animation);
-                    clearScreenshot();
+                void onActionsReady(SavedImageData imageData) {
+                    logSuccessOnActionsReady(imageData);
                 }
             });
-            mDismissAnimation.start();
-        } else {
-            clearScreenshot();
-        }
-    }
-
-    private void clearScreenshot() {
-        if (mScreenshotLayout.isAttachedToWindow()) {
-            mWindowManager.removeView(mScreenshotLayout);
         }
 
-        // Clear any references to the bitmap
-        mScreenshotPreview.setImageDrawable(null);
-        mScreenshotAnimatedView.setImageDrawable(null);
-        mScreenshotAnimatedView.setVisibility(View.GONE);
-        mActionsContainerBackground.setVisibility(View.GONE);
-        mActionsContainer.setVisibility(View.GONE);
-        mBackgroundProtection.setAlpha(0f);
-        mDismissButton.setVisibility(View.GONE);
-        mScreenshotPreview.setVisibility(View.GONE);
-        mScreenshotPreview.setLayerType(View.LAYER_TYPE_NONE, null);
-        mScreenshotPreview.setContentDescription(
-                mContext.getResources().getString(R.string.screenshot_preview_description));
-        mScreenshotLayout.setAlpha(1);
-        mDismissButton.setTranslationY(0);
-        mActionsContainer.setTranslationY(0);
-        mActionsContainerBackground.setTranslationY(0);
-        mScreenshotPreview.setTranslationY(0);
+        mSaveInBgTask = new SaveImageInBackgroundTask(mContext, mScreenshotSmartActions, data);
+        mSaveInBgTask.execute();
     }
 
     /**
@@ -768,56 +750,6 @@
         }
     }
 
-    /**
-     * Starts the animation after taking the screenshot
-     */
-    private void startAnimation(final Consumer<Uri> finisher, Rect screenRect, Insets screenInsets,
-            boolean showFlash) {
-
-        // If power save is on, show a toast so there is some visual indication that a
-        // screenshot has been taken.
-        PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
-        if (powerManager.isPowerSaveMode()) {
-            Toast.makeText(mContext, R.string.screenshot_saved_title, Toast.LENGTH_SHORT).show();
-        }
-
-        mScreenshotHandler.post(() -> {
-            if (!mScreenshotLayout.isAttachedToWindow()) {
-                mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
-            }
-            mScreenshotAnimatedView.setImageDrawable(
-                    createScreenDrawable(mScreenBitmap, screenInsets));
-            setAnimatedViewSize(screenRect.width(), screenRect.height());
-            // Show when the animation starts
-            mScreenshotAnimatedView.setVisibility(View.GONE);
-
-            mScreenshotPreview.setImageDrawable(createScreenDrawable(mScreenBitmap, screenInsets));
-            // make static preview invisible (from gone) so we can query its location on screen
-            mScreenshotPreview.setVisibility(View.INVISIBLE);
-
-            mScreenshotHandler.post(() -> {
-                mScreenshotLayout.getViewTreeObserver().addOnComputeInternalInsetsListener(this);
-
-                mScreenshotAnimation =
-                        createScreenshotDropInAnimation(screenRect, showFlash);
-
-                saveScreenshotInWorkerThread(finisher, new ActionsReadyListener() {
-                    @Override
-                    void onActionsReady(SavedImageData imageData) {
-                        showUiOnActionsReady(imageData);
-                    }
-                });
-
-                // Play the shutter sound to notify that we've taken a screenshot
-                mCameraSound.play(MediaActionSound.SHUTTER_CLICK);
-
-                mScreenshotPreview.setLayerType(View.LAYER_TYPE_HARDWARE, null);
-                mScreenshotPreview.buildLayer();
-                mScreenshotAnimation.start();
-            });
-        });
-    }
-
     private AnimatorSet createScreenshotDropInAnimation(Rect bounds, boolean showFlash) {
         Rect previewBounds = new Rect();
         mScreenshotPreview.getBoundsOnScreen(previewBounds);
@@ -1070,6 +1002,31 @@
         return animSet;
     }
 
+    private void clearScreenshot() {
+        if (mScreenshotLayout.isAttachedToWindow()) {
+            mWindowManager.removeView(mScreenshotLayout);
+        }
+
+        // Clear any references to the bitmap
+        mScreenshotPreview.setImageDrawable(null);
+        mScreenshotAnimatedView.setImageDrawable(null);
+        mScreenshotAnimatedView.setVisibility(View.GONE);
+        mActionsContainerBackground.setVisibility(View.GONE);
+        mActionsContainer.setVisibility(View.GONE);
+        mBackgroundProtection.setAlpha(0f);
+        mDismissButton.setVisibility(View.GONE);
+        mScreenshotPreview.setVisibility(View.GONE);
+        mScreenshotPreview.setLayerType(View.LAYER_TYPE_NONE, null);
+        mScreenshotPreview.setContentDescription(
+                mContext.getResources().getString(R.string.screenshot_preview_description));
+        mScreenshotPreview.setOnClickListener(null);
+        mScreenshotLayout.setAlpha(1);
+        mDismissButton.setTranslationY(0);
+        mActionsContainer.setTranslationY(0);
+        mActionsContainerBackground.setTranslationY(0);
+        mScreenshotPreview.setTranslationY(0);
+    }
+
     private void setAnimatedViewSize(int width, int height) {
         ViewGroup.LayoutParams layoutParams = mScreenshotAnimatedView.getLayoutParams();
         layoutParams.width = width;
@@ -1077,6 +1034,27 @@
         mScreenshotAnimatedView.setLayoutParams(layoutParams);
     }
 
+    /**
+     * Updates the window focusability.  If the window is already showing, then it updates the
+     * window immediately, otherwise the layout params will be applied when the window is next
+     * shown.
+     */
+    private void setWindowFocusable(boolean focusable) {
+        if (focusable) {
+            mWindowLayoutParams.flags &= ~FLAG_NOT_FOCUSABLE;
+        } else {
+            mWindowLayoutParams.flags |= FLAG_NOT_FOCUSABLE;
+        }
+        if (mScreenshotLayout.isAttachedToWindow()) {
+            mWindowManager.updateViewLayout(mScreenshotLayout, mWindowLayoutParams);
+        }
+    }
+
+    private boolean isUserSetupComplete() {
+        return Settings.Secure.getInt(mContext.getContentResolver(),
+                SETTINGS_SECURE_USER_SETUP_COMPLETE, 0) == 1;
+    }
+
     /** Does the aspect ratio of the bitmap with insets removed match the bounds. */
     private boolean aspectRatiosMatch(Bitmap bitmap, Insets bitmapInsets, Rect screenBounds) {
         int insettedWidth = bitmap.getWidth() - bitmapInsets.left - bitmapInsets.right;
@@ -1128,125 +1106,10 @@
         if (insets.left < 0 || insets.top < 0 || insets.right < 0 || insets.bottom < 0) {
             // Are any of the insets negative, meaning the bitmap is smaller than the bounds so need
             // to fill in the background of the drawable.
-            return new LayerDrawable(new Drawable[] {
+            return new LayerDrawable(new Drawable[]{
                     new ColorDrawable(Color.BLACK), insetDrawable});
         } else {
             return insetDrawable;
         }
     }
-
-    /**
-     * Receiver to proxy the share or edit intent, used to clean up the notification and send
-     * appropriate signals to the system (ie. to dismiss the keyguard if necessary).
-     */
-    public static class ActionProxyReceiver extends BroadcastReceiver {
-        static final int CLOSE_WINDOWS_TIMEOUT_MILLIS = 3000;
-        private final StatusBar mStatusBar;
-
-        @Inject
-        public ActionProxyReceiver(Optional<Lazy<StatusBar>> statusBarLazy) {
-            Lazy<StatusBar> statusBar = statusBarLazy.orElse(null);
-            mStatusBar = statusBar != null ? statusBar.get() : null;
-        }
-
-        @Override
-        public void onReceive(Context context, final Intent intent) {
-            Runnable startActivityRunnable = () -> {
-                try {
-                    ActivityManagerWrapper.getInstance().closeSystemWindows(
-                            SYSTEM_DIALOG_REASON_SCREENSHOT).get(
-                            CLOSE_WINDOWS_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
-                } catch (TimeoutException | InterruptedException | ExecutionException e) {
-                    Slog.e(TAG, "Unable to share screenshot", e);
-                    return;
-                }
-
-                PendingIntent actionIntent = intent.getParcelableExtra(EXTRA_ACTION_INTENT);
-                if (intent.getBooleanExtra(EXTRA_CANCEL_NOTIFICATION, false)) {
-                    ScreenshotNotificationsController.cancelScreenshotNotification(context);
-                }
-                ActivityOptions opts = ActivityOptions.makeBasic();
-                opts.setDisallowEnterPictureInPictureWhileLaunching(
-                        intent.getBooleanExtra(EXTRA_DISALLOW_ENTER_PIP, false));
-                try {
-                    actionIntent.send(context, 0, null, null, null, null, opts.toBundle());
-                } catch (PendingIntent.CanceledException e) {
-                    Log.e(TAG, "Pending intent canceled", e);
-                }
-
-            };
-
-            if (mStatusBar != null) {
-                mStatusBar.executeRunnableDismissingKeyguard(startActivityRunnable, null,
-                        true /* dismissShade */, true /* afterKeyguardGone */,
-                        true /* deferred */);
-            } else {
-                startActivityRunnable.run();
-            }
-
-            if (intent.getBooleanExtra(EXTRA_SMART_ACTIONS_ENABLED, false)) {
-                String actionType = Intent.ACTION_EDIT.equals(intent.getAction())
-                        ? ACTION_TYPE_EDIT
-                        : ACTION_TYPE_SHARE;
-                ScreenshotSmartActions.notifyScreenshotAction(
-                        context, intent.getStringExtra(EXTRA_ID), actionType, false);
-            }
-        }
-    }
-
-    /**
-     * Removes the notification for a screenshot after a share target is chosen.
-     */
-    public static class TargetChosenReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            // Clear the notification only after the user has chosen a share action
-            ScreenshotNotificationsController.cancelScreenshotNotification(context);
-        }
-    }
-
-    /**
-     * Removes the last screenshot.
-     */
-    public static class DeleteScreenshotReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (!intent.hasExtra(SCREENSHOT_URI_ID)) {
-                return;
-            }
-
-            // Clear the notification when the image is deleted
-            ScreenshotNotificationsController.cancelScreenshotNotification(context);
-
-            // And delete the image from the media store
-            final Uri uri = Uri.parse(intent.getStringExtra(SCREENSHOT_URI_ID));
-            new DeleteImageInBackgroundTask(context).execute(uri);
-            if (intent.getBooleanExtra(EXTRA_SMART_ACTIONS_ENABLED, false)) {
-                ScreenshotSmartActions.notifyScreenshotAction(
-                        context, intent.getStringExtra(EXTRA_ID), ACTION_TYPE_DELETE, false);
-            }
-        }
-    }
-
-    /**
-     * Executes the smart action tapped by the user in the notification.
-     */
-    public static class SmartActionsReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            PendingIntent pendingIntent = intent.getParcelableExtra(EXTRA_ACTION_INTENT);
-            String actionType = intent.getStringExtra(EXTRA_ACTION_TYPE);
-            Slog.d(TAG, "Executing smart action [" + actionType + "]:" + pendingIntent.getIntent());
-            ActivityOptions opts = ActivityOptions.makeBasic();
-
-            try {
-                pendingIntent.send(context, 0, null, null, null, null, opts.toBundle());
-            } catch (PendingIntent.CanceledException e) {
-                Log.e(TAG, "Pending intent canceled", e);
-            }
-
-            ScreenshotSmartActions.notifyScreenshotAction(
-                    context, intent.getStringExtra(EXTRA_ID), actionType, true);
-        }
-    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
index 468b9b1..df1d789 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
@@ -81,6 +81,7 @@
     private static final String SCREENSHOT_SHARE_SUBJECT_TEMPLATE = "Screenshot (%s)";
 
     private final Context mContext;
+    private final ScreenshotSmartActions mScreenshotSmartActions;
     private final GlobalScreenshot.SaveImageInBackgroundData mParams;
     private final GlobalScreenshot.SavedImageData mImageData;
     private final String mImageFileName;
@@ -90,8 +91,10 @@
     private final boolean mSmartActionsEnabled;
     private final Random mRandom = new Random();
 
-    SaveImageInBackgroundTask(Context context, GlobalScreenshot.SaveImageInBackgroundData data) {
+    SaveImageInBackgroundTask(Context context, ScreenshotSmartActions screenshotSmartActions,
+            GlobalScreenshot.SaveImageInBackgroundData data) {
         mContext = context;
+        mScreenshotSmartActions = screenshotSmartActions;
         mImageData = new GlobalScreenshot.SavedImageData();
 
         // Prepare all the output metadata
@@ -141,7 +144,7 @@
             final Uri uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
 
             CompletableFuture<List<Notification.Action>> smartActionsFuture =
-                    ScreenshotSmartActions.getSmartActionsFuture(
+                    mScreenshotSmartActions.getSmartActionsFuture(
                             mScreenshotId, uri, image, mSmartActionsProvider,
                             mSmartActionsEnabled, getUserHandle(mContext));
 
@@ -199,7 +202,7 @@
                         SystemUiDeviceConfigFlags.SCREENSHOT_NOTIFICATION_SMART_ACTIONS_TIMEOUT_MS,
                         1000);
                 smartActions.addAll(buildSmartActions(
-                        ScreenshotSmartActions.getSmartActions(
+                        mScreenshotSmartActions.getSmartActions(
                                 mScreenshotId, smartActionsFuture, timeoutMs,
                                 mSmartActionsProvider),
                         mContext));
@@ -274,11 +277,8 @@
         // by setting the (otherwise unused) request code to the current user id.
         int requestCode = context.getUserId();
 
-        PendingIntent chooserAction = PendingIntent.getBroadcast(context, requestCode,
-                new Intent(context, GlobalScreenshot.TargetChosenReceiver.class),
-                PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT);
         Intent sharingChooserIntent =
-                Intent.createChooser(sharingIntent, null, chooserAction.getIntentSender())
+                Intent.createChooser(sharingIntent, null)
                         .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK)
                         .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
 
@@ -288,7 +288,7 @@
 
         // Create a share action for the notification
         PendingIntent shareAction = PendingIntent.getBroadcastAsUser(context, requestCode,
-                new Intent(context, GlobalScreenshot.ActionProxyReceiver.class)
+                new Intent(context, ActionProxyReceiver.class)
                         .putExtra(GlobalScreenshot.EXTRA_ACTION_INTENT, pendingIntent)
                         .putExtra(GlobalScreenshot.EXTRA_DISALLOW_ENTER_PIP, true)
                         .putExtra(GlobalScreenshot.EXTRA_ID, mScreenshotId)
@@ -333,10 +333,8 @@
 
         // Create a edit action
         PendingIntent editAction = PendingIntent.getBroadcastAsUser(context, requestCode,
-                new Intent(context, GlobalScreenshot.ActionProxyReceiver.class)
+                new Intent(context, ActionProxyReceiver.class)
                         .putExtra(GlobalScreenshot.EXTRA_ACTION_INTENT, pendingIntent)
-                        .putExtra(GlobalScreenshot.EXTRA_CANCEL_NOTIFICATION,
-                                editIntent.getComponent() != null)
                         .putExtra(GlobalScreenshot.EXTRA_ID, mScreenshotId)
                         .putExtra(GlobalScreenshot.EXTRA_SMART_ACTIONS_ENABLED,
                                 mSmartActionsEnabled)
@@ -358,7 +356,7 @@
 
         // Create a delete action for the notification
         PendingIntent deleteAction = PendingIntent.getBroadcast(context, requestCode,
-                new Intent(context, GlobalScreenshot.DeleteScreenshotReceiver.class)
+                new Intent(context, DeleteScreenshotReceiver.class)
                         .putExtra(GlobalScreenshot.SCREENSHOT_URI_ID, uri.toString())
                         .putExtra(GlobalScreenshot.EXTRA_ID, mScreenshotId)
                         .putExtra(GlobalScreenshot.EXTRA_SMART_ACTIONS_ENABLED,
@@ -398,7 +396,7 @@
             String actionType = extras.getString(
                     ScreenshotNotificationSmartActionsProvider.ACTION_TYPE,
                     ScreenshotNotificationSmartActionsProvider.DEFAULT_ACTION_TYPE);
-            Intent intent = new Intent(context, GlobalScreenshot.SmartActionsReceiver.class)
+            Intent intent = new Intent(context, SmartActionsReceiver.class)
                     .putExtra(GlobalScreenshot.EXTRA_ACTION_INTENT, action.actionIntent)
                     .addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
             addIntentExtras(mScreenshotId, intent, actionType, mSmartActionsEnabled);
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotActionChip.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotActionChip.java
index b5209bb..a488702 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotActionChip.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotActionChip.java
@@ -65,10 +65,10 @@
     }
 
     void setIcon(Icon icon, boolean tint) {
-        if (tint) {
-            icon.setTint(mIconColor);
-        }
         mIcon.setImageIcon(icon);
+        if (!tint) {
+            mIcon.setImageTintList(null);
+        }
     }
 
     void setText(CharSequence text) {
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java
index 20fa991..8535d57 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java
@@ -56,7 +56,9 @@
     @UiEvent(doc = "screenshot interaction timed out")
     SCREENSHOT_INTERACTION_TIMEOUT(310),
     @UiEvent(doc = "screenshot explicitly dismissed")
-    SCREENSHOT_EXPLICIT_DISMISSAL(311);
+    SCREENSHOT_EXPLICIT_DISMISSAL(311),
+    @UiEvent(doc = "screenshot reentered for new screenshot")
+    SCREENSHOT_REENTERED(640);
 
     private final int mId;
 
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotSmartActions.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotSmartActions.java
index 442b373..633cdd6 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotSmartActions.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotSmartActions.java
@@ -39,14 +39,21 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
 /**
  * Collects the static functions for retrieving and acting on smart actions.
  */
+@Singleton
 public class ScreenshotSmartActions {
     private static final String TAG = "ScreenshotSmartActions";
 
+    @Inject
+    public ScreenshotSmartActions() {}
+
     @VisibleForTesting
-    static CompletableFuture<List<Notification.Action>> getSmartActionsFuture(
+    CompletableFuture<List<Notification.Action>> getSmartActionsFuture(
             String screenshotId, Uri screenshotUri, Bitmap image,
             ScreenshotNotificationSmartActionsProvider smartActionsProvider,
             boolean smartActionsEnabled, UserHandle userHandle) {
@@ -86,7 +93,7 @@
     }
 
     @VisibleForTesting
-    static List<Notification.Action> getSmartActions(String screenshotId,
+    List<Notification.Action> getSmartActions(String screenshotId,
             CompletableFuture<List<Notification.Action>> smartActionsFuture, int timeoutMs,
             ScreenshotNotificationSmartActionsProvider smartActionsProvider) {
         long startTimeMs = SystemClock.uptimeMillis();
@@ -116,7 +123,7 @@
         }
     }
 
-    static void notifyScreenshotOp(String screenshotId,
+    void notifyScreenshotOp(String screenshotId,
             ScreenshotNotificationSmartActionsProvider smartActionsProvider,
             ScreenshotNotificationSmartActionsProvider.ScreenshotOp op,
             ScreenshotNotificationSmartActionsProvider.ScreenshotOpStatus status, long durationMs) {
@@ -127,7 +134,7 @@
         }
     }
 
-    static void notifyScreenshotAction(Context context, String screenshotId, String action,
+    void notifyScreenshotAction(Context context, String screenshotId, String action,
             boolean isSmartAction) {
         try {
             ScreenshotNotificationSmartActionsProvider provider =
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/SmartActionsReceiver.java b/packages/SystemUI/src/com/android/systemui/screenshot/SmartActionsReceiver.java
new file mode 100644
index 0000000..217235b
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/SmartActionsReceiver.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.screenshot;
+
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ACTION_INTENT;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ACTION_TYPE;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ID;
+
+import android.app.ActivityOptions;
+import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+import android.util.Slog;
+
+import javax.inject.Inject;
+
+
+/**
+ * Executes the smart action tapped by the user in the notification.
+ */
+public class SmartActionsReceiver extends BroadcastReceiver {
+    private static final String TAG = "SmartActionsReceiver";
+
+    private final ScreenshotSmartActions mScreenshotSmartActions;
+
+    @Inject
+    SmartActionsReceiver(ScreenshotSmartActions screenshotSmartActions) {
+        mScreenshotSmartActions = screenshotSmartActions;
+    }
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        PendingIntent pendingIntent = intent.getParcelableExtra(EXTRA_ACTION_INTENT);
+        String actionType = intent.getStringExtra(EXTRA_ACTION_TYPE);
+        Slog.d(TAG, "Executing smart action [" + actionType + "]:" + pendingIntent.getIntent());
+        ActivityOptions opts = ActivityOptions.makeBasic();
+
+        try {
+            pendingIntent.send(context, 0, null, null, null, null, opts.toBundle());
+        } catch (PendingIntent.CanceledException e) {
+            Log.e(TAG, "Pending intent canceled", e);
+        }
+
+        mScreenshotSmartActions.notifyScreenshotAction(
+                context, intent.getStringExtra(EXTRA_ID), actionType, true);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
index 9f8a9bb..a043f0f 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
@@ -61,7 +61,7 @@
         @Override
         public void onReceive(Context context, Intent intent) {
             if (ACTION_CLOSE_SYSTEM_DIALOGS.equals(intent.getAction()) && mScreenshot != null) {
-                mScreenshot.dismissScreenshot("close system dialogs", true);
+                mScreenshot.dismissScreenshot("close system dialogs", false);
             }
         }
     };
@@ -102,7 +102,7 @@
 
             switch (msg.what) {
                 case WindowManager.TAKE_SCREENSHOT_FULLSCREEN:
-                    mScreenshot.takeScreenshot(uriConsumer, onComplete);
+                    mScreenshot.takeScreenshotFullscreen(uriConsumer, onComplete);
                     break;
                 case WindowManager.TAKE_SCREENSHOT_SELECTED_REGION:
                     mScreenshot.takeScreenshotPartial(uriConsumer, onComplete);
diff --git a/packages/SystemUI/src/com/android/systemui/settings/CurrentUserContentResolverProvider.kt b/packages/SystemUI/src/com/android/systemui/settings/CurrentUserContentResolverProvider.kt
new file mode 100644
index 0000000..9d05843
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/settings/CurrentUserContentResolverProvider.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.settings
+
+import android.content.ContentResolver
+
+interface CurrentUserContentResolverProvider {
+
+    val currentUserContentResolver: ContentResolver
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/settings/CurrentUserContextTracker.kt b/packages/SystemUI/src/com/android/systemui/settings/CurrentUserContextTracker.kt
index 825a7f3..d7c4caaa 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/CurrentUserContextTracker.kt
+++ b/packages/SystemUI/src/com/android/systemui/settings/CurrentUserContextTracker.kt
@@ -16,6 +16,7 @@
 
 package com.android.systemui.settings
 
+import android.content.ContentResolver
 import android.content.Context
 import android.os.UserHandle
 import androidx.annotation.VisibleForTesting
@@ -31,7 +32,7 @@
 class CurrentUserContextTracker internal constructor(
     private val sysuiContext: Context,
     broadcastDispatcher: BroadcastDispatcher
-) {
+) : CurrentUserContentResolverProvider {
     private val userTracker: CurrentUserTracker
     private var initialized = false
 
@@ -44,6 +45,9 @@
             return _curUserContext!!
         }
 
+    override val currentUserContentResolver: ContentResolver
+        get() = currentUserContext.contentResolver
+
     init {
         userTracker = object : CurrentUserTracker(broadcastDispatcher) {
             override fun onUserSwitched(newUserId: Int) {
@@ -54,8 +58,8 @@
 
     fun initialize() {
         initialized = true
-        _curUserContext = makeUserContext(userTracker.currentUserId)
         userTracker.startTracking()
+        _curUserContext = makeUserContext(userTracker.currentUserId)
     }
 
     @VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/settings/dagger/SettingsModule.java b/packages/SystemUI/src/com/android/systemui/settings/dagger/SettingsModule.java
index 2c5c3ce..eb5bd5c 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/dagger/SettingsModule.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/dagger/SettingsModule.java
@@ -19,10 +19,12 @@
 import android.content.Context;
 
 import com.android.systemui.broadcast.BroadcastDispatcher;
+import com.android.systemui.settings.CurrentUserContentResolverProvider;
 import com.android.systemui.settings.CurrentUserContextTracker;
 
 import javax.inject.Singleton;
 
+import dagger.Binds;
 import dagger.Module;
 import dagger.Provides;
 
@@ -30,7 +32,7 @@
  * Dagger Module for classes found within the com.android.systemui.settings package.
  */
 @Module
-public interface SettingsModule {
+public abstract class SettingsModule {
 
     /**
      * Provides and initializes a CurrentUserContextTracker
@@ -45,4 +47,9 @@
         tracker.initialize();
         return tracker;
     }
+
+    @Binds
+    @Singleton
+    abstract CurrentUserContentResolverProvider bindCurrentUserContentResolverTracker(
+            CurrentUserContextTracker tracker);
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index a144453..7e1dc66 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -140,7 +140,7 @@
      * Creates a new KeyguardIndicationController and registers callbacks.
      */
     @Inject
-    KeyguardIndicationController(Context context,
+    public KeyguardIndicationController(Context context,
             WakeLock.Builder wakeLockBuilder,
             KeyguardStateController keyguardStateController,
             StatusBarStateController statusBarStateController,
@@ -523,8 +523,7 @@
                 });
     }
 
-    @VisibleForTesting
-    String computePowerIndication() {
+    protected String computePowerIndication() {
         if (mPowerCharged) {
             return mContext.getResources().getString(R.string.keyguard_charged);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java
index 739d30c..8cd82cc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java
@@ -21,6 +21,7 @@
 import static com.android.systemui.statusbar.phone.StatusBar.SHOW_LOCKSCREEN_MEDIA_ARTWORK;
 
 import android.annotation.MainThread;
+import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.Notification;
 import android.content.Context;
@@ -57,6 +58,7 @@
 import com.android.systemui.statusbar.notification.NotificationEntryListener;
 import com.android.systemui.statusbar.notification.NotificationEntryManager;
 import com.android.systemui.statusbar.notification.collection.NotificationEntry;
+import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener;
 import com.android.systemui.statusbar.phone.BiometricUnlockController;
 import com.android.systemui.statusbar.phone.KeyguardBypassController;
 import com.android.systemui.statusbar.phone.LockscreenWallpaper;
@@ -234,8 +236,17 @@
                     NotificationVisibility visibility,
                     boolean removedByUser,
                     int reason) {
-                onNotificationRemoved(entry.getKey());
-                mediaDataManager.onNotificationRemoved(entry.getKey());
+                removeEntry(entry);
+            }
+        });
+
+        // Pending entries are never inflated, and will never generate a call to onEntryRemoved().
+        // This can happen when notifications are added and canceled before inflation. Add this
+        // separate listener for cleanup, since media inflation occurs onPendingEntryAdded().
+        notificationEntryManager.addCollectionListener(new NotifCollectionListener() {
+            @Override
+            public void onEntryCleanUp(@NonNull NotificationEntry entry) {
+                removeEntry(entry);
             }
         });
 
@@ -248,6 +259,11 @@
                 mPropertiesChangedListener);
     }
 
+    private void removeEntry(NotificationEntry entry) {
+        onNotificationRemoved(entry.getKey());
+        mMediaDataManager.onNotificationRemoved(entry.getKey());
+    }
+
     /**
      * Check if a state should be considered actively playing
      * @param state a PlaybackState
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
index 423f85f..bd65ef0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
@@ -282,7 +282,7 @@
                     + " doesn't match existing key " + mKey);
         }
 
-        mRanking = ranking;
+        mRanking = ranking.withAudiblyAlertedInfo(mRanking);
     }
 
     /*
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java
index 582e3e5..a7d83b3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java
@@ -37,6 +37,8 @@
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.widget.ImageMessageConsumer;
 import com.android.systemui.dagger.qualifiers.Background;
+import com.android.systemui.media.MediaDataManagerKt;
+import com.android.systemui.media.MediaFeatureFlag;
 import com.android.systemui.statusbar.InflationTask;
 import com.android.systemui.statusbar.NotificationRemoteInputManager;
 import com.android.systemui.statusbar.SmartReplyController;
@@ -71,6 +73,7 @@
     public static final String TAG = "NotifContentInflater";
 
     private boolean mInflateSynchronously = false;
+    private final boolean mIsMediaInQS;
     private final NotificationRemoteInputManager mRemoteInputManager;
     private final NotifRemoteViewCache mRemoteViewCache;
     private final Lazy<SmartReplyConstants> mSmartReplyConstants;
@@ -85,12 +88,14 @@
             Lazy<SmartReplyConstants> smartReplyConstants,
             Lazy<SmartReplyController> smartReplyController,
             ConversationNotificationProcessor conversationProcessor,
+            MediaFeatureFlag mediaFeatureFlag,
             @Background Executor bgExecutor) {
         mRemoteViewCache = remoteViewCache;
         mRemoteInputManager = remoteInputManager;
         mSmartReplyConstants = smartReplyConstants;
         mSmartReplyController = smartReplyController;
         mConversationProcessor = conversationProcessor;
+        mIsMediaInQS = mediaFeatureFlag.getEnabled();
         mBgExecutor = bgExecutor;
     }
 
@@ -135,7 +140,8 @@
                 bindParams.usesIncreasedHeight,
                 bindParams.usesIncreasedHeadsUpHeight,
                 callback,
-                mRemoteInputManager.getRemoteViewsOnClickHandler());
+                mRemoteInputManager.getRemoteViewsOnClickHandler(),
+                mIsMediaInQS);
         if (mInflateSynchronously) {
             task.onPostExecute(task.doInBackground());
         } else {
@@ -711,6 +717,7 @@
         private RemoteViews.OnClickHandler mRemoteViewClickHandler;
         private CancellationSignal mCancellationSignal;
         private final ConversationNotificationProcessor mConversationProcessor;
+        private final boolean mIsMediaInQS;
 
         private AsyncInflationTask(
                 Executor bgExecutor,
@@ -726,7 +733,8 @@
                 boolean usesIncreasedHeight,
                 boolean usesIncreasedHeadsUpHeight,
                 InflationCallback callback,
-                RemoteViews.OnClickHandler remoteViewClickHandler) {
+                RemoteViews.OnClickHandler remoteViewClickHandler,
+                boolean isMediaFlagEnabled) {
             mEntry = entry;
             mRow = row;
             mSmartReplyConstants = smartReplyConstants;
@@ -742,6 +750,7 @@
             mRemoteViewClickHandler = remoteViewClickHandler;
             mCallback = callback;
             mConversationProcessor = conversationProcessor;
+            mIsMediaInQS = isMediaFlagEnabled;
             entry.setInflationTask(this);
         }
 
@@ -765,7 +774,8 @@
                     packageContext = new RtlEnabledContext(packageContext);
                 }
                 Notification notification = sbn.getNotification();
-                if (notification.isMediaNotification()) {
+                if (notification.isMediaNotification() && !(mIsMediaInQS
+                        && MediaDataManagerKt.isMediaNotification(sbn))) {
                     MediaNotificationProcessor processor = new MediaNotificationProcessor(mContext,
                             packageContext);
                     processor.processNotification(notification, recoveredBuilder);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
index f543db7..25a0ea5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
@@ -42,6 +42,8 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ShortcutInfo;
 import android.content.pm.ShortcutManager;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
 import android.os.Handler;
 import android.os.RemoteException;
 import android.os.UserHandle;
@@ -539,12 +541,21 @@
                 && Settings.Global.getInt(mContext.getContentResolver(),
                         NOTIFICATION_BUBBLES, 0) == 1;
 
+        Drawable person =  mIconFactory.getBaseIconDrawable(mShortcutInfo);
+        if (person == null) {
+            person = mContext.getDrawable(R.drawable.ic_person).mutate();
+            TypedArray ta = mContext.obtainStyledAttributes(new int[]{android.R.attr.colorAccent});
+            int colorAccent = ta.getColor(0, 0);
+            ta.recycle();
+            person.setTint(colorAccent);
+        }
+
         PriorityOnboardingDialogController controller = mBuilderProvider.get()
                 .setContext(mUserContext)
                 .setView(onboardingView)
                 .setIgnoresDnd(ignoreDnd)
                 .setShowsAsBubble(showAsBubble)
-                .setIcon(mIconFactory.getBaseIconDrawable(mShortcutInfo))
+                .setIcon(person)
                 .setBadge(mIconFactory.getAppBadge(
                         mPackageName, UserHandle.getUserId(mSbn.getUid())))
                 .setOnSettingsClick(mOnConversationSettingsClickListener)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt
index 56238d0..4699ace 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt
@@ -41,8 +41,8 @@
 import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm.SectionProvider
 import com.android.systemui.statusbar.policy.ConfigurationController
 import com.android.systemui.util.children
-import com.android.systemui.util.takeUntil
 import com.android.systemui.util.foldToSparseArray
+import com.android.systemui.util.takeUntil
 import javax.inject.Inject
 
 /**
@@ -166,6 +166,9 @@
         peopleHubSubscription?.unsubscribe()
         peopleHubSubscription = null
         peopleHeaderView = reinflateView(peopleHeaderView, layoutInflater, R.layout.people_strip)
+                .apply {
+                    setOnHeaderClickListener(View.OnClickListener { onPeopleHeaderClick() })
+                }
         if (ENABLE_SNOOZED_CONVERSATION_HUB) {
             peopleHubSubscription = peopleHubViewAdapter.bindView(peopleHubViewBoundary)
         }
@@ -519,6 +522,15 @@
                 Intent.FLAG_ACTIVITY_SINGLE_TOP)
     }
 
+    private fun onPeopleHeaderClick() {
+        val intent = Intent(Settings.ACTION_CONVERSATION_SETTINGS)
+        activityStarter.startActivity(
+                intent,
+                true,
+                true,
+                Intent.FLAG_ACTIVITY_SINGLE_TOP)
+    }
+
     private fun onClearGentleNotifsClick(v: View) {
         onClearSilentNotifsClickListener?.onClick(v)
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt
index 8f77a1d..b13e7fb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt
@@ -93,6 +93,8 @@
         }
     }
 
+    fun setOnHeaderClickListener(listener: OnClickListener) = label.setOnClickListener(listener)
+
     private inner class PersonDataListenerImpl(val avatarView: ImageView) :
             DataListener<PersonViewModel?> {
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
index 541c784..7447335 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
@@ -29,6 +29,7 @@
 import com.android.systemui.statusbar.EmptyShadeView;
 import com.android.systemui.statusbar.NotificationShelf;
 import com.android.systemui.statusbar.notification.NotificationUtils;
+import com.android.systemui.statusbar.notification.row.ActivatableNotificationView;
 import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
 import com.android.systemui.statusbar.notification.row.ExpandableView;
 import com.android.systemui.statusbar.notification.row.FooterView;
@@ -687,15 +688,27 @@
             AmbientState ambientState) {
         int childCount = algorithmState.visibleChildren.size();
         float childrenOnTop = 0.0f;
+
+        int topHunIndex = -1;
+        for (int i = 0; i < childCount; i++) {
+            ExpandableView child = algorithmState.visibleChildren.get(i);
+            if (child instanceof ActivatableNotificationView
+                    && (child.isAboveShelf() || child.showingPulsing())) {
+                topHunIndex = i;
+                break;
+            }
+        }
+
         for (int i = childCount - 1; i >= 0; i--) {
             childrenOnTop = updateChildZValue(i, childrenOnTop,
-                    algorithmState, ambientState);
+                    algorithmState, ambientState, i == topHunIndex);
         }
     }
 
     protected float updateChildZValue(int i, float childrenOnTop,
             StackScrollAlgorithmState algorithmState,
-            AmbientState ambientState) {
+            AmbientState ambientState,
+            boolean shouldElevateHun) {
         ExpandableView child = algorithmState.visibleChildren.get(i);
         ExpandableViewState childViewState = child.getViewState();
         int zDistanceBetweenElements = ambientState.getZDistanceBetweenElements();
@@ -713,8 +726,7 @@
             }
             childViewState.zTranslation = baseZ
                     + childrenOnTop * zDistanceBetweenElements;
-        } else if (child == ambientState.getTrackedHeadsUpRow()
-                || (i == 0 && (child.isAboveShelf() || child.showingPulsing()))) {
+        } else if (shouldElevateHun) {
             // In case this is a new view that has never been measured before, we don't want to
             // elevate if we are currently expanded more then the notification
             int shelfHeight = ambientState.getShelf() == null ? 0 :
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
index db9956a..efd6767 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
@@ -57,10 +57,10 @@
     private UserHandle mCurrentUser;
     private boolean mInitialized;
 
-    private final Context mContext;
-    private final QSTileHost mHost;
-    private final Handler mHandler;
-    private final AutoAddTracker mAutoTracker;
+    protected final Context mContext;
+    protected final QSTileHost mHost;
+    protected final Handler mHandler;
+    protected final AutoAddTracker mAutoTracker;
     private final HotspotController mHotspotController;
     private final DataSaverController mDataSaverController;
     private final ManagedProfileController mManagedProfileController;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java
index 304fe00..00a932cb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java
@@ -231,7 +231,6 @@
             }
         }
 
-        Dependency.get(ProtoTracer.class).add(this);
         mLongPressTimeout = Math.min(MAX_LONG_PRESS_TIMEOUT,
                 ViewConfiguration.getLongPressTimeout());
 
@@ -286,6 +285,7 @@
      */
     public void onNavBarAttached() {
         mIsAttached = true;
+        Dependency.get(ProtoTracer.class).add(this);
         mOverviewProxyService.addCallback(mQuickSwitchListener);
         updateIsEnabled();
         startTracking();
@@ -296,6 +296,7 @@
      */
     public void onNavBarDetached() {
         mIsAttached = false;
+        Dependency.get(ProtoTracer.class).remove(this);
         mOverviewProxyService.removeCallback(mQuickSwitchListener);
         updateIsEnabled();
         stopTracking();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/FloatingRotationButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/FloatingRotationButton.java
index 16b5a23..78742f1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/FloatingRotationButton.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/FloatingRotationButton.java
@@ -33,6 +33,8 @@
 import com.android.systemui.statusbar.policy.KeyButtonDrawable;
 import com.android.systemui.statusbar.policy.KeyButtonView;
 
+import java.util.function.Consumer;
+
 /** Containing logic for the rotation button on the physical left bottom corner of the screen. */
 public class FloatingRotationButton implements RotationButton {
 
@@ -48,6 +50,7 @@
     private boolean mCanShow = true;
 
     private RotationButtonController mRotationButtonController;
+    private Consumer<Boolean> mVisibilityChangedCallback;
 
     FloatingRotationButton(Context context) {
         mContext = context;
@@ -68,6 +71,11 @@
     }
 
     @Override
+    public void setVisibilityChangedCallback(Consumer<Boolean> visibilityChangedCallback) {
+        mVisibilityChangedCallback = visibilityChangedCallback;
+    }
+
+    @Override
     public View getCurrentView() {
         return mKeyButtonView;
     }
@@ -107,6 +115,16 @@
             mKeyButtonDrawable.resetAnimation();
             mKeyButtonDrawable.startAnimation();
         }
+        mKeyButtonView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
+            @Override
+            public void onLayoutChange(View view, int i, int i1, int i2, int i3, int i4, int i5,
+                    int i6, int i7) {
+                if (mIsShowing && mVisibilityChangedCallback != null) {
+                    mVisibilityChangedCallback.accept(true);
+                }
+                mKeyButtonView.removeOnLayoutChangeListener(this);
+            }
+        });
         return true;
     }
 
@@ -117,6 +135,9 @@
         }
         mWindowManager.removeViewImmediate(mKeyButtonView);
         mIsShowing = false;
+        if (mVisibilityChangedCallback != null) {
+            mVisibilityChangedCallback.accept(false);
+        }
         return true;
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
index 27daf86..e60293c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -192,6 +192,7 @@
     private int mLayoutDirection;
 
     private boolean mForceNavBarHandleOpaque;
+    private boolean mIsCurrentUserSetup;
 
     /** @see android.view.WindowInsetsController#setSystemBarsAppearance(int) */
     private @Appearance int mAppearance;
@@ -311,6 +312,10 @@
 
         @Override
         public void onNavBarButtonAlphaChanged(float alpha, boolean animate) {
+            if (!mIsCurrentUserSetup) {
+                // If the current user is not yet setup, then don't update any button alphas
+                return;
+            }
             ButtonDispatcher buttonDispatcher = null;
             boolean forceVisible = false;
             if (QuickStepContract.isSwipeUpMode(mNavBarMode)) {
@@ -349,14 +354,6 @@
                 }
             };
 
-    private final ContextButtonListener mRotationButtonListener = (button, visible) -> {
-        if (visible) {
-            // If the button will actually become visible and the navbar is about to hide,
-            // tell the statusbar to keep it around for longer
-            mAutoHideController.touchAutoHide();
-        }
-    };
-
     private final Runnable mAutoDim = () -> getBarTransitions().setAutoDim(true);
 
     private final ContentObserver mAssistContentObserver = new ContentObserver(
@@ -383,6 +380,14 @@
         }
     };
 
+    private final DeviceProvisionedController.DeviceProvisionedListener mUserSetupListener =
+            new DeviceProvisionedController.DeviceProvisionedListener() {
+        @Override
+        public void onUserSetupChanged() {
+            mIsCurrentUserSetup = mDeviceProvisionedController.isCurrentUserSetup();
+        }
+    };
+
     @Inject
     public NavigationBarFragment(AccessibilityManagerWrapper accessibilityManagerWrapper,
             DeviceProvisionedController deviceProvisionedController, MetricsLogger metricsLogger,
@@ -450,6 +455,9 @@
                 /* defaultValue = */ true);
         DeviceConfig.addOnPropertiesChangedListener(
                 DeviceConfig.NAMESPACE_SYSTEMUI, mHandler::post, mOnPropertiesChangedListener);
+
+        mIsCurrentUserSetup = mDeviceProvisionedController.isCurrentUserSetup();
+        mDeviceProvisionedController.addCallback(mUserSetupListener);
     }
 
     @Override
@@ -458,6 +466,7 @@
         mNavigationModeController.removeListener(this);
         mAccessibilityManagerWrapper.removeCallback(mAccessibilityListener);
         mContentResolver.unregisterContentObserver(mAssistContentObserver);
+        mDeviceProvisionedController.removeCallback(mUserSetupListener);
 
         DeviceConfig.removeOnPropertiesChangedListener(mOnPropertiesChangedListener);
     }
@@ -504,8 +513,6 @@
 
         // Currently there is no accelerometer sensor on non-default display.
         if (mIsOnDefaultDisplay) {
-            mNavigationBarView.getRotateSuggestionButton().setListener(mRotationButtonListener);
-
             final RotationButtonController rotationButtonController =
                     mNavigationBarView.getRotationButtonController();
             rotationButtonController.addRotationCallback(mRotationWatcher);
@@ -591,6 +598,7 @@
                 .registerDisplayListener(this, new Handler(Looper.getMainLooper()));
 
         mOrientationHandle = new QuickswitchOrientedNavHandle(getContext());
+        mOrientationHandle.setId(R.id.secondary_home_handle);
 
         getBarTransitions().addDarkIntensityListener(mOrientationHandleIntensityListener);
         mOrientationParams = new WindowManager.LayoutParams(0, 0,
@@ -1297,6 +1305,7 @@
         if (mAutoHideController != null) {
             mAutoHideController.setNavigationBar(mAutoHideUiElement);
         }
+        mNavigationBarView.setAutoHideController(autoHideController);
     }
 
     private boolean isTransientShown() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 1eab427..5bb3c83 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -113,12 +113,9 @@
     int mNavigationIconHints = 0;
     private int mNavBarMode;
 
-    private Rect mHomeButtonBounds = new Rect();
-    private Rect mBackButtonBounds = new Rect();
-    private Rect mRecentsButtonBounds = new Rect();
-    private Rect mRotationButtonBounds = new Rect();
-    private final Region mActiveRegion = new Region();
-    private int[] mTmpPosition = new int[2];
+    private final Region mTmpRegion = new Region();
+    private final int[] mTmpPosition = new int[2];
+    private Rect mTmpBounds = new Rect();
 
     private KeyButtonDrawable mBackIcon;
     private KeyButtonDrawable mHomeDefaultIcon;
@@ -130,6 +127,7 @@
     private boolean mDeadZoneConsuming = false;
     private final NavigationBarTransitions mBarTransitions;
     private final OverviewProxyService mOverviewProxyService;
+    private AutoHideController mAutoHideController;
 
     // performs manual animation in sync with layout transitions
     private final NavTransitionListener mTransitionListener = new NavTransitionListener();
@@ -255,24 +253,23 @@
     private final OnComputeInternalInsetsListener mOnComputeInternalInsetsListener = info -> {
         // When the nav bar is in 2-button or 3-button mode, or when IME is visible in fully
         // gestural mode, the entire nav bar should be touchable.
-        if (!mEdgeBackGestureHandler.isHandlingGestures() || mImeVisible) {
+        if (!mEdgeBackGestureHandler.isHandlingGestures()) {
             info.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_FRAME);
             return;
         }
 
         info.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION);
-        ButtonDispatcher imeSwitchButton = getImeSwitchButton();
-        if (imeSwitchButton.getVisibility() == VISIBLE) {
-            // If the IME is not up, but the ime switch button is visible, then make sure that
-            // button is touchable
-            int[] loc = new int[2];
-            View buttonView = imeSwitchButton.getCurrentView();
-            buttonView.getLocationInWindow(loc);
-            info.touchableRegion.set(loc[0], loc[1], loc[0] + buttonView.getWidth(),
-                    loc[1] + buttonView.getHeight());
-            return;
+        info.touchableRegion.set(getButtonLocations(false /* includeFloatingRotationButton */,
+                false /* inScreen */));
+    };
+
+    private final Consumer<Boolean> mRotationButtonListener = (visible) -> {
+        if (visible) {
+            // If the button will actually become visible and the navbar is about to hide,
+            // tell the statusbar to keep it around for longer
+            mAutoHideController.touchAutoHide();
         }
-        info.touchableRegion.setEmpty();
+        notifyActiveTouchRegions();
     };
 
     public NavigationBarView(Context context, AttributeSet attrs) {
@@ -305,7 +302,8 @@
         mFloatingRotationButton = new FloatingRotationButton(context);
         mRotationButtonController = new RotationButtonController(context,
                 R.style.RotateButtonCCWStart90,
-                isGesturalMode ? mFloatingRotationButton : rotateSuggestionButton);
+                isGesturalMode ? mFloatingRotationButton : rotateSuggestionButton,
+                mRotationButtonListener);
 
         mConfiguration = new Configuration();
         mTmpLastConfiguration = new Configuration();
@@ -353,6 +351,10 @@
                 });
     }
 
+    public void setAutoHideController(AutoHideController autoHideController) {
+        mAutoHideController = autoHideController;
+    }
+
     public NavigationBarTransitions getBarTransitions() {
         return mBarTransitions;
     }
@@ -709,6 +711,7 @@
         getHomeButton().setVisibility(disableHome       ? View.INVISIBLE : View.VISIBLE);
         getRecentsButton().setVisibility(disableRecent  ? View.INVISIBLE : View.VISIBLE);
         getHomeHandle().setVisibility(disableHomeHandle ? View.INVISIBLE : View.VISIBLE);
+        notifyActiveTouchRegions();
     }
 
     @VisibleForTesting
@@ -927,42 +930,52 @@
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
         super.onLayout(changed, left, top, right, bottom);
 
-        mActiveRegion.setEmpty();
-        updateButtonLocation(getBackButton(), mBackButtonBounds, true);
-        updateButtonLocation(getHomeButton(), mHomeButtonBounds, false);
-        updateButtonLocation(getRecentsButton(), mRecentsButtonBounds, false);
-        updateButtonLocation(getRotateSuggestionButton(), mRotationButtonBounds, true);
-        // TODO: Handle button visibility changes
-        mOverviewProxyService.onActiveNavBarRegionChanges(mActiveRegion);
+        notifyActiveTouchRegions();
         mRecentsOnboarding.setNavBarHeight(getMeasuredHeight());
     }
 
-    private void updateButtonLocation(ButtonDispatcher button, Rect buttonBounds,
-            boolean isActive) {
+    /**
+     * Notifies the overview service of the active touch regions.
+     */
+    public void notifyActiveTouchRegions() {
+        mOverviewProxyService.onActiveNavBarRegionChanges(
+                getButtonLocations(true /* includeFloatingRotationButton */, true /* inScreen */));
+    }
+
+    private Region getButtonLocations(boolean includeFloatingRotationButton,
+            boolean inScreenSpace) {
+        mTmpRegion.setEmpty();
+        updateButtonLocation(getBackButton(), inScreenSpace);
+        updateButtonLocation(getHomeButton(), inScreenSpace);
+        updateButtonLocation(getRecentsButton(), inScreenSpace);
+        updateButtonLocation(getImeSwitchButton(), inScreenSpace);
+        updateButtonLocation(getAccessibilityButton(), inScreenSpace);
+        if (includeFloatingRotationButton && mFloatingRotationButton.isVisible()) {
+            updateButtonLocation(mFloatingRotationButton.getCurrentView(), inScreenSpace);
+        } else {
+            updateButtonLocation(getRotateSuggestionButton(), inScreenSpace);
+        }
+        return mTmpRegion;
+    }
+
+    private void updateButtonLocation(ButtonDispatcher button, boolean inScreenSpace) {
         View view = button.getCurrentView();
-        if (view == null) {
-            buttonBounds.setEmpty();
+        if (view == null || !button.isVisible()) {
             return;
         }
-        // Temporarily reset the translation back to origin to get the position in window
-        final float posX = view.getTranslationX();
-        final float posY = view.getTranslationY();
-        view.setTranslationX(0);
-        view.setTranslationY(0);
+        updateButtonLocation(view, inScreenSpace);
+    }
 
-        if (isActive) {
-            view.getLocationOnScreen(mTmpPosition);
-            buttonBounds.set(mTmpPosition[0], mTmpPosition[1],
-                    mTmpPosition[0] + view.getMeasuredWidth(),
-                    mTmpPosition[1] + view.getMeasuredHeight());
-            mActiveRegion.op(buttonBounds, Op.UNION);
+    private void updateButtonLocation(View view, boolean inScreenSpace) {
+        if (inScreenSpace) {
+            view.getBoundsOnScreen(mTmpBounds);
+        } else {
+            view.getLocationInWindow(mTmpPosition);
+            mTmpBounds.set(mTmpPosition[0], mTmpPosition[1],
+                    mTmpPosition[0] + view.getWidth(),
+                    mTmpPosition[1] + view.getHeight());
         }
-        view.getLocationInWindow(mTmpPosition);
-        buttonBounds.set(mTmpPosition[0], mTmpPosition[1],
-                mTmpPosition[0] + view.getMeasuredWidth(),
-                mTmpPosition[1] + view.getMeasuredHeight());
-        view.setTranslationX(posX);
-        view.setTranslationY(posY);
+        mTmpRegion.op(mTmpBounds, Op.UNION);
     }
 
     private void updateOrientationViews() {
@@ -1223,6 +1236,7 @@
         dumpButton(pw, "rcnt", getRecentsButton());
         dumpButton(pw, "rota", getRotateSuggestionButton());
         dumpButton(pw, "a11y", getAccessibilityButton());
+        dumpButton(pw, "ime", getImeSwitchButton());
 
         pw.println("    }");
         pw.println("    mScreenOn: " + mScreenOn);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
index 64202d2..799e16c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
@@ -2612,6 +2612,7 @@
         super.onClosingFinished();
         resetHorizontalPanelPosition();
         setClosingWithAlphaFadeout(false);
+        mMediaHierarchyManager.closeGuts();
     }
 
     private void setClosingWithAlphaFadeout(boolean closing) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index 5bb8fab..4e71a7e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -47,6 +47,9 @@
 import com.android.systemui.dagger.qualifiers.DisplayId;
 import com.android.systemui.dagger.qualifiers.Main;
 import com.android.systemui.dagger.qualifiers.UiBackground;
+import com.android.systemui.privacy.PrivacyItem;
+import com.android.systemui.privacy.PrivacyItemController;
+import com.android.systemui.privacy.PrivacyType;
 import com.android.systemui.qs.tiles.DndTile;
 import com.android.systemui.qs.tiles.RotationLockTile;
 import com.android.systemui.screenrecord.RecordingController;
@@ -70,6 +73,9 @@
 import com.android.systemui.util.RingerModeTracker;
 import com.android.systemui.util.time.DateFormatUtil;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.List;
 import java.util.Locale;
 import java.util.concurrent.Executor;
 
@@ -87,13 +93,13 @@
                 ZenModeController.Callback,
                 DeviceProvisionedListener,
                 KeyguardStateController.Callback,
+                PrivacyItemController.Callback,
                 LocationController.LocationChangeCallback,
                 RecordingController.RecordingStateChangeCallback {
     private static final String TAG = "PhoneStatusBarPolicy";
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
 
-    static final int LOCATION_STATUS_ICON_ID =
-            com.android.internal.R.drawable.perm_group_location;
+    static final int LOCATION_STATUS_ICON_ID = PrivacyType.TYPE_LOCATION.getIconId();
 
     private final String mSlotCast;
     private final String mSlotHotspot;
@@ -107,6 +113,8 @@
     private final String mSlotHeadset;
     private final String mSlotDataSaver;
     private final String mSlotLocation;
+    private final String mSlotMicrophone;
+    private final String mSlotCamera;
     private final String mSlotSensorsOff;
     private final String mSlotScreenRecord;
     private final int mDisplayId;
@@ -132,6 +140,7 @@
     private final DeviceProvisionedController mProvisionedController;
     private final KeyguardStateController mKeyguardStateController;
     private final LocationController mLocationController;
+    private final PrivacyItemController mPrivacyItemController;
     private final Executor mUiBgExecutor;
     private final SensorPrivacyController mSensorPrivacyController;
     private final RecordingController mRecordingController;
@@ -162,7 +171,8 @@
             RecordingController recordingController,
             @Nullable TelecomManager telecomManager, @DisplayId int displayId,
             @Main SharedPreferences sharedPreferences, DateFormatUtil dateFormatUtil,
-            RingerModeTracker ringerModeTracker) {
+            RingerModeTracker ringerModeTracker,
+            PrivacyItemController privacyItemController) {
         mIconController = iconController;
         mCommandQueue = commandQueue;
         mBroadcastDispatcher = broadcastDispatcher;
@@ -181,6 +191,7 @@
         mProvisionedController = deviceProvisionedController;
         mKeyguardStateController = keyguardStateController;
         mLocationController = locationController;
+        mPrivacyItemController = privacyItemController;
         mSensorPrivacyController = sensorPrivacyController;
         mRecordingController = recordingController;
         mUiBgExecutor = uiBgExecutor;
@@ -200,6 +211,8 @@
         mSlotHeadset = resources.getString(com.android.internal.R.string.status_bar_headset);
         mSlotDataSaver = resources.getString(com.android.internal.R.string.status_bar_data_saver);
         mSlotLocation = resources.getString(com.android.internal.R.string.status_bar_location);
+        mSlotMicrophone = resources.getString(com.android.internal.R.string.status_bar_microphone);
+        mSlotCamera = resources.getString(com.android.internal.R.string.status_bar_camera);
         mSlotSensorsOff = resources.getString(com.android.internal.R.string.status_bar_sensors_off);
         mSlotScreenRecord = resources.getString(
                 com.android.internal.R.string.status_bar_screen_record);
@@ -271,6 +284,22 @@
                 mResources.getString(R.string.accessibility_data_saver_on));
         mIconController.setIconVisibility(mSlotDataSaver, false);
 
+
+        // privacy items
+        String microphoneString = mResources.getString(PrivacyType.TYPE_MICROPHONE.getNameId());
+        String microphoneDesc = mResources.getString(
+                R.string.ongoing_privacy_chip_content_multiple_apps, microphoneString);
+        mIconController.setIcon(mSlotMicrophone, PrivacyType.TYPE_MICROPHONE.getIconId(),
+                microphoneDesc);
+        mIconController.setIconVisibility(mSlotMicrophone, false);
+
+        String cameraString = mResources.getString(PrivacyType.TYPE_CAMERA.getNameId());
+        String cameraDesc = mResources.getString(
+                R.string.ongoing_privacy_chip_content_multiple_apps, cameraString);
+        mIconController.setIcon(mSlotCamera, PrivacyType.TYPE_CAMERA.getIconId(),
+                cameraDesc);
+        mIconController.setIconVisibility(mSlotCamera, false);
+
         mIconController.setIcon(mSlotLocation, LOCATION_STATUS_ICON_ID,
                 mResources.getString(R.string.accessibility_location_active));
         mIconController.setIconVisibility(mSlotLocation, false);
@@ -294,6 +323,7 @@
         mNextAlarmController.addCallback(mNextAlarmCallback);
         mDataSaver.addCallback(this);
         mKeyguardStateController.addCallback(this);
+        mPrivacyItemController.addCallback(this);
         mSensorPrivacyController.addCallback(mSensorPrivacyListener);
         mLocationController.addCallback(this);
         mRecordingController.addCallback(this);
@@ -609,13 +639,52 @@
         mIconController.setIconVisibility(mSlotDataSaver, isDataSaving);
     }
 
+    @Override  // PrivacyItemController.Callback
+    public void onPrivacyItemsChanged(List<PrivacyItem> privacyItems) {
+        updatePrivacyItems(privacyItems);
+    }
+
+    private void updatePrivacyItems(List<PrivacyItem> items) {
+        boolean showCamera = false;
+        boolean showMicrophone = false;
+        boolean showLocation = false;
+        for (PrivacyItem item : items) {
+            if (item == null /* b/124234367 */) {
+                if (DEBUG) {
+                    Log.e(TAG, "updatePrivacyItems - null item found");
+                    StringWriter out = new StringWriter();
+                    mPrivacyItemController.dump(null, new PrintWriter(out), null);
+                    Log.e(TAG, out.toString());
+                }
+                continue;
+            }
+            switch (item.getPrivacyType()) {
+                case TYPE_CAMERA:
+                    showCamera = true;
+                    break;
+                case TYPE_LOCATION:
+                    showLocation = true;
+                    break;
+                case TYPE_MICROPHONE:
+                    showMicrophone = true;
+                    break;
+            }
+        }
+
+        mIconController.setIconVisibility(mSlotCamera, showCamera);
+        mIconController.setIconVisibility(mSlotMicrophone, showMicrophone);
+        if (mPrivacyItemController.getAllIndicatorsAvailable()) {
+            mIconController.setIconVisibility(mSlotLocation, showLocation);
+        }
+    }
+
     @Override
     public void onLocationActiveChanged(boolean active) {
-        updateLocation();
+        if (!mPrivacyItemController.getAllIndicatorsAvailable()) updateLocationFromController();
     }
 
     // Updates the status view based on the current state of location requests.
-    private void updateLocation() {
+    private void updateLocationFromController() {
         if (mLocationController.isLocationActive()) {
             mIconController.setIconVisibility(mSlotLocation, true);
         } else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButton.java
index 2580c0e..281207b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButton.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButton.java
@@ -20,9 +20,12 @@
 
 import com.android.systemui.statusbar.policy.KeyButtonDrawable;
 
+import java.util.function.Consumer;
+
 /** Interface of a rotation button that interacts {@link RotationButtonController}. */
 interface RotationButton {
     void setRotationButtonController(RotationButtonController rotationButtonController);
+    void setVisibilityChangedCallback(Consumer<Boolean> visibilityChangedCallback);
     View getCurrentView();
     boolean show();
     boolean hide();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButtonController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButtonController.java
index 59b10e4..dbf5aa7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButtonController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButtonController.java
@@ -117,7 +117,8 @@
         return (disable2Flags & StatusBarManager.DISABLE2_ROTATE_SUGGESTIONS) != 0;
     }
 
-    RotationButtonController(Context context, @StyleRes int style, RotationButton rotationButton) {
+    RotationButtonController(Context context, @StyleRes int style, RotationButton rotationButton,
+            Consumer<Boolean> visibilityChangedCallback) {
         mContext = context;
         mRotationButton = rotationButton;
         mRotationButton.setRotationButtonController(this);
@@ -131,6 +132,7 @@
         mTaskStackListener = new TaskStackListenerImpl();
         mRotationButton.setOnClickListener(this::onRotateSuggestionClick);
         mRotationButton.setOnHoverListener(this::onRotateSuggestionHover);
+        mRotationButton.setVisibilityChangedCallback(visibilityChangedCallback);
     }
 
     void registerListeners() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationContextButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationContextButton.java
index bd96752..687c223 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationContextButton.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationContextButton.java
@@ -26,6 +26,8 @@
 
 import com.android.systemui.statusbar.policy.KeyButtonDrawable;
 
+import java.util.function.Consumer;
+
 /** Containing logic for the rotation button in nav bar. */
 public class RotationContextButton extends ContextualButton implements
         NavigationModeController.ModeChangedListener, RotationButton {
@@ -44,6 +46,18 @@
     }
 
     @Override
+    public void setVisibilityChangedCallback(Consumer<Boolean> visibilityChangedCallback) {
+        setListener(new ContextButtonListener() {
+            @Override
+            public void onVisibilityChanged(ContextualButton button, boolean visible) {
+                if (visibilityChangedCallback != null) {
+                    visibilityChangedCallback.accept(visible);
+                }
+            }
+        });
+    }
+
+    @Override
     public void setVisibility(int visibility) {
         super.setVisibility(visibility);
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
index 673549a..e5a4679 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
@@ -79,6 +79,13 @@
     default void setReverseState(boolean isReverse) {}
 
     /**
+     * Returns {@code true} if extreme battery saver is on.
+     */
+    default boolean isExtremeSaverOn() {
+        return false;
+    }
+
+    /**
      * A listener that will be notified whenever a change in battery level or power save mode has
      * occurred.
      */
@@ -92,6 +99,9 @@
 
         default void onReverseChanged(boolean isReverse, int level, String name) {
         }
+
+        default void onExtremeBatterySaverChanged(boolean isExtreme) {
+        }
     }
 
     /**
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 7f35161..d30f01a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
@@ -58,7 +58,7 @@
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
 
     private final EnhancedEstimates mEstimates;
-    private final BroadcastDispatcher mBroadcastDispatcher;
+    protected final BroadcastDispatcher mBroadcastDispatcher;
     protected final ArrayList<BatteryController.BatteryStateChangeCallback>
             mChangeCallbacks = new ArrayList<>();
     private final ArrayList<EstimateFetchCompletion> mFetchCallbacks = new ArrayList<>();
@@ -73,6 +73,7 @@
     private boolean mCharged;
     protected boolean mPowerSave;
     private boolean mAodPowerSave;
+    protected boolean mWirelessCharging;
     private boolean mTestmode = false;
     @VisibleForTesting
     boolean mHasReceivedBattery = false;
@@ -164,6 +165,8 @@
                     BatteryManager.BATTERY_STATUS_UNKNOWN);
             mCharged = status == BatteryManager.BATTERY_STATUS_FULL;
             mCharging = mCharged || status == BatteryManager.BATTERY_STATUS_CHARGING;
+            mWirelessCharging = mCharging && intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0)
+                    == BatteryManager.BATTERY_PLUGGED_WIRELESS;
 
             fireBatteryLevelChanged();
         } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED)) {
@@ -219,6 +222,11 @@
     }
 
     @Override
+    public boolean isWirelessCharging() {
+        return mWirelessCharging;
+    }
+
+    @Override
     public void getEstimatedTimeRemainingString(EstimateFetchCompletion completion) {
         // Need to fetch or refresh the estimate, but it may involve binder calls so offload the
         // work
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 d43dd23..120a0e3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -81,6 +81,7 @@
     private boolean mClockVisibleByUser = true;
 
     private boolean mAttached;
+    private boolean mScreenReceiverRegistered;
     private Calendar mCalendar;
     private String mClockFormatString;
     private SimpleDateFormat mClockFormat;
@@ -212,6 +213,14 @@
     @Override
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
+        if (mScreenReceiverRegistered) {
+            mScreenReceiverRegistered = false;
+            mBroadcastDispatcher.unregisterReceiver(mScreenReceiver);
+            if (mSecondsHandler != null) {
+                mSecondsHandler.removeCallbacks(mSecondTick);
+                mSecondsHandler = null;
+            }
+        }
         if (mAttached) {
             mBroadcastDispatcher.unregisterReceiver(mIntentReceiver);
             mAttached = false;
@@ -362,12 +371,14 @@
                     mSecondsHandler.postAtTime(mSecondTick,
                             SystemClock.uptimeMillis() / 1000 * 1000 + 1000);
                 }
+                mScreenReceiverRegistered = true;
                 IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_OFF);
                 filter.addAction(Intent.ACTION_SCREEN_ON);
                 mBroadcastDispatcher.registerReceiver(mScreenReceiver, filter);
             }
         } else {
             if (mSecondsHandler != null) {
+                mScreenReceiverRegistered = false;
                 mBroadcastDispatcher.unregisterReceiver(mScreenReceiver);
                 mSecondsHandler.removeCallbacks(mSecondTick);
                 mSecondsHandler = null;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
index 07de388..82ad00a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -20,6 +20,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.app.Notification;
 import android.content.Context;
 import android.content.res.Resources;
 import android.database.ContentObserver;
@@ -106,9 +107,9 @@
 
     public void updateNotification(@NonNull String key, boolean alert) {
         super.updateNotification(key, alert);
-        AlertEntry alertEntry = getHeadsUpEntry(key);
-        if (alert && alertEntry != null) {
-            setEntryPinned((HeadsUpEntry) alertEntry, shouldHeadsUpBecomePinned(alertEntry.mEntry));
+        HeadsUpEntry headsUpEntry = getHeadsUpEntry(key);
+        if (alert && headsUpEntry != null) {
+            setEntryPinned(headsUpEntry, shouldHeadsUpBecomePinned(headsUpEntry.mEntry));
         }
     }
 
@@ -359,6 +360,11 @@
         return false;
     }
 
+    private static boolean isOngoingCallNotif(NotificationEntry entry) {
+        return entry.getSbn().isOngoing() && Notification.CATEGORY_CALL.equals(
+                entry.getSbn().getNotification().category);
+    }
+
     /**
      * This represents a notification and how long it is in a heads up mode. It also manages its
      * lifecycle automatically when created.
@@ -391,6 +397,15 @@
                 return 1;
             }
 
+            boolean selfCall = isOngoingCallNotif(mEntry);
+            boolean otherCall = isOngoingCallNotif(headsUpEntry.mEntry);
+
+            if (selfCall && !otherCall) {
+                return -1;
+            } else if (!selfCall && otherCall) {
+                return 1;
+            }
+
             if (remoteInputActive && !headsUpEntry.remoteInputActive) {
                 return -1;
             } else if (!remoteInputActive && headsUpEntry.remoteInputActive) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java
index 23d03a4..e1ff9a2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java
@@ -172,6 +172,24 @@
     }
 
     @Override
+    public boolean setVisible(boolean visible, boolean restart) {
+        boolean changed = super.setVisible(visible, restart);
+        if (changed) {
+            // End any existing animations when the visibility changes
+            jumpToCurrentState();
+        }
+        return changed;
+    }
+
+    @Override
+    public void jumpToCurrentState() {
+        super.jumpToCurrentState();
+        if (mAnimatedDrawable != null) {
+            mAnimatedDrawable.jumpToCurrentState();
+        }
+    }
+
+    @Override
     public void setAlpha(int alpha) {
         mState.mAlpha = alpha;
         mIconPaint.setAlpha(alpha);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
index 2d8784d..9e1485d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
@@ -225,6 +225,16 @@
     }
 
     @Override
+    public boolean setVisible(boolean visible, boolean restart) {
+        boolean changed = super.setVisible(visible, restart);
+        if (changed) {
+            // End any existing animations when the visibility changes
+            jumpToCurrentState();
+        }
+        return changed;
+    }
+
+    @Override
     public void jumpToCurrentState() {
         endAnimations("jumpToCurrentState", false /* cancel */);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
index 2563f19..49be648 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -417,6 +417,10 @@
         return (mServiceState != null && mServiceState.isEmergencyOnly());
     }
 
+    public boolean isInService() {
+        return Utils.isInService(mServiceState);
+    }
+
     private boolean isRoaming() {
         // During a carrier change, roaming indications need to be supressed.
         if (isCarrierNetworkChangeActive()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 95a9772..1dbb228f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -37,6 +37,7 @@
     DataUsageController getMobileDataController();
     DataSaverController getDataSaverController();
     String getMobileDataNetworkName();
+    boolean isMobileDataNetworkInService();
     int getNumberSubscriptions();
 
     boolean hasVoiceCallingFeature();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 32c4aec..df00a4f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -446,6 +446,12 @@
     }
 
     @Override
+    public boolean isMobileDataNetworkInService() {
+        MobileSignalController controller = getDataController();
+        return controller != null && controller.isInService();
+    }
+
+    @Override
     public int getNumberSubscriptions() {
         return mMobileSignalControllers.size();
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
index 5257ce4..4ae9665 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
@@ -84,7 +84,7 @@
                 R.bool.config_showWifiIndicatorWhenEnabled);
         boolean wifiVisible = mCurrentState.enabled && (
                 (mCurrentState.connected && mCurrentState.inetCondition == 1)
-                        || !mHasMobileDataFeature || mWifiTracker.isDefaultNetwork
+                        || !mHasMobileDataFeature || mCurrentState.isDefault
                         || visibleWhenEnabled);
         String wifiDesc = mCurrentState.connected ? mCurrentState.ssid : null;
         boolean ssidPresent = wifiVisible && mCurrentState.ssid != null;
@@ -107,6 +107,7 @@
     public void fetchInitialState() {
         mWifiTracker.fetchInitialState();
         mCurrentState.enabled = mWifiTracker.enabled;
+        mCurrentState.isDefault = mWifiTracker.isDefaultNetwork;
         mCurrentState.connected = mWifiTracker.connected;
         mCurrentState.ssid = mWifiTracker.ssid;
         mCurrentState.rssi = mWifiTracker.rssi;
@@ -121,6 +122,7 @@
     public void handleBroadcast(Intent intent) {
         mWifiTracker.handleBroadcast(intent);
         mCurrentState.enabled = mWifiTracker.enabled;
+        mCurrentState.isDefault = mWifiTracker.isDefaultNetwork;
         mCurrentState.connected = mWifiTracker.connected;
         mCurrentState.ssid = mWifiTracker.ssid;
         mCurrentState.rssi = mWifiTracker.rssi;
@@ -131,6 +133,7 @@
 
     private void handleStatusUpdated() {
         mCurrentState.statusLabel = mWifiTracker.statusLabel;
+        mCurrentState.isDefault = mWifiTracker.isDefaultNetwork;
         notifyListenersIfNecessary();
     }
 
@@ -156,6 +159,7 @@
     static class WifiState extends SignalController.State {
         String ssid;
         boolean isTransient;
+        boolean isDefault;
         String statusLabel;
 
         @Override
@@ -164,6 +168,7 @@
             WifiState state = (WifiState) s;
             ssid = state.ssid;
             isTransient = state.isTransient;
+            isDefault = state.isDefault;
             statusLabel = state.statusLabel;
         }
 
@@ -172,6 +177,7 @@
             super.toString(builder);
             builder.append(",ssid=").append(ssid)
                 .append(",isTransient=").append(isTransient)
+                .append(",isDefault=").append(isDefault)
                 .append(",statusLabel=").append(statusLabel);
         }
 
@@ -183,6 +189,7 @@
             WifiState other = (WifiState) o;
             return Objects.equals(other.ssid, ssid)
                     && other.isTransient == isTransient
+                    && other.isDefault == isDefault
                     && TextUtils.equals(other.statusLabel, statusLabel);
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt b/packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt
index 016f4de..2a5424c 100644
--- a/packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt
@@ -20,6 +20,7 @@
 import android.util.ArrayMap
 import android.util.Log
 import android.view.View
+import androidx.dynamicanimation.animation.AnimationHandler
 import androidx.dynamicanimation.animation.DynamicAnimation
 import androidx.dynamicanimation.animation.FlingAnimation
 import androidx.dynamicanimation.animation.FloatPropertyCompat
@@ -124,6 +125,12 @@
     private var defaultFling: FlingConfig = globalDefaultFling
 
     /**
+     * AnimationHandler to use if it need custom AnimationHandler, if this is null, it will use
+     * the default AnimationHandler in the DynamicAnimation.
+     */
+    private var customAnimationHandler: AnimationHandler? = null
+
+    /**
      * Internal listeners that respond to DynamicAnimations updating and ending, and dispatch to
      * the listeners provided via [addUpdateListener] and [addEndListener]. This allows us to add
      * just one permanent update and end listener to the DynamicAnimations.
@@ -447,6 +454,14 @@
         this.defaultFling = defaultFling
     }
 
+    /**
+     * Set the custom AnimationHandler for all aniatmion in this animator. Set this with null for
+     * restoring to default AnimationHandler.
+     */
+    fun setCustomAnimationHandler(handler: AnimationHandler) {
+        this.customAnimationHandler = handler
+    }
+
     /** Starts the animations! */
     fun start() {
         startAction()
@@ -501,10 +516,13 @@
                     // springs) on this property before flinging.
                     cancel(animatedProperty)
 
+                    // Apply the custom animation handler if it not null
+                    val flingAnim = getFlingAnimation(animatedProperty, target)
+                    flingAnim.animationHandler =
+                            customAnimationHandler ?: flingAnim.animationHandler
+
                     // Apply the configuration and start the animation.
-                    getFlingAnimation(animatedProperty, target)
-                            .also { flingConfig.applyToAnimation(it) }
-                            .start()
+                    flingAnim.also { flingConfig.applyToAnimation(it) }.start()
                 }
             }
 
@@ -516,6 +534,21 @@
                 if (flingConfig == null) {
                     // Apply the configuration and start the animation.
                     val springAnim = getSpringAnimation(animatedProperty, target)
+
+                    // If customAnimationHander is exist and has not been set to the animation,
+                    // it should set here.
+                    if (customAnimationHandler != null &&
+                            springAnim.animationHandler != customAnimationHandler) {
+                        // Cancel the animation before set animation handler
+                        if (springAnim.isRunning) {
+                            cancel(animatedProperty)
+                        }
+                        // Apply the custom animation handler if it not null
+                        springAnim.animationHandler =
+                                customAnimationHandler ?: springAnim.animationHandler
+                    }
+
+                    // Apply the configuration and start the animation.
                     springConfig.applyToAnimation(springAnim)
                     animationStartActions.add(springAnim::start)
                 } else {
@@ -570,10 +603,13 @@
                                     }
                                 }
 
+                                // Apply the custom animation handler if it not null
+                                val springAnim = getSpringAnimation(animatedProperty, target)
+                                springAnim.animationHandler =
+                                        customAnimationHandler ?: springAnim.animationHandler
+
                                 // Apply the configuration and start the spring animation.
-                                getSpringAnimation(animatedProperty, target)
-                                        .also { springConfig.applyToAnimation(it) }
-                                        .start()
+                                springAnim.also { springConfig.applyToAnimation(it) }.start()
                             }
                         }
                     })
diff --git a/packages/SystemUI/src/com/android/systemui/util/sensors/AsyncSensorManager.java b/packages/SystemUI/src/com/android/systemui/util/sensors/AsyncSensorManager.java
index 2224c9c..450336a 100644
--- a/packages/SystemUI/src/com/android/systemui/util/sensors/AsyncSensorManager.java
+++ b/packages/SystemUI/src/com/android/systemui/util/sensors/AsyncSensorManager.java
@@ -60,8 +60,8 @@
     private final List<SensorManagerPlugin> mPlugins;
 
     @Inject
-    public AsyncSensorManager(Context context, PluginManager pluginManager) {
-        this(context.getSystemService(SensorManager.class), pluginManager, null);
+    public AsyncSensorManager(SensorManager sensorManager, PluginManager pluginManager) {
+        this(sensorManager, pluginManager, null);
     }
 
     @VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 3455ff4..6fe11ed 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -935,6 +935,7 @@
     protected void onStateChangedH(State state) {
         if (D.BUG) Log.d(TAG, "onStateChangedH() state: " + state.toString());
         if (mState != null && state != null
+                && mState.ringerModeInternal != -1
                 && mState.ringerModeInternal != state.ringerModeInternal
                 && state.ringerModeInternal == AudioManager.RINGER_MODE_VIBRATE) {
             mController.vibrate(VibrationEffect.get(VibrationEffect.EFFECT_HEAVY_CLICK));
diff --git a/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java b/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
index 926f653..dd4ea57 100644
--- a/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
+++ b/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
@@ -228,12 +228,22 @@
                         mHandler.post(() -> {
                             final Point lastSurfacePosition = mImeSourceControl != null
                                     ? mImeSourceControl.getSurfacePosition() : null;
+                            final boolean positionChanged =
+                                    !activeControl.getSurfacePosition().equals(lastSurfacePosition);
+                            final boolean leashChanged =
+                                    !haveSameLeash(mImeSourceControl, activeControl);
                             mImeSourceControl = activeControl;
-                            if (!activeControl.getSurfacePosition().equals(lastSurfacePosition)
-                                    && mAnimation != null) {
-                                startAnimation(mImeShowing, true /* forceRestart */);
-                            } else if (!mImeShowing) {
-                                removeImeSurface();
+                            if (mAnimation != null) {
+                                if (positionChanged) {
+                                    startAnimation(mImeShowing, true /* forceRestart */);
+                                }
+                            } else {
+                                if (leashChanged) {
+                                    applyVisibilityToLeash();
+                                }
+                                if (!mImeShowing) {
+                                    removeImeSurface();
+                                }
                             }
                         });
                     }
@@ -241,6 +251,20 @@
             }
         }
 
+        private void applyVisibilityToLeash() {
+            SurfaceControl leash = mImeSourceControl.getLeash();
+            if (leash != null) {
+                SurfaceControl.Transaction t = mTransactionPool.acquire();
+                if (mImeShowing) {
+                    t.show(leash);
+                } else {
+                    t.hide(leash);
+                }
+                t.apply();
+                mTransactionPool.release(t);
+            }
+        }
+
         @Override
         public void showInsets(int types, boolean fromIme) {
             if ((types & WindowInsets.Type.ime()) == 0) {
@@ -259,6 +283,11 @@
             mHandler.post(() -> startAnimation(false /* show */, false /* forceRestart */));
         }
 
+        @Override
+        public void topFocusedWindowChanged(String packageName) {
+            // no-op
+        }
+
         /**
          * Sends the local visibility state back to window manager. Needed for legacy adjustForIme.
          */
@@ -487,4 +516,20 @@
         return IInputMethodManager.Stub.asInterface(
                 ServiceManager.getService(Context.INPUT_METHOD_SERVICE));
     }
+
+    private static boolean haveSameLeash(InsetsSourceControl a, InsetsSourceControl b) {
+        if (a == b) {
+            return true;
+        }
+        if (a == null || b == null) {
+            return false;
+        }
+        if (a.getLeash() == b.getLeash()) {
+            return true;
+        }
+        if (a.getLeash() == null || b.getLeash() == null) {
+            return false;
+        }
+        return a.getLeash().isSameSurface(b.getLeash());
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index fabf093..5a07752 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -174,6 +174,8 @@
         when(mFaceManager.isHardwareDetected()).thenReturn(true);
         when(mFaceManager.hasEnrolledTemplates()).thenReturn(true);
         when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true);
+        when(mFingerprintManager.isHardwareDetected()).thenReturn(true);
+        when(mFingerprintManager.hasEnrolledTemplates(anyInt())).thenReturn(true);
         when(mUserManager.isUserUnlocked(anyInt())).thenReturn(true);
         when(mUserManager.isPrimaryUser()).thenReturn(true);
         when(mStrongAuthTracker.getStub()).thenReturn(mock(IStrongAuthTracker.Stub.class));
@@ -419,6 +421,43 @@
     }
 
     @Test
+    public void testTriesToAuthenticateFingerprint_whenKeyguard() {
+        mKeyguardUpdateMonitor.dispatchStartedGoingToSleep(0 /* why */);
+        mTestableLooper.processAllMessages();
+
+        verify(mFingerprintManager).authenticate(any(), any(), anyInt(), any(), any(), anyInt());
+        verify(mFingerprintManager, never()).detectFingerprint(any(), any(), anyInt());
+    }
+
+    @Test
+    public void testFingerprintDoesNotAuth_whenEncrypted() {
+        testFingerprintWhenStrongAuth(
+                KeyguardUpdateMonitor.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT);
+    }
+
+    @Test
+    public void testFingerprintDoesNotAuth_whenDpmLocked() {
+        testFingerprintWhenStrongAuth(
+                KeyguardUpdateMonitor.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW);
+    }
+
+    @Test
+    public void testFingerprintDoesNotAuth_whenUserLockdown() {
+        testFingerprintWhenStrongAuth(
+                KeyguardUpdateMonitor.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN);
+    }
+
+    private void testFingerprintWhenStrongAuth(int strongAuth) {
+        when(mStrongAuthTracker.getStrongAuthForUser(anyInt())).thenReturn(strongAuth);
+        mKeyguardUpdateMonitor.dispatchStartedGoingToSleep(0 /* why */);
+        mTestableLooper.processAllMessages();
+
+        verify(mFingerprintManager, never())
+                .authenticate(any(), any(), anyInt(), any(), any(), anyInt());
+        verify(mFingerprintManager).detectFingerprint(any(), any(), anyInt());
+    }
+
+    @Test
     public void testTriesToAuthenticate_whenBouncer() {
         mKeyguardUpdateMonitor.sendKeyguardBouncerChanged(true);
         mTestableLooper.processAllMessages();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/appops/AppOpsControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/appops/AppOpsControllerTest.java
index e0049d1..ade3290 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/appops/AppOpsControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/appops/AppOpsControllerTest.java
@@ -26,11 +26,19 @@
 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.inOrder;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import android.app.AppOpsManager;
+import android.content.pm.PackageManager;
+import android.media.AudioManager;
+import android.media.AudioRecordingConfiguration;
 import android.os.Looper;
 import android.os.UserHandle;
 import android.testing.AndroidTestingRunner;
@@ -39,14 +47,17 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
 import com.android.systemui.dump.DumpManager;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.InOrder;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+import java.util.Collections;
 import java.util.List;
 
 @SmallTest
@@ -56,6 +67,7 @@
     private static final String TEST_PACKAGE_NAME = "test";
     private static final int TEST_UID = UserHandle.getUid(0, 0);
     private static final int TEST_UID_OTHER = UserHandle.getUid(1, 0);
+    private static final int TEST_UID_NON_USER_SENSITIVE = UserHandle.getUid(2, 0);
 
     @Mock
     private AppOpsManager mAppOpsManager;
@@ -65,6 +77,18 @@
     private AppOpsControllerImpl.H mMockHandler;
     @Mock
     private DumpManager mDumpManager;
+    @Mock
+    private PermissionFlagsCache mFlagsCache;
+    @Mock
+    private PackageManager mPackageManager;
+    @Mock(stubOnly = true)
+    private AudioManager mAudioManager;
+    @Mock()
+    private BroadcastDispatcher mDispatcher;
+    @Mock(stubOnly = true)
+    private AudioManager.AudioRecordingCallback mRecordingCallback;
+    @Mock(stubOnly = true)
+    private AudioRecordingConfiguration mPausedMockRecording;
 
     private AppOpsControllerImpl mController;
     private TestableLooper mTestableLooper;
@@ -76,20 +100,46 @@
 
         getContext().addMockSystemService(AppOpsManager.class, mAppOpsManager);
 
-        mController =
-                new AppOpsControllerImpl(mContext, mTestableLooper.getLooper(), mDumpManager);
+        // All permissions of TEST_UID and TEST_UID_OTHER are user sensitive. None of
+        // TEST_UID_NON_USER_SENSITIVE are user sensitive.
+        getContext().setMockPackageManager(mPackageManager);
+        when(mFlagsCache.getPermissionFlags(anyString(), anyString(), eq(TEST_UID))).thenReturn(
+                PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED);
+        when(mFlagsCache.getPermissionFlags(anyString(), anyString(), eq(TEST_UID_OTHER)))
+                .thenReturn(PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED);
+        when(mFlagsCache.getPermissionFlags(anyString(), anyString(),
+                eq(TEST_UID_NON_USER_SENSITIVE))).thenReturn(0);
+
+        doAnswer((invocation) -> mRecordingCallback = invocation.getArgument(0))
+                .when(mAudioManager).registerAudioRecordingCallback(any(), any());
+        when(mPausedMockRecording.getClientUid()).thenReturn(TEST_UID);
+        when(mPausedMockRecording.isClientSilenced()).thenReturn(true);
+
+        when(mAudioManager.getActiveRecordingConfigurations())
+                .thenReturn(List.of(mPausedMockRecording));
+
+        mController = new AppOpsControllerImpl(
+                mContext,
+                mTestableLooper.getLooper(),
+                mDumpManager,
+                mFlagsCache,
+                mAudioManager,
+                mDispatcher
+        );
     }
 
     @Test
     public void testOnlyListenForFewOps() {
         mController.setListening(true);
         verify(mAppOpsManager, times(1)).startWatchingActive(AppOpsControllerImpl.OPS, mController);
+        verify(mDispatcher, times(1)).registerReceiverWithHandler(eq(mController), any(), any());
     }
 
     @Test
     public void testStopListening() {
         mController.setListening(false);
         verify(mAppOpsManager, times(1)).stopWatchingActive(mController);
+        verify(mDispatcher, times(1)).unregisterReceiver(mController);
     }
 
     @Test
@@ -173,6 +223,26 @@
     }
 
     @Test
+    public void nonUserSensitiveOpsAreIgnored() {
+        mController.onOpActiveChanged(AppOpsManager.OP_RECORD_AUDIO,
+                TEST_UID_NON_USER_SENSITIVE, TEST_PACKAGE_NAME, true);
+        assertEquals(0, mController.getActiveAppOpsForUser(
+                UserHandle.getUserId(TEST_UID_NON_USER_SENSITIVE)).size());
+    }
+
+    @Test
+    public void nonUserSensitiveOpsNotNotified() {
+        mController.addCallback(new int[]{AppOpsManager.OP_RECORD_AUDIO}, mCallback);
+        mController.onOpActiveChanged(AppOpsManager.OP_RECORD_AUDIO,
+                TEST_UID_NON_USER_SENSITIVE, TEST_PACKAGE_NAME, true);
+
+        mTestableLooper.processAllMessages();
+
+        verify(mCallback, never())
+                .onActiveStateChanged(anyInt(), anyInt(), anyString(), anyBoolean());
+    }
+
+    @Test
     public void opNotedScheduledForRemoval() {
         mController.setBGHandler(mMockHandler);
         mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME,
@@ -321,6 +391,89 @@
                 AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true);
     }
 
+    @Test
+    public void testPausedRecordingIsRetrievedOnCreation() {
+        mController.addCallback(new int[]{AppOpsManager.OP_RECORD_AUDIO}, mCallback);
+        mTestableLooper.processAllMessages();
+
+        mController.onOpActiveChanged(
+                AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true);
+        mTestableLooper.processAllMessages();
+
+        verify(mCallback, never())
+                .onActiveStateChanged(anyInt(), anyInt(), anyString(), anyBoolean());
+    }
+
+    @Test
+    public void testPausedRecordingFilteredOut() {
+        mController.addCallback(new int[]{AppOpsManager.OP_RECORD_AUDIO}, mCallback);
+        mTestableLooper.processAllMessages();
+
+        mController.onOpActiveChanged(
+                AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true);
+        mTestableLooper.processAllMessages();
+
+        assertTrue(mController.getActiveAppOps().isEmpty());
+    }
+
+    @Test
+    public void testOnlyRecordAudioPaused() {
+        mController.addCallback(new int[]{
+                AppOpsManager.OP_RECORD_AUDIO,
+                AppOpsManager.OP_CAMERA
+        }, mCallback);
+        mTestableLooper.processAllMessages();
+
+        mController.onOpActiveChanged(
+                AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, true);
+        mTestableLooper.processAllMessages();
+
+        verify(mCallback).onActiveStateChanged(
+                AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, true);
+        List<AppOpItem> list = mController.getActiveAppOps();
+
+        assertEquals(1, list.size());
+        assertEquals(AppOpsManager.OP_CAMERA, list.get(0).getCode());
+    }
+
+    @Test
+    public void testUnpausedRecordingSentActive() {
+        mController.addCallback(new int[]{AppOpsManager.OP_RECORD_AUDIO}, mCallback);
+        mTestableLooper.processAllMessages();
+        mController.onOpActiveChanged(
+                AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true);
+
+        mTestableLooper.processAllMessages();
+        mRecordingCallback.onRecordingConfigChanged(Collections.emptyList());
+
+        mTestableLooper.processAllMessages();
+
+        verify(mCallback).onActiveStateChanged(
+                AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true);
+    }
+
+    @Test
+    public void testAudioPausedSentInactive() {
+        mController.addCallback(new int[]{AppOpsManager.OP_RECORD_AUDIO}, mCallback);
+        mTestableLooper.processAllMessages();
+        mController.onOpActiveChanged(
+                AppOpsManager.OP_RECORD_AUDIO, TEST_UID_OTHER, TEST_PACKAGE_NAME, true);
+        mTestableLooper.processAllMessages();
+
+        AudioRecordingConfiguration mockARC = mock(AudioRecordingConfiguration.class);
+        when(mockARC.getClientUid()).thenReturn(TEST_UID_OTHER);
+        when(mockARC.isClientSilenced()).thenReturn(true);
+
+        mRecordingCallback.onRecordingConfigChanged(List.of(mockARC));
+        mTestableLooper.processAllMessages();
+
+        InOrder inOrder = inOrder(mCallback);
+        inOrder.verify(mCallback).onActiveStateChanged(
+                AppOpsManager.OP_RECORD_AUDIO, TEST_UID_OTHER, TEST_PACKAGE_NAME, true);
+        inOrder.verify(mCallback).onActiveStateChanged(
+                AppOpsManager.OP_RECORD_AUDIO, TEST_UID_OTHER, TEST_PACKAGE_NAME, false);
+    }
+
     private class TestHandler extends AppOpsControllerImpl.H {
         TestHandler(Looper looper) {
             mController.super(looper);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/appops/PermissionFlagsCacheTest.kt b/packages/SystemUI/tests/src/com/android/systemui/appops/PermissionFlagsCacheTest.kt
new file mode 100644
index 0000000..0fb0ce0
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/appops/PermissionFlagsCacheTest.kt
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.appops
+
+import android.content.pm.PackageManager
+import android.os.UserHandle
+import android.testing.AndroidTestingRunner
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.time.FakeSystemClock
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertNotEquals
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers.any
+import org.mockito.ArgumentMatchers.anyString
+import org.mockito.Mock
+import org.mockito.Mockito.`when`
+import org.mockito.Mockito.never
+import org.mockito.Mockito.times
+import org.mockito.Mockito.verify
+import org.mockito.MockitoAnnotations
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+class PermissionFlagsCacheTest : SysuiTestCase() {
+
+    companion object {
+        const val TEST_PERMISSION = "test_permission"
+        const val TEST_PACKAGE = "test_package"
+        const val TEST_UID1 = 1000
+        const val TEST_UID2 = UserHandle.PER_USER_RANGE + 1000
+    }
+
+    @Mock
+    private lateinit var packageManager: PackageManager
+
+    private lateinit var executor: FakeExecutor
+    private lateinit var flagsCache: PermissionFlagsCache
+
+    @Before
+    fun setUp() {
+        MockitoAnnotations.initMocks(this)
+
+        executor = FakeExecutor(FakeSystemClock())
+
+        flagsCache = PermissionFlagsCache(packageManager, executor)
+        executor.runAllReady()
+    }
+
+    @Test
+    fun testNotListeningByDefault() {
+        verify(packageManager, never()).addOnPermissionsChangeListener(any())
+    }
+
+    @Test
+    fun testGetCorrectFlags() {
+        `when`(packageManager.getPermissionFlags(anyString(), anyString(), any())).thenReturn(0)
+        `when`(packageManager.getPermissionFlags(
+                TEST_PERMISSION,
+                TEST_PACKAGE,
+                UserHandle.getUserHandleForUid(TEST_UID1))
+        ).thenReturn(1)
+
+        assertEquals(1, flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID1))
+        assertNotEquals(1, flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID2))
+    }
+
+    @Test
+    fun testFlagIsCached() {
+        flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID1)
+
+        flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID1)
+
+        verify(packageManager, times(1)).getPermissionFlags(
+                TEST_PERMISSION,
+                TEST_PACKAGE,
+                UserHandle.getUserHandleForUid(TEST_UID1)
+        )
+    }
+
+    @Test
+    fun testListeningAfterFirstRequest() {
+        flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID1)
+
+        verify(packageManager).addOnPermissionsChangeListener(any())
+    }
+
+    @Test
+    fun testListeningOnlyOnce() {
+        flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID1)
+
+        flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID2)
+
+        verify(packageManager, times(1)).addOnPermissionsChangeListener(any())
+    }
+
+    @Test
+    fun testUpdateFlag() {
+        assertEquals(0, flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID1))
+
+        `when`(packageManager.getPermissionFlags(
+                TEST_PERMISSION,
+                TEST_PACKAGE,
+                UserHandle.getUserHandleForUid(TEST_UID1))
+        ).thenReturn(1)
+
+        flagsCache.onPermissionsChanged(TEST_UID1)
+
+        executor.runAllReady()
+
+        assertEquals(1, flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID1))
+    }
+
+    @Test
+    fun testUpdateFlag_notUpdatedIfUidHasNotBeenRequestedBefore() {
+        flagsCache.getPermissionFlags(TEST_PERMISSION, TEST_PACKAGE, TEST_UID1)
+
+        flagsCache.onPermissionsChanged(TEST_UID2)
+
+        executor.runAllReady()
+
+        verify(packageManager, never()).getPermissionFlags(
+                TEST_PERMISSION,
+                TEST_PACKAGE,
+                UserHandle.getUserHandleForUid(TEST_UID2)
+        )
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java
index 15828b4..1ad8856 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java
@@ -999,6 +999,29 @@
         verify(mNotificationGroupManager, times(1)).onEntryRemoved(groupSummary.getEntry());
     }
 
+
+    /**
+     * Verifies that when a non visually interruptive update occurs for a bubble in the overflow,
+     * the that bubble does not get promoted from the overflow.
+     */
+    @Test
+    public void test_notVisuallyInterruptive_updateOverflowBubble_notAdded() {
+        // Setup
+        mBubbleController.updateBubble(mRow.getEntry());
+        mBubbleController.updateBubble(mRow2.getEntry());
+        assertTrue(mBubbleController.hasBubbles());
+
+        // Overflow it
+        mBubbleData.dismissBubbleWithKey(mRow.getEntry().getKey(),
+                BubbleController.DISMISS_USER_GESTURE);
+        assertThat(mBubbleData.hasBubbleInStackWithKey(mRow.getEntry().getKey())).isFalse();
+        assertThat(mBubbleData.hasOverflowBubbleWithKey(mRow.getEntry().getKey())).isTrue();
+
+        // Test
+        mBubbleController.updateBubble(mRow.getEntry());
+        assertThat(mBubbleData.hasBubbleInStackWithKey(mRow.getEntry().getKey())).isFalse();
+    }
+
     /**
      * Sets the bubble metadata flags for this entry. These ]flags are normally set by
      * NotificationManagerService when the notification is sent, however, these tests do not
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java
index 12221bc..0a07a73 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java
@@ -514,6 +514,26 @@
     }
 
     /**
+     * Verifies that when a non visually interruptive update occurs, that the selection does not
+     * change.
+     */
+    @Test
+    public void test_notVisuallyInterruptive_updateBubble_selectionDoesntChange() {
+        // Setup
+        sendUpdatedEntryAtTime(mEntryA1, 1000);
+        sendUpdatedEntryAtTime(mEntryB1, 2000);
+        sendUpdatedEntryAtTime(mEntryB2, 3000);
+        sendUpdatedEntryAtTime(mEntryA2, 4000); // [A2, B2, B1, A1]
+        mBubbleData.setListener(mListener);
+
+        assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA2);
+
+        // Test
+        sendUpdatedEntryAtTime(mEntryB1, 5000, false /* isVisuallyInterruptive */);
+        assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA2);
+    }
+
+    /**
      * Verifies that a request to expand the stack has no effect if there are no bubbles.
      */
     @Test
@@ -885,9 +905,15 @@
     }
 
     private void sendUpdatedEntryAtTime(NotificationEntry entry, long postTime) {
+        sendUpdatedEntryAtTime(entry, postTime, true /* visuallyInterruptive */);
+    }
+
+    private void sendUpdatedEntryAtTime(NotificationEntry entry, long postTime,
+            boolean visuallyInterruptive) {
         setPostTime(entry, postTime);
         // BubbleController calls this:
         Bubble b = mBubbleData.getOrCreateBubble(entry, null /* persistedBubble */);
+        b.setVisuallyInterruptiveForTest(visuallyInterruptive);
         // And then this
         mBubbleData.notificationEntryUpdated(b, false /* suppressFlyout*/,
                 true /* showInShade */);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/controls/CustomIconCacheTest.kt b/packages/SystemUI/tests/src/com/android/systemui/controls/CustomIconCacheTest.kt
new file mode 100644
index 0000000..4d0f2ed
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/controls/CustomIconCacheTest.kt
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.controls
+
+import android.content.ComponentName
+import android.graphics.drawable.Icon
+import android.testing.AndroidTestingRunner
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import org.junit.Assert.assertNull
+import org.junit.Assert.assertTrue
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mock
+import org.mockito.MockitoAnnotations
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+class CustomIconCacheTest : SysuiTestCase() {
+
+    companion object {
+        private val TEST_COMPONENT1 = ComponentName.unflattenFromString("pkg/.cls1")!!
+        private val TEST_COMPONENT2 = ComponentName.unflattenFromString("pkg/.cls2")!!
+        private const val CONTROL_ID_1 = "TEST_CONTROL_1"
+        private const val CONTROL_ID_2 = "TEST_CONTROL_2"
+    }
+
+    @Mock(stubOnly = true)
+    private lateinit var icon1: Icon
+    @Mock(stubOnly = true)
+    private lateinit var icon2: Icon
+    private lateinit var customIconCache: CustomIconCache
+
+    @Before
+    fun setUp() {
+        MockitoAnnotations.initMocks(this)
+
+        customIconCache = CustomIconCache()
+    }
+
+    @Test
+    fun testIconStoredCorrectly() {
+        customIconCache.store(TEST_COMPONENT1, CONTROL_ID_1, icon1)
+
+        assertTrue(icon1 === customIconCache.retrieve(TEST_COMPONENT1, CONTROL_ID_1))
+    }
+
+    @Test
+    fun testIconNotStoredReturnsNull() {
+        customIconCache.store(TEST_COMPONENT1, CONTROL_ID_1, icon1)
+
+        assertNull(customIconCache.retrieve(TEST_COMPONENT1, CONTROL_ID_2))
+    }
+
+    @Test
+    fun testWrongComponentReturnsNull() {
+        customIconCache.store(TEST_COMPONENT1, CONTROL_ID_1, icon1)
+
+        assertNull(customIconCache.retrieve(TEST_COMPONENT2, CONTROL_ID_1))
+    }
+
+    @Test
+    fun testChangeComponentOldComponentIsRemoved() {
+        customIconCache.store(TEST_COMPONENT1, CONTROL_ID_1, icon1)
+        customIconCache.store(TEST_COMPONENT2, CONTROL_ID_2, icon2)
+
+        assertNull(customIconCache.retrieve(TEST_COMPONENT1, CONTROL_ID_1))
+        assertNull(customIconCache.retrieve(TEST_COMPONENT1, CONTROL_ID_2))
+    }
+
+    @Test
+    fun testChangeComponentCorrectIconRetrieved() {
+        customIconCache.store(TEST_COMPONENT1, CONTROL_ID_1, icon1)
+        customIconCache.store(TEST_COMPONENT2, CONTROL_ID_1, icon2)
+
+        assertTrue(icon2 === customIconCache.retrieve(TEST_COMPONENT2, CONTROL_ID_1))
+    }
+
+    @Test
+    fun testStoreNull() {
+        customIconCache.store(TEST_COMPONENT1, CONTROL_ID_1, icon1)
+        customIconCache.store(TEST_COMPONENT1, CONTROL_ID_1, null)
+
+        assertNull(customIconCache.retrieve(TEST_COMPONENT1, CONTROL_ID_1))
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapperTest.kt b/packages/SystemUI/tests/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapperTest.kt
index 861c620..690b9a7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapperTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapperTest.kt
@@ -25,6 +25,7 @@
 import com.android.systemui.util.time.FakeSystemClock
 import org.junit.After
 import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
 import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
@@ -78,4 +79,15 @@
 
         assertEquals(list, wrapper.readFavorites())
     }
+
+    @Test
+    fun testSaveEmptyOnNonExistingFile() {
+        if (file.exists()) {
+            file.delete()
+        }
+
+        wrapper.storeFavorites(emptyList())
+
+        assertFalse(file.exists())
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/controls/management/FavoritesModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/controls/management/FavoritesModelTest.kt
index ce33a8d..f0003ed 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/controls/management/FavoritesModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/controls/management/FavoritesModelTest.kt
@@ -22,6 +22,7 @@
 import androidx.test.filters.SmallTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.controls.ControlInterface
+import com.android.systemui.controls.CustomIconCache
 import com.android.systemui.controls.controller.ControlInfo
 import com.android.systemui.util.mockito.any
 import com.android.systemui.util.mockito.eq
@@ -57,6 +58,8 @@
     private lateinit var callback: FavoritesModel.FavoritesModelCallback
     @Mock
     private lateinit var adapter: RecyclerView.Adapter<*>
+    @Mock
+    private lateinit var customIconCache: CustomIconCache
     private lateinit var model: FavoritesModel
     private lateinit var dividerWrapper: DividerWrapper
 
@@ -64,7 +67,7 @@
     fun setUp() {
         MockitoAnnotations.initMocks(this)
 
-        model = FavoritesModel(TEST_COMPONENT, INITIAL_FAVORITES, callback)
+        model = FavoritesModel(customIconCache, TEST_COMPONENT, INITIAL_FAVORITES, callback)
         model.attachAdapter(adapter)
         dividerWrapper = model.elements.first { it is DividerWrapper } as DividerWrapper
     }
@@ -89,7 +92,7 @@
     @Test
     fun testInitialElements() {
         val expected = INITIAL_FAVORITES.map {
-            ControlInfoWrapper(TEST_COMPONENT, it, true)
+            ControlInfoWrapper(TEST_COMPONENT, it, true, customIconCache::retrieve)
         } + DividerWrapper()
         assertEquals(expected, model.elements)
     }
@@ -287,5 +290,13 @@
         verify(callback).onFirstChange()
     }
 
+    @Test
+    fun testCacheCalledWhenGettingCustomIcon() {
+        val wrapper = model.elements[0] as ControlInfoWrapper
+        wrapper.customIcon
+
+        verify(customIconCache).retrieve(TEST_COMPONENT, wrapper.controlId)
+    }
+
     private fun getDividerPosition(): Int = model.elements.indexOf(dividerWrapper)
 }
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
index 3ef6027..c82bb9b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
@@ -103,8 +103,6 @@
 
     @Test
     public void testAod_usesLightSensor() {
-        mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
-        mScreen.transitionTo(INITIALIZED, DOZE_AOD);
         mScreen.onScreenState(Display.STATE_DOZE);
 
         mSensor.sendSensorEvent(3);
@@ -114,8 +112,7 @@
 
     @Test
     public void testAod_usesDebugValue() throws Exception {
-        mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
-        mScreen.transitionTo(INITIALIZED, DOZE_AOD);
+        mScreen.onScreenState(Display.STATE_DOZE);
 
         Intent intent = new Intent(DozeScreenBrightness.ACTION_AOD_BRIGHTNESS);
         intent.putExtra(DozeScreenBrightness.BRIGHTNESS_BUCKET, 1);
@@ -166,14 +163,13 @@
     }
 
     @Test
-    public void testDozingAfterPulsing_pausesLightSensor() throws Exception {
+    public void testScreenOffAfterPulsing_pausesLightSensor() throws Exception {
         mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
         mScreen.transitionTo(INITIALIZED, DOZE);
         mScreen.transitionTo(DOZE, DOZE_REQUEST_PULSE);
         mScreen.transitionTo(DOZE_REQUEST_PULSE, DOZE_PULSING);
         mScreen.transitionTo(DOZE_PULSING, DOZE_PULSE_DONE);
         mScreen.transitionTo(DOZE_PULSE_DONE, DOZE);
-        mScreen.onScreenState(Display.STATE_DOZE);
 
         mSensor.sendSensorEvent(1);
 
@@ -181,6 +177,17 @@
     }
 
     @Test
+    public void testOnScreenStateSetBeforeTransition_stillRegistersSensor() {
+        mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
+        mScreen.onScreenState(Display.STATE_DOZE);
+        mScreen.transitionTo(INITIALIZED, DOZE_AOD);
+
+        mSensor.sendSensorEvent(1);
+
+        assertEquals(1, mServiceFake.screenBrightness);
+    }
+
+    @Test
     public void testNullSensor() throws Exception {
         mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager,
                 null /* sensor */, mBroadcastDispatcher, mDozeHost, null /* handler */,
@@ -191,12 +198,15 @@
         mScreen.transitionTo(INITIALIZED, DOZE_AOD);
         mScreen.transitionTo(DOZE_AOD, DOZE_AOD_PAUSING);
         mScreen.transitionTo(DOZE_AOD_PAUSING, DOZE_AOD_PAUSED);
+        mScreen.onScreenState(Display.STATE_DOZE);
+        mScreen.onScreenState(Display.STATE_OFF);
     }
 
     @Test
     public void testNoBrightnessDeliveredAfterFinish() throws Exception {
         mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
         mScreen.transitionTo(INITIALIZED, DOZE_AOD);
+        mScreen.onScreenState(Display.STATE_DOZE);
         mScreen.transitionTo(DOZE_AOD, FINISH);
 
         mSensor.sendSensorEvent(1);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt
index c63781c..81139f19 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt
@@ -16,6 +16,7 @@
 
 package com.android.systemui.media
 
+import android.content.Intent
 import android.content.res.ColorStateList
 import android.graphics.Color
 import android.graphics.drawable.GradientDrawable
@@ -23,6 +24,7 @@
 import android.media.MediaMetadata
 import android.media.session.MediaSession
 import android.media.session.PlaybackState
+import android.provider.Settings.ACTION_MEDIA_CONTROLS_SETTINGS
 import android.testing.AndroidTestingRunner
 import android.testing.TestableLooper
 import android.view.View
@@ -35,24 +37,29 @@
 import androidx.constraintlayout.widget.ConstraintSet
 import androidx.lifecycle.LiveData
 import androidx.test.filters.SmallTest
-import com.android.systemui.R
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.statusbar.phone.KeyguardDismissUtil
 import com.android.systemui.util.animation.TransitionLayout
 import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.mockito.eq
 import com.android.systemui.util.time.FakeSystemClock
 import com.google.common.truth.Truth.assertThat
+import dagger.Lazy
 import org.junit.After
 import org.junit.Before
 import org.junit.Rule
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.mockito.ArgumentCaptor
+import org.mockito.ArgumentMatchers.anyLong
 import org.mockito.Mock
+import org.mockito.Mockito.anyBoolean
 import org.mockito.Mockito.mock
+import org.mockito.Mockito.never
 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 KEY = "TEST_KEY"
 private const val APP = "APP"
@@ -81,6 +88,8 @@
     @Mock private lateinit var seekBarViewModel: SeekBarViewModel
     @Mock private lateinit var seekBarData: LiveData<SeekBarViewModel.Progress>
     @Mock private lateinit var mediaViewController: MediaViewController
+    @Mock private lateinit var keyguardDismissUtil: KeyguardDismissUtil
+    @Mock private lateinit var mediaDataManager: MediaDataManager
     @Mock private lateinit var expandedSet: ConstraintSet
     @Mock private lateinit var collapsedSet: ConstraintSet
     private lateinit var appIcon: ImageView
@@ -100,6 +109,9 @@
     private lateinit var action2: ImageButton
     private lateinit var action3: ImageButton
     private lateinit var action4: ImageButton
+    private lateinit var settings: View
+    private lateinit var cancel: View
+    private lateinit var dismiss: View
 
     private lateinit var session: MediaSession
     private val device = MediaDeviceData(true, null, DEVICE_NAME)
@@ -114,7 +126,7 @@
         whenever(mediaViewController.collapsedLayout).thenReturn(collapsedSet)
 
         player = MediaControlPanel(context, bgExecutor, activityStarter, mediaViewController,
-                seekBarViewModel)
+                seekBarViewModel, Lazy { mediaDataManager }, keyguardDismissUtil)
         whenever(seekBarViewModel.progress).thenReturn(seekBarData)
 
         // Mock out a view holder for the player to attach to.
@@ -156,6 +168,12 @@
         whenever(holder.action3).thenReturn(action3)
         action4 = ImageButton(context)
         whenever(holder.action4).thenReturn(action4)
+        settings = View(context)
+        whenever(holder.settings).thenReturn(settings)
+        cancel = View(context)
+        whenever(holder.cancel).thenReturn(cancel)
+        dismiss = View(context)
+        whenever(holder.dismiss).thenReturn(dismiss)
 
         // Create media session
         val metadataBuilder = MediaMetadata.Builder().apply {
@@ -183,7 +201,7 @@
     fun bindWhenUnattached() {
         val state = MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null, emptyList(),
                 emptyList(), PACKAGE, null, null, device, true, null)
-        player.bind(state)
+        player.bind(state, PACKAGE)
         assertThat(player.isPlaying()).isFalse()
     }
 
@@ -192,7 +210,7 @@
         player.attach(holder)
         val state = MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null, emptyList(),
                 emptyList(), PACKAGE, session.getSessionToken(), null, device, true, null)
-        player.bind(state)
+        player.bind(state, PACKAGE)
         assertThat(appName.getText()).isEqualTo(APP)
         assertThat(titleText.getText()).isEqualTo(TITLE)
         assertThat(artistText.getText()).isEqualTo(ARTIST)
@@ -203,7 +221,7 @@
         player.attach(holder)
         val state = MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null, emptyList(),
                 emptyList(), PACKAGE, session.getSessionToken(), null, device, true, null)
-        player.bind(state)
+        player.bind(state, PACKAGE)
         val list = ArgumentCaptor.forClass(ColorStateList::class.java)
         verify(view).setBackgroundTintList(list.capture())
         assertThat(list.value).isEqualTo(ColorStateList.valueOf(BG_COLOR))
@@ -214,7 +232,7 @@
         player.attach(holder)
         val state = MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null, emptyList(),
                 emptyList(), PACKAGE, session.getSessionToken(), null, device, true, null)
-        player.bind(state)
+        player.bind(state, PACKAGE)
         assertThat(seamlessText.getText()).isEqualTo(DEVICE_NAME)
         assertThat(seamless.isEnabled()).isTrue()
     }
@@ -226,7 +244,7 @@
         player.attach(holder)
         val state = MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null, emptyList(),
                 emptyList(), PACKAGE, session.getSessionToken(), null, disabledDevice, true, null)
-        player.bind(state)
+        player.bind(state, PACKAGE)
         verify(expandedSet).setVisibility(seamless.id, View.GONE)
         verify(expandedSet).setVisibility(seamlessFallback.id, View.VISIBLE)
         verify(collapsedSet).setVisibility(seamless.id, View.GONE)
@@ -238,7 +256,7 @@
         player.attach(holder)
         val state = MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null, emptyList(),
                 emptyList(), PACKAGE, session.getSessionToken(), null, null, true, null)
-        player.bind(state)
+        player.bind(state, PACKAGE)
         assertThat(seamless.isEnabled()).isTrue()
         assertThat(seamlessText.getText()).isEqualTo(context.getResources().getString(
                 com.android.internal.R.string.ext_media_seamless_action))
@@ -250,8 +268,70 @@
         val state = MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null, emptyList(),
                 emptyList(), PACKAGE, session.getSessionToken(), null, device, true, null,
                 resumption = true)
-        player.bind(state)
+        player.bind(state, PACKAGE)
         assertThat(seamlessText.getText()).isEqualTo(DEVICE_NAME)
         assertThat(seamless.isEnabled()).isFalse()
     }
+
+    @Test
+    fun longClick_gutsClosed() {
+        player.attach(holder)
+        whenever(mediaViewController.isGutsVisible).thenReturn(false)
+
+        val captor = ArgumentCaptor.forClass(View.OnLongClickListener::class.java)
+        verify(holder.player).setOnLongClickListener(captor.capture())
+
+        captor.value.onLongClick(holder.player)
+        verify(mediaViewController).openGuts()
+    }
+
+    @Test
+    fun longClick_gutsOpen() {
+        player.attach(holder)
+        whenever(mediaViewController.isGutsVisible).thenReturn(true)
+
+        val captor = ArgumentCaptor.forClass(View.OnLongClickListener::class.java)
+        verify(holder.player).setOnLongClickListener(captor.capture())
+
+        captor.value.onLongClick(holder.player)
+        verify(mediaViewController, never()).openGuts()
+    }
+
+    @Test
+    fun cancelButtonClick_animation() {
+        player.attach(holder)
+
+        cancel.callOnClick()
+
+        verify(mediaViewController).closeGuts(false)
+    }
+
+    @Test
+    fun settingsButtonClick() {
+        player.attach(holder)
+
+        settings.callOnClick()
+
+        val captor = ArgumentCaptor.forClass(Intent::class.java)
+        verify(activityStarter).startActivity(captor.capture(), eq(true))
+
+        assertThat(captor.value.action).isEqualTo(ACTION_MEDIA_CONTROLS_SETTINGS)
+    }
+
+    @Test
+    fun dismissButtonClick() {
+        val mediaKey = "key for dismissal"
+        player.attach(holder)
+        val state = MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null, emptyList(),
+                emptyList(), PACKAGE, session.getSessionToken(), null, null, true, null,
+                notificationKey = KEY)
+        player.bind(state, mediaKey)
+
+        dismiss.callOnClick()
+        val captor = ArgumentCaptor.forClass(ActivityStarter.OnDismissAction::class.java)
+        verify(keyguardDismissUtil).executeWhenUnlocked(captor.capture(), anyBoolean())
+
+        captor.value.onDismiss()
+        verify(mediaDataManager).dismissMediaData(eq(mediaKey), anyLong())
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataCombineLatestTest.java b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataCombineLatestTest.java
index dbc5596..609b847 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataCombineLatestTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataCombineLatestTest.java
@@ -20,8 +20,8 @@
 
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
 import static org.mockito.Mockito.verify;
 
 import android.graphics.Color;
@@ -33,20 +33,25 @@
 import com.android.systemui.SysuiTestCase;
 
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
 
 import java.util.ArrayList;
-import java.util.Map;
 
 @SmallTest
 @RunWith(AndroidTestingRunner.class)
 @TestableLooper.RunWithLooper
 public class MediaDataCombineLatestTest extends SysuiTestCase {
 
+    @Rule public MockitoRule mockito = MockitoJUnit.rule();
+
     private static final String KEY = "TEST_KEY";
+    private static final String OLD_KEY = "TEST_KEY_OLD";
     private static final String APP = "APP";
     private static final String PACKAGE = "PKG";
     private static final int BG_COLOR = Color.RED;
@@ -57,39 +62,26 @@
 
     private MediaDataCombineLatest mManager;
 
-    @Mock private MediaDataManager mDataSource;
-    @Mock private MediaDeviceManager mDeviceSource;
     @Mock private MediaDataManager.Listener mListener;
 
-    private MediaDataManager.Listener mDataListener;
-    private MediaDeviceManager.Listener mDeviceListener;
-
     private MediaData mMediaData;
     private MediaDeviceData mDeviceData;
 
     @Before
     public void setUp() {
-        mDataSource = mock(MediaDataManager.class);
-        mDeviceSource = mock(MediaDeviceManager.class);
-        mListener = mock(MediaDataManager.Listener.class);
-
-        mManager = new MediaDataCombineLatest(mDataSource, mDeviceSource);
-
-        mDataListener = captureDataListener();
-        mDeviceListener = captureDeviceListener();
-
+        mManager = new MediaDataCombineLatest();
         mManager.addListener(mListener);
 
         mMediaData = new MediaData(USER_ID, true, BG_COLOR, APP, null, ARTIST, TITLE, null,
-                new ArrayList<>(), new ArrayList<>(), PACKAGE, null, null, null, true, null, false,
-                KEY, false);
+                new ArrayList<>(), new ArrayList<>(), PACKAGE, null, null, null, true, null, true,
+                false, KEY, false, false, false);
         mDeviceData = new MediaDeviceData(true, null, DEVICE_NAME);
     }
 
     @Test
     public void eventNotEmittedWithoutDevice() {
         // WHEN data source emits an event without device data
-        mDataListener.onMediaDataLoaded(KEY, null, mMediaData);
+        mManager.onMediaDataLoaded(KEY, null, mMediaData);
         // THEN an event isn't emitted
         verify(mListener, never()).onMediaDataLoaded(eq(KEY), any(), any());
     }
@@ -97,7 +89,7 @@
     @Test
     public void eventNotEmittedWithoutMedia() {
         // WHEN device source emits an event without media data
-        mDeviceListener.onMediaDeviceChanged(KEY, mDeviceData);
+        mManager.onMediaDeviceChanged(KEY, null, mDeviceData);
         // THEN an event isn't emitted
         verify(mListener, never()).onMediaDataLoaded(eq(KEY), any(), any());
     }
@@ -105,9 +97,9 @@
     @Test
     public void emitEventAfterDeviceFirst() {
         // GIVEN that a device event has already been received
-        mDeviceListener.onMediaDeviceChanged(KEY, mDeviceData);
+        mManager.onMediaDeviceChanged(KEY, null, mDeviceData);
         // WHEN media event is received
-        mDataListener.onMediaDataLoaded(KEY, null, mMediaData);
+        mManager.onMediaDataLoaded(KEY, null, mMediaData);
         // THEN the listener receives a combined event
         ArgumentCaptor<MediaData> captor = ArgumentCaptor.forClass(MediaData.class);
         verify(mListener).onMediaDataLoaded(eq(KEY), any(), captor.capture());
@@ -117,9 +109,9 @@
     @Test
     public void emitEventAfterMediaFirst() {
         // GIVEN that media event has already been received
-        mDataListener.onMediaDataLoaded(KEY, null, mMediaData);
+        mManager.onMediaDataLoaded(KEY, null, mMediaData);
         // WHEN device event is received
-        mDeviceListener.onMediaDeviceChanged(KEY, mDeviceData);
+        mManager.onMediaDeviceChanged(KEY, null, mDeviceData);
         // THEN the listener receives a combined event
         ArgumentCaptor<MediaData> captor = ArgumentCaptor.forClass(MediaData.class);
         verify(mListener).onMediaDataLoaded(eq(KEY), any(), captor.capture());
@@ -127,62 +119,94 @@
     }
 
     @Test
+    public void migrateKeyMediaFirst() {
+        // GIVEN that media and device info has already been received
+        mManager.onMediaDataLoaded(OLD_KEY, null, mMediaData);
+        mManager.onMediaDeviceChanged(OLD_KEY, null, mDeviceData);
+        reset(mListener);
+        // WHEN a key migration event is received
+        mManager.onMediaDataLoaded(KEY, OLD_KEY, mMediaData);
+        // THEN the listener receives a combined event
+        ArgumentCaptor<MediaData> captor = ArgumentCaptor.forClass(MediaData.class);
+        verify(mListener).onMediaDataLoaded(eq(KEY), eq(OLD_KEY), captor.capture());
+        assertThat(captor.getValue().getDevice()).isNotNull();
+    }
+
+    @Test
+    public void migrateKeyDeviceFirst() {
+        // GIVEN that media and device info has already been received
+        mManager.onMediaDataLoaded(OLD_KEY, null, mMediaData);
+        mManager.onMediaDeviceChanged(OLD_KEY, null, mDeviceData);
+        reset(mListener);
+        // WHEN a key migration event is received
+        mManager.onMediaDeviceChanged(KEY, OLD_KEY, mDeviceData);
+        // THEN the listener receives a combined event
+        ArgumentCaptor<MediaData> captor = ArgumentCaptor.forClass(MediaData.class);
+        verify(mListener).onMediaDataLoaded(eq(KEY), eq(OLD_KEY), captor.capture());
+        assertThat(captor.getValue().getDevice()).isNotNull();
+    }
+
+    @Test
+    public void migrateKeyMediaAfter() {
+        // GIVEN that media and device info has already been received
+        mManager.onMediaDataLoaded(OLD_KEY, null, mMediaData);
+        mManager.onMediaDeviceChanged(OLD_KEY, null, mDeviceData);
+        mManager.onMediaDeviceChanged(KEY, OLD_KEY, mDeviceData);
+        reset(mListener);
+        // WHEN a second key migration event is received for media
+        mManager.onMediaDataLoaded(KEY, OLD_KEY, mMediaData);
+        // THEN the key has already been migrated
+        ArgumentCaptor<MediaData> captor = ArgumentCaptor.forClass(MediaData.class);
+        verify(mListener).onMediaDataLoaded(eq(KEY), eq(KEY), captor.capture());
+        assertThat(captor.getValue().getDevice()).isNotNull();
+    }
+
+    @Test
+    public void migrateKeyDeviceAfter() {
+        // GIVEN that media and device info has already been received
+        mManager.onMediaDataLoaded(OLD_KEY, null, mMediaData);
+        mManager.onMediaDeviceChanged(OLD_KEY, null, mDeviceData);
+        mManager.onMediaDataLoaded(KEY, OLD_KEY, mMediaData);
+        reset(mListener);
+        // WHEN a second key migration event is received for the device
+        mManager.onMediaDeviceChanged(KEY, OLD_KEY, mDeviceData);
+        // THEN the key has already be migrated
+        ArgumentCaptor<MediaData> captor = ArgumentCaptor.forClass(MediaData.class);
+        verify(mListener).onMediaDataLoaded(eq(KEY), eq(KEY), captor.capture());
+        assertThat(captor.getValue().getDevice()).isNotNull();
+    }
+
+    @Test
     public void mediaDataRemoved() {
         // WHEN media data is removed without first receiving device or data
-        mDataListener.onMediaDataRemoved(KEY);
+        mManager.onMediaDataRemoved(KEY);
         // THEN a removed event isn't emitted
         verify(mListener, never()).onMediaDataRemoved(eq(KEY));
     }
 
     @Test
     public void mediaDataRemovedAfterMediaEvent() {
-        mDataListener.onMediaDataLoaded(KEY, null, mMediaData);
-        mDataListener.onMediaDataRemoved(KEY);
+        mManager.onMediaDataLoaded(KEY, null, mMediaData);
+        mManager.onMediaDataRemoved(KEY);
         verify(mListener).onMediaDataRemoved(eq(KEY));
     }
 
     @Test
     public void mediaDataRemovedAfterDeviceEvent() {
-        mDeviceListener.onMediaDeviceChanged(KEY, mDeviceData);
-        mDataListener.onMediaDataRemoved(KEY);
+        mManager.onMediaDeviceChanged(KEY, null, mDeviceData);
+        mManager.onMediaDataRemoved(KEY);
         verify(mListener).onMediaDataRemoved(eq(KEY));
     }
 
     @Test
     public void mediaDataKeyUpdated() {
         // GIVEN that device and media events have already been received
-        mDataListener.onMediaDataLoaded(KEY, null, mMediaData);
-        mDeviceListener.onMediaDeviceChanged(KEY, mDeviceData);
+        mManager.onMediaDataLoaded(KEY, null, mMediaData);
+        mManager.onMediaDeviceChanged(KEY, null, mDeviceData);
         // WHEN the key is changed
-        mDataListener.onMediaDataLoaded("NEW_KEY", KEY, mMediaData);
+        mManager.onMediaDataLoaded("NEW_KEY", KEY, mMediaData);
         // THEN the listener gets a load event with the correct keys
         ArgumentCaptor<MediaData> captor = ArgumentCaptor.forClass(MediaData.class);
         verify(mListener).onMediaDataLoaded(eq("NEW_KEY"), any(), captor.capture());
     }
-
-    @Test
-    public void getDataIncludesDevice() {
-        // GIVEN that device and media events have been received
-        mDeviceListener.onMediaDeviceChanged(KEY, mDeviceData);
-        mDataListener.onMediaDataLoaded(KEY, null, mMediaData);
-
-        // THEN the result of getData includes device info
-        Map<String, MediaData> results = mManager.getData();
-        assertThat(results.get(KEY)).isNotNull();
-        assertThat(results.get(KEY).getDevice()).isEqualTo(mDeviceData);
-    }
-
-    private MediaDataManager.Listener captureDataListener() {
-        ArgumentCaptor<MediaDataManager.Listener> captor = ArgumentCaptor.forClass(
-                MediaDataManager.Listener.class);
-        verify(mDataSource).addListener(captor.capture());
-        return captor.getValue();
-    }
-
-    private MediaDeviceManager.Listener captureDeviceListener() {
-        ArgumentCaptor<MediaDeviceManager.Listener> captor = ArgumentCaptor.forClass(
-                MediaDeviceManager.Listener.class);
-        verify(mDeviceSource).addListener(captor.capture());
-        return captor.getValue();
-    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataFilterTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataFilterTest.kt
index afb64a7..36b6527 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataFilterTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataFilterTest.kt
@@ -32,6 +32,7 @@
 import org.mockito.Mockito
 import org.mockito.Mockito.`when`
 import org.mockito.Mockito.never
+import org.mockito.Mockito.reset
 import org.mockito.Mockito.verify
 import org.mockito.MockitoAnnotations
 import java.util.concurrent.Executor
@@ -56,8 +57,6 @@
 class MediaDataFilterTest : SysuiTestCase() {
 
     @Mock
-    private lateinit var combineLatest: MediaDataCombineLatest
-    @Mock
     private lateinit var listener: MediaDataManager.Listener
     @Mock
     private lateinit var broadcastDispatcher: BroadcastDispatcher
@@ -78,8 +77,9 @@
     @Before
     fun setup() {
         MockitoAnnotations.initMocks(this)
-        mediaDataFilter = MediaDataFilter(combineLatest, broadcastDispatcher, mediaResumeListener,
-            mediaDataManager, lockscreenUserManager, executor)
+        mediaDataFilter = MediaDataFilter(broadcastDispatcher, mediaResumeListener,
+                lockscreenUserManager, executor)
+        mediaDataFilter.mediaDataManager = mediaDataManager
         mediaDataFilter.addListener(listener)
 
         // Start all tests as main user
@@ -152,8 +152,9 @@
     @Test
     fun testOnUserSwitched_addsNewUserControls() {
         // GIVEN that we had some media for both users
-        val dataMap = mapOf(KEY to dataMain, KEY_ALT to dataGuest)
-        `when`(combineLatest.getData()).thenReturn(dataMap)
+        mediaDataFilter.onMediaDataLoaded(KEY, null, dataMain)
+        mediaDataFilter.onMediaDataLoaded(KEY_ALT, null, dataGuest)
+        reset(listener)
 
         // and we switch to guest user
         setUser(USER_GUEST)
@@ -213,4 +214,4 @@
 
         verify(mediaDataManager).setTimedOut(eq(KEY), eq(true))
     }
-}
\ No newline at end of file
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataManagerTest.kt
index 59c2d0e..b47ee29 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDataManagerTest.kt
@@ -15,6 +15,7 @@
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.statusbar.SbnBuilder
 import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.mockito.capture
 import com.android.systemui.util.mockito.eq
 import com.android.systemui.util.time.FakeSystemClock
 import com.google.common.truth.Truth.assertThat
@@ -23,9 +24,13 @@
 import org.junit.Rule
 import org.junit.Test
 import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
 import org.mockito.Mock
 import org.mockito.Mockito
 import org.mockito.Mockito.mock
+import org.mockito.Mockito.never
+import org.mockito.Mockito.reset
 import org.mockito.Mockito.verify
 import org.mockito.junit.MockitoJUnit
 import org.mockito.Mockito.`when` as whenever
@@ -47,6 +52,7 @@
 @RunWith(AndroidTestingRunner::class)
 class MediaDataManagerTest : SysuiTestCase() {
 
+    @JvmField @Rule val mockito = MockitoJUnit.rule()
     @Mock lateinit var mediaControllerFactory: MediaControllerFactory
     @Mock lateinit var controller: MediaController
     lateinit var session: MediaSession
@@ -57,19 +63,36 @@
     @Mock lateinit var broadcastDispatcher: BroadcastDispatcher
     @Mock lateinit var mediaTimeoutListener: MediaTimeoutListener
     @Mock lateinit var mediaResumeListener: MediaResumeListener
+    @Mock lateinit var mediaSessionBasedFilter: MediaSessionBasedFilter
+    @Mock lateinit var mediaDeviceManager: MediaDeviceManager
+    @Mock lateinit var mediaDataCombineLatest: MediaDataCombineLatest
+    @Mock lateinit var mediaDataFilter: MediaDataFilter
+    @Mock lateinit var listener: MediaDataManager.Listener
     @Mock lateinit var pendingIntent: PendingIntent
-    @JvmField @Rule val mockito = MockitoJUnit.rule()
     lateinit var mediaDataManager: MediaDataManager
     lateinit var mediaNotification: StatusBarNotification
+    @Captor lateinit var mediaDataCaptor: ArgumentCaptor<MediaData>
 
     @Before
     fun setup() {
         foregroundExecutor = FakeExecutor(FakeSystemClock())
         backgroundExecutor = FakeExecutor(FakeSystemClock())
-        mediaDataManager = MediaDataManager(context, backgroundExecutor, foregroundExecutor,
-                mediaControllerFactory, broadcastDispatcher, dumpManager,
-                mediaTimeoutListener, mediaResumeListener, useMediaResumption = true,
-                useQsMediaPlayer = true)
+        mediaDataManager = MediaDataManager(
+            context = context,
+            backgroundExecutor = backgroundExecutor,
+            foregroundExecutor = foregroundExecutor,
+            mediaControllerFactory = mediaControllerFactory,
+            broadcastDispatcher = broadcastDispatcher,
+            dumpManager = dumpManager,
+            mediaTimeoutListener = mediaTimeoutListener,
+            mediaResumeListener = mediaResumeListener,
+            mediaSessionBasedFilter = mediaSessionBasedFilter,
+            mediaDeviceManager = mediaDeviceManager,
+            mediaDataCombineLatest = mediaDataCombineLatest,
+            mediaDataFilter = mediaDataFilter,
+            useMediaResumption = true,
+            useQsMediaPlayer = true
+        )
         session = MediaSession(context, "MediaDataManagerTestSession")
         mediaNotification = SbnBuilder().run {
             setPkg(PACKAGE_NAME)
@@ -84,6 +107,12 @@
             putString(MediaMetadata.METADATA_KEY_TITLE, SESSION_TITLE)
         }
         whenever(mediaControllerFactory.create(eq(session.sessionToken))).thenReturn(controller)
+
+        // This is an ugly hack for now. The mediaSessionBasedFilter is one of the internal
+        // listeners in the internal processing pipeline. It receives events, but ince it is a
+        // mock, it doesn't pass those events along the chain to the external listeners. So, just
+        // treat mediaSessionBasedFilter as a listener for testing.
+        listener = mediaSessionBasedFilter
     }
 
     @After
@@ -113,8 +142,6 @@
 
     @Test
     fun testOnMetaDataLoaded_callsListener() {
-        val listener = mock(MediaDataManager.Listener::class.java)
-        mediaDataManager.addListener(listener)
         mediaDataManager.onNotificationAdded(KEY, mediaNotification)
         mediaDataManager.onMediaDataLoaded(KEY, oldKey = null, data = mock(MediaData::class.java))
         verify(listener).onMediaDataLoaded(eq(KEY), eq(null), anyObject())
@@ -122,84 +149,74 @@
 
     @Test
     fun testOnMetaDataLoaded_conservesActiveFlag() {
-        val listener = TestListener()
         whenever(mediaControllerFactory.create(anyObject())).thenReturn(controller)
         whenever(controller.metadata).thenReturn(metadataBuilder.build())
         mediaDataManager.addListener(listener)
         mediaDataManager.onNotificationAdded(KEY, mediaNotification)
         assertThat(backgroundExecutor.runAllReady()).isEqualTo(1)
         assertThat(foregroundExecutor.runAllReady()).isEqualTo(1)
-        assertThat(listener.data!!.active).isTrue()
+        verify(listener).onMediaDataLoaded(eq(KEY), eq(null), capture(mediaDataCaptor))
+        assertThat(mediaDataCaptor.value!!.active).isTrue()
     }
 
     @Test
     fun testOnNotificationRemoved_callsListener() {
-        val listener = mock(MediaDataManager.Listener::class.java)
-        mediaDataManager.addListener(listener)
         mediaDataManager.onNotificationAdded(KEY, mediaNotification)
         mediaDataManager.onMediaDataLoaded(KEY, oldKey = null, data = mock(MediaData::class.java))
         mediaDataManager.onNotificationRemoved(KEY)
-
         verify(listener).onMediaDataRemoved(eq(KEY))
     }
 
     @Test
     fun testOnNotificationRemoved_withResumption() {
         // GIVEN that the manager has a notification with a resume action
-        val listener = TestListener()
-        mediaDataManager.addListener(listener)
         whenever(controller.metadata).thenReturn(metadataBuilder.build())
         mediaDataManager.onNotificationAdded(KEY, mediaNotification)
         assertThat(backgroundExecutor.runAllReady()).isEqualTo(1)
         assertThat(foregroundExecutor.runAllReady()).isEqualTo(1)
-        val data = listener.data!!
+        verify(listener).onMediaDataLoaded(eq(KEY), eq(null), capture(mediaDataCaptor))
+        val data = mediaDataCaptor.value
         assertThat(data.resumption).isFalse()
         mediaDataManager.onMediaDataLoaded(KEY, null, data.copy(resumeAction = Runnable {}))
         // WHEN the notification is removed
         mediaDataManager.onNotificationRemoved(KEY)
         // THEN the media data indicates that it is for resumption
-        assertThat(listener.data!!.resumption).isTrue()
-        // AND the new key is the package name
-        assertThat(listener.key!!).isEqualTo(PACKAGE_NAME)
-        assertThat(listener.oldKey!!).isEqualTo(KEY)
-        assertThat(listener.removedKey).isNull()
+        verify(listener).onMediaDataLoaded(eq(PACKAGE_NAME), eq(KEY), capture(mediaDataCaptor))
+        assertThat(mediaDataCaptor.value.resumption).isTrue()
     }
 
     @Test
     fun testOnNotificationRemoved_twoWithResumption() {
         // GIVEN that the manager has two notifications with resume actions
-        val listener = TestListener()
-        mediaDataManager.addListener(listener)
         whenever(controller.metadata).thenReturn(metadataBuilder.build())
         mediaDataManager.onNotificationAdded(KEY, mediaNotification)
         mediaDataManager.onNotificationAdded(KEY_2, mediaNotification)
         assertThat(backgroundExecutor.runAllReady()).isEqualTo(2)
         assertThat(foregroundExecutor.runAllReady()).isEqualTo(2)
-        val data = listener.data!!
+        verify(listener).onMediaDataLoaded(eq(KEY), eq(null), capture(mediaDataCaptor))
+        val data = mediaDataCaptor.value
         assertThat(data.resumption).isFalse()
         val resumableData = data.copy(resumeAction = Runnable {})
         mediaDataManager.onMediaDataLoaded(KEY, null, resumableData)
         mediaDataManager.onMediaDataLoaded(KEY_2, null, resumableData)
+        reset(listener)
         // WHEN the first is removed
         mediaDataManager.onNotificationRemoved(KEY)
         // THEN the data is for resumption and the key is migrated to the package name
-        assertThat(listener.data!!.resumption).isTrue()
-        assertThat(listener.key!!).isEqualTo(PACKAGE_NAME)
-        assertThat(listener.oldKey!!).isEqualTo(KEY)
-        assertThat(listener.removedKey).isNull()
+        verify(listener).onMediaDataLoaded(eq(PACKAGE_NAME), eq(KEY), capture(mediaDataCaptor))
+        assertThat(mediaDataCaptor.value.resumption).isTrue()
+        verify(listener, never()).onMediaDataRemoved(eq(KEY))
         // WHEN the second is removed
         mediaDataManager.onNotificationRemoved(KEY_2)
         // THEN the data is for resumption and the second key is removed
-        assertThat(listener.data!!.resumption).isTrue()
-        assertThat(listener.key!!).isEqualTo(PACKAGE_NAME)
-        assertThat(listener.oldKey!!).isEqualTo(PACKAGE_NAME)
-        assertThat(listener.removedKey!!).isEqualTo(KEY_2)
+        verify(listener).onMediaDataLoaded(eq(PACKAGE_NAME), eq(PACKAGE_NAME),
+                capture(mediaDataCaptor))
+        assertThat(mediaDataCaptor.value.resumption).isTrue()
+        verify(listener).onMediaDataRemoved(eq(KEY_2))
     }
 
     @Test
     fun testAddResumptionControls() {
-        val listener = TestListener()
-        mediaDataManager.addListener(listener)
         // WHEN resumption controls are added`
         val desc = MediaDescription.Builder().run {
             setTitle(SESSION_TITLE)
@@ -210,32 +227,23 @@
         assertThat(backgroundExecutor.runAllReady()).isEqualTo(1)
         assertThat(foregroundExecutor.runAllReady()).isEqualTo(1)
         // THEN the media data indicates that it is for resumption
-        val data = listener.data!!
+        verify(listener).onMediaDataLoaded(eq(PACKAGE_NAME), eq(null), capture(mediaDataCaptor))
+        val data = mediaDataCaptor.value
         assertThat(data.resumption).isTrue()
         assertThat(data.song).isEqualTo(SESSION_TITLE)
         assertThat(data.app).isEqualTo(APP_NAME)
         assertThat(data.actions).hasSize(1)
     }
 
-    /**
-     * Simple implementation of [MediaDataManager.Listener] for the test.
-     *
-     * Giving up on trying to get a mock Listener and ArgumentCaptor to work.
-     */
-    private class TestListener : MediaDataManager.Listener {
-        var data: MediaData? = null
-        var key: String? = null
-        var oldKey: String? = null
-        var removedKey: String? = null
+    @Test
+    fun testDismissMedia_listenerCalled() {
+        mediaDataManager.onNotificationAdded(KEY, mediaNotification)
+        mediaDataManager.onMediaDataLoaded(KEY, oldKey = null, data = mock(MediaData::class.java))
+        mediaDataManager.dismissMediaData(KEY, 0L)
 
-        override fun onMediaDataLoaded(key: String, oldKey: String?, data: MediaData) {
-            this.key = key
-            this.oldKey = oldKey
-            this.data = data
-        }
+        foregroundExecutor.advanceClockToLast()
+        foregroundExecutor.runAllReady()
 
-        override fun onMediaDataRemoved(key: String) {
-            removedKey = key
-        }
+        verify(listener).onMediaDataRemoved(eq(KEY))
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt
index fc22eeb..ab3b208 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt
@@ -16,13 +16,12 @@
 
 package com.android.systemui.media
 
-import android.app.Notification
 import android.graphics.drawable.Drawable
-import android.media.MediaMetadata
 import android.media.MediaRouter2Manager
 import android.media.RoutingSessionInfo
+import android.media.session.MediaController
+import android.media.session.MediaController.PlaybackInfo
 import android.media.session.MediaSession
-import android.media.session.PlaybackState
 import android.testing.AndroidTestingRunner
 import android.testing.TestableLooper
 import androidx.test.filters.SmallTest
@@ -55,7 +54,6 @@
 private const val KEY_OLD = "TEST_KEY_OLD"
 private const val PACKAGE = "PKG"
 private const val SESSION_KEY = "SESSION_KEY"
-private const val SESSION_ARTIST = "SESSION_ARTIST"
 private const val SESSION_TITLE = "SESSION_TITLE"
 private const val DEVICE_NAME = "DEVICE_NAME"
 private const val USER_ID = 0
@@ -68,28 +66,29 @@
 public class MediaDeviceManagerTest : SysuiTestCase() {
 
     private lateinit var manager: MediaDeviceManager
-    @Mock private lateinit var mediaDataManager: MediaDataManager
+    @Mock private lateinit var controllerFactory: MediaControllerFactory
     @Mock private lateinit var lmmFactory: LocalMediaManagerFactory
     @Mock private lateinit var lmm: LocalMediaManager
     @Mock private lateinit var mr2: MediaRouter2Manager
-    private lateinit var fakeExecutor: FakeExecutor
+    private lateinit var fakeFgExecutor: FakeExecutor
+    private lateinit var fakeBgExecutor: FakeExecutor
     @Mock private lateinit var dumpster: DumpManager
     @Mock private lateinit var listener: MediaDeviceManager.Listener
     @Mock private lateinit var device: MediaDevice
     @Mock private lateinit var icon: Drawable
     @Mock private lateinit var route: RoutingSessionInfo
+    @Mock private lateinit var controller: MediaController
+    @Mock private lateinit var playbackInfo: PlaybackInfo
     private lateinit var session: MediaSession
-    private lateinit var metadataBuilder: MediaMetadata.Builder
-    private lateinit var playbackBuilder: PlaybackState.Builder
-    private lateinit var notifBuilder: Notification.Builder
     private lateinit var mediaData: MediaData
     @JvmField @Rule val mockito = MockitoJUnit.rule()
 
     @Before
     fun setUp() {
-        fakeExecutor = FakeExecutor(FakeSystemClock())
-        manager = MediaDeviceManager(context, lmmFactory, mr2, fakeExecutor, mediaDataManager,
-                dumpster)
+        fakeFgExecutor = FakeExecutor(FakeSystemClock())
+        fakeBgExecutor = FakeExecutor(FakeSystemClock())
+        manager = MediaDeviceManager(controllerFactory, lmmFactory, mr2, fakeFgExecutor,
+                fakeBgExecutor, dumpster)
         manager.addListener(listener)
 
         // Configure mocks.
@@ -100,28 +99,13 @@
         whenever(mr2.getRoutingSessionForMediaController(any())).thenReturn(route)
 
         // Create a media sesssion and notification for testing.
-        metadataBuilder = MediaMetadata.Builder().apply {
-            putString(MediaMetadata.METADATA_KEY_ARTIST, SESSION_ARTIST)
-            putString(MediaMetadata.METADATA_KEY_TITLE, SESSION_TITLE)
-        }
-        playbackBuilder = PlaybackState.Builder().apply {
-            setState(PlaybackState.STATE_PAUSED, 6000L, 1f)
-            setActions(PlaybackState.ACTION_PLAY)
-        }
-        session = MediaSession(context, SESSION_KEY).apply {
-            setMetadata(metadataBuilder.build())
-            setPlaybackState(playbackBuilder.build())
-        }
-        session.setActive(true)
-        notifBuilder = Notification.Builder(context, "NONE").apply {
-            setContentTitle(SESSION_TITLE)
-            setContentText(SESSION_ARTIST)
-            setSmallIcon(android.R.drawable.ic_media_pause)
-            setStyle(Notification.MediaStyle().setMediaSession(session.getSessionToken()))
-        }
+        session = MediaSession(context, SESSION_KEY)
+
         mediaData = MediaData(USER_ID, true, 0, PACKAGE, null, null, SESSION_TITLE, null,
             emptyList(), emptyList(), PACKAGE, session.sessionToken, clickIntent = null,
             device = null, active = true, resumeAction = null)
+        whenever(controllerFactory.create(session.sessionToken))
+                .thenReturn(controller)
     }
 
     @After
@@ -144,13 +128,15 @@
     fun loadAndRemoveMediaData() {
         manager.onMediaDataLoaded(KEY, null, mediaData)
         manager.onMediaDataRemoved(KEY)
+        fakeBgExecutor.runAllReady()
         verify(lmm).unregisterCallback(any())
     }
 
     @Test
     fun loadMediaDataWithNullToken() {
         manager.onMediaDataLoaded(KEY, null, mediaData.copy(token = null))
-        fakeExecutor.runAllReady()
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         val data = captureDeviceData(KEY)
         assertThat(data.enabled).isTrue()
         assertThat(data.name).isEqualTo(DEVICE_NAME)
@@ -163,10 +149,12 @@
         reset(listener)
         // WHEN data is loaded with a new key
         manager.onMediaDataLoaded(KEY, KEY_OLD, mediaData)
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         // THEN the listener for the old key should removed.
         verify(lmm).unregisterCallback(any())
         // AND a new device event emitted
-        val data = captureDeviceData(KEY)
+        val data = captureDeviceData(KEY, KEY_OLD)
         assertThat(data.enabled).isTrue()
         assertThat(data.name).isEqualTo(DEVICE_NAME)
     }
@@ -179,26 +167,32 @@
         // WHEN the new key is the same as the old key
         manager.onMediaDataLoaded(KEY, KEY, mediaData)
         // THEN no event should be emitted
-        verify(listener, never()).onMediaDeviceChanged(eq(KEY), any())
+        verify(listener, never()).onMediaDeviceChanged(eq(KEY), eq(null), any())
     }
 
     @Test
     fun unknownOldKey() {
-        manager.onMediaDataLoaded(KEY, "unknown", mediaData)
-        verify(listener).onMediaDeviceChanged(eq(KEY), any())
+        val oldKey = "unknown"
+        manager.onMediaDataLoaded(KEY, oldKey, mediaData)
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
+        verify(listener).onMediaDeviceChanged(eq(KEY), eq(oldKey), any())
     }
 
     @Test
     fun updateToSessionTokenWithNullRoute() {
         // GIVEN that media data has been loaded with a null token
         manager.onMediaDataLoaded(KEY, null, mediaData.copy(token = null))
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
+        reset(listener)
         // WHEN media data is loaded with a different token
         // AND that token results in a null route
-        reset(listener)
         whenever(mr2.getRoutingSessionForMediaController(any())).thenReturn(null)
         manager.onMediaDataLoaded(KEY, null, mediaData)
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         // THEN the device should be disabled
-        fakeExecutor.runAllReady()
         val data = captureDeviceData(KEY)
         assertThat(data.enabled).isFalse()
         assertThat(data.name).isNull()
@@ -209,7 +203,8 @@
     fun deviceEventOnAddNotification() {
         // WHEN a notification is added
         manager.onMediaDataLoaded(KEY, null, mediaData)
-        val deviceCallback = captureCallback()
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         // THEN the update is dispatched to the listener
         val data = captureDeviceData(KEY)
         assertThat(data.enabled).isTrue()
@@ -223,16 +218,18 @@
         manager.removeListener(listener)
         // THEN it doesn't receive device events
         manager.onMediaDataLoaded(KEY, null, mediaData)
-        verify(listener, never()).onMediaDeviceChanged(eq(KEY), any())
+        verify(listener, never()).onMediaDeviceChanged(eq(KEY), eq(null), any())
     }
 
     @Test
     fun deviceListUpdate() {
         manager.onMediaDataLoaded(KEY, null, mediaData)
+        fakeBgExecutor.runAllReady()
         val deviceCallback = captureCallback()
         // WHEN the device list changes
         deviceCallback.onDeviceListUpdate(mutableListOf(device))
-        assertThat(fakeExecutor.runAllReady()).isEqualTo(1)
+        assertThat(fakeBgExecutor.runAllReady()).isEqualTo(1)
+        assertThat(fakeFgExecutor.runAllReady()).isEqualTo(1)
         // THEN the update is dispatched to the listener
         val data = captureDeviceData(KEY)
         assertThat(data.enabled).isTrue()
@@ -243,10 +240,12 @@
     @Test
     fun selectedDeviceStateChanged() {
         manager.onMediaDataLoaded(KEY, null, mediaData)
+        fakeBgExecutor.runAllReady()
         val deviceCallback = captureCallback()
         // WHEN the selected device changes state
         deviceCallback.onSelectedDeviceStateChanged(device, 1)
-        assertThat(fakeExecutor.runAllReady()).isEqualTo(1)
+        assertThat(fakeBgExecutor.runAllReady()).isEqualTo(1)
+        assertThat(fakeFgExecutor.runAllReady()).isEqualTo(1)
         // THEN the update is dispatched to the listener
         val data = captureDeviceData(KEY)
         assertThat(data.enabled).isTrue()
@@ -269,6 +268,8 @@
         whenever(mr2.getRoutingSessionForMediaController(any())).thenReturn(null)
         // WHEN a notification is added
         manager.onMediaDataLoaded(KEY, null, mediaData)
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         // THEN the device is disabled
         val data = captureDeviceData(KEY)
         assertThat(data.enabled).isFalse()
@@ -280,13 +281,16 @@
     fun deviceDisabledWhenMR2ReturnsNullRouteInfoOnDeviceChanged() {
         // GIVEN a notif is added
         manager.onMediaDataLoaded(KEY, null, mediaData)
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         reset(listener)
         // AND MR2Manager returns null for routing session
         whenever(mr2.getRoutingSessionForMediaController(any())).thenReturn(null)
         // WHEN the selected device changes state
         val deviceCallback = captureCallback()
         deviceCallback.onSelectedDeviceStateChanged(device, 1)
-        fakeExecutor.runAllReady()
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         // THEN the device is disabled
         val data = captureDeviceData(KEY)
         assertThat(data.enabled).isFalse()
@@ -298,13 +302,16 @@
     fun deviceDisabledWhenMR2ReturnsNullRouteInfoOnDeviceListUpdate() {
         // GIVEN a notif is added
         manager.onMediaDataLoaded(KEY, null, mediaData)
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         reset(listener)
         // GIVEN that MR2Manager returns null for routing session
         whenever(mr2.getRoutingSessionForMediaController(any())).thenReturn(null)
         // WHEN the selected device changes state
         val deviceCallback = captureCallback()
         deviceCallback.onDeviceListUpdate(mutableListOf(device))
-        fakeExecutor.runAllReady()
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
         // THEN the device is disabled
         val data = captureDeviceData(KEY)
         assertThat(data.enabled).isFalse()
@@ -312,15 +319,50 @@
         assertThat(data.icon).isNull()
     }
 
+    @Test
+    fun audioInfoChanged() {
+        whenever(playbackInfo.getPlaybackType()).thenReturn(PlaybackInfo.PLAYBACK_TYPE_LOCAL)
+        whenever(controller.getPlaybackInfo()).thenReturn(playbackInfo)
+        // GIVEN a controller with local playback type
+        manager.onMediaDataLoaded(KEY, null, mediaData)
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
+        reset(mr2)
+        // WHEN onAudioInfoChanged fires with remote playback type
+        whenever(playbackInfo.getPlaybackType()).thenReturn(PlaybackInfo.PLAYBACK_TYPE_REMOTE)
+        val captor = ArgumentCaptor.forClass(MediaController.Callback::class.java)
+        verify(controller).registerCallback(captor.capture())
+        captor.value.onAudioInfoChanged(playbackInfo)
+        // THEN the route is checked
+        verify(mr2).getRoutingSessionForMediaController(eq(controller))
+    }
+
+    @Test
+    fun audioInfoHasntChanged() {
+        whenever(playbackInfo.getPlaybackType()).thenReturn(PlaybackInfo.PLAYBACK_TYPE_REMOTE)
+        whenever(controller.getPlaybackInfo()).thenReturn(playbackInfo)
+        // GIVEN a controller with remote playback type
+        manager.onMediaDataLoaded(KEY, null, mediaData)
+        fakeBgExecutor.runAllReady()
+        fakeFgExecutor.runAllReady()
+        reset(mr2)
+        // WHEN onAudioInfoChanged fires with remote playback type
+        val captor = ArgumentCaptor.forClass(MediaController.Callback::class.java)
+        verify(controller).registerCallback(captor.capture())
+        captor.value.onAudioInfoChanged(playbackInfo)
+        // THEN the route is not checked
+        verify(mr2, never()).getRoutingSessionForMediaController(eq(controller))
+    }
+
     fun captureCallback(): LocalMediaManager.DeviceCallback {
         val captor = ArgumentCaptor.forClass(LocalMediaManager.DeviceCallback::class.java)
         verify(lmm).registerCallback(captor.capture())
         return captor.getValue()
     }
 
-    fun captureDeviceData(key: String): MediaDeviceData {
+    fun captureDeviceData(key: String, oldKey: String? = null): MediaDeviceData {
         val captor = ArgumentCaptor.forClass(MediaDeviceData::class.java)
-        verify(listener).onMediaDeviceChanged(eq(key), captor.capture())
+        verify(listener).onMediaDeviceChanged(eq(key), eq(oldKey), captor.capture())
         return captor.getValue()
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaHierarchyManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaHierarchyManagerTest.kt
index 91c5ff8..d86dfa5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaHierarchyManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaHierarchyManagerTest.kt
@@ -142,4 +142,11 @@
         verify(mediaCarouselController).onDesiredLocationChanged(ArgumentMatchers.anyInt(),
                 any(MediaHostState::class.java), anyBoolean(), anyLong(), anyLong())
     }
+
+    @Test
+    fun testCloseGutsRelayToCarousel() {
+        mediaHiearchyManager.closeGuts()
+
+        verify(mediaCarouselController).closeGuts()
+    }
 }
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaPlayerDataTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaPlayerDataTest.kt
new file mode 100644
index 0000000..00b003d
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaPlayerDataTest.kt
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media
+
+import android.testing.AndroidTestingRunner
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+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
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+public class MediaPlayerDataTest : SysuiTestCase() {
+
+    companion object {
+        val LOCAL = true
+        val RESUMPTION = true
+        val PLAYING = true
+        val UNDETERMINED = null
+    }
+
+    @Before
+    fun setup() {
+        MediaPlayerData.clear()
+    }
+
+    @Test
+    fun addPlayingThenRemote() {
+        val playerIsPlaying = mock(MediaControlPanel::class.java)
+        val dataIsPlaying = createMediaData("app1", PLAYING, LOCAL, !RESUMPTION)
+
+        val playerIsRemote = mock(MediaControlPanel::class.java)
+        val dataIsRemote = createMediaData("app2", PLAYING, !LOCAL, !RESUMPTION)
+
+        MediaPlayerData.addMediaPlayer("2", dataIsRemote, playerIsRemote)
+        MediaPlayerData.addMediaPlayer("1", dataIsPlaying, playerIsPlaying)
+
+        val players = MediaPlayerData.players()
+        assertThat(players).hasSize(2)
+        assertThat(players).containsExactly(playerIsPlaying, playerIsRemote).inOrder()
+    }
+
+    @Test
+    fun switchPlayersPlaying() {
+        val playerIsPlaying1 = mock(MediaControlPanel::class.java)
+        var dataIsPlaying1 = createMediaData("app1", PLAYING, LOCAL, !RESUMPTION)
+
+        val playerIsPlaying2 = mock(MediaControlPanel::class.java)
+        var dataIsPlaying2 = createMediaData("app2", !PLAYING, LOCAL, !RESUMPTION)
+
+        MediaPlayerData.addMediaPlayer("1", dataIsPlaying1, playerIsPlaying1)
+        MediaPlayerData.addMediaPlayer("2", dataIsPlaying2, playerIsPlaying2)
+
+        dataIsPlaying1 = createMediaData("app1", !PLAYING, LOCAL, !RESUMPTION)
+        dataIsPlaying2 = createMediaData("app2", PLAYING, LOCAL, !RESUMPTION)
+
+        MediaPlayerData.addMediaPlayer("1", dataIsPlaying1, playerIsPlaying1)
+        MediaPlayerData.addMediaPlayer("2", dataIsPlaying2, playerIsPlaying2)
+
+        val players = MediaPlayerData.players()
+        assertThat(players).hasSize(2)
+        assertThat(players).containsExactly(playerIsPlaying2, playerIsPlaying1).inOrder()
+    }
+
+    @Test
+    fun fullOrderTest() {
+        val playerIsPlaying = mock(MediaControlPanel::class.java)
+        val dataIsPlaying = createMediaData("app1", PLAYING, LOCAL, !RESUMPTION)
+
+        val playerIsPlayingAndRemote = mock(MediaControlPanel::class.java)
+        val dataIsPlayingAndRemote = createMediaData("app2", PLAYING, !LOCAL, !RESUMPTION)
+
+        val playerIsStoppedAndLocal = mock(MediaControlPanel::class.java)
+        val dataIsStoppedAndLocal = createMediaData("app3", !PLAYING, LOCAL, !RESUMPTION)
+
+        val playerIsStoppedAndRemote = mock(MediaControlPanel::class.java)
+        val dataIsStoppedAndRemote = createMediaData("app4", !PLAYING, !LOCAL, !RESUMPTION)
+
+        val playerCanResume = mock(MediaControlPanel::class.java)
+        val dataCanResume = createMediaData("app5", !PLAYING, LOCAL, RESUMPTION)
+
+        val playerUndetermined = mock(MediaControlPanel::class.java)
+        val dataUndetermined = createMediaData("app6", UNDETERMINED, LOCAL, RESUMPTION)
+
+        MediaPlayerData.addMediaPlayer("3", dataIsStoppedAndLocal, playerIsStoppedAndLocal)
+        MediaPlayerData.addMediaPlayer("5", dataIsStoppedAndRemote, playerIsStoppedAndRemote)
+        MediaPlayerData.addMediaPlayer("4", dataCanResume, playerCanResume)
+        MediaPlayerData.addMediaPlayer("1", dataIsPlaying, playerIsPlaying)
+        MediaPlayerData.addMediaPlayer("2", dataIsPlayingAndRemote, playerIsPlayingAndRemote)
+        MediaPlayerData.addMediaPlayer("6", dataUndetermined, playerUndetermined)
+
+        val players = MediaPlayerData.players()
+        assertThat(players).hasSize(6)
+        assertThat(players).containsExactly(playerIsPlaying, playerIsPlayingAndRemote,
+            playerIsStoppedAndLocal, playerCanResume, playerIsStoppedAndRemote,
+            playerUndetermined).inOrder()
+    }
+
+    private fun createMediaData(
+        app: String,
+        isPlaying: Boolean?,
+        isLocalSession: Boolean,
+        resumption: Boolean
+    ) =
+        MediaData(0, false, 0, app, null, null, null, null, emptyList(), emptyList<Int>(), "",
+            null, null, null, true, null, isLocalSession, resumption, null, false, isPlaying)
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaResumeListenerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaResumeListenerTest.kt
new file mode 100644
index 0000000..5d81de6
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaResumeListenerTest.kt
@@ -0,0 +1,258 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media
+
+import android.app.PendingIntent
+import android.content.ComponentName
+import android.content.Context
+import android.content.Intent
+import android.content.SharedPreferences
+import android.content.pm.PackageManager
+import android.content.pm.ResolveInfo
+import android.content.pm.ServiceInfo
+import android.graphics.Color
+import android.media.MediaDescription
+import android.media.session.MediaSession
+import android.provider.Settings
+import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.broadcast.BroadcastDispatcher
+import com.android.systemui.tuner.TunerService
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.time.FakeSystemClock
+import org.junit.After
+import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.ArgumentMatchers.anyInt
+import org.mockito.Captor
+import org.mockito.Mock
+import org.mockito.Mockito
+import org.mockito.Mockito.mock
+import org.mockito.Mockito.never
+import org.mockito.Mockito.times
+import org.mockito.Mockito.verify
+import org.mockito.Mockito.`when` as whenever
+import org.mockito.MockitoAnnotations
+
+private const val KEY = "TEST_KEY"
+private const val OLD_KEY = "RESUME_KEY"
+private const val APP = "APP"
+private const val BG_COLOR = Color.RED
+private const val PACKAGE_NAME = "PKG"
+private const val CLASS_NAME = "CLASS"
+private const val ARTIST = "ARTIST"
+private const val TITLE = "TITLE"
+private const val USER_ID = 0
+private const val MEDIA_PREFERENCES = "media_control_prefs"
+private const val RESUME_COMPONENTS = "package1/class1:package2/class2:package3/class3"
+
+private fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture()
+private fun <T> eq(value: T): T = Mockito.eq(value) ?: value
+private fun <T> any(): T = Mockito.any<T>()
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+@TestableLooper.RunWithLooper
+class MediaResumeListenerTest : SysuiTestCase() {
+
+    @Mock private lateinit var broadcastDispatcher: BroadcastDispatcher
+    @Mock private lateinit var mediaDataManager: MediaDataManager
+    @Mock private lateinit var device: MediaDeviceData
+    @Mock private lateinit var token: MediaSession.Token
+    @Mock private lateinit var tunerService: TunerService
+    @Mock private lateinit var resumeBrowserFactory: ResumeMediaBrowserFactory
+    @Mock private lateinit var resumeBrowser: ResumeMediaBrowser
+    @Mock private lateinit var sharedPrefs: SharedPreferences
+    @Mock private lateinit var sharedPrefsEditor: SharedPreferences.Editor
+    @Mock private lateinit var mockContext: Context
+    @Mock private lateinit var pendingIntent: PendingIntent
+
+    @Captor lateinit var callbackCaptor: ArgumentCaptor<ResumeMediaBrowser.Callback>
+
+    private lateinit var executor: FakeExecutor
+    private lateinit var data: MediaData
+    private lateinit var resumeListener: MediaResumeListener
+
+    private var originalQsSetting = Settings.Global.getInt(context.contentResolver,
+        Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS, 1)
+    private var originalResumeSetting = Settings.Secure.getInt(context.contentResolver,
+        Settings.Secure.MEDIA_CONTROLS_RESUME, 0)
+
+    @Before
+    fun setup() {
+        MockitoAnnotations.initMocks(this)
+
+        Settings.Global.putInt(context.contentResolver,
+            Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS, 1)
+        Settings.Secure.putInt(context.contentResolver,
+            Settings.Secure.MEDIA_CONTROLS_RESUME, 1)
+
+        whenever(resumeBrowserFactory.create(capture(callbackCaptor), any()))
+                .thenReturn(resumeBrowser)
+
+        // resume components are stored in sharedpreferences
+        whenever(mockContext.getSharedPreferences(eq(MEDIA_PREFERENCES), anyInt()))
+                .thenReturn(sharedPrefs)
+        whenever(sharedPrefs.getString(any(), any())).thenReturn(RESUME_COMPONENTS)
+        whenever(sharedPrefs.edit()).thenReturn(sharedPrefsEditor)
+        whenever(sharedPrefsEditor.putString(any(), any())).thenReturn(sharedPrefsEditor)
+        whenever(mockContext.packageManager).thenReturn(context.packageManager)
+        whenever(mockContext.contentResolver).thenReturn(context.contentResolver)
+
+        executor = FakeExecutor(FakeSystemClock())
+        resumeListener = MediaResumeListener(mockContext, broadcastDispatcher, executor,
+                tunerService, resumeBrowserFactory)
+        resumeListener.setManager(mediaDataManager)
+        mediaDataManager.addListener(resumeListener)
+
+        data = MediaData(
+                userId = USER_ID,
+                initialized = true,
+                backgroundColor = BG_COLOR,
+                app = APP,
+                appIcon = null,
+                artist = ARTIST,
+                song = TITLE,
+                artwork = null,
+                actions = emptyList(),
+                actionsToShowInCompact = emptyList(),
+                packageName = PACKAGE_NAME,
+                token = token,
+                clickIntent = null,
+                device = device,
+                active = true,
+                notificationKey = KEY,
+                resumeAction = null)
+    }
+
+    @After
+    fun tearDown() {
+        Settings.Global.putInt(context.contentResolver,
+            Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS, originalQsSetting)
+        Settings.Secure.putInt(context.contentResolver,
+            Settings.Secure.MEDIA_CONTROLS_RESUME, originalResumeSetting)
+    }
+
+    @Test
+    fun testWhenNoResumption_doesNothing() {
+        Settings.Secure.putInt(context.contentResolver,
+            Settings.Secure.MEDIA_CONTROLS_RESUME, 0)
+
+        // When listener is created, we do NOT register a user change listener
+        val listener = MediaResumeListener(context, broadcastDispatcher, executor, tunerService,
+                resumeBrowserFactory)
+        listener.setManager(mediaDataManager)
+        verify(broadcastDispatcher, never()).registerReceiver(eq(listener.userChangeReceiver),
+            any(), any(), any())
+
+        // When data is loaded, we do NOT execute or update anything
+        listener.onMediaDataLoaded(KEY, OLD_KEY, data)
+        assertThat(executor.numPending()).isEqualTo(0)
+        verify(mediaDataManager, never()).setResumeAction(any(), any())
+    }
+
+    @Test
+    fun testOnLoad_checksForResume_noService() {
+        // When media data is loaded that has not been checked yet, and does not have a MBS
+        resumeListener.onMediaDataLoaded(KEY, null, data)
+
+        // Then we report back to the manager
+        verify(mediaDataManager).setResumeAction(KEY, null)
+    }
+
+    @Test
+    fun testOnLoad_checksForResume_hasService() {
+        // Set up mocks to successfully find a MBS that returns valid media
+        val pm = mock(PackageManager::class.java)
+        whenever(mockContext.packageManager).thenReturn(pm)
+        val resolveInfo = ResolveInfo()
+        val serviceInfo = ServiceInfo()
+        serviceInfo.packageName = PACKAGE_NAME
+        resolveInfo.serviceInfo = serviceInfo
+        resolveInfo.serviceInfo.name = CLASS_NAME
+        val resumeInfo = listOf(resolveInfo)
+        whenever(pm.queryIntentServices(any(), anyInt())).thenReturn(resumeInfo)
+
+        val description = MediaDescription.Builder().setTitle(TITLE).build()
+        val component = ComponentName(PACKAGE_NAME, CLASS_NAME)
+        whenever(resumeBrowser.testConnection()).thenAnswer {
+            callbackCaptor.value.addTrack(description, component, resumeBrowser)
+        }
+
+        // When media data is loaded that has not been checked yet, and does have a MBS
+        val dataCopy = data.copy(resumeAction = null, hasCheckedForResume = false)
+        resumeListener.onMediaDataLoaded(KEY, null, dataCopy)
+
+        // Then we test whether the service is valid
+        executor.runAllReady()
+        verify(resumeBrowser).testConnection()
+
+        // And since it is, we report back to the manager
+        verify(mediaDataManager).setResumeAction(eq(KEY), any())
+
+        // But we do not tell it to add new controls
+        verify(mediaDataManager, never())
+                .addResumptionControls(anyInt(), any(), any(), any(), any(), any(), any())
+
+        // Finally, make sure the resume browser disconnected
+        verify(resumeBrowser).disconnect()
+    }
+
+    @Test
+    fun testOnLoad_doesNotCheckAgain() {
+        // When a media data is loaded that has been checked already
+        var dataCopy = data.copy(hasCheckedForResume = true)
+        resumeListener.onMediaDataLoaded(KEY, null, dataCopy)
+
+        // Then we should not check it again
+        verify(resumeBrowser, never()).testConnection()
+        verify(mediaDataManager, never()).setResumeAction(KEY, null)
+    }
+
+    @Test
+    fun testOnUserUnlock_loadsTracks() {
+        // Set up mock service to successfully find valid media
+        val description = MediaDescription.Builder().setTitle(TITLE).build()
+        val component = ComponentName(PACKAGE_NAME, CLASS_NAME)
+        whenever(resumeBrowser.token).thenReturn(token)
+        whenever(resumeBrowser.appIntent).thenReturn(pendingIntent)
+        whenever(resumeBrowser.findRecentMedia()).thenAnswer {
+            callbackCaptor.value.addTrack(description, component, resumeBrowser)
+        }
+
+        // Make sure broadcast receiver is registered
+        resumeListener.setManager(mediaDataManager)
+        verify(broadcastDispatcher).registerReceiver(eq(resumeListener.userChangeReceiver),
+                any(), any(), any())
+
+        // When we get an unlock event
+        val intent = Intent(Intent.ACTION_USER_UNLOCKED)
+        resumeListener.userChangeReceiver.onReceive(context, intent)
+
+        // Then we should attempt to find recent media for each saved component
+        verify(resumeBrowser, times(3)).findRecentMedia()
+
+        // Then since the mock service found media, the manager should be informed
+        verify(mediaDataManager, times(3)).addResumptionControls(anyInt(),
+                any(), any(), any(), any(), any(), eq(PACKAGE_NAME))
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaSessionBasedFilterTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaSessionBasedFilterTest.kt
new file mode 100644
index 0000000..2d90cc4
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaSessionBasedFilterTest.kt
@@ -0,0 +1,422 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media
+
+import android.graphics.Color
+import android.media.session.MediaController
+import android.media.session.MediaController.PlaybackInfo
+import android.media.session.MediaSession
+import android.media.session.MediaSessionManager
+import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper
+import androidx.test.filters.SmallTest
+
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.mockito.eq
+import com.android.systemui.util.time.FakeSystemClock
+
+import org.junit.After
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Mock
+import org.mockito.Mockito
+import org.mockito.Mockito.any
+import org.mockito.Mockito.never
+import org.mockito.Mockito.reset
+import org.mockito.Mockito.verify
+import org.mockito.junit.MockitoJUnit
+import org.mockito.Mockito.`when` as whenever
+
+private const val PACKAGE = "PKG"
+private const val KEY = "TEST_KEY"
+private const val NOTIF_KEY = "TEST_KEY"
+private const val SESSION_ARTIST = "SESSION_ARTIST"
+private const val SESSION_TITLE = "SESSION_TITLE"
+private const val APP_NAME = "APP_NAME"
+private const val USER_ID = 0
+
+private val info = MediaData(
+    userId = USER_ID,
+    initialized = true,
+    backgroundColor = Color.DKGRAY,
+    app = APP_NAME,
+    appIcon = null,
+    artist = SESSION_ARTIST,
+    song = SESSION_TITLE,
+    artwork = null,
+    actions = emptyList(),
+    actionsToShowInCompact = emptyList(),
+    packageName = PACKAGE,
+    token = null,
+    clickIntent = null,
+    device = null,
+    active = true,
+    resumeAction = null,
+    resumption = false,
+    notificationKey = NOTIF_KEY,
+    hasCheckedForResume = false
+)
+
+private fun <T> eq(value: T): T = Mockito.eq(value) ?: value
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+@TestableLooper.RunWithLooper
+public class MediaSessionBasedFilterTest : SysuiTestCase() {
+
+    @JvmField @Rule val mockito = MockitoJUnit.rule()
+
+    // Unit to be tested
+    private lateinit var filter: MediaSessionBasedFilter
+
+    private lateinit var sessionListener: MediaSessionManager.OnActiveSessionsChangedListener
+    @Mock private lateinit var mediaListener: MediaDataManager.Listener
+
+    // MediaSessionBasedFilter dependencies
+    @Mock private lateinit var mediaSessionManager: MediaSessionManager
+    private lateinit var fgExecutor: FakeExecutor
+    private lateinit var bgExecutor: FakeExecutor
+
+    @Mock private lateinit var controller1: MediaController
+    @Mock private lateinit var controller2: MediaController
+    @Mock private lateinit var controller3: MediaController
+    @Mock private lateinit var controller4: MediaController
+
+    private lateinit var token1: MediaSession.Token
+    private lateinit var token2: MediaSession.Token
+    private lateinit var token3: MediaSession.Token
+    private lateinit var token4: MediaSession.Token
+
+    @Mock private lateinit var remotePlaybackInfo: PlaybackInfo
+    @Mock private lateinit var localPlaybackInfo: PlaybackInfo
+
+    private lateinit var session1: MediaSession
+    private lateinit var session2: MediaSession
+    private lateinit var session3: MediaSession
+    private lateinit var session4: MediaSession
+
+    private lateinit var mediaData1: MediaData
+    private lateinit var mediaData2: MediaData
+    private lateinit var mediaData3: MediaData
+    private lateinit var mediaData4: MediaData
+
+    @Before
+    fun setUp() {
+        fgExecutor = FakeExecutor(FakeSystemClock())
+        bgExecutor = FakeExecutor(FakeSystemClock())
+        filter = MediaSessionBasedFilter(context, mediaSessionManager, fgExecutor, bgExecutor)
+
+        // Configure mocks.
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(emptyList())
+
+        session1 = MediaSession(context, "MediaSessionBasedFilter1")
+        session2 = MediaSession(context, "MediaSessionBasedFilter2")
+        session3 = MediaSession(context, "MediaSessionBasedFilter3")
+        session4 = MediaSession(context, "MediaSessionBasedFilter4")
+
+        token1 = session1.sessionToken
+        token2 = session2.sessionToken
+        token3 = session3.sessionToken
+        token4 = session4.sessionToken
+
+        whenever(controller1.getSessionToken()).thenReturn(token1)
+        whenever(controller2.getSessionToken()).thenReturn(token2)
+        whenever(controller3.getSessionToken()).thenReturn(token3)
+        whenever(controller4.getSessionToken()).thenReturn(token4)
+
+        whenever(controller1.getPackageName()).thenReturn(PACKAGE)
+        whenever(controller2.getPackageName()).thenReturn(PACKAGE)
+        whenever(controller3.getPackageName()).thenReturn(PACKAGE)
+        whenever(controller4.getPackageName()).thenReturn(PACKAGE)
+
+        mediaData1 = info.copy(token = token1)
+        mediaData2 = info.copy(token = token2)
+        mediaData3 = info.copy(token = token3)
+        mediaData4 = info.copy(token = token4)
+
+        whenever(remotePlaybackInfo.getPlaybackType()).thenReturn(PlaybackInfo.PLAYBACK_TYPE_REMOTE)
+        whenever(localPlaybackInfo.getPlaybackType()).thenReturn(PlaybackInfo.PLAYBACK_TYPE_LOCAL)
+
+        whenever(controller1.getPlaybackInfo()).thenReturn(localPlaybackInfo)
+        whenever(controller2.getPlaybackInfo()).thenReturn(localPlaybackInfo)
+        whenever(controller3.getPlaybackInfo()).thenReturn(localPlaybackInfo)
+        whenever(controller4.getPlaybackInfo()).thenReturn(localPlaybackInfo)
+
+        // Capture listener
+        bgExecutor.runAllReady()
+        val listenerCaptor = ArgumentCaptor.forClass(
+                MediaSessionManager.OnActiveSessionsChangedListener::class.java)
+        verify(mediaSessionManager).addOnActiveSessionsChangedListener(
+                listenerCaptor.capture(), any())
+        sessionListener = listenerCaptor.value
+
+        filter.addListener(mediaListener)
+    }
+
+    @After
+    fun tearDown() {
+        session1.release()
+        session2.release()
+        session3.release()
+        session4.release()
+    }
+
+    @Test
+    fun noMediaSession_loadedEventNotFiltered() {
+        filter.onMediaDataLoaded(KEY, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        verify(mediaListener).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData1))
+    }
+
+    @Test
+    fun noMediaSession_removedEventNotFiltered() {
+        filter.onMediaDataRemoved(KEY)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        verify(mediaListener).onMediaDataRemoved(eq(KEY))
+    }
+
+    @Test
+    fun matchingMediaSession_loadedEventNotFiltered() {
+        // GIVEN an active session
+        val controllers = listOf(controller1)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received that matches the session
+        filter.onMediaDataLoaded(KEY, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData1))
+    }
+
+    @Test
+    fun matchingMediaSession_removedEventNotFiltered() {
+        // GIVEN an active session
+        val controllers = listOf(controller1)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a removed event is received
+        filter.onMediaDataRemoved(KEY)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataRemoved(eq(KEY))
+    }
+
+    @Test
+    fun remoteSession_loadedEventNotFiltered() {
+        // GIVEN a remote session
+        whenever(controller1.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        val controllers = listOf(controller1)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received that matche the session
+        filter.onMediaDataLoaded(KEY, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData1))
+    }
+
+    @Test
+    fun remoteAndLocalSessions_localLoadedEventFiltered() {
+        // GIVEN remote and local sessions
+        whenever(controller1.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        val controllers = listOf(controller1, controller2)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received that matches the remote session
+        filter.onMediaDataLoaded(KEY, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData1))
+        // WHEN a loaded event is received that matches the local session
+        filter.onMediaDataLoaded(KEY, null, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is filtered
+        verify(mediaListener, never()).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData2))
+    }
+
+    @Test
+    fun remoteAndLocalSessions_remoteSessionWithoutNotification() {
+        // GIVEN remote and local sessions
+        whenever(controller2.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        val controllers = listOf(controller1, controller2)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received that matches the local session
+        filter.onMediaDataLoaded(KEY, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered because there isn't a notification for the remote
+        // session.
+        verify(mediaListener).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData1))
+    }
+
+    @Test
+    fun remoteAndLocalHaveDifferentKeys_localLoadedEventFiltered() {
+        // GIVEN remote and local sessions
+        val key1 = "KEY_1"
+        val key2 = "KEY_2"
+        whenever(controller1.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        val controllers = listOf(controller1, controller2)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received that matches the remote session
+        filter.onMediaDataLoaded(key1, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(key1), eq(null), eq(mediaData1))
+        // WHEN a loaded event is received that matches the local session
+        filter.onMediaDataLoaded(key2, null, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is filtered
+        verify(mediaListener, never()).onMediaDataLoaded(eq(key2), eq(null), eq(mediaData2))
+        // AND there should be a removed event for key2
+        verify(mediaListener).onMediaDataRemoved(eq(key2))
+    }
+
+    @Test
+    fun remoteAndLocalHaveDifferentKeys_remoteSessionWithoutNotification() {
+        // GIVEN remote and local sessions
+        val key1 = "KEY_1"
+        val key2 = "KEY_2"
+        whenever(controller2.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        val controllers = listOf(controller1, controller2)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received that matches the local session
+        filter.onMediaDataLoaded(key1, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(key1), eq(null), eq(mediaData1))
+        // WHEN a loaded event is received that matches the remote session
+        filter.onMediaDataLoaded(key2, null, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(key2), eq(null), eq(mediaData2))
+    }
+
+    @Test
+    fun multipleRemoteSessions_loadedEventNotFiltered() {
+        // GIVEN two remote sessions
+        whenever(controller1.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        whenever(controller2.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        val controllers = listOf(controller1, controller2)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received that matches the remote session
+        filter.onMediaDataLoaded(KEY, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData1))
+        // WHEN a loaded event is received that matches the local session
+        filter.onMediaDataLoaded(KEY, null, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData2))
+    }
+
+    @Test
+    fun multipleOtherSessions_loadedEventNotFiltered() {
+        // GIVEN multiple active sessions from other packages
+        val controllers = listOf(controller1, controller2, controller3, controller4)
+        whenever(controller1.getPackageName()).thenReturn("PKG_1")
+        whenever(controller2.getPackageName()).thenReturn("PKG_2")
+        whenever(controller3.getPackageName()).thenReturn("PKG_3")
+        whenever(controller4.getPackageName()).thenReturn("PKG_4")
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received
+        filter.onMediaDataLoaded(KEY, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the event is not filtered
+        verify(mediaListener).onMediaDataLoaded(eq(KEY), eq(null), eq(mediaData1))
+    }
+
+    @Test
+    fun doNotFilterDuringKeyMigration() {
+        val key1 = "KEY_1"
+        val key2 = "KEY_2"
+        // GIVEN a loaded event
+        filter.onMediaDataLoaded(key1, null, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        reset(mediaListener)
+        // GIVEN remote and local sessions
+        whenever(controller1.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        val controllers = listOf(controller1, controller2)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // WHEN a loaded event is received that matches the local session but it is a key migration
+        filter.onMediaDataLoaded(key2, key1, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the key migration event is fired
+        verify(mediaListener).onMediaDataLoaded(eq(key2), eq(key1), eq(mediaData2))
+    }
+
+    @Test
+    fun filterAfterKeyMigration() {
+        val key1 = "KEY_1"
+        val key2 = "KEY_2"
+        // GIVEN a loaded event
+        filter.onMediaDataLoaded(key1, null, mediaData1)
+        filter.onMediaDataLoaded(key1, null, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        reset(mediaListener)
+        // GIVEN remote and local sessions
+        whenever(controller1.getPlaybackInfo()).thenReturn(remotePlaybackInfo)
+        val controllers = listOf(controller1, controller2)
+        whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(controllers)
+        sessionListener.onActiveSessionsChanged(controllers)
+        // GIVEN that the keys have been migrated
+        filter.onMediaDataLoaded(key2, key1, mediaData1)
+        filter.onMediaDataLoaded(key2, key1, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        reset(mediaListener)
+        // WHEN a loaded event is received that matches the local session
+        filter.onMediaDataLoaded(key2, null, mediaData2)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the key migration event is filtered
+        verify(mediaListener, never()).onMediaDataLoaded(eq(key2), eq(null), eq(mediaData2))
+        // WHEN a loaded event is received that matches the remote session
+        filter.onMediaDataLoaded(key2, null, mediaData1)
+        bgExecutor.runAllReady()
+        fgExecutor.runAllReady()
+        // THEN the key migration event is fired
+        verify(mediaListener).onMediaDataLoaded(eq(key2), eq(null), eq(mediaData1))
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaTimeoutListenerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaTimeoutListenerTest.kt
index 7a8e4f7..f397959 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaTimeoutListenerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaTimeoutListenerTest.kt
@@ -23,8 +23,9 @@
 import android.testing.AndroidTestingRunner
 import androidx.test.filters.SmallTest
 import com.android.systemui.SysuiTestCase
-import com.android.systemui.util.concurrency.DelayableExecutor
+import com.android.systemui.util.concurrency.FakeExecutor
 import com.android.systemui.util.mockito.capture
+import com.android.systemui.util.time.FakeSystemClock
 import com.google.common.truth.Truth.assertThat
 import org.junit.Before
 import org.junit.Rule
@@ -33,7 +34,6 @@
 import org.mockito.ArgumentCaptor
 import org.mockito.ArgumentMatchers.any
 import org.mockito.ArgumentMatchers.anyBoolean
-import org.mockito.ArgumentMatchers.anyLong
 import org.mockito.ArgumentMatchers.anyString
 import org.mockito.Captor
 import org.mockito.Mock
@@ -63,10 +63,8 @@
 
     @Mock private lateinit var mediaControllerFactory: MediaControllerFactory
     @Mock private lateinit var mediaController: MediaController
-    @Mock private lateinit var executor: DelayableExecutor
+    private lateinit var executor: FakeExecutor
     @Mock private lateinit var timeoutCallback: (String, Boolean) -> Unit
-    @Mock private lateinit var cancellationRunnable: Runnable
-    @Captor private lateinit var timeoutCaptor: ArgumentCaptor<Runnable>
     @Captor private lateinit var mediaCallbackCaptor: ArgumentCaptor<MediaController.Callback>
     @JvmField @Rule val mockito = MockitoJUnit.rule()
     private lateinit var metadataBuilder: MediaMetadata.Builder
@@ -78,7 +76,7 @@
     @Before
     fun setup() {
         `when`(mediaControllerFactory.create(any())).thenReturn(mediaController)
-        `when`(executor.executeDelayed(any(), anyLong())).thenReturn(cancellationRunnable)
+        executor = FakeExecutor(FakeSystemClock())
         mediaTimeoutListener = MediaTimeoutListener(mediaControllerFactory, executor)
         mediaTimeoutListener.timeoutCallback = timeoutCallback
 
@@ -120,7 +118,7 @@
     fun testOnMediaDataLoaded_registersTimeout_whenPaused() {
         mediaTimeoutListener.onMediaDataLoaded(KEY, null, mediaData)
         verify(mediaController).registerCallback(capture(mediaCallbackCaptor))
-        verify(executor).executeDelayed(capture(timeoutCaptor), anyLong())
+        assertThat(executor.numPending()).isEqualTo(1)
         verify(timeoutCallback, never()).invoke(anyString(), anyBoolean())
     }
 
@@ -137,6 +135,17 @@
     }
 
     @Test
+    fun testOnMediaDataRemoved_clearsTimeout() {
+        // GIVEN media that is paused
+        mediaTimeoutListener.onMediaDataLoaded(KEY, null, mediaData)
+        assertThat(executor.numPending()).isEqualTo(1)
+        // WHEN the media is removed
+        mediaTimeoutListener.onMediaDataRemoved(KEY)
+        // THEN the timeout runnable is cancelled
+        assertThat(executor.numPending()).isEqualTo(0)
+    }
+
+    @Test
     fun testOnMediaDataLoaded_migratesKeys() {
         // From not playing
         mediaTimeoutListener.onMediaDataLoaded(KEY, null, mediaData)
@@ -151,7 +160,24 @@
         verify(mediaController).registerCallback(anyObject())
 
         // Enqueues callback
-        verify(executor).execute(anyObject())
+        assertThat(executor.numPending()).isEqualTo(1)
+    }
+
+    @Test
+    fun testOnMediaDataLoaded_migratesKeys_noTimeoutExtension() {
+        // From not playing
+        mediaTimeoutListener.onMediaDataLoaded(KEY, null, mediaData)
+        clearInvocations(mediaController)
+
+        // Migrate, still not playing
+        val playingState = mock(android.media.session.PlaybackState::class.java)
+        `when`(playingState.state).thenReturn(PlaybackState.STATE_PAUSED)
+        `when`(mediaController.playbackState).thenReturn(playingState)
+        mediaTimeoutListener.onMediaDataLoaded("NEWKEY", KEY, mediaData)
+
+        // The number of queued timeout tasks remains the same. The timeout task isn't cancelled nor
+        // is another scheduled
+        assertThat(executor.numPending()).isEqualTo(1)
     }
 
     @Test
@@ -161,7 +187,7 @@
 
         mediaCallbackCaptor.value.onPlaybackStateChanged(PlaybackState.Builder()
                 .setState(PlaybackState.STATE_PAUSED, 0L, 0f).build())
-        verify(executor).executeDelayed(capture(timeoutCaptor), anyLong())
+        assertThat(executor.numPending()).isEqualTo(1)
     }
 
     @Test
@@ -171,7 +197,7 @@
 
         mediaCallbackCaptor.value.onPlaybackStateChanged(PlaybackState.Builder()
                 .setState(PlaybackState.STATE_PLAYING, 0L, 0f).build())
-        verify(cancellationRunnable).run()
+        assertThat(executor.numPending()).isEqualTo(0)
     }
 
     @Test
@@ -179,10 +205,9 @@
         // Assuming we have a pending timeout
         testOnPlaybackStateChanged_schedulesTimeout_whenPaused()
 
-        clearInvocations(cancellationRunnable)
         mediaCallbackCaptor.value.onPlaybackStateChanged(PlaybackState.Builder()
                 .setState(PlaybackState.STATE_STOPPED, 0L, 0f).build())
-        verify(cancellationRunnable, never()).run()
+        assertThat(executor.numPending()).isEqualTo(1)
     }
 
     @Test
@@ -190,7 +215,10 @@
         // Assuming we're have a pending timeout
         testOnPlaybackStateChanged_schedulesTimeout_whenPaused()
 
-        timeoutCaptor.value.run()
+        with(executor) {
+            advanceClockToNext()
+            runAllReady()
+        }
         verify(timeoutCallback).invoke(eq(KEY), eq(true))
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/ResumeMediaBrowserTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/ResumeMediaBrowserTest.kt
new file mode 100644
index 0000000..d26229e
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/ResumeMediaBrowserTest.kt
@@ -0,0 +1,287 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media
+
+import android.content.ComponentName
+import android.content.Context
+import android.media.MediaDescription
+import android.media.browse.MediaBrowser
+import android.media.session.MediaController
+import android.media.session.MediaSession
+import android.service.media.MediaBrowserService
+import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mock
+import org.mockito.Mockito
+import org.mockito.Mockito.verify
+import org.mockito.MockitoAnnotations
+import org.mockito.Mockito.`when` as whenever
+
+private const val PACKAGE_NAME = "package"
+private const val CLASS_NAME = "class"
+private const val TITLE = "song title"
+private const val MEDIA_ID = "media ID"
+private const val ROOT = "media browser root"
+
+private fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture()
+private fun <T> eq(value: T): T = Mockito.eq(value) ?: value
+private fun <T> any(): T = Mockito.any<T>()
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+@TestableLooper.RunWithLooper
+public class ResumeMediaBrowserTest : SysuiTestCase() {
+
+    private lateinit var resumeBrowser: TestableResumeMediaBrowser
+    private val component = ComponentName(PACKAGE_NAME, CLASS_NAME)
+    private val description = MediaDescription.Builder()
+            .setTitle(TITLE)
+            .setMediaId(MEDIA_ID)
+            .build()
+
+    @Mock lateinit var callback: ResumeMediaBrowser.Callback
+    @Mock lateinit var listener: MediaResumeListener
+    @Mock lateinit var service: MediaBrowserService
+    @Mock lateinit var browserFactory: MediaBrowserFactory
+    @Mock lateinit var browser: MediaBrowser
+    @Mock lateinit var token: MediaSession.Token
+    @Mock lateinit var mediaController: MediaController
+    @Mock lateinit var transportControls: MediaController.TransportControls
+
+    @Captor lateinit var connectionCallback: ArgumentCaptor<MediaBrowser.ConnectionCallback>
+    @Captor lateinit var subscriptionCallback: ArgumentCaptor<MediaBrowser.SubscriptionCallback>
+
+    @Before
+    fun setUp() {
+        MockitoAnnotations.initMocks(this)
+
+        whenever(browserFactory.create(any(), capture(connectionCallback), any()))
+                .thenReturn(browser)
+
+        whenever(mediaController.transportControls).thenReturn(transportControls)
+
+        resumeBrowser = TestableResumeMediaBrowser(context, callback, component, browserFactory,
+                mediaController)
+    }
+
+    @Test
+    fun testConnection_connectionFails_callsOnError() {
+        // When testConnection cannot connect to the service
+        setupBrowserFailed()
+        resumeBrowser.testConnection()
+
+        // Then it calls onError
+        verify(callback).onError()
+    }
+
+    @Test
+    fun testConnection_connects_onConnected() {
+        // When testConnection can connect to the service
+        setupBrowserConnection()
+        resumeBrowser.testConnection()
+
+        // Then it calls onConnected
+        verify(callback).onConnected()
+    }
+
+    @Test
+    fun testConnection_noValidMedia_error() {
+        // When testConnection can connect to the service, and does not find valid media
+        setupBrowserConnectionNoResults()
+        resumeBrowser.testConnection()
+
+        // Then it calls onError
+        verify(callback).onError()
+    }
+
+    @Test
+    fun testConnection_hasValidMedia_addTrack() {
+        // When testConnection can connect to the service, and finds valid media
+        setupBrowserConnectionValidMedia()
+        resumeBrowser.testConnection()
+
+        // Then it calls addTrack
+        verify(callback).onConnected()
+        verify(callback).addTrack(eq(description), eq(component), eq(resumeBrowser))
+    }
+
+    @Test
+    fun testFindRecentMedia_connectionFails_error() {
+        // When findRecentMedia is called and we cannot connect
+        setupBrowserFailed()
+        resumeBrowser.findRecentMedia()
+
+        // Then it calls onError
+        verify(callback).onError()
+    }
+
+    @Test
+    fun testFindRecentMedia_noRoot_error() {
+        // When findRecentMedia is called and does not get a valid root
+        setupBrowserConnection()
+        whenever(browser.getRoot()).thenReturn(null)
+        resumeBrowser.findRecentMedia()
+
+        // Then it calls onError
+        verify(callback).onError()
+    }
+
+    @Test
+    fun testFindRecentMedia_connects_onConnected() {
+        // When findRecentMedia is called and we connect
+        setupBrowserConnection()
+        resumeBrowser.findRecentMedia()
+
+        // Then it calls onConnected
+        verify(callback).onConnected()
+    }
+
+    @Test
+    fun testFindRecentMedia_noChildren_error() {
+        // When findRecentMedia is called and we connect, but do not get any results
+        setupBrowserConnectionNoResults()
+        resumeBrowser.findRecentMedia()
+
+        // Then it calls onError
+        verify(callback).onError()
+    }
+
+    @Test
+    fun testFindRecentMedia_notPlayable_error() {
+        // When findRecentMedia is called and we connect, but do not get a playable child
+        setupBrowserConnectionNotPlayable()
+        resumeBrowser.findRecentMedia()
+
+        // Then it calls onError
+        verify(callback).onError()
+    }
+
+    @Test
+    fun testFindRecentMedia_hasValidMedia_addTrack() {
+        // When findRecentMedia is called and we can connect and get playable media
+        setupBrowserConnectionValidMedia()
+        resumeBrowser.findRecentMedia()
+
+        // Then it calls addTrack
+        verify(callback).addTrack(eq(description), eq(component), eq(resumeBrowser))
+    }
+
+    @Test
+    fun testRestart_connectionFails_error() {
+        // When restart is called and we cannot connect
+        setupBrowserFailed()
+        resumeBrowser.restart()
+
+        // Then it calls onError
+        verify(callback).onError()
+    }
+
+    @Test
+    fun testRestart_connects() {
+        // When restart is called and we connect successfully
+        setupBrowserConnection()
+        resumeBrowser.restart()
+
+        // Then it creates a new controller and sends play command
+        verify(transportControls).prepare()
+        verify(transportControls).play()
+
+        // Then it calls onConnected
+        verify(callback).onConnected()
+    }
+
+    /**
+     * Helper function to mock a failed connection
+     */
+    private fun setupBrowserFailed() {
+        whenever(browser.connect()).thenAnswer {
+            connectionCallback.value.onConnectionFailed()
+        }
+    }
+
+    /**
+     * Helper function to mock a successful connection only
+     */
+    private fun setupBrowserConnection() {
+        whenever(browser.connect()).thenAnswer {
+            connectionCallback.value.onConnected()
+        }
+        whenever(browser.isConnected()).thenReturn(true)
+        whenever(browser.getRoot()).thenReturn(ROOT)
+        whenever(browser.sessionToken).thenReturn(token)
+    }
+
+    /**
+     * Helper function to mock a successful connection, but no media results
+     */
+    private fun setupBrowserConnectionNoResults() {
+        setupBrowserConnection()
+        whenever(browser.subscribe(any(), capture(subscriptionCallback))).thenAnswer {
+            subscriptionCallback.value.onChildrenLoaded(ROOT, emptyList())
+        }
+    }
+
+    /**
+     * Helper function to mock a successful connection, but no playable results
+     */
+    private fun setupBrowserConnectionNotPlayable() {
+        setupBrowserConnection()
+
+        val child = MediaBrowser.MediaItem(description, 0)
+
+        whenever(browser.subscribe(any(), capture(subscriptionCallback))).thenAnswer {
+            subscriptionCallback.value.onChildrenLoaded(ROOT, listOf(child))
+        }
+    }
+
+    /**
+     * Helper function to mock a successful connection with playable media
+     */
+    private fun setupBrowserConnectionValidMedia() {
+        setupBrowserConnection()
+
+        val child = MediaBrowser.MediaItem(description, MediaBrowser.MediaItem.FLAG_PLAYABLE)
+
+        whenever(browser.serviceComponent).thenReturn(component)
+        whenever(browser.subscribe(any(), capture(subscriptionCallback))).thenAnswer {
+            subscriptionCallback.value.onChildrenLoaded(ROOT, listOf(child))
+        }
+    }
+
+    /**
+     * Override so media controller use is testable
+     */
+    private class TestableResumeMediaBrowser(
+        context: Context,
+        callback: Callback,
+        componentName: ComponentName,
+        browserFactory: MediaBrowserFactory,
+        private val fakeController: MediaController
+    ) : ResumeMediaBrowser(context, callback, componentName, browserFactory) {
+
+        override fun createMediaController(token: MediaSession.Token): MediaController {
+            return fakeController
+        }
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarObserverTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarObserverTest.kt
index e9a0a40..7d8728e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarObserverTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarObserverTest.kt
@@ -69,7 +69,7 @@
     fun seekBarGone() {
         // WHEN seek bar is disabled
         val isEnabled = false
-        val data = SeekBarViewModel.Progress(isEnabled, false, null, null)
+        val data = SeekBarViewModel.Progress(isEnabled, false, null, 0)
         observer.onChanged(data)
         // THEN seek bar shows just a thin line with no text
         assertThat(seekBarView.isEnabled()).isFalse()
@@ -94,11 +94,11 @@
 
     @Test
     fun seekBarProgress() {
-        // WHEN seek bar progress is about half
+        // WHEN part of the track has been played
         val data = SeekBarViewModel.Progress(true, true, 3000, 120000)
         observer.onChanged(data)
-        // THEN seek bar is visible
-        assertThat(seekBarView.progress).isEqualTo(100)
+        // THEN seek bar shows the progress
+        assertThat(seekBarView.progress).isEqualTo(3000)
         assertThat(seekBarView.max).isEqualTo(120000)
         assertThat(elapsedTimeView.getText()).isEqualTo("00:03")
         assertThat(totalTimeView.getText()).isEqualTo("02:00")
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt
index c8ef9fb..b81ab74 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt
@@ -204,6 +204,22 @@
     }
 
     @Test
+    fun updateDurationNoMetadata() {
+        // GIVEN that the metadata is null
+        whenever(mockController.getMetadata()).thenReturn(null)
+        // AND a valid playback state (ie. media session is not destroyed)
+        val state = PlaybackState.Builder().run {
+            setState(PlaybackState.STATE_PLAYING, 200L, 1f)
+            build()
+        }
+        whenever(mockController.getPlaybackState()).thenReturn(state)
+        // WHEN the controller is updated
+        viewModel.updateController(mockController)
+        // THEN the seek bar is disabled
+        assertThat(viewModel.progress.value!!.enabled).isFalse()
+    }
+
+    @Test
     fun updateElapsedTime() {
         // GIVEN that the PlaybackState contains the current position
         val position = 200L
diff --git a/packages/SystemUI/tests/src/com/android/systemui/pip/PipAnimationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/pip/PipAnimationControllerTest.java
index 536cae4..c9c1111 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/pip/PipAnimationControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/pip/PipAnimationControllerTest.java
@@ -61,8 +61,7 @@
     @Before
     public void setUp() throws Exception {
         mPipAnimationController = new PipAnimationController(
-                mContext, new PipSurfaceTransactionHelper(mContext,
-                mock(ConfigurationController.class)));
+                new PipSurfaceTransactionHelper(mContext, mock(ConfigurationController.class)));
         mLeash = new SurfaceControl.Builder()
                 .setContainerLayer()
                 .setName("FakeLeash")
diff --git a/packages/SystemUI/tests/src/com/android/systemui/pip/PipBoundsHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/pip/PipBoundsHandlerTest.java
index f404f04..70c2bba 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/pip/PipBoundsHandlerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/pip/PipBoundsHandlerTest.java
@@ -270,6 +270,21 @@
     }
 
     @Test
+    public void onSaveReentryBounds_restoreLastSize() {
+        final Rect oldSize = mPipBoundsHandler.getDestinationBounds(mTestComponentName1,
+                DEFAULT_ASPECT_RATIO, EMPTY_CURRENT_BOUNDS, EMPTY_MINIMAL_SIZE);
+
+        oldSize.scale(1.25f);
+        mPipBoundsHandler.onSaveReentryBounds(mTestComponentName1, oldSize);
+
+        final Rect newSize = mPipBoundsHandler.getDestinationBounds(mTestComponentName1,
+                DEFAULT_ASPECT_RATIO, EMPTY_CURRENT_BOUNDS, EMPTY_MINIMAL_SIZE);
+
+        assertEquals(oldSize.width(), newSize.width());
+        assertEquals(oldSize.height(), newSize.height());
+    }
+
+    @Test
     public void onResetReentryBounds_useDefaultBounds() {
         final Rect defaultBounds = mPipBoundsHandler.getDestinationBounds(mTestComponentName1,
                 DEFAULT_ASPECT_RATIO, EMPTY_CURRENT_BOUNDS, EMPTY_MINIMAL_SIZE);
@@ -299,6 +314,22 @@
         assertBoundsInclusionWithMargin("restoreLastPosition", newBounds, actualBounds);
     }
 
+    @Test
+    public void onSaveReentryBounds_componentMismatch_restoreLastSize() {
+        final Rect oldSize = mPipBoundsHandler.getDestinationBounds(mTestComponentName1,
+                DEFAULT_ASPECT_RATIO, EMPTY_CURRENT_BOUNDS, EMPTY_MINIMAL_SIZE);
+
+        oldSize.scale(1.25f);
+        mPipBoundsHandler.onSaveReentryBounds(mTestComponentName1, oldSize);
+
+        mPipBoundsHandler.onResetReentryBounds(mTestComponentName2);
+        final Rect newSize = mPipBoundsHandler.getDestinationBounds(mTestComponentName1,
+                DEFAULT_ASPECT_RATIO, EMPTY_CURRENT_BOUNDS, EMPTY_MINIMAL_SIZE);
+
+        assertEquals(oldSize.width(), newSize.width());
+        assertEquals(oldSize.height(), newSize.height());
+    }
+
     private void assertBoundsInclusionWithMargin(String from, Rect expected, Rect actual) {
         final Rect expectedWithMargin = new Rect(expected);
         expectedWithMargin.inset(-ROUNDING_ERROR_MARGIN, -ROUNDING_ERROR_MARGIN);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/pip/phone/PipTouchHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/pip/phone/PipTouchHandlerTest.java
index 96bb521..9f67722 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/pip/phone/PipTouchHandlerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/pip/phone/PipTouchHandlerTest.java
@@ -37,6 +37,7 @@
 import com.android.systemui.pip.PipBoundsHandler;
 import com.android.systemui.pip.PipSnapAlgorithm;
 import com.android.systemui.pip.PipTaskOrganizer;
+import com.android.systemui.pip.PipUiEventLogger;
 import com.android.systemui.shared.system.InputConsumerController;
 import com.android.systemui.util.DeviceConfigProxy;
 import com.android.systemui.util.FloatingContentCoordinator;
@@ -85,6 +86,9 @@
     @Mock
     private SysUiState mSysUiState;
 
+    @Mock
+    private PipUiEventLogger mPipUiEventLogger;
+
     private PipSnapAlgorithm mPipSnapAlgorithm;
     private PipMotionHelper mMotionHelper;
     private PipResizeGestureHandler mPipResizeGestureHandler;
@@ -104,7 +108,7 @@
         mPipTouchHandler = new PipTouchHandler(mContext, mActivityManager,
                 mPipMenuActivityController, mInputConsumerController, mPipBoundsHandler,
                 mPipTaskOrganizer, mFloatingContentCoordinator, mDeviceConfigProxy,
-                mPipSnapAlgorithm, mSysUiState);
+                mPipSnapAlgorithm, mSysUiState, mPipUiEventLogger);
         mMotionHelper = Mockito.spy(mPipTouchHandler.getMotionHelper());
         mPipResizeGestureHandler = Mockito.spy(mPipTouchHandler.getPipResizeGestureHandler());
         mPipTouchHandler.setPipMotionHelper(mMotionHelper);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyChipBuilderTest.kt b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyChipBuilderTest.kt
new file mode 100644
index 0000000..dcee5a716
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyChipBuilderTest.kt
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.privacy
+
+import androidx.test.filters.SmallTest
+import androidx.test.runner.AndroidJUnit4
+import com.android.systemui.SysuiTestCase
+import org.junit.Assert.assertEquals
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+@SmallTest
+class PrivacyChipBuilderTest : SysuiTestCase() {
+
+    companion object {
+        val TEST_UID = 1
+    }
+
+    @Test
+    fun testGenerateAppsList() {
+        val bar2 = PrivacyItem(Privacy.TYPE_CAMERA, PrivacyApplication(
+                "Bar", TEST_UID))
+        val bar3 = PrivacyItem(Privacy.TYPE_LOCATION, PrivacyApplication(
+                "Bar", TEST_UID))
+        val foo0 = PrivacyItem(Privacy.TYPE_MICROPHONE, PrivacyApplication(
+                "Foo", TEST_UID))
+        val baz1 = PrivacyItem(Privacy.TYPE_CAMERA, PrivacyApplication(
+                "Baz", TEST_UID))
+
+        val items = listOf(bar2, foo0, baz1, bar3)
+
+        val textBuilder = PrivacyChipBuilder(context, items)
+
+        val list = textBuilder.appsAndTypes
+        assertEquals(3, list.size)
+        val appsList = list.map { it.first }
+        val typesList = list.map { it.second }
+        // List is sorted by number of types and then by types
+        assertEquals(listOf("Bar", "Baz", "Foo"), appsList.map { it.packageName })
+        assertEquals(listOf(Privacy.TYPE_CAMERA, Privacy.TYPE_LOCATION), typesList[0])
+        assertEquals(listOf(Privacy.TYPE_CAMERA), typesList[1])
+        assertEquals(listOf(Privacy.TYPE_MICROPHONE), typesList[2])
+    }
+
+    @Test
+    fun testOrder() {
+        // We want location to always go last, so it will go in the "+ other apps"
+        val appCamera = PrivacyItem(PrivacyType.TYPE_CAMERA,
+                PrivacyApplication("Camera", TEST_UID))
+        val appMicrophone =
+                PrivacyItem(PrivacyType.TYPE_MICROPHONE,
+                        PrivacyApplication("Microphone", TEST_UID))
+        val appLocation =
+                PrivacyItem(PrivacyType.TYPE_LOCATION,
+                        PrivacyApplication("Location", TEST_UID))
+
+        val items = listOf(appLocation, appMicrophone, appCamera)
+        val textBuilder = PrivacyChipBuilder(context, items)
+        val appList = textBuilder.appsAndTypes.map { it.first }.map { it.packageName }
+        assertEquals(listOf("Camera", "Microphone", "Location"), appList)
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerFlagsTest.kt b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerFlagsTest.kt
new file mode 100644
index 0000000..4ba29e6
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerFlagsTest.kt
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.privacy
+
+import android.os.UserManager
+import android.provider.DeviceConfig
+import android.testing.AndroidTestingRunner
+import androidx.test.filters.SmallTest
+import com.android.internal.config.sysui.SystemUiDeviceConfigFlags
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.appops.AppOpsController
+import com.android.systemui.broadcast.BroadcastDispatcher
+import com.android.systemui.dump.DumpManager
+import com.android.systemui.util.DeviceConfigProxy
+import com.android.systemui.util.DeviceConfigProxyFake
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.time.FakeSystemClock
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Mock
+import org.mockito.Mockito
+import org.mockito.Mockito.anyBoolean
+import org.mockito.Mockito.atLeastOnce
+import org.mockito.Mockito.never
+import org.mockito.Mockito.verify
+import org.mockito.MockitoAnnotations
+
+@RunWith(AndroidTestingRunner::class)
+@SmallTest
+class PrivacyItemControllerFlagsTest : SysuiTestCase() {
+    companion object {
+        fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture()
+        fun <T> eq(value: T): T = Mockito.eq(value) ?: value
+        fun <T> any(): T = Mockito.any<T>()
+
+        private const val ALL_INDICATORS =
+                SystemUiDeviceConfigFlags.PROPERTY_PERMISSIONS_HUB_ENABLED
+        private const val MIC_CAMERA = SystemUiDeviceConfigFlags.PROPERTY_MIC_CAMERA_ENABLED
+    }
+
+    @Mock
+    private lateinit var appOpsController: AppOpsController
+    @Mock
+    private lateinit var callback: PrivacyItemController.Callback
+    @Mock
+    private lateinit var userManager: UserManager
+    @Mock
+    private lateinit var broadcastDispatcher: BroadcastDispatcher
+    @Mock
+    private lateinit var dumpManager: DumpManager
+
+    private lateinit var privacyItemController: PrivacyItemController
+    private lateinit var executor: FakeExecutor
+    private lateinit var deviceConfigProxy: DeviceConfigProxy
+
+    fun PrivacyItemController(): PrivacyItemController {
+        return PrivacyItemController(
+                appOpsController,
+                executor,
+                executor,
+                broadcastDispatcher,
+                deviceConfigProxy,
+                userManager,
+                dumpManager
+        )
+    }
+
+    @Before
+    fun setup() {
+        MockitoAnnotations.initMocks(this)
+        executor = FakeExecutor(FakeSystemClock())
+        deviceConfigProxy = DeviceConfigProxyFake()
+
+        privacyItemController = PrivacyItemController()
+        privacyItemController.addCallback(callback)
+
+        executor.runAllReady()
+    }
+
+    @Test
+    fun testNotListeningByDefault() {
+        assertFalse(privacyItemController.allIndicatorsAvailable)
+        assertFalse(privacyItemController.micCameraAvailable)
+
+        verify(appOpsController, never()).addCallback(any(), any())
+    }
+
+    @Test
+    fun testMicCameraChanged() {
+        changeMicCamera(true)
+        executor.runAllReady()
+
+        verify(callback).onFlagMicCameraChanged(true)
+        verify(callback, never()).onFlagAllChanged(anyBoolean())
+
+        assertTrue(privacyItemController.micCameraAvailable)
+        assertFalse(privacyItemController.allIndicatorsAvailable)
+    }
+
+    @Test
+    fun testAllChanged() {
+        changeAll(true)
+        executor.runAllReady()
+
+        verify(callback).onFlagAllChanged(true)
+        verify(callback, never()).onFlagMicCameraChanged(anyBoolean())
+
+        assertTrue(privacyItemController.allIndicatorsAvailable)
+        assertFalse(privacyItemController.micCameraAvailable)
+    }
+
+    @Test
+    fun testBothChanged() {
+        changeAll(true)
+        changeMicCamera(true)
+        executor.runAllReady()
+
+        verify(callback, atLeastOnce()).onFlagAllChanged(true)
+        verify(callback, atLeastOnce()).onFlagMicCameraChanged(true)
+
+        assertTrue(privacyItemController.allIndicatorsAvailable)
+        assertTrue(privacyItemController.micCameraAvailable)
+    }
+
+    @Test
+    fun testAll_listeningToAll() {
+        changeAll(true)
+        executor.runAllReady()
+
+        verify(appOpsController).addCallback(eq(PrivacyItemController.OPS), any())
+    }
+
+    @Test
+    fun testMicCamera_listening() {
+        changeMicCamera(true)
+        executor.runAllReady()
+
+        verify(appOpsController).addCallback(eq(PrivacyItemController.OPS), any())
+    }
+
+    @Test
+    fun testAll_listening() {
+        changeAll(true)
+        executor.runAllReady()
+
+        verify(appOpsController).addCallback(eq(PrivacyItemController.OPS), any())
+    }
+
+    @Test
+    fun testAllFalse_notListening() {
+        changeAll(true)
+        executor.runAllReady()
+        changeAll(false)
+        executor.runAllReady()
+
+        verify(appOpsController).removeCallback(any(), any())
+    }
+
+    @Test
+    fun testSomeListening_stillListening() {
+        changeAll(true)
+        changeMicCamera(true)
+        executor.runAllReady()
+        changeAll(false)
+        executor.runAllReady()
+
+        verify(appOpsController, never()).removeCallback(any(), any())
+    }
+
+    @Test
+    fun testAllDeleted_stopListening() {
+        changeAll(true)
+        executor.runAllReady()
+        changeAll(null)
+        executor.runAllReady()
+
+        verify(appOpsController).removeCallback(any(), any())
+    }
+
+    @Test
+    fun testMicDeleted_stopListening() {
+        changeMicCamera(true)
+        executor.runAllReady()
+        changeMicCamera(null)
+        executor.runAllReady()
+
+        verify(appOpsController).removeCallback(any(), any())
+    }
+
+    private fun changeMicCamera(value: Boolean?) = changeProperty(MIC_CAMERA, value)
+    private fun changeAll(value: Boolean?) = changeProperty(ALL_INDICATORS, value)
+
+    private fun changeProperty(name: String, value: Boolean?) {
+        deviceConfigProxy.setProperty(
+                DeviceConfig.NAMESPACE_PRIVACY,
+                name,
+                value?.toString(),
+                false
+        )
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt
new file mode 100644
index 0000000..5c5df26
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt
@@ -0,0 +1,329 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.privacy
+
+import android.app.ActivityManager
+import android.app.AppOpsManager
+import android.content.Intent
+import android.content.pm.UserInfo
+import android.os.UserHandle
+import android.os.UserManager
+import android.provider.DeviceConfig
+import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper.RunWithLooper
+import androidx.test.filters.SmallTest
+import com.android.internal.config.sysui.SystemUiDeviceConfigFlags
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.appops.AppOpItem
+import com.android.systemui.appops.AppOpsController
+import com.android.systemui.broadcast.BroadcastDispatcher
+import com.android.systemui.dump.DumpManager
+import com.android.systemui.util.DeviceConfigProxy
+import com.android.systemui.util.DeviceConfigProxyFake
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.time.FakeSystemClock
+import org.hamcrest.Matchers.hasItem
+import org.hamcrest.Matchers.not
+import org.hamcrest.Matchers.nullValue
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertThat
+import org.junit.Assert.assertTrue
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.ArgumentMatchers.anyInt
+import org.mockito.ArgumentMatchers.anyList
+import org.mockito.Captor
+import org.mockito.Mock
+import org.mockito.Mockito
+import org.mockito.Mockito.atLeastOnce
+import org.mockito.Mockito.doReturn
+import org.mockito.Mockito.mock
+import org.mockito.Mockito.never
+import org.mockito.Mockito.reset
+import org.mockito.Mockito.verify
+import org.mockito.Mockito.verifyNoMoreInteractions
+import org.mockito.MockitoAnnotations
+
+@RunWith(AndroidTestingRunner::class)
+@SmallTest
+@RunWithLooper
+class PrivacyItemControllerTest : SysuiTestCase() {
+
+    companion object {
+        val CURRENT_USER_ID = ActivityManager.getCurrentUser()
+        val TEST_UID = CURRENT_USER_ID * UserHandle.PER_USER_RANGE
+        const val TEST_PACKAGE_NAME = "test"
+
+        private const val ALL_INDICATORS =
+                SystemUiDeviceConfigFlags.PROPERTY_PERMISSIONS_HUB_ENABLED
+        private const val MIC_CAMERA = SystemUiDeviceConfigFlags.PROPERTY_MIC_CAMERA_ENABLED
+        fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture()
+        fun <T> eq(value: T): T = Mockito.eq(value) ?: value
+        fun <T> any(): T = Mockito.any<T>()
+    }
+
+    @Mock
+    private lateinit var appOpsController: AppOpsController
+    @Mock
+    private lateinit var callback: PrivacyItemController.Callback
+    @Mock
+    private lateinit var userManager: UserManager
+    @Mock
+    private lateinit var broadcastDispatcher: BroadcastDispatcher
+    @Mock
+    private lateinit var dumpManager: DumpManager
+    @Captor
+    private lateinit var argCaptor: ArgumentCaptor<List<PrivacyItem>>
+    @Captor
+    private lateinit var argCaptorCallback: ArgumentCaptor<AppOpsController.Callback>
+
+    private lateinit var privacyItemController: PrivacyItemController
+    private lateinit var executor: FakeExecutor
+    private lateinit var deviceConfigProxy: DeviceConfigProxy
+
+    fun PrivacyItemController(): PrivacyItemController {
+        return PrivacyItemController(
+                appOpsController,
+                executor,
+                executor,
+                broadcastDispatcher,
+                deviceConfigProxy,
+                userManager,
+                dumpManager
+        )
+    }
+
+    @Before
+    fun setup() {
+        MockitoAnnotations.initMocks(this)
+        executor = FakeExecutor(FakeSystemClock())
+        deviceConfigProxy = DeviceConfigProxyFake()
+
+        changeAll(true)
+
+        doReturn(listOf(object : UserInfo() {
+            init {
+                id = CURRENT_USER_ID
+            }
+        })).`when`(userManager).getProfiles(anyInt())
+
+        privacyItemController = PrivacyItemController()
+    }
+
+    @Test
+    fun testSetListeningTrueByAddingCallback() {
+        privacyItemController.addCallback(callback)
+        executor.runAllReady()
+        verify(appOpsController).addCallback(eq(PrivacyItemController.OPS),
+                any())
+        verify(callback).onPrivacyItemsChanged(anyList())
+    }
+
+    @Test
+    fun testSetListeningFalseByRemovingLastCallback() {
+        privacyItemController.addCallback(callback)
+        executor.runAllReady()
+        verify(appOpsController, never()).removeCallback(any(),
+                any())
+        privacyItemController.removeCallback(callback)
+        executor.runAllReady()
+        verify(appOpsController).removeCallback(eq(PrivacyItemController.OPS),
+                any())
+        verify(callback).onPrivacyItemsChanged(emptyList())
+    }
+
+    @Test
+    fun testDistinctItems() {
+        doReturn(listOf(AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, "", 0),
+                AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, "", 1)))
+                .`when`(appOpsController).getActiveAppOpsForUser(anyInt())
+
+        privacyItemController.addCallback(callback)
+        executor.runAllReady()
+        verify(callback).onPrivacyItemsChanged(capture(argCaptor))
+        assertEquals(1, argCaptor.value.size)
+    }
+
+    @Test
+    fun testRegisterReceiver_allUsers() {
+        privacyItemController.addCallback(callback)
+        executor.runAllReady()
+        verify(broadcastDispatcher, atLeastOnce()).registerReceiver(
+                eq(privacyItemController.userSwitcherReceiver), any(), eq(null), eq(UserHandle.ALL))
+        verify(broadcastDispatcher, never())
+                .unregisterReceiver(eq(privacyItemController.userSwitcherReceiver))
+    }
+
+    @Test
+    fun testReceiver_ACTION_USER_FOREGROUND() {
+        privacyItemController.userSwitcherReceiver.onReceive(context,
+                Intent(Intent.ACTION_USER_SWITCHED))
+        executor.runAllReady()
+        verify(userManager).getProfiles(anyInt())
+    }
+
+    @Test
+    fun testReceiver_ACTION_MANAGED_PROFILE_ADDED() {
+        privacyItemController.userSwitcherReceiver.onReceive(context,
+                Intent(Intent.ACTION_MANAGED_PROFILE_AVAILABLE))
+        executor.runAllReady()
+        verify(userManager).getProfiles(anyInt())
+    }
+
+    @Test
+    fun testReceiver_ACTION_MANAGED_PROFILE_REMOVED() {
+        privacyItemController.userSwitcherReceiver.onReceive(context,
+                Intent(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE))
+        executor.runAllReady()
+        verify(userManager).getProfiles(anyInt())
+    }
+
+    @Test
+    fun testAddMultipleCallbacks() {
+        val otherCallback = mock(PrivacyItemController.Callback::class.java)
+        privacyItemController.addCallback(callback)
+        executor.runAllReady()
+        verify(callback).onPrivacyItemsChanged(anyList())
+
+        privacyItemController.addCallback(otherCallback)
+        executor.runAllReady()
+        verify(otherCallback).onPrivacyItemsChanged(anyList())
+        // Adding a callback should not unnecessarily call previous ones
+        verifyNoMoreInteractions(callback)
+    }
+
+    @Test
+    fun testMultipleCallbacksAreUpdated() {
+        doReturn(emptyList<AppOpItem>()).`when`(appOpsController).getActiveAppOpsForUser(anyInt())
+
+        val otherCallback = mock(PrivacyItemController.Callback::class.java)
+        privacyItemController.addCallback(callback)
+        privacyItemController.addCallback(otherCallback)
+        executor.runAllReady()
+        reset(callback)
+        reset(otherCallback)
+
+        verify(appOpsController).addCallback(any(), capture(argCaptorCallback))
+        argCaptorCallback.value.onActiveStateChanged(0, TEST_UID, "", true)
+        executor.runAllReady()
+        verify(callback).onPrivacyItemsChanged(anyList())
+        verify(otherCallback).onPrivacyItemsChanged(anyList())
+    }
+
+    @Test
+    fun testRemoveCallback() {
+        doReturn(emptyList<AppOpItem>()).`when`(appOpsController).getActiveAppOpsForUser(anyInt())
+        val otherCallback = mock(PrivacyItemController.Callback::class.java)
+        privacyItemController.addCallback(callback)
+        privacyItemController.addCallback(otherCallback)
+        executor.runAllReady()
+        executor.runAllReady()
+        reset(callback)
+        reset(otherCallback)
+
+        verify(appOpsController).addCallback(any(), capture(argCaptorCallback))
+        privacyItemController.removeCallback(callback)
+        argCaptorCallback.value.onActiveStateChanged(0, TEST_UID, "", true)
+        executor.runAllReady()
+        verify(callback, never()).onPrivacyItemsChanged(anyList())
+        verify(otherCallback).onPrivacyItemsChanged(anyList())
+    }
+
+    @Test
+    fun testListShouldNotHaveNull() {
+        doReturn(listOf(AppOpItem(AppOpsManager.OP_ACTIVATE_VPN, TEST_UID, "", 0),
+                        AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, "", 0)))
+                .`when`(appOpsController).getActiveAppOpsForUser(anyInt())
+        privacyItemController.addCallback(callback)
+        executor.runAllReady()
+        executor.runAllReady()
+
+        verify(callback).onPrivacyItemsChanged(capture(argCaptor))
+        assertEquals(1, argCaptor.value.size)
+        assertThat(argCaptor.value, not(hasItem(nullValue())))
+    }
+
+    @Test
+    fun testListShouldBeCopy() {
+        val list = listOf(PrivacyItem(PrivacyType.TYPE_CAMERA,
+                PrivacyApplication("", TEST_UID)))
+        privacyItemController.privacyList = list
+        val privacyList = privacyItemController.privacyList
+        assertEquals(list, privacyList)
+        assertTrue(list !== privacyList)
+    }
+
+    @Test
+    fun testNotListeningWhenIndicatorsDisabled() {
+        changeAll(false)
+        privacyItemController.addCallback(callback)
+        executor.runAllReady()
+        verify(appOpsController, never()).addCallback(eq(PrivacyItemController.OPS),
+                any())
+    }
+
+    @Test
+    fun testNotSendingLocationWhenOnlyMicCamera() {
+        changeAll(false)
+        changeMicCamera(true)
+        executor.runAllReady()
+
+        doReturn(listOf(AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, "", 0),
+                AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, "", 0)))
+                .`when`(appOpsController).getActiveAppOpsForUser(anyInt())
+
+        privacyItemController.addCallback(callback)
+        executor.runAllReady()
+
+        verify(callback).onPrivacyItemsChanged(capture(argCaptor))
+
+        assertEquals(1, argCaptor.value.size)
+        assertEquals(PrivacyType.TYPE_CAMERA, argCaptor.value[0].privacyType)
+    }
+
+    @Test
+    fun testNotUpdated_LocationChangeWhenOnlyMicCamera() {
+        doReturn(listOf(AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, "", 0)))
+                .`when`(appOpsController).getActiveAppOpsForUser(anyInt())
+
+        privacyItemController.addCallback(callback)
+        changeAll(false)
+        changeMicCamera(true)
+        executor.runAllReady()
+        reset(callback) // Clean callback
+
+        verify(appOpsController).addCallback(any(), capture(argCaptorCallback))
+        argCaptorCallback.value.onActiveStateChanged(
+                AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true)
+
+        verify(callback, never()).onPrivacyItemsChanged(any())
+    }
+
+    private fun changeMicCamera(value: Boolean?) = changeProperty(MIC_CAMERA, value)
+    private fun changeAll(value: Boolean?) = changeProperty(ALL_INDICATORS, value)
+
+    private fun changeProperty(name: String, value: Boolean?) {
+        deviceConfigProxy.setProperty(
+                DeviceConfig.NAMESPACE_PRIVACY,
+                name,
+                value?.toString(),
+                false
+        )
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileAdapterDelegateTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileAdapterDelegateTest.java
new file mode 100644
index 0000000..a5dead0
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileAdapterDelegateTest.java
@@ -0,0 +1,265 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.qs.customize;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.os.Bundle;
+import android.testing.AndroidTestingRunner;
+import android.view.View;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.R;
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+public class TileAdapterDelegateTest extends SysuiTestCase {
+
+    private static final int MOVE_TO_POSITION_ID = R.id.accessibility_action_qs_move_to_position;
+    private static final int ADD_TO_POSITION_ID = R.id.accessibility_action_qs_add_to_position;
+    private static final int POSITION_STRING_ID = R.string.accessibility_qs_edit_position;
+
+    @Mock
+    private TileAdapter.Holder mHolder;
+
+    private AccessibilityNodeInfoCompat mInfo;
+    private TileAdapterDelegate mDelegate;
+    private View mView;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+
+        mView = new View(mContext);
+        mDelegate = new TileAdapterDelegate();
+        mInfo = AccessibilityNodeInfoCompat.obtain();
+    }
+
+    @Test
+    public void testInfoNoSpecialActionsWhenNoHolder() {
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        for (AccessibilityNodeInfoCompat.AccessibilityActionCompat action : mInfo.getActionList()) {
+            if (action.getId() == MOVE_TO_POSITION_ID || action.getId() == ADD_TO_POSITION_ID
+                    || action.getId() == AccessibilityNodeInfo.ACTION_CLICK) {
+                fail("It should not have special action " + action.getId());
+            }
+        }
+    }
+
+    @Test
+    public void testInfoNoSpecialActionsWhenCannotStartAccessibleAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(false);
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        for (AccessibilityNodeInfoCompat.AccessibilityActionCompat action : mInfo.getActionList()) {
+            if (action.getId() == MOVE_TO_POSITION_ID || action.getId() == ADD_TO_POSITION_ID
+                    || action.getId() == AccessibilityNodeInfo.ACTION_CLICK) {
+                fail("It should not have special action " + action.getId());
+            }
+        }
+    }
+
+    @Test
+    public void testNoCollectionItemInfo() {
+        mInfo.setCollectionItemInfo(
+                AccessibilityNodeInfoCompat.CollectionItemInfoCompat.obtain(0, 1, 0, 1, false));
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        assertThat(mInfo.getCollectionItemInfo()).isNull();
+    }
+
+    @Test
+    public void testStateDescriptionHasPositionForCurrentTile() {
+        mView.setTag(mHolder);
+        int position = 3;
+        when(mHolder.getLayoutPosition()).thenReturn(position);
+        when(mHolder.isCurrentTile()).thenReturn(true);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+
+        String expectedString = mContext.getString(POSITION_STRING_ID, position);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        assertThat(mInfo.getStateDescription()).isEqualTo(expectedString);
+    }
+
+    @Test
+    public void testStateDescriptionEmptyForNotCurrentTile() {
+        mView.setTag(mHolder);
+        int position = 3;
+        when(mHolder.getLayoutPosition()).thenReturn(position);
+        when(mHolder.isCurrentTile()).thenReturn(false);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        assertThat(mInfo.getStateDescription()).isEqualTo("");
+    }
+
+    @Test
+    public void testClickAddAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+        when(mHolder.canAdd()).thenReturn(true);
+        when(mHolder.canRemove()).thenReturn(false);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+
+        String expectedString = mContext.getString(R.string.accessibility_qs_edit_tile_add_action);
+        AccessibilityNodeInfoCompat.AccessibilityActionCompat action =
+                getActionForId(mInfo, AccessibilityNodeInfo.ACTION_CLICK);
+        assertThat(action.getLabel().toString()).contains(expectedString);
+    }
+
+    @Test
+    public void testClickRemoveAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+        when(mHolder.canAdd()).thenReturn(false);
+        when(mHolder.canRemove()).thenReturn(true);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+
+        String expectedString = mContext.getString(
+                R.string.accessibility_qs_edit_remove_tile_action);
+        AccessibilityNodeInfoCompat.AccessibilityActionCompat action =
+                getActionForId(mInfo, AccessibilityNodeInfo.ACTION_CLICK);
+        assertThat(action.getLabel().toString()).contains(expectedString);
+    }
+
+    @Test
+    public void testNoClickAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+        when(mHolder.canAdd()).thenReturn(false);
+        when(mHolder.canRemove()).thenReturn(false);
+        mInfo.addAction(AccessibilityNodeInfo.ACTION_CLICK);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+
+        AccessibilityNodeInfoCompat.AccessibilityActionCompat action =
+                getActionForId(mInfo, AccessibilityNodeInfo.ACTION_CLICK);
+        assertThat(action).isNull();
+    }
+
+    @Test
+    public void testAddToPositionAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+        when(mHolder.canAdd()).thenReturn(true);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        assertThat(getActionForId(mInfo, ADD_TO_POSITION_ID)).isNotNull();
+    }
+
+    @Test
+    public void testNoAddToPositionAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+        when(mHolder.canAdd()).thenReturn(false);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        assertThat(getActionForId(mInfo, ADD_TO_POSITION_ID)).isNull();
+    }
+
+    @Test
+    public void testMoveToPositionAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+        when(mHolder.isCurrentTile()).thenReturn(true);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        assertThat(getActionForId(mInfo, MOVE_TO_POSITION_ID)).isNotNull();
+    }
+
+    @Test
+    public void testNoMoveToPositionAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+        when(mHolder.isCurrentTile()).thenReturn(false);
+
+        mDelegate.onInitializeAccessibilityNodeInfo(mView, mInfo);
+        assertThat(getActionForId(mInfo, MOVE_TO_POSITION_ID)).isNull();
+    }
+
+    @Test
+    public void testNoInteractionsWhenCannotTakeAccessibleAction() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(false);
+
+        mDelegate.performAccessibilityAction(mView, AccessibilityNodeInfo.ACTION_CLICK, null);
+        mDelegate.performAccessibilityAction(mView, MOVE_TO_POSITION_ID, new Bundle());
+        mDelegate.performAccessibilityAction(mView, ADD_TO_POSITION_ID, new Bundle());
+
+        verify(mHolder, never()).toggleState();
+        verify(mHolder, never()).startAccessibleAdd();
+        verify(mHolder, never()).startAccessibleMove();
+    }
+
+    @Test
+    public void testClickActionTogglesState() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+
+        mDelegate.performAccessibilityAction(mView, AccessibilityNodeInfo.ACTION_CLICK, null);
+
+        verify(mHolder).toggleState();
+    }
+
+    @Test
+    public void testAddToPositionActionStartsAccessibleAdd() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+
+        mDelegate.performAccessibilityAction(mView, ADD_TO_POSITION_ID, null);
+
+        verify(mHolder).startAccessibleAdd();
+    }
+
+    @Test
+    public void testMoveToPositionActionStartsAccessibleMove() {
+        mView.setTag(mHolder);
+        when(mHolder.canTakeAccessibleAction()).thenReturn(true);
+
+        mDelegate.performAccessibilityAction(mView, MOVE_TO_POSITION_ID, null);
+
+        verify(mHolder).startAccessibleMove();
+    }
+
+    private AccessibilityNodeInfoCompat.AccessibilityActionCompat getActionForId(
+            AccessibilityNodeInfoCompat info, int action) {
+        for (AccessibilityNodeInfoCompat.AccessibilityActionCompat a : info.getActionList()) {
+            if (a.getId() == action) {
+                return a;
+            }
+        }
+        return null;
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingServiceTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingServiceTest.java
index e98b6b6..4c9e141 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingServiceTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingServiceTest.java
@@ -32,7 +32,9 @@
 
 import com.android.internal.logging.UiEventLogger;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.ActivityStarter;
 import com.android.systemui.settings.CurrentUserContextTracker;
+import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -61,6 +63,12 @@
     private Executor mExecutor;
     @Mock
     private CurrentUserContextTracker mUserContextTracker;
+    private KeyguardDismissUtil mKeyguardDismissUtil = new KeyguardDismissUtil() {
+        public void executeWhenUnlocked(ActivityStarter.OnDismissAction action,
+                boolean requiresShadeOpen) {
+            action.onDismiss();
+        }
+    };
 
     private RecordingService mRecordingService;
 
@@ -68,7 +76,7 @@
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
         mRecordingService = Mockito.spy(new RecordingService(mController, mExecutor, mUiEventLogger,
-                mNotificationManager, mUserContextTracker));
+                mNotificationManager, mUserContextTracker, mKeyguardDismissUtil));
 
         // Return actual context info
         doReturn(mContext).when(mRecordingService).getApplicationContext();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java
new file mode 100644
index 0000000..4aaafbd
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.screenshot;
+
+import static com.android.systemui.screenshot.GlobalScreenshot.ACTION_TYPE_SHARE;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ID;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_SMART_ACTIONS_ENABLED;
+import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_SCREENSHOT;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+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.ArgumentMatchers.isNull;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.testing.AndroidTestingRunner;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.shared.system.ActivityManagerWrapper;
+import com.android.systemui.statusbar.phone.StatusBar;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.stubbing.Answer;
+
+import java.util.Optional;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+@RunWith(AndroidTestingRunner.class)
+@SmallTest
+public class ActionProxyReceiverTest extends SysuiTestCase {
+
+    @Mock
+    private StatusBar mMockStatusBar;
+    @Mock
+    private ActivityManagerWrapper mMockActivityManagerWrapper;
+    @Mock
+    private Future mMockFuture;
+    @Mock
+    private ScreenshotSmartActions mMockScreenshotSmartActions;
+    @Mock
+    private PendingIntent mMockPendingIntent;
+
+    private Intent mIntent;
+
+    @Before
+    public void setup() throws InterruptedException, ExecutionException, TimeoutException {
+        MockitoAnnotations.initMocks(this);
+        mIntent = new Intent(mContext, ActionProxyReceiver.class)
+                .putExtra(GlobalScreenshot.EXTRA_ACTION_INTENT, mMockPendingIntent);
+
+        when(mMockActivityManagerWrapper.closeSystemWindows(anyString())).thenReturn(mMockFuture);
+        when(mMockFuture.get(anyLong(), any(TimeUnit.class))).thenReturn(null);
+    }
+
+    @Test
+    public void testPendingIntentSentWithoutStatusBar() throws PendingIntent.CanceledException {
+        ActionProxyReceiver actionProxyReceiver = constructActionProxyReceiver(false);
+
+        actionProxyReceiver.onReceive(mContext, mIntent);
+
+        verify(mMockActivityManagerWrapper).closeSystemWindows(SYSTEM_DIALOG_REASON_SCREENSHOT);
+        verify(mMockStatusBar, never()).executeRunnableDismissingKeyguard(
+                any(Runnable.class), any(Runnable.class), anyBoolean(), anyBoolean(), anyBoolean());
+        verify(mMockPendingIntent).send(
+                eq(mContext), anyInt(), isNull(), isNull(), isNull(), isNull(), any(Bundle.class));
+    }
+
+    @Test
+    public void testPendingIntentSentWithStatusBar() throws PendingIntent.CanceledException {
+        ActionProxyReceiver actionProxyReceiver = constructActionProxyReceiver(true);
+        // ensure that the pending intent call is passed through
+        doAnswer((Answer<Object>) invocation -> {
+            ((Runnable) invocation.getArgument(0)).run();
+            return null;
+        }).when(mMockStatusBar).executeRunnableDismissingKeyguard(
+                any(Runnable.class), isNull(), anyBoolean(), anyBoolean(), anyBoolean());
+
+        actionProxyReceiver.onReceive(mContext, mIntent);
+
+        verify(mMockActivityManagerWrapper).closeSystemWindows(SYSTEM_DIALOG_REASON_SCREENSHOT);
+        verify(mMockStatusBar).executeRunnableDismissingKeyguard(
+                any(Runnable.class), isNull(), eq(true), eq(true), eq(true));
+        verify(mMockPendingIntent).send(
+                eq(mContext), anyInt(), isNull(), isNull(), isNull(), isNull(), any(Bundle.class));
+    }
+
+    @Test
+    public void testSmartActionsNotNotifiedByDefault() {
+        ActionProxyReceiver actionProxyReceiver = constructActionProxyReceiver(true);
+
+        actionProxyReceiver.onReceive(mContext, mIntent);
+
+        verify(mMockScreenshotSmartActions, never())
+                .notifyScreenshotAction(any(Context.class), anyString(), anyString(), anyBoolean());
+    }
+
+    @Test
+    public void testSmartActionsNotifiedIfEnabled() {
+        ActionProxyReceiver actionProxyReceiver = constructActionProxyReceiver(true);
+        mIntent.putExtra(EXTRA_SMART_ACTIONS_ENABLED, true);
+        String testId = "testID";
+        mIntent.putExtra(EXTRA_ID, testId);
+
+        actionProxyReceiver.onReceive(mContext, mIntent);
+
+        verify(mMockScreenshotSmartActions).notifyScreenshotAction(
+                mContext, testId, ACTION_TYPE_SHARE, false);
+    }
+
+    private ActionProxyReceiver constructActionProxyReceiver(boolean withStatusBar) {
+        if (withStatusBar) {
+            return new ActionProxyReceiver(
+                    Optional.of(mMockStatusBar), mMockActivityManagerWrapper,
+                    mMockScreenshotSmartActions);
+        } else {
+            return new ActionProxyReceiver(
+                    Optional.empty(), mMockActivityManagerWrapper, mMockScreenshotSmartActions);
+        }
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/DeleteScreenshotReceiverTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/DeleteScreenshotReceiverTest.java
new file mode 100644
index 0000000..b924913
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/DeleteScreenshotReceiverTest.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.screenshot;
+
+import static com.android.systemui.screenshot.GlobalScreenshot.ACTION_TYPE_DELETE;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ID;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_SMART_ACTIONS_ENABLED;
+import static com.android.systemui.screenshot.GlobalScreenshot.SCREENSHOT_URI_ID;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Intent;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Environment;
+import android.provider.MediaStore;
+import android.testing.AndroidTestingRunner;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.util.concurrency.FakeExecutor;
+import com.android.systemui.util.time.FakeSystemClock;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.io.File;
+import java.util.concurrent.Executor;
+
+@RunWith(AndroidTestingRunner.class)
+@SmallTest
+public class DeleteScreenshotReceiverTest extends SysuiTestCase {
+
+    @Mock
+    private ScreenshotSmartActions mMockScreenshotSmartActions;
+    @Mock
+    private Executor mMockExecutor;
+
+    private DeleteScreenshotReceiver mDeleteScreenshotReceiver;
+    private FakeExecutor mFakeExecutor = new FakeExecutor(new FakeSystemClock());
+
+    @Before
+    public void setup() {
+        MockitoAnnotations.initMocks(this);
+        mDeleteScreenshotReceiver =
+                new DeleteScreenshotReceiver(mMockScreenshotSmartActions, mMockExecutor);
+    }
+
+    @Test
+    public void testNoUriProvided() {
+        Intent intent = new Intent(mContext, DeleteScreenshotReceiver.class);
+
+        mDeleteScreenshotReceiver.onReceive(mContext, intent);
+
+        verify(mMockExecutor, never()).execute(any(Runnable.class));
+        verify(mMockScreenshotSmartActions, never()).notifyScreenshotAction(
+                any(Context.class), any(String.class), any(String.class), anyBoolean());
+    }
+
+    @Test
+    public void testFileDeleted() {
+        DeleteScreenshotReceiver deleteScreenshotReceiver =
+                new DeleteScreenshotReceiver(mMockScreenshotSmartActions, mFakeExecutor);
+        ContentResolver contentResolver = mContext.getContentResolver();
+        final Uri testUri = contentResolver.insert(
+                MediaStore.Images.Media.EXTERNAL_CONTENT_URI, getFakeContentValues());
+        assertNotNull(testUri);
+
+        try {
+            Cursor cursor =
+                    contentResolver.query(testUri, null, null, null, null);
+            assertEquals(1, cursor.getCount());
+            Intent intent = new Intent(mContext, DeleteScreenshotReceiver.class)
+                    .putExtra(SCREENSHOT_URI_ID, testUri.toString());
+
+            deleteScreenshotReceiver.onReceive(mContext, intent);
+            int runCount = mFakeExecutor.runAllReady();
+
+            assertEquals(1, runCount);
+            cursor =
+                    contentResolver.query(testUri, null, null, null, null);
+            assertEquals(0, cursor.getCount());
+        } finally {
+            contentResolver.delete(testUri, null, null);
+        }
+
+        // ensure smart actions not called by default
+        verify(mMockScreenshotSmartActions, never()).notifyScreenshotAction(
+                any(Context.class), any(String.class), any(String.class), anyBoolean());
+    }
+
+    @Test
+    public void testNotifyScreenshotAction() {
+        Intent intent = new Intent(mContext, DeleteScreenshotReceiver.class);
+        String uriString = "testUri";
+        String testId = "testID";
+        intent.putExtra(SCREENSHOT_URI_ID, uriString);
+        intent.putExtra(EXTRA_ID, testId);
+        intent.putExtra(EXTRA_SMART_ACTIONS_ENABLED, true);
+
+        mDeleteScreenshotReceiver.onReceive(mContext, intent);
+
+        verify(mMockExecutor).execute(any(Runnable.class));
+        verify(mMockScreenshotSmartActions).notifyScreenshotAction(
+                mContext, testId, ACTION_TYPE_DELETE, false);
+    }
+
+    private static ContentValues getFakeContentValues() {
+        final ContentValues values = new ContentValues();
+        values.put(MediaStore.MediaColumns.RELATIVE_PATH, Environment.DIRECTORY_PICTURES
+                + File.separator + Environment.DIRECTORY_SCREENSHOTS);
+        values.put(MediaStore.MediaColumns.DISPLAY_NAME, "test_screenshot");
+        values.put(MediaStore.MediaColumns.MIME_TYPE, "image/png");
+        values.put(MediaStore.MediaColumns.DATE_ADDED, 0);
+        values.put(MediaStore.MediaColumns.DATE_MODIFIED, 0);
+        return values;
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java
index d3b3399..184329ec 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java
@@ -61,12 +61,14 @@
  */
 public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase {
     private ScreenshotNotificationSmartActionsProvider mSmartActionsProvider;
+    private ScreenshotSmartActions mScreenshotSmartActions;
     private Handler mHandler;
 
     @Before
     public void setup() {
         mSmartActionsProvider = mock(
                 ScreenshotNotificationSmartActionsProvider.class);
+        mScreenshotSmartActions = new ScreenshotSmartActions();
         mHandler = mock(Handler.class);
     }
 
@@ -82,7 +84,7 @@
         when(smartActionsProvider.getActions(any(), any(), any(), any(), any()))
             .thenThrow(RuntimeException.class);
         CompletableFuture<List<Notification.Action>> smartActionsFuture =
-                ScreenshotSmartActions.getSmartActionsFuture(
+                mScreenshotSmartActions.getSmartActionsFuture(
                         "", Uri.parse("content://authority/data"), bitmap, smartActionsProvider,
                         true, UserHandle.getUserHandleForUid(UserHandle.myUserId()));
         assertNotNull(smartActionsFuture);
@@ -100,7 +102,7 @@
         int timeoutMs = 1000;
         when(smartActionsFuture.get(timeoutMs, TimeUnit.MILLISECONDS)).thenThrow(
                 RuntimeException.class);
-        List<Notification.Action> actions = ScreenshotSmartActions.getSmartActions(
+        List<Notification.Action> actions = mScreenshotSmartActions.getSmartActions(
                 "", smartActionsFuture, timeoutMs, mSmartActionsProvider);
         assertEquals(Collections.emptyList(), actions);
     }
@@ -111,7 +113,7 @@
             throws Exception {
         doThrow(RuntimeException.class).when(mSmartActionsProvider).notifyOp(any(), any(), any(),
                 anyLong());
-        ScreenshotSmartActions.notifyScreenshotOp(null, mSmartActionsProvider, null, null, -1);
+        mScreenshotSmartActions.notifyScreenshotOp(null, mSmartActionsProvider, null, null, -1);
     }
 
     // Tests for a non-hardware bitmap, ScreenshotNotificationSmartActionsProvider is never invoked
@@ -122,7 +124,7 @@
         Bitmap bitmap = mock(Bitmap.class);
         when(bitmap.getConfig()).thenReturn(Bitmap.Config.RGB_565);
         CompletableFuture<List<Notification.Action>> smartActionsFuture =
-                ScreenshotSmartActions.getSmartActionsFuture(
+                mScreenshotSmartActions.getSmartActionsFuture(
                         "", Uri.parse("content://autority/data"), bitmap, mSmartActionsProvider,
                         true, UserHandle.getUserHandleForUid(UserHandle.myUserId()));
         verify(mSmartActionsProvider, never()).getActions(any(), any(), any(), any(), any());
@@ -136,7 +138,7 @@
     public void testScreenshotNotificationSmartActionsProviderInvokedOnce() {
         Bitmap bitmap = mock(Bitmap.class);
         when(bitmap.getConfig()).thenReturn(Bitmap.Config.HARDWARE);
-        ScreenshotSmartActions.getSmartActionsFuture(
+        mScreenshotSmartActions.getSmartActionsFuture(
                 "", Uri.parse("content://autority/data"), bitmap, mSmartActionsProvider, true,
                 UserHandle.getUserHandleForUid(UserHandle.myUserId()));
         verify(mSmartActionsProvider, times(1)).getActions(any(), any(), any(), any(), any());
@@ -152,7 +154,7 @@
                 SystemUIFactory.getInstance().createScreenshotNotificationSmartActionsProvider(
                         mContext, null, mHandler);
         CompletableFuture<List<Notification.Action>> smartActionsFuture =
-                ScreenshotSmartActions.getSmartActionsFuture("", null, bitmap,
+                mScreenshotSmartActions.getSmartActionsFuture("", null, bitmap,
                         actionsProvider,
                         true, UserHandle.getUserHandleForUid(UserHandle.myUserId()));
         assertNotNull(smartActionsFuture);
@@ -172,7 +174,8 @@
         data.image = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
         data.finisher = null;
         data.mActionsReadyListener = null;
-        SaveImageInBackgroundTask task = new SaveImageInBackgroundTask(mContext, data);
+        SaveImageInBackgroundTask task =
+                new SaveImageInBackgroundTask(mContext, mScreenshotSmartActions, data);
 
         Notification.Action shareAction = task.createShareAction(mContext, mContext.getResources(),
                 Uri.parse("Screenshot_123.png"));
@@ -198,7 +201,8 @@
         data.image = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
         data.finisher = null;
         data.mActionsReadyListener = null;
-        SaveImageInBackgroundTask task = new SaveImageInBackgroundTask(mContext, data);
+        SaveImageInBackgroundTask task =
+                new SaveImageInBackgroundTask(mContext, mScreenshotSmartActions, data);
 
         Notification.Action editAction = task.createEditAction(mContext, mContext.getResources(),
                 Uri.parse("Screenshot_123.png"));
@@ -224,7 +228,8 @@
         data.image = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
         data.finisher = null;
         data.mActionsReadyListener = null;
-        SaveImageInBackgroundTask task = new SaveImageInBackgroundTask(mContext, data);
+        SaveImageInBackgroundTask task =
+                new SaveImageInBackgroundTask(mContext, mScreenshotSmartActions, data);
 
         Notification.Action deleteAction = task.createDeleteAction(mContext,
                 mContext.getResources(),
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/SmartActionsReceiverTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/SmartActionsReceiverTest.java
new file mode 100644
index 0000000..ce6f073
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/SmartActionsReceiverTest.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.screenshot;
+
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ACTION_TYPE;
+import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ID;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.Mockito.verify;
+
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.os.Bundle;
+import android.testing.AndroidTestingRunner;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidTestingRunner.class)
+@SmallTest
+public class SmartActionsReceiverTest extends SysuiTestCase {
+
+    @Mock
+    private ScreenshotSmartActions mMockScreenshotSmartActions;
+    @Mock
+    private PendingIntent mMockPendingIntent;
+
+    private SmartActionsReceiver mSmartActionsReceiver;
+    private Intent mIntent;
+
+    @Before
+    public void setup() {
+        MockitoAnnotations.initMocks(this);
+        mSmartActionsReceiver = new SmartActionsReceiver(mMockScreenshotSmartActions);
+        mIntent = new Intent(mContext, SmartActionsReceiver.class)
+                .putExtra(GlobalScreenshot.EXTRA_ACTION_INTENT, mMockPendingIntent);
+    }
+
+    @Test
+    public void testSmartActionIntent() throws PendingIntent.CanceledException {
+        String testId = "testID";
+        String testActionType = "testActionType";
+        mIntent.putExtra(EXTRA_ID, testId);
+        mIntent.putExtra(EXTRA_ACTION_TYPE, testActionType);
+
+        mSmartActionsReceiver.onReceive(mContext, mIntent);
+
+        verify(mMockPendingIntent).send(
+                eq(mContext), eq(0), isNull(), isNull(), isNull(), isNull(), any(Bundle.class));
+        verify(mMockScreenshotSmartActions).notifyScreenshotAction(
+                mContext, testId, testActionType, true);
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java
index 402a99d..dee6020 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java
@@ -108,11 +108,7 @@
         return new TestableAlertingNotificationManager();
     }
 
-    protected StatusBarNotification createNewNotification(int id) {
-        Notification.Builder n = new Notification.Builder(mContext, "")
-                .setSmallIcon(R.drawable.ic_person)
-                .setContentTitle("Title")
-                .setContentText("Text");
+    protected StatusBarNotification createNewSbn(int id, Notification.Builder n) {
         return new StatusBarNotification(
                 TEST_PACKAGE_NAME /* pkg */,
                 TEST_PACKAGE_NAME,
@@ -126,6 +122,14 @@
                 0 /* postTime */);
     }
 
+    protected StatusBarNotification createNewNotification(int id) {
+        Notification.Builder n = new Notification.Builder(mContext, "")
+                .setSmallIcon(R.drawable.ic_person)
+                .setContentTitle("Title")
+                .setContentText("Text");
+        return createNewSbn(id, n);
+    }
+
     @Before
     public void setUp() {
         mTestHandler = Handler.createAsync(Looper.myLooper());
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java
index 25da741..3718cd7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java
@@ -51,6 +51,7 @@
 import androidx.test.filters.Suppress;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.media.MediaFeatureFlag;
 import com.android.systemui.statusbar.NotificationRemoteInputManager;
 import com.android.systemui.statusbar.SmartReplyController;
 import com.android.systemui.statusbar.notification.ConversationNotificationProcessor;
@@ -110,6 +111,7 @@
                 () -> smartReplyConstants,
                 () -> smartReplyController,
                 mConversationNotificationProcessor,
+                mock(MediaFeatureFlag.class),
                 mock(Executor.class));
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java
index 787b7b7..8bb155b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java
@@ -44,6 +44,7 @@
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.bubbles.BubbleController;
+import com.android.systemui.media.MediaFeatureFlag;
 import com.android.systemui.plugins.FalsingManager;
 import com.android.systemui.plugins.statusbar.StatusBarStateController;
 import com.android.systemui.shared.plugins.PluginManager;
@@ -204,6 +205,7 @@
                 () -> mock(SmartReplyConstants.class),
                 () -> mock(SmartReplyController.class),
                 mock(ConversationNotificationProcessor.class),
+                mock(MediaFeatureFlag.class),
                 mBgExecutor);
         mRowContentBindStage = new RowContentBindStage(
                 binder,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java
index b9eb4d1..0c6409b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java
@@ -46,6 +46,7 @@
 import com.android.systemui.TestableDependency;
 import com.android.systemui.bubbles.BubbleController;
 import com.android.systemui.bubbles.BubblesTestActivity;
+import com.android.systemui.media.MediaFeatureFlag;
 import com.android.systemui.plugins.FalsingManager;
 import com.android.systemui.plugins.statusbar.StatusBarStateController;
 import com.android.systemui.statusbar.NotificationMediaManager;
@@ -133,6 +134,7 @@
                 () -> mock(SmartReplyConstants.class),
                 () -> mock(SmartReplyController.class),
                 mock(ConversationNotificationProcessor.class),
+                mock(MediaFeatureFlag.class),
                 mock(Executor.class));
         contentBinder.setInflateSynchronously(true);
         mBindStage = new RowContentBindStage(contentBinder,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarRotationContextTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarRotationContextTest.java
index d6b38ff..1b1ea31 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarRotationContextTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarRotationContextTest.java
@@ -60,7 +60,8 @@
         final View view = new View(mContext);
         mRotationButton = mock(RotationButton.class);
         mRotationButtonController = spy(
-                new RotationButtonController(mContext, RES_UNDEF, mRotationButton));
+                new RotationButtonController(mContext, RES_UNDEF, mRotationButton,
+                        (visibility) -> {}));
         final KeyButtonDrawable kbd = mock(KeyButtonDrawable.class);
         doReturn(view).when(mRotationButton).getCurrentView();
         doReturn(true).when(mRotationButton).acceptRotationProposal();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/HeadsUpManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/HeadsUpManagerTest.java
index fc7d0ce..0e4b053 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/HeadsUpManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/HeadsUpManagerTest.java
@@ -16,12 +16,15 @@
 
 package com.android.systemui.statusbar.policy;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import static junit.framework.Assert.assertFalse;
 import static junit.framework.Assert.assertTrue;
 
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.doReturn;
 
+import android.app.Notification;
 import android.content.Context;
 import android.testing.AndroidTestingRunner;
 import android.testing.TestableLooper;
@@ -30,6 +33,7 @@
 
 import com.android.systemui.statusbar.AlertingNotificationManager;
 import com.android.systemui.statusbar.AlertingNotificationManagerTest;
+import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -84,5 +88,25 @@
         assertTrue("Heads up should live long enough", mLivesPastNormalTime);
         assertFalse(mHeadsUpManager.isAlerting(mEntry.getKey()));
     }
+
+    @Test
+    public void testAlertEntryCompareTo_ongoingCallLessThanActiveRemoteInput() {
+        HeadsUpManager.HeadsUpEntry ongoingCall = mHeadsUpManager.new HeadsUpEntry();
+        ongoingCall.setEntry(new NotificationEntryBuilder()
+                .setSbn(createNewSbn(0,
+                        new Notification.Builder(mContext, "")
+                                .setCategory(Notification.CATEGORY_CALL)
+                                .setOngoing(true)))
+                .build());
+
+        HeadsUpManager.HeadsUpEntry activeRemoteInput = mHeadsUpManager.new HeadsUpEntry();
+        activeRemoteInput.setEntry(new NotificationEntryBuilder()
+                .setSbn(createNewNotification(1))
+                .build());
+        activeRemoteInput.remoteInputActive = true;
+
+        assertThat(ongoingCall.compareTo(activeRemoteInput)).isLessThan(0);
+        assertThat(activeRemoteInput.compareTo(ongoingCall)).isGreaterThan(0);
+    }
 }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
index 6fffcff..56598f7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
@@ -3,6 +3,8 @@
 import static android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WWAN;
 import static android.telephony.NetworkRegistrationInfo.DOMAIN_PS;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -10,6 +12,7 @@
 import android.net.NetworkCapabilities;
 import android.os.Looper;
 import android.telephony.NetworkRegistrationInfo;
+import android.telephony.ServiceState;
 import android.telephony.TelephonyManager;
 import android.test.suitebuilder.annotation.SmallTest;
 import android.testing.AndroidTestingRunner;
@@ -259,6 +262,25 @@
         assertDataNetworkNameEquals(newDataName);
     }
 
+    @Test
+    public void testIsDataInService_true() {
+        setupDefaultSignal();
+        assertTrue(mNetworkController.isMobileDataNetworkInService());
+    }
+
+    @Test
+    public void testIsDataInService_noSignal_false() {
+        assertFalse(mNetworkController.isMobileDataNetworkInService());
+    }
+
+    @Test
+    public void testIsDataInService_notInService_false() {
+        setupDefaultSignal();
+        setVoiceRegState(ServiceState.STATE_OUT_OF_SERVICE);
+        setDataRegState(ServiceState.STATE_OUT_OF_SERVICE);
+        assertFalse(mNetworkController.isMobileDataNetworkInService());
+    }
+
     private void testDataActivity(int direction, boolean in, boolean out) {
         updateDataActivity(direction);
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorSingleTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorSingleTest.java
new file mode 100644
index 0000000..f2d5284
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorSingleTest.java
@@ -0,0 +1,243 @@
+/*
+ * 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.util.sensors;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.util.concurrency.FakeExecutor;
+import com.android.systemui.util.time.FakeSystemClock;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * Tests for ProximitySensor that rely on a single hardware sensor.
+ */
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+public class ProximitySensorSingleTest extends SysuiTestCase {
+    private ProximitySensor mProximitySensor;
+    private FakeExecutor mFakeExecutor = new FakeExecutor(new FakeSystemClock());
+    private FakeThresholdSensor mThresholdSensor;
+
+    @Before
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        allowTestableLooperAsMainThread();
+        mThresholdSensor = new FakeThresholdSensor();
+        mThresholdSensor.setLoaded(true);
+
+        mProximitySensor = new ProximitySensor(
+                mThresholdSensor, new FakeThresholdSensor(), mFakeExecutor);
+    }
+
+    @Test
+    public void testSingleListener() {
+        TestableListener listener = new TestableListener();
+
+        assertFalse(mProximitySensor.isRegistered());
+        mProximitySensor.register(listener);
+        assertTrue(mProximitySensor.isRegistered());
+        assertNull(listener.mLastEvent);
+
+        mThresholdSensor.triggerEvent(false, 0);
+        assertFalse(listener.mLastEvent.getBelow());
+        assertEquals(1, listener.mCallCount);
+        mThresholdSensor.triggerEvent(true, 0);
+        assertTrue(listener.mLastEvent.getBelow());
+        assertEquals(2, listener.mCallCount);
+
+        mProximitySensor.unregister(listener);
+    }
+
+    @Test
+    public void testMultiListener() {
+        TestableListener listenerA = new TestableListener();
+        TestableListener listenerB = new TestableListener();
+
+        assertFalse(mProximitySensor.isRegistered());
+
+        mProximitySensor.register(listenerA);
+        assertTrue(mProximitySensor.isRegistered());
+        mProximitySensor.register(listenerB);
+        assertTrue(mProximitySensor.isRegistered());
+        assertNull(listenerA.mLastEvent);
+        assertNull(listenerB.mLastEvent);
+
+        mThresholdSensor.triggerEvent(false, 0);
+        assertFalse(listenerA.mLastEvent.getBelow());
+        assertFalse(listenerB.mLastEvent.getBelow());
+        assertEquals(1, listenerA.mCallCount);
+        assertEquals(1, listenerB.mCallCount);
+        mThresholdSensor.triggerEvent(true, 1);
+        assertTrue(listenerA.mLastEvent.getBelow());
+        assertTrue(listenerB.mLastEvent.getBelow());
+        assertEquals(2, listenerA.mCallCount);
+        assertEquals(2, listenerB.mCallCount);
+
+        mProximitySensor.unregister(listenerA);
+        mProximitySensor.unregister(listenerB);
+    }
+
+    @Test
+    public void testDuplicateListener() {
+        TestableListener listenerA = new TestableListener();
+
+        assertFalse(mProximitySensor.isRegistered());
+
+        mProximitySensor.register(listenerA);
+        assertTrue(mProximitySensor.isRegistered());
+        mProximitySensor.register(listenerA);
+        assertTrue(mProximitySensor.isRegistered());
+        assertNull(listenerA.mLastEvent);
+
+        mThresholdSensor.triggerEvent(false, 0);
+        assertFalse(listenerA.mLastEvent.getBelow());
+        assertEquals(1, listenerA.mCallCount);
+        mThresholdSensor.triggerEvent(true, 1);
+        assertTrue(listenerA.mLastEvent.getBelow());
+        assertEquals(2, listenerA.mCallCount);
+
+        mProximitySensor.unregister(listenerA);
+    }
+    @Test
+    public void testUnregister() {
+        TestableListener listener = new TestableListener();
+
+        assertFalse(mProximitySensor.isRegistered());
+        mProximitySensor.register(listener);
+        assertTrue(mProximitySensor.isRegistered());
+        assertNull(listener.mLastEvent);
+
+        mThresholdSensor.triggerEvent(false, 0);
+        assertFalse(listener.mLastEvent.getBelow());
+        assertEquals(1, listener.mCallCount);
+
+        mProximitySensor.unregister(listener);
+        assertFalse(mProximitySensor.isRegistered());
+    }
+
+    @Test
+    public void testPauseAndResume() {
+        TestableListener listener = new TestableListener();
+
+        assertFalse(mProximitySensor.isRegistered());
+        mProximitySensor.register(listener);
+        assertTrue(mProximitySensor.isRegistered());
+        assertNull(listener.mLastEvent);
+
+        mThresholdSensor.triggerEvent(false, 0);
+        assertFalse(listener.mLastEvent.getBelow());
+        assertEquals(1, listener.mCallCount);
+
+        mProximitySensor.pause();
+        assertFalse(mProximitySensor.isRegistered());
+
+        // More events do nothing when paused.
+        mThresholdSensor.triggerEvent(false, 1);
+        assertFalse(listener.mLastEvent.getBelow());
+        assertEquals(1, listener.mCallCount);
+        mThresholdSensor.triggerEvent(true, 2);
+        assertFalse(listener.mLastEvent.getBelow());
+        assertEquals(1, listener.mCallCount);
+
+        mProximitySensor.resume();
+        assertTrue(mProximitySensor.isRegistered());
+        // Still matches our previous call
+        assertFalse(listener.mLastEvent.getBelow());
+        assertEquals(1, listener.mCallCount);
+
+        mThresholdSensor.triggerEvent(true, 3);
+        assertTrue(listener.mLastEvent.getBelow());
+        assertEquals(2, listener.mCallCount);
+
+        mProximitySensor.unregister(listener);
+        assertFalse(mProximitySensor.isRegistered());
+    }
+
+    @Test
+    public void testAlertListeners() {
+        TestableListener listenerA = new TestableListener();
+        TestableListener listenerB = new TestableListener();
+
+        assertFalse(mProximitySensor.isRegistered());
+
+        mProximitySensor.register(listenerA);
+        mProximitySensor.register(listenerB);
+        assertTrue(mProximitySensor.isRegistered());
+        assertNull(listenerA.mLastEvent);
+        assertNull(listenerB.mLastEvent);
+
+        mProximitySensor.alertListeners();
+        assertNull(listenerA.mLastEvent);
+        assertEquals(0, listenerA.mCallCount);
+        assertNull(listenerB.mLastEvent);
+        assertEquals(0, listenerB.mCallCount);
+
+        mThresholdSensor.triggerEvent(true, 0);
+        assertTrue(listenerA.mLastEvent.getBelow());
+        assertEquals(1, listenerA.mCallCount);
+        assertTrue(listenerB.mLastEvent.getBelow());
+        assertEquals(1,  listenerB.mCallCount);
+
+        mProximitySensor.unregister(listenerA);
+        mProximitySensor.unregister(listenerB);
+    }
+
+    @Test
+    public void testPreventRecursiveAlert() {
+        TestableListener listenerA = new TestableListener() {
+            @Override
+            public void onThresholdCrossed(ProximitySensor.ThresholdSensorEvent proximityEvent) {
+                super.onThresholdCrossed(proximityEvent);
+                if (mCallCount < 2) {
+                    mProximitySensor.alertListeners();
+                }
+            }
+        };
+
+        mProximitySensor.register(listenerA);
+
+        mThresholdSensor.triggerEvent(true, 0);
+
+        assertEquals(1, listenerA.mCallCount);
+    }
+
+    private static class TestableListener implements ThresholdSensor.Listener {
+        ThresholdSensor.ThresholdSensorEvent mLastEvent;
+        int mCallCount = 0;
+
+        @Override
+        public void onThresholdCrossed(ThresholdSensor.ThresholdSensorEvent proximityEvent) {
+            mLastEvent = proximityEvent;
+            mCallCount++;
+        }
+    };
+
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java
index d5ba381..e7acfae 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java
@@ -95,6 +95,11 @@
     }
 
     @Override
+    public boolean isMobileDataNetworkInService() {
+        return false;
+    }
+
+    @Override
     public int getNumberSubscriptions() {
         return 0;
     }
diff --git a/packages/Tethering/OWNERS b/packages/Tethering/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/packages/Tethering/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/packages/VpnDialogs/OWNERS b/packages/VpnDialogs/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/packages/VpnDialogs/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/packages/WAPPushManager/OWNERS b/packages/WAPPushManager/OWNERS
new file mode 100644
index 0000000..640baf2
--- /dev/null
+++ b/packages/WAPPushManager/OWNERS
@@ -0,0 +1 @@
+include /telephony/OWNERS
diff --git a/packages/WallpaperBackup/OWNERS b/packages/WallpaperBackup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/packages/WallpaperBackup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/packages/WallpaperCropper/OWNERS b/packages/WallpaperCropper/OWNERS
new file mode 100644
index 0000000..8ff0f74
--- /dev/null
+++ b/packages/WallpaperCropper/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/wallpaper/OWNERS
diff --git a/packages/WindowManager/OWNERS b/packages/WindowManager/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/packages/WindowManager/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
index ab41e0f..999ab08 100644
--- a/packages/overlays/Android.mk
+++ b/packages/overlays/Android.mk
@@ -41,6 +41,21 @@
 	IconPackCircularSettingsOverlay \
 	IconPackCircularSystemUIOverlay \
 	IconPackCircularThemePickerOverlay \
+	IconPackVictorAndroidOverlay \
+    IconPackVictorLauncherOverlay \
+    IconPackVictorSettingsOverlay \
+    IconPackVictorSystemUIOverlay \
+    IconPackVictorThemePickerOverlay \
+    IconPackSamAndroidOverlay \
+    IconPackSamLauncherOverlay \
+    IconPackSamSettingsOverlay \
+    IconPackSamSystemUIOverlay \
+    IconPackSamThemePickerOverlay \
+    IconPackKaiAndroidOverlay \
+    IconPackKaiLauncherOverlay \
+    IconPackKaiSettingsOverlay \
+    IconPackKaiSystemUIOverlay \
+    IconPackKaiThemePickerOverlay \
 	IconPackFilledAndroidOverlay \
 	IconPackFilledLauncherOverlay \
 	IconPackFilledSettingsOverlay \
diff --git a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-eu/strings.xml b/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-eu/strings.xml
new file mode 100644
index 0000000..93ef2c8
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-eu/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+   -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="display_cutout_emulation_overlay" msgid="3523556473422419323">"Ur-jauzi moduko mozketa"</string>
+</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-gu/strings.xml b/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-gu/strings.xml
new file mode 100644
index 0000000..03672fe
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-gu/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+   -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="display_cutout_emulation_overlay" msgid="3523556473422419323">"વૉટરફૉલ કટઆઉટ"</string>
+</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-kk/strings.xml b/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-kk/strings.xml
new file mode 100644
index 0000000..bb0dfe9
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-kk/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+   -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="display_cutout_emulation_overlay" msgid="3523556473422419323">"Сарқырама ойығы"</string>
+</resources>
diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackCircularThemePickerOverlay/AndroidManifest.xml
index eae7de8..f7c5b55 100644
--- a/packages/overlays/IconPackCircularThemePickerOverlay/AndroidManifest.xml
+++ b/packages/overlays/IconPackCircularThemePickerOverlay/AndroidManifest.xml
@@ -19,6 +19,6 @@
     package="com.android.theme.icon_pack.circular.themepicker"
     android:versionCode="1"
     android:versionName="1.0">
-    <overlay android:targetPackage="com.android.wallpaper" android:category="android.theme.customization.icon_pack.themepicker" android:priority="1"/>
+    <overlay android:targetPackage="com.google.android.apps.wallpaper" android:category="android.theme.customization.icon_pack.themepicker" android:priority="1"/>
     <application android:label="Circular" android:hasCode="false"/>
 </manifest>
diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackFilledThemePickerOverlay/AndroidManifest.xml
index 35023ab..503a063 100644
--- a/packages/overlays/IconPackFilledThemePickerOverlay/AndroidManifest.xml
+++ b/packages/overlays/IconPackFilledThemePickerOverlay/AndroidManifest.xml
@@ -19,6 +19,6 @@
     package="com.android.theme.icon_pack.filled.themepicker"
     android:versionCode="1"
     android:versionName="1.0">
-    <overlay android:targetPackage="com.android.wallpaper" android:category="android.theme.customization.icon_pack.themepicker" android:priority="1"/>
+    <overlay android:targetPackage="com.google.android.apps.wallpaper" android:category="android.theme.customization.icon_pack.themepicker" android:priority="1"/>
     <application android:label="Filled" android:hasCode="false"/>
 </manifest>
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml
new file mode 100644
index 0000000..c158881
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,5.51c0.56-0.01,7.5-0.56,7.5,7.49c0,1.53-0.25,2.74-0.67,3.71l1.13,1.13C20.7,16.39,21,14.71,21,13 c0-4.59-2.12-8.99-9-8.99c-2,0-3.58,0.38-4.84,1.03l1.15,1.15C9.28,5.77,10.48,5.51,12,5.51z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.62 2.96 L 6.66 1.81 L 5.17 3.05 L 6.24 4.12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.41 1.31 H 19.91 V 7.31 H 18.41 V 1.31 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1.04,3.16l1.82,1.82L2.06,5.65l0.96,1.15l0.91-0.76l0.9,0.9C3.51,8.61,3,10.79,3,13c0,4.59,2.12,8.99,9,8.99 c2.7,0,4.66-0.7,6.06-1.81l2.78,2.78l1.06-1.06L2.1,2.1L1.04,3.16z M16.99,19.11c-2.05,1.56-4.67,1.39-4.99,1.39 C11.44,20.5,4.5,21.06,4.5,13c0-1.24,0.18-3.31,1.42-4.96L16.99,19.11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_battery_80_24dp.xml
new file mode 100644
index 0000000..c47f6a3
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_battery_80_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16,4h-1V2.5C15,2.22,14.78,2,14.5,2h-5C9.22,2,9,2.22,9,2.5V4H8C6.9,4,6,4.9,6,6v12c0,2.21,1.79,4,4,4h4 c2.21,0,4-1.79,4-4V6C18,4.9,17.1,4,16,4z M8,5.5h8c0.28,0,0.5,0.22,0.5,0.5v2h-9V6C7.5,5.72,7.72,5.5,8,5.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml
new file mode 100644
index 0000000..db1f834
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/accent_device_default_light" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.71,15.75L13.06,12l3.65-3.67c0.39-0.39,0.39-1.02,0.01-1.41L12.69,2.8c-0.2-0.21-0.45-0.3-0.69-0.3 c-0.51,0-0.99,0.4-0.99,1V9.9v0.03L6.53,5.45L5.47,6.51l5.41,5.41l-5.41,5.41l1.06,1.06L11,13.92v0.15v6.43c0,0.6,0.49,1,0.99,1 c0.24,0,0.49-0.09,0.69-0.29l4.03-4.05C17.09,16.77,17.1,16.14,16.71,15.75z M12.48,4.72l2.84,2.91l-2.84,2.85V4.72z M12.48,19.3 v-5.76l2.84,2.91L12.48,19.3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml
new file mode 100644
index 0000000..412096a
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C8.88,1.93,2.5,3.19,2.5,11.5v6.25c0,1.02,0.3,1.83,0.89,2.4C4.16,20.9,5.18,21,5.65,21C8.13,21,9,19.41,9,17.75v-2.5 c0-2.78-2.18-3.28-3.24-3.25C5.43,11.99,4.7,12.03,4,12.41V11.5C4,4.3,9.31,3.5,12,3.5c7.24,0,8,5.28,8,7.99v0.91 c-0.69-0.38-1.42-0.41-1.75-0.41C17.2,11.96,15,12.47,15,15.25v2.5c0,3.33,3.08,3.25,3.25,3.25c1.05,0.04,3.25-0.47,3.25-3.25V11.5 C21.5,3.16,15.13,1.93,12,2z M5.79,13.5c1.44-0.01,1.71,0.92,1.71,1.75v2.5c0,1.65-1.17,1.76-1.79,1.75C4.29,19.54,4,18.57,4,17.75 v-2.5C4,14.63,4.13,13.46,5.79,13.5z M20,17.75c0,1.17-0.55,1.76-1.79,1.75c-0.2,0.01-1.71,0.09-1.71-1.75v-2.5 c0-1.62,1.1-1.75,1.72-1.75c0.1,0,1.78-0.2,1.78,1.75V17.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml
new file mode 100644
index 0000000..08db7e1
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.5,10.5c0-8.34-6.37-9.57-9.5-9.49C8.88,0.93,2.5,2.19,2.5,10.5v6.25c0,1.02,0.3,1.83,0.89,2.4 C4.16,19.9,5.18,20,5.65,20C8.13,20,9,18.41,9,16.75v-2.5c0-2.78-2.19-3.28-3.24-3.25C5.43,10.99,4.7,11.03,4,11.41V10.5 C4,3.3,9.31,2.5,12,2.5c7.24,0,8,5.28,8,7.99v0.91c-0.69-0.38-1.42-0.41-1.75-0.41C17.2,10.96,15,11.47,15,14.25v2.5 c0,3.33,3.08,3.25,3.25,3.25c0.46,0.02,1.13-0.08,1.75-0.42v1.17c0,0.41-0.34,0.75-0.75,0.75H13V23h6.25 c1.24,0,2.25-1.01,2.25-2.25V10.5z M5.79,12.5c1.44-0.01,1.71,0.92,1.71,1.75v2.5c0,1.65-1.17,1.76-1.79,1.75 C4.29,18.54,4,17.57,4,16.75v-2.5C4,13.63,4.13,12.46,5.79,12.5z M18.21,18.5c-0.2,0.01-1.71,0.09-1.71-1.75v-2.5 c0-1.62,1.1-1.75,1.72-1.75c0.1,0,1.78-0.2,1.78,1.75v2.5C20,17.92,19.45,18.51,18.21,18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml
new file mode 100644
index 0000000..e1ef214
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,20.5c-0.55,0.01-2.5,0.12-2.5-2.52c0.01-1.77-1.07-3.27-2.69-3.75C9.58,13.57,8.5,11.86,8.5,9 c0-2.3,0.7-3.84,2.15-4.71C12.11,3.41,13.83,3.5,14,3.5c5.75-0.09,5.5,4.91,5.5,5.5H21c0-3.57-1.65-7-7-7C8.67,2,7,5.46,7,9 c0,4.45,2.4,6.08,4.39,6.67c1,0.3,1.62,1.26,1.61,2.31c0,0.01,0,0.02,0,0.02c0,2.04,0.94,4,4,4c3.05,0,4-1.97,4-4h-1.5 C19.5,20.61,17.55,20.51,17,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14,6.5c-2.45,0-2.5,2.02-2.5,2.5c0,1.6,0.89,2.5,2.5,2.5c2.45,0,2.5-2.02,2.5-2.5C16.5,7.4,15.61,6.5,14,6.5z M15,9 c0,0.72-0.2,1-1,1c-0.8,0.01-1-0.25-1-1c0-0.82,0.28-1,1-1C14.8,7.99,15,8.25,15,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.24,2.24L6.17,1.17C4.8,2.76,3.05,5.45,3,8.86c-0.04,2.74,1.04,5.4,3.2,7.94l1.07-1.07C5.4,13.51,4.47,11.21,4.5,8.88 C4.54,6,6.06,3.65,7.24,2.24z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_laptop.xml
new file mode 100644
index 0000000..70b271d
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_laptop.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M4.25,18h15.5c1.24,0,2.25-1.01,2.25-2.25v-9.5C22,5.01,20.99,4,19.75,4H4.25C3.01,4,2,5.01,2,6.25v9.5 C2,16.99,3.01,18,4.25,18z M3.5,6.25c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75v9.5c0,0.41-0.34,0.75-0.75,0.75 H4.25c-0.41,0-0.75-0.34-0.75-0.75V6.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1 19 H 22.99 V 20.5 H 1 V 19 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_misc_hid.xml
new file mode 100644
index 0000000..4d3edfe
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_misc_hid.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11.53,9.78C11.67,9.92,11.86,10,12.06,10s0.39-0.08,0.53-0.22l2.19-2.19C14.92,7.45,15,7.26,15,7.06V5 c0-2.56-2.01-3.01-2.99-3C11.04,1.96,9,2.45,9,5v1.94c0,0.2,0.08,0.39,0.22,0.53L11.53,9.78z M10.5,5c0-0.53,0.11-1.55,1.54-1.5 C13.63,3.44,13.5,4.97,13.5,5v1.75l-1.44,1.44L10.5,6.63V5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.59,14.22C12.45,14.08,12.26,14,12.06,14s-0.39,0.08-0.53,0.22l-2.31,2.31C9.08,16.67,9,16.86,9,17.06V19 c0,2.55,2.04,3.04,3.01,3c0.98,0.01,2.99-0.43,2.99-3v-2.06c0-0.2-0.08-0.39-0.22-0.53L12.59,14.22z M12.04,20.5 c-1.43,0.05-1.54-0.97-1.54-1.5v-1.63l1.56-1.56l1.44,1.44V19C13.5,19.03,13.63,20.56,12.04,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,9h-1.94c-0.2,0-0.39,0.08-0.53,0.22l-2.31,2.31C14.08,11.67,14,11.86,14,12.06s0.08,0.39,0.22,0.53l2.19,2.19 c0.14,0.14,0.33,0.22,0.53,0.22H19c2.56,0,3.01-2.01,3-2.99C22.04,11.04,21.55,9,19,9z M19,13.5h-1.75l-1.44-1.44l1.56-1.56H19 c0.53,0,1.55,0.11,1.5,1.54C20.56,13.63,19.03,13.5,19,13.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M10,12.06c0-0.2-0.08-0.39-0.22-0.53L7.47,9.22C7.33,9.08,7.14,9,6.94,9H5c-2.55,0-3.04,2.04-3,3.01 C1.99,12.99,2.44,15,5,15h2.06c0.2,0,0.39-0.08,0.53-0.22l2.19-2.19C9.92,12.45,10,12.26,10,12.06z M6.75,13.5H5 c-0.04,0-1.56,0.13-1.5-1.46C3.45,10.61,4.47,10.5,5,10.5h1.63l1.56,1.56L6.75,13.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_network_pan.xml
new file mode 100644
index 0000000..fc0cd0b
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_network_pan.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.41,6.59l-1.09,1.09c0.75,1.27,1.19,2.74,1.19,4.31s-0.44,3.05-1.19,4.31l1.09,1.09C20.41,15.85,21,13.99,21,12 S20.41,8.15,19.41,6.59z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.2,9.8l-2.02,2.02c-0.1,0.1-0.1,0.26,0,0.35l2.02,2.02c0.13,0.13,0.35,0.09,0.42-0.08C16.86,13.46,17,12.74,17,12 c0-0.74-0.14-1.46-0.39-2.11C16.55,9.72,16.32,9.68,16.2,9.8z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.06,12l3.65-3.67c0.39-0.39,0.39-1.02,0.01-1.41L10.69,2.8c-0.2-0.21-0.45-0.3-0.69-0.3C9.49,2.5,9,2.9,9,3.5V9.9v0.03 L4.53,5.45L3.47,6.51l5.41,5.41l-5.41,5.41l1.06,1.06L9,13.92v0.15v6.43c0,0.6,0.49,1,0.99,1c0.24,0,0.49-0.09,0.69-0.29 l4.03-4.05c0.39-0.39,0.39-1.02,0.01-1.41L11.06,12z M10.48,4.72l2.84,2.91l-2.84,2.85V4.72z M10.48,19.3v-5.76l2.84,2.91 L10.48,19.3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml
new file mode 100644
index 0000000..52113c7
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.67,2,5,5.46,5,9v6c0,3.57,1.65,7,7,7c5.33,0,7-3.45,7-7V9C19,5.43,17.35,2,12,2z M6.5,9 c0-4.41,2.78-5.36,4.75-5.48v6.98H6.5V9z M17.5,15c0,4.79-3.28,5.5-5.23,5.5c-0.09,0-0.15,0-0.19,0l-0.08,0l-0.07,0l-0.02,0 c-0.04,0-0.11,0-0.19,0c-1.95,0-5.22-0.71-5.22-5.5v-3h11V15z M17.5,10.5h-4.75V3.52C14.71,3.63,17.5,4.58,17.5,9V10.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_corp_badge.xml
new file mode 100644
index 0000000..4e6792b
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_corp_badge.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/accent_device_default_light" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,6H16c0,0,0,0,0,0c0-2.05-0.95-4-4-4C8.96,2,8,3.97,8,6c0,0,0,0,0,0H4.25C3.01,6,2,7.01,2,8.25v10.5 C2,19.99,3.01,21,4.25,21h15.5c1.24,0,2.25-1.01,2.25-2.25V8.25C22,7.01,20.99,6,19.75,6z M12,3.5c0.54-0.01,2.5-0.11,2.5,2.5 c0,0,0,0,0,0h-5c0,0,0,0,0,0C9.5,3.39,11.45,3.48,12,3.5z M20.5,18.75c0,0.41-0.34,0.75-0.75,0.75H4.25 c-0.41,0-0.75-0.34-0.75-0.75V8.25c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,12c-0.05,0-1.5-0.09-1.5,1.5c0,1.59,1.43,1.5,1.5,1.5c0.05,0,1.5,0.09,1.5-1.5C13.5,11.91,12.07,12,12,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_expand_more.xml
new file mode 100644
index 0000000..e428f0c
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_expand_more.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.94,8L12,14.94L5.06,8L4,9.06l7.47,7.47c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22L20,9.06L18.94,8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_faster_emergency.xml
new file mode 100644
index 0000000..6297ff8
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_faster_emergency.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorError" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.75,3H5.25C4.01,3,3,4.01,3,5.25v13.5C3,19.99,4.01,21,5.25,21h13.5c1.24,0,2.25-1.01,2.25-2.25V5.25 C21,4.01,19.99,3,18.75,3z M19.5,18.75c0,0.41-0.34,0.75-0.75,0.75H5.25c-0.41,0-0.75-0.34-0.75-0.75V5.25 c0-0.41,0.34-0.75,0.75-0.75h13.5c0.41,0,0.75,0.34,0.75,0.75V18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12.75 7 L 11.25 7 L 11.25 11.25 L 7 11.25 L 7 12.75 L 11.25 12.75 L 11.25 17 L 12.75 17 L 12.75 12.75 L 17 12.75 L 17 11.25 L 12.75 11.25 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_file_copy.xml
new file mode 100644
index 0000000..e291f54
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_file_copy.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/material_grey_600" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.75,1H8.25C7.01,1,6,2.01,6,3.25v13.5C6,17.99,7.01,19,8.25,19h10.5c1.24,0,2.25-1.01,2.25-2.25V3.25 C21,2.01,19.99,1,18.75,1z M19.5,16.75c0,0.41-0.34,0.75-0.75,0.75H8.25c-0.41,0-0.75-0.34-0.75-0.75V3.25 c0-0.41,0.34-0.75,0.75-0.75h10.5c0.41,0,0.75,0.34,0.75,0.75V16.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.5,20.75V7H2v13.75C2,21.99,3.01,23,4.25,23H18v-1.5H4.25C3.84,21.5,3.5,21.16,3.5,20.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock.xml
new file mode 100644
index 0000000..c865ac3
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="32dp" android:viewportHeight="24" android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.01,12.25c-0.89-0.02-2.76,0.4-2.76,2.75c0,2.42,1.94,2.75,2.75,2.75c0.13,0,2.75,0.06,2.75-2.75 C14.75,12.66,12.9,12.23,12.01,12.25z M12,16.25c-0.81,0.01-1.25-0.34-1.25-1.25c0-0.85,0.37-1.27,1.28-1.25 c1.32-0.06,1.22,1.22,1.22,1.25C13.25,15.89,12.83,16.26,12,16.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.75,8H16.5V5.5c0-3.88-3.03-4.55-4.5-4.5c-1.46-0.04-4.5,0.6-4.5,4.5V8H6.25C5.01,8,4,9.01,4,10.25v9.5 C4,20.99,5.01,22,6.25,22h11.5c1.24,0,2.25-1.01,2.25-2.25v-9.5C20,9.01,18.99,8,17.75,8z M9,5.5c0-2.77,2-3.01,3.05-3 C13.07,2.48,15,2.79,15,5.5V8H9V5.5z M18.5,19.75c0,0.41-0.34,0.75-0.75,0.75H6.25c-0.41,0-0.75-0.34-0.75-0.75v-9.5 c0-0.41,0.34-0.75,0.75-0.75h11.5c0.41,0,0.75,0.34,0.75,0.75V19.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_bugreport.xml
new file mode 100644
index 0000000..58b1879
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_bugreport.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 10 10.25 H 14 V 11.75 H 10 V 10.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 14.25 H 14 V 15.75 H 10 V 14.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,8.25h-2.47c-0.5-1.27-1.33-2.04-2.21-2.51l1.5-1.5l-1.06-1.06l-1.99,1.99C12.8,4.96,12.02,5,12,5 c-0.02,0-0.79-0.05-1.77,0.17l-2-2L7.17,4.24l1.51,1.51C7.81,6.22,6.97,6.99,6.47,8.25H4v1.5h2.09C5.98,10.54,6,10.82,6,12.25H4 v1.5h2c0,1.42-0.02,1.71,0.09,2.5H4v1.5h2.47C6.77,18.52,7.87,21,12,21c4.1,0,5.23-2.48,5.53-3.25H20v-1.5h-2.09 c0.11-0.79,0.09-1.07,0.09-2.5h2v-1.5h-2c0-1.42,0.02-1.71-0.09-2.5H20V8.25z M16.5,15c0,2.93-1.44,4.55-4.5,4.5 c-3.06,0.05-4.5-1.55-4.5-4.5v-4c0-2.92,1.52-4.55,4.5-4.5c3.06-0.05,4.5,1.55,4.5,4.5V15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_open.xml
new file mode 100644
index 0000000..3d13b79
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_open.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="32dp" android:viewportHeight="24" android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,1C17.03,0.96,14,1.62,14,5.5v2.49H6.25C5.01,7.99,4,9,4,10.24v9.51C4,20.99,5.01,22,6.25,22h11.5 c1.24,0,2.25-1.01,2.25-2.25v-9.51c0-1.24-1.01-2.25-2.25-2.25H15.5V5.5c0-2.77,2-3.01,3.05-3c1.02-0.02,2.96,0.28,2.96,3V6H23 V5.5C23,1.6,19.97,0.96,18.5,1z M17.75,9.49c0.41,0,0.75,0.34,0.75,0.75v9.51c0,0.41-0.34,0.75-0.75,0.75H6.25 c-0.41,0-0.75-0.34-0.75-0.75v-9.51c0-0.41,0.34-0.75,0.75-0.75H17.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,17.74c0.13,0,2.75,0.06,2.75-2.75c0-2.34-1.85-2.77-2.74-2.75c-0.89-0.02-2.76,0.4-2.76,2.75 C9.25,17.41,11.19,17.74,12,17.74z M12.03,13.74c1.32-0.06,1.22,1.22,1.22,1.25c0,0.89-0.42,1.26-1.25,1.25 c-0.81,0.01-1.25-0.34-1.25-1.25C10.75,14.15,11.12,13.73,12.03,13.74z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_power_off.xml
new file mode 100644
index 0000000..5b89fc4
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_power_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 2 H 12.75 V 12 H 11.25 V 2 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.66,5.34L17.6,6.4c1.11,1.12,1.9,2.87,1.9,5.6c0,8.03-6.97,7.49-7.5,7.49C11.44,19.5,4.5,20.06,4.5,12 c0-1.37,0.27-3.85,1.92-5.58L5.35,5.35C4.01,6.68,3,8.75,3,12c0,4.59,2.12,8.99,9,8.99c6.86,0,9-4.44,9-8.99 C21,8.74,20,6.67,18.66,5.34z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lockscreen_ime.xml
new file mode 100644
index 0000000..8f27fb5
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lockscreen_ime.xml
@@ -0,0 +1,27 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,4H3.25C2.01,4,1,5.01,1,6.25v12.5C1,19.99,2.01,21,3.25,21h17.5c1.24,0,2.25-1.01,2.25-2.25V6.25 C23,5.01,21.99,4,20.75,4z M21.5,18.75c0,0.41-0.34,0.75-0.75,0.75H3.25c-0.41,0-0.75-0.34-0.75-0.75V6.25 c0-0.41,0.34-0.75,0.75-0.75h17.5c0.41,0,0.75,0.34,0.75,0.75V18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 8 C 6.55228474983 8 7 8.44771525017 7 9 C 7 9.55228474983 6.55228474983 10 6 10 C 5.44771525017 10 5 9.55228474983 5 9 C 5 8.44771525017 5.44771525017 8 6 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 12 C 6.55228474983 12 7 12.4477152502 7 13 C 7 13.5522847498 6.55228474983 14 6 14 C 5.44771525017 14 5 13.5522847498 5 13 C 5 12.4477152502 5.44771525017 12 6 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 8 C 10.5522847498 8 11 8.44771525017 11 9 C 11 9.55228474983 10.5522847498 10 10 10 C 9.44771525017 10 9 9.55228474983 9 9 C 9 8.44771525017 9.44771525017 8 10 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 12 C 10.5522847498 12 11 12.4477152502 11 13 C 11 13.5522847498 10.5522847498 14 10 14 C 9.44771525017 14 9 13.5522847498 9 13 C 9 12.4477152502 9.44771525017 12 10 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 14 8 C 14.5522847498 8 15 8.44771525017 15 9 C 15 9.55228474983 14.5522847498 10 14 10 C 13.4477152502 10 13 9.55228474983 13 9 C 13 8.44771525017 13.4477152502 8 14 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 14 12 C 14.5522847498 12 15 12.4477152502 15 13 C 15 13.5522847498 14.5522847498 14 14 14 C 13.4477152502 14 13 13.5522847498 13 13 C 13 12.4477152502 13.4477152502 12 14 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 8 C 18.5522847498 8 19 8.44771525017 19 9 C 19 9.55228474983 18.5522847498 10 18 10 C 17.4477152502 10 17 9.55228474983 17 9 C 17 8.44771525017 17.4477152502 8 18 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 12 C 18.5522847498 12 19 12.4477152502 19 13 C 19 13.5522847498 18.5522847498 14 18 14 C 17.4477152502 14 17 13.5522847498 17 13 C 17 12.4477152502 17.4477152502 12 18 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 8 16 H 16 V 17.5 H 8 V 16 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_mode_edit.xml
new file mode 100644
index 0000000..e9c1b8e
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_mode_edit.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.35,4.55l-0.9-0.9c-0.87-0.87-2.29-0.87-3.17-0.01L3.22,16.46C3.08,16.61,3,16.8,3,17v3c0,0.55,0.45,1,1,1h3 c0.2,0,0.39-0.08,0.54-0.22L20.36,7.72C21.22,6.85,21.21,5.42,20.35,4.55z M6.69,19.5H4.5v-2.19L14.87,7.13l2,2L6.69,19.5z M19.29,6.67l-1.37,1.4l-1.98-1.98l1.4-1.37c0.29-0.29,0.77-0.29,1.06,0l0.9,0.9C19.58,5.9,19.58,6.38,19.29,6.67z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_notifications_alerted.xml
new file mode 100644
index 0000000..c92bdf6
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_notifications_alerted.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6.81,3.81L5.75,2.75C3.45,4.76,2,7.71,2,11h1.5C3.5,8.13,4.79,5.55,6.81,3.81z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.25,2.75l-1.06,1.06C19.21,5.55,20.5,8.13,20.5,11H22C22,7.71,20.55,4.76,18.25,2.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18,10.5c0-4.38-2.72-5.57-4.5-5.89V4c0-1.59-1.43-1.5-1.5-1.5c-0.05,0-1.5-0.09-1.5,1.5v0.62C8.72,4.94,6,6.14,6,10.5v7 H4V19h16v-1.5h-2V10.5z M16.5,17.5h-9v-7C7.5,7.57,8.94,5.95,12,6c3.07-0.05,4.5,1.55,4.5,4.5V17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c0.07,0,2,0.12,2-2h-4C10,22.12,11.91,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_phone.xml
new file mode 100644
index 0000000..639df5d
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_phone.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.52,14.51l-1.88-0.29c-0.55-0.08-1.11,0.1-1.51,0.49l-2.85,2.85c-2.92-1.56-5.32-3.97-6.87-6.9l2.77-2.77 c0.39-0.39,0.58-0.95,0.49-1.51L9.38,4.48C9.25,3.62,8.52,3,7.65,3H4.86c0,0,0,0,0,0C3.95,3,3,3.78,3.12,4.9 C4,13.29,10.72,20.01,19.1,20.89c0.06,0.01,0.11,0.01,0.17,0.01c1.16,0,1.73-1.02,1.73-1.75v-2.9C21,15.37,20.38,14.64,19.52,14.51 z M4.61,4.75C4.59,4.62,4.72,4.5,4.86,4.5h0h2.79c0.12,0,0.23,0.09,0.25,0.21L8.19,6.6C8.2,6.69,8.18,6.77,8.12,6.82L5.73,9.21 C5.16,7.81,4.77,6.31,4.61,4.75z M19.5,19.14c0,0.14-0.11,0.27-0.25,0.25c-1.59-0.17-3.11-0.56-4.54-1.15l2.47-2.47 c0.06-0.06,0.14-0.08,0.21-0.07l1.88,0.29c0.12,0.02,0.21,0.12,0.21,0.25V19.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_airplane.xml
new file mode 100644
index 0000000..81e3f31
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_airplane.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3.5c0.55,0,1,0.45,1,1V9c0,0.61,0.37,1.16,0.94,1.39l5.61,2.24c0.73,0.29,0.94,0.87,0.94,1.65l-5.8-0.77 C13.82,13.39,13,14.07,13,15v2.5c0,0.53,0.28,1.01,0.73,1.29c0.99,0.59,1.54,0.79,1.73,1.55C11.87,19.98,12.11,20,12,20 c-0.11,0,0.12-0.02-3.46,0.34c0.18-0.73,0.63-0.89,1.73-1.55C10.72,18.51,11,18.03,11,17.5V15c0-0.93-0.83-1.61-1.7-1.49 l-5.8,0.77c0-0.78,0.22-1.36,0.94-1.65l5.61-2.24C10.63,10.16,11,9.61,11,9V4.5C11,3.95,11.45,3.5,12,3.5 M12,2 c-1.38,0-2.5,1.12-2.5,2.5V9l-5.61,2.25C2.75,11.7,2,12.8,2,14.03v0.83c0,0.25,0.23,1.11,1.13,0.99L9.5,15v2.5l-1.04,0.63 C7.55,18.67,7,19.65,7,20.7v0.2c0,0.56,0.45,1,1,1c0.03,0,0.07,0,0.1-0.01L12,21.5l3.9,0.39c0.03,0,0.07,0.01,0.1,0.01 c0.55,0,1-0.44,1-1v-0.2c0-1.05-0.55-2.03-1.46-2.57L14.5,17.5V15l6.37,0.85c0.91,0.12,1.13-0.76,1.13-0.99v-0.83 c0-1.23-0.75-2.33-1.89-2.78L14.5,9V4.5C14.5,3.12,13.38,2,12,2"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml
new file mode 100644
index 0000000..286ecc6
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M7.37,9.48h-2.4l4.91-4.91c0.29-0.29,0.77-0.29,1.06,0l7.07,7.07l1.06-1.06L12,3.51c-0.88-0.88-2.31-0.88-3.18,0 L3.91,8.42v-2.4h-1.5v4.21c0,0.41,0.34,0.75,0.75,0.75h4.21V9.48z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.84,13.02h-4.21v1.5h2.4l-4.91,4.91c-0.29,0.29-0.77,0.29-1.06,0l-7.07-7.07l-1.06,1.06L12,20.49 c0.88,0.88,2.3,0.88,3.18,0l4.91-4.91v2.4h1.5v-4.21C21.59,13.35,21.25,13.02,20.84,13.02z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_battery_saver.xml
new file mode 100644
index 0000000..019a159
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_battery_saver.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12.75 10 L 11.25 10 L 11.25 12.25 L 9 12.25 L 9 13.75 L 11.25 13.75 L 11.25 16 L 12.75 16 L 12.75 13.75 L 15 13.75 L 15 12.25 L 12.75 12.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16,4h-1V2.5C15,2.22,14.78,2,14.5,2h-5C9.22,2,9,2.22,9,2.5V4H8C6.9,4,6,4.9,6,6v12c0,2.21,1.79,4,4,4h4 c2.21,0,4-1.79,4-4V6C18,4.9,17.1,4,16,4z M16.5,18c0,1.38-1.12,2.5-2.5,2.5h-4c-1.38,0-2.5-1.12-2.5-2.5V6 c0-0.28,0.22-0.5,0.5-0.5h8c0.28,0,0.5,0.22,0.5,0.5V18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_bluetooth.xml
new file mode 100644
index 0000000..125eb9e
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_bluetooth.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.71,15.75L13.06,12l3.65-3.67c0.39-0.39,0.39-1.02,0.01-1.41L12.69,2.8c-0.2-0.21-0.45-0.3-0.69-0.3 c-0.51,0-0.99,0.4-0.99,1V9.9v0.03L6.53,5.45L5.47,6.51l5.41,5.41l-5.41,5.41l1.06,1.06L11,13.92v0.15v6.43c0,0.6,0.49,1,0.99,1 c0.24,0,0.49-0.09,0.69-0.29l4.03-4.05C17.09,16.77,17.1,16.14,16.71,15.75z M12.48,4.72l2.84,2.91l-2.84,2.85V4.72z M12.48,19.3 v-5.76l2.84,2.91L12.48,19.3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_dnd.xml
new file mode 100644
index 0000000..f327772
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_dnd.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.08,2.34,10,10,10c7.62,0,10-4.94,10-10C22,6.92,19.66,2,12,2z M12,20.5 c-2.62,0.05-8.5-0.57-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.62-0.05,8.5,0.57,8.5,8.5C20.5,19.9,14.64,20.55,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7 11.25 H 17 V 12.75 H 7 V 11.25 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_flashlight.xml
new file mode 100644
index 0000000..3228b7a
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_flashlight.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12 13 C 12.5522847498 13 13 13.4477152502 13 14 C 13 14.5522847498 12.5522847498 15 12 15 C 11.4477152502 15 11 14.5522847498 11 14 C 11 13.4477152502 11.4477152502 13 12 13 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.81,1.83c-0.08-0.34-0.38-0.58-0.73-0.58H6.92c-0.35,0-0.65,0.24-0.73,0.58C6.06,2.39,6,2.94,6,3.52 c0,2.48,1.06,4.29,3,5.16v11.07C9,20.99,10.01,22,11.25,22h1.5c1.24,0,2.25-1.01,2.25-2.25V8.67c1.94-0.88,3-2.69,3-5.15 C18,2.94,17.94,2.38,17.81,1.83z M7.55,2.75h8.9c0.09,0.67,0.03,1.28,0.01,1.5H7.54C7.49,3.8,7.48,3.27,7.55,2.75z M14,7.45 c-0.3,0.1-0.5,0.39-0.5,0.71v11.59c0,0.41-0.34,0.75-0.75,0.75h-1.5c-0.41,0-0.75-0.34-0.75-0.75V8.17c0-0.32-0.2-0.61-0.51-0.71 c-0.94-0.32-1.61-0.9-2.02-1.71h8.05C15.61,6.55,14.94,7.13,14,7.45z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_night_display_on.xml
new file mode 100644
index 0000000..3607724
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_night_display_on.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.29,22C6.62,22,2,17.38,2,11.71c0-4.3,2.71-8.19,6.76-9.67c0.61-0.22,1.19,0.38,0.96,0.98 c-1.04,2.64-0.97,7.28,1.42,9.75c3.01,3.11,8.41,2.07,9.85,1.51c0.59-0.23,1.2,0.35,0.98,0.96C20.48,19.28,16.59,22,12.29,22z M7.82,4.14C5.19,5.7,3.5,8.58,3.5,11.71c0,4.85,3.94,8.79,8.79,8.79c3.14,0,6.02-1.69,7.58-4.33c-1.72,0.35-6.72,0.83-9.81-2.35 C7.25,10.93,7.35,6.45,7.82,4.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml
new file mode 100644
index 0000000..518c7a7
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.32,4.56C15.84,2.15,12.44,1.96,11,2.01C9.64,1.96,6.2,2.13,3.69,4.56C1.91,6.3,1,8.8,1,12c0,3.2,0.9,5.71,2.68,7.44 c2.48,2.41,5.91,2.59,7.32,2.55c4.56,0.16,6.98-2.24,7.3-2.56C20.09,17.7,21,15.2,21,12C21,8.8,20.1,6.29,18.32,4.56z M17.26,18.36 c-1.62,1.58-4,2.18-6.26,2.14V3.5c2.35,0,4.58,0.48,6.27,2.13C18.75,7.07,19.5,9.22,19.5,12C19.5,14.78,18.75,16.91,17.26,18.36z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_restart.xml
new file mode 100644
index 0000000..3562b2e
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_restart.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,5c-0.34,0-0.68,0.03-1.01,0.07l1.54-1.54l-1.06-1.06l-3,3C8.33,5.61,8.25,5.8,8.25,6s0.08,0.39,0.22,0.53l3,3 l1.06-1.06l-1.84-1.84C11.12,6.54,11.56,6.5,12,6.5c3.58,0,6.5,2.92,6.5,6.5c0,3.23-2.41,6-5.6,6.44l0.21,1.49 C17.03,20.38,20,16.98,20,13C20,8.59,16.41,5,12,5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5.5,13c0-1.74,0.68-3.37,1.9-4.6L6.34,7.34C4.83,8.85,4,10.86,4,13c0,3.98,2.97,7.38,6.9,7.92l0.21-1.49 C7.91,19,5.5,16.23,5.5,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_settings_bluetooth.xml
new file mode 100644
index 0000000..125eb9e
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_settings_bluetooth.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.71,15.75L13.06,12l3.65-3.67c0.39-0.39,0.39-1.02,0.01-1.41L12.69,2.8c-0.2-0.21-0.45-0.3-0.69-0.3 c-0.51,0-0.99,0.4-0.99,1V9.9v0.03L6.53,5.45L5.47,6.51l5.41,5.41l-5.41,5.41l1.06,1.06L11,13.92v0.15v6.43c0,0.6,0.49,1,0.99,1 c0.24,0,0.49-0.09,0.69-0.29l4.03-4.05C17.09,16.77,17.1,16.14,16.71,15.75z M12.48,4.72l2.84,2.91l-2.84,2.85V4.72z M12.48,19.3 v-5.76l2.84,2.91L12.48,19.3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 0000000..5936e37
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 19.25 3 H 20.75 V 22 H 19.25 V 3 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 3.25 18 H 4.75 V 22 H 3.25 V 18 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 7.25 14 H 8.75 V 22 H 7.25 V 14 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 22 H 11.25 V 11 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 15.25 7 H 16.75 V 22 H 15.25 V 7 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 0000000..d3dc8b9
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 3.25 18 H 4.75 V 22 H 3.25 V 18 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.25 14 H 8.75 V 22 H 7.25 V 14 Z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 19.25 3 H 20.75 V 22 H 19.25 V 3 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 22 H 11.25 V 11 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 15.25 7 H 16.75 V 22 H 15.25 V 7 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 0000000..23eee44
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 19.25 3 H 20.75 V 22 H 19.25 V 3 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.25 18 H 4.75 V 22 H 3.25 V 18 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.25 14 H 8.75 V 22 H 7.25 V 14 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 22 H 11.25 V 11 Z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 15.25 7 H 16.75 V 22 H 15.25 V 7 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 0000000..0d847d3
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M 19.25 3 H 20.75 V 22 H 19.25 V 3 Z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.25 18 H 4.75 V 22 H 3.25 V 18 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.25 14 H 8.75 V 22 H 7.25 V 14 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 22 H 11.25 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.25 7 H 16.75 V 22 H 15.25 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 0000000..d022d9c
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 19.25 3 H 20.75 V 22 H 19.25 V 3 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.25 18 H 4.75 V 22 H 3.25 V 18 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.25 14 H 8.75 V 22 H 7.25 V 14 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 22 H 11.25 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.25 7 H 16.75 V 22 H 15.25 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_location.xml
new file mode 100644
index 0000000..2d1de94
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_location.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,6c-1.88,0-3,1.04-3,3c0,1.91,1.06,3,3,3c1.89,0,3-1.05,3-3C15,7.08,13.93,6,12,6z M12,10.5 c-1.15,0.01-1.5-0.47-1.5-1.5c0-1.06,0.37-1.5,1.5-1.5c1.15-0.01,1.5,0.47,1.5,1.5C13.5,10.09,13.1,10.5,12,10.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.99,2C9.69,1.94,5,2.93,5,9c0,6.88,6.23,12.56,6.5,12.8c0.14,0.13,0.32,0.2,0.5,0.2s0.36-0.06,0.5-0.2 C12.77,21.56,19,15.88,19,9C19,2.87,14.3,1.96,11.99,2z M12,20.2C10.55,18.7,6.5,14.12,6.5,9c0-4.91,3.63-5.55,5.44-5.5 C16.9,3.34,17.5,7.14,17.5,9C17.5,14.13,13.45,18.7,12,20.2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 0000000..c36d0f8
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M4.64,11.66l-0.99-1.12c7.6-6.71,14.23-2.24,16.72-0.01l-1,1.12C16.64,9.2,11.1,5.95,4.64,11.66z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M7.66,15.37l-0.99-1.12c4.98-4.4,9.43-1.12,10.67-0.01l-1,1.12C14.73,13.92,11.47,12.01,7.66,15.37z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M10.69,19.09L9.7,17.96c1.72-1.51,3.51-1,4.62,0l-1,1.12C12.73,18.55,11.79,18.12,10.69,19.09z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 0000000..855297b
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M4.64,11.66l-0.99-1.12c7.6-6.71,14.22-2.24,16.72-0.01l-1,1.12C16.64,9.2,11.1,5.95,4.64,11.66z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M7.66,15.37l-0.99-1.12c4.98-4.4,9.43-1.12,10.67-0.01l-1,1.12C14.73,13.92,11.47,12.01,7.66,15.37z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M10.69,19.09L9.7,17.96c1.72-1.51,3.51-1,4.62,0l-1,1.12C12.73,18.55,11.79,18.12,10.69,19.09z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 0000000..dde9cc2
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M4.64,11.66l-0.99-1.12c7.6-6.71,14.22-2.24,16.72-0.01l-1,1.12C16.64,9.2,11.1,5.95,4.64,11.66z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.66,15.37l-0.99-1.12c4.98-4.4,9.43-1.12,10.67-0.01l-1,1.12C14.73,13.92,11.47,12.01,7.66,15.37z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M10.69,19.09L9.7,17.96c1.72-1.51,3.51-1,4.62,0l-1,1.12C12.73,18.55,11.79,18.12,10.69,19.09z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 0000000..14792fc
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M4.64,11.66l-0.99-1.12c7.6-6.71,14.23-2.24,16.72-0.01l-1,1.12C16.64,9.2,11.1,5.95,4.64,11.66z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.66,15.37l-0.99-1.12c4.98-4.4,9.43-1.12,10.67-0.01l-1,1.12C14.73,13.92,11.47,12.01,7.66,15.37z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M10.69,19.09L9.7,17.96c1.72-1.51,3.51-1,4.62,0l-1,1.12C12.73,18.55,11.79,18.12,10.69,19.09z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 0000000..5f603ba
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M4.64,11.66l-0.99-1.12c7.6-6.71,14.22-2.24,16.72-0.01l-1,1.12C16.64,9.2,11.1,5.95,4.64,11.66z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.66,15.37l-0.99-1.12c4.98-4.4,9.43-1.12,10.67-0.01l-1,1.12C14.73,13.92,11.47,12.01,7.66,15.37z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M10.69,19.09L9.7,17.96c1.72-1.51,3.51-1,4.62,0l-1,1.12C12.73,18.55,11.79,18.12,10.69,19.09z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_activity_recognition.xml
new file mode 100644
index 0000000..feb7613
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_activity_recognition.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,13v-2c-1.9,0-3.5-1-4.3-2.4l-1-1.6c-0.56-0.89-1.68-1.25-2.66-0.84L6.91,7.91C6.36,8.15,6,8.69,6,9.29V13h2V9.6 l1.8-0.7L7,23h2.1l1.8-8l2.1,2v6h2v-6.86c0-0.41-0.17-0.8-0.47-1.09L12.9,13.5l0.6-3C14.8,12,16.8,13,19,13z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13.5 1.5 C 14.6045694997 1.5 15.5 2.39543050034 15.5 3.5 C 15.5 4.60456949966 14.6045694997 5.5 13.5 5.5 C 12.3954305003 5.5 11.5 4.60456949966 11.5 3.5 C 11.5 2.39543050034 12.3954305003 1.5 13.5 1.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_aural.xml
new file mode 100644
index 0000000..cb8a8b9
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_aural.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,2H8.25C7.01,2,6,3.01,6,4.25v11.5C6,16.99,7.01,18,8.25,18h11.5c1.24,0,2.25-1.01,2.25-2.25V4.25 C22,3.01,20.99,2,19.75,2z M20.5,15.75c0,0.41-0.34,0.75-0.75,0.75H8.25c-0.41,0-0.75-0.34-0.75-0.75V4.25 c0-0.41,0.34-0.75,0.75-0.75h11.5c0.41,0,0.75,0.34,0.75,0.75V15.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.5,19.75V6H2v13.75C2,20.99,3.01,22,4.25,22H18v-1.5H4.25C3.84,20.5,3.5,20.16,3.5,19.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17,5h-2.5c-1.06,0-1,0.96-1,1c0,0,0,0,0,0l0,0v4.15c-0.28-0.09-0.6-0.15-1-0.15c0,0,0,0,0,0c-2.65,0-2.5,2.39-2.5,2.5 c0,0.08-0.16,2.5,2.49,2.5c0,0,0,0,0,0c2.65,0,2.5-2.39,2.5-2.5c0-0.02,0-5.5,0-5.5h2c1.06,0,1-0.96,1-1C18,5.97,18.06,5,17,5z M12.5,13.5c-0.8,0-0.99-0.28-0.99-1c-0.01-0.74,0.21-1,1-1h0c0.78,0,0.99,0.26,0.99,1C13.51,13.23,13.29,13.5,12.5,13.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_calendar.xml
new file mode 100644
index 0000000..be579f0
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_calendar.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.75,4h-1V2h-1.5v2h-8.5V2h-1.5v2h-1C4.01,4,3,5.01,3,6.25v13.5C3,20.99,4.01,22,5.25,22h13.5 c1.24,0,2.25-1.01,2.25-2.25V6.25C21,5.01,19.99,4,18.75,4z M5.25,5.5h13.5c0.41,0,0.75,0.34,0.75,0.75V8.5h-15V6.25 C4.5,5.84,4.84,5.5,5.25,5.5z M18.75,20.5H5.25c-0.41,0-0.75-0.34-0.75-0.75V10h15v9.75C19.5,20.16,19.16,20.5,18.75,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.5,13c-2.45,0-2.5,2.02-2.5,2.5c0,1.6,0.89,2.5,2.5,2.5c2.45,0,2.5-2.02,2.5-2.5C17,13.9,16.11,13,14.5,13z M14.5,16.5 c-0.8,0.01-1-0.25-1-1c0-0.76,0.22-1,1-1c0.8-0.01,1,0.25,1,1C15.5,16.22,15.3,16.5,14.5,16.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_call_log.xml
new file mode 100644
index 0000000..24f7117
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_call_log.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.52,14.51l-1.88-0.29c-0.55-0.08-1.11,0.1-1.51,0.49l-2.85,2.85c-2.92-1.56-5.32-3.97-6.87-6.9l2.77-2.77 c0.39-0.39,0.58-0.95,0.49-1.51L9.38,4.48C9.25,3.62,8.52,3,7.65,3H4.86c0,0,0,0,0,0C3.95,3,3,3.78,3.12,4.9 C4,13.29,10.72,20.01,19.1,20.89c0.06,0.01,0.11,0.01,0.17,0.01c1.16,0,1.73-1.02,1.73-1.75v-2.9 C21,15.37,20.38,14.64,19.52,14.51z M4.61,4.75C4.59,4.62,4.72,4.5,4.86,4.5h0h2.79c0.12,0,0.23,0.09,0.25,0.21L8.19,6.6 C8.2,6.69,8.18,6.77,8.12,6.82L5.73,9.21C5.16,7.81,4.77,6.31,4.61,4.75z M19.5,19.14c0,0.14-0.11,0.27-0.25,0.25 c-1.59-0.17-3.11-0.56-4.54-1.15l2.47-2.47c0.06-0.06,0.14-0.08,0.21-0.07l1.88,0.29c0.12,0.02,0.21,0.12,0.21,0.25V19.14z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 2 H 22 V 3.5 H 12 V 2 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 10.5 H 22 V 12 H 12 V 10.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 6.25 H 22 V 7.75 H 12 V 6.25 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_camera.xml
new file mode 100644
index 0000000..fba80e3
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_camera.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,9c-3.05,0-4,1.97-4,4c0,2.04,0.94,4,4,4c3.05,0,4-1.97,4-4C16,10.96,15.06,9,12,9z M12,15.5 c-0.53,0.01-2.5,0.12-2.5-2.5c0-2.61,1.95-2.51,2.5-2.5c0.53-0.01,2.5-0.13,2.5,2.5C14.5,15.61,12.55,15.51,12,15.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,5H17l-1.71-1.71C15.11,3.11,14.85,3,14.59,3H9.41C9.15,3,8.89,3.11,8.71,3.29L7,5H4.25C3.01,5,2,6.01,2,7.25v11.5 C2,19.99,3.01,21,4.25,21h15.5c1.24,0,2.25-1.01,2.25-2.25V7.25C22,6.01,20.99,5,19.75,5z M20.5,18.75c0,0.41-0.34,0.75-0.75,0.75 H4.25c-0.41,0-0.75-0.34-0.75-0.75V7.25c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V18.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_contacts.xml
new file mode 100644
index 0000000..806949f
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_contacts.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 4 1.5 H 20 V 3 H 4 V 1.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 21 H 20 V 22.5 H 4 V 21 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,5H4.25C3.01,5,2,6.01,2,7.25v9.5C2,17.99,3.01,19,4.25,19h15.5c1.24,0,2.25-1.01,2.25-2.25v-9.5 C22,6.01,20.99,5,19.75,5z M16.48,17.5H7.52c0-0.47-0.06-0.72,0.25-1.02c0.73-0.72,2.72-0.95,4.27-0.94 c1.94-0.02,3.59,0.34,4.18,0.93C16.54,16.78,16.48,17.02,16.48,17.5z M20.5,16.75c0,0.41-0.34,0.75-0.75,0.75h-1.77 c0-0.73,0.03-1.37-0.7-2.1c-1.24-1.23-3.83-1.39-5.3-1.37c-1.15-0.02-3.96,0.09-5.26,1.37c-0.72,0.71-0.7,1.4-0.7,2.09H4.25 c-0.41,0-0.75-0.34-0.75-0.75v-9.5c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V16.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,7.5c-2.93,0-3,2.42-3,3c0,2.85,2.31,3,2.88,3c0.07,0,0.11,0,0.12,0c0.01,0,0.05,0,0.12,0c0.56,0,2.88-0.15,2.88-3 C15,8.58,13.93,7.5,12,7.5z M12,12c-1.15,0.01-1.5-0.47-1.5-1.5c0-1.03,0.36-1.51,1.5-1.5c1.38-0.01,1.5,0.77,1.5,1.5 C13.5,11.56,13.13,12,12,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_location.xml
new file mode 100644
index 0000000..a6cfd8e
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_location.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,6c-1.88,0-3,1.04-3,3c0,1.91,1.06,3,3,3c1.89,0,3-1.05,3-3C15,7.08,13.93,6,12,6z M12,10.5 c-1.15,0.01-1.5-0.47-1.5-1.5c0-1.06,0.37-1.5,1.5-1.5c1.15-0.01,1.5,0.47,1.5,1.5C13.5,10.09,13.1,10.5,12,10.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.99,2C9.69,1.94,5,2.93,5,9c0,6.88,6.23,12.56,6.5,12.8c0.14,0.13,0.32,0.2,0.5,0.2s0.36-0.06,0.5-0.2 C12.77,21.56,19,15.88,19,9C19,2.87,14.3,1.96,11.99,2z M12,20.2C10.55,18.7,6.5,14.12,6.5,9c0-4.91,3.63-5.55,5.44-5.5 C16.9,3.34,17.5,7.14,17.5,9C17.5,14.13,13.45,18.7,12,20.2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_microphone.xml
new file mode 100644
index 0000000..c26ee83
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_microphone.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.5,11c0,0.58,0.23,5.6-5.5,5.5c-5.75,0.09-5.5-4.91-5.5-5.5H5c0,6.05,4.44,6.88,6.25,6.98V21h1.5v-3.02 C14.56,17.88,19,17.03,19,11H17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,14c1.88,0,3-1.04,3-3V5c0-1.92-1.07-3-3-3c-1.88,0-3,1.04-3,3v6C9,12.92,10.07,14,12,14z M10.5,5 c0-1.09,0.41-1.5,1.5-1.5s1.5,0.41,1.5,1.5v6c0,1.09-0.41,1.5-1.5,1.5s-1.5-0.41-1.5-1.5V5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_phone_calls.xml
new file mode 100644
index 0000000..8c3a583
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_phone_calls.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.52,14.51l-1.88-0.29c-0.55-0.08-1.11,0.1-1.51,0.49l-2.85,2.85c-2.92-1.56-5.32-3.97-6.87-6.9l2.77-2.77 c0.39-0.39,0.58-0.95,0.49-1.51L9.38,4.48C9.25,3.62,8.52,3,7.65,3H4.86c0,0,0,0,0,0C3.95,3,3,3.78,3.12,4.9 C4,13.29,10.72,20.01,19.1,20.89c0.06,0.01,0.11,0.01,0.17,0.01c1.16,0,1.73-1.02,1.73-1.75v-2.9C21,15.37,20.38,14.64,19.52,14.51 z M4.61,4.75C4.59,4.62,4.72,4.5,4.86,4.5h0h2.79c0.12,0,0.23,0.09,0.25,0.21L8.19,6.6C8.2,6.69,8.18,6.77,8.12,6.82L5.73,9.21 C5.16,7.81,4.77,6.31,4.61,4.75z M19.5,19.14c0,0.14-0.11,0.27-0.25,0.25c-1.59-0.17-3.11-0.56-4.54-1.15l2.47-2.47 c0.06-0.06,0.14-0.08,0.21-0.07l1.88,0.29c0.12,0.02,0.21,0.12,0.21,0.25V19.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sensors.xml
new file mode 100644
index 0000000..4f2c246
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sensors.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,21.25c-0.16,0-0.32-0.05-0.45-0.15C11.16,20.81,2,13.93,2,8.54C2,3.75,5.72,2.95,7.53,3c0.79-0.02,3.09,0.09,4.47,1.93 c1.12-1.45,2.92-1.96,4.45-1.93v0C18.27,2.94,22,3.72,22,8.54c0,5.39-9.16,12.27-9.55,12.56C12.31,21.2,12.16,21.25,12,21.25z M3.5,8.54c0,3.64,5.76,8.89,8.5,11.02c2.74-2.13,8.5-7.38,8.5-11.02c0-3.03-1.57-3.86-4.08-4.04c-0.69-0.02-2.94,0.09-3.71,2.25 c-0.11,0.3-0.39,0.5-0.71,0.5h0c-0.32,0-0.6-0.2-0.71-0.5C10.56,4.66,8.44,4.48,7.59,4.5C7.36,4.5,3.5,4.19,3.5,8.54z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sms.xml
new file mode 100644
index 0000000..373c6c2
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sms.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M8.04,9C8.02,9,8,9,8,9c0,0-0.02,0-0.04,0C7.78,9,7,9.05,7,10c0,0.95,0.77,1,0.96,1C7.98,11,8,11,8,11c0,0,0.02,0,0.04,0 C8.22,11,9,10.95,9,10C9,9.05,8.23,9,8.04,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.04,9C12.02,9,12,9,12,9c0,0-0.02,0-0.04,0C11.78,9,11,9.05,11,10c0,0.95,0.77,1,0.96,1c0.02,0,0.04,0,0.04,0 c0,0,0.02,0,0.04,0c0.19,0,0.96-0.05,0.96-1C13,9.05,12.23,9,12.04,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.04,9C16.02,9,16,9,16,9c0,0-0.02,0-0.04,0C15.78,9,15,9.05,15,10c0,0.95,0.77,1,0.96,1c0.02,0,0.04,0,0.04,0 c0,0,0.02,0,0.04,0c0.19,0,0.96-0.05,0.96-1C17,9.05,16.23,9,16.04,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14,2h-4C3.01,2,2.2,7.27,2.06,9L2,22l4.01-4.01l7.99,0c6.09,0,8-3.95,8-7.99C22,5.92,20.11,2,14,2z M14,16.49l-8.62,0 L3.5,18.38c0-9.71-0.02-8.34,0.05-9.26C3.75,6.64,5,3.5,10,3.5h4c5.53-0.1,6.5,3.73,6.5,6.5C20.5,12.75,19.5,16.49,14,16.49z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_storage.xml
new file mode 100644
index 0000000..f08b2a7
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_storage.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,6h-7.21l-1.61-1.43C10.51,4.2,9.98,4,9.43,4H4.25C3.01,4,2,5.01,2,6.25v11.5C2,18.99,3.01,20,4.25,20h15.5 c1.24,0,2.25-1.01,2.25-2.25v-9.5C22,7.01,20.99,6,19.75,6z M20.5,17.75c0,0.41-0.34,0.75-0.75,0.75H4.25 c-0.41,0-0.75-0.34-0.75-0.75V7.5h16.25c0.41,0,0.75,0.34,0.75,0.75V17.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_visual.xml
new file mode 100644
index 0000000..4403b5a
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_visual.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,2H8.25C7.01,2,6,3.01,6,4.25v11.5C6,16.99,7.01,18,8.25,18h11.5c1.24,0,2.25-1.01,2.25-2.25V4.25 C22,3.01,20.99,2,19.75,2z M20.5,15.75c0,0.41-0.34,0.75-0.75,0.75H8.25c-0.41,0-0.75-0.34-0.75-0.75V4.25 c0-0.41,0.34-0.75,0.75-0.75h11.5c0.41,0,0.75,0.34,0.75,0.75V15.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.5,19.75V6H2v13.75C2,20.99,3.01,22,4.25,22H18v-1.5H4.25C3.84,20.5,3.5,20.16,3.5,19.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.05,11.46c-0.2-0.24-0.57-0.24-0.77,0l-2.12,2.52l-1.28-1.67c-0.2-0.26-0.59-0.26-0.79,0l-1.47,1.88 C9.37,14.52,9.61,15,10.03,15h7.91c0.42,0,0.66-0.49,0.38-0.82L16.05,11.46z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/Android.mk b/packages/overlays/IconPackKaiLauncherOverlay/Android.mk
new file mode 100644
index 0000000..5209e53
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackKaiLauncher
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackKaiLauncherOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiLauncherOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..184a046
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.kai.launcher"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.google.android.apps.nexuslauncher" android:category="android.theme.customization.icon_pack.launcher" android:priority="1"/>
+    <application android:label="Kai" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_corp.xml
new file mode 100644
index 0000000..819114b
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_corp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorHint" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,6H16c0,0,0,0,0,0c0-2.05-0.95-4-4-4C8.96,2,8,3.97,8,6c0,0,0,0,0,0H4.25C3.01,6,2,7.01,2,8.25v10.5 C2,19.99,3.01,21,4.25,21h15.5c1.24,0,2.25-1.01,2.25-2.25V8.25C22,7.01,20.99,6,19.75,6z M12,3.5c0.54-0.01,2.5-0.11,2.5,2.5 c0,0,0,0,0,0h-5c0,0,0,0,0,0C9.5,3.39,11.45,3.48,12,3.5z M20.5,18.75c0,0.41-0.34,0.75-0.75,0.75H4.25 c-0.41,0-0.75-0.34-0.75-0.75V8.25c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,12c-0.05,0-1.5-0.09-1.5,1.5c0,1.59,1.43,1.5,1.5,1.5c0.05,0,1.5,0.09,1.5-1.5C13.5,11.91,12.07,12,12,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_drag_handle.xml
new file mode 100644
index 0000000..59dcfd7
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_drag_handle.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorHint" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 4 9 H 20 V 10.5 H 4 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 13.5 H 20 V 15 H 4 V 13.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_hourglass_top.xml
new file mode 100644
index 0000000..452e8f8
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_hourglass_top.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,4.25C18,3.01,16.99,2,15.75,2h-7.5C7.01,2,6,3.01,6,4.25c0,0.54-0.27,2.66,1.43,4.32l3.5,3.43l-3.5,3.43 C5.72,17.09,6,19.2,6,19.75C6,20.99,7.01,22,8.25,22h7.5c1.24,0,2.25-1.01,2.25-2.25c0-0.54,0.27-2.66-1.43-4.32L13.07,12l3.5-3.43 C18.28,6.91,18,4.8,18,4.25z M15.52,16.5c0.66,0.64,0.98,1.2,0.98,3.25c0,0.41-0.34,0.75-0.75,0.75h-7.5 c-0.41,0-0.75-0.34-0.75-0.75c0-2.26,0.43-2.72,0.98-3.25L12,13.05L15.52,16.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_info_no_shadow.xml
new file mode 100644
index 0000000..2c608fd
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_info_no_shadow.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 7 C 12.4142135624 7 12.75 7.33578643763 12.75 7.75 C 12.75 8.16421356237 12.4142135624 8.5 12 8.5 C 11.5857864376 8.5 11.25 8.16421356237 11.25 7.75 C 11.25 7.33578643763 11.5857864376 7 12 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_install_no_shadow.xml
new file mode 100644
index 0000000..59194a3
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_install_no_shadow.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,16.25c0.19,0,0.38-0.07,0.53-0.22l4.5-4.5l-1.06-1.06l-3.22,3.22V4h-1.5v9.69l-3.22-3.22l-1.06,1.06l4.5,4.5 C11.62,16.18,11.81,16.25,12,16.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,15v2.75c0,0.41-0.34,0.75-0.75,0.75H6.25c-0.41,0-0.75-0.34-0.75-0.75V15H4v2.75C4,18.99,5.01,20,6.25,20h11.5 c1.24,0,2.25-1.01,2.25-2.25V15H18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_palette.xml
new file mode 100644
index 0000000..0e1a2df
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_palette.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2.01C10.98,1.97,2,1.85,2,12C2,22.2,10.98,22.02,12,22c1.49,0,2.47-1.54,1.86-2.88l-0.35-0.78 c-0.16-0.36,0.1-0.76,0.49-0.76h1.95c5.1,0,6.07-4.9,6.05-5.88C22.14,6.98,19.09,1.8,12,2.01z M15.94,16.07H14 c-1.49,0-2.47,1.54-1.86,2.88l0.35,0.78c0.09,0.21,0.08,0.76-0.58,0.76C9.08,20.59,3.5,19.56,3.5,12c0-7.6,5.7-8.57,8.5-8.5 c8.14,0,8.46,6.37,8.5,8.18C20.4,14.12,18.4,16.07,15.94,16.07z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9.5,6C9.45,6,8,5.91,8,7.5C8,9.09,9.43,9,9.5,9C9.55,9,11,9.09,11,7.5C11,5.91,9.57,6,9.5,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.5,6C14.45,6,13,5.91,13,7.5C13,9.09,14.43,9,14.5,9C14.55,9,16,9.09,16,7.5C16,5.91,14.57,6,14.5,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.5,10c-0.05,0-1.5-0.09-1.5,1.5c0,1.59,1.43,1.5,1.5,1.5c0.05,0,1.5,0.09,1.5-1.5C19,9.91,17.57,10,17.5,10z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M6.5,10C6.45,10,5,9.91,5,11.5C5,13.09,6.43,13,6.5,13C6.55,13,8,13.09,8,11.5C8,9.91,6.57,10,6.5,10z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_pin.xml
new file mode 100644
index 0000000..e525789
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_pin.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.87,13.58L17,10.77V7c0-4.33-3.36-5.05-5-5c-1.63-0.05-5,0.68-5,5v3.77l-1.87,2.81C5.04,13.71,5,13.85,5,14v1.25 C5,15.66,5.34,16,5.75,16H11v4.79c0,0.13,0.05,0.26,0.15,0.35l0.5,0.5c0.2,0.2,0.51,0.2,0.71,0l0.5-0.5 c0.09-0.09,0.15-0.22,0.15-0.35V16h5.25c0.41,0,0.75-0.34,0.75-0.75V14C19,13.85,18.96,13.71,18.87,13.58z M17.5,14.5h-11v-0.27 l1.87-2.81C8.46,11.29,8.5,11.15,8.5,11V7c0-1.2,0.34-3.57,3.55-3.5C13.23,3.47,15.5,3.84,15.5,7v4c0,0.15,0.04,0.29,0.13,0.42 l1.87,2.81V14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_setting.xml
new file mode 100644
index 0000000..c3f6dc5
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_setting.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.7,13.01c-0.67-0.49-0.7-1.51,0-2.02l1.75-1.28c0.31-0.23,0.4-0.65,0.21-0.98l-2-3.46c-0.19-0.33-0.6-0.47-0.95-0.31 l-1.98,0.88c-0.75,0.33-1.65-0.14-1.75-1.01l-0.23-2.15C14.7,2.29,14.38,2,14,2h-4c-0.38,0-0.7,0.29-0.75,0.67L9.02,4.82 C8.93,5.7,8.02,6.16,7.27,5.83L5.29,4.96C4.94,4.8,4.53,4.94,4.34,5.27l-2,3.46c-0.19,0.33-0.1,0.75,0.21,0.98l1.75,1.28 c0.7,0.51,0.67,1.53,0,2.02l-1.75,1.28c-0.31,0.23-0.4,0.65-0.21,0.98l2,3.46c0.19,0.33,0.6,0.47,0.95,0.31l1.98-0.88 c0.75-0.33,1.65,0.15,1.75,1.01l0.23,2.15C9.29,21.71,9.62,22,10,22h4c0.38,0,0.7-0.29,0.75-0.67l0.23-2.15 c0.09-0.82,0.96-1.36,1.75-1.01l1.98,0.88c0.35,0.16,0.76,0.02,0.95-0.31l2-3.46c0.19-0.33,0.1-0.75-0.21-0.98L19.7,13.01z M18.7,17.4l-1.37-0.6c-0.81-0.36-1.72-0.31-2.49,0.13c-0.77,0.44-1.26,1.2-1.36,2.08l-0.16,1.48h-2.65l-0.16-1.49 c-0.1-0.88-0.59-1.64-1.36-2.08c-0.77-0.44-1.68-0.49-2.49-0.13L5.3,17.4l-1.33-2.3l1.21-0.88C5.9,13.7,6.31,12.89,6.31,12 c0-0.89-0.41-1.7-1.13-2.22L3.98,8.9L5.3,6.6l1.36,0.6c0.81,0.36,1.72,0.31,2.49-0.13c0.77-0.44,1.26-1.2,1.36-2.09l0.16-1.48 h2.65l0.16,1.48c0.09,0.88,0.59,1.64,1.36,2.09c0.77,0.44,1.67,0.49,2.49,0.13l1.36-0.6l1.33,2.3l-1.21,0.88 c-0.72,0.52-1.13,1.33-1.13,2.22c0,0.89,0.41,1.7,1.13,2.22l1.21,0.88L18.7,17.4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,8c-1.29-0.04-4,0.56-4,4c0,3.46,2.69,4.02,4,4c0.21,0.01,4,0.12,4-4C16,8.55,13.31,7.97,12,8z M12,14.5 c-0.51,0.01-2.5,0.03-2.5-2.5c0-2.33,1.67-2.51,2.54-2.5c0.85-0.02,2.46,0.22,2.46,2.5C14.5,14.52,12.51,14.51,12,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_smartspace_preferences.xml
new file mode 100644
index 0000000..63c69ff
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_smartspace_preferences.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M5.77,6.57L7.5,5.6l1.73,0.97c0.22,0.12,0.46-0.12,0.34-0.34L8.6,4.5l0.97-1.73c0.12-0.22-0.12-0.46-0.34-0.34L7.5,3.4 L5.77,2.43C5.55,2.31,5.31,2.55,5.43,2.77L6.4,4.5L5.43,6.23C5.31,6.45,5.55,6.69,5.77,6.57z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.6,4.5l0.97-1.73c0.12-0.22-0.12-0.46-0.34-0.34L19.5,3.4l-1.73-0.97c-0.22-0.12-0.46,0.12-0.34,0.34L18.4,4.5 l-0.97,1.73c-0.12,0.22,0.12,0.46,0.34,0.34L19.5,5.6l1.73,0.97c0.22,0.12,0.46-0.12,0.34-0.34L20.6,4.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.23,14.43L19.5,15.4l-1.73-0.97c-0.22-0.12-0.46,0.12-0.34,0.34l0.97,1.73l-0.97,1.73c-0.12,0.22,0.12,0.46,0.34,0.34 l1.73-0.97l1.73,0.97c0.22,0.12,0.46-0.12,0.34-0.34L20.6,16.5l0.97-1.73C21.69,14.55,21.45,14.31,21.23,14.43z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.74,8.18c-0.68-0.68-1.79-0.68-2.47,0L2.18,18.26c-0.68,0.68-0.68,1.79,0,2.47l1.09,1.09c0.79,0.79,1.91,0.57,2.47,0 l10.09-10.09c0.68-0.68,0.68-1.79,0-2.47L14.74,8.18z M4.68,20.76c-0.11,0.11-0.27,0.09-0.35,0l-1.09-1.09 c-0.1-0.1-0.1-0.26,0-0.35l8.05-8.05l1.44,1.44L4.68,20.76z M14.76,10.68l-0.97,0.97l-1.44-1.44l0.97-0.97 c0.1-0.1,0.26-0.1,0.35,0l1.09,1.09C14.86,10.42,14.86,10.58,14.76,10.68z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_split_screen.xml
new file mode 100644
index 0000000..f7c4102
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_split_screen.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.75,2H6.25C5.01,2,4,3.01,4,4.25v4.48c0,1.24,1.01,2.25,2.25,2.25h11.5c1.24,0,2.25-1.01,2.25-2.25V4.25 C20,3.01,18.99,2,17.75,2z M18.5,8.73c0,0.41-0.34,0.75-0.75,0.75H6.25c-0.41,0-0.75-0.34-0.75-0.75V4.25 c0-0.41,0.34-0.75,0.75-0.75h11.5c0.41,0,0.75,0.34,0.75,0.75V8.73z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.75,13H6.25C5.01,13,4,14.01,4,15.25v4.48c0,1.24,1.01,2.25,2.25,2.25h11.5c1.24,0,2.25-1.01,2.25-2.25v-4.48 C20,14.01,18.99,13,17.75,13z M18.5,19.73c0,0.41-0.34,0.75-0.75,0.75H6.25c-0.41,0-0.75-0.34-0.75-0.75v-4.48 c0-0.41,0.34-0.75,0.75-0.75h11.5c0.41,0,0.75,0.34,0.75,0.75V19.73z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml
new file mode 100644
index 0000000..5e2a84c
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4V3H9v1H4v1.5h1V17c0,2.21,1.79,4,4,4h6c2.21,0,4-1.79,4-4V5.5h1V4H15z M17.5,17c0,1.38-1.12,2.5-2.5,2.5H9 c-1.38,0-2.5-1.12-2.5-2.5V5.5h11V17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 8 H 11 V 17 H 9.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 H 14.5 V 17 H 13 V 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_warning.xml
new file mode 100644
index 0000000..a7cf800
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_warning.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M22.4,19.87L12.65,3.12c-0.27-0.46-1.03-0.46-1.3,0L1.6,19.87C1.31,20.37,1.67,21,2.25,21h19.5 C22.33,21,22.69,20.37,22.4,19.87z M3.55,19.5L12,4.99l8.45,14.51H3.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 15 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 16.5 C 12.4142135624 16.5 12.75 16.8357864376 12.75 17.25 C 12.75 17.6642135624 12.4142135624 18 12 18 C 11.5857864376 18 11.25 17.6642135624 11.25 17.25 C 11.25 16.8357864376 11.5857864376 16.5 12 16.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_widget.xml
new file mode 100644
index 0000000..8209499
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_widget.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M9.25,3h-4.5C3.79,3,3,3.79,3,4.75v4.5C3,10.21,3.79,11,4.75,11h4.5C10.21,11,11,10.21,11,9.25v-4.5 C11,3.79,10.21,3,9.25,3z M9.5,9.25c0,0.14-0.11,0.25-0.25,0.25h-4.5C4.61,9.5,4.5,9.39,4.5,9.25v-4.5c0-0.14,0.11-0.25,0.25-0.25 h4.5c0.14,0,0.25,0.11,0.25,0.25V9.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9.25,13h-4.5C3.79,13,3,13.79,3,14.75v4.5C3,20.21,3.79,21,4.75,21h4.5c0.96,0,1.75-0.79,1.75-1.75v-4.5 C11,13.79,10.21,13,9.25,13z M9.5,19.25c0,0.14-0.11,0.25-0.25,0.25h-4.5c-0.14,0-0.25-0.11-0.25-0.25v-4.5 c0-0.14,0.11-0.25,0.25-0.25h4.5c0.14,0,0.25,0.11,0.25,0.25V19.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.25,13h-4.5C13.79,13,13,13.79,13,14.75v4.5c0,0.96,0.79,1.75,1.75,1.75h4.5c0.96,0,1.75-0.79,1.75-1.75v-4.5 C21,13.79,20.21,13,19.25,13z M19.5,19.25c0,0.14-0.11,0.25-0.25,0.25h-4.5c-0.14,0-0.25-0.11-0.25-0.25v-4.5 c0-0.14,0.11-0.25,0.25-0.25h4.5c0.14,0,0.25,0.11,0.25,0.25V19.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.35,12.59c0.45,0,0.9-0.17,1.24-0.51l3.18-3.18c0.68-0.68,0.68-1.79,0-2.47l-3.18-3.18c-0.68-0.68-1.79-0.68-2.48,0 l-3.18,3.18c-0.68,0.68-0.68,1.79,0,2.47l3.18,3.18C15.45,12.41,15.9,12.59,16.35,12.59z M12.99,7.48l3.18-3.18 c0.1-0.1,0.26-0.1,0.35,0l3.18,3.18c0.1,0.1,0.1,0.26,0,0.35l-3.18,3.18c-0.1,0.1-0.26,0.1-0.35,0l-3.18-3.18 C12.89,7.73,12.89,7.57,12.99,7.48z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/Android.mk b/packages/overlays/IconPackKaiSettingsOverlay/Android.mk
new file mode 100644
index 0000000..09c631c
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackKaiSettings
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackKaiSettingsOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiSettingsOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..4b6571f
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.kai.settings"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.settings" android:category="android.theme.customization.icon_pack.settings" android:priority="1"/>
+    <application android:label="Kai" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/drag_handle.xml
new file mode 100644
index 0000000..955a7c6
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/drag_handle.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 4 9 H 20 V 10.5 H 4 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 13.5 H 20 V 15 H 4 V 13.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_add_24dp.xml
new file mode 100644
index 0000000..1b48382
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_add_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20 11.25 L 12.75 11.25 L 12.75 4 L 11.25 4 L 11.25 11.25 L 4 11.25 L 4 12.75 L 11.25 12.75 L 11.25 20 L 12.75 20 L 12.75 12.75 L 20 12.75 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_airplanemode_active.xml
new file mode 100644
index 0000000..5664871
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_airplanemode_active.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3.5c0.55,0,1,0.45,1,1V9c0,0.61,0.37,1.16,0.94,1.39l5.61,2.24c0.73,0.29,0.94,0.87,0.94,1.65l-5.8-0.77 C13.82,13.39,13,14.07,13,15v2.5c0,0.53,0.28,1.01,0.73,1.29c0.99,0.59,1.54,0.79,1.73,1.55C11.87,19.98,12.11,20,12,20 c-0.11,0,0.12-0.02-3.46,0.34c0.18-0.73,0.63-0.89,1.73-1.55C10.72,18.51,11,18.03,11,17.5V15c0-0.93-0.83-1.61-1.7-1.49 l-5.8,0.77c0-0.78,0.22-1.36,0.94-1.65l5.61-2.24C10.63,10.16,11,9.61,11,9V4.5C11,3.95,11.45,3.5,12,3.5 M12,2 c-1.38,0-2.5,1.12-2.5,2.5V9l-5.61,2.25C2.75,11.7,2,12.8,2,14.03v0.83c0,0.25,0.23,1.11,1.13,0.99L9.5,15v2.5l-1.04,0.63 C7.55,18.67,7,19.65,7,20.7v0.2c0,0.56,0.45,1,1,1c0.03,0,0.07,0,0.1-0.01L12,21.5l3.9,0.39c0.03,0,0.07,0.01,0.1,0.01 c0.55,0,1-0.44,1-1v-0.2c0-1.05-0.55-2.03-1.46-2.57L14.5,17.5V15l6.37,0.85c0.91,0.12,1.13-0.76,1.13-0.99v-0.83 c0-1.23-0.75-2.33-1.89-2.78L14.5,9V4.5C14.5,3.12,13.38,2,12,2"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_android.xml
new file mode 100644
index 0000000..1430d0c
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_android.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6,18c0,0.55,0.45,1,1,1h1v3.5C8,23.33,8.67,24,9.5,24s1.5-0.67,1.5-1.5V19h2v3.5c0,0.83,0.67,1.5,1.5,1.5 s1.5-0.67,1.5-1.5V19h1c0.55,0,1-0.45,1-1V8H6V18z M3.5,8C2.67,8,2,8.67,2,9.5v7C2,17.33,2.67,18,3.5,18S5,17.33,5,16.5v-7 C5,8.67,4.33,8,3.5,8 M20.5,8C19.67,8,19,8.67,19,9.5v7c0,0.83,0.67,1.5,1.5,1.5s1.5-0.67,1.5-1.5v-7C22,8.67,21.33,8,20.5,8 M15.53,2.16l1.3-1.3c0.2-0.2,0.2-0.51,0-0.71c-0.2-0.2-0.51-0.2-0.71,0l-1.48,1.48C13.85,1.23,12.95,1,12,1 c-0.96,0-1.86,0.23-2.66,0.63L7.85,0.15c-0.2-0.2-0.51-0.2-0.71,0c-0.2,0.2-0.2,0.51,0,0.71l1.31,1.31C6.97,3.26,6,5.01,6,7h12 C18,5.01,17.03,3.25,15.53,2.16 M10,5H9V4h1V5z M15,5h-1V4h1V5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_apps.xml
new file mode 100644
index 0000000..58999d0
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_apps.xml
@@ -0,0 +1,26 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 6 4 C 7.10456949966 4 8 4.89543050034 8 6 C 8 7.10456949966 7.10456949966 8 6 8 C 4.89543050034 8 4 7.10456949966 4 6 C 4 4.89543050034 4.89543050034 4 6 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 4 C 13.1045694997 4 14 4.89543050034 14 6 C 14 7.10456949966 13.1045694997 8 12 8 C 10.8954305003 8 10 7.10456949966 10 6 C 10 4.89543050034 10.8954305003 4 12 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 4 C 19.1045694997 4 20 4.89543050034 20 6 C 20 7.10456949966 19.1045694997 8 18 8 C 16.8954305003 8 16 7.10456949966 16 6 C 16 4.89543050034 16.8954305003 4 18 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 10 C 7.10456949966 10 8 10.8954305003 8 12 C 8 13.1045694997 7.10456949966 14 6 14 C 4.89543050034 14 4 13.1045694997 4 12 C 4 10.8954305003 4.89543050034 10 6 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 10 C 13.1045694997 10 14 10.8954305003 14 12 C 14 13.1045694997 13.1045694997 14 12 14 C 10.8954305003 14 10 13.1045694997 10 12 C 10 10.8954305003 10.8954305003 10 12 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 10 C 19.1045694997 10 20 10.8954305003 20 12 C 20 13.1045694997 19.1045694997 14 18 14 C 16.8954305003 14 16 13.1045694997 16 12 C 16 10.8954305003 16.8954305003 10 18 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 16 C 7.10456949966 16 8 16.8954305003 8 18 C 8 19.1045694997 7.10456949966 20 6 20 C 4.89543050034 20 4 19.1045694997 4 18 C 4 16.8954305003 4.89543050034 16 6 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 16 C 13.1045694997 16 14 16.8954305003 14 18 C 14 19.1045694997 13.1045694997 20 12 20 C 10.8954305003 20 10 19.1045694997 10 18 C 10 16.8954305003 10.8954305003 16 12 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 16 C 19.1045694997 16 20 16.8954305003 20 18 C 20 19.1045694997 19.1045694997 20 18 20 C 16.8954305003 20 16 19.1045694997 16 18 C 16 16.8954305003 16.8954305003 16 18 16 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_back.xml
new file mode 100644
index 0000000..c5f2b3b
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,11.25H6.89l6.18-6.18l-1.06-1.06l-7.47,7.47c-0.29,0.29-0.29,0.77,0,1.06l7.47,7.47l1.06-1.06l-6.2-6.2H20V11.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml
new file mode 100644
index 0000000..e428f0c
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.94,8L12,14.94L5.06,8L4,9.06l7.47,7.47c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22L20,9.06L18.94,8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_charging_full.xml
new file mode 100644
index 0000000..d3339fa
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_charging_full.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.08,12H13V8.49c0-0.26-0.35-0.35-0.47-0.12L9.7,13.63C9.61,13.8,9.73,14,9.92,14H11v3.51c0,0.26,0.35,0.35,0.47,0.12 l2.83-5.26C14.39,12.2,14.27,12,14.08,12z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16,4h-1V2.5C15,2.22,14.78,2,14.5,2h-5C9.22,2,9,2.22,9,2.5V4H8C6.9,4,6,4.9,6,6v12c0,2.21,1.79,4,4,4h4 c2.21,0,4-1.79,4-4V6C18,4.9,17.1,4,16,4z M16.5,18c0,1.38-1.12,2.5-2.5,2.5h-4c-1.38,0-2.5-1.12-2.5-2.5V6 c0-0.28,0.22-0.5,0.5-0.5h8c0.28,0,0.5,0.22,0.5,0.5V18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml
new file mode 100644
index 0000000..5736c4b
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16,4h-1V2.5C15,2.22,14.78,2,14.5,2h-5C9.22,2,9,2.22,9,2.5V4H8C6.9,4,6,4.9,6,6v12c0,2.21,1.79,4,4,4h4 c2.21,0,4-1.79,4-4V6C18,4.9,17.1,4,16,4z M16.5,18c0,1.38-1.12,2.5-2.5,2.5h-4c-1.38,0-2.5-1.12-2.5-2.5V6 c0-0.28,0.22-0.5,0.5-0.5h8c0.28,0,0.5,0.22,0.5,0.5V18z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M10.91,14.26l-1.41-1.41L8.43,13.9l1.94,1.94c0.29,0.29,0.77,0.29,1.06,0l4.24-4.24l-1.06-1.06L10.91,14.26z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml
new file mode 100644
index 0000000..13786d8
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16,4h-1V2.5C15,2.22,14.78,2,14.5,2h-5C9.22,2,9,2.22,9,2.5V4H8C6.9,4,6,4.9,6,6v12c0,2.21,1.79,4,4,4h4 c2.21,0,4-1.79,4-4V6C18,4.9,17.1,4,16,4z M16.5,18c0,1.38-1.12,2.5-2.5,2.5h-4c-1.38,0-2.5-1.12-2.5-2.5V6 c0-0.28,0.22-0.5,0.5-0.5h8c0.28,0,0.5,0.22,0.5,0.5V18z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 H 12.75 V 15 H 11.25 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 16.5 C 12.4142135624 16.5 12.75 16.8357864376 12.75 17.25 C 12.75 17.6642135624 12.4142135624 18 12 18 C 11.5857864376 18 11.25 17.6642135624 11.25 17.25 C 11.25 16.8357864376 11.5857864376 16.5 12 16.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_call_24dp.xml
new file mode 100644
index 0000000..476b5d2
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_call_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.52,14.51l-1.88-0.29c-0.55-0.08-1.11,0.1-1.51,0.49l-2.85,2.85c-2.92-1.56-5.32-3.97-6.87-6.9l2.77-2.77 c0.39-0.39,0.58-0.95,0.49-1.51L9.38,4.48C9.25,3.62,8.52,3,7.65,3H4.86c0,0,0,0,0,0C3.95,3,3,3.78,3.12,4.9 C4,13.29,10.72,20.01,19.1,20.89c0.06,0.01,0.11,0.01,0.17,0.01c1.16,0,1.73-1.02,1.73-1.75v-2.9C21,15.37,20.38,14.64,19.52,14.51 z M4.61,4.75C4.59,4.62,4.72,4.5,4.86,4.5h0h2.79c0.12,0,0.23,0.09,0.25,0.21L8.19,6.6C8.2,6.69,8.18,6.77,8.12,6.82L5.73,9.21 C5.16,7.81,4.77,6.31,4.61,4.75z M19.5,19.14c0,0.14-0.11,0.27-0.25,0.25c-1.59-0.17-3.11-0.56-4.54-1.15l2.47-2.47 c0.06-0.06,0.14-0.08,0.21-0.07l1.88,0.29c0.12,0.02,0.21,0.12,0.21,0.25V19.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cancel.xml
new file mode 100644
index 0000000..e89e95a
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cancel.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.65-0.05,8.5,0.58,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.47 7.47 L 12 10.94 L 8.53 7.47 L 7.47 8.53 L 10.94 12 L 7.47 15.47 L 8.53 16.53 L 12 13.06 L 15.47 16.53 L 16.53 15.47 L 13.06 12 L 16.53 8.53 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cast_24dp.xml
new file mode 100644
index 0000000..ad9775f
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cast_24dp.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,3H3.25C2.01,3,1,4.01,1,5.25V8h1.5V5.25c0-0.41,0.34-0.75,0.75-0.75h17.5c0.41,0,0.75,0.34,0.75,0.75v13.5 c0,0.41-0.34,0.75-0.75,0.75H14V21h6.75c1.24,0,2.25-1.01,2.25-2.25V5.25C23,4.01,21.99,3,20.75,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,10.25v1.5c5.1,0,9.25,4.15,9.25,9.25h1.5C11.75,15.07,6.93,10.25,1,10.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,14.25v1.5c2.9,0,5.25,2.35,5.25,5.25h1.5C7.75,17.28,4.72,14.25,1,14.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,18.25v1.5c0.69,0,1.25,0.56,1.25,1.25h1.5C3.75,19.48,2.52,18.25,1,18.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cellular_off.xml
new file mode 100644
index 0000000..2f52c45
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cellular_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M8.25,4.84v1.29l1.5,1.5V4.78l3.23,3.23l1.06-1.06L9.56,2.47c-0.29-0.29-0.77-0.29-1.06,0L6.55,4.42l1.06,1.06L8.25,4.84z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1.04,3.16l7.21,7.21V12c0,0.55,0.45,1,1,1h1.63l3.37,3.37v2.8l-3.21-3.21l-1.06,1.06l4.51,4.51 c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22l1.93-1.93l3.36,3.36l1.06-1.06L2.1,2.1L1.04,3.16z M15.75,17.87l0.67,0.67 l-0.67,0.67V17.87z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml
new file mode 100644
index 0000000..688ab57
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15.78,11.47L9.66,5.34L8.59,6.41L14.19,12l-5.59,5.59l1.06,1.06l6.12-6.12C16.07,12.24,16.07,11.76,15.78,11.47z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml
new file mode 100644
index 0000000..e291f54
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/material_grey_600" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.75,1H8.25C7.01,1,6,2.01,6,3.25v13.5C6,17.99,7.01,19,8.25,19h10.5c1.24,0,2.25-1.01,2.25-2.25V3.25 C21,2.01,19.99,1,18.75,1z M19.5,16.75c0,0.41-0.34,0.75-0.75,0.75H8.25c-0.41,0-0.75-0.34-0.75-0.75V3.25 c0-0.41,0.34-0.75,0.75-0.75h10.5c0.41,0,0.75,0.34,0.75,0.75V16.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.5,20.75V7H2v13.75C2,21.99,3.01,23,4.25,23H18v-1.5H4.25C3.84,21.5,3.5,21.16,3.5,20.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_data_saver.xml
new file mode 100644
index 0000000..96774bc
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_data_saver.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 L 11.25 11.25 L 8 11.25 L 8 12.75 L 11.25 12.75 L 11.25 16 L 12.75 16 L 12.75 12.75 L 16 12.75 L 16 11.25 L 12.75 11.25 L 12.75 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.31,4.55C17.2,2.5,14.41,2.06,12.75,2v2c1.32,0.05,3.53,0.4,5.16,1.98c1.39,1.35,2.09,3.37,2.09,6 c0,1.28-0.17,2.42-0.51,3.4l1.76,1.01c0.49-1.28,0.75-2.75,0.75-4.42C22,8.79,21.09,6.29,19.31,4.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.9,17.98c-1.54,1.49-3.77,2.04-5.9,2c-2.17,0.04-4.36-0.48-5.91-1.99C4.7,16.64,4,14.62,4,11.99 c0-2.63,0.71-4.64,2.1-5.99C7.75,4.39,10.01,4.06,11.25,4V2C9.63,2.06,6.85,2.48,4.7,4.56C2.91,6.3,2,8.8,2,11.99 c0,3.19,0.91,5.69,2.69,7.43c2.48,2.42,5.91,2.6,7.31,2.56c2.38,0.15,5.36-0.69,7.29-2.57c0.51-0.49,0.93-1.05,1.3-1.66l-1.73-1 C18.59,17.21,18.27,17.62,17.9,17.98z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_delete.xml
new file mode 100644
index 0000000..5e37393
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_delete.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4V3H9v1H4v1.5h1V17c0,2.21,1.79,4,4,4h6c2.21,0,4-1.79,4-4V5.5h1V4H15z M17.5,17c0,1.38-1.12,2.5-2.5,2.5H9 c-1.38,0-2.5-1.12-2.5-2.5V5.5h11V17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 8 H 11 V 17 H 9.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 H 14.5 V 17 H 13 V 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_devices_other.xml
new file mode 100644
index 0000000..fa91107
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_devices_other.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M2.51,17.74V6.27c0-0.41,0.34-0.75,0.75-0.75H21v-1.5H3.26c-1.24,0-2.25,1.01-2.25,2.25v11.46c0,1.24,1.01,2.25,2.25,2.25 H7v-1.5H3.26C2.85,18.49,2.51,18.15,2.51,17.74z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,8h-3.5C16.01,8,15,9.01,15,10.25v7.5c0,1.24,1.01,2.25,2.25,2.25h3.5c1.24,0,2.25-1.01,2.25-2.25v-7.5 C23,9.01,21.99,8,20.75,8z M21.5,17.75c0,0.41-0.34,0.75-0.75,0.75h-3.5c-0.41,0-0.75-0.34-0.75-0.75v-7.5 c0-0.41,0.34-0.75,0.75-0.75h3.5c0.41,0,0.75,0.34,0.75,0.75V17.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13,13.84v-1.09c0-0.41-0.34-0.75-0.75-0.75h-2.5C9.34,12,9,12.34,9,12.75v1.09C8.54,14.25,8.18,14.92,8.18,16 c0,1.09,0.36,1.75,0.82,2.16v1.09C9,19.66,9.34,20,9.75,20h2.5c0.41,0,0.75-0.34,0.75-0.75v-1.09c0.46-0.41,0.82-1.08,0.82-2.16 C13.82,14.91,13.46,14.25,13,13.84z M11,17.25C10.03,17.26,9.75,16.9,9.75,16c0-0.9,0.3-1.25,1.25-1.25 c0.95-0.01,1.25,0.33,1.25,1.25C12.25,16.84,11.98,17.25,11,17.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml
new file mode 100644
index 0000000..f7d872a
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.08,2.34,10,10,10c7.62,0,10-4.94,10-10C22,6.92,19.66,2,12,2z M12,20.5 c-2.62,0.05-8.5-0.57-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.62-0.05,8.5,0.57,8.5,8.5C20.5,19.9,14.64,20.55,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7 11.25 H 17 V 12.75 H 7 V 11.25 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_eject_24dp.xml
new file mode 100644
index 0000000..aa97bd8
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_eject_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 5 17.5 H 19 V 19 H 5 V 17.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M8.2,14.99h7.61c1.38,0,2.22-1.53,1.48-2.69l-3.8-5.97C13.15,5.82,12.6,5.52,12,5.52c-0.6,0-1.15,0.3-1.48,0.81l-3.8,5.97 C5.98,13.46,6.82,14.99,8.2,14.99z M7.99,13.1l3.8-5.97c0,0,0,0,0,0c0.1-0.15,0.32-0.16,0.42,0l3.8,5.97 c0.12,0.19-0.04,0.38-0.21,0.38H8.2C8.02,13.49,7.87,13.29,7.99,13.1z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_less.xml
new file mode 100644
index 0000000..3acf122
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_less.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.53,7.47c-0.29-0.29-0.77-0.29-1.06,0L4,14.94L5.06,16L12,9.06L18.94,16L20,14.94L12.53,7.47z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_more_inverse.xml
new file mode 100644
index 0000000..2b444a3
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_more_inverse.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorForegroundInverse" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.94,8L12,14.94L5.06,8L4,9.06l7.47,7.47c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22L20,9.06L18.94,8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_find_in_page_24px.xml
new file mode 100644
index 0000000..f11b6b7
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_find_in_page_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.34,7.28l-4.62-4.62C14.3,2.24,13.72,2,13.13,2H6.25C5.01,2,4,3.01,4,4.25v15.5C4,20.99,5.01,22,6.25,22h11.5 c1.24,0,2.25-1.01,2.25-2.25V8.87C20,8.28,19.76,7.7,19.34,7.28z M6.25,20.5c-0.41,0-0.75-0.34-0.75-0.75V4.25 c0-0.41,0.34-0.75,0.75-0.75h6.88c0.2,0,0.39,0.08,0.53,0.22l4.62,4.62c0.14,0.14,0.22,0.33,0.22,0.53v9.66l-2.88-2.88 c0.55-0.75,0.88-1.66,0.88-2.65c0-2.48-2.02-4.5-4.5-4.5s-4.5,2.02-4.5,4.5s2.02,4.5,4.5,4.5c0.95,0,1.82-0.3,2.55-0.8l3.64,3.64 c-0.12,0.09-0.27,0.16-0.44,0.16H6.25z M12,15.99c-1.65,0-3-1.35-3-3s1.35-3,3-3s3,1.35,3,3S13.65,15.99,12,15.99z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml
new file mode 100644
index 0000000..f08b2a7
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,6h-7.21l-1.61-1.43C10.51,4.2,9.98,4,9.43,4H4.25C3.01,4,2,5.01,2,6.25v11.5C2,18.99,3.01,20,4.25,20h15.5 c1.24,0,2.25-1.01,2.25-2.25v-9.5C22,7.01,20.99,6,19.75,6z M20.5,17.75c0,0.41-0.34,0.75-0.75,0.75H4.25 c-0.41,0-0.75-0.34-0.75-0.75V7.5h16.25c0.41,0,0.75,0.34,0.75,0.75V17.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_friction_lock_closed.xml
new file mode 100644
index 0000000..70ce244
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_friction_lock_closed.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.01,12.25c-0.89-0.02-2.76,0.4-2.76,2.75c0,2.42,1.94,2.75,2.75,2.75c0.13,0,2.75,0.06,2.75-2.75 C14.75,12.66,12.9,12.23,12.01,12.25z M12,16.25c-0.81,0.01-1.25-0.34-1.25-1.25c0-0.85,0.37-1.27,1.28-1.25 c1.32-0.06,1.22,1.22,1.22,1.25C13.25,15.89,12.83,16.26,12,16.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.75,8H16.5V5.5c0-3.88-3.03-4.55-4.5-4.5c-1.46-0.04-4.5,0.6-4.5,4.5V8H6.25C5.01,8,4,9.01,4,10.25v9.5 C4,20.99,5.01,22,6.25,22h11.5c1.24,0,2.25-1.01,2.25-2.25v-9.5C20,9.01,18.99,8,17.75,8z M9,5.5c0-2.77,2-3.01,3.05-3 C13.07,2.48,15,2.79,15,5.5V8H9V5.5z M18.5,19.75c0,0.41-0.34,0.75-0.75,0.75H6.25c-0.41,0-0.75-0.34-0.75-0.75v-9.5 c0-0.41,0.34-0.75,0.75-0.75h11.5c0.41,0,0.75,0.34,0.75,0.75V19.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml
new file mode 100644
index 0000000..f4c04ef
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.38,2,2,6.95,2,12c0,5.08,2.34,10,10,10c7.62,0,10-4.95,10-10C22,6.92,19.66,2,12,2z M11.25,20.49 C4.28,20.3,3.5,14.51,3.5,12c0-2.51,0.78-8.29,7.75-8.49V20.49z M12.75,3.51c2.2,0.06,3.79,0.67,4.93,1.57h-4.93V3.51z M12.75,6.58h6.3c0.34,0.51,0.61,1.04,0.81,1.58h-7.11V6.58z M12.75,9.67h7.53c0.11,0.57,0.17,1.1,0.2,1.58h-7.72V9.67z M12.75,20.49v-1.57h4.92C16.53,19.81,14.95,20.42,12.75,20.49z M19.05,17.42h-6.3v-1.58h7.11 C19.65,16.37,19.38,16.91,19.05,17.42z M20.27,14.33h-7.53v-1.58h7.72C20.45,13.23,20.39,13.76,20.27,14.33z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_headset_24dp.xml
new file mode 100644
index 0000000..412096a
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_headset_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C8.88,1.93,2.5,3.19,2.5,11.5v6.25c0,1.02,0.3,1.83,0.89,2.4C4.16,20.9,5.18,21,5.65,21C8.13,21,9,19.41,9,17.75v-2.5 c0-2.78-2.18-3.28-3.24-3.25C5.43,11.99,4.7,12.03,4,12.41V11.5C4,4.3,9.31,3.5,12,3.5c7.24,0,8,5.28,8,7.99v0.91 c-0.69-0.38-1.42-0.41-1.75-0.41C17.2,11.96,15,12.47,15,15.25v2.5c0,3.33,3.08,3.25,3.25,3.25c1.05,0.04,3.25-0.47,3.25-3.25V11.5 C21.5,3.16,15.13,1.93,12,2z M5.79,13.5c1.44-0.01,1.71,0.92,1.71,1.75v2.5c0,1.65-1.17,1.76-1.79,1.75C4.29,19.54,4,18.57,4,17.75 v-2.5C4,14.63,4.13,13.46,5.79,13.5z M20,17.75c0,1.17-0.55,1.76-1.79,1.75c-0.2,0.01-1.71,0.09-1.71-1.75v-2.5 c0-1.62,1.1-1.75,1.72-1.75c0.1,0,1.78-0.2,1.78,1.75V17.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help.xml
new file mode 100644
index 0000000..8ab01a6
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M13.73,6.41c-0.51-0.27-1.09-0.4-1.74-0.4c-0.87,0-1.58,0.24-2.13,0.73C9.31,7.22,8.91,7.78,8.67,8.42l1.29,0.54 c0.16-0.46,0.41-0.84,0.73-1.16c0.32-0.31,0.76-0.47,1.3-0.47c0.6,0,1.07,0.16,1.41,0.48c0.34,0.32,0.51,0.75,0.51,1.27 c0,0.39-0.1,0.73-0.29,1.01c-0.19,0.28-0.51,0.61-0.94,1.01c-0.54,0.5-0.91,0.93-1.11,1.29c-0.21,0.36-0.31,0.81-0.31,1.36v0.79 h1.43v-0.69c0-0.39,0.08-0.74,0.25-1.03c0.16-0.29,0.43-0.61,0.79-0.93c0.47-0.43,0.85-0.85,1.15-1.27 c0.3-0.42,0.45-0.93,0.45-1.53c0-0.58-0.14-1.1-0.42-1.57C14.63,7.05,14.24,6.68,13.73,6.41z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.98,15.96c-0.03,0-1-0.06-1,1c0,1.06,0.96,1,1,1c0.03,0,1,0.06,1-1C12.98,15.9,12.02,15.96,11.98,15.96z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help_actionbar.xml
new file mode 100644
index 0000000..81158cb
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help_actionbar.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M13.73,6.41c-0.51-0.27-1.09-0.4-1.74-0.4c-0.87,0-1.58,0.24-2.13,0.73C9.31,7.22,8.91,7.78,8.67,8.42l1.29,0.54 c0.16-0.46,0.41-0.84,0.73-1.16c0.32-0.31,0.76-0.47,1.3-0.47c0.6,0,1.07,0.16,1.41,0.48c0.34,0.32,0.51,0.75,0.51,1.27 c0,0.39-0.1,0.73-0.29,1.01c-0.19,0.28-0.51,0.61-0.94,1.01c-0.54,0.5-0.91,0.93-1.11,1.29c-0.21,0.36-0.31,0.81-0.31,1.36v0.79 h1.43v-0.69c0-0.39,0.08-0.74,0.25-1.03c0.16-0.29,0.43-0.61,0.79-0.93c0.47-0.43,0.85-0.85,1.15-1.27 c0.3-0.42,0.45-0.93,0.45-1.53c0-0.58-0.14-1.1-0.42-1.57C14.63,7.05,14.24,6.68,13.73,6.41z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.98,15.96c-0.03,0-1-0.06-1,1c0,1.06,0.96,1,1,1c0.03,0,1,0.06,1-1C12.98,15.9,12.02,15.96,11.98,15.96z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_homepage_search.xml
new file mode 100644
index 0000000..92f4a8a
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_homepage_search.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.75,13.69C15.57,12.61,16,11.22,16,9.5c0-5.68-4.39-6.56-6.51-6.5C7.36,2.94,3,3.87,3,9.5c0,5.68,4.37,6.54,6.5,6.5l0,0 c2.17,0.07,3.62-0.79,4.2-1.23l5.51,5.51l1.06-1.06L14.75,13.69z M9.5,14.5c-1.54,0.02-5-0.35-5-5c0-4.46,3.28-5.05,4.95-5 c0.86,0,5.05-0.11,5.05,5C14.5,14.11,11.03,14.52,9.5,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_info_outline_24.xml
new file mode 100644
index 0000000..23eb6af
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_info_outline_24.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 7 C 12.4142135624 7 12.75 7.33578643763 12.75 7.75 C 12.75 8.16421356237 12.4142135624 8.5 12 8.5 C 11.5857864376 8.5 11.25 8.16421356237 11.25 7.75 C 11.25 7.33578643763 11.5857864376 7 12 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_movies.xml
new file mode 100644
index 0000000..3c328e2
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_movies.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,4H4.25C3.01,4,2,5.01,2,6.25v11.5C2,18.99,3.01,20,4.25,20h15.5c1.24,0,2.25-1.01,2.25-2.25V6.25 C22,5.01,20.99,4,19.75,4z M20.5,17.75c0,0.41-0.34,0.75-0.75,0.75H4.25c-0.41,0-0.75-0.34-0.75-0.75V10h17V17.75z M20.5,8.5h-17 V6.25c0-0.41,0.34-0.75,0.75-0.75h1.5l1.18,2.36C6.97,7.95,7.06,8,7.16,8h1.44C8.78,8,8.9,7.8,8.82,7.64L7.75,5.5h3l1.18,2.36 C11.97,7.95,12.06,8,12.16,8h1.44c0.19,0,0.31-0.2,0.23-0.36L12.75,5.5h3l1.18,2.36C16.97,7.95,17.06,8,17.16,8h1.44 c0.19,0,0.31-0.2,0.23-0.36L17.75,5.5h2c0.41,0,0.75,0.34,0.75,0.75V8.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml
new file mode 100644
index 0000000..8c3a583
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.52,14.51l-1.88-0.29c-0.55-0.08-1.11,0.1-1.51,0.49l-2.85,2.85c-2.92-1.56-5.32-3.97-6.87-6.9l2.77-2.77 c0.39-0.39,0.58-0.95,0.49-1.51L9.38,4.48C9.25,3.62,8.52,3,7.65,3H4.86c0,0,0,0,0,0C3.95,3,3,3.78,3.12,4.9 C4,13.29,10.72,20.01,19.1,20.89c0.06,0.01,0.11,0.01,0.17,0.01c1.16,0,1.73-1.02,1.73-1.75v-2.9C21,15.37,20.38,14.64,19.52,14.51 z M4.61,4.75C4.59,4.62,4.72,4.5,4.86,4.5h0h2.79c0.12,0,0.23,0.09,0.25,0.21L8.19,6.6C8.2,6.69,8.18,6.77,8.12,6.82L5.73,9.21 C5.16,7.81,4.77,6.31,4.61,4.75z M19.5,19.14c0,0.14-0.11,0.27-0.25,0.25c-1.59-0.17-3.11-0.56-4.54-1.15l2.47-2.47 c0.06-0.06,0.14-0.08,0.21-0.07l1.88,0.29c0.12,0.02,0.21,0.12,0.21,0.25V19.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream.xml
new file mode 100644
index 0000000..bf01647
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,5c0-0.07,0.12-2-2-2h-1.5c-2.12,0-2,1.91-2,2v8.9C11.81,13.35,10.95,13,10,13c-2.21,0-4,1.79-4,4s1.79,4,4,4 s4-1.79,4-4V7h2C18.12,7,18,5.09,18,5z M10,19.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S11.38,19.5,10,19.5 z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream_off.xml
new file mode 100644
index 0000000..5bce7cf
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.5,10.38l1.5,1.5V7h2c2.12,0,2-1.91,2-2c0-0.07,0.12-2-2-2h-1.5c-2.12,0-2,1.91-2,2V10.38z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l9.99,9.99C10.7,13.06,10.36,13,10,13c-2.21,0-4,1.79-4,4s1.79,4,4,4s4-1.79,4-4v-0.88l6.84,6.84 l1.06-1.06L2.1,2.1z M10,19.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S11.38,19.5,10,19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_network_cell.xml
new file mode 100644
index 0000000..d399154
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_network_cell.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 19.25 3 H 20.75 V 22 H 19.25 V 3 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.25 18 H 4.75 V 22 H 3.25 V 18 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.25 14 H 8.75 V 22 H 7.25 V 14 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 22 H 11.25 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.25 7 H 16.75 V 22 H 15.25 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications.xml
new file mode 100644
index 0000000..ab98838
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,17.5v-7c0-4.38-2.72-5.57-4.5-5.89V4c0-1.59-1.43-1.5-1.5-1.5c-0.05,0-1.5-0.09-1.5,1.5v0.62C8.72,4.94,6,6.14,6,10.5 v7H4V19h16v-1.5H18z M16.5,17.5h-9v-7C7.5,7.57,8.94,5.95,12,6c3.07-0.05,4.5,1.55,4.5,4.5V17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c0.07,0,2,0.12,2-2h-4C10,22.12,11.91,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml
new file mode 100644
index 0000000..e4383e5
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,6c3.07-0.05,4.5,1.55,4.5,4.5v3.88l1.5,1.5V10.5c0-4.38-2.72-5.57-4.5-5.89V4c0-1.59-1.43-1.5-1.5-1.5 c-0.05,0-1.5-0.09-1.5,1.5v0.62C9.71,4.76,8.73,5.08,7.89,5.77l1.07,1.07C9.69,6.28,10.69,5.98,12,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c0.07,0,2,0.12,2-2h-4C10,22.12,11.91,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l5.22,5.22C6.09,8.99,6,9.69,6,10.5v7H4V19h12.88l3.96,3.96l1.06-1.06L2.1,2.1z M7.5,17.5v-7 c0-0.29,0.03-0.56,0.05-0.82l7.82,7.82H7.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_phone_info.xml
new file mode 100644
index 0000000..2edda9c
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_phone_info.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.75,1h-9.5C6.01,1,5,2.01,5,3.25v17.5C5,21.99,6.01,23,7.25,23h9.5c1.24,0,2.25-1.01,2.25-2.25V3.25 C19,2.01,17.99,1,16.75,1z M7.25,2.5h9.5c0.41,0,0.75,0.34,0.75,0.75v1h-11v-1C6.5,2.84,6.84,2.5,7.25,2.5z M17.5,5.75v12.5h-11 V5.75H17.5z M16.75,21.5h-9.5c-0.41,0-0.75-0.34-0.75-0.75v-1h11v1C17.5,21.16,17.16,21.5,16.75,21.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 16 H 11.25 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 8 C 12.4142135624 8 12.75 8.33578643763 12.75 8.75 C 12.75 9.16421356237 12.4142135624 9.5 12 9.5 C 11.5857864376 9.5 11.25 9.16421356237 11.25 8.75 C 11.25 8.33578643763 11.5857864376 8 12 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_photo_library.xml
new file mode 100644
index 0000000..4403b5a
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_photo_library.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,2H8.25C7.01,2,6,3.01,6,4.25v11.5C6,16.99,7.01,18,8.25,18h11.5c1.24,0,2.25-1.01,2.25-2.25V4.25 C22,3.01,20.99,2,19.75,2z M20.5,15.75c0,0.41-0.34,0.75-0.75,0.75H8.25c-0.41,0-0.75-0.34-0.75-0.75V4.25 c0-0.41,0.34-0.75,0.75-0.75h11.5c0.41,0,0.75,0.34,0.75,0.75V15.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.5,19.75V6H2v13.75C2,20.99,3.01,22,4.25,22H18v-1.5H4.25C3.84,20.5,3.5,20.16,3.5,19.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.05,11.46c-0.2-0.24-0.57-0.24-0.77,0l-2.12,2.52l-1.28-1.67c-0.2-0.26-0.59-0.26-0.79,0l-1.47,1.88 C9.37,14.52,9.61,15,10.03,15h7.91c0.42,0,0.66-0.49,0.38-0.82L16.05,11.46z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_search_24dp.xml
new file mode 100644
index 0000000..204f71b
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_search_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.75,13.69C15.57,12.61,16,11.22,16,9.5c0-5.68-4.39-6.56-6.51-6.5C7.36,2.94,3,3.87,3,9.5c0,5.68,4.37,6.54,6.5,6.5l0,0 c2.17,0.07,3.62-0.79,4.2-1.23l5.51,5.51l1.06-1.06L14.75,13.69z M9.5,14.5c-1.54,0.02-5-0.35-5-5c0-4.46,3.28-5.05,4.95-5 c0.86,0,5.05-0.11,5.05,5C14.5,14.11,11.03,14.52,9.5,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accent.xml
new file mode 100644
index 0000000..e5bbf85
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accent.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.7,13.01c-0.67-0.49-0.7-1.51,0-2.02l1.75-1.28c0.31-0.23,0.4-0.65,0.21-0.98l-2-3.46c-0.19-0.33-0.6-0.47-0.95-0.31 l-1.98,0.88c-0.75,0.33-1.65-0.14-1.75-1.01l-0.23-2.15C14.7,2.29,14.38,2,14,2h-4c-0.38,0-0.7,0.29-0.75,0.67L9.02,4.82 C8.93,5.7,8.02,6.16,7.27,5.83L5.29,4.96C4.94,4.8,4.53,4.94,4.34,5.27l-2,3.46c-0.19,0.33-0.1,0.75,0.21,0.98l1.75,1.28 c0.7,0.51,0.67,1.53,0,2.02l-1.75,1.28c-0.31,0.23-0.4,0.65-0.21,0.98l2,3.46c0.19,0.33,0.6,0.47,0.95,0.31l1.98-0.88 c0.75-0.33,1.65,0.15,1.75,1.01l0.23,2.15C9.29,21.71,9.62,22,10,22h4c0.38,0,0.7-0.29,0.75-0.67l0.23-2.15 c0.09-0.82,0.96-1.36,1.75-1.01l1.98,0.88c0.35,0.16,0.76,0.02,0.95-0.31l2-3.46c0.19-0.33,0.1-0.75-0.21-0.98L19.7,13.01z M18.7,17.4l-1.37-0.6c-0.81-0.36-1.72-0.31-2.49,0.13c-0.77,0.44-1.26,1.2-1.36,2.08l-0.16,1.48h-2.65l-0.16-1.49 c-0.1-0.88-0.59-1.64-1.36-2.08c-0.77-0.44-1.68-0.49-2.49-0.13L5.3,17.4l-1.33-2.3l1.21-0.88C5.9,13.7,6.31,12.89,6.31,12 c0-0.89-0.41-1.7-1.13-2.22L3.98,8.9L5.3,6.6l1.36,0.6c0.81,0.36,1.72,0.31,2.49-0.13c0.77-0.44,1.26-1.2,1.36-2.09l0.16-1.48 h2.65l0.16,1.48c0.09,0.88,0.59,1.64,1.36,2.09c0.77,0.44,1.67,0.49,2.49,0.13l1.36-0.6l1.33,2.3l-1.21,0.88 c-0.72,0.52-1.13,1.33-1.13,2.22c0,0.89,0.41,1.7,1.13,2.22l1.21,0.88L18.7,17.4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,8c-1.29-0.04-4,0.56-4,4c0,3.46,2.69,4.02,4,4c0.21,0.01,4,0.12,4-4C16,8.55,13.31,7.97,12,8z M12,14.5 c-0.51,0.01-2.5,0.03-2.5-2.5c0-2.33,1.67-2.51,2.54-2.5c0.85-0.02,2.46,0.22,2.46,2.5C14.5,14.52,12.51,14.51,12,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accessibility.xml
new file mode 100644
index 0000000..900a3a6
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accessibility.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 8 22 C 8.55228474983 22 9 22.4477152502 9 23 C 9 23.5522847498 8.55228474983 24 8 24 C 7.44771525017 24 7 23.5522847498 7 23 C 7 22.4477152502 7.44771525017 22 8 22 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 22 C 12.5522847498 22 13 22.4477152502 13 23 C 13 23.5522847498 12.5522847498 24 12 24 C 11.4477152502 24 11 23.5522847498 11 23 C 11 22.4477152502 11.4477152502 22 12 22 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16 22 C 16.5522847498 22 17 22.4477152502 17 23 C 17 23.5522847498 16.5522847498 24 16 24 C 15.4477152502 24 15 23.5522847498 15 23 C 15 22.4477152502 15.4477152502 22 16 22 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 0 C 13.1045694997 0 14 0.895430500338 14 2 C 14 3.10456949966 13.1045694997 4 12 4 C 10.8954305003 4 10 3.10456949966 10 2 C 10 0.895430500338 10.8954305003 0 12 0 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M15,20V7c2-0.17,4.14-0.5,6-1l-0.5-2c-2.61,0.7-5.67,1-8.5,1S6.11,4.7,3.5,4L3,6c1.86,0.5,4,0.83,6,1v13h2v-6h2v6H15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accounts.xml
new file mode 100644
index 0000000..0a7ec3f
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accounts.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.75,3H5.25C4.01,3,3,4.01,3,5.25v13.5C3,19.99,4.01,21,5.25,21h13.5c1.24,0,2.25-1.01,2.25-2.25V5.25 C21,4.01,19.99,3,18.75,3z M18.75,19.5H5.25c-0.35,0-0.64-0.25-0.72-0.58C4.9,18.6,7.23,16.4,12,16.51 c4.77-0.11,7.11,2.1,7.47,2.41C19.39,19.25,19.1,19.5,18.75,19.5z M19.5,17.03c-3.24-2.22-7.05-2.02-7.5-2.02 c-0.46,0-4.27-0.19-7.5,2.02V5.25c0-0.41,0.34-0.75,0.75-0.75h13.5c0.41,0,0.75,0.34,0.75,0.75V17.03z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,6C9.33,6,8.5,7.73,8.5,9.5c0,1.78,0.83,3.5,3.5,3.5c2.67,0,3.5-1.73,3.5-3.5C15.5,7.72,14.67,6,12,6z M12,11.5 c-0.43,0.01-2,0.13-2-2c0-2.14,1.58-2,2-2c0.43-0.01,2-0.13,2,2C14,11.64,12.42,11.5,12,11.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_backup.xml
new file mode 100644
index 0000000..5042a2a
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_backup.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.99,11.01c0,0,0-0.01,0-0.01c0-3.58-1.66-7-6.99-7C7.88,4,6.11,6.17,5.45,8.13C3.67,8.47,1.01,9.68,1.01,14 c0,3.06,1.41,6,6,6c0.15,0,11.33,0,11.49,0c3.42,0,4.5-2.22,4.5-4.5C22.99,11.64,20.17,11.08,18.99,11.01z M18.49,18.5h-6L7,18.5 c-3.07,0.05-4.5-1.56-4.5-4.5c0-2.55,1.05-3.98,3.22-4.4l0.86-0.16l0.28-0.83C7.48,6.8,9.08,5.47,12,5.5 c5.74-0.08,5.49,4.92,5.49,5.51v1.41l1.41,0.08c2.59,0.16,2.59,2.29,2.59,2.99C21.49,18.6,19.11,18.5,18.49,18.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.46,8.97l-3.48,3.48l1.06,1.06l2.21-2.21V16h1.5v-4.68l2.21,2.21l1.06-1.06l-3.5-3.5C12.23,8.68,11.75,8.68,11.46,8.97 z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_battery_white.xml
new file mode 100644
index 0000000..cc80eb7
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_battery_white.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16,4h-1V2.5C15,2.22,14.78,2,14.5,2h-5C9.22,2,9,2.22,9,2.5V4H8C6.9,4,6,4.9,6,6v12c0,2.21,1.79,4,4,4h4 c2.21,0,4-1.79,4-4V6C18,4.9,17.1,4,16,4z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_data_usage.xml
new file mode 100644
index 0000000..4388d99
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_data_usage.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.75,4c1.32,0.05,3.53,0.4,5.16,1.98c1.39,1.35,2.09,3.37,2.09,6c0,1.28-0.17,2.42-0.51,3.4l1.76,1.01 c0.49-1.28,0.75-2.75,0.75-4.42c0-3.19-0.91-5.69-2.69-7.43C17.2,2.5,14.41,2.06,12.75,2V4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.86,16.76c-0.27,0.45-0.59,0.86-0.96,1.22c-1.54,1.49-3.77,2.04-5.9,2c-2.17,0.04-4.36-0.48-5.91-1.99 C4.7,16.64,4,14.62,4,11.99c0-2.63,0.71-4.64,2.1-5.99C7.75,4.39,10.01,4.06,11.25,4V2C9.63,2.06,6.85,2.48,4.7,4.56 C2.91,6.3,2,8.8,2,11.99c0,3.19,0.91,5.69,2.69,7.43c2.48,2.42,5.91,2.6,7.31,2.56c2.38,0.15,5.36-0.69,7.29-2.57 c0.51-0.49,0.93-1.05,1.3-1.66L18.86,16.76z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_date_time.xml
new file mode 100644
index 0000000..58eb7f4
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_date_time.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.97,16.03l-3.5-3.5c-0.14-0.14-0.22-0.33-0.22-0.53V6h1.5v5.69l3.28,3.28L14.97,16.03z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_delete.xml
new file mode 100644
index 0000000..7b592b9
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_delete.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4V3H9v1H4v1.5h1V17c0,2.21,1.79,4,4,4h6c2.21,0,4-1.79,4-4V5.5h1V4H15z M17.5,17c0,1.38-1.12,2.5-2.5,2.5H9 c-1.38,0-2.5-1.12-2.5-2.5V5.5h11V17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 8 H 11 V 17 H 9.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 H 14.5 V 17 H 13 V 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_disable.xml
new file mode 100644
index 0000000..1a4bfaf
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_disable.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3.51c2.34,0,4.58,0.48,6.27,2.13C19.75,7.07,20.5,9.22,20.5,12c0,2.07-0.42,3.79-1.25,5.13l1.08,1.08 C21.43,16.59,22,14.51,22,12c0-3.2-0.9-5.71-2.68-7.44c-2.48-2.41-5.91-2.6-7.35-2.55C10.81,1.97,8.12,2.1,5.8,3.68l1.09,1.09 C8.37,3.85,10.16,3.51,12,3.51z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1.75,3.87L3.67,5.8C2.57,7.41,2,9.49,2,12c0,3.2,0.9,5.71,2.68,7.44c2.48,2.41,5.91,2.59,7.32,2.55 c2.98,0.11,5.04-0.88,6.2-1.67l1.93,1.93l1.06-1.06L2.81,2.81L1.75,3.87z M17.12,19.24c-1.28,0.79-2.99,1.29-5.12,1.25 c-2.3,0.04-4.62-0.52-6.27-2.13C4.25,16.92,3.5,14.78,3.5,12c0-2.07,0.42-3.79,1.25-5.12L17.12,19.24z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_display_white.xml
new file mode 100644
index 0000000..d4d4174
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_display_white.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,7V17c0.17,0,5,0.31,5-5C17,6.7,12.22,7,12,7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M22.78,11.47L20,8.69V4.75C20,4.34,19.66,4,19.25,4h-3.94l-2.78-2.78c-0.29-0.29-0.77-0.29-1.06,0L8.69,4H4.75 C4.34,4,4,4.34,4,4.75v3.94l-2.78,2.78c-0.29,0.29-0.29,0.77,0,1.06L4,15.31v3.94C4,19.66,4.34,20,4.75,20h3.94l2.78,2.78 C11.62,22.93,11.81,23,12,23s0.38-0.07,0.53-0.22L15.31,20h3.94c0.41,0,0.75-0.34,0.75-0.75v-3.94l2.78-2.78 C23.07,12.24,23.07,11.76,22.78,11.47z M18.72,14.47C18.58,14.61,18.5,14.8,18.5,15v3.5H15c-0.2,0-0.39,0.08-0.53,0.22L12,21.19 l-2.47-2.47C9.39,18.58,9.2,18.5,9,18.5H5.5V15c0-0.2-0.08-0.39-0.22-0.53L2.81,12l2.47-2.47C5.42,9.39,5.5,9.2,5.5,9V5.5H9 c0.2,0,0.39-0.08,0.53-0.22L12,2.81l2.47,2.47C14.61,5.42,14.8,5.5,15,5.5h3.5V9c0,0.2,0.08,0.39,0.22,0.53L21.19,12L18.72,14.47z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_enable.xml
new file mode 100644
index 0000000..e7f3973
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_enable.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.32,4.73C18,3.46,16.42,2.82,15.01,2.5v1.53c1.1,0.29,2.28,0.82,3.26,1.77c1.48,1.43,2.23,3.55,2.23,6.3 c0,2.75-0.75,4.87-2.24,6.29c-1.63,1.57-4,2.16-6.26,2.11c-2.31,0.04-4.62-0.51-6.27-2.11c-1.48-1.43-2.23-3.55-2.23-6.3 c0-2.75,0.75-4.87,2.24-6.29c0.98-0.94,2.17-1.46,3.25-1.75V2.5C7.6,2.82,6.02,3.46,4.7,4.73C2.91,6.45,2,8.93,2,12.1 c0,3.17,0.9,5.65,2.68,7.37c2.48,2.39,5.92,2.57,7.32,2.53c4.56,0.16,6.98-2.22,7.3-2.53c1.79-1.72,2.7-4.2,2.7-7.36 C22,8.92,21.1,6.44,19.32,4.73z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M8.04,10.47l-1.06,1.06l4.5,4.5c0.14,0.14,0.33,0.22,0.53,0.22s0.39-0.08,0.53-0.22l4.5-4.5l-1.06-1.06l-3.21,3.22V2h-1.5 v11.68L8.04,10.47z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_home.xml
new file mode 100644
index 0000000..491c841
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_home.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.07,8.19l-6.63-4.8c-0.26-0.19-0.62-0.19-0.88,0l-6.63,4.8C4.35,8.62,4,9.3,4,10.02v8.73C4,19.99,5.01,21,6.25,21h11.5 c1.24,0,2.25-1.01,2.25-2.25v-8.73C20,9.3,19.65,8.62,19.07,8.19z M14.25,19.5h-4.5v-5c0-0.41,0.34-0.75,0.75-0.75h3 c0.41,0,0.75,0.34,0.75,0.75V19.5z M18.5,18.75c0,0.41-0.34,0.75-0.75,0.75h-2v-5c0-1.24-1.01-2.25-2.25-2.25h-3 c-1.24,0-2.25,1.01-2.25,2.25v5h-2c-0.41,0-0.75-0.34-0.75-0.75v-8.73c0-0.24,0.12-0.47,0.31-0.61L12,4.93l6.19,4.48 c0.19,0.14,0.31,0.37,0.31,0.61V18.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_language.xml
new file mode 100644
index 0000000..8a24d89
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_language.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c10.62,0,10-9.72,10-10C22,6.91,19.65,2,12,2z M19.89,8.17h-4.1 c-0.26-2.13-0.73-3.54-1.25-4.45C16.56,4.13,18.84,5.25,19.89,8.17z M12,3.51c0.42-0.01,1.76,0.52,2.29,4.66H9.74 C10.07,5.63,10.78,3.51,12,3.51z M3.71,9.67h4.36c-0.09,1.39-0.1,3.04,0,4.67H3.71C3.5,13.17,3.37,11.52,3.71,9.67z M4.11,15.83 h4.1c0.26,2.13,0.73,3.54,1.25,4.45C7.44,19.87,5.16,18.75,4.11,15.83z M8.21,8.17h-4.1c1.06-2.92,3.35-4.04,5.37-4.45 C8.95,4.63,8.47,6.03,8.21,8.17z M12,20.49c-0.42,0.01-1.76-0.52-2.29-4.66h4.54C13.92,18.38,13.21,20.49,12,20.49z M14.41,14.33 H9.57c-0.14-2.1-0.06-3.74,0.01-4.67h4.84C14.56,11.78,14.48,13.41,14.41,14.33z M14.52,20.28c0.53-0.91,1-2.32,1.26-4.45h4.1 C18.83,18.75,16.55,19.88,14.52,20.28z M15.93,14.33c0.09-1.39,0.1-3.04,0-4.67h4.36c0.21,1.16,0.34,2.81,0,4.67H15.93z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_location.xml
new file mode 100644
index 0000000..2d1de94
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_location.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,6c-1.88,0-3,1.04-3,3c0,1.91,1.06,3,3,3c1.89,0,3-1.05,3-3C15,7.08,13.93,6,12,6z M12,10.5 c-1.15,0.01-1.5-0.47-1.5-1.5c0-1.06,0.37-1.5,1.5-1.5c1.15-0.01,1.5,0.47,1.5,1.5C13.5,10.09,13.1,10.5,12,10.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.99,2C9.69,1.94,5,2.93,5,9c0,6.88,6.23,12.56,6.5,12.8c0.14,0.13,0.32,0.2,0.5,0.2s0.36-0.06,0.5-0.2 C12.77,21.56,19,15.88,19,9C19,2.87,14.3,1.96,11.99,2z M12,20.2C10.55,18.7,6.5,14.12,6.5,9c0-4.91,3.63-5.55,5.44-5.5 C16.9,3.34,17.5,7.14,17.5,9C17.5,14.13,13.45,18.7,12,20.2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_multiuser.xml
new file mode 100644
index 0000000..484946f
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_multiuser.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,12c3.05,0,4-1.98,4-4c0-2.04-0.95-4-4-4C8.96,4,8,5.97,8,8C8,10.04,8.95,12,12,12z M12,5.5c0.52,0,2.5-0.13,2.5,2.5 c0,2.62-1.97,2.51-2.5,2.5c-0.52,0-2.5,0.13-2.5-2.5C9.5,5.38,11.48,5.49,12,5.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,13c-7.22-0.05-8,2.69-8,3.89v1.36C4,19.21,4.79,20,5.75,20h12.5c0.96,0,1.75-0.79,1.75-1.75v-1.36 C20,13.15,13.86,12.99,12,13z M18.5,18.25c0,0.14-0.11,0.25-0.25,0.25H5.75c-0.14,0-0.25-0.11-0.25-0.25v-1.36 c0-2.39,5.91-2.4,6.5-2.39c0.26,0,6.5-0.1,6.5,2.39V18.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_night_display.xml
new file mode 100644
index 0000000..b064d70
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_night_display.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.29,22C6.62,22,2,17.38,2,11.71c0-4.3,2.71-8.19,6.76-9.67c0.61-0.22,1.19,0.38,0.96,0.98 c-1.04,2.64-0.97,7.28,1.42,9.75c3.01,3.11,8.41,2.07,9.85,1.51c0.59-0.23,1.2,0.35,0.98,0.96C20.48,19.28,16.59,22,12.29,22z M7.82,4.14C5.19,5.7,3.5,8.58,3.5,11.71c0,4.85,3.94,8.79,8.79,8.79c3.14,0,6.02-1.69,7.58-4.33c-1.72,0.35-6.72,0.83-9.81-2.35 C7.25,10.93,7.35,6.45,7.82,4.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_open.xml
new file mode 100644
index 0000000..66f0fca
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_open.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,18.75c0,0.41-0.34,0.75-0.75,0.75H5.25c-0.41,0-0.75-0.34-0.75-0.75V5.25c0-0.41,0.34-0.75,0.75-0.75H12V3H5.25 C4.01,3,3,4.01,3,5.25v13.5C3,19.99,4.01,21,5.25,21h13.5c1.24,0,2.25-1.01,2.25-2.25V12h-1.5V18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.25,3H14v1.5h4.44L7.97,14.97l1.06,1.06L19.5,5.56V10H21V3.75C21,3.34,20.66,3,20.25,3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_print.xml
new file mode 100644
index 0000000..cfec073
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_print.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,8H18V5.25C18,4.01,16.99,3,15.75,3h-7.5C7.01,3,6,4.01,6,5.25V8H4.25C3.01,8,2,9.01,2,10.25v4.5 C2,15.99,3.01,17,4.25,17H6v1.75C6,19.99,7.01,21,8.25,21h7.5c1.24,0,2.25-1.01,2.25-2.25V17h1.75c1.24,0,2.25-1.01,2.25-2.25 v-4.5C22,9.01,20.99,8,19.75,8z M7.5,5.25c0-0.41,0.34-0.75,0.75-0.75h7.5c0.41,0,0.75,0.34,0.75,0.75V8h-9V5.25z M16.5,18.75 c0,0.41-0.34,0.75-0.75,0.75h-7.5c-0.41,0-0.75-0.34-0.75-0.75V14.5h9V18.75z M20.5,14.75c0,0.41-0.34,0.75-0.75,0.75H18v-1.75 c0-0.41-0.34-0.75-0.75-0.75H6.75C6.34,13,6,13.34,6,13.75v1.75H4.25c-0.41,0-0.75-0.34-0.75-0.75v-4.5 c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V14.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 10.5 C 18.5522847498 10.5 19 10.9477152502 19 11.5 C 19 12.0522847498 18.5522847498 12.5 18 12.5 C 17.4477152502 12.5 17 12.0522847498 17 11.5 C 17 10.9477152502 17.4477152502 10.5 18 10.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_privacy.xml
new file mode 100644
index 0000000..b8e5a7d
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_privacy.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M22.74,11.4C20.87,7.33,16.77,4.5,12,4.5S3.13,7.33,1.26,11.4c-0.17,0.38-0.17,0.83,0,1.21c1.87,4.07,5.97,6.9,10.74,6.9 c0.68,0,1.35-0.06,2-0.18v-1.55C13.35,17.91,12.68,18,12,18c-4.02,0-7.7-2.36-9.38-5.98C4.3,8.36,7.98,6,12,6s7.7,2.36,9.38,5.98 c-0.08,0.17-0.19,0.33-0.28,0.5c0.47,0.22,0.9,0.51,1.27,0.85c0.13-0.24,0.25-0.48,0.37-0.73C22.92,12.22,22.92,11.78,22.74,11.4 z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.5,12c0-2.3-1.06-4.5-4.5-4.5c-3.43,0-4.5,2.22-4.5,4.5c0,2.3,1.06,4.5,4.5,4.5c0.83,0,1.52-0.14,2.09-0.36 c0.26-1.46,1.14-2.69,2.37-3.42C16.48,12.48,16.5,12.24,16.5,12z M12,15c-3.05,0.04-3-2.35-3-3c0-0.63-0.04-3.06,3-3 c3.05-0.04,3,2.35,3,3C15,12.63,15.04,15.06,12,15z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21,17v-1c0-1.1-0.9-2-2-2s-2,0.9-2,2v1c-0.55,0-1,0.45-1,1v3c0,0.55,0.45,1,1,1h4c0.55,0,1-0.45,1-1v-3 C22,17.45,21.55,17,21,17z M18.5,16c0-0.28,0.22-0.5,0.5-0.5s0.5,0.22,0.5,0.5v1h-1V16z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_security_white.xml
new file mode 100644
index 0000000..0475e33
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_security_white.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,1C17.03,0.96,14,1.62,14,5.5v2.49H6.25C5.01,7.99,4,9,4,10.24v9.51C4,20.99,5.01,22,6.25,22h11.5 c1.24,0,2.25-1.01,2.25-2.25v-9.51c0-1.24-1.01-2.25-2.25-2.25H15.5V5.5c0-2.77,2-3.01,3.05-3c1.02-0.02,2.96,0.28,2.96,3V6H23 V5.5C23,1.6,19.97,0.96,18.5,1z M17.75,9.49c0.41,0,0.75,0.34,0.75,0.75v9.51c0,0.41-0.34,0.75-0.75,0.75H6.25 c-0.41,0-0.75-0.34-0.75-0.75v-9.51c0-0.41,0.34-0.75,0.75-0.75H17.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,17.74c0.13,0,2.75,0.06,2.75-2.75c0-2.34-1.85-2.77-2.74-2.75c-0.89-0.02-2.76,0.4-2.76,2.75 C9.25,17.41,11.19,17.74,12,17.74z M12.03,13.74c1.32-0.06,1.22,1.22,1.22,1.25c0,0.89-0.42,1.26-1.25,1.25 c-0.81,0.01-1.25-0.34-1.25-1.25C10.75,14.15,11.12,13.73,12.03,13.74z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_sim.xml
new file mode 100644
index 0000000..ae34d85
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_sim.xml
@@ -0,0 +1,24 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.75,2h-6.88C10.28,2,9.7,2.24,9.28,2.66L4.66,7.28C4.24,7.7,4,8.28,4,8.87v10.88C4,20.99,5.01,22,6.25,22h11.5 c1.24,0,2.25-1.01,2.25-2.25V4.25C20,3.01,18.99,2,17.75,2z M18.5,19.75c0,0.41-0.34,0.75-0.75,0.75H6.25 c-0.41,0-0.75-0.34-0.75-0.75V8.87c0-0.2,0.08-0.39,0.22-0.53l4.62-4.62c0.14-0.14,0.33-0.22,0.53-0.22h6.88 c0.41,0,0.75,0.34,0.75,0.75V19.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7 11 H 8.5 V 16 H 7 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.5 11 H 17 V 16 H 15.5 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 14 H 12.75 V 19 H 11.25 V 14 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 11 C 12.4142135624 11 12.75 11.3357864376 12.75 11.75 C 12.75 12.1642135624 12.4142135624 12.5 12 12.5 C 11.5857864376 12.5 11.25 12.1642135624 11.25 11.75 C 11.25 11.3357864376 11.5857864376 11 12 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16.25 17.5 C 16.6642135624 17.5 17 17.8357864376 17 18.25 C 17 18.6642135624 16.6642135624 19 16.25 19 C 15.8357864376 19 15.5 18.6642135624 15.5 18.25 C 15.5 17.8357864376 15.8357864376 17.5 16.25 17.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.75 17.5 C 8.16421356237 17.5 8.5 17.8357864376 8.5 18.25 C 8.5 18.6642135624 8.16421356237 19 7.75 19 C 7.33578643763 19 7 18.6642135624 7 18.25 C 7 17.8357864376 7.33578643763 17.5 7.75 17.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml
new file mode 100644
index 0000000..0c0a682
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 7 C 12.4142135624 7 12.75 7.33578643763 12.75 7.75 C 12.75 8.16421356237 12.4142135624 8.5 12 8.5 C 11.5857864376 8.5 11.25 8.16421356237 11.25 7.75 C 11.25 7.33578643763 11.5857864376 7 12 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_wireless.xml
new file mode 100644
index 0000000..2899c7f
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_wireless.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.14,6c4.29,0.06,7.79,2.34,9.81,4.05l1.07-1.07c-2.26-1.94-6.06-4.41-10.86-4.48C8.32,4.46,4.57,5.96,1,9l1.07,1.07 C5.33,7.32,8.72,5.95,12.14,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.97,11.5c0.04,0,0.08,0,0.12,0c2.54,0.04,4.67,1.25,6.07,2.34l1.08-1.08c-1.6-1.28-4.07-2.71-7.13-2.76 c-2.54-0.03-4.99,0.91-7.33,2.78l1.07,1.07C7.84,12.3,9.89,11.5,11.97,11.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.98,17.5c0.02,0,0.04,0,0.05,0c0.73,0.01,1.38,0.24,1.93,0.53l1.1-1.1c-0.79-0.49-1.81-0.92-3.01-0.93 c-1.07-0.01-2.12,0.31-3.12,0.94l1.1,1.1C10.68,17.69,11.33,17.5,11.98,17.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage.xml
new file mode 100644
index 0000000..6c96cee
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,4H4C3.45,4,3,4.45,3,5v2c0,0.55,0.45,1,1,1h16c0.55,0,1-0.45,1-1V5C21,4.45,20.55,4,20,4z M6,7C5.96,7,5,7.06,5,6 c0-1.06,0.97-1,1-1c0.04,0,1-0.06,1,1C7,7.06,6.03,7,6,7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,10H4c-0.55,0-1,0.45-1,1v2c0,0.55,0.45,1,1,1h16c0.55,0,1-0.45,1-1v-2C21,10.45,20.55,10,20,10z M6,13 c-0.04,0-1,0.06-1-1c0-1.06,0.97-1,1-1c0.04,0,1-0.06,1,1C7,13.06,6.03,13,6,13z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,16H4c-0.55,0-1,0.45-1,1v2c0,0.55,0.45,1,1,1h16c0.55,0,1-0.45,1-1v-2C21,16.45,20.55,16,20,16z M6,19 c-0.04,0-1,0.06-1-1c0-1.06,0.97-1,1-1c0.04,0,1-0.06,1,1C7,19.06,6.03,19,6,19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage_white.xml
new file mode 100644
index 0000000..7b5d946
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage_white.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,4H4C3.45,4,3,4.45,3,5v2c0,0.55,0.45,1,1,1h16c0.55,0,1-0.45,1-1V5C21,4.45,20.55,4,20,4z M6,7C5.96,7,5,7.06,5,6 c0-1.06,0.97-1,1-1c0.04,0,1-0.06,1,1C7,7.06,6.03,7,6,7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,10H4c-0.55,0-1,0.45-1,1v2c0,0.55,0.45,1,1,1h16c0.55,0,1-0.45,1-1v-2C21,10.45,20.55,10,20,10z M6,13 c-0.04,0-1,0.06-1-1c0-1.06,0.97-1,1-1c0.04,0,1-0.06,1,1C7,13.06,6.03,13,6,13z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,16H4c-0.55,0-1,0.45-1,1v2c0,0.55,0.45,1,1,1h16c0.55,0,1-0.45,1-1v-2C21,16.45,20.55,16,20,16z M6,19 c-0.04,0-1,0.06-1-1c0-1.06,0.97-1,1-1c0.04,0,1-0.06,1,1C7,19.06,6.03,19,6,19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_suggestion_night_display.xml
new file mode 100644
index 0000000..b064d70
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_suggestion_night_display.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.29,22C6.62,22,2,17.38,2,11.71c0-4.3,2.71-8.19,6.76-9.67c0.61-0.22,1.19,0.38,0.96,0.98 c-1.04,2.64-0.97,7.28,1.42,9.75c3.01,3.11,8.41,2.07,9.85,1.51c0.59-0.23,1.2,0.35,0.98,0.96C20.48,19.28,16.59,22,12.29,22z M7.82,4.14C5.19,5.7,3.5,8.58,3.5,11.71c0,4.85,3.94,8.79,8.79,8.79c3.14,0,6.02-1.69,7.58-4.33c-1.72,0.35-6.72,0.83-9.81-2.35 C7.25,10.93,7.35,6.45,7.82,4.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync.xml
new file mode 100644
index 0000000..7226da9
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.84,17.94C19.27,16.55,20,14.55,20,12c0-2.59-0.74-4.6-2.2-6l-1.03,1.09c1.15,1.1,1.74,2.75,1.74,4.91 c0,2.13-0.57,3.77-1.71,4.87c-1.46,1.41-3.79,1.87-6.15,1.55l1.88-1.88l-1.06-1.06l-3,3c-0.29,0.29-0.29,0.77,0,1.06l3,3 l1.06-1.06l-1.5-1.5C12.95,20.11,15.77,19.95,17.84,17.94z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.21,7.13c1.46-1.41,3.85-1.87,6.15-1.55l-1.89,1.89l1.06,1.06l3-3c0.29-0.29,0.29-0.77,0-1.06l-3-3l-1.06,1.06l1.5,1.5 c-1.09-0.08-4.45-0.26-6.8,2.03C4.73,7.45,4,9.45,4,12c0,2.59,0.74,4.6,2.2,6l1.03-1.09C6.08,15.81,5.5,14.16,5.5,12 C5.5,9.87,6.07,8.23,7.21,7.13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml
new file mode 100644
index 0000000..3a310ab
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11.1,5.56L10.9,4.08C6.96,4.62,4,8.02,4,12c0,2.62,1.3,5.02,3.36,6.5H5V20h5.25c0.41,0,0.75-0.34,0.75-0.75V14H9.5v3.98 c-2.38-1-4-3.35-4-5.98C5.5,8.77,7.91,6,11.1,5.56z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.5,13c-2.67,0-3.5,1.73-3.5,3.5c0,1.78,0.83,3.5,3.5,3.5c2.67,0,3.5-1.73,3.5-3.5C20,14.72,19.17,13,16.5,13z M16.5,19 c-0.02,0-0.5,0.03-0.5-0.5c0-0.53,0.48-0.5,0.5-0.5c0.02,0,0.5-0.03,0.5,0.5C17,19.03,16.52,19,16.5,19z M17,17h-1v-3h1V17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.5,6.02c2.36,0.99,3.96,3.3,3.99,5.9c0.54,0.24,1.03,0.57,1.45,0.97C19.98,12.6,20,12.3,20,12 c0-2.62-1.3-5.02-3.36-6.5H19V4h-5.25C13.34,4,13,4.34,13,4.75V10h1.5V6.02z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_system_update.xml
new file mode 100644
index 0000000..aa32400
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_system_update.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.75,1h-9.5C6.01,1,5,2.01,5,3.25v17.5C5,21.99,6.01,23,7.25,23h9.5c1.24,0,2.25-1.01,2.25-2.25V3.25 C19,2.01,17.99,1,16.75,1z M7.25,2.5h9.5c0.41,0,0.75,0.34,0.75,0.75v1h-11v-1C6.5,2.84,6.84,2.5,7.25,2.5z M17.5,5.75v12.5h-11 V5.75H17.5z M16.75,21.5h-9.5c-0.41,0-0.75-0.34-0.75-0.75v-1h11v1C17.5,21.16,17.16,21.5,16.75,21.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.97,12.53l3.5,3.5c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22l3.5-3.5l-1.06-1.06l-2.22,2.22V8h-1.5v5.69 l-2.22-2.22L7.97,12.53z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml
new file mode 100644
index 0000000..95a36f6
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,6H3.25C2.01,6,1,7.01,1,8.25v7.5C1,16.99,2.01,18,3.25,18h17.5c1.24,0,2.25-1.01,2.25-2.25v-7.5 C23,7.01,21.99,6,20.75,6z M21.5,15.75c0,0.41-0.34,0.75-0.75,0.75H3.25c-0.41,0-0.75-0.34-0.75-0.75v-7.5 c0-0.41,0.34-0.75,0.75-0.75h17.5c0.41,0,0.75,0.34,0.75,0.75V15.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.75 9 L 6.25 9 L 6.25 11.25 L 4 11.25 L 4 12.75 L 6.25 12.75 L 6.25 15 L 7.75 15 L 7.75 12.75 L 10 12.75 L 10 11.25 L 7.75 11.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,9C18.45,9,17,8.91,17,10.5c0,1.59,1.43,1.5,1.5,1.5c0.05,0,1.5,0.09,1.5-1.5C20,8.91,18.57,9,18.5,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.5,12c-0.05,0-1.5-0.09-1.5,1.5c0,1.59,1.43,1.5,1.5,1.5c0.05,0,1.5,0.09,1.5-1.5C16,11.91,14.57,12,14.5,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml
new file mode 100644
index 0000000..629207f
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.75,4h-5.5C8.01,4,7,5.01,7,6.25v11.5C7,18.99,8.01,20,9.25,20h5.5c1.24,0,2.25-1.01,2.25-2.25V6.25 C17,5.01,15.99,4,14.75,4z M15.5,17.75c0,0.41-0.34,0.75-0.75,0.75h-5.5c-0.41,0-0.75-0.34-0.75-0.75V6.25 c0-0.41,0.34-0.75,0.75-0.75h5.5c0.41,0,0.75,0.34,0.75,0.75V17.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 7 H 19.5 V 17 H 18 V 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21 9 H 22.5 V 15 H 21 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1.5 9 H 3 V 15 H 1.5 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4.5 7 H 6 V 17 H 4.5 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_up_24dp.xml
new file mode 100644
index 0000000..019fed9
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_up_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14,3.3v1.58c2.35,0.89,5.55,3.95,5.5,7.18c-0.06,3.65-3.79,6.41-5.5,7.05v1.58c1.12-0.33,6.92-3.18,7-8.61 C21.07,7.39,16.32,3.99,14,3.3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.5,12.05c0.01-0.53-0.02-2.55-2.5-4.54v9C15.72,15.12,16.48,13.52,16.5,12.05z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9.86,6.08L6.95,9H6c-2.56,0-3.02,2.02-3,2.99C2.97,12.96,3.44,15,6,15h0.95l2.91,2.92C10.69,18.75,12,18.1,12,17.04V6.96 C12,5.85,10.65,5.29,9.86,6.08z M10.5,16.43l-2.7-2.71c-0.14-0.14-0.33-0.22-0.53-0.22H6c-1.42,0-1.51-0.99-1.5-1.54 C4.47,10.73,5.29,10.5,6,10.5h1.26c0.2,0,0.39-0.08,0.53-0.22l2.7-2.71V16.43z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_vpn_key.xml
new file mode 100644
index 0000000..e6d9220
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_vpn_key.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,9.5h-7.2c-0.93-2.27-3.12-3.02-5.06-3C5.7,6.46,2,7.23,2,12c0,4.8,3.7,5.53,5.5,5.5c1.88,0.06,4.12-0.71,5.05-3 h1.95v1.25c0,1.24,1.01,2.25,2.25,2.25h0.5c1.24,0,2.25-1.01,2.25-2.25V14.5h0.25c1.24,0,2.25-1.01,2.25-2.25v-0.5 C22,10.51,20.99,9.5,19.75,9.5z M20.5,12.25c0,0.41-0.34,0.75-0.75,0.75h-1C18.34,13,18,13.34,18,13.75v2 c0,0.41-0.34,0.75-0.75,0.75h-0.5c-0.41,0-0.75-0.34-0.75-0.75v-2c0-0.41-0.34-0.75-0.75-0.75h-3.23c-0.33,0-0.63,0.22-0.72,0.54 c-0.68,2.36-3.04,2.48-3.85,2.45C6.1,16.04,3.5,15.58,3.5,12C3.5,8.35,6.18,7.97,7.55,8c0.91-0.03,3.09,0.17,3.75,2.45 c0.09,0.32,0.39,0.54,0.72,0.54h7.73c0.41,0,0.75,0.34,0.75,0.75V12.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.5,10.5C7.45,10.5,6,10.41,6,12c0,1.59,1.43,1.5,1.5,1.5C7.55,13.5,9,13.59,9,12C9,10.41,7.57,10.5,7.5,10.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_wifi_tethering.xml
new file mode 100644
index 0000000..6193eb5
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_wifi_tethering.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,11.09c-2.03,0-1.91,1.83-1.91,1.91c0,0.06-0.12,1.91,1.91,1.91c2.03,0,1.91-1.83,1.91-1.91 C13.91,12.93,14.03,11.09,12,11.09z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.75,6.2c-0.89-0.95-3.32-3.15-6.67-3.2c-2.39-0.01-4.7,1.05-6.86,3.21C3.05,8.39,1.97,10.7,2,13.08 c0.04,3.31,2.24,5.76,3.22,6.69l1.06-1.06l-0.05-0.05c-0.81-0.77-2.69-2.85-2.73-5.6C3.47,11.1,4.41,9.15,6.28,7.28 C7,6.56,9.1,4.5,12.06,4.5c2.26,0.03,4.14,1.26,5.71,2.84c0.81,0.77,2.69,2.85,2.73,5.6c0.03,1.96-0.91,3.91-2.78,5.78l1.06,1.06 c2.17-2.17,3.25-4.48,3.22-6.86C21.96,9.6,19.75,7.15,18.75,6.2z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.07,8.92C15.25,8.04,13.79,7,11.98,7C10.56,7,9.2,7.65,7.92,8.92c-1.3,1.3-1.94,2.69-1.92,4.13 c0.03,2,1.34,3.47,1.92,4.02l1.06-1.06l-0.04-0.04c-0.43-0.41-1.43-1.51-1.45-2.95c-0.01-1.03,0.49-2.05,1.49-3.05 c0.98-0.98,1.99-1.48,3-1.48c0.43,0,1.6,0.05,3.07,1.52c0.43,0.41,1.43,1.51,1.45,2.95c0.01,1.02-0.49,2.05-1.48,3.05l1.06,1.06 c1.29-1.3,1.94-2.69,1.92-4.13C17.97,10.94,16.65,9.47,16.07,8.92z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiSystemUIOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..ce80fcf
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.kai.systemui"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.systemui" android:category="android.theme.customization.icon_pack.systemui" android:priority="1"/>
+    <application android:label="Kai" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm.xml
new file mode 100644
index 0000000..8efc9b5
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,4.01c-6.86,0-9,4.44-9,8.99c0,4.59,2.12,8.99,9,8.99c6.86,0,9-4.44,9-8.99C21,8.41,18.88,4.01,12,4.01z M12,20.49 C11.44,20.5,4.5,21.06,4.5,13c0-2.3,0.59-7.49,7.5-7.49c0.56-0.01,7.5-0.56,7.5,7.49C19.5,21.02,12.53,20.49,12,20.49z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1.84 3.56 H 7.84 V 5.06 H 1.84 V 3.56 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.41 1.31 H 19.91 V 7.31 H 18.41 V 1.31 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.5,8H11v4.88c0,0.4,0.16,0.78,0.44,1.06l3.1,3.1l1.06-1.06l-3.1-3.1V8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm_dim.xml
new file mode 100644
index 0000000..8efc9b5
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm_dim.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,4.01c-6.86,0-9,4.44-9,8.99c0,4.59,2.12,8.99,9,8.99c6.86,0,9-4.44,9-8.99C21,8.41,18.88,4.01,12,4.01z M12,20.49 C11.44,20.5,4.5,21.06,4.5,13c0-2.3,0.59-7.49,7.5-7.49c0.56-0.01,7.5-0.56,7.5,7.49C19.5,21.02,12.53,20.49,12,20.49z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1.84 3.56 H 7.84 V 5.06 H 1.84 V 3.56 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.41 1.31 H 19.91 V 7.31 H 18.41 V 1.31 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.5,8H11v4.88c0,0.4,0.16,0.78,0.44,1.06l3.1,3.1l1.06-1.06l-3.1-3.1V8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_arrow_back.xml
new file mode 100644
index 0000000..c5f2b3b
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,11.25H6.89l6.18-6.18l-1.06-1.06l-7.47,7.47c-0.29,0.29-0.29,0.77,0,1.06l7.47,7.47l1.06-1.06l-6.2-6.2H20V11.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml
new file mode 100644
index 0000000..b277caf
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6.5,12c0-1.59-1.43-1.5-1.5-1.5c-0.05,0-1.5-0.09-1.5,1.5c0,1.59,1.43,1.5,1.5,1.5C5.05,13.5,6.5,13.59,6.5,12z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,10.5c-0.05,0-1.5-0.09-1.5,1.5c0,1.59,1.43,1.5,1.5,1.5c0.05,0,1.5,0.09,1.5-1.5C20.5,10.41,19.07,10.5,19,10.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13.06,12l3.65-3.67c0.39-0.39,0.39-1.02,0.01-1.41L12.69,2.8c-0.2-0.21-0.45-0.3-0.69-0.3c-0.51,0-0.99,0.4-0.99,1V9.9 v0.03L6.53,5.45L5.47,6.51l5.41,5.41l-5.41,5.41l1.06,1.06L11,13.92v0.15v6.43c0,0.6,0.49,1,0.99,1c0.24,0,0.49-0.09,0.69-0.29 l4.03-4.05c0.39-0.39,0.39-1.02,0.01-1.41L13.06,12z M12.48,4.72l2.84,2.91l-2.84,2.85V4.72z M12.48,19.3v-5.76l2.84,2.91 L12.48,19.3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_camera.xml
new file mode 100644
index 0000000..faee6d2
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_camera.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,9c-3.05,0-4,1.97-4,4c0,2.04,0.94,4,4,4c3.05,0,4-1.97,4-4C16,10.96,15.06,9,12,9z M12,15.5 c-0.53,0.01-2.5,0.12-2.5-2.5c0-2.61,1.95-2.51,2.5-2.5c0.53-0.01,2.5-0.13,2.5,2.5C14.5,15.61,12.55,15.51,12,15.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,5H17l-1.71-1.71C15.11,3.11,14.85,3,14.59,3H9.41C9.15,3,8.89,3.11,8.71,3.29L7,5H4.25C3.01,5,2,6.01,2,7.25v11.5 C2,19.99,3.01,21,4.25,21h15.5c1.24,0,2.25-1.01,2.25-2.25V7.25C22,6.01,20.99,5,19.75,5z M20.5,18.75c0,0.41-0.34,0.75-0.75,0.75 H4.25c-0.41,0-0.75-0.34-0.75-0.75V7.25c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V18.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast.xml
new file mode 100644
index 0000000..f935476
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,3H3.25C2.01,3,1,4.01,1,5.25V8h1.5V5.25c0-0.41,0.34-0.75,0.75-0.75h17.5c0.41,0,0.75,0.34,0.75,0.75v13.5 c0,0.41-0.34,0.75-0.75,0.75H14V21h6.75c1.24,0,2.25-1.01,2.25-2.25V5.25C23,4.01,21.99,3,20.75,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,10.25v1.5c5.1,0,9.25,4.15,9.25,9.25h1.5C11.75,15.07,6.93,10.25,1,10.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,14.25v1.5c2.9,0,5.25,2.35,5.25,5.25h1.5C7.75,17.28,4.72,14.25,1,14.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,18.25v1.5c0.69,0,1.25,0.56,1.25,1.25h1.5C3.75,19.48,2.52,18.25,1,18.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast_connected.xml
new file mode 100644
index 0000000..ac7c82d
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast_connected.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.75,15.5H14V17h2.75c1.24,0,2.25-1.01,2.25-2.25v-5.5C19,8.01,17.99,7,16.75,7H5v1.5h11.75c0.41,0,0.75,0.34,0.75,0.75 v5.5C17.5,15.16,17.16,15.5,16.75,15.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,3H3.25C2.01,3,1,4.01,1,5.25V8h1.5V5.25c0-0.41,0.34-0.75,0.75-0.75h17.5c0.41,0,0.75,0.34,0.75,0.75v13.5 c0,0.41-0.34,0.75-0.75,0.75H14V21h6.75c1.24,0,2.25-1.01,2.25-2.25V5.25C23,4.01,21.99,3,20.75,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,10.25v1.5c5.1,0,9.25,4.15,9.25,9.25h1.5C11.75,15.07,6.93,10.25,1,10.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,14.25v1.5c2.9,0,5.25,2.35,5.25,5.25h1.5C7.75,17.28,4.72,14.25,1,14.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,18.25v1.5c0.69,0,1.25,0.56,1.25,1.25h1.5C3.75,19.48,2.52,18.25,1,18.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_close_white.xml
new file mode 100644
index 0000000..9f2a4c0
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_close_white.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 18.78 6.28 L 17.72 5.22 L 12 10.94 L 6.28 5.22 L 5.22 6.28 L 10.94 12 L 5.22 17.72 L 6.28 18.78 L 12 13.06 L 17.72 18.78 L 18.78 17.72 L 13.06 12 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver.xml
new file mode 100644
index 0000000..89c8008
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 L 11.25 11.25 L 8 11.25 L 8 12.75 L 11.25 12.75 L 11.25 16 L 12.75 16 L 12.75 12.75 L 16 12.75 L 16 11.25 L 12.75 11.25 L 12.75 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.31,4.55C17.2,2.5,14.41,2.06,12.75,2v2c1.32,0.05,3.53,0.4,5.16,1.98c1.39,1.35,2.09,3.37,2.09,6 c0,1.28-0.17,2.42-0.51,3.4l1.76,1.01c0.49-1.28,0.75-2.75,0.75-4.42C22,8.79,21.09,6.29,19.31,4.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.9,17.98c-1.54,1.49-3.77,2.04-5.9,2c-2.17,0.04-4.36-0.48-5.91-1.99C4.7,16.64,4,14.62,4,11.99 c0-2.63,0.71-4.64,2.1-5.99C7.75,4.39,10.01,4.06,11.25,4V2C9.63,2.06,6.85,2.48,4.7,4.56C2.91,6.3,2,8.8,2,11.99 c0,3.19,0.91,5.69,2.69,7.43c2.48,2.42,5.91,2.6,7.31,2.56c2.38,0.15,5.36-0.69,7.29-2.57c0.51-0.49,0.93-1.05,1.3-1.66l-1.73-1 C18.59,17.21,18.27,17.62,17.9,17.98z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver_off.xml
new file mode 100644
index 0000000..d6b0785
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.75,4c1.32,0.05,3.53,0.4,5.16,1.98c1.39,1.35,2.09,3.37,2.09,6c0,1.28-0.17,2.42-0.51,3.4l1.76,1.01 c0.49-1.28,0.75-2.75,0.75-4.42c0-3.19-0.91-5.69-2.69-7.43C17.2,2.5,14.41,2.06,12.75,2V4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.86,16.76c-0.27,0.45-0.59,0.86-0.96,1.22c-1.54,1.49-3.77,2.04-5.9,2c-2.17,0.04-4.36-0.48-5.91-1.99 C4.7,16.64,4,14.62,4,11.99c0-2.63,0.71-4.64,2.1-5.99C7.75,4.39,10.01,4.06,11.25,4V2C9.63,2.06,6.85,2.48,4.7,4.56 C2.91,6.3,2,8.8,2,11.99c0,3.19,0.91,5.69,2.69,7.43c2.48,2.42,5.91,2.6,7.31,2.56c2.38,0.15,5.36-0.69,7.29-2.57 c0.51-0.49,0.93-1.05,1.3-1.66L18.86,16.76z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_drag_handle.xml
new file mode 100644
index 0000000..9b216bd
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_drag_handle.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 4 9 H 20 V 10.5 H 4 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 13.5 H 20 V 15 H 4 V 13.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset.xml
new file mode 100644
index 0000000..7a23562
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C8.88,1.93,2.5,3.19,2.5,11.5v6.25c0,1.02,0.3,1.83,0.89,2.4C4.16,20.9,5.18,21,5.65,21C8.13,21,9,19.41,9,17.75v-2.5 c0-2.78-2.18-3.28-3.24-3.25C5.43,11.99,4.7,12.03,4,12.41V11.5C4,4.3,9.31,3.5,12,3.5c7.24,0,8,5.28,8,7.99v0.91 c-0.69-0.38-1.42-0.41-1.75-0.41C17.2,11.96,15,12.47,15,15.25v2.5c0,3.33,3.08,3.25,3.25,3.25c1.05,0.04,3.25-0.47,3.25-3.25V11.5 C21.5,3.16,15.13,1.93,12,2z M5.79,13.5c1.44-0.01,1.71,0.92,1.71,1.75v2.5c0,1.65-1.17,1.76-1.79,1.75C4.29,19.54,4,18.57,4,17.75 v-2.5C4,14.63,4.13,13.46,5.79,13.5z M20,17.75c0,1.17-0.55,1.76-1.79,1.75c-0.2,0.01-1.71,0.09-1.71-1.75v-2.5 c0-1.62,1.1-1.75,1.72-1.75c0.1,0,1.78-0.2,1.78,1.75V17.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset_mic.xml
new file mode 100644
index 0000000..fc232e5
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset_mic.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.5,10.5c0-8.34-6.37-9.57-9.5-9.49C8.88,0.93,2.5,2.19,2.5,10.5v6.25c0,1.02,0.3,1.83,0.89,2.4 C4.16,19.9,5.18,20,5.65,20C8.13,20,9,18.41,9,16.75v-2.5c0-2.78-2.19-3.28-3.24-3.25C5.43,10.99,4.7,11.03,4,11.41V10.5 C4,3.3,9.31,2.5,12,2.5c7.24,0,8,5.28,8,7.99v0.91c-0.69-0.38-1.42-0.41-1.75-0.41C17.2,10.96,15,11.47,15,14.25v2.5 c0,3.33,3.08,3.25,3.25,3.25c0.46,0.02,1.13-0.08,1.75-0.42v1.17c0,0.41-0.34,0.75-0.75,0.75H13V23h6.25 c1.24,0,2.25-1.01,2.25-2.25V10.5z M5.79,12.5c1.44-0.01,1.71,0.92,1.71,1.75v2.5c0,1.65-1.17,1.76-1.79,1.75 C4.29,18.54,4,17.57,4,16.75v-2.5C4,13.63,4.13,12.46,5.79,12.5z M18.21,18.5c-0.2,0.01-1.71,0.09-1.71-1.75v-2.5 c0-1.62,1.1-1.75,1.72-1.75c0.1,0,1.78-0.2,1.78,1.75v2.5C20,17.92,19.45,18.51,18.21,18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_hotspot.xml
new file mode 100644
index 0000000..1da172f
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_hotspot.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,11.09c-2.03,0-1.91,1.83-1.91,1.91c0,0.06-0.12,1.91,1.91,1.91c2.03,0,1.91-1.83,1.91-1.91 C13.91,12.93,14.03,11.09,12,11.09z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.75,6.2c-0.89-0.95-3.32-3.15-6.67-3.2c-2.39-0.01-4.7,1.05-6.86,3.21C3.05,8.39,1.97,10.7,2,13.08 c0.04,3.31,2.24,5.76,3.22,6.69l1.06-1.06l-0.05-0.05c-0.81-0.77-2.69-2.85-2.73-5.6C3.47,11.1,4.41,9.15,6.28,7.28 C7,6.56,9.1,4.5,12.06,4.5c2.26,0.03,4.14,1.26,5.71,2.84c0.81,0.77,2.69,2.85,2.73,5.6c0.03,1.96-0.91,3.91-2.78,5.78l1.06,1.06 c2.17-2.17,3.25-4.48,3.22-6.86C21.96,9.6,19.75,7.15,18.75,6.2z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.07,8.92C15.25,8.04,13.79,7,11.98,7C10.56,7,9.2,7.65,7.92,8.92c-1.3,1.3-1.94,2.69-1.92,4.13 c0.03,2,1.34,3.47,1.92,4.02l1.06-1.06l-0.04-0.04c-0.43-0.41-1.43-1.51-1.45-2.95c-0.01-1.03,0.49-2.05,1.49-3.05 c0.98-0.98,1.99-1.48,3-1.48c0.43,0,1.6,0.05,3.07,1.52c0.43,0.41,1.43,1.51,1.45,2.95c0.01,1.02-0.49,2.05-1.48,3.05l1.06,1.06 c1.29-1.3,1.94-2.69,1.92-4.13C17.97,10.94,16.65,9.47,16.07,8.92z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info.xml
new file mode 100644
index 0000000..0c0a682
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 7 C 12.4142135624 7 12.75 7.33578643763 12.75 7.75 C 12.75 8.16421356237 12.4142135624 8.5 12 8.5 C 11.5857864376 8.5 11.25 8.16421356237 11.25 7.75 C 11.25 7.33578643763 11.5857864376 7 12 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info_outline.xml
new file mode 100644
index 0000000..0c0a682
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info_outline.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 7 C 12.4142135624 7 12.75 7.33578643763 12.75 7.75 C 12.75 8.16421356237 12.4142135624 8.5 12 8.5 C 11.5857864376 8.5 11.25 8.16421356237 11.25 7.75 C 11.25 7.33578643763 11.5857864376 7 12 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_invert_colors.xml
new file mode 100644
index 0000000..09b5ddf
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_invert_colors.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.66,8.34l-5.13-5.12c-0.29-0.29-0.77-0.29-1.06,0L6.34,8.34C4.89,9.79,4,11.84,4,14.03C3.83,20.01,8.38,22,12,22 c5.87,0,8.1-4,7.99-7.93C20.08,12.47,19.39,10.08,17.66,8.34z M5.5,14.08c0.04-0.41-0.06-2.71,1.9-4.67L12,4.81l0,0v15.68 c0,0,0,0,0,0C9.4,20.49,5.35,19.29,5.5,14.08z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_location.xml
new file mode 100644
index 0000000..836eb7d0
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_location.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,6c-1.88,0-3,1.04-3,3c0,1.91,1.06,3,3,3c1.89,0,3-1.05,3-3C15,7.08,13.93,6,12,6z M12,10.5 c-1.15,0.01-1.5-0.47-1.5-1.5c0-1.06,0.37-1.5,1.5-1.5c1.15-0.01,1.5,0.47,1.5,1.5C13.5,10.09,13.1,10.5,12,10.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.99,2C9.69,1.94,5,2.93,5,9c0,6.88,6.23,12.56,6.5,12.8c0.14,0.13,0.32,0.2,0.5,0.2s0.36-0.06,0.5-0.2 C12.77,21.56,19,15.88,19,9C19,2.87,14.3,1.96,11.99,2z M12,20.2C10.55,18.7,6.5,14.12,6.5,9c0-4.91,3.63-5.55,5.44-5.5 C16.9,3.34,17.5,7.14,17.5,9C17.5,14.13,13.45,18.7,12,20.2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml
new file mode 100644
index 0000000..814a573
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml
@@ -0,0 +1,27 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,4H3.25C2.01,4,1,5.01,1,6.25v12.5C1,19.99,2.01,21,3.25,21h17.5c1.24,0,2.25-1.01,2.25-2.25V6.25 C23,5.01,21.99,4,20.75,4z M21.5,18.75c0,0.41-0.34,0.75-0.75,0.75H3.25c-0.41,0-0.75-0.34-0.75-0.75V6.25 c0-0.41,0.34-0.75,0.75-0.75h17.5c0.41,0,0.75,0.34,0.75,0.75V18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 8 C 6.55228474983 8 7 8.44771525017 7 9 C 7 9.55228474983 6.55228474983 10 6 10 C 5.44771525017 10 5 9.55228474983 5 9 C 5 8.44771525017 5.44771525017 8 6 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 12 C 6.55228474983 12 7 12.4477152502 7 13 C 7 13.5522847498 6.55228474983 14 6 14 C 5.44771525017 14 5 13.5522847498 5 13 C 5 12.4477152502 5.44771525017 12 6 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 8 C 10.5522847498 8 11 8.44771525017 11 9 C 11 9.55228474983 10.5522847498 10 10 10 C 9.44771525017 10 9 9.55228474983 9 9 C 9 8.44771525017 9.44771525017 8 10 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 12 C 10.5522847498 12 11 12.4477152502 11 13 C 11 13.5522847498 10.5522847498 14 10 14 C 9.44771525017 14 9 13.5522847498 9 13 C 9 12.4477152502 9.44771525017 12 10 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 14 8 C 14.5522847498 8 15 8.44771525017 15 9 C 15 9.55228474983 14.5522847498 10 14 10 C 13.4477152502 10 13 9.55228474983 13 9 C 13 8.44771525017 13.4477152502 8 14 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 14 12 C 14.5522847498 12 15 12.4477152502 15 13 C 15 13.5522847498 14.5522847498 14 14 14 C 13.4477152502 14 13 13.5522847498 13 13 C 13 12.4477152502 13.4477152502 12 14 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 8 C 18.5522847498 8 19 8.44771525017 19 9 C 19 9.55228474983 18.5522847498 10 18 10 C 17.4477152502 10 17 9.55228474983 17 9 C 17 8.44771525017 17.4477152502 8 18 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 12 C 18.5522847498 12 19 12.4477152502 19 13 C 19 13.5522847498 18.5522847498 14 18 14 C 17.4477152502 14 17 13.5522847498 17 13 C 17 12.4477152502 17.4477152502 12 18 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 8 16 H 16 V 17.5 H 8 V 16 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_alert.xml
new file mode 100644
index 0000000..c92bdf6
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_alert.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6.81,3.81L5.75,2.75C3.45,4.76,2,7.71,2,11h1.5C3.5,8.13,4.79,5.55,6.81,3.81z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.25,2.75l-1.06,1.06C19.21,5.55,20.5,8.13,20.5,11H22C22,7.71,20.55,4.76,18.25,2.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18,10.5c0-4.38-2.72-5.57-4.5-5.89V4c0-1.59-1.43-1.5-1.5-1.5c-0.05,0-1.5-0.09-1.5,1.5v0.62C8.72,4.94,6,6.14,6,10.5v7 H4V19h16v-1.5h-2V10.5z M16.5,17.5h-9v-7C7.5,7.57,8.94,5.95,12,6c3.07-0.05,4.5,1.55,4.5,4.5V17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c0.07,0,2,0.12,2-2h-4C10,22.12,11.91,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_silence.xml
new file mode 100644
index 0000000..e2953b5
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_silence.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,6c3.07-0.05,4.5,1.55,4.5,4.5v3.88l1.5,1.5V10.5c0-4.38-2.72-5.57-4.5-5.89V4c0-1.59-1.43-1.5-1.5-1.5 c-0.05,0-1.5-0.09-1.5,1.5v0.62C9.71,4.76,8.73,5.08,7.89,5.77l1.07,1.07C9.69,6.28,10.69,5.98,12,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c0.07,0,2,0.12,2-2h-4C10,22.12,11.91,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l5.22,5.22C6.09,8.99,6,9.69,6,10.5v7H4V19h12.88l3.96,3.96l1.06-1.06L2.1,2.1z M7.5,17.5v-7 c0-0.29,0.03-0.56,0.05-0.82l7.82,7.82H7.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_low.xml
new file mode 100644
index 0000000..13786d8
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_low.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16,4h-1V2.5C15,2.22,14.78,2,14.5,2h-5C9.22,2,9,2.22,9,2.5V4H8C6.9,4,6,4.9,6,6v12c0,2.21,1.79,4,4,4h4 c2.21,0,4-1.79,4-4V6C18,4.9,17.1,4,16,4z M16.5,18c0,1.38-1.12,2.5-2.5,2.5h-4c-1.38,0-2.5-1.12-2.5-2.5V6 c0-0.28,0.22-0.5,0.5-0.5h8c0.28,0,0.5,0.22,0.5,0.5V18z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 H 12.75 V 15 H 11.25 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 16.5 C 12.4142135624 16.5 12.75 16.8357864376 12.75 17.25 C 12.75 17.6642135624 12.4142135624 18 12 18 C 11.5857864376 18 11.25 17.6642135624 11.25 17.25 C 11.25 16.8357864376 11.5857864376 16.5 12 16.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_saver.xml
new file mode 100644
index 0000000..0ba057bf
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_saver.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12.75 10 L 11.25 10 L 11.25 12.25 L 9 12.25 L 9 13.75 L 11.25 13.75 L 11.25 16 L 12.75 16 L 12.75 13.75 L 15 13.75 L 15 12.25 L 12.75 12.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16,4h-1V2.5C15,2.22,14.78,2,14.5,2h-5C9.22,2,9,2.22,9,2.5V4H8C6.9,4,6,4.9,6,6v12c0,2.21,1.79,4,4,4h4 c2.21,0,4-1.79,4-4V6C18,4.9,17.1,4,16,4z M16.5,18c0,1.38-1.12,2.5-2.5,2.5h-4c-1.38,0-2.5-1.12-2.5-2.5V6 c0-0.28,0.22-0.5,0.5-0.5h8c0.28,0,0.5,0.22,0.5,0.5V18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml
new file mode 100644
index 0000000..fc0cd0b
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.41,6.59l-1.09,1.09c0.75,1.27,1.19,2.74,1.19,4.31s-0.44,3.05-1.19,4.31l1.09,1.09C20.41,15.85,21,13.99,21,12 S20.41,8.15,19.41,6.59z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.2,9.8l-2.02,2.02c-0.1,0.1-0.1,0.26,0,0.35l2.02,2.02c0.13,0.13,0.35,0.09,0.42-0.08C16.86,13.46,17,12.74,17,12 c0-0.74-0.14-1.46-0.39-2.11C16.55,9.72,16.32,9.68,16.2,9.8z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.06,12l3.65-3.67c0.39-0.39,0.39-1.02,0.01-1.41L10.69,2.8c-0.2-0.21-0.45-0.3-0.69-0.3C9.49,2.5,9,2.9,9,3.5V9.9v0.03 L4.53,5.45L3.47,6.51l5.41,5.41l-5.41,5.41l1.06,1.06L9,13.92v0.15v6.43c0,0.6,0.49,1,0.99,1c0.24,0,0.49-0.09,0.69-0.29 l4.03-4.05c0.39-0.39,0.39-1.02,0.01-1.41L11.06,12z M10.48,4.72l2.84,2.91l-2.84,2.85V4.72z M10.48,19.3v-5.76l2.84,2.91 L10.48,19.3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_cancel.xml
new file mode 100644
index 0000000..e89e95a
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_cancel.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.65-0.05,8.5,0.58,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.47 7.47 L 12 10.94 L 8.53 7.47 L 7.47 8.53 L 10.94 12 L 7.47 15.47 L 8.53 16.53 L 12 13.06 L 15.47 16.53 L 16.53 15.47 L 13.06 12 L 16.53 8.53 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_no_sim.xml
new file mode 100644
index 0000000..c1730e4
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_no_sim.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11.2,4.73c0.14-0.14,0.34-0.23,0.54-0.23h5.01c0.41,0,0.75,0.34,0.75,0.75v10.13l1.5,1.5V5.25C19,4.01,17.99,3,16.75,3 h-5.01c-0.6,0-1.19,0.25-1.61,0.68L7.99,5.87l1.06,1.06L11.2,4.73z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16L5.9,8.02L5.64,8.29C5.23,8.71,5,9.27,5,9.86v8.89C5,19.99,6.01,21,7.25,21h9.5 c0.59,0,1.12-0.23,1.52-0.6l2.57,2.57l1.06-1.06L2.1,2.1z M16.75,19.5h-9.5c-0.41,0-0.75-0.34-0.75-0.75V9.86 c0-0.2,0.08-0.38,0.21-0.52l0.25-0.25l10.25,10.25C17.08,19.43,16.93,19.5,16.75,19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml
new file mode 100644
index 0000000..796ba86
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.37,11.64l1-1.12c-2.49-2.23-9.12-6.7-16.72,0.01l0.99,1.12C11.1,5.95,16.64,9.2,19.37,11.64z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M0.63,6.82l0.99,1.12c9.45-8.35,17.68-2.79,20.77-0.02l1-1.12C20,3.76,10.98-2.33,0.63,6.82z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9.7,17.96l0.99,1.13c0.93-0.81,1.73-0.64,2.31-0.25v-1.64C12.01,16.86,10.84,16.96,9.7,17.96z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M6.67,14.25l0.99,1.12c1.98-1.75,3.81-2.06,5.34-1.77v-1.49C11.18,11.82,8.99,12.2,6.67,14.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 L 21.83 16.24 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml
new file mode 100644
index 0000000..538f85b
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 21.83 16.24 L 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 Z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M4.64,11.66l-0.99-1.12c7.6-6.71,14.22-2.24,16.72-0.01l-1,1.12C16.64,9.2,11.1,5.95,4.64,11.66z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13,17.19c-0.99-0.33-2.16-0.24-3.3,0.77l0.99,1.13c0.93-0.81,1.73-0.64,2.31-0.25V17.19z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M13,12.11c-1.82-0.29-4.01,0.09-6.33,2.14l0.99,1.12c1.98-1.75,3.81-2.06,5.34-1.77V12.11z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml
new file mode 100644
index 0000000..3ae9f72
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 21.83 16.24 L 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 Z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M4.64,11.66l-0.99-1.12c7.6-6.71,14.22-2.24,16.72-0.01l-1,1.12C16.64,9.2,11.1,5.95,4.64,11.66z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13,17.19c-0.99-0.33-2.16-0.24-3.3,0.77l0.99,1.13c0.93-0.81,1.73-0.64,2.31-0.25V17.19z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13,12.11c-1.82-0.29-4.01,0.09-6.33,2.14l0.99,1.12c1.98-1.75,3.81-2.06,5.34-1.77V12.11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml
new file mode 100644
index 0000000..408a09e
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 21.83 16.24 L 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.64,11.66l-0.99-1.12c7.6-6.71,14.22-2.24,16.72-0.01l-1,1.12C16.64,9.2,11.1,5.95,4.64,11.66z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13,17.19c-0.99-0.33-2.16-0.24-3.3,0.77l0.99,1.13c0.93-0.81,1.73-0.64,2.31-0.25V17.19z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13,12.11c-1.82-0.29-4.01,0.09-6.33,2.14l0.99,1.12c1.98-1.75,3.81-2.06,5.34-1.77V12.11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml
new file mode 100644
index 0000000..61ca3d0
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 L 21.83 16.24 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.37,11.64l1-1.12c-2.49-2.23-9.12-6.7-16.72,0.01l0.99,1.12C11.1,5.95,16.64,9.2,19.37,11.64z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M0.63,6.82l0.99,1.12c9.45-8.35,17.68-2.79,20.77-0.02l1-1.12C20,3.76,10.98-2.33,0.63,6.82z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9.7,17.96l0.99,1.13c0.93-0.81,1.73-0.64,2.31-0.25v-1.64C12.01,16.86,10.84,16.96,9.7,17.96z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M6.67,14.25l0.99,1.12c1.98-1.75,3.81-2.06,5.34-1.77v-1.49C11.18,11.82,8.99,12.2,6.67,14.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml
new file mode 100644
index 0000000..a788993
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M10.69,19.09L9.7,17.96c1.72-1.51,3.51-1,4.62,0l-1,1.12C12.73,18.55,11.79,18.12,10.69,19.09z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M1.62,7.94L0.63,6.82C10.98-2.33,20,3.76,23.39,6.8l-1,1.12C19.29,5.15,11.07-0.4,1.62,7.94z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.18,16.98c0.19-0.32,0.52-0.71,1-1.16c0.9-0.81,1.1-1.19,1.1-1.81c0-0.9-0.6-1.57-1.72-1.57 c-0.18,0-1.28-0.07-1.82,1.45l-1.16-0.48c0.2-0.53,0.98-2.16,2.97-2.16c1.3,0,2.18,0.6,2.62,1.35c0.25,0.42,0.37,0.89,0.37,1.41 c0,0.83-0.26,1.44-1.44,2.51c-0.32,0.29-0.56,0.57-0.71,0.84c-0.25,0.44-0.22,0.8-0.22,1.54H18.9 C18.9,17.35,19.03,17.25,19.18,16.98z M18.61,21.06c0-0.51,0.41-0.93,0.93-0.93c0.71,0,0.94,0.62,0.94,0.93 c0,0.53-0.41,0.94-0.94,0.94C19.24,22,18.61,21.77,18.61,21.06z"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M15.18,12.88c0.01-0.02,0.02-0.04,0.03-0.07c-2.05-1-5.17-1.54-8.54,1.43l0.99,1.12 c2.77-2.45,5.25-2.1,7.02-1.17L15.18,12.88z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M19.45,9.76c-2.98-2.29-8.99-5.23-15.8,0.77l0.99,1.12c5.22-4.61,9.84-3.37,12.86-1.44 C18.08,9.93,18.72,9.77,19.45,9.76z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot_delete.xml
new file mode 100644
index 0000000..7b592b9
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot_delete.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4V3H9v1H4v1.5h1V17c0,2.21,1.79,4,4,4h6c2.21,0,4-1.79,4-4V5.5h1V4H15z M17.5,17c0,1.38-1.12,2.5-2.5,2.5H9 c-1.38,0-2.5-1.12-2.5-2.5V5.5h11V17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 8 H 11 V 17 H 9.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 H 14.5 V 17 H 13 V 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_settings.xml
new file mode 100644
index 0000000..8a31cbc
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_settings.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.7,13.01c-0.67-0.49-0.7-1.51,0-2.02l1.75-1.28c0.31-0.23,0.4-0.65,0.21-0.98l-2-3.46c-0.19-0.33-0.6-0.47-0.95-0.31 l-1.98,0.88c-0.75,0.33-1.65-0.14-1.75-1.01l-0.23-2.15C14.7,2.29,14.38,2,14,2h-4c-0.38,0-0.7,0.29-0.75,0.67L9.02,4.82 C8.93,5.7,8.02,6.16,7.27,5.83L5.29,4.96C4.94,4.8,4.53,4.94,4.34,5.27l-2,3.46c-0.19,0.33-0.1,0.75,0.21,0.98l1.75,1.28 c0.7,0.51,0.67,1.53,0,2.02l-1.75,1.28c-0.31,0.23-0.4,0.65-0.21,0.98l2,3.46c0.19,0.33,0.6,0.47,0.95,0.31l1.98-0.88 c0.75-0.33,1.65,0.15,1.75,1.01l0.23,2.15C9.29,21.71,9.62,22,10,22h4c0.38,0,0.7-0.29,0.75-0.67l0.23-2.15 c0.09-0.82,0.96-1.36,1.75-1.01l1.98,0.88c0.35,0.16,0.76,0.02,0.95-0.31l2-3.46c0.19-0.33,0.1-0.75-0.21-0.98L19.7,13.01z M18.7,17.4l-1.37-0.6c-0.81-0.36-1.72-0.31-2.49,0.13c-0.77,0.44-1.26,1.2-1.36,2.08l-0.16,1.48h-2.65l-0.16-1.49 c-0.1-0.88-0.59-1.64-1.36-2.08c-0.77-0.44-1.68-0.49-2.49-0.13L5.3,17.4l-1.33-2.3l1.21-0.88C5.9,13.7,6.31,12.89,6.31,12 c0-0.89-0.41-1.7-1.13-2.22L3.98,8.9L5.3,6.6l1.36,0.6c0.81,0.36,1.72,0.31,2.49-0.13c0.77-0.44,1.26-1.2,1.36-2.09l0.16-1.48 h2.65l0.16,1.48c0.09,0.88,0.59,1.64,1.36,2.09c0.77,0.44,1.67,0.49,2.49,0.13l1.36-0.6l1.33,2.3l-1.21,0.88 c-0.72,0.52-1.13,1.33-1.13,2.22c0,0.89,0.41,1.7,1.13,2.22l1.21,0.88L18.7,17.4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,8c-1.29-0.04-4,0.56-4,4c0,3.46,2.69,4.02,4,4c0.21,0.01,4,0.12,4-4C16,8.55,13.31,7.97,12,8z M12,14.5 c-0.51,0.01-2.5,0.03-2.5-2.5c0-2.33,1.67-2.51,2.54-2.5c0.85-0.02,2.46,0.22,2.46,2.5C14.5,14.52,12.51,14.51,12,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_swap_vert.xml
new file mode 100644
index 0000000..48a75be
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_swap_vert.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14,6.94L9.71,2.65c-0.39-0.39-1.02-0.39-1.41,0L4,6.94L5.06,8l3.19-3.19V14h1.5V4.81L12.94,8L14,6.94z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.94,16l-3.19,3.19V10h-1.5v9.19L11.06,16L10,17.06l4.29,4.29c0.39,0.39,1.02,0.39,1.41,0L20,17.06L18.94,16z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml
new file mode 100644
index 0000000..30cd25e
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml
@@ -0,0 +1,23 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="16dp" android:viewportHeight="24" android:viewportWidth="24" android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 3 5.25 H 13 V 6.75 H 3 V 5.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3 17.25 H 9 V 18.75 H 3 V 17.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 5.25 L 16.5 3 L 15 3 L 15 9 L 16.5 9 L 16.5 6.75 L 21 6.75 L 21 5.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12.5 15 L 11 15 L 11 21 L 12.5 21 L 12.5 18.75 L 21 18.75 L 21 17.25 L 12.5 17.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11 11.25 H 21 V 12.75 H 11 V 11.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.5 11.25 L 3 11.25 L 3 12.75 L 7.5 12.75 L 7.5 15 L 9 15 L 9 9 L 7.5 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml
new file mode 100644
index 0000000..c158881
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,5.51c0.56-0.01,7.5-0.56,7.5,7.49c0,1.53-0.25,2.74-0.67,3.71l1.13,1.13C20.7,16.39,21,14.71,21,13 c0-4.59-2.12-8.99-9-8.99c-2,0-3.58,0.38-4.84,1.03l1.15,1.15C9.28,5.77,10.48,5.51,12,5.51z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.62 2.96 L 6.66 1.81 L 5.17 3.05 L 6.24 4.12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.41 1.31 H 19.91 V 7.31 H 18.41 V 1.31 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1.04,3.16l1.82,1.82L2.06,5.65l0.96,1.15l0.91-0.76l0.9,0.9C3.51,8.61,3,10.79,3,13c0,4.59,2.12,8.99,9,8.99 c2.7,0,4.66-0.7,6.06-1.81l2.78,2.78l1.06-1.06L2.1,2.1L1.04,3.16z M16.99,19.11c-2.05,1.56-4.67,1.39-4.99,1.39 C11.44,20.5,4.5,21.06,4.5,13c0-1.24,0.18-3.31,1.42-4.96L16.99,19.11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml
new file mode 100644
index 0000000..da98705
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.35,11.85l2.15-2.15v2.79c0,0.42,0.52,0.68,0.85,0.35l2.5-2.5c0.2-0.2,0.2-0.51,0-0.71L18.21,8l1.65-1.65 c0.2-0.2,0.2-0.51,0-0.71l-2.5-2.5C17.04,2.83,16.5,3.05,16.5,3.5v2.79l-2.15-2.15l-0.71,0.71L16.79,8l-3.15,3.15L14.35,11.85z M17.5,4.71L18.79,6L17.5,7.29V4.71z M17.5,8.71L18.79,10l-1.29,1.29V8.71z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.52,14.51l-1.88-0.29c-0.55-0.08-1.11,0.1-1.51,0.49l-2.85,2.85c-2.92-1.56-5.32-3.97-6.87-6.9l2.77-2.77 c0.39-0.39,0.58-0.95,0.49-1.51L9.38,4.48C9.25,3.62,8.52,3,7.65,3H4.86c0,0,0,0,0,0C3.95,3,3,3.78,3.12,4.9 C4,13.29,10.72,20.01,19.1,20.89c0.06,0.01,0.11,0.01,0.17,0.01c1.16,0,1.73-1.02,1.73-1.75v-2.9 C21,15.37,20.38,14.64,19.52,14.51z M4.61,4.75C4.59,4.62,4.72,4.5,4.86,4.5h0h2.79c0.12,0,0.23,0.09,0.25,0.21L8.19,6.6 C8.2,6.69,8.18,6.77,8.12,6.82L5.73,9.21C5.16,7.81,4.77,6.31,4.61,4.75z M19.5,19.14c0,0.14-0.11,0.27-0.25,0.25 c-1.59-0.17-3.11-0.56-4.54-1.15l2.47-2.47c0.06-0.06,0.14-0.08,0.21-0.07l1.88,0.29c0.12,0.02,0.21,0.12,0.21,0.25V19.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media.xml
new file mode 100644
index 0000000..bf01647
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,5c0-0.07,0.12-2-2-2h-1.5c-2.12,0-2,1.91-2,2v8.9C11.81,13.35,10.95,13,10,13c-2.21,0-4,1.79-4,4s1.79,4,4,4 s4-1.79,4-4V7h2C18.12,7,18,5.09,18,5z M10,19.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S11.38,19.5,10,19.5 z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media_mute.xml
new file mode 100644
index 0000000..5bce7cf
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media_mute.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.5,10.38l1.5,1.5V7h2c2.12,0,2-1.91,2-2c0-0.07,0.12-2-2-2h-1.5c-2.12,0-2,1.91-2,2V10.38z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l9.99,9.99C10.7,13.06,10.36,13,10,13c-2.21,0-4,1.79-4,4s1.79,4,4,4s4-1.79,4-4v-0.88l6.84,6.84 l1.06-1.06L2.1,2.1z M10,19.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S11.38,19.5,10,19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml
new file mode 100644
index 0000000..53eabd9
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 6.75 10.25 C 7.16421356237 10.25 7.5 10.5857864376 7.5 11 C 7.5 11.4142135624 7.16421356237 11.75 6.75 11.75 C 6.33578643763 11.75 6 11.4142135624 6 11 C 6 10.5857864376 6.33578643763 10.25 6.75 10.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 17.25 14.25 C 17.6642135624 14.25 18 14.5857864376 18 15 C 18 15.4142135624 17.6642135624 15.75 17.25 15.75 C 16.8357864376 15.75 16.5 15.4142135624 16.5 15 C 16.5 14.5857864376 16.8357864376 14.25 17.25 14.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,4H4.25C3.01,4,2,5.01,2,6.25v11.5C2,18.99,3.01,20,4.25,20h15.5c1.24,0,2.25-1.01,2.25-2.25V6.25 C22,5.01,20.99,4,19.75,4z M20.5,17.75c0,0.41-0.34,0.75-0.75,0.75H4.25c-0.41,0-0.75-0.34-0.75-0.75V6.25 c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V17.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9 10.25 H 18 V 11.75 H 9 V 10.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 14.25 H 15 V 15.75 H 6 V 14.25 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml
new file mode 100644
index 0000000..923c603
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 6.75 10.25 C 7.16421356237 10.25 7.5 10.5857864376 7.5 11 C 7.5 11.4142135624 7.16421356237 11.75 6.75 11.75 C 6.33578643763 11.75 6 11.4142135624 6 11 C 6 10.5857864376 6.33578643763 10.25 6.75 10.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.25,14.25c-0.02,0-0.4-0.02-0.61,0.27l1.09,1.09C17.88,15.51,18,15.33,18,15C18,14.21,17.28,14.25,17.25,14.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,5.5c0.41,0,0.75,0.34,0.75,0.75v11.5c0,0.18-0.07,0.33-0.17,0.46l1.07,1.07c0.37-0.4,0.6-0.93,0.6-1.52V6.25 C22,5.01,20.99,4,19.75,4H6.12l1.5,1.5H19.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 10.25 L 12.37 10.25 L 13.87 11.75 L 18 11.75 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1.75,3.87L2.6,4.73C2.23,5.13,2,5.66,2,6.25v11.5C2,18.99,3.01,20,4.25,20h13.63l2.25,2.25l1.06-1.06L2.81,2.81 L1.75,3.87z M3.5,6.25c0-0.18,0.07-0.33,0.17-0.46l8.46,8.46H6v1.5h7.63l2.75,2.75H4.25c-0.41,0-0.75-0.34-0.75-0.75V6.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer.xml
new file mode 100644
index 0000000..ab98838
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,17.5v-7c0-4.38-2.72-5.57-4.5-5.89V4c0-1.59-1.43-1.5-1.5-1.5c-0.05,0-1.5-0.09-1.5,1.5v0.62C8.72,4.94,6,6.14,6,10.5 v7H4V19h16v-1.5H18z M16.5,17.5h-9v-7C7.5,7.57,8.94,5.95,12,6c3.07-0.05,4.5,1.55,4.5,4.5V17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c0.07,0,2,0.12,2-2h-4C10,22.12,11.91,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml
new file mode 100644
index 0000000..da336f5
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,6c3.07-0.05,4.5,1.55,4.5,4.5v3.88l1.5,1.5V10.5c0-4.38-2.72-5.57-4.5-5.89V4c0-1.59-1.43-1.5-1.5-1.5 c-0.05,0-1.5-0.09-1.5,1.5v0.62C9.71,4.76,8.73,5.08,7.89,5.77l1.07,1.07C9.69,6.28,10.69,5.98,12,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c0.07,0,2,0.12,2-2h-4C10,22.12,11.91,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l5.22,5.22C6.09,8.99,6,9.69,6,10.5v7H4V19h12.88l3.96,3.96l1.06-1.06L2.1,2.1z M7.5,17.5v-7 c0-0.29,0.03-0.56,0.05-0.82l7.82,7.82H7.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml
new file mode 100644
index 0000000..971c8ea
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="19dp" android:viewportHeight="24" android:viewportWidth="24" android:width="19dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.75,4h-5.5C8.01,4,7,5.01,7,6.25v11.5C7,18.99,8.01,20,9.25,20h5.5c1.24,0,2.25-1.01,2.25-2.25V6.25 C17,5.01,15.99,4,14.75,4z M15.5,17.75c0,0.41-0.34,0.75-0.75,0.75h-5.5c-0.41,0-0.75-0.34-0.75-0.75V6.25 c0-0.41,0.34-0.75,0.75-0.75h5.5c0.41,0,0.75,0.34,0.75,0.75V17.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 7 H 19.5 V 17 H 18 V 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21 9 H 22.5 V 15 H 21 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1.5 9 H 3 V 15 H 1.5 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4.5 7 H 6 V 17 H 4.5 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_voice.xml
new file mode 100644
index 0000000..8c3a583
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_voice.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.52,14.51l-1.88-0.29c-0.55-0.08-1.11,0.1-1.51,0.49l-2.85,2.85c-2.92-1.56-5.32-3.97-6.87-6.9l2.77-2.77 c0.39-0.39,0.58-0.95,0.49-1.51L9.38,4.48C9.25,3.62,8.52,3,7.65,3H4.86c0,0,0,0,0,0C3.95,3,3,3.78,3.12,4.9 C4,13.29,10.72,20.01,19.1,20.89c0.06,0.01,0.11,0.01,0.17,0.01c1.16,0,1.73-1.02,1.73-1.75v-2.9C21,15.37,20.38,14.64,19.52,14.51 z M4.61,4.75C4.59,4.62,4.72,4.5,4.86,4.5h0h2.79c0.12,0,0.23,0.09,0.25,0.21L8.19,6.6C8.2,6.69,8.18,6.77,8.12,6.82L5.73,9.21 C5.16,7.81,4.77,6.31,4.61,4.75z M19.5,19.14c0,0.14-0.11,0.27-0.25,0.25c-1.59-0.17-3.11-0.56-4.54-1.15l2.47-2.47 c0.06-0.06,0.14-0.08,0.21-0.07l1.88,0.29c0.12,0.02,0.21,0.12,0.21,0.25V19.14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml
new file mode 100644
index 0000000..77533e1
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,6H16c0,0,0,0,0,0c0-2.05-0.95-4-4-4C8.96,2,8,3.97,8,6c0,0,0,0,0,0H4.25C3.01,6,2,7.01,2,8.25v10.5 C2,19.99,3.01,21,4.25,21h15.5c1.24,0,2.25-1.01,2.25-2.25V8.25C22,7.01,20.99,6,19.75,6z M12,3.5c0.54-0.01,2.5-0.11,2.5,2.5 c0,0,0,0,0,0h-5c0,0,0,0,0,0C9.5,3.39,11.45,3.48,12,3.5z M20.5,18.75c0,0.41-0.34,0.75-0.75,0.75H4.25 c-0.41,0-0.75-0.34-0.75-0.75V8.25c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,12c-0.05,0-1.5-0.09-1.5,1.5c0,1.59,1.43,1.5,1.5,1.5c0.05,0,1.5,0.09,1.5-1.5C13.5,11.91,12.07,12,12,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_mic_none.xml
new file mode 100644
index 0000000..c901bbd
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_mic_none.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.5,11c0,0.58,0.23,5.6-5.5,5.5c-5.75,0.09-5.5-4.91-5.5-5.5H5c0,6.05,4.44,6.88,6.25,6.98V21h1.5v-3.02 C14.56,17.88,19,17.03,19,11H17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,14c1.88,0,3-1.04,3-3V5c0-1.92-1.07-3-3-3c-1.88,0-3,1.04-3,3v6C9,12.92,10.07,14,12,14z M10.5,5 c0-1.09,0.41-1.5,1.5-1.5s1.5,0.41,1.5,1.5v6c0,1.09-0.41,1.5-1.5,1.5s-1.5-0.41-1.5-1.5V5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml
new file mode 100644
index 0000000..84203d3
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,9.5h-7.2c-0.93-2.27-3.12-3.02-5.06-3C5.7,6.46,2,7.23,2,12c0,4.8,3.7,5.53,5.5,5.5c1.88,0.06,4.12-0.71,5.05-3 h1.95v1.25c0,1.24,1.01,2.25,2.25,2.25h0.5c1.24,0,2.25-1.01,2.25-2.25V14.5h0.25c1.24,0,2.25-1.01,2.25-2.25v-0.5 C22,10.51,20.99,9.5,19.75,9.5z M20.5,12.25c0,0.41-0.34,0.75-0.75,0.75h-1C18.34,13,18,13.34,18,13.75v2 c0,0.41-0.34,0.75-0.75,0.75h-0.5c-0.41,0-0.75-0.34-0.75-0.75v-2c0-0.41-0.34-0.75-0.75-0.75h-3.23c-0.33,0-0.63,0.22-0.72,0.54 c-0.68,2.36-3.04,2.48-3.85,2.45C6.1,16.04,3.5,15.58,3.5,12C3.5,8.35,6.18,7.97,7.55,8c0.91-0.03,3.09,0.17,3.75,2.45 c0.09,0.32,0.39,0.54,0.72,0.54h7.73c0.41,0,0.75,0.34,0.75,0.75V12.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.5,10.5C7.45,10.5,6,10.41,6,12c0,1.59,1.43,1.5,1.5,1.5C7.55,13.5,9,13.59,9,12C9,10.41,7.57,10.5,7.5,10.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/Android.mk b/packages/overlays/IconPackKaiThemePickerOverlay/Android.mk
new file mode 100644
index 0000000..d6927e6
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackKaiThemePicker
+LOCAL_CERTIFICATE := platform
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackKaiThemePickerOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiThemePickerOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..83b8985
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.kai.themepicker"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.google.android.apps.wallpaper" android:category="android.theme.customization.icon_pack.themepicker" android:priority="1"/>
+    <application android:label="Kai" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_add_24px.xml
new file mode 100644
index 0000000..f57b3c8
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_add_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20 11.25 L 12.75 11.25 L 12.75 4 L 11.25 4 L 11.25 11.25 L 4 11.25 L 4 12.75 L 11.25 12.75 L 11.25 20 L 12.75 20 L 12.75 12.75 L 20 12.75 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_close_24px.xml
new file mode 100644
index 0000000..9f2a4c0
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_close_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 18.78 6.28 L 17.72 5.22 L 12 10.94 L 6.28 5.22 L 5.22 6.28 L 10.94 12 L 5.22 17.72 L 6.28 18.78 L 12 13.06 L 17.72 18.78 L 18.78 17.72 L 13.06 12 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_colorize_24px.xml
new file mode 100644
index 0000000..60ed90b
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_colorize_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.49,5.1L18.9,3.51c-0.68-0.68-1.79-0.68-2.47,0l-2.26,2.26L12.2,3.8l-1.06,1.06l1.97,1.97l-9.88,9.88 C3.08,16.86,3,17.05,3,17.25v3C3,20.66,3.34,21,3.75,21h3c0.2,0,0.39-0.08,0.53-0.22l9.88-9.88l1.97,1.97l1.06-1.06l-1.97-1.97 l2.26-2.26C21.17,6.89,21.17,5.78,20.49,5.1z M6.44,19.5H4.5v-1.94l9.67-9.66l1.94,1.94L6.44,19.5z M19.43,6.51l-2.26,2.26 l-1.94-1.94l2.26-2.26c0.1-0.1,0.26-0.1,0.35,0l1.59,1.59C19.53,6.26,19.53,6.41,19.43,6.51z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_font.xml
new file mode 100644
index 0000000..cd3e927
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_font.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,2H4.25C3.01,2,2,3.01,2,4.25v15.5C2,20.99,3.01,22,4.25,22h15.5c1.24,0,2.25-1.01,2.25-2.25V4.25 C22,3.01,20.99,2,19.75,2z M20.5,19.75c0,0.41-0.34,0.75-0.75,0.75H4.25c-0.41,0-0.75-0.34-0.75-0.75V4.25 c0-0.41,0.34-0.75,0.75-0.75h15.5c0.41,0,0.75,0.34,0.75,0.75V19.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.88,5.88H11.1L6.53,17.96l-0.06,0.17h1.83l1.21-3.3h5l1.21,3.3h1.83L12.91,5.96L12.88,5.88z M10.08,13.23l1.92-5.22 l1.93,5.22H10.08z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_clock.xml
new file mode 100644
index 0000000..8bc3499
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_clock.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.97,16.03l-3.5-3.5c-0.14-0.14-0.22-0.33-0.22-0.53V6h1.5v5.69l3.28,3.28L14.97,16.03z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C4.41,2,2,6.9,2,12c0,5.09,2.35,10,10,10c7.59,0,10-4.9,10-10C22,6.91,19.65,2,12,2z M12,20.5 c-2.64,0.05-8.5-0.59-8.5-8.5c0-7.91,5.88-8.55,8.5-8.5c2.64-0.05,8.5,0.59,8.5,8.5C20.5,19.91,14.62,20.55,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_grid.xml
new file mode 100644
index 0000000..41721f0
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_grid.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M22,6.5V5h-3V2h-1.5v3h-4.75V2h-1.5v3H6.5V2H5v3H2v1.5h3v4.75H2v1.5h3v4.75H2V19h3v3h1.5v-3h4.75v3h1.5v-3h4.75v3H19v-3h3 v-1.5h-3v-4.75h3v-1.5h-3V6.5H22z M6.5,6.5h4.75v4.75H6.5V6.5z M6.5,17.5v-4.75h4.75v4.75H6.5z M17.5,17.5h-4.75v-4.75h4.75V17.5z M17.5,11.25h-4.75V6.5h4.75V11.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_theme.xml
new file mode 100644
index 0000000..f57d216
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_theme.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.25,2H5.75C5.34,2,5,2.34,5,2.75v7.5c0,2.36,1.74,4.33,4,4.69v4.91C9,21.04,9.96,22,11.15,22h1.7 c1.19,0,2.15-0.96,2.15-2.15v-4.91c2.26-0.36,4-2.33,4-4.69v-7.5C19,2.34,18.66,2,18.25,2z M9.25,3.5V6h1.5V3.5h2.5V6h1.5V3.5h2.75 v5.75h-11V3.5H9.25z M14.25,13.5c-0.41,0-0.75,0.34-0.75,0.75v5.6c0,0.36-0.29,0.65-0.65,0.65h-1.7c-0.36,0-0.65-0.29-0.65-0.65 v-5.6c0-0.41-0.34-0.75-0.75-0.75c-1.62,0-2.96-1.2-3.2-2.75h10.9C17.21,12.3,15.87,13.5,14.25,13.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml
new file mode 100644
index 0000000..2887156
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml
@@ -0,0 +1,23 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 16 7 C 16.5522847498 7 17 7.44771525017 17 8 C 17 8.55228474983 16.5522847498 9 16 9 C 15.4477152502 9 15 8.55228474983 15 8 C 15 7.44771525017 15.4477152502 7 16 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.75,3h-6v1.5h6c0.41,0,0.75,0.34,0.75,0.75v6H21v-6C21,4.01,19.99,3,18.75,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.5,5.25c0-0.41,0.34-0.75,0.75-0.75h6V3h-6C4.01,3,3,4.01,3,5.25v6h1.5V5.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,18.75c0,0.41-0.34,0.75-0.75,0.75h-6V21h6c1.24,0,2.25-1.01,2.25-2.25v-6h-1.5V18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.5,18.75v-6H3v6C3,19.99,4.01,21,5.25,21h6v-1.5h-6C4.84,19.5,4.5,19.16,4.5,18.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13.74,11.94l-2.6,3.35l-1.74-2.1c-0.2-0.25-0.58-0.24-0.78,0.01l-1.99,2.56c-0.26,0.33-0.02,0.81,0.4,0.81H17 c0.41,0,0.65-0.47,0.4-0.8l-2.87-3.83C14.34,11.68,13.94,11.68,13.74,11.94z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_shapes_24px.xml
new file mode 100644
index 0000000..fb5989f
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_shapes_24px.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.73,9H17c0,0.52-0.04,1.02-0.1,1.5h4.08v10h-11v-3.04c-0.85,0.02-0.99,0.05-1.48,0.04c0,0-0.01,0-0.02,0v3.75 c0,0.41,0.34,0.75,0.75,0.75h12.5c0.41,0,0.75-0.34,0.75-0.75V9.75C22.48,9.34,22.14,9,21.73,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M8.51,16c2.87,0.04,6.99-1.31,6.99-7c0-6.13-4.71-7.06-7.01-7C6.2,1.94,1.5,2.92,1.5,9C1.5,15.12,6.2,16.05,8.51,16 L8.51,16z M3,9c0-5.76,4.97-5.5,5.54-5.5C14.23,3.5,14,8.43,14,9c0,0.57,0.15,5.59-5.5,5.5C2.83,14.58,3,9.58,3,9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_tune.xml
new file mode 100644
index 0000000..f660890
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_tune.xml
@@ -0,0 +1,23 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="20dp" android:viewportHeight="24" android:viewportWidth="24" android:width="20dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 3 5.25 H 13 V 6.75 H 3 V 5.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3 17.25 H 9 V 18.75 H 3 V 17.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 5.25 L 16.5 3 L 15 3 L 15 9 L 16.5 9 L 16.5 6.75 L 21 6.75 L 21 5.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12.5 15 L 11 15 L 11 21 L 12.5 21 L 12.5 18.75 L 21 18.75 L 21 17.25 L 12.5 17.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11 11.25 H 21 V 12.75 H 11 V 11.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.5 11.25 L 3 11.25 L 3 12.75 L 7.5 12.75 L 7.5 15 L 9 15 L 9 9 L 7.5 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_wifi_24px.xml
new file mode 100644
index 0000000..eb5347d
--- /dev/null
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_wifi_24px.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.14,6c4.29,0.06,7.79,2.34,9.81,4.05l1.07-1.07c-2.26-1.94-6.06-4.41-10.86-4.48C8.32,4.46,4.57,5.96,1,9l1.07,1.07 C5.33,7.32,8.72,5.95,12.14,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.97,11.5c0.04,0,0.08,0,0.12,0c2.54,0.04,4.67,1.25,6.07,2.34l1.08-1.08c-1.6-1.28-4.07-2.71-7.13-2.76 c-2.54-0.03-4.99,0.91-7.33,2.78l1.07,1.07C7.84,12.3,9.89,11.5,11.97,11.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.98,17.5c0.02,0,0.04,0,0.05,0c0.73,0.01,1.38,0.24,1.93,0.53l1.1-1.1c-0.79-0.49-1.81-0.92-3.01-0.93 c-1.07-0.01-2.12,0.31-3.12,0.94l1.1,1.1C10.68,17.69,11.33,17.5,11.98,17.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk b/packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk
index e31aa4a..067efd6 100644
--- a/packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk
+++ b/packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk
@@ -17,7 +17,7 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
-LOCAL_RRO_THEME := IconPackRoundedThemePicker
+LOCAL_RRO_THEME := IconPackRoundedTheme
 LOCAL_CERTIFICATE := platform
 LOCAL_PRODUCT_MODULE := true
 
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml
new file mode 100644
index 0000000..7d9cf7f
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,13c0-4.97-4.03-9-9-9c-1.5,0-2.91,0.37-4.15,1.02l12.13,12.13C20.63,15.91,21,14.5,21,13z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.9,6.55c0.42,0.35,1.05,0.3,1.41-0.13c0.35-0.42,0.3-1.05-0.13-1.41l-3.07-2.56c-0.42-0.35-1.05-0.3-1.41,0.13v0 C16.34,3,16.4,3.63,16.82,3.99L19.9,6.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.18,3.99C7.6,3.63,7.66,3,7.3,2.58l0,0C6.95,2.15,6.32,2.1,5.9,2.45L5.56,2.73l1.42,1.42L7.18,3.99z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l0.46,0.46C2.41,5.72,2.45,6.12,2.7,6.42l0,0 c0.29,0.35,0.76,0.43,1.16,0.26L4.8,7.62C3.67,9.12,3,10.98,3,13c0,4.97,4.03,9,9,9c2.02,0,3.88-0.67,5.38-1.8l1.69,1.69 c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L3.51,3.51z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_battery_80_24dp.xml
new file mode 100644
index 0000000..8a1a5ae
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_battery_80_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4h-1c0-1.1-0.9-2-2-2s-2,0.9-2,2H9C7.35,4,6,5.35,6,7v12c0,1.65,1.35,3,3,3h6c1.65,0,3-1.35,3-3V7 C18,5.35,16.65,4,15,4z M16,8H8V7c0-0.55,0.45-1,1-1h6c0.55,0,1,0.45,1,1V8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml
new file mode 100644
index 0000000..4e054d0
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/accent_device_default_light" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.52,12c1.34-0.88,2.29-2.28,2.45-3.96C19.29,4.76,16.72,2,13.5,2H13c-1.1,0-2,0.9-2,2v5.17L7.12,5.29 C6.73,4.9,6.1,4.9,5.71,5.29c-0.39,0.39-0.39,1.02,0,1.41L11,12V12l-5.29,5.29c-0.39,0.39-0.39,1.03,0,1.42s1.02,0.39,1.41,0 L11,14.83V20c0,1.1,0.9,2,2,2h0.5c3.22,0,5.79-2.76,5.47-6.04C18.81,14.28,17.86,12.88,16.52,12z M13,4h0.5 c1.81,0,3.71,1.52,3.48,3.85C16.82,9.62,15.18,11,13.26,11h0H13V4z M13.5,20H13v-7h0.26c1.92,0,3.55,1.38,3.72,3.15 C17.2,18.47,15.32,20,13.5,20z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml
new file mode 100644
index 0000000..482f87b
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.97,0-9,4.03-9,9v7c0,1.66,1.34,3,3,3h0c1.66,0,3-1.34,3-3v-2c0-1.66-1.34-3-3-3H5l0-1.71 C5,7.45,7.96,4.11,11.79,4C15.76,3.89,19,7.06,19,11v2h-1c-1.66,0-3,1.34-3,3v2c0,1.66,1.34,3,3,3h0c1.66,0,3-1.34,3-3v-7 C21,6.03,16.97,2,12,2"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml
new file mode 100644
index 0000000..433dc39
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M12,1c-5,0-9,4-9,9v7c0,1.66,1.34,3,3,3h0c1.66,0,3-1.34,3-3v-2 c0-1.66-1.34-3-3-3H5v-1.7C5,6.4,8,3.1,11.8,3c4-0.1,7.2,3.1,7.2,7v2h-1c-1.66,0-3,1.34-3,3v2c0,1.66,1.34,3,3,3h1v0 c0,0.55-0.45,1-1,1h-4c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h4c1.65,0,3-1.35,3-3V10C21,5,17,1,12,1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml
new file mode 100644
index 0000000..63b6bb1
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,20c-1.75,0-2.31-1.92-2.5-2.5c-0.5-1.6-1.5-2.3-2.4-3c-0.8-0.6-1.6-1.2-2.3-2.5C9.3,11,9,9.9,9,9c0-2.8,2.2-5,5-5 c2.51,0,4.54,1.77,4.93,4.16C19.01,8.65,19.42,9,19.91,9h0c0.6,0,1.09-0.54,1-1.13C20.39,4.6,17.65,2.13,14.26,2 c-2.72-0.1-5.21,1.54-6.48,3.95C6.56,8.27,6.85,10.58,8.1,12.9c0.9,1.7,2,2.5,2.9,3.1c0.8,0.6,1.4,1.1,1.7,2.1 c1.32,3.97,4.16,3.9,4.3,3.9c1.76,0,3.26-1.15,3.79-2.74C21,18.64,20.51,18,19.85,18h0c-0.42,0-0.82,0.24-0.95,0.63 C18.63,19.42,17.88,20,17,20z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M6.95,1.95L6.95,1.95c-0.42-0.42-1.12-0.38-1.5,0.08C3.9,3.94,3,6.4,3,9c0,2.6,0.9,5.06,2.45,6.97 c0.38,0.47,1.07,0.51,1.5,0.08l0,0c0.35-0.35,0.39-0.92,0.08-1.31C5.77,13.15,5,11.19,5,9c0-2.19,0.77-4.15,2.03-5.74 C7.34,2.87,7.3,2.3,6.95,1.95z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 14 6.5 C 15.3807118746 6.5 16.5 7.61928812542 16.5 9 C 16.5 10.3807118746 15.3807118746 11.5 14 11.5 C 12.6192881254 11.5 11.5 10.3807118746 11.5 9 C 11.5 7.61928812542 12.6192881254 6.5 14 6.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_laptop.xml
new file mode 100644
index 0000000..a36fc9d
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_laptop.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M5,18h14c1.65,0,3-1.35,3-3V7c0-1.65-1.35-3-3-3H5C3.35,4,2,5.35,2,7v8C2,16.65,3.35,18,5,18z M4,7c0-0.55,0.45-1,1-1h14 c0.55,0,1,0.45,1,1v8c0,0.55-0.45,1-1,1H5c-0.55,0-1-0.45-1-1V7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M22,19h-2.7H4.7H2c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h20c0.55,0,1-0.45,1-1C23,19.45,22.55,19,22,19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_misc_hid.xml
new file mode 100644
index 0000000..6edf7c8
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_misc_hid.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M11.29,9.79c0.39,0.39,1.02,0.39,1.41,0l2-2C14.89,7.61,15,7.35,15,7.09V4 c0-1.1-0.9-2-2-2h-2C9.9,2,9,2.9,9,4v3.09c0,0.27,0.11,0.52,0.29,0.71L11.29,9.79z"/>
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M20,9h-3.09c-0.27,0-0.52,0.11-0.71,0.29l-2,2c-0.39,0.39-0.39,1.02,0,1.41l2,2 c0.19,0.19,0.44,0.29,0.71,0.29H20c1.1,0,2-0.9,2-2v-2C22,9.9,21.1,9,20,9z"/>
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M9.79,11.29l-2-2C7.61,9.11,7.35,9,7.09,9H4c-1.1,0-2,0.9-2,2v2c0,1.1,0.9,2,2,2 h3.09c0.27,0,0.52-0.11,0.71-0.29l2-2C10.18,12.32,10.18,11.68,9.79,11.29z"/>
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M12.71,14.21c-0.39-0.39-1.02-0.39-1.41,0l-2,2C9.11,16.39,9,16.65,9,16.91V20 c0,1.1,0.9,2,2,2h2c1.1,0,2-0.9,2-2v-3.09c0-0.27-0.11-0.52-0.29-0.71L12.71,14.21z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_network_pan.xml
new file mode 100644
index 0000000..849cb1f
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_network_pan.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.08,7.74c-0.24-0.52-0.94-0.64-1.35-0.23l-0.05,0.05c-0.25,0.25-0.3,0.62-0.16,0.94c0.47,1.07,0.73,2.25,0.73,3.49 c0,1.24-0.26,2.42-0.73,3.49c-0.14,0.32-0.09,0.69,0.16,0.94c0.41,0.41,1.1,0.29,1.35-0.23c0.63-1.3,0.98-2.76,0.98-4.3 C21,10.42,20.67,9.01,20.08,7.74z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M15.98,10.28l-1.38,1.38c-0.2,0.2-0.2,0.51,0,0.71l1.38,1.38c0.28,0.28,0.75,0.15,0.85-0.23C16.94,13.02,17,12.52,17,12 c0-0.51-0.06-1.01-0.18-1.48C16.73,10.14,16.25,10,15.98,10.28z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.52,12c1.34-0.88,2.29-2.28,2.45-3.96C15.29,4.76,12.72,2,9.5,2H9C7.9,2,7,2.9,7,4v5.17L3.12,5.29 C2.73,4.9,2.1,4.9,1.71,5.29c-0.39,0.39-0.39,1.02,0,1.41L7,12V12l-5.29,5.29c-0.39,0.39-0.39,1.03,0,1.42s1.02,0.39,1.41,0 L7,14.83V20c0,1.1,0.9,2,2,2h0.5c3.22,0,5.79-2.76,5.47-6.04C14.81,14.28,13.86,12.88,12.52,12z M9,4h0.5 c1.81,0,3.71,1.52,3.48,3.85C12.82,9.62,11.18,11,9.26,11h0H9V4z M9.5,20H9v-7h0.26c1.92,0,3.55,1.38,3.72,3.15 C13.2,18.48,11.3,20,9.5,20z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml
new file mode 100644
index 0000000..71acae6
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M13,10h6V9c0-3.56-2.58-6.44-6-6.92V10z"/>
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M11,10V2.08C7.58,2.56,5,5.44,5,9v1H11z"/>
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M5,12v3c0,3.9,3.1,7,7,7s7-3.1,7-7v-3H5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_corp_badge.xml
new file mode 100644
index 0000000..917874e
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_corp_badge.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/accent_device_default_light" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,6h-3c0-2.21-1.79-4-4-4S8,3.79,8,6H5C3.34,6,2,7.34,2,9v9c0,1.66,1.34,3,3,3h14c1.66,0,3-1.34,3-3V9 C22,7.34,20.66,6,19,6z M12,15c-0.83,0-1.5-0.67-1.5-1.5S11.17,12,12,12s1.5,0.67,1.5,1.5S12.83,15,12,15z M10,6c0-1.1,0.9-2,2-2 s2,0.9,2,2H10z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_expand_more.xml
new file mode 100644
index 0000000..3cecf5b
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_expand_more.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.88,8.29l-5.18,5.17c-0.39,0.39-1.02,0.39-1.41,0L6.12,8.29c-0.39-0.39-1.02-0.39-1.41,0l0,0 c-0.39,0.39-0.39,1.02,0,1.41l5.17,5.17c1.17,1.17,3.07,1.17,4.24,0l5.17-5.17c0.39-0.39,0.39-1.02,0-1.41l0,0 C18.91,7.91,18.27,7.9,17.88,8.29z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_faster_emergency.xml
new file mode 100644
index 0000000..18eb115
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_faster_emergency.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorError" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,3H6C4.34,3,3,4.34,3,6v12c0,1.66,1.34,3,3,3h12c1.66,0,3-1.34,3-3V6C21,4.34,19.66,3,18,3z M15.5,13.5h-2v2 c0,0.83-0.67,1.5-1.5,1.5s-1.5-0.67-1.5-1.5v-2h-2C7.67,13.5,7,12.83,7,12s0.67-1.5,1.5-1.5h2v-2C10.5,7.67,11.17,7,12,7 s1.5,0.67,1.5,1.5v2h2c0.83,0,1.5,0.67,1.5,1.5S16.33,13.5,15.5,13.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_file_copy.xml
new file mode 100644
index 0000000..0f6b1bd
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_file_copy.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/material_grey_600" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,21H5c-0.55,0-1-0.45-1-1V8c0-0.55-0.45-1-1-1h0C2.45,7,2,7.45,2,8v12c0,1.65,1.35,3,3,3h12c0.55,0,1-0.45,1-1v0 C18,21.45,17.55,21,17,21z M21,4c0-1.65-1.35-3-3-3H9C7.35,1,6,2.35,6,4v12c0,1.65,1.35,3,3,3h9c1.65,0,3-1.35,3-3V4z M18,17H9 c-0.55,0-1-0.45-1-1V4c0-0.55,0.45-1,1-1h9c0.55,0,1,0.45,1,1v12C19,16.55,18.55,17,18,17z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock.xml
new file mode 100644
index 0000000..a6667b4
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="32dp" android:viewportHeight="24" android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,8h-0.5V5.69c0-2.35-1.73-4.45-4.07-4.67C9.75,0.77,7.5,2.87,7.5,5.5V8H7c-1.65,0-3,1.35-3,3v8c0,1.65,1.35,3,3,3h10 c1.65,0,3-1.35,3-3v-8C20,9.35,18.65,8,17,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,17,12,17z M14.5,8h-5V5.5 C9.5,4.12,10.62,3,12,3s2.5,1.12,2.5,2.5V8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_bugreport.xml
new file mode 100644
index 0000000..6f1ef5e
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_bugreport.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,13c0-0.55-0.45-1-1-1h-1c0-1.14,0.02-1.27-0.09-2H19c0.55,0,1-0.45,1-1c0-0.55-0.45-1-1-1h-1.81 c-0.45-0.78-1.07-1.46-1.82-1.96l0.93-0.92c0.39-0.39,0.39-1.02,0-1.41c-0.39-0.39-1.02-0.39-1.41,0l-1.46,1.47 c-0.03-0.01-1.29-0.37-2.84,0.01l0.02-0.01L9.11,3.7c-0.39-0.39-1.02-0.38-1.41,0L7.7,3.71c-0.39,0.39-0.39,1.02,0,1.41l0.92,0.92 h0.01C7.88,6.54,7.26,7.22,6.81,8H5C4.45,8,4,8.45,4,9c0,0.55,0.45,1,1,1h1.09C5.98,10.6,6,10.92,6,12H5c-0.55,0-1,0.45-1,1 c0,0.55,0.45,1,1,1h1c0,1.14-0.02,1.27,0.09,2H5c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h1.81c1.04,1.79,2.97,3,5.19,3 c2.22,0,4.15-1.21,5.19-3H19c0.55,0,1-0.45,1-1c0-0.55-0.45-1-1-1h-1.09c0.11-0.73,0.09-0.87,0.09-2h1C19.55,14,20,13.55,20,13z M13,16h-2c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h2c0.55,0,1,0.45,1,1C14,15.55,13.55,16,13,16z M13,12h-2c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1h2c0.55,0,1,0.45,1,1C14,11.55,13.55,12,13,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_open.xml
new file mode 100644
index 0000000..71f51c6
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_open.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="32dp" android:viewportHeight="24" android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,1C16.01,1,14,3.01,14,5.5V8H7c-1.65,0-3,1.35-3,3v8c0,1.65,1.35,3,3,3h10c1.65,0,3-1.35,3-3v-8c0-1.65-1.35-3-3-3h-1 V5.64c0-1.31,0.94-2.5,2.24-2.63c0.52-0.05,2.3,0.02,2.69,2.12C21.02,5.63,21.42,6,21.92,6c0.6,0,1.09-0.53,0.99-1.13 C22.47,2.3,20.55,1,18.5,1z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,17,12,17z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_power_off.xml
new file mode 100644
index 0000000..0c4d817
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_power_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,12c0.55,0,1-0.45,1-1V3c0-0.55-0.45-1-1-1c-0.55,0-1,0.45-1,1v8C11,11.55,11.45,12,12,12z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.12,6.49c-0.37-0.48-1.07-0.52-1.5-0.1l0,0c-0.35,0.35-0.4,0.9-0.09,1.29c2.15,2.74,1.96,6.73-0.57,9.26 c-2.73,2.73-7.17,2.73-9.89,0.01c-2.53-2.53-2.72-6.53-0.57-9.28c0.3-0.39,0.25-0.94-0.1-1.29c-0.43-0.42-1.13-0.37-1.5,0.1 c-2.74,3.53-2.49,8.64,0.76,11.88c3.51,3.51,9.21,3.51,12.72-0.01C21.61,15.12,21.86,10.02,19.12,6.49z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lockscreen_ime.xml
new file mode 100644
index 0000000..4044e45
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lockscreen_ime.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,4H4C2.35,4,1,5.35,1,7v11c0,1.65,1.35,3,3,3h16c1.65,0,3-1.35,3-3V7C23,5.35,21.65,4,20,4z M14,8c0.55,0,1,0.45,1,1 c0,0.55-0.45,1-1,1s-1-0.45-1-1C13,8.45,13.45,8,14,8z M14,12c0.55,0,1,0.45,1,1c0,0.55-0.45,1-1,1s-1-0.45-1-1 C13,12.45,13.45,12,14,12z M10,8c0.55,0,1,0.45,1,1c0,0.55-0.45,1-1,1S9,9.55,9,9C9,8.45,9.45,8,10,8z M10,12c0.55,0,1,0.45,1,1 c0,0.55-0.45,1-1,1s-1-0.45-1-1C9,12.45,9.45,12,10,12z M6,14c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1 C7,13.55,6.55,14,6,14z M6,10c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C7,9.55,6.55,10,6,10z M15.5,17h-7 C8.22,17,8,16.78,8,16.5C8,16.22,8.22,16,8.5,16h7c0.28,0,0.5,0.22,0.5,0.5C16,16.78,15.78,17,15.5,17z M18,14c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1s1,0.45,1,1C19,13.55,18.55,14,18,14z M18,10c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1 C19,9.55,18.55,10,18,10z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_mode_edit.xml
new file mode 100644
index 0000000..4c0c4dc
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_mode_edit.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.54,5.4L18.6,3.45C18.3,3.15,17.9,3,17.5,3s-0.8,0.15-1.1,0.45l-1.76,1.76l4.14,4.14l1.76-1.77 C21.15,6.99,21.15,6.01,20.54,5.4"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.59,16.27C3.21,16.65,3,17.16,3,17.69V20c0,0.55,0.45,1,1,1h2.32c0.53,0,1.04-0.21,1.41-0.59l9.64-9.64l-4.14-4.14 L3.59,16.27z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_notifications_alerted.xml
new file mode 100644
index 0000000..e022c63
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_notifications_alerted.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6.47,4.81c0.37-0.38,0.35-0.99-0.03-1.37c-0.4-0.4-1.05-0.39-1.44,0.02c-1.62,1.72-2.7,3.95-2.95,6.43 C2,10.48,2.46,11,3.05,11h0.01c0.51,0,0.93-0.38,0.98-0.88C4.24,8.07,5.13,6.22,6.47,4.81z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.99,3.47c-0.39-0.41-1.04-0.42-1.44-0.02c-0.38,0.38-0.39,0.98-0.03,1.37c1.34,1.41,2.23,3.26,2.43,5.3 c0.05,0.5,0.48,0.88,0.98,0.88h0.01c0.59,0,1.05-0.52,0.99-1.11C21.69,7.42,20.61,5.19,18.99,3.47z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,17h-1v-6c0-3.07-1.63-5.64-4.5-6.32V4c0-0.83-0.67-1.5-1.5-1.5c-0.83,0-1.5,0.67-1.5,1.5v0.68C7.64,5.36,6,7.92,6,11 v6H5c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1C20,17.45,19.55,17,19,17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_phone.xml
new file mode 100644
index 0000000..e2e50a6
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_phone.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15.67,14.85l-1.52,1.5c-2.79-1.43-5.07-3.71-6.51-6.5l1.48-1.47C9.6,7.91,9.81,7.23,9.68,6.57L9.29,4.62 C9.1,3.69,8.28,3.02,7.33,3.02l-2.23,0c-1.23,0-2.14,1.09-1.98,2.3c0.32,2.43,1.12,4.71,2.31,6.73c1.57,2.69,3.81,4.93,6.5,6.5 c2.03,1.19,4.31,1.99,6.74,2.31c1.21,0.16,2.3-0.76,2.3-1.98l0-2.23c0-0.96-0.68-1.78-1.61-1.96l-1.9-0.38 C16.81,14.18,16.14,14.38,15.67,14.85z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_airplane.xml
new file mode 100644
index 0000000..5492442
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_airplane.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.11,10.24L15,8.19V5c0-1.66-1.34-3-3-3c-1.66,0-3,1.34-3,3v3.19l-5.11,2.05C2.75,10.69,2,11.8,2,13.02v1.95 c0,0.92,0.82,1.64,1.72,1.48c1.62-0.27,3.48-0.78,4.64-1.12C8.68,15.25,9,15.49,9,15.82v1.26c0,0.33-0.16,0.63-0.43,0.82 l-0.72,0.5C6.54,19.32,6.68,22,8.5,22h7c1.82,0,1.96-2.68,0.65-3.6l-0.72-0.5C15.16,17.71,15,17.41,15,17.08v-1.26 c0-0.33,0.32-0.57,0.64-0.48c1.16,0.34,3.02,0.85,4.64,1.12C21.18,16.61,22,15.9,22,14.98v-1.95C22,11.8,21.25,10.69,20.11,10.24"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml
new file mode 100644
index 0000000..bef1748
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M8.46,10.14c0-0.55-0.45-1-1-1H5.63l3.88-3.88c0.39-0.39,1.02-0.39,1.41,0l5.58,5.58c0.19,0.19,0.45,0.29,0.71,0.29 c0.26,0,0.51-0.1,0.71-0.29c0.39-0.39,0.39-1.02,0-1.41l-5.58-5.58c-1.17-1.17-3.07-1.17-4.24,0L4.21,7.73V5.89c0-0.55-0.45-1-1-1 s-1,0.45-1,1v3.25c0,1.1,0.9,2,2,2h3.25C8.01,11.14,8.46,10.69,8.46,10.14"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.79,12.86h-3.25c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h1.83l-3.88,3.88c-0.39,0.39-1.02,0.39-1.41,0L7.5,13.15 c-0.39-0.39-1.02-0.39-1.41,0s-0.39,1.02,0,1.41l5.58,5.58c0.58,0.59,1.35,0.88,2.12,0.88c0.77,0,1.54-0.29,2.12-0.88l3.88-3.88 v1.84c0,0.55,0.45,1,1,1c0.55,0,1-0.45,1-1v-3.25C21.79,13.76,20.89,12.86,19.79,12.86"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_battery_saver.xml
new file mode 100644
index 0000000..132ca94
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_battery_saver.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4h-1c0-1.1-0.9-2-2-2s-2,0.9-2,2H9C7.35,4,6,5.35,6,7v12c0,1.65,1.35,3,3,3h6c1.65,0,3-1.35,3-3V7 C18,5.35,16.65,4,15,4 M10,14c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h1v-1c0-0.55,0.45-1,1-1s1,0.45,1,1v1h1c0.55,0,1,0.45,1,1 c0,0.55-0.45,1-1,1h-1v1c0,0.55-0.45,1-1,1s-1-0.45-1-1v-1H10z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_bluetooth.xml
new file mode 100644
index 0000000..18afc87
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_bluetooth.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.52,12c1.34-0.88,2.29-2.28,2.45-3.96C19.29,4.76,16.72,2,13.5,2H13c-1.1,0-2,0.9-2,2v5.17L7.12,5.29 C6.73,4.9,6.1,4.9,5.71,5.29c-0.39,0.39-0.39,1.02,0,1.41L11,12V12l-5.29,5.29c-0.39,0.39-0.39,1.03,0,1.42s1.02,0.39,1.41,0 L11,14.83V20c0,1.1,0.9,2,2,2h0.5c3.22,0,5.79-2.76,5.47-6.04C18.81,14.28,17.86,12.88,16.52,12z M13,4h0.5 c1.81,0,3.71,1.52,3.48,3.85C16.82,9.62,15.18,11,13.26,11h0H13V4z M13.5,20H13v-7h0.26c1.92,0,3.55,1.38,3.72,3.15 C17.2,18.47,15.32,20,13.5,20z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_dnd.xml
new file mode 100644
index 0000000..bfde123
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_dnd.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,1.75C6.35,1.75,1.75,6.35,1.75,12S6.35,22.25,12,22.25h0.01c2.73,0,5.3-1.06,7.23-2.99c1.94-1.93,3-4.5,3.01-7.24V12 C22.25,6.35,17.65,1.75,12,1.75 M15,13H9c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h6c0.55,0,1,0.45,1,1C16,12.55,15.55,13,15,13"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_flashlight.xml
new file mode 100644
index 0000000..dd4d22c
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_flashlight.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16,2H8C6.9,2,6,2.9,6,4h12C18,2.9,17.1,2,16,2"/>
+  <path android:fillColor="@android:color/white" android:pathData="M6,6v0.12c0,2.02,1.24,3.76,3,4.5V19c0,1.66,1.34,3,3,3s3-1.34,3-3v-8.38c1.76-0.74,3-2.48,3-4.5V6H6z M12,13 c-0.55,0-1-0.45-1-1s0.45-1,1-1c0.55,0,1,0.45,1,1S12.55,13,12,13"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_night_display_on.xml
new file mode 100644
index 0000000..a5e0f91
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_night_display_on.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.61,14.12c-0.52,0.09-1.01,0.14-1.48,0.14c-4.62,0-8.39-3.76-8.39-8.39c0-0.48,0.05-0.98,0.15-1.52 c0.14-0.79-0.2-1.59-0.87-2.03c-0.62-0.41-1.49-0.47-2.21,0C3.8,4.33,2,7.67,2,11.28C2,17.19,6.81,22,12.72,22 c3.58,0,6.9-1.77,8.9-4.74c0.24-0.33,0.38-0.74,0.38-1.17C22,14.76,20.79,13.88,19.61,14.12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml
new file mode 100644
index 0000000..5a43b6f
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2 M12,20V4c4.41,0,8,3.59,8,8S16.41,20,12,20"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_restart.xml
new file mode 100644
index 0000000..afa318d
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_restart.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6,13c0-1.34,0.44-2.58,1.19-3.59c0.3-0.4,0.26-0.95-0.09-1.31l0,0C6.68,7.68,5.96,7.72,5.6,8.2C4.6,9.54,4,11.2,4,13 c0,3.64,2.43,6.7,5.75,7.67C10.38,20.86,11,20.35,11,19.7v0c0-0.43-0.27-0.83-0.69-0.95C7.83,18.02,6,15.72,6,13"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,13c0-4.42-3.58-8-8-8c-0.06,0-0.12,0.01-0.18,0.01l0.39-0.39c0.39-0.39,0.39-1.02,0-1.41l0-0.01 c-0.39-0.39-1.02-0.39-1.41,0L9.41,4.59c-0.78,0.78-0.78,2.05,0,2.83L10.8,8.8c0.39,0.39,1.02,0.39,1.41,0l0,0 c0.39-0.39,0.39-1.02,0-1.41l-0.38-0.38C11.89,7.01,11.95,7,12,7c3.31,0,6,2.69,6,6c0,2.72-1.83,5.02-4.31,5.75 C13.27,18.87,13,19.27,13,19.7v0c0,0.65,0.62,1.16,1.25,0.97C17.57,19.7,20,16.64,20,13"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_settings_bluetooth.xml
new file mode 100644
index 0000000..18afc87
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_settings_bluetooth.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.52,12c1.34-0.88,2.29-2.28,2.45-3.96C19.29,4.76,16.72,2,13.5,2H13c-1.1,0-2,0.9-2,2v5.17L7.12,5.29 C6.73,4.9,6.1,4.9,5.71,5.29c-0.39,0.39-0.39,1.02,0,1.41L11,12V12l-5.29,5.29c-0.39,0.39-0.39,1.03,0,1.42s1.02,0.39,1.41,0 L11,14.83V20c0,1.1,0.9,2,2,2h0.5c3.22,0,5.79-2.76,5.47-6.04C18.81,14.28,17.86,12.88,16.52,12z M13,4h0.5 c1.81,0,3.71,1.52,3.48,3.85C16.82,9.62,15.18,11,13.26,11h0H13V4z M13.5,20H13v-7h0.26c1.92,0,3.55,1.38,3.72,3.15 C17.2,18.47,15.32,20,13.5,20z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 0000000..bd5f9bb
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,5.44v14.57H5.29L20,5.44 M20.29,3c-0.4,0-0.82,0.15-1.16,0.49L3.54,18.94c-1.12,1.11-0.37,3.07,1.17,3.07H20.3 c0.94,0,1.7-0.8,1.7-1.78V4.78C22,3.71,21.16,3,20.29,3L20.29,3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 0000000..20bafaf
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.29,3c-0.4,0-0.82,0.15-1.16,0.49L3.54,18.94c-1.12,1.11-0.37,3.07,1.17,3.07H20.3c0.94,0,1.7-0.8,1.7-1.78V4.78 C22,3.71,21.16,3,20.29,3z M20,20.01h-9v-5.65l9-8.92V20.01z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 0000000..e634a91
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.29,3c-0.4,0-0.82,0.15-1.16,0.49L3.54,18.94c-1.12,1.11-0.37,3.07,1.17,3.07H20.3c0.94,0,1.7-0.8,1.7-1.78V4.78 C22,3.71,21.16,3,20.29,3z M20,20.01h-7v-7.63l7-6.93V20.01z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 0000000..417b34c
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.29,3c-0.4,0-0.82,0.15-1.16,0.49L3.54,18.94c-1.12,1.11-0.37,3.07,1.17,3.07H20.3c0.94,0,1.7-0.8,1.7-1.78V4.78 C22,3.71,21.16,3,20.29,3z M20,20.01h-4V20V9.4l4-3.96V20.01z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 0000000..f17b71d
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M3.54,18.94L19.13,3.49C20.21,2.42,22,3.22,22,4.78v15.44c0,0.98-0.76,1.78-1.7,1.78H4.71 C3.17,22.01,2.42,20.04,3.54,18.94"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_location.xml
new file mode 100644
index 0000000..a802bee
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_location.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3c-3.87,0-7,3.13-7,7c0,3.18,2.56,7.05,4.59,9.78c1.2,1.62,3.62,1.62,4.82,0C16.44,17.05,19,13.18,19,10 C19,6.13,15.87,3,12,3 M12,12.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S13.38,12.5,12,12.5"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 0000000..1aa930d
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,4c3.08,0,6,0.98,8.47,2.85c0.31,0.24,0.39,0.54,0.41,0.71c0.02,0.16,0.02,0.46-0.22,0.75l-7.89,9.6 c-0.26,0.32-0.6,0.37-0.77,0.37s-0.51-0.05-0.77-0.37L3.34,8.3C3.11,8.02,3.1,7.71,3.12,7.56c0.02-0.16,0.1-0.47,0.41-0.71 C6,4.98,8.92,4,12,4 M12,2C8.38,2,5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.6c0.6,0.73,1.46,1.1,2.32,1.1 s1.72-0.37,2.32-1.1l7.89-9.6c1.09-1.33,0.84-3.29-0.53-4.32C18.97,3.21,15.62,2,12,2L12,2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 0000000..c139e61
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.68,5.25C18.97,3.21,15.62,2,12,2S5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.6 c0.6,0.73,1.46,1.1,2.32,1.1s1.72-0.37,2.32-1.1l7.89-9.6C23.3,8.25,23.05,6.29,21.68,5.25z M20.66,8.3l-4.78,5.81 C14.75,13.41,13.4,13,12,13s-2.75,0.41-3.88,1.12L3.34,8.3C3.11,8.02,3.1,7.71,3.12,7.56c0.02-0.16,0.1-0.47,0.41-0.71 C6,4.98,8.92,4,12,4s6,0.98,8.47,2.85c0.31,0.24,0.39,0.54,0.41,0.71C20.9,7.71,20.89,8.02,20.66,8.3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 0000000..6e219c5
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.68,5.25C18.97,3.21,15.62,2,12,2S5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.6 c0.6,0.73,1.46,1.1,2.32,1.1s1.72-0.37,2.32-1.1l7.89-9.6C23.3,8.25,23.05,6.29,21.68,5.25z M20.66,8.3l-2.91,3.55 C16.14,10.67,14.1,10,12,10s-4.14,0.67-5.75,1.85L3.34,8.3C3.11,8.02,3.1,7.71,3.12,7.56c0.02-0.16,0.1-0.47,0.41-0.71 C6,4.98,8.92,4,12,4s6,0.98,8.47,2.85c0.31,0.24,0.39,0.54,0.41,0.71C20.9,7.71,20.89,8.02,20.66,8.3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 0000000..19d373e
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.68,5.25C18.97,3.21,15.62,2,12,2S5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.6 c0.6,0.73,1.46,1.1,2.32,1.1s1.72-0.37,2.32-1.1l7.89-9.6C23.3,8.25,23.05,6.29,21.68,5.25z M3.12,7.56 c0.02-0.16,0.1-0.47,0.41-0.71C6,4.98,8.92,4,12,4s6,0.98,8.47,2.85c0.31,0.24,0.39,0.54,0.41,0.71c0.02,0.16,0.02,0.46-0.22,0.75 l-1.1,1.34C17.47,7.98,14.81,7,12,7S6.53,7.98,4.44,9.65L3.34,8.3C3.11,8.02,3.1,7.71,3.12,7.56z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 0000000..6d088d41
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C8.38,2,5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.6c1.2,1.46,3.44,1.46,4.64,0l7.89-9.6 c1.09-1.33,0.84-3.29-0.53-4.32C18.97,3.21,15.62,2,12,2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_activity_recognition.xml
new file mode 100644
index 0000000..0a4d367
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_activity_recognition.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M13.5,5.5c1.1,0,2-0.9,2-2s-0.9-2-2-2s-2,0.9-2,2S12.4,5.5,13.5,5.5 M7.24,21.81C7.11,22.42,7.59,23,8.22,23H8.3 c0.47,0,0.87-0.32,0.98-0.78l1.43-6.36c0.09-0.38,0.55-0.52,0.83-0.25L13,17v5c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1v-5.64 c0-0.55-0.22-1.07-0.62-1.45L12.9,13.5l0.6-3c1.07,1.24,2.62,2.13,4.36,2.41c0.6,0.09,1.14-0.39,1.14-1v0 c0-0.49-0.36-0.9-0.85-0.98c-1.52-0.25-2.78-1.15-3.45-2.33l-1-1.6c-0.56-0.89-1.68-1.25-2.66-0.84L7.22,7.78 C6.48,8.1,6,8.82,6,9.62V12c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1V9.6l1.8-0.7L7.24,21.81z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_aural.xml
new file mode 100644
index 0000000..1035507
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_aural.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,2H9C7.35,2,6,3.35,6,5v10c0,1.65,1.35,3,3,3h10c1.65,0,3-1.35,3-3V5C22,3.35,20.65,2,19,2z M17,7h-2v5.5 c0,1.38-1.12,2.5-2.5,2.5c-1.63,0-2.89-1.56-2.39-3.26c0.25-0.85,1-1.52,1.87-1.69c0.78-0.15,1.47,0.05,2.02,0.46V6 c0-0.55,0.45-1,1-1h2c0.55,0,1,0.45,1,1C18,6.55,17.55,7,17,7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17,20H5c-0.55,0-1-0.45-1-1V7c0-0.55-0.45-1-1-1S2,6.45,2,7v12c0,1.65,1.35,3,3,3h12c0.55,0,1-0.45,1-1 C18,20.45,17.55,20,17,20z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_calendar.xml
new file mode 100644
index 0000000..695ee4f
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_calendar.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 14.5 13 C 15.8807118746 13 17 14.1192881254 17 15.5 C 17 16.8807118746 15.8807118746 18 14.5 18 C 13.1192881254 18 12 16.8807118746 12 15.5 C 12 14.1192881254 13.1192881254 13 14.5 13 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18,4V3c0-0.55-0.45-1-1-1s-1,0.45-1,1v1H8V3c0-0.55-0.45-1-1-1S6,2.45,6,3v1C4.34,4,3,5.34,3,7v12c0,1.66,1.34,3,3,3h12 c1.66,0,3-1.34,3-3V7C21,5.34,19.66,4,18,4z M19,19c0,0.55-0.45,1-1,1H6c-0.55,0-1-0.45-1-1v-9h14V19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_call_log.xml
new file mode 100644
index 0000000..3377ca2
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_call_log.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M13,4h8c0.55,0,1-0.45,1-1c0-0.55-0.45-1-1-1h-8c-0.55,0-1,0.45-1,1C12,3.55,12.45,4,13,4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21,6h-8c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h8c0.55,0,1-0.45,1-1C22,6.45,21.55,6,21,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21,10h-8c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h8c0.55,0,1-0.45,1-1C22,10.45,21.55,10,21,10z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.36,14.68l-1.9-0.38c-0.65-0.13-1.32,0.07-1.79,0.54l-1.52,1.5c-2.79-1.43-5.07-3.71-6.51-6.5l1.48-1.47 C9.6,7.91,9.81,7.23,9.68,6.57L9.29,4.62C9.1,3.69,8.28,3.02,7.33,3.02l-2.23,0c-1.23,0-2.14,1.09-1.98,2.3 c0.32,2.43,1.12,4.71,2.31,6.73c1.57,2.69,3.81,4.93,6.5,6.5c2.03,1.19,4.31,1.99,6.74,2.31c1.21,0.16,2.3-0.76,2.3-1.98v-2.23 C20.97,15.69,20.29,14.87,19.36,14.68z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_camera.xml
new file mode 100644
index 0000000..f1feab0
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_camera.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,5h-2.17l-0.94-1.03C15.32,3.35,14.52,3,13.68,3h-3.36C9.48,3,8.68,3.35,8.11,3.97L7.17,5H5C3.35,5,2,6.35,2,8v10 c0,1.65,1.35,3,3,3h14c1.65,0,3-1.35,3-3V8C22,6.35,20.65,5,19,5z M12,17c-2.21,0-4-1.79-4-4c0-2.21,1.79-4,4-4c2.21,0,4,1.79,4,4 C16,15.21,14.21,17,12,17z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_contacts.xml
new file mode 100644
index 0000000..f2787a4
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_contacts.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M5,1h14c0.55,0,1,0.45,1,1v0c0,0.55-0.45,1-1,1H5C4.45,3,4,2.55,4,2v0C4,1.45,4.45,1,5,1z M5,21h14c0.55,0,1,0.45,1,1v0 c0,0.55-0.45,1-1,1H5c-0.55,0-1-0.45-1-1v0C4,21.45,4.45,21,5,21z M5,5C3.35,5,2,6.35,2,8v8c0,1.65,1.35,3,3,3h14 c1.65,0,3-1.35,3-3V8c0-1.65-1.35-3-3-3H5z M19,17h-1c0-1.99-4-3-6-3s-6,1.01-6,3H5c-0.55,0-1-0.45-1-1V8c0-0.55,0.45-1,1-1h14 c0.55,0,1,0.45,1,1v8C20,16.55,19.55,17,19,17z M12,13.5c1.66,0,3-1.34,3-3s-1.34-3-3-3s-3,1.34-3,3S10.34,13.5,12,13.5"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_location.xml
new file mode 100644
index 0000000..d9e75ee
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_location.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3c-3.87,0-7,3.13-7,7c0,3.18,2.56,7.05,4.59,9.78c1.2,1.62,3.62,1.62,4.82,0C16.44,17.05,19,13.18,19,10 C19,6.13,15.87,3,12,3 M12,12.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S13.38,12.5,12,12.5"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_microphone.xml
new file mode 100644
index 0000000..61e89b2
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_microphone.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,14c1.66,0,3-1.34,3-3V5c0-1.66-1.34-3-3-3S9,3.34,9,5v6C9,12.66,10.34,14,12,14"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.91,11c-0.49,0-0.9,0.36-0.98,0.85C16.52,14.21,14.47,16,12,16s-4.52-1.79-4.93-4.15C6.99,11.36,6.58,11,6.09,11h0 c-0.61,0-1.09,0.54-1,1.14c0.49,3,2.89,5.34,5.91,5.78V20c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1v-2.08 c3.02-0.44,5.42-2.78,5.91-5.78C19.01,11.54,18.52,11,17.91,11L17.91,11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_phone_calls.xml
new file mode 100644
index 0000000..de94ed0
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_phone_calls.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15.67,14.85l-1.52,1.5c-2.79-1.43-5.07-3.71-6.51-6.5l1.48-1.47C9.6,7.91,9.81,7.23,9.68,6.57L9.29,4.62 C9.1,3.69,8.28,3.02,7.33,3.02l-2.23,0c-1.23,0-2.14,1.09-1.98,2.3c0.32,2.43,1.12,4.71,2.31,6.73c1.57,2.69,3.81,4.93,6.5,6.5 c2.03,1.19,4.31,1.99,6.74,2.31c1.21,0.16,2.3-0.76,2.3-1.98l0-2.23c0-0.96-0.68-1.78-1.61-1.96l-1.9-0.38 C16.81,14.18,16.14,14.38,15.67,14.85z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sensors.xml
new file mode 100644
index 0000000..8e8bf01
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sensors.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.5,3c-1.74,0-3.41,0.81-4.5,2.09c-1.81-2.13-5.22-2.96-7.9-0.93c-0.68,0.51-1.22,1.2-1.57,1.97 c-2.16,4.72,2.65,9.16,7.46,13.43c1.14,1.02,2.87,1.01,4-0.02c4.63-4.19,8-7.36,8-11.04C22,5.42,19.58,3,16.5,3"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sms.xml
new file mode 100644
index 0000000..f836fd0
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sms.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,2H5C3.34,2,2,3.34,2,5v14.59c0,0.89,1.08,1.34,1.71,0.71L6,18h13c1.66,0,3-1.34,3-3V5C22,3.34,20.66,2,19,2z M8,11 c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C9,10.55,8.55,11,8,11z M12,11c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1 C13,10.55,12.55,11,12,11z M16,11c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C17,10.55,16.55,11,16,11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_storage.xml
new file mode 100644
index 0000000..937da33
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_storage.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11.7,6.55l-0.81-1.22C10.33,4.5,9.4,4,8.39,4H5.01c-1.66,0-3,1.34-3,3L2,17c0,1.66,1.34,3,3,3h14c1.66,0,3-1.34,3-3v-7 c0-1.66-1.34-3-3-3h-6.46C12.2,7,11.89,6.83,11.7,6.55"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_visual.xml
new file mode 100644
index 0000000..9d4a2fb
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_visual.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,20H5c-0.55,0-1-0.45-1-1V7c0-0.55-0.45-1-1-1C2.45,6,2,6.45,2,7v12c0,1.65,1.35,3,3,3h12c0.55,0,1-0.45,1-1 C18,20.45,17.55,20,17,20z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,2H9C7.35,2,6,3.35,6,5v10c0,1.65,1.35,3,3,3h10c1.65,0,3-1.35,3-3l0-10C22,3.34,20.66,2,19,2z M17.93,15h-7.91 c-0.42,0-0.65-0.48-0.39-0.81l1.47-1.88c0.2-0.26,0.59-0.26,0.79,0l1.28,1.67l2.12-2.52c0.2-0.24,0.57-0.24,0.77,0l2.26,2.72 C18.59,14.51,18.36,15,17.93,15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/Android.mk b/packages/overlays/IconPackSamLauncherOverlay/Android.mk
new file mode 100644
index 0000000..766df22
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackSamLauncher
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackSamLauncherOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamLauncherOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..2efa010
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.sam.launcher"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.google.android.apps.nexuslauncher" android:category="android.theme.customization.icon_pack.launcher" android:priority="1"/>
+    <application android:label="Sam" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_corp.xml
new file mode 100644
index 0000000..19d38e7
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_corp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorHint" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,6h-3c0-2.21-1.79-4-4-4S8,3.79,8,6H5C3.34,6,2,7.34,2,9v9c0,1.66,1.34,3,3,3h14c1.66,0,3-1.34,3-3V9 C22,7.34,20.66,6,19,6z M12,15c-0.83,0-1.5-0.67-1.5-1.5S11.17,12,12,12s1.5,0.67,1.5,1.5S12.83,15,12,15z M10,6c0-1.1,0.9-2,2-2 s2,0.9,2,2H10z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_drag_handle.xml
new file mode 100644
index 0000000..e7fe15f
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_drag_handle.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorHint" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,9H5c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1v0C20,9.45,19.55,9,19,9z M5,15h14c0.55,0,1-0.45,1-1 v0c0-0.55-0.45-1-1-1H5c-0.55,0-1,0.45-1,1v0C4,14.55,4.45,15,5,15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_hourglass_top.xml
new file mode 100644
index 0000000..e818e67
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_hourglass_top.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,7V4h1c0.55,0,1-0.45,1-1c0-0.55-0.45-1-1-1H5C4.45,2,4,2.45,4,3c0,0.55,0.45,1,1,1h1v3c0,2.09,1.07,3.93,2.69,5 C7.07,13.07,6,14.91,6,17v3H5c-0.55,0-1,0.45-1,1s0.45,1,1,1h14c0.55,0,1-0.45,1-1s-0.45-1-1-1h-1v-3c0-2.09-1.07-3.93-2.69-5 C16.93,10.93,18,9.09,18,7 M16,17v3H8v-3c0-2.2,1.79-4,4-4S16,14.8,16,17"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_info_no_shadow.xml
new file mode 100644
index 0000000..be58877
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_info_no_shadow.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M13,16c0,0.55-0.45,1-1,1s-1-0.45-1-1 v-4c0-0.55,0.45-1,1-1s1,0.45,1,1V16z M12,9c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C13,8.55,12.55,9,12,9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_install_no_shadow.xml
new file mode 100644
index 0000000..5061ea3
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_install_no_shadow.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,15c-0.55,0-1,0.45-1,1v1c0,0.55-0.45,1-1,1H7c-0.55,0-1-0.45-1-1v-1c0-0.55-0.45-1-1-1s-1,0.45-1,1v1 c0,1.65,1.35,3,3,3h10c1.65,0,3-1.35,3-3v-1C20,15.45,19.55,15,19,15z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M10.59,15.09c0.78,0.78,2.05,0.78,2.83,0l2.88-2.88c0.39-0.39,0.39-1.02,0-1.41c-0.39-0.39-1.02-0.39-1.41,0L13,12.67V5 c0-0.55-0.45-1-1-1s-1,0.45-1,1v7.67l-1.88-1.88c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41L10.59,15.09z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_palette.xml
new file mode 100644
index 0000000..6916a30
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_palette.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.49,2,2,6.49,2,12s4.49,10,10,10c1.38,0,2.5-1.12,2.5-2.5c0-0.61-0.23-1.21-0.64-1.67 c-0.08-0.09-0.13-0.21-0.13-0.33c0-0.28,0.23-0.5,0.5-0.5H16c3.31,0,6-2.69,6-6C22,6.04,17.51,2,12,2 M6.5,13 C5.67,13,5,12.33,5,11.5C5,10.67,5.67,10,6.5,10S8,10.67,8,11.5C8,12.33,7.33,13,6.5,13 M9.5,9C8.67,9,8,8.33,8,7.5S8.67,6,9.5,6 S11,6.67,11,7.5S10.33,9,9.5,9 M14.5,9C13.67,9,13,8.33,13,7.5S13.67,6,14.5,6S16,6.67,16,7.5S15.33,9,14.5,9 M17.5,13 c-0.83,0-1.5-0.67-1.5-1.5c0-0.83,0.67-1.5,1.5-1.5c0.83,0,1.5,0.67,1.5,1.5C19,12.33,18.33,13,17.5,13"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_pin.xml
new file mode 100644
index 0000000..1fe8772
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_pin.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,11V5c0-1.66-1.34-3-3-3h-4C8.35,2,7,3.35,7,5v6l-1.74,2.61C5.09,13.86,5,14.16,5,14.46C5,15.31,5.69,16,6.54,16H11v5 c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1v-5h4.46c1.23,0,1.95-1.38,1.28-2.39L17,11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_setting.xml
new file mode 100644
index 0000000..daa51f1
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_setting.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,7.15c-0.72-1.3-2.05-2.03-3.44-2.05c-0.78-0.01-1.46-0.41-1.85-1.09C14.77,2.81,13.48,2,12,2S9.23,2.81,8.54,4.01 C8.15,4.69,7.47,5.09,6.69,5.1C5.31,5.12,3.97,5.85,3.25,7.15c-0.68,1.23-0.64,2.66-0.02,3.81c0.35,0.65,0.35,1.41,0,2.07 c-0.62,1.15-0.66,2.58,0.02,3.81c0.72,1.3,2.05,2.03,3.44,2.05c0.78,0.01,1.46,0.41,1.85,1.09C9.23,21.19,10.52,22,12,22 s2.77-0.81,3.46-2.01c0.39-0.68,1.07-1.08,1.85-1.09c1.38-0.02,2.72-0.75,3.44-2.05c0.68-1.23,0.64-2.66,0.02-3.81 c-0.35-0.65-0.35-1.41,0-2.07C21.39,9.81,21.43,8.38,20.75,7.15 M12,15c-1.66,0-3-1.34-3-3s1.34-3,3-3s3,1.34,3,3S13.66,15,12,15"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_smartspace_preferences.xml
new file mode 100644
index 0000000..b1a9ea3c
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_smartspace_preferences.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M8.18,6.34L9,6.64C9.4,6.78,9.78,6.4,9.64,6l-0.3-0.82c-0.16-0.44-0.16-0.92,0-1.35L9.64,3C9.78,2.6,9.4,2.22,9,2.36 l-0.82,0.3c-0.44,0.16-0.92,0.16-1.35,0L6,2.36C5.6,2.22,5.22,2.6,5.36,3l0.3,0.82c0.16,0.44,0.16,0.92,0,1.35L5.36,6 C5.22,6.4,5.6,6.78,6,6.64l0.82-0.3C7.26,6.19,7.74,6.19,8.18,6.34z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.82,14.66L18,14.36c-0.4-0.14-0.78,0.24-0.64,0.64l0.3,0.82c0.16,0.44,0.16,0.92,0,1.35L17.36,18 c-0.14,0.4,0.24,0.78,0.64,0.64l0.82-0.3c0.44-0.16,0.92-0.16,1.35,0l0.82,0.3c0.4,0.14,0.78-0.24,0.64-0.64l-0.3-0.82 c-0.16-0.44-0.16-0.92,0-1.35l0.3-0.82c0.14-0.4-0.24-0.78-0.64-0.64l-0.82,0.3C19.74,14.81,19.26,14.81,18.82,14.66z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21,2.36l-0.82,0.3c-0.44,0.16-0.92,0.16-1.35,0L18,2.36C17.6,2.22,17.22,2.6,17.36,3l0.3,0.82 c0.16,0.44,0.16,0.92,0,1.35L17.36,6C17.22,6.4,17.6,6.78,18,6.64l0.82-0.3c0.44-0.16,0.92-0.16,1.35,0L21,6.64 C21.4,6.78,21.78,6.4,21.64,6l-0.3-0.82c-0.16-0.44-0.16-0.92,0-1.35L21.64,3C21.78,2.6,21.4,2.22,21,2.36"/>
+  <path android:fillColor="@android:color/white" android:pathData="M15.54,8.47c-1.03-1.04-2.72-1.05-3.76-0.01l-9.32,9.33c-1.03,1.03-1.03,2.71,0,3.75c1.03,1.03,2.72,1.03,3.75,0 l9.32-9.33C16.57,11.18,16.57,9.51,15.54,8.47 M14.72,11.4l-1.38,1.38l-2.12-2.12l1.38-1.38c0.58-0.59,1.53-0.59,2.12,0 C15.3,9.87,15.3,10.81,14.72,11.4"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_split_screen.xml
new file mode 100644
index 0000000..3766c9a
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_split_screen.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,2H7C5.35,2,4,3.35,4,5v3c0,1.65,1.35,3,3,3h10c1.65,0,3-1.35,3-3V5C20,3.35,18.65,2,17,2z M18,8c0,0.55-0.45,1-1,1H7 C6.45,9,6,8.55,6,8V5c0-0.55,0.45-1,1-1h10c0.55,0,1,0.45,1,1V8z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17,13H7c-1.65,0-3,1.35-3,3v3c0,1.65,1.35,3,3,3h10c1.65,0,3-1.35,3-3v-3C20,14.35,18.65,13,17,13z M18,19 c0,0.55-0.45,1-1,1H7c-0.55,0-1-0.45-1-1v-3c0-0.55,0.45-1,1-1h10c0.55,0,1,0.45,1,1V19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml
new file mode 100644
index 0000000..d565038
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,4h-4c0,0,0,0,0,0v0c0-0.55-0.45-1-1-1h-4C9.45,3,9,3.45,9,4v0c0,0,0,0,0,0H5C4.45,4,4,4.45,4,5c0,0.55,0.45,1,1,1h14 c0.55,0,1-0.45,1-1C20,4.45,19.55,4,19,4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5,18c0,1.66,1.34,3,3,3h8c1.66,0,3-1.34,3-3V7H5V18z M13,10.89C13,10.4,13.45,10,14,10s1,0.4,1,0.89v6.22 C15,17.6,14.55,18,14,18s-1-0.4-1-0.89V10.89z M9,10.89C9,10.4,9.45,10,10,10s1,0.4,1,0.89v6.22C11,17.6,10.55,18,10,18 s-1-0.4-1-0.89V10.89z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_warning.xml
new file mode 100644
index 0000000..453ec10
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_warning.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.26,18L13.73,4.99c-0.77-1.33-2.69-1.33-3.46,0L2.74,18c-0.77,1.33,0.19,3,1.73,3h15.06C21.07,21,22.03,19.33,21.26,18 z M4.47,19L12,5.99L19.53,19H4.47z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11,11v3c0,0.55,0.45,1,1,1c0.55,0,1-0.45,1-1v-3c0-0.55-0.45-1-1-1C11.45,10,11,10.45,11,11z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 16 C 12.5522847498 16 13 16.4477152502 13 17 C 13 17.5522847498 12.5522847498 18 12 18 C 11.4477152502 18 11 17.5522847498 11 17 C 11 16.4477152502 11.4477152502 16 12 16 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_widget.xml
new file mode 100644
index 0000000..f0919c5
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_widget.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.07,11.59l2.83-2.83c0.78-0.78,0.78-2.05,0-2.83L18.07,3.1c-0.78-0.78-2.05-0.78-2.83,0l-2.83,2.83 c-0.78,0.78-0.78,2.05,0,2.83l2.83,2.83C16.03,12.37,17.29,12.37,18.07,11.59z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9,3H5C3.9,3,3,3.9,3,5v4c0,1.1,0.9,2,2,2h4c1.1,0,2-0.9,2-2V7.34V5C11,3.9,10.1,3,9,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,13h-2.34H15c-1.1,0-2,0.9-2,2v4c0,1.1,0.9,2,2,2h4c1.1,0,2-0.9,2-2v-4C21,13.9,20.1,13,19,13z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9,13H5c-1.1,0-2,0.9-2,2v4c0,1.1,0.9,2,2,2h4c1.1,0,2-0.9,2-2v-4C11,13.9,10.1,13,9,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/Android.mk b/packages/overlays/IconPackSamSettingsOverlay/Android.mk
new file mode 100644
index 0000000..32aa1ac
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackSamSettings
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackSamSettingsOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamSettingsOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..b4cfbbe
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.sam.settings"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.settings" android:category="android.theme.customization.icon_pack.settings" android:priority="1"/>
+    <application android:label="Sam" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/drag_handle.xml
new file mode 100644
index 0000000..83c2c0b
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/drag_handle.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,9H5c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1v0C20,9.45,19.55,9,19,9z M5,15h14c0.55,0,1-0.45,1-1 v0c0-0.55-0.45-1-1-1H5c-0.55,0-1,0.45-1,1v0C4,14.55,4.45,15,5,15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_add_24dp.xml
new file mode 100644
index 0000000..6296d18
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_add_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,13h-6v6c0,0.55-0.45,1-1,1h0c-0.55,0-1-0.45-1-1v-6H5c-0.55,0-1-0.45-1-1v0c0-0.55,0.45-1,1-1h6V5c0-0.55,0.45-1,1-1h0 c0.55,0,1,0.45,1,1v6h6c0.55,0,1,0.45,1,1v0C20,12.55,19.55,13,19,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_airplanemode_active.xml
new file mode 100644
index 0000000..3acd8d0
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_airplanemode_active.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.11,10.24L15,8.19V5c0-1.66-1.34-3-3-3c-1.66,0-3,1.34-3,3v3.19l-5.11,2.05C2.75,10.69,2,11.8,2,13.02v1.95 c0,0.92,0.82,1.64,1.72,1.48c1.62-0.27,3.48-0.78,4.64-1.12C8.68,15.25,9,15.49,9,15.82v1.26c0,0.33-0.16,0.63-0.43,0.82 l-0.72,0.5C6.54,19.32,6.68,22,8.5,22h7c1.82,0,1.96-2.68,0.65-3.6l-0.72-0.5C15.16,17.71,15,17.41,15,17.08v-1.26 c0-0.33,0.32-0.57,0.64-0.48c1.16,0.34,3.02,0.85,4.64,1.12C21.18,16.61,22,15.9,22,14.98v-1.95C22,11.8,21.25,10.69,20.11,10.24"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_android.xml
new file mode 100644
index 0000000..1430d0c
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_android.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6,18c0,0.55,0.45,1,1,1h1v3.5C8,23.33,8.67,24,9.5,24s1.5-0.67,1.5-1.5V19h2v3.5c0,0.83,0.67,1.5,1.5,1.5 s1.5-0.67,1.5-1.5V19h1c0.55,0,1-0.45,1-1V8H6V18z M3.5,8C2.67,8,2,8.67,2,9.5v7C2,17.33,2.67,18,3.5,18S5,17.33,5,16.5v-7 C5,8.67,4.33,8,3.5,8 M20.5,8C19.67,8,19,8.67,19,9.5v7c0,0.83,0.67,1.5,1.5,1.5s1.5-0.67,1.5-1.5v-7C22,8.67,21.33,8,20.5,8 M15.53,2.16l1.3-1.3c0.2-0.2,0.2-0.51,0-0.71c-0.2-0.2-0.51-0.2-0.71,0l-1.48,1.48C13.85,1.23,12.95,1,12,1 c-0.96,0-1.86,0.23-2.66,0.63L7.85,0.15c-0.2-0.2-0.51-0.2-0.71,0c-0.2,0.2-0.2,0.51,0,0.71l1.31,1.31C6.97,3.26,6,5.01,6,7h12 C18,5.01,17.03,3.25,15.53,2.16 M10,5H9V4h1V5z M15,5h-1V4h1V5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_apps.xml
new file mode 100644
index 0000000..ff34995
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_apps.xml
@@ -0,0 +1,26 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 6 10 C 7.10456949966 10 8 10.8954305003 8 12 C 8 13.1045694997 7.10456949966 14 6 14 C 4.89543050034 14 4 13.1045694997 4 12 C 4 10.8954305003 4.89543050034 10 6 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 4 C 7.10456949966 4 8 4.89543050034 8 6 C 8 7.10456949966 7.10456949966 8 6 8 C 4.89543050034 8 4 7.10456949966 4 6 C 4 4.89543050034 4.89543050034 4 6 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 4 C 19.1045694997 4 20 4.89543050034 20 6 C 20 7.10456949966 19.1045694997 8 18 8 C 16.8954305003 8 16 7.10456949966 16 6 C 16 4.89543050034 16.8954305003 4 18 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 16 C 7.10456949966 16 8 16.8954305003 8 18 C 8 19.1045694997 7.10456949966 20 6 20 C 4.89543050034 20 4 19.1045694997 4 18 C 4 16.8954305003 4.89543050034 16 6 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 16 C 13.1045694997 16 14 16.8954305003 14 18 C 14 19.1045694997 13.1045694997 20 12 20 C 10.8954305003 20 10 19.1045694997 10 18 C 10 16.8954305003 10.8954305003 16 12 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 10 C 19.1045694997 10 20 10.8954305003 20 12 C 20 13.1045694997 19.1045694997 14 18 14 C 16.8954305003 14 16 13.1045694997 16 12 C 16 10.8954305003 16.8954305003 10 18 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 16 C 19.1045694997 16 20 16.8954305003 20 18 C 20 19.1045694997 19.1045694997 20 18 20 C 16.8954305003 20 16 19.1045694997 16 18 C 16 16.8954305003 16.8954305003 16 18 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 10 C 13.1045694997 10 14 10.8954305003 14 12 C 14 13.1045694997 13.1045694997 14 12 14 C 10.8954305003 14 10 13.1045694997 10 12 C 10 10.8954305003 10.8954305003 10 12 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 4 C 13.1045694997 4 14 4.89543050034 14 6 C 14 7.10456949966 13.1045694997 8 12 8 C 10.8954305003 8 10 7.10456949966 10 6 C 10 4.89543050034 10.8954305003 4 12 4 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_back.xml
new file mode 100644
index 0000000..3ba71a0
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,11H7.83l4.88-4.88c0.39-0.39,0.39-1.02,0-1.41l0,0c-0.39-0.39-1.02-0.39-1.41,0L6.12,9.88c-1.17,1.17-1.17,3.07,0,4.24 l5.17,5.17c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L7.83,13H19c0.55,0,1-0.45,1-1C20,11.45,19.55,11,19,11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml
new file mode 100644
index 0000000..3cecf5b
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.88,8.29l-5.18,5.17c-0.39,0.39-1.02,0.39-1.41,0L6.12,8.29c-0.39-0.39-1.02-0.39-1.41,0l0,0 c-0.39,0.39-0.39,1.02,0,1.41l5.17,5.17c1.17,1.17,3.07,1.17,4.24,0l5.17-5.17c0.39-0.39,0.39-1.02,0-1.41l0,0 C18.91,7.91,18.27,7.9,17.88,8.29z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_charging_full.xml
new file mode 100644
index 0000000..aff78c3
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_charging_full.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4h-1c0-1.1-0.9-2-2-2s-2,0.9-2,2H9C7.35,4,6,5.35,6,7v12c0,1.65,1.35,3,3,3h6c1.65,0,3-1.35,3-3V7 C18,5.35,16.65,4,15,4z M14.1,12.74l-2.16,4.02C11.69,17.21,11,17.04,11,16.52V14h-0.66c-0.38,0-0.62-0.4-0.44-0.74l2.16-4.02 C12.31,8.79,13,8.96,13,9.48V12h0.66C14.04,12,14.28,12.4,14.1,12.74z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml
new file mode 100644
index 0000000..1447e05
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4h-1c0-1.1-0.9-2-2-2s-2,0.9-2,2H9C7.35,4,6,5.35,6,7v12c0,1.65,1.35,3,3,3h6c1.65,0,3-1.35,3-3V7 C18,5.35,16.65,4,15,4z M15.07,11.76l-3.54,3.54c-0.39,0.39-1.02,0.39-1.41,0l-1.41-1.41c-0.39-0.39-0.39-1.02,0-1.41 c0.39-0.39,1.02-0.39,1.41,0l0.71,0.71l2.83-2.83c0.39-0.39,1.02-0.39,1.41,0C15.46,10.73,15.46,11.37,15.07,11.76z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml
new file mode 100644
index 0000000..448a501
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4h-1c0-1.1-0.9-2-2-2s-2,0.9-2,2H9C7.35,4,6,5.35,6,7v12c0,1.65,1.35,3,3,3h6c1.65,0,3-1.35,3-3V7 C18,5.35,16.65,4,15,4z M12,18c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C13,17.55,12.55,18,12,18z M13,13 c0,0.55-0.45,1-1,1s-1-0.45-1-1V9c0-0.55,0.45-1,1-1s1,0.45,1,1V13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_call_24dp.xml
new file mode 100644
index 0000000..4b57e59c
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_call_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15.67,14.85l-1.52,1.5c-2.79-1.43-5.07-3.71-6.51-6.5l1.48-1.47C9.6,7.91,9.81,7.23,9.68,6.57L9.29,4.62 C9.1,3.69,8.28,3.02,7.33,3.02l-2.23,0c-1.23,0-2.14,1.09-1.98,2.3c0.32,2.43,1.12,4.71,2.31,6.73c1.57,2.69,3.81,4.93,6.5,6.5 c2.03,1.19,4.31,1.99,6.74,2.31c1.21,0.16,2.3-0.76,2.3-1.98l0-2.23c0-0.96-0.68-1.78-1.61-1.96l-1.9-0.38 C16.81,14.18,16.14,14.38,15.67,14.85z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cancel.xml
new file mode 100644
index 0000000..966faf1
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cancel.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.47,2,2,6.47,2,12s4.47,10,10,10s10-4.47,10-10S17.53,2,12,2 M12,20c-4.41,0-8-3.59-8-8s3.59-8,8-8s8,3.59,8,8 S16.41,20,12,20"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.88,7.7L12,10.59L9.11,7.7c-0.39-0.39-1.02-0.39-1.41,0l0,0c-0.39,0.39-0.39,1.02,0,1.41L10.59,12L7.7,14.89 c-0.39,0.39-0.39,1.02,0,1.41h0c0.39,0.39,1.02,0.39,1.41,0L12,13.41l2.89,2.89c0.39,0.39,1.02,0.39,1.41,0l0,0 c0.39-0.39,0.39-1.02,0-1.41L13.41,12l2.89-2.89c0.39-0.39,0.39-1.02,0-1.41l0,0C15.91,7.32,15.27,7.32,14.88,7.7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cast_24dp.xml
new file mode 100644
index 0000000..fd00e5a
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cast_24dp.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M2.14,14.09c-0.6-0.1-1.14,0.39-1.14,1v0c0,0.49,0.36,0.9,0.85,0.98c1.84,0.31,3.68,1.76,4.08,4.08 C6.01,20.63,6.42,21,6.91,21c0.61,0,1.09-0.54,1-1.14C7.43,16.91,5.09,14.57,2.14,14.09z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,3H4C2.35,3,1,4.35,1,6v1c0,0.55,0.45,1,1,1c0.55,0,1-0.45,1-1V6c0-0.55,0.45-1,1-1h16c0.55,0,1,0.45,1,1v12 c0,0.55-0.45,1-1,1h-5c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h5c1.65,0,3-1.35,3-3V6C23,4.35,21.65,3,20,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,10.05C1.51,10,1,10.46,1,11.06c0,0.51,0.38,0.94,0.89,0.99c6.81,0.67,7.97,7.08,8.07,8.07 c0.05,0.5,0.48,0.89,0.99,0.89c0.59,0,1.06-0.51,1-1.1C11.43,14.7,7.29,10.57,2.1,10.05z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 2.5 18 C 3.32842712475 18 4 18.6715728753 4 19.5 C 4 20.3284271247 3.32842712475 21 2.5 21 C 1.67157287525 21 1 20.3284271247 1 19.5 C 1 18.6715728753 1.67157287525 18 2.5 18 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cellular_off.xml
new file mode 100644
index 0000000..00779e7
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cellular_off.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M10,6.18l1.24,1.46C11.43,7.88,11.72,8,12,8c0.23,0,0.46-0.08,0.64-0.24c0.42-0.36,0.48-0.99,0.12-1.41l-2.35-2.78 C9.66,2.82,8.4,2.76,7.53,3.64L7.04,4.21L10,7.17V6.18z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16,13.17V13v-1c0-0.39-0.23-0.71-0.55-0.88c-0.02-0.01-0.04-0.03-0.06-0.04C15.27,11.03,15.14,11,15,11h-1.17L16,13.17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l5.9,5.9V12c0,0.55,0.45,1,1,1c0,0,0,0,0,0l0,0h1.17 L14,16.83v0.99l-1.24-1.46c-0.36-0.42-0.99-0.48-1.41-0.12c-0.42,0.36-0.48,0.99-0.12,1.41l2.35,2.78 c0.72,0.72,1.99,0.84,2.89-0.06l0.49-0.58l2.11,2.11c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L3.51,3.51z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml
new file mode 100644
index 0000000..156dc688
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M9,18L9,18c-0.39-0.39-0.39-1.03,0-1.42l3.88-3.87c0.39-0.39,0.39-1.02,0-1.42L9,7.42C8.61,7.03,8.61,6.39,9,6l0,0 c0.39-0.39,1.03-0.39,1.42,0l3.87,3.88c1.17,1.17,1.17,3.07,0,4.24L10.42,18C10.03,18.39,9.39,18.39,9,18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml
new file mode 100644
index 0000000..0f6b1bd
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/material_grey_600" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,21H5c-0.55,0-1-0.45-1-1V8c0-0.55-0.45-1-1-1h0C2.45,7,2,7.45,2,8v12c0,1.65,1.35,3,3,3h12c0.55,0,1-0.45,1-1v0 C18,21.45,17.55,21,17,21z M21,4c0-1.65-1.35-3-3-3H9C7.35,1,6,2.35,6,4v12c0,1.65,1.35,3,3,3h9c1.65,0,3-1.35,3-3V4z M18,17H9 c-0.55,0-1-0.45-1-1V4c0-0.55,0.45-1,1-1h9c0.55,0,1,0.45,1,1v12C19,16.55,18.55,17,18,17z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_data_saver.xml
new file mode 100644
index 0000000..252b58b
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_data_saver.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11,11H9c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h2v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2h2c0.55,0,1-0.45,1-1 c0-0.55-0.45-1-1-1h-2V9c0-0.55-0.45-1-1-1s-1,0.45-1,1V11z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.93,2.44C13.97,2.14,13,2.88,13,3.89c0,0.67,0.45,1.24,1.09,1.44C16.93,6.22,19,8.86,19,12c0,0.51-0.06,1.01-0.17,1.49 c-0.14,0.64,0.12,1.3,0.69,1.64l0.01,0.01c0.86,0.5,1.98,0.05,2.21-0.91C21.91,13.51,22,12.76,22,12C22,7.5,19.02,3.69,14.93,2.44 z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.47,16.98c-0.58-0.34-1.3-0.24-1.79,0.21C15.45,18.32,13.81,19,12,19c-3.87,0-7-3.13-7-7c0-3.14,2.07-5.78,4.91-6.67 C10.55,5.13,11,4.56,11,3.89v0c0-1.01-0.98-1.74-1.94-1.45C4.55,3.82,1.41,8.3,2.09,13.39c0.59,4.38,4.13,7.92,8.51,8.51 c3.14,0.42,6.04-0.61,8.13-2.53C19.47,18.7,19.34,17.49,18.47,16.98z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_delete.xml
new file mode 100644
index 0000000..6728676
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_delete.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,4h-4c0,0,0,0,0,0v0c0-0.55-0.45-1-1-1h-4C9.45,3,9,3.45,9,4v0c0,0,0,0,0,0H5C4.45,4,4,4.45,4,5c0,0.55,0.45,1,1,1h14 c0.55,0,1-0.45,1-1C20,4.45,19.55,4,19,4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5,18c0,1.66,1.34,3,3,3h8c1.66,0,3-1.34,3-3V7H5V18z M13,10.89C13,10.4,13.45,10,14,10s1,0.4,1,0.89v6.22 C15,17.6,14.55,18,14,18s-1-0.4-1-0.89V10.89z M9,10.89C9,10.4,9.45,10,10,10s1,0.4,1,0.89v6.22C11,17.6,10.55,18,10,18 s-1-0.4-1-0.89V10.89z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_devices_other.xml
new file mode 100644
index 0000000..733fe7f
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_devices_other.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M3,7c0-0.55,0.45-1,1-1h16c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H4C2.35,4,1,5.35,1,7v10c0,1.65,1.35,3,3,3h2 c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H4c-0.55,0-1-0.45-1-1V7z M12,12h-2c-0.55,0-1,0.45-1,1v0.78C8.39,14.33,8,15.11,8,16 c0,0.89,0.39,1.67,1,2.22V19c0,0.55,0.45,1,1,1h2c0.55,0,1-0.45,1-1v-0.78c0.61-0.55,1-1.34,1-2.22c0-0.88-0.39-1.67-1-2.22V13 C13,12.45,12.55,12,12,12z M11,17.5c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S11.83,17.5,11,17.5 M17,8 c-1.1,0-2,0.9-2,2v8c0,1.1,0.9,2,2,2h4c1.1,0,2-0.9,2-2v-8c0-1.1-0.9-2-2-2H17z M21,18h-4v-8h4V18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml
new file mode 100644
index 0000000..9863829
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,1.75C6.35,1.75,1.75,6.35,1.75,12S6.35,22.25,12,22.25h0.01c2.73,0,5.3-1.06,7.23-2.99c1.94-1.93,3-4.5,3.01-7.24V12 C22.25,6.35,17.65,1.75,12,1.75 M15,13H9c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h6c0.55,0,1,0.45,1,1C16,12.55,15.55,13,15,13"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_eject_24dp.xml
new file mode 100644
index 0000000..9e1b8bc
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_eject_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,17H6c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h12c0.55,0,1-0.45,1-1C19,17.45,18.55,17,18,17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.2,15h9.6c0.8,0,1.28-0.89,0.83-1.55l-4.8-7.2c-0.4-0.59-1.27-0.59-1.66,0l-4.8,7.2C5.92,14.11,6.4,15,7.2,15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_less.xml
new file mode 100644
index 0000000..71a06ad
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_less.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M9.88,9.12l-5.17,5.17c-0.39,0.39-0.39,1.02,0,1.41l0,0c0.39,0.39,1.02,0.39,1.41,0l5.18-5.17c0.39-0.39,1.02-0.39,1.41,0 l5.18,5.17c0.39,0.39,1.02,0.39,1.41,0l0,0c0.39-0.39,0.39-1.02,0-1.41l-5.17-5.17C12.95,7.95,11.05,7.95,9.88,9.12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_more_inverse.xml
new file mode 100644
index 0000000..9ea52e2
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_more_inverse.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorForegroundInverse" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.88,8.29l-5.18,5.17c-0.39,0.39-1.02,0.39-1.41,0L6.12,8.29c-0.39-0.39-1.02-0.39-1.41,0l0,0 c-0.39,0.39-0.39,1.02,0,1.41l5.17,5.17c1.17,1.17,3.07,1.17,4.24,0l5.17-5.17c0.39-0.39,0.39-1.02,0-1.41l0,0 C18.91,7.91,18.27,7.9,17.88,8.29z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_find_in_page_24px.xml
new file mode 100644
index 0000000..f75c6e3
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_find_in_page_24px.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.39,16.8c-0.69,0.44-1.51,0.7-2.39,0.7c-2.49,0-4.5-2.01-4.5-4.5S9.51,8.5,12,8.5s4.5,2.01,4.5,4.5 c0,0.88-0.26,1.69-0.7,2.39l4.14,4.15C19.98,19.36,20,19.18,20,19V9.24c0-0.8-0.32-1.56-0.88-2.12l-4.24-4.24 C14.32,2.32,13.55,2,12.76,2H7C5.34,2,4,3.34,4,5v14c0,1.66,1.34,3,3,3h10c0.72,0,1.38-0.27,1.89-0.69L14.39,16.8z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 10.5 C 13.3807118746 10.5 14.5 11.6192881254 14.5 13 C 14.5 14.3807118746 13.3807118746 15.5 12 15.5 C 10.6192881254 15.5 9.5 14.3807118746 9.5 13 C 9.5 11.6192881254 10.6192881254 10.5 12 10.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml
new file mode 100644
index 0000000..937da33
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11.7,6.55l-0.81-1.22C10.33,4.5,9.4,4,8.39,4H5.01c-1.66,0-3,1.34-3,3L2,17c0,1.66,1.34,3,3,3h14c1.66,0,3-1.34,3-3v-7 c0-1.66-1.34-3-3-3h-6.46C12.2,7,11.89,6.83,11.7,6.55"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_friction_lock_closed.xml
new file mode 100644
index 0000000..f0ce61b
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_friction_lock_closed.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,8h-0.5V5.69c0-2.35-1.73-4.45-4.07-4.67C9.75,0.77,7.5,2.87,7.5,5.5V8H7c-1.65,0-3,1.35-3,3v8c0,1.65,1.35,3,3,3h10 c1.65,0,3-1.35,3-3v-8C20,9.35,18.65,8,17,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,17,12,17z M14.5,8h-5V5.5 C9.5,4.12,10.62,3,12,3s2.5,1.12,2.5,2.5V8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml
new file mode 100644
index 0000000..fc3320d
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10c5.52,0,10-4.48,10-10S17.52,2,12,2 M11,19.93C7.06,19.44,4,16.08,4,12 s3.05-7.44,7-7.93V19.93z M13,4.07C14.03,4.2,15,4.52,15.87,5H13V4.07z M13,7h5.24c0.25,0.31,0.48,0.65,0.68,1H13V7z M13,10h6.74 c0.08,0.33,0.15,0.66,0.19,1H13V10z M13,19.93V19h2.87C15,19.48,14.03,19.8,13,19.93 M18.24,17H13v-1h5.92 C18.72,16.35,18.49,16.69,18.24,17 M19.74,14H13v-1h6.93C19.89,13.34,19.82,13.67,19.74,14"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_headset_24dp.xml
new file mode 100644
index 0000000..482f87b
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_headset_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.97,0-9,4.03-9,9v7c0,1.66,1.34,3,3,3h0c1.66,0,3-1.34,3-3v-2c0-1.66-1.34-3-3-3H5l0-1.71 C5,7.45,7.96,4.11,11.79,4C15.76,3.89,19,7.06,19,11v2h-1c-1.66,0-3,1.34-3,3v2c0,1.66,1.34,3,3,3h0c1.66,0,3-1.34,3-3v-7 C21,6.03,16.97,2,12,2"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help.xml
new file mode 100644
index 0000000..4650a72
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M12,18c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1s1,0.45,1,1C13,17.55,12.55,18,12,18z M13.1,14.32C12.98,14.71,12.65,15,12.24,15h-0.15 c-0.62,0-1.11-0.6-0.93-1.2c0.61-1.97,2.71-2.08,2.83-3.66c0.07-0.97-0.62-1.9-1.57-2.1c-1.04-0.22-1.98,0.39-2.3,1.28 C9.98,9.71,9.65,10,9.24,10H9.07C8.45,10,8,9.4,8.18,8.81C8.68,7.18,10.2,6,12,6c2.21,0,4,1.79,4,4 C16,12.22,13.63,12.67,13.1,14.32z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help_actionbar.xml
new file mode 100644
index 0000000..eaf1f54
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help_actionbar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M12,18c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1s1,0.45,1,1C13,17.55,12.55,18,12,18z M13.1,14.32C12.98,14.71,12.65,15,12.24,15h-0.15 c-0.62,0-1.11-0.6-0.93-1.2c0.61-1.97,2.71-2.08,2.83-3.66c0.07-0.97-0.62-1.9-1.57-2.1c-1.04-0.22-1.98,0.39-2.3,1.28 C9.98,9.71,9.65,10,9.24,10H9.07C8.45,10,8,9.4,8.18,8.81C8.68,7.18,10.2,6,12,6c2.21,0,4,1.79,4,4 C16,12.22,13.63,12.67,13.1,14.32z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_homepage_search.xml
new file mode 100644
index 0000000..14655e2
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_homepage_search.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,18.26l-4.99-4.99c1.1-1.53,1.59-3.5,0.97-5.63c-0.65-2.24-2.53-4-4.81-4.49c-4.69-0.99-8.77,3.08-7.77,7.77 c0.48,2.28,2.25,4.16,4.49,4.81c2.13,0.62,4.11,0.13,5.63-0.97l4.99,4.99c0.41,0.41,1.08,0.41,1.49,0l0,0 C20.16,19.33,20.16,18.67,19.75,18.26z M5,9.5C5,7.01,7.01,5,9.5,5S14,7.01,14,9.5S11.99,14,9.5,14S5,11.99,5,9.5"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_info_outline_24.xml
new file mode 100644
index 0000000..6b64c4c
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_info_outline_24.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M13,16c0,0.55-0.45,1-1,1s-1-0.45-1-1 v-4c0-0.55,0.45-1,1-1s1,0.45,1,1V16z M12,9c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C13,8.55,12.55,9,12,9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_movies.xml
new file mode 100644
index 0000000..66f5446
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_movies.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,4h-2l2,4h-3l-2-4h-2l2,4h-3L9,4H7l2,4H6L4.08,4.16C2.88,4.55,2,5.67,2,7v10c0,1.66,1.34,3,3,3h14c1.66,0,3-1.34,3-3V7 C22,5.34,20.66,4,19,4z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml
new file mode 100644
index 0000000..de94ed0
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15.67,14.85l-1.52,1.5c-2.79-1.43-5.07-3.71-6.51-6.5l1.48-1.47C9.6,7.91,9.81,7.23,9.68,6.57L9.29,4.62 C9.1,3.69,8.28,3.02,7.33,3.02l-2.23,0c-1.23,0-2.14,1.09-1.98,2.3c0.32,2.43,1.12,4.71,2.31,6.73c1.57,2.69,3.81,4.93,6.5,6.5 c2.03,1.19,4.31,1.99,6.74,2.31c1.21,0.16,2.3-0.76,2.3-1.98l0-2.23c0-0.96-0.68-1.78-1.61-1.96l-1.9-0.38 C16.81,14.18,16.14,14.38,15.67,14.85z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream.xml
new file mode 100644
index 0000000..1fac685
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16,3l-3,0c-1.1,0-2,0.9-2,2v8.14C10.68,13.05,10.35,13,10.01,13C7.79,13,6,14.79,6,17c0,2.21,1.79,4,4.01,4 c2.22,0,3.99-1.79,3.99-4V7h2c1.1,0,2-0.9,2-2C18,3.9,17.1,3,16,3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream_off.xml
new file mode 100644
index 0000000..b61a355
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14,7h2c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2l-3,0c-1.1,0-2,0.9-2,2v3.17l3,3V7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l8.08,8.08c-0.06,0-0.12-0.01-0.17-0.01 C7.79,13,6,14.79,6,17c0,2.21,1.79,4,4.01,4c2.22,0,3.99-1.79,3.99-4v-0.17l5.07,5.07c0.39,0.39,1.02,0.39,1.41,0 c0.39-0.39,0.39-1.02,0-1.41L3.51,3.51z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_network_cell.xml
new file mode 100644
index 0000000..b89c5b9
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_network_cell.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M3.54,18.94L19.13,3.49C20.21,2.42,22,3.22,22,4.78v15.44c0,0.98-0.76,1.78-1.7,1.78H4.71 C3.17,22.01,2.42,20.04,3.54,18.94"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications.xml
new file mode 100644
index 0000000..86e1fb2
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,17h-1v-6c0-3.07-1.63-5.64-4.5-6.32V4c0-0.83-0.67-1.5-1.5-1.5c-0.83,0-1.5,0.67-1.5,1.5v0.68C7.64,5.36,6,7.92,6,11 v6H5c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1C20,17.45,19.55,17,19,17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml
new file mode 100644
index 0000000..0b05404
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,11c0-3.07-1.63-5.64-4.5-6.32V4c0-0.83-0.67-1.5-1.5-1.5c-0.83,0-1.5,0.67-1.5,1.5v0.68C9.72,4.86,9.05,5.2,8.46,5.63 L18,15.17V11z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.49,20.49L3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l4.14,4.14C6.09,9.68,6,10.33,6,11v6H5 c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h11.17l2.9,2.9c0.39,0.39,1.02,0.39,1.41,0C20.88,21.51,20.88,20.88,20.49,20.49z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_phone_info.xml
new file mode 100644
index 0000000..dac1dee
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_phone_info.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,11L12,11c0.55,0,1,0.45,1,1v4c0,0.55-0.45,1-1,1c-0.55,0-1-0.45-1-1v-4C11,11.45,11.45,11,12,11"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16,1H8C6.34,1,5,2.34,5,4v16c0,1.65,1.35,3,3,3h8c1.65,0,3-1.35,3-3V4C19,2.34,17.66,1,16,1 M17,18H7V6h10V18z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13,8c0,0.55-0.45,1-1,1c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1C12.55,7,13,7.45,13,8"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_photo_library.xml
new file mode 100644
index 0000000..9d4a2fb
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_photo_library.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,20H5c-0.55,0-1-0.45-1-1V7c0-0.55-0.45-1-1-1C2.45,6,2,6.45,2,7v12c0,1.65,1.35,3,3,3h12c0.55,0,1-0.45,1-1 C18,20.45,17.55,20,17,20z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,2H9C7.35,2,6,3.35,6,5v10c0,1.65,1.35,3,3,3h10c1.65,0,3-1.35,3-3l0-10C22,3.34,20.66,2,19,2z M17.93,15h-7.91 c-0.42,0-0.65-0.48-0.39-0.81l1.47-1.88c0.2-0.26,0.59-0.26,0.79,0l1.28,1.67l2.12-2.52c0.2-0.24,0.57-0.24,0.77,0l2.26,2.72 C18.59,14.51,18.36,15,17.93,15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_search_24dp.xml
new file mode 100644
index 0000000..f2fd115
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_search_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,18.26l-4.99-4.99c1.1-1.53,1.59-3.5,0.97-5.63c-0.65-2.24-2.53-4-4.81-4.49c-4.69-0.99-8.77,3.08-7.77,7.77 c0.48,2.28,2.25,4.16,4.49,4.81c2.13,0.62,4.11,0.13,5.63-0.97l4.99,4.99c0.41,0.41,1.08,0.41,1.49,0l0,0 C20.16,19.33,20.16,18.67,19.75,18.26z M5,9.5C5,7.01,7.01,5,9.5,5S14,7.01,14,9.5S11.99,14,9.5,14S5,11.99,5,9.5"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accent.xml
new file mode 100644
index 0000000..0f0f737
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accent.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,7.15c-0.72-1.3-2.05-2.03-3.44-2.05c-0.78-0.01-1.46-0.41-1.85-1.09C14.77,2.81,13.48,2,12,2S9.23,2.81,8.54,4.01 C8.15,4.69,7.47,5.09,6.69,5.1C5.31,5.12,3.97,5.85,3.25,7.15c-0.68,1.23-0.64,2.66-0.02,3.81c0.35,0.65,0.35,1.41,0,2.07 c-0.62,1.15-0.66,2.58,0.02,3.81c0.72,1.3,2.05,2.03,3.44,2.05c0.78,0.01,1.46,0.41,1.85,1.09C9.23,21.19,10.52,22,12,22 s2.77-0.81,3.46-2.01c0.39-0.68,1.07-1.08,1.85-1.09c1.38-0.02,2.72-0.75,3.44-2.05c0.68-1.23,0.64-2.66,0.02-3.81 c-0.35-0.65-0.35-1.41,0-2.07C21.39,9.81,21.43,8.38,20.75,7.15 M12,15c-1.66,0-3-1.34-3-3s1.34-3,3-3s3,1.34,3,3S13.66,15,12,15"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accessibility.xml
new file mode 100644
index 0000000..3be42b3
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accessibility.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,4.99c-0.14-0.55-0.69-0.87-1.24-0.75C17.13,4.77,14.48,5,12,5S6.87,4.77,4.49,4.24c-0.55-0.12-1.1,0.2-1.24,0.75 c-0.14,0.56,0.2,1.13,0.75,1.26C5.61,6.61,7.35,6.86,9,7v12c0,0.55,0.45,1,1,1s1-0.45,1-1v-4c0-0.55,0.45-1,1-1s1,0.45,1,1v4 c0,0.55,0.45,1,1,1s1-0.45,1-1V7c1.65-0.14,3.39-0.39,4.99-0.75C20.55,6.12,20.89,5.55,20.75,4.99z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 0 C 13.1045694997 0 14 0.895430500338 14 2 C 14 3.10456949966 13.1045694997 4 12 4 C 10.8954305003 4 10 3.10456949966 10 2 C 10 0.895430500338 10.8954305003 0 12 0 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 8 22 C 8.55228474983 22 9 22.4477152502 9 23 C 9 23.5522847498 8.55228474983 24 8 24 C 7.44771525017 24 7 23.5522847498 7 23 C 7 22.4477152502 7.44771525017 22 8 22 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 22 C 12.5522847498 22 13 22.4477152502 13 23 C 13 23.5522847498 12.5522847498 24 12 24 C 11.4477152502 24 11 23.5522847498 11 23 C 11 22.4477152502 11.4477152502 22 12 22 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16 22 C 16.5522847498 22 17 22.4477152502 17 23 C 17 23.5522847498 16.5522847498 24 16 24 C 15.4477152502 24 15 23.5522847498 15 23 C 15 22.4477152502 15.4477152502 22 16 22 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accounts.xml
new file mode 100644
index 0000000..a9bf036
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accounts.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6,3C4.34,3,3,4.34,3,6v12c0,1.66,1.34,3,3,3h12c1.65,0,3-1.35,3-3V6c0-1.66-1.34-3-3-3H6z M19,6v9.79 C16.52,14.37,13.23,14,12,14s-4.52,0.37-7,1.79V6c0-0.55,0.45-1,1-1h12C18.55,5,19,5.45,19,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,13c1.94,0,3.5-1.56,3.5-3.5S13.94,6,12,6S8.5,7.56,8.5,9.5S10.06,13,12,13"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_backup.xml
new file mode 100644
index 0000000..1c8b9d2
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_backup.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,11c0-3.87-3.13-7-7-7C8.78,4,6.07,6.18,5.26,9.15C2.82,9.71,1,11.89,1,14.5C1,17.54,3.46,20,6.5,20h12v0 c2.49-0.01,4.5-2.03,4.5-4.52C23,13.16,21.25,11.26,19,11 M15.29,13.71c-0.39,0.39-1.02,0.39-1.41,0L13,12.83V15 c0,0.55-0.45,1-1,1s-1-0.45-1-1v-2.17l-0.88,0.88c-0.39,0.39-1.02,0.39-1.41,0c-0.39-0.39-0.39-1.02,0-1.41l1.88-1.88 c0.78-0.78,2.05-0.78,2.83,0l1.88,1.88C15.68,12.68,15.68,13.32,15.29,13.71"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_battery_white.xml
new file mode 100644
index 0000000..d616ad6
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_battery_white.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4h-1c0-1.1-0.9-2-2-2s-2,0.9-2,2H9C7.35,4,6,5.35,6,7v12c0,1.65,1.35,3,3,3h6c1.65,0,3-1.35,3-3V7 C18,5.35,16.65,4,15,4z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_data_usage.xml
new file mode 100644
index 0000000..939e832
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_data_usage.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.47,16.98c-0.58-0.34-1.3-0.24-1.79,0.21C15.45,18.32,13.81,19,12,19c-3.87,0-7-3.13-7-7c0-3.14,2.07-5.78,4.91-6.67 C10.55,5.13,11,4.56,11,3.89v0c0-1.01-0.98-1.74-1.94-1.45C4.55,3.82,1.41,8.3,2.09,13.39c0.59,4.38,4.13,7.92,8.51,8.51 c3.14,0.42,6.04-0.61,8.13-2.53C19.47,18.7,19.34,17.49,18.47,16.98z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.93,2.44C13.97,2.14,13,2.88,13,3.89c0,0.67,0.45,1.24,1.09,1.44C16.93,6.22,19,8.86,19,12c0,0.51-0.06,1.01-0.17,1.49 c-0.14,0.64,0.12,1.3,0.69,1.64l0.01,0.01c0.86,0.5,1.98,0.05,2.21-0.91C21.91,13.51,22,12.76,22,12C22,7.5,19.02,3.69,14.93,2.44 z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_date_time.xml
new file mode 100644
index 0000000..4155538
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_date_time.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2 M14.71,14.71c-0.39,0.39-1.02,0.39-1.41,0l-1.41-1.41 C11.31,12.73,11,11.97,11,11.17V8c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1v3.17c0,0.27,0.1,0.52,0.29,0.71l1.41,1.41 C15.1,13.68,15.1,14.32,14.71,14.71"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_delete.xml
new file mode 100644
index 0000000..da00c92
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_delete.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,4h-4c0,0,0,0,0,0v0c0-0.55-0.45-1-1-1h-4C9.45,3,9,3.45,9,4v0c0,0,0,0,0,0H5C4.45,4,4,4.45,4,5c0,0.55,0.45,1,1,1h14 c0.55,0,1-0.45,1-1C20,4.45,19.55,4,19,4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5,18c0,1.66,1.34,3,3,3h8c1.66,0,3-1.34,3-3V7H5V18z M13,10.89C13,10.4,13.45,10,14,10s1,0.4,1,0.89v6.22 C15,17.6,14.55,18,14,18s-1-0.4-1-0.89V10.89z M9,10.89C9,10.4,9.45,10,10,10s1,0.4,1,0.89v6.22C11,17.6,10.55,18,10,18 s-1-0.4-1-0.89V10.89z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_disable.xml
new file mode 100644
index 0000000..b09566a
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_disable.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M13.18,4.09c3.45,0.5,6.21,3.24,6.73,6.69c0.25,1.68-0.03,3.27-0.69,4.65c-0.19,0.39-0.11,0.85,0.19,1.15v0 c0.49,0.49,1.32,0.36,1.62-0.26c0.79-1.63,1.14-3.51,0.91-5.5c-0.52-4.58-4.17-8.22-8.75-8.75c-1.99-0.23-3.87,0.13-5.5,0.91 c-0.62,0.3-0.75,1.12-0.27,1.61l0,0c0.3,0.3,0.76,0.38,1.15,0.19C9.94,4.12,11.51,3.84,13.18,4.09z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0l0,0c-0.39,0.39-0.39,1.02,0,1.41l1.56,1.56c-1.25,1.88-1.88,4.2-1.59,6.69 c0.52,4.54,4.21,8.23,8.75,8.75c2.49,0.29,4.81-0.34,6.69-1.59l1.56,1.56c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41 L3.51,3.51z M12,20c-4.41,0-8-3.59-8-8c0-1.48,0.41-2.86,1.12-4.06l10.94,10.94C14.86,19.59,13.48,20,12,20z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_display_white.xml
new file mode 100644
index 0000000..cf4af6f
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_display_white.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M13.25,7.16C12.62,6.99,12,7.48,12,8.13v7.74c0,0.65,0.62,1.14,1.25,0.97C15.41,16.29,17,14.33,17,12 S15.41,7.71,13.25,7.16z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.19,9.88l-0.9-0.9C20.1,8.8,20,8.54,20,8.28V7c0-1.66-1.34-3-3-3h-1.28c-0.27,0-0.52-0.11-0.71-0.29l-0.9-0.9 c-1.17-1.17-3.07-1.17-4.24,0l-0.9,0.9C8.79,3.89,8.54,4,8.28,4H7C5.34,4,4,5.34,4,7v1.28C4,8.54,3.89,8.8,3.71,8.98l-0.9,0.9 c-1.17,1.17-1.17,3.07,0,4.24l0.9,0.9C3.89,15.2,4,15.46,4,15.72V17c0,1.66,1.34,3,3,3h1.28c0.27,0,0.52,0.11,0.71,0.29l0.9,0.9 c1.17,1.17,3.07,1.17,4.24,0l0.9-0.9C15.2,20.11,15.46,20,15.72,20H17c1.66,0,3-1.34,3-3v-1.28c0-0.27,0.11-0.52,0.29-0.71 l0.9-0.9C22.36,12.95,22.36,11.05,21.19,9.88z M19.77,12.71l-1.48,1.48C18.11,14.37,18,14.63,18,14.89V17c0,0.55-0.45,1-1,1h-2.11 c-0.27,0-0.52,0.11-0.71,0.29l-1.48,1.48c-0.39,0.39-1.02,0.39-1.41,0l-1.48-1.48C9.63,18.1,9.37,18,9.11,18H7c-0.55,0-1-0.45-1-1 v-2.1c0-0.27-0.11-0.52-0.29-0.71l-1.48-1.48c-0.39-0.39-0.39-1.02,0-1.41l1.48-1.48C5.9,9.63,6,9.37,6,9.11V7c0-0.55,0.45-1,1-1 h2.11c0.27,0,0.52-0.11,0.71-0.29l1.48-1.48c0.39-0.39,1.02-0.39,1.41,0l1.48,1.48C14.38,5.89,14.63,6,14.89,6H17 c0.55,0,1,0.45,1,1v2.11c0,0.27,0.11,0.52,0.29,0.71l1.48,1.48C20.16,11.68,20.16,12.32,19.77,12.71z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_enable.xml
new file mode 100644
index 0000000..b6d2790
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_enable.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M7.71,10.79c-0.39,0.39-0.39,1.02,0,1.41l2.88,2.88c0.78,0.78,2.05,0.78,2.83,0l2.88-2.88c0.39-0.39,0.39-1.02,0-1.41 c-0.39-0.39-1.02-0.39-1.41,0L13,12.67V3c0-0.55-0.45-1-1-1s-1,0.45-1,1v9.67l-1.88-1.88C8.73,10.4,8.09,10.41,7.71,10.79z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.42,3.03C15.76,2.71,15,3.22,15,3.95c0,0.39,0.24,0.73,0.59,0.91c3.09,1.55,5.03,5.04,4.23,8.86 c-0.64,3.06-3.11,5.5-6.17,6.12C8.52,20.87,4,16.95,4,12c0-3.12,1.8-5.83,4.41-7.14C8.76,4.68,9,4.34,9,3.95 c0-0.73-0.77-1.24-1.42-0.92C3.94,4.83,1.55,8.77,2.07,13.2c0.53,4.55,4.24,8.23,8.79,8.73C16.89,22.61,22,17.9,22,12 C22,8.07,19.73,4.67,16.42,3.03z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_home.xml
new file mode 100644
index 0000000..162e4dce
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_home.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.8,8.1l-5-3.75c-1.07-0.8-2.53-0.8-3.6,0l-5,3.75C4.44,8.67,4,9.56,4,10.5V18c0,1.66,1.34,3,3,3h2l0-4 c0-1.45,0.98-2.78,2.41-3.05c1.92-0.37,3.59,1.09,3.59,2.94V21h2c1.66,0,3-1.34,3-3v-7.5C20,9.56,19.56,8.67,18.8,8.1z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_language.xml
new file mode 100644
index 0000000..dac3244
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_language.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11.99,2C6.47,2,2,6.48,2,12s4.47,10,9.99,10C17.52,22,22,17.52,22,12S17.52,2,11.99,2 M18.92,8h-2.95 c-0.32-1.25-0.78-2.45-1.38-3.56C16.43,5.07,17.96,6.35,18.92,8 M12,4.04c0.83,1.2,1.48,2.53,1.91,3.96h-3.82 C10.52,6.57,11.17,5.24,12,4.04 M4.26,14c-0.39-1.57-0.3-2.82,0-4h3.38c-0.15,1.28-0.21,2.24,0,4H4.26z M5.08,16h2.95 c0.32,1.25,0.78,2.45,1.38,3.56C7.57,18.93,6.04,17.66,5.08,16 M8.03,8H5.08c0.96-1.66,2.49-2.93,4.33-3.56 C8.81,5.55,8.35,6.75,8.03,8 M12,19.96c-0.83-1.2-1.48-2.53-1.91-3.96h3.82C13.48,17.43,12.83,18.76,12,19.96 M14.34,14H9.66 c-0.15-1.08-0.27-2.06,0-4h4.68C14.56,11.58,14.55,12.46,14.34,14 M14.59,19.56c0.6-1.11,1.06-2.31,1.38-3.56h2.95 C17.96,17.65,16.43,18.93,14.59,19.56 M16.36,14c0.21-1.77,0.16-2.71,0-4h3.38c0.3,1.19,0.39,2.43,0,4H16.36z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_location.xml
new file mode 100644
index 0000000..a802bee
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_location.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3c-3.87,0-7,3.13-7,7c0,3.18,2.56,7.05,4.59,9.78c1.2,1.62,3.62,1.62,4.82,0C16.44,17.05,19,13.18,19,10 C19,6.13,15.87,3,12,3 M12,12.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S13.38,12.5,12,12.5"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_multiuser.xml
new file mode 100644
index 0000000..b72e31d
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_multiuser.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,12c2.21,0,4-1.79,4-4s-1.79-4-4-4S8,5.79,8,8S9.79,12,12,12"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.39,14.56C16.71,13.7,14.53,13,12,13c-2.53,0-4.71,0.7-6.39,1.56C4.61,15.07,4,16.1,4,17.22V18c0,1.1,0.9,2,2,2h12 c1.11,0,2-0.9,2-2v-0.78C20,16.1,19.39,15.07,18.39,14.56"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_night_display.xml
new file mode 100644
index 0000000..35ce30b
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_night_display.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.61,14.12c-0.52,0.09-1.01,0.14-1.48,0.14c-4.62,0-8.39-3.76-8.39-8.39c0-0.48,0.05-0.98,0.15-1.52 c0.14-0.79-0.2-1.59-0.87-2.03c-0.62-0.41-1.49-0.47-2.21,0C3.8,4.33,2,7.67,2,11.28C2,17.19,6.81,22,12.72,22 c3.58,0,6.9-1.77,8.9-4.74c0.24-0.33,0.38-0.74,0.38-1.17C22,14.76,20.79,13.88,19.61,14.12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_open.xml
new file mode 100644
index 0000000..7bec0aa
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_open.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,12c-0.55,0-1,0.45-1,1v5c0,0.55-0.45,1-1,1H6c-0.55,0-1-0.45-1-1V6c0-0.55,0.45-1,1-1h5c0.55,0,1-0.45,1-1 c0-0.55-0.45-1-1-1H6C4.34,3,3,4.34,3,6v12c0,1.66,1.34,3,3,3h12c1.65,0,3-1.35,3-3v-5C21,12.45,20.55,12,20,12z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,3h-4c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h2.59l-9.12,9.12c-0.39,0.39-0.39,1.02,0,1.41c0.39,0.39,1.02,0.39,1.41,0 L19,6.41V9c0,0.55,0.45,1,1,1s1-0.45,1-1V5C21,3.9,20.1,3,19,3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_print.xml
new file mode 100644
index 0000000..f2631fb
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_print.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,8V6c0-1.66-1.34-3-3-3H9C7.34,3,6,4.34,6,6v2H5c-1.66,0-3,1.34-3,3v3c0,1.66,1.34,3,3,3h1v1c0,1.66,1.34,3,3,3h6 c1.66,0,3-1.34,3-3v-1h1c1.66,0,3-1.34,3-3v-3c0-1.66-1.34-3-3-3H18z M15,19H9c-0.55,0-1-0.45-1-1v-3h8v3C16,18.55,15.55,19,15,19 z M16,8H8V6c0-0.55,0.45-1,1-1h6c0.55,0,1,0.45,1,1V8z M18,12.5c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1 C19,12.05,18.55,12.5,18,12.5"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_privacy.xml
new file mode 100644
index 0000000..10c059f
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_privacy.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.14,15.43C13.5,15.78,12.78,16,12,16c-2.48,0-4.5-2.02-4.5-4.5C7.5,9.02,9.52,7,12,7c2.48,0,4.5,2.02,4.5,4.5 c0,0.37-0.06,0.72-0.14,1.07C17,12.22,17.72,12,18.5,12c1.38,0,2.59,0.63,3.42,1.6c0.15-0.23,0.29-0.46,0.42-0.69 c0.48-0.87,0.48-1.95,0-2.81C20.32,6.46,16.45,4,12,4C7.55,4,3.68,6.46,1.66,10.09c-0.48,0.87-0.48,1.95,0,2.81 C3.68,16.54,7.55,19,12,19c0.68,0,1.35-0.06,2-0.18V16.5C14,16.13,14.06,15.78,14.14,15.43z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 8.8 C 13.4911688245 8.8 14.7 10.0088311755 14.7 11.5 C 14.7 12.9911688245 13.4911688245 14.2 12 14.2 C 10.5088311755 14.2 9.3 12.9911688245 9.3 11.5 C 9.3 10.0088311755 10.5088311755 8.8 12 8.8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21,17v-1c0-1.1-0.9-2-2-2s-2,0.9-2,2v1c-0.55,0-1,0.45-1,1v3c0,0.55,0.45,1,1,1h4c0.55,0,1-0.45,1-1v-3 C22,17.45,21.55,17,21,17z M18.5,16c0-0.28,0.22-0.5,0.5-0.5s0.5,0.22,0.5,0.5v1h-1V16z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_security_white.xml
new file mode 100644
index 0000000..8ca2dd6
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_security_white.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,1C16.01,1,14,3.01,14,5.5V8H7c-1.65,0-3,1.35-3,3v8c0,1.65,1.35,3,3,3h10c1.65,0,3-1.35,3-3v-8c0-1.65-1.35-3-3-3h-1 V5.64c0-1.31,0.94-2.5,2.24-2.63c0.52-0.05,2.3,0.02,2.69,2.12C21.02,5.63,21.42,6,21.92,6c0.6,0,1.09-0.53,0.99-1.13 C22.47,2.3,20.55,1,18.5,1z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,17,12,17z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_sim.xml
new file mode 100644
index 0000000..78426a5
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_sim.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,2h-5.76c-0.8,0-1.56,0.32-2.12,0.88L4.88,7.12C4.32,7.68,4,8.45,4,9.24V19c0,1.66,1.34,3,3,3h10c1.66,0,3-1.34,3-3V5 C20,3.34,18.66,2,17,2z M8,19c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C9,18.55,8.55,19,8,19z M9,14c0,0.55-0.45,1-1,1 s-1-0.45-1-1v-2c0-0.55,0.45-1,1-1s1,0.45,1,1V14z M13,18c0,0.55-0.45,1-1,1s-1-0.45-1-1v-2c0-0.55,0.45-1,1-1s1,0.45,1,1V18z M12,13c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C13,12.55,12.55,13,12,13z M16,19c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1 s1,0.45,1,1C17,18.55,16.55,19,16,19z M17,14c0,0.55-0.45,1-1,1s-1-0.45-1-1v-2c0-0.55,0.45-1,1-1s1,0.45,1,1V14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml
new file mode 100644
index 0000000..437afcc
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M13,16c0,0.55-0.45,1-1,1s-1-0.45-1-1 v-4c0-0.55,0.45-1,1-1s1,0.45,1,1V16z M12,9c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C13,8.55,12.55,9,12,9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_wireless.xml
new file mode 100644
index 0000000..145886a
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_wireless.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.79,11.97c-3.7-2.67-8.4-2.29-11.58,0c-0.69,0.5-0.73,1.51-0.13,2.11l0.01,0.01c0.49,0.49,1.26,0.54,1.83,0.13 c2.6-1.84,5.88-1.61,8.16,0c0.57,0.4,1.34,0.36,1.83-0.13l0.01-0.01C18.52,13.48,18.48,12.47,17.79,11.97z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.84,7.95c-5.71-4.68-13.97-4.67-19.69,0c-0.65,0.53-0.69,1.51-0.1,2.1c0.51,0.51,1.33,0.55,1.89,0.09 c3.45-2.83,10.36-4.72,16.11,0c0.56,0.46,1.38,0.42,1.89-0.09C22.54,9.46,22.49,8.48,21.84,7.95z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 15 C 13.1045694997 15 14 15.8954305003 14 17 C 14 18.1045694997 13.1045694997 19 12 19 C 10.8954305003 19 10 18.1045694997 10 17 C 10 15.8954305003 10.8954305003 15 12 15 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage.xml
new file mode 100644
index 0000000..1810a31
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,16H5c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2C21,16.9,20.1,16,19,16z M6,19c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1s1,0.45,1,1C7,18.55,6.55,19,6,19z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5,8h14c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2H5C3.9,4,3,4.9,3,6C3,7.1,3.9,8,5,8z M6,5c0.55,0,1,0.45,1,1c0,0.55-0.45,1-1,1 S5,6.55,5,6C5,5.45,5.45,5,6,5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,10H5c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2C21,10.9,20.1,10,19,10z M6,13c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1s1,0.45,1,1C7,12.55,6.55,13,6,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage_white.xml
new file mode 100644
index 0000000..3ed5150
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage_white.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,16H5c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2C21,16.9,20.1,16,19,16z M6,19c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1s1,0.45,1,1C7,18.55,6.55,19,6,19z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5,8h14c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2H5C3.9,4,3,4.9,3,6C3,7.1,3.9,8,5,8z M6,5c0.55,0,1,0.45,1,1c0,0.55-0.45,1-1,1 S5,6.55,5,6C5,5.45,5.45,5,6,5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,10H5c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2C21,10.9,20.1,10,19,10z M6,13c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1s1,0.45,1,1C7,12.55,6.55,13,6,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_suggestion_night_display.xml
new file mode 100644
index 0000000..35ce30b
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_suggestion_night_display.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.61,14.12c-0.52,0.09-1.01,0.14-1.48,0.14c-4.62,0-8.39-3.76-8.39-8.39c0-0.48,0.05-0.98,0.15-1.52 c0.14-0.79-0.2-1.59-0.87-2.03c-0.62-0.41-1.49-0.47-2.21,0C3.8,4.33,2,7.67,2,11.28C2,17.19,6.81,22,12.72,22 c3.58,0,6.9-1.77,8.9-4.74c0.24-0.33,0.38-0.74,0.38-1.17C22,14.76,20.79,13.88,19.61,14.12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync.xml
new file mode 100644
index 0000000..2f5173a
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,6h0.17l-0.88,0.88c-0.39,0.39-0.39,1.02,0,1.41l0,0c0.39,0.39,1.02,0.39,1.41,0l1.88-1.88c0.78-0.78,0.78-2.05,0-2.83 l-1.87-1.87c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41L12.17,4H12C9.95,4,7.91,4.78,6.34,6.34 c-2.85,2.85-3.1,7.32-0.75,10.45c0.36,0.48,1.08,0.52,1.51,0.1c0.35-0.35,0.39-0.9,0.09-1.29c-1.76-2.35-1.58-5.71,0.56-7.85 C8.89,6.62,10.4,6,12,6"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,18h-0.17l0.88-0.88c0.39-0.39,0.39-1.02,0-1.41l0,0c-0.39-0.39-1.02-0.39-1.41,0l-1.88,1.88 c-0.78,0.78-0.78,2.05,0,2.83l1.87,1.87c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L11.83,20H12 c2.05,0,4.09-0.78,5.66-2.34c2.85-2.85,3.1-7.32,0.74-10.45c-0.36-0.48-1.08-0.52-1.51-0.1c-0.35,0.35-0.39,0.9-0.09,1.29 c1.76,2.35,1.58,5.71-0.56,7.85C15.11,17.38,13.6,18,12,18"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml
new file mode 100644
index 0000000..c177dfa
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M10.31,6.25C10.73,6.13,11,5.73,11,5.3c0-0.65-0.62-1.16-1.25-0.97C6.43,5.3,4,8.36,4,12c0,2.4,1.07,4.54,2.74,6H6 c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h3c1.1,0,2-0.9,2-2v-3c0-0.55-0.45-1-1-1s-1,0.45-1,1v2.19C7.21,16.15,6,14.22,6,12 C6,9.28,7.83,6.98,10.31,6.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14,10c0.55,0,1-0.45,1-1V6.81c1.72,1,2.9,2.83,2.98,4.94c0.74,0.23,1.41,0.62,1.96,1.14C19.98,12.6,20,12.3,20,12 c0-2.4-1.07-4.54-2.74-6H18c0.55,0,1-0.45,1-1c0-0.55-0.45-1-1-1h-3c-1.1,0-2,0.9-2,2v3C13,9.55,13.45,10,14,10z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.5,13c-1.93,0-3.5,1.57-3.5,3.5s1.57,3.5,3.5,3.5s3.5-1.57,3.5-3.5S18.43,13,16.5,13z M16.5,19 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5s0.5,0.22,0.5,0.5C17,18.78,16.78,19,16.5,19z M17,16.5c0,0.28-0.22,0.5-0.5,0.5 S16,16.78,16,16.5v-2c0-0.28,0.22-0.5,0.5-0.5s0.5,0.22,0.5,0.5V16.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_system_update.xml
new file mode 100644
index 0000000..be6b70d
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_system_update.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M10.59,15.09c0.78,0.78,2.05,0.78,2.83,0l1.88-1.88c0.39-0.39,0.39-1.02,0-1.41c-0.39-0.39-1.03-0.39-1.42,0L13,12.67V9 c0-0.55-0.45-1-1-1s-1,0.45-1,1v3.67l-0.88-0.88c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41L10.59,15.09z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16,1H8C6.34,1,5,2.34,5,4v16c0,1.65,1.35,3,3,3h8c1.65,0,3-1.35,3-3V4C19,2.34,17.66,1,16,1z M17,18H7V6h10V18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml
new file mode 100644
index 0000000..92f98dd
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,6H4C2.35,6,1,7.35,1,9v6c0,1.65,1.35,3,3,3h16c1.65,0,3-1.35,3-3V9C23,7.35,21.65,6,20,6z M9,13H8v1c0,0.55-0.45,1-1,1 s-1-0.45-1-1v-1H5c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h1v-1c0-0.55,0.45-1,1-1s1,0.45,1,1v1h1c0.55,0,1,0.45,1,1 C10,12.55,9.55,13,9,13z M14.5,15c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S15.33,15,14.5,15z M18.5,12 c-0.83,0-1.5-0.67-1.5-1.5S17.67,9,18.5,9S20,9.67,20,10.5S19.33,12,18.5,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml
new file mode 100644
index 0000000..021d6f1
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M5,7C4.45,7,4,7.45,4,8v8c0,0.55,0.45,1,1,1s1-0.45,1-1V8C6,7.45,5.55,7,5,7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2,9c-0.55,0-1,0.45-1,1v4c0,0.55,0.45,1,1,1s1-0.45,1-1v-4C3,9.45,2.55,9,2,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M22,9c-0.55,0-1,0.45-1,1v4c0,0.55,0.45,1,1,1s1-0.45,1-1v-4C23,9.45,22.55,9,22,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14,4h-4C8.34,4,7,5.34,7,7v10c0,1.66,1.34,3,3,3h4c1.66,0,3-1.34,3-3V7C17,5.34,15.66,4,14,4z M15,17c0,0.55-0.45,1-1,1 h-4c-0.55,0-1-0.45-1-1V7c0-0.55,0.45-1,1-1h4c0.55,0,1,0.45,1,1V17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,7c-0.55,0-1,0.45-1,1v8c0,0.55,0.45,1,1,1s1-0.45,1-1V8C20,7.45,19.55,7,19,7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_up_24dp.xml
new file mode 100644
index 0000000..0a9a4c7
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_up_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M10.29,5.71L7,9H6c-1.66,0-3,1.34-3,3s1.34,3,3,3h1l3.29,3.29c0.63,0.63,1.71,0.18,1.71-0.71V6.41 C12,5.52,10.92,5.08,10.29,5.71z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.79,15.52c1.04-0.82,1.71-2.09,1.71-3.52c0-1.43-0.67-2.7-1.71-3.52C14.47,8.22,14,8.47,14,8.88v6.23 C14,15.52,14.47,15.77,14.79,15.52z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M15.36,3.65C14.71,3.39,14,3.89,14,4.59v0c0,0.41,0.25,0.77,0.62,0.92C17.19,6.55,19,9.06,19,12 c0,2.94-1.81,5.45-4.38,6.49C14.25,18.64,14,19.01,14,19.41v0c0,0.7,0.71,1.19,1.36,0.93C18.67,19.02,21,15.78,21,12 C21,8.22,18.67,4.98,15.36,3.65z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_vpn_key.xml
new file mode 100644
index 0000000..6efc8b7
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_vpn_key.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.65,10C11.7,7.31,8.9,5.5,5.77,6.12C3.48,6.58,1.62,8.41,1.14,10.7C0.32,14.57,3.26,18,7,18c2.61,0,4.83-1.67,5.65-4 H17v2c0,1.1,0.9,2,2,2l0,0c1.1,0,2-0.9,2-2v-2l0,0c1.1,0,2-0.9,2-2l0,0c0-1.1-0.9-2-2-2H12.65z M7,14c-1.1,0-2-0.9-2-2s0.9-2,2-2 s2,0.9,2,2S8.1,14,7,14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_wifi_tethering.xml
new file mode 100644
index 0000000..28511b2
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_wifi_tethering.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,7c-3.31,0-6,2.69-6,6c0,1.25,0.38,2.4,1.03,3.35c0.34,0.5,1.08,0.54,1.51,0.11l0.01-0.01 c0.34-0.34,0.37-0.87,0.1-1.28c-0.5-0.76-0.75-1.71-0.61-2.74c0.23-1.74,1.67-3.17,3.41-3.4C13.9,8.71,16,10.61,16,13 c0,0.8-0.24,1.54-0.64,2.17c-0.27,0.41-0.25,0.94,0.1,1.29l0.01,0.01c0.43,0.43,1.16,0.4,1.51-0.11C17.62,15.4,18,14.25,18,13 C18,9.69,15.31,7,12,7"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,3C6.48,3,2,7.48,2,13c0,2.36,0.82,4.53,2.19,6.24c0.37,0.47,1.07,0.5,1.49,0.08h0C6.04,18.96,6.07,18.4,5.75,18 c-1.4-1.75-2.09-4.1-1.6-6.61c0.61-3.13,3.14-5.65,6.28-6.24C15.54,4.18,20,8.07,20,13c0,1.9-0.66,3.63-1.77,5 c-0.32,0.39-0.28,0.96,0.08,1.31l0,0c0.42,0.42,1.12,0.39,1.49-0.08C21.18,17.53,22,15.36,22,13C22,7.48,17.52,3,12,3"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,11c-1.1,0-2,0.9-2,2c0,0.55,0.23,1.05,0.59,1.41C10.95,14.77,11.45,15,12,15c0.55,0,1.05-0.23,1.41-0.59 C13.77,14.05,14,13.55,14,13C14,11.9,13.1,11,12,11"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamSystemUIOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..a71e963
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.sam.systemui"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.systemui" android:category="android.theme.customization.icon_pack.systemui" android:priority="1"/>
+    <application android:label="Sam" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm.xml
new file mode 100644
index 0000000..3844e41
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.18,5.01l-3.07-2.56c-0.42-0.35-1.05-0.3-1.41,0.13v0C16.34,3,16.4,3.63,16.82,3.99l3.07,2.56 c0.42,0.35,1.05,0.3,1.41-0.13C21.66,6,21.6,5.37,21.18,5.01z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.1,6.55l3.07-2.56C7.6,3.63,7.66,3,7.3,2.58l0,0C6.95,2.15,6.32,2.1,5.9,2.45L2.82,5.01C2.4,5.37,2.34,6,2.7,6.42l0,0 C3.05,6.85,3.68,6.9,4.1,6.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,4c-4.97,0-9,4.03-9,9c0,4.97,4.03,9,9,9s9-4.03,9-9C21,8.03,16.97,4,12,4z M15.5,16.5L15.5,16.5 c-0.39,0.39-1.03,0.39-1.42,0L11.58,14C11.21,13.62,11,13.11,11,12.58V9c0-0.55,0.45-1,1-1s1,0.45,1,1v3.59l2.5,2.49 C15.89,15.47,15.89,16.11,15.5,16.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm_dim.xml
new file mode 100644
index 0000000..3844e41
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm_dim.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.18,5.01l-3.07-2.56c-0.42-0.35-1.05-0.3-1.41,0.13v0C16.34,3,16.4,3.63,16.82,3.99l3.07,2.56 c0.42,0.35,1.05,0.3,1.41-0.13C21.66,6,21.6,5.37,21.18,5.01z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.1,6.55l3.07-2.56C7.6,3.63,7.66,3,7.3,2.58l0,0C6.95,2.15,6.32,2.1,5.9,2.45L2.82,5.01C2.4,5.37,2.34,6,2.7,6.42l0,0 C3.05,6.85,3.68,6.9,4.1,6.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,4c-4.97,0-9,4.03-9,9c0,4.97,4.03,9,9,9s9-4.03,9-9C21,8.03,16.97,4,12,4z M15.5,16.5L15.5,16.5 c-0.39,0.39-1.03,0.39-1.42,0L11.58,14C11.21,13.62,11,13.11,11,12.58V9c0-0.55,0.45-1,1-1s1,0.45,1,1v3.59l2.5,2.49 C15.89,15.47,15.89,16.11,15.5,16.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_arrow_back.xml
new file mode 100644
index 0000000..3ba71a0
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,11H7.83l4.88-4.88c0.39-0.39,0.39-1.02,0-1.41l0,0c-0.39-0.39-1.02-0.39-1.41,0L6.12,9.88c-1.17,1.17-1.17,3.07,0,4.24 l5.17,5.17c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L7.83,13H19c0.55,0,1-0.45,1-1C20,11.45,19.55,11,19,11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml
new file mode 100644
index 0000000..9a581a1
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 5 10.5 C 5.82842712475 10.5 6.5 11.1715728753 6.5 12 C 6.5 12.8284271247 5.82842712475 13.5 5 13.5 C 4.17157287525 13.5 3.5 12.8284271247 3.5 12 C 3.5 11.1715728753 4.17157287525 10.5 5 10.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 19 10.5 C 19.8284271247 10.5 20.5 11.1715728753 20.5 12 C 20.5 12.8284271247 19.8284271247 13.5 19 13.5 C 18.1715728753 13.5 17.5 12.8284271247 17.5 12 C 17.5 11.1715728753 18.1715728753 10.5 19 10.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M15.52,12c1.34-0.88,2.29-2.28,2.45-3.96C18.29,4.76,15.72,2,12.5,2H12c-1.1,0-2,0.9-2,2v5.17L6.12,5.29 C5.73,4.9,5.1,4.9,4.71,5.29c-0.39,0.39-0.39,1.02,0,1.41L10,12V12l-5.29,5.29c-0.39,0.39-0.39,1.03,0,1.42s1.02,0.39,1.41,0 L10,14.83V20c0,1.1,0.9,2,2,2h0.5c3.22,0,5.79-2.76,5.47-6.04C17.81,14.28,16.86,12.88,15.52,12z M12,4h0.5 c1.81,0,3.71,1.52,3.48,3.85C15.82,9.62,14.18,11,12.26,11h0H12V4z M12.5,20H12v-7h0.26c1.92,0,3.55,1.38,3.72,3.15 C16.2,18.48,14.3,20,12.5,20z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_camera.xml
new file mode 100644
index 0000000..e6bb740
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_camera.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,5h-2.17l-0.94-1.03C15.32,3.35,14.52,3,13.68,3h-3.36C9.48,3,8.68,3.35,8.11,3.97L7.17,5H5C3.35,5,2,6.35,2,8v10 c0,1.65,1.35,3,3,3h14c1.65,0,3-1.35,3-3V8C22,6.35,20.65,5,19,5z M12,17c-2.21,0-4-1.79-4-4c0-2.21,1.79-4,4-4c2.21,0,4,1.79,4,4 C16,15.21,14.21,17,12,17z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast.xml
new file mode 100644
index 0000000..bf4145e
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M2.14,14.09c-0.6-0.1-1.14,0.39-1.14,1v0c0,0.49,0.36,0.9,0.85,0.98c1.84,0.31,3.68,1.76,4.08,4.08 C6.01,20.63,6.42,21,6.91,21c0.61,0,1.09-0.54,1-1.14C7.43,16.91,5.09,14.57,2.14,14.09z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,3H4C2.35,3,1,4.35,1,6v1c0,0.55,0.45,1,1,1c0.55,0,1-0.45,1-1V6c0-0.55,0.45-1,1-1h16c0.55,0,1,0.45,1,1v12 c0,0.55-0.45,1-1,1h-5c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h5c1.65,0,3-1.35,3-3V6C23,4.35,21.65,3,20,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,10.05C1.51,10,1,10.46,1,11.06c0,0.51,0.38,0.94,0.89,0.99c6.81,0.67,7.97,7.08,8.07,8.07 c0.05,0.5,0.48,0.89,0.99,0.89c0.59,0,1.06-0.51,1-1.1C11.43,14.7,7.29,10.57,2.1,10.05z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 2.5 18 C 3.32842712475 18 4 18.6715728753 4 19.5 C 4 20.3284271247 3.32842712475 21 2.5 21 C 1.67157287525 21 1 20.3284271247 1 19.5 C 1 18.6715728753 1.67157287525 18 2.5 18 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast_connected.xml
new file mode 100644
index 0000000..c33bccb
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast_connected.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M2.14,14.09c-0.6-0.1-1.14,0.39-1.14,1v0c0,0.49,0.36,0.9,0.85,0.98c1.84,0.31,3.68,1.76,4.08,4.08 C6.01,20.63,6.42,21,6.91,21c0.61,0,1.09-0.54,1-1.14C7.43,16.91,5.09,14.57,2.14,14.09z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,3H4C2.35,3,1,4.35,1,6v1c0,0.55,0.45,1,1,1c0.55,0,1-0.45,1-1V6c0-0.55,0.45-1,1-1h16c0.55,0,1,0.45,1,1v12 c0,0.55-0.45,1-1,1h-5c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h5c1.65,0,3-1.35,3-3V6C23,4.35,21.65,3,20,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,10.05C1.51,10,1,10.46,1,11.06c0,0.51,0.38,0.94,0.89,0.99c6.81,0.67,7.97,7.08,8.07,8.07 c0.05,0.5,0.48,0.89,0.99,0.89c0.59,0,1.06-0.51,1-1.1C11.43,14.7,7.29,10.57,2.1,10.05z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 2.5 18 C 3.32842712475 18 4 18.6715728753 4 19.5 C 4 20.3284271247 3.32842712475 21 2.5 21 C 1.67157287525 21 1 20.3284271247 1 19.5 C 1 18.6715728753 1.67157287525 18 2.5 18 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M15,15c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h2c1.1,0,2-0.9,2-2V9c0-1.1-0.9-2-2-2H6C5.45,7,5,7.45,5,8c0,0.55,0.45,1,1,1 h11v6H15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_close_white.xml
new file mode 100644
index 0000000..731234f
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_close_white.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.3,5.71L18.3,5.71c-0.39-0.39-1.02-0.39-1.41,0L12,10.59L7.11,5.71c-0.39-0.39-1.02-0.39-1.41,0l0,0 c-0.39,0.39-0.39,1.02,0,1.41L10.59,12L5.7,16.89c-0.39,0.39-0.39,1.02,0,1.41h0c0.39,0.39,1.02,0.39,1.41,0L12,13.41l4.89,4.89 c0.39,0.39,1.02,0.39,1.41,0l0,0c0.39-0.39,0.39-1.02,0-1.41L13.41,12l4.89-4.89C18.68,6.73,18.68,6.09,18.3,5.71z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver.xml
new file mode 100644
index 0000000..f3ebc96
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11,11H9c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h2v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2h2c0.55,0,1-0.45,1-1 c0-0.55-0.45-1-1-1h-2V9c0-0.55-0.45-1-1-1s-1,0.45-1,1V11z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.93,2.44C13.97,2.14,13,2.88,13,3.89c0,0.67,0.45,1.24,1.09,1.44C16.93,6.22,19,8.86,19,12c0,0.51-0.06,1.01-0.17,1.49 c-0.14,0.64,0.12,1.3,0.69,1.64l0.01,0.01c0.86,0.5,1.98,0.05,2.21-0.91C21.91,13.51,22,12.76,22,12C22,7.5,19.02,3.69,14.93,2.44 z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.47,16.98c-0.58-0.34-1.3-0.24-1.79,0.21C15.45,18.32,13.81,19,12,19c-3.87,0-7-3.13-7-7c0-3.14,2.07-5.78,4.91-6.67 C10.55,5.13,11,4.56,11,3.89v0c0-1.01-0.98-1.74-1.94-1.45C4.55,3.82,1.41,8.3,2.09,13.39c0.59,4.38,4.13,7.92,8.51,8.51 c3.14,0.42,6.04-0.61,8.13-2.53C19.47,18.7,19.34,17.49,18.47,16.98z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver_off.xml
new file mode 100644
index 0000000..66beba7
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.47,16.98c-0.58-0.34-1.3-0.24-1.79,0.21C15.45,18.32,13.81,19,12,19c-3.87,0-7-3.13-7-7c0-3.14,2.07-5.78,4.91-6.67 C10.55,5.13,11,4.56,11,3.89v0c0-1.01-0.98-1.74-1.94-1.45C4.55,3.82,1.41,8.3,2.09,13.39c0.59,4.38,4.13,7.92,8.51,8.51 c3.14,0.42,6.04-0.61,8.13-2.53C19.47,18.7,19.34,17.49,18.47,16.98z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.93,2.44C13.97,2.14,13,2.88,13,3.89c0,0.67,0.45,1.24,1.09,1.44C16.93,6.22,19,8.86,19,12c0,0.51-0.06,1.01-0.17,1.49 c-0.14,0.64,0.12,1.3,0.69,1.64l0.01,0.01c0.86,0.5,1.98,0.05,2.21-0.91C21.91,13.51,22,12.76,22,12C22,7.5,19.02,3.69,14.93,2.44 z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_drag_handle.xml
new file mode 100644
index 0000000..5662422
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_drag_handle.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,9H5c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1v0C20,9.45,19.55,9,19,9z M5,15h14c0.55,0,1-0.45,1-1 v0c0-0.55-0.45-1-1-1H5c-0.55,0-1,0.45-1,1v0C4,14.55,4.45,15,5,15z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset.xml
new file mode 100644
index 0000000..aa773c4
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.97,0-9,4.03-9,9v7c0,1.66,1.34,3,3,3h0c1.66,0,3-1.34,3-3v-2c0-1.66-1.34-3-3-3H5l0-1.71 C5,7.45,7.96,4.11,11.79,4C15.76,3.89,19,7.06,19,11v2h-1c-1.66,0-3,1.34-3,3v2c0,1.66,1.34,3,3,3h0c1.66,0,3-1.34,3-3v-7 C21,6.03,16.97,2,12,2"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset_mic.xml
new file mode 100644
index 0000000..4ac9b7c
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset_mic.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:fillType="evenOdd" android:pathData="M12,1c-5,0-9,4-9,9v7c0,1.66,1.34,3,3,3h0c1.66,0,3-1.34,3-3v-2 c0-1.66-1.34-3-3-3H5v-1.7C5,6.4,8,3.1,11.8,3c4-0.1,7.2,3.1,7.2,7v2h-1c-1.66,0-3,1.34-3,3v2c0,1.66,1.34,3,3,3h1v0 c0,0.55-0.45,1-1,1h-4c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h4c1.65,0,3-1.35,3-3V10C21,5,17,1,12,1"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_hotspot.xml
new file mode 100644
index 0000000..15e16e8
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_hotspot.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,7c-3.31,0-6,2.69-6,6c0,1.25,0.38,2.4,1.03,3.35c0.34,0.5,1.08,0.54,1.51,0.11l0.01-0.01 c0.34-0.34,0.37-0.87,0.1-1.28c-0.5-0.76-0.75-1.71-0.61-2.74c0.23-1.74,1.67-3.17,3.41-3.4C13.9,8.71,16,10.61,16,13 c0,0.8-0.24,1.54-0.64,2.17c-0.27,0.41-0.25,0.94,0.1,1.29l0.01,0.01c0.43,0.43,1.16,0.4,1.51-0.11C17.62,15.4,18,14.25,18,13 C18,9.69,15.31,7,12,7"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,3C6.48,3,2,7.48,2,13c0,2.36,0.82,4.53,2.19,6.24c0.37,0.47,1.07,0.5,1.49,0.08h0C6.04,18.96,6.07,18.4,5.75,18 c-1.4-1.75-2.09-4.1-1.6-6.61c0.61-3.13,3.14-5.65,6.28-6.24C15.54,4.18,20,8.07,20,13c0,1.9-0.66,3.63-1.77,5 c-0.32,0.39-0.28,0.96,0.08,1.31l0,0c0.42,0.42,1.12,0.39,1.49-0.08C21.18,17.53,22,15.36,22,13C22,7.48,17.52,3,12,3"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,11c-1.1,0-2,0.9-2,2c0,0.55,0.23,1.05,0.59,1.41C10.95,14.77,11.45,15,12,15c0.55,0,1.05-0.23,1.41-0.59 C13.77,14.05,14,13.55,14,13C14,11.9,13.1,11,12,11"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info.xml
new file mode 100644
index 0000000..437afcc
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M13,16c0,0.55-0.45,1-1,1s-1-0.45-1-1 v-4c0-0.55,0.45-1,1-1s1,0.45,1,1V16z M12,9c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C13,8.55,12.55,9,12,9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info_outline.xml
new file mode 100644
index 0000000..437afcc
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info_outline.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M13,16c0,0.55-0.45,1-1,1s-1-0.45-1-1 v-4c0-0.55,0.45-1,1-1s1,0.45,1,1V16z M12,9c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C13,8.55,12.55,9,12,9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_invert_colors.xml
new file mode 100644
index 0000000..afa3b9e
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_invert_colors.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.66,7.35l-3.54-3.47c-1.17-1.17-3.07-1.17-4.24,0L6.56,7.13c-3,3-3.4,7.89-0.62,11.1C7.54,20.08,9.77,21,12,21 c2.05,0,4.1-0.78,5.66-2.34C20.78,15.54,20.78,10.47,17.66,7.35 M12,19.01c-1.6,0-3.11-0.62-4.24-1.76 C6.62,16.11,6,14.61,6,13.01S6.62,9.9,7.76,8.77L12,4.59V19.01z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_location.xml
new file mode 100644
index 0000000..206d92c
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_location.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3c-3.87,0-7,3.13-7,7c0,3.18,2.56,7.05,4.59,9.78c1.2,1.62,3.62,1.62,4.82,0C16.44,17.05,19,13.18,19,10 C19,6.13,15.87,3,12,3 M12,12.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S13.38,12.5,12,12.5"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml
new file mode 100644
index 0000000..fc4cde5
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,4H4C2.35,4,1,5.35,1,7v11c0,1.65,1.35,3,3,3h16c1.65,0,3-1.35,3-3V7C23,5.35,21.65,4,20,4z M14,8c0.55,0,1,0.45,1,1 c0,0.55-0.45,1-1,1s-1-0.45-1-1C13,8.45,13.45,8,14,8z M14,12c0.55,0,1,0.45,1,1c0,0.55-0.45,1-1,1s-1-0.45-1-1 C13,12.45,13.45,12,14,12z M10,8c0.55,0,1,0.45,1,1c0,0.55-0.45,1-1,1S9,9.55,9,9C9,8.45,9.45,8,10,8z M10,12c0.55,0,1,0.45,1,1 c0,0.55-0.45,1-1,1s-1-0.45-1-1C9,12.45,9.45,12,10,12z M6,14c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1 C7,13.55,6.55,14,6,14z M6,10c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C7,9.55,6.55,10,6,10z M15.5,17h-7 C8.22,17,8,16.78,8,16.5C8,16.22,8.22,16,8.5,16h7c0.28,0,0.5,0.22,0.5,0.5C16,16.78,15.78,17,15.5,17z M18,14c-0.55,0-1-0.45-1-1 c0-0.55,0.45-1,1-1s1,0.45,1,1C19,13.55,18.55,14,18,14z M18,10c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1 C19,9.55,18.55,10,18,10z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_alert.xml
new file mode 100644
index 0000000..e022c63
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_alert.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6.47,4.81c0.37-0.38,0.35-0.99-0.03-1.37c-0.4-0.4-1.05-0.39-1.44,0.02c-1.62,1.72-2.7,3.95-2.95,6.43 C2,10.48,2.46,11,3.05,11h0.01c0.51,0,0.93-0.38,0.98-0.88C4.24,8.07,5.13,6.22,6.47,4.81z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.99,3.47c-0.39-0.41-1.04-0.42-1.44-0.02c-0.38,0.38-0.39,0.98-0.03,1.37c1.34,1.41,2.23,3.26,2.43,5.3 c0.05,0.5,0.48,0.88,0.98,0.88h0.01c0.59,0,1.05-0.52,0.99-1.11C21.69,7.42,20.61,5.19,18.99,3.47z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,17h-1v-6c0-3.07-1.63-5.64-4.5-6.32V4c0-0.83-0.67-1.5-1.5-1.5c-0.83,0-1.5,0.67-1.5,1.5v0.68C7.64,5.36,6,7.92,6,11 v6H5c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1C20,17.45,19.55,17,19,17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_silence.xml
new file mode 100644
index 0000000..dd1520a
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_silence.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,11c0-3.07-1.63-5.64-4.5-6.32V4c0-0.83-0.67-1.5-1.5-1.5c-0.83,0-1.5,0.67-1.5,1.5v0.68C9.72,4.86,9.05,5.2,8.46,5.63 L18,15.17V11z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.49,20.49L3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l4.14,4.14C6.09,9.68,6,10.33,6,11v6H5 c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h11.17l2.9,2.9c0.39,0.39,1.02,0.39,1.41,0C20.88,21.51,20.88,20.88,20.49,20.49z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_low.xml
new file mode 100644
index 0000000..448a501
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_low.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4h-1c0-1.1-0.9-2-2-2s-2,0.9-2,2H9C7.35,4,6,5.35,6,7v12c0,1.65,1.35,3,3,3h6c1.65,0,3-1.35,3-3V7 C18,5.35,16.65,4,15,4z M12,18c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C13,17.55,12.55,18,12,18z M13,13 c0,0.55-0.45,1-1,1s-1-0.45-1-1V9c0-0.55,0.45-1,1-1s1,0.45,1,1V13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_saver.xml
new file mode 100644
index 0000000..df2929a
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_saver.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4h-1c0-1.1-0.9-2-2-2s-2,0.9-2,2H9C7.35,4,6,5.35,6,7v12c0,1.65,1.35,3,3,3h6c1.65,0,3-1.35,3-3V7 C18,5.35,16.65,4,15,4 M10,14c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h1v-1c0-0.55,0.45-1,1-1s1,0.45,1,1v1h1c0.55,0,1,0.45,1,1 c0,0.55-0.45,1-1,1h-1v1c0,0.55-0.45,1-1,1s-1-0.45-1-1v-1H10z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml
new file mode 100644
index 0000000..849cb1f
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.08,7.74c-0.24-0.52-0.94-0.64-1.35-0.23l-0.05,0.05c-0.25,0.25-0.3,0.62-0.16,0.94c0.47,1.07,0.73,2.25,0.73,3.49 c0,1.24-0.26,2.42-0.73,3.49c-0.14,0.32-0.09,0.69,0.16,0.94c0.41,0.41,1.1,0.29,1.35-0.23c0.63-1.3,0.98-2.76,0.98-4.3 C21,10.42,20.67,9.01,20.08,7.74z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M15.98,10.28l-1.38,1.38c-0.2,0.2-0.2,0.51,0,0.71l1.38,1.38c0.28,0.28,0.75,0.15,0.85-0.23C16.94,13.02,17,12.52,17,12 c0-0.51-0.06-1.01-0.18-1.48C16.73,10.14,16.25,10,15.98,10.28z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.52,12c1.34-0.88,2.29-2.28,2.45-3.96C15.29,4.76,12.72,2,9.5,2H9C7.9,2,7,2.9,7,4v5.17L3.12,5.29 C2.73,4.9,2.1,4.9,1.71,5.29c-0.39,0.39-0.39,1.02,0,1.41L7,12V12l-5.29,5.29c-0.39,0.39-0.39,1.03,0,1.42s1.02,0.39,1.41,0 L7,14.83V20c0,1.1,0.9,2,2,2h0.5c3.22,0,5.79-2.76,5.47-6.04C14.81,14.28,13.86,12.88,12.52,12z M9,4h0.5 c1.81,0,3.71,1.52,3.48,3.85C12.82,9.62,11.18,11,9.26,11h0H9V4z M9.5,20H9v-7h0.26c1.92,0,3.55,1.38,3.72,3.15 C13.2,18.48,11.3,20,9.5,20z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_cancel.xml
new file mode 100644
index 0000000..966faf1
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_cancel.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.47,2,2,6.47,2,12s4.47,10,10,10s10-4.47,10-10S17.53,2,12,2 M12,20c-4.41,0-8-3.59-8-8s3.59-8,8-8s8,3.59,8,8 S16.41,20,12,20"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.88,7.7L12,10.59L9.11,7.7c-0.39-0.39-1.02-0.39-1.41,0l0,0c-0.39,0.39-0.39,1.02,0,1.41L10.59,12L7.7,14.89 c-0.39,0.39-0.39,1.02,0,1.41h0c0.39,0.39,1.02,0.39,1.41,0L12,13.41l2.89,2.89c0.39,0.39,1.02,0.39,1.41,0l0,0 c0.39-0.39,0.39-1.02,0-1.41L13.41,12l2.89-2.89c0.39-0.39,0.39-1.02,0-1.41l0,0C15.91,7.32,15.27,7.32,14.88,7.7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_no_sim.xml
new file mode 100644
index 0000000..66faa46
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_no_sim.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,6c0-1.65-1.35-3-3-3h-5.17C10.3,3,9.79,3.21,9.41,3.59l-1.5,1.5L19,16.17V6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l3.08,3.08C5.07,8.27,5,8.54,5,8.83V18 c0,1.65,1.35,3,3,3h8c0.61,0,1.19-0.19,1.66-0.51l1.41,1.41c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L3.51,3.51z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml
new file mode 100644
index 0000000..0e545a6
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M13,18.5c0-0.34,0.03-0.66,0.09-0.98l-0.32,0.39c-0.26,0.32-0.6,0.37-0.77,0.37s-0.51-0.05-0.77-0.37 L3.34,8.3C3.11,8.02,3.1,7.71,3.12,7.56c0.02-0.16,0.1-0.47,0.41-0.71C6,4.98,8.92,4,12,4s6,0.98,8.47,2.85 c0.31,0.24,0.39,0.54,0.41,0.71c0.02,0.16,0.02,0.46-0.22,0.75l-4.17,5.08c0.62-0.25,1.3-0.39,2.01-0.39h0.89l2.81-3.43 c1.09-1.33,0.84-3.29-0.53-4.32C18.97,3.21,15.62,2,12,2S5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.6 c0.6,0.73,1.46,1.1,2.32,1.1c0.34,0,0.68-0.07,1-0.19V18.5z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.3,15.7L21.3,15.7c-0.39-0.39-1.01-0.39-1.4,0l-1.4,1.4l-1.4-1.4c-0.39-0.39-1.01-0.39-1.4,0l0,0 c-0.39,0.39-0.39,1.01,0,1.4l1.4,1.4l-1.4,1.4c-0.39,0.39-0.39,1.01,0,1.4l0,0c0.39,0.39,1.01,0.39,1.4,0l1.4-1.4l1.4,1.4 c0.39,0.39,1.01,0.39,1.4,0l0,0c0.39-0.39,0.39-1.01,0-1.4l-1.4-1.4l1.4-1.4C21.69,16.71,21.69,16.09,21.3,15.7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml
new file mode 100644
index 0000000..8c9ef82
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M13,18.5c0-1.93,0.99-3.62,2.5-4.6C13.9,13.04,12.38,13,12,13c-0.42,0-2.15,0.03-3.89,1.11L3.34,8.3 C2.98,7.86,3.07,7.2,3.52,6.85C5.97,5.01,8.94,4,12,4c3.06,0,6.04,1.01,8.48,2.86c0.46,0.35,0.54,1,0.18,1.45l-4.17,5.08 c0.62-0.25,1.3-0.39,2.01-0.39h0.91l3.43-4.2c0.67-0.81,0.61-2.03-0.18-2.73C19.81,3.53,16.08,2,12,2S4.19,3.53,1.33,6.07 C0.54,6.77,0.49,7.98,1.15,8.8l8.58,10.4c0.83,1,2.14,1.3,3.27,0.92V18.5z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.3,15.7L21.3,15.7c-0.39-0.39-1.01-0.39-1.4,0l-1.4,1.4l-1.4-1.4c-0.39-0.39-1.01-0.39-1.4,0l0,0 c-0.39,0.39-0.39,1.01,0,1.4l1.4,1.4l-1.4,1.4c-0.39,0.39-0.39,1.01,0,1.4l0,0c0.39,0.39,1.01,0.39,1.4,0l1.4-1.4l1.4,1.4 c0.39,0.39,1.01,0.39,1.4,0l0,0c0.39-0.39,0.39-1.01,0-1.4l-1.4-1.4l1.4-1.4C21.69,16.71,21.69,16.09,21.3,15.7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml
new file mode 100644
index 0000000..e6af311
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M13,18.5c0-3.04,2.46-5.5,5.5-5.5h0.89l2.82-3.43c1.09-1.33,0.84-3.29-0.53-4.32C18.97,3.21,15.62,2,12,2 S5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.59c0.84,1.02,2.18,1.31,3.32,0.91V18.5z M4.45,9.64L3.34,8.3 C2.98,7.86,3.07,7.2,3.52,6.85C5.97,5.01,8.94,4,12,4c3.06,0,6.04,1.01,8.48,2.86c0.46,0.35,0.54,1,0.18,1.45l-1.1,1.34 C17.47,7.98,14.81,7,12,7C9.2,7,6.53,7.98,4.45,9.64z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.3,15.7L21.3,15.7c-0.39-0.39-1.01-0.39-1.4,0l-1.4,1.4l-1.4-1.4c-0.39-0.39-1.01-0.39-1.4,0l0,0 c-0.39,0.39-0.39,1.01,0,1.4l1.4,1.4l-1.4,1.4c-0.39,0.39-0.39,1.01,0,1.4l0,0c0.39,0.39,1.01,0.39,1.4,0l1.4-1.4l1.4,1.4 c0.39,0.39,1.01,0.39,1.4,0l0,0c0.39-0.39,0.39-1.01,0-1.4l-1.4-1.4l1.4-1.4C21.69,16.71,21.69,16.09,21.3,15.7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml
new file mode 100644
index 0000000..e6af311
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M13,18.5c0-3.04,2.46-5.5,5.5-5.5h0.89l2.82-3.43c1.09-1.33,0.84-3.29-0.53-4.32C18.97,3.21,15.62,2,12,2 S5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.59c0.84,1.02,2.18,1.31,3.32,0.91V18.5z M4.45,9.64L3.34,8.3 C2.98,7.86,3.07,7.2,3.52,6.85C5.97,5.01,8.94,4,12,4c3.06,0,6.04,1.01,8.48,2.86c0.46,0.35,0.54,1,0.18,1.45l-1.1,1.34 C17.47,7.98,14.81,7,12,7C9.2,7,6.53,7.98,4.45,9.64z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.3,15.7L21.3,15.7c-0.39-0.39-1.01-0.39-1.4,0l-1.4,1.4l-1.4-1.4c-0.39-0.39-1.01-0.39-1.4,0l0,0 c-0.39,0.39-0.39,1.01,0,1.4l1.4,1.4l-1.4,1.4c-0.39,0.39-0.39,1.01,0,1.4l0,0c0.39,0.39,1.01,0.39,1.4,0l1.4-1.4l1.4,1.4 c0.39,0.39,1.01,0.39,1.4,0l0,0c0.39-0.39,0.39-1.01,0-1.4l-1.4-1.4l1.4-1.4C21.69,16.71,21.69,16.09,21.3,15.7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml
new file mode 100644
index 0000000..5b47734
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M13,18.5c0-3.04,2.46-5.5,5.5-5.5h0.77l2.94-3.43c1.09-1.33,0.84-3.29-0.53-4.32C18.97,3.21,15.62,2,12,2 S5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.85,9.31c0.86,1.02,2.22,1.29,3.36,0.86V18.5z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.3,15.7L21.3,15.7c-0.39-0.39-1.01-0.39-1.4,0l-1.4,1.4l-1.4-1.4c-0.39-0.39-1.01-0.39-1.4,0l0,0 c-0.39,0.39-0.39,1.01,0,1.4l1.4,1.4l-1.4,1.4c-0.39,0.39-0.39,1.01,0,1.4l0,0c0.39,0.39,1.01,0.39,1.4,0l1.4-1.4l1.4,1.4 c0.39,0.39,1.01,0.39,1.4,0l0,0c0.39-0.39,0.39-1.01,0-1.4l-1.4-1.4l1.4-1.4C21.69,16.71,21.69,16.09,21.3,15.7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml
new file mode 100644
index 0000000..99a7f65
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M12,2C8.38,2,5.03,3.21,2.32,5.25C0.95,6.29,0.7,8.25,1.79,9.57l7.89,9.6c1.2,1.46,3.44,1.46,4.64,0l0.86-1.05 c-0.46-0.57-0.79-1.24-0.98-1.96l-1.43,1.74c-0.4,0.49-1.15,0.49-1.55,0l-7.89-9.6c-0.36-0.44-0.28-1.1,0.18-1.45 C5.95,5.02,8.93,4,12,4c3.07,0,6.05,1.02,8.48,2.86c0.46,0.35,0.54,1,0.18,1.45l-0.79,0.96c0.76,0.04,1.47,0.24,2.12,0.57 l0.22-0.27c1.09-1.33,0.84-3.28-0.53-4.32C18.97,3.21,15.62,2,12,2" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,11.25c-1.56,0-2.89,1.03-3.34,2.44c-0.17,0.52,0.21,1.06,0.76,1.06h0.16c0.36,0,0.65-0.25,0.77-0.59 c0.28-0.79,1.12-1.32,2.03-1.12c0.83,0.18,1.44,1,1.36,1.85c-0.14,1.6-2.61,1.48-2.61,4.23h1.75c0-1.97,2.62-2.19,2.62-4.38 C23,12.82,21.43,11.25,19.5,11.25"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 19.5 20.24 C 19.9860105799 20.24 20.38 20.6339894201 20.38 21.12 C 20.38 21.6060105799 19.9860105799 22 19.5 22 C 19.0139894201 22 18.62 21.6060105799 18.62 21.12 C 18.62 20.6339894201 19.0139894201 20.24 19.5 20.24 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot_delete.xml
new file mode 100644
index 0000000..da00c92
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot_delete.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,4h-4c0,0,0,0,0,0v0c0-0.55-0.45-1-1-1h-4C9.45,3,9,3.45,9,4v0c0,0,0,0,0,0H5C4.45,4,4,4.45,4,5c0,0.55,0.45,1,1,1h14 c0.55,0,1-0.45,1-1C20,4.45,19.55,4,19,4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5,18c0,1.66,1.34,3,3,3h8c1.66,0,3-1.34,3-3V7H5V18z M13,10.89C13,10.4,13.45,10,14,10s1,0.4,1,0.89v6.22 C15,17.6,14.55,18,14,18s-1-0.4-1-0.89V10.89z M9,10.89C9,10.4,9.45,10,10,10s1,0.4,1,0.89v6.22C11,17.6,10.55,18,10,18 s-1-0.4-1-0.89V10.89z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_settings.xml
new file mode 100644
index 0000000..46e33ef
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_settings.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.75,7.15c-0.72-1.3-2.05-2.03-3.44-2.05c-0.78-0.01-1.46-0.41-1.85-1.09C14.77,2.81,13.48,2,12,2S9.23,2.81,8.54,4.01 C8.15,4.69,7.47,5.09,6.69,5.1C5.31,5.12,3.97,5.85,3.25,7.15c-0.68,1.23-0.64,2.66-0.02,3.81c0.35,0.65,0.35,1.41,0,2.07 c-0.62,1.15-0.66,2.58,0.02,3.81c0.72,1.3,2.05,2.03,3.44,2.05c0.78,0.01,1.46,0.41,1.85,1.09C9.23,21.19,10.52,22,12,22 s2.77-0.81,3.46-2.01c0.39-0.68,1.07-1.08,1.85-1.09c1.38-0.02,2.72-0.75,3.44-2.05c0.68-1.23,0.64-2.66,0.02-3.81 c-0.35-0.65-0.35-1.41,0-2.07C21.39,9.81,21.43,8.38,20.75,7.15 M12,15c-1.66,0-3-1.34-3-3s1.34-3,3-3s3,1.34,3,3S13.66,15,12,15"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_swap_vert.xml
new file mode 100644
index 0000000..c3b3b98
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_swap_vert.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M11.24,7.64C11.43,7.88,11.72,8,12,8c0.23,0,0.46-0.08,0.64-0.24c0.42-0.36,0.48-0.99,0.12-1.41l-2.35-2.78 C9.66,2.82,8.4,2.76,7.53,3.64L5.24,6.36c-0.36,0.42-0.3,1.05,0.12,1.41c0.42,0.36,1.05,0.3,1.41-0.12L8,6.18V13 c0,0.55,0.45,1,1,1s1-0.45,1-1V6.18L11.24,7.64z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.65,16.24c-0.42-0.36-1.05-0.3-1.41,0.12L16,17.82V11c0-0.55-0.45-1-1-1s-1,0.45-1,1v6.82l-1.24-1.46 c-0.36-0.42-0.99-0.48-1.41-0.12c-0.42,0.36-0.48,0.99-0.12,1.41l2.35,2.78c0.72,0.72,1.98,0.84,2.88-0.06l2.29-2.72 C19.12,17.22,19.07,16.59,18.65,16.24"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml
new file mode 100644
index 0000000..7b71928
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="16dp" android:viewportHeight="24" android:viewportWidth="24" android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M4,19h4c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H4c-0.55,0-1,0.45-1,1v0C3,18.55,3.45,19,4,19z M4,7h8c0.55,0,1-0.45,1-1v0 c0-0.55-0.45-1-1-1H4C3.45,5,3,5.45,3,6v0C3,6.55,3.45,7,4,7z M13,20v-1h7c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1h-7v-1 c0-0.55-0.45-1-1-1h0c-0.55,0-1,0.45-1,1v4c0,0.55,0.45,1,1,1h0C12.55,21,13,20.55,13,20z M7,10v1H4c-0.55,0-1,0.45-1,1v0 c0,0.55,0.45,1,1,1h3v1c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1v-4c0-0.55-0.45-1-1-1h0C7.45,9,7,9.45,7,10z M20,11h-8 c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h8c0.55,0,1-0.45,1-1v0C21,11.45,20.55,11,20,11z M16,9L16,9c0.55,0,1-0.45,1-1V7h3 c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1h-3V4c0-0.55-0.45-1-1-1h0c-0.55,0-1,0.45-1,1v4C15,8.55,15.45,9,16,9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml
new file mode 100644
index 0000000..7d9cf7f
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,13c0-4.97-4.03-9-9-9c-1.5,0-2.91,0.37-4.15,1.02l12.13,12.13C20.63,15.91,21,14.5,21,13z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.9,6.55c0.42,0.35,1.05,0.3,1.41-0.13c0.35-0.42,0.3-1.05-0.13-1.41l-3.07-2.56c-0.42-0.35-1.05-0.3-1.41,0.13v0 C16.34,3,16.4,3.63,16.82,3.99L19.9,6.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.18,3.99C7.6,3.63,7.66,3,7.3,2.58l0,0C6.95,2.15,6.32,2.1,5.9,2.45L5.56,2.73l1.42,1.42L7.18,3.99z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l0.46,0.46C2.41,5.72,2.45,6.12,2.7,6.42l0,0 c0.29,0.35,0.76,0.43,1.16,0.26L4.8,7.62C3.67,9.12,3,10.98,3,13c0,4.97,4.03,9,9,9c2.02,0,3.88-0.67,5.38-1.8l1.69,1.69 c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L3.51,3.51z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml
new file mode 100644
index 0000000..929e1cc
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.36,14.68l-1.9-0.38c-0.65-0.13-1.32,0.07-1.79,0.54l-1.52,1.5c-2.79-1.43-5.07-3.71-6.51-6.5l1.48-1.47 C9.6,7.91,9.81,7.23,9.68,6.57L9.29,4.62C9.1,3.69,8.28,3.02,7.33,3.02l-2.23,0c-1.23,0-2.14,1.09-1.98,2.3 c0.32,2.43,1.12,4.71,2.31,6.73c1.57,2.69,3.81,4.93,6.5,6.5c2.03,1.19,4.31,1.99,6.74,2.31c1.21,0.16,2.3-0.76,2.3-1.98v-2.23 C20.97,15.69,20.29,14.87,19.36,14.68z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.44,9.62c-0.16,0.16-0.16,0.43,0,0.59c0.16,0.16,0.43,0.16,0.59,0L17,8.24v2.83c0,0.23,0.19,0.42,0.42,0.42 c1.32,0,2.5-0.99,2.57-2.31c0.05-0.93-0.43-1.74-1.15-2.19c0.73-0.45,1.2-1.27,1.15-2.19c-0.07-1.32-1.25-2.31-2.57-2.31 C17.19,2.5,17,2.69,17,2.92v2.83l-1.97-1.97c-0.16-0.16-0.43-0.16-0.59,0c-0.16,0.16-0.16,0.43,0,0.59L17,6.94v0.13L14.44,9.62z M18,3.6c0.56,0.2,0.97,0.69,1,1.26c0.02,0.4-0.12,0.78-0.39,1.07C18.44,6.11,18.23,6.24,18,6.31V3.6z M18,7.69 c0.23,0.07,0.44,0.2,0.61,0.38c0.27,0.29,0.41,0.67,0.39,1.07c-0.03,0.57-0.44,1.05-1,1.26V7.69z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media.xml
new file mode 100644
index 0000000..1fac685
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16,3l-3,0c-1.1,0-2,0.9-2,2v8.14C10.68,13.05,10.35,13,10.01,13C7.79,13,6,14.79,6,17c0,2.21,1.79,4,4.01,4 c2.22,0,3.99-1.79,3.99-4V7h2c1.1,0,2-0.9,2-2C18,3.9,17.1,3,16,3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media_mute.xml
new file mode 100644
index 0000000..b61a355
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media_mute.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14,7h2c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2l-3,0c-1.1,0-2,0.9-2,2v3.17l3,3V7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l8.08,8.08c-0.06,0-0.12-0.01-0.17-0.01 C7.79,13,6,14.79,6,17c0,2.21,1.79,4,4.01,4c2.22,0,3.99-1.79,3.99-4v-0.17l5.07,5.07c0.39,0.39,1.02,0.39,1.41,0 c0.39-0.39,0.39-1.02,0-1.41L3.51,3.51z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml
new file mode 100644
index 0000000..f5e3646
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,4H5C3.35,4,2,5.35,2,7v10c0,1.65,1.35,3,3,3h14c1.65,0,3-1.35,3-3V7C22,5.35,20.65,4,19,4z M7,10c0.55,0,1,0.45,1,1 c0,0.55-0.45,1-1,1s-1-0.45-1-1C6,10.45,6.45,10,7,10z M13,16H7c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h6c0.55,0,1,0.45,1,1 C14,15.55,13.55,16,13,16z M17,16c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C18,15.55,17.55,16,17,16z M17,12h-6 c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h6c0.55,0,1,0.45,1,1C18,11.55,17.55,12,17,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml
new file mode 100644
index 0000000..90989e8
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,10c0.55,0,1,0.45,1,1c0,0.55-0.45,1-1,1h-2.17l2.03,2.03C16.91,14.02,16.95,14,17,14c0.55,0,1,0.45,1,1 c0,0.05-0.02,0.09-0.03,0.14l3.52,3.52C21.81,18.19,22,17.61,22,17V7c0-1.65-1.35-3-3-3H6.83l6,6H17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l0.41,0.41C2.19,5.81,2,6.39,2,7v10 c0,1.65,1.35,3,3,3h12.17l1.9,1.9c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L3.51,3.51z M7.96,10.79 C7.97,10.86,8,10.92,8,11c0,0.55-0.45,1-1,1s-1-0.45-1-1c0-0.55,0.45-1,1-1c0.08,0,0.14,0.03,0.21,0.04L7.96,10.79z M13,16H7 c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1h4.17l1.97,1.97C13.09,15.98,13.05,16,13,16z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer.xml
new file mode 100644
index 0000000..86e1fb2
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,17h-1v-6c0-3.07-1.63-5.64-4.5-6.32V4c0-0.83-0.67-1.5-1.5-1.5c-0.83,0-1.5,0.67-1.5,1.5v0.68C7.64,5.36,6,7.92,6,11 v6H5c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1C20,17.45,19.55,17,19,17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml
new file mode 100644
index 0000000..a6e5300
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,11c0-3.07-1.63-5.64-4.5-6.32V4c0-0.83-0.67-1.5-1.5-1.5c-0.83,0-1.5,0.67-1.5,1.5v0.68C9.72,4.86,9.05,5.2,8.46,5.63 L18,15.17V11z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.49,20.49L3.51,3.51c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l4.14,4.14C6.09,9.68,6,10.33,6,11v6H5 c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h11.17l2.9,2.9c0.39,0.39,1.02,0.39,1.41,0C20.88,21.51,20.88,20.88,20.49,20.49z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml
new file mode 100644
index 0000000..afc8855
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="19dp" android:viewportHeight="24" android:viewportWidth="24" android:width="19dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M5,7C4.45,7,4,7.45,4,8v8c0,0.55,0.45,1,1,1s1-0.45,1-1V8C6,7.45,5.55,7,5,7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2,9c-0.55,0-1,0.45-1,1v4c0,0.55,0.45,1,1,1s1-0.45,1-1v-4C3,9.45,2.55,9,2,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M22,9c-0.55,0-1,0.45-1,1v4c0,0.55,0.45,1,1,1s1-0.45,1-1v-4C23,9.45,22.55,9,22,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14,4h-4C8.34,4,7,5.34,7,7v10c0,1.66,1.34,3,3,3h4c1.66,0,3-1.34,3-3V7C17,5.34,15.66,4,14,4z M15,17c0,0.55-0.45,1-1,1 h-4c-0.55,0-1-0.45-1-1V7c0-0.55,0.45-1,1-1h4c0.55,0,1,0.45,1,1V17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,7c-0.55,0-1,0.45-1,1v8c0,0.55,0.45,1,1,1s1-0.45,1-1V8C20,7.45,19.55,7,19,7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_voice.xml
new file mode 100644
index 0000000..de94ed0
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_voice.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15.67,14.85l-1.52,1.5c-2.79-1.43-5.07-3.71-6.51-6.5l1.48-1.47C9.6,7.91,9.81,7.23,9.68,6.57L9.29,4.62 C9.1,3.69,8.28,3.02,7.33,3.02l-2.23,0c-1.23,0-2.14,1.09-1.98,2.3c0.32,2.43,1.12,4.71,2.31,6.73c1.57,2.69,3.81,4.93,6.5,6.5 c2.03,1.19,4.31,1.99,6.74,2.31c1.21,0.16,2.3-0.76,2.3-1.98l0-2.23c0-0.96-0.68-1.78-1.61-1.96l-1.9-0.38 C16.81,14.18,16.14,14.38,15.67,14.85z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml
new file mode 100644
index 0000000..9bcf4be
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,6h-3c0-2.21-1.79-4-4-4S8,3.79,8,6H5C3.34,6,2,7.34,2,9v9c0,1.66,1.34,3,3,3h14c1.66,0,3-1.34,3-3V9 C22,7.34,20.66,6,19,6z M12,15c-0.83,0-1.5-0.67-1.5-1.5S11.17,12,12,12s1.5,0.67,1.5,1.5S12.83,15,12,15z M10,6c0-1.1,0.9-2,2-2 s2,0.9,2,2H10z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_mic_none.xml
new file mode 100644
index 0000000..cfffd0c
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_mic_none.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,14c1.66,0,3-1.34,3-3V5c0-1.66-1.34-3-3-3S9,3.34,9,5v6C9,12.66,10.34,14,12,14"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.91,11c-0.49,0-0.9,0.36-0.98,0.85C16.52,14.21,14.47,16,12,16s-4.52-1.79-4.93-4.15C6.99,11.36,6.58,11,6.09,11h0 c-0.61,0-1.09,0.54-1,1.14c0.49,3,2.89,5.34,5.91,5.78V20c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1v-2.08 c3.02-0.44,5.42-2.78,5.91-5.78C19.01,11.54,18.52,11,17.91,11L17.91,11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml
new file mode 100644
index 0000000..2fe0841
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.65,10C11.7,7.31,8.9,5.5,5.77,6.12C3.48,6.58,1.62,8.41,1.14,10.7C0.32,14.57,3.26,18,7,18c2.61,0,4.83-1.67,5.65-4 H17v2c0,1.1,0.9,2,2,2l0,0c1.1,0,2-0.9,2-2v-2l0,0c1.1,0,2-0.9,2-2l0,0c0-1.1-0.9-2-2-2H12.65z M7,14c-1.1,0-2-0.9-2-2s0.9-2,2-2 s2,0.9,2,2S8.1,14,7,14z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/Android.mk b/packages/overlays/IconPackSamThemePickerOverlay/Android.mk
new file mode 100644
index 0000000..032c9ad
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackSamThemePicker
+LOCAL_CERTIFICATE := platform
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackSamThemePickerOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamThemePickerOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..67446b2
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.sam.themepicker"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.google.android.apps.wallpaper" android:category="android.theme.customization.icon_pack.themepicker" android:priority="1"/>
+    <application android:label="Sam" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_add_24px.xml
new file mode 100644
index 0000000..5c5463a
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_add_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,13h-6v6c0,0.55-0.45,1-1,1h0c-0.55,0-1-0.45-1-1v-6H5c-0.55,0-1-0.45-1-1v0c0-0.55,0.45-1,1-1h6V5c0-0.55,0.45-1,1-1h0 c0.55,0,1,0.45,1,1v6h6c0.55,0,1,0.45,1,1v0C20,12.55,19.55,13,19,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_close_24px.xml
new file mode 100644
index 0000000..731234f
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_close_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.3,5.71L18.3,5.71c-0.39-0.39-1.02-0.39-1.41,0L12,10.59L7.11,5.71c-0.39-0.39-1.02-0.39-1.41,0l0,0 c-0.39,0.39-0.39,1.02,0,1.41L10.59,12L5.7,16.89c-0.39,0.39-0.39,1.02,0,1.41h0c0.39,0.39,1.02,0.39,1.41,0L12,13.41l4.89,4.89 c0.39,0.39,1.02,0.39,1.41,0l0,0c0.39-0.39,0.39-1.02,0-1.41L13.41,12l4.89-4.89C18.68,6.73,18.68,6.09,18.3,5.71z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_colorize_24px.xml
new file mode 100644
index 0000000..f9b61639
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_colorize_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.52,5.73L13.3,4.52c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l0.71,0.71l-9.02,9.02 C3.21,16.04,3,16.55,3,17.08V20c0,0.55,0.45,1,1,1h2.92c0.53,0,1.04-0.21,1.41-0.59l9.02-9.02l0.72,0.72 c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41l-1.22-1.22l1.96-1.96c1.04-1.03,1.04-2.71,0-3.75l0,0 c-1.04-1.03-2.71-1.03-3.75,0L14.52,5.73z M6.92,19H5v-1.92l8.74-8.74l1.92,1.92L6.92,19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_font.xml
new file mode 100644
index 0000000..46f2202
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_font.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19,2H5C3.35,2,2,3.35,2,5v14c0,1.65,1.35,3,3,3h14c1.65,0,3-1.35,3-3V5C22,3.35,20.65,2,19,2 M15.03,17.22l-0.74-2.09 H9.7l-0.73,2.09C8.81,17.69,8.37,18,7.87,18c-0.81,0-1.37-0.81-1.09-1.57l3.45-9.21C10.51,6.49,11.21,6,11.99,6 c0.78,0,1.48,0.48,1.76,1.22l3.46,9.21C17.5,17.19,16.93,18,16.12,18C15.63,18,15.19,17.69,15.03,17.22"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12.07 8.6 L 11.94 8.6 L 11.5 10.04 L 10.43 13.06 L 13.56 13.06 L 12.5 10.04 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_clock.xml
new file mode 100644
index 0000000..770b167
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_clock.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2 M14.71,14.71c-0.39,0.39-1.02,0.39-1.41,0l-1.41-1.41 C11.31,12.73,11,11.97,11,11.17V8c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1v3.17c0,0.27,0.1,0.52,0.29,0.71l1.41,1.41 C15.1,13.68,15.1,14.32,14.71,14.71"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_grid.xml
new file mode 100644
index 0000000..5d35c6c
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_grid.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M22,6L22,6c0-0.55-0.45-1-1-1h-2V3c0-0.55-0.45-1-1-1h0c-0.55,0-1,0.45-1,1v2h-4V3c0-0.55-0.45-1-1-1h0 c-0.55,0-1,0.45-1,1v2H7V3c0-0.55-0.45-1-1-1h0C5.45,2,5,2.45,5,3v2H3C2.45,5,2,5.45,2,6v0c0,0.55,0.45,1,1,1h2v4H3 c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h2v4H3c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h2v2c0,0.55,0.45,1,1,1h0 c0.55,0,1-0.45,1-1v-2h4v2c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1v-2h4v2c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1v-2h2 c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1h-2v-4h2c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1h-2V7h2C21.55,7,22,6.55,22,6z M7,7h4v4H7 V7z M7,13h4v4H7V13z M17,17h-4v-4h4V17z M17,11h-4V7h4V11z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_theme.xml
new file mode 100644
index 0000000..c4eebb2
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_theme.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,2H7C5.9,2,5,2.9,5,4v8c0,1.66,1.34,3,3,3c0.55,0,1,0.45,1,1v2.83c0,1.62,1.22,3.08,2.84,3.17c0.05,0,0.11,0,0.16,0 c1.66,0,3-1.34,3-3v-3c0-0.55,0.45-1,1-1c1.66,0,3-1.34,3-3V4C19,2.9,18.1,2,17,2z M9,4v1c0,0.55,0.45,1,1,1s1-0.45,1-1V4h2v1 c0,0.55,0.45,1,1,1s1-0.45,1-1V4h2v5H7V4H9z M16,13H8c-0.55,0-1-0.45-1-1v-1h10v1C17,12.55,16.55,13,16,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml
new file mode 100644
index 0000000..2c83993
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml
@@ -0,0 +1,23 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 16 7 C 16.5522847498 7 17 7.44771525017 17 8 C 17 8.55228474983 16.5522847498 9 16 9 C 15.4477152502 9 15 8.55228474983 15 8 C 15 7.44771525017 15.4477152502 7 16 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9.79,13.67c-0.41-0.49-1.17-0.48-1.56,0.02l-0.98,1.26c-0.51,0.66-0.04,1.61,0.79,1.61H16c0.82,0,1.29-0.94,0.8-1.6 l-1.87-2.5c-0.4-0.53-1.19-0.53-1.59-0.01l-1.81,2.34c-0.2,0.25-0.58,0.26-0.78,0.01L9.79,13.67z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4,11c0.55,0,1-0.45,1-1V6c0-0.55,0.45-1,1-1h4c0.55,0,1-0.45,1-1c0-0.55-0.45-1-1-1H6C4.35,3,3,4.35,3,6v4 C3,10.55,3.45,11,4,11z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20,13c-0.55,0-1,0.45-1,1v4c0,0.55-0.45,1-1,1h-4c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h4c1.65,0,3-1.35,3-3v-4 C21,13.45,20.55,13,20,13z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M10,19H6c-0.55,0-1-0.45-1-1v-4c0-0.55-0.45-1-1-1s-1,0.45-1,1v4c0,1.65,1.35,3,3,3h4c0.55,0,1-0.45,1-1 C11,19.45,10.55,19,10,19z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18,3h-4c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h4c0.55,0,1,0.45,1,1v4c0,0.55,0.45,1,1,1s1-0.45,1-1V6 C21,4.35,19.65,3,18,3z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_shapes_24px.xml
new file mode 100644
index 0000000..c50144d
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_shapes_24px.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,9h-2c0,4.96-4.04,9-9,9v1c0,1.66,1.34,3,3,3h8c1.66,0,3-1.34,3-3v-7C23,10.34,21.66,9,20,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9,16c3.87,0,7-3.13,7-7c0-3.87-3.13-7-7-7C5.13,2,2,5.13,2,9C2,12.87,5.13,16,9,16z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_tune.xml
new file mode 100644
index 0000000..5a4cce1
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_tune.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="20dp" android:viewportHeight="24" android:viewportWidth="24" android:width="20dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M4,19h4c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H4c-0.55,0-1,0.45-1,1v0C3,18.55,3.45,19,4,19z M4,7h8c0.55,0,1-0.45,1-1v0 c0-0.55-0.45-1-1-1H4C3.45,5,3,5.45,3,6v0C3,6.55,3.45,7,4,7z M13,20v-1h7c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1h-7v-1 c0-0.55-0.45-1-1-1h0c-0.55,0-1,0.45-1,1v4c0,0.55,0.45,1,1,1h0C12.55,21,13,20.55,13,20z M7,10v1H4c-0.55,0-1,0.45-1,1v0 c0,0.55,0.45,1,1,1h3v1c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1v-4c0-0.55-0.45-1-1-1h0C7.45,9,7,9.45,7,10z M20,11h-8 c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h8c0.55,0,1-0.45,1-1v0C21,11.45,20.55,11,20,11z M16,9L16,9c0.55,0,1-0.45,1-1V7h3 c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1h-3V4c0-0.55-0.45-1-1-1h0c-0.55,0-1,0.45-1,1v4C15,8.55,15.45,9,16,9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_wifi_24px.xml
new file mode 100644
index 0000000..5e57cd3
--- /dev/null
+++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_wifi_24px.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.79,11.97c-3.7-2.67-8.4-2.29-11.58,0c-0.69,0.5-0.73,1.51-0.13,2.11l0.01,0.01c0.49,0.49,1.26,0.54,1.83,0.13 c2.6-1.84,5.88-1.61,8.16,0c0.57,0.4,1.34,0.36,1.83-0.13l0.01-0.01C18.52,13.48,18.48,12.47,17.79,11.97z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21.84,7.95c-5.71-4.68-13.97-4.67-19.69,0c-0.65,0.53-0.69,1.51-0.1,2.1c0.51,0.51,1.33,0.55,1.89,0.09 c3.45-2.83,10.36-4.72,16.11,0c0.56,0.46,1.38,0.42,1.89-0.09C22.54,9.46,22.49,8.48,21.84,7.95z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 15 C 13.1045694997 15 14 15.8954305003 14 17 C 14 18.1045694997 13.1045694997 19 12 19 C 10.8954305003 19 10 18.1045694997 10 17 C 10 15.8954305003 10.8954305003 15 12 15 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorAndroidOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..e940ed8
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.victor.android"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="android" android:category="android.theme.customization.icon_pack.android" android:priority="1"/>
+    <application android:label="Victor" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml
new file mode 100644
index 0000000..47693a4
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11 8 L 11 8.88 L 12.5 10.38 L 12.5 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.62 2.96 L 6.66 1.81 L 5.17 3.05 L 6.24 4.12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.41 1.31 H 19.91 V 7.31 H 18.41 V 1.31 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,5.5c4.14,0,7.5,3.36,7.5,7.5c0,1.27-0.32,2.46-0.87,3.5l1.1,1.1C20.53,16.25,21,14.68,21,13c0-4.97-4.03-9-9-9 c-1.68,0-3.25,0.47-4.6,1.28l1.1,1.1C9.54,5.82,10.73,5.5,12,5.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l1.82,1.82L2.06,5.65l0.96,1.15l0.91-0.76L5.1,7.22C3.79,8.79,3,10.8,3,13c0,4.97,4.03,9,9,9 c2.2,0,4.21-0.79,5.78-2.1l3.06,3.06l1.06-1.06L2.1,2.1z M12,20.5c-4.14,0-7.5-3.36-7.5-7.5c0-1.78,0.63-3.42,1.67-4.71 l10.54,10.54C15.42,19.87,13.78,20.5,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_battery_80_24dp.xml
new file mode 100644
index 0000000..82a3f56
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_battery_80_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.59,4H15l-1-2h-4L9,4H7.41L6,5.41v15.17L7.41,22h9.17L18,20.59V5.41L16.59,4z M16.5,5.5V8h-9V5.5H16.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml
new file mode 100644
index 0000000..2312d94
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/accent_device_default_light" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,6.47L13.53,2h-1.81v8.19L7,5.47L5.94,6.53L11.41,12l-5.48,5.48l1.06,1.06l4.72-4.72V22h1.81L18,17.53v-1.06L13.53,12 L18,7.53V6.47z M16.41,17l-3.19,3.19v-6.38L16.41,17z M13.22,10.19V3.81L16.41,7L13.22,10.19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml
new file mode 100644
index 0000000..ead7973
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.97,0-9,4.03-9,9v8.59L4.41,21h3.17L9,19.59v-5.17L7.59,13H4.5v-2c0-4.14,3.36-7.5,7.5-7.5s7.5,3.36,7.5,7.5v2 h-3.09L15,14.41v5.17L16.41,21h3.17L21,19.59V11C21,6.03,16.97,2,12,2z M7.5,14.5v5h-3v-5H7.5z M19.5,19.5h-3v-5h3V19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml
new file mode 100644
index 0000000..7e29ed8
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,1c-4.97,0-9,4.03-9,9v8.59L4.41,20h3.17L9,18.59v-5.17L7.59,12H4.5v-2c0-4.14,3.36-7.5,7.5-7.5s7.5,3.36,7.5,7.5v2 h-3.09L15,13.41v5.17L16.41,20h3.09v1.5H13V23h6.59L21,21.59V10C21,5.03,16.97,1,12,1z M7.5,13.5v5h-3v-5H7.5z M19.5,18.5h-3v-5h3 V18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml
new file mode 100644
index 0000000..686a147
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 14 6.5 C 15.3807118746 6.5 16.5 7.61928812542 16.5 9 C 16.5 10.3807118746 15.3807118746 11.5 14 11.5 C 12.6192881254 11.5 11.5 10.3807118746 11.5 9 C 11.5 7.61928812542 12.6192881254 6.5 14 6.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.29,2.29L6.22,1.22C4.23,3.21,3,5.96,3,9c0,3.04,1.23,5.79,3.22,7.78l1.06-1.06C5.57,13.99,4.5,11.62,4.5,9 C4.5,6.38,5.57,4.01,7.29,2.29z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17,20.5c-1.38,0-2.5-1.12-2.5-2.5v-2.09l-1.53-1.53C10.41,13.9,8.5,11.69,8.5,9c0-3.03,2.47-5.5,5.5-5.5 s5.5,2.47,5.5,5.5H21c0-3.86-3.14-7-7-7S7,5.14,7,9c0,3.53,2.58,6.45,6,6.93V18c0,2.21,1.79,4,4,4s4-1.79,4-4h-1.5 C19.5,19.38,18.38,20.5,17,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_laptop.xml
new file mode 100644
index 0000000..76e18e1
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_laptop.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,18l1.5-1.5v-11L20.5,4h-17L2,5.5v11L3.5,18H20.5z M3.5,5.5h17v11h-17V5.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1 19.5 H 23 V 21 H 1 V 19.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_misc_hid.xml
new file mode 100644
index 0000000..c44c4ce
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_misc_hid.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,7.5v-4L13.5,2h-3L9,3.5v4l3,3L15,7.5z M10.5,4.12l0.62-0.62h1.76l0.62,0.62v2.76L12,8.38l-1.5-1.5V4.12z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9,16.48v4l1.5,1.5h3l1.5-1.5v-4l-3-3L9,16.48z M13.5,19.86l-0.62,0.62h-1.76l-0.62-0.62V17.1l1.5-1.5l1.5,1.5V19.86z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,9h-4l-3,3l3,3h4l1.5-1.5v-3L20.5,9z M20.5,12.88l-0.62,0.62h-2.76l-1.5-1.5l1.5-1.5h2.76l0.62,0.62V12.88z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.5,9h-4L2,10.5v3L3.5,15h4l3-3L7.5,9z M6.88,13.5H4.12L3.5,12.88v-1.76l0.62-0.62h2.76l1.5,1.5L6.88,13.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_network_pan.xml
new file mode 100644
index 0000000..f90366c
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_network_pan.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,6.47L10.53,2H8.72v8.19L4,5.47L2.94,6.53L8.41,12l-5.48,5.48l1.06,1.06l4.72-4.72V22h1.81L15,17.53v-1.06L10.53,12 L15,7.53V6.47z M13.41,17l-3.19,3.19v-6.38L13.41,17z M10.22,10.19V3.81L13.41,7L10.22,10.19z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.41,6.59l-1.09,1.09c0.75,1.27,1.19,2.74,1.19,4.31s-0.44,3.05-1.19,4.31l1.09,1.09C20.41,15.85,21,13.99,21,12 S20.41,8.15,19.41,6.59z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.47,14.47C16.81,13.71,17,12.88,17,12s-0.19-1.71-0.53-2.47L14,12L16.47,14.47z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml
new file mode 100644
index 0000000..2c301ba
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.5,2h-11L5,3.5v17L6.5,22h11l1.5-1.5v-17L17.5,2z M17.5,10.5h-4.75v-7h4.75V10.5z M11.25,3.5v7H6.5v-7H11.25z M6.5,20.5 V12h11v8.5H6.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_corp_badge.xml
new file mode 100644
index 0000000..ca8ce28
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_corp_badge.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/accent_device_default_light" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.59,6H16V3.41L14.59,2H9.41L8,3.41V6H3.41L2,7.41v12.17L3.41,21h17.17L22,19.59V7.41L20.59,6z M9.5,3.5h5V6h-5V3.5z M20.5,19.5h-17v-12h17V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 12 C 12.8284271247 12 13.5 12.6715728753 13.5 13.5 C 13.5 14.3284271247 12.8284271247 15 12 15 C 11.1715728753 15 10.5 14.3284271247 10.5 13.5 C 10.5 12.6715728753 11.1715728753 12 12 12 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_expand_more.xml
new file mode 100644
index 0000000..eccf03d
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_expand_more.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 13 16 L 20 9 L 18.94 7.94 L 12 14.88 L 5.06 7.94 L 4 9 L 11 16 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_faster_emergency.xml
new file mode 100644
index 0000000..1aaa9aa
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_faster_emergency.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorError" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,3h-15L3,4.5v15L4.5,21h15l1.5-1.5v-15L19.5,3z M19.5,19.5h-15v-15h15V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 17 L 12.75 17 L 12.75 12.75 L 17 12.75 L 17 11.25 L 12.75 11.25 L 12.75 7 L 11.25 7 L 11.25 11.25 L 7 11.25 L 7 12.75 L 11.25 12.75 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_file_copy.xml
new file mode 100644
index 0000000..3f92b7b
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_file_copy.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/material_grey_600" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,1h-12L6,2.5v15L7.5,19h12l1.5-1.5v-15L19.5,1z M19.5,17.5h-12v-15h12V17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.51 7 L 2.01 7 L 2.01 21.5 L 3.51 23 L 18 23 L 18 21.5 L 3.51 21.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock.xml
new file mode 100644
index 0000000..6424436
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="32dp" android:viewportHeight="24" android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,8H16V3.5L14.5,2h-5L8,3.5V8H5.5L4,9.5v11L5.5,22h13l1.5-1.5v-11L18.5,8z M9.5,3.5h5V8h-5V3.5z M18.5,20.5h-13v-11 h13V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 13 C 13.1045694997 13 14 13.8954305003 14 15 C 14 16.1045694997 13.1045694997 17 12 17 C 10.8954305003 17 10 16.1045694997 10 15 C 10 13.8954305003 10.8954305003 13 12 13 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_bugreport.xml
new file mode 100644
index 0000000..91ff7fd
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_bugreport.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20,8h-2.81c-0.46-0.8-1.1-1.49-1.87-2h-0.6l1.94-1.94L15.59,3l-3,3h-1.18l-3-3L7.35,4.06L9.29,6h-0.6 C7.92,6.51,7.28,7.2,6.81,8H4v1.5h2.19C5.96,10.39,6,10.93,6,12.25H4v1.5h2c0,1.4-0.03,1.88,0.19,2.75H4V18h2.81 c0.46,0.8,1.1,1.49,1.87,2h6.63c0.77-0.51,1.41-1.2,1.87-2H20v-1.5h-2.19c0.23-0.89,0.19-1.43,0.19-2.75h2v-1.5h-2 c0-1.4,0.03-1.88-0.19-2.75H20V8z M16.5,15c0,1.37-0.62,2.65-1.67,3.5H9.17C8.12,17.65,7.5,16.37,7.5,15v-4 c0-1.37,0.62-2.65,1.67-3.5h5.65c1.06,0.85,1.67,2.13,1.67,3.5V15z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 10.12 H 14 V 11.62 H 10 V 10.12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 14.38 H 14 V 15.88 H 10 V 14.38 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_open.xml
new file mode 100644
index 0000000..c26b8ba
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_open.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="32dp" android:viewportHeight="24" android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,2h-5l-1.5,1.5l0,4.5h-9L4,9.5v11L5.5,22h13l1.5-1.5v-11L18.5,8H16V3.5h5v2.62h1.5V3.5L21,2z M18.5,20.5h-13v-11h13 V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 13 C 13.1045694997 13 14 13.8954305003 14 15 C 14 16.1045694997 13.1045694997 17 12 17 C 10.8954305003 17 10 16.1045694997 10 15 C 10 13.8954305003 10.8954305003 13 12 13 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_power_off.xml
new file mode 100644
index 0000000..6b26697
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_power_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 2 H 12.75 V 12 H 11.25 V 2 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.36,5.64L17.3,6.7c1.36,1.36,2.2,3.23,2.2,5.3c0,4.14-3.36,7.5-7.5,7.5S4.5,16.14,4.5,12c0-2.07,0.84-3.94,2.2-5.3 L5.64,5.64C4.01,7.26,3,9.51,3,12c0,4.97,4.03,9,9,9s9-4.03,9-9C21,9.51,19.99,7.26,18.36,5.64z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lockscreen_ime.xml
new file mode 100644
index 0000000..9c31c23
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lockscreen_ime.xml
@@ -0,0 +1,27 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.5,4h-19L1,5.5v14L2.5,21h19l1.5-1.5v-14L21.5,4z M21.5,19.5h-19v-14h19V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 8 16 H 16 V 17 H 8 V 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 5 8 H 6.5 V 9.5 H 5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 5 12.5 H 6.5 V 14 H 5 V 12.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.17 8 H 10.67 V 9.5 H 9.17 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.17 12.5 H 10.67 V 14 H 9.17 V 12.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13.33 8 H 14.83 V 9.5 H 13.33 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13.33 12.5 H 14.83 V 14 H 13.33 V 12.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 17.5 8 H 19 V 9.5 H 17.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 17.5 12.5 H 19 V 14 H 17.5 V 12.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_mode_edit.xml
new file mode 100644
index 0000000..fbc5271
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_mode_edit.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,5.07L18.93,3l-2,0L3,16.94V21h4.06L21,7.07V5.07z M6.44,19.5H4.5v-1.94l11-11l1.94,1.95L6.44,19.5z M18.5,7.44 L16.56,5.5l1.38-1.38l1.94,1.94L18.5,7.44z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_notifications_alerted.xml
new file mode 100644
index 0000000..1e25d27
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_notifications_alerted.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,6.5L16.5,5H13V3h-2v2H7.5L6,6.5v11H4V19h16v-1.5h-2V6.5z M7.5,17.5v-11h9v11H7.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M6.81,3.81L5.75,2.75C3.45,4.76,2,7.71,2,11h1.5C3.5,8.13,4.79,5.55,6.81,3.81z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.25,2.75l-1.06,1.06C19.21,5.55,20.5,8.13,20.5,11H22C22,7.71,20.55,4.76,18.25,2.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_phone.xml
new file mode 100644
index 0000000..6cdcbf0
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_phone.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.59,14.52l-2.83-0.44l-3.47,3.47c-2.91-1.56-5.32-3.98-6.87-6.9l3.4-3.39L9.37,4.41L7.96,3L4.41,3L3.07,4.35 c0.66,8.8,7.79,15.94,16.59,16.59L21,19.59v-3.66L19.59,14.52z M4.58,4.5l3.28,0l0.34,2.23L5.74,9.2C5.13,7.73,4.73,6.15,4.58,4.5z M19.5,19.42c-1.67-0.15-3.28-0.56-4.78-1.18l2.56-2.55l2.22,0.34V19.42z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_airplane.xml
new file mode 100644
index 0000000..485ab86
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_airplane.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,8V4l-3-2L9,4v4l-7,3v2.39l1.41,1.41L9,14v3l-3,3v0.59L7.41,22h9.17L18,20.59V20l-3-3v-3l5.59,0.8L22,13.39V11L15,8z M20.5,11.99v1.28l-7-1v5.35l2.88,2.88H7.62l2.88-2.88v-5.35l-7,1v-1.28v0l7-3V4.8v0l1.5-1l1.5,1v0v4.19L20.5,11.99L20.5,11.99z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml
new file mode 100644
index 0000000..89d88b8
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 7.4 9.48 L 4.97 9.48 L 10.41 4.05 L 18.01 11.65 L 19.07 10.59 L 11.47 2.98 L 9.35 2.98 L 3.91 8.42 L 3.91 5.99 L 2.41 5.99 L 2.41 10.23 L 3.16 10.98 L 7.4 10.98 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 20.84 13.02 L 16.6 13.02 L 16.6 14.52 L 19.03 14.52 L 13.59 19.95 L 5.99 12.35 L 4.93 13.41 L 12.53 21.02 L 14.65 21.02 L 20.09 15.58 L 20.09 18.01 L 21.59 18.01 L 21.59 13.77 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_battery_saver.xml
new file mode 100644
index 0000000..8f72226
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_battery_saver.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 15.5 L 12.75 15.5 L 12.75 13.75 L 14.5 13.75 L 14.5 12.25 L 12.75 12.25 L 12.75 10.5 L 11.25 10.5 L 11.25 12.25 L 9.5 12.25 L 9.5 13.75 L 11.25 13.75 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.59,4H15l-1-2h-4L9,4H7.41L6,5.41v15.17L7.41,22h9.17L18,20.59V5.41L16.59,4z M16.5,20.5h-9v-15h9V20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_bluetooth.xml
new file mode 100644
index 0000000..2f4c0b1
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_bluetooth.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,6.47L13.53,2h-1.81v8.19L7,5.47L5.94,6.53L11.41,12l-5.48,5.48l1.06,1.06l4.72-4.72V22h1.81L18,17.53v-1.06L13.53,12 L18,7.53V6.47z M16.41,17l-3.19,3.19v-6.38L16.41,17z M13.22,10.19V3.81L16.41,7L13.22,10.19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_flashlight.xml
new file mode 100644
index 0000000..c5a7166
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_flashlight.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.59,2H7.41L6,3.41V8l2,3v9.59L9.42,22h5.17L16,20.59V11l2-3V3.41L16.59,2z M16.5,7.55l-2,3v9.95h-5v-9.95l-2-3v-0.8h9 V7.55z M16.5,5.25h-9V3.5H12h4.5V5.25z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 12.75 C 12.6903559373 12.75 13.25 13.3096440627 13.25 14 C 13.25 14.6903559373 12.6903559373 15.25 12 15.25 C 11.3096440627 15.25 10.75 14.6903559373 10.75 14 C 10.75 13.3096440627 11.3096440627 12.75 12 12.75 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_night_display_on.xml
new file mode 100644
index 0000000..de342b2
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_night_display_on.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.87,15.85c-0.7,0.13-1.34,0.19-1.98,0.19c-6.03,0-10.93-4.9-10.93-10.93c0-0.64,0.06-1.28,0.19-1.98L6.99,2.38 c-2.97,1.97-4.74,5.26-4.74,8.81c0,5.83,4.74,10.56,10.56,10.56c3.55,0,6.85-1.77,8.81-4.74L20.87,15.85z M12.81,20.25 c-5,0-9.06-4.07-9.06-9.06c0-2.46,0.99-4.77,2.71-6.46c-0.22,7.25,5.8,13.08,12.82,12.81C17.59,19.26,15.27,20.25,12.81,20.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml
new file mode 100644
index 0000000..5b81e9f
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5v-17c4.69,0,8.5,3.81,8.5,8.5 S16.69,20.5,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_restart.xml
new file mode 100644
index 0000000..362eff6
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_restart.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,5c-0.34,0-0.68,0.03-1.01,0.07l1.54-1.54l-1.06-1.06l-3,3v1.06l3,3l1.06-1.06l-1.84-1.84C11.12,6.54,11.56,6.5,12,6.5 c3.58,0,6.5,2.92,6.5,6.5c0,3.23-2.41,6-5.6,6.44l0.21,1.49C17.03,20.38,20,16.97,20,13C20,8.59,16.41,5,12,5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5.5,13c0-1.74,0.68-3.37,1.9-4.6L6.34,7.34C4.83,8.85,4,10.86,4,13c0,3.97,2.97,7.38,6.9,7.92l0.21-1.49 C7.91,19,5.5,16.23,5.5,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_settings_bluetooth.xml
new file mode 100644
index 0000000..2f4c0b1
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_settings_bluetooth.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,6.47L13.53,2h-1.81v8.19L7,5.47L5.94,6.53L11.41,12l-5.48,5.48l1.06,1.06l4.72-4.72V22h1.81L18,17.53v-1.06L13.53,12 L18,7.53V6.47z M16.41,17l-3.19,3.19v-6.38L16.41,17z M13.22,10.19V3.81L16.41,7L13.22,10.19z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 0000000..bb8995e
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,3L3,21v1h17.59L22,20.59V3H21z M20.5,20.5H5.62L20.5,5.62V20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 0000000..a412c56
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,3L3,21v1h17.59L22,20.59V3H21z M20.5,20.5H11v-5.38l9.5-9.5V20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 0000000..e581b52
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,3L3,21v1h17.59L22,20.59V3H21z M20.5,20.5H13v-7.38l7.5-7.5V20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 0000000..38672ec
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,3L3,21v1h17.59L22,20.59V3H21z M20.5,20.5H16V10.12l4.5-4.5V20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 0000000..4a00c3c
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,3L3,21v1h17.59L22,20.59V3H21z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_location.xml
new file mode 100644
index 0000000..7975db6
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_location.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.2,0-8,3.22-8,8.2c0,3.11,2.33,6.62,7,10.8h2c4.67-4.18,7-7.7,7-10.8C20,5.22,16.2,2,12,2z M12.42,19.5h-0.84 c-4.04-3.7-6.08-6.74-6.08-9.3c0-4.35,3.35-6.7,6.5-6.7s6.5,2.35,6.5,6.7C18.5,12.76,16.46,15.8,12.42,19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,7c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3s3-1.34,3-3C15,8.34,13.66,7,12,7z M12,11.5c-0.83,0-1.5-0.67-1.5-1.5 c0-0.83,0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5C13.5,10.83,12.83,11.5,12,11.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 0000000..3f5f7cd
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2L23,8.61V6.38C20.11,3.67,16.24,2,12,2z M12,19.85L2.02,7.49 C4.78,4.91,8.28,3.5,12,3.5s7.22,1.41,9.98,3.99L12,19.85z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 0000000..ed3fe3e
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2L23,8.61V6.38C20.11,3.67,16.24,2,12,2z M16.37,14.45 C15.15,13.53,13.6,13,12,13s-3.15,0.53-4.37,1.45L2.02,7.49C4.78,4.91,8.28,3.5,12,3.5s7.22,1.41,9.98,3.99L16.37,14.45z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 0000000..083473e
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2L23,8.61V6.38C20.11,3.67,16.24,2,12,2z M18.18,12.21 C16.51,10.82,14.29,10,12,10s-4.51,0.82-6.18,2.21L2.02,7.49C4.78,4.91,8.28,3.5,12,3.5s7.22,1.41,9.98,3.99L18.18,12.21z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 0000000..fa365a9
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2L23,8.61V6.38C20.11,3.67,16.24,2,12,2z M19.97,9.98C17.83,8.1,14.99,7,12,7 S6.17,8.1,4.03,9.98L2.02,7.49C4.78,4.91,8.28,3.5,12,3.5s7.22,1.41,9.98,3.99L19.97,9.98z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 0000000..7b153e3
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2L23,8.61V6.38C20.11,3.67,16.24,2,12,2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_activity_recognition.xml
new file mode 100644
index 0000000..68a46a6
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_activity_recognition.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 13.5 1.5 C 14.6045694997 1.5 15.5 2.39543050034 15.5 3.5 C 15.5 4.60456949966 14.6045694997 5.5 13.5 5.5 C 12.3954305003 5.5 11.5 4.60456949966 11.5 3.5 C 11.5 2.39543050034 12.3954305003 1.5 13.5 1.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,13v-2c-1.9,0-3.5-1-4.3-2.4l-1-1.6c-0.56-0.89-1.68-1.25-2.65-0.84L6,8.3V13h2V9.6l1.8-0.7L7,23h2.1l1.8-8l2.1,2v6h2 v-7.5l-2.1-2l0.6-3C14.8,12,16.8,13,19,13z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_aural.xml
new file mode 100644
index 0000000..320498a
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_aural.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,2h-13L6,3.5v13L7.5,18h13l1.5-1.5v-13L20.5,2z M20.5,16.5h-13v-13h13V16.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13.5,15l1.5-1.5V7h3V5h-4.5v5h-2L10,11.5v2l1.5,1.5H13.5z M11.5,11.5h2V13l0,0v0.5h-2V11.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.5 6 L 2 6 L 2 20.5 L 3.5 22 L 18 22 L 18 20.5 L 3.5 20.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_calendar.xml
new file mode 100644
index 0000000..64b7457
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_calendar.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,4H18V2h-2v2H8V2H6v2H4.5L3,5.5v15L4.5,22h15l1.5-1.5v-15L19.5,4z M19.5,5.5v3h-15v-3H19.5z M4.5,20.5V10h15v10.5 H4.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12.5 13.5 H 16.5 V 17.5 H 12.5 V 13.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_call_log.xml
new file mode 100644
index 0000000..6d368db
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_call_log.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.76,14.08l-3.47,3.47c-2.91-1.56-5.32-3.98-6.87-6.9l3.4-3.39L9.37,4.41L7.96,3L4.41,3L3.07,4.35 c0.66,8.8,7.79,15.94,16.59,16.59L21,19.59v-3.66l-1.41-1.41L16.76,14.08z M4.59,4.5l3.28,0l0.34,2.23L5.74,9.2 C5.13,7.73,4.73,6.15,4.59,4.5z M19.5,19.42c-1.67-0.15-3.28-0.56-4.78-1.18l2.56-2.55l2.22,0.34V19.42z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 2 H 22 V 3.5 H 12 V 2 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 10.5 H 22 V 12 H 12 V 10.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 6.25 H 22 V 7.75 H 12 V 6.25 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_camera.xml
new file mode 100644
index 0000000..001c137
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_camera.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,5H17l-2-2H9L7,5H3.5L2,6.5v13L3.5,21h17l1.5-1.5v-13L20.5,5z M20.5,19.5h-17v-13h17V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 9 C 14.2091389993 9 16 10.7908610007 16 13 C 16 15.2091389993 14.2091389993 17 12 17 C 9.79086100068 17 8 15.2091389993 8 13 C 8 10.7908610007 9.79086100068 9 12 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_contacts.xml
new file mode 100644
index 0000000..189b9df
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_contacts.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,13.5c1.66,0,3-1.34,3-3s-1.34-3-3-3s-3,1.34-3,3S10.34,13.5,12,13.5z M12,9c0.83,0,1.5,0.67,1.5,1.5S12.83,12,12,12 s-1.5-0.67-1.5-1.5S11.17,9,12,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M20.59,5H3.41L2,6.41v11.17L3.41,19h17.17L22,17.59V6.41L20.59,5z M6.96,17.5c0.76-1.3,3.52-2,5.04-2s4.28,0.7,5.04,2 H6.96z M20.5,17.5h-1.85C18.02,15.04,14.16,14,12,14s-6.02,1.04-6.65,3.5H3.5v-11h17V17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 1.5 H 20 V 3 H 4 V 1.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 21 H 20 V 22.5 H 4 V 21 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_location.xml
new file mode 100644
index 0000000..9114d77
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_location.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.2,0-8,3.22-8,8.2c0,3.11,2.33,6.62,7,10.8h2c4.67-4.18,7-7.7,7-10.8C20,5.22,16.2,2,12,2z M12.42,19.5h-0.84 c-4.04-3.7-6.08-6.74-6.08-9.3c0-4.35,3.35-6.7,6.5-6.7s6.5,2.35,6.5,6.7C18.5,12.76,16.46,15.8,12.42,19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,7c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3s3-1.34,3-3C15,8.34,13.66,7,12,7z M12,11.5c-0.83,0-1.5-0.67-1.5-1.5 c0-0.83,0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5C13.5,10.83,12.83,11.5,12,11.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_microphone.xml
new file mode 100644
index 0000000..f80b1bee
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_microphone.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 11 L 16.5 16.5 L 7.5 16.5 L 7.5 11 L 6 11 L 6 16.5 L 7.5 18 L 11.25 18 L 11.25 21 L 12.75 21 L 12.75 18 L 16.5 18 L 18 16.5 L 18 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,14c1.66,0,3-1.34,3-3V5c0-1.66-1.34-3-3-3S9,3.34,9,5v6C9,12.66,10.34,14,12,14z M10.5,5c0-0.83,0.67-1.5,1.5-1.5 s1.5,0.67,1.5,1.5v6c0,0.83-0.67,1.5-1.5,1.5s-1.5-0.67-1.5-1.5V5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_phone_calls.xml
new file mode 100644
index 0000000..41acbc4
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_phone_calls.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.59,14.52l-2.83-0.44l-3.47,3.47c-2.91-1.56-5.32-3.98-6.87-6.9l3.4-3.39L9.37,4.41L7.96,3L4.41,3L3.07,4.35 c0.66,8.8,7.79,15.94,16.59,16.59L21,19.59v-3.66L19.59,14.52z M4.58,4.5l3.28,0l0.34,2.23L5.74,9.2C5.13,7.73,4.73,6.15,4.58,4.5z M19.5,19.42c-1.67-0.15-3.28-0.56-4.78-1.18l2.56-2.55l2.22,0.34V19.42z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sensors.xml
new file mode 100644
index 0000000..94bf7ad
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sensors.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.66,3.99C18.66,3.3,17.56,3,16.5,3c-1.74,0-3.41,0.81-4.5,2.09C10.91,3.81,9.24,3,7.5,3C6.44,3,5.34,3.3,4.34,3.99 C2.94,4.95,2.06,6.57,2,8.28C1.85,12.72,6.94,17.33,11,21l1.99,0c4.88-4.44,9.15-8.53,9-12.72C21.94,6.57,21.06,4.95,19.66,3.99z M12.44,19.47l-0.03,0.03l-0.83,0l-0.02-0.02l-0.04-0.04C6.62,15,3.39,11.51,3.5,8.33c0.04-1.23,0.69-2.42,1.69-3.1 C5.89,4.74,6.67,4.5,7.5,4.5c1.27,0,2.52,0.58,3.36,1.56L12,7.4l1.14-1.34c0.83-0.98,2.09-1.56,3.36-1.56 c0.83,0,1.61,0.24,2.31,0.73c1,0.68,1.64,1.87,1.69,3.1C20.61,11.51,17.37,15.01,12.44,19.47z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sms.xml
new file mode 100644
index 0000000..6421257
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sms.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,2h-17L2,3.5V22l4-4h14.5l1.5-1.5v-13L20.5,2z M20.5,16.5h-17v-13h17V16.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7 9.25 H 8.5 V 10.75 H 7 V 9.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.5 9.25 H 17 V 10.75 H 15.5 V 9.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 9.25 H 12.75 V 10.75 H 11.25 V 9.25 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_storage.xml
new file mode 100644
index 0000000..56516a3
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_storage.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.59,6H12l-2-2H3.41L2,5.41v13.17L3.41,20h17.17L22,18.59V7.41L20.59,6z M20.5,18.5h-17v-11h17V18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_visual.xml
new file mode 100644
index 0000000..7b52753
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_visual.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,2h-13L6,3.5v13L7.5,18h13l1.5-1.5v-13L20.5,2z M20.5,16.5h-13v-13h13V16.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.5 6 L 2 6 L 2 20.5 L 3.5 22 L 18 22 L 18 20.5 L 3.5 20.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.67 11 L 13.17 13.98 L 11.5 11.8 L 9 15 L 19 15 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/Android.mk b/packages/overlays/IconPackVictorLauncherOverlay/Android.mk
new file mode 100644
index 0000000..ce10af8
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackVictorLauncher
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackVictorLauncherOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorLauncherOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..a7122eb
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.victor.launcher"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.google.android.apps.nexuslauncher" android:category="android.theme.customization.icon_pack.launcher" android:priority="1"/>
+    <application android:label="Victor" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_corp.xml
new file mode 100644
index 0000000..6e7931b
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_corp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorHint" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.59,6H16V3.41L14.59,2H9.41L8,3.41V6H3.41L2,7.41v12.17L3.41,21h17.17L22,19.59V7.41L20.59,6z M9.5,3.5h5V6h-5V3.5z M20.5,19.5h-17v-12h17V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 12 C 12.8284271247 12 13.5 12.6715728753 13.5 13.5 C 13.5 14.3284271247 12.8284271247 15 12 15 C 11.1715728753 15 10.5 14.3284271247 10.5 13.5 C 10.5 12.6715728753 11.1715728753 12 12 12 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_drag_handle.xml
new file mode 100644
index 0000000..59dcfd7
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_drag_handle.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorHint" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 4 9 H 20 V 10.5 H 4 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 13.5 H 20 V 15 H 4 V 13.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_hourglass_top.xml
new file mode 100644
index 0000000..fa065a3
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_hourglass_top.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6,20.59L7.41,22h9.17L18,20.59V16l-4-4l4-4V3.41L16.59,2H7.41L6,3.41V8l4,4l-4,4V20.59z M7.5,16.62l4.5-4.5l4.5,4.5v3.88 h-9V16.62z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_info_no_shadow.xml
new file mode 100644
index 0000000..8743a90
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_info_no_shadow.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 s8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 7 H 12.75 V 8.5 H 11.25 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_install_no_shadow.xml
new file mode 100644
index 0000000..0bc6dc2
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_install_no_shadow.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12.53 16.03 L 17.03 11.53 L 15.97 10.47 L 12.75 13.69 L 12.75 4 L 11.25 4 L 11.25 13.69 L 8.03 10.47 L 6.97 11.53 L 11.47 16.03 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.5 15 L 18.5 18.5 L 5.5 18.5 L 5.5 15 L 4 15 L 4 18.59 L 5.41 20 L 18.59 20 L 20 18.59 L 20 15 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_palette.xml
new file mode 100644
index 0000000..82eab08
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_palette.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 6.5 10 C 7.32842712475 10 8 10.6715728753 8 11.5 C 8 12.3284271247 7.32842712475 13 6.5 13 C 5.67157287525 13 5 12.3284271247 5 11.5 C 5 10.6715728753 5.67157287525 10 6.5 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 6 C 10.3284271247 6 11 6.67157287525 11 7.5 C 11 8.32842712475 10.3284271247 9 9.5 9 C 8.67157287525 9 8 8.32842712475 8 7.5 C 8 6.67157287525 8.67157287525 6 9.5 6 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 14.5 6 C 15.3284271247 6 16 6.67157287525 16 7.5 C 16 8.32842712475 15.3284271247 9 14.5 9 C 13.6715728753 9 13 8.32842712475 13 7.5 C 13 6.67157287525 13.6715728753 6 14.5 6 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 17.5 10 C 18.3284271247 10 19 10.6715728753 19 11.5 C 19 12.3284271247 18.3284271247 13 17.5 13 C 16.6715728753 13 16 12.3284271247 16 11.5 C 16 10.6715728753 16.6715728753 10 17.5 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.49,2,2,6.49,2,12c0,5.51,4.49,10,10,10h0.59L14,20.59V17h6.59L22,15.59V12C22,6.49,17.51,2,12,2z M20.5,15.5 h-6.59l-1.41,1.42v3.58H12c-4.69,0-8.5-3.81-8.5-8.5c0-4.69,3.81-8.5,8.5-8.5s8.5,3.81,8.5,8.5V15.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_pin.xml
new file mode 100644
index 0000000..8831e88
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_pin.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17,11.5v-8L15.5,2h-7L7,3.5v8l-2,3L6.5,16h4.75v5.25L12,22l0.75-0.75V16h4.75l1.5-1.5L17,11.5z M6.8,14.5l1.7-2.55V3.5h7 v8.45l1.7,2.55H6.8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_setting.xml
new file mode 100644
index 0000000..ff32a6e
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_setting.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M10.83,8L8,10.83v2.34L10.83,16h2.34L16,13.17v-2.34L13.17,8H10.83z M14.5,12.55l-1.95,1.95h-1.1L9.5,12.55v-1.1 l1.95-1.95h1.1l1.95,1.95V12.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.47,12.61c0.02-0.2,0.03-0.4,0.03-0.61c0-0.2-0.01-0.4-0.03-0.6l1.46-1.09l0.52-1.93l-1.59-2.75l-1.93-0.52l-1.67,0.72 c-0.33-0.23-0.69-0.43-1.05-0.6L15,3.42l-1.41-1.41h-3.17L9,3.42L8.79,5.23C8.42,5.4,8.07,5.6,7.73,5.83L6.07,5.11L4.14,5.63 L2.55,8.38l0.52,1.93l1.46,1.09C4.51,11.6,4.5,11.8,4.5,12c0,0.21,0.02,0.41,0.03,0.61L3.07,13.7l-0.52,1.93l1.59,2.75l1.93,0.52 l1.67-0.72c0.33,0.23,0.68,0.43,1.05,0.6L9,20.59L10.41,22h3.17L15,20.59l0.21-1.82c0.36-0.17,0.72-0.37,1.05-0.6l1.67,0.72 l1.93-0.52l1.59-2.75l-0.52-1.93L19.47,12.61z M18.61,17.55l-2.52-1.09c-1.16,0.8-0.92,0.66-2.27,1.31L13.5,20.5h-3l-0.32-2.73 c-1.36-0.65-1.12-0.51-2.27-1.31l-2.52,1.09l-1.5-2.6l2.2-1.63c-0.12-1.5-0.12-1.13,0-2.63l-2.2-1.64l1.5-2.6L7.9,7.54 c1.16-0.8,0.94-0.68,2.28-1.31l0.32-2.72h3l0.32,2.72c1.34,0.64,1.11,0.51,2.28,1.31l2.51-1.09l1.5,2.6l-2.2,1.64 c0.12,1.5,0.12,1.12,0,2.63l2.2,1.63L18.61,17.55z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_smartspace_preferences.xml
new file mode 100644
index 0000000..66e89c4
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_smartspace_preferences.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.64,7.44l-11.2,11.2l0,2l1.92,1.92h2l11.2-11.2v-2l-1.92-1.92H12.64z M4.36,21.44l-1.8-1.8l8.53-8.53l1.8,1.8 L4.36,21.44z M13.95,11.85l-1.8-1.8l1.49-1.49l1.8,1.8L13.95,11.85z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 5.58 7 L 7.5 5.92 L 9.42 7 L 10 6.42 L 8.92 4.5 L 10 2.58 L 9.42 2 L 7.5 3.08 L 5.58 2 L 5 2.58 L 6.08 4.5 L 5 6.42 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21.42 14 L 19.5 15.08 L 17.58 14 L 17 14.58 L 18.08 16.5 L 17 18.42 L 17.58 19 L 19.5 17.92 L 21.42 19 L 22 18.42 L 20.92 16.5 L 22 14.58 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 22 2.58 L 21.42 2 L 19.5 3.08 L 17.58 2 L 17 2.58 L 18.08 4.5 L 17 6.42 L 17.58 7 L 19.5 5.92 L 21.42 7 L 22 6.42 L 20.92 4.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_split_screen.xml
new file mode 100644
index 0000000..bf92a39
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_split_screen.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,2h-13L4,3.5v6L5.5,11h13L20,9.5v-6L18.5,2z M18.5,9.5h-13v-6h13V9.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M5.5,13L4,14.5v6L5.5,22h13l1.5-1.5v-6L18.5,13H5.5z M18.5,20.5h-13v-6h13V20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml
new file mode 100644
index 0000000..e0010594
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4V3H9v1H4v1.5h1v14L6.5,21h11l1.5-1.5v-14h1V4H15z M17.5,19.5h-11v-14h11V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 8 H 11 V 17 H 9.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 H 14.5 V 17 H 13 V 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_warning.xml
new file mode 100644
index 0000000..26909cd
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_warning.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.65,3.12h-1.3L1.6,19.87L2.25,21h19.5l0.65-1.13L12.65,3.12z M3.55,19.5L12,4.99l8.45,14.51H3.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 15 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 16.5 H 12.75 V 18 H 11.25 V 16.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_widget.xml
new file mode 100644
index 0000000..2921488
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_widget.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/textColorPrimary" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M4.5,3L3,4.5v5L4.5,11h5L11,9.5v-5L9.5,3H4.5z M9.5,9.5h-5v-5h5V9.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.5,13L3,14.5v5L4.5,21h5l1.5-1.5v-5L9.5,13H4.5z M9.5,19.5h-5v-5h5V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14.5,13L13,14.5v5l1.5,1.5h5l1.5-1.5v-5L19.5,13H14.5z M19.5,19.5h-5v-5h5V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.66,2.81h-2.12L12,6.34v2.12L15.54,12l2.12,0l3.54-3.54V6.34L17.66,2.81z M16.6,10.94L13.06,7.4l3.54-3.54l3.54,3.54 L16.6,10.94z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/Android.mk b/packages/overlays/IconPackVictorSettingsOverlay/Android.mk
new file mode 100644
index 0000000..ad8fc3d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackVictorSettings
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackVictorSettingsOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorSettingsOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..e2336d5
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.victor.settings"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.settings" android:category="android.theme.customization.icon_pack.settings" android:priority="1"/>
+    <application android:label="Victor" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/drag_handle.xml
new file mode 100644
index 0000000..955a7c6
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/drag_handle.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 4 9 H 20 V 10.5 H 4 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 13.5 H 20 V 15 H 4 V 13.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_add_24dp.xml
new file mode 100644
index 0000000..1b48382
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_add_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20 11.25 L 12.75 11.25 L 12.75 4 L 11.25 4 L 11.25 11.25 L 4 11.25 L 4 12.75 L 11.25 12.75 L 11.25 20 L 12.75 20 L 12.75 12.75 L 20 12.75 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_airplanemode_active.xml
new file mode 100644
index 0000000..2efbb06
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_airplanemode_active.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,8V4l-3-2L9,4v4l-7,3v2.39l1.41,1.41L9,14v3l-3,3v0.59L7.41,22h9.17L18,20.59V20l-3-3v-3l5.59,0.8L22,13.39V11L15,8z M20.5,11.99v1.28l-7-1v5.35l2.88,2.88H7.62l2.88-2.88v-5.35l-7,1v-1.28v0l7-3V4.8v0l1.5-1l1.5,1v0v4.19L20.5,11.99L20.5,11.99z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_android.xml
new file mode 100644
index 0000000..1430d0c
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_android.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M6,18c0,0.55,0.45,1,1,1h1v3.5C8,23.33,8.67,24,9.5,24s1.5-0.67,1.5-1.5V19h2v3.5c0,0.83,0.67,1.5,1.5,1.5 s1.5-0.67,1.5-1.5V19h1c0.55,0,1-0.45,1-1V8H6V18z M3.5,8C2.67,8,2,8.67,2,9.5v7C2,17.33,2.67,18,3.5,18S5,17.33,5,16.5v-7 C5,8.67,4.33,8,3.5,8 M20.5,8C19.67,8,19,8.67,19,9.5v7c0,0.83,0.67,1.5,1.5,1.5s1.5-0.67,1.5-1.5v-7C22,8.67,21.33,8,20.5,8 M15.53,2.16l1.3-1.3c0.2-0.2,0.2-0.51,0-0.71c-0.2-0.2-0.51-0.2-0.71,0l-1.48,1.48C13.85,1.23,12.95,1,12,1 c-0.96,0-1.86,0.23-2.66,0.63L7.85,0.15c-0.2-0.2-0.51-0.2-0.71,0c-0.2,0.2-0.2,0.51,0,0.71l1.31,1.31C6.97,3.26,6,5.01,6,7h12 C18,5.01,17.03,3.25,15.53,2.16 M10,5H9V4h1V5z M15,5h-1V4h1V5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_apps.xml
new file mode 100644
index 0000000..ab58f204
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_apps.xml
@@ -0,0 +1,26 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 4 4 H 8 V 8 H 4 V 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 10 H 8 V 14 H 4 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 16 H 8 V 20 H 4 V 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 4 H 14 V 8 H 10 V 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 10 H 14 V 14 H 10 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 16 H 14 V 20 H 10 V 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16 4 H 20 V 8 H 16 V 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16 10 H 20 V 14 H 16 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16 16 H 20 V 20 H 16 V 16 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_back.xml
new file mode 100644
index 0000000..ee70746
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20 11.25 L 6.87 11.25 L 13.06 5.06 L 12 4 L 5 11 L 5 13 L 12 20 L 13.06 18.94 L 6.87 12.75 L 20 12.75 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml
new file mode 100644
index 0000000..eccf03d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 13 16 L 20 9 L 18.94 7.94 L 12 14.88 L 5.06 7.94 L 4 9 L 11 16 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_charging_full.xml
new file mode 100644
index 0000000..f313ee0
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_charging_full.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11 18.5 L 14.5 12 L 13 12 L 13 7.5 L 9.5 14 L 11 14 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.59,4H15l-1-2h-4L9,4H7.41L6,5.41v15.17L7.41,22h9.17L18,20.59V5.41L16.59,4z M16.5,20.5h-9v-15h9V20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml
new file mode 100644
index 0000000..5c54383
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.59,4H15l-1-2h-4L9,4H7.41L6,5.41v15.17L7.41,22h9.17L18,20.59V5.41L16.59,4z M16.5,20.5h-9v-15h9V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.48 11.47 L 14.41 10.41 L 10.94 13.89 L 9.52 12.47 L 8.46 13.53 L 10.94 16.01 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml
new file mode 100644
index 0000000..1e43dc5
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.59,4H15l-1-2h-4L9,4H7.41L6,5.41v15.17L7.41,22h9.17L18,20.59V5.41L16.59,4z M16.5,20.5h-9v-15h9V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 H 12.75 V 15 H 11.25 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 16.5 H 12.75 V 18 H 11.25 V 16.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_call_24dp.xml
new file mode 100644
index 0000000..bd85e5c
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_call_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.59,14.52l-2.83-0.44l-3.47,3.47c-2.91-1.56-5.32-3.98-6.87-6.9l3.4-3.39L9.37,4.41L7.96,3L4.41,3L3.07,4.35 c0.66,8.8,7.79,15.94,16.59,16.59L21,19.59v-3.66L19.59,14.52z M4.58,4.5l3.28,0l0.34,2.23L5.74,9.2C5.13,7.73,4.73,6.15,4.58,4.5z M19.5,19.42c-1.67-0.15-3.28-0.56-4.78-1.18l2.56-2.55l2.22,0.34V19.42z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cancel.xml
new file mode 100644
index 0000000..afc3de7
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cancel.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10c5.52,0,10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5 S7.31,3.5,12,3.5c4.69,0,8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.47 7.47 L 12 10.94 L 8.53 7.47 L 7.47 8.53 L 10.94 12 L 7.47 15.47 L 8.53 16.53 L 12 13.06 L 15.47 16.53 L 16.53 15.47 L 13.06 12 L 16.53 8.53 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cast_24dp.xml
new file mode 100644
index 0000000..5f29bc6
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cast_24dp.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 21.59 3 L 2.41 3 L 1 4.41 L 1 8 L 2.5 8 L 2.5 4.5 L 21.5 4.5 L 21.5 19.5 L 14 19.5 L 14 21 L 21.59 21 L 23 19.59 L 23 4.41 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,10v1.5c5.24,0,9.5,4.26,9.5,9.5H12C12,14.92,7.08,10,1,10z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,14v1.5c3.03,0,5.5,2.47,5.5,5.5H8C8,17.13,4.87,14,1,14z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,18v3h3C4,19.34,2.66,18,1,18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cellular_off.xml
new file mode 100644
index 0000000..0f0e2be
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cellular_off.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 15.75 11.5 L 13.62 11.5 L 15.75 13.63 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 8.25 4.34 L 8.25 6.13 L 9.75 7.63 L 9.75 4.34 L 12.91 7.5 L 13.97 6.44 L 9.53 2 L 9.53 2 L 9.53 2 L 8.47 2 L 8.47 2 L 8.47 2 L 6.29 4.17 L 7.36 5.23 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1.04,3.16l7.21,7.21V13h2.63l3.37,3.37v3.29l-3.16-3.16l-1.06,1.06L14.47,22h0h0h1.06h0h0l2.17-2.17l3.13,3.13l1.06-1.06 L2.1,2.1L1.04,3.16z M15.75,17.87l0.89,0.89l-0.89,0.89V17.87z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml
new file mode 100644
index 0000000..ae78580
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 15.41 11 L 9.71 5.29 L 8.65 6.35 L 14.29 12 L 8.65 17.65 L 9.71 18.7 L 15.41 13 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml
new file mode 100644
index 0000000..3f92b7b
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="@*android:color/material_grey_600" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,1h-12L6,2.5v15L7.5,19h12l1.5-1.5v-15L19.5,1z M19.5,17.5h-12v-15h12V17.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.51 7 L 2.01 7 L 2.01 21.5 L 3.51 23 L 18 23 L 18 21.5 L 3.51 21.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_data_saver.xml
new file mode 100644
index 0000000..02de755
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_data_saver.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.75,2.04v2C16.81,4.42,20,7.84,20,12c0,1.17-0.26,2.28-0.71,3.28l1.74,1C21.64,14.99,22,13.54,22,12 C22,6.73,17.92,2.42,12.75,2.04z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,20c-4.41,0-8-3.59-8-8c0-4.16,3.19-7.58,7.25-7.96v-2C6.08,2.42,2,6.73,2,12c0,5.52,4.48,10,10,10 c3.45,0,6.49-1.75,8.29-4.41l-1.75-1.01C17.1,18.65,14.7,20,12,20z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 L 11.25 11.25 L 8 11.25 L 8 12.75 L 11.25 12.75 L 11.25 16 L 12.75 16 L 12.75 12.75 L 16 12.75 L 16 11.25 L 12.75 11.25 L 12.75 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_delete.xml
new file mode 100644
index 0000000..5d4acbd
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_delete.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4V3H9v1H4v1.5h1v14L6.5,21h11l1.5-1.5v-14h1V4H15z M17.5,19.5h-11v-14h11V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 8 H 11 V 17 H 9.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 H 14.5 V 17 H 13 V 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_devices_other.xml
new file mode 100644
index 0000000..7548dfa
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_devices_other.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.5,8h-5L15,9.5v9l1.5,1.5h5l1.5-1.5v-9L21.5,8z M21.5,18.5h-5v-9h5V18.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 2.5 5.5 L 21 5.5 L 21 4 L 2.5 4 L 1 5.5 L 1 18.5 L 2.5 20 L 7 20 L 7 18.5 L 2.5 18.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M13,12H9v1.78C8.39,14.33,8,15.11,8,16s0.39,1.67,1,2.22V20h4v-1.78c0.61-0.55,1-1.34,1-2.22s-0.39-1.67-1-2.22V12z M11,14.5c0.83,0,1.5,0.67,1.5,1.5s-0.67,1.5-1.5,1.5S9.5,16.83,9.5,16S10.17,14.5,11,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_eject_24dp.xml
new file mode 100644
index 0000000..96f456f
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_eject_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 5 17.5 H 19 V 19 H 5 V 17.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,5L5.25,15h13.5L12,5z M12,7.68l3.93,5.82H8.07L12,7.68z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_less.xml
new file mode 100644
index 0000000..0582b15
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_less.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 L 11 8 L 4 15 L 5.06 16.06 L 12 9.12 L 18.94 16.06 L 20 15 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_more_inverse.xml
new file mode 100644
index 0000000..f65131d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_more_inverse.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorForegroundInverse" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 13 16 L 20 9 L 18.94 7.94 L 12 14.88 L 5.06 7.94 L 4 9 L 11 16 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_find_in_page_24px.xml
new file mode 100644
index 0000000..f016628
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_find_in_page_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14,2H5.5L4,3.5v17L5.5,22h13l1.5-1.5V8L14,2z M18.5,18.44l-2.84-2.84c1.25-1.76,1.1-4.2-0.48-5.78 c-1.76-1.76-4.61-1.76-6.36,0c-1.76,1.76-1.76,4.61,0,6.36c1.52,1.52,3.94,1.79,5.78,0.48l3.84,3.84H5.5v-17h7.88l5.12,5.12V18.44z M14.12,15.12c-1.17,1.17-3.07,1.17-4.24,0c-1.17-1.17-1.17-3.07,0-4.24c1.17-1.17,3.07-1.17,4.24,0 C15.29,12.05,15.29,13.95,14.12,15.12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml
new file mode 100644
index 0000000..56516a3
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.59,6H12l-2-2H3.41L2,5.41v13.17L3.41,20h17.17L22,18.59V7.41L20.59,6z M20.5,18.5h-17v-11h17V18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_friction_lock_closed.xml
new file mode 100644
index 0000000..204c3b2
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_friction_lock_closed.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,8H16V3.5L14.5,2h-5L8,3.5V8H5.5L4,9.5v11L5.5,22h13l1.5-1.5v-11L18.5,8z M9.5,3.5h5V8h-5V3.5z M18.5,20.5h-13v-11 h13V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 13 C 13.1045694997 13 14 13.8954305003 14 15 C 14 16.1045694997 13.1045694997 17 12 17 C 10.8954305003 17 10 16.1045694997 10 15 C 10 13.8954305003 10.8954305003 13 12 13 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml
new file mode 100644
index 0000000..d87595a
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.49,2,2,6.49,2,12s4.49,10,10,10s10-4.49,10-10S17.51,2,12,2z M19.62,8.25h-6.87v-1.5h5.92 C19.04,7.21,19.35,7.72,19.62,8.25z M12.75,3.54c1.64,0.14,3.15,0.76,4.4,1.71h-4.4V3.54z M12.75,18.75h4.4 c-1.24,0.95-2.75,1.57-4.4,1.71V18.75z M12.75,12.75h7.71c-0.05,0.52-0.14,1.02-0.27,1.5h-7.44V12.75z M12.75,11.25v-1.5h7.44 c0.13,0.48,0.23,0.98,0.27,1.5H12.75z M3.5,12c0-4.43,3.41-8.08,7.75-8.46v16.92C6.91,20.08,3.5,16.43,3.5,12z M18.67,17.25h-5.92 v-1.5h6.87C19.35,16.28,19.04,16.79,18.67,17.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_headset_24dp.xml
new file mode 100644
index 0000000..ead7973
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_headset_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.97,0-9,4.03-9,9v8.59L4.41,21h3.17L9,19.59v-5.17L7.59,13H4.5v-2c0-4.14,3.36-7.5,7.5-7.5s7.5,3.36,7.5,7.5v2 h-3.09L15,14.41v5.17L16.41,21h3.17L21,19.59V11C21,6.03,16.97,2,12,2z M7.5,14.5v5h-3v-5H7.5z M19.5,19.5h-3v-5h3V19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help.xml
new file mode 100644
index 0000000..eb2e966
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 s8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.48,6c-1.71,0-3.53,0.96-3.53,3.17v0.37c0,0.11,0.06,0.17,0.17,0.17l1.29,0.07c0.11,0,0.17-0.06,0.17-0.17V9.17 c0-1.29,1.07-1.7,1.85-1.7c0.74,0,1.81,0.37,1.81,1.66c0,1.48-1.57,1.85-2.54,3.09c-0.48,0.6-0.39,1.28-0.39,2.1 c0,0.09,0.08,0.17,0.17,0.17l1.3,0c0.11,0,0.17-0.06,0.17-0.17c0-0.72-0.07-1.13,0.28-1.54c0.91-1.05,2.65-1.46,2.65-3.7 C15.89,6.99,14.27,6,12.48,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.83,16h-1.66C11.08,16,11,16.08,11,16.17v1.66c0,0.09,0.08,0.17,0.17,0.17h1.66c0.09,0,0.17-0.08,0.17-0.17v-1.66 C13,16.08,12.92,16,12.83,16z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help_actionbar.xml
new file mode 100644
index 0000000..36e8a72
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help_actionbar.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 s8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.48,6c-1.71,0-3.53,0.96-3.53,3.17v0.37c0,0.11,0.06,0.17,0.17,0.17l1.29,0.07c0.11,0,0.17-0.06,0.17-0.17V9.17 c0-1.29,1.07-1.7,1.85-1.7c0.74,0,1.81,0.37,1.81,1.66c0,1.48-1.57,1.85-2.54,3.09c-0.48,0.6-0.39,1.28-0.39,2.1 c0,0.09,0.08,0.17,0.17,0.17l1.3,0c0.11,0,0.17-0.06,0.17-0.17c0-0.72-0.07-1.13,0.28-1.54c0.91-1.05,2.65-1.46,2.65-3.7 C15.89,6.99,14.27,6,12.48,6z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12.83,16h-1.66C11.08,16,11,16.08,11,16.17v1.66c0,0.09,0.08,0.17,0.17,0.17h1.66c0.09,0,0.17-0.08,0.17-0.17v-1.66 C13,16.08,12.92,16,12.83,16z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_homepage_search.xml
new file mode 100644
index 0000000..0f05791
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_homepage_search.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.28,19.21l-5.68-5.68C15.47,12.42,16,11.02,16,9.5C16,5.92,13.08,3,9.5,3S3,5.92,3,9.5S5.92,16,9.5,16 c1.52,0,2.92-0.53,4.03-1.41l5.68,5.68L20.28,19.21z M9.5,14.5c-2.76,0-5-2.24-5-5s2.24-5,5-5s5,2.24,5,5S12.26,14.5,9.5,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_info_outline_24.xml
new file mode 100644
index 0000000..13e8c36
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_info_outline_24.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 s8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 7 H 12.75 V 8.5 H 11.25 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_movies.xml
new file mode 100644
index 0000000..c62a36a
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_movies.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,4h-17L2,5.5v13L3.5,20h17l1.5-1.5v-13L20.5,4z M5.75,5.5L7,8h2L7.75,5.5h3L12,8h2l-1.25-2.5h3L17,8h2l-1.25-2.5h2.75 v3h-17v-3H5.75z M3.5,18.5V10h17v8.5H3.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml
new file mode 100644
index 0000000..41acbc4
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.59,14.52l-2.83-0.44l-3.47,3.47c-2.91-1.56-5.32-3.98-6.87-6.9l3.4-3.39L9.37,4.41L7.96,3L4.41,3L3.07,4.35 c0.66,8.8,7.79,15.94,16.59,16.59L21,19.59v-3.66L19.59,14.52z M4.58,4.5l3.28,0l0.34,2.23L5.74,9.2C5.13,7.73,4.73,6.15,4.58,4.5z M19.5,19.42c-1.67-0.15-3.28-0.56-4.78-1.18l2.56-2.55l2.22,0.34V19.42z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream.xml
new file mode 100644
index 0000000..8095944
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,3h-5.5v10h-5L6,14.5v5L7.5,21h5l1.5-1.5V7h4V3z M12.5,19.5h-5v-5h5V16h0V19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream_off.xml
new file mode 100644
index 0000000..c27e7db
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 14 7 L 18 7 L 18 3 L 12.5 3 L 12.5 10.38 L 14 11.88 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16L10.88,13H7.5L6,14.5v5L7.5,21h5l1.5-1.5v-3.38l6.84,6.84l1.06-1.06L2.1,2.1z M12.5,19.5h-5v-5h4.88 l0.12,0.12L12.5,19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_network_cell.xml
new file mode 100644
index 0000000..50361eb
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_network_cell.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,3L3,21v1h17.59L22,20.59V3H21z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications.xml
new file mode 100644
index 0000000..21abb2e
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,17.5v-11L16.5,5H13V3h-2v2H7.5L6,6.5v11H4V19h16v-1.5H18z M7.5,17.5v-11h9v11H7.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml
new file mode 100644
index 0000000..e868f65
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 6.5 L 16.5 14.38 L 18 15.88 L 18 6.5 L 16.5 5 L 13 5 L 13 3 L 11 3 L 11 5 L 7.5 5 L 7.31 5.19 L 8.62 6.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16L6,8.12v9.38H4V19h12.88l3.96,3.96l1.06-1.06L2.1,2.1z M7.5,17.5V9.62l7.88,7.88H7.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_phone_info.xml
new file mode 100644
index 0000000..0484309
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_phone_info.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 16 H 11.25 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 H 12.75 V 9.5 H 11.25 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M17.59,1H6.41L5,2.41v19.17L6.41,23h11.17L19,21.59V2.41L17.59,1z M17.5,2.5v1.75h-11V2.5H17.5z M17.5,5.75v12.5h-11V5.75 H17.5z M6.5,21.5v-1.75h11v1.75H6.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_photo_library.xml
new file mode 100644
index 0000000..7b52753
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_photo_library.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,2h-13L6,3.5v13L7.5,18h13l1.5-1.5v-13L20.5,2z M20.5,16.5h-13v-13h13V16.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3.5 6 L 2 6 L 2 20.5 L 3.5 22 L 18 22 L 18 20.5 L 3.5 20.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.67 11 L 13.17 13.98 L 11.5 11.8 L 9 15 L 19 15 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_search_24dp.xml
new file mode 100644
index 0000000..2c64287
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_search_24dp.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.28,19.21l-5.68-5.68C15.47,12.42,16,11.02,16,9.5C16,5.92,13.08,3,9.5,3S3,5.92,3,9.5S5.92,16,9.5,16 c1.52,0,2.92-0.53,4.03-1.41l5.68,5.68L20.28,19.21z M9.5,14.5c-2.76,0-5-2.24-5-5s2.24-5,5-5s5,2.24,5,5S12.26,14.5,9.5,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accent.xml
new file mode 100644
index 0000000..0a6b9c6
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accent.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M10.83,8L8,10.83v2.34L10.83,16h2.34L16,13.17v-2.34L13.17,8H10.83z M14.5,12.55l-1.95,1.95h-1.1L9.5,12.55v-1.1 l1.95-1.95h1.1l1.95,1.95V12.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.47,12.61c0.02-0.2,0.03-0.4,0.03-0.61c0-0.2-0.01-0.4-0.03-0.6l1.46-1.09l0.52-1.93l-1.59-2.75l-1.93-0.52l-1.67,0.72 c-0.33-0.23-0.69-0.43-1.05-0.6L15,3.42l-1.41-1.41h-3.17L9,3.42L8.79,5.23C8.42,5.4,8.07,5.6,7.73,5.83L6.07,5.11L4.14,5.63 L2.55,8.38l0.52,1.93l1.46,1.09C4.51,11.6,4.5,11.8,4.5,12c0,0.21,0.02,0.41,0.03,0.61L3.07,13.7l-0.52,1.93l1.59,2.75l1.93,0.52 l1.67-0.72c0.33,0.23,0.68,0.43,1.05,0.6L9,20.59L10.41,22h3.17L15,20.59l0.21-1.82c0.36-0.17,0.72-0.37,1.05-0.6l1.67,0.72 l1.93-0.52l1.59-2.75l-0.52-1.93L19.47,12.61z M18.61,17.55l-2.52-1.09c-1.16,0.8-0.92,0.66-2.27,1.31L13.5,20.5h-3l-0.32-2.73 c-1.36-0.65-1.12-0.51-2.27-1.31l-2.52,1.09l-1.5-2.6l2.2-1.63c-0.12-1.5-0.12-1.13,0-2.63l-2.2-1.64l1.5-2.6L7.9,7.54 c1.16-0.8,0.94-0.68,2.28-1.31l0.32-2.72h3l0.32,2.72c1.34,0.64,1.11,0.51,2.28,1.31l2.51-1.09l1.5,2.6l-2.2,1.64 c0.12,1.5,0.12,1.12,0,2.63l2.2,1.63L18.61,17.55z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accessibility.xml
new file mode 100644
index 0000000..7f80c7d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accessibility.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,4c-2.61,0.7-5.67,1-8.5,1S6.11,4.7,3.5,4L3,6c1.86,0.5,4,0.83,6,1v13h2v-6h2v6h2V7c2-0.17,4.14-0.5,6-1L20.5,4z M12,4c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C10,3.1,10.9,4,12,4"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7,24h2v-2H7V24z M11,24h2v-2h-2V24z M15,24h2v-2h-2V24z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accounts.xml
new file mode 100644
index 0000000..758e63f
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accounts.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,13c1.93,0,3.5-1.57,3.5-3.5S13.93,6,12,6S8.5,7.57,8.5,9.5S10.07,13,12,13z M12,7.5c1.1,0,2,0.9,2,2s-0.9,2-2,2 s-2-0.9-2-2S10.9,7.5,12,7.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,3h-15L3,4.5v15L4.5,21h15l1.5-1.5v-15L19.5,3z M19.5,19.5h-15v-1.65c1.76-1.53,5.37-2.35,7.5-2.35 c1.45,0,3.76,0.38,5.67,1.24c0.62,0.28,1.29,0.65,1.83,1.12V19.5z M19.5,16.02C17.26,14.64,14.04,14,12,14s-5.26,0.64-7.5,2.02 V4.5h15V16.02z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_backup.xml
new file mode 100644
index 0000000..bd46662
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_backup.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.47 8.93 L 7.93 12.47 L 8.99 13.53 L 11.25 11.28 L 11.25 16 L 12.75 16 L 12.75 11.28 L 15 13.53 L 16.07 12.47 L 12.53 8.93 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19,11c0-3.87-3.13-7-7-7C8.78,4,6.07,6.18,5.26,9.15C2.82,9.71,1,11.89,1,14.5C1,17.54,3.46,20,6.5,20h12v0 c2.49-0.01,4.5-2.03,4.5-4.52C23,13.15,21.25,11.26,19,11z M18.49,18.5l-0.34,0H6.5c-2.21,0-4-1.79-4-4 c0-1.87,1.27-3.47,3.09-3.89l0.87-0.2L6.7,9.54C7.36,7.16,9.53,5.5,12,5.5c3.03,0,5.5,2.47,5.5,5.5v1.33l1.33,0.16 c1.53,0.18,2.67,1.46,2.67,2.98C21.5,17.13,20.15,18.49,18.49,18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_battery_white.xml
new file mode 100644
index 0000000..e1b7945
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_battery_white.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 16.59 4 L 15 4 L 14 2 L 10 2 L 9 4 L 7.41 4 L 6 5.41 L 6 20.59 L 7.41 22 L 16.59 22 L 18 20.59 L 18 5.41 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_data_usage.xml
new file mode 100644
index 0000000..3f4449b
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_data_usage.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.75,4.04C16.81,4.42,20,7.84,20,12c0,1.17-0.26,2.28-0.71,3.28l1.74,1C21.64,14.99,22,13.54,22,12 c0-5.27-4.08-9.58-9.25-9.96V4.04z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.54,16.59C17.1,18.65,14.7,20,12,20c-4.41,0-8-3.59-8-8c0-4.16,3.19-7.58,7.25-7.96v-2C6.08,2.42,2,6.73,2,12 c0,5.52,4.48,10,10,10c3.45,0,6.49-1.75,8.29-4.41L18.54,16.59z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_date_time.xml
new file mode 100644
index 0000000..6033d21
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_date_time.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12.75 6 L 11.25 6 L 11.25 12.31 L 14.47 15.53 L 15.53 14.47 L 12.75 11.69 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10c5.52,0,10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5 S7.31,3.5,12,3.5c4.69,0,8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_delete.xml
new file mode 100644
index 0000000..f6d6253
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_delete.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4V3H9v1H4v1.5h1v14L6.5,21h11l1.5-1.5v-14h1V4H15z M17.5,19.5h-11v-14h11V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 8 H 11 V 17 H 9.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 H 14.5 V 17 H 13 V 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_disable.xml
new file mode 100644
index 0000000..2a0c77e
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_disable.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3.5c4.69,0,8.5,3.81,8.5,8.5c0,1.8-0.57,3.47-1.53,4.85l1.07,1.07C21.27,16.26,22,14.22,22,12c0-5.52-4.48-10-10-10 C9.78,2,7.74,2.73,6.08,3.96l1.07,1.07C8.53,4.07,10.2,3.5,12,3.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l2.92,2.92C2.73,7.74,2,9.78,2,12c0,5.52,4.48,10,10,10c2.22,0,4.26-0.73,5.92-1.96l2.92,2.92 l1.06-1.06L2.1,2.1z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5c0-1.8,0.57-3.47,1.53-4.85l11.82,11.82C15.47,19.93,13.8,20.5,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_display_white.xml
new file mode 100644
index 0000000..c7d8a61
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_display_white.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,7v10c2.76,0,5-2.24,5-5S14.76,7,12,7z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M22.81,12.5v-1L20,8.69V4.71l0,0L19.29,4l0,0h-3.98L12.5,1.19h-1v0L8.69,4H4.71l0,0L4,4.71l0,0v3.98L1.19,11.5v1h0 L4,15.31v3.98l0,0L4.71,20l0,0h3.98l2.81,2.81v0h1L15.31,20h3.98l0,0L20,19.29l0,0v-3.98L22.81,12.5L22.81,12.5z M18.5,14.69v3.81 h-3.81L12,21.19L9.31,18.5H5.5v-3.81L2.81,12L5.5,9.31V5.5h3.81L12,2.81l2.69,2.69h3.81v3.81L21.19,12L18.5,14.69z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_enable.xml
new file mode 100644
index 0000000..42cf839
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_enable.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15.24,2.54l-0.49,1.42C18.19,5.13,20.5,8.37,20.5,12c0,4.69-3.81,8.5-8.5,8.5S3.5,16.69,3.5,12 c0-3.63,2.31-6.87,5.74-8.04L8.76,2.54C4.71,3.92,2,7.73,2,12c0,5.51,4.49,10,10,10s10-4.49,10-10C22,7.73,19.29,3.92,15.24,2.54z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 8.03 10.47 L 6.97 11.53 L 11.47 16.03 L 12.53 16.03 L 17.03 11.53 L 15.97 10.47 L 12.75 13.69 L 12.75 2 L 11.25 2 L 11.25 13.69 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_home.xml
new file mode 100644
index 0000000..6327002
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_home.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,3L4,9v10.5L5.5,21h13l1.5-1.5V9L12,3z M10.5,19.5v-5h3v5H10.5z M18.5,19.5H15v-5L13.5,13h-3L9,14.5v5H5.5V9.75L12,4.88 l6.5,4.88V19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_language.xml
new file mode 100644
index 0000000..c5e8893
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_language.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M19.62,8.25h-2.98c-0.34-1.66-0.89-3.1-1.59-4.18 C17.04,4.84,18.67,6.34,19.62,8.25z M20.19,14.25h-3.32c0.23-2.03,0.11-3.58,0-4.5h3.32C20.37,10.41,20.79,12.08,20.19,14.25z M12,20.5c-1.04,0-2.43-1.77-3.1-4.75h6.2C14.43,18.73,13.04,20.5,12,20.5z M8.64,14.25c-0.11-0.9-0.25-2.47,0-4.5h6.72 c0.11,0.9,0.25,2.47,0,4.5H8.64z M3.81,9.75h3.32c-0.23,2.03-0.11,3.58,0,4.5H3.81C3.63,13.59,3.21,11.92,3.81,9.75z M12,3.5 c1.04,0,2.43,1.77,3.1,4.75H8.9C9.57,5.27,10.96,3.5,12,3.5z M8.96,4.07C8.26,5.15,7.7,6.59,7.37,8.25H4.38 C5.33,6.34,6.96,4.84,8.96,4.07z M4.38,15.75h2.98c0.34,1.66,0.89,3.1,1.59,4.18C6.96,19.16,5.33,17.66,4.38,15.75z M15.04,19.93 c0.7-1.08,1.26-2.51,1.59-4.18h2.98C18.67,17.66,17.04,19.16,15.04,19.93z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_location.xml
new file mode 100644
index 0000000..7975db6
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_location.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.2,0-8,3.22-8,8.2c0,3.11,2.33,6.62,7,10.8h2c4.67-4.18,7-7.7,7-10.8C20,5.22,16.2,2,12,2z M12.42,19.5h-0.84 c-4.04-3.7-6.08-6.74-6.08-9.3c0-4.35,3.35-6.7,6.5-6.7s6.5,2.35,6.5,6.7C18.5,12.76,16.46,15.8,12.42,19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,7c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3s3-1.34,3-3C15,8.34,13.66,7,12,7z M12,11.5c-0.83,0-1.5-0.67-1.5-1.5 c0-0.83,0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5C13.5,10.83,12.83,11.5,12,11.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_multiuser.xml
new file mode 100644
index 0000000..9416b5f
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_multiuser.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,12c2.21,0,4-1.79,4-4s-1.79-4-4-4S8,5.79,8,8S9.79,12,12,12z M12,5.5c1.38,0,2.5,1.12,2.5,2.5s-1.12,2.5-2.5,2.5 S9.5,9.38,9.5,8S10.62,5.5,12,5.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,13c-2.7,0-8,1.39-8,4.6v0.99L5.41,20h13.17L20,18.59V17.6C20,14.39,14.7,13,12,13z M18.5,18.5h-13v-0.9 c0-1.89,4.27-3.1,6.5-3.1s6.5,1.21,6.5,3.1V18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_night_display.xml
new file mode 100644
index 0000000..92cc05e
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_night_display.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.87,15.85c-0.7,0.13-1.34,0.19-1.98,0.19c-6.03,0-10.93-4.9-10.93-10.93c0-0.64,0.06-1.28,0.19-1.98L6.99,2.38 c-2.97,1.97-4.74,5.26-4.74,8.81c0,5.83,4.74,10.56,10.56,10.56c3.55,0,6.85-1.77,8.81-4.74L20.87,15.85z M12.81,20.25 c-5,0-9.06-4.07-9.06-9.06c0-2.46,0.99-4.77,2.71-6.46c-0.22,7.25,5.8,13.08,12.82,12.81C17.59,19.26,15.27,20.25,12.81,20.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_open.xml
new file mode 100644
index 0000000..e4a8061
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_open.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20 3 L 14 3 L 14 4.5 L 18.44 4.5 L 7.97 14.97 L 9.03 16.03 L 19.5 5.56 L 19.5 10 L 21 10 L 21 4 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 19.5 19.5 L 4.5 19.5 L 4.5 4.5 L 12 4.5 L 12 3 L 4.5 3 L 3 4.5 L 3 19.5 L 4.5 21 L 19.5 21 L 21 19.5 L 21 12 L 19.5 12 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_print.xml
new file mode 100644
index 0000000..4d7fa20
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_print.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,8H18V4.5L16.5,3h-9L6,4.5V8H3.5L2,9.5V17h4v2.5L7.5,21h9l1.5-1.5V17h4V9.5L20.5,8z M16.5,19.5h-9V15h9V19.5z M16.5,8h-9V4.5h9V8z M18,12.5c-0.55,0-1-0.45-1-1s0.45-1,1-1s1,0.45,1,1S18.55,12.5,18,12.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_privacy.xml
new file mode 100644
index 0000000..7da20c1
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_privacy.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,8.5c1.48,0,2.71,1.08,2.95,2.5h1.5C16.2,8.76,14.31,7,12,7c-2.48,0-4.5,2.02-4.5,4.5c0,2.48,2.02,4.5,4.5,4.5 c0.72,0,1.39-0.19,2-0.49v-1.79c-0.53,0.48-1.23,0.78-2,0.78c-1.65,0-3-1.35-3-3S10.35,8.5,12,8.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,4C7.38,4,3.4,6.65,1.45,10.51v1.97C3.4,16.35,7.38,19,12,19c0.68,0,1.35-0.06,2-0.18v-1.54 c-0.65,0.13-1.32,0.22-2,0.22c-4.07,0-7.68-2.34-9.37-6c1.69-3.66,5.3-6,9.37-6c3.87,0,7.32,2.13,9.09,5.5h1.46v-0.49 C20.6,6.65,16.62,4,12,4z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M21,14l-1-1h-2l-1,1v2h-1v5h6v-5h-1V14z M19.5,16h-1v-1.5h1V16z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_security_white.xml
new file mode 100644
index 0000000..fbf6ae1
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_security_white.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,2h-5l-1.5,1.5l0,4.5h-9L4,9.5v11L5.5,22h13l1.5-1.5v-11L18.5,8H16V3.5h5v2.62h1.5V3.5L21,2z M18.5,20.5h-13v-11h13 V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 13 C 13.1045694997 13 14 13.8954305003 14 15 C 14 16.1045694997 13.1045694997 17 12 17 C 10.8954305003 17 10 16.1045694997 10 15 C 10 13.8954305003 10.8954305003 13 12 13 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_sim.xml
new file mode 100644
index 0000000..85dea66
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_sim.xml
@@ -0,0 +1,24 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.5,2H10L4,8v12.5L5.5,22h13l1.5-1.5v-17L18.5,2z M18.5,20.5h-13V8.62l5.12-5.12h7.88V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7 11 H 8.5 V 16 H 7 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.5 11 H 17 V 16 H 15.5 V 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 14 H 12.75 V 19 H 11.25 V 14 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7 17.5 H 8.5 V 19 H 7 V 17.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.5 17.5 H 17 V 19 H 15.5 V 17.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 11 H 12.75 V 12.5 H 11.25 V 11 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml
new file mode 100644
index 0000000..0594b9a
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 s8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 7 H 12.75 V 8.5 H 11.25 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_wireless.xml
new file mode 100644
index 0000000..802a041
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_wireless.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,4.5c-4.29,0-8.17,1.72-11.01,4.49l1.42,1.42C4.89,8,8.27,6.5,12,6.5c3.73,0,7.11,1.5,9.59,3.91l1.42-1.42 C20.17,6.22,16.29,4.5,12,4.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.93,12.93l1.42,1.42C7.79,12.9,9.79,12,12,12s4.21,0.9,5.65,2.35l1.42-1.42C17.26,11.12,14.76,10,12,10 S6.74,11.12,4.93,12.93z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9.06,17.06L12,20l2.94-2.94c-0.73-0.8-1.77-1.31-2.94-1.31S9.79,16.26,9.06,17.06z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage.xml
new file mode 100644
index 0000000..c91221b
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,4h-15L3,5.5v1L4.5,8h15L21,6.5v-1L19.5,4z M6.5,6.75H5v-1.5h1.5V6.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.5,10L3,11.5v1L4.5,14h15l1.5-1.5v-1L19.5,10H4.5z M6.5,12.75H5v-1.5h1.5V12.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.5,16L3,17.5v1L4.5,20h15l1.5-1.5v-1L19.5,16H4.5z M6.5,18.75H5v-1.5h1.5V18.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage_white.xml
new file mode 100644
index 0000000..45288f9
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage_white.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.5,4h-15L3,5.5v1L4.5,8h15L21,6.5v-1L19.5,4z M6.5,6.75H5v-1.5h1.5V6.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.5,10L3,11.5v1L4.5,14h15l1.5-1.5v-1L19.5,10H4.5z M6.5,12.75H5v-1.5h1.5V12.75z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.5,16L3,17.5v1L4.5,20h15l1.5-1.5v-1L19.5,16H4.5z M6.5,18.75H5v-1.5h1.5V18.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_suggestion_night_display.xml
new file mode 100644
index 0000000..92cc05e
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_suggestion_night_display.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.87,15.85c-0.7,0.13-1.34,0.19-1.98,0.19c-6.03,0-10.93-4.9-10.93-10.93c0-0.64,0.06-1.28,0.19-1.98L6.99,2.38 c-2.97,1.97-4.74,5.26-4.74,8.81c0,5.83,4.74,10.56,10.56,10.56c3.55,0,6.85-1.77,8.81-4.74L20.87,15.85z M12.81,20.25 c-5,0-9.06-4.07-9.06-9.06c0-2.46,0.99-4.77,2.71-6.46c-0.22,7.25,5.8,13.08,12.82,12.81C17.59,19.26,15.27,20.25,12.81,20.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync.xml
new file mode 100644
index 0000000..d2aadc9
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.94,5.83L11.47,7.3l1.06,1.06l2.83-2.83V4.47l-2.83-2.83L11.47,2.7l1.63,1.63C8.35,3.66,4.25,7.36,4.25,12 c0,2.07,0.81,4.02,2.27,5.48l1.06-1.06C6.4,15.24,5.75,13.67,5.75,12C5.75,8.95,8.42,5.15,12.94,5.83z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.75,12c0-2.07-0.81-4.02-2.27-5.48l-1.06,1.06c1.18,1.18,1.83,2.75,1.83,4.42c0,3.05-2.66,6.85-7.19,6.17l1.47-1.47 l-1.06-1.06l-2.83,2.83v1.06l2.83,2.83l1.06-1.06l-1.63-1.63C15.65,20.34,19.75,16.64,19.75,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml
new file mode 100644
index 0000000..3a83b59
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.5,6.02c2.36,0.99,3.96,3.31,3.99,5.9c0.54,0.24,1.03,0.57,1.45,0.97C19.98,12.6,20,12.3,20,12 c0-2.62-1.3-5.02-3.36-6.5H19V4h-5.25L13,4.75V10h1.5V6.02z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M11.1,5.56L10.9,4.08C6.96,4.62,4,8.02,4,12c0,2.62,1.3,5.02,3.36,6.5H5V20h5.25L11,19.25V14H9.5v3.98 c-2.38-1-4-3.35-4-5.98C5.5,8.77,7.91,6,11.1,5.56z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.5,13c-1.93,0-3.5,1.57-3.5,3.5s1.57,3.5,3.5,3.5s3.5-1.57,3.5-3.5S18.43,13,16.5,13z M17,19h-1v-1h1V19z M17,17h-1v-3 h1V17z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_system_update.xml
new file mode 100644
index 0000000..f8b490d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_system_update.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.59,1H6.41L5,2.41v19.17L6.41,23h11.17L19,21.59V2.41L17.59,1z M17.5,2.5v1.75h-11V2.5H17.5z M17.5,5.75v12.5h-11V5.75 H17.5z M6.5,21.5v-1.75h11v1.75H6.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.97 12.53 L 11.47 16.03 L 12.53 16.03 L 16.03 12.53 L 14.97 11.47 L 12.75 13.69 L 12.75 8 L 11.25 8 L 11.25 13.69 L 9.03 11.47 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml
new file mode 100644
index 0000000..928dc5d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.5,6h-19L1,7.5v9L2.5,18h19l1.5-1.5v-9L21.5,6z M21.5,16.5h-19v-9h19V16.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6.25 15 L 7.75 15 L 7.75 12.75 L 10 12.75 L 10 11.25 L 7.75 11.25 L 7.75 9 L 6.25 9 L 6.25 11.25 L 4 11.25 L 4 12.75 L 6.25 12.75 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 14.5 12 C 15.3284271247 12 16 12.6715728753 16 13.5 C 16 14.3284271247 15.3284271247 15 14.5 15 C 13.6715728753 15 13 14.3284271247 13 13.5 C 13 12.6715728753 13.6715728753 12 14.5 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.5 9 C 19.3284271247 9 20 9.67157287525 20 10.5 C 20 11.3284271247 19.3284271247 12 18.5 12 C 17.6715728753 12 17 11.3284271247 17 10.5 C 17 9.67157287525 17.6715728753 9 18.5 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml
new file mode 100644
index 0000000..6d04ffb
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M8.5,4L7,5.5v13L8.5,20h7l1.5-1.5v-13L15.5,4H8.5z M15.5,18.5h-7v-13h7V18.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4.5 7 H 6 V 17 H 4.5 V 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1.5 9 H 3 V 15 H 1.5 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 7 H 19.5 V 17 H 18 V 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21 9 H 22.5 V 15 H 21 V 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_up_24dp.xml
new file mode 100644
index 0000000..781ed94
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_up_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M7,9H4.5L3,10.5v3L4.5,15H7l4,4h1V5h-1L7,9z M10.5,16.38L7.62,13.5H4.5v-3h3.12l2.88-2.88V16.38z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M14,3.23v1.55c3.17,0.88,5.5,3.78,5.5,7.22s-2.33,6.34-5.5,7.22v1.55c4.01-0.91,7-4.49,7-8.77S18.01,4.14,14,3.23z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.5,12c0-1.76-1.02-3.27-2.5-4.01v8.02C15.48,15.27,16.5,13.76,16.5,12z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_vpn_key.xml
new file mode 100644
index 0000000..47080e2
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_vpn_key.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,9h-8.39C11.12,7.5,9.43,6.5,7.5,6.5C4.46,6.5,2,8.96,2,12s2.46,5.5,5.5,5.5c1.93,0,3.62-1,4.61-2.5H14v1.5l1.5,1.5 h3l1.5-1.5V15h0.5l1.5-1.5v-3L20.5,9z M20.5,13.5h-2v3h-3v-3h-4.21C11.01,13.93,9.99,16,7.5,16c-2.21,0-4-1.79-4-4s1.79-4,4-4 c2.5,0,3.5,2.06,3.79,2.5h9.21V13.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.5 10.5 C 8.32842712475 10.5 9 11.1715728753 9 12 C 9 12.8284271247 8.32842712475 13.5 7.5 13.5 C 6.67157287525 13.5 6 12.8284271247 6 12 C 6 11.1715728753 6.67157287525 10.5 7.5 10.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_wifi_tethering.xml
new file mode 100644
index 0000000..f2ab3be
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_wifi_tethering.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12 11 C 13.1045694997 11 14 11.8954305003 14 13 C 14 14.1045694997 13.1045694997 15 12 15 C 10.8954305003 15 10 14.1045694997 10 13 C 10 11.8954305003 10.8954305003 11 12 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,3C6.48,3,2,7.48,2,13c0,2.76,1.12,5.26,2.93,7.07l1.06-1.06C4.45,17.47,3.5,15.34,3.5,13c0-4.69,3.81-8.5,8.5-8.5 s8.5,3.81,8.5,8.5c0,2.34-0.95,4.47-2.49,6.01l1.06,1.06C20.88,18.26,22,15.76,22,13C22,7.48,17.52,3,12,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,7c-3.31,0-6,2.69-6,6c0,1.66,0.67,3.16,1.76,4.24l1.06-1.06C8,15.37,7.5,14.24,7.5,13c0-2.48,2.02-4.5,4.5-4.5 s4.5,2.02,4.5,4.5c0,1.24-0.5,2.37-1.32,3.18l1.06,1.06C17.33,16.16,18,14.66,18,13C18,9.69,15.31,7,12,7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorSystemUIOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..ca812b1
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.victor.systemui"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.systemui" android:category="android.theme.customization.icon_pack.systemui" android:priority="1"/>
+    <application android:label="Victor" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm.xml
new file mode 100644
index 0000000..3cb050b
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12.5 8 L 11 8 L 11 13.5 L 14.54 17.04 L 15.6 15.97 L 12.5 12.88 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1.84 3.56 H 7.84 V 5.06 H 1.84 V 3.56 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.41 1.31 H 19.91 V 7.31 H 18.41 V 1.31 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,4c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9S16.97,4,12,4z M12,20.5c-4.14,0-7.5-3.36-7.5-7.5S7.86,5.5,12,5.5 s7.5,3.36,7.5,7.5S16.14,20.5,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm_dim.xml
new file mode 100644
index 0000000..3cb050b
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm_dim.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12.5 8 L 11 8 L 11 13.5 L 14.54 17.04 L 15.6 15.97 L 12.5 12.88 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1.84 3.56 H 7.84 V 5.06 H 1.84 V 3.56 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.41 1.31 H 19.91 V 7.31 H 18.41 V 1.31 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,4c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9S16.97,4,12,4z M12,20.5c-4.14,0-7.5-3.36-7.5-7.5S7.86,5.5,12,5.5 s7.5,3.36,7.5,7.5S16.14,20.5,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_arrow_back.xml
new file mode 100644
index 0000000..ee70746
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:autoMirrored="true" android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20 11.25 L 6.87 11.25 L 13.06 5.06 L 12 4 L 5 11 L 5 13 L 12 20 L 13.06 18.94 L 6.87 12.75 L 20 12.75 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml
new file mode 100644
index 0000000..830a6a2
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18.03,7.53V6.47L13.56,2h-1.81v8.19L7.03,5.47L5.97,6.53L11.44,12l-5.48,5.48l1.06,1.06l4.72-4.72V22h1.81l4.47-4.47 v-1.06L13.56,12L18.03,7.53z M13.25,3.81L16.44,7l-3.19,3.19V3.81z M16.44,17l-3.19,3.19v-6.38L16.44,17z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 5 10.5 C 5.82842712475 10.5 6.5 11.1715728753 6.5 12 C 6.5 12.8284271247 5.82842712475 13.5 5 13.5 C 4.17157287525 13.5 3.5 12.8284271247 3.5 12 C 3.5 11.1715728753 4.17157287525 10.5 5 10.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 19 10.5 C 19.8284271247 10.5 20.5 11.1715728753 20.5 12 C 20.5 12.8284271247 19.8284271247 13.5 19 13.5 C 18.1715728753 13.5 17.5 12.8284271247 17.5 12 C 17.5 11.1715728753 18.1715728753 10.5 19 10.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_camera.xml
new file mode 100644
index 0000000..1933dc6
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_camera.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,5H17l-2-2H9L7,5H3.5L2,6.5v13L3.5,21h17l1.5-1.5v-13L20.5,5z M20.5,19.5h-17v-13h17V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 9 C 14.2091389993 9 16 10.7908610007 16 13 C 16 15.2091389993 14.2091389993 17 12 17 C 9.79086100068 17 8 15.2091389993 8 13 C 8 10.7908610007 9.79086100068 9 12 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast.xml
new file mode 100644
index 0000000..1cf8f26
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 21.59 3 L 2.41 3 L 1 4.41 L 1 8 L 2.5 8 L 2.5 4.5 L 21.5 4.5 L 21.5 19.5 L 14 19.5 L 14 21 L 21.59 21 L 23 19.59 L 23 4.41 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,10v1.5c5.24,0,9.5,4.26,9.5,9.5H12C12,14.92,7.08,10,1,10z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,14v1.5c3.03,0,5.5,2.47,5.5,5.5H8C8,17.13,4.87,14,1,14z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,18v3h3C4,19.34,2.66,18,1,18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast_connected.xml
new file mode 100644
index 0000000..3625af5
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast_connected.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 21.59 3 L 2.41 3 L 1 4.41 L 1 8 L 2.5 8 L 2.5 4.5 L 21.5 4.5 L 21.5 19.5 L 14 19.5 L 14 21 L 21.59 21 L 23 19.59 L 23 4.41 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 14 15.5 L 14 17 L 17.59 17 L 19 15.59 L 19 8.41 L 17.59 7 L 5 7 L 5 8.5 L 17.5 8.5 L 17.5 15.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,10v1.5c5.24,0,9.5,4.26,9.5,9.5H12C12,14.92,7.08,10,1,10z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,14v1.5c3.03,0,5.5,2.47,5.5,5.5H8C8,17.13,4.87,14,1,14z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1,18v3h3C4,19.34,2.66,18,1,18z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_close_white.xml
new file mode 100644
index 0000000..9f2a4c0
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_close_white.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 18.78 6.28 L 17.72 5.22 L 12 10.94 L 6.28 5.22 L 5.22 6.28 L 10.94 12 L 5.22 17.72 L 6.28 18.78 L 12 13.06 L 17.72 18.78 L 18.78 17.72 L 13.06 12 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver.xml
new file mode 100644
index 0000000..85dfdb7
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.75,2.04v2C16.81,4.42,20,7.84,20,12c0,1.17-0.26,2.28-0.71,3.28l1.74,1C21.64,14.99,22,13.54,22,12 C22,6.73,17.92,2.42,12.75,2.04z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,20c-4.41,0-8-3.59-8-8c0-4.16,3.19-7.58,7.25-7.96v-2C6.08,2.42,2,6.73,2,12c0,5.52,4.48,10,10,10 c3.45,0,6.49-1.75,8.29-4.41l-1.75-1.01C17.1,18.65,14.7,20,12,20z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 L 11.25 11.25 L 8 11.25 L 8 12.75 L 11.25 12.75 L 11.25 16 L 12.75 16 L 12.75 12.75 L 16 12.75 L 16 11.25 L 12.75 11.25 L 12.75 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver_off.xml
new file mode 100644
index 0000000..c915797
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver_off.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12.75,4.04C16.81,4.42,20,7.84,20,12c0,1.17-0.26,2.28-0.71,3.28l1.74,1C21.64,14.99,22,13.54,22,12 c0-5.27-4.08-9.58-9.25-9.96V4.04z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.54,16.59C17.1,18.65,14.7,20,12,20c-4.41,0-8-3.59-8-8c0-4.16,3.19-7.58,7.25-7.96v-2C6.08,2.42,2,6.73,2,12 c0,5.52,4.48,10,10,10c3.45,0,6.49-1.75,8.29-4.41L18.54,16.59z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_drag_handle.xml
new file mode 100644
index 0000000..9b216bd
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_drag_handle.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 4 9 H 20 V 10.5 H 4 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4 13.5 H 20 V 15 H 4 V 13.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset.xml
new file mode 100644
index 0000000..7a07d6e
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.97,0-9,4.03-9,9v8.59L4.41,21h3.17L9,19.59v-5.17L7.59,13H4.5v-2c0-4.14,3.36-7.5,7.5-7.5s7.5,3.36,7.5,7.5v2 h-3.09L15,14.41v5.17L16.41,21h3.17L21,19.59V11C21,6.03,16.97,2,12,2z M7.5,14.5v5h-3v-5H7.5z M19.5,19.5h-3v-5h3V19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset_mic.xml
new file mode 100644
index 0000000..e82de09
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset_mic.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,1c-4.97,0-9,4.03-9,9v8.59L4.41,20h3.17L9,18.59v-5.17L7.59,12H4.5v-2c0-4.14,3.36-7.5,7.5-7.5s7.5,3.36,7.5,7.5v2 h-3.09L15,13.41v5.17L16.41,20h3.09v1.5H13V23h6.59L21,21.59V10C21,5.03,16.97,1,12,1z M7.5,13.5v5h-3v-5H7.5z M19.5,18.5h-3v-5h3 V18.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_hotspot.xml
new file mode 100644
index 0000000..aaebe8b
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_hotspot.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12 11 C 13.1045694997 11 14 11.8954305003 14 13 C 14 14.1045694997 13.1045694997 15 12 15 C 10.8954305003 15 10 14.1045694997 10 13 C 10 11.8954305003 10.8954305003 11 12 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,3C6.48,3,2,7.48,2,13c0,2.76,1.12,5.26,2.93,7.07l1.06-1.06C4.45,17.47,3.5,15.34,3.5,13c0-4.69,3.81-8.5,8.5-8.5 s8.5,3.81,8.5,8.5c0,2.34-0.95,4.47-2.49,6.01l1.06,1.06C20.88,18.26,22,15.76,22,13C22,7.48,17.52,3,12,3z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,7c-3.31,0-6,2.69-6,6c0,1.66,0.67,3.16,1.76,4.24l1.06-1.06C8,15.37,7.5,14.24,7.5,13c0-2.48,2.02-4.5,4.5-4.5 s4.5,2.02,4.5,4.5c0,1.24-0.5,2.37-1.32,3.18l1.06,1.06C17.33,16.16,18,14.66,18,13C18,9.69,15.31,7,12,7z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info.xml
new file mode 100644
index 0000000..0594b9a
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 s8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 7 H 12.75 V 8.5 H 11.25 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info_outline.xml
new file mode 100644
index 0000000..0594b9a
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info_outline.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 s8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 17 H 11.25 V 10 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 7 H 12.75 V 8.5 H 11.25 V 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_invert_colors.xml
new file mode 100644
index 0000000..f67b051
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_invert_colors.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M13,2h-2C6.33,6.18,4,9.7,4,12.8c0,4.98,3.8,8.2,8,8.2s8-3.22,8-8.2C20,9.7,17.67,6.18,13,2z M5.5,12.8 c0-2.56,2.04-5.6,6.08-9.3H12v16C8.85,19.5,5.5,17.15,5.5,12.8z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_location.xml
new file mode 100644
index 0000000..02678ba
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_location.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2c-4.2,0-8,3.22-8,8.2c0,3.11,2.33,6.62,7,10.8h2c4.67-4.18,7-7.7,7-10.8C20,5.22,16.2,2,12,2z M12.42,19.5h-0.84 c-4.04-3.7-6.08-6.74-6.08-9.3c0-4.35,3.35-6.7,6.5-6.7s6.5,2.35,6.5,6.7C18.5,12.76,16.46,15.8,12.42,19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,7c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3s3-1.34,3-3C15,8.34,13.66,7,12,7z M12,11.5c-0.83,0-1.5-0.67-1.5-1.5 c0-0.83,0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5C13.5,10.83,12.83,11.5,12,11.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml
new file mode 100644
index 0000000..ebfc6e3
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml
@@ -0,0 +1,27 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21.5,4h-19L1,5.5v14L2.5,21h19l1.5-1.5v-14L21.5,4z M21.5,19.5h-19v-14h19V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 8 16 H 16 V 17 H 8 V 16 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 5 8 H 6.5 V 9.5 H 5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 5 12.5 H 6.5 V 14 H 5 V 12.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.17 8 H 10.67 V 9.5 H 9.17 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.17 12.5 H 10.67 V 14 H 9.17 V 12.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13.33 8 H 14.83 V 9.5 H 13.33 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13.33 12.5 H 14.83 V 14 H 13.33 V 12.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 17.5 8 H 19 V 9.5 H 17.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 17.5 12.5 H 19 V 14 H 17.5 V 12.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_alert.xml
new file mode 100644
index 0000000..1e25d27
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_alert.xml
@@ -0,0 +1,21 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,6.5L16.5,5H13V3h-2v2H7.5L6,6.5v11H4V19h16v-1.5h-2V6.5z M7.5,17.5v-11h9v11H7.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M6.81,3.81L5.75,2.75C3.45,4.76,2,7.71,2,11h1.5C3.5,8.13,4.79,5.55,6.81,3.81z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.25,2.75l-1.06,1.06C19.21,5.55,20.5,8.13,20.5,11H22C22,7.71,20.55,4.76,18.25,2.75z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_silence.xml
new file mode 100644
index 0000000..3f9d77a
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_silence.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 6.5 L 16.5 14.38 L 18 15.88 L 18 6.5 L 16.5 5 L 13 5 L 13 3 L 11 3 L 11 5 L 7.5 5 L 7.31 5.19 L 8.62 6.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16L6,8.12v9.38H4V19h12.88l3.96,3.96l1.06-1.06L2.1,2.1z M7.5,17.5V9.62l7.88,7.88H7.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_low.xml
new file mode 100644
index 0000000..1e43dc5
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_low.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M16.59,4H15l-1-2h-4L9,4H7.41L6,5.41v15.17L7.41,22h9.17L18,20.59V5.41L16.59,4z M16.5,20.5h-9v-15h9V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 8 H 12.75 V 15 H 11.25 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 16.5 H 12.75 V 18 H 11.25 V 16.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_saver.xml
new file mode 100644
index 0000000..e593394
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_saver.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.25 15.5 L 12.75 15.5 L 12.75 13.75 L 14.5 13.75 L 14.5 12.25 L 12.75 12.25 L 12.75 10.5 L 11.25 10.5 L 11.25 12.25 L 9.5 12.25 L 9.5 13.75 L 11.25 13.75 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.59,4H15l-1-2h-4L9,4H7.41L6,5.41v15.17L7.41,22h9.17L18,20.59V5.41L16.59,4z M16.5,20.5h-9v-15h9V20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml
new file mode 100644
index 0000000..f90366c
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,6.47L10.53,2H8.72v8.19L4,5.47L2.94,6.53L8.41,12l-5.48,5.48l1.06,1.06l4.72-4.72V22h1.81L15,17.53v-1.06L10.53,12 L15,7.53V6.47z M13.41,17l-3.19,3.19v-6.38L13.41,17z M10.22,10.19V3.81L13.41,7L10.22,10.19z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.41,6.59l-1.09,1.09c0.75,1.27,1.19,2.74,1.19,4.31s-0.44,3.05-1.19,4.31l1.09,1.09C20.41,15.85,21,13.99,21,12 S20.41,8.15,19.41,6.59z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M16.47,14.47C16.81,13.71,17,12.88,17,12s-0.19-1.71-0.53-2.47L14,12L16.47,14.47z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_cancel.xml
new file mode 100644
index 0000000..afc3de7
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_cancel.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10c5.52,0,10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5 S7.31,3.5,12,3.5c4.69,0,8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 15.47 7.47 L 12 10.94 L 8.53 7.47 L 7.47 8.53 L 10.94 12 L 7.47 15.47 L 8.53 16.53 L 12 13.06 L 15.47 16.53 L 16.53 15.47 L 13.06 12 L 16.53 8.53 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_no_sim.xml
new file mode 100644
index 0000000..77d79cc
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_no_sim.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11.62 4.5 L 17.5 4.5 L 17.5 15.38 L 19 16.88 L 19 4.5 L 17.5 3 L 11 3 L 8.06 5.94 L 9.12 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l4.9,4.9L5,9v10.5L6.5,21h11l0.69-0.69l2.65,2.65l1.06-1.06L2.1,2.1z M6.5,19.5V9.62L7,9.12L17.38,19.5 H6.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml
new file mode 100644
index 0000000..64cd534
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h1v-1.15L2.02,7.49C4.78,4.91,8.28,3.5,12,3.5 s7.22,1.41,9.98,3.99L17.53,13h1.92L23,8.61V6.38C20.11,3.67,16.24,2,12,2z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21.83 16.24 L 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml
new file mode 100644
index 0000000..c7b280b
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2l0,0v-6.58l1.09-1.09C13.43,13.13,12.77,13,12,13 c-1.18,0-2.85,0.31-4.39,1.42l-5.6-6.93C4.78,4.91,8.28,3.5,12,3.5s7.22,1.41,9.98,3.99L17.53,13h1.92L23,8.61V6.38 C20.11,3.67,16.24,2,12,2z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21.83 16.24 L 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml
new file mode 100644
index 0000000..798d5bc
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2l0,0v-6.58L14.41,13h5.04L23,8.61V6.38C20.11,3.67,16.24,2,12,2 z M18.17,12.21C16.51,10.8,14.3,10,12,10c-2.29,0-4.51,0.82-6.18,2.21L2.02,7.49C4.78,4.91,8.28,3.5,12,3.5s7.22,1.41,9.98,3.99 L18.17,12.21z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21.83 16.24 L 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml
new file mode 100644
index 0000000..e7e2b5c
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2l0,0v-6.58L14.41,13h5.04L23,8.61V6.38C20.11,3.67,16.24,2,12,2 z M19.97,9.98C17.83,8.1,14.99,7,12,7C9.01,7,6.17,8.1,4.03,9.98L2.02,7.49C4.78,4.91,8.28,3.5,12,3.5s7.22,1.41,9.98,3.99 L19.97,9.98z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21.83 16.24 L 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml
new file mode 100644
index 0000000..44d5a3d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2l0,0v-6.58L14.41,13h5.04L23,8.61V6.38C20.11,3.67,16.24,2,12,2 z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21.83 16.24 L 20.76 15.17 L 18.5 17.44 L 16.24 15.17 L 15.17 16.24 L 17.44 18.5 L 15.17 20.76 L 16.24 21.83 L 18.5 19.56 L 20.76 21.83 L 21.83 20.76 L 19.56 18.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml
new file mode 100644
index 0000000..52fd3e0df
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M12,2C7.76,2,3.89,3.67,1,6.38v2.23L11,21h2l2-2.48v-2.38l-3,3.72L2.02,7.49C4.78,4.91,8.28,3.5,12,3.5 s7.22,1.41,9.98,3.99L19.96,10h1.92L23,8.61V6.38C20.11,3.67,16.24,2,12,2z" android:strokeAlpha="0.3" android:strokeWidth="1"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.88,11c-1.57,0-3.23,0.88-3.23,2.91v0.34c0,0.1,0.05,0.16,0.16,0.16l1.18,0.06c0.1,0,0.16-0.05,0.16-0.16v-0.4 c0-1.18,0.98-1.55,1.69-1.55c0.68,0,1.66,0.34,1.66,1.52c0,1.36-1.43,1.69-2.33,2.83c-0.44,0.55-0.36,1.17-0.36,1.92 c0,0.09,0.07,0.16,0.16,0.16l1.2,0c0.1,0,0.16-0.05,0.16-0.16c0-0.66-0.07-1.04,0.26-1.41C21.4,16.25,23,15.88,23,13.83 C23,11.91,21.51,11,19.88,11z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M18.67,22h1.52c0.09,0,0.16-0.07,0.16-0.16v-1.52c0-0.09-0.07-0.16-0.16-0.16h-1.52c-0.09,0-0.16,0.07-0.16,0.16v1.52 C18.52,21.93,18.59,22,18.67,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot_delete.xml
new file mode 100644
index 0000000..f6d6253
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot_delete.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M15,4V3H9v1H4v1.5h1v14L6.5,21h11l1.5-1.5v-14h1V4H15z M17.5,19.5h-11v-14h11V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 9.5 8 H 11 V 17 H 9.5 V 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 13 8 H 14.5 V 17 H 13 V 8 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_settings.xml
new file mode 100644
index 0000000..57ccecc
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_settings.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M10.83,8L8,10.83v2.34L10.83,16h2.34L16,13.17v-2.34L13.17,8H10.83z M14.5,12.55l-1.95,1.95h-1.1L9.5,12.55v-1.1 l1.95-1.95h1.1l1.95,1.95V12.55z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.47,12.61c0.02-0.2,0.03-0.4,0.03-0.61c0-0.2-0.01-0.4-0.03-0.6l1.46-1.09l0.52-1.93l-1.59-2.75l-1.93-0.52l-1.67,0.72 c-0.33-0.23-0.69-0.43-1.05-0.6L15,3.42l-1.41-1.41h-3.17L9,3.42L8.79,5.23C8.42,5.4,8.07,5.6,7.73,5.83L6.07,5.11L4.14,5.63 L2.55,8.38l0.52,1.93l1.46,1.09C4.51,11.6,4.5,11.8,4.5,12c0,0.21,0.02,0.41,0.03,0.61L3.07,13.7l-0.52,1.93l1.59,2.75l1.93,0.52 l1.67-0.72c0.33,0.23,0.68,0.43,1.05,0.6L9,20.59L10.41,22h3.17L15,20.59l0.21-1.82c0.36-0.17,0.72-0.37,1.05-0.6l1.67,0.72 l1.93-0.52l1.59-2.75l-0.52-1.93L19.47,12.61z M18.61,17.55l-2.52-1.09c-1.16,0.8-0.92,0.66-2.27,1.31L13.5,20.5h-3l-0.32-2.73 c-1.36-0.65-1.12-0.51-2.27-1.31l-2.52,1.09l-1.5-2.6l2.2-1.63c-0.12-1.5-0.12-1.13,0-2.63l-2.2-1.64l1.5-2.6L7.9,7.54 c1.16-0.8,0.94-0.68,2.28-1.31l0.32-2.72h3l0.32,2.72c1.34,0.64,1.11,0.51,2.28,1.31l2.51-1.09l1.5,2.6l-2.2,1.64 c0.12,1.5,0.12,1.12,0,2.63l2.2,1.63L18.61,17.55z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_swap_vert.xml
new file mode 100644
index 0000000..3f61cb6
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_swap_vert.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 17.48 16.47 L 15.75 18.2 L 15.75 10 L 14.25 10 L 14.25 18.2 L 12.53 16.47 L 11.46 17.53 L 14.47 20.54 L 15.53 20.54 L 18.54 17.53 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.48 7.54 L 12.54 6.48 L 9.53 3.47 L 8.47 3.47 L 5.46 6.48 L 6.53 7.54 L 8.25 5.81 L 8.25 14 L 9.75 14 L 9.75 5.81 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml
new file mode 100644
index 0000000..30cd25e
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml
@@ -0,0 +1,23 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="16dp" android:viewportHeight="24" android:viewportWidth="24" android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 3 5.25 H 13 V 6.75 H 3 V 5.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3 17.25 H 9 V 18.75 H 3 V 17.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 5.25 L 16.5 3 L 15 3 L 15 9 L 16.5 9 L 16.5 6.75 L 21 6.75 L 21 5.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12.5 15 L 11 15 L 11 21 L 12.5 21 L 12.5 18.75 L 21 18.75 L 21 17.25 L 12.5 17.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11 11.25 H 21 V 12.75 H 11 V 11.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.5 11.25 L 3 11.25 L 3 12.75 L 7.5 12.75 L 7.5 15 L 9 15 L 9 9 L 7.5 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml
new file mode 100644
index 0000000..47693a4
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 11 8 L 11 8.88 L 12.5 10.38 L 12.5 8 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.62 2.96 L 6.66 1.81 L 5.17 3.05 L 6.24 4.12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18.41 1.31 H 19.91 V 7.31 H 18.41 V 1.31 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,5.5c4.14,0,7.5,3.36,7.5,7.5c0,1.27-0.32,2.46-0.87,3.5l1.1,1.1C20.53,16.25,21,14.68,21,13c0-4.97-4.03-9-9-9 c-1.68,0-3.25,0.47-4.6,1.28l1.1,1.1C9.54,5.82,10.73,5.5,12,5.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16l1.82,1.82L2.06,5.65l0.96,1.15l0.91-0.76L5.1,7.22C3.79,8.79,3,10.8,3,13c0,4.97,4.03,9,9,9 c2.2,0,4.21-0.79,5.78-2.1l3.06,3.06l1.06-1.06L2.1,2.1z M12,20.5c-4.14,0-7.5-3.36-7.5-7.5c0-1.78,0.63-3.42,1.67-4.71 l10.54,10.54C15.42,19.87,13.78,20.5,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml
new file mode 100644
index 0000000..e58fc88
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M14.71,10.5L17,8.21V12h0.5L20,9.5V8.8L18.21,7L20,5.21V4.49L17.5,2H17v3.79L14.71,3.5L14,4.21L16.79,7L14,9.79 L14.71,10.5z M18,3.91l0.94,0.94L18,5.79V3.91z M18,8.21l0.94,0.94L18,10.09V8.21z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M19.59,14.52l-2.83-0.44l-3.47,3.47c-2.91-1.56-5.32-3.98-6.87-6.9l3.4-3.39L9.37,4.41L7.96,3L4.41,3L3.07,4.35 c0.66,8.8,7.79,15.94,16.59,16.59L21,19.59v-3.66L19.59,14.52z M4.58,4.5l3.28,0l0.34,2.23L5.74,9.2C5.13,7.73,4.73,6.15,4.58,4.5 z M19.5,19.42c-1.67-0.15-3.28-0.56-4.78-1.18l2.56-2.55l2.22,0.34V19.42z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media.xml
new file mode 100644
index 0000000..8095944
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,3h-5.5v10h-5L6,14.5v5L7.5,21h5l1.5-1.5V7h4V3z M12.5,19.5h-5v-5h5V16h0V19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media_mute.xml
new file mode 100644
index 0000000..c27e7db
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media_mute.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 14 7 L 18 7 L 18 3 L 12.5 3 L 12.5 10.38 L 14 11.88 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16L10.88,13H7.5L6,14.5v5L7.5,21h5l1.5-1.5v-3.38l6.84,6.84l1.06-1.06L2.1,2.1z M12.5,19.5h-5v-5h4.88 l0.12,0.12L12.5,19.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml
new file mode 100644
index 0000000..5731731
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,4h-17L2,5.5v13L3.5,20h17l1.5-1.5v-13L20.5,4z M20.5,18.5h-17v-13h17V18.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 10.5 H 7.5 V 12 H 6 V 10.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 14.5 H 18 V 16 H 16.5 V 14.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 14.5 H 14 V 16 H 6 V 14.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 10 10.5 H 18 V 12 H 10 V 10.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml
new file mode 100644
index 0000000..8c4d905
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20.5 5.5 L 20.5 18.38 L 21.31 19.19 L 22 18.5 L 22 5.5 L 20.5 4 L 6.12 4 L 7.62 5.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 6 10.5 H 7.5 V 12 H 6 V 10.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16.62 14.5 L 18 15.88 L 18 14.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 10.5 L 12.62 10.5 L 14.12 12 L 18 12 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M1.04,3.16l1.65,1.65L2,5.5v13L3.5,20h14.38l2.96,2.96l1.06-1.06L2.1,2.1L1.04,3.16z M3.5,5.62l8.88,8.88H6V16h7.88 l2.5,2.5H3.5V5.62z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer.xml
new file mode 100644
index 0000000..21abb2e
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M18,17.5v-11L16.5,5H13V3h-2v2H7.5L6,6.5v11H4V19h16v-1.5H18z M7.5,17.5v-11h9v11H7.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml
new file mode 100644
index 0000000..2f90f80
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 6.5 L 16.5 14.38 L 18 15.88 L 18 6.5 L 16.5 5 L 13 5 L 13 3 L 11 3 L 11 5 L 7.5 5 L 7.31 5.19 L 8.62 6.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,22c1.1,0,2-0.9,2-2h-4C10,21.1,10.9,22,12,22z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M2.1,2.1L1.04,3.16L6,8.12v9.38H4V19h12.88l3.96,3.96l1.06-1.06L2.1,2.1z M7.5,17.5V9.62l7.88,7.88H7.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml
new file mode 100644
index 0000000..1e42d03
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml
@@ -0,0 +1,22 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="19dp" android:viewportHeight="24" android:viewportWidth="24" android:width="19dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M8.5,4L7,5.5v13L8.5,20h7l1.5-1.5v-13L15.5,4H8.5z M15.5,18.5h-7v-13h7V18.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4.5 7 H 6 V 17 H 4.5 V 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 1.5 9 H 3 V 15 H 1.5 V 9 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 18 7 H 19.5 V 17 H 18 V 7 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 21 9 H 22.5 V 15 H 21 V 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_voice.xml
new file mode 100644
index 0000000..41acbc4
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_voice.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M19.59,14.52l-2.83-0.44l-3.47,3.47c-2.91-1.56-5.32-3.98-6.87-6.9l3.4-3.39L9.37,4.41L7.96,3L4.41,3L3.07,4.35 c0.66,8.8,7.79,15.94,16.59,16.59L21,19.59v-3.66L19.59,14.52z M4.58,4.5l3.28,0l0.34,2.23L5.74,9.2C5.13,7.73,4.73,6.15,4.58,4.5z M19.5,19.42c-1.67-0.15-3.28-0.56-4.78-1.18l2.56-2.55l2.22,0.34V19.42z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml
new file mode 100644
index 0000000..c13b9af
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.59,6H16V3.41L14.59,2H9.41L8,3.41V6H3.41L2,7.41v12.17L3.41,21h17.17L22,19.59V7.41L20.59,6z M9.5,3.5h5V6h-5V3.5z M20.5,19.5h-17v-12h17V19.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12 12 C 12.8284271247 12 13.5 12.6715728753 13.5 13.5 C 13.5 14.3284271247 12.8284271247 15 12 15 C 11.1715728753 15 10.5 14.3284271247 10.5 13.5 C 10.5 12.6715728753 11.1715728753 12 12 12 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_mic_none.xml
new file mode 100644
index 0000000..b3f664a
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_mic_none.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="18dp" android:viewportHeight="24" android:viewportWidth="24" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 11 L 16.5 16.5 L 7.5 16.5 L 7.5 11 L 6 11 L 6 16.5 L 7.5 18 L 11.25 18 L 11.25 21 L 12.75 21 L 12.75 18 L 16.5 18 L 18 16.5 L 18 11 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,14c1.66,0,3-1.34,3-3V5c0-1.66-1.34-3-3-3S9,3.34,9,5v6C9,12.66,10.34,14,12,14z M10.5,5c0-0.83,0.67-1.5,1.5-1.5 s1.5,0.67,1.5,1.5v6c0,0.83-0.67,1.5-1.5,1.5s-1.5-0.67-1.5-1.5V5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml
new file mode 100644
index 0000000..202a433
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,9h-8.39C11.12,7.5,9.43,6.5,7.5,6.5C4.46,6.5,2,8.96,2,12s2.46,5.5,5.5,5.5c1.93,0,3.62-1,4.61-2.5H14v1.5l1.5,1.5 h3l1.5-1.5V15h0.5l1.5-1.5v-3L20.5,9z M20.5,13.5h-2v3h-3v-3h-4.21C11.01,13.93,9.99,16,7.5,16c-2.21,0-4-1.79-4-4s1.79-4,4-4 c2.5,0,3.5,2.06,3.79,2.5h9.21V13.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.5 10.5 C 8.32842712475 10.5 9 11.1715728753 9 12 C 9 12.8284271247 8.32842712475 13.5 7.5 13.5 C 6.67157287525 13.5 6 12.8284271247 6 12 C 6 11.1715728753 6.67157287525 10.5 7.5 10.5 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/Android.mk b/packages/overlays/IconPackVictorThemePickerOverlay/Android.mk
new file mode 100644
index 0000000..3586d0a
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackVictorThemePicker
+LOCAL_CERTIFICATE := platform
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackVictorThemePickerOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorThemePickerOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..9635feb
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.theme.icon_pack.victor.themepicker"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.google.android.apps.wallpaper" android:category="android.theme.customization.icon_pack.themepicker" android:priority="1"/>
+    <application android:label="Victor" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_add_24px.xml
new file mode 100644
index 0000000..f57b3c8
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_add_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 20 11.25 L 12.75 11.25 L 12.75 4 L 11.25 4 L 11.25 11.25 L 4 11.25 L 4 12.75 L 11.25 12.75 L 11.25 20 L 12.75 20 L 12.75 12.75 L 20 12.75 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_close_24px.xml
new file mode 100644
index 0000000..9f2a4c0
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_close_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 18.78 6.28 L 17.72 5.22 L 12 10.94 L 6.28 5.22 L 5.22 6.28 L 10.94 12 L 5.22 17.72 L 6.28 18.78 L 12 13.06 L 17.72 18.78 L 18.78 17.72 L 13.06 12 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_colorize_24px.xml
new file mode 100644
index 0000000..67db8c9
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_colorize_24px.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M21,5.07L18.93,3l-2,0l-2.44,2.44l-1.97-1.97l-1.06,1.06l1.97,1.97L3,16.94V21h4.06L17.5,10.57l1.97,1.97l1.06-1.06 l-1.97-1.97L21,7.07V5.07z M16.22,9.73L16.22,9.73L6.44,19.5H4.5v-1.94l9.77-9.77l0,0l0.22-0.22l1.94,1.95L16.22,9.73z M17.5,8.45 L15.55,6.5l2.38-2.38l1.94,1.94L17.5,8.45z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_font.xml
new file mode 100644
index 0000000..8ae51b8
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_font.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.5,2h-17L2,3.5v17L3.5,22h17l1.5-1.5v-17L20.5,2z M20.5,20.5h-17v-17h17V20.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M7.3,18h1.39c0.1,0,0.17-0.05,0.21-0.14l0.62-2.01c0.01-0.03,0.03-0.05,0.07-0.05h4.82c0.03,0,0.06,0.02,0.07,0.05 l0.62,2.01c0.03,0.09,0.1,0.14,0.21,0.14h1.41c0.1,0,0.15-0.04,0.15-0.12l-0.02-0.07L13.04,6.14C13.01,6.05,12.94,6,12.84,6h-1.71 c-0.1,0-0.17,0.05-0.21,0.14L7.16,17.81C7.13,17.94,7.17,18,7.3,18z M11.93,8.06c0.01-0.02,0.03-0.03,0.05-0.03 c0.02,0,0.04,0.01,0.05,0.03l1.99,6.36c0.01,0.02,0.01,0.04-0.01,0.06c-0.02,0.02-0.04,0.03-0.06,0.03h-3.94 c-0.02,0-0.04-0.01-0.06-0.03c-0.02-0.02-0.02-0.04-0.01-0.06L11.93,8.06z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_clock.xml
new file mode 100644
index 0000000..3ce0d62
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_clock.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 12.75 6 L 11.25 6 L 11.25 12.31 L 14.47 15.53 L 15.53 14.47 L 12.75 11.69 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10c5.52,0,10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5 S7.31,3.5,12,3.5c4.69,0,8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_grid.xml
new file mode 100644
index 0000000..41721f0
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_grid.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M22,6.5V5h-3V2h-1.5v3h-4.75V2h-1.5v3H6.5V2H5v3H2v1.5h3v4.75H2v1.5h3v4.75H2V19h3v3h1.5v-3h4.75v3h1.5v-3h4.75v3H19v-3h3 v-1.5h-3v-4.75h3v-1.5h-3V6.5H22z M6.5,6.5h4.75v4.75H6.5V6.5z M6.5,17.5v-4.75h4.75v4.75H6.5z M17.5,17.5h-4.75v-4.75h4.75V17.5z M17.5,11.25h-4.75V6.5h4.75V11.25z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_theme.xml
new file mode 100644
index 0000000..17228ce
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_theme.xml
@@ -0,0 +1,18 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M17.59,2H6.41L5,3.41v10.17L6.41,15H9v5.59L10.41,22h3.17L15,20.59V15h2.59L19,13.59V3.41L17.59,2z M9.25,3.5V6h1.5V3.5 h2.5V6h1.5V3.5h2.75v5.75h-11V3.5H9.25z M13.5,13.5v7h-3v-7h-4v-2.75h11v2.75H13.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml
new file mode 100644
index 0000000..e5fbf29
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml
@@ -0,0 +1,23 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 19.5 3 L 12.75 3 L 12.75 4.5 L 19.5 4.5 L 19.5 11.25 L 21 11.25 L 21 4.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4.5 4.5 L 11.25 4.5 L 11.25 3 L 4.5 3 L 3 4.5 L 3 11.25 L 4.5 11.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 19.5 19.5 L 12.75 19.5 L 12.75 21 L 19.5 21 L 21 19.5 L 21 12.75 L 19.5 12.75 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 4.5 12.75 L 3 12.75 L 3 19.5 L 4.5 21 L 11.25 21 L 11.25 19.5 L 4.5 19.5 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11.14 15.29 L 9 12.71 L 6 16.57 L 18 16.57 L 14.14 11.42 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16 7 C 16.5522847498 7 17 7.44771525017 17 8 C 17 8.55228474983 16.5522847498 9 16 9 C 15.4477152502 9 15 8.55228474983 15 8 C 15 7.44771525017 15.4477152502 7 16 7 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_shapes_24px.xml
new file mode 100644
index 0000000..00b2c7e
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_shapes_24px.xml
@@ -0,0 +1,19 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M20.59,9H17c0,0.51-0.05,1.01-0.14,1.5h3.64v10h-11v-2.64C9.01,17.95,8.51,18,8,18v2.59L9.41,22h11.17L22,20.59V10.41 L20.59,9z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M15,9c0-3.86-3.14-7-7-7C4.14,2,1,5.14,1,9s3.14,7,7,7C11.86,16,15,12.86,15,9z M8,14.5c-3.03,0-5.5-2.47-5.5-5.5 c0-3.03,2.47-5.5,5.5-5.5c3.03,0,5.5,2.47,5.5,5.5C13.5,12.03,11.03,14.5,8,14.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_tune.xml
new file mode 100644
index 0000000..f660890
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_tune.xml
@@ -0,0 +1,23 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="20dp" android:viewportHeight="24" android:viewportWidth="24" android:width="20dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M 3 5.25 H 13 V 6.75 H 3 V 5.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 3 17.25 H 9 V 18.75 H 3 V 17.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 16.5 5.25 L 16.5 3 L 15 3 L 15 9 L 16.5 9 L 16.5 6.75 L 21 6.75 L 21 5.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 12.5 15 L 11 15 L 11 21 L 12.5 21 L 12.5 18.75 L 21 18.75 L 21 17.25 L 12.5 17.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 11 11.25 H 21 V 12.75 H 11 V 11.25 Z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M 7.5 11.25 L 3 11.25 L 3 12.75 L 7.5 12.75 L 7.5 15 L 9 15 L 9 9 L 7.5 9 Z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_wifi_24px.xml
new file mode 100644
index 0000000..9aa5224
--- /dev/null
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_wifi_24px.xml
@@ -0,0 +1,20 @@
+<!--
+   Copyright (C) 2020 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+  <path android:fillColor="@android:color/white" android:pathData="M12,4.5c-4.29,0-8.17,1.72-11.01,4.49l1.42,1.42C4.89,8,8.27,6.5,12,6.5c3.73,0,7.11,1.5,9.59,3.91l1.42-1.42 C20.17,6.22,16.29,4.5,12,4.5z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M4.93,12.93l1.42,1.42C7.79,12.9,9.79,12,12,12s4.21,0.9,5.65,2.35l1.42-1.42C17.26,11.12,14.76,10,12,10 S6.74,11.12,4.93,12.93z"/>
+  <path android:fillColor="@android:color/white" android:pathData="M9.06,17.06L12,20l2.94-2.94c-0.73-0.8-1.77-1.31-2.94-1.31S9.79,16.26,9.06,17.06z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/overlays/IconShapeHexagonOverlay/AndroidManifest.xml b/packages/overlays/IconShapeHexagonOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/overlays/IconShapeHexagonOverlay/AndroidManifest.xml
diff --git a/packages/overlays/OWNERS b/packages/overlays/OWNERS
new file mode 100644
index 0000000..afb98d4
--- /dev/null
+++ b/packages/overlays/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/content/om/OWNERS
diff --git a/packages/services/PacProcessor/OWNERS b/packages/services/PacProcessor/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/packages/services/PacProcessor/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/packages/services/Proxy/OWNERS b/packages/services/Proxy/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/packages/services/Proxy/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/proto/src/OWNERS b/proto/src/OWNERS
new file mode 100644
index 0000000..e7ddf86
--- /dev/null
+++ b/proto/src/OWNERS
@@ -0,0 +1,2 @@
+per-file gnss.proto = file:/services/core/java/com/android/server/location/OWNERS
+per-file wifi.proto = file:/wifi/OWNERS
diff --git a/proto/src/metrics_constants/metrics_constants.proto b/proto/src/metrics_constants/metrics_constants.proto
index b0e401b..3f712dd 100644
--- a/proto/src/metrics_constants/metrics_constants.proto
+++ b/proto/src/metrics_constants/metrics_constants.proto
@@ -3706,33 +3706,40 @@
     // OS: O
     BACKUP_SETTINGS = 818;
 
+    // DEPRECATED: The metrics has been migrated to UiEvent per go/uievent.
     // ACTION: Picture-in-picture was explicitly entered for an activity
     // VALUE: true if it was entered while hiding as a result of moving to
     // another task, false otherwise
-    ACTION_PICTURE_IN_PICTURE_ENTERED = 819;
+    ACTION_PICTURE_IN_PICTURE_ENTERED = 819 [deprecated=true];
 
+    // DEPRECATED: The metrics has been migrated to UiEvent per go/uievent.
     // ACTION: The activity currently in picture-in-picture was expanded back to fullscreen
     // PACKAGE: The package name of the activity that was expanded back to fullscreen
-    ACTION_PICTURE_IN_PICTURE_EXPANDED_TO_FULLSCREEN = 820;
+    ACTION_PICTURE_IN_PICTURE_EXPANDED_TO_FULLSCREEN = 820 [deprecated=true];
 
+    // DEPRECATED: The metrics no longer used after migration to UiEvent per go/uievent.
     // ACTION: The activity currently in picture-in-picture was minimized
     // VALUE: True if the PiP was minimized, false otherwise
-    ACTION_PICTURE_IN_PICTURE_MINIMIZED = 821;
+    ACTION_PICTURE_IN_PICTURE_MINIMIZED = 821 [deprecated=true];
 
+    // DEPRECATED: The metrics has been migrated to UiEvent per go/uievent.
     // ACTION: Picture-in-picture was dismissed via the dismiss button
     // VALUE: 0 if dismissed by tap, 1 if dismissed by drag
-    ACTION_PICTURE_IN_PICTURE_DISMISSED = 822;
+    ACTION_PICTURE_IN_PICTURE_DISMISSED = 822 [deprecated=true];
 
-    // ACTION: The visibility of the picture-in-picture meny
+    // DEPRECATED: The metrics has been migrated to UiEvent per go/uievent.
+    // ACTION: The visibility of the picture-in-picture menu
     // VALUE: Whether or not the menu is visible
-    ACTION_PICTURE_IN_PICTURE_MENU = 823;
+    ACTION_PICTURE_IN_PICTURE_MENU = 823 [deprecated=true];
 
+    // DEPRECATED: The metrics has been migrated to UiEvent per go/uievent.
     // Enclosing category for group of PICTURE_IN_PICTURE_ASPECT_RATIO_FOO events,
     // logged when the aspect ratio changes
-    ACTION_PICTURE_IN_PICTURE_ASPECT_RATIO_CHANGED = 824;
+    ACTION_PICTURE_IN_PICTURE_ASPECT_RATIO_CHANGED = 824 [deprecated=true];
 
+    // DEPRECATED: The metrics no longer used after migration to UiEvent per go/uievent.
     // The current aspect ratio of the PiP, logged when it changes.
-    PICTURE_IN_PICTURE_ASPECT_RATIO = 825;
+    PICTURE_IN_PICTURE_ASPECT_RATIO = 825 [deprecated=true];
 
     // FIELD - length in dp of ACTION_LS_* gestures, or zero if not applicable
     // CATEGORY: GLOBAL_SYSTEM_UI
diff --git a/samples/training/network-usage/OWNERS b/samples/training/network-usage/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/samples/training/network-usage/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/services/OWNERS b/services/OWNERS
new file mode 100644
index 0000000..88d0b61
--- /dev/null
+++ b/services/OWNERS
@@ -0,0 +1 @@
+per-file Android.bp = file:platform/build/soong:/OWNERS
diff --git a/services/accessibility/java/com/android/server/accessibility/AbstractAccessibilityServiceConnection.java b/services/accessibility/java/com/android/server/accessibility/AbstractAccessibilityServiceConnection.java
index 6b852ad..40a2816 100644
--- a/services/accessibility/java/com/android/server/accessibility/AbstractAccessibilityServiceConnection.java
+++ b/services/accessibility/java/com/android/server/accessibility/AbstractAccessibilityServiceConnection.java
@@ -90,6 +90,7 @@
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
+import java.util.NoSuchElementException;
 import java.util.Set;
 
 /**
@@ -1179,7 +1180,11 @@
                 /* ignore */
         }
         if (mService != null) {
-            mService.unlinkToDeath(this, 0);
+            try {
+                mService.unlinkToDeath(this, 0);
+            } catch (NoSuchElementException e) {
+                Slog.e(LOG_TAG, "Failed unregistering death link");
+            }
             mService = null;
         }
 
diff --git a/services/api/OWNERS b/services/api/OWNERS
new file mode 100644
index 0000000..a609390
--- /dev/null
+++ b/services/api/OWNERS
@@ -0,0 +1,4 @@
+per-file Android.bp = file:platform/build/soong:/OWNERS
+
+# API changes are managed via Prolog rules, not OWNERS
+*
diff --git a/services/appprediction/OWNERS b/services/appprediction/OWNERS
new file mode 100644
index 0000000..3a5d23d
--- /dev/null
+++ b/services/appprediction/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/appprediction/OWNERS
diff --git a/services/appprediction/java/com/android/server/appprediction/AppPredictionManagerService.java b/services/appprediction/java/com/android/server/appprediction/AppPredictionManagerService.java
index 1c4db12..59ba82e 100644
--- a/services/appprediction/java/com/android/server/appprediction/AppPredictionManagerService.java
+++ b/services/appprediction/java/com/android/server/appprediction/AppPredictionManagerService.java
@@ -34,6 +34,7 @@
 import android.content.Context;
 import android.content.pm.ParceledListSlice;
 import android.os.Binder;
+import android.os.IBinder;
 import android.os.ResultReceiver;
 import android.os.ShellCallback;
 import android.util.Slog;
@@ -108,9 +109,9 @@
 
         @Override
         public void createPredictionSession(@NonNull AppPredictionContext context,
-                @NonNull AppPredictionSessionId sessionId) {
-            runForUserLocked("createPredictionSession", sessionId,
-                    (service) -> service.onCreatePredictionSessionLocked(context, sessionId));
+                @NonNull AppPredictionSessionId sessionId, @NonNull IBinder token) {
+            runForUserLocked("createPredictionSession", sessionId, (service) ->
+                    service.onCreatePredictionSessionLocked(context, sessionId, token));
         }
 
         @Override
diff --git a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
index 7ee607c..735f420 100644
--- a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
+++ b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
@@ -30,6 +30,7 @@
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ParceledListSlice;
 import android.content.pm.ServiceInfo;
+import android.os.IBinder;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
 import android.provider.DeviceConfig;
@@ -44,8 +45,6 @@
 import com.android.server.infra.AbstractPerUserSystemService;
 import com.android.server.people.PeopleServiceInternal;
 
-import java.util.function.Consumer;
-
 /**
  * Per-user instance of {@link AppPredictionManagerService}.
  */
@@ -112,17 +111,24 @@
      */
     @GuardedBy("mLock")
     public void onCreatePredictionSessionLocked(@NonNull AppPredictionContext context,
-            @NonNull AppPredictionSessionId sessionId) {
-        if (!mSessionInfos.containsKey(sessionId)) {
-            mSessionInfos.put(sessionId, new AppPredictionSessionInfo(sessionId, context,
-                    DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI,
-                            PREDICT_USING_PEOPLE_SERVICE_PREFIX + context.getUiSurface(), false),
-                    this::removeAppPredictionSessionInfo));
-        }
-        final boolean serviceExists = resolveService(sessionId, s ->
-                s.onCreatePredictionSession(context, sessionId), true);
-        if (!serviceExists) {
-            mSessionInfos.remove(sessionId);
+            @NonNull AppPredictionSessionId sessionId, @NonNull IBinder token) {
+        final boolean usesPeopleService = DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI,
+                PREDICT_USING_PEOPLE_SERVICE_PREFIX + context.getUiSurface(), false);
+        final boolean serviceExists = resolveService(sessionId, false,
+                usesPeopleService, s -> s.onCreatePredictionSession(context, sessionId));
+        if (serviceExists && !mSessionInfos.containsKey(sessionId)) {
+            final AppPredictionSessionInfo sessionInfo = new AppPredictionSessionInfo(
+                    sessionId, context, usesPeopleService, token, () -> {
+                synchronized (mLock) {
+                    onDestroyPredictionSessionLocked(sessionId);
+                }
+            });
+            if (sessionInfo.linkToDeath()) {
+                mSessionInfos.put(sessionId, sessionInfo);
+            } else {
+                // destroy the session if calling process is already dead
+                onDestroyPredictionSessionLocked(sessionId);
+            }
         }
     }
 
@@ -132,7 +138,10 @@
     @GuardedBy("mLock")
     public void notifyAppTargetEventLocked(@NonNull AppPredictionSessionId sessionId,
             @NonNull AppTargetEvent event) {
-        resolveService(sessionId, s -> s.notifyAppTargetEvent(sessionId, event), false);
+        final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
+        if (sessionInfo == null) return;
+        resolveService(sessionId, false, sessionInfo.mUsesPeopleService,
+                s -> s.notifyAppTargetEvent(sessionId, event));
     }
 
     /**
@@ -141,8 +150,10 @@
     @GuardedBy("mLock")
     public void notifyLaunchLocationShownLocked(@NonNull AppPredictionSessionId sessionId,
             @NonNull String launchLocation, @NonNull ParceledListSlice targetIds) {
-        resolveService(sessionId, s ->
-                s.notifyLaunchLocationShown(sessionId, launchLocation, targetIds), false);
+        final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
+        if (sessionInfo == null) return;
+        resolveService(sessionId, false, sessionInfo.mUsesPeopleService,
+                s -> s.notifyLaunchLocationShown(sessionId, launchLocation, targetIds));
     }
 
     /**
@@ -151,7 +162,10 @@
     @GuardedBy("mLock")
     public void sortAppTargetsLocked(@NonNull AppPredictionSessionId sessionId,
             @NonNull ParceledListSlice targets, @NonNull IPredictionCallback callback) {
-        resolveService(sessionId, s -> s.sortAppTargets(sessionId, targets, callback), true);
+        final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
+        if (sessionInfo == null) return;
+        resolveService(sessionId, true, sessionInfo.mUsesPeopleService,
+                s -> s.sortAppTargets(sessionId, targets, callback));
     }
 
     /**
@@ -160,10 +174,12 @@
     @GuardedBy("mLock")
     public void registerPredictionUpdatesLocked(@NonNull AppPredictionSessionId sessionId,
             @NonNull IPredictionCallback callback) {
-        final boolean serviceExists = resolveService(sessionId, s ->
-                s.registerPredictionUpdates(sessionId, callback), false);
         final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
-        if (serviceExists && sessionInfo != null) {
+        if (sessionInfo == null) return;
+        final boolean serviceExists = resolveService(sessionId, false,
+                sessionInfo.mUsesPeopleService,
+                s -> s.registerPredictionUpdates(sessionId, callback));
+        if (serviceExists) {
             sessionInfo.addCallbackLocked(callback);
         }
     }
@@ -174,10 +190,12 @@
     @GuardedBy("mLock")
     public void unregisterPredictionUpdatesLocked(@NonNull AppPredictionSessionId sessionId,
             @NonNull IPredictionCallback callback) {
-        final boolean serviceExists = resolveService(sessionId, s ->
-                s.unregisterPredictionUpdates(sessionId, callback), false);
         final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
-        if (serviceExists && sessionInfo != null) {
+        if (sessionInfo == null) return;
+        final boolean serviceExists = resolveService(sessionId, false,
+                sessionInfo.mUsesPeopleService,
+                s -> s.unregisterPredictionUpdates(sessionId, callback));
+        if (serviceExists) {
             sessionInfo.removeCallbackLocked(callback);
         }
     }
@@ -187,7 +205,10 @@
      */
     @GuardedBy("mLock")
     public void requestPredictionUpdateLocked(@NonNull AppPredictionSessionId sessionId) {
-        resolveService(sessionId, s -> s.requestPredictionUpdate(sessionId), true);
+        final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
+        if (sessionInfo == null) return;
+        resolveService(sessionId, true, sessionInfo.mUsesPeopleService,
+                s -> s.requestPredictionUpdate(sessionId));
     }
 
     /**
@@ -195,12 +216,14 @@
      */
     @GuardedBy("mLock")
     public void onDestroyPredictionSessionLocked(@NonNull AppPredictionSessionId sessionId) {
-        final boolean serviceExists = resolveService(sessionId, s ->
-                s.onDestroyPredictionSession(sessionId), false);
-        final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
-        if (serviceExists && sessionInfo != null) {
-            sessionInfo.destroy();
+        if (isDebug()) {
+            Slog.d(TAG, "onDestroyPredictionSessionLocked(): sessionId=" + sessionId);
         }
+        final AppPredictionSessionInfo sessionInfo = mSessionInfos.remove(sessionId);
+        if (sessionInfo == null) return;
+        resolveService(sessionId, false, sessionInfo.mUsesPeopleService,
+                s -> s.onDestroyPredictionSession(sessionId));
+        sessionInfo.destroy();
     }
 
     @Override
@@ -291,27 +314,18 @@
         }
 
         for (AppPredictionSessionInfo sessionInfo : mSessionInfos.values()) {
-            sessionInfo.resurrectSessionLocked(this);
-        }
-    }
-
-    private void removeAppPredictionSessionInfo(AppPredictionSessionId sessionId) {
-        if (isDebug()) {
-            Slog.d(TAG, "removeAppPredictionSessionInfo(): sessionId=" + sessionId);
-        }
-        synchronized (mLock) {
-            mSessionInfos.remove(sessionId);
+            sessionInfo.resurrectSessionLocked(this, sessionInfo.mToken);
         }
     }
 
     @GuardedBy("mLock")
     @Nullable
-    protected boolean resolveService(@NonNull final AppPredictionSessionId sessionId,
-            @NonNull final AbstractRemoteService.AsyncRequest<IPredictionService> cb,
-            boolean sendImmediately) {
-        final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
-        if (sessionInfo == null) return false;
-        if (sessionInfo.mUsesPeopleService) {
+    protected boolean resolveService(
+            @NonNull final AppPredictionSessionId sessionId,
+            boolean sendImmediately,
+            boolean usesPeopleService,
+            @NonNull final AbstractRemoteService.AsyncRequest<IPredictionService> cb) {
+        if (usesPeopleService) {
             final IPredictionService service =
                     LocalServices.getService(PeopleServiceInternal.class);
             if (service != null) {
@@ -368,7 +382,9 @@
         private final AppPredictionContext mPredictionContext;
         private final boolean mUsesPeopleService;
         @NonNull
-        private final Consumer<AppPredictionSessionId> mRemoveSessionInfoAction;
+        final IBinder mToken;
+        @NonNull
+        final IBinder.DeathRecipient mDeathRecipient;
 
         private final RemoteCallbackList<IPredictionCallback> mCallbacks =
                 new RemoteCallbackList<IPredictionCallback>() {
@@ -388,14 +404,16 @@
                 @NonNull final AppPredictionSessionId id,
                 @NonNull final AppPredictionContext predictionContext,
                 final boolean usesPeopleService,
-                @NonNull final Consumer<AppPredictionSessionId> removeSessionInfoAction) {
+                @NonNull final IBinder token,
+                @NonNull final IBinder.DeathRecipient deathRecipient) {
             if (DEBUG) {
                 Slog.d(TAG, "Creating AppPredictionSessionInfo for session Id=" + id);
             }
             mSessionId = id;
             mPredictionContext = predictionContext;
             mUsesPeopleService = usesPeopleService;
-            mRemoveSessionInfoAction = removeSessionInfoAction;
+            mToken = token;
+            mDeathRecipient = deathRecipient;
         }
 
         void addCallbackLocked(IPredictionCallback callback) {
@@ -414,23 +432,38 @@
             mCallbacks.unregister(callback);
         }
 
+        boolean linkToDeath() {
+            try {
+                mToken.linkToDeath(mDeathRecipient, 0);
+            } catch (RemoteException e) {
+                if (DEBUG) {
+                    Slog.w(TAG, "Caller is dead before session can be started, sessionId: "
+                            + mSessionId);
+                }
+                return false;
+            }
+            return true;
+        }
+
         void destroy() {
             if (DEBUG) {
                 Slog.d(TAG, "Removing all callbacks for session Id=" + mSessionId
                         + " and " + mCallbacks.getRegisteredCallbackCount() + " callbacks.");
             }
+            if (mToken != null) {
+                mToken.unlinkToDeath(mDeathRecipient, 0);
+            }
             mCallbacks.kill();
-            mRemoveSessionInfoAction.accept(mSessionId);
         }
 
-        void resurrectSessionLocked(AppPredictionPerUserService service) {
+        void resurrectSessionLocked(AppPredictionPerUserService service, IBinder token) {
             int callbackCount = mCallbacks.getRegisteredCallbackCount();
             if (DEBUG) {
                 Slog.d(TAG, "Resurrecting remote service (" + service.getRemoteServiceLocked()
                         + ") for session Id=" + mSessionId + " and "
                         + callbackCount + " callbacks.");
             }
-            service.onCreatePredictionSessionLocked(mPredictionContext, mSessionId);
+            service.onCreatePredictionSessionLocked(mPredictionContext, mSessionId, token);
             mCallbacks.broadcast(
                     callback -> service.registerPredictionUpdatesLocked(mSessionId, callback));
         }
diff --git a/services/autofill/OWNERS b/services/autofill/OWNERS
new file mode 100644
index 0000000..c52751d
--- /dev/null
+++ b/services/autofill/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/autofill/OWNERS
diff --git a/services/autofill/java/com/android/server/autofill/RemoteFillService.java b/services/autofill/java/com/android/server/autofill/RemoteFillService.java
index 5a9320f..b0755ac 100644
--- a/services/autofill/java/com/android/server/autofill/RemoteFillService.java
+++ b/services/autofill/java/com/android/server/autofill/RemoteFillService.java
@@ -161,8 +161,9 @@
 
                 @Override
                 public void onFailure(int requestId, CharSequence message) {
+                    String errorMessage = message == null ? "" : String.valueOf(message);
                     fillRequest.completeExceptionally(
-                            new RuntimeException(String.valueOf(message)));
+                            new RuntimeException(errorMessage));
                 }
             });
             return fillRequest;
diff --git a/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java b/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java
index 5e10916..a4e58a1 100644
--- a/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java
+++ b/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java
@@ -649,16 +649,33 @@
         mReporter.onStartPackageBackup(PM_PACKAGE);
         mCurrentPackage = new PackageInfo();
         mCurrentPackage.packageName = PM_PACKAGE;
-
         try {
-            extractPmAgentData(mCurrentPackage);
+            // If we can't even extractPmAgentData(), then we treat the local state as
+            // compromised, just in case. This means that we will clear data and will
+            // start from a clean slate in the next attempt. It's not clear whether that's
+            // the right thing to do, but matches what we have historically done.
+            try {
+                extractPmAgentData(mCurrentPackage);
+            } catch (TaskException e) {
+                throw TaskException.stateCompromised(e); // force stateCompromised
+            }
+            // During sendDataToTransport, we generally trust any thrown TaskException
+            // about whether stateCompromised because those are likely transient;
+            // clearing state for those would have the potential to lead to cascading
+            // failures, as discussed in http://b/144030477.
+            // For specific status codes (e.g. TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED),
+            // cleanUpAgentForTransportStatus() or theoretically handleTransportStatus()
+            // still have the opportunity to perform additional clean-up tasks.
             int status = sendDataToTransport(mCurrentPackage);
             cleanUpAgentForTransportStatus(status);
         } catch (AgentException | TaskException e) {
             mReporter.onExtractPmAgentDataError(e);
             cleanUpAgentForError(e);
-            // PM agent failure is task failure.
-            throw TaskException.stateCompromised(e);
+            if (e instanceof TaskException) {
+                throw (TaskException) e;
+            } else {
+                throw TaskException.stateCompromised(e); // PM agent failure is task failure.
+            }
         }
     }
 
diff --git a/services/contentcapture/OWNERS b/services/contentcapture/OWNERS
new file mode 100644
index 0000000..a28e00a
--- /dev/null
+++ b/services/contentcapture/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/contentcapture/OWNERS
diff --git a/services/contentsuggestions/OWNERS b/services/contentsuggestions/OWNERS
new file mode 100644
index 0000000..449db3a
--- /dev/null
+++ b/services/contentsuggestions/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/contentsuggestions/OWNERS
diff --git a/services/core/OWNERS b/services/core/OWNERS
new file mode 100644
index 0000000..88d0b61
--- /dev/null
+++ b/services/core/OWNERS
@@ -0,0 +1 @@
+per-file Android.bp = file:platform/build/soong:/OWNERS
diff --git a/services/core/java/android/os/UserManagerInternal.java b/services/core/java/android/os/UserManagerInternal.java
index fbe8c04..3898348 100644
--- a/services/core/java/android/os/UserManagerInternal.java
+++ b/services/core/java/android/os/UserManagerInternal.java
@@ -227,6 +227,14 @@
     public abstract @NonNull List<UserInfo> getUsers(boolean excludeDying);
 
     /**
+     * Internal implementation of getUsers does not check permissions.
+     * This improves performance for calls from inside system server which already have permissions
+     * checked.
+     */
+    public abstract @NonNull List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying,
+            boolean excludePreCreated);
+
+    /**
      * Checks if the {@code callingUserId} and {@code targetUserId} are same or in same group
      * and that the {@code callingUserId} is not a profile and {@code targetUserId} is enabled.
      *
diff --git a/services/core/java/com/android/server/BluetoothAirplaneModeListener.java b/services/core/java/com/android/server/BluetoothAirplaneModeListener.java
index 4d9680c..aa56da5 100644
--- a/services/core/java/com/android/server/BluetoothAirplaneModeListener.java
+++ b/services/core/java/com/android/server/BluetoothAirplaneModeListener.java
@@ -119,7 +119,9 @@
             }
             return;
         }
-        mAirplaneHelper.onAirplaneModeChanged(mBluetoothManager);
+        if (mAirplaneHelper != null) {
+            mAirplaneHelper.onAirplaneModeChanged(mBluetoothManager);
+        }
     }
 
     @VisibleForTesting
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index e919f39..aab0553 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -97,6 +97,8 @@
 
     private static final String BLUETOOTH_ADMIN_PERM = android.Manifest.permission.BLUETOOTH_ADMIN;
     private static final String BLUETOOTH_PERM = android.Manifest.permission.BLUETOOTH;
+    private static final String BLUETOOTH_PRIVILEGED =
+            android.Manifest.permission.BLUETOOTH_PRIVILEGED;
 
     private static final String SECURE_SETTINGS_BLUETOOTH_ADDR_VALID = "bluetooth_addr_valid";
     private static final String SECURE_SETTINGS_BLUETOOTH_ADDRESS = "bluetooth_address";
@@ -296,6 +298,9 @@
     }
 
     public boolean onFactoryReset() {
+        mContext.enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED,
+                "Need BLUETOOTH_PRIVILEGED permission");
+
         // Wait for stable state if bluetooth is temporary state.
         int state = getState();
         if (state == BluetoothAdapter.STATE_BLE_TURNING_ON
@@ -1260,7 +1265,7 @@
     @Override
     public boolean bindBluetoothProfileService(int bluetoothProfile,
             IBluetoothProfileServiceConnection proxy) {
-        if (!mEnable) {
+        if (mState != BluetoothAdapter.STATE_ON) {
             if (DBG) {
                 Slog.d(TAG, "Trying to bind to profile: " + bluetoothProfile
                         + ", while Bluetooth was disabled");
@@ -1426,7 +1431,7 @@
                 mBluetoothLock.readLock().unlock();
             }
 
-            if (!mEnable || state != BluetoothAdapter.STATE_ON) {
+            if (state != BluetoothAdapter.STATE_ON) {
                 if (DBG) {
                     Slog.d(TAG, "Unable to bindService while Bluetooth is disabled");
                 }
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index f7de5c0..4590aa2 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -41,6 +41,7 @@
 import static android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_FOREGROUND;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING;
@@ -128,6 +129,7 @@
 import android.net.SocketKeepalive;
 import android.net.TetheringManager;
 import android.net.UidRange;
+import android.net.UidRangeParcel;
 import android.net.Uri;
 import android.net.VpnManager;
 import android.net.VpnService;
@@ -170,7 +172,6 @@
 import android.util.LocalLog;
 import android.util.Log;
 import android.util.Pair;
-import android.util.Slog;
 import android.util.SparseArray;
 import android.util.SparseIntArray;
 import android.util.Xml;
@@ -186,7 +187,6 @@
 import com.android.internal.net.VpnProfile;
 import com.android.internal.util.ArrayUtils;
 import com.android.internal.util.AsyncChannel;
-import com.android.internal.util.DumpUtils;
 import com.android.internal.util.IndentingPrintWriter;
 import com.android.internal.util.LocationPermissionChecker;
 import com.android.internal.util.MessageUtils;
@@ -1287,7 +1287,7 @@
         if (network == null) {
             return null;
         }
-        return getNetworkAgentInfoForNetId(network.netId);
+        return getNetworkAgentInfoForNetId(network.getNetId());
     }
 
     private NetworkAgentInfo getNetworkAgentInfoForNetId(int netId) {
@@ -1378,7 +1378,7 @@
         }
         final String action = blocked ? "BLOCKED" : "UNBLOCKED";
         mNetworkInfoBlockingLogs.log(String.format(
-                "%s %d(%d) on netId %d", action, nri.mUid, nri.request.requestId, net.netId));
+                "%s %d(%d) on netId %d", action, nri.mUid, nri.request.requestId, net.getNetId()));
     }
 
     /**
@@ -1890,7 +1890,7 @@
             int netId;
             synchronized (nai) {
                 lp = nai.linkProperties;
-                netId = nai.network.netId;
+                netId = nai.network.getNetId();
             }
             boolean ok = addLegacyRouteToHost(lp, addr, netId, uid);
             if (DBG) log("requestRouteToHostAddress ok=" + ok);
@@ -1972,7 +1972,7 @@
     private void registerNetdEventCallback() {
         final IIpConnectivityMetrics ipConnectivityMetrics = mDeps.getIpConnectivityMetrics();
         if (ipConnectivityMetrics == null) {
-            Slog.wtf(TAG, "Missing IIpConnectivityMetrics");
+            Log.wtf(TAG, "Missing IIpConnectivityMetrics");
             return;
         }
 
@@ -2438,7 +2438,7 @@
             if (VDBG || DDBG) log("Setting MTU size: " + iface + ", " + mtu);
             mNetd.interfaceSetMtu(iface, mtu);
         } catch (RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "exception in interfaceSetMtu()" + e);
+            loge("exception in interfaceSetMtu()" + e);
         }
     }
 
@@ -2460,7 +2460,7 @@
         if (tcpBufferSizes.equals(mCurrentTcpBufferSizes)) return;
 
         try {
-            if (VDBG || DDBG) Slog.d(TAG, "Setting tx/rx TCP buffers to " + tcpBufferSizes);
+            if (VDBG || DDBG) log("Setting tx/rx TCP buffers to " + tcpBufferSizes);
 
             String rmemValues = String.join(" ", values[0], values[1], values[2]);
             String wmemValues = String.join(" ", values[3], values[4], values[5]);
@@ -2525,9 +2525,21 @@
         PriorityDump.dump(mPriorityDumper, fd, writer, args);
     }
 
+    private boolean checkDumpPermission(Context context, String tag, PrintWriter pw) {
+        if (context.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
+                != PackageManager.PERMISSION_GRANTED) {
+            pw.println("Permission Denial: can't dump " + tag + " from from pid="
+                    + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()
+                    + " due to missing android.permission.DUMP permission");
+            return false;
+        } else {
+            return true;
+        }
+    }
+
     private void doDump(FileDescriptor fd, PrintWriter writer, String[] args, boolean asProto) {
         final IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
-        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
+        if (!checkDumpPermission(mContext, TAG, pw)) return;
         if (asProto) return;
 
         if (ArrayUtils.contains(args, DIAG_ARG)) {
@@ -2553,7 +2565,7 @@
         if (defaultNai == null) {
             pw.println("none");
         } else {
-            pw.println(defaultNai.network.netId);
+            pw.println(defaultNai.network.getNetId());
         }
         pw.println();
 
@@ -2690,7 +2702,7 @@
     private NetworkAgentInfo[] networksSortedById() {
         NetworkAgentInfo[] networks = new NetworkAgentInfo[0];
         networks = mNetworkAgentInfos.values().toArray(networks);
-        Arrays.sort(networks, Comparator.comparingInt(nai -> nai.network.netId));
+        Arrays.sort(networks, Comparator.comparingInt(nai -> nai.network.getNetId()));
         return networks;
     }
 
@@ -2761,7 +2773,7 @@
                 case NetworkAgent.EVENT_NETWORK_CAPABILITIES_CHANGED: {
                     NetworkCapabilities networkCapabilities = (NetworkCapabilities) msg.obj;
                     if (networkCapabilities.hasConnectivityManagedCapability()) {
-                        Slog.wtf(TAG, "BUG: " + nai + " has CS-managed capability.");
+                        Log.wtf(TAG, "BUG: " + nai + " has CS-managed capability.");
                     }
                     if (networkCapabilities.hasTransport(TRANSPORT_TEST)) {
                         // Make sure the original object is not mutated. NetworkAgent normally
@@ -2771,6 +2783,7 @@
                         networkCapabilities = new NetworkCapabilities(networkCapabilities);
                         networkCapabilities.restrictCapabilitesForTestNetwork(nai.creatorUid);
                     }
+                    processCapabilitiesFromAgent(nai, networkCapabilities);
                     updateCapabilities(nai.getCurrentScore(), nai, networkCapabilities);
                     break;
                 }
@@ -2809,6 +2822,32 @@
                     mKeepaliveTracker.handleEventSocketKeepalive(nai, msg);
                     break;
                 }
+                case NetworkAgent.EVENT_UNDERLYING_NETWORKS_CHANGED: {
+                    // TODO: prevent loops, e.g., if a network declares itself as underlying.
+                    if (!nai.supportsUnderlyingNetworks()) {
+                        Log.wtf(TAG, "Non-virtual networks cannot have underlying networks");
+                        break;
+                    }
+                    final ArrayList<Network> underlying;
+                    try {
+                        underlying = ((Bundle) msg.obj).getParcelableArrayList(
+                                NetworkAgent.UNDERLYING_NETWORKS_KEY);
+                    } catch (NullPointerException | ClassCastException e) {
+                        break;
+                    }
+                    final Network[] oldUnderlying = nai.declaredUnderlyingNetworks;
+                    nai.declaredUnderlyingNetworks = (underlying != null)
+                            ? underlying.toArray(new Network[0]) : null;
+
+                    if (!Arrays.equals(oldUnderlying, nai.declaredUnderlyingNetworks)) {
+                        if (DBG) {
+                            log(nai.toShortString() + " changed underlying networks to "
+                                    + Arrays.toString(nai.declaredUnderlyingNetworks));
+                        }
+                        updateCapabilitiesForNetwork(nai);
+                        notifyIfacesChangedForNetworkStats();
+                    }
+                }
             }
         }
 
@@ -2829,8 +2868,7 @@
                     if (probePrivateDnsCompleted) {
                         if (nai.networkCapabilities.isPrivateDnsBroken() != privateDnsBroken) {
                             nai.networkCapabilities.setPrivateDnsBroken(privateDnsBroken);
-                            final int oldScore = nai.getCurrentScore();
-                            updateCapabilities(oldScore, nai, nai.networkCapabilities);
+                            updateCapabilitiesForNetwork(nai);
                         }
                         // Only show the notification when the private DNS is broken and the
                         // PRIVATE_DNS_BROKEN notification hasn't shown since last valid.
@@ -2845,8 +2883,7 @@
                         // done yet. In either case, the networkCapabilities should be updated to
                         // reflect the new status.
                         nai.networkCapabilities.setPrivateDnsBroken(false);
-                        final int oldScore = nai.getCurrentScore();
-                        updateCapabilities(oldScore, nai, nai.networkCapabilities);
+                        updateCapabilitiesForNetwork(nai);
                         nai.networkAgentConfig.hasShownBroken = false;
                     }
                     break;
@@ -2867,7 +2904,6 @@
                     final NetworkAgentInfo nai = getNetworkAgentInfoForNetId(netId);
                     // If captive portal status has changed, update capabilities or disconnect.
                     if (nai != null && (visible != nai.lastCaptivePortalDetected)) {
-                        final int oldScore = nai.getCurrentScore();
                         nai.lastCaptivePortalDetected = visible;
                         nai.everCaptivePortalDetected |= visible;
                         if (nai.lastCaptivePortalDetected &&
@@ -2878,7 +2914,7 @@
                             teardownUnneededNetwork(nai);
                             break;
                         }
-                        updateCapabilities(oldScore, nai, nai.networkCapabilities);
+                        updateCapabilitiesForNetwork(nai);
                     }
                     if (!visible) {
                         // Only clear SIGN_IN and NETWORK_SWITCH notifications here, or else other
@@ -2948,13 +2984,13 @@
                     handleFreshlyValidatedNetwork(nai);
                     // Clear NO_INTERNET, PRIVATE_DNS_BROKEN, PARTIAL_CONNECTIVITY and
                     // LOST_INTERNET notifications if network becomes valid.
-                    mNotifier.clearNotification(nai.network.netId,
+                    mNotifier.clearNotification(nai.network.getNetId(),
                             NotificationType.NO_INTERNET);
-                    mNotifier.clearNotification(nai.network.netId,
+                    mNotifier.clearNotification(nai.network.getNetId(),
                             NotificationType.LOST_INTERNET);
-                    mNotifier.clearNotification(nai.network.netId,
+                    mNotifier.clearNotification(nai.network.getNetId(),
                             NotificationType.PARTIAL_CONNECTIVITY);
-                    mNotifier.clearNotification(nai.network.netId,
+                    mNotifier.clearNotification(nai.network.getNetId(),
                             NotificationType.PRIVATE_DNS_BROKEN);
                     // If network becomes valid, the hasShownBroken should be reset for
                     // that network so that the notification will be fired when the private
@@ -2962,7 +2998,7 @@
                     nai.networkAgentConfig.hasShownBroken = false;
                 }
             } else if (partialConnectivityChanged) {
-                updateCapabilities(nai.getCurrentScore(), nai, nai.networkCapabilities);
+                updateCapabilitiesForNetwork(nai);
             }
             updateInetCondition(nai);
             // Let the NetworkAgent know the state of its network
@@ -3025,7 +3061,7 @@
         private final AutodestructReference<NetworkAgentInfo> mNai;
 
         private NetworkMonitorCallbacks(NetworkAgentInfo nai) {
-            mNetId = nai.network.netId;
+            mNetId = nai.network.getNetId();
             mNai = new AutodestructReference<>(nai);
         }
 
@@ -3040,7 +3076,7 @@
             // Legacy version of notifyNetworkTestedWithExtras.
             // Would only be called if the system has a NetworkStack module older than the
             // framework, which does not happen in practice.
-            Slog.wtf(TAG, "Deprecated notifyNetworkTested called: no action taken");
+            Log.wtf(TAG, "Deprecated notifyNetworkTested called: no action taken");
         }
 
         @Override
@@ -3175,7 +3211,7 @@
         // in order to restart a validation pass from within netd.
         final PrivateDnsConfig cfg = mDnsManager.getPrivateDnsConfig();
         if (cfg.useTls && TextUtils.isEmpty(cfg.hostname)) {
-            updateDnses(nai.linkProperties, null, nai.network.netId);
+            updateDnses(nai.linkProperties, null, nai.network.getNetId());
         }
     }
 
@@ -3208,7 +3244,7 @@
 
     private void updatePrivateDns(NetworkAgentInfo nai, PrivateDnsConfig newCfg) {
         mDnsManager.updatePrivateDns(nai.network, newCfg);
-        updateDnses(nai.linkProperties, null, nai.network.netId);
+        updateDnses(nai.linkProperties, null, nai.network.getNetId());
     }
 
     private void handlePrivateDnsValidationUpdate(PrivateDnsValidationUpdate update) {
@@ -3304,9 +3340,9 @@
                 if (nai != null) {
                     final boolean wasDefault = isDefaultNetwork(nai);
                     synchronized (mNetworkForNetId) {
-                        mNetworkForNetId.remove(nai.network.netId);
+                        mNetworkForNetId.remove(nai.network.getNetId());
                     }
-                    mNetIdManager.releaseNetId(nai.network.netId);
+                    mNetIdManager.releaseNetId(nai.network.getNetId());
                     // Just in case.
                     mLegacyTypeTracker.remove(nai, wasDefault);
                 }
@@ -3336,7 +3372,7 @@
             log(nai.toShortString() + " disconnected, was satisfying " + nai.numNetworkRequests());
         }
         // Clear all notifications of this network.
-        mNotifier.clearNotification(nai.network.netId);
+        mNotifier.clearNotification(nai.network.getNetId());
         // A network agent has disconnected.
         // TODO - if we move the logic to the network agent (have them disconnect
         // because they lost all their requests or because their score isn't good)
@@ -3373,19 +3409,21 @@
         synchronized (mNetworkForNetId) {
             // Remove the NetworkAgent, but don't mark the netId as
             // available until we've told netd to delete it below.
-            mNetworkForNetId.remove(nai.network.netId);
+            mNetworkForNetId.remove(nai.network.getNetId());
         }
         // Remove all previously satisfied requests.
         for (int i = 0; i < nai.numNetworkRequests(); i++) {
             NetworkRequest request = nai.requestAt(i);
             final NetworkRequestInfo nri = mNetworkRequests.get(request);
             final NetworkAgentInfo currentNetwork = nri.mSatisfier;
-            if (currentNetwork != null && currentNetwork.network.netId == nai.network.netId) {
+            if (currentNetwork != null
+                    && currentNetwork.network.getNetId() == nai.network.getNetId()) {
                 nri.mSatisfier = null;
                 sendUpdatedScoreToFactories(request, null);
             }
         }
         nai.clearLingerState();
+        propagateUnderlyingNetworkCapabilities(nai.network);
         if (nai.isSatisfyingRequest(mDefaultRequest.requestId)) {
             mDefaultNetworkNai = null;
             updateDataActivityTracking(null /* newNetwork */, nai);
@@ -3393,9 +3431,6 @@
             ensureNetworkTransitionWakelock(nai.toShortString());
         }
         mLegacyTypeTracker.remove(nai, wasDefault);
-        if (!nai.networkCapabilities.hasTransport(TRANSPORT_VPN)) {
-            updateAllVpnsCapabilities();
-        }
         rematchAllNetworksAndRequests();
         mLingerMonitor.noteDisconnect(nai);
         if (nai.created) {
@@ -3410,26 +3445,26 @@
             destroyNativeNetwork(nai);
             mDnsManager.removeNetwork(nai.network);
         }
-        mNetIdManager.releaseNetId(nai.network.netId);
+        mNetIdManager.releaseNetId(nai.network.getNetId());
     }
 
     private boolean createNativeNetwork(@NonNull NetworkAgentInfo networkAgent) {
         try {
             // This should never fail.  Specifying an already in use NetID will cause failure.
             if (networkAgent.isVPN()) {
-                mNetd.networkCreateVpn(networkAgent.network.netId,
+                mNetd.networkCreateVpn(networkAgent.network.getNetId(),
                         (networkAgent.networkAgentConfig == null
                                 || !networkAgent.networkAgentConfig.allowBypass));
             } else {
-                mNetd.networkCreatePhysical(networkAgent.network.netId,
+                mNetd.networkCreatePhysical(networkAgent.network.getNetId(),
                         getNetworkPermission(networkAgent.networkCapabilities));
             }
-            mDnsResolver.createNetworkCache(networkAgent.network.netId);
-            mDnsManager.updateTransportsForNetwork(networkAgent.network.netId,
+            mDnsResolver.createNetworkCache(networkAgent.network.getNetId());
+            mDnsManager.updateTransportsForNetwork(networkAgent.network.getNetId(),
                     networkAgent.networkCapabilities.getTransportTypes());
             return true;
         } catch (RemoteException | ServiceSpecificException e) {
-            loge("Error creating network " + networkAgent.network.netId + ": "
+            loge("Error creating network " + networkAgent.network.getNetId() + ": "
                     + e.getMessage());
             return false;
         }
@@ -3437,8 +3472,8 @@
 
     private void destroyNativeNetwork(@NonNull NetworkAgentInfo networkAgent) {
         try {
-            mNetd.networkDestroy(networkAgent.network.netId);
-            mDnsResolver.destroyNetworkCache(networkAgent.network.netId);
+            mNetd.networkDestroy(networkAgent.network.getNetId());
+            mDnsResolver.destroyNetworkCache(networkAgent.network.getNetId());
         } catch (RemoteException | ServiceSpecificException e) {
             loge("Exception destroying network: " + e);
         }
@@ -3517,7 +3552,7 @@
                 numRequests = nai.numForegroundNetworkRequests();
                 break;
             default:
-                Slog.wtf(TAG, "Invalid reason. Cannot happen.");
+                Log.wtf(TAG, "Invalid reason. Cannot happen.");
                 return true;
         }
 
@@ -3630,7 +3665,7 @@
                 nri.mSatisfier = null;
                 if (!wasBackgroundNetwork && nai.isBackgroundNetwork()) {
                     // Went from foreground to background.
-                    updateCapabilities(nai.getCurrentScore(), nai, nai.networkCapabilities);
+                    updateCapabilitiesForNetwork(nai);
                 }
             }
 
@@ -3679,7 +3714,7 @@
         synchronized (mUidToNetworkRequestCount) {
             final int requests = mUidToNetworkRequestCount.get(nri.mUid, 0);
             if (requests < 1) {
-                Slog.wtf(TAG, "BUG: too small request count " + requests + " for UID " + nri.mUid);
+                Log.wtf(TAG, "BUG: too small request count " + requests + " for UID " + nri.mUid);
             } else if (requests == 1) {
                 mUidToNetworkRequestCount.removeAt(mUidToNetworkRequestCount.indexOfKey(nri.mUid));
             } else {
@@ -3724,7 +3759,7 @@
         }
 
         if (!nai.networkAgentConfig.explicitlySelected) {
-            Slog.wtf(TAG, "BUG: setAcceptUnvalidated non non-explicitly selected network");
+            Log.wtf(TAG, "BUG: setAcceptUnvalidated non non-explicitly selected network");
         }
 
         if (accept != nai.networkAgentConfig.acceptUnvalidated) {
@@ -3994,13 +4029,13 @@
                 highPriority = nai.networkAgentConfig.explicitlySelected;
                 break;
             default:
-                Slog.wtf(TAG, "Unknown notification type " + type);
+                Log.wtf(TAG, "Unknown notification type " + type);
                 return;
         }
 
         Intent intent = new Intent(action);
         if (type != NotificationType.PRIVATE_DNS_BROKEN) {
-            intent.setData(Uri.fromParts("netId", Integer.toString(nai.network.netId), null));
+            intent.setData(Uri.fromParts("netId", Integer.toString(nai.network.getNetId()), null));
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             // Some OEMs have their own Settings package. Thus, need to get the current using
             // Settings package name instead of just use default name "com.android.settings".
@@ -4015,7 +4050,8 @@
                 intent,
                 PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
 
-        mNotifier.showNotification(nai.network.netId, type, nai, null, pendingIntent, highPriority);
+        mNotifier.showNotification(
+                nai.network.getNetId(), type, nai, null, pendingIntent, highPriority);
     }
 
     private boolean shouldPromptUnvalidated(NetworkAgentInfo nai) {
@@ -4316,7 +4352,7 @@
         synchronized (this) {
             if (!mNetTransitionWakeLock.isHeld()) {
                 mWakelockLogs.log(String.format("RELEASE: already released (%s)", event));
-                Slog.w(TAG, "expected Net Transition WakeLock to be held");
+                Log.w(TAG, "expected Net Transition WakeLock to be held");
                 return;
             }
             mNetTransitionWakeLock.release();
@@ -4381,7 +4417,7 @@
             return;
         }
         if (DBG) {
-            int netid = nai.network.netId;
+            int netid = nai.network.getNetId();
             log("reportNetworkConnectivity(" + netid + ", " + hasConnectivity + ") by " + uid);
         }
         // Validating a network that has not yet connected could result in a call to
@@ -4416,7 +4452,7 @@
                 return null;
             }
             return getLinkPropertiesProxyInfo(activeNetwork);
-        } else if (mDeps.queryUserAccess(Binder.getCallingUid(), network.netId)) {
+        } else if (mDeps.queryUserAccess(Binder.getCallingUid(), network.getNetId())) {
             // Don't call getLinkProperties() as it requires ACCESS_NETWORK_STATE permission, which
             // caller may not have.
             return getLinkPropertiesProxyInfo(network);
@@ -4488,7 +4524,7 @@
 
         @Override
         public void onChange(boolean selfChange) {
-            Slog.wtf(TAG, "Should never be reached.");
+            Log.wtf(TAG, "Should never be reached.");
         }
 
         @Override
@@ -4503,15 +4539,19 @@
     }
 
     private static void log(String s) {
-        Slog.d(TAG, s);
+        Log.d(TAG, s);
+    }
+
+    private static void logw(String s) {
+        Log.w(TAG, s);
     }
 
     private static void loge(String s) {
-        Slog.e(TAG, s);
+        Log.e(TAG, s);
     }
 
     private static void loge(String s, Throwable t) {
-        Slog.e(TAG, s, t);
+        Log.e(TAG, s, t);
     }
 
     /**
@@ -4704,10 +4744,9 @@
             if (mLockdownEnabled) {
                 return new VpnInfo[0];
             }
-
             List<VpnInfo> infoList = new ArrayList<>();
-            for (int i = 0; i < mVpns.size(); i++) {
-                VpnInfo info = createVpnInfo(mVpns.valueAt(i));
+            for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
+                VpnInfo info = createVpnInfo(nai);
                 if (info != null) {
                     infoList.add(info);
                 }
@@ -4720,13 +4759,10 @@
      * @return VPN information for accounting, or null if we can't retrieve all required
      *         information, e.g underlying ifaces.
      */
-    @Nullable
-    private VpnInfo createVpnInfo(Vpn vpn) {
-        VpnInfo info = vpn.getVpnInfo();
-        if (info == null) {
-            return null;
-        }
-        Network[] underlyingNetworks = vpn.getUnderlyingNetworks();
+    private VpnInfo createVpnInfo(NetworkAgentInfo nai) {
+        if (!nai.isVPN()) return null;
+
+        Network[] underlyingNetworks = nai.declaredUnderlyingNetworks;
         // see VpnService.setUnderlyingNetworks()'s javadoc about how to interpret
         // the underlyingNetworks list.
         if (underlyingNetworks == null) {
@@ -4735,23 +4771,33 @@
                 underlyingNetworks = new Network[] { defaultNai.network };
             }
         }
-        if (underlyingNetworks != null && underlyingNetworks.length > 0) {
-            List<String> interfaces = new ArrayList<>();
-            for (Network network : underlyingNetworks) {
-                LinkProperties lp = getLinkProperties(network);
-                if (lp != null) {
-                    for (String iface : lp.getAllInterfaceNames()) {
-                        if (!TextUtils.isEmpty(iface)) {
-                            interfaces.add(iface);
-                        }
-                    }
+
+        if (ArrayUtils.isEmpty(underlyingNetworks)) return null;
+
+        List<String> interfaces = new ArrayList<>();
+        for (Network network : underlyingNetworks) {
+            NetworkAgentInfo underlyingNai = getNetworkAgentInfoForNetwork(network);
+            if (underlyingNai == null) continue;
+            LinkProperties lp = underlyingNai.linkProperties;
+            for (String iface : lp.getAllInterfaceNames()) {
+                if (!TextUtils.isEmpty(iface)) {
+                    interfaces.add(iface);
                 }
             }
-            if (!interfaces.isEmpty()) {
-                info.underlyingIfaces = interfaces.toArray(new String[interfaces.size()]);
-            }
         }
-        return info.underlyingIfaces == null ? null : info;
+
+        if (interfaces.isEmpty()) return null;
+
+        VpnInfo info = new VpnInfo();
+        info.ownerUid = nai.networkCapabilities.getOwnerUid();
+        info.vpnIface = nai.linkProperties.getInterfaceName();
+        // Must be non-null or NetworkStatsService will crash.
+        // Cannot happen in production code because Vpn only registers the NetworkAgent after the
+        // tun or ipsec interface is created.
+        if (info.vpnIface == null) return null;
+        info.underlyingIfaces = interfaces.toArray(new String[0]);
+
+        return info;
     }
 
     /**
@@ -4773,40 +4819,44 @@
         }
     }
 
-    /**
-     * Ask all VPN objects to recompute and update their capabilities.
-     *
-     * When underlying networks change, VPNs may have to update capabilities to reflect things
-     * like the metered bit, their transports, and so on. This asks the VPN objects to update
-     * their capabilities, and as this will cause them to send messages to the ConnectivityService
-     * handler thread through their agent, this is asynchronous. When the capabilities objects
-     * are computed they will be up-to-date as they are computed synchronously from here and
-     * this is running on the ConnectivityService thread.
-     */
-    private void updateAllVpnsCapabilities() {
-        Network defaultNetwork = getNetwork(getDefaultNetwork());
-        synchronized (mVpns) {
-            for (int i = 0; i < mVpns.size(); i++) {
-                final Vpn vpn = mVpns.valueAt(i);
-                NetworkCapabilities nc = vpn.updateCapabilities(defaultNetwork);
-                updateVpnCapabilities(vpn, nc);
-            }
+    private Network[] underlyingNetworksOrDefault(Network[] underlyingNetworks) {
+        final Network defaultNetwork = getNetwork(getDefaultNetwork());
+        if (underlyingNetworks == null && defaultNetwork != null) {
+            // null underlying networks means to track the default.
+            underlyingNetworks = new Network[] { defaultNetwork };
         }
+        return underlyingNetworks;
     }
 
-    private void updateVpnCapabilities(Vpn vpn, @Nullable NetworkCapabilities nc) {
+    // Returns true iff |network| is an underlying network of |nai|.
+    private boolean hasUnderlyingNetwork(NetworkAgentInfo nai, Network network) {
+        // TODO: support more than one level of underlying networks, either via a fixed-depth search
+        // (e.g., 2 levels of underlying networks), or via loop detection, or....
+        if (!nai.supportsUnderlyingNetworks()) return false;
+        final Network[] underlying = underlyingNetworksOrDefault(nai.declaredUnderlyingNetworks);
+        return ArrayUtils.contains(underlying, network);
+    }
+
+    /**
+     * Recompute the capabilities for any networks that had a specific network as underlying.
+     *
+     * When underlying networks change, such networks may have to update capabilities to reflect
+     * things like the metered bit, their transports, and so on. The capabilities are calculated
+     * immediately. This method runs on the ConnectivityService thread.
+     */
+    private void propagateUnderlyingNetworkCapabilities(Network updatedNetwork) {
         ensureRunningOnConnectivityServiceThread();
-        NetworkAgentInfo vpnNai = getNetworkAgentInfoForNetId(vpn.getNetId());
-        if (vpnNai == null || nc == null) {
-            return;
+        for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
+            if (updatedNetwork == null || hasUnderlyingNetwork(nai, updatedNetwork)) {
+                updateCapabilitiesForNetwork(nai);
+            }
         }
-        updateCapabilities(vpnNai.getCurrentScore(), vpnNai, nc);
     }
 
     @Override
     public boolean updateLockdownVpn() {
         if (Binder.getCallingUid() != Process.SYSTEM_UID) {
-            Slog.w(TAG, "Lockdown VPN only available to AID_SYSTEM");
+            logw("Lockdown VPN only available to AID_SYSTEM");
             return false;
         }
 
@@ -4816,21 +4866,21 @@
             if (mLockdownEnabled) {
                 byte[] profileTag = mKeyStore.get(Credentials.LOCKDOWN_VPN);
                 if (profileTag == null) {
-                    Slog.e(TAG, "Lockdown VPN configured but cannot be read from keystore");
+                    loge("Lockdown VPN configured but cannot be read from keystore");
                     return false;
                 }
                 String profileName = new String(profileTag);
                 final VpnProfile profile = VpnProfile.decode(
                         profileName, mKeyStore.get(Credentials.VPN + profileName));
                 if (profile == null) {
-                    Slog.e(TAG, "Lockdown VPN configured invalid profile " + profileName);
+                    loge("Lockdown VPN configured invalid profile " + profileName);
                     setLockdownTracker(null);
                     return true;
                 }
                 int user = UserHandle.getUserId(Binder.getCallingUid());
                 Vpn vpn = mVpns.get(user);
                 if (vpn == null) {
-                    Slog.w(TAG, "VPN for user " + user + " not ready yet. Skipping lockdown");
+                    logw("VPN for user " + user + " not ready yet. Skipping lockdown");
                     return false;
                 }
                 setLockdownTracker(new LockdownVpnTracker(mContext, this, mHandler, vpn, profile));
@@ -4890,7 +4940,7 @@
             if (vpn == null) {
                 // Shouldn't happen as all code paths that point here should have checked the Vpn
                 // exists already.
-                Slog.wtf(TAG, "User " + userId + " has no Vpn configuration");
+                Log.wtf(TAG, "User " + userId + " has no Vpn configuration");
                 return false;
             }
 
@@ -4906,7 +4956,7 @@
         synchronized (mVpns) {
             Vpn vpn = mVpns.get(userId);
             if (vpn == null) {
-                Slog.w(TAG, "User " + userId + " has no Vpn configuration");
+                logw("User " + userId + " has no Vpn configuration");
                 return false;
             }
             return vpn.isAlwaysOnPackageSupported(packageName, mKeyStore);
@@ -4927,7 +4977,7 @@
 
             Vpn vpn = mVpns.get(userId);
             if (vpn == null) {
-                Slog.w(TAG, "User " + userId + " has no Vpn configuration");
+                logw("User " + userId + " has no Vpn configuration");
                 return false;
             }
             if (!vpn.setAlwaysOnPackage(packageName, lockdown, lockdownWhitelist, mKeyStore)) {
@@ -4949,7 +4999,7 @@
         synchronized (mVpns) {
             Vpn vpn = mVpns.get(userId);
             if (vpn == null) {
-                Slog.w(TAG, "User " + userId + " has no Vpn configuration");
+                logw("User " + userId + " has no Vpn configuration");
                 return null;
             }
             return vpn.getAlwaysOnPackage();
@@ -4964,7 +5014,7 @@
         synchronized (mVpns) {
             Vpn vpn = mVpns.get(userId);
             if (vpn == null) {
-                Slog.w(TAG, "User " + userId + " has no Vpn configuration");
+                logw("User " + userId + " has no Vpn configuration");
                 return false;
             }
             return vpn.getLockdown();
@@ -4979,7 +5029,7 @@
         synchronized (mVpns) {
             Vpn vpn = mVpns.get(userId);
             if (vpn == null) {
-                Slog.w(TAG, "User " + userId + " has no Vpn configuration");
+                logw("User " + userId + " has no Vpn configuration");
                 return null;
             }
             return vpn.getLockdownAllowlist();
@@ -5113,14 +5163,14 @@
         }
     }
 
-    private void onUserStart(int userId) {
+    private void onUserStarted(int userId) {
         synchronized (mVpns) {
             Vpn userVpn = mVpns.get(userId);
             if (userVpn != null) {
                 loge("Starting user already has a VPN");
                 return;
             }
-            userVpn = new Vpn(mHandler.getLooper(), mContext, mNMS, userId, mKeyStore);
+            userVpn = new Vpn(mHandler.getLooper(), mContext, mNMS, mNetd, userId, mKeyStore);
             mVpns.put(userId, userVpn);
             if (mUserManager.getUserInfo(userId).isPrimary() && LockdownVpnTracker.isEnabled()) {
                 updateLockdownVpn();
@@ -5128,7 +5178,7 @@
         }
     }
 
-    private void onUserStop(int userId) {
+    private void onUserStopped(int userId) {
         synchronized (mVpns) {
             Vpn userVpn = mVpns.get(userId);
             if (userVpn == null) {
@@ -5142,35 +5192,29 @@
 
     private void onUserAdded(int userId) {
         mPermissionMonitor.onUserAdded(userId);
-        Network defaultNetwork = getNetwork(getDefaultNetwork());
         synchronized (mVpns) {
             final int vpnsSize = mVpns.size();
             for (int i = 0; i < vpnsSize; i++) {
                 Vpn vpn = mVpns.valueAt(i);
                 vpn.onUserAdded(userId);
-                NetworkCapabilities nc = vpn.updateCapabilities(defaultNetwork);
-                updateVpnCapabilities(vpn, nc);
             }
         }
     }
 
     private void onUserRemoved(int userId) {
         mPermissionMonitor.onUserRemoved(userId);
-        Network defaultNetwork = getNetwork(getDefaultNetwork());
         synchronized (mVpns) {
             final int vpnsSize = mVpns.size();
             for (int i = 0; i < vpnsSize; i++) {
                 Vpn vpn = mVpns.valueAt(i);
                 vpn.onUserRemoved(userId);
-                NetworkCapabilities nc = vpn.updateCapabilities(defaultNetwork);
-                updateVpnCapabilities(vpn, nc);
             }
         }
     }
 
     private void onPackageReplaced(String packageName, int uid) {
         if (TextUtils.isEmpty(packageName) || uid < 0) {
-            Slog.wtf(TAG, "Invalid package in onPackageReplaced: " + packageName + " | " + uid);
+            Log.wtf(TAG, "Invalid package in onPackageReplaced: " + packageName + " | " + uid);
             return;
         }
         final int userId = UserHandle.getUserId(uid);
@@ -5181,7 +5225,7 @@
             }
             // Legacy always-on VPN won't be affected since the package name is not set.
             if (TextUtils.equals(vpn.getAlwaysOnPackage(), packageName)) {
-                Slog.d(TAG, "Restarting always-on VPN package " + packageName + " for user "
+                log("Restarting always-on VPN package " + packageName + " for user "
                         + userId);
                 vpn.startAlwaysOnVpn(mKeyStore);
             }
@@ -5190,7 +5234,7 @@
 
     private void onPackageRemoved(String packageName, int uid, boolean isReplacing) {
         if (TextUtils.isEmpty(packageName) || uid < 0) {
-            Slog.wtf(TAG, "Invalid package in onPackageRemoved: " + packageName + " | " + uid);
+            Log.wtf(TAG, "Invalid package in onPackageRemoved: " + packageName + " | " + uid);
             return;
         }
 
@@ -5202,7 +5246,7 @@
             }
             // Legacy always-on VPN won't be affected since the package name is not set.
             if (TextUtils.equals(vpn.getAlwaysOnPackage(), packageName) && !isReplacing) {
-                Slog.d(TAG, "Removing always-on VPN package " + packageName + " for user "
+                log("Removing always-on VPN package " + packageName + " for user "
                         + userId);
                 vpn.setAlwaysOnPackage(null, false, null, mKeyStore);
             }
@@ -5245,9 +5289,9 @@
             if (userId == UserHandle.USER_NULL) return;
 
             if (Intent.ACTION_USER_STARTED.equals(action)) {
-                onUserStart(userId);
+                onUserStarted(userId);
             } else if (Intent.ACTION_USER_STOPPED.equals(action)) {
-                onUserStop(userId);
+                onUserStopped(userId);
             } else if (Intent.ACTION_USER_ADDED.equals(action)) {
                 onUserAdded(userId);
             } else if (Intent.ACTION_USER_REMOVED.equals(action)) {
@@ -5553,11 +5597,12 @@
     }
 
     private boolean checkUnsupportedStartingFrom(int version, String callingPackageName) {
-        final PackageManager pm = mContext.getPackageManager();
-        final int userId = UserHandle.getCallingUserId();
+        final UserHandle user = UserHandle.getUserHandleForUid(Binder.getCallingUid());
+        final PackageManager pm =
+                mContext.createContextAsUser(user, 0 /* flags */).getPackageManager();
         try {
-            final int callingVersion = pm.getApplicationInfoAsUser(
-                    callingPackageName, 0 /* flags */, userId).targetSdkVersion;
+            final int callingVersion = pm.getApplicationInfo(
+                    callingPackageName, 0 /* flags */).targetSdkVersion;
             if (callingVersion < version) return false;
         } catch (PackageManager.NameNotFoundException e) { }
         return true;
@@ -5637,7 +5682,7 @@
             return false;
         }
         synchronized (mNetworkForNetId) {
-            nai = mNetworkForNetId.get(network.netId);
+            nai = mNetworkForNetId.get(network.getNetId());
         }
         if (nai != null) {
             nai.asyncChannel.sendMessage(android.net.NetworkAgent.CMD_REQUEST_BANDWIDTH_UPDATE);
@@ -5818,7 +5863,7 @@
             // Avoid creating duplicates. even if an app makes a direct AIDL call.
             // This will never happen if an app calls ConnectivityManager#registerNetworkProvider,
             // as that will throw if a duplicate provider is registered.
-            Slog.e(TAG, "Attempt to register existing NetworkProviderInfo "
+            loge("Attempt to register existing NetworkProviderInfo "
                     + mNetworkProviderInfos.get(npi.messenger).name);
             return;
         }
@@ -5959,13 +6004,29 @@
             int currentScore, NetworkAgentConfig networkAgentConfig, int providerId) {
         if (networkCapabilities.hasTransport(TRANSPORT_TEST)) {
             enforceAnyPermissionOf(Manifest.permission.MANAGE_TEST_NETWORKS);
+        } else {
+            enforceNetworkFactoryPermission();
+        }
+
+        final int uid = Binder.getCallingUid();
+        final long token = Binder.clearCallingIdentity();
+        try {
+            return registerNetworkAgentInternal(messenger, networkInfo, linkProperties,
+                    networkCapabilities, currentScore, networkAgentConfig, providerId, uid);
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
+    }
+
+    private Network registerNetworkAgentInternal(Messenger messenger, NetworkInfo networkInfo,
+            LinkProperties linkProperties, NetworkCapabilities networkCapabilities,
+            int currentScore, NetworkAgentConfig networkAgentConfig, int providerId, int uid) {
+        if (networkCapabilities.hasTransport(TRANSPORT_TEST)) {
             // Strictly, sanitizing here is unnecessary as the capabilities will be sanitized in
             // the call to mixInCapabilities below anyway, but sanitizing here means the NAI never
             // sees capabilities that may be malicious, which might prevent mistakes in the future.
             networkCapabilities = new NetworkCapabilities(networkCapabilities);
-            networkCapabilities.restrictCapabilitesForTestNetwork(Binder.getCallingUid());
-        } else {
-            enforceNetworkFactoryPermission();
+            networkCapabilities.restrictCapabilitesForTestNetwork(uid);
         }
 
         LinkProperties lp = new LinkProperties(linkProperties);
@@ -5976,9 +6037,10 @@
         final NetworkAgentInfo nai = new NetworkAgentInfo(messenger, new AsyncChannel(),
                 new Network(mNetIdManager.reserveNetId()), new NetworkInfo(networkInfo), lp, nc,
                 currentScore, mContext, mTrackerHandler, new NetworkAgentConfig(networkAgentConfig),
-                this, mNetd, mDnsResolver, mNMS, providerId, Binder.getCallingUid());
+                this, mNetd, mDnsResolver, mNMS, providerId, uid);
 
         // Make sure the LinkProperties and NetworkCapabilities reflect what the agent info says.
+        processCapabilitiesFromAgent(nai, nc);
         nai.getAndSetNetworkCapabilities(mixInCapabilities(nai, nc));
         processLinkPropertiesFromAgent(nai, nai.linkProperties);
 
@@ -5986,13 +6048,8 @@
         final String name = TextUtils.isEmpty(extraInfo)
                 ? nai.networkCapabilities.getSsid() : extraInfo;
         if (DBG) log("registerNetworkAgent " + nai);
-        final long token = Binder.clearCallingIdentity();
-        try {
-            mDeps.getNetworkStack().makeNetworkMonitor(
-                    nai.network, name, new NetworkMonitorCallbacks(nai));
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
+        mDeps.getNetworkStack().makeNetworkMonitor(
+                nai.network, name, new NetworkMonitorCallbacks(nai));
         // NetworkAgentInfo registration will finish when the NetworkMonitor is created.
         // If the network disconnects or sends any other event before that, messages are deferred by
         // NetworkAgent until nai.asyncChannel.connect(), which will be called when finalizing the
@@ -6005,7 +6062,7 @@
         if (VDBG) log("Got NetworkAgent Messenger");
         mNetworkAgentInfos.put(nai.messenger, nai);
         synchronized (mNetworkForNetId) {
-            mNetworkForNetId.put(nai.network.netId, nai);
+            mNetworkForNetId.put(nai.network.getNetId(), nai);
         }
 
         try {
@@ -6019,6 +6076,13 @@
         updateUids(nai, null, nai.networkCapabilities);
     }
 
+    /**
+     * Called when receiving LinkProperties directly from a NetworkAgent.
+     * Stores into |nai| any data coming from the agent that might also be written to the network's
+     * LinkProperties by ConnectivityService itself. This ensures that the data provided by the
+     * agent is not lost when updateLinkProperties is called.
+     * This method should never alter the agent's LinkProperties, only store data in |nai|.
+     */
     private void processLinkPropertiesFromAgent(NetworkAgentInfo nai, LinkProperties lp) {
         lp.ensureDirectlyConnectedRoutes();
         nai.clatd.setNat64PrefixFromRa(lp.getNat64Prefix());
@@ -6026,7 +6090,7 @@
 
     private void updateLinkProperties(NetworkAgentInfo networkAgent, LinkProperties newLp,
             @NonNull LinkProperties oldLp) {
-        int netId = networkAgent.network.netId;
+        int netId = networkAgent.network.getNetId();
 
         // The NetworkAgent does not know whether clatd is running on its network or not, or whether
         // a NAT64 prefix was discovered by the DNS resolver. Before we do anything else, make sure
@@ -6307,7 +6371,7 @@
         final int newPermission = getNetworkPermission(newNc);
         if (oldPermission != newPermission && nai.created && !nai.isVPN()) {
             try {
-                mNetd.networkSetPermissionForNetwork(nai.network.netId, newPermission);
+                mNetd.networkSetPermissionForNetwork(nai.network.getNetId(), newPermission);
             } catch (RemoteException | ServiceSpecificException e) {
                 loge("Exception in networkSetPermissionForNetwork: " + e);
             }
@@ -6315,6 +6379,90 @@
     }
 
     /**
+     * Called when receiving NetworkCapabilities directly from a NetworkAgent.
+     * Stores into |nai| any data coming from the agent that might also be written to the network's
+     * NetworkCapabilities by ConnectivityService itself. This ensures that the data provided by the
+     * agent is not lost when updateCapabilities is called.
+     * This method should never alter the agent's NetworkCapabilities, only store data in |nai|.
+     */
+    private void processCapabilitiesFromAgent(NetworkAgentInfo nai, NetworkCapabilities nc) {
+        // Note: resetting the owner UID before storing the agent capabilities in NAI means that if
+        // the agent attempts to change the owner UID, then nai.declaredCapabilities will not
+        // actually be the same as the capabilities sent by the agent. Still, it is safer to reset
+        // the owner UID here and behave as if the agent had never tried to change it.
+        if (nai.networkCapabilities.getOwnerUid() != nc.getOwnerUid()) {
+            Log.e(TAG, nai.toShortString() + ": ignoring attempt to change owner from "
+                    + nai.networkCapabilities.getOwnerUid() + " to " + nc.getOwnerUid());
+            nc.setOwnerUid(nai.networkCapabilities.getOwnerUid());
+        }
+        nai.declaredCapabilities = new NetworkCapabilities(nc);
+    }
+
+    /** Modifies |newNc| based on the capabilities of |underlyingNetworks| and |agentCaps|. */
+    @VisibleForTesting
+    void applyUnderlyingCapabilities(@Nullable Network[] underlyingNetworks,
+            @NonNull NetworkCapabilities agentCaps, @NonNull NetworkCapabilities newNc) {
+        underlyingNetworks = underlyingNetworksOrDefault(underlyingNetworks);
+        int[] transportTypes = agentCaps.getTransportTypes();
+        int downKbps = NetworkCapabilities.LINK_BANDWIDTH_UNSPECIFIED;
+        int upKbps = NetworkCapabilities.LINK_BANDWIDTH_UNSPECIFIED;
+        // metered if any underlying is metered, or originally declared metered by the agent.
+        boolean metered = !agentCaps.hasCapability(NET_CAPABILITY_NOT_METERED);
+        boolean roaming = false; // roaming if any underlying is roaming
+        boolean congested = false; // congested if any underlying is congested
+        boolean suspended = true; // suspended if all underlying are suspended
+
+        boolean hadUnderlyingNetworks = false;
+        if (null != underlyingNetworks) {
+            for (Network underlyingNetwork : underlyingNetworks) {
+                final NetworkAgentInfo underlying =
+                        getNetworkAgentInfoForNetwork(underlyingNetwork);
+                if (underlying == null) continue;
+
+                final NetworkCapabilities underlyingCaps = underlying.networkCapabilities;
+                hadUnderlyingNetworks = true;
+                for (int underlyingType : underlyingCaps.getTransportTypes()) {
+                    transportTypes = ArrayUtils.appendInt(transportTypes, underlyingType);
+                }
+
+                // Merge capabilities of this underlying network. For bandwidth, assume the
+                // worst case.
+                downKbps = NetworkCapabilities.minBandwidth(downKbps,
+                        underlyingCaps.getLinkDownstreamBandwidthKbps());
+                upKbps = NetworkCapabilities.minBandwidth(upKbps,
+                        underlyingCaps.getLinkUpstreamBandwidthKbps());
+                // If this underlying network is metered, the VPN is metered (it may cost money
+                // to send packets on this network).
+                metered |= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_METERED);
+                // If this underlying network is roaming, the VPN is roaming (the billing structure
+                // is different than the usual, local one).
+                roaming |= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_ROAMING);
+                // If this underlying network is congested, the VPN is congested (the current
+                // condition of the network affects the performance of this network).
+                congested |= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_CONGESTED);
+                // If this network is not suspended, the VPN is not suspended (the VPN
+                // is able to transfer some data).
+                suspended &= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED);
+            }
+        }
+        if (!hadUnderlyingNetworks) {
+            // No idea what the underlying networks are; assume reasonable defaults
+            metered = true;
+            roaming = false;
+            congested = false;
+            suspended = false;
+        }
+
+        newNc.setTransportTypes(transportTypes);
+        newNc.setLinkDownstreamBandwidthKbps(downKbps);
+        newNc.setLinkUpstreamBandwidthKbps(upKbps);
+        newNc.setCapability(NET_CAPABILITY_NOT_METERED, !metered);
+        newNc.setCapability(NET_CAPABILITY_NOT_ROAMING, !roaming);
+        newNc.setCapability(NET_CAPABILITY_NOT_CONGESTED, !congested);
+        newNc.setCapability(NET_CAPABILITY_NOT_SUSPENDED, !suspended);
+    }
+
+    /**
      * Augments the NetworkCapabilities passed in by a NetworkAgent with capabilities that are
      * maintained here that the NetworkAgent is not aware of (e.g., validated, captive portal,
      * and foreground status).
@@ -6333,7 +6481,7 @@
             // stop being matched by the updated agent.
             String diff = nai.networkCapabilities.describeImmutableDifferences(nc);
             if (!TextUtils.isEmpty(diff)) {
-                Slog.wtf(TAG, "BUG: " + nai + " lost immutable capabilities:" + diff);
+                Log.wtf(TAG, "BUG: " + nai + " lost immutable capabilities:" + diff);
             }
         }
 
@@ -6367,6 +6515,11 @@
             newNc.addCapability(NET_CAPABILITY_NOT_ROAMING);
         }
 
+        if (nai.supportsUnderlyingNetworks()) {
+            applyUnderlyingCapabilities(nai.declaredUnderlyingNetworks, nai.declaredCapabilities,
+                    newNc);
+        }
+
         return newNc;
     }
 
@@ -6443,17 +6596,20 @@
             }
         }
 
-        if (!newNc.hasTransport(TRANSPORT_VPN)) {
-            // Tell VPNs about updated capabilities, since they may need to
-            // bubble those changes through.
-            updateAllVpnsCapabilities();
-        }
+        // This network might have been underlying another network. Propagate its capabilities.
+        propagateUnderlyingNetworkCapabilities(nai.network);
 
         if (!newNc.equalsTransportTypes(prevNc)) {
-            mDnsManager.updateTransportsForNetwork(nai.network.netId, newNc.getTransportTypes());
+            mDnsManager.updateTransportsForNetwork(
+                    nai.network.getNetId(), newNc.getTransportTypes());
         }
     }
 
+    /** Convenience method to update the capabilities for a given network. */
+    private void updateCapabilitiesForNetwork(NetworkAgentInfo nai) {
+        updateCapabilities(nai.getCurrentScore(), nai, nai.networkCapabilities);
+    }
+
     /**
      * Returns whether VPN isolation (ingress interface filtering) should be applied on the given
      * network.
@@ -6483,6 +6639,16 @@
                 && (lp.hasIpv6DefaultRoute() || lp.hasIpv6UnreachableDefaultRoute());
     }
 
+    private static UidRangeParcel[] toUidRangeStableParcels(final @NonNull Set<UidRange> ranges) {
+        final UidRangeParcel[] stableRanges = new UidRangeParcel[ranges.size()];
+        int index = 0;
+        for (UidRange range : ranges) {
+            stableRanges[index] = new UidRangeParcel(range.start, range.stop);
+            index++;
+        }
+        return stableRanges;
+    }
+
     private void updateUids(NetworkAgentInfo nai, NetworkCapabilities prevNc,
             NetworkCapabilities newNc) {
         Set<UidRange> prevRanges = null == prevNc ? null : prevNc.getUids();
@@ -6502,14 +6668,11 @@
             // removing old range works because, unlike the filtering rules below, it's possible to
             // add duplicate UID routing rules.
             if (!newRanges.isEmpty()) {
-                final UidRange[] addedRangesArray = new UidRange[newRanges.size()];
-                newRanges.toArray(addedRangesArray);
-                mNMS.addVpnUidRanges(nai.network.netId, addedRangesArray);
+                mNetd.networkAddUidRanges(nai.network.netId, toUidRangeStableParcels(newRanges));
             }
             if (!prevRanges.isEmpty()) {
-                final UidRange[] removedRangesArray = new UidRange[prevRanges.size()];
-                prevRanges.toArray(removedRangesArray);
-                mNMS.removeVpnUidRanges(nai.network.netId, removedRangesArray);
+                mNetd.networkRemoveUidRanges(
+                        nai.network.netId, toUidRangeStableParcels(prevRanges));
             }
             final boolean wasFiltering = requiresVpnIsolation(nai, prevNc, nai.linkProperties);
             final boolean shouldFilter = requiresVpnIsolation(nai, newNc, nai.linkProperties);
@@ -6540,7 +6703,7 @@
     public void handleUpdateLinkProperties(NetworkAgentInfo nai, LinkProperties newLp) {
         ensureRunningOnConnectivityServiceThread();
 
-        if (getNetworkAgentInfoForNetId(nai.network.netId) != nai) {
+        if (getNetworkAgentInfoForNetId(nai.network.getNetId()) != nai) {
             // Ignore updates for disconnected networks
             return;
         }
@@ -6739,8 +6902,7 @@
             teardownUnneededNetwork(oldNetwork);
         } else {
             // Put the network in the background.
-            updateCapabilities(oldNetwork.getCurrentScore(), oldNetwork,
-                    oldNetwork.networkCapabilities);
+            updateCapabilitiesForNetwork(oldNetwork);
         }
     }
 
@@ -6751,7 +6913,7 @@
 
         try {
             if (null != newNetwork) {
-                mNetd.networkSetDefault(newNetwork.network.netId);
+                mNetd.networkSetDefault(newNetwork.network.getNetId());
             } else {
                 mNetd.networkClearDefault();
             }
@@ -6765,8 +6927,10 @@
         updateTcpBufferSizes(null != newNetwork
                 ? newNetwork.linkProperties.getTcpBufferSizes() : null);
         notifyIfacesChangedForNetworkStats();
-        // Fix up the NetworkCapabilities of any VPNs that don't specify underlying networks.
-        updateAllVpnsCapabilities();
+        // Fix up the NetworkCapabilities of any networks that have this network as underlying.
+        if (newNetwork != null) {
+            propagateUnderlyingNetworkCapabilities(newNetwork.network);
+        }
     }
 
     private void processListenRequests(@NonNull final NetworkAgentInfo nai) {
@@ -6814,8 +6978,8 @@
 
             public String toString() {
                 return mRequest.mRequests.get(0).requestId + " : "
-                        + (null != mOldNetwork ? mOldNetwork.network.netId : "null")
-                        + " → " + (null != mNewNetwork ? mNewNetwork.network.netId : "null");
+                        + (null != mOldNetwork ? mOldNetwork.network.getNetId() : "null")
+                        + " → " + (null != mNewNetwork ? mNewNetwork.network.getNetId() : "null");
             }
         }
 
@@ -6889,7 +7053,7 @@
             }
             newSatisfier.unlingerRequest(nri.request);
             if (!newSatisfier.addRequest(nri.request)) {
-                Slog.wtf(TAG, "BUG: " + newSatisfier.toShortString() + " already has "
+                Log.wtf(TAG, "BUG: " + newSatisfier.toShortString() + " already has "
                         + nri.request);
             }
         } else {
@@ -7222,13 +7386,11 @@
             networkAgent.networkCapabilities.addCapability(NET_CAPABILITY_FOREGROUND);
 
             if (!createNativeNetwork(networkAgent)) return;
-            if (networkAgent.isVPN()) {
-                // Initialize the VPN capabilities to their starting values according to the
-                // underlying networks. This will avoid a spurious callback to
-                // onCapabilitiesUpdated being sent in updateAllVpnCapabilities below as
-                // the VPN would switch from its default, blank capabilities to those
-                // that reflect the capabilities of its underlying networks.
-                updateAllVpnsCapabilities();
+            if (networkAgent.supportsUnderlyingNetworks()) {
+                // Initialize the network's capabilities to their starting values according to the
+                // underlying networks. This ensures that the capabilities are correct before
+                // anything happens to the network.
+                updateCapabilitiesForNetwork(networkAgent);
             }
             networkAgent.created = true;
         }
@@ -7237,7 +7399,7 @@
             networkAgent.everConnected = true;
 
             if (networkAgent.linkProperties == null) {
-                Slog.wtf(TAG, networkAgent.toShortString() + " connected with null LinkProperties");
+                Log.wtf(TAG, networkAgent.toShortString() + " connected with null LinkProperties");
             }
 
             // NetworkCapabilities need to be set before sending the private DNS config to
@@ -7270,10 +7432,6 @@
             // doing.
             updateSignalStrengthThresholds(networkAgent, "CONNECT", null);
 
-            if (networkAgent.isVPN()) {
-                updateAllVpnsCapabilities();
-            }
-
             // Consider network even though it is not yet validated.
             rematchAllNetworksAndRequests();
 
@@ -7528,13 +7686,6 @@
             throwIfLockdownEnabled();
             success = mVpns.get(user).setUnderlyingNetworks(networks);
         }
-        if (success) {
-            mHandler.post(() -> {
-                // Update VPN's capabilities based on updated underlying network set.
-                updateAllVpnsCapabilities();
-                notifyIfacesChangedForNetworkStats();
-            });
-        }
         return success;
     }
 
@@ -7686,7 +7837,7 @@
 
     private void logNetworkEvent(NetworkAgentInfo nai, int evtype) {
         int[] transports = nai.networkCapabilities.getTransportTypes();
-        mMetricsLog.log(nai.network.netId, transports, new NetworkEvent(evtype));
+        mMetricsLog.log(nai.network.getNetId(), transports, new NetworkEvent(evtype));
     }
 
     private static boolean toBool(int encodedBoolean) {
@@ -8092,8 +8243,10 @@
 
         final NetworkRequestInfo nri = cbInfo.mRequestInfo;
 
-        if (uid != nri.mUid) {
-            if (VDBG) loge("Different uid than registrant attempting to unregister cb");
+        // Caller's UID must either be the registrants (if they are unregistering) or the System's
+        // (if the Binder died)
+        if (uid != nri.mUid && uid != Process.SYSTEM_UID) {
+            if (DBG) loge("Uid(" + uid + ") not registrant's (" + nri.mUid + ") or System's");
             return;
         }
 
@@ -8210,13 +8363,12 @@
             return false;
         }
 
-        final Network[] underlyingNetworks;
-        synchronized (mVpns) {
-            final Vpn vpn = getVpnIfOwner(callbackUid);
-            underlyingNetworks = (vpn == null) ? null : vpn.getUnderlyingNetworks();
-        }
-        if (underlyingNetworks != null) {
-            if (Arrays.asList(underlyingNetworks).contains(nai.network)) return true;
+        for (NetworkAgentInfo virtual : mNetworkAgentInfos.values()) {
+            if (virtual.supportsUnderlyingNetworks()
+                    && virtual.networkCapabilities.getOwnerUid() == callbackUid
+                    && ArrayUtils.contains(virtual.declaredUnderlyingNetworks, nai.network)) {
+                return true;
+            }
         }
 
         // Administrator UIDs also contains the Owner UID
@@ -8307,6 +8459,6 @@
                     KEY_TCP_METRICS_COLLECTION_PERIOD_MILLIS);
         }
 
-        notifyDataStallSuspected(p, network.netId);
+        notifyDataStallSuspected(p, network.getNetId());
     }
 }
diff --git a/services/core/java/com/android/server/IpSecService.java b/services/core/java/com/android/server/IpSecService.java
index b2f0c83..f648c3e 100644
--- a/services/core/java/com/android/server/IpSecService.java
+++ b/services/core/java/com/android/server/IpSecService.java
@@ -31,6 +31,7 @@
 import android.content.pm.PackageManager;
 import android.net.IIpSecService;
 import android.net.INetd;
+import android.net.InetAddresses;
 import android.net.IpSecAlgorithm;
 import android.net.IpSecConfig;
 import android.net.IpSecManager;
@@ -41,7 +42,6 @@
 import android.net.IpSecUdpEncapResponse;
 import android.net.LinkAddress;
 import android.net.Network;
-import android.net.NetworkUtils;
 import android.net.TrafficStats;
 import android.net.util.NetdService;
 import android.os.Binder;
@@ -1083,7 +1083,7 @@
             throw new IllegalArgumentException("Unspecified address");
         }
 
-        InetAddress checkAddr = NetworkUtils.numericToInetAddress(inetAddress);
+        InetAddress checkAddr = InetAddresses.parseNumericAddress(inetAddress);
 
         if (checkAddr.isAnyLocalAddress()) {
             throw new IllegalArgumentException("Inappropriate wildcard address: " + inetAddress);
@@ -1467,7 +1467,7 @@
 
     private int getFamily(String inetAddress) {
         int family = AF_UNSPEC;
-        InetAddress checkAddress = NetworkUtils.numericToInetAddress(inetAddress);
+        InetAddress checkAddress = InetAddresses.parseNumericAddress(inetAddress);
         if (checkAddress instanceof Inet4Address) {
             family = AF_INET;
         } else if (checkAddress instanceof Inet6Address) {
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index 1c99465..086cc1c 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -24,12 +24,14 @@
 import static android.net.INetd.FIREWALL_CHAIN_DOZABLE;
 import static android.net.INetd.FIREWALL_CHAIN_NONE;
 import static android.net.INetd.FIREWALL_CHAIN_POWERSAVE;
+import static android.net.INetd.FIREWALL_CHAIN_RESTRICTED;
 import static android.net.INetd.FIREWALL_CHAIN_STANDBY;
 import static android.net.INetd.FIREWALL_DENYLIST;
 import static android.net.INetd.FIREWALL_RULE_ALLOW;
 import static android.net.INetd.FIREWALL_RULE_DENY;
 import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_DOZABLE;
 import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_POWERSAVE;
+import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_RESTRICTED;
 import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_STANDBY;
 import static android.net.NetworkPolicyManager.FIREWALL_RULE_DEFAULT;
 import static android.net.NetworkStats.SET_DEFAULT;
@@ -56,10 +58,8 @@
 import android.net.NetworkPolicyManager;
 import android.net.NetworkStack;
 import android.net.NetworkStats;
-import android.net.NetworkUtils;
 import android.net.RouteInfo;
 import android.net.TetherStatsParcel;
-import android.net.UidRange;
 import android.net.UidRangeParcel;
 import android.net.shared.NetdUtils;
 import android.net.shared.RouteUtils;
@@ -88,7 +88,6 @@
 import android.util.SparseIntArray;
 
 import com.android.internal.annotations.GuardedBy;
-import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.app.IBatteryStats;
 import com.android.internal.util.DumpUtils;
 import com.android.internal.util.FrameworkStatsLog;
@@ -122,7 +121,7 @@
      * Helper class that encapsulates NetworkManagementService dependencies and makes them
      * easier to mock in unit tests.
      */
-    static class SystemServices {
+    static class Dependencies {
         public IBinder getService(String name) {
             return ServiceManager.getService(name);
         }
@@ -132,6 +131,10 @@
         public INetd getNetd() {
             return NetdService.get();
         }
+
+        public int getCallingUid() {
+            return Binder.getCallingUid();
+        }
     }
 
     private static final String TAG = "NetworkManagement";
@@ -157,7 +160,7 @@
 
     private final Handler mDaemonHandler;
 
-    private final SystemServices mServices;
+    private final Dependencies mDeps;
 
     private INetd mNetdService;
 
@@ -215,6 +218,11 @@
      */
     @GuardedBy("mRulesLock")
     private SparseIntArray mUidFirewallPowerSaveRules = new SparseIntArray();
+    /**
+     * Contains the per-UID firewall rules that are used when Restricted Networking Mode is enabled.
+     */
+    @GuardedBy("mRulesLock")
+    private SparseIntArray mUidFirewallRestrictedRules = new SparseIntArray();
     /** Set of states for the child firewall chains. True if the chain is active. */
     @GuardedBy("mRulesLock")
     final SparseBooleanArray mFirewallChainStates = new SparseBooleanArray();
@@ -254,33 +262,32 @@
      * @param context  Binder context for this service
      */
     private NetworkManagementService(
-            Context context, SystemServices services) {
+            Context context, Dependencies deps) {
         mContext = context;
-        mServices = services;
+        mDeps = deps;
 
         mDaemonHandler = new Handler(FgThread.get().getLooper());
 
         mNetdUnsolicitedEventListener = new NetdUnsolicitedEventListener();
 
-        mServices.registerLocalService(new LocalService());
+        mDeps.registerLocalService(new LocalService());
 
         synchronized (mTetheringStatsProviders) {
             mTetheringStatsProviders.put(new NetdTetheringStatsProvider(), "netd");
         }
     }
 
-    @VisibleForTesting
-    NetworkManagementService() {
+    private NetworkManagementService() {
         mContext = null;
         mDaemonHandler = null;
-        mServices = null;
+        mDeps = null;
         mNetdUnsolicitedEventListener = null;
     }
 
-    static NetworkManagementService create(Context context, SystemServices services)
+    static NetworkManagementService create(Context context, Dependencies deps)
             throws InterruptedException {
         final NetworkManagementService service =
-                new NetworkManagementService(context, services);
+                new NetworkManagementService(context, deps);
         if (DBG) Slog.d(TAG, "Creating NetworkManagementService");
         if (DBG) Slog.d(TAG, "Connecting native netd service");
         service.connectNativeNetdService();
@@ -289,7 +296,7 @@
     }
 
     public static NetworkManagementService create(Context context) throws InterruptedException {
-        return create(context, new SystemServices());
+        return create(context, new Dependencies());
     }
 
     public void systemReady() {
@@ -310,7 +317,7 @@
                 return mBatteryStats;
             }
             mBatteryStats =
-                    IBatteryStats.Stub.asInterface(mServices.getService(BatteryStats.SERVICE_NAME));
+                    IBatteryStats.Stub.asInterface(mDeps.getService(BatteryStats.SERVICE_NAME));
             return mBatteryStats;
         }
     }
@@ -511,7 +518,7 @@
     }
 
     private void connectNativeNetdService() {
-        mNetdService = mServices.getNetd();
+        mNetdService = mDeps.getNetd();
         try {
             mNetdService.registerUnsolicitedEventListener(mNetdUnsolicitedEventListener);
             if (DBG) Slog.d(TAG, "Register unsolicited event listener");
@@ -602,9 +609,15 @@
             syncFirewallChainLocked(FIREWALL_CHAIN_STANDBY, "standby ");
             syncFirewallChainLocked(FIREWALL_CHAIN_DOZABLE, "dozable ");
             syncFirewallChainLocked(FIREWALL_CHAIN_POWERSAVE, "powersave ");
+            syncFirewallChainLocked(FIREWALL_CHAIN_RESTRICTED, "restricted ");
 
-            final int[] chains =
-                    {FIREWALL_CHAIN_STANDBY, FIREWALL_CHAIN_DOZABLE, FIREWALL_CHAIN_POWERSAVE};
+            final int[] chains = {
+                    FIREWALL_CHAIN_STANDBY,
+                    FIREWALL_CHAIN_DOZABLE,
+                    FIREWALL_CHAIN_POWERSAVE,
+                    FIREWALL_CHAIN_RESTRICTED
+            };
+
             for (int chain : chains) {
                 if (getFirewallChainState(chain)) {
                     setFirewallChainEnabled(chain, true);
@@ -788,7 +801,7 @@
         InterfaceConfiguration cfg = new InterfaceConfiguration();
         cfg.setHardwareAddress(p.hwAddr);
 
-        final InetAddress addr = NetworkUtils.numericToInetAddress(p.ipv4Addr);
+        final InetAddress addr = InetAddresses.parseNumericAddress(p.ipv4Addr);
         cfg.setLinkAddress(new LinkAddress(addr, p.prefixLength));
         for (String flag : p.flags) {
             cfg.setFlag(flag);
@@ -1379,38 +1392,6 @@
         }
     }
 
-    private static UidRangeParcel makeUidRangeParcel(int start, int stop) {
-        UidRangeParcel range = new UidRangeParcel();
-        range.start = start;
-        range.stop = stop;
-        return range;
-    }
-
-    private static UidRangeParcel[] toStableParcels(UidRange[] ranges) {
-        UidRangeParcel[] stableRanges = new UidRangeParcel[ranges.length];
-        for (int i = 0; i < ranges.length; i++) {
-            stableRanges[i] = makeUidRangeParcel(ranges[i].start, ranges[i].stop);
-        }
-        return stableRanges;
-    }
-
-    @Override
-    public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges)
-            throws ServiceSpecificException {
-        NetworkStack.checkNetworkStackPermission(mContext);
-        try {
-            mNetdService.networkRejectNonSecureVpn(add, toStableParcels(uidRanges));
-        } catch (ServiceSpecificException e) {
-            Log.w(TAG, "setAllowOnlyVpnForUids(" + add + ", " + Arrays.toString(uidRanges) + ")"
-                    + ": netd command failed", e);
-            throw e;
-        } catch (RemoteException e) {
-            Log.w(TAG, "setAllowOnlyVpnForUids(" + add + ", " + Arrays.toString(uidRanges) + ")"
-                    + ": netd command failed", e);
-            throw e.rethrowAsRuntimeException();
-        }
-    }
-
     private void applyUidCleartextNetworkPolicy(int uid, int policy) {
         final int policyValue;
         switch (policy) {
@@ -1437,7 +1418,7 @@
 
     @Override
     public void setUidCleartextNetworkPolicy(int uid, int policy) {
-        if (Binder.getCallingUid() != uid) {
+        if (mDeps.getCallingUid() != uid) {
             NetworkStack.checkNetworkStackPermission(mContext);
         }
 
@@ -1539,27 +1520,6 @@
     }
 
     @Override
-    public void addVpnUidRanges(int netId, UidRange[] ranges) {
-        NetworkStack.checkNetworkStackPermission(mContext);
-
-        try {
-            mNetdService.networkAddUidRanges(netId, toStableParcels(ranges));
-        } catch (RemoteException | ServiceSpecificException e) {
-            throw new IllegalStateException(e);
-        }
-    }
-
-    @Override
-    public void removeVpnUidRanges(int netId, UidRange[] ranges) {
-        NetworkStack.checkNetworkStackPermission(mContext);
-        try {
-            mNetdService.networkRemoveUidRanges(netId, toStableParcels(ranges));
-        } catch (RemoteException | ServiceSpecificException e) {
-            throw new IllegalStateException(e);
-        }
-    }
-
-    @Override
     public void setFirewallEnabled(boolean enabled) {
         enforceSystemUid();
         try {
@@ -1602,7 +1562,7 @@
             ranges = new UidRangeParcel[] {
                 // TODO: is there a better way of finding all existing users? If so, we could
                 // specify their ranges here.
-                makeUidRangeParcel(Process.FIRST_APPLICATION_UID, Integer.MAX_VALUE),
+                new UidRangeParcel(Process.FIRST_APPLICATION_UID, Integer.MAX_VALUE),
             };
             // ... except for the UIDs that have allow rules.
             synchronized (mRulesLock) {
@@ -1633,7 +1593,7 @@
                 for (int i = 0; i < ranges.length; i++) {
                     if (rules.valueAt(i) == FIREWALL_RULE_DENY) {
                         int uid = rules.keyAt(i);
-                        ranges[numUids] = makeUidRangeParcel(uid, uid);
+                        ranges[numUids] = new UidRangeParcel(uid, uid);
                         numUids++;
                     }
                 }
@@ -1695,6 +1655,8 @@
                 return FIREWALL_CHAIN_NAME_DOZABLE;
             case FIREWALL_CHAIN_POWERSAVE:
                 return FIREWALL_CHAIN_NAME_POWERSAVE;
+            case FIREWALL_CHAIN_RESTRICTED:
+                return FIREWALL_CHAIN_NAME_RESTRICTED;
             default:
                 throw new IllegalArgumentException("Bad child chain: " + chain);
         }
@@ -1708,6 +1670,8 @@
                 return FIREWALL_ALLOWLIST;
             case FIREWALL_CHAIN_POWERSAVE:
                 return FIREWALL_ALLOWLIST;
+            case FIREWALL_CHAIN_RESTRICTED:
+                return FIREWALL_ALLOWLIST;
             default:
                 return isFirewallEnabled() ? FIREWALL_ALLOWLIST : FIREWALL_DENYLIST;
         }
@@ -1752,6 +1716,9 @@
                     case FIREWALL_CHAIN_POWERSAVE:
                         mNetdService.firewallReplaceUidChain("fw_powersave", true, uids);
                         break;
+                    case FIREWALL_CHAIN_RESTRICTED:
+                        mNetdService.firewallReplaceUidChain("fw_restricted", true, uids);
+                        break;
                     case FIREWALL_CHAIN_NONE:
                     default:
                         Slog.d(TAG, "setFirewallUidRules() called on invalid chain: " + chain);
@@ -1836,6 +1803,8 @@
                 return mUidFirewallDozableRules;
             case FIREWALL_CHAIN_POWERSAVE:
                 return mUidFirewallPowerSaveRules;
+            case FIREWALL_CHAIN_RESTRICTED:
+                return mUidFirewallRestrictedRules;
             case FIREWALL_CHAIN_NONE:
                 return mUidFirewallRules;
             default:
@@ -1851,8 +1820,8 @@
         return rule;
     }
 
-    private static void enforceSystemUid() {
-        final int uid = Binder.getCallingUid();
+    private void enforceSystemUid() {
+        final int uid = mDeps.getCallingUid();
         if (uid != Process.SYSTEM_UID) {
             throw new SecurityException("Only available to AID_SYSTEM");
         }
@@ -1910,17 +1879,22 @@
         synchronized (mRulesLock) {
             dumpUidFirewallRule(pw, "", mUidFirewallRules);
 
-            pw.print("UID firewall standby chain enabled: "); pw.println(
-                    getFirewallChainState(FIREWALL_CHAIN_STANDBY));
+            pw.print("UID firewall standby chain enabled: ");
+            pw.println(getFirewallChainState(FIREWALL_CHAIN_STANDBY));
             dumpUidFirewallRule(pw, FIREWALL_CHAIN_NAME_STANDBY, mUidFirewallStandbyRules);
 
-            pw.print("UID firewall dozable chain enabled: "); pw.println(
-                    getFirewallChainState(FIREWALL_CHAIN_DOZABLE));
+            pw.print("UID firewall dozable chain enabled: ");
+            pw.println(getFirewallChainState(FIREWALL_CHAIN_DOZABLE));
             dumpUidFirewallRule(pw, FIREWALL_CHAIN_NAME_DOZABLE, mUidFirewallDozableRules);
 
-            pw.println("UID firewall powersave chain enabled: " +
-                    getFirewallChainState(FIREWALL_CHAIN_POWERSAVE));
+            pw.print("UID firewall powersave chain enabled: ");
+            pw.println(getFirewallChainState(FIREWALL_CHAIN_POWERSAVE));
             dumpUidFirewallRule(pw, FIREWALL_CHAIN_NAME_POWERSAVE, mUidFirewallPowerSaveRules);
+
+            pw.print("UID firewall restricted mode chain enabled: ");
+            pw.println(getFirewallChainState(FIREWALL_CHAIN_RESTRICTED));
+            dumpUidFirewallRule(pw, FIREWALL_CHAIN_NAME_RESTRICTED,
+                    mUidFirewallRestrictedRules);
         }
 
         synchronized (mIdleTimerLock) {
@@ -2071,6 +2045,11 @@
                 if (DBG) Slog.d(TAG, "Uid " + uid + " restricted because of power saver mode");
                 return true;
             }
+            if (getFirewallChainState(FIREWALL_CHAIN_RESTRICTED)
+                    && mUidFirewallRestrictedRules.get(uid) != FIREWALL_RULE_ALLOW) {
+                if (DBG) Slog.d(TAG, "Uid " + uid + " restricted because of restricted mode");
+                return true;
+            }
             if (mUidRejectOnMetered.get(uid)) {
                 if (DBG) Slog.d(TAG, "Uid " + uid + " restricted because of no metered data"
                         + " in the background");
@@ -2096,60 +2075,10 @@
         }
     }
 
-    @VisibleForTesting
-    class LocalService extends NetworkManagementInternal {
+    private class LocalService extends NetworkManagementInternal {
         @Override
         public boolean isNetworkRestrictedForUid(int uid) {
             return isNetworkRestrictedInternal(uid);
         }
     }
-
-    @VisibleForTesting
-    Injector getInjector() {
-        return new Injector();
-    }
-
-    @VisibleForTesting
-    class Injector {
-        void setDataSaverMode(boolean dataSaverMode) {
-            mDataSaverMode = dataSaverMode;
-        }
-
-        void setFirewallChainState(int chain, boolean state) {
-            NetworkManagementService.this.setFirewallChainState(chain, state);
-        }
-
-        void setFirewallRule(int chain, int uid, int rule) {
-            synchronized (mRulesLock) {
-                getUidFirewallRulesLR(chain).put(uid, rule);
-            }
-        }
-
-        void setUidOnMeteredNetworkList(boolean denylist, int uid, boolean enable) {
-            synchronized (mRulesLock) {
-                if (denylist) {
-                    mUidRejectOnMetered.put(uid, enable);
-                } else {
-                    mUidAllowOnMetered.put(uid, enable);
-                }
-            }
-        }
-
-        void reset() {
-            synchronized (mRulesLock) {
-                setDataSaverMode(false);
-                final int[] chains = {
-                        FIREWALL_CHAIN_DOZABLE,
-                        FIREWALL_CHAIN_STANDBY,
-                        FIREWALL_CHAIN_POWERSAVE
-                };
-                for (int chain : chains) {
-                    setFirewallChainState(chain, false);
-                    getUidFirewallRulesLR(chain).clear();
-                }
-                mUidAllowOnMetered.clear();
-                mUidRejectOnMetered.clear();
-            }
-        }
-    }
 }
diff --git a/services/core/java/com/android/server/OWNERS b/services/core/java/com/android/server/OWNERS
index 8099f8f..85523f7 100644
--- a/services/core/java/com/android/server/OWNERS
+++ b/services/core/java/com/android/server/OWNERS
@@ -7,3 +7,27 @@
 
 # Zram writeback
 per-file ZramWriteback.java = minchan@google.com, rajekumar@google.com, srnvs@google.com
+
+# Userspace reboot
+per-file UserspaceRebootLogger.java = ioffe@google.com, tomcherry@google.com
+
+# Sensor Privacy
+per-file SensorPrivacyService.java = file:platform/frameworks/native:/libs/sensorprivacy/OWNERS
+
+per-file *Alarm* = file:/apex/jobscheduler/OWNERS
+per-file *AppOp* = file:/core/java/android/permission/OWNERS
+per-file *Bluetooth* = file:/core/java/android/bluetooth/OWNERS
+per-file *Gnss* = file:/services/core/java/com/android/server/location/OWNERS
+per-file *Location* = file:/services/core/java/com/android/server/location/OWNERS
+per-file *Network* = file:/services/core/java/com/android/server/net/OWNERS
+per-file *Storage* = file:/core/java/android/os/storage/OWNERS
+per-file *TimeUpdate* = file:/core/java/android/app/timezone/OWNERS
+per-file ConnectivityService.java = file:/services/core/java/com/android/server/net/OWNERS
+per-file GestureLauncherService.java = file:platform/packages/apps/EmergencyInfo:/OWNERS
+per-file IpSecService.java = file:/services/core/java/com/android/server/net/OWNERS
+per-file MmsServiceBroker.java = file:/telephony/OWNERS
+per-file NetIdManager.java = file:/services/core/java/com/android/server/net/OWNERS
+per-file PackageWatchdog.java = file:/services/core/java/com/android/server/rollback/OWNERS
+per-file TelephonyRegistry.java = file:/telephony/OWNERS
+per-file UiModeManagerService.java = file:/packages/SystemUI/OWNERS
+per-file VcnManagementService.java = file:/services/core/java/com/android/server/vcn/OWNERS
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index 1147db5..dd497a6 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -1391,12 +1391,13 @@
                     final int oldState = vol.state;
                     final int newState = state;
                     vol.state = newState;
+                    final VolumeInfo vInfo = new VolumeInfo(vol);
                     final SomeArgs args = SomeArgs.obtain();
-                    args.arg1 = vol;
+                    args.arg1 = vInfo;
                     args.arg2 = oldState;
                     args.arg3 = newState;
                     mHandler.obtainMessage(H_VOLUME_STATE_CHANGED, args).sendToTarget();
-                    onVolumeStateChangedLocked(vol, oldState, newState);
+                    onVolumeStateChangedLocked(vInfo, oldState, newState);
                 }
             }
         }
@@ -4611,14 +4612,7 @@
 
                     // Create package obb and data dir if it doesn't exist.
                     int appUid = UserHandle.getUid(userId, mPmInternal.getPackage(pkg).getUid());
-                    File file = new File(packageObbDir);
-                    if (!file.exists()) {
-                        vold.setupAppDir(packageObbDir, appUid);
-                    }
-                    file = new File(packageDataDir);
-                    if (!file.exists()) {
-                        vold.setupAppDir(packageDataDir, appUid);
-                    }
+                    vold.ensureAppDirsCreated(new String[] {packageObbDir, packageDataDir}, appUid);
                 }
             } catch (ServiceManager.ServiceNotFoundException | RemoteException e) {
                 Slog.e(TAG, "Unable to create obb and data directories for " + processName,e);
@@ -4745,15 +4739,20 @@
             }
         }
 
-        public void onAppOpsChanged(int code, int uid, @Nullable String packageName, int mode) {
+        public void onAppOpsChanged(int code, int uid, @Nullable String packageName, int mode,
+                int previousMode) {
             final long token = Binder.clearCallingIdentity();
             try {
                 if (mIsFuseEnabled) {
                     // When using FUSE, we may need to kill the app if the op changes
                     switch(code) {
                         case OP_REQUEST_INSTALL_PACKAGES:
-                            // Always kill regardless of op change, to remount apps /storage
-                            killAppForOpChange(code, uid);
+                            if (previousMode == MODE_ALLOWED || mode == MODE_ALLOWED) {
+                                // If we transition to/from MODE_ALLOWED, kill the app to make
+                                // sure it has the correct view of /storage. Changing between
+                                // MODE_DEFAULT / MODE_ERRORED is a no-op
+                                killAppForOpChange(code, uid);
+                            }
                             return;
                         case OP_MANAGE_EXTERNAL_STORAGE:
                             if (mode != MODE_ALLOWED) {
diff --git a/services/core/java/com/android/server/SystemServiceManager.java b/services/core/java/com/android/server/SystemServiceManager.java
index 74bb7d7..9205737 100644
--- a/services/core/java/com/android/server/SystemServiceManager.java
+++ b/services/core/java/com/android/server/SystemServiceManager.java
@@ -20,6 +20,7 @@
 import android.annotation.UserIdInt;
 import android.content.Context;
 import android.content.pm.UserInfo;
+import android.os.Build;
 import android.os.Environment;
 import android.os.SystemClock;
 import android.os.Trace;
@@ -28,6 +29,7 @@
 import android.util.ArrayMap;
 import android.util.Slog;
 
+import com.android.internal.os.ClassLoaderFactory;
 import com.android.server.SystemService.TargetUser;
 import com.android.server.utils.TimingsTraceAndSlog;
 
@@ -99,7 +101,10 @@
         if (pathClassLoader == null) {
             // NB: the parent class loader should always be the system server class loader.
             // Changing it has implications that require discussion with the mainline team.
-            pathClassLoader = new PathClassLoader(path, this.getClass().getClassLoader());
+            pathClassLoader = (PathClassLoader) ClassLoaderFactory.createClassLoader(
+                    path, null /* librarySearchPath */, null /* libraryPermittedPath */,
+                    this.getClass().getClassLoader(), Build.VERSION.SDK_INT,
+                    true /* isNamespaceShared */, null /* classLoaderName */);
             mLoadedPaths.put(path, pathClassLoader);
         }
         final Class<SystemService> serviceClass = loadClassFromLoader(className, pathClassLoader);
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 1cdc95a..eb1123e 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -315,11 +315,10 @@
     private List<Map<Pair<Integer, ApnSetting>, PreciseDataConnectionState>>
             mPreciseDataConnectionStates;
 
-    static final int ENFORCE_COARSE_LOCATION_PERMISSION_MASK =
-            PhoneStateListener.LISTEN_REGISTRATION_FAILURE
-                    | PhoneStateListener.LISTEN_BARRING_INFO;
-
-    static final int ENFORCE_FINE_LOCATION_PERMISSION_MASK =
+    // Starting in Q, almost all cellular location requires FINE location enforcement.
+    // Prior to Q, cellular was available with COARSE location enforcement. Bits in this
+    // list will be checked for COARSE on apps targeting P or earlier and FINE on Q or later.
+    static final int ENFORCE_LOCATION_PERMISSION_MASK =
             PhoneStateListener.LISTEN_CELL_LOCATION
                     | PhoneStateListener.LISTEN_CELL_INFO
                     | PhoneStateListener.LISTEN_REGISTRATION_FAILURE
@@ -376,7 +375,7 @@
                                 + " newDefaultPhoneId=" + newDefaultPhoneId);
                     }
 
-                    //Due to possible risk condition,(notify call back using the new
+                    //Due to possible race condition,(notify call back using the new
                     //defaultSubId comes before new defaultSubId update) we need to recall all
                     //possible missed notify callback
                     synchronized (mRecords) {
@@ -909,7 +908,8 @@
                     if (validateEventsAndUserLocked(r, PhoneStateListener.LISTEN_CELL_LOCATION)) {
                         try {
                             if (DBG_LOC) log("listen: mCellIdentity = " + mCellIdentity[phoneId]);
-                            if (checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
+                            if (checkCoarseLocationAccess(r, Build.VERSION_CODES.BASE)
+                                    && checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
                                 // null will be translated to empty CellLocation object in client.
                                 r.callback.onCellLocationChanged(mCellIdentity[phoneId]);
                             }
@@ -964,7 +964,8 @@
                         try {
                             if (DBG_LOC) log("listen: mCellInfo[" + phoneId + "] = "
                                     + mCellInfo.get(phoneId));
-                            if (checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
+                            if (checkCoarseLocationAccess(r, Build.VERSION_CODES.BASE)
+                                    && checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
                                 r.callback.onCellInfoChanged(mCellInfo.get(phoneId));
                             }
                         } catch (RemoteException ex) {
@@ -1518,7 +1519,8 @@
                 for (Record r : mRecords) {
                     if (validateEventsAndUserLocked(r, PhoneStateListener.LISTEN_CELL_INFO) &&
                             idMatch(r.subId, subId, phoneId) &&
-                            checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
+                            (checkCoarseLocationAccess(r, Build.VERSION_CODES.BASE)
+                                    && checkFineLocationAccess(r, Build.VERSION_CODES.Q))) {
                         try {
                             if (DBG_LOC) {
                                 log("notifyCellInfoForSubscriber: mCellInfo=" + cellInfo
@@ -1797,7 +1799,8 @@
                 for (Record r : mRecords) {
                     if (validateEventsAndUserLocked(r, PhoneStateListener.LISTEN_CELL_LOCATION) &&
                             idMatch(r.subId, subId, phoneId) &&
-                            checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
+                            (checkCoarseLocationAccess(r, Build.VERSION_CODES.BASE)
+                                    && checkFineLocationAccess(r, Build.VERSION_CODES.Q))) {
                         try {
                             if (DBG_LOC) {
                                 log("notifyCellLocation: cellIdentity=" + cellIdentity
@@ -2542,19 +2545,13 @@
                 .setCallingPid(Binder.getCallingPid())
                 .setCallingUid(Binder.getCallingUid());
 
-        boolean shouldCheckLocationPermissions = false;
-        if ((events & ENFORCE_COARSE_LOCATION_PERMISSION_MASK) != 0) {
-            locationQueryBuilder.setMinSdkVersionForCoarse(0);
-            shouldCheckLocationPermissions = true;
-        }
-
-        if ((events & ENFORCE_FINE_LOCATION_PERMISSION_MASK) != 0) {
+        if ((events & ENFORCE_LOCATION_PERMISSION_MASK) != 0) {
             // Everything that requires fine location started in Q. So far...
             locationQueryBuilder.setMinSdkVersionForFine(Build.VERSION_CODES.Q);
-            shouldCheckLocationPermissions = true;
-        }
+            // If we're enforcing fine starting in Q, we also want to enforce coarse even for
+            // older SDK versions.
+            locationQueryBuilder.setMinSdkVersionForCoarse(0);
 
-        if (shouldCheckLocationPermissions) {
             LocationAccessPolicy.LocationPermissionResult result =
                     LocationAccessPolicy.checkLocationPermission(
                             mContext, locationQueryBuilder.build());
@@ -2721,8 +2718,16 @@
             try {
                 if (VDBG) log("checkPossibleMissNotify: onServiceStateChanged state=" +
                         mServiceState[phoneId]);
-                r.callback.onServiceStateChanged(
-                        new ServiceState(mServiceState[phoneId]));
+                ServiceState ss = new ServiceState(mServiceState[phoneId]);
+                if (checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
+                    r.callback.onServiceStateChanged(ss);
+                } else if (checkCoarseLocationAccess(r, Build.VERSION_CODES.Q)) {
+                    r.callback.onServiceStateChanged(
+                            ss.createLocationInfoSanitizedCopy(false));
+                } else {
+                    r.callback.onServiceStateChanged(
+                            ss.createLocationInfoSanitizedCopy(true));
+                }
             } catch (RemoteException ex) {
                 mRemoveList.add(r.binder);
             }
@@ -2767,7 +2772,8 @@
                     log("checkPossibleMissNotify: onCellInfoChanged[" + phoneId + "] = "
                             + mCellInfo.get(phoneId));
                 }
-                if (checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
+                if (checkCoarseLocationAccess(r, Build.VERSION_CODES.BASE)
+                        && checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
                     r.callback.onCellInfoChanged(mCellInfo.get(phoneId));
                 }
             } catch (RemoteException ex) {
@@ -2833,7 +2839,8 @@
                     log("checkPossibleMissNotify: onCellLocationChanged mCellIdentity = "
                             + mCellIdentity[phoneId]);
                 }
-                if (checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
+                if (checkCoarseLocationAccess(r, Build.VERSION_CODES.BASE)
+                        && checkFineLocationAccess(r, Build.VERSION_CODES.Q)) {
                     // null will be translated to empty CellLocation object in client.
                     r.callback.onCellLocationChanged(mCellIdentity[phoneId]);
                 }
diff --git a/services/core/java/com/android/server/TestNetworkService.java b/services/core/java/com/android/server/TestNetworkService.java
index d6bd5a1..655d8ab 100644
--- a/services/core/java/com/android/server/TestNetworkService.java
+++ b/services/core/java/com/android/server/TestNetworkService.java
@@ -29,9 +29,9 @@
 import android.net.LinkAddress;
 import android.net.LinkProperties;
 import android.net.NetworkAgent;
+import android.net.NetworkAgentConfig;
 import android.net.NetworkCapabilities;
-import android.net.NetworkInfo;
-import android.net.NetworkInfo.DetailedState;
+import android.net.NetworkProvider;
 import android.net.RouteInfo;
 import android.net.StringNetworkSpecifier;
 import android.net.TestNetworkInterface;
@@ -61,8 +61,8 @@
 
 /** @hide */
 class TestNetworkService extends ITestNetworkManager.Stub {
-    @NonNull private static final String TAG = TestNetworkService.class.getSimpleName();
-    @NonNull private static final String TEST_NETWORK_TYPE = "TEST_NETWORK";
+    @NonNull private static final String TEST_NETWORK_LOGTAG = "TestNetworkAgent";
+    @NonNull private static final String TEST_NETWORK_PROVIDER_NAME = "TestNetworkProvider";
     @NonNull private static final AtomicInteger sTestTunIndex = new AtomicInteger();
 
     @NonNull private final Context mContext;
@@ -72,6 +72,9 @@
     @NonNull private final HandlerThread mHandlerThread;
     @NonNull private final Handler mHandler;
 
+    @NonNull private final ConnectivityManager mCm;
+    @NonNull private final NetworkProvider mNetworkProvider;
+
     // Native method stubs
     private static native int jniCreateTunTap(boolean isTun, @NonNull String iface);
 
@@ -85,6 +88,10 @@
         mContext = Objects.requireNonNull(context, "missing Context");
         mNMS = Objects.requireNonNull(netManager, "missing INetworkManagementService");
         mNetd = Objects.requireNonNull(NetdService.getInstance(), "could not get netd instance");
+        mCm = mContext.getSystemService(ConnectivityManager.class);
+        mNetworkProvider = new NetworkProvider(mContext, mHandler.getLooper(),
+                TEST_NETWORK_PROVIDER_NAME);
+        mCm.registerNetworkProvider(mNetworkProvider);
     }
 
     /**
@@ -150,9 +157,6 @@
         private static final int NETWORK_SCORE = 1; // Use a low, non-zero score.
 
         private final int mUid;
-        @NonNull private final NetworkInfo mNi;
-        @NonNull private final NetworkCapabilities mNc;
-        @NonNull private final LinkProperties mLp;
 
         @GuardedBy("mBinderLock")
         @NonNull
@@ -161,21 +165,17 @@
         @NonNull private final Object mBinderLock = new Object();
 
         private TestNetworkAgent(
-                @NonNull Looper looper,
                 @NonNull Context context,
-                @NonNull NetworkInfo ni,
+                @NonNull Looper looper,
                 @NonNull NetworkCapabilities nc,
                 @NonNull LinkProperties lp,
+                @NonNull NetworkAgentConfig config,
                 int uid,
-                @NonNull IBinder binder)
+                @NonNull IBinder binder,
+                @NonNull NetworkProvider np)
                 throws RemoteException {
-            super(looper, context, TEST_NETWORK_TYPE, ni, nc, lp, NETWORK_SCORE);
-
+            super(context, looper, TEST_NETWORK_LOGTAG, nc, lp, NETWORK_SCORE, config, np);
             mUid = uid;
-            mNi = ni;
-            mNc = nc;
-            mLp = lp;
-
             synchronized (mBinderLock) {
                 mBinder = binder; // Binder null-checks in create()
 
@@ -203,9 +203,7 @@
         }
 
         private void teardown() {
-            mNi.setDetailedState(DetailedState.DISCONNECTED, null, null);
-            mNi.setIsAvailable(false);
-            sendNetworkInfo(mNi);
+            unregister();
 
             // Synchronize on mBinderLock to ensure that unlinkToDeath is never called more than
             // once (otherwise it could throw an exception)
@@ -219,7 +217,7 @@
             // Has to be in TestNetworkAgent to ensure all teardown codepaths properly clean up
             // resources, even for binder death or unwanted calls.
             synchronized (mTestNetworkTracker) {
-                mTestNetworkTracker.remove(getNetwork().netId);
+                mTestNetworkTracker.remove(getNetwork().getNetId());
             }
         }
     }
@@ -238,11 +236,6 @@
         Objects.requireNonNull(context, "missing Context");
         // iface and binder validity checked by caller
 
-        // Build network info with special testing type
-        NetworkInfo ni = new NetworkInfo(ConnectivityManager.TYPE_TEST, 0, TEST_NETWORK_TYPE, "");
-        ni.setDetailedState(DetailedState.CONNECTED, null, null);
-        ni.setIsAvailable(true);
-
         // Build narrow set of NetworkCapabilities, useful only for testing
         NetworkCapabilities nc = new NetworkCapabilities();
         nc.clearAll(); // Remove default capabilities.
@@ -290,7 +283,12 @@
             lp.addRoute(new RouteInfo(new IpPrefix(Inet6Address.ANY, 0), null, iface));
         }
 
-        return new TestNetworkAgent(looper, context, ni, nc, lp, callingUid, binder);
+        final TestNetworkAgent agent = new TestNetworkAgent(context, looper, nc, lp,
+                new NetworkAgentConfig.Builder().build(), callingUid, binder,
+                mNetworkProvider);
+        agent.register();
+        agent.markConnected();
+        return agent;
     }
 
     /**
@@ -338,7 +336,7 @@
                                 administratorUids,
                                 binder);
 
-                mTestNetworkTracker.put(agent.getNetwork().netId, agent);
+                mTestNetworkTracker.put(agent.getNetwork().getNetId(), agent);
             }
         } catch (SocketException e) {
             throw new UncheckedIOException(e);
diff --git a/services/core/java/com/android/server/UiModeManagerService.java b/services/core/java/com/android/server/UiModeManagerService.java
index be080e5..daae1a1 100644
--- a/services/core/java/com/android/server/UiModeManagerService.java
+++ b/services/core/java/com/android/server/UiModeManagerService.java
@@ -134,6 +134,7 @@
     int mCurUiMode = 0;
     private int mSetUiMode = 0;
     private boolean mHoldingConfiguration = false;
+    private int mCurrentUser;
 
     private Configuration mConfiguration = new Configuration();
     boolean mSystemReady;
@@ -323,6 +324,7 @@
     @Override
     public void onSwitchUser(int userHandle) {
         super.onSwitchUser(userHandle);
+      	mCurrentUser = userHandle;
         getContext().getContentResolver().unregisterContentObserver(mSetupWizardObserver);
         verifySetupWizardCompleted();
     }
@@ -485,6 +487,9 @@
      * @return True if the new value is different from the old value. False otherwise.
      */
     private boolean updateNightModeFromSettingsLocked(Context context, Resources res, int userId) {
+        if (mCarModeEnabled || mCar) {
+            return false;
+        }
         int oldNightMode = mNightMode;
         if (mSetupWizardComplete) {
             mNightMode = Secure.getIntForUser(context.getContentResolver(),
@@ -725,16 +730,30 @@
 
         @Override
         public boolean setNightModeActivated(boolean active) {
+            if (isNightModeLocked() && (getContext().checkCallingOrSelfPermission(
+                    android.Manifest.permission.MODIFY_DAY_NIGHT_MODE)
+                    != PackageManager.PERMISSION_GRANTED)) {
+                Slog.e(TAG, "Night mode locked, requires MODIFY_DAY_NIGHT_MODE permission");
+                return false;
+            }
+            final int user = Binder.getCallingUserHandle().getIdentifier();
+            if (user != mCurrentUser && getContext().checkCallingOrSelfPermission(
+                    android.Manifest.permission.INTERACT_ACROSS_USERS)
+                    != PackageManager.PERMISSION_GRANTED) {
+                Slog.e(TAG, "Target user is not current user,"
+                        + " INTERACT_ACROSS_USERS permission is required");
+                return false;
+
+            }
             synchronized (mLock) {
-                final int user = UserHandle.getCallingUserId();
                 final long ident = Binder.clearCallingIdentity();
                 try {
                     if (mNightMode == MODE_NIGHT_AUTO || mNightMode == MODE_NIGHT_CUSTOM) {
                         unregisterScreenOffEventLocked();
                         mOverrideNightModeOff = !active;
                         mOverrideNightModeOn = active;
-                        mOverrideNightModeUser = user;
-                        persistNightModeOverrides(user);
+                        mOverrideNightModeUser = mCurrentUser;
+                        persistNightModeOverrides(mCurrentUser);
                     } else if (mNightMode == UiModeManager.MODE_NIGHT_NO
                             && active) {
                         mNightMode = UiModeManager.MODE_NIGHT_YES;
@@ -744,7 +763,7 @@
                     }
                     updateConfigurationLocked();
                     applyConfigurationExternallyLocked();
-                    persistNightMode(user);
+                    persistNightMode(mCurrentUser);
                     return true;
                 } finally {
                     Binder.restoreCallingIdentity(ident);
@@ -1015,7 +1034,7 @@
 
     private void persistNightMode(int user) {
         // Only persist setting if not in car mode
-        if (mCarModeEnabled) return;
+        if (mCarModeEnabled || mCar) return;
         Secure.putIntForUser(getContext().getContentResolver(),
                 Secure.UI_NIGHT_MODE, mNightMode, user);
         Secure.putLongForUser(getContext().getContentResolver(),
@@ -1028,7 +1047,7 @@
 
     private void persistNightModeOverrides(int user) {
         // Only persist setting if not in car mode
-        if (mCarModeEnabled) return;
+        if (mCarModeEnabled || mCar) return;
         Secure.putIntForUser(getContext().getContentResolver(),
                 Secure.UI_NIGHT_MODE_OVERRIDE_ON, mOverrideNightModeOn ? 1 : 0, user);
         Secure.putIntForUser(getContext().getContentResolver(),
@@ -1079,7 +1098,7 @@
         }
 
         // Override night mode in power save mode if not in car mode
-        if (mPowerSave && !mCarModeEnabled) {
+        if (mPowerSave && !mCarModeEnabled && !mCar) {
             uiMode &= ~Configuration.UI_MODE_NIGHT_NO;
             uiMode |= Configuration.UI_MODE_NIGHT_YES;
         } else {
diff --git a/services/core/java/com/android/server/UserspaceRebootLogger.java b/services/core/java/com/android/server/UserspaceRebootLogger.java
index 2403b63..89327b5 100644
--- a/services/core/java/com/android/server/UserspaceRebootLogger.java
+++ b/services/core/java/com/android/server/UserspaceRebootLogger.java
@@ -59,7 +59,7 @@
      */
     public static void noteUserspaceRebootWasRequested() {
         if (!PowerManager.isRebootingUserspaceSupportedImpl()) {
-            Slog.wtf(TAG, "Userspace reboot is not supported.");
+            Slog.wtf(TAG, "noteUserspaceRebootWasRequested: Userspace reboot is not supported.");
             return;
         }
 
@@ -77,7 +77,7 @@
      */
     public static void noteUserspaceRebootSuccess() {
         if (!PowerManager.isRebootingUserspaceSupportedImpl()) {
-            Slog.wtf(TAG, "Userspace reboot is not supported.");
+            Slog.wtf(TAG, "noteUserspaceRebootSuccess: Userspace reboot is not supported.");
             return;
         }
 
@@ -88,11 +88,11 @@
     /**
      * Returns {@code true} if {@code UserspaceRebootReported} atom should be logged.
      *
-     * <p>This call should only be made on devices supporting userspace reboot.
+     * <p>On devices that do not support userspace reboot this method will always return {@code
+     * false}.
      */
     public static boolean shouldLogUserspaceRebootEvent() {
         if (!PowerManager.isRebootingUserspaceSupportedImpl()) {
-            Slog.wtf(TAG, "Userspace reboot is not supported.");
             return false;
         }
 
@@ -110,7 +110,7 @@
      */
     public static void logEventAsync(boolean userUnlocked, Executor executor) {
         if (!PowerManager.isRebootingUserspaceSupportedImpl()) {
-            Slog.wtf(TAG, "Userspace reboot is not supported.");
+            Slog.wtf(TAG, "logEventAsync: Userspace reboot is not supported.");
             return;
         }
 
diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java
index 0ee30f9..92a109c 100644
--- a/services/core/java/com/android/server/VibratorService.java
+++ b/services/core/java/com/android/server/VibratorService.java
@@ -1066,18 +1066,18 @@
         return attrs.isFlagSet(VibrationAttributes.FLAG_BYPASS_INTERRUPTION_POLICY);
     }
 
-    private int getAppOpMode(Vibration vib) {
+    private int getAppOpMode(int uid, String packageName, VibrationAttributes attrs) {
         int mode = mAppOps.checkAudioOpNoThrow(AppOpsManager.OP_VIBRATE,
-                vib.attrs.getAudioAttributes().getUsage(), vib.uid, vib.opPkg);
+                attrs.getAudioAttributes().getUsage(), uid, packageName);
         if (mode == AppOpsManager.MODE_ALLOWED) {
-            mode = mAppOps.startOpNoThrow(AppOpsManager.OP_VIBRATE, vib.uid, vib.opPkg);
+            mode = mAppOps.startOpNoThrow(AppOpsManager.OP_VIBRATE, uid, packageName);
         }
 
-        if (mode == AppOpsManager.MODE_IGNORED && shouldBypassDnd(vib.attrs)) {
+        if (mode == AppOpsManager.MODE_IGNORED && shouldBypassDnd(attrs)) {
             // If we're just ignoring the vibration op then this is set by DND and we should ignore
             // if we're asked to bypass. AppOps won't be able to record this operation, so make
             // sure we at least note it in the logs for debugging.
-            Slog.d(TAG, "Bypassing DND for vibration: " + vib);
+            Slog.d(TAG, "Bypassing DND for vibrate from uid " + uid);
             mode = AppOpsManager.MODE_ALLOWED;
         }
         return mode;
@@ -1099,7 +1099,7 @@
             return false;
         }
 
-        final int mode = getAppOpMode(vib);
+        final int mode = getAppOpMode(vib.uid, vib.opPkg, vib.attrs);
         if (mode != AppOpsManager.MODE_ALLOWED) {
             if (mode == AppOpsManager.MODE_ERRORED) {
                 // We might be getting calls from within system_server, so we don't actually
@@ -1662,6 +1662,10 @@
                                     // Vibrator is already ON, so just change its amplitude.
                                     doVibratorSetAmplitude(amplitude);
                                 }
+                            } else {
+                                // Previous vibration should have already finished, but we make sure
+                                // the vibrator will be off for the next step when amplitude is 0.
+                                doVibratorOff();
                             }
 
                             // We wait until the time this waveform step was supposed to end,
@@ -1776,7 +1780,7 @@
                 return SCALE_MUTE;
             }
             if (ActivityManager.checkComponentPermission(android.Manifest.permission.VIBRATE,
-                        vib.getUid(), -1 /*owningUid*/, true /*exported*/)
+                    vib.getUid(), -1 /*owningUid*/, true /*exported*/)
                     != PackageManager.PERMISSION_GRANTED) {
                 Slog.w(TAG, "pkg=" + vib.getPackage() + ", uid=" + vib.getUid()
                         + " tried to play externally controlled vibration"
@@ -1784,6 +1788,14 @@
                 return SCALE_MUTE;
             }
 
+            int mode = getAppOpMode(vib.getUid(), vib.getPackage(), vib.getVibrationAttributes());
+            if (mode != AppOpsManager.MODE_ALLOWED) {
+                if (mode == AppOpsManager.MODE_ERRORED) {
+                    Slog.w(TAG, "Would be an error: external vibrate from uid " + vib.getUid());
+                }
+                return SCALE_MUTE;
+            }
+
             final int scaleLevel;
             synchronized (mLock) {
                 if (!vib.equals(mCurrentExternalVibration)) {
diff --git a/services/core/java/com/android/server/adb/OWNERS b/services/core/java/com/android/server/adb/OWNERS
new file mode 100644
index 0000000..b97f795
--- /dev/null
+++ b/services/core/java/com/android/server/adb/OWNERS
@@ -0,0 +1 @@
+include platform/packages/modules/adb:/OWNERS
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 3f867f6..dd0e1f6 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -1836,11 +1836,13 @@
         if (DEBUG_SERVICE) Slog.v(TAG_SERVICE, "bindService: " + service
                 + " type=" + resolvedType + " conn=" + connection.asBinder()
                 + " flags=0x" + Integer.toHexString(flags));
+        final int callingPid = Binder.getCallingPid();
+        final int callingUid = Binder.getCallingUid();
         final ProcessRecord callerApp = mAm.getRecordForAppLocked(caller);
         if (callerApp == null) {
             throw new SecurityException(
                     "Unable to find app for caller " + caller
-                    + " (pid=" + Binder.getCallingPid()
+                    + " (pid=" + callingPid
                     + ") when binding service " + service);
         }
 
@@ -1880,19 +1882,19 @@
         }
 
         if ((flags & Context.BIND_SCHEDULE_LIKE_TOP_APP) != 0 && !isCallerSystem) {
-            throw new SecurityException("Non-system caller (pid=" + Binder.getCallingPid()
+            throw new SecurityException("Non-system caller (pid=" + callingPid
                     + ") set BIND_SCHEDULE_LIKE_TOP_APP when binding service " + service);
         }
 
         if ((flags & Context.BIND_ALLOW_WHITELIST_MANAGEMENT) != 0 && !isCallerSystem) {
             throw new SecurityException(
-                    "Non-system caller " + caller + " (pid=" + Binder.getCallingPid()
+                    "Non-system caller " + caller + " (pid=" + callingPid
                     + ") set BIND_ALLOW_WHITELIST_MANAGEMENT when binding service " + service);
         }
 
         if ((flags & Context.BIND_ALLOW_INSTANT) != 0 && !isCallerSystem) {
             throw new SecurityException(
-                    "Non-system caller " + caller + " (pid=" + Binder.getCallingPid()
+                    "Non-system caller " + caller + " (pid=" + callingPid
                             + ") set BIND_ALLOW_INSTANT when binding service " + service);
         }
 
@@ -1908,7 +1910,7 @@
 
         ServiceLookupResult res =
             retrieveServiceLocked(service, instanceName, resolvedType, callingPackage,
-                    Binder.getCallingPid(), Binder.getCallingUid(), userId, true,
+                    callingPid, callingUid, userId, true,
                     callerFg, isBindExternal, allowInstant);
         if (res == null) {
             return 0;
@@ -2068,7 +2070,7 @@
             if (!s.mAllowWhileInUsePermissionInFgs) {
                 s.mAllowWhileInUsePermissionInFgs =
                         shouldAllowWhileInUsePermissionInFgsLocked(callingPackage,
-                                Binder.getCallingPid(), Binder.getCallingUid(),
+                                callingPid, callingUid,
                                 service, s, false);
             }
 
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index d990c1e..e4cdfe9 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -2214,17 +2214,13 @@
         @Override
         protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             try {
-                if (mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.useFreezer()) {
-                    Process.enableFreezer(false);
-                }
+                mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.enableFreezer(false);
 
                 if (!DumpUtils.checkDumpAndUsageStatsPermission(mActivityManagerService.mContext,
                         "meminfo", pw)) return;
                 PriorityDump.dump(mPriorityDumper, fd, pw, args);
             } finally {
-                if (mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.useFreezer()) {
-                    Process.enableFreezer(true);
-                }
+                mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.enableFreezer(true);
             }
         }
     }
@@ -2238,17 +2234,13 @@
         @Override
         protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             try {
-                if (mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.useFreezer()) {
-                    Process.enableFreezer(false);
-                }
+                mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.enableFreezer(false);
 
                 if (!DumpUtils.checkDumpAndUsageStatsPermission(mActivityManagerService.mContext,
                         "gfxinfo", pw)) return;
                 mActivityManagerService.dumpGraphicsHardwareUsage(fd, pw, args);
             } finally {
-                if (mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.useFreezer()) {
-                    Process.enableFreezer(true);
-                }
+                mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.enableFreezer(true);
             }
         }
     }
@@ -2262,17 +2254,13 @@
         @Override
         protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             try {
-                if (mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.useFreezer()) {
-                    Process.enableFreezer(false);
-                }
+                mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.enableFreezer(false);
 
                 if (!DumpUtils.checkDumpAndUsageStatsPermission(mActivityManagerService.mContext,
                         "dbinfo", pw)) return;
                 mActivityManagerService.dumpDbInfo(fd, pw, args);
             } finally {
-                if (mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.useFreezer()) {
-                    Process.enableFreezer(true);
-                }
+                mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.enableFreezer(true);
             }
         }
     }
@@ -2318,9 +2306,7 @@
         @Override
         protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             try {
-                if (mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.useFreezer()) {
-                    Process.enableFreezer(false);
-                }
+                mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.enableFreezer(false);
 
                 if (!DumpUtils.checkDumpAndUsageStatsPermission(mActivityManagerService.mContext,
                         "cacheinfo", pw)) {
@@ -2329,9 +2315,7 @@
 
                 mActivityManagerService.dumpBinderCacheContents(fd, pw, args);
             } finally {
-                if (mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.useFreezer()) {
-                    Process.enableFreezer(true);
-                }
+                mActivityManagerService.mOomAdjuster.mCachedAppOptimizer.enableFreezer(true);
             }
         }
     }
@@ -10530,7 +10514,7 @@
 
     private void dumpEverything(FileDescriptor fd, PrintWriter pw, String[] args, int opti,
             boolean dumpAll, String dumpPackage, boolean dumpClient, boolean dumpNormalPriority,
-            int dumpAppId) {
+            int dumpAppId, boolean dumpProxies) {
 
         ActiveServices.ServiceDumper sdumper;
 
@@ -10589,7 +10573,7 @@
             }
             sdumper.dumpWithClient();
         }
-        if (dumpPackage == null) {
+        if (dumpPackage == null && dumpProxies) {
             // Intentionally dropping the lock for this, because dumpBinderProxies() will make many
             // outgoing binder calls to retrieve interface descriptors; while that is system code,
             // there is nothing preventing an app from overriding this implementation by talking to
@@ -10998,13 +10982,14 @@
                 // dumpEverything() will take the lock when needed, and momentarily drop
                 // it for dumping client state.
                 dumpEverything(fd, pw, args, opti, dumpAll, dumpPackage, dumpClient,
-                        dumpNormalPriority, dumpAppId);
+                        dumpNormalPriority, dumpAppId, true /* dumpProxies */);
             } else {
                 // Take the lock here, so we get a consistent state for the entire dump;
-                // dumpEverything() will take the lock as well, but that is fine.
+                // dumpEverything() will take the lock as well, which is fine for everything
+                // except dumping proxies, which can take a long time; exclude them.
                 synchronized(this) {
                     dumpEverything(fd, pw, args, opti, dumpAll, dumpPackage, dumpClient,
-                            dumpNormalPriority, dumpAppId);
+                            dumpNormalPriority, dumpAppId, false /* dumpProxies */);
                 }
             }
         }
@@ -18604,14 +18589,14 @@
                     }
                 }
 
-                Process.enableFreezer(false);
+                mOomAdjuster.mCachedAppOptimizer.enableFreezer(false);
 
                 final RemoteCallback intermediateCallback = new RemoteCallback(
                         new RemoteCallback.OnResultListener() {
                         @Override
                         public void onResult(Bundle result) {
                             finishCallback.sendResult(result);
-                            Process.enableFreezer(true);
+                            mOomAdjuster.mCachedAppOptimizer.enableFreezer(true);
                         }
                     }, null);
 
@@ -20373,4 +20358,16 @@
             Binder.restoreCallingIdentity(token);
         }
     }
+
+    @Override
+    public boolean enableAppFreezer(boolean enable) {
+        int callerUid = Binder.getCallingUid();
+
+        // Only system can toggle the freezer state
+        if (callerUid == SYSTEM_UID) {
+            return mOomAdjuster.mCachedAppOptimizer.enableFreezer(enable);
+        } else {
+            throw new SecurityException("Caller uid " + callerUid + " cannot set freezer state ");
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/am/CachedAppOptimizer.java b/services/core/java/com/android/server/am/CachedAppOptimizer.java
index 43e3a04..8112bb8 100644
--- a/services/core/java/com/android/server/am/CachedAppOptimizer.java
+++ b/services/core/java/com/android/server/am/CachedAppOptimizer.java
@@ -16,14 +16,13 @@
 
 package com.android.server.am;
 
-import static android.os.Process.THREAD_PRIORITY_FOREGROUND;
-
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_COMPACTION;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_FREEZER;
 import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
 
 import android.app.ActivityManager;
 import android.app.ActivityThread;
+import android.app.ApplicationExitInfo;
 import android.os.Debug;
 import android.os.Handler;
 import android.os.Message;
@@ -134,11 +133,15 @@
     static final int REPORT_UNFREEZE_MSG = 4;
 
     //TODO:change this static definition into a configurable flag.
-    static final int FREEZE_TIMEOUT_MS = 500;
+    static final int FREEZE_TIMEOUT_MS = 10000;
 
     static final int DO_FREEZE = 1;
     static final int REPORT_UNFREEZE = 2;
 
+    // Bitfield values for sync/async transactions reveived by frozen processes
+    static final int SYNC_RECEIVED_WHILE_FROZEN = 1;
+    static final int ASYNC_RECEIVED_WHILE_FROZEN = 2;
+
     /**
      * This thread must be moved to the system background cpuset.
      * If that doesn't happen, it's probably going to draw a lot of power.
@@ -210,6 +213,8 @@
     @GuardedBy("mPhenotypeFlagLock")
     private volatile boolean mUseCompaction = DEFAULT_USE_COMPACTION;
     private volatile boolean mUseFreezer = DEFAULT_USE_FREEZER;
+    @GuardedBy("this")
+    private int mFreezerDisableCount = 1; // Freezer is initially disabled, until enabled
     private final Random mRandom = new Random();
     @GuardedBy("mPhenotypeFlagLock")
     @VisibleForTesting volatile float mCompactStatsdSampleRate = DEFAULT_STATSD_SAMPLE_RATE;
@@ -256,7 +261,7 @@
             ProcessDependencies processDependencies) {
         mAm = am;
         mCachedAppOptimizerThread = new ServiceThread("CachedAppOptimizerThread",
-            THREAD_PRIORITY_FOREGROUND, true);
+            Process.THREAD_GROUP_SYSTEM, true);
         mProcStateThrottle = new HashSet<>();
         mProcessDependencies = processDependencies;
         mTestCallback = callback;
@@ -280,8 +285,6 @@
             updateProcStateThrottle();
             updateUseFreezer();
         }
-        Process.setThreadGroupAndCpuset(mCachedAppOptimizerThread.getThreadId(),
-                Process.THREAD_GROUP_SYSTEM);
     }
 
     /**
@@ -411,35 +414,119 @@
         mUseCompaction = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER,
                     KEY_USE_COMPACTION, DEFAULT_USE_COMPACTION);
 
-        if (mUseCompaction) {
+        if (mUseCompaction && mCompactionHandler == null) {
             if (!mCachedAppOptimizerThread.isAlive()) {
                 mCachedAppOptimizerThread.start();
             }
 
             mCompactionHandler = new MemCompactionHandler();
+
+            Process.setThreadGroupAndCpuset(mCachedAppOptimizerThread.getThreadId(),
+                    Process.THREAD_GROUP_SYSTEM);
         }
     }
 
     /**
-     * Determines whether the freezer is correctly supported by this system
+     * Enables or disabled the app freezer.
+     * @param enable Enables the freezer if true, disables it if false.
+     * @return true if the operation completed successfully, false otherwise.
+     */
+    public synchronized boolean enableFreezer(boolean enable) {
+        if (!mUseFreezer) {
+            return false;
+        }
+
+        if (enable) {
+            mFreezerDisableCount--;
+
+            if (mFreezerDisableCount > 0) {
+                return true;
+            } else if (mFreezerDisableCount < 0) {
+                Slog.e(TAG_AM, "unbalanced call to enableFreezer, ignoring");
+                mFreezerDisableCount = 0;
+                return false;
+            }
+        } else {
+            mFreezerDisableCount++;
+
+            if (mFreezerDisableCount > 1) {
+                return true;
+            }
+        }
+
+        try {
+            enableFreezerInternal(enable);
+            return true;
+        } catch (java.lang.RuntimeException e) {
+            if (enable) {
+                mFreezerDisableCount = 0;
+            } else {
+                mFreezerDisableCount = 1;
+            }
+
+            Slog.e(TAG_AM, "Exception handling freezer state (enable: " + enable + "): "
+                    + e.toString());
+        }
+
+        return false;
+    }
+
+    /**
+     * Enable or disable the freezer. When enable == false all frozen processes are unfrozen,
+     * but aren't removed from the freezer. While in this state, processes can be added or removed
+     * by using Process.setProcessFrozen(), but they wouldn't be actually frozen until the freezer
+     * is enabled. If enable == true all processes in the freezer are frozen.
+     *
+     * @param enable Specify whether to enable (true) or disable (false) the freezer.
+     *
+     * @hide
+     */
+    private static native void enableFreezerInternal(boolean enable);
+
+    /**
+     * Informs binder that a process is about to be frozen. If freezer is enabled on a process via
+     * this method, this method will synchronously dispatch all pending transactions to the
+     * specified pid. This method will not add significant latencies when unfreezing.
+     * After freezing binder calls, binder will block all transaction to the frozen pid, and return
+     * an error to the sending process.
+     *
+     * @param pid the target pid for which binder transactions are to be frozen
+     * @param freeze specifies whether to flush transactions and then freeze (true) or unfreeze
+     * binder for the specificed pid.
+     *
+     * @throws RuntimeException in case a flush/freeze operation could not complete successfully.
+     */
+    private static native void freezeBinder(int pid, boolean freeze);
+
+    /**
+     * Retrieves binder freeze info about a process.
+     * @param pid the pid for which binder freeze info is to be retrieved.
+     *
+     * @throws RuntimeException if the operation could not complete successfully.
+     * @return a bit field reporting the binder freeze info for the process.
+     */
+    private static native int getBinderFreezeInfo(int pid);
+
+    /**
+     * Determines whether the freezer is supported by this system
      */
     public static boolean isFreezerSupported() {
         boolean supported = false;
         FileReader fr = null;
 
         try {
-            fr = new FileReader("/dev/freezer/frozen/freezer.killable");
-            int i = fr.read();
+            fr = new FileReader("/sys/fs/cgroup/freezer/cgroup.freeze");
+            char state = (char) fr.read();
 
-            if ((char) i == '1') {
+            if (state == '1' || state == '0') {
                 supported = true;
             } else {
-                Slog.w(TAG_AM, "Freezer killability is turned off, disabling freezer");
+                Slog.e(TAG_AM, "unexpected value in cgroup.freeze");
             }
         } catch (java.io.FileNotFoundException e) {
-            Slog.d(TAG_AM, "Freezer.killable not present, disabling freezer");
+            Slog.d(TAG_AM, "cgroup.freeze not present");
         } catch (Exception e) {
-            Slog.d(TAG_AM, "Unable to read freezer.killable, disabling freezer: " + e.toString());
+            Slog.d(TAG_AM, "unable to read cgroup.freeze: " + e.toString());
         }
 
         if (fr != null) {
@@ -470,13 +557,20 @@
             mUseFreezer = isFreezerSupported();
         }
 
-        if (mUseFreezer) {
+        if (mUseFreezer && mFreezeHandler == null) {
             Slog.d(TAG_AM, "Freezer enabled");
+            enableFreezer(true);
+
             if (!mCachedAppOptimizerThread.isAlive()) {
                 mCachedAppOptimizerThread.start();
             }
 
             mFreezeHandler = new FreezeHandler();
+
+            Process.setThreadGroupAndCpuset(mCachedAppOptimizerThread.getThreadId(),
+                    Process.THREAD_GROUP_SYSTEM);
+        } else {
+            enableFreezer(false);
         }
     }
 
@@ -649,6 +743,37 @@
             return;
         }
 
+        boolean processKilled = false;
+
+        try {
+            int freezeInfo = getBinderFreezeInfo(app.pid);
+
+            if ((freezeInfo & SYNC_RECEIVED_WHILE_FROZEN) != 0) {
+                Slog.d(TAG_AM, "pid " + app.pid + " " + app.processName + " "
+                        + " received sync transactions while frozen, killing");
+                app.kill("Sync transaction while in frozen state",
+                        ApplicationExitInfo.REASON_OTHER,
+                        ApplicationExitInfo.SUBREASON_INVALID_STATE, true);
+                processKilled = true;
+            }
+
+            if ((freezeInfo & ASYNC_RECEIVED_WHILE_FROZEN) != 0) {
+                Slog.d(TAG_AM, "pid " + app.pid + " " + app.processName + " "
+                        + " received async transactions while frozen");
+            }
+        } catch (Exception e) {
+            Slog.d(TAG_AM, "Unable to query binder frozen info for pid " + app.pid + " "
+                    + app.processName + ". Killing it. Exception: " + e);
+            app.kill("Unable to query binder frozen stats",
+                    ApplicationExitInfo.REASON_OTHER,
+                    ApplicationExitInfo.SUBREASON_INVALID_STATE, true);
+            processKilled = true;
+        }
+
+        if (processKilled) {
+            return;
+        }
+
         long freezeTime = app.freezeUnfreezeTime;
 
         try {
@@ -662,6 +787,17 @@
         }
 
         if (!app.frozen) {
+            try {
+                freezeBinder(app.pid, false);
+            } catch (RuntimeException e) {
+                Slog.e(TAG_AM, "Unable to unfreeze binder for " + app.pid + " " + app.processName
+                        + ". Killing it");
+                app.kill("Unable to unfreeze",
+                        ApplicationExitInfo.REASON_OTHER,
+                        ApplicationExitInfo.SUBREASON_INVALID_STATE, true);
+                return;
+            }
+
             if (DEBUG_FREEZER) {
                 Slog.d(TAG_AM, "sync unfroze " + app.pid + " " + app.processName);
             }
@@ -974,6 +1110,14 @@
                     return;
                 }
 
+                try {
+                    freezeBinder(pid, true);
+                } catch (RuntimeException e) {
+                    // TODO: it might be preferable to kill the target pid in this case
+                    Slog.e(TAG_AM, "Unable to freeze binder for " + pid + " " + name);
+                    return;
+                }
+
                 if (pid == 0 || proc.frozen) {
                     // Already frozen or not a real process, either one being
                     // launched or one being killed
diff --git a/services/core/java/com/android/server/am/CoreSettingsObserver.java b/services/core/java/com/android/server/am/CoreSettingsObserver.java
index 2661dd6..f766296 100644
--- a/services/core/java/com/android/server/am/CoreSettingsObserver.java
+++ b/services/core/java/com/android/server/am/CoreSettingsObserver.java
@@ -100,15 +100,20 @@
         sGlobalSettingToTypeMap.put(Settings.Global.GPU_DEBUG_LAYERS, String.class);
         sGlobalSettingToTypeMap.put(Settings.Global.GPU_DEBUG_LAYERS_GLES, String.class);
         sGlobalSettingToTypeMap.put(Settings.Global.GPU_DEBUG_LAYER_APP, String.class);
-        sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_ALL_APPS, int.class);
-        sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_OPT_IN_APPS, String.class);
+        sGlobalSettingToTypeMap.put(Settings.Global.UPDATABLE_DRIVER_ALL_APPS, int.class);
         sGlobalSettingToTypeMap.put(
-                Settings.Global.GAME_DRIVER_PRERELEASE_OPT_IN_APPS, String.class);
-        sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_OPT_OUT_APPS, String.class);
-        sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_DENYLIST, String.class);
-        sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_ALLOWLIST, String.class);
-        sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_DENYLISTS, String.class);
-        sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_SPHAL_LIBRARIES, String.class);
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS, String.class);
+        sGlobalSettingToTypeMap.put(
+                Settings.Global.UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS, String.class);
+        sGlobalSettingToTypeMap.put(
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS, String.class);
+        sGlobalSettingToTypeMap.put(
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLIST, String.class);
+        sGlobalSettingToTypeMap.put(
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST, String.class);
+        sGlobalSettingToTypeMap.put(
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS, String.class);
+        sGlobalSettingToTypeMap.put(Settings.Global.UPDATABLE_DRIVER_SPHAL_LIBRARIES, String.class);
         // add other global settings here...
 
         sDeviceConfigEntries.add(new DeviceConfigEntry<Boolean>(
@@ -116,6 +121,10 @@
                 WidgetFlags.KEY_ENABLE_CURSOR_DRAG_FROM_ANYWHERE, boolean.class,
                 WidgetFlags.ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT));
         sDeviceConfigEntries.add(new DeviceConfigEntry<Integer>(
+                DeviceConfig.NAMESPACE_WIDGET, WidgetFlags.CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL,
+                WidgetFlags.KEY_CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL, int.class,
+                WidgetFlags.CURSOR_DRAG_MIN_ANGLE_FROM_VERTICAL_DEFAULT));
+        sDeviceConfigEntries.add(new DeviceConfigEntry<Integer>(
                 DeviceConfig.NAMESPACE_WIDGET, WidgetFlags.FINGER_TO_CURSOR_DISTANCE,
                 WidgetFlags.KEY_FINGER_TO_CURSOR_DISTANCE, int.class,
                 WidgetFlags.FINGER_TO_CURSOR_DISTANCE_DEFAULT));
diff --git a/services/core/java/com/android/server/am/OWNERS b/services/core/java/com/android/server/am/OWNERS
index 1f826b5..1c38c86 100644
--- a/services/core/java/com/android/server/am/OWNERS
+++ b/services/core/java/com/android/server/am/OWNERS
@@ -23,6 +23,8 @@
 
 # Battery Stats
 joeo@google.com
+per-file BatteryStats* = file:/BATTERY_STATS_OWNERS
+per-file BatteryExternalStats* = file:/BATTERY_STATS_OWNERS
 
 # Londoners
 michaelwr@google.com
diff --git a/services/core/java/com/android/server/am/ServiceRecord.java b/services/core/java/com/android/server/am/ServiceRecord.java
index fc17dde..1b65dba 100644
--- a/services/core/java/com/android/server/am/ServiceRecord.java
+++ b/services/core/java/com/android/server/am/ServiceRecord.java
@@ -16,6 +16,9 @@
 
 package com.android.server.am;
 
+import static android.app.PendingIntent.FLAG_IMMUTABLE;
+import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
+
 import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
 import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
 
@@ -873,7 +876,7 @@
                                 runningIntent.setData(Uri.fromParts("package",
                                         appInfo.packageName, null));
                                 PendingIntent pi = PendingIntent.getActivityAsUser(ams.mContext, 0,
-                                        runningIntent, PendingIntent.FLAG_UPDATE_CURRENT, null,
+                                        runningIntent, FLAG_UPDATE_CURRENT | FLAG_IMMUTABLE, null,
                                         UserHandle.of(userId));
                                 notiBuilder.setColor(ams.mContext.getColor(
                                         com.android.internal
@@ -912,7 +915,7 @@
                         }
                         if (localForegroundNoti.getSmallIcon() == null) {
                             // Notifications whose icon is 0 are defined to not show
-                            // a notification, silently ignoring it.  We don't want to
+                            // a notification.  We don't want to
                             // just ignore it, we want to prevent the service from
                             // being foreground.
                             throw new RuntimeException("invalid service notification: "
diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java
index 42af4da..640d99f 100644
--- a/services/core/java/com/android/server/appop/AppOpsService.java
+++ b/services/core/java/com/android/server/appop/AppOpsService.java
@@ -39,6 +39,7 @@
 import static android.app.AppOpsManager.OP_NONE;
 import static android.app.AppOpsManager.OP_PLAY_AUDIO;
 import static android.app.AppOpsManager.OP_RECORD_AUDIO;
+import static android.app.AppOpsManager.OP_RECORD_AUDIO_HOTWORD;
 import static android.app.AppOpsManager.OpEventProxyInfo;
 import static android.app.AppOpsManager.RestrictionBypass;
 import static android.app.AppOpsManager.SAMPLING_STRATEGY_BOOT_TIME_SAMPLING;
@@ -2052,6 +2053,8 @@
     public void getHistoricalOps(int uid, String packageName, String attributionTag,
             List<String> opNames, int filter, long beginTimeMillis, long endTimeMillis,
             int flags, RemoteCallback callback) {
+        PackageManager pm = mContext.getPackageManager();
+
         ensureHistoricalOpRequestIsValid(uid, packageName, attributionTag, opNames, filter,
                 beginTimeMillis, endTimeMillis, flags);
         Objects.requireNonNull(callback, "callback cannot be null");
@@ -2059,8 +2062,16 @@
         ActivityManagerInternal ami = LocalServices.getService(ActivityManagerInternal.class);
         boolean isCallerInstrumented = ami.isUidCurrentlyInstrumented(Binder.getCallingUid());
         boolean isCallerSystem = Binder.getCallingPid() == Process.myPid();
+        boolean isCallerPermissionController;
+        try {
+            isCallerPermissionController = pm.getPackageUid(
+                    mContext.getPackageManager().getPermissionControllerPackageName(), 0)
+                    == Binder.getCallingUid();
+        } catch (PackageManager.NameNotFoundException doesNotHappen) {
+            return;
+        }
 
-        if (!isCallerSystem && !isCallerInstrumented) {
+        if (!isCallerSystem && !isCallerInstrumented && !isCallerPermissionController) {
             mHandler.post(() -> callback.sendResult(new Bundle()));
             return;
         }
@@ -2188,6 +2199,7 @@
             updatePermissionRevokedCompat(uid, code, mode);
         }
 
+        int previousMode;
         synchronized (this) {
             final int defaultMode = AppOpsManager.opToDefaultMode(code);
 
@@ -2196,12 +2208,14 @@
                 if (mode == defaultMode) {
                     return;
                 }
+                previousMode = AppOpsManager.MODE_DEFAULT;
                 uidState = new UidState(uid);
                 uidState.opModes = new SparseIntArray();
                 uidState.opModes.put(code, mode);
                 mUidStates.put(uid, uidState);
                 scheduleWriteLocked();
             } else if (uidState.opModes == null) {
+                previousMode = AppOpsManager.MODE_DEFAULT;
                 if (mode != defaultMode) {
                     uidState.opModes = new SparseIntArray();
                     uidState.opModes.put(code, mode);
@@ -2211,6 +2225,7 @@
                 if (uidState.opModes.indexOfKey(code) >= 0 && uidState.opModes.get(code) == mode) {
                     return;
                 }
+                previousMode = uidState.opModes.get(code);
                 if (mode == defaultMode) {
                     uidState.opModes.delete(code);
                     if (uidState.opModes.size() <= 0) {
@@ -2225,7 +2240,7 @@
         }
 
         notifyOpChangedForAllPkgsInUid(code, uid, false, permissionPolicyCallback);
-        notifyOpChangedSync(code, uid, null, mode);
+        notifyOpChangedSync(code, uid, null, mode, previousMode);
     }
 
     /**
@@ -2404,11 +2419,12 @@
         }
     }
 
-    private void notifyOpChangedSync(int code, int uid, @NonNull String packageName, int mode) {
+    private void notifyOpChangedSync(int code, int uid, @NonNull String packageName, int mode,
+            int previousMode) {
         final StorageManagerInternal storageManagerInternal =
                 LocalServices.getService(StorageManagerInternal.class);
         if (storageManagerInternal != null) {
-            storageManagerInternal.onAppOpsChanged(code, uid, packageName, mode);
+            storageManagerInternal.onAppOpsChanged(code, uid, packageName, mode, previousMode);
         }
     }
 
@@ -2440,11 +2456,13 @@
             return;
         }
 
+        int previousMode = AppOpsManager.MODE_DEFAULT;
         synchronized (this) {
             UidState uidState = getUidStateLocked(uid, false);
             Op op = getOpLocked(code, uid, packageName, null, bypass, true);
             if (op != null) {
                 if (op.mode != mode) {
+                    previousMode = op.mode;
                     op.mode = mode;
                     if (uidState != null) {
                         uidState.evalForegroundOps(mOpModeWatchers);
@@ -2481,7 +2499,7 @@
                     this, repCbs, code, uid, packageName));
         }
 
-        notifyOpChangedSync(code, uid, packageName, mode);
+        notifyOpChangedSync(code, uid, packageName, mode, previousMode);
     }
 
     private void notifyOpChanged(ArraySet<ModeCallback> callbacks, int code,
@@ -2524,7 +2542,7 @@
     }
 
     private static ArrayList<ChangeRec> addChange(ArrayList<ChangeRec> reports,
-            int op, int uid, String packageName) {
+            int op, int uid, String packageName, int previousMode) {
         boolean duplicate = false;
         if (reports == null) {
             reports = new ArrayList<>();
@@ -2539,7 +2557,7 @@
             }
         }
         if (!duplicate) {
-            reports.add(new ChangeRec(op, uid, packageName));
+            reports.add(new ChangeRec(op, uid, packageName, previousMode));
         }
 
         return reports;
@@ -2547,7 +2565,7 @@
 
     private static HashMap<ModeCallback, ArrayList<ChangeRec>> addCallbacks(
             HashMap<ModeCallback, ArrayList<ChangeRec>> callbacks,
-            int op, int uid, String packageName, ArraySet<ModeCallback> cbs) {
+            int op, int uid, String packageName, int previousMode, ArraySet<ModeCallback> cbs) {
         if (cbs == null) {
             return callbacks;
         }
@@ -2558,7 +2576,7 @@
         for (int i=0; i<N; i++) {
             ModeCallback cb = cbs.valueAt(i);
             ArrayList<ChangeRec> reports = callbacks.get(cb);
-            ArrayList<ChangeRec> changed = addChange(reports, op, uid, packageName);
+            ArrayList<ChangeRec> changed = addChange(reports, op, uid, packageName, previousMode);
             if (changed != reports) {
                 callbacks.put(cb, changed);
             }
@@ -2570,11 +2588,13 @@
         final int op;
         final int uid;
         final String pkg;
+        final int previous_mode;
 
-        ChangeRec(int _op, int _uid, String _pkg) {
+        ChangeRec(int _op, int _uid, String _pkg, int _previous_mode) {
             op = _op;
             uid = _uid;
             pkg = _pkg;
+            previous_mode = _previous_mode;
         }
     }
 
@@ -2610,18 +2630,19 @@
                     for (int j = uidOpCount - 1; j >= 0; j--) {
                         final int code = opModes.keyAt(j);
                         if (AppOpsManager.opAllowsReset(code)) {
+                            int previousMode = opModes.valueAt(j);
                             opModes.removeAt(j);
                             if (opModes.size() <= 0) {
                                 uidState.opModes = null;
                             }
                             for (String packageName : getPackagesForUid(uidState.uid)) {
                                 callbacks = addCallbacks(callbacks, code, uidState.uid, packageName,
-                                        mOpModeWatchers.get(code));
+                                        previousMode, mOpModeWatchers.get(code));
                                 callbacks = addCallbacks(callbacks, code, uidState.uid, packageName,
-                                        mPackageModeWatchers.get(packageName));
+                                        previousMode, mPackageModeWatchers.get(packageName));
 
                                 allChanges = addChange(allChanges, code, uidState.uid,
-                                        packageName);
+                                        packageName, previousMode);
                             }
                         }
                     }
@@ -2652,16 +2673,18 @@
                         Op curOp = pkgOps.valueAt(j);
                         if (AppOpsManager.opAllowsReset(curOp.op)
                                 && curOp.mode != AppOpsManager.opToDefaultMode(curOp.op)) {
+                            int previousMode = curOp.mode;
                             curOp.mode = AppOpsManager.opToDefaultMode(curOp.op);
                             changed = true;
                             uidChanged = true;
                             final int uid = curOp.uidState.uid;
                             callbacks = addCallbacks(callbacks, curOp.op, uid, packageName,
-                                    mOpModeWatchers.get(curOp.op));
+                                    previousMode, mOpModeWatchers.get(curOp.op));
                             callbacks = addCallbacks(callbacks, curOp.op, uid, packageName,
-                                    mPackageModeWatchers.get(packageName));
+                                    previousMode, mPackageModeWatchers.get(packageName));
 
-                            allChanges = addChange(allChanges, curOp.op, uid, packageName);
+                            allChanges = addChange(allChanges, curOp.op, uid, packageName,
+                                    previousMode);
                             curOp.removeAttributionsWithNoTime();
                             if (curOp.mAttributions.isEmpty()) {
                                 pkgOps.removeAt(j);
@@ -2702,7 +2725,7 @@
             for (int i = 0; i < numChanges; i++) {
                 ChangeRec change = allChanges.get(i);
                 notifyOpChangedSync(change.op, change.uid, change.pkg,
-                        AppOpsManager.opToDefaultMode(change.op));
+                        AppOpsManager.opToDefaultMode(change.op), change.previous_mode);
             }
         }
     }
@@ -3390,7 +3413,19 @@
         verifyIncomingOp(code);
         String resolvedPackageName = resolvePackageName(uid, packageName);
         if (resolvedPackageName == null) {
-            return  AppOpsManager.MODE_IGNORED;
+            return AppOpsManager.MODE_IGNORED;
+        }
+
+        // As a special case for OP_RECORD_AUDIO_HOTWORD, which we use only for attribution
+        // purposes and not as a check, also make sure that the caller is allowed to access
+        // the data gated by OP_RECORD_AUDIO.
+        //
+        // TODO: Revert this change before Android 12.
+        if (code == OP_RECORD_AUDIO_HOTWORD) {
+            int result = checkOperation(OP_RECORD_AUDIO, uid, packageName);
+            if (result != AppOpsManager.MODE_ALLOWED) {
+                return result;
+            }
         }
 
         RestrictionBypass bypass;
diff --git a/services/core/java/com/android/server/appop/OWNERS b/services/core/java/com/android/server/appop/OWNERS
new file mode 100644
index 0000000..999ea0e
--- /dev/null
+++ b/services/core/java/com/android/server/appop/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/permission/OWNERS
diff --git a/services/core/java/com/android/server/attention/OWNERS b/services/core/java/com/android/server/attention/OWNERS
new file mode 100644
index 0000000..51fc9bd
--- /dev/null
+++ b/services/core/java/com/android/server/attention/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/attention/OWNERS
diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
index 45f95fd..074d3fe 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
@@ -224,12 +224,35 @@
             if (!addSpeakerphoneClient(cb, pid, on)) {
                 return false;
             }
+            if (on) {
+                // Cancel BT SCO ON request by this same client: speakerphone and BT SCO routes
+                // are mutually exclusive.
+                // See symmetrical operation for startBluetoothScoForClient_Sync().
+                mBtHelper.stopBluetoothScoForPid(pid);
+            }
             final boolean wasOn = isSpeakerphoneOn();
             updateSpeakerphoneOn(eventSource);
             return (wasOn != isSpeakerphoneOn());
         }
     }
 
+    /**
+     * Turns speakerphone off for a given pid and update speakerphone state.
+     * @param pid
+     */
+    @GuardedBy("mDeviceStateLock")
+    private void setSpeakerphoneOffForPid(int pid) {
+        SpeakerphoneClient client = getSpeakerphoneClientForPid(pid);
+        if (client == null) {
+            return;
+        }
+        client.unregisterDeathRecipient();
+        mSpeakerphoneClients.remove(client);
+        final String eventSource = new StringBuilder("setSpeakerphoneOffForPid(")
+                .append(pid).append(")").toString();
+        updateSpeakerphoneOn(eventSource);
+    }
+
     @GuardedBy("mDeviceStateLock")
     private void updateSpeakerphoneOn(String eventSource) {
         if (isSpeakerphoneOnRequested()) {
@@ -476,8 +499,8 @@
         sendIIMsgNoDelay(MSG_II_SET_HEARING_AID_VOLUME, SENDMSG_REPLACE, index, streamType);
     }
 
-    /*package*/ void postSetModeOwnerPid(int pid) {
-        sendIMsgNoDelay(MSG_I_SET_MODE_OWNER_PID, SENDMSG_REPLACE, pid);
+    /*package*/ void postSetModeOwnerPid(int pid, int mode) {
+        sendIIMsgNoDelay(MSG_I_SET_MODE_OWNER_PID, SENDMSG_REPLACE, pid, mode);
     }
 
     /*package*/ void postBluetoothA2dpDeviceConfigChange(@NonNull BluetoothDevice device) {
@@ -488,6 +511,10 @@
     /*package*/ void startBluetoothScoForClient_Sync(IBinder cb, int scoAudioMode,
                 @NonNull String eventSource) {
         synchronized (mDeviceStateLock) {
+            // Cancel speakerphone ON request by this same client: speakerphone and BT SCO routes
+            // are mutually exclusive.
+            // See symmetrical operation for setSpeakerphoneOn(true).
+            setSpeakerphoneOffForPid(Binder.getCallingPid());
             mBtHelper.startBluetoothScoForClient(cb, scoAudioMode, eventSource);
         }
     }
@@ -949,7 +976,9 @@
                         synchronized (mDeviceStateLock) {
                             if (mModeOwnerPid != msg.arg1) {
                                 mModeOwnerPid = msg.arg1;
-                                updateSpeakerphoneOn("setNewModeOwner");
+                                if (msg.arg2 != AudioSystem.MODE_RINGTONE) {
+                                    updateSpeakerphoneOn("setNewModeOwner");
+                                }
                                 if (mModeOwnerPid != 0) {
                                     mBtHelper.disconnectBluetoothSco(mModeOwnerPid);
                                 }
@@ -1379,6 +1408,16 @@
         return false;
     }
 
+    @GuardedBy("mDeviceStateLock")
+    private SpeakerphoneClient getSpeakerphoneClientForPid(int pid) {
+        for (SpeakerphoneClient cl : mSpeakerphoneClients) {
+            if (cl.getPid() == pid) {
+                return cl;
+            }
+        }
+        return null;
+    }
+
     // List of clients requesting speakerPhone ON
     @GuardedBy("mDeviceStateLock")
     private final @NonNull ArrayList<SpeakerphoneClient> mSpeakerphoneClients =
diff --git a/services/core/java/com/android/server/audio/AudioEventLogger.java b/services/core/java/com/android/server/audio/AudioEventLogger.java
index 9ebd75b..af0e978 100644
--- a/services/core/java/com/android/server/audio/AudioEventLogger.java
+++ b/services/core/java/com/android/server/audio/AudioEventLogger.java
@@ -60,7 +60,36 @@
          * @return the same instance of the event
          */
         public Event printLog(String tag) {
-            Log.i(tag, eventToString());
+            return printLog(ALOGI, tag);
+        }
+
+        public static final int ALOGI = 0;
+        public static final int ALOGE = 1;
+        public static final int ALOGW = 2;
+        public static final int ALOGV = 3;
+
+        /**
+         * Same as {@link #printLog(String)} with a log type
+         * @param type one of {@link #ALOGI}, {@link #ALOGE}, {@link #ALOGV}
+         * @param tag
+         * @return
+         */
+        public Event printLog(int type, String tag) {
+            switch (type) {
+                case ALOGI:
+                    Log.i(tag, eventToString());
+                    break;
+                case ALOGE:
+                    Log.e(tag, eventToString());
+                    break;
+                case ALOGW:
+                    Log.w(tag, eventToString());
+                    break;
+                case ALOGV:
+                default:
+                    Log.v(tag, eventToString());
+                    break;
+            }
             return this;
         }
 
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 8be24a6..a06f9dd 100755
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -26,6 +26,10 @@
 import static android.provider.Settings.Secure.VOLUME_HUSH_OFF;
 import static android.provider.Settings.Secure.VOLUME_HUSH_VIBRATE;
 
+import static com.android.server.audio.AudioEventLogger.Event.ALOGE;
+import static com.android.server.audio.AudioEventLogger.Event.ALOGI;
+import static com.android.server.audio.AudioEventLogger.Event.ALOGW;
+
 import android.Manifest;
 import android.annotation.IntDef;
 import android.annotation.NonNull;
@@ -284,6 +288,7 @@
     private static final int MSG_PLAYBACK_CONFIG_CHANGE = 29;
     private static final int MSG_BROADCAST_MICROPHONE_MUTE = 30;
     private static final int MSG_CHECK_MODE_FOR_UID = 31;
+    private static final int MSG_REINIT_VOLUMES = 32;
     // start of messages handled under wakelock
     //   these messages can only be queued, i.e. sent with queueMsgUnderWakeLock(),
     //   and not with sendMsg(..., ..., SENDMSG_QUEUE, ...)
@@ -539,7 +544,6 @@
             AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET,
             AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET,
             AudioSystem.DEVICE_OUT_HDMI_ARC,
-            AudioSystem.DEVICE_OUT_SPDIF,
             AudioSystem.DEVICE_OUT_AUX_LINE));
     // Devices for which the volume is always max, no volume panel
     Set<Integer> mFullVolumeDevices = new HashSet<>();
@@ -673,6 +677,7 @@
 
     public AudioService(Context context, AudioSystemAdapter audioSystem,
             SystemServerAdapter systemServer) {
+        sLifecycleLogger.log(new AudioEventLogger.StringEvent("AudioService()"));
         mContext = context;
         mContentResolver = context.getContentResolver();
         mAppOps = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE);
@@ -892,6 +897,9 @@
                 mPrescaleAbsoluteVolume[i] = preScale[i];
             }
         }
+
+        // check on volume initialization
+        checkVolumeRangeInitialization("AudioService()");
     }
 
     public void systemReady() {
@@ -1019,11 +1027,15 @@
         if (!mSystemReady ||
                 (AudioSystem.checkAudioFlinger() != AudioSystem.AUDIO_STATUS_OK)) {
             Log.e(TAG, "Audioserver died.");
+            sLifecycleLogger.log(new AudioEventLogger.StringEvent(
+                    "onAudioServerDied() audioserver died"));
             sendMsg(mAudioHandler, MSG_AUDIO_SERVER_DIED, SENDMSG_NOOP, 0, 0,
                     null, 500);
             return;
         }
-        Log.e(TAG, "Audioserver started.");
+        Log.i(TAG, "Audioserver started.");
+        sLifecycleLogger.log(new AudioEventLogger.StringEvent(
+                "onAudioServerDied() audioserver started"));
 
         updateAudioHalPids();
 
@@ -1058,14 +1070,7 @@
         mDeviceBroker.setForceUse_Async(AudioSystem.FOR_SYSTEM, forSys, "onAudioServerDied");
 
         // Restore stream volumes
-        int numStreamTypes = AudioSystem.getNumStreamTypes();
-        for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
-            VolumeStreamState streamState = mStreamStates[streamType];
-            AudioSystem.initStreamVolume(
-                streamType, streamState.mIndexMin / 10, streamState.mIndexMax / 10);
-
-            streamState.applyAllVolumes();
-        }
+        onReinitVolumes("after audioserver restart");
 
         // Restore audio volume groups
         restoreVolumeGroups();
@@ -1163,6 +1168,72 @@
         setMicMuteFromSwitchInput();
     }
 
+    private void onReinitVolumes(@NonNull String caller) {
+        final int numStreamTypes = AudioSystem.getNumStreamTypes();
+        // keep track of any error during stream volume initialization
+        int status = AudioSystem.AUDIO_STATUS_OK;
+        for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
+            VolumeStreamState streamState = mStreamStates[streamType];
+            final int res = AudioSystem.initStreamVolume(
+                    streamType, streamState.mIndexMin / 10, streamState.mIndexMax / 10);
+            if (res != AudioSystem.AUDIO_STATUS_OK) {
+                status = res;
+                Log.e(TAG, "Failed to initStreamVolume (" + res + ") for stream " + streamType);
+                // stream volume initialization failed, no need to try the others, it will be
+                // attempted again when MSG_REINIT_VOLUMES is handled
+                break;
+            }
+            streamState.applyAllVolumes();
+        }
+
+        // did it work? check based on status
+        if (status != AudioSystem.AUDIO_STATUS_OK) {
+            sLifecycleLogger.log(new AudioEventLogger.StringEvent(
+                    caller + ": initStreamVolume failed with " + status + " will retry")
+                    .printLog(ALOGE, TAG));
+            sendMsg(mAudioHandler, MSG_REINIT_VOLUMES, SENDMSG_NOOP, 0, 0,
+                    caller /*obj*/, 2 * INDICATE_SYSTEM_READY_RETRY_DELAY_MS);
+            return;
+        }
+
+        // did it work? check based on min/max values of some basic streams
+        if (!checkVolumeRangeInitialization(caller)) {
+            return;
+        }
+
+        // success
+        sLifecycleLogger.log(new AudioEventLogger.StringEvent(
+                caller + ": initStreamVolume succeeded").printLog(ALOGI, TAG));
+    }
+
+    /**
+     * Check volume ranges were properly initialized
+     * @return true if volume ranges were successfully initialized
+     */
+    private boolean checkVolumeRangeInitialization(String caller) {
+        boolean success = true;
+        final int[] basicStreams = { AudioSystem.STREAM_ALARM, AudioSystem.STREAM_RING,
+                AudioSystem.STREAM_MUSIC, AudioSystem.STREAM_VOICE_CALL,
+                AudioSystem.STREAM_ACCESSIBILITY };
+        for (int streamType : basicStreams) {
+            final AudioAttributes aa = new AudioAttributes.Builder()
+                    .setInternalLegacyStreamType(streamType).build();
+            if (AudioSystem.getMaxVolumeIndexForAttributes(aa) < 0
+                    || AudioSystem.getMinVolumeIndexForAttributes(aa) < 0) {
+                success = false;
+                break;
+            }
+        }
+        if (!success) {
+            sLifecycleLogger.log(new AudioEventLogger.StringEvent(
+                    caller + ": initStreamVolume succeeded but invalid mix/max levels, will retry")
+                    .printLog(ALOGW, TAG));
+            sendMsg(mAudioHandler, MSG_REINIT_VOLUMES, SENDMSG_NOOP, 0, 0,
+                    caller /*obj*/, 2 * INDICATE_SYSTEM_READY_RETRY_DELAY_MS);
+        }
+        return success;
+    }
+
     private void onDispatchAudioServerStateChange(boolean state) {
         synchronized (mAudioServerStateListeners) {
             for (AsdProxy asdp : mAudioServerStateListeners.values()) {
@@ -3680,13 +3751,15 @@
         private final IBinder mCb; // To be notified of client's death
         private final int mPid;
         private final int mUid;
-        private String mPackage;
+        private final boolean mIsPrivileged;
+        private final String mPackage;
         private int mMode = AudioSystem.MODE_NORMAL; // Current mode set by this client
 
-        SetModeDeathHandler(IBinder cb, int pid, int uid, String caller) {
+        SetModeDeathHandler(IBinder cb, int pid, int uid, boolean isPrivileged, String caller) {
             mCb = cb;
             mPid = pid;
             mUid = uid;
+            mIsPrivileged = isPrivileged;
             mPackage = caller;
         }
 
@@ -3698,12 +3771,13 @@
                 if (index < 0) {
                     Log.w(TAG, "unregistered setMode() client died");
                 } else {
-                    newModeOwnerPid = setModeInt(AudioSystem.MODE_NORMAL, mCb, mPid, mUid, TAG);
+                    newModeOwnerPid = setModeInt(
+                            AudioSystem.MODE_NORMAL, mCb, mPid, mUid, mIsPrivileged, TAG);
                 }
             }
             // when entering RINGTONE, IN_CALL or IN_COMMUNICATION mode, clear all
             // SCO connections not started by the application changing the mode when pid changes
-            mDeviceBroker.postSetModeOwnerPid(newModeOwnerPid);
+            mDeviceBroker.postSetModeOwnerPid(newModeOwnerPid, AudioService.this.getMode());
         }
 
         public int getPid() {
@@ -3729,6 +3803,10 @@
         public String getPackage() {
             return mPackage;
         }
+
+        public boolean isPrivileged() {
+            return mIsPrivileged;
+        }
     }
 
     /** @see AudioManager#setMode(int) */
@@ -3780,18 +3858,19 @@
                         + " without permission or being mode owner");
                 return;
             }
-            newModeOwnerPid = setModeInt(
-                mode, cb, callingPid, Binder.getCallingUid(), callingPackage);
+            newModeOwnerPid = setModeInt(mode, cb, callingPid, Binder.getCallingUid(),
+                    hasModifyPhoneStatePermission, callingPackage);
         }
         // when entering RINGTONE, IN_CALL or IN_COMMUNICATION mode, clear all
         // SCO connections not started by the application changing the mode when pid changes
-        mDeviceBroker.postSetModeOwnerPid(newModeOwnerPid);
+        mDeviceBroker.postSetModeOwnerPid(newModeOwnerPid, getMode());
     }
 
     // setModeInt() returns a valid PID if the audio mode was successfully set to
     // any mode other than NORMAL.
     @GuardedBy("mDeviceBroker.mSetModeLock")
-    private int setModeInt(int mode, IBinder cb, int pid, int uid, String caller) {
+    private int setModeInt(
+            int mode, IBinder cb, int pid, int uid, boolean isPrivileged, String caller) {
         if (DEBUG_MODE) {
             Log.v(TAG, "setModeInt(mode=" + mode + ", pid=" + pid
                     + ", uid=" + uid + ", caller=" + caller + ")");
@@ -3843,7 +3922,7 @@
                 }
             } else {
                 if (hdlr == null) {
-                    hdlr = new SetModeDeathHandler(cb, pid, uid, caller);
+                    hdlr = new SetModeDeathHandler(cb, pid, uid, isPrivileged, caller);
                 }
                 // Register for client death notification
                 try {
@@ -3902,7 +3981,8 @@
             // change of mode may require volume to be re-applied on some devices
             updateAbsVolumeMultiModeDevices(oldMode, actualMode);
 
-            if (actualMode == AudioSystem.MODE_IN_COMMUNICATION) {
+            if (actualMode == AudioSystem.MODE_IN_COMMUNICATION
+                    && !hdlr.isPrivileged()) {
                 sendMsg(mAudioHandler,
                         MSG_CHECK_MODE_FOR_UID,
                         SENDMSG_QUEUE,
@@ -5570,7 +5650,15 @@
             mIndexMin = MIN_STREAM_VOLUME[streamType] * 10;
             mIndexMinNoPerm = mIndexMin; // may be overwritten later in updateNoPermMinIndex()
             mIndexMax = MAX_STREAM_VOLUME[streamType] * 10;
-            AudioSystem.initStreamVolume(streamType, mIndexMin / 10, mIndexMax / 10);
+            final int status = AudioSystem.initStreamVolume(
+                    streamType, mIndexMin / 10, mIndexMax / 10);
+            if (status != AudioSystem.AUDIO_STATUS_OK) {
+                sLifecycleLogger.log(new AudioEventLogger.StringEvent(
+                         "VSS() stream:" + streamType + " initStreamVolume=" + status)
+                        .printLog(ALOGE, TAG));
+                sendMsg(mAudioHandler, MSG_REINIT_VOLUMES, SENDMSG_NOOP, 0, 0,
+                        "VSS()" /*obj*/, 2 * INDICATE_SYSTEM_READY_RETRY_DELAY_MS);
+            }
 
             readSettings();
             mVolumeChanged = new Intent(AudioManager.VOLUME_CHANGED_ACTION);
@@ -6401,14 +6489,17 @@
                         if (msg.obj == null) {
                             break;
                         }
-                        // If the app corresponding to this mode death handler object is not
-                        // capturing or playing audio anymore after 3 seconds, remove it
-                        // from the stack. Otherwise, check again in 3 seconds.
+                        // If no other app is currently owning the audio mode and
+                        // the app corresponding to this mode death handler object is still in the
+                        // mode owner stack but not capturing or playing audio after 3 seconds,
+                        // remove it from the stack.
+                        // Otherwise, check again in 3 seconds.
                         SetModeDeathHandler h = (SetModeDeathHandler) msg.obj;
                         if (mSetModeDeathHandlers.indexOf(h) < 0) {
                             break;
                         }
-                        if (mRecordMonitor.isRecordingActiveForUid(h.getUid())
+                        if (getModeOwnerUid() != h.getUid()
+                                || mRecordMonitor.isRecordingActiveForUid(h.getUid())
                                 || mPlaybackMonitor.isPlaybackActiveForUid(h.getUid())) {
                             sendMsg(mAudioHandler,
                                     MSG_CHECK_MODE_FOR_UID,
@@ -6419,11 +6510,15 @@
                                     CHECK_MODE_FOR_UID_PERIOD_MS);
                             break;
                         }
-                        // For now just log the fact that an app is hogging the audio mode.
-                        // TODO(b/160260850): remove abusive app from audio mode stack.
+                        setModeInt(AudioSystem.MODE_NORMAL, h.getBinder(), h.getPid(), h.getUid(),
+                                h.isPrivileged(), "MSG_CHECK_MODE_FOR_UID");
                         mModeLogger.log(new PhoneStateEvent(h.getPackage(), h.getPid()));
                     }
                     break;
+
+                case MSG_REINIT_VOLUMES:
+                    onReinitVolumes((String) msg.obj);
+                    break;
             }
         }
     }
@@ -7354,12 +7449,16 @@
     //==========================================================================================
     // AudioService logging and dumpsys
     //==========================================================================================
+    static final int LOG_NB_EVENTS_LIFECYCLE = 20;
     static final int LOG_NB_EVENTS_PHONE_STATE = 20;
     static final int LOG_NB_EVENTS_DEVICE_CONNECTION = 30;
     static final int LOG_NB_EVENTS_FORCE_USE = 20;
     static final int LOG_NB_EVENTS_VOLUME = 40;
     static final int LOG_NB_EVENTS_DYN_POLICY = 10;
 
+    static final AudioEventLogger sLifecycleLogger = new AudioEventLogger(LOG_NB_EVENTS_LIFECYCLE,
+            "audio services lifecycle");
+
     final private AudioEventLogger mModeLogger = new AudioEventLogger(LOG_NB_EVENTS_PHONE_STATE,
             "phone state (logged after successful call to AudioSystem.setPhoneState(int, int))");
 
@@ -7436,6 +7535,7 @@
     protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
 
+        sLifecycleLogger.dump(pw);
         if (mAudioHandler != null) {
             pw.println("\nMessage handler (watch for unhandled messages):");
             mAudioHandler.dump(new PrintWriterPrinter(pw), "  ");
diff --git a/services/core/java/com/android/server/audio/BtHelper.java b/services/core/java/com/android/server/audio/BtHelper.java
index b4c41b2..7616557 100644
--- a/services/core/java/com/android/server/audio/BtHelper.java
+++ b/services/core/java/com/android/server/audio/BtHelper.java
@@ -432,19 +432,36 @@
         // and this must be done on behalf of system server to make sure permissions are granted.
         final long ident = Binder.clearCallingIdentity();
         if (client != null) {
-            AudioService.sDeviceLogger.log(new AudioEventLogger.StringEvent(eventSource));
-            client.requestScoState(BluetoothHeadset.STATE_AUDIO_DISCONNECTED,
-                    SCO_MODE_VIRTUAL_CALL);
-            // If a disconnection is pending, the client will be removed whne clearAllScoClients()
-            // is called form receiveBtEvent()
-            if (mScoAudioState != SCO_STATE_DEACTIVATE_REQ
-                    && mScoAudioState != SCO_STATE_DEACTIVATING) {
-                client.remove(false /*stop */, true /*unregister*/);
-            }
+            stopAndRemoveClient(client, eventSource);
         }
         Binder.restoreCallingIdentity(ident);
     }
 
+    // @GuardedBy("AudioDeviceBroker.mSetModeLock")
+    @GuardedBy("AudioDeviceBroker.mDeviceStateLock")
+    /*package*/ synchronized void stopBluetoothScoForPid(int pid) {
+        ScoClient client = getScoClientForPid(pid);
+        if (client == null) {
+            return;
+        }
+        final String eventSource = new StringBuilder("stopBluetoothScoForPid(")
+                .append(pid).append(")").toString();
+        stopAndRemoveClient(client, eventSource);
+    }
+
+    @GuardedBy("AudioDeviceBroker.mDeviceStateLock")
+    // @GuardedBy("BtHelper.this")
+    private void stopAndRemoveClient(ScoClient client, @NonNull String eventSource) {
+        AudioService.sDeviceLogger.log(new AudioEventLogger.StringEvent(eventSource));
+        client.requestScoState(BluetoothHeadset.STATE_AUDIO_DISCONNECTED,
+                SCO_MODE_VIRTUAL_CALL);
+        // If a disconnection is pending, the client will be removed when clearAllScoClients()
+        // is called form receiveBtEvent()
+        if (mScoAudioState != SCO_STATE_DEACTIVATE_REQ
+                && mScoAudioState != SCO_STATE_DEACTIVATING) {
+            client.remove(false /*stop */, true /*unregister*/);
+        }
+    }
 
     /*package*/ synchronized void setHearingAidVolume(int index, int streamType) {
         if (mHearingAid == null) {
@@ -974,6 +991,16 @@
         return null;
     }
 
+    @GuardedBy("BtHelper.this")
+    private ScoClient getScoClientForPid(int pid) {
+        for (ScoClient cl : mScoClients) {
+            if (cl.getPid() == pid) {
+                return cl;
+            }
+        }
+        return null;
+    }
+
     // @GuardedBy("AudioDeviceBroker.mSetModeLock")
     //@GuardedBy("AudioDeviceBroker.mDeviceStateLock")
     @GuardedBy("BtHelper.this")
diff --git a/services/core/java/com/android/server/audio/TEST_MAPPING b/services/core/java/com/android/server/audio/TEST_MAPPING
index 0d34c53..90246f8 100644
--- a/services/core/java/com/android/server/audio/TEST_MAPPING
+++ b/services/core/java/com/android/server/audio/TEST_MAPPING
@@ -1,5 +1,5 @@
 {
-    "presubmit": [
+    "presubmit-large": [
         {
             "name": "CtsMediaTestCases",
             "options": [
diff --git a/services/core/java/com/android/server/backup/OWNERS b/services/core/java/com/android/server/backup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/services/core/java/com/android/server/backup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java
index 061972c..1312679 100644
--- a/services/core/java/com/android/server/biometrics/AuthService.java
+++ b/services/core/java/com/android/server/biometrics/AuthService.java
@@ -28,6 +28,7 @@
 import static android.hardware.biometrics.BiometricAuthenticator.TYPE_IRIS;
 import static android.hardware.biometrics.BiometricManager.Authenticators;
 
+import android.app.AppOpsManager;
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.hardware.biometrics.BiometricPrompt;
@@ -128,6 +129,11 @@
             return IIrisService.Stub.asInterface(
                     ServiceManager.getService(Context.IRIS_SERVICE));
         }
+
+        @VisibleForTesting
+        public AppOpsManager getAppOps(Context context) {
+            return context.getSystemService(AppOpsManager.class);
+        }
     }
 
     private final class AuthServiceImpl extends IAuthService.Stub {
@@ -138,6 +144,8 @@
 
             // Only allow internal clients to authenticate with a different userId.
             final int callingUserId = UserHandle.getCallingUserId();
+            final int callingUid = Binder.getCallingUid();
+            final int callingPid = Binder.getCallingPid();
             if (userId == callingUserId) {
                 checkPermission();
             } else {
@@ -146,6 +154,16 @@
                 checkInternalPermission();
             }
 
+            if (!checkAppOps(callingUid, opPackageName, "authenticate()")) {
+                Slog.e(TAG, "Denied by app ops: " + opPackageName);
+                return;
+            }
+
+            if (!Utils.isForeground(callingUid, callingPid)) {
+                Slog.e(TAG, "Caller is not foreground: " + opPackageName);
+                return;
+            }
+
             if (token == null || receiver == null || opPackageName == null || bundle == null) {
                 Slog.e(TAG, "Unable to authenticate, one or more null arguments");
                 return;
@@ -163,8 +181,6 @@
                 checkInternalPermission();
             }
 
-            final int callingUid = Binder.getCallingUid();
-            final int callingPid = Binder.getCallingPid();
             final long identity = Binder.clearCallingIdentity();
             try {
                 mBiometricService.authenticate(
@@ -392,4 +408,9 @@
                     "Must have USE_BIOMETRIC permission");
         }
     }
+
+    private boolean checkAppOps(int uid, String opPackageName, String reason) {
+        return mInjector.getAppOps(getContext()).noteOp(AppOpsManager.OP_USE_BIOMETRIC, uid,
+                opPackageName, null /* attributionTag */, reason) == AppOpsManager.MODE_ALLOWED;
+    }
 }
diff --git a/services/core/java/com/android/server/biometrics/AuthenticationClient.java b/services/core/java/com/android/server/biometrics/AuthenticationClient.java
index bf561ab..ef1b574 100644
--- a/services/core/java/com/android/server/biometrics/AuthenticationClient.java
+++ b/services/core/java/com/android/server/biometrics/AuthenticationClient.java
@@ -221,7 +221,7 @@
                     }
                 }
                 result = lockoutMode != LOCKOUT_NONE; // in a lockout mode
-                if(result) { // lockde out
+                if(result) { // locked out
                     mAlreadyDone = true;
                 }
             }
diff --git a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
index 7cdd3b3..f971ad1 100644
--- a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
+++ b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
@@ -724,10 +724,9 @@
         }
     }
 
-    protected void handleAuthenticated(BiometricAuthenticator.Identifier identifier,
-            ArrayList<Byte> token) {
+    protected void handleAuthenticated(boolean authenticated,
+            BiometricAuthenticator.Identifier identifier, ArrayList<Byte> token) {
         ClientMonitor client = mCurrentClient;
-        final boolean authenticated = identifier.getBiometricId() != 0;
 
         if (client != null && client.onAuthenticated(identifier, authenticated, token)) {
             removeClient(client);
@@ -976,7 +975,6 @@
             if (!client.onError(getHalDeviceId(), errorCode, 0 /* vendorCode */)) {
                 Slog.w(getTag(), "Cannot send permanent lockout message to client");
             }
-
             return;
         }
         startClient(client, true /* initiatedByClient */);
@@ -1024,7 +1022,7 @@
             return false;
         }
 
-        if (requireForeground && !(isForegroundActivity(uid, pid) || isCurrentClient(
+        if (requireForeground && !(Utils.isForeground(uid, pid) || isCurrentClient(
                 opPackageName))) {
             Slog.w(getTag(), "Rejecting " + opPackageName + "; not in foreground");
             return false;
@@ -1047,29 +1045,6 @@
         return mKeyguardPackage.equals(clientPackage);
     }
 
-    private boolean isForegroundActivity(int uid, int pid) {
-        try {
-            final List<ActivityManager.RunningAppProcessInfo> procs =
-                    ActivityManager.getService().getRunningAppProcesses();
-            if (procs == null) {
-                Slog.e(getTag(), "Processes null, defaulting to true");
-                return true;
-            }
-
-            int N = procs.size();
-            for (int i = 0; i < N; i++) {
-                ActivityManager.RunningAppProcessInfo proc = procs.get(i);
-                if (proc.pid == pid && proc.uid == uid
-                        && proc.importance <= IMPORTANCE_FOREGROUND_SERVICE) {
-                    return true;
-                }
-            }
-        } catch (RemoteException e) {
-            Slog.w(getTag(), "am.getRunningAppProcesses() failed");
-        }
-        return false;
-    }
-
     /**
      * Calls the HAL to switch states to the new task. If there's already a current task,
      * it calls cancel() and sets mPendingClient to begin when the current task finishes
diff --git a/services/core/java/com/android/server/biometrics/Utils.java b/services/core/java/com/android/server/biometrics/Utils.java
index 14378da..c661f45 100644
--- a/services/core/java/com/android/server/biometrics/Utils.java
+++ b/services/core/java/com/android/server/biometrics/Utils.java
@@ -16,20 +16,38 @@
 
 package com.android.server.biometrics;
 
+import static android.Manifest.permission.USE_BIOMETRIC_INTERNAL;
+import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE;
 import static android.hardware.biometrics.BiometricManager.Authenticators;
 
+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_USER_LOCKDOWN;
+
+import android.annotation.NonNull;
+import android.app.ActivityManager;
+import android.content.ComponentName;
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.hardware.biometrics.BiometricConstants;
 import android.hardware.biometrics.BiometricManager;
 import android.hardware.biometrics.BiometricPrompt;
 import android.hardware.biometrics.BiometricPrompt.AuthenticationResultType;
 import android.os.Build;
 import android.os.Bundle;
+import android.os.RemoteException;
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.util.Slog;
 
+import com.android.internal.R;
+import com.android.internal.widget.LockPatternUtils;
+
+import java.util.List;
+
 public class Utils {
+    private static final String TAG = "BiometricUtils";
+
     public static boolean isDebugEnabled(Context context, int targetUserId) {
         if (targetUserId == UserHandle.USER_NULL) {
             return false;
@@ -256,4 +274,50 @@
                 throw new IllegalArgumentException("Unsupported dismissal reason: " + reason);
         }
     }
+
+    public static boolean isForeground(int callingUid, int callingPid) {
+        try {
+            final List<ActivityManager.RunningAppProcessInfo> procs =
+                    ActivityManager.getService().getRunningAppProcesses();
+            if (procs == null) {
+                Slog.e(TAG, "No running app processes found, defaulting to true");
+                return true;
+            }
+
+            for (int i = 0; i < procs.size(); i++) {
+                ActivityManager.RunningAppProcessInfo proc = procs.get(i);
+                if (proc.pid == callingPid && proc.uid == callingUid
+                        && proc.importance <= IMPORTANCE_FOREGROUND_SERVICE) {
+                    return true;
+                }
+            }
+        } catch (RemoteException e) {
+            Slog.w(TAG, "am.getRunningAppProcesses() failed");
+        }
+        return false;
+    }
+
+    public static boolean isKeyguard(Context context, String clientPackage) {
+        final boolean hasPermission = context.checkCallingOrSelfPermission(USE_BIOMETRIC_INTERNAL)
+                == PackageManager.PERMISSION_GRANTED;
+
+        final ComponentName keyguardComponent = ComponentName.unflattenFromString(
+                context.getResources().getString(R.string.config_keyguardComponent));
+        final String keyguardPackage = keyguardComponent != null
+                ? keyguardComponent.getPackageName() : null;
+        return hasPermission && keyguardPackage != null && keyguardPackage.equals(clientPackage);
+    }
+
+    private static boolean containsFlag(int haystack, int needle) {
+        return (haystack & needle) != 0;
+    }
+
+    public static boolean isUserEncryptedOrLockdown(@NonNull LockPatternUtils lpu, int user) {
+        final int strongAuth = lpu.getStrongAuthForUser(user);
+        final boolean isEncrypted = containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_BOOT);
+        final boolean isLockDown = containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW)
+                || containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN);
+        Slog.d(TAG, "isEncrypted: " + isEncrypted + " isLockdown: " + isLockDown);
+        return isEncrypted || isLockDown;
+    }
 }
diff --git a/services/core/java/com/android/server/biometrics/face/FaceService.java b/services/core/java/com/android/server/biometrics/face/FaceService.java
index 72e1bbb..e5a1898 100644
--- a/services/core/java/com/android/server/biometrics/face/FaceService.java
+++ b/services/core/java/com/android/server/biometrics/face/FaceService.java
@@ -896,8 +896,9 @@
         public void onAuthenticated(final long deviceId, final int faceId, final int userId,
                 ArrayList<Byte> token) {
             mHandler.post(() -> {
-                Face face = new Face("", faceId, deviceId);
-                FaceService.super.handleAuthenticated(face, token);
+                final Face face = new Face("", faceId, deviceId);
+                final boolean authenticated = faceId != 0;
+                FaceService.super.handleAuthenticated(authenticated, face, token);
             });
         }
 
diff --git a/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java b/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
index 6b7ba6a..a90fee6 100644
--- a/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
@@ -56,6 +56,7 @@
 import android.os.SystemClock;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.util.EventLog;
 import android.util.Slog;
 import android.util.SparseBooleanArray;
 import android.util.SparseIntArray;
@@ -64,6 +65,7 @@
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.util.DumpUtils;
+import com.android.internal.widget.LockPatternUtils;
 import com.android.server.SystemServerInitThreadPool;
 import com.android.server.biometrics.AuthenticationClient;
 import com.android.server.biometrics.BiometricServiceBase;
@@ -72,6 +74,7 @@
 import com.android.server.biometrics.Constants;
 import com.android.server.biometrics.EnumerateClient;
 import com.android.server.biometrics.RemovalClient;
+import com.android.server.biometrics.Utils;
 
 import org.json.JSONArray;
 import org.json.JSONException;
@@ -124,6 +127,8 @@
     }
 
     private final class FingerprintAuthClient extends AuthenticationClientImpl {
+        private final boolean mDetectOnly;
+
         @Override
         protected boolean isFingerprint() {
             return true;
@@ -133,9 +138,10 @@
                 DaemonWrapper daemon, long halDeviceId, IBinder token,
                 ServiceListener listener, int targetUserId, int groupId, long opId,
                 boolean restricted, String owner, int cookie,
-                boolean requireConfirmation) {
+                boolean requireConfirmation, boolean detectOnly) {
             super(context, daemon, halDeviceId, token, listener, targetUserId, groupId, opId,
                     restricted, owner, cookie, requireConfirmation);
+            mDetectOnly = detectOnly;
         }
 
         @Override
@@ -177,6 +183,10 @@
 
             return super.handleFailedAttempt();
         }
+
+        boolean isDetectOnly() {
+            return mDetectOnly;
+        }
     }
 
     /**
@@ -234,18 +244,64 @@
         }
 
         @Override // Binder call
-        public void authenticate(final IBinder token, final long opId, final int groupId,
+        public void authenticate(final IBinder token, final long opId, final int userId,
                 final IFingerprintServiceReceiver receiver, final int flags,
                 final String opPackageName) {
-            updateActiveGroup(groupId, opPackageName);
+            // Keyguard check must be done on the caller's binder identity, since it also checks
+            // permission.
+            final boolean isKeyguard = Utils.isKeyguard(getContext(), opPackageName);
+
+            // Clear calling identity when checking LockPatternUtils for StrongAuth flags.
+            final long identity = Binder.clearCallingIdentity();
+            try {
+                if (isKeyguard && Utils.isUserEncryptedOrLockdown(mLockPatternUtils, userId)) {
+                    // If this happens, something in KeyguardUpdateMonitor is wrong.
+                    // SafetyNet for b/79776455
+                    EventLog.writeEvent(0x534e4554, "79776455");
+                    Slog.e(TAG, "Authenticate invoked when user is encrypted or lockdown");
+                    return;
+                }
+            } finally {
+                Binder.restoreCallingIdentity(identity);
+            }
+
+            updateActiveGroup(userId, opPackageName);
             final boolean restricted = isRestricted();
             final AuthenticationClientImpl client = new FingerprintAuthClient(getContext(),
                     mDaemonWrapper, mHalDeviceId, token, new ServiceListenerImpl(receiver),
-                    mCurrentUserId, groupId, opId, restricted, opPackageName,
-                    0 /* cookie */, false /* requireConfirmation */);
+                    mCurrentUserId, userId, opId, restricted, opPackageName,
+                    0 /* cookie */, false /* requireConfirmation */, false /* detectOnly */);
             authenticateInternal(client, opId, opPackageName);
         }
 
+        @Override
+        public void detectFingerprint(final IBinder token, final int userId,
+                final IFingerprintServiceReceiver receiver, final String opPackageName) {
+            checkPermission(USE_BIOMETRIC_INTERNAL);
+            if (!Utils.isKeyguard(getContext(), opPackageName)) {
+                Slog.w(TAG, "detectFingerprint called from non-sysui package: " + opPackageName);
+                return;
+            }
+
+            if (!Utils.isUserEncryptedOrLockdown(mLockPatternUtils, userId)) {
+                // If this happens, something in KeyguardUpdateMonitor is wrong. This should only
+                // ever be invoked when the user is encrypted or lockdown.
+                Slog.e(TAG, "detectFingerprint invoked when user is not encrypted or lockdown");
+                return;
+            }
+
+            Slog.d(TAG, "detectFingerprint, owner: " + opPackageName + ", user: " + userId);
+
+            updateActiveGroup(userId, opPackageName);
+            final boolean restricted = isRestricted();
+            final int operationId = 0;
+            final AuthenticationClientImpl client = new FingerprintAuthClient(getContext(),
+                    mDaemonWrapper, mHalDeviceId, token, new ServiceListenerImpl(receiver),
+                    mCurrentUserId, userId, operationId, restricted, opPackageName,
+                    0 /* cookie */, false /* requireConfirmation */, true /* detectOnly */);
+            authenticateInternal(client, operationId, opPackageName);
+        }
+
         @Override // Binder call
         public void prepareForAuthentication(IBinder token, long opId, int groupId,
                 IBiometricServiceReceiverInternal wrapperReceiver, String opPackageName,
@@ -257,7 +313,7 @@
                     mDaemonWrapper, mHalDeviceId, token,
                     new BiometricPromptServiceListenerImpl(wrapperReceiver),
                     mCurrentUserId, groupId, opId, restricted, opPackageName, cookie,
-                    false /* requireConfirmation */);
+                    false /* requireConfirmation */, false /* detectOnly */);
             authenticateInternal(client, opId, opPackageName, callingUid, callingPid,
                     callingUserId);
         }
@@ -275,6 +331,17 @@
         }
 
         @Override // Binder call
+        public void cancelFingerprintDetect(final IBinder token, final String opPackageName) {
+            checkPermission(USE_BIOMETRIC_INTERNAL);
+            if (!Utils.isKeyguard(getContext(), opPackageName)) {
+                Slog.w(TAG, "cancelFingerprintDetect called from non-sysui package: "
+                        + opPackageName);
+                return;
+            }
+            cancelAuthenticationInternal(token, opPackageName);
+        }
+
+        @Override // Binder call
         public void cancelAuthenticationFromService(final IBinder token, final String opPackageName,
                 int callingUid, int callingPid, int callingUserId, boolean fromClient) {
             checkPermission(MANAGE_BIOMETRIC);
@@ -518,7 +585,12 @@
                 BiometricAuthenticator.Identifier biometric, int userId)
                 throws RemoteException {
             if (mFingerprintServiceReceiver != null) {
-                if (biometric == null || biometric instanceof Fingerprint) {
+                final ClientMonitor client = getCurrentClient();
+                if (client instanceof FingerprintAuthClient
+                        && ((FingerprintAuthClient) client).isDetectOnly()) {
+                    mFingerprintServiceReceiver
+                            .onFingerprintDetected(deviceId, userId, isStrongBiometric());
+                } else if (biometric == null || biometric instanceof Fingerprint) {
                     mFingerprintServiceReceiver.onAuthenticationSucceeded(deviceId,
                             (Fingerprint) biometric, userId, isStrongBiometric());
                 } else {
@@ -575,6 +647,7 @@
     private final LockoutReceiver mLockoutReceiver = new LockoutReceiver();
     protected final ResetFailedAttemptsForUserRunnable mResetFailedAttemptsForCurrentUserRunnable =
             new ResetFailedAttemptsForUserRunnable();
+    private final LockPatternUtils mLockPatternUtils;
 
     /**
      * Receives callbacks from the HAL.
@@ -608,8 +681,17 @@
         public void onAuthenticated(final long deviceId, final int fingerId, final int groupId,
                 ArrayList<Byte> token) {
             mHandler.post(() -> {
-                Fingerprint fp = new Fingerprint("", groupId, fingerId, deviceId);
-                FingerprintService.super.handleAuthenticated(fp, token);
+                boolean authenticated = fingerId != 0;
+                final ClientMonitor client = getCurrentClient();
+                if (client instanceof FingerprintAuthClient) {
+                    if (((FingerprintAuthClient) client).isDetectOnly()) {
+                        Slog.w(TAG, "Detect-only. Device is encrypted or locked down");
+                        authenticated = true;
+                    }
+                }
+
+                final Fingerprint fp = new Fingerprint("", groupId, fingerId, deviceId);
+                FingerprintService.super.handleAuthenticated(authenticated, fp, token);
             });
         }
 
@@ -722,6 +804,7 @@
         mAlarmManager = context.getSystemService(AlarmManager.class);
         context.registerReceiver(mLockoutReceiver, new IntentFilter(getLockoutResetIntent()),
                 getLockoutBroadcastPermission(), null /* handler */);
+        mLockPatternUtils = new LockPatternUtils(context);
     }
 
     @Override
diff --git a/services/core/java/com/android/server/camera/OWNERS b/services/core/java/com/android/server/camera/OWNERS
new file mode 100644
index 0000000..f48a95c
--- /dev/null
+++ b/services/core/java/com/android/server/camera/OWNERS
@@ -0,0 +1 @@
+include platform/frameworks/av:/camera/OWNERS
diff --git a/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java b/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
index 4fb6607..995bb24 100644
--- a/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
+++ b/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
@@ -166,7 +166,7 @@
 
     private static void fillLinkInfo(DefaultNetworkEvent ev, NetworkAgentInfo nai) {
         LinkProperties lp = nai.linkProperties;
-        ev.netId = nai.network().netId;
+        ev.netId = nai.network().getNetId();
         ev.transports |= BitUtils.packBits(nai.networkCapabilities.getTransportTypes());
         ev.ipv4 |= lp.hasIpv4Address() && lp.hasIpv4DefaultRoute();
         ev.ipv6 |= lp.hasGlobalIpv6Address() && lp.hasIpv6DefaultRoute();
diff --git a/services/core/java/com/android/server/connectivity/DnsManager.java b/services/core/java/com/android/server/connectivity/DnsManager.java
index c789186..c70bb08 100644
--- a/services/core/java/com/android/server/connectivity/DnsManager.java
+++ b/services/core/java/com/android/server/connectivity/DnsManager.java
@@ -34,7 +34,6 @@
 import android.net.IDnsResolver;
 import android.net.LinkProperties;
 import android.net.Network;
-import android.net.NetworkUtils;
 import android.net.ResolverOptionsParcel;
 import android.net.ResolverParamsParcel;
 import android.net.Uri;
@@ -45,11 +44,12 @@
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.text.TextUtils;
+import android.util.Log;
 import android.util.Pair;
-import android.util.Slog;
 
 import java.net.InetAddress;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -59,7 +59,6 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 
-
 /**
  * Encapsulate the management of DNS settings for networks.
  *
@@ -266,23 +265,23 @@
     }
 
     public void removeNetwork(Network network) {
-        mPrivateDnsMap.remove(network.netId);
-        mPrivateDnsValidationMap.remove(network.netId);
-        mTransportsMap.remove(network.netId);
-        mLinkPropertiesMap.remove(network.netId);
+        mPrivateDnsMap.remove(network.getNetId());
+        mPrivateDnsValidationMap.remove(network.getNetId());
+        mTransportsMap.remove(network.getNetId());
+        mLinkPropertiesMap.remove(network.getNetId());
     }
 
     // This is exclusively called by ConnectivityService#dumpNetworkDiagnostics() which
     // is not on the ConnectivityService handler thread.
     public PrivateDnsConfig getPrivateDnsConfig(@NonNull Network network) {
-        return mPrivateDnsMap.getOrDefault(network.netId, PRIVATE_DNS_OFF);
+        return mPrivateDnsMap.getOrDefault(network.getNetId(), PRIVATE_DNS_OFF);
     }
 
     public PrivateDnsConfig updatePrivateDns(Network network, PrivateDnsConfig cfg) {
-        Slog.w(TAG, "updatePrivateDns(" + network + ", " + cfg + ")");
+        Log.w(TAG, "updatePrivateDns(" + network + ", " + cfg + ")");
         return (cfg != null)
-                ? mPrivateDnsMap.put(network.netId, cfg)
-                : mPrivateDnsMap.remove(network.netId);
+                ? mPrivateDnsMap.put(network.getNetId(), cfg)
+                : mPrivateDnsMap.remove(network.getNetId());
     }
 
     public void updatePrivateDnsStatus(int netId, LinkProperties lp) {
@@ -309,8 +308,7 @@
     }
 
     public void updatePrivateDnsValidation(PrivateDnsValidationUpdate update) {
-        final PrivateDnsValidationStatuses statuses =
-                mPrivateDnsValidationMap.get(update.netId);
+        final PrivateDnsValidationStatuses statuses = mPrivateDnsValidationMap.get(update.netId);
         if (statuses == null) return;
         statuses.updateStatus(update);
     }
@@ -364,12 +362,11 @@
         paramsParcel.successThreshold = mSuccessThreshold;
         paramsParcel.minSamples = mMinSamples;
         paramsParcel.maxSamples = mMaxSamples;
-        paramsParcel.servers =
-                NetworkUtils.makeStrings(lp.getDnsServers());
+        paramsParcel.servers = makeStrings(lp.getDnsServers());
         paramsParcel.domains = getDomainStrings(lp.getDomains());
         paramsParcel.tlsName = strictMode ? privateDnsCfg.hostname : "";
         paramsParcel.tlsServers =
-                strictMode ? NetworkUtils.makeStrings(
+                strictMode ? makeStrings(
                         Arrays.stream(privateDnsCfg.ips)
                               .filter((ip) -> lp.isReachable(ip))
                               .collect(Collectors.toList()))
@@ -389,7 +386,7 @@
             mPrivateDnsValidationMap.remove(netId);
         }
 
-        Slog.d(TAG, String.format("sendDnsConfigurationForNetwork(%d, %s, %s, %d, %d, %d, %d, "
+        Log.d(TAG, String.format("sendDnsConfigurationForNetwork(%d, %s, %s, %d, %d, %d, %d, "
                 + "%d, %d, %s, %s)", paramsParcel.netId, Arrays.toString(paramsParcel.servers),
                 Arrays.toString(paramsParcel.domains), paramsParcel.sampleValiditySeconds,
                 paramsParcel.successThreshold, paramsParcel.minSamples,
@@ -400,7 +397,7 @@
         try {
             mDnsResolver.setResolverConfiguration(paramsParcel);
         } catch (RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "Error setting DNS configuration: " + e);
+            Log.e(TAG, "Error setting DNS configuration: " + e);
             return;
         }
     }
@@ -431,8 +428,8 @@
                 DNS_RESOLVER_SAMPLE_VALIDITY_SECONDS,
                 DNS_RESOLVER_DEFAULT_SAMPLE_VALIDITY_SECONDS);
         if (mSampleValidity < 0 || mSampleValidity > 65535) {
-            Slog.w(TAG, "Invalid sampleValidity=" + mSampleValidity + ", using default=" +
-                    DNS_RESOLVER_DEFAULT_SAMPLE_VALIDITY_SECONDS);
+            Log.w(TAG, "Invalid sampleValidity=" + mSampleValidity + ", using default="
+                    + DNS_RESOLVER_DEFAULT_SAMPLE_VALIDITY_SECONDS);
             mSampleValidity = DNS_RESOLVER_DEFAULT_SAMPLE_VALIDITY_SECONDS;
         }
 
@@ -440,17 +437,17 @@
                 DNS_RESOLVER_SUCCESS_THRESHOLD_PERCENT,
                 DNS_RESOLVER_DEFAULT_SUCCESS_THRESHOLD_PERCENT);
         if (mSuccessThreshold < 0 || mSuccessThreshold > 100) {
-            Slog.w(TAG, "Invalid successThreshold=" + mSuccessThreshold + ", using default=" +
-                    DNS_RESOLVER_DEFAULT_SUCCESS_THRESHOLD_PERCENT);
+            Log.w(TAG, "Invalid successThreshold=" + mSuccessThreshold + ", using default="
+                    + DNS_RESOLVER_DEFAULT_SUCCESS_THRESHOLD_PERCENT);
             mSuccessThreshold = DNS_RESOLVER_DEFAULT_SUCCESS_THRESHOLD_PERCENT;
         }
 
         mMinSamples = getIntSetting(DNS_RESOLVER_MIN_SAMPLES, DNS_RESOLVER_DEFAULT_MIN_SAMPLES);
         mMaxSamples = getIntSetting(DNS_RESOLVER_MAX_SAMPLES, DNS_RESOLVER_DEFAULT_MAX_SAMPLES);
         if (mMinSamples < 0 || mMinSamples > mMaxSamples || mMaxSamples > 64) {
-            Slog.w(TAG, "Invalid sample count (min, max)=(" + mMinSamples + ", " + mMaxSamples +
-                    "), using default=(" + DNS_RESOLVER_DEFAULT_MIN_SAMPLES + ", " +
-                    DNS_RESOLVER_DEFAULT_MAX_SAMPLES + ")");
+            Log.w(TAG, "Invalid sample count (min, max)=(" + mMinSamples + ", " + mMaxSamples
+                    + "), using default=(" + DNS_RESOLVER_DEFAULT_MIN_SAMPLES + ", "
+                    + DNS_RESOLVER_DEFAULT_MAX_SAMPLES + ")");
             mMinSamples = DNS_RESOLVER_DEFAULT_MIN_SAMPLES;
             mMaxSamples = DNS_RESOLVER_DEFAULT_MAX_SAMPLES;
         }
@@ -460,6 +457,21 @@
         return Settings.Global.getInt(mContentResolver, which, dflt);
     }
 
+    /**
+     * Create a string array of host addresses from a collection of InetAddresses
+     *
+     * @param addrs a Collection of InetAddresses
+     * @return an array of Strings containing their host addresses
+     */
+    private String[] makeStrings(Collection<InetAddress> addrs) {
+        String[] result = new String[addrs.size()];
+        int i = 0;
+        for (InetAddress addr : addrs) {
+            result[i++] = addr.getHostAddress();
+        }
+        return result;
+    }
+
     private static String getPrivateDnsMode(ContentResolver cr) {
         String mode = getStringSetting(cr, PRIVATE_DNS_MODE);
         if (TextUtils.isEmpty(mode)) mode = getStringSetting(cr, PRIVATE_DNS_DEFAULT_MODE);
diff --git a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
index 8625a6f..96cbfde 100644
--- a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
+++ b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
@@ -40,11 +40,11 @@
 import android.annotation.Nullable;
 import android.content.Context;
 import android.net.ISocketKeepaliveCallback;
+import android.net.InetAddresses;
 import android.net.InvalidPacketException;
 import android.net.KeepalivePacketData;
 import android.net.NattKeepalivePacketData;
 import android.net.NetworkAgent;
-import android.net.NetworkUtils;
 import android.net.SocketKeepalive.InvalidSocketException;
 import android.net.TcpKeepalivePacketData;
 import android.net.util.KeepaliveUtils;
@@ -625,8 +625,8 @@
 
         InetAddress srcAddress, dstAddress;
         try {
-            srcAddress = NetworkUtils.numericToInetAddress(srcAddrString);
-            dstAddress = NetworkUtils.numericToInetAddress(dstAddrString);
+            srcAddress = InetAddresses.parseNumericAddress(srcAddrString);
+            dstAddress = InetAddresses.parseNumericAddress(dstAddrString);
         } catch (IllegalArgumentException e) {
             notifyErrorCallback(cb, ERROR_INVALID_IP_ADDRESS);
             return;
diff --git a/services/core/java/com/android/server/connectivity/LingerMonitor.java b/services/core/java/com/android/server/connectivity/LingerMonitor.java
index f99f4c6..adec7ad 100644
--- a/services/core/java/com/android/server/connectivity/LingerMonitor.java
+++ b/services/core/java/com/android/server/connectivity/LingerMonitor.java
@@ -114,7 +114,7 @@
 
     private int getNotificationSource(NetworkAgentInfo toNai) {
         for (int i = 0; i < mNotifications.size(); i++) {
-            if (mNotifications.valueAt(i) == toNai.network.netId) {
+            if (mNotifications.valueAt(i) == toNai.network.getNetId()) {
                 return mNotifications.keyAt(i);
             }
         }
@@ -122,7 +122,7 @@
     }
 
     private boolean everNotified(NetworkAgentInfo nai) {
-        return mEverNotified.get(nai.network.netId, false);
+        return mEverNotified.get(nai.network.getNetId(), false);
     }
 
     @VisibleForTesting
@@ -153,7 +153,7 @@
     }
 
     private void showNotification(NetworkAgentInfo fromNai, NetworkAgentInfo toNai) {
-        mNotifier.showNotification(fromNai.network.netId, NotificationType.NETWORK_SWITCH,
+        mNotifier.showNotification(fromNai.network.getNetId(), NotificationType.NETWORK_SWITCH,
                 fromNai, toNai, createNotificationIntent(), true);
     }
 
@@ -208,8 +208,8 @@
                     + " type=" + sNotifyTypeNames.get(notifyType, "unknown(" + notifyType + ")"));
         }
 
-        mNotifications.put(fromNai.network.netId, toNai.network.netId);
-        mEverNotified.put(fromNai.network.netId, true);
+        mNotifications.put(fromNai.network.getNetId(), toNai.network.getNetId());
+        mEverNotified.put(fromNai.network.getNetId(), true);
     }
 
     /**
@@ -295,8 +295,8 @@
     }
 
     public void noteDisconnect(NetworkAgentInfo nai) {
-        mNotifications.delete(nai.network.netId);
-        mEverNotified.delete(nai.network.netId);
+        mNotifications.delete(nai.network.getNetId());
+        mEverNotified.delete(nai.network.getNetId());
         maybeStopNotifying(nai);
         // No need to cancel notifications on nai: NetworkMonitor does that on disconnect.
     }
diff --git a/services/core/java/com/android/server/connectivity/MultipathPolicyTracker.java b/services/core/java/com/android/server/connectivity/MultipathPolicyTracker.java
index 17828a0..21ef356 100644
--- a/services/core/java/com/android/server/connectivity/MultipathPolicyTracker.java
+++ b/services/core/java/com/android/server/connectivity/MultipathPolicyTracker.java
@@ -60,8 +60,8 @@
 import android.provider.Settings;
 import android.telephony.TelephonyManager;
 import android.util.DebugUtils;
+import android.util.Log;
 import android.util.Range;
-import android.util.Slog;
 
 import com.android.internal.R;
 import com.android.internal.annotations.VisibleForTesting;
@@ -230,7 +230,7 @@
             mUsageCallback = new UsageCallback() {
                 @Override
                 public void onThresholdReached(int networkType, String subscriberId) {
-                    if (DBG) Slog.d(TAG, "onThresholdReached for network " + network);
+                    if (DBG) Log.d(TAG, "onThresholdReached for network " + network);
                     mMultipathBudget = 0;
                     updateMultipathBudget();
                 }
@@ -252,7 +252,7 @@
             final long bytes = getNetworkTotalBytes(
                     start.toInstant().toEpochMilli(),
                     end.toInstant().toEpochMilli());
-            if (DBG) Slog.d(TAG, "Non-default data usage: " + bytes);
+            if (DBG) Log.d(TAG, "Non-default data usage: " + bytes);
             return bytes;
         }
 
@@ -261,7 +261,7 @@
                 return LocalServices.getService(NetworkStatsManagerInternal.class)
                         .getNetworkTotalBytes(mNetworkTemplate, start, end);
             } catch (RuntimeException e) {
-                Slog.w(TAG, "Failed to get data usage: " + e);
+                Log.w(TAG, "Failed to get data usage: " + e);
                 return -1;
             }
         }
@@ -326,17 +326,17 @@
         void updateMultipathBudget() {
             long quota = LocalServices.getService(NetworkPolicyManagerInternal.class)
                     .getSubscriptionOpportunisticQuota(this.network, QUOTA_TYPE_MULTIPATH);
-            if (DBG) Slog.d(TAG, "Opportunistic quota from data plan: " + quota + " bytes");
+            if (DBG) Log.d(TAG, "Opportunistic quota from data plan: " + quota + " bytes");
 
             // Fallback to user settings-based quota if not available from phone plan
             if (quota == OPPORTUNISTIC_QUOTA_UNKNOWN) {
                 quota = getUserPolicyOpportunisticQuotaBytes();
-                if (DBG) Slog.d(TAG, "Opportunistic quota from user policy: " + quota + " bytes");
+                if (DBG) Log.d(TAG, "Opportunistic quota from user policy: " + quota + " bytes");
             }
 
             if (quota == OPPORTUNISTIC_QUOTA_UNKNOWN) {
                 quota = getDefaultDailyMultipathQuotaBytes();
-                if (DBG) Slog.d(TAG, "Setting quota: " + quota + " bytes");
+                if (DBG) Log.d(TAG, "Setting quota: " + quota + " bytes");
             }
 
             // TODO: re-register if day changed: budget may have run out but should be refreshed.
@@ -344,7 +344,7 @@
                 // If there is already a usage callback pending , there's no need to re-register it
                 // if the quota hasn't changed. The callback will simply fire as expected when the
                 // budget is spent.
-                if (DBG) Slog.d(TAG, "Quota still " + quota + ", not updating.");
+                if (DBG) Log.d(TAG, "Quota still " + quota + ", not updating.");
                 return;
             }
             mQuota = quota;
@@ -364,8 +364,9 @@
             // since last time, so even if this is called very often the budget will not snap to 0
             // as soon as there are less than 2MB left for today.
             if (budget > NetworkStatsManager.MIN_THRESHOLD_BYTES) {
-                if (DBG) Slog.d(TAG, "Setting callback for " + budget +
-                        " bytes on network " + network);
+                if (DBG) {
+                    Log.d(TAG, "Setting callback for " + budget + " bytes on network " + network);
+                }
                 registerUsageCallback(budget);
             } else {
                 maybeUnregisterUsageCallback();
@@ -402,7 +403,7 @@
 
         private void maybeUnregisterUsageCallback() {
             if (haveMultipathBudget()) {
-                if (DBG) Slog.d(TAG, "Unregistering callback, budget was " + mMultipathBudget);
+                if (DBG) Log.d(TAG, "Unregistering callback, budget was " + mMultipathBudget);
                 mStatsManager.unregisterUsageCallback(mUsageCallback);
                 mMultipathBudget = 0;
             }
@@ -467,9 +468,9 @@
                 try {
                     mMultipathTrackers.put(network, new MultipathTracker(network, nc));
                 } catch (IllegalStateException e) {
-                    Slog.e(TAG, "Can't track mobile network " + network + ": " + e.getMessage());
+                    Log.e(TAG, "Can't track mobile network " + network + ": " + e.getMessage());
                 }
-                if (DBG) Slog.d(TAG, "Tracking mobile network " + network);
+                if (DBG) Log.d(TAG, "Tracking mobile network " + network);
             }
 
             @Override
@@ -479,7 +480,7 @@
                     existing.shutdown();
                     mMultipathTrackers.remove(network);
                 }
-                if (DBG) Slog.d(TAG, "No longer tracking mobile network " + network);
+                if (DBG) Log.d(TAG, "No longer tracking mobile network " + network);
             }
         };
 
@@ -524,16 +525,16 @@
 
         @Override
         public void onChange(boolean selfChange) {
-            Slog.wtf(TAG, "Should never be reached.");
+            Log.wtf(TAG, "Should never be reached.");
         }
 
         @Override
         public void onChange(boolean selfChange, Uri uri) {
             if (!Settings.Global.getUriFor(NETWORK_DEFAULT_DAILY_MULTIPATH_QUOTA_BYTES)
                     .equals(uri)) {
-                Slog.wtf(TAG, "Unexpected settings observation: " + uri);
+                Log.wtf(TAG, "Unexpected settings observation: " + uri);
             }
-            if (DBG) Slog.d(TAG, "Settings change: updating budgets.");
+            if (DBG) Log.d(TAG, "Settings change: updating budgets.");
             updateAllMultipathBudgets();
         }
     }
@@ -541,7 +542,7 @@
     private final class ConfigChangeReceiver extends BroadcastReceiver {
         @Override
         public void onReceive(Context context, Intent intent) {
-            if (DBG) Slog.d(TAG, "Configuration change: updating budgets.");
+            if (DBG) Log.d(TAG, "Configuration change: updating budgets.");
             updateAllMultipathBudgets();
         }
     }
diff --git a/services/core/java/com/android/server/connectivity/Nat464Xlat.java b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
index 163788f..c1b1b6a 100644
--- a/services/core/java/com/android/server/connectivity/Nat464Xlat.java
+++ b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
@@ -30,7 +30,7 @@
 import android.os.INetworkManagementService;
 import android.os.RemoteException;
 import android.os.ServiceSpecificException;
-import android.util.Slog;
+import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.ArrayUtils;
@@ -176,7 +176,7 @@
         try {
             mNMService.registerObserver(this);
         } catch (RemoteException e) {
-            Slog.e(TAG, "Can't register iface observer for clat on " + mNetwork.toShortString());
+            Log.e(TAG, "Can't register iface observer for clat on " + mNetwork.toShortString());
             return;
         }
 
@@ -185,7 +185,7 @@
         try {
             addrStr = mNetd.clatdStart(baseIface, mNat64PrefixInUse.toString());
         } catch (RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "Error starting clatd on " + baseIface + ": " + e);
+            Log.e(TAG, "Error starting clatd on " + baseIface + ": " + e);
         }
         mIface = CLAT_PREFIX + baseIface;
         mBaseIface = baseIface;
@@ -193,7 +193,7 @@
         try {
             mIPv6Address = (Inet6Address) InetAddresses.parseNumericAddress(addrStr);
         } catch (ClassCastException | IllegalArgumentException | NullPointerException e) {
-            Slog.e(TAG, "Invalid IPv6 address " + addrStr);
+            Log.e(TAG, "Invalid IPv6 address " + addrStr);
         }
         if (mPrefixDiscoveryRunning && !isPrefixDiscoveryNeeded()) {
             stopPrefixDiscovery();
@@ -218,7 +218,7 @@
         try {
             mNMService.unregisterObserver(this);
         } catch (RemoteException | IllegalStateException e) {
-            Slog.e(TAG, "Error unregistering clatd observer on " + mBaseIface + ": " + e);
+            Log.e(TAG, "Error unregistering clatd observer on " + mBaseIface + ": " + e);
         }
         mNat64PrefixInUse = null;
         mIface = null;
@@ -242,37 +242,37 @@
     @VisibleForTesting
     protected void start() {
         if (isStarted()) {
-            Slog.e(TAG, "startClat: already started");
+            Log.e(TAG, "startClat: already started");
             return;
         }
 
         if (mNetwork.linkProperties == null) {
-            Slog.e(TAG, "startClat: Can't start clat with null LinkProperties");
+            Log.e(TAG, "startClat: Can't start clat with null LinkProperties");
             return;
         }
 
         String baseIface = mNetwork.linkProperties.getInterfaceName();
         if (baseIface == null) {
-            Slog.e(TAG, "startClat: Can't start clat on null interface");
+            Log.e(TAG, "startClat: Can't start clat on null interface");
             return;
         }
         // TODO: should we only do this if mNetd.clatdStart() succeeds?
-        Slog.i(TAG, "Starting clatd on " + baseIface);
+        Log.i(TAG, "Starting clatd on " + baseIface);
         enterStartingState(baseIface);
     }
 
     @VisibleForTesting
     protected void stop() {
         if (!isStarted()) {
-            Slog.e(TAG, "stopClat: already stopped");
+            Log.e(TAG, "stopClat: already stopped");
             return;
         }
 
-        Slog.i(TAG, "Stopping clatd on " + mBaseIface);
+        Log.i(TAG, "Stopping clatd on " + mBaseIface);
         try {
             mNetd.clatdStop(mBaseIface);
         } catch (RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "Error stopping clatd on " + mBaseIface + ": " + e);
+            Log.e(TAG, "Error stopping clatd on " + mBaseIface + ": " + e);
         }
 
         String iface = mIface;
@@ -294,7 +294,7 @@
         try {
             mDnsResolver.startPrefix64Discovery(getNetId());
         } catch (RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "Error starting prefix discovery on netId " + getNetId() + ": " + e);
+            Log.e(TAG, "Error starting prefix discovery on netId " + getNetId() + ": " + e);
         }
         mPrefixDiscoveryRunning = true;
     }
@@ -303,7 +303,7 @@
         try {
             mDnsResolver.stopPrefix64Discovery(getNetId());
         } catch (RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "Error stopping prefix discovery on netId " + getNetId() + ": " + e);
+            Log.e(TAG, "Error stopping prefix discovery on netId " + getNetId() + ": " + e);
         }
         mPrefixDiscoveryRunning = false;
     }
@@ -320,7 +320,7 @@
         try {
             mDnsResolver.setPrefix64(getNetId(), prefixString);
         } catch (RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "Error setting NAT64 prefix on netId " + getNetId() + " to "
+            Log.e(TAG, "Error setting NAT64 prefix on netId " + getNetId() + " to "
                     + prefix + ": " + e);
         }
     }
@@ -328,7 +328,7 @@
     private void maybeHandleNat64PrefixChange() {
         final IpPrefix newPrefix = selectNat64Prefix();
         if (!Objects.equals(mNat64PrefixInUse, newPrefix)) {
-            Slog.d(TAG, "NAT64 prefix changed from " + mNat64PrefixInUse + " to "
+            Log.d(TAG, "NAT64 prefix changed from " + mNat64PrefixInUse + " to "
                     + newPrefix);
             stop();
             // It's safe to call update here, even though this method is called from update, because
@@ -418,7 +418,7 @@
             return;
         }
 
-        Slog.d(TAG, "clatd running, updating NAI for " + mIface);
+        Log.d(TAG, "clatd running, updating NAI for " + mIface);
         for (LinkProperties stacked: oldLp.getStackedLinks()) {
             if (Objects.equals(mIface, stacked.getInterfaceName())) {
                 lp.addStackedLink(stacked);
@@ -451,7 +451,7 @@
             return new LinkAddress(
                     InetAddresses.parseNumericAddress(config.ipv4Addr), config.prefixLength);
         } catch (IllegalArgumentException | RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "Error getting link properties: " + e);
+            Log.e(TAG, "Error getting link properties: " + e);
             return null;
         }
     }
@@ -480,11 +480,11 @@
 
         LinkAddress clatAddress = getLinkAddress(iface);
         if (clatAddress == null) {
-            Slog.e(TAG, "clatAddress was null for stacked iface " + iface);
+            Log.e(TAG, "clatAddress was null for stacked iface " + iface);
             return;
         }
 
-        Slog.i(TAG, String.format("interface %s is up, adding stacked link %s on top of %s",
+        Log.i(TAG, String.format("interface %s is up, adding stacked link %s on top of %s",
                 mIface, mIface, mBaseIface));
         enterRunningState();
         LinkProperties lp = new LinkProperties(mNetwork.linkProperties);
@@ -503,7 +503,7 @@
             return;
         }
 
-        Slog.i(TAG, "interface " + iface + " removed");
+        Log.i(TAG, "interface " + iface + " removed");
         // If we're running, and the interface was removed, then we didn't call stop(), and it's
         // likely that clatd crashed. Ensure we call stop() so we can start clatd again. Calling
         // stop() will also update LinkProperties, and if clatd crashed, the LinkProperties update
@@ -528,6 +528,6 @@
 
     @VisibleForTesting
     protected int getNetId() {
-        return mNetwork.network.netId;
+        return mNetwork.network.getNetId();
     }
 }
diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
index a9f62d9..52b9f5c 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -132,6 +132,17 @@
     // TODO: make this private with a getter.
     public NetworkCapabilities networkCapabilities;
     public final NetworkAgentConfig networkAgentConfig;
+
+    // Underlying networks declared by the agent. Only set if supportsUnderlyingNetworks is true.
+    // The networks in this list might be declared by a VPN app using setUnderlyingNetworks and are
+    // not guaranteed to be current or correct, or even to exist.
+    public @Nullable Network[] declaredUnderlyingNetworks;
+
+    // The capabilities originally announced by the NetworkAgent, regardless of any capabilities
+    // that were added or removed due to this network's underlying networks.
+    // Only set if #supportsUnderlyingNetworks is true.
+    public @Nullable NetworkCapabilities declaredCapabilities;
+
     // Indicates if netd has been told to create this Network. From this point on the appropriate
     // routing rules are setup and routes are added so packets can begin flowing over the Network.
     // This is a sticky bit; once set it is never cleared.
@@ -474,10 +485,16 @@
                         networkCapabilities);
     }
 
+    /** Whether this network is a VPN. */
     public boolean isVPN() {
         return networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN);
     }
 
+    /** Whether this network might have underlying networks. Currently only true for VPNs. */
+    public boolean supportsUnderlyingNetworks() {
+        return isVPN();
+    }
+
     private int getCurrentScore(boolean pretendValidated) {
         // TODO: We may want to refactor this into a NetworkScore class that takes a base score from
         // the NetworkAgent and signals from the NetworkAgent and uses those signals to modify the
@@ -594,7 +611,7 @@
         if (newExpiry > 0) {
             mLingerMessage = new WakeupMessage(
                     mContext, mHandler,
-                    "NETWORK_LINGER_COMPLETE." + network.netId /* cmdName */,
+                    "NETWORK_LINGER_COMPLETE." + network.getNetId() /* cmdName */,
                     EVENT_NETWORK_LINGER_COMPLETE /* cmd */,
                     0 /* arg1 (unused) */, 0 /* arg2 (unused) */,
                     this /* obj (NetworkAgentInfo) */);
@@ -685,7 +702,7 @@
      * This represents the network with something like "[100 WIFI|VPN]" or "[108 MOBILE]".
      */
     public String toShortString() {
-        return "[" + network.netId + " "
+        return "[" + network.getNetId() + " "
                 + transportNamesOf(networkCapabilities.getTransportTypes()) + "]";
     }
 
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index 49c16ad..a7be657 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -20,10 +20,10 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.net.InetAddresses;
 import android.net.LinkAddress;
 import android.net.LinkProperties;
 import android.net.Network;
-import android.net.NetworkUtils;
 import android.net.RouteInfo;
 import android.net.TrafficStats;
 import android.net.shared.PrivateDnsConfig;
@@ -97,8 +97,8 @@
 public class NetworkDiagnostics {
     private static final String TAG = "NetworkDiagnostics";
 
-    private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("8.8.8.8");
-    private static final InetAddress TEST_DNS6 = NetworkUtils.numericToInetAddress(
+    private static final InetAddress TEST_DNS4 = InetAddresses.parseNumericAddress("8.8.8.8");
+    private static final InetAddress TEST_DNS6 = InetAddresses.parseNumericAddress(
             "2001:4860:4860::8888");
 
     // For brevity elsewhere.
diff --git a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java
index 7f4fb40..7795ed3 100644
--- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java
+++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java
@@ -35,7 +35,7 @@
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
-import android.util.Slog;
+import android.util.Log;
 import android.util.SparseArray;
 import android.util.SparseIntArray;
 import android.widget.Toast;
@@ -175,7 +175,7 @@
         final int previousEventId = mNotificationTypeMap.get(id);
         final NotificationType previousNotifyType = NotificationType.getFromId(previousEventId);
         if (priority(previousNotifyType) > priority(notifyType)) {
-            Slog.d(TAG, String.format(
+            Log.d(TAG, String.format(
                     "ignoring notification %s for network %s with existing notification %s",
                     notifyType, id, previousNotifyType));
             return;
@@ -183,7 +183,7 @@
         clearNotification(id);
 
         if (DBG) {
-            Slog.d(TAG, String.format(
+            Log.d(TAG, String.format(
                     "showNotification tag=%s event=%s transport=%s name=%s highPriority=%s",
                     tag, nameOf(eventId), getTransportName(transportType), name, highPriority));
         }
@@ -253,7 +253,7 @@
             // are sent, but they are not implemented yet.
             return;
         } else {
-            Slog.wtf(TAG, "Unknown notification type " + notifyType + " on network transport "
+            Log.wtf(TAG, "Unknown notification type " + notifyType + " on network transport "
                     + getTransportName(transportType));
             return;
         }
@@ -294,7 +294,7 @@
         try {
             mNotificationManager.notify(tag, eventId, notification);
         } catch (NullPointerException npe) {
-            Slog.d(TAG, "setNotificationVisible: visible notificationManager error", npe);
+            Log.d(TAG, "setNotificationVisible: visible notificationManager error", npe);
         }
     }
 
@@ -317,13 +317,13 @@
         final String tag = tagFor(id);
         final int eventId = mNotificationTypeMap.get(id);
         if (DBG) {
-            Slog.d(TAG, String.format("clearing notification tag=%s event=%s", tag,
+            Log.d(TAG, String.format("clearing notification tag=%s event=%s", tag,
                    nameOf(eventId)));
         }
         try {
             mNotificationManager.cancel(tag, eventId);
         } catch (NullPointerException npe) {
-            Slog.d(TAG, String.format(
+            Log.d(TAG, String.format(
                     "failed to clear notification tag=%s event=%s", tag, nameOf(eventId)), npe);
         }
         mNotificationTypeMap.delete(id);
diff --git a/services/core/java/com/android/server/connectivity/PermissionMonitor.java b/services/core/java/com/android/server/connectivity/PermissionMonitor.java
index a75a80a..d507b5f 100644
--- a/services/core/java/com/android/server/connectivity/PermissionMonitor.java
+++ b/services/core/java/com/android/server/connectivity/PermissionMonitor.java
@@ -35,7 +35,6 @@
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.PackageManagerInternal;
-import android.content.pm.UserInfo;
 import android.net.INetd;
 import android.net.UidRange;
 import android.os.Build;
@@ -174,11 +173,9 @@
             netdPermsUids.put(uid, netdPermsUids.get(uid) | otherNetdPerms);
         }
 
-        List<UserInfo> users = mUserManager.getUsers(true);  // exclude dying users
-        if (users != null) {
-            for (UserInfo user : users) {
-                mUsers.add(user.id);
-            }
+        final List<UserHandle> users = mUserManager.getUserHandles(true /* excludeDying */);
+        for (UserHandle user : users) {
+            mUsers.add(user.getIdentifier());
         }
 
         final SparseArray<ArraySet<String>> systemPermission =
diff --git a/services/core/java/com/android/server/connectivity/ProxyTracker.java b/services/core/java/com/android/server/connectivity/ProxyTracker.java
index 26cc3ee..5cb3d94 100644
--- a/services/core/java/com/android/server/connectivity/ProxyTracker.java
+++ b/services/core/java/com/android/server/connectivity/ProxyTracker.java
@@ -35,7 +35,7 @@
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.text.TextUtils;
-import android.util.Slog;
+import android.util.Log;
 
 import com.android.internal.annotations.GuardedBy;
 
@@ -168,7 +168,7 @@
                 proxyProperties = new ProxyInfo(host, port, exclList);
             }
             if (!proxyProperties.isValid()) {
-                if (DBG) Slog.d(TAG, "Invalid proxy properties, ignoring: " + proxyProperties);
+                if (DBG) Log.d(TAG, "Invalid proxy properties, ignoring: " + proxyProperties);
                 return;
             }
 
@@ -223,7 +223,7 @@
         if (mPacManager.setCurrentProxyScriptUrl(proxyInfo) == PacManager.DONT_SEND_BROADCAST) {
             return;
         }
-        if (DBG) Slog.d(TAG, "sending Proxy Broadcast for " + proxyInfo);
+        if (DBG) Log.d(TAG, "sending Proxy Broadcast for " + proxyInfo);
         Intent intent = new Intent(Proxy.PROXY_CHANGE_ACTION);
         intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING |
                 Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
@@ -255,7 +255,7 @@
             if (proxyInfo != null && (!TextUtils.isEmpty(proxyInfo.getHost()) ||
                     !Uri.EMPTY.equals(proxyInfo.getPacFileUrl()))) {
                 if (!proxyInfo.isValid()) {
-                    if (DBG) Slog.d(TAG, "Invalid proxy properties, ignoring: " + proxyInfo);
+                    if (DBG) Log.d(TAG, "Invalid proxy properties, ignoring: " + proxyInfo);
                     return;
                 }
                 mGlobalProxy = new ProxyInfo(proxyInfo);
@@ -296,7 +296,7 @@
         synchronized (mProxyLock) {
             if (Objects.equals(mDefaultProxy, proxyInfo)) return;
             if (proxyInfo != null &&  !proxyInfo.isValid()) {
-                if (DBG) Slog.d(TAG, "Invalid proxy properties, ignoring: " + proxyInfo);
+                if (DBG) Log.d(TAG, "Invalid proxy properties, ignoring: " + proxyInfo);
                 return;
             }
 
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index b28edc9..cabfbc0 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -18,10 +18,7 @@
 
 import static android.Manifest.permission.BIND_VPN_SERVICE;
 import static android.net.ConnectivityManager.NETID_UNSET;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED;
 import static android.net.RouteInfo.RTN_THROW;
 import static android.net.RouteInfo.RTN_UNREACHABLE;
 
@@ -51,6 +48,7 @@
 import android.content.pm.UserInfo;
 import android.net.ConnectivityManager;
 import android.net.DnsResolver;
+import android.net.INetd;
 import android.net.INetworkManagementEventObserver;
 import android.net.Ikev2VpnProfile;
 import android.net.IpPrefix;
@@ -71,6 +69,7 @@
 import android.net.NetworkRequest;
 import android.net.RouteInfo;
 import android.net.UidRange;
+import android.net.UidRangeParcel;
 import android.net.VpnManager;
 import android.net.VpnService;
 import android.net.ipsec.ike.ChildSessionCallback;
@@ -111,8 +110,6 @@
 import com.android.internal.net.VpnConfig;
 import com.android.internal.net.VpnInfo;
 import com.android.internal.net.VpnProfile;
-import com.android.internal.util.ArrayUtils;
-import com.android.server.ConnectivityService;
 import com.android.server.DeviceIdleInternal;
 import com.android.server.LocalServices;
 import com.android.server.net.BaseNetworkObserver;
@@ -123,7 +120,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.math.BigInteger;
 import java.net.Inet4Address;
 import java.net.Inet6Address;
 import java.net.InetAddress;
@@ -153,36 +149,13 @@
 public class Vpn {
     private static final String NETWORKTYPE = "VPN";
     private static final String TAG = "Vpn";
+    private static final String VPN_PROVIDER_NAME_BASE = "VpnNetworkProvider:";
     private static final boolean LOGD = true;
 
     // Length of time (in milliseconds) that an app hosting an always-on VPN is placed on
     // the device idle allowlist during service launch and VPN bootstrap.
     private static final long VPN_LAUNCH_IDLE_ALLOWLIST_DURATION_MS = 60 * 1000;
 
-    // Settings for how much of the address space should be routed so that Vpn considers
-    // "most" of the address space is routed. This is used to determine whether this Vpn
-    // should be marked with the INTERNET capability.
-    private static final long MOST_IPV4_ADDRESSES_COUNT;
-    private static final BigInteger MOST_IPV6_ADDRESSES_COUNT;
-    static {
-        // 85% of the address space must be routed for Vpn to consider this VPN to provide
-        // INTERNET access.
-        final int howManyPercentIsMost = 85;
-
-        final long twoPower32 = 1L << 32;
-        MOST_IPV4_ADDRESSES_COUNT = twoPower32 * howManyPercentIsMost / 100;
-        final BigInteger twoPower128 = BigInteger.ONE.shiftLeft(128);
-        MOST_IPV6_ADDRESSES_COUNT = twoPower128
-                .multiply(BigInteger.valueOf(howManyPercentIsMost))
-                .divide(BigInteger.valueOf(100));
-    }
-    // How many routes to evaluate before bailing and declaring this Vpn should provide
-    // the INTERNET capability. This is necessary because computing the address space is
-    // O(n²) and this is running in the system service, so a limit is needed to alleviate
-    // the risk of attack.
-    // This is taken as a total of IPv4 + IPV6 routes for simplicity, but the algorithm
-    // is actually O(n²)+O(n²).
-    private static final int MAX_ROUTES_TO_EVALUATE = 150;
     private static final String LOCKDOWN_ALLOWLIST_SETTING_NAME =
             Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN_WHITELIST;
     /**
@@ -199,6 +172,7 @@
     // automated reconnection
 
     private final Context mContext;
+    private final ConnectivityManager mConnectivityManager;
     // The context is for specific user which is created from mUserId
     private final Context mUserIdContext;
     @VisibleForTesting final Dependencies mDeps;
@@ -216,9 +190,11 @@
 
     private PendingIntent mStatusIntent;
     private volatile boolean mEnableTeardown = true;
-    private final INetworkManagementService mNetd;
+    private final INetworkManagementService mNms;
+    private final INetd mNetd;
     @VisibleForTesting
     protected VpnConfig mConfig;
+    private final NetworkProvider mNetworkProvider;
     @VisibleForTesting
     protected NetworkAgent mNetworkAgent;
     private final Looper mLooper;
@@ -261,7 +237,7 @@
      * @see mLockdown
      */
     @GuardedBy("this")
-    private final Set<UidRange> mBlockedUidsAsToldToNetd = new ArraySet<>();
+    private final Set<UidRangeParcel> mBlockedUidsAsToldToNetd = new ArraySet<>();
 
     // The user id of initiating VPN.
     private final int mUserId;
@@ -390,21 +366,23 @@
         }
     }
 
-    public Vpn(Looper looper, Context context, INetworkManagementService netService,
+    public Vpn(Looper looper, Context context, INetworkManagementService netService, INetd netd,
             @UserIdInt int userId, @NonNull KeyStore keyStore) {
-        this(looper, context, new Dependencies(), netService, userId, keyStore,
+        this(looper, context, new Dependencies(), netService, netd, userId, keyStore,
                 new SystemServices(context), new Ikev2SessionCreator());
     }
 
     @VisibleForTesting
     protected Vpn(Looper looper, Context context, Dependencies deps,
-            INetworkManagementService netService,
+            INetworkManagementService netService, INetd netd,
             int userId, @NonNull KeyStore keyStore, SystemServices systemServices,
             Ikev2SessionCreator ikev2SessionCreator) {
         mContext = context;
+        mConnectivityManager = mContext.getSystemService(ConnectivityManager.class);
         mUserIdContext = context.createContextAsUser(UserHandle.of(userId), 0 /* flags */);
         mDeps = deps;
-        mNetd = netService;
+        mNms = netService;
+        mNetd = netd;
         mUserId = userId;
         mLooper = looper;
         mSystemServices = systemServices;
@@ -420,13 +398,16 @@
             Log.wtf(TAG, "Problem registering observer", e);
         }
 
+        mNetworkProvider = new NetworkProvider(context, looper, VPN_PROVIDER_NAME_BASE + mUserId);
+        // This constructor is called in onUserStart and registers the provider. The provider
+        // will be unregistered in onUserStop.
+        mConnectivityManager.registerNetworkProvider(mNetworkProvider);
         mLegacyState = LegacyVpnInfo.STATE_DISCONNECTED;
         mNetworkInfo = new NetworkInfo(ConnectivityManager.TYPE_VPN, 0 /* subtype */, NETWORKTYPE,
                 "" /* subtypeName */);
         mNetworkCapabilities = new NetworkCapabilities();
         mNetworkCapabilities.addTransportType(NetworkCapabilities.TRANSPORT_VPN);
         mNetworkCapabilities.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN);
-        updateCapabilities(null /* defaultNetwork */);
 
         loadAlwaysOnPackage(keyStore);
     }
@@ -444,110 +425,44 @@
      * Update current state, dispatching event to listeners.
      */
     @VisibleForTesting
+    @GuardedBy("this")
     protected void updateState(DetailedState detailedState, String reason) {
         if (LOGD) Log.d(TAG, "setting state=" + detailedState + ", reason=" + reason);
         mLegacyState = LegacyVpnInfo.stateFromNetworkInfo(detailedState);
         mNetworkInfo.setDetailedState(detailedState, reason, null);
-        if (mNetworkAgent != null) {
-            mNetworkAgent.sendNetworkInfo(mNetworkInfo);
+        // TODO : only accept transitions when the agent is in the correct state (non-null for
+        // CONNECTED, DISCONNECTED and FAILED, null for CONNECTED).
+        // This will require a way for tests to pretend the VPN is connected that's not
+        // calling this method with CONNECTED.
+        // It will also require audit of where the code calls this method with DISCONNECTED
+        // with a null agent, which it was doing historically to make sure the agent is
+        // disconnected as this was a no-op if the agent was null.
+        switch (detailedState) {
+            case CONNECTED:
+                if (null != mNetworkAgent) {
+                    mNetworkAgent.markConnected();
+                }
+                break;
+            case DISCONNECTED:
+            case FAILED:
+                if (null != mNetworkAgent) {
+                    mNetworkAgent.unregister();
+                    mNetworkAgent = null;
+                }
+                break;
+            case CONNECTING:
+                if (null != mNetworkAgent) {
+                    throw new IllegalStateException("VPN can only go to CONNECTING state when"
+                            + " the agent is null.");
+                }
+                break;
+            default:
+                throw new IllegalArgumentException("Illegal state argument " + detailedState);
         }
         updateAlwaysOnNotification(detailedState);
     }
 
     /**
-     * Updates {@link #mNetworkCapabilities} based on current underlying networks and returns a
-     * defensive copy.
-     *
-     * <p>Does not propagate updated capabilities to apps.
-     *
-     * @param defaultNetwork underlying network for VPNs following platform's default
-     */
-    public synchronized NetworkCapabilities updateCapabilities(@Nullable Network defaultNetwork) {
-        if (mConfig == null) {
-            // VPN is not running.
-            return null;
-        }
-
-        Network[] underlyingNetworks = mConfig.underlyingNetworks;
-        if (underlyingNetworks == null && defaultNetwork != null) {
-            // null underlying networks means to track the default.
-            underlyingNetworks = new Network[] { defaultNetwork };
-        }
-        // Only apps targeting Q and above can explicitly declare themselves as metered.
-        final boolean isAlwaysMetered = mIsPackageTargetingAtLeastQ && mConfig.isMetered;
-
-        applyUnderlyingCapabilities(
-                mContext.getSystemService(ConnectivityManager.class),
-                underlyingNetworks,
-                mNetworkCapabilities,
-                isAlwaysMetered);
-
-        return new NetworkCapabilities(mNetworkCapabilities);
-    }
-
-    @VisibleForTesting
-    public static void applyUnderlyingCapabilities(
-            ConnectivityManager cm,
-            Network[] underlyingNetworks,
-            NetworkCapabilities caps,
-            boolean isAlwaysMetered) {
-        int[] transportTypes = new int[] { NetworkCapabilities.TRANSPORT_VPN };
-        int downKbps = NetworkCapabilities.LINK_BANDWIDTH_UNSPECIFIED;
-        int upKbps = NetworkCapabilities.LINK_BANDWIDTH_UNSPECIFIED;
-        boolean metered = isAlwaysMetered; // metered if any underlying is metered, or alwaysMetered
-        boolean roaming = false; // roaming if any underlying is roaming
-        boolean congested = false; // congested if any underlying is congested
-        boolean suspended = true; // suspended if all underlying are suspended
-
-        boolean hadUnderlyingNetworks = false;
-        if (null != underlyingNetworks) {
-            for (Network underlying : underlyingNetworks) {
-                // TODO(b/124469351): Get capabilities directly from ConnectivityService instead.
-                final NetworkCapabilities underlyingCaps = cm.getNetworkCapabilities(underlying);
-                if (underlyingCaps == null) continue;
-                hadUnderlyingNetworks = true;
-                for (int underlyingType : underlyingCaps.getTransportTypes()) {
-                    transportTypes = ArrayUtils.appendInt(transportTypes, underlyingType);
-                }
-
-                // Merge capabilities of this underlying network. For bandwidth, assume the
-                // worst case.
-                downKbps = NetworkCapabilities.minBandwidth(downKbps,
-                        underlyingCaps.getLinkDownstreamBandwidthKbps());
-                upKbps = NetworkCapabilities.minBandwidth(upKbps,
-                        underlyingCaps.getLinkUpstreamBandwidthKbps());
-                // If this underlying network is metered, the VPN is metered (it may cost money
-                // to send packets on this network).
-                metered |= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_METERED);
-                // If this underlying network is roaming, the VPN is roaming (the billing structure
-                // is different than the usual, local one).
-                roaming |= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_ROAMING);
-                // If this underlying network is congested, the VPN is congested (the current
-                // condition of the network affects the performance of this network).
-                congested |= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_CONGESTED);
-                // If this network is not suspended, the VPN is not suspended (the VPN
-                // is able to transfer some data).
-                suspended &= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED);
-            }
-        }
-        if (!hadUnderlyingNetworks) {
-            // No idea what the underlying networks are; assume the safer defaults
-            metered = true;
-            roaming = false;
-            congested = false;
-            suspended = false;
-        }
-
-        caps.setTransportTypes(transportTypes);
-        caps.setLinkDownstreamBandwidthKbps(downKbps);
-        caps.setLinkUpstreamBandwidthKbps(upKbps);
-        caps.setCapability(NET_CAPABILITY_NOT_METERED, !metered);
-        caps.setCapability(NET_CAPABILITY_NOT_ROAMING, !roaming);
-        caps.setCapability(NET_CAPABILITY_NOT_CONGESTED, !congested);
-        caps.setCapability(NET_CAPABILITY_NOT_SUSPENDED, !suspended);
-    }
-
-    /**
      * Chooses whether to force all connections to go though VPN.
      *
      * Used to enable/disable legacy VPN lockdown.
@@ -974,7 +889,7 @@
     /** Prepare the VPN for the given package. Does not perform permission checks. */
     @GuardedBy("this")
     private void prepareInternal(String newPackage) {
-        long token = Binder.clearCallingIdentity();
+        final long token = Binder.clearCallingIdentity();
         try {
             // Reset the interface.
             if (mInterface != null) {
@@ -1001,7 +916,7 @@
             }
 
             try {
-                mNetd.denyProtect(mOwnerUID);
+                mNms.denyProtect(mOwnerUID);
             } catch (Exception e) {
                 Log.wtf(TAG, "Failed to disallow UID " + mOwnerUID + " to call protect() " + e);
             }
@@ -1011,13 +926,13 @@
             mOwnerUID = getAppUid(newPackage, mUserId);
             mIsPackageTargetingAtLeastQ = doesPackageTargetAtLeastQ(newPackage);
             try {
-                mNetd.allowProtect(mOwnerUID);
+                mNms.allowProtect(mOwnerUID);
             } catch (Exception e) {
                 Log.wtf(TAG, "Failed to allow UID " + mOwnerUID + " to call protect() " + e);
             }
             mConfig = null;
 
-            updateState(DetailedState.IDLE, "prepare");
+            updateState(DetailedState.DISCONNECTED, "prepare");
             setVpnForcedLocked(mLockdown);
         } finally {
             Binder.restoreCallingIdentity(token);
@@ -1151,7 +1066,7 @@
         if (null == agent) return NETID_UNSET;
         final Network network = agent.getNetwork();
         if (null == network) return NETID_UNSET;
-        return network.netId;
+        return network.getNetId();
     }
 
     private LinkProperties makeLinkProperties() {
@@ -1253,7 +1168,7 @@
         mNetworkCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
 
         mLegacyState = LegacyVpnInfo.STATE_CONNECTING;
-        mNetworkInfo.setDetailedState(DetailedState.CONNECTING, null, null);
+        updateState(DetailedState.CONNECTING, "agentConnect");
 
         NetworkAgentConfig networkAgentConfig = new NetworkAgentConfig();
         networkAgentConfig.allowBypass = mConfig.allowBypass && !mLockdown;
@@ -1262,26 +1177,40 @@
         mNetworkCapabilities.setAdministratorUids(new int[] {mOwnerUID});
         mNetworkCapabilities.setUids(createUserAndRestrictedProfilesRanges(mUserId,
                 mConfig.allowedApplications, mConfig.disallowedApplications));
-        long token = Binder.clearCallingIdentity();
-        try {
-            mNetworkAgent = new NetworkAgent(mLooper, mContext, NETWORKTYPE /* logtag */,
-                    mNetworkInfo, mNetworkCapabilities, lp,
-                    ConnectivityConstants.VPN_DEFAULT_SCORE, networkAgentConfig,
-                    NetworkProvider.ID_VPN) {
-                            @Override
-                            public void unwanted() {
-                                // We are user controlled, not driven by NetworkRequest.
-                            }
-                        };
-        } finally {
-            Binder.restoreCallingIdentity(token);
+
+        // Only apps targeting Q and above can explicitly declare themselves as metered.
+        // These VPNs are assumed metered unless they state otherwise.
+        if (mIsPackageTargetingAtLeastQ && mConfig.isMetered) {
+            mNetworkCapabilities.removeCapability(NET_CAPABILITY_NOT_METERED);
+        } else {
+            mNetworkCapabilities.addCapability(NET_CAPABILITY_NOT_METERED);
         }
+
+        mNetworkAgent = new NetworkAgent(mContext, mLooper, NETWORKTYPE /* logtag */,
+                mNetworkCapabilities, lp,
+                ConnectivityConstants.VPN_DEFAULT_SCORE, networkAgentConfig, mNetworkProvider) {
+            @Override
+            public void unwanted() {
+                // We are user controlled, not driven by NetworkRequest.
+            }
+        };
+        Binder.withCleanCallingIdentity(() -> {
+            try {
+                mNetworkAgent.register();
+            } catch (final Exception e) {
+                // If register() throws, don't keep an unregistered agent.
+                mNetworkAgent = null;
+                throw e;
+            }
+        });
+        mNetworkAgent.setUnderlyingNetworks((mConfig.underlyingNetworks != null)
+                ? Arrays.asList(mConfig.underlyingNetworks) : null);
         mNetworkInfo.setIsAvailable(true);
         updateState(DetailedState.CONNECTED, "agentConnect");
     }
 
     private boolean canHaveRestrictedProfile(int userId) {
-        long token = Binder.clearCallingIdentity();
+        final long token = Binder.clearCallingIdentity();
         try {
             return UserManager.get(mContext).canHaveRestrictedProfile(userId);
         } finally {
@@ -1291,19 +1220,12 @@
 
     private void agentDisconnect(NetworkAgent networkAgent) {
         if (networkAgent != null) {
-            NetworkInfo networkInfo = new NetworkInfo(mNetworkInfo);
-            networkInfo.setIsAvailable(false);
-            networkInfo.setDetailedState(DetailedState.DISCONNECTED, null, null);
-            networkAgent.sendNetworkInfo(networkInfo);
+            networkAgent.unregister();
         }
     }
 
     private void agentDisconnect() {
-        if (mNetworkInfo.isConnected()) {
-            mNetworkInfo.setIsAvailable(false);
-            updateState(DetailedState.DISCONNECTED, "agentDisconnect");
-            mNetworkAgent = null;
-        }
+        updateState(DetailedState.DISCONNECTED, "agentDisconnect");
     }
 
     /**
@@ -1328,14 +1250,14 @@
         // Check if the service is properly declared.
         Intent intent = new Intent(VpnConfig.SERVICE_INTERFACE);
         intent.setClassName(mPackage, config.user);
-        long token = Binder.clearCallingIdentity();
+        final long token = Binder.clearCallingIdentity();
         try {
             // Restricted users are not allowed to create VPNs, they are tied to Owner
             enforceNotRestrictedUser();
 
             final PackageManager packageManager = mUserIdContext.getPackageManager();
             if (packageManager == null) {
-                throw new UnsupportedOperationException("Cannot get PackageManager.");
+                throw new IllegalStateException("Cannot get PackageManager.");
             }
             final ResolveInfo info = packageManager.resolveService(intent, 0 /* flags */);
             if (info == null) {
@@ -1392,6 +1314,8 @@
                     && updateLinkPropertiesInPlaceIfPossible(mNetworkAgent, oldConfig)) {
                 // Keep mNetworkAgent unchanged
             } else {
+                // Initialize the state for a new agent, while keeping the old one connected
+                // in case this new connection fails.
                 mNetworkAgent = null;
                 updateState(DetailedState.CONNECTING, "establish");
                 // Set up forwarding and DNS rules.
@@ -1483,7 +1407,7 @@
             final long token = Binder.clearCallingIdentity();
             List<UserInfo> users;
             try {
-                users = UserManager.get(mContext).getUsers(true);
+                users = UserManager.get(mContext).getAliveUsers();
             } finally {
                 Binder.restoreCallingIdentity(token);
             }
@@ -1575,12 +1499,13 @@
                     try {
                         addUserToRanges(existingRanges, userId, mConfig.allowedApplications,
                                 mConfig.disallowedApplications);
-                        // ConnectivityService will call {@link #updateCapabilities} and apply
-                        // those for VPN network.
                         mNetworkCapabilities.setUids(existingRanges);
                     } catch (Exception e) {
                         Log.wtf(TAG, "Failed to add restricted user to owner", e);
                     }
+                    if (mNetworkAgent != null) {
+                        mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
+                    }
                 }
                 setVpnForcedLocked(mLockdown);
             }
@@ -1603,12 +1528,13 @@
                         final List<UidRange> removedRanges =
                                 uidRangesForUser(userId, existingRanges);
                         existingRanges.removeAll(removedRanges);
-                        // ConnectivityService will call {@link #updateCapabilities} and
-                        // apply those for VPN network.
                         mNetworkCapabilities.setUids(existingRanges);
                     } catch (Exception e) {
                         Log.wtf(TAG, "Failed to remove restricted user to owner", e);
                     }
+                    if (mNetworkAgent != null) {
+                        mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
+                    }
                 }
                 setVpnForcedLocked(mLockdown);
             }
@@ -1625,6 +1551,9 @@
 
         // Quit any active connections
         agentDisconnect();
+
+        // The provider has been registered in the constructor, which is called in onUserStart.
+        mConnectivityManager.unregisterNetworkProvider(mNetworkProvider);
     }
 
     /**
@@ -1654,24 +1583,25 @@
             exemptedPackages = new ArrayList<>(mLockdownAllowlist);
             exemptedPackages.add(mPackage);
         }
-        final Set<UidRange> rangesToTellNetdToRemove = new ArraySet<>(mBlockedUidsAsToldToNetd);
+        final Set<UidRangeParcel> rangesToTellNetdToRemove =
+                new ArraySet<>(mBlockedUidsAsToldToNetd);
 
-        final Set<UidRange> rangesToTellNetdToAdd;
+        final Set<UidRangeParcel> rangesToTellNetdToAdd;
         if (enforce) {
-            final Set<UidRange> rangesThatShouldBeBlocked =
+            final Set<UidRange> restrictedProfilesRanges =
                     createUserAndRestrictedProfilesRanges(mUserId,
-                            /* allowedApplications */ null,
-                            /* disallowedApplications */ exemptedPackages);
+                    /* allowedApplications */ null,
+                    /* disallowedApplications */ exemptedPackages);
+            final Set<UidRangeParcel> rangesThatShouldBeBlocked = new ArraySet<>();
 
             // The UID range of the first user (0-99999) would block the IPSec traffic, which comes
             // directly from the kernel and is marked as uid=0. So we adjust the range to allow
             // it through (b/69873852).
-            for (UidRange range : rangesThatShouldBeBlocked) {
-                if (range.start == 0) {
-                    rangesThatShouldBeBlocked.remove(range);
-                    if (range.stop != 0) {
-                        rangesThatShouldBeBlocked.add(new UidRange(1, range.stop));
-                    }
+            for (UidRange range : restrictedProfilesRanges) {
+                if (range.start == 0 && range.stop != 0) {
+                    rangesThatShouldBeBlocked.add(new UidRangeParcel(1, range.stop));
+                } else if (range.start != 0) {
+                    rangesThatShouldBeBlocked.add(new UidRangeParcel(range.start, range.stop));
                 }
             }
 
@@ -1703,13 +1633,13 @@
      *         including added ranges that already existed or removed ones that didn't.
      */
     @GuardedBy("this")
-    private boolean setAllowOnlyVpnForUids(boolean enforce, Collection<UidRange> ranges) {
+    private boolean setAllowOnlyVpnForUids(boolean enforce, Collection<UidRangeParcel> ranges) {
         if (ranges.size() == 0) {
             return true;
         }
-        final UidRange[] rangesArray = ranges.toArray(new UidRange[ranges.size()]);
+        final UidRangeParcel[] stableRanges = ranges.toArray(new UidRangeParcel[ranges.size()]);
         try {
-            mNetd.setAllowOnlyVpnForUids(enforce, rangesArray);
+            mNetd.networkRejectNonSecureVpn(enforce, stableRanges);
         } catch (RemoteException | RuntimeException e) {
             Log.e(TAG, "Updating blocked=" + enforce
                     + " for UIDs " + Arrays.toString(ranges.toArray()) + " failed", e);
@@ -1853,10 +1783,12 @@
                 if (networks[i] == null) {
                     mConfig.underlyingNetworks[i] = null;
                 } else {
-                    mConfig.underlyingNetworks[i] = new Network(networks[i].netId);
+                    mConfig.underlyingNetworks[i] = new Network(networks[i].getNetId());
                 }
             }
         }
+        mNetworkAgent.setUnderlyingNetworks((mConfig.underlyingNetworks != null)
+                ? Arrays.asList(mConfig.underlyingNetworks) : null);
         return true;
     }
 
@@ -1922,10 +1854,20 @@
         if (mNetworkInfo.isConnected()) {
             return !appliesToUid(uid);
         } else {
-            return UidRange.containsUid(mBlockedUidsAsToldToNetd, uid);
+            return containsUid(mBlockedUidsAsToldToNetd, uid);
         }
     }
 
+    private boolean containsUid(Collection<UidRangeParcel> ranges, int uid) {
+        if (ranges == null) return false;
+        for (UidRangeParcel range : ranges) {
+            if (range.start <= uid && uid <= range.stop) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     private void updateAlwaysOnNotification(DetailedState networkState) {
         final boolean visible = (mAlwaysOn && networkState != DetailedState.CONNECTED);
 
@@ -2063,7 +2005,7 @@
      */
     public void startLegacyVpn(VpnProfile profile, KeyStore keyStore, LinkProperties egress) {
         enforceControlPermission();
-        long token = Binder.clearCallingIdentity();
+        final long token = Binder.clearCallingIdentity();
         try {
             startLegacyVpnPrivileged(profile, keyStore, egress);
         } finally {
@@ -2399,7 +2341,6 @@
             // When restricted to test networks, select any network with TRANSPORT_TEST. Since the
             // creator of the profile and the test network creator both have MANAGE_TEST_NETWORKS,
             // this is considered safe.
-            final ConnectivityManager cm = ConnectivityManager.from(mContext);
             final NetworkRequest req;
 
             if (mProfile.isRestrictedToTestNetworks()) {
@@ -2418,7 +2359,7 @@
                         .build();
             }
 
-            cm.requestNetwork(req, mNetworkCallback);
+            mConnectivityManager.requestNetwork(req, mNetworkCallback);
         }
 
         private boolean isActiveNetwork(@Nullable Network network) {
@@ -2569,7 +2510,7 @@
                                     address /* unused */,
                                     address /* unused */,
                                     network);
-                    mNetd.setInterfaceUp(mTunnelIface.getInterfaceName());
+                    mNms.setInterfaceUp(mTunnelIface.getInterfaceName());
 
                     mSession = mIkev2SessionCreator.createIkeSession(
                             mContext,
@@ -2705,8 +2646,7 @@
 
             resetIkeState();
 
-            final ConnectivityManager cm = ConnectivityManager.from(mContext);
-            cm.unregisterNetworkCallback(mNetworkCallback);
+            mConnectivityManager.unregisterNetworkCallback(mNetworkCallback);
 
             mExecutor.shutdown();
         }
@@ -2787,13 +2727,12 @@
             mProfile = profile;
 
             if (!TextUtils.isEmpty(mOuterInterface)) {
-                final ConnectivityManager cm = ConnectivityManager.from(mContext);
-                for (Network network : cm.getAllNetworks()) {
-                    final LinkProperties lp = cm.getLinkProperties(network);
+                for (Network network : mConnectivityManager.getAllNetworks()) {
+                    final LinkProperties lp = mConnectivityManager.getLinkProperties(network);
                     if (lp != null && lp.getAllInterfaceNames().contains(mOuterInterface)) {
-                        final NetworkInfo networkInfo = cm.getNetworkInfo(network);
-                        if (networkInfo != null) {
-                            mOuterConnection.set(networkInfo.getType());
+                        final NetworkInfo netInfo = mConnectivityManager.getNetworkInfo(network);
+                        if (netInfo != null) {
+                            mOuterConnection.set(netInfo.getType());
                             break;
                         }
                     }
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index 6735da8..e007c75 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -210,6 +210,7 @@
     private static final String HANDLE_SYNC_ALARM_WAKE_LOCK = "SyncManagerHandleSyncAlarm";
     private static final String SYNC_LOOP_WAKE_LOCK = "SyncLoopWakeLock";
 
+    private static final boolean USE_WTF_FOR_ACCOUNT_ERROR = false;
 
     private static final int SYNC_OP_STATE_VALID = 0;
     // "1" used to include errors 3, 4 and 5 but now it's split up.
@@ -3446,7 +3447,7 @@
                 if (isLoggable) {
                     Slog.v(TAG, "    Dropping sync operation: account doesn't exist.");
                 }
-                Slog.wtf(TAG, "SYNC_OP_STATE_INVALID: account doesn't exist.");
+                logAccountError("SYNC_OP_STATE_INVALID: account doesn't exist.");
                 return SYNC_OP_STATE_INVALID_NO_ACCOUNT;
             }
             // Drop this sync request if it isn't syncable.
@@ -3456,14 +3457,14 @@
                     Slog.v(TAG, "    Dropping sync operation: "
                             + "isSyncable == SYNCABLE_NO_ACCOUNT_ACCESS");
                 }
-                Slog.wtf(TAG, "SYNC_OP_STATE_INVALID_NO_ACCOUNT_ACCESS");
+                logAccountError("SYNC_OP_STATE_INVALID_NO_ACCOUNT_ACCESS");
                 return SYNC_OP_STATE_INVALID_NO_ACCOUNT_ACCESS;
             }
             if (state == AuthorityInfo.NOT_SYNCABLE) {
                 if (isLoggable) {
                     Slog.v(TAG, "    Dropping sync operation: isSyncable == NOT_SYNCABLE");
                 }
-                Slog.wtf(TAG, "SYNC_OP_STATE_INVALID: NOT_SYNCABLE");
+                logAccountError("SYNC_OP_STATE_INVALID: NOT_SYNCABLE");
                 return SYNC_OP_STATE_INVALID_NOT_SYNCABLE;
             }
 
@@ -3482,12 +3483,20 @@
                 if (isLoggable) {
                     Slog.v(TAG, "    Dropping sync operation: disallowed by settings/network.");
                 }
-                Slog.wtf(TAG, "SYNC_OP_STATE_INVALID: disallowed by settings/network");
+                logAccountError("SYNC_OP_STATE_INVALID: disallowed by settings/network");
                 return SYNC_OP_STATE_INVALID_SYNC_DISABLED;
             }
             return SYNC_OP_STATE_VALID;
         }
 
+        private void logAccountError(String message) {
+            if (USE_WTF_FOR_ACCOUNT_ERROR) {
+                Slog.wtf(TAG, message);
+            } else {
+                Slog.e(TAG, message);
+            }
+        }
+
         private boolean dispatchSyncOperation(SyncOperation op) {
             if (Log.isLoggable(TAG, Log.VERBOSE)) {
                 Slog.v(TAG, "dispatchSyncOperation: we are going to sync " + op);
diff --git a/services/core/java/com/android/server/contentcapture/OWNERS b/services/core/java/com/android/server/contentcapture/OWNERS
new file mode 100644
index 0000000..a28e00a
--- /dev/null
+++ b/services/core/java/com/android/server/contentcapture/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/contentcapture/OWNERS
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index 24661d6..8528686 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -86,6 +86,7 @@
 import android.os.UserManager;
 import android.provider.Settings;
 import android.text.TextUtils;
+import android.util.EventLog;
 import android.util.IntArray;
 import android.util.Pair;
 import android.util.Slog;
@@ -2191,10 +2192,16 @@
                 }
             }
 
-            if (callingUid == Process.SYSTEM_UID
-                    || checkCallingPermission(ADD_TRUSTED_DISPLAY, "createVirtualDisplay()")) {
-                flags |= VIRTUAL_DISPLAY_FLAG_TRUSTED;
-            } else {
+            if (callingUid != Process.SYSTEM_UID && (flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) != 0) {
+                if (!checkCallingPermission(ADD_TRUSTED_DISPLAY, "createVirtualDisplay()")) {
+                    EventLog.writeEvent(0x534e4554, "162627132", callingUid,
+                            "Attempt to create a trusted display without holding permission!");
+                    throw new SecurityException("Requires ADD_TRUSTED_DISPLAY permission to "
+                            + "create a trusted virtual display.");
+                }
+            }
+
+            if ((flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) == 0) {
                 flags &= ~VIRTUAL_DISPLAY_FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS;
             }
 
diff --git a/services/core/java/com/android/server/gpu/GpuService.java b/services/core/java/com/android/server/gpu/GpuService.java
index c0617ca..54794fe 100644
--- a/services/core/java/com/android/server/gpu/GpuService.java
+++ b/services/core/java/com/android/server/gpu/GpuService.java
@@ -65,7 +65,7 @@
 
     private static final String PROD_DRIVER_PROPERTY = "ro.gfx.driver.0";
     private static final String DEV_DRIVER_PROPERTY = "ro.gfx.driver.1";
-    private static final String GAME_DRIVER_ALLOWLIST_FILENAME = "allowlist.txt";
+    private static final String UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST_FILENAME = "allowlist.txt";
     private static final int BASE64_FLAGS = Base64.NO_PADDING | Base64.NO_WRAP;
 
     private final Context mContext;
@@ -77,7 +77,7 @@
     private final boolean mHasProdDriver;
     private final boolean mHasDevDriver;
     private ContentResolver mContentResolver;
-    private long mGameDriverVersionCode;
+    private long mProdDriverVersionCode;
     private SettingsObserver mSettingsObserver;
     private DeviceConfigListener mDeviceConfigListener;
     @GuardedBy("mLock")
@@ -88,7 +88,7 @@
 
         mContext = context;
         mProdDriverPackageName = SystemProperties.get(PROD_DRIVER_PROPERTY);
-        mGameDriverVersionCode = -1;
+        mProdDriverVersionCode = -1;
         mDevDriverPackageName = SystemProperties.get(DEV_DRIVER_PROPERTY);
         mPackageManager = context.getPackageManager();
         mHasProdDriver = !TextUtils.isEmpty(mProdDriverPackageName);
@@ -117,20 +117,20 @@
             }
             mSettingsObserver = new SettingsObserver();
             mDeviceConfigListener = new DeviceConfigListener();
-            fetchGameDriverPackageProperties();
+            fetchProductionDriverPackageProperties();
             processDenylists();
             setDenylist();
-            fetchDeveloperDriverPackageProperties();
+            fetchPrereleaseDriverPackageProperties();
         }
     }
 
     private final class SettingsObserver extends ContentObserver {
-        private final Uri mGameDriverDenylistsUri =
-                Settings.Global.getUriFor(Settings.Global.GAME_DRIVER_DENYLISTS);
+        private final Uri mProdDriverDenylistsUri =
+                Settings.Global.getUriFor(Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS);
 
         SettingsObserver() {
             super(new Handler());
-            mContentResolver.registerContentObserver(mGameDriverDenylistsUri, false, this,
+            mContentResolver.registerContentObserver(mProdDriverDenylistsUri, false, this,
                     UserHandle.USER_ALL);
         }
 
@@ -140,7 +140,7 @@
                 return;
             }
 
-            if (mGameDriverDenylistsUri.equals(uri)) {
+            if (mProdDriverDenylistsUri.equals(uri)) {
                 processDenylists();
                 setDenylist();
             }
@@ -157,9 +157,11 @@
         @Override
         public void onPropertiesChanged(Properties properties) {
             synchronized (mDeviceConfigLock) {
-                if (properties.getKeyset().contains(Settings.Global.GAME_DRIVER_DENYLISTS)) {
+                if (properties.getKeyset().contains(
+                            Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS)) {
                     parseDenylists(
-                            properties.getString(Settings.Global.GAME_DRIVER_DENYLISTS, ""));
+                            properties.getString(
+                                    Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS, ""));
                     setDenylist();
                 }
             }
@@ -186,10 +188,10 @@
                 case ACTION_PACKAGE_CHANGED:
                 case ACTION_PACKAGE_REMOVED:
                     if (isProdDriver) {
-                        fetchGameDriverPackageProperties();
+                        fetchProductionDriverPackageProperties();
                         setDenylist();
                     } else if (isDevDriver) {
-                        fetchDeveloperDriverPackageProperties();
+                        fetchPrereleaseDriverPackageProperties();
                     }
                     break;
                 default:
@@ -218,7 +220,7 @@
         }
     }
 
-    private void fetchGameDriverPackageProperties() {
+    private void fetchProductionDriverPackageProperties() {
         final ApplicationInfo driverInfo;
         try {
             driverInfo = mPackageManager.getApplicationInfo(mProdDriverPackageName,
@@ -241,15 +243,16 @@
 
         // Reset the allowlist.
         Settings.Global.putString(mContentResolver,
-                                  Settings.Global.GAME_DRIVER_ALLOWLIST, "");
-        mGameDriverVersionCode = driverInfo.longVersionCode;
+                                  Settings.Global.UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST, "");
+        mProdDriverVersionCode = driverInfo.longVersionCode;
 
         try {
             final Context driverContext = mContext.createPackageContext(mProdDriverPackageName,
                                                                         Context.CONTEXT_RESTRICTED);
 
-            assetToSettingsGlobal(mContext, driverContext, GAME_DRIVER_ALLOWLIST_FILENAME,
-                    Settings.Global.GAME_DRIVER_ALLOWLIST, ",");
+            assetToSettingsGlobal(mContext, driverContext,
+                    UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST_FILENAME,
+                    Settings.Global.UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST, ",");
         } catch (PackageManager.NameNotFoundException e) {
             if (DEBUG) {
                 Slog.w(TAG, "driver package '" + mProdDriverPackageName + "' not installed");
@@ -259,11 +262,11 @@
 
     private void processDenylists() {
         String base64String = DeviceConfig.getProperty(DeviceConfig.NAMESPACE_GAME_DRIVER,
-                Settings.Global.GAME_DRIVER_DENYLISTS);
+                Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS);
         if (base64String == null) {
             base64String =
                     Settings.Global.getString(mContentResolver,
-                                              Settings.Global.GAME_DRIVER_DENYLISTS);
+                            Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLISTS);
         }
         parseDenylists(base64String != null ? base64String : "");
     }
@@ -288,16 +291,16 @@
 
     private void setDenylist() {
         Settings.Global.putString(mContentResolver,
-                                  Settings.Global.GAME_DRIVER_DENYLIST, "");
+                                  Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLIST, "");
         synchronized (mLock) {
             if (mDenylists == null) {
                 return;
             }
             List<Denylist> denylists = mDenylists.getDenylistsList();
             for (Denylist denylist : denylists) {
-                if (denylist.getVersionCode() == mGameDriverVersionCode) {
+                if (denylist.getVersionCode() == mProdDriverVersionCode) {
                     Settings.Global.putString(mContentResolver,
-                            Settings.Global.GAME_DRIVER_DENYLIST,
+                            Settings.Global.UPDATABLE_DRIVER_PRODUCTION_DENYLIST,
                             String.join(",", denylist.getPackageNamesList()));
                     return;
                 }
@@ -305,7 +308,7 @@
         }
     }
 
-    private void fetchDeveloperDriverPackageProperties() {
+    private void fetchPrereleaseDriverPackageProperties() {
         final ApplicationInfo driverInfo;
         try {
             driverInfo = mPackageManager.getApplicationInfo(mDevDriverPackageName,
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index 804cc92..b2d694b 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -1569,10 +1569,11 @@
         // When the device is not unplugged but reawaken from standby, we check if the System
         // Audio Control Feature is enabled or not then decide if turning SAM on/off accordingly.
         if (getAvrDeviceInfo() != null && portId == getAvrDeviceInfo().getPortId()) {
+            HdmiLogger.debug("Port ID:%d, 5v=%b", portId, connected);
             if (!connected) {
                 setSystemAudioMode(false);
-            } else if (mSystemAudioControlFeatureEnabled != mService.isSystemAudioActivated()){
-                setSystemAudioMode(mSystemAudioControlFeatureEnabled);
+            } else {
+                onNewAvrAdded(getAvrDeviceInfo());
             }
         }
 
diff --git a/services/core/java/com/android/server/hdmi/OWNERS b/services/core/java/com/android/server/hdmi/OWNERS
new file mode 100644
index 0000000..c3c47ed
--- /dev/null
+++ b/services/core/java/com/android/server/hdmi/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/hardware/hdmi/OWNERS
diff --git a/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java b/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
index 6633789..db93ad0 100644
--- a/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
+++ b/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
@@ -102,12 +102,12 @@
     }
 
     private void setArcStatus(boolean enabled) {
-        boolean wasEnabled = tv().setArcStatus(enabled);
-        Slog.i(TAG, "Change arc status [old:" + wasEnabled + ", new:" + enabled + "]");
+        tv().setArcStatus(enabled);
+        Slog.i(TAG, "Change arc status to " + enabled);
 
         // If enabled before and set to "disabled" and send <Report Arc Terminated> to
         // av reciever.
-        if (!enabled && wasEnabled) {
+        if (!enabled) {
             sendCommand(HdmiCecMessageBuilder.buildReportArcTerminated(getSourceAddress(),
                     mAvrAddress));
         }
diff --git a/services/core/java/com/android/server/incident/OWNERS b/services/core/java/com/android/server/incident/OWNERS
new file mode 100644
index 0000000..f766115
--- /dev/null
+++ b/services/core/java/com/android/server/incident/OWNERS
@@ -0,0 +1 @@
+include /cmds/incidentd/OWNERS
diff --git a/services/core/java/com/android/server/infra/AbstractMasterSystemService.java b/services/core/java/com/android/server/infra/AbstractMasterSystemService.java
index 6763585..4658d41 100644
--- a/services/core/java/com/android/server/infra/AbstractMasterSystemService.java
+++ b/services/core/java/com/android/server/infra/AbstractMasterSystemService.java
@@ -948,7 +948,7 @@
                         if (debug) {
                             Slog.d(mTag, "Eagerly recreating service for user " + userId);
                         }
-                        getServiceForUserLocked(userId);
+                        updateCachedServiceLocked(userId);
                     }
                 }
                 onServicePackageRestartedLocked(userId);
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 2127c72..b6fbedb 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -1700,7 +1700,8 @@
 
         Intent intent = new Intent(ACTION_SHOW_INPUT_METHOD_PICKER)
                 .setPackage(mContext.getPackageName());
-        mImeSwitchPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+        mImeSwitchPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent,
+                PendingIntent.FLAG_IMMUTABLE);
 
         mShowOngoingImeSwitcherForPhones = false;
 
@@ -2528,7 +2529,8 @@
         mCurIntent.putExtra(Intent.EXTRA_CLIENT_LABEL,
                 com.android.internal.R.string.input_method_binding_label);
         mCurIntent.putExtra(Intent.EXTRA_CLIENT_INTENT, PendingIntent.getActivity(
-                mContext, 0, new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS), 0));
+                mContext, 0, new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS),
+                PendingIntent.FLAG_IMMUTABLE));
 
         if (bindCurrentInputMethodServiceLocked(mCurIntent, this, IME_CONNECTION_BIND_FLAGS)) {
             mLastBindTime = SystemClock.uptimeMillis();
@@ -3272,6 +3274,9 @@
 
     boolean hideCurrentInputLocked(IBinder windowToken, int flags, ResultReceiver resultReceiver,
             @SoftInputShowHideReason int reason) {
+        if (mCurClient == null || mCurClient.curSession == null) {
+            return false;
+        }
         if ((flags&InputMethodManager.HIDE_IMPLICIT_ONLY) != 0
                 && (mShowExplicitlyRequested || mShowForced)) {
             if (DEBUG) Slog.v(TAG, "Not hiding: explicit show not cancelled by non-explicit hide");
@@ -3456,7 +3461,12 @@
         // pre-rendering not supported on low-ram devices.
         cs.shouldPreRenderIme = DebugFlags.FLAG_PRE_RENDER_IME_VIEWS.value() && !mIsLowRam;
 
-        if (mCurFocusedWindow == windowToken) {
+        final boolean sameWindowFocused = mCurFocusedWindow == windowToken;
+        final boolean isTextEditor = (startInputFlags & StartInputFlags.IS_TEXT_EDITOR) != 0;
+        final boolean startInputByWinGainedFocus =
+                (startInputFlags & StartInputFlags.WINDOW_GAINED_FOCUS) != 0;
+
+        if (sameWindowFocused && isTextEditor) {
             if (DEBUG) {
                 Slog.w(TAG, "Window already focused, ignoring focus gain of: " + client
                         + " attribute=" + attribute + ", token = " + windowToken
@@ -3471,6 +3481,7 @@
                     InputBindResult.ResultCode.SUCCESS_REPORT_WINDOW_FOCUS_ONLY,
                     null, null, null, -1, null);
         }
+
         mCurFocusedWindow = windowToken;
         mCurFocusedWindowSoftInputMode = softInputMode;
         mCurFocusedWindowClient = cs;
@@ -3488,7 +3499,6 @@
                         == LayoutParams.SOFT_INPUT_ADJUST_RESIZE
                 || mRes.getConfiguration().isLayoutSizeAtLeast(
                         Configuration.SCREENLAYOUT_SIZE_LARGE);
-        final boolean isTextEditor = (startInputFlags & StartInputFlags.IS_TEXT_EDITOR) != 0;
 
         // We want to start input before showing the IME, but after closing
         // it.  We want to do this after closing it to help the IME disappear
@@ -3499,7 +3509,7 @@
         InputBindResult res = null;
         switch (softInputMode & LayoutParams.SOFT_INPUT_MASK_STATE) {
             case LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED:
-                if (!isTextEditor || !doAutoShow) {
+                if (!sameWindowFocused && (!isTextEditor || !doAutoShow)) {
                     if (LayoutParams.mayUseInputMethod(windowFlags)) {
                         // There is no focus view, and this window will
                         // be behind any soft input window, so hide the
@@ -3548,9 +3558,11 @@
                 }
                 break;
             case LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN:
-                if (DEBUG) Slog.v(TAG, "Window asks to hide input");
-                hideCurrentInputLocked(mCurFocusedWindow, 0, null,
-                        SoftInputShowHideReason.HIDE_ALWAYS_HIDDEN_STATE);
+                if (!sameWindowFocused) {
+                    if (DEBUG) Slog.v(TAG, "Window asks to hide input");
+                    hideCurrentInputLocked(mCurFocusedWindow, 0, null,
+                            SoftInputShowHideReason.HIDE_ALWAYS_HIDDEN_STATE);
+                }
                 break;
             case LayoutParams.SOFT_INPUT_STATE_VISIBLE:
                 if ((softInputMode & LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION) != 0) {
@@ -3575,13 +3587,15 @@
                 if (DEBUG) Slog.v(TAG, "Window asks to always show input");
                 if (InputMethodUtils.isSoftInputModeStateVisibleAllowed(
                         unverifiedTargetSdkVersion, startInputFlags)) {
-                    if (attribute != null) {
-                        res = startInputUncheckedLocked(cs, inputContext, missingMethods,
-                                attribute, startInputFlags, startInputReason);
-                        didStart = true;
+                    if (!sameWindowFocused) {
+                        if (attribute != null) {
+                            res = startInputUncheckedLocked(cs, inputContext, missingMethods,
+                                    attribute, startInputFlags, startInputReason);
+                            didStart = true;
+                        }
+                        showCurrentInputLocked(windowToken, InputMethodManager.SHOW_IMPLICIT, null,
+                                SoftInputShowHideReason.SHOW_STATE_ALWAYS_VISIBLE);
                     }
-                    showCurrentInputLocked(windowToken, InputMethodManager.SHOW_IMPLICIT, null,
-                            SoftInputShowHideReason.SHOW_STATE_ALWAYS_VISIBLE);
                 } else {
                     Slog.e(TAG, "SOFT_INPUT_STATE_ALWAYS_VISIBLE is ignored because"
                             + " there is no focused view that also returns true from"
@@ -3592,7 +3606,20 @@
 
         if (!didStart) {
             if (attribute != null) {
-                if (!DebugFlags.FLAG_OPTIMIZE_START_INPUT.value()
+                if (sameWindowFocused) {
+                    // On previous platforms, when Dialogs re-gained focus, the Activity behind
+                    // would briefly gain focus first, and dismiss the IME.
+                    // On R that behavior has been fixed, but unfortunately apps have come
+                    // to rely on this behavior to hide the IME when the editor no longer has focus
+                    // To maintain compatibility, we are now hiding the IME when we don't have
+                    // an editor upon refocusing a window.
+                    if (startInputByWinGainedFocus) {
+                        hideCurrentInputLocked(mCurFocusedWindow, 0, null,
+                                SoftInputShowHideReason.HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR);
+                    }
+                    res = startInputUncheckedLocked(cs, inputContext, missingMethods, attribute,
+                            startInputFlags, startInputReason);
+                } else if (!DebugFlags.FLAG_OPTIMIZE_START_INPUT.value()
                         || (startInputFlags & StartInputFlags.IS_TEXT_EDITOR) != 0) {
                     res = startInputUncheckedLocked(cs, inputContext, missingMethods, attribute,
                             startInputFlags, startInputReason);
@@ -3606,6 +3633,10 @@
         return res;
     }
 
+    private boolean isImeVisible() {
+        return (mImeWindowVis & InputMethodService.IME_VISIBLE) != 0;
+    }
+
     private boolean canShowInputMethodPickerLocked(IInputMethodClient client) {
         // TODO(yukawa): multi-display support.
         final int uid = Binder.getCallingUid();
diff --git a/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java b/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
index 817902d..b61c6a7 100644
--- a/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
+++ b/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
@@ -205,8 +205,13 @@
                     }
 
                     if (DEBUG_INTEGRITY_COMPONENT) {
-                        Slog.i(TAG, String.format("Successfully pushed rule set: %s", version));
+                        Slog.i(
+                                TAG,
+                                String.format(
+                                        "Successfully pushed rule set to version '%s' from '%s'",
+                                        version, ruleProvider));
                     }
+
                     FrameworkStatsLog.write(
                             FrameworkStatsLog.INTEGRITY_RULES_PUSHED,
                             success,
@@ -324,13 +329,12 @@
                                 + getAllowedInstallers(packageInfo));
             }
             IntegrityCheckResult result = mEvaluationEngine.evaluate(appInstallMetadata);
-            if (DEBUG_INTEGRITY_COMPONENT) {
+            if (!result.getMatchedRules().isEmpty() || DEBUG_INTEGRITY_COMPONENT) {
                 Slog.i(
                         TAG,
-                        "Integrity check result: "
-                                + result.getEffect()
-                                + " due to "
-                                + result.getMatchedRules());
+                        String.format(
+                                "Integrity check of %s result: %s due to %s",
+                                packageName, result.getEffect(), result.getMatchedRules()));
             }
 
             FrameworkStatsLog.write(
@@ -673,8 +677,10 @@
         // Obtain the system apps that are whitelisted in config_integrityRuleProviderPackages.
         List<String> allowedRuleProviders = getAllowedRuleProviderSystemApps();
         if (DEBUG_INTEGRITY_COMPONENT) {
-            Slog.i(TAG, String.format(
-                    "Rule provider system app list contains: %s", allowedRuleProviders));
+            Slog.i(
+                    TAG,
+                    String.format(
+                            "Rule provider system app list contains: %s", allowedRuleProviders));
         }
 
         // Identify the package names in the caller list.
@@ -730,9 +736,9 @@
 
     private boolean integrityCheckIncludesRuleProvider() {
         return Settings.Global.getInt(
-                        mContext.getContentResolver(),
-                        Settings.Global.INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER,
-                        0)
+                mContext.getContentResolver(),
+                Settings.Global.INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER,
+                0)
                 == 1;
     }
 
diff --git a/services/core/java/com/android/server/location/AppOpsHelper.java b/services/core/java/com/android/server/location/AppOpsHelper.java
index c598fb1..d0192cd 100644
--- a/services/core/java/com/android/server/location/AppOpsHelper.java
+++ b/services/core/java/com/android/server/location/AppOpsHelper.java
@@ -18,7 +18,9 @@
 
 import static android.app.AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION;
 import static android.app.AppOpsManager.OP_MONITOR_LOCATION;
+import static android.content.pm.PackageManager.PERMISSION_GRANTED;
 
+import static com.android.server.location.CallerIdentity.PERMISSION_NONE;
 import static com.android.server.location.LocationManagerService.D;
 import static com.android.server.location.LocationManagerService.TAG;
 
@@ -122,8 +124,18 @@
             Preconditions.checkState(mAppOps != null);
         }
 
+        if (callerIdentity.permissionLevel == PERMISSION_NONE) {
+            return false;
+        }
+
         long identity = Binder.clearCallingIdentity();
         try {
+            if (mContext.checkPermission(
+                    CallerIdentity.asPermission(callerIdentity.permissionLevel), callerIdentity.pid,
+                    callerIdentity.uid) != PERMISSION_GRANTED) {
+                return false;
+            }
+
             return mAppOps.checkOpNoThrow(
                     CallerIdentity.asAppOp(callerIdentity.permissionLevel),
                     callerIdentity.uid,
@@ -138,8 +150,24 @@
      * called right before a location is delivered, and if it returns false, the location should not
      * be delivered.
      */
-    public boolean noteLocationAccess(CallerIdentity identity) {
-        return noteOpNoThrow(CallerIdentity.asAppOp(identity.permissionLevel), identity);
+    public boolean noteLocationAccess(CallerIdentity callerIdentity) {
+        if (callerIdentity.permissionLevel == PERMISSION_NONE) {
+            return false;
+        }
+
+        long identity = Binder.clearCallingIdentity();
+        try {
+            if (mContext.checkPermission(
+                    CallerIdentity.asPermission(callerIdentity.permissionLevel), callerIdentity.pid,
+                    callerIdentity.uid) != PERMISSION_GRANTED) {
+                return false;
+            }
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+
+        return noteOpNoThrow(CallerIdentity.asAppOp(callerIdentity.permissionLevel),
+                callerIdentity);
     }
 
     /**
diff --git a/services/core/java/com/android/server/location/LocationManagerService.java b/services/core/java/com/android/server/location/LocationManagerService.java
index bfcbe46..5c9350a 100644
--- a/services/core/java/com/android/server/location/LocationManagerService.java
+++ b/services/core/java/com/android/server/location/LocationManagerService.java
@@ -1586,6 +1586,7 @@
                 }
 
                 record.mRequest = locationRequest;
+                record.mReceiver.updateMonitoring(true);
                 requests.add(locationRequest);
                 if (!locationRequest.isLowPowerMode()) {
                     providerRequest.setLowPowerMode(false);
@@ -2063,10 +2064,12 @@
         }
     }
 
+    @Nullable
     @Override
-    public boolean getCurrentLocation(LocationRequest locationRequest,
-            ICancellationSignal remoteCancellationSignal, ILocationListener listener,
-            String packageName, String featureId, String listenerId) {
+    public ICancellationSignal getCurrentLocation(LocationRequest locationRequest,
+            ILocationListener listener, String packageName, String featureId, String listenerId) {
+        ICancellationSignal remoteCancellationSignal = CancellationSignal.createTransport();
+
         // side effect of validating locationRequest and packageName
         Location lastLocation = getLastLocation(locationRequest, packageName, featureId);
         if (lastLocation != null) {
@@ -2076,17 +2079,17 @@
             if (locationAgeMs < MAX_CURRENT_LOCATION_AGE_MS) {
                 try {
                     listener.onLocationChanged(lastLocation);
-                    return true;
+                    return remoteCancellationSignal;
                 } catch (RemoteException e) {
                     Log.w(TAG, e);
-                    return false;
+                    return null;
                 }
             }
 
             if (!mAppForegroundHelper.isAppForeground(Binder.getCallingUid())) {
                 if (locationAgeMs < mSettingsHelper.getBackgroundThrottleIntervalMs()) {
                     // not allowed to request new locations, so we can't return anything
-                    return false;
+                    return null;
                 }
             }
         }
@@ -2094,11 +2097,8 @@
         requestLocationUpdates(locationRequest, listener, null, packageName, featureId, listenerId);
         CancellationSignal cancellationSignal = CancellationSignal.fromTransport(
                 remoteCancellationSignal);
-        if (cancellationSignal != null) {
-            cancellationSignal.setOnCancelListener(
-                    () -> removeUpdates(listener, null));
-        }
-        return true;
+        cancellationSignal.setOnCancelListener(() -> removeUpdates(listener, null));
+        return remoteCancellationSignal;
     }
 
     @Override
diff --git a/services/core/java/com/android/server/location/OWNERS b/services/core/java/com/android/server/location/OWNERS
index c2c95e6..696a0c2 100644
--- a/services/core/java/com/android/server/location/OWNERS
+++ b/services/core/java/com/android/server/location/OWNERS
@@ -1,8 +1 @@
-aadmal@google.com
-arthuri@google.com
-bduddie@google.com
-gomo@google.com
-sooniln@google.com
-weiwa@google.com
-wyattriley@google.com
-yuhany@google.com
+file:/location/java/android/location/OWNERS
diff --git a/services/core/java/com/android/server/location/contexthub/OWNERS b/services/core/java/com/android/server/location/contexthub/OWNERS
new file mode 100644
index 0000000..d4393d6
--- /dev/null
+++ b/services/core/java/com/android/server/location/contexthub/OWNERS
@@ -0,0 +1,2 @@
+arthuri@google.com
+bduddie@google.com
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java
index cef5cb6..d003b89 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsService.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java
@@ -113,6 +113,7 @@
 import com.android.internal.notification.SystemNotificationChannels;
 import com.android.internal.util.DumpUtils;
 import com.android.internal.util.IndentingPrintWriter;
+import com.android.internal.util.Preconditions;
 import com.android.internal.widget.ICheckCredentialProgressCallback;
 import com.android.internal.widget.ILockSettings;
 import com.android.internal.widget.LockPatternUtils;
@@ -154,6 +155,7 @@
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
@@ -261,7 +263,13 @@
 
         @Override
         public void onStart() {
-            AndroidKeyStoreProvider.install();
+            Optional<Boolean> keystore2_enabled =
+                    android.sysprop.Keystore2Properties.keystore2_enabled();
+            if (keystore2_enabled.isPresent() && keystore2_enabled.get()) {
+                android.security.keystore2.AndroidKeyStoreProvider.install();
+            } else {
+                AndroidKeyStoreProvider.install();
+            }
             mLockSettingsService = new LockSettingsService(getContext());
             publishBinderService("lock_settings", mLockSettingsService);
         }
@@ -542,7 +550,8 @@
 
         public @NonNull ManagedProfilePasswordCache getManagedProfilePasswordCache() {
             try {
-                java.security.KeyStore ks = java.security.KeyStore.getInstance("AndroidKeyStore");
+                java.security.KeyStore ks = java.security.KeyStore.getInstance(
+                        SyntheticPasswordCrypto.androidKeystoreProviderName());
                 ks.load(null);
                 return new ManagedProfilePasswordCache(ks, getUserManager());
             } catch (Exception e) {
@@ -1284,7 +1293,8 @@
         byte[] encryptedPassword = Arrays.copyOfRange(storedData, PROFILE_KEY_IV_SIZE,
                 storedData.length);
         byte[] decryptionResult;
-        java.security.KeyStore keyStore = java.security.KeyStore.getInstance("AndroidKeyStore");
+        java.security.KeyStore keyStore = java.security.KeyStore.getInstance(
+                SyntheticPasswordCrypto.androidKeystoreProviderName());
         keyStore.load(null);
         SecretKey decryptionKey = (SecretKey) keyStore.getKey(
                 LockPatternUtils.PROFILE_KEY_NAME_DECRYPT + userId, null);
@@ -1743,7 +1753,8 @@
             KeyGenerator keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES);
             keyGenerator.init(new SecureRandom());
             SecretKey secretKey = keyGenerator.generateKey();
-            java.security.KeyStore keyStore = java.security.KeyStore.getInstance("AndroidKeyStore");
+            java.security.KeyStore keyStore = java.security.KeyStore.getInstance(
+                    SyntheticPasswordCrypto.androidKeystoreProviderName());
             keyStore.load(null);
             try {
                 keyStore.setEntry(
@@ -2299,7 +2310,8 @@
     private void removeKeystoreProfileKey(int targetUserId) {
         Slog.i(TAG, "Remove keystore profile key for user: " + targetUserId);
         try {
-            java.security.KeyStore keyStore = java.security.KeyStore.getInstance("AndroidKeyStore");
+            java.security.KeyStore keyStore = java.security.KeyStore.getInstance(
+                    SyntheticPasswordCrypto.androidKeystoreProviderName());
             keyStore.load(null);
             keyStore.deleteEntry(LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT + targetUserId);
             keyStore.deleteEntry(LockPatternUtils.PROFILE_KEY_NAME_DECRYPT + targetUserId);
@@ -2618,9 +2630,12 @@
     protected AuthenticationToken initializeSyntheticPasswordLocked(byte[] credentialHash,
             LockscreenCredential credential, int userId) {
         Slog.i(TAG, "Initialize SyntheticPassword for user: " + userId);
+        Preconditions.checkState(
+                getSyntheticPasswordHandleLocked(userId) == SyntheticPasswordManager.DEFAULT_HANDLE,
+                "Cannot reinitialize SP");
+
         final AuthenticationToken auth = mSpManager.newSyntheticPasswordAndSid(
                 getGateKeeperService(), credentialHash, credential, userId);
-        onAuthTokenKnownForUser(userId, auth);
         if (auth == null) {
             Slog.wtf(TAG, "initializeSyntheticPasswordLocked returns null auth token");
             return null;
@@ -2643,6 +2658,7 @@
         }
         fixateNewestUserKeyAuth(userId);
         setSyntheticPasswordHandleLocked(handle, userId);
+        onAuthTokenKnownForUser(userId, auth);
         return auth;
     }
 
@@ -2678,7 +2694,7 @@
 
     @VisibleForTesting
     protected boolean shouldMigrateToSyntheticPasswordLocked(int userId) {
-        return true;
+        return getSyntheticPasswordHandleLocked(userId) == SyntheticPasswordManager.DEFAULT_HANDLE;
     }
 
     private VerifyCredentialResponse spBasedDoVerifyCredential(LockscreenCredential userCredential,
diff --git a/services/core/java/com/android/server/locksettings/OWNERS b/services/core/java/com/android/server/locksettings/OWNERS
new file mode 100644
index 0000000..dad6e39
--- /dev/null
+++ b/services/core/java/com/android/server/locksettings/OWNERS
@@ -0,0 +1,2 @@
+jaggies@google.com
+kchyn@google.com
diff --git a/services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java b/services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java
index 9246311..6d420a9 100644
--- a/services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java
+++ b/services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java
@@ -18,6 +18,7 @@
 
 import android.security.keystore.KeyProperties;
 import android.security.keystore.KeyProtection;
+import android.security.keystore2.AndroidKeyStoreProvider;
 import android.util.Slog;
 
 import java.io.ByteArrayOutputStream;
@@ -125,7 +126,7 @@
 
     public static byte[] decryptBlobV1(String keyAlias, byte[] blob, byte[] applicationId) {
         try {
-            KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
+            KeyStore keyStore = KeyStore.getInstance(androidKeystoreProviderName());
             keyStore.load(null);
 
             SecretKey decryptionKey = (SecretKey) keyStore.getKey(keyAlias, null);
@@ -140,9 +141,24 @@
         }
     }
 
+    /**
+     * TODO This function redirects keystore access to the legacy keystore during a transitional
+     *      phase during which not all calling code has been adjusted to use Keystore 2.0.
+     *      This can be reverted to a constant of "AndroidKeyStore" when b/171305684 is complete.
+     *      The specific bug for this component is b/171305115.
+     */
+    static String androidKeystoreProviderName() {
+        if (AndroidKeyStoreProvider.isInstalled()) {
+            return "AndroidKeyStoreLegacy";
+        } else {
+            return "AndroidKeystore";
+        }
+
+    }
+
     public static byte[] decryptBlob(String keyAlias, byte[] blob, byte[] applicationId) {
         try {
-            KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
+            KeyStore keyStore = KeyStore.getInstance(androidKeystoreProviderName());
             keyStore.load(null);
 
             SecretKey decryptionKey = (SecretKey) keyStore.getKey(keyAlias, null);
@@ -166,7 +182,7 @@
             KeyGenerator keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES);
             keyGenerator.init(AES_KEY_LENGTH * 8, new SecureRandom());
             SecretKey secretKey = keyGenerator.generateKey();
-            KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
+            KeyStore keyStore = KeyStore.getInstance(androidKeystoreProviderName());
             keyStore.load(null);
             KeyProtection.Builder builder = new KeyProtection.Builder(KeyProperties.PURPOSE_DECRYPT)
                     .setBlockModes(KeyProperties.BLOCK_MODE_GCM)
@@ -196,7 +212,7 @@
     public static void destroyBlobKey(String keyAlias) {
         KeyStore keyStore;
         try {
-            keyStore = KeyStore.getInstance("AndroidKeyStore");
+            keyStore = KeyStore.getInstance(androidKeystoreProviderName());
             keyStore.load(null);
             keyStore.deleteEntry(keyAlias);
             Slog.i(TAG, "SP key deleted: " + keyAlias);
diff --git a/services/core/java/com/android/server/media/BluetoothRouteProvider.java b/services/core/java/com/android/server/media/BluetoothRouteProvider.java
index 3a4dfaf..7afa81a 100644
--- a/services/core/java/com/android/server/media/BluetoothRouteProvider.java
+++ b/services/core/java/com/android/server/media/BluetoothRouteProvider.java
@@ -34,6 +34,7 @@
 import android.media.AudioManager;
 import android.media.AudioSystem;
 import android.media.MediaRoute2Info;
+import android.os.UserHandle;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.Slog;
@@ -55,7 +56,6 @@
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
 
     private static final String HEARING_AID_ROUTE_ID_PREFIX = "HEARING_AID_";
-    private static BluetoothRouteProvider sInstance;
 
     @SuppressWarnings("WeakerAccess") /* synthetic access */
     // Maps hardware address to BluetoothRouteInfo
@@ -79,19 +79,21 @@
     private final BroadcastReceiver mBroadcastReceiver = new BluetoothBroadcastReceiver();
     private final BluetoothProfileListener mProfileListener = new BluetoothProfileListener();
 
-    static synchronized BluetoothRouteProvider getInstance(@NonNull Context context,
+    /**
+     * Create an instance of {@link BluetoothRouteProvider}.
+     * It may return {@code null} if Bluetooth is not supported on this hardware platform.
+     */
+    @Nullable
+    static BluetoothRouteProvider createInstance(@NonNull Context context,
             @NonNull BluetoothRoutesUpdatedListener listener) {
         Objects.requireNonNull(context);
         Objects.requireNonNull(listener);
 
-        if (sInstance == null) {
-            BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
-            if (btAdapter == null) {
-                return null;
-            }
-            sInstance = new BluetoothRouteProvider(context, btAdapter, listener);
+        BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
+        if (btAdapter == null) {
+            return null;
         }
-        return sInstance;
+        return new BluetoothRouteProvider(context, btAdapter, listener);
     }
 
     private BluetoothRouteProvider(Context context, BluetoothAdapter btAdapter,
@@ -103,7 +105,7 @@
         buildBluetoothRoutes();
     }
 
-    public void start() {
+    public void start(UserHandle user) {
         mBluetoothAdapter.getProfileProxy(mContext, mProfileListener, BluetoothProfile.A2DP);
         mBluetoothAdapter.getProfileProxy(mContext, mProfileListener, BluetoothProfile.HEARING_AID);
 
@@ -118,7 +120,8 @@
         addEventReceiver(BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED,
                 deviceStateChangedReceiver);
 
-        mContext.registerReceiver(mBroadcastReceiver, mIntentFilter, null, null);
+        mContext.registerReceiverAsUser(mBroadcastReceiver, user,
+                mIntentFilter, null, null);
     }
 
     /**
@@ -162,11 +165,13 @@
 
     private void buildBluetoothRoutes() {
         mBluetoothRoutes.clear();
-        for (BluetoothDevice device : mBluetoothAdapter.getBondedDevices()) {
-            if (device.isConnected()) {
-                BluetoothRouteInfo newBtRoute = createBluetoothRoute(device);
-                if (newBtRoute.connectedProfiles.size() > 0) {
-                    mBluetoothRoutes.put(device.getAddress(), newBtRoute);
+        if (mBluetoothAdapter.getBondedDevices() != null) {
+            for (BluetoothDevice device : mBluetoothAdapter.getBondedDevices()) {
+                if (device.isConnected()) {
+                    BluetoothRouteInfo newBtRoute = createBluetoothRoute(device);
+                    if (newBtRoute.connectedProfiles.size() > 0) {
+                        mBluetoothRoutes.put(device.getAddress(), newBtRoute);
+                    }
                 }
             }
         }
diff --git a/services/core/java/com/android/server/media/MediaButtonReceiverHolder.java b/services/core/java/com/android/server/media/MediaButtonReceiverHolder.java
index 9dae1b4..6e655ea 100644
--- a/services/core/java/com/android/server/media/MediaButtonReceiverHolder.java
+++ b/services/core/java/com/android/server/media/MediaButtonReceiverHolder.java
@@ -259,7 +259,7 @@
             return "";
         }
         return String.join(COMPONENT_NAME_USER_ID_DELIM,
-                mComponentName.toString(),
+                mComponentName.flattenToString(),
                 String.valueOf(mUserId),
                 String.valueOf(mComponentType));
     }
diff --git a/services/core/java/com/android/server/media/MediaKeyDispatcher.java b/services/core/java/com/android/server/media/MediaKeyDispatcher.java
index 5933723..fc7c82a 100644
--- a/services/core/java/com/android/server/media/MediaKeyDispatcher.java
+++ b/services/core/java/com/android/server/media/MediaKeyDispatcher.java
@@ -20,6 +20,7 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.PendingIntent;
+import android.content.Context;
 import android.media.session.ISessionManager;
 import android.media.session.MediaSession;
 import android.os.Binder;
@@ -60,7 +61,7 @@
 
     private Map<Integer, Integer> mOverriddenKeyEvents;
 
-    public MediaKeyDispatcher() {
+    public MediaKeyDispatcher(Context context) {
         // Constructor used for reflection
         mOverriddenKeyEvents = new HashMap<>();
         mOverriddenKeyEvents.put(KeyEvent.KEYCODE_MEDIA_PLAY, 0);
diff --git a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
index 875bfdf..1114fe0 100644
--- a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
+++ b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
@@ -1176,7 +1176,8 @@
             super(Looper.getMainLooper(), null, true);
             mServiceRef = new WeakReference<>(service);
             mUserRecord = userRecord;
-            mSystemProvider = new SystemMediaRoute2Provider(service.mContext);
+            mSystemProvider = new SystemMediaRoute2Provider(service.mContext,
+                    UserHandle.of(userRecord.mUserId));
             mRouteProviders.add(mSystemProvider);
             mWatcher = new MediaRoute2ProviderWatcher(service.mContext, this,
                     this, mUserRecord.mUserId);
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index b02b900..818b2b7 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -96,7 +96,6 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
  * System implementation of MediaSessionManager
@@ -152,7 +151,6 @@
 
     private SessionPolicyProvider mCustomSessionPolicyProvider;
     private MediaKeyDispatcher mCustomMediaKeyDispatcher;
-    private Map<Integer, Integer> mOverriddenKeyEventsMap;
 
     public MediaSessionService(Context context) {
         super(context);
@@ -771,7 +769,6 @@
     private void instantiateCustomDispatcher(String nameFromTesting) {
         synchronized (mLock) {
             mCustomMediaKeyDispatcher = null;
-            mOverriddenKeyEventsMap = null;
 
             String customDispatcherClassName = (nameFromTesting == null)
                     ? mContext.getResources().getString(R.string.config_customMediaKeyDispatcher)
@@ -779,9 +776,10 @@
             try {
                 if (!TextUtils.isEmpty(customDispatcherClassName)) {
                     Class customDispatcherClass = Class.forName(customDispatcherClassName);
-                    Constructor constructor = customDispatcherClass.getDeclaredConstructor();
-                    mCustomMediaKeyDispatcher = (MediaKeyDispatcher) constructor.newInstance();
-                    mOverriddenKeyEventsMap = mCustomMediaKeyDispatcher.getOverriddenKeyEvents();
+                    Constructor constructor =
+                            customDispatcherClass.getDeclaredConstructor(Context.class);
+                    mCustomMediaKeyDispatcher =
+                            (MediaKeyDispatcher) constructor.newInstance(mContext);
                 }
             } catch (ClassNotFoundException | InstantiationException | InvocationTargetException
                     | IllegalAccessException | NoSuchMethodException e) {
@@ -801,9 +799,10 @@
             try {
                 if (!TextUtils.isEmpty(customProviderClassName)) {
                     Class customProviderClass = Class.forName(customProviderClassName);
-                    Constructor constructor = customProviderClass.getDeclaredConstructor();
+                    Constructor constructor =
+                            customProviderClass.getDeclaredConstructor(Context.class);
                     mCustomSessionPolicyProvider =
-                            (SessionPolicyProvider) constructor.newInstance();
+                            (SessionPolicyProvider) constructor.newInstance(mContext);
                 }
             } catch (ClassNotFoundException | InstantiationException | InvocationTargetException
                     | IllegalAccessException | NoSuchMethodException e) {
@@ -1937,7 +1936,8 @@
                 // Context#getPackageName() for getting package name that matches with the PID/UID,
                 // but it doesn't tell which package has created the MediaController, so useless.
                 return hasMediaControlPermission(controllerPid, controllerUid)
-                        || hasEnabledNotificationListener(userId, controllerPackageName);
+                        || hasEnabledNotificationListener(
+                                userId, controllerPackageName, controllerUid);
             } finally {
                 Binder.restoreCallingIdentity(token);
             }
@@ -2001,29 +2001,29 @@
             return resolvedUserId;
         }
 
-        private boolean hasEnabledNotificationListener(int resolvedUserId, String packageName)
-                throws RemoteException {
-            // You may not access another user's content as an enabled listener.
-            final int userId = UserHandle.getUserId(resolvedUserId);
-            if (resolvedUserId != userId) {
+        private boolean hasEnabledNotificationListener(int callingUserId,
+                String controllerPackageName, int controllerUid) throws RemoteException {
+            int controllerUserId = UserHandle.getUserHandleForUid(controllerUid).getIdentifier();
+            if (callingUserId != controllerUserId) {
+                // Enabled notification listener only works within the same user.
                 return false;
             }
 
             // TODO(jaewan): (Post-P) Propose NotificationManager#hasEnabledNotificationListener(
             //               String pkgName) to notification team for optimization
             final List<ComponentName> enabledNotificationListeners =
-                    mNotificationManager.getEnabledNotificationListeners(userId);
+                    mNotificationManager.getEnabledNotificationListeners(controllerUserId);
             if (enabledNotificationListeners != null) {
                 for (int i = 0; i < enabledNotificationListeners.size(); i++) {
-                    if (TextUtils.equals(packageName,
+                    if (TextUtils.equals(controllerPackageName,
                             enabledNotificationListeners.get(i).getPackageName())) {
                         return true;
                     }
                 }
             }
             if (DEBUG) {
-                Log.d(TAG, packageName + " (uid=" + resolvedUserId + ") doesn't have an enabled "
-                        + "notification listener");
+                Log.d(TAG, controllerPackageName + " (uid=" + controllerUid
+                        + ") doesn't have an enabled notification listener");
             }
             return false;
         }
@@ -2398,9 +2398,12 @@
                     return;
                 }
 
-                int overriddenKeyEvents = (mCustomMediaKeyDispatcher == null) ? 0
-                        : mCustomMediaKeyDispatcher.getOverriddenKeyEvents()
-                                .get(keyEvent.getKeyCode());
+                int overriddenKeyEvents = 0;
+                if (mCustomMediaKeyDispatcher != null
+                        && mCustomMediaKeyDispatcher.getOverriddenKeyEvents() != null) {
+                    overriddenKeyEvents = mCustomMediaKeyDispatcher.getOverriddenKeyEvents()
+                            .get(keyEvent.getKeyCode());
+                }
                 cancelTrackingIfNeeded(packageName, pid, uid, asSystemService, keyEvent,
                         needWakeLock, opPackageName, stream, musicOnly, overriddenKeyEvents);
                 if (!needTracking(keyEvent, overriddenKeyEvents)) {
diff --git a/services/core/java/com/android/server/media/SessionPolicyProvider.java b/services/core/java/com/android/server/media/SessionPolicyProvider.java
index 5f02a07..332c85a 100644
--- a/services/core/java/com/android/server/media/SessionPolicyProvider.java
+++ b/services/core/java/com/android/server/media/SessionPolicyProvider.java
@@ -18,6 +18,7 @@
 
 import android.annotation.IntDef;
 import android.annotation.NonNull;
+import android.content.Context;
 import android.media.session.MediaSession;
 
 import java.lang.annotation.Retention;
@@ -54,7 +55,7 @@
      */
     static final int SESSION_POLICY_IGNORE_BUTTON_SESSION = 1 << 1;
 
-    public SessionPolicyProvider() {
+    public SessionPolicyProvider(Context context) {
         // Constructor used for reflection
     }
 
diff --git a/services/core/java/com/android/server/media/SystemMediaRoute2Provider.java b/services/core/java/com/android/server/media/SystemMediaRoute2Provider.java
index 2c089ca..4f7af94 100644
--- a/services/core/java/com/android/server/media/SystemMediaRoute2Provider.java
+++ b/services/core/java/com/android/server/media/SystemMediaRoute2Provider.java
@@ -45,6 +45,7 @@
 import android.os.Looper;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.os.UserHandle;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.Slog;
@@ -99,7 +100,7 @@
         }
     };
 
-    SystemMediaRoute2Provider(Context context) {
+    SystemMediaRoute2Provider(Context context, UserHandle user) {
         super(sComponentName);
 
         mIsSystemRouteProvider = true;
@@ -117,7 +118,7 @@
         updateDeviceRoute(newAudioRoutes);
 
         // .getInstance returns null if there is no bt adapter available
-        mBtRouteProvider = BluetoothRouteProvider.getInstance(context, (routes) -> {
+        mBtRouteProvider = BluetoothRouteProvider.createInstance(context, (routes) -> {
             publishProviderState();
 
             boolean sessionInfoChanged;
@@ -130,11 +131,12 @@
 
         IntentFilter intentFilter = new IntentFilter(AudioManager.VOLUME_CHANGED_ACTION);
         intentFilter.addAction(AudioManager.STREAM_DEVICES_CHANGED_ACTION);
-        mContext.registerReceiver(new AudioManagerBroadcastReceiver(), intentFilter);
+        mContext.registerReceiverAsUser(new AudioManagerBroadcastReceiver(), user,
+                intentFilter, null, null);
 
         if (mBtRouteProvider != null) {
             mHandler.post(() -> {
-                mBtRouteProvider.start();
+                mBtRouteProvider.start(user);
                 notifyProviderState();
             });
         }
diff --git a/services/core/java/com/android/server/net/IpConfigStore.java b/services/core/java/com/android/server/net/IpConfigStore.java
index f0bf5c0..9c5abd4 100644
--- a/services/core/java/com/android/server/net/IpConfigStore.java
+++ b/services/core/java/com/android/server/net/IpConfigStore.java
@@ -16,11 +16,11 @@
 
 package com.android.server.net;
 
+import android.net.InetAddresses;
 import android.net.IpConfiguration;
 import android.net.IpConfiguration.IpAssignment;
 import android.net.IpConfiguration.ProxySettings;
 import android.net.LinkAddress;
-import android.net.NetworkUtils;
 import android.net.ProxyInfo;
 import android.net.RouteInfo;
 import android.net.StaticIpConfiguration;
@@ -284,8 +284,10 @@
                         } else if (key.equals(IP_ASSIGNMENT_KEY)) {
                             ipAssignment = IpAssignment.valueOf(in.readUTF());
                         } else if (key.equals(LINK_ADDRESS_KEY)) {
-                            LinkAddress linkAddr = new LinkAddress(
-                                    NetworkUtils.numericToInetAddress(in.readUTF()), in.readInt());
+                            LinkAddress linkAddr =
+                                    new LinkAddress(
+                                            InetAddresses.parseNumericAddress(in.readUTF()),
+                                            in.readInt());
                             if (linkAddr.getAddress() instanceof Inet4Address &&
                                     staticIpConfiguration.ipAddress == null) {
                                 staticIpConfiguration.ipAddress = linkAddr;
@@ -297,7 +299,7 @@
                             InetAddress gateway = null;
                             if (version == 1) {
                                 // only supported default gateways - leave the dest/prefix empty
-                                gateway = NetworkUtils.numericToInetAddress(in.readUTF());
+                                gateway = InetAddresses.parseNumericAddress(in.readUTF());
                                 if (staticIpConfiguration.gateway == null) {
                                     staticIpConfiguration.gateway = gateway;
                                 } else {
@@ -305,12 +307,13 @@
                                 }
                             } else {
                                 if (in.readInt() == 1) {
-                                    dest = new LinkAddress(
-                                            NetworkUtils.numericToInetAddress(in.readUTF()),
-                                            in.readInt());
+                                    dest =
+                                            new LinkAddress(
+                                                    InetAddresses.parseNumericAddress(in.readUTF()),
+                                                    in.readInt());
                                 }
                                 if (in.readInt() == 1) {
-                                    gateway = NetworkUtils.numericToInetAddress(in.readUTF());
+                                    gateway = InetAddresses.parseNumericAddress(in.readUTF());
                                 }
                                 RouteInfo route = new RouteInfo(dest, gateway);
                                 if (route.isIPv4Default() &&
@@ -322,7 +325,7 @@
                             }
                         } else if (key.equals(DNS_KEY)) {
                             staticIpConfiguration.dnsServers.add(
-                                    NetworkUtils.numericToInetAddress(in.readUTF()));
+                                    InetAddresses.parseNumericAddress(in.readUTF()));
                         } else if (key.equals(PROXY_SETTINGS_KEY)) {
                             proxySettings = ProxySettings.valueOf(in.readUTF());
                         } else if (key.equals(PROXY_HOST_KEY)) {
diff --git a/services/core/java/com/android/server/net/LockdownVpnTracker.java b/services/core/java/com/android/server/net/LockdownVpnTracker.java
index 64c3c28..ea1d8da 100644
--- a/services/core/java/com/android/server/net/LockdownVpnTracker.java
+++ b/services/core/java/com/android/server/net/LockdownVpnTracker.java
@@ -37,7 +37,7 @@
 import android.security.Credentials;
 import android.security.KeyStore;
 import android.text.TextUtils;
-import android.util.Slog;
+import android.util.Log;
 
 import com.android.internal.R;
 import com.android.internal.annotations.GuardedBy;
@@ -128,7 +128,7 @@
         final int egressType = (egressInfo == null) ? TYPE_NONE : egressInfo.getType();
         final String egressIface = (egressProp == null) ?
                 null : egressProp.getInterfaceName();
-        Slog.d(TAG, "handleStateChanged: egress=" + egressType
+        Log.d(TAG, "handleStateChanged: egress=" + egressType
                 + " " + mAcceptedEgressIface + "->" + egressIface);
 
         if (egressDisconnected || egressChanged) {
@@ -149,7 +149,7 @@
 
         } else if (egressInfo.isConnected() && !vpnInfo.isConnectedOrConnecting()) {
             if (mProfile.isValidLockdownProfile()) {
-                Slog.d(TAG, "Active network connected; starting VPN");
+                Log.d(TAG, "Active network connected; starting VPN");
                 EventLogTags.writeLockdownVpnConnecting(egressType);
                 showNotification(R.string.vpn_lockdown_connecting, R.drawable.vpn_disconnected);
 
@@ -160,11 +160,11 @@
                     mVpn.startLegacyVpnPrivileged(mProfile, KeyStore.getInstance(), egressProp);
                 } catch (IllegalStateException e) {
                     mAcceptedEgressIface = null;
-                    Slog.e(TAG, "Failed to start VPN", e);
+                    Log.e(TAG, "Failed to start VPN", e);
                     showNotification(R.string.vpn_lockdown_error, R.drawable.vpn_disconnected);
                 }
             } else {
-                Slog.e(TAG, "Invalid VPN profile; requires IP-based server and DNS");
+                Log.e(TAG, "Invalid VPN profile; requires IP-based server and DNS");
                 showNotification(R.string.vpn_lockdown_error, R.drawable.vpn_disconnected);
             }
 
@@ -172,8 +172,8 @@
             final String iface = vpnConfig.interfaze;
             final List<LinkAddress> sourceAddrs = vpnConfig.addresses;
 
-            Slog.d(TAG, "VPN connected using iface=" + iface +
-                    ", sourceAddr=" + sourceAddrs.toString());
+            Log.d(TAG, "VPN connected using iface=" + iface
+                    + ", sourceAddr=" + sourceAddrs.toString());
             EventLogTags.writeLockdownVpnConnected(egressType);
             showNotification(R.string.vpn_lockdown_connected, R.drawable.vpn_connected);
 
@@ -190,7 +190,7 @@
     }
 
     private void initLocked() {
-        Slog.d(TAG, "initLocked()");
+        Log.d(TAG, "initLocked()");
 
         mVpn.setEnableTeardown(false);
         mVpn.setLockdown(true);
@@ -204,7 +204,7 @@
     }
 
     private void shutdownLocked() {
-        Slog.d(TAG, "shutdownLocked()");
+        Log.d(TAG, "shutdownLocked()");
 
         mAcceptedEgressIface = null;
         mErrorCount = 0;
@@ -222,7 +222,7 @@
      */
     @GuardedBy("mConnService.mVpns")
     public void reset() {
-        Slog.d(TAG, "reset()");
+        Log.d(TAG, "reset()");
         synchronized (mStateLock) {
             // cycle tracker, reset error count, and trigger retry
             shutdownLocked();
diff --git a/services/core/java/com/android/server/net/NetworkPolicyLogger.java b/services/core/java/com/android/server/net/NetworkPolicyLogger.java
index 006d78e..5bd352c 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyLogger.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyLogger.java
@@ -17,11 +17,13 @@
 
 import static android.net.INetd.FIREWALL_CHAIN_DOZABLE;
 import static android.net.INetd.FIREWALL_CHAIN_POWERSAVE;
+import static android.net.INetd.FIREWALL_CHAIN_RESTRICTED;
 import static android.net.INetd.FIREWALL_CHAIN_STANDBY;
 import static android.net.INetd.FIREWALL_RULE_ALLOW;
 import static android.net.INetd.FIREWALL_RULE_DENY;
 import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_DOZABLE;
 import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_POWERSAVE;
+import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_RESTRICTED;
 import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_STANDBY;
 import static android.net.NetworkPolicyManager.FIREWALL_RULE_DEFAULT;
 import static android.os.Process.INVALID_UID;
@@ -339,6 +341,8 @@
                 return FIREWALL_CHAIN_NAME_STANDBY;
             case FIREWALL_CHAIN_POWERSAVE:
                 return FIREWALL_CHAIN_NAME_POWERSAVE;
+            case FIREWALL_CHAIN_RESTRICTED:
+                return FIREWALL_CHAIN_NAME_RESTRICTED;
             default:
                 return String.valueOf(chain);
         }
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index e8f4826..9dd70b7 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -591,7 +591,7 @@
 
     private final NetworkPolicyLogger mLogger = new NetworkPolicyLogger();
 
-    /** List of apps indexed by appId and whether they have the internet permission */
+    /** List of apps indexed by uid and whether they have the internet permission */
     @GuardedBy("mUidRulesFirstLock")
     private final SparseBooleanArray mInternetPermissionMap = new SparseBooleanArray();
 
@@ -977,7 +977,7 @@
                 if (LOGV) Slog.v(TAG, "ACTION_PACKAGE_ADDED for uid=" + uid);
                 // Clear the cache for the app
                 synchronized (mUidRulesFirstLock) {
-                    mInternetPermissionMap.delete(UserHandle.getAppId(uid));
+                    mInternetPermissionMap.delete(uid);
                     updateRestrictionRulesForUidUL(uid);
                 }
             }
@@ -4223,16 +4223,14 @@
     @GuardedBy("mUidRulesFirstLock")
     private boolean hasInternetPermissionUL(int uid) {
         try {
-            final int appId = UserHandle.getAppId(uid);
-            final boolean hasPermission;
-            if (mInternetPermissionMap.indexOfKey(appId) < 0) {
-                hasPermission =
-                        mIPm.checkUidPermission(Manifest.permission.INTERNET, uid)
-                                == PackageManager.PERMISSION_GRANTED;
-                mInternetPermissionMap.put(appId, hasPermission);
-            } else {
-                hasPermission = mInternetPermissionMap.get(appId);
+            if (mInternetPermissionMap.get(uid)) {
+                return true;
             }
+            // If the cache shows that uid doesn't have internet permission,
+            // then always re-check with PackageManager just to be safe.
+            final boolean hasPermission = mIPm.checkUidPermission(Manifest.permission.INTERNET,
+                    uid) == PackageManager.PERMISSION_GRANTED;
+            mInternetPermissionMap.put(uid, hasPermission);
             return hasPermission;
         } catch (RemoteException e) {
         }
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 179118c..aad030d 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -318,7 +318,7 @@
     static final boolean DEBUG_INTERRUPTIVENESS = SystemProperties.getBoolean(
             "debug.notification.interruptiveness", false);
 
-    static final int MAX_PACKAGE_NOTIFICATIONS = 25;
+    static final int MAX_PACKAGE_NOTIFICATIONS = 50;
     static final float DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE = 5f;
 
     // message codes
@@ -1939,6 +1939,13 @@
             }
 
             @Override
+            void onConsolidatedPolicyChanged() {
+                Binder.withCleanCallingIdentity(() -> {
+                    mRankingHandler.requestSort();
+                });
+            }
+
+            @Override
             void onAutomaticRuleStatusChanged(int userId, String pkg, String id, int status) {
                 Binder.withCleanCallingIdentity(() -> {
                     Intent intent = new Intent(ACTION_AUTOMATIC_ZEN_RULE_STATUS_CHANGED);
@@ -6238,6 +6245,8 @@
                     for (NotificationRecord r : enqueued) {
                         if (r.mUpdateTimeMs > mWhen) {
                             // At least one enqueue was posted after the cancel, so we're invalid
+                            Slog.i(TAG, "notification cancel ignored due to newer enqueued entry"
+                                    + "key=" + r.getSbn().getKey());
                             return;
                         }
                     }
@@ -6964,15 +6973,15 @@
         if (record.getSbn().isGroup() && record.getNotification().suppressAlertingDueToGrouping()) {
             return false;
         }
-        // not if in call or the screen's on
-        if (isInCall() || mScreenOn) {
+        // not if in call
+        if (isInCall()) {
             return false;
         }
         // check current user
         if (!isNotificationForCurrentUser(record)) {
             return false;
         }
-
+        // Light, but only when the screen is off
         return true;
     }
 
@@ -7737,6 +7746,13 @@
     @VisibleForTesting
     void updateUriPermissions(@Nullable NotificationRecord newRecord,
             @Nullable NotificationRecord oldRecord, String targetPkg, int targetUserId) {
+        updateUriPermissions(newRecord, oldRecord, targetPkg, targetUserId, false);
+    }
+
+    @VisibleForTesting
+    void updateUriPermissions(@Nullable NotificationRecord newRecord,
+            @Nullable NotificationRecord oldRecord, String targetPkg, int targetUserId,
+            boolean onlyRevokeCurrentTarget) {
         final String key = (newRecord != null) ? newRecord.getKey() : oldRecord.getKey();
         if (DBG) Slog.d(TAG, key + ": updating permissions");
 
@@ -7764,7 +7780,9 @@
         }
 
         // If we have no Uris to grant, but an existing owner, go destroy it
-        if (newUris == null && permissionOwner != null) {
+        // When revoking permissions of a single listener, destroying the owner will revoke
+        // permissions of other listeners who need to keep access.
+        if (newUris == null && permissionOwner != null && !onlyRevokeCurrentTarget) {
             destroyPermissionOwner(permissionOwner, UserHandle.getUserId(oldRecord.getUid()), key);
             permissionOwner = null;
         }
@@ -7787,9 +7805,20 @@
                 final Uri uri = oldUris.valueAt(i);
                 if (newUris == null || !newUris.contains(uri)) {
                     if (DBG) Slog.d(TAG, key + ": revoking " + uri);
-                    int userId = ContentProvider.getUserIdFromUri(
-                            uri, UserHandle.getUserId(oldRecord.getUid()));
-                    revokeUriPermission(permissionOwner, uri, userId);
+                    if (onlyRevokeCurrentTarget) {
+                        // We're revoking permission from one listener only; other listeners may
+                        // still need access because the notification may still exist
+                        revokeUriPermission(permissionOwner, uri,
+                                UserHandle.getUserId(oldRecord.getUid()), targetPkg, targetUserId);
+                    } else {
+                        // This is broad to unilaterally revoke permissions to this Uri as granted
+                        // by this notification.  But this code-path can only be used when the
+                        // reason for revoking is that the notification posted again without this
+                        // Uri, not when removing an individual listener.
+                        revokeUriPermission(permissionOwner, uri,
+                                UserHandle.getUserId(oldRecord.getUid()),
+                                null, UserHandle.USER_ALL);
+                    }
                 }
             }
         }
@@ -7818,8 +7847,10 @@
         }
     }
 
-    private void revokeUriPermission(IBinder owner, Uri uri, int userId) {
+    private void revokeUriPermission(IBinder owner, Uri uri, int sourceUserId, String targetPkg,
+            int targetUserId) {
         if (uri == null || !ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) return;
+        int userId = ContentProvider.getUserIdFromUri(uri, sourceUserId);
 
         final long ident = Binder.clearCallingIdentity();
         try {
@@ -7827,7 +7858,7 @@
                     owner,
                     ContentProvider.getUriWithoutUserId(uri),
                     Intent.FLAG_GRANT_READ_URI_PERMISSION,
-                    userId);
+                    userId, targetPkg, targetUserId);
         } finally {
             Binder.restoreCallingIdentity(ident);
         }
@@ -9195,6 +9226,7 @@
             final NotificationRankingUpdate update;
             synchronized (mNotificationLock) {
                 update = makeRankingUpdateLocked(info);
+                updateUriPermissionsForActiveNotificationsLocked(info, true);
             }
             try {
                 listener.onListenerConnected(update);
@@ -9206,6 +9238,7 @@
         @Override
         @GuardedBy("mNotificationLock")
         protected void onServiceRemovedLocked(ManagedServiceInfo removed) {
+            updateUriPermissionsForActiveNotificationsLocked(removed, false);
             if (removeDisabledHints(removed)) {
                 updateListenerHintsLocked();
                 updateEffectsSuppressorLocked();
@@ -9272,8 +9305,7 @@
 
                 for (final ManagedServiceInfo info : getServices()) {
                     boolean sbnVisible = isVisibleToListener(sbn, info);
-                    boolean oldSbnVisible = oldSbn != null ? isVisibleToListener(oldSbn, info)
-                            : false;
+                    boolean oldSbnVisible = (oldSbn != null) && isVisibleToListener(oldSbn, info);
                     // This notification hasn't been and still isn't visible -> ignore.
                     if (!oldSbnVisible && !sbnVisible) {
                         continue;
@@ -9297,13 +9329,8 @@
                     // This notification became invisible -> remove the old one.
                     if (oldSbnVisible && !sbnVisible) {
                         final StatusBarNotification oldSbnLightClone = oldSbn.cloneLight();
-                        mHandler.post(new Runnable() {
-                            @Override
-                            public void run() {
-                                notifyRemoved(
-                                        info, oldSbnLightClone, update, null, REASON_USER_STOPPED);
-                            }
-                        });
+                        mHandler.post(() -> notifyRemoved(
+                                info, oldSbnLightClone, update, null, REASON_USER_STOPPED));
                         continue;
                     }
 
@@ -9313,12 +9340,7 @@
                     updateUriPermissions(r, old, info.component.getPackageName(), targetUserId);
 
                     final StatusBarNotification sbnToPost = trimCache.ForListener(info);
-                    mHandler.post(new Runnable() {
-                        @Override
-                        public void run() {
-                            notifyPosted(info, sbnToPost, update);
-                        }
-                    });
+                    mHandler.post(() -> notifyPosted(info, sbnToPost, update));
                 }
             } catch (Exception e) {
                 Slog.e(TAG, "Could not notify listeners for " + r.getKey(), e);
@@ -9326,6 +9348,46 @@
         }
 
         /**
+         * Synchronously grant or revoke permissions to Uris for all active and visible
+         * notifications to just the NotificationListenerService provided.
+         */
+        @GuardedBy("mNotificationLock")
+        private void updateUriPermissionsForActiveNotificationsLocked(
+                ManagedServiceInfo info, boolean grant) {
+            try {
+                for (final NotificationRecord r : mNotificationList) {
+                    // When granting permissions, ignore notifications which are invisible.
+                    // When revoking permissions, all notifications are invisible, so process all.
+                    if (grant && !isVisibleToListener(r.getSbn(), info)) {
+                        continue;
+                    }
+                    // If the notification is hidden, permissions are not required by the listener.
+                    if (r.isHidden() && info.targetSdkVersion < Build.VERSION_CODES.P) {
+                        continue;
+                    }
+                    // Grant or revoke access synchronously
+                    final int targetUserId = (info.userid == UserHandle.USER_ALL)
+                            ? UserHandle.USER_SYSTEM : info.userid;
+                    if (grant) {
+                        // Grant permissions by passing arguments as if the notification is new.
+                        updateUriPermissions(/* newRecord */ r, /* oldRecord */ null,
+                                info.component.getPackageName(), targetUserId);
+                    } else {
+                        // Revoke permissions by passing arguments as if the notification was
+                        // removed, but set `onlyRevokeCurrentTarget` to avoid revoking permissions
+                        // granted to *other* targets by this notification's URIs.
+                        updateUriPermissions(/* newRecord */ null, /* oldRecord */ r,
+                                info.component.getPackageName(), targetUserId,
+                                /* onlyRevokeCurrentTarget */ true);
+                    }
+                }
+            } catch (Exception e) {
+                Slog.e(TAG, "Could not " + (grant ? "grant" : "revoke") + " Uri permissions to "
+                        + info.component, e);
+            }
+        }
+
+        /**
          * asynchronously notify all listeners about a removed notification
          */
         @GuardedBy("mNotificationLock")
@@ -9360,18 +9422,11 @@
                 final NotificationStats stats = mAssistants.isServiceTokenValidLocked(info.service)
                         ? notificationStats : null;
                 final NotificationRankingUpdate update = makeRankingUpdateLocked(info);
-                mHandler.post(new Runnable() {
-                    @Override
-                    public void run() {
-                        notifyRemoved(info, sbnLight, update, stats, reason);
-                    }
-                });
+                mHandler.post(() -> notifyRemoved(info, sbnLight, update, stats, reason));
             }
 
             // Revoke access after all listeners have been updated
-            mHandler.post(() -> {
-                updateUriPermissions(null, r, null, UserHandle.USER_SYSTEM);
-            });
+            mHandler.post(() -> updateUriPermissions(null, r, null, UserHandle.USER_SYSTEM));
         }
 
         /**
diff --git a/services/core/java/com/android/server/notification/PreferencesHelper.java b/services/core/java/com/android/server/notification/PreferencesHelper.java
index bc78d66..c3cb42f 100644
--- a/services/core/java/com/android/server/notification/PreferencesHelper.java
+++ b/services/core/java/com/android/server/notification/PreferencesHelper.java
@@ -75,6 +75,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -173,6 +174,8 @@
 
     private boolean mAllowInvalidShortcuts = false;
 
+    private Map<String, List<String>> mOemLockedApps = new HashMap();
+
     public PreferencesHelper(Context context, PackageManager pm, RankingHandler rankingHandler,
             ZenModeHelper zenHelper, NotificationChannelLogger notificationChannelLogger,
             AppOpsManager appOpsManager,
@@ -314,6 +317,12 @@
                                         }
                                         channel.setImportanceLockedByCriticalDeviceFunction(
                                                 r.defaultAppLockedImportance);
+                                        channel.setImportanceLockedByOEM(r.oemLockedImportance);
+                                        if (!channel.isImportanceLockedByOEM()) {
+                                            if (r.oemLockedChannels.contains(channel.getId())) {
+                                                channel.setImportanceLockedByOEM(true);
+                                            }
+                                        }
                                         boolean isInvalidShortcutChannel =
                                                 channel.getConversationId() != null &&
                                                         channel.getConversationId().contains(
@@ -396,6 +405,14 @@
             r.visibility = visibility;
             r.showBadge = showBadge;
             r.bubblePreference = bubblePreference;
+            if (mOemLockedApps.containsKey(r.pkg)) {
+                List<String> channels = mOemLockedApps.get(r.pkg);
+                if (channels == null || channels.isEmpty()) {
+                    r.oemLockedImportance = true;
+                } else {
+                    r.oemLockedChannels = channels;
+                }
+            }
 
             try {
                 createDefaultChannelIfNeededLocked(r);
@@ -1149,8 +1166,10 @@
                     String channelId = appSplit.length == 2 ? appSplit[1] : null;
 
                     synchronized (mPackagePreferences) {
+                        boolean foundApp = false;
                         for (PackagePreferences r : mPackagePreferences.values()) {
                             if (r.pkg.equals(appName)) {
+                                foundApp = true;
                                 if (channelId == null) {
                                     // lock all channels for the app
                                     r.oemLockedImportance = true;
@@ -1168,6 +1187,14 @@
                                 }
                             }
                         }
+                        if (!foundApp) {
+                            List<String> channels =
+                                    mOemLockedApps.getOrDefault(appName, new ArrayList<>());
+                            if (channelId != null) {
+                                channels.add(channelId);
+                            }
+                            mOemLockedApps.put(appName, channels);
+                        }
                     }
                 }
             }
diff --git a/services/core/java/com/android/server/om/OWNERS b/services/core/java/com/android/server/om/OWNERS
new file mode 100644
index 0000000..afb98d4
--- /dev/null
+++ b/services/core/java/com/android/server/om/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/content/om/OWNERS
diff --git a/services/core/java/com/android/server/om/TEST_MAPPING b/services/core/java/com/android/server/om/TEST_MAPPING
index 6edd76f..e8a2a02 100644
--- a/services/core/java/com/android/server/om/TEST_MAPPING
+++ b/services/core/java/com/android/server/om/TEST_MAPPING
@@ -15,9 +15,6 @@
       "name": "OverlayHostTests"
     },
     {
-      "name": "OverlayRemountedTest"
-    },
-    {
       "name": "CtsAppSecurityHostTestCases",
       "options": [
         {
@@ -25,5 +22,10 @@
         }
       ]
     }
+  ],
+  "presubmit-large": [
+    {
+      "name": "OverlayRemountedTest"
+    }
   ]
 }
diff --git a/services/core/java/com/android/server/people/OWNERS b/services/core/java/com/android/server/people/OWNERS
new file mode 100644
index 0000000..3198a5e
--- /dev/null
+++ b/services/core/java/com/android/server/people/OWNERS
@@ -0,0 +1 @@
+include /services/people/OWNERS
diff --git a/services/core/java/com/android/server/pm/OWNERS b/services/core/java/com/android/server/pm/OWNERS
index cca2b83..004259b 100644
--- a/services/core/java/com/android/server/pm/OWNERS
+++ b/services/core/java/com/android/server/pm/OWNERS
@@ -30,9 +30,10 @@
 per-file CrossProfileAppsService.java = omakoto@google.com, yamasani@google.com
 per-file CrossProfileIntentFilter.java = omakoto@google.com, yamasani@google.com
 per-file CrossProfileIntentResolver.java = omakoto@google.com, yamasani@google.com
+per-file RestrictionsSet.java = bookatz@google.com, omakoto@google.com, yamasani@google.com, rubinxu@google.com, sandness@google.com
+per-file UserManagerInternal.java = bookatz@google.com, omakoto@google.com, yamasani@google.com
 per-file UserManagerService.java = bookatz@google.com, omakoto@google.com, yamasani@google.com
 per-file UserRestrictionsUtils.java = omakoto@google.com, rubinxu@google.com, sandness@google.com, yamasani@google.com
-per-file RestrictionsSet.java = bookatz@google.com, omakoto@google.com, yamasani@google.com, rubinxu@google.com, sandness@google.com
 per-file UserSystemPackageInstaller.java = bookatz@google.com, omakoto@google.com, yamasani@google.com
 per-file UserTypeDetails.java = bookatz@google.com, omakoto@google.com, yamasani@google.com
 per-file UserTypeFactory.java = bookatz@google.com, omakoto@google.com, yamasani@google.com
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index 90d9834..6594a90 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -267,6 +267,9 @@
     /** Uid of the creator of this session. */
     private final int mOriginalInstallerUid;
 
+    /** Package name of the app that created the installation session. */
+    private final String mOriginalInstallerPackageName;
+
     /** Uid of the owner of the installer session */
     @GuardedBy("mLock")
     private int mInstallerUid;
@@ -556,6 +559,7 @@
         mOriginalInstallerUid = installerUid;
         mInstallerUid = installerUid;
         mInstallSource = Objects.requireNonNull(installSource);
+        mOriginalInstallerPackageName = mInstallSource.installerPackageName;
         this.params = params;
         this.createdMillis = createdMillis;
         this.updatedMillis = createdMillis;
@@ -665,6 +669,7 @@
 
             info.mode = params.mode;
             info.installReason = params.installReason;
+            info.installScenario = params.installScenario;
             info.sizeBytes = params.sizeBytes;
             info.appPackageName = params.appPackageName;
             if (includeIcon) {
@@ -1682,11 +1687,6 @@
                 throw new IllegalArgumentException("Package is not valid", e);
             }
 
-            if (!mPackageName.equals(mInstallSource.installerPackageName)) {
-                throw new SecurityException("Can only transfer sessions that update the original "
-                        + "installer");
-            }
-
             mInstallerUid = newOwnerAppInfo.uid;
             mInstallSource = InstallSource.create(packageName, null, packageName);
         }
@@ -2173,6 +2173,15 @@
             }
         }
 
+        if (mInstallerUid != mOriginalInstallerUid) {
+            // Session has been transferred, check package name.
+            if (TextUtils.isEmpty(mPackageName) || !mPackageName.equals(
+                    mOriginalInstallerPackageName)) {
+                throw new PackageManagerException(PackageManager.INSTALL_FAILED_PACKAGE_CHANGED,
+                        "Can only transfer sessions that update the original installer");
+            }
+        }
+
         if (params.mode == SessionParams.MODE_FULL_INSTALL) {
             // Full installs must include a base package
             if (!stagedSplits.contains(null)) {
@@ -3198,6 +3207,7 @@
 
         pw.printPair("userId", userId);
         pw.printPair("mOriginalInstallerUid", mOriginalInstallerUid);
+        pw.printPair("mOriginalInstallerPackageName", mOriginalInstallerPackageName);
         pw.printPair("installerPackageName", mInstallSource.installerPackageName);
         pw.printPair("installInitiatingPackageName", mInstallSource.initiatingPackageName);
         pw.printPair("installOriginatingPackageName", mInstallSource.originatingPackageName);
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 7fa3225..c121d24 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -677,10 +677,15 @@
     public static final int REASON_FIRST_BOOT = 0;
     public static final int REASON_BOOT = 1;
     public static final int REASON_INSTALL = 2;
-    public static final int REASON_BACKGROUND_DEXOPT = 3;
-    public static final int REASON_AB_OTA = 4;
-    public static final int REASON_INACTIVE_PACKAGE_DOWNGRADE = 5;
-    public static final int REASON_SHARED = 6;
+    public static final int REASON_INSTALL_FAST = 3;
+    public static final int REASON_INSTALL_BULK = 4;
+    public static final int REASON_INSTALL_BULK_SECONDARY = 5;
+    public static final int REASON_INSTALL_BULK_DOWNGRADED = 6;
+    public static final int REASON_INSTALL_BULK_SECONDARY_DOWNGRADED = 7;
+    public static final int REASON_BACKGROUND_DEXOPT = 8;
+    public static final int REASON_AB_OTA = 9;
+    public static final int REASON_INACTIVE_PACKAGE_DOWNGRADE = 10;
+    public static final int REASON_SHARED = 11;
 
     public static final int REASON_LAST = REASON_SHARED;
 
@@ -2380,9 +2385,12 @@
         final int callingUserId = UserHandle.getUserId(callingUid);
 
         for (String packageName : packages) {
-            PackageSetting setting = mSettings.mPackages.get(packageName);
-            if (setting != null
-                    && !shouldFilterApplicationLocked(setting, callingUid, callingUserId)) {
+            final boolean filterApp;
+            synchronized (mLock) {
+                final PackageSetting ps = mSettings.getPackageLPr(packageName);
+                filterApp = shouldFilterApplicationLocked(ps, callingUid, callingUserId);
+            }
+            if (!filterApp) {
                 notifyInstallObserver(packageName);
             }
         }
@@ -2993,7 +3001,10 @@
             t.traceEnd();
 
             t.traceBegin("read user settings");
-            mFirstBoot = !mSettings.readLPw(mInjector.getUserManagerInternal().getUsers(false));
+            mFirstBoot = !mSettings.readLPw(mInjector.getUserManagerInternal().getUsers(
+                    /* excludePartial= */ true,
+                    /* excludeDying= */ false,
+                    /* excludePreCreated= */ false));
             t.traceEnd();
 
             // Clean up orphaned packages for which the code path doesn't exist
@@ -8933,10 +8944,10 @@
         if (providerInfo == null) {
             return null;
         }
-        if (!mSettings.isEnabledAndMatchLPr(providerInfo, flags, userId)) {
-            return null;
-        }
         synchronized (mLock) {
+            if (!mSettings.isEnabledAndMatchLPr(providerInfo, flags, userId)) {
+                return null;
+            }
             final PackageSetting ps = mSettings.mPackages.get(providerInfo.packageName);
             final ComponentName component =
                     new ComponentName(providerInfo.packageName, providerInfo.name);
@@ -9023,9 +9034,11 @@
             String targetPackage, int flags) {
         final int callingUid = Binder.getCallingUid();
         final int callingUserId = UserHandle.getUserId(callingUid);
-        final PackageSetting ps = mSettings.mPackages.get(targetPackage);
-        if (shouldFilterApplicationLocked(ps, callingUid, callingUserId)) {
-            return ParceledListSlice.emptyList();
+        synchronized (mLock) {
+            final PackageSetting ps = mSettings.getPackageLPr(targetPackage);
+            if (shouldFilterApplicationLocked(ps, callingUid, callingUserId)) {
+                return ParceledListSlice.emptyList();
+            }
         }
         return new ParceledListSlice<>(queryInstrumentationInternal(targetPackage, flags,
                 callingUserId));
@@ -14526,7 +14539,7 @@
         final PackageSetting ps;
         int appId = -1;
         long ceDataInode = -1;
-        synchronized (mSettings) {
+        synchronized (mLock) {
             ps = mSettings.getPackageLPr(packageName);
             if (ps != null) {
                 appId = ps.appId;
@@ -14853,6 +14866,7 @@
         final VerificationInfo verificationInfo;
         final PackageParser.SigningDetails signingDetails;
         final int installReason;
+        final int mInstallScenario;
         @Nullable
         MultiPackageInstallParams mParentInstallParams;
         final long requiredInstalledVersionCode;
@@ -14881,6 +14895,7 @@
             this.autoRevokePermissionsMode = autoRevokePermissionsMode;
             this.signingDetails = signingDetails;
             this.installReason = installReason;
+            this.mInstallScenario = PackageManager.INSTALL_SCENARIO_DEFAULT;
             this.requiredInstalledVersionCode = requiredInstalledVersionCode;
             this.forceQueryableOverride = false;
             this.mDataLoaderType = dataLoaderType;
@@ -14908,6 +14923,7 @@
                     activeInstallSession.getInstallSource().installerPackageName,
                     activeInstallSession.getInstallerUid(),
                     sessionParams.installReason);
+            mInstallScenario = sessionParams.installScenario;
             observer = activeInstallSession.getObserver();
             installFlags = sessionParams.installFlags;
             installSource = activeInstallSession.getInstallSource();
@@ -15545,6 +15561,7 @@
         final int traceCookie;
         final PackageParser.SigningDetails signingDetails;
         final int installReason;
+        final int mInstallScenario;
         final boolean forceQueryableOverride;
         @Nullable final MultiPackageInstallParams mMultiPackageInstallParams;
         final int mDataLoaderType;
@@ -15561,7 +15578,7 @@
                 List<String> whitelistedRestrictedPermissions,
                 int autoRevokePermissionsMode,
                 String traceMethod, int traceCookie, SigningDetails signingDetails,
-                int installReason, boolean forceQueryableOverride,
+                int installReason, int installScenario, boolean forceQueryableOverride,
                 MultiPackageInstallParams multiPackageInstallParams, int dataLoaderType) {
             this.origin = origin;
             this.move = move;
@@ -15579,6 +15596,7 @@
             this.traceCookie = traceCookie;
             this.signingDetails = signingDetails;
             this.installReason = installReason;
+            this.mInstallScenario = installScenario;
             this.forceQueryableOverride = forceQueryableOverride;
             this.mMultiPackageInstallParams = multiPackageInstallParams;
             this.mDataLoaderType = dataLoaderType;
@@ -15592,7 +15610,7 @@
                     params.grantedRuntimePermissions, params.whitelistedRestrictedPermissions,
                     params.autoRevokePermissionsMode,
                     params.traceMethod, params.traceCookie, params.signingDetails,
-                    params.installReason, params.forceQueryableOverride,
+                    params.installReason, params.mInstallScenario, params.forceQueryableOverride,
                     params.mParentInstallParams, params.mDataLoaderType);
         }
 
@@ -15684,8 +15702,8 @@
             super(OriginInfo.fromNothing(), null, null, 0, InstallSource.EMPTY,
                     null, null, instructionSets, null, null, null, MODE_DEFAULT, null, 0,
                     PackageParser.SigningDetails.UNKNOWN,
-                    PackageManager.INSTALL_REASON_UNKNOWN, false, null /* parent */,
-                    DataLoaderType.NONE);
+                    PackageManager.INSTALL_REASON_UNKNOWN, PackageManager.INSTALL_SCENARIO_DEFAULT,
+                    false, null /* parent */, DataLoaderType.NONE);
             this.codeFile = (codePath != null) ? new File(codePath) : null;
             this.resourceFile = (resourcePath != null) ? new File(resourcePath) : null;
         }
@@ -16993,6 +17011,26 @@
                     resolveUserIds(reconciledPkg.installArgs.user.getIdentifier()),
                     /* updateReferenceProfileContent= */ true);
 
+            // Compute the compilation reason from the installation scenario.
+            final int compilationReason = mDexManager.getCompilationReasonForInstallScenario(
+                    reconciledPkg.installArgs.mInstallScenario);
+
+            // Construct the DexoptOptions early to see if we should skip running dexopt.
+            //
+            // Do not run PackageDexOptimizer through the local performDexOpt
+            // method because `pkg` may not be in `mPackages` yet.
+            //
+            // Also, don't fail application installs if the dexopt step fails.
+            final boolean isBackupOrRestore =
+                    reconciledPkg.installArgs.installReason == INSTALL_REASON_DEVICE_RESTORE
+                    || reconciledPkg.installArgs.installReason == INSTALL_REASON_DEVICE_SETUP;
+
+            final int dexoptFlags = DexoptOptions.DEXOPT_BOOT_COMPLETE
+                    | DexoptOptions.DEXOPT_INSTALL_WITH_DEX_METADATA_FILE
+                    | (isBackupOrRestore ? DexoptOptions.DEXOPT_FOR_RESTORE : 0);
+            DexoptOptions dexoptOptions =
+                    new DexoptOptions(packageName, compilationReason, dexoptFlags);
+
             // Check whether we need to dexopt the app.
             //
             // NOTE: it is IMPORTANT to call dexopt:
@@ -17013,11 +17051,18 @@
             // continuous progress to the useur instead of mysteriously blocking somewhere in the
             // middle of running an instant app. The default behaviour can be overridden
             // via gservices.
+            //
+            // Furthermore, dexopt may be skipped, depending on the install scenario and current
+            // state of the device.
+            //
+            // TODO(b/174695087): instantApp and onIncremental should be removed and their install
+            //       path moved to SCENARIO_FAST.
             final boolean performDexopt =
                     (!instantApp || Global.getInt(mContext.getContentResolver(),
                     Global.INSTANT_APP_DEXOPT_ENABLED, 0) != 0)
                     && !pkg.isDebuggable()
-                    && (!onIncremental);
+                    && (!onIncremental)
+                    && dexoptOptions.isCompilationEnabled();
 
             if (performDexopt) {
                 // Compile the layout resources.
@@ -17028,19 +17073,6 @@
                 }
 
                 Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt");
-                // Do not run PackageDexOptimizer through the local performDexOpt
-                // method because `pkg` may not be in `mPackages` yet.
-                //
-                // Also, don't fail application installs if the dexopt step fails.
-                int flags = DexoptOptions.DEXOPT_BOOT_COMPLETE
-                        | DexoptOptions.DEXOPT_INSTALL_WITH_DEX_METADATA_FILE;
-                if (reconciledPkg.installArgs.installReason == INSTALL_REASON_DEVICE_RESTORE
-                        || reconciledPkg.installArgs.installReason == INSTALL_REASON_DEVICE_SETUP) {
-                    flags |= DexoptOptions.DEXOPT_FOR_RESTORE;
-                }
-                DexoptOptions dexoptOptions = new DexoptOptions(packageName,
-                        REASON_INSTALL,
-                        flags);
                 ScanResult result = reconciledPkg.scanResult;
 
                 // This mirrors logic from commitReconciledScanResultLocked, where the library files
@@ -19388,9 +19420,11 @@
         mPermissionManager.enforceCrossUserPermission(callingUid, userId,
                 true /* requireFullPermission */, false /* checkShell */, "clear application data");
 
-        final PackageSetting ps = mSettings.getPackageLPr(packageName);
-        final boolean filterApp =
-                (ps != null && shouldFilterApplicationLocked(ps, callingUid, userId));
+        final boolean filterApp;
+        synchronized (mLock) {
+            final PackageSetting ps = mSettings.getPackageLPr(packageName);
+            filterApp = shouldFilterApplicationLocked(ps, callingUid, userId);
+        }
         if (!filterApp && mProtectedPackages.isPackageDataProtected(userId, packageName)) {
             throw new SecurityException("Cannot clear data for a protected package: "
                     + packageName);
@@ -19670,11 +19704,13 @@
         if (mContext.checkCallingOrSelfPermission(
                 android.Manifest.permission.SET_PREFERRED_APPLICATIONS)
                 != PackageManager.PERMISSION_GRANTED) {
-            if (getUidTargetSdkVersionLockedLPr(callingUid)
-                    < Build.VERSION_CODES.FROYO) {
-                Slog.w(TAG, "Ignoring addPreferredActivity() from uid "
-                        + callingUid);
-                return;
+            synchronized (mLock) {
+                if (getUidTargetSdkVersionLockedLPr(callingUid)
+                        < Build.VERSION_CODES.FROYO) {
+                    Slog.w(TAG, "Ignoring addPreferredActivity() from uid "
+                            + callingUid);
+                    return;
+                }
             }
             mContext.enforceCallingOrSelfPermission(
                     android.Manifest.permission.SET_PREFERRED_APPLICATIONS, null);
@@ -19846,8 +19882,9 @@
     /** This method takes a specific user id as well as UserHandle.USER_ALL. */
     private void clearPackagePreferredActivities(String packageName, int userId) {
         final SparseBooleanArray changedUsers = new SparseBooleanArray();
-
-        clearPackagePreferredActivitiesLPw(packageName, changedUsers, userId);
+        synchronized (mLock) {
+            clearPackagePreferredActivitiesLPw(packageName, changedUsers, userId);
+        }
         if (changedUsers.size() > 0) {
             updateDefaultHomeNotLocked(changedUsers);
             postPreferredActivityChangedBroadcast(userId);
@@ -19969,7 +20006,9 @@
         // writer
         try {
             final SparseBooleanArray changedUsers = new SparseBooleanArray();
-            clearPackagePreferredActivitiesLPw(null, changedUsers, userId);
+            synchronized (mLock) {
+                clearPackagePreferredActivitiesLPw(null, changedUsers, userId);
+            }
             if (changedUsers.size() > 0) {
                 postPreferredActivityChangedBroadcast(userId);
             }
@@ -20979,15 +21018,19 @@
         // Limit who can change which apps
         if (!UserHandle.isSameApp(callingUid, pkgSetting.appId)) {
             // Don't allow apps that don't have permission to modify other apps
-            if (!allowedByPermission
-                    || shouldFilterApplicationLocked(pkgSetting, callingUid, userId)) {
+            final boolean filterApp;
+            synchronized (mLock) {
+                filterApp = (!allowedByPermission
+                        || shouldFilterApplicationLocked(pkgSetting, callingUid, userId));
+            }
+            if (filterApp) {
                 throw new SecurityException(
                         "Attempt to change component state; "
-                        + "pid=" + Binder.getCallingPid()
-                        + ", uid=" + callingUid
-                        + (className == null
+                                + "pid=" + Binder.getCallingPid()
+                                + ", uid=" + callingUid
+                                + (className == null
                                 ? ", package=" + packageName
-                                : ", component=" + packageName + "/" + className));
+                                        : ", component=" + packageName + "/" + className));
             }
             // Don't allow changing protected packages.
             if (mProtectedPackages.isPackageStateProtected(userId, packageName)) {
@@ -25328,18 +25371,7 @@
         int mode = mInjector.getAppOpsManager().checkOpNoThrow(
                 AppOpsManager.OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED,
                 Binder.getCallingUid(), packageName);
-        if (mode == MODE_ALLOWED) {
-            return false;
-        } else if (mode == MODE_IGNORED) {
-            return true;
-        } else {
-            synchronized (mLock) {
-                boolean manifestWhitelisted =
-                        mPackages.get(packageName).getAutoRevokePermissions()
-                                == ApplicationInfo.AUTO_REVOKE_DISALLOWED;
-                return manifestWhitelisted;
-            }
-        }
+        return mode == MODE_IGNORED;
     }
 
     @Override
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceCompilerMapping.java b/services/core/java/com/android/server/pm/PackageManagerServiceCompilerMapping.java
index 5fc5bac..9cd55a6 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceCompilerMapping.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceCompilerMapping.java
@@ -18,6 +18,8 @@
 
 import android.os.SystemProperties;
 
+import com.android.server.pm.dex.DexoptOptions;
+
 import dalvik.system.DexFile;
 
 /**
@@ -26,10 +28,22 @@
 public class PackageManagerServiceCompilerMapping {
     // Names for compilation reasons.
     public static final String REASON_STRINGS[] = {
-            "first-boot", "boot", "install", "bg-dexopt", "ab-ota", "inactive", "shared"
+        "first-boot",
+        "boot",
+        "install",
+        "install-fast",
+        "install-bulk",
+        "install-bulk-secondary",
+        "install-bulk-downgraded",
+        "install-bulk-secondary-downgraded",
+        "bg-dexopt",
+        "ab-ota",
+        "inactive",
+        // "shared" must be the last entry
+        "shared"
     };
 
-    static final int REASON_SHARED_INDEX = 6;
+    static final int REASON_SHARED_INDEX = REASON_STRINGS.length - 1;
 
     // Static block to ensure the strings array is of the right length.
     static {
@@ -53,8 +67,9 @@
     // exception in case the reason or value are invalid.
     private static String getAndCheckValidity(int reason) {
         String sysPropValue = SystemProperties.get(getSystemPropertyName(reason));
-        if (sysPropValue == null || sysPropValue.isEmpty() ||
-                !DexFile.isValidCompilerFilter(sysPropValue)) {
+        if (sysPropValue == null || sysPropValue.isEmpty()
+                || !(sysPropValue.equals(DexoptOptions.COMPILER_FILTER_NOOP)
+                        || DexFile.isValidCompilerFilter(sysPropValue))) {
             throw new IllegalStateException("Value \"" + sysPropValue +"\" not valid "
                     + "(reason " + REASON_STRINGS[reason] + ")");
         } else if (!isFilterAllowedForReason(reason, sysPropValue)) {
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index bb5a953..0aa51ee 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -2321,7 +2321,8 @@
 
     private boolean isVendorApp(String pkg) {
         try {
-            final PackageInfo info = mInterface.getPackageInfo(pkg, 0, UserHandle.USER_SYSTEM);
+            final PackageInfo info = mInterface.getPackageInfo(
+                     pkg, PackageManager.MATCH_ANY_USER, UserHandle.USER_SYSTEM);
             return info != null && info.applicationInfo.isVendor();
         } catch (RemoteException e) {
             return false;
@@ -2330,7 +2331,8 @@
 
     private boolean isProductApp(String pkg) {
         try {
-            final PackageInfo info = mInterface.getPackageInfo(pkg, 0, UserHandle.USER_SYSTEM);
+            final PackageInfo info = mInterface.getPackageInfo(
+                    pkg, PackageManager.MATCH_ANY_USER, UserHandle.USER_SYSTEM);
             return info != null && info.applicationInfo.isProduct();
         } catch (RemoteException e) {
             return false;
@@ -2339,7 +2341,8 @@
 
     private boolean isSystemExtApp(String pkg) {
         try {
-            final PackageInfo info = mInterface.getPackageInfo(pkg, 0, UserHandle.USER_SYSTEM);
+            final PackageInfo info = mInterface.getPackageInfo(
+                    pkg, PackageManager.MATCH_ANY_USER, UserHandle.USER_SYSTEM);
             return info != null && info.applicationInfo.isSystemExt();
         } catch (RemoteException e) {
             return false;
diff --git a/services/core/java/com/android/server/pm/PreferredComponent.java b/services/core/java/com/android/server/pm/PreferredComponent.java
index c312fc0..a0b2e86 100644
--- a/services/core/java/com/android/server/pm/PreferredComponent.java
+++ b/services/core/java/com/android/server/pm/PreferredComponent.java
@@ -254,6 +254,37 @@
         return numMatch == NS;
     }
 
+    public boolean sameSet(PreferredComponent pc) {
+        if (mSetPackages == null || pc == null || pc.mSetPackages == null
+                || !sameComponent(pc.mComponent)) {
+            return false;
+        }
+        final int otherPackageCount = pc.mSetPackages.length;
+        final int packageCount = mSetPackages.length;
+        if (otherPackageCount != packageCount) {
+            return false;
+        }
+        for (int i = 0; i < packageCount; i++) {
+            if (!mSetPackages[i].equals(pc.mSetPackages[i])
+                    || !mSetClasses[i].equals(pc.mSetClasses[i])) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /** Returns true if the preferred component represents the provided ComponentName. */
+    private boolean sameComponent(ComponentName comp) {
+        if (mComponent == null || comp == null) {
+            return false;
+        }
+        if (mComponent.getPackageName().equals(comp.getPackageName())
+                && mComponent.getClassName().equals(comp.getClassName())) {
+            return true;
+        }
+        return false;
+    }
+
     public boolean isSuperset(List<ResolveInfo> query, boolean excludeSetupWizardPackage) {
         if (mSetPackages == null) {
             return query == null;
diff --git a/services/core/java/com/android/server/pm/PreferredIntentResolver.java b/services/core/java/com/android/server/pm/PreferredIntentResolver.java
index a261e29..ff3df13 100644
--- a/services/core/java/com/android/server/pm/PreferredIntentResolver.java
+++ b/services/core/java/com/android/server/pm/PreferredIntentResolver.java
@@ -22,6 +22,7 @@
 import java.io.PrintWriter;
 
 import com.android.server.IntentResolver;
+import java.util.ArrayList;
 
 public class PreferredIntentResolver
         extends IntentResolver<PreferredActivity, PreferredActivity> {
@@ -45,4 +46,24 @@
     protected IntentFilter getIntentFilter(@NonNull PreferredActivity input) {
         return input;
     }
+
+    public boolean shouldAddPreferredActivity(PreferredActivity pa) {
+        ArrayList<PreferredActivity> pal = findFilters(pa);
+        if (pal == null || pal.isEmpty()) {
+            return true;
+        }
+        if (!pa.mPref.mAlways) {
+            return false;
+        }
+        final int activityCount = pal.size();
+        for (int i = 0; i < activityCount; i++) {
+            PreferredActivity cur = pal.get(i);
+            if (cur.mPref.mAlways
+                    && cur.mPref.mMatch == (pa.mPref.mMatch & IntentFilter.MATCH_CATEGORY_MASK)
+                    && cur.mPref.sameSet(pa.mPref)) {
+                return false;
+            }
+        }
+        return true;
+    }
 }
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 0f5d978..c0b8b3f 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -1410,8 +1410,7 @@
                 PreferredActivity pa = new PreferredActivity(parser);
                 if (pa.mPref.getParseError() == null) {
                     final PreferredIntentResolver resolver = editPreferredActivitiesLPw(userId);
-                    ArrayList<PreferredActivity> pal = resolver.findFilters(pa);
-                    if (pal == null || pal.size() == 0 || pa.mPref.mAlways) {
+                    if (resolver.shouldAddPreferredActivity(pa)) {
                         resolver.addFilter(pa);
                     }
                 } else {
@@ -1617,6 +1616,7 @@
                     return;
                 }
                 str = new FileInputStream(userPackagesStateFile);
+                if (DEBUG_MU) Log.i(TAG, "Reading " + userPackagesStateFile);
             }
             final XmlPullParser parser = Xml.newPullParser();
             parser.setInput(str, StandardCharsets.UTF_8.name());
@@ -2061,9 +2061,13 @@
 
             serializer.startTag(null, TAG_PACKAGE_RESTRICTIONS);
 
+            if (DEBUG_MU) Log.i(TAG, "Writing " + userPackagesStateFile);
             for (final PackageSetting pkg : mPackages.values()) {
                 final PackageUserState ustate = pkg.readUserState(userId);
-                if (DEBUG_MU) Log.i(TAG, "  pkg=" + pkg.name + ", state=" + ustate.enabled);
+                if (DEBUG_MU) {
+                    Log.i(TAG, "  pkg=" + pkg.name + ", installed=" + ustate.installed
+                            + ", state=" + ustate.enabled);
+                }
 
                 serializer.startTag(null, TAG_PACKAGE);
                 serializer.attribute(null, ATTR_NAME, pkg.name);
diff --git a/services/core/java/com/android/server/pm/StagingManager.java b/services/core/java/com/android/server/pm/StagingManager.java
index 33433db..ca50641 100644
--- a/services/core/java/com/android/server/pm/StagingManager.java
+++ b/services/core/java/com/android/server/pm/StagingManager.java
@@ -759,7 +759,6 @@
         PackageInstaller.SessionParams params = originalSession.params.copy();
         params.isStaged = false;
         params.installFlags |= PackageManager.INSTALL_STAGED;
-        // TODO(b/129744602): use the userid from the original session.
         if (preReboot) {
             params.installFlags &= ~PackageManager.INSTALL_ENABLE_ROLLBACK;
             params.installFlags |= PackageManager.INSTALL_DRY_RUN;
@@ -769,7 +768,7 @@
         try {
             int apkSessionId = mPi.createSession(
                     params, originalSession.getInstallerPackageName(),
-                    0 /* UserHandle.SYSTEM */);
+                    originalSession.userId);
             PackageInstallerSession apkSession = mPi.getSession(apkSessionId);
             apkSession.open();
             for (int i = 0, size = apkFilePaths.size(); i < size; i++) {
@@ -827,10 +826,9 @@
             if (preReboot) {
                 params.installFlags &= ~PackageManager.INSTALL_ENABLE_ROLLBACK;
             }
-            // TODO(b/129744602): use the userid from the original session.
             final int apkParentSessionId = mPi.createSession(
                     params, session.getInstallerPackageName(),
-                    0 /* UserHandle.SYSTEM */);
+                    session.userId);
             final PackageInstallerSession apkParentSession = mPi.getSession(apkParentSessionId);
             try {
                 apkParentSession.open();
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 27924a6..f5d7d9e 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -114,7 +114,6 @@
 import com.android.server.am.UserState;
 import com.android.server.storage.DeviceStorageMonitorInternal;
 import com.android.server.utils.TimingsTraceAndSlog;
-import com.android.server.wm.ActivityTaskManagerInternal;
 
 import libcore.io.IoUtils;
 
@@ -134,6 +133,7 @@
 import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
@@ -173,6 +173,7 @@
     private static final String ATTR_NEXT_SERIAL_NO = "nextSerialNumber";
     private static final String ATTR_PARTIAL = "partial";
     private static final String ATTR_PRE_CREATED = "preCreated";
+    private static final String ATTR_CONVERTED_FROM_PRE_CREATED = "convertedFromPreCreated";
     private static final String ATTR_GUEST_TO_REMOVE = "guestToRemove";
     private static final String ATTR_USER_VERSION = "version";
     private static final String ATTR_PROFILE_GROUP_ID = "profileGroupId";
@@ -406,6 +407,10 @@
 
     @GuardedBy("mUsersLock")
     private int[] mUserIds;
+
+    @GuardedBy("mUsersLock")
+    private int[] mUserIdsIncludingPreCreated;
+
     @GuardedBy("mPackagesLock")
     private int mNextSerialNumber;
     private int mUserVersion = 0;
@@ -2480,16 +2485,35 @@
     }
 
     /**
-     * Returns an array of user ids. This array is cached here for quick access, so do not modify or
-     * cache it elsewhere.
+     * Returns an array of user ids.
+     *
+     * <p>This array is cached here for quick access, so do not modify or cache it elsewhere.
+     *
      * @return the array of user ids.
      */
-    public int[] getUserIds() {
+    public @NonNull int[] getUserIds() {
         synchronized (mUsersLock) {
             return mUserIds;
         }
     }
 
+    /**
+     * Returns an array of user ids, including pre-created users.
+     *
+     * <p>This method should only used for the specific cases that need to handle pre-created users;
+     * most callers should call {@link #getUserIds()} instead.
+     *
+     * <p>This array is cached here for quick access, so do not modify or
+     * cache it elsewhere.
+     *
+     * @return the array of user ids.
+     */
+    public @NonNull int[] getUserIdsIncludingPreCreated() {
+        synchronized (mUsersLock) {
+            return mUserIdsIncludingPreCreated;
+        }
+    }
+
     @GuardedBy({"mRestrictionsLock", "mPackagesLock"})
     private void readUserListLP() {
         if (!mUserListFile.exists()) {
@@ -2873,6 +2897,9 @@
         if (userInfo.preCreated) {
             serializer.attribute(null, ATTR_PRE_CREATED, "true");
         }
+        if (userInfo.convertedFromPreCreated) {
+            serializer.attribute(null, ATTR_CONVERTED_FROM_PRE_CREATED, "true");
+        }
         if (userInfo.guestToRemove) {
             serializer.attribute(null, ATTR_GUEST_TO_REMOVE, "true");
         }
@@ -3030,6 +3057,7 @@
         int restrictedProfileParentId = UserInfo.NO_PROFILE_GROUP_ID;
         boolean partial = false;
         boolean preCreated = false;
+        boolean converted = false;
         boolean guestToRemove = false;
         boolean persistSeedData = false;
         String seedAccountName = null;
@@ -3081,6 +3109,10 @@
             if ("true".equals(valueString)) {
                 preCreated = true;
             }
+            valueString = parser.getAttributeValue(null, ATTR_CONVERTED_FROM_PRE_CREATED);
+            if ("true".equals(valueString)) {
+                converted = true;
+            }
             valueString = parser.getAttributeValue(null, ATTR_GUEST_TO_REMOVE);
             if ("true".equals(valueString)) {
                 guestToRemove = true;
@@ -3138,6 +3170,7 @@
         userInfo.lastLoggedInFingerprint = lastLoggedInFingerprint;
         userInfo.partial = partial;
         userInfo.preCreated = preCreated;
+        userInfo.convertedFromPreCreated = converted;
         userInfo.guestToRemove = guestToRemove;
         userInfo.profileGroupId = profileGroupId;
         userInfo.profileBadge = profileBadge;
@@ -3584,6 +3617,7 @@
         preCreatedUser.name = name;
         preCreatedUser.flags = newFlags;
         preCreatedUser.preCreated = false;
+        preCreatedUser.convertedFromPreCreated = true;
         preCreatedUser.creationTime = getCreationTime();
 
         synchronized (mPackagesLock) {
@@ -4327,23 +4361,43 @@
      */
     private void updateUserIds() {
         int num = 0;
+        int numIncludingPreCreated = 0;
         synchronized (mUsersLock) {
             final int userSize = mUsers.size();
             for (int i = 0; i < userSize; i++) {
-                UserInfo userInfo = mUsers.valueAt(i).info;
-                if (!userInfo.partial && !userInfo.preCreated) {
-                    num++;
+                final UserInfo userInfo = mUsers.valueAt(i).info;
+                if (!userInfo.partial) {
+                    numIncludingPreCreated++;
+                    if (!userInfo.preCreated) {
+                        num++;
+                    }
                 }
             }
+            if (DBG) {
+                Slog.d(LOG_TAG, "updateUserIds(): numberUsers= " + num
+                        + " includingPreCreated=" + numIncludingPreCreated);
+            }
             final int[] newUsers = new int[num];
+            final int[] newUsersIncludingPreCreated = new int[numIncludingPreCreated];
+
             int n = 0;
+            int nIncludingPreCreated = 0;
             for (int i = 0; i < userSize; i++) {
-                UserInfo userInfo = mUsers.valueAt(i).info;
-                if (!userInfo.partial && !userInfo.preCreated) {
-                    newUsers[n++] = mUsers.keyAt(i);
+                final UserInfo userInfo = mUsers.valueAt(i).info;
+                if (!userInfo.partial) {
+                    final int userId = mUsers.keyAt(i);
+                    newUsersIncludingPreCreated[nIncludingPreCreated++] = userId;
+                    if (!userInfo.preCreated) {
+                        newUsers[n++] = userId;
+                    }
                 }
             }
             mUserIds = newUsers;
+            mUserIdsIncludingPreCreated = newUsersIncludingPreCreated;
+            if (DBG) {
+                Slog.d(LOG_TAG, "updateUserIds(): userIds= " + Arrays.toString(mUserIds)
+                        + " includingPreCreated=" + Arrays.toString(mUserIdsIncludingPreCreated));
+            }
         }
     }
 
@@ -4626,6 +4680,7 @@
                             running ? " (running)" : "",
                             user.partial ? " (partial)" : "",
                             user.preCreated ? " (pre-created)" : "",
+                            user.convertedFromPreCreated ? " (converted)" : "",
                             current ? " (current)" : "");
                 } else {
                     // NOTE: the standard "list users" command is used by integration tests and
@@ -4710,6 +4765,9 @@
                     if (userInfo.preCreated) {
                         pw.print(" <pre-created>");
                     }
+                    if (userInfo.convertedFromPreCreated) {
+                        pw.print(" <converted>");
+                    }
                     pw.println();
                     pw.print("    Type: "); pw.println(userInfo.userType);
                     pw.print("    Flags: "); pw.print(userInfo.flags); pw.print(" (");
@@ -4791,6 +4849,13 @@
             synchronized (mUserStates) {
                 pw.println("  Started users state: " + mUserStates);
             }
+            synchronized (mUsersLock) {
+                pw.print("  Cached user IDs: ");
+                pw.println(Arrays.toString(mUserIds));
+                pw.print("  Cached user IDs (including pre-created): ");
+                pw.println(Arrays.toString(mUserIdsIncludingPreCreated));
+            }
+
         } // synchronized (mPackagesLock)
 
         // Dump some capabilities
@@ -5052,8 +5117,14 @@
 
         @Override
         public @NonNull List<UserInfo> getUsers(boolean excludeDying) {
-            return UserManagerService.this.getUsersInternal(/*excludePartial= */ true,
-                    excludeDying, /* excludePreCreated= */ true);
+            return getUsers(/*excludePartial= */ true, excludeDying, /* excludePreCreated= */ true);
+        }
+
+        @Override
+        public @NonNull List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying,
+                boolean excludePreCreated) {
+            return UserManagerService.this.getUsersInternal(excludePartial, excludeDying,
+                    excludePreCreated);
         }
 
         @Override
diff --git a/services/core/java/com/android/server/pm/dex/ArtManagerService.java b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
index a7f30fd..6e145b5 100644
--- a/services/core/java/com/android/server/pm/dex/ArtManagerService.java
+++ b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
@@ -579,6 +579,8 @@
     // Constants used for logging compilation reason to TRON.
     // DO NOT CHANGE existing values.
     //
+    // In the below constants, the abbreviation DM stands for "DEX metadata".
+    //
     // NOTE: '-1' value is reserved for the case where we cannot produce a valid
     // PackageOptimizationInfo because the ArtManagerInternal is not ready to be used by the
     // ActivityMetricsLoggers.
@@ -591,7 +593,18 @@
     private static final int TRON_COMPILATION_REASON_AB_OTA = 6;
     private static final int TRON_COMPILATION_REASON_INACTIVE = 7;
     private static final int TRON_COMPILATION_REASON_SHARED = 8;
-    private static final int TRON_COMPILATION_REASON_INSTALL_WITH_DEX_METADATA = 9;
+    private static final int TRON_COMPILATION_REASON_INSTALL_WITH_DM = 9;
+    private static final int TRON_COMPILATION_REASON_INSTALL_FAST = 10;
+    private static final int TRON_COMPILATION_REASON_INSTALL_BULK = 11;
+    private static final int TRON_COMPILATION_REASON_INSTALL_BULK_SECONDARY = 12;
+    private static final int TRON_COMPILATION_REASON_INSTALL_BULK_DOWNGRADED = 13;
+    private static final int TRON_COMPILATION_REASON_INSTALL_BULK_SECONDARY_DOWNGRADED = 14;
+    private static final int TRON_COMPILATION_REASON_INSTALL_FAST_WITH_DM = 15;
+    private static final int TRON_COMPILATION_REASON_INSTALL_BULK_WITH_DM = 16;
+    private static final int TRON_COMPILATION_REASON_INSTALL_BULK_SECONDARY_WITH_DM = 17;
+    private static final int TRON_COMPILATION_REASON_INSTALL_BULK_DOWNGRADED_WITH_DM = 18;
+    private static final int
+            TRON_COMPILATION_REASON_INSTALL_BULK_SECONDARY_DOWNGRADED_WITH_DM = 19;
 
     // The annotation to add as a suffix to the compilation reason when dexopt was
     // performed with dex metadata.
@@ -611,10 +624,30 @@
             case "ab-ota" : return TRON_COMPILATION_REASON_AB_OTA;
             case "inactive" : return TRON_COMPILATION_REASON_INACTIVE;
             case "shared" : return TRON_COMPILATION_REASON_SHARED;
-            // This is a special marker for dex metadata installation that does not
+            case "install-fast" :
+                return TRON_COMPILATION_REASON_INSTALL_FAST;
+            case "install-bulk" :
+                return TRON_COMPILATION_REASON_INSTALL_BULK;
+            case "install-bulk-secondary" :
+                return TRON_COMPILATION_REASON_INSTALL_BULK_SECONDARY;
+            case "install-bulk-downgraded" :
+                return TRON_COMPILATION_REASON_INSTALL_BULK_DOWNGRADED;
+            case "install-bulk-secondary-downgraded" :
+                return TRON_COMPILATION_REASON_INSTALL_BULK_SECONDARY_DOWNGRADED;
+            // These are special markers for dex metadata installation that do not
             // have an equivalent as a system property.
             case "install" + DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION :
-                return TRON_COMPILATION_REASON_INSTALL_WITH_DEX_METADATA;
+                return TRON_COMPILATION_REASON_INSTALL_WITH_DM;
+            case "install-fast" + DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION :
+                return TRON_COMPILATION_REASON_INSTALL_FAST_WITH_DM;
+            case "install-bulk" + DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION :
+                return TRON_COMPILATION_REASON_INSTALL_BULK_WITH_DM;
+            case "install-bulk-secondary" + DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION :
+                return TRON_COMPILATION_REASON_INSTALL_BULK_SECONDARY_WITH_DM;
+            case "install-bulk-downgraded" + DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION :
+                return TRON_COMPILATION_REASON_INSTALL_BULK_DOWNGRADED_WITH_DM;
+            case "install-bulk-secondary-downgraded" + DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION :
+                return TRON_COMPILATION_REASON_INSTALL_BULK_SECONDARY_DOWNGRADED_WITH_DM;
             default: return TRON_COMPILATION_REASON_UNKNOWN;
         }
     }
diff --git a/services/core/java/com/android/server/pm/dex/DexManager.java b/services/core/java/com/android/server/pm/dex/DexManager.java
index 3074250..cc6d80a 100644
--- a/services/core/java/com/android/server/pm/dex/DexManager.java
+++ b/services/core/java/com/android/server/pm/dex/DexManager.java
@@ -27,8 +27,11 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageManager;
 import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
 import android.content.pm.PackagePartitions;
+import android.os.BatteryManager;
 import android.os.FileUtils;
+import android.os.PowerManager;
 import android.os.RemoteException;
 import android.os.SystemProperties;
 import android.os.UserHandle;
@@ -107,6 +110,13 @@
     @GuardedBy("mInstallLock")
     private final Installer mInstaller;
 
+    private BatteryManager mBatteryManager = null;
+    private PowerManager mPowerManager = null;
+
+    // An integer percentage value used to determine when the device is considered to be on low
+    // power for compilation purposes.
+    private final int mCriticalBatteryLevel;
+
     // Possible outcomes of a dex search.
     private static int DEX_SEARCH_NOT_FOUND = 0;  // dex file not found
     private static int DEX_SEARCH_FOUND_PRIMARY = 1;  // dex file is the primary/base apk
@@ -123,6 +133,23 @@
         mInstaller = installer;
         mInstallLock = installLock;
         mDynamicCodeLogger = new DynamicCodeLogger(pms, installer);
+
+        // This is currently checked to handle tests that pass in a null context.
+        // TODO(b/174783329): Modify the tests to pass in a mocked Context, PowerManager,
+        //      and BatteryManager.
+        if (mContext != null) {
+            mPowerManager = mContext.getSystemService(PowerManager.class);
+
+            if (mPowerManager == null) {
+                Slog.wtf(TAG, "Power Manager is unavailable at time of Dex Manager start");
+            }
+
+            mCriticalBatteryLevel = mContext.getResources().getInteger(
+                com.android.internal.R.integer.config_criticalBatteryWarningLevel);
+        } else {
+            // This value will never be used as the Battery Manager null check will fail first.
+            mCriticalBatteryLevel = 0;
+        }
     }
 
     public DynamicCodeLogger getDynamicCodeLogger() {
@@ -905,6 +932,74 @@
         }
     }
 
+    /**
+     * Translates install scenarios into compilation reasons.  This process can be influenced
+     * by the state of the device.
+     */
+    public int getCompilationReasonForInstallScenario(int installScenario) {
+        // Compute the compilation reason from the installation scenario.
+
+        boolean resourcesAreCritical = areBatteryThermalOrMemoryCritical();
+        switch (installScenario) {
+            case PackageManager.INSTALL_SCENARIO_DEFAULT: {
+                return PackageManagerService.REASON_INSTALL;
+            }
+            case PackageManager.INSTALL_SCENARIO_FAST: {
+                return PackageManagerService.REASON_INSTALL_FAST;
+            }
+            case PackageManager.INSTALL_SCENARIO_BULK: {
+                if (resourcesAreCritical) {
+                    return PackageManagerService.REASON_INSTALL_BULK_DOWNGRADED;
+                } else {
+                    return PackageManagerService.REASON_INSTALL_BULK;
+                }
+            }
+            case PackageManager.INSTALL_SCENARIO_BULK_SECONDARY: {
+                if (resourcesAreCritical) {
+                    return PackageManagerService.REASON_INSTALL_BULK_SECONDARY_DOWNGRADED;
+                } else {
+                    return PackageManagerService.REASON_INSTALL_BULK_SECONDARY;
+                }
+            }
+            default: {
+                throw new IllegalArgumentException("Invalid installation scenario");
+            }
+        }
+    }
+
+    /**
+     * Fetches the battery manager object and caches it if it hasn't been fetched already.
+     */
+    private BatteryManager getBatteryManager() {
+        if (mBatteryManager == null) {
+            mBatteryManager = mContext.getSystemService(BatteryManager.class);
+        }
+
+        return mBatteryManager;
+    }
+
+    /**
+     * Returns true if the battery level, device temperature, or memory usage are considered to be
+     * in a critical state.
+     */
+    private boolean areBatteryThermalOrMemoryCritical() {
+        BatteryManager batteryManager = getBatteryManager();
+        boolean isBtmCritical = (batteryManager != null
+                && batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_STATUS)
+                    == BatteryManager.BATTERY_STATUS_DISCHARGING
+                && batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY)
+                    <= mCriticalBatteryLevel)
+                || (mPowerManager != null
+                    && mPowerManager.getCurrentThermalStatus()
+                        >= PowerManager.THERMAL_STATUS_SEVERE);
+
+        if (DEBUG) {
+            Log.d(TAG, "Battery, thermal, or memory are critical: " + isBtmCritical);
+        }
+
+        return isBtmCritical;
+    }
+
     public static class RegisterDexModuleResult {
         public RegisterDexModuleResult() {
             this(false, null);
diff --git a/services/core/java/com/android/server/pm/dex/DexoptOptions.java b/services/core/java/com/android/server/pm/dex/DexoptOptions.java
index 68f3886..ea23316 100644
--- a/services/core/java/com/android/server/pm/dex/DexoptOptions.java
+++ b/services/core/java/com/android/server/pm/dex/DexoptOptions.java
@@ -65,6 +65,12 @@
     // or device setup and should be scheduled appropriately.
     public static final int DEXOPT_FOR_RESTORE = 1 << 11; // TODO(b/135202722): remove
 
+    /**
+     * A value indicating that dexopt shouldn't be run.  This string is only used when loading
+     * filters from the `pm.dexopt.install*` properties and is not propagated to dex2oat.
+     */
+    public static final String COMPILER_FILTER_NOOP = "skip";
+
     // The name of package to optimize.
     private final String mPackageName;
 
@@ -176,6 +182,10 @@
         return mCompilationReason;
     }
 
+    public boolean isCompilationEnabled() {
+        return !mCompilerFilter.equals(COMPILER_FILTER_NOOP);
+    }
+
     /**
      * Creates a new set of DexoptOptions which are the same with the exception of the compiler
      * filter (set to the given value).
diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
index 9963cf7..66d8b59 100644
--- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
+++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
@@ -2516,12 +2516,12 @@
 
         final PermissionsState permissionsState = ps.getPermissionsState();
 
-        final int[] currentUserIds = UserManagerService.getInstance().getUserIds();
+        final int[] userIds = getAllUserIds();
 
         boolean runtimePermissionsRevoked = false;
         int[] updatedUserIds = EMPTY_INT_ARRAY;
 
-        for (int userId : currentUserIds) {
+        for (int userId : userIds) {
             if (permissionsState.isMissing(userId)) {
                 Collection<String> requestedPermissions;
                 int targetSdkVersion;
@@ -2587,7 +2587,7 @@
                 // runtime and revocation of a runtime from a shared user.
                 synchronized (mLock) {
                     updatedUserIds = revokeUnusedSharedUserPermissionsLocked(
-                            ps.getSharedUser(), UserManagerService.getInstance().getUserIds());
+                            ps.getSharedUser(), userIds);
                     if (!ArrayUtils.isEmpty(updatedUserIds)) {
                         runtimePermissionsRevoked = true;
                     }
@@ -2603,13 +2603,13 @@
             final int N = pkg.getRequestedPermissions().size();
             for (int i = 0; i < N; i++) {
                 final String permName = pkg.getRequestedPermissions().get(i);
+                final String friendlyName = pkg.getPackageName() + "(" + pkg.getUid() + ")";
                 final BasePermission bp = mSettings.getPermissionLocked(permName);
                 final boolean appSupportsRuntimePermissions =
                         pkg.getTargetSdkVersion() >= Build.VERSION_CODES.M;
                 String upgradedActivityRecognitionPermission = null;
-
                 if (DEBUG_INSTALL && bp != null) {
-                    Log.i(TAG, "Package " + pkg.getPackageName()
+                    Log.i(TAG, "Package " + friendlyName
                             + " checking " + permName + ": " + bp);
                 }
 
@@ -2618,7 +2618,7 @@
                             pkg.getPackageName())) {
                         if (DEBUG_PERMISSIONS) {
                             Slog.i(TAG, "Unknown permission " + permName
-                                    + " in package " + pkg.getPackageName());
+                                    + " in package " + friendlyName);
                         }
                     }
                     continue;
@@ -2634,7 +2634,7 @@
                         newImplicitPermissions.add(permName);
 
                         if (DEBUG_PERMISSIONS) {
-                            Slog.i(TAG, permName + " is newly added for " + pkg.getPackageName());
+                            Slog.i(TAG, permName + " is newly added for " + friendlyName);
                         }
                     } else {
                         // Special case for Activity Recognition permission. Even if AR permission
@@ -2656,8 +2656,7 @@
                                 newImplicitPermissions.add(permName);
 
                                 if (DEBUG_PERMISSIONS) {
-                                    Slog.i(TAG, permName + " is newly added for "
-                                            + pkg.getPackageName());
+                                    Slog.i(TAG, permName + " is newly added for " + friendlyName);
                                 }
                                 break;
                             }
@@ -2671,7 +2670,7 @@
 //                if (/*pkg.isInstantApp()*/ false && !bp.isInstant()) {
 //                    if (DEBUG_PERMISSIONS) {
 //                        Log.i(TAG, "Denying non-ephemeral permission " + bp.getName()
-//                                + " for package " + pkg.getPackageName());
+//                                + " for package " + friendlyName);
 //                    }
 //                    continue;
 //                }
@@ -2679,7 +2678,7 @@
                 if (bp.isRuntimeOnly() && !appSupportsRuntimePermissions) {
                     if (DEBUG_PERMISSIONS) {
                         Log.i(TAG, "Denying runtime-only permission " + bp.getName()
-                                + " for package " + pkg.getPackageName());
+                                + " for package " + friendlyName);
                     }
                     continue;
                 }
@@ -2716,7 +2715,7 @@
 
                 if (DEBUG_PERMISSIONS) {
                     Slog.i(TAG, "Considering granting permission " + perm + " to package "
-                            + pkg.getPackageName());
+                            + friendlyName);
                 }
 
                 if (grant != GRANT_DENIED) {
@@ -2740,7 +2739,7 @@
                             // a runtime permission being downgraded to an install one.
                             // Also in permission review mode we keep dangerous permissions
                             // for legacy apps
-                            for (int userId : UserManagerService.getInstance().getUserIds()) {
+                            for (int userId : userIds) {
                                 if (origPermissions.getRuntimePermissionState(
                                         perm, userId) != null) {
                                     // Revoke the runtime permission and clear the flags.
@@ -2763,7 +2762,7 @@
                             boolean hardRestricted = bp.isHardRestricted();
                             boolean softRestricted = bp.isSoftRestricted();
 
-                            for (int userId : currentUserIds) {
+                            for (int userId : userIds) {
                                 // If permission policy is not ready we don't deal with restricted
                                 // permissions as the policy may whitelist some permissions. Once
                                 // the policy is initialized we would re-evaluate permissions.
@@ -2902,7 +2901,7 @@
                             boolean hardRestricted = bp.isHardRestricted();
                             boolean softRestricted = bp.isSoftRestricted();
 
-                            for (int userId : currentUserIds) {
+                            for (int userId : userIds) {
                                 // If permission policy is not ready we don't deal with restricted
                                 // permissions as the policy may whitelist some permissions. Once
                                 // the policy is initialized we would re-evaluate permissions.
@@ -3005,7 +3004,7 @@
                                     || packageOfInterest.equals(pkg.getPackageName())) {
                                 if (DEBUG_PERMISSIONS) {
                                     Slog.i(TAG, "Not granting permission " + perm
-                                            + " to package " + pkg.getPackageName()
+                                            + " to package " + friendlyName
                                             + " because it was previously installed without");
                                 }
                             }
@@ -3020,7 +3019,7 @@
                         changedInstallPermission = true;
                         if (DEBUG_PERMISSIONS) {
                             Slog.i(TAG, "Un-granting permission " + perm
-                                    + " from package " + pkg.getPackageName()
+                                    + " from package " + friendlyName
                                     + " (protectionLevel=" + bp.getProtectionLevel()
                                     + " flags=0x"
                                     + Integer.toHexString(PackageInfoUtils.appInfoFlags(pkg, ps))
@@ -3033,7 +3032,7 @@
                                 && (packageOfInterest == null
                                         || packageOfInterest.equals(pkg.getPackageName()))) {
                             Slog.i(TAG, "Not granting permission " + perm
-                                    + " to package " + pkg.getPackageName()
+                                    + " to package " + friendlyName
                                     + " (protectionLevel=" + bp.getProtectionLevel()
                                     + " flags=0x"
                                     + Integer.toHexString(PackageInfoUtils.appInfoFlags(pkg, ps))
@@ -3071,6 +3070,15 @@
     }
 
     /**
+     * Returns all relevant user ids.  This list include the current set of created user ids as well
+     * as pre-created user ids.
+     * @return user ids for created users and pre-created users
+     */
+    private int[] getAllUserIds() {
+        return UserManagerService.getInstance().getUserIdsIncludingPreCreated();
+    }
+
+    /**
      * Revoke permissions that are not implicit anymore and that have
      * {@link PackageManager#FLAG_PERMISSION_REVOKE_WHEN_REQUESTED} set.
      *
@@ -3088,7 +3096,7 @@
         boolean supportsRuntimePermissions = pkg.getTargetSdkVersion()
                 >= Build.VERSION_CODES.M;
 
-        int[] users = UserManagerService.getInstance().getUserIds();
+        int[] users = getAllUserIds();
         int numUsers = users.length;
         for (int i = 0; i < numUsers; i++) {
             int userId = users[i];
@@ -3197,7 +3205,7 @@
         if (replace && pkg.isRequestLegacyExternalStorage() && (
                 pkg.getRequestedPermissions().contains(READ_EXTERNAL_STORAGE)
                         || pkg.getRequestedPermissions().contains(WRITE_EXTERNAL_STORAGE))) {
-            return UserManagerService.getInstance().getUserIds();
+            return getAllUserIds();
         }
 
         return updatedUserIds;
@@ -3251,7 +3259,7 @@
                 if (!ps.hasInstallPermission(newPerm)) {
                     BasePermission bp = mSettings.getPermissionLocked(newPerm);
 
-                    int[] users = UserManagerService.getInstance().getUserIds();
+                    int[] users = getAllUserIds();
                     int numUsers = users.length;
                     for (int userNum = 0; userNum < numUsers; userNum++) {
                         int userId = users[userNum];
@@ -4224,6 +4232,20 @@
                                     revokePermissionFromPackageForUser(p.getPackageName(),
                                             bp.getName(), true, userId, callback));
                         }
+                    } else {
+                        mPackageManagerInt.forEachPackage(p -> {
+                            PackageSetting ps = mPackageManagerInt.getPackageSetting(
+                                    p.getPackageName());
+                            if (ps == null) {
+                                return;
+                            }
+                            PermissionsState permissionsState = ps.getPermissionsState();
+                            if (permissionsState.getInstallPermissionState(bp.getName()) != null) {
+                                permissionsState.revokeInstallPermission(bp);
+                                permissionsState.updatePermissionFlags(bp, UserHandle.USER_ALL,
+                                        MASK_PERMISSION_FLAGS_ALL, 0);
+                            }
+                        });
                     }
                     it.remove();
                 }
diff --git a/services/core/java/com/android/server/policy/OWNERS b/services/core/java/com/android/server/policy/OWNERS
new file mode 100644
index 0000000..d25ec4a
--- /dev/null
+++ b/services/core/java/com/android/server/policy/OWNERS
@@ -0,0 +1,2 @@
+include /services/core/java/com/android/server/wm/OWNERS
+include /services/core/java/com/android/server/input/OWNERS
diff --git a/services/core/java/com/android/server/policy/PermissionPolicyService.java b/services/core/java/com/android/server/policy/PermissionPolicyService.java
index 37f088b..9dd9236 100644
--- a/services/core/java/com/android/server/policy/PermissionPolicyService.java
+++ b/services/core/java/com/android/server/policy/PermissionPolicyService.java
@@ -88,7 +88,7 @@
 public final class PermissionPolicyService extends SystemService {
     private static final String LOG_TAG = PermissionPolicyService.class.getSimpleName();
     private static final boolean DEBUG = false;
-    private static final long USER_SENSITIVE_UPDATE_DELAY_MS = 10000;
+    private static final long USER_SENSITIVE_UPDATE_DELAY_MS = 60000;
 
     private final Object mLock = new Object();
 
@@ -282,6 +282,11 @@
                 manager.updateUserSensitiveForApp(uid);
             }
         }, UserHandle.ALL, intentFilter, null, null);
+
+        PermissionControllerManager manager = new PermissionControllerManager(
+                getUserContext(getContext(), Process.myUserHandle()), FgThread.getHandler());
+        FgThread.getHandler().postDelayed(manager::updateUserSensitive,
+                USER_SENSITIVE_UPDATE_DELAY_MS);
     }
 
     /**
@@ -420,8 +425,7 @@
                 throw new IllegalStateException(e);
             }
 
-            FgThread.getHandler().postDelayed(permissionControllerManager::updateUserSensitive,
-                    USER_SENSITIVE_UPDATE_DELAY_MS);
+            permissionControllerManager.updateUserSensitive();
 
             packageManagerInternal.updateRuntimePermissionsFingerprint(userId);
         }
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index a4ed4e3..3c42e93 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -69,6 +69,7 @@
 import static android.view.WindowManagerGlobal.ADD_OKAY;
 import static android.view.WindowManagerGlobal.ADD_PERMISSION_DENIED;
 
+import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.SCREENSHOT_KEYCHORD_DELAY;
 import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_COVERED;
 import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_COVER_ABSENT;
 import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_UNCOVERED;
@@ -148,6 +149,7 @@
 import android.os.UserHandle;
 import android.os.VibrationEffect;
 import android.os.Vibrator;
+import android.provider.DeviceConfig;
 import android.provider.MediaStore;
 import android.provider.Settings;
 import android.service.dreams.DreamManagerInternal;
@@ -209,7 +211,6 @@
 import com.android.server.statusbar.StatusBarManagerInternal;
 import com.android.server.vr.VrManagerInternal;
 import com.android.server.wm.ActivityTaskManagerInternal;
-import com.android.server.wm.ActivityTaskManagerInternal.SleepToken;
 import com.android.server.wm.AppTransition;
 import com.android.server.wm.DisplayPolicy;
 import com.android.server.wm.DisplayRotation;
@@ -491,7 +492,7 @@
     private boolean mPendingKeyguardOccluded;
     private boolean mKeyguardOccludedChanged;
 
-    SleepToken mScreenOffSleepToken;
+    private ActivityTaskManagerInternal.SleepTokenAcquirer mScreenOffSleepTokenAcquirer;
     volatile boolean mKeyguardOccluded;
     Intent mHomeIntent;
     Intent mCarDockIntent;
@@ -1380,12 +1381,14 @@
     }
 
     private long getScreenshotChordLongPressDelay() {
+        long delayMs = DeviceConfig.getLong(
+                DeviceConfig.NAMESPACE_SYSTEMUI, SCREENSHOT_KEYCHORD_DELAY,
+                ViewConfiguration.get(mContext).getScreenshotChordKeyTimeout());
         if (mKeyguardDelegate.isShowing()) {
             // Double the time it takes to take a screenshot from the keyguard
-            return (long) (KEYGUARD_SCREENSHOT_CHORD_DELAY_MULTIPLIER *
-                    ViewConfiguration.get(mContext).getScreenshotChordKeyTimeout());
+            return (long) (KEYGUARD_SCREENSHOT_CHORD_DELAY_MULTIPLIER * delayMs);
         }
-        return ViewConfiguration.get(mContext).getScreenshotChordKeyTimeout();
+        return delayMs;
     }
 
     private long getRingerToggleChordDelay() {
@@ -1744,6 +1747,9 @@
                 new AccessibilityShortcutController(mContext, new Handler(), mCurrentUserId);
         mLogger = new MetricsLogger();
 
+        mScreenOffSleepTokenAcquirer = mActivityTaskManagerInternal
+                .createSleepTokenAcquirer("ScreenOff");
+
         Resources res = mContext.getResources();
         mWakeOnDpadKeyPress =
                 res.getBoolean(com.android.internal.R.bool.config_wakeOnDpadKeyPress);
@@ -4991,15 +4997,9 @@
     // TODO (multidisplay): Support multiple displays in WindowManagerPolicy.
     private void updateScreenOffSleepToken(boolean acquire) {
         if (acquire) {
-            if (mScreenOffSleepToken == null) {
-                mScreenOffSleepToken = mActivityTaskManagerInternal.acquireSleepToken(
-                        "ScreenOff", DEFAULT_DISPLAY);
-            }
+            mScreenOffSleepTokenAcquirer.acquire(DEFAULT_DISPLAY);
         } else {
-            if (mScreenOffSleepToken != null) {
-                mScreenOffSleepToken.release();
-                mScreenOffSleepToken = null;
-            }
+            mScreenOffSleepTokenAcquirer.release(DEFAULT_DISPLAY);
         }
     }
 
diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
index b3e162d..b9431a6 100644
--- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java
+++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
@@ -141,6 +141,10 @@
     @IntDef({NAV_BAR_LEFT, NAV_BAR_RIGHT, NAV_BAR_BOTTOM})
     @interface NavigationBarPosition {}
 
+    @Retention(SOURCE)
+    @IntDef({ALT_BAR_UNKNOWN, ALT_BAR_LEFT, ALT_BAR_RIGHT, ALT_BAR_BOTTOM, ALT_BAR_TOP})
+    @interface AltBarPosition {}
+
     /**
      * Pass this event to the user / app.  To be returned from
      * {@link #interceptKeyBeforeQueueing}.
diff --git a/services/core/java/com/android/server/powerstats/OWNERS b/services/core/java/com/android/server/powerstats/OWNERS
new file mode 100644
index 0000000..d68066b
--- /dev/null
+++ b/services/core/java/com/android/server/powerstats/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/power/OWNERS
diff --git a/services/core/java/com/android/server/rollback/OWNERS b/services/core/java/com/android/server/rollback/OWNERS
new file mode 100644
index 0000000..7feb85f
--- /dev/null
+++ b/services/core/java/com/android/server/rollback/OWNERS
@@ -0,0 +1 @@
+olilan@google.com
diff --git a/services/core/java/com/android/server/slice/OWNERS b/services/core/java/com/android/server/slice/OWNERS
new file mode 100644
index 0000000..3d0859f
--- /dev/null
+++ b/services/core/java/com/android/server/slice/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/app/slice/OWNERS
diff --git a/services/core/java/com/android/server/statusbar/OWNERS b/services/core/java/com/android/server/statusbar/OWNERS
new file mode 100644
index 0000000..2e96c97
--- /dev/null
+++ b/services/core/java/com/android/server/statusbar/OWNERS
@@ -0,0 +1 @@
+include /packages/SystemUI/OWNERS
diff --git a/services/core/java/com/android/server/storage/OWNERS b/services/core/java/com/android/server/storage/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/services/core/java/com/android/server/storage/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/services/core/java/com/android/server/storage/StorageSessionController.java b/services/core/java/com/android/server/storage/StorageSessionController.java
index 37df548..0d059ae 100644
--- a/services/core/java/com/android/server/storage/StorageSessionController.java
+++ b/services/core/java/com/android/server/storage/StorageSessionController.java
@@ -338,11 +338,12 @@
     }
 
     /**
-     * Returns {@code true} if {@code vol} is an emulated or public volume,
+     * Returns {@code true} if {@code vol} is an emulated or visible public volume,
      * {@code false} otherwise
      **/
     public static boolean isEmulatedOrPublic(VolumeInfo vol) {
-        return vol.type == VolumeInfo.TYPE_EMULATED || vol.type == VolumeInfo.TYPE_PUBLIC;
+        return vol.type == VolumeInfo.TYPE_EMULATED
+                || (vol.type == VolumeInfo.TYPE_PUBLIC && vol.isVisible());
     }
 
     /** Exception thrown when communication with the {@link ExternalStorageService} fails. */
diff --git a/services/core/java/com/android/server/textclassifier/OWNERS b/services/core/java/com/android/server/textclassifier/OWNERS
new file mode 100644
index 0000000..46b3cb8
--- /dev/null
+++ b/services/core/java/com/android/server/textclassifier/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/textclassifier/OWNERS
diff --git a/services/core/java/com/android/server/timedetector/OWNERS b/services/core/java/com/android/server/timedetector/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/services/core/java/com/android/server/timedetector/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorService.java b/services/core/java/com/android/server/timedetector/TimeDetectorService.java
index ed6424c..84776ea 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorService.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorService.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.app.timedetector.GnssTimeSuggestion;
 import android.app.timedetector.ITimeDetectorService;
 import android.app.timedetector.ManualTimeSuggestion;
 import android.app.timedetector.NetworkTimeSuggestion;
@@ -25,6 +26,7 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.database.ContentObserver;
+import android.os.Binder;
 import android.os.Handler;
 import android.provider.Settings;
 
@@ -64,9 +66,8 @@
     @NonNull private final TimeDetectorStrategy mTimeDetectorStrategy;
 
     private static TimeDetectorService create(@NonNull Context context) {
-        TimeDetectorStrategy timeDetectorStrategy = new TimeDetectorStrategyImpl();
-        TimeDetectorStrategyCallbackImpl callback = new TimeDetectorStrategyCallbackImpl(context);
-        timeDetectorStrategy.initialize(callback);
+        TimeDetectorStrategyImpl.Callback callback = new TimeDetectorStrategyCallbackImpl(context);
+        TimeDetectorStrategy timeDetectorStrategy = new TimeDetectorStrategyImpl(callback);
 
         Handler handler = FgThread.getHandler();
         TimeDetectorService timeDetectorService =
@@ -102,11 +103,16 @@
     }
 
     @Override
-    public void suggestManualTime(@NonNull ManualTimeSuggestion timeSignal) {
+    public boolean suggestManualTime(@NonNull ManualTimeSuggestion timeSignal) {
         enforceSuggestManualTimePermission();
         Objects.requireNonNull(timeSignal);
 
-        mHandler.post(() -> mTimeDetectorStrategy.suggestManualTime(timeSignal));
+        long token = Binder.clearCallingIdentity();
+        try {
+            return mTimeDetectorStrategy.suggestManualTime(timeSignal);
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
     }
 
     @Override
@@ -117,10 +123,18 @@
         mHandler.post(() -> mTimeDetectorStrategy.suggestNetworkTime(timeSignal));
     }
 
+    @Override
+    public void suggestGnssTime(@NonNull GnssTimeSuggestion timeSignal) {
+        enforceSuggestGnssTimePermission();
+        Objects.requireNonNull(timeSignal);
+
+        mHandler.post(() -> mTimeDetectorStrategy.suggestGnssTime(timeSignal));
+    }
+
     /** Internal method for handling the auto time setting being changed. */
     @VisibleForTesting
     public void handleAutoTimeDetectionChanged() {
-        mHandler.post(mTimeDetectorStrategy::handleAutoTimeDetectionChanged);
+        mHandler.post(mTimeDetectorStrategy::handleAutoTimeConfigChanged);
     }
 
     @Override
@@ -148,4 +162,10 @@
                 android.Manifest.permission.SET_TIME,
                 "set time");
     }
+
+    private void enforceSuggestGnssTimePermission() {
+        mContext.enforceCallingOrSelfPermission(
+                android.Manifest.permission.SET_TIME,
+                "suggest gnss time");
+    }
 }
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
index a5fba4e..de6412c 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
@@ -16,14 +16,18 @@
 
 package com.android.server.timedetector;
 
+import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.app.timedetector.GnssTimeSuggestion;
 import android.app.timedetector.ManualTimeSuggestion;
 import android.app.timedetector.NetworkTimeSuggestion;
 import android.app.timedetector.TelephonyTimeSuggestion;
 import android.os.TimestampedValue;
 
 import java.io.PrintWriter;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 
 /**
  * The interface for the class that implements the time detection algorithm used by the
@@ -37,57 +41,48 @@
  */
 public interface TimeDetectorStrategy {
 
-    /**
-     * The interface used by the strategy to interact with the surrounding service.
-     *
-     * <p>Note: Because the system properties-derived value {@link #isAutoTimeDetectionEnabled()}
-     * can be modified independently and from different threads (and processes!). its use is prone
-     * to race conditions. That will be true until the responsibility for setting their values is
-     * moved to {@link TimeDetectorStrategy}. There are similar issues with
-     * {@link #systemClockMillis()} while any process can modify the system clock.
-     */
-    interface Callback {
+    @IntDef({ ORIGIN_TELEPHONY, ORIGIN_MANUAL, ORIGIN_NETWORK, ORIGIN_GNSS })
+    @Retention(RetentionPolicy.SOURCE)
+    @interface Origin {}
 
-        /**
-         * The absolute threshold below which the system clock need not be updated. i.e. if setting
-         * the system clock would adjust it by less than this (either backwards or forwards) then it
-         * need not be set.
-         */
-        int systemClockUpdateThresholdMillis();
+    /** Used when a time value originated from a telephony signal. */
+    @Origin
+    int ORIGIN_TELEPHONY = 1;
 
-        /** Returns true if automatic time detection is enabled. */
-        boolean isAutoTimeDetectionEnabled();
+    /** Used when a time value originated from a user / manual settings. */
+    @Origin
+    int ORIGIN_MANUAL = 2;
 
-        /** Acquire a suitable wake lock. Must be followed by {@link #releaseWakeLock()} */
-        void acquireWakeLock();
+    /** Used when a time value originated from a network signal. */
+    @Origin
+    int ORIGIN_NETWORK = 3;
 
-        /** Returns the elapsedRealtimeMillis clock value. */
-        long elapsedRealtimeMillis();
+    /** Used when a time value originated from a gnss signal. */
+    @Origin
+    int ORIGIN_GNSS = 4;
 
-        /** Returns the system clock value. */
-        long systemClockMillis();
-
-        /** Sets the device system clock. The WakeLock must be held. */
-        void setSystemClock(long newTimeMillis);
-
-        /** Release the wake lock acquired by a call to {@link #acquireWakeLock()}. */
-        void releaseWakeLock();
-    }
-
-    /** Initialize the strategy. */
-    void initialize(@NonNull Callback callback);
-
-    /** Process the suggested time from telephony sources. */
+    /** Processes the suggested time from telephony sources. */
     void suggestTelephonyTime(@NonNull TelephonyTimeSuggestion timeSuggestion);
 
-    /** Process the suggested manually entered time. */
-    void suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion);
+    /**
+     * Processes the suggested manually entered time. Returns {@code false} if the suggestion was
+     * invalid, or the device configuration prevented the suggestion being used, {@code true} if the
+     * suggestion was accepted. A suggestion that is valid but does not change the time because it
+     * matches the current device time is considered accepted.
+     */
+    boolean suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion);
 
-    /** Process the suggested time from network sources. */
+    /** Processes the suggested time from network sources. */
     void suggestNetworkTime(@NonNull NetworkTimeSuggestion timeSuggestion);
 
-    /** Handle the auto-time setting being toggled on or off. */
-    void handleAutoTimeDetectionChanged();
+    /** Processes the suggested time from gnss sources. */
+    void suggestGnssTime(@NonNull GnssTimeSuggestion timeSuggestion);
+
+    /**
+     * Handles the auto-time configuration changing For example, when the auto-time setting is
+     * toggled on or off.
+     */
+    void handleAutoTimeConfigChanged();
 
     /** Dump debug information. */
     void dump(@NonNull PrintWriter pw, @Nullable String[] args);
@@ -102,4 +97,42 @@
         return (referenceClockMillisNow - timeValue.getReferenceTimeMillis())
                 + timeValue.getValue();
     }
+
+    /**
+     * Converts one of the {@code ORIGIN_} constants to a human readable string suitable for config
+     * and debug usage. Throws an {@link IllegalArgumentException} if the value is unrecognized.
+     */
+    static String originToString(@Origin int origin) {
+        switch (origin) {
+            case ORIGIN_MANUAL:
+                return "manual";
+            case ORIGIN_NETWORK:
+                return "network";
+            case ORIGIN_TELEPHONY:
+                return "telephony";
+            case ORIGIN_GNSS:
+                return "gnss";
+            default:
+                throw new IllegalArgumentException("origin=" + origin);
+        }
+    }
+
+    /**
+     * Converts a human readable config string to one of the {@code ORIGIN_} constants.
+     * Throws an {@link IllegalArgumentException} if the value is unrecognized.
+     */
+    static @Origin int stringToOrigin(String originString) {
+        switch (originString) {
+            case "manual":
+                return ORIGIN_MANUAL;
+            case "network":
+                return ORIGIN_NETWORK;
+            case "telephony":
+                return ORIGIN_TELEPHONY;
+            case "gnss":
+                return ORIGIN_GNSS;
+            default:
+                throw new IllegalArgumentException("originString=" + originString);
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
index 19484db..4f3f9dc 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
@@ -16,28 +16,52 @@
 
 package com.android.server.timedetector;
 
+import static com.android.server.timedetector.TimeDetectorStrategy.ORIGIN_NETWORK;
+import static com.android.server.timedetector.TimeDetectorStrategy.ORIGIN_TELEPHONY;
+import static com.android.server.timedetector.TimeDetectorStrategy.stringToOrigin;
+
 import android.annotation.NonNull;
 import android.app.AlarmManager;
 import android.content.ContentResolver;
 import android.content.Context;
+import android.os.Build;
+import android.os.Environment;
 import android.os.PowerManager;
 import android.os.SystemClock;
 import android.os.SystemProperties;
 import android.provider.Settings;
 import android.util.Slog;
 
+import com.android.internal.R;
+import com.android.server.timedetector.TimeDetectorStrategy.Origin;
+
+import java.time.Instant;
 import java.util.Objects;
 
 /**
- * The real implementation of {@link TimeDetectorStrategy.Callback} used on device.
+ * The real implementation of {@link TimeDetectorStrategyImpl.Callback} used on device.
  */
-public final class TimeDetectorStrategyCallbackImpl implements TimeDetectorStrategy.Callback {
+public final class TimeDetectorStrategyCallbackImpl implements TimeDetectorStrategyImpl.Callback {
 
     private final static String TAG = "timedetector.TimeDetectorStrategyCallbackImpl";
 
     private static final int SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT = 2 * 1000;
 
     /**
+     * Time in the past. If automatic time suggestion is before this point, it's
+     * incorrect for sure.
+     */
+    private static final Instant TIME_LOWER_BOUND = Instant.ofEpochMilli(
+            Long.max(Environment.getRootDirectory().lastModified(), Build.TIME));
+
+    /**
+     * By default telephony and network only suggestions are accepted and telephony takes
+     * precedence over network.
+     */
+    private static final @Origin int[] DEFAULT_AUTOMATIC_TIME_ORIGIN_PRIORITIES =
+            { ORIGIN_TELEPHONY, ORIGIN_NETWORK };
+
+    /**
      * If a newly calculated system clock time and the current system clock time differs by this or
      * more the system clock will actually be updated. Used to prevent the system clock being set
      * for only minor differences.
@@ -48,6 +72,7 @@
     @NonNull private final ContentResolver mContentResolver;
     @NonNull private final PowerManager.WakeLock mWakeLock;
     @NonNull private final AlarmManager mAlarmManager;
+    @NonNull private final int[] mOriginPriorities;
 
     public TimeDetectorStrategyCallbackImpl(@NonNull Context context) {
         mContext = Objects.requireNonNull(context);
@@ -62,6 +87,8 @@
         mSystemClockUpdateThresholdMillis =
                 SystemProperties.getInt("ro.sys.time_detector_update_diff",
                         SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT);
+
+        mOriginPriorities = getOriginPriorities(context);
     }
 
     @Override
@@ -79,6 +106,16 @@
     }
 
     @Override
+    public Instant autoTimeLowerBound() {
+        return TIME_LOWER_BOUND;
+    }
+
+    @Override
+    public int[] autoOriginPriorities() {
+        return mOriginPriorities;
+    }
+
+    @Override
     public void acquireWakeLock() {
         if (mWakeLock.isHeld()) {
             Slog.wtf(TAG, "WakeLock " + mWakeLock + " already held");
@@ -113,4 +150,20 @@
             Slog.wtf(TAG, "WakeLock " + mWakeLock + " not held");
         }
     }
+
+    private static int[] getOriginPriorities(@NonNull Context context) {
+        String[] originStrings =
+                context.getResources().getStringArray(R.array.config_autoTimeSourcesPriority);
+        if (originStrings.length == 0) {
+            return DEFAULT_AUTOMATIC_TIME_ORIGIN_PRIORITIES;
+        } else {
+            int[] origins = new int[originStrings.length];
+            for (int i = 0; i < originStrings.length; i++) {
+                int origin = stringToOrigin(originStrings[i]);
+                origins[i] = origin;
+            }
+
+            return origins;
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
index 88de340..6fe3782 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
@@ -16,10 +16,14 @@
 
 package com.android.server.timedetector;
 
-import android.annotation.IntDef;
+import static com.android.server.timedetector.TimeDetectorStrategy.originToString;
+
+import static java.util.stream.Collectors.joining;
+
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.AlarmManager;
+import android.app.timedetector.GnssTimeSuggestion;
 import android.app.timedetector.ManualTimeSuggestion;
 import android.app.timedetector.NetworkTimeSuggestion;
 import android.app.timedetector.TelephonyTimeSuggestion;
@@ -34,8 +38,8 @@
 import com.android.server.timezonedetector.ReferenceWithHistory;
 
 import java.io.PrintWriter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
+import java.time.Instant;
+import java.util.Arrays;
 
 /**
  * An implementation of {@link TimeDetectorStrategy} that passes telephony and manual suggestions to
@@ -63,22 +67,6 @@
     static final long MAX_UTC_TIME_AGE_MILLIS =
             TELEPHONY_BUCKET_COUNT * TELEPHONY_BUCKET_SIZE_MILLIS;
 
-    @IntDef({ ORIGIN_TELEPHONY, ORIGIN_MANUAL, ORIGIN_NETWORK })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface Origin {}
-
-    /** Used when a time value originated from a telephony signal. */
-    @Origin
-    private static final int ORIGIN_TELEPHONY = 1;
-
-    /** Used when a time value originated from a user / manual settings. */
-    @Origin
-    private static final int ORIGIN_MANUAL = 2;
-
-    /** Used when a time value originated from a network signal. */
-    @Origin
-    private static final int ORIGIN_NETWORK = 3;
-
     /**
      * CLOCK_PARANOIA: The maximum difference allowed between the expected system clock time and the
      * actual system clock time before a warning is logged. Used to help identify situations where
@@ -99,8 +87,8 @@
     @NonNull
     private final LocalLog mTimeChangesLog = new LocalLog(30, false /* useLocalTimestamps */);
 
-    // @NonNull after initialize()
-    private Callback mCallback;
+    @NonNull
+    private final Callback mCallback;
 
     // Used to store the last time the system clock state was set automatically. It is used to
     // detect (and log) issues with the realtime clock or whether the clock is being set without
@@ -122,26 +110,95 @@
     private final ReferenceWithHistory<NetworkTimeSuggestion> mLastNetworkSuggestion =
             new ReferenceWithHistory<>(KEEP_SUGGESTION_HISTORY_SIZE);
 
-    @Override
-    public void initialize(@NonNull Callback callback) {
+    @GuardedBy("this")
+    private final ReferenceWithHistory<GnssTimeSuggestion> mLastGnssSuggestion =
+            new ReferenceWithHistory<>(KEEP_SUGGESTION_HISTORY_SIZE);
+
+    /**
+     * The interface used by the strategy to interact with the surrounding service.
+     *
+     * <p>Note: Because the system properties-derived value {@link #isAutoTimeDetectionEnabled()}
+     * can be modified independently and from different threads (and processes!), its use is prone
+     * to race conditions. That will be true until the responsibility for setting their values is
+     * moved to {@link TimeDetectorStrategy}. There are similar issues with
+     * {@link #systemClockMillis()} while any process can modify the system clock.
+     */
+    public interface Callback {
+
+        /**
+         * The absolute threshold below which the system clock need not be updated. i.e. if setting
+         * the system clock would adjust it by less than this (either backwards or forwards) then it
+         * need not be set.
+         */
+        int systemClockUpdateThresholdMillis();
+
+        /** Returns true if automatic time detection is enabled. */
+        boolean isAutoTimeDetectionEnabled();
+
+        /**
+         * Returns a lower bound for valid automatic times. It is guaranteed to be in the past,
+         * i.e. it is unrelated to the current system clock time.
+         * It holds no other meaning; it could be related to when the device system image was built,
+         * or could be updated by a mainline module.
+         */
+        @NonNull
+        Instant autoTimeLowerBound();
+
+        /**
+         * Returns the order to look at time suggestions when automatically detecting time.
+         * See {@code #ORIGIN_} constants
+         */
+        @Origin int[] autoOriginPriorities();
+
+        /** Acquire a suitable wake lock. Must be followed by {@link #releaseWakeLock()} */
+        void acquireWakeLock();
+
+        /** Returns the elapsedRealtimeMillis clock value. */
+        long elapsedRealtimeMillis();
+
+        /** Returns the system clock value. */
+        long systemClockMillis();
+
+        /** Sets the device system clock. The WakeLock must be held. */
+        void setSystemClock(long newTimeMillis);
+
+        /** Release the wake lock acquired by a call to {@link #acquireWakeLock()}. */
+        void releaseWakeLock();
+    }
+
+    TimeDetectorStrategyImpl(@NonNull Callback callback) {
         mCallback = callback;
     }
 
     @Override
-    public synchronized void suggestManualTime(@NonNull ManualTimeSuggestion suggestion) {
-        final TimestampedValue<Long> newUtcTime = suggestion.getUtcTime();
+    public synchronized void suggestGnssTime(@NonNull GnssTimeSuggestion timeSuggestion) {
+        final TimestampedValue<Long> newUtcTime = timeSuggestion.getUtcTime();
 
-        if (!validateSuggestionTime(newUtcTime, suggestion)) {
+        if (!validateAutoSuggestionTime(newUtcTime, timeSuggestion)) {
             return;
         }
 
+        mLastGnssSuggestion.set(timeSuggestion);
+
+        String reason = "GNSS time suggestion received: suggestion=" + timeSuggestion;
+        doAutoTimeDetection(reason);
+    }
+
+    @Override
+    public synchronized boolean suggestManualTime(@NonNull ManualTimeSuggestion suggestion) {
+        final TimestampedValue<Long> newUtcTime = suggestion.getUtcTime();
+
+        if (!validateSuggestionTime(newUtcTime, suggestion)) {
+            return false;
+        }
+
         String cause = "Manual time suggestion received: suggestion=" + suggestion;
-        setSystemClockIfRequired(ORIGIN_MANUAL, newUtcTime, cause);
+        return setSystemClockIfRequired(ORIGIN_MANUAL, newUtcTime, cause);
     }
 
     @Override
     public synchronized void suggestNetworkTime(@NonNull NetworkTimeSuggestion timeSuggestion) {
-        if (!validateSuggestionTime(timeSuggestion.getUtcTime(), timeSuggestion)) {
+        if (!validateAutoSuggestionTime(timeSuggestion.getUtcTime(), timeSuggestion)) {
             return;
         }
 
@@ -175,9 +232,12 @@
             return;
         }
 
-        // Perform validation / input filtering and record the validated suggestion against the
-        // slotIndex.
-        if (!validateAndStoreTelephonySuggestion(timeSuggestion)) {
+        if (!validateAutoSuggestionTime(timeSuggestion.getUtcTime(), timeSuggestion)) {
+            return;
+        }
+
+        // Perform input filtering and record the validated suggestion against the slotIndex.
+        if (!storeTelephonySuggestion(timeSuggestion)) {
             return;
         }
 
@@ -188,12 +248,12 @@
     }
 
     @Override
-    public synchronized void handleAutoTimeDetectionChanged() {
+    public synchronized void handleAutoTimeConfigChanged() {
         boolean enabled = mCallback.isAutoTimeDetectionEnabled();
         // When automatic time detection is enabled we update the system clock instantly if we can.
         // Conversely, when automatic time detection is disabled we leave the clock as it is.
         if (enabled) {
-            String reason = "Auto time zone detection setting enabled.";
+            String reason = "Auto time zone detection config changed.";
             doAutoTimeDetection(reason);
         } else {
             // CLOCK_PARANOIA: We are losing "control" of the system clock so we cannot predict what
@@ -215,6 +275,14 @@
         ipw.println("mCallback.systemClockMillis()=" + mCallback.systemClockMillis());
         ipw.println("mCallback.systemClockUpdateThresholdMillis()="
                 + mCallback.systemClockUpdateThresholdMillis());
+        ipw.printf("mCallback.autoTimeLowerBound()=%s(%s)\n",
+                mCallback.autoTimeLowerBound(),
+                mCallback.autoTimeLowerBound().toEpochMilli());
+        String priorities =
+                Arrays.stream(mCallback.autoOriginPriorities())
+                        .mapToObj(TimeDetectorStrategy::originToString)
+                        .collect(joining(",", "[", "]"));
+        ipw.println("mCallback.autoOriginPriorities()=" + priorities);
 
         ipw.println("Time change log:");
         ipw.increaseIndent(); // level 2
@@ -231,19 +299,19 @@
         mLastNetworkSuggestion.dump(ipw);
         ipw.decreaseIndent(); // level 2
 
+        ipw.println("Gnss suggestion history:");
+        ipw.increaseIndent(); // level 2
+        mLastGnssSuggestion.dump(ipw);
+        ipw.decreaseIndent(); // level 2
+
         ipw.decreaseIndent(); // level 1
         ipw.flush();
     }
 
     @GuardedBy("this")
-    private boolean validateAndStoreTelephonySuggestion(
+    private boolean storeTelephonySuggestion(
             @NonNull TelephonyTimeSuggestion suggestion) {
         TimestampedValue<Long> newUtcTime = suggestion.getUtcTime();
-        if (!validateSuggestionTime(newUtcTime, suggestion)) {
-            // There's probably nothing useful we can do: elsewhere we assume that reference
-            // times are in the past so just stop here.
-            return false;
-        }
 
         int slotIndex = suggestion.getSlotIndex();
         TelephonyTimeSuggestion previousSuggestion = mSuggestionBySlotIndex.get(slotIndex);
@@ -294,6 +362,26 @@
         return true;
     }
 
+    private boolean validateAutoSuggestionTime(
+            @NonNull TimestampedValue<Long> newUtcTime, @NonNull Object suggestion)  {
+        return validateSuggestionTime(newUtcTime, suggestion)
+                && validateSuggestionAgainstLowerBound(newUtcTime, suggestion);
+    }
+
+    private boolean validateSuggestionAgainstLowerBound(
+            @NonNull TimestampedValue<Long> newUtcTime, @NonNull Object suggestion) {
+        Instant lowerBound = mCallback.autoTimeLowerBound();
+
+        // Suggestion is definitely wrong if it comes before lower time bound.
+        if (lowerBound.isAfter(Instant.ofEpochMilli(newUtcTime.getValue()))) {
+            Slog.w(LOG_TAG, "Suggestion points to time before lower bound, skipping it. "
+                    + "suggestion=" + suggestion + ", lower bound=" + lowerBound);
+            return false;
+        }
+
+        return true;
+    }
+
     @GuardedBy("this")
     private void doAutoTimeDetection(@NonNull String detectionReason) {
         if (!mCallback.isAutoTimeDetectionEnabled()) {
@@ -301,33 +389,52 @@
             return;
         }
 
-        // Android devices currently prioritize any telephony over network signals. There are
-        // carrier compliance tests that would need to be changed before we could ignore NITZ or
-        // prefer NTP generally. This check is cheap on devices without telephony hardware.
-        TelephonyTimeSuggestion bestTelephonySuggestion = findBestTelephonySuggestion();
-        if (bestTelephonySuggestion != null) {
-            final TimestampedValue<Long> newUtcTime = bestTelephonySuggestion.getUtcTime();
-            String cause = "Found good telephony suggestion."
-                    + ", bestTelephonySuggestion=" + bestTelephonySuggestion
-                    + ", detectionReason=" + detectionReason;
-            setSystemClockIfRequired(ORIGIN_TELEPHONY, newUtcTime, cause);
-            return;
-        }
+        // Try the different origins one at a time.
+        int[] originPriorities = mCallback.autoOriginPriorities();
+        for (int origin : originPriorities) {
+            TimestampedValue<Long> newUtcTime = null;
+            String cause = null;
+            if (origin == ORIGIN_TELEPHONY) {
+                TelephonyTimeSuggestion bestTelephonySuggestion = findBestTelephonySuggestion();
+                if (bestTelephonySuggestion != null) {
+                    newUtcTime = bestTelephonySuggestion.getUtcTime();
+                    cause = "Found good telephony suggestion."
+                            + ", bestTelephonySuggestion=" + bestTelephonySuggestion
+                            + ", detectionReason=" + detectionReason;
+                }
+            } else if (origin == ORIGIN_NETWORK) {
+                NetworkTimeSuggestion networkSuggestion = findLatestValidNetworkSuggestion();
+                if (networkSuggestion != null) {
+                    newUtcTime = networkSuggestion.getUtcTime();
+                    cause = "Found good network suggestion."
+                            + ", networkSuggestion=" + networkSuggestion
+                            + ", detectionReason=" + detectionReason;
+                }
+            } else if (origin == ORIGIN_GNSS) {
+                GnssTimeSuggestion gnssTimeSuggestion = findLatestValidGnssSuggestion();
+                if (gnssTimeSuggestion != null) {
+                    newUtcTime = gnssTimeSuggestion.getUtcTime();
+                    cause = "Found good gnss suggestion."
+                            + ", gnssTimeSuggestion=" + gnssTimeSuggestion
+                            + ", detectionReason=" + detectionReason;
+                }
+            } else {
+                Slog.w(LOG_TAG, "Unknown or unsupported origin=" + origin
+                        + " in " + Arrays.toString(originPriorities)
+                        + ": Skipping");
+            }
 
-        // There is no good telephony suggestion, try network.
-        NetworkTimeSuggestion networkSuggestion = findLatestValidNetworkSuggestion();
-        if (networkSuggestion != null) {
-            final TimestampedValue<Long> newUtcTime = networkSuggestion.getUtcTime();
-            String cause = "Found good network suggestion."
-                    + ", networkSuggestion=" + networkSuggestion
-                    + ", detectionReason=" + detectionReason;
-            setSystemClockIfRequired(ORIGIN_NETWORK, newUtcTime, cause);
-            return;
+            // Update the system clock if a good suggestion has been found.
+            if (newUtcTime != null) {
+                setSystemClockIfRequired(origin, newUtcTime, cause);
+                return;
+            }
         }
 
         if (DBG) {
-            Slog.d(LOG_TAG, "Could not determine time: No best telephony or network suggestion."
-                    + " detectionReason=" + detectionReason);
+            Slog.d(LOG_TAG, "Could not determine time: No suggestion found in"
+                    + " originPriorities=" + Arrays.toString(originPriorities)
+                    + ", detectionReason=" + detectionReason);
         }
     }
 
@@ -412,7 +519,7 @@
         // Validate first.
         TimestampedValue<Long> utcTime = timeSuggestion.getUtcTime();
         if (!validateSuggestionUtcTime(elapsedRealtimeMillis, utcTime)) {
-            Slog.w(LOG_TAG, "Existing suggestion found to be invalid "
+            Slog.w(LOG_TAG, "Existing suggestion found to be invalid"
                     + " elapsedRealtimeMillis=" + elapsedRealtimeMillis
                     + ", timeSuggestion=" + timeSuggestion);
             return TELEPHONY_INVALID_SCORE;
@@ -452,8 +559,28 @@
         return networkSuggestion;
     }
 
+    /** Returns the latest, valid, gnss suggestion. Returns {@code null} if there isn't one. */
     @GuardedBy("this")
-    private void setSystemClockIfRequired(
+    @Nullable
+    private GnssTimeSuggestion findLatestValidGnssSuggestion() {
+        GnssTimeSuggestion gnssTimeSuggestion = mLastGnssSuggestion.get();
+        if (gnssTimeSuggestion == null) {
+            // No gnss suggestions received. This is normal if there's no gnss signal.
+            return null;
+        }
+
+        TimestampedValue<Long> utcTime = gnssTimeSuggestion.getUtcTime();
+        long elapsedRealTimeMillis = mCallback.elapsedRealtimeMillis();
+        if (!validateSuggestionUtcTime(elapsedRealTimeMillis, utcTime)) {
+            // The latest suggestion is not valid, usually due to its age.
+            return null;
+        }
+
+        return gnssTimeSuggestion;
+    }
+
+    @GuardedBy("this")
+    private boolean setSystemClockIfRequired(
             @Origin int origin, @NonNull TimestampedValue<Long> time, @NonNull String cause) {
 
         boolean isOriginAutomatic = isOriginAutomatic(origin);
@@ -461,27 +588,27 @@
             if (!mCallback.isAutoTimeDetectionEnabled()) {
                 if (DBG) {
                     Slog.d(LOG_TAG, "Auto time detection is not enabled."
-                            + " origin=" + origin
+                            + " origin=" + originToString(origin)
                             + ", time=" + time
                             + ", cause=" + cause);
                 }
-                return;
+                return false;
             }
         } else {
             if (mCallback.isAutoTimeDetectionEnabled()) {
                 if (DBG) {
                     Slog.d(LOG_TAG, "Auto time detection is enabled."
-                            + " origin=" + origin
+                            + " origin=" + originToString(origin)
                             + ", time=" + time
                             + ", cause=" + cause);
                 }
-                return;
+                return false;
             }
         }
 
         mCallback.acquireWakeLock();
         try {
-            setSystemClockUnderWakeLock(origin, time, cause);
+            return setSystemClockUnderWakeLock(origin, time, cause);
         } finally {
             mCallback.releaseWakeLock();
         }
@@ -492,8 +619,8 @@
     }
 
     @GuardedBy("this")
-    private void setSystemClockUnderWakeLock(
-            int origin, @NonNull TimestampedValue<Long> newTime, @NonNull Object cause) {
+    private boolean setSystemClockUnderWakeLock(
+            @Origin int origin, @NonNull TimestampedValue<Long> newTime, @NonNull String cause) {
 
         long elapsedRealtimeMillis = mCallback.elapsedRealtimeMillis();
         boolean isOriginAutomatic = isOriginAutomatic(origin);
@@ -536,7 +663,7 @@
                         + " systemClockUpdateThreshold=" + systemClockUpdateThreshold
                         + " absTimeDifference=" + absTimeDifference);
             }
-            return;
+            return true;
         }
 
         mCallback.setSystemClock(newSystemClockMillis);
@@ -556,6 +683,7 @@
         } else {
             mLastAutoSystemClockTimeSet = null;
         }
+        return true;
     }
 
     /**
@@ -579,6 +707,16 @@
     }
 
     /**
+     * Returns the latest valid gnss suggestion. Not intended for general use: it is used during
+     * tests to check strategy behavior.
+     */
+    @VisibleForTesting
+    @Nullable
+    public synchronized GnssTimeSuggestion findLatestValidGnssSuggestionForTests() {
+        return findLatestValidGnssSuggestion();
+    }
+
+    /**
      * A method used to inspect state during tests. Not intended for general use.
      */
     @VisibleForTesting
@@ -596,6 +734,15 @@
         return mLastNetworkSuggestion.get();
     }
 
+    /**
+     * A method used to inspect state during tests. Not intended for general use.
+     */
+    @VisibleForTesting
+    @Nullable
+    public synchronized GnssTimeSuggestion getLatestGnssSuggestion() {
+        return mLastGnssSuggestion.get();
+    }
+
     private static boolean validateSuggestionUtcTime(
             long elapsedRealtimeMillis, TimestampedValue<Long> utcTime) {
         long referenceTimeMillis = utcTime.getReferenceTimeMillis();
diff --git a/services/core/java/com/android/server/timezone/OWNERS b/services/core/java/com/android/server/timezone/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/services/core/java/com/android/server/timezone/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/services/core/java/com/android/server/timezonedetector/OWNERS b/services/core/java/com/android/server/timezonedetector/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/services/core/java/com/android/server/timezonedetector/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorService.java b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorService.java
index fc52584..0b85052 100644
--- a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorService.java
+++ b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorService.java
@@ -24,6 +24,7 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.database.ContentObserver;
+import android.os.Binder;
 import android.os.Handler;
 import android.os.ResultReceiver;
 import android.os.ShellCallback;
@@ -95,11 +96,16 @@
     }
 
     @Override
-    public void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) {
+    public boolean suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) {
         enforceSuggestManualTimeZonePermission();
         Objects.requireNonNull(timeZoneSuggestion);
 
-        mHandler.post(() -> mTimeZoneDetectorStrategy.suggestManualTimeZone(timeZoneSuggestion));
+        long token = Binder.clearCallingIdentity();
+        try {
+            return mTimeZoneDetectorStrategy.suggestManualTimeZone(timeZoneSuggestion);
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
     }
 
     @Override
diff --git a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategy.java b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategy.java
index e0b3ad5..7f22e6c 100644
--- a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategy.java
+++ b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategy.java
@@ -37,9 +37,13 @@
 public interface TimeZoneDetectorStrategy {
 
     /**
-     * Suggests a time zone for the device using manually-entered (i.e. user sourced) information.
+     * Suggests a time zone for the device, determined from the user's manually entered information.
+     * Returns {@code false} if the suggestion was invalid, or the device configuration prevented
+     * the suggestion being used, {@code true} if the suggestion was accepted. A suggestion that is
+     * valid but does not change the time zone because it matches the current device time zone is
+     * considered accepted.
      */
-    void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion suggestion);
+    boolean suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion suggestion);
 
     /**
      * Suggests a time zone for the device, or withdraws a previous suggestion if
diff --git a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java
index d318b1a..69a2b54 100644
--- a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java
+++ b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java
@@ -199,12 +199,13 @@
     }
 
     @Override
-    public synchronized void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion suggestion) {
+    public synchronized boolean suggestManualTimeZone(
+            @NonNull ManualTimeZoneSuggestion suggestion) {
         Objects.requireNonNull(suggestion);
 
         String timeZoneId = suggestion.getZoneId();
         String cause = "Manual time suggestion received: suggestion=" + suggestion;
-        setDeviceTimeZoneIfRequired(ORIGIN_MANUAL, timeZoneId, cause);
+        return setDeviceTimeZoneIfRequired(ORIGIN_MANUAL, timeZoneId, cause);
     }
 
     @Override
@@ -305,7 +306,7 @@
     }
 
     @GuardedBy("this")
-    private void setDeviceTimeZoneIfRequired(
+    private boolean setDeviceTimeZoneIfRequired(
             @Origin int origin, @NonNull String newZoneId, @NonNull String cause) {
         Objects.requireNonNull(newZoneId);
         Objects.requireNonNull(cause);
@@ -319,7 +320,7 @@
                             + ", newZoneId=" + newZoneId
                             + ", cause=" + cause);
                 }
-                return;
+                return false;
             }
         } else {
             if (mCallback.isAutoTimeZoneDetectionEnabled()) {
@@ -329,7 +330,7 @@
                             + ", newZoneId=" + newZoneId
                             + ", cause=" + cause);
                 }
-                return;
+                return false;
             }
         }
 
@@ -346,7 +347,7 @@
                         + ", newZoneId=" + newZoneId
                         + ", cause=" + cause);
             }
-            return;
+            return true;
         }
 
         mCallback.setDeviceTimeZone(newZoneId);
@@ -359,6 +360,7 @@
             Slog.d(LOG_TAG, msg);
         }
         mTimeZoneChangesLog.log(msg);
+        return true;
     }
 
     private static boolean isOriginAutomatic(@Origin int origin) {
diff --git a/services/core/java/com/android/server/trust/OWNERS b/services/core/java/com/android/server/trust/OWNERS
new file mode 100644
index 0000000..b039c4b
--- /dev/null
+++ b/services/core/java/com/android/server/trust/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/app/trust/OWNERS
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index fd3c1f9..25cd641 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -123,6 +123,8 @@
     private static final String TRUST_TIMEOUT_ALARM_TAG = "TrustManagerService.trustTimeoutForUser";
     private static final long TRUST_TIMEOUT_IN_MILLIS = 4 * 60 * 60 * 1000;
 
+    private static final String PRIV_NAMESPACE = "http://schemas.android.com/apk/prv/res/android";
+
     private final ArraySet<AgentInfo> mActiveAgents = new ArraySet<>();
     private final ArrayList<ITrustListener> mTrustListeners = new ArrayList<>();
     private final Receiver mReceiver = new Receiver();
@@ -808,8 +810,8 @@
             TypedArray sa = res
                     .obtainAttributes(attrs, com.android.internal.R.styleable.TrustAgent);
             cn = sa.getString(com.android.internal.R.styleable.TrustAgent_settingsActivity);
-            canUnlockProfile = sa.getBoolean(
-                    com.android.internal.R.styleable.TrustAgent_unlockProfile, false);
+            canUnlockProfile = attrs.getAttributeBooleanValue(
+                    PRIV_NAMESPACE, "unlockProfile", false);
             sa.recycle();
         } catch (PackageManager.NameNotFoundException e) {
             caughtException = e;
diff --git a/services/core/java/com/android/server/tv/OWNERS b/services/core/java/com/android/server/tv/OWNERS
new file mode 100644
index 0000000..305027c
--- /dev/null
+++ b/services/core/java/com/android/server/tv/OWNERS
@@ -0,0 +1 @@
+include /media/java/android/media/tv/OWNERS
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java
index 323ac7b..bedcf9c 100755
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -714,6 +714,7 @@
         SessionState sessionState = userState.sessionStateMap.remove(sessionToken);
 
         if (sessionState == null) {
+            Slog.e(TAG, "sessionState null, no more remove session action!");
             return;
         }
 
@@ -2278,8 +2279,16 @@
                 ClientState clientState = userState.clientStateMap.get(clientToken);
                 if (clientState != null) {
                     while (clientState.sessionTokens.size() > 0) {
+                        IBinder sessionToken = clientState.sessionTokens.get(0);
                         releaseSessionLocked(
-                                clientState.sessionTokens.get(0), Process.SYSTEM_UID, userId);
+                                sessionToken, Process.SYSTEM_UID, userId);
+                        // the releaseSessionLocked function may return before the sessionToken
+                        // is removed if the related sessionState is null. So need to check again
+                        // to avoid death curculation.
+                        if (clientState.sessionTokens.contains(sessionToken)) {
+                            Slog.d(TAG, "remove sessionToken " + sessionToken + " for " + clientToken);
+                            clientState.sessionTokens.remove(sessionToken);
+                        }
                     }
                 }
                 clientToken = null;
diff --git a/services/core/java/com/android/server/uri/OWNERS b/services/core/java/com/android/server/uri/OWNERS
new file mode 100644
index 0000000..cdc07ed
--- /dev/null
+++ b/services/core/java/com/android/server/uri/OWNERS
@@ -0,0 +1,3 @@
+jsharkey@android.com
+jsharkey@google.com
+varunshah@google.com
diff --git a/services/core/java/com/android/server/uri/UriGrantsManagerInternal.java b/services/core/java/com/android/server/uri/UriGrantsManagerInternal.java
index cdb6199..5772dea 100644
--- a/services/core/java/com/android/server/uri/UriGrantsManagerInternal.java
+++ b/services/core/java/com/android/server/uri/UriGrantsManagerInternal.java
@@ -75,10 +75,31 @@
     void removeUriPermissionsForPackage(
             String packageName, int userHandle, boolean persistable, boolean targetOnly);
     /**
-     * @param uri This uri must NOT contain an embedded userId.
+     * Remove any {@link UriPermission} associated with the owner whose values match the given
+     * filtering parameters.
+     *
+     * @param token An opaque owner token as returned by {@link #newUriPermissionOwner(String)}.
+     * @param uri This uri must NOT contain an embedded userId. {@code null} to apply to all Uris.
+     * @param mode The modes (as a bitmask) to revoke.
      * @param userId The userId in which the uri is to be resolved.
      */
     void revokeUriPermissionFromOwner(IBinder token, Uri uri, int mode, int userId);
+
+    /**
+     * Remove any {@link UriPermission} associated with the owner whose values match the given
+     * filtering parameters.
+     *
+     * @param token An opaque owner token as returned by {@link #newUriPermissionOwner(String)}.
+     * @param uri This uri must NOT contain an embedded userId. {@code null} to apply to all Uris.
+     * @param mode The modes (as a bitmask) to revoke.
+     * @param userId The userId in which the uri is to be resolved.
+     * @param targetPkg Calling package name to match, or {@code null} to apply to all packages.
+     * @param targetUserId Calling user to match, or {@link UserHandle#USER_ALL} to apply to all
+     *                     users.
+     */
+    void revokeUriPermissionFromOwner(IBinder token, Uri uri, int mode, int userId,
+            String targetPkg, int targetUserId);
+
     boolean checkAuthorityGrants(
             int callingUid, ProviderInfo cpi, int userId, boolean checkUser);
     void dump(PrintWriter pw, boolean dumpAll, String dumpPackage);
diff --git a/services/core/java/com/android/server/uri/UriGrantsManagerService.java b/services/core/java/com/android/server/uri/UriGrantsManagerService.java
index 7ea8544..61325cc 100644
--- a/services/core/java/com/android/server/uri/UriGrantsManagerService.java
+++ b/services/core/java/com/android/server/uri/UriGrantsManagerService.java
@@ -51,7 +51,6 @@
 import android.app.GrantedUriPermission;
 import android.app.IUriGrantsManager;
 import android.content.ClipData;
-import android.content.ComponentName;
 import android.content.ContentProvider;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -88,11 +87,11 @@
 import com.android.server.SystemService;
 import com.android.server.SystemServiceManager;
 
-import libcore.io.IoUtils;
-
 import com.google.android.collect.Lists;
 import com.google.android.collect.Maps;
 
+import libcore.io.IoUtils;
+
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlSerializer;
@@ -1431,16 +1430,18 @@
 
         @Override
         public void revokeUriPermissionFromOwner(IBinder token, Uri uri, int mode, int userId) {
+            revokeUriPermissionFromOwner(token, uri, mode, userId, null, UserHandle.USER_ALL);
+        }
+
+        @Override
+        public void revokeUriPermissionFromOwner(IBinder token, Uri uri, int mode, int userId,
+                String targetPkg, int targetUserId) {
             final UriPermissionOwner owner = UriPermissionOwner.fromExternalToken(token);
             if (owner == null) {
                 throw new IllegalArgumentException("Unknown owner: " + token);
             }
-
-            if (uri == null) {
-                owner.removeUriPermissions(mode);
-            } else {
-                owner.removeUriPermission(new GrantUri(userId, uri, mode), mode);
-            }
+            GrantUri grantUri = uri == null ? null : new GrantUri(userId, uri, mode);
+            owner.removeUriPermission(grantUri, mode, targetPkg, targetUserId);
         }
 
         @Override
diff --git a/services/core/java/com/android/server/uri/UriPermissionOwner.java b/services/core/java/com/android/server/uri/UriPermissionOwner.java
index 2b404a4..0c26399 100644
--- a/services/core/java/com/android/server/uri/UriPermissionOwner.java
+++ b/services/core/java/com/android/server/uri/UriPermissionOwner.java
@@ -21,6 +21,7 @@
 
 import android.os.Binder;
 import android.os.IBinder;
+import android.os.UserHandle;
 import android.util.ArraySet;
 import android.util.proto.ProtoOutputStream;
 
@@ -74,30 +75,47 @@
     }
 
     void removeUriPermission(GrantUri grantUri, int mode) {
+        removeUriPermission(grantUri, mode, null, UserHandle.USER_ALL);
+    }
+
+    void removeUriPermission(GrantUri grantUri, int mode, String targetPgk, int targetUserId) {
         if ((mode & FLAG_GRANT_READ_URI_PERMISSION) != 0 && mReadPerms != null) {
             Iterator<UriPermission> it = mReadPerms.iterator();
             while (it.hasNext()) {
                 UriPermission perm = it.next();
-                if (grantUri == null || grantUri.equals(perm.uri)) {
-                    perm.removeReadOwner(this);
-                    mService.removeUriPermissionIfNeeded(perm);
-                    it.remove();
+                if (grantUri != null && !grantUri.equals(perm.uri)) {
+                    continue;
                 }
+                if (targetPgk != null && !targetPgk.equals(perm.targetPkg)) {
+                    continue;
+                }
+                if (targetUserId != UserHandle.USER_ALL && targetUserId != perm.targetUserId) {
+                    continue;
+                }
+                perm.removeReadOwner(this);
+                mService.removeUriPermissionIfNeeded(perm);
+                it.remove();
             }
             if (mReadPerms.isEmpty()) {
                 mReadPerms = null;
             }
         }
-        if ((mode & FLAG_GRANT_WRITE_URI_PERMISSION) != 0
-                && mWritePerms != null) {
+        if ((mode & FLAG_GRANT_WRITE_URI_PERMISSION) != 0 && mWritePerms != null) {
             Iterator<UriPermission> it = mWritePerms.iterator();
             while (it.hasNext()) {
                 UriPermission perm = it.next();
-                if (grantUri == null || grantUri.equals(perm.uri)) {
-                    perm.removeWriteOwner(this);
-                    mService.removeUriPermissionIfNeeded(perm);
-                    it.remove();
+                if (grantUri != null && !grantUri.equals(perm.uri)) {
+                    continue;
                 }
+                if (targetPgk != null && !targetPgk.equals(perm.targetPkg)) {
+                    continue;
+                }
+                if (targetUserId != UserHandle.USER_ALL && targetUserId != perm.targetUserId) {
+                    continue;
+                }
+                perm.removeWriteOwner(this);
+                mService.removeUriPermissionIfNeeded(perm);
+                it.remove();
             }
             if (mWritePerms.isEmpty()) {
                 mWritePerms = null;
diff --git a/services/core/java/com/android/server/vibrator/OWNERS b/services/core/java/com/android/server/vibrator/OWNERS
new file mode 100644
index 0000000..7e7335d
--- /dev/null
+++ b/services/core/java/com/android/server/vibrator/OWNERS
@@ -0,0 +1 @@
+michaelwr@google.com
diff --git a/services/core/java/com/android/server/vr/Vr2dDisplay.java b/services/core/java/com/android/server/vr/Vr2dDisplay.java
index 3f2b5c2..a713e5b 100644
--- a/services/core/java/com/android/server/vr/Vr2dDisplay.java
+++ b/services/core/java/com/android/server/vr/Vr2dDisplay.java
@@ -295,6 +295,7 @@
             flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY;
             flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL;
             flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_SECURE;
+            flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_TRUSTED;
 
             final VirtualDisplayConfig.Builder builder = new VirtualDisplayConfig.Builder(
                     DISPLAY_NAME, mVirtualDisplayWidth, mVirtualDisplayHeight, mVirtualDisplayDpi);
diff --git a/services/core/java/com/android/server/wallpaper/OWNERS b/services/core/java/com/android/server/wallpaper/OWNERS
new file mode 100644
index 0000000..8ff0f74
--- /dev/null
+++ b/services/core/java/com/android/server/wallpaper/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/wallpaper/OWNERS
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index 3a30f98..8fe8853 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -1175,9 +1175,7 @@
             }
         };
 
-        private Runnable mTryToRebindRunnable = () -> {
-            tryToRebind();
-        };
+        private Runnable mTryToRebindRunnable = this::tryToRebind;
 
         WallpaperConnection(WallpaperInfo info, WallpaperData wallpaper, int clientUid) {
             mInfo = info;
@@ -1310,14 +1308,14 @@
                     // a short time in the future, specifically to allow any pending package
                     // update message on this same looper thread to be processed.
                     if (!mWallpaper.wallpaperUpdating) {
-                        mContext.getMainThreadHandler().postDelayed(() -> processDisconnect(this),
+                        mContext.getMainThreadHandler().postDelayed(mDisconnectRunnable,
                                 1000);
                     }
                 }
             }
         }
 
-        public void scheduleTimeoutLocked() {
+        private void scheduleTimeoutLocked() {
             // If we didn't reset it right away, do so after we couldn't connect to
             // it for an extended amount of time to avoid having a black wallpaper.
             final Handler fgHandler = FgThread.getHandler();
@@ -1357,11 +1355,11 @@
             }
         }
 
-        private void processDisconnect(final ServiceConnection connection) {
+        private Runnable mDisconnectRunnable = () -> {
             synchronized (mLock) {
                 // The wallpaper disappeared.  If this isn't a system-default one, track
                 // crashes and fall back to default if it continues to misbehave.
-                if (connection == mWallpaper.connection) {
+                if (this == mWallpaper.connection) {
                     final ComponentName wpService = mWallpaper.wallpaperComponent;
                     if (!mWallpaper.wallpaperUpdating
                             && mWallpaper.userId == mCurrentUserId
@@ -1389,7 +1387,7 @@
                     }
                 }
             }
-        }
+        };
 
         /**
          * Called by a live wallpaper if its colors have changed.
@@ -2801,6 +2799,13 @@
                     WallpaperConnection.DisplayConnector::disconnectLocked);
             wallpaper.connection.mService = null;
             wallpaper.connection.mDisplayConnector.clear();
+
+            FgThread.getHandler().removeCallbacks(wallpaper.connection.mResetRunnable);
+            mContext.getMainThreadHandler().removeCallbacks(
+                    wallpaper.connection.mDisconnectRunnable);
+            mContext.getMainThreadHandler().removeCallbacks(
+                    wallpaper.connection.mTryToRebindRunnable);
+
             wallpaper.connection = null;
             if (wallpaper == mLastWallpaper) mLastWallpaper = null;
         }
diff --git a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
index 189b21f..7e6abf8 100644
--- a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
@@ -376,6 +376,13 @@
                     return -1;
             }
         }
+
+        PackageOptimizationInfo getPackageOptimizationInfo(ArtManagerInternal artManagerInternal) {
+            return artManagerInternal == null || launchedActivityAppRecordRequiredAbi == null
+                    ? PackageOptimizationInfo.createWithNoInfo()
+                    : artManagerInternal.getPackageOptimizationInfo(applicationInfo,
+                            launchedActivityAppRecordRequiredAbi, launchedActivityName);
+        }
     }
 
     ActivityMetricsLogger(ActivityStackSupervisor supervisor, Looper looper) {
@@ -836,14 +843,8 @@
                     info.bindApplicationDelayMs);
         }
         builder.addTaggedData(APP_TRANSITION_WINDOWS_DRAWN_DELAY_MS, info.windowsDrawnDelayMs);
-        final ArtManagerInternal artManagerInternal = getArtManagerInternal();
         final PackageOptimizationInfo packageOptimizationInfo =
-                (artManagerInternal == null) || (info.launchedActivityAppRecordRequiredAbi == null)
-                ? PackageOptimizationInfo.createWithNoInfo()
-                : artManagerInternal.getPackageOptimizationInfo(
-                        info.applicationInfo,
-                        info.launchedActivityAppRecordRequiredAbi,
-                        info.launchedActivityName);
+                info.getPackageOptimizationInfo(getArtManagerInternal());
         builder.addTaggedData(PACKAGE_OPTIMIZATION_COMPILATION_REASON,
                 packageOptimizationInfo.getCompilationReason());
         builder.addTaggedData(PACKAGE_OPTIMIZATION_COMPILATION_FILTER,
@@ -962,6 +963,8 @@
         builder.addTaggedData(APP_TRANSITION_PROCESS_RUNNING,
                 info.mProcessRunning ? 1 : 0);
         mMetricsLogger.write(builder);
+        final PackageOptimizationInfo packageOptimizationInfo =
+                infoSnapshot.getPackageOptimizationInfo(getArtManagerInternal());
         FrameworkStatsLog.write(
                 FrameworkStatsLog.APP_START_FULLY_DRAWN,
                 info.mLastLaunchedActivity.info.applicationInfo.uid,
@@ -971,7 +974,9 @@
                         : FrameworkStatsLog.APP_START_FULLY_DRAWN__TYPE__WITHOUT_BUNDLE,
                 info.mLastLaunchedActivity.info.name,
                 info.mProcessRunning,
-                startupTimeMs);
+                startupTimeMs,
+                packageOptimizationInfo.getCompilationReason(),
+                packageOptimizationInfo.getCompilationFilter());
 
         // Ends the trace started at the beginning of this function. This is located here to allow
         // the trace slice to have a noticable duration.
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index cfbc77c..dc4caf8 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -416,7 +416,7 @@
     // mOccludesParent field.
     final boolean hasWallpaper;
     // Input application handle used by the input dispatcher.
-    final InputApplicationHandle mInputApplicationHandle;
+    private InputApplicationHandle mInputApplicationHandle;
 
     final int launchedFromPid; // always the pid who started the activity.
     final int launchedFromUid; // always the uid who started the activity.
@@ -1501,7 +1501,6 @@
         info = aInfo;
         mUserId = UserHandle.getUserId(info.applicationInfo.uid);
         packageName = info.applicationInfo.packageName;
-        mInputApplicationHandle = new InputApplicationHandle(appToken);
         intent = _intent;
 
         // If the class name in the intent doesn't match that of the target, this is probably an
@@ -1671,7 +1670,8 @@
 
     static int getLockTaskLaunchMode(ActivityInfo aInfo, @Nullable ActivityOptions options) {
         int lockTaskLaunchMode = aInfo.lockTaskLaunchMode;
-        if (aInfo.applicationInfo.isPrivilegedApp()
+        // Non-priv apps are not allowed to use always or never, fall back to default
+        if (!aInfo.applicationInfo.isPrivilegedApp()
                 && (lockTaskLaunchMode == LOCK_TASK_LAUNCH_MODE_ALWAYS
                 || lockTaskLaunchMode == LOCK_TASK_LAUNCH_MODE_NEVER)) {
             lockTaskLaunchMode = LOCK_TASK_LAUNCH_MODE_DEFAULT;
@@ -1685,6 +1685,21 @@
         return lockTaskLaunchMode;
     }
 
+    @NonNull InputApplicationHandle getInputApplicationHandle(boolean update) {
+        if (mInputApplicationHandle == null) {
+            mInputApplicationHandle = new InputApplicationHandle(appToken, toString(),
+                    mInputDispatchingTimeoutNanos);
+        } else if (update) {
+            final String name = toString();
+            if (mInputDispatchingTimeoutNanos != mInputApplicationHandle.dispatchingTimeoutNanos
+                    || !name.equals(mInputApplicationHandle.name)) {
+                mInputApplicationHandle = new InputApplicationHandle(appToken, name,
+                        mInputDispatchingTimeoutNanos);
+            }
+        }
+        return mInputApplicationHandle;
+    }
+
     @Override
     ActivityRecord asActivityRecord() {
         // I am an activity record!
@@ -2543,7 +2558,9 @@
 
         final ActivityStack stack = getRootTask();
         final boolean mayAdjustTop = (isState(RESUMED) || stack.mResumedActivity == null)
-                && stack.isFocusedStackOnDisplay();
+                && stack.isFocusedStackOnDisplay()
+                // Do not adjust focus task because the task will be reused to launch new activity.
+                && !task.isClearingToReuseTask();
         final boolean shouldAdjustGlobalFocus = mayAdjustTop
                 // It must be checked before {@link #makeFinishingLocked} is called, because a stack
                 // is not visible if it only contains finishing activities.
@@ -4732,6 +4749,15 @@
                 Slog.v(TAG_VISIBILITY, "Start visible activity, " + this);
             }
             setState(STARTED, "makeActiveIfNeeded");
+
+            // Update process info while making an activity from invisible to visible, to make
+            // sure the process state is updated to foreground.
+            if (app != null) {
+                app.updateProcessInfo(false /* updateServiceConnectionActivities */,
+                        true /* activityChange */, true /* updateOomAdj */,
+                        true /* addPendingTopUid */);
+            }
+
             try {
                 mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), appToken,
                         StartActivityItem.obtain());
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java
index 2b785c5..6d452c3 100644
--- a/services/core/java/com/android/server/wm/ActivityStack.java
+++ b/services/core/java/com/android/server/wm/ActivityStack.java
@@ -146,7 +146,6 @@
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.app.IVoiceInteractor;
-import com.android.internal.os.logging.MetricsLoggerWrapper;
 import com.android.internal.util.function.pooled.PooledConsumer;
 import com.android.internal.util.function.pooled.PooledFunction;
 import com.android.internal.util.function.pooled.PooledLambda;
@@ -928,12 +927,9 @@
         mCurrentUser = userId;
 
         super.switchUser(userId);
-        forAllLeafTasks((t) -> {
-            if (t.showToCurrentUser() && t != this) {
-                mChildren.remove(t);
-                mChildren.add(t);
-            }
-        }, true /* traverseTopToBottom */);
+        if (isLeafTask() && showToCurrentUser()) {
+            getParent().positionChildAt(POSITION_TOP, this, false /*includeParents*/);
+        }
     }
 
     void minimalResumeActivityLocked(ActivityRecord r) {
@@ -1995,7 +1991,7 @@
         return mRootWindowContainer.resumeHomeActivity(prev, reason, getDisplayArea());
     }
 
-    void startActivityLocked(ActivityRecord r, ActivityRecord focusedTopActivity,
+    void startActivityLocked(ActivityRecord r, @Nullable ActivityRecord focusedTopActivity,
             boolean newTask, boolean keepCurTransition, ActivityOptions options) {
         Task rTask = r.getTask();
         final boolean allowMoveToFront = options == null || !options.getAvoidMoveToFront();
@@ -2727,13 +2723,15 @@
     /**
      * Reset local parameters because an app's activity died.
      * @param app The app of the activity that died.
-     * @return result from removeHistoryRecordsForAppLocked.
+     * @return {@code true} if the process has any visible activity.
      */
     boolean handleAppDied(WindowProcessController app) {
+        boolean isPausingDied = false;
         if (mPausingActivity != null && mPausingActivity.app == app) {
             if (DEBUG_PAUSE || DEBUG_CLEANUP) Slog.v(TAG_PAUSE,
                     "App died while pausing: " + mPausingActivity);
             mPausingActivity = null;
+            isPausingDied = true;
         }
         if (mLastPausedActivity != null && mLastPausedActivity.app == app) {
             mLastPausedActivity = null;
@@ -2741,7 +2739,8 @@
         }
 
         mStackSupervisor.removeHistoryRecords(app);
-        return mRemoveHistoryRecordsForApp.process(app);
+        final boolean hadVisibleActivities = mRemoveHistoryRecordsForApp.process(app);
+        return hadVisibleActivities || isPausingDied;
     }
 
     boolean dump(FileDescriptor fd, PrintWriter pw, boolean dumpAll, boolean dumpClient,
@@ -3044,8 +3043,6 @@
             getDisplayArea().positionStackAtTop(this, false /* includingParents */);
 
             mStackSupervisor.scheduleUpdatePictureInPictureModeIfNeeded(task, this);
-            MetricsLoggerWrapper.logPictureInPictureFullScreen(mAtmService.mContext,
-                    task.effectiveUid, task.realActivity.flattenToString());
         });
     }
 
@@ -3340,7 +3337,11 @@
         // Do not sleep activities in this stack if we're marked as focused and the keyguard
         // is in the process of going away.
         if (isFocusedStackOnDisplay()
-                && mStackSupervisor.getKeyguardController().isKeyguardGoingAway()) {
+                && mStackSupervisor.getKeyguardController().isKeyguardGoingAway()
+                // Avoid resuming activities on secondary displays since we don't want bubble
+                // activities to be resumed while bubble is still collapsed.
+                // TODO(b/113840485): Having keyguard going away state for secondary displays.
+                && display.isDefaultDisplay) {
             return false;
         }
 
diff --git a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
index 3dd82a6..7e6b7cd 100644
--- a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
@@ -732,6 +732,11 @@
         final ActivityStack stack = task.getStack();
 
         beginDeferResume();
+        // The LaunchActivityItem also contains process configuration, so the configuration change
+        // from WindowProcessController#setProcess can be deferred. The major reason is that if
+        // the activity has FixedRotationAdjustments, it needs to be applied with configuration.
+        // In general, this reduces a binder transaction if process configuration is changed.
+        proc.pauseConfigurationDispatch();
 
         try {
             r.startFreezingScreenLocked(proc, 0);
@@ -826,9 +831,9 @@
                 // Because we could be starting an Activity in the system process this may not go
                 // across a Binder interface which would create a new Configuration. Consequently
                 // we have to always create a new Configuration here.
-
+                final Configuration procConfig = proc.prepareConfigurationForLaunchingActivity();
                 final MergedConfiguration mergedConfiguration = new MergedConfiguration(
-                        proc.getConfiguration(), r.getMergedOverrideConfiguration());
+                        procConfig, r.getMergedOverrideConfiguration());
                 r.setLastReportedConfiguration(mergedConfiguration);
 
                 logIfTransactionTooLarge(r.intent, r.getSavedState());
@@ -862,6 +867,11 @@
                 // Schedule transaction.
                 mService.getLifecycleManager().scheduleTransaction(clientTransaction);
 
+                if (procConfig.seq > mRootWindowContainer.getConfiguration().seq) {
+                    // If the seq is increased, there should be something changed (e.g. registered
+                    // activity configuration).
+                    proc.setLastReportedConfiguration(procConfig);
+                }
                 if ((proc.mInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_CANT_SAVE_STATE) != 0
                         && mService.mHasHeavyWeightFeature) {
                     // This may be a heavy-weight process! Note that the package manager will ensure
@@ -896,6 +906,7 @@
             }
         } finally {
             endDeferResume();
+            proc.resumeConfigurationDispatch();
         }
 
         r.launchFailed = false;
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java
index 35ccc43..7af237b 100644
--- a/services/core/java/com/android/server/wm/ActivityStarter.java
+++ b/services/core/java/com/android/server/wm/ActivityStarter.java
@@ -1698,8 +1698,9 @@
         mRootWindowContainer.sendPowerHintForLaunchStartIfNeeded(
                 false /* forceSend */, mStartActivity);
 
-        mTargetStack.startActivityLocked(mStartActivity, topStack.getTopNonFinishingActivity(),
-                newTask, mKeepCurTransition, mOptions);
+        mTargetStack.startActivityLocked(mStartActivity,
+                topStack != null ? topStack.getTopNonFinishingActivity() : null, newTask,
+                mKeepCurTransition, mOptions);
         if (mDoResume) {
             final ActivityRecord topTaskActivity =
                     mStartActivity.getTask().topRunningActivityLocked();
@@ -2010,8 +2011,6 @@
             // of history or if it is finished immediately), thus disassociating the task. Also note
             // that mReuseTask is reset as a result of {@link Task#performClearTaskLocked}
             // launching another activity.
-            // TODO(b/36119896):  We shouldn't trigger activity launches in this path since we are
-            // already launching one.
             targetTask.performClearTaskLocked();
             targetTask.setIntent(mStartActivity);
             mAddingToTask = true;
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java b/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java
index 9125d90..d4dd35f 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java
@@ -125,20 +125,30 @@
      * Sleep tokens cause the activity manager to put the top activity to sleep.
      * They are used by components such as dreams that may hide and block interaction
      * with underlying activities.
+     * The Acquirer provides an interface that encapsulates the underlying work, so the user does
+     * not need to handle the token by him/herself.
      */
-    public static abstract class SleepToken {
+    public interface SleepTokenAcquirer {
 
-        /** Releases the sleep token. */
-        public abstract void release();
+        /**
+         * Acquires a sleep token.
+         * @param displayId The display to apply to.
+         */
+        void acquire(int displayId);
+
+        /**
+         * Releases the sleep token.
+         * @param displayId The display to apply to.
+         */
+        void release(int displayId);
     }
 
     /**
-     * Acquires a sleep token for the specified display with the specified tag.
+     * Creates a sleep token acquirer for the specified display with the specified tag.
      *
-     * @param tag A string identifying the purpose of the token (eg. "Dream").
-     * @param displayId The display to apply the sleep token to.
+     * @param tag A string identifying the purpose (eg. "Dream").
      */
-    public abstract SleepToken acquireSleepToken(@NonNull String tag, int displayId);
+    public abstract SleepTokenAcquirer createSleepTokenAcquirer(@NonNull String tag);
 
     /**
      * Returns home activity for the specified user.
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index ffbf6dd..0542ef9 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -183,7 +183,6 @@
 import android.graphics.Bitmap;
 import android.graphics.Point;
 import android.graphics.Rect;
-import android.metrics.LogMaker;
 import android.net.Uri;
 import android.os.Binder;
 import android.os.Build;
@@ -239,12 +238,9 @@
 import com.android.internal.app.AssistUtils;
 import com.android.internal.app.IVoiceInteractor;
 import com.android.internal.app.ProcessMap;
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
 import com.android.internal.notification.SystemNotificationChannels;
 import com.android.internal.os.TransferPipe;
-import com.android.internal.os.logging.MetricsLoggerWrapper;
 import com.android.internal.policy.IKeyguardDismissCallback;
 import com.android.internal.policy.KeyguardDismissCallback;
 import com.android.internal.util.ArrayUtils;
@@ -3001,13 +2997,7 @@
 
     @Override
     public void stopLockTaskModeByToken(IBinder token) {
-        synchronized (mGlobalLock) {
-            final ActivityRecord r = ActivityRecord.forTokenLocked(token);
-            if (r == null) {
-                return;
-            }
-            stopLockTaskModeInternal(r.getTask(), false /* isSystemCaller */);
-        }
+        stopLockTaskModeInternal(token, false /* isSystemCaller */);
     }
 
     /**
@@ -3049,11 +3039,19 @@
         }
     }
 
-    private void stopLockTaskModeInternal(@Nullable Task task, boolean isSystemCaller) {
+    private void stopLockTaskModeInternal(@Nullable IBinder token, boolean isSystemCaller) {
         final int callingUid = Binder.getCallingUid();
         long ident = Binder.clearCallingIdentity();
         try {
             synchronized (mGlobalLock) {
+                Task task = null;
+                if (token != null) {
+                    final ActivityRecord r = ActivityRecord.forTokenLocked(token);
+                    if (r == null) {
+                        return;
+                    }
+                    task = r.getTask();
+                }
                 getLockTaskController().stopLockTaskMode(task, isSystemCaller, callingUid);
             }
             // Launch in-call UI if a call is ongoing. This is necessary to allow stopping the lock
@@ -4109,10 +4107,6 @@
                         final ActivityStack stack = r.getRootTask();
                         stack.setPictureInPictureAspectRatio(aspectRatio);
                         stack.setPictureInPictureActions(actions);
-                        MetricsLoggerWrapper.logPictureInPictureEnter(mContext,
-                                r.info.applicationInfo.uid, r.shortComponentName,
-                                r.supportsEnterPipOnTaskSwitch);
-                        logPictureInPictureArgs(params);
                     }
                 };
 
@@ -4156,7 +4150,6 @@
                             r.pictureInPictureArgs.getAspectRatio());
                     stack.setPictureInPictureActions(r.pictureInPictureArgs.getActions());
                 }
-                logPictureInPictureArgs(params);
             }
         } finally {
             Binder.restoreCallingIdentity(origId);
@@ -4170,18 +4163,6 @@
         return 3;
     }
 
-    private void logPictureInPictureArgs(PictureInPictureParams params) {
-        if (params.hasSetActions()) {
-            MetricsLogger.histogram(mContext, "tron_varz_picture_in_picture_actions_count",
-                    params.getActions().size());
-        }
-        if (params.hasSetAspectRatio()) {
-            LogMaker lm = new LogMaker(MetricsEvent.ACTION_PICTURE_IN_PICTURE_ASPECT_RATIO_CHANGED);
-            lm.addTaggedData(MetricsEvent.PICTURE_IN_PICTURE_ASPECT_RATIO, params.getAspectRatio());
-            MetricsLogger.action(lm);
-        }
-    }
-
     /**
      * Checks the state of the system and the activity associated with the given {@param token} to
      * verify that picture-in-picture is supported for that activity.
@@ -5087,7 +5068,10 @@
         final long sleepToken = proto.start(ActivityManagerServiceDumpProcessesProto.SLEEP_STATUS);
         proto.write(ActivityManagerServiceDumpProcessesProto.SleepStatus.WAKEFULNESS,
                 PowerManagerInternal.wakefulnessToProtoEnum(wakeFullness));
-        for (ActivityTaskManagerInternal.SleepToken st : mRootWindowContainer.mSleepTokens) {
+        final int tokenSize = mRootWindowContainer.mSleepTokens.size();
+        for (int i = 0; i < tokenSize; i++) {
+            final RootWindowContainer.SleepToken st =
+                    mRootWindowContainer.mSleepTokens.valueAt(i);
             proto.write(ActivityManagerServiceDumpProcessesProto.SleepStatus.SLEEP_TOKENS,
                     st.toString());
         }
@@ -5377,15 +5361,6 @@
         return mAmInternal.isBackgroundActivityStartsEnabled();
     }
 
-    void enableScreenAfterBoot(boolean booted) {
-        writeBootProgressEnableScreen(SystemClock.uptimeMillis());
-        mWindowManager.enableScreenAfterBoot();
-
-        synchronized (mGlobalLock) {
-            updateEventDispatchingLocked(booted);
-        }
-    }
-
     static long getInputDispatchingTimeoutLocked(ActivityRecord r) {
         if (r == null || !r.hasProcess()) {
             return KEY_DISPATCHING_TIMEOUT_MS;
@@ -5521,12 +5496,35 @@
                 reason);
     }
 
-    ActivityTaskManagerInternal.SleepToken acquireSleepToken(String tag, int displayId) {
-        synchronized (mGlobalLock) {
-            final ActivityTaskManagerInternal.SleepToken token =
-                    mRootWindowContainer.createSleepToken(tag, displayId);
-            updateSleepIfNeededLocked();
-            return token;
+    final class SleepTokenAcquirerImpl implements ActivityTaskManagerInternal.SleepTokenAcquirer {
+        private final String mTag;
+        private final SparseArray<RootWindowContainer.SleepToken> mSleepTokens =
+                new SparseArray<>();
+
+        SleepTokenAcquirerImpl(@NonNull String tag) {
+            mTag = tag;
+        }
+
+        @Override
+        public void acquire(int displayId) {
+            synchronized (mGlobalLock) {
+                if (!mSleepTokens.contains(displayId)) {
+                    mSleepTokens.append(displayId,
+                            mRootWindowContainer.createSleepToken(mTag, displayId));
+                    updateSleepIfNeededLocked();
+                }
+            }
+        }
+
+        @Override
+        public void release(int displayId) {
+            synchronized (mGlobalLock) {
+                final RootWindowContainer.SleepToken token = mSleepTokens.get(displayId);
+                if (token != null) {
+                    mRootWindowContainer.removeSleepToken(token);
+                    mSleepTokens.remove(displayId);
+                }
+            }
         }
     }
 
@@ -6085,9 +6083,9 @@
 
     final class LocalService extends ActivityTaskManagerInternal {
         @Override
-        public SleepToken acquireSleepToken(String tag, int displayId) {
+        public SleepTokenAcquirer createSleepTokenAcquirer(@NonNull String tag) {
             Objects.requireNonNull(tag);
-            return ActivityTaskManagerService.this.acquireSleepToken(tag, displayId);
+            return new SleepTokenAcquirerImpl(tag);
         }
 
         @Override
@@ -6448,9 +6446,9 @@
 
         @Override
         public void enableScreenAfterBoot(boolean booted) {
+            writeBootProgressEnableScreen(SystemClock.uptimeMillis());
+            mWindowManager.enableScreenAfterBoot();
             synchronized (mGlobalLock) {
-                writeBootProgressEnableScreen(SystemClock.uptimeMillis());
-                mWindowManager.enableScreenAfterBoot();
                 updateEventDispatchingLocked(booted);
             }
         }
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index dfca5a9..e36b84f 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -43,14 +43,14 @@
 import static android.view.Display.REMOVE_MODE_DESTROY_CONTENT;
 import static android.view.InsetsState.ITYPE_IME;
 import static android.view.InsetsState.ITYPE_LEFT_GESTURES;
+import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_RIGHT_GESTURES;
 import static android.view.Surface.ROTATION_0;
 import static android.view.Surface.ROTATION_180;
 import static android.view.Surface.ROTATION_270;
 import static android.view.Surface.ROTATION_90;
 import static android.view.View.GONE;
-import static android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
-import static android.view.View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
+import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
 import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
 import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
 import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
@@ -596,9 +596,9 @@
     private IntArray mDisplayAccessUIDs = new IntArray();
 
     /** All tokens used to put activities on this stack to sleep (including mOffToken) */
-    final ArrayList<ActivityTaskManagerInternal.SleepToken> mAllSleepTokens = new ArrayList<>();
-    /** The token acquired by ActivityStackSupervisor to put stacks on the display to sleep */
-    ActivityTaskManagerInternal.SleepToken mOffToken;
+    final ArrayList<RootWindowContainer.SleepToken> mAllSleepTokens = new ArrayList<>();
+    /** The token acquirer to put stacks on the display to sleep */
+    private final ActivityTaskManagerInternal.SleepTokenAcquirer mOffTokenAcquirer;
 
     private boolean mSleeping;
 
@@ -934,6 +934,7 @@
         mAtmService = mWmService.mAtmService;
         mDisplay = display;
         mDisplayId = display.getDisplayId();
+        mOffTokenAcquirer = mRootWindowContainer.mDisplayOffTokenAcquirer;
         mWallpaperController = new WallpaperController(mWmService, this);
         display.getDisplayInfo(mDisplayInfo);
         display.getMetrics(mDisplayMetrics);
@@ -1495,6 +1496,15 @@
                 // intermediate orientation change, it is more stable to freeze the display.
                 return false;
             }
+            if (r.isState(RESUMED) && !r.getRootTask().mInResumeTopActivity) {
+                // If the activity is executing or has done the lifecycle callback, use normal
+                // rotation animation so the display info can be updated immediately (see
+                // updateDisplayAndOrientation). This prevents a compatibility issue such as
+                // calling setRequestedOrientation in Activity#onCreate and then get display info.
+                // If fixed rotation is applied, the display rotation will still be the old one,
+                // unless the client side gets the rotation again after the adjustments arrive.
+                return false;
+            }
         } else if (r != topRunningActivity()) {
             // If the transition has not started yet, the activity must be the top.
             return false;
@@ -1572,7 +1582,12 @@
             // the heavy operations. This also benefits that the states of multiple activities
             // are handled together.
             r.linkFixedRotationTransform(prevRotatedLaunchingApp);
-            setFixedRotationLaunchingAppUnchecked(r, rotation);
+            if (r != mFixedRotationTransitionListener.mAnimatingRecents) {
+                // Only update the record for normal activity so the display orientation can be
+                // updated when the transition is done if it becomes the top. And the case of
+                // recents can be handled when the recents animation is finished.
+                setFixedRotationLaunchingAppUnchecked(r, rotation);
+            }
             return;
         }
 
@@ -3548,7 +3563,11 @@
             return false;
         }
         return mWmService.mDisplayWindowSettings.shouldShowImeLocked(this)
-                || mWmService.mForceDesktopModeOnExternalDisplays;
+                || forceDesktopMode();
+    }
+
+    boolean forceDesktopMode() {
+        return mWmService.mForceDesktopModeOnExternalDisplays && !isDefaultDisplay && !isPrivate();
     }
 
     private void setInputMethodTarget(WindowState target, boolean targetWaitingAnim) {
@@ -4780,7 +4799,7 @@
     boolean supportsSystemDecorations() {
         return (mWmService.mDisplayWindowSettings.shouldShowSystemDecorsLocked(this)
                 || (mDisplay.getFlags() & FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS) != 0
-                || mWmService.mForceDesktopModeOnExternalDisplays)
+                || forceDesktopMode())
                 // VR virtual display will be used to run and render 2D app within a VR experience.
                 && mDisplayId != mWmService.mVr2dDisplayId
                 // Do not show system decorations on untrusted virtual display.
@@ -4977,7 +4996,7 @@
             }
 
             // Apply restriction if necessary.
-            if (needsGestureExclusionRestrictions(w, mLastDispatchedSystemUiVisibility)) {
+            if (needsGestureExclusionRestrictions(w, false /* ignoreRequest */)) {
 
                 // Processes the region along the left edge.
                 remainingLeftRight[0] = addToGlobalAndConsumeLimit(local, outExclusion, leftEdge,
@@ -4994,7 +5013,7 @@
                 outExclusion.op(middle, Op.UNION);
                 middle.recycle();
             } else {
-                boolean loggable = needsGestureExclusionRestrictions(w, 0 /* lastSysUiVis */);
+                boolean loggable = needsGestureExclusionRestrictions(w, true /* ignoreRequest */);
                 if (loggable) {
                     addToGlobalAndConsumeLimit(local, outExclusion, leftEdge,
                             Integer.MAX_VALUE, w, EXCLUSION_LEFT);
@@ -5016,17 +5035,21 @@
     }
 
     /**
-     * @return Whether gesture exclusion area should be restricted from the window depending on the
-     *         current SystemUI visibility flags.
+     * Returns whether gesture exclusion area should be restricted from the window depending on the
+     * window/activity types and the requested navigation bar visibility and the behavior.
+     *
+     * @param win The target window.
+     * @param ignoreRequest If this is {@code true}, only the window/activity types are considered.
+     * @return {@code true} if the gesture exclusion restrictions are needed.
      */
-    private static boolean needsGestureExclusionRestrictions(WindowState win, int sysUiVisibility) {
+    private static boolean needsGestureExclusionRestrictions(WindowState win,
+            boolean ignoreRequest) {
         final int type = win.mAttrs.type;
-        final int stickyHideNavFlags =
-                SYSTEM_UI_FLAG_HIDE_NAVIGATION | SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
         final boolean stickyHideNav =
-                (sysUiVisibility & stickyHideNavFlags) == stickyHideNavFlags;
-        return !stickyHideNav && type != TYPE_INPUT_METHOD && type != TYPE_NOTIFICATION_SHADE
-                && win.getActivityType() != ACTIVITY_TYPE_HOME;
+                !win.getRequestedInsetsState().getSourceOrDefaultVisibility(ITYPE_NAVIGATION_BAR)
+                        && win.mAttrs.insetsFlags.behavior == BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
+        return (!stickyHideNav || ignoreRequest) && type != TYPE_INPUT_METHOD
+                && type != TYPE_NOTIFICATION_SHADE && win.getActivityType() != ACTIVITY_TYPE_HOME;
     }
 
     /**
@@ -5042,7 +5065,7 @@
                 && type != TYPE_APPLICATION_STARTING
                 && type != TYPE_NAVIGATION_BAR
                 && (attrs.flags & FLAG_NOT_TOUCHABLE) == 0
-                && needsGestureExclusionRestrictions(win, 0 /* sysUiVisibility */)
+                && needsGestureExclusionRestrictions(win, true /* ignoreRequest */)
                 && win.getDisplayContent().mDisplayPolicy.hasSideGestures();
     }
 
@@ -5168,11 +5191,10 @@
         final int displayId = mDisplay.getDisplayId();
         if (displayId != DEFAULT_DISPLAY) {
             final int displayState = mDisplay.getState();
-            if (displayState == Display.STATE_OFF && mOffToken == null) {
-                mOffToken = mAtmService.acquireSleepToken("Display-off", displayId);
-            } else if (displayState == Display.STATE_ON && mOffToken != null) {
-                mOffToken.release();
-                mOffToken = null;
+            if (displayState == Display.STATE_OFF) {
+                mOffTokenAcquirer.acquire(mDisplayId);
+            } else if (displayState == Display.STATE_ON) {
+                mOffTokenAcquirer.release(mDisplayId);
             }
         }
         mWmService.requestTraversal();
@@ -5424,7 +5446,8 @@
         mDisplayPolicy.release();
 
         if (!mAllSleepTokens.isEmpty()) {
-            mRootWindowContainer.mSleepTokens.removeAll(mAllSleepTokens);
+            mAllSleepTokens.forEach(token ->
+                    mRootWindowContainer.mSleepTokens.remove(token.mHashKey));
             mAllSleepTokens.clear();
             mAtmService.updateSleepIfNeededLocked();
         }
@@ -5641,6 +5664,9 @@
          */
         private ActivityRecord mAnimatingRecents;
 
+        /** Whether {@link #mAnimatingRecents} is going to be the top activity. */
+        private boolean mRecentsWillBeTop;
+
         /**
          * If the recents activity has a fixed orientation which is different from the current top
          * activity, it will be rotated before being shown so we avoid a screen rotation animation
@@ -5666,10 +5692,12 @@
          * If {@link #mAnimatingRecents} still has fixed rotation, it should be moved to top so we
          * don't clear {@link #mFixedRotationLaunchingApp} that will be handled by transition.
          */
-        void onFinishRecentsAnimation(boolean moveRecentsToBack) {
+        void onFinishRecentsAnimation() {
             final ActivityRecord animatingRecents = mAnimatingRecents;
+            final boolean recentsWillBeTop = mRecentsWillBeTop;
             mAnimatingRecents = null;
-            if (!moveRecentsToBack) {
+            mRecentsWillBeTop = false;
+            if (recentsWillBeTop) {
                 // The recents activity will be the top, such as staying at recents list or
                 // returning to home (if home and recents are the same activity).
                 return;
@@ -5692,6 +5720,10 @@
             }
         }
 
+        void notifyRecentsWillBeTop() {
+            mRecentsWillBeTop = true;
+        }
+
         /**
          * Return {@code true} if there is an ongoing animation to the "Recents" activity and this
          * activity as a fixed orientation so shouldn't be rotated.
@@ -5712,6 +5744,14 @@
             if (r == null || r == mAnimatingRecents) {
                 return;
             }
+            if (mAnimatingRecents != null && mRecentsWillBeTop) {
+                // The activity is not the recents and it should be moved to back later, so it is
+                // better to keep its current appearance for the next transition. Otherwise the
+                // display orientation may be updated too early and the layout procedures at the
+                // end of finishing recents animation is skipped. That causes flickering because
+                // the surface of closing app hasn't updated to invisible.
+                return;
+            }
             if (mFixedRotationLaunchingApp == null) {
                 // In most cases this is a no-op if the activity doesn't have fixed rotation.
                 // Otherwise it could be from finishing recents animation while the display has
@@ -5762,6 +5802,19 @@
             mRemoteInsetsController = controller;
         }
 
+        /**
+         * Notifies the remote insets controller that the top focused window has changed.
+         *
+         * @param packageName The name of the package that is open in the top focused window.
+         */
+        void topFocusedWindowChanged(String packageName) {
+            try {
+                mRemoteInsetsController.topFocusedWindowChanged(packageName);
+            } catch (RemoteException e) {
+                Slog.w(TAG, "Failed to deliver package in top focused window change", e);
+            }
+        }
+
         void notifyInsetsChanged() {
             try {
                 mRemoteInsetsController.insetsChanged(
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 0d467c50..515d1f5 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -29,6 +29,9 @@
 import static android.view.InsetsState.ITYPE_BOTTOM_GESTURES;
 import static android.view.InsetsState.ITYPE_BOTTOM_TAPPABLE_ELEMENT;
 import static android.view.InsetsState.ITYPE_CAPTION_BAR;
+import static android.view.InsetsState.ITYPE_CLIMATE_BAR;
+import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR;
+import static android.view.InsetsState.ITYPE_IME;
 import static android.view.InsetsState.ITYPE_LEFT_DISPLAY_CUTOUT;
 import static android.view.InsetsState.ITYPE_LEFT_GESTURES;
 import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
@@ -71,6 +74,7 @@
 import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
 import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING;
@@ -102,6 +106,11 @@
 import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
 import static android.view.WindowManagerGlobal.ADD_OKAY;
 import static android.view.WindowManagerPolicyConstants.ACTION_HDMI_PLUGGED;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_BOTTOM;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_LEFT;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_RIGHT;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_TOP;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_UNKNOWN;
 import static android.view.WindowManagerPolicyConstants.EXTRA_HDMI_PLUGGED_STATE;
 import static android.view.WindowManagerPolicyConstants.NAV_BAR_BOTTOM;
 import static android.view.WindowManagerPolicyConstants.NAV_BAR_LEFT;
@@ -241,6 +250,10 @@
                     | View.STATUS_BAR_TRANSPARENT
                     | View.NAVIGATION_BAR_TRANSPARENT;
 
+    private static final int[] SHOW_TYPES_FOR_SWIPE =
+            {ITYPE_NAVIGATION_BAR, ITYPE_STATUS_BAR, ITYPE_CLIMATE_BAR, ITYPE_EXTRA_NAVIGATION_BAR};
+    private static final int[] SHOW_TYPES_FOR_PANIC = {ITYPE_NAVIGATION_BAR};
+
     private final WindowManagerService mService;
     private final Context mContext;
     private final Context mUiContext;
@@ -314,6 +327,27 @@
     private int[] mNavigationBarHeightForRotationInCarMode = new int[4];
     private int[] mNavigationBarWidthForRotationInCarMode = new int[4];
 
+    // Alternative status bar for when flexible insets mapping is used to place the status bar on
+    // another side of the screen.
+    private WindowState mStatusBarAlt = null;
+    @WindowManagerPolicy.AltBarPosition
+    private int mStatusBarAltPosition = ALT_BAR_UNKNOWN;
+    // Alternative navigation bar for when flexible insets mapping is used to place the navigation
+    // bar elsewhere on the screen.
+    private WindowState mNavigationBarAlt = null;
+    @WindowManagerPolicy.AltBarPosition
+    private int mNavigationBarAltPosition = ALT_BAR_UNKNOWN;
+    // Alternative climate bar for when flexible insets mapping is used to place a climate bar on
+    // the screen.
+    private WindowState mClimateBarAlt = null;
+    @WindowManagerPolicy.AltBarPosition
+    private int mClimateBarAltPosition = ALT_BAR_UNKNOWN;
+    // Alternative extra nav bar for when flexible insets mapping is used to place an extra nav bar
+    // on the screen.
+    private WindowState mExtraNavBarAlt = null;
+    @WindowManagerPolicy.AltBarPosition
+    private int mExtraNavBarAltPosition = ALT_BAR_UNKNOWN;
+
     /** See {@link #getNavigationBarFrameHeight} */
     private int[] mNavigationBarFrameHeightForRotationDefault = new int[4];
 
@@ -386,11 +420,6 @@
     private int mForcingShowNavBarLayer;
     private boolean mForceShowSystemBars;
 
-    /**
-     * Force the display of system bars regardless of other settings.
-     */
-    private boolean mForceShowSystemBarsFromExternal;
-
     private boolean mShowingDream;
     private boolean mLastShowingDream;
     private boolean mDreamingLockscreen;
@@ -436,7 +465,7 @@
                 case MSG_REQUEST_TRANSIENT_BARS:
                     synchronized (mLock) {
                         WindowState targetBar = (msg.arg1 == MSG_REQUEST_TRANSIENT_BARS_ARG_STATUS)
-                                ? mStatusBar : mNavigationBar;
+                                ? getStatusBar() : getNavigationBar();
                         if (targetBar != null) {
                             requestTransientBars(targetBar);
                         }
@@ -480,7 +509,6 @@
         final Resources r = mContext.getResources();
         mCarDockEnablesAccelerometer = r.getBoolean(R.bool.config_carDockEnablesAccelerometer);
         mDeskDockEnablesAccelerometer = r.getBoolean(R.bool.config_deskDockEnablesAccelerometer);
-        mForceShowSystemBarsFromExternal = r.getBoolean(R.bool.config_forceShowSystemBars);
 
         mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(
                 Context.ACCESSIBILITY_SERVICE);
@@ -500,6 +528,7 @@
                             if (mStatusBar != null) {
                                 requestTransientBars(mStatusBar);
                             }
+                            checkAltBarSwipeForTransientBars(ALT_BAR_TOP);
                         }
                     }
 
@@ -510,6 +539,7 @@
                                     && mNavigationBarPosition == NAV_BAR_BOTTOM) {
                                 requestTransientBars(mNavigationBar);
                             }
+                            checkAltBarSwipeForTransientBars(ALT_BAR_BOTTOM);
                         }
                     }
 
@@ -526,6 +556,7 @@
                                             excludedRegion)) {
                                 requestTransientBars(mNavigationBar);
                             }
+                            checkAltBarSwipeForTransientBars(ALT_BAR_RIGHT);
                         }
                         excludedRegion.recycle();
                     }
@@ -543,6 +574,7 @@
                                             excludedRegion)) {
                                 requestTransientBars(mNavigationBar);
                             }
+                            checkAltBarSwipeForTransientBars(ALT_BAR_LEFT);
                         }
                         excludedRegion.recycle();
                     }
@@ -644,6 +676,21 @@
         mHandler.post(mGestureNavigationSettingsObserver::register);
     }
 
+    private void checkAltBarSwipeForTransientBars(@WindowManagerPolicy.AltBarPosition int pos) {
+        if (mStatusBarAlt != null && mStatusBarAltPosition == pos) {
+            requestTransientBars(mStatusBarAlt);
+        }
+        if (mNavigationBarAlt != null && mNavigationBarAltPosition == pos) {
+            requestTransientBars(mNavigationBarAlt);
+        }
+        if (mClimateBarAlt != null && mClimateBarAltPosition == pos) {
+            requestTransientBars(mClimateBarAlt);
+        }
+        if (mExtraNavBarAlt != null && mExtraNavBarAltPosition == pos) {
+            requestTransientBars(mExtraNavBarAlt);
+        }
+    }
+
     void systemReady() {
         mSystemGestures.systemReady();
         if (mService.mPointerLocationEnabled) {
@@ -698,17 +745,6 @@
         return mDockMode;
     }
 
-    /**
-     * @see WindowManagerService.setForceShowSystemBars
-     */
-    void setForceShowSystemBars(boolean forceShowSystemBars) {
-        mForceShowSystemBarsFromExternal = forceShowSystemBars;
-    }
-
-    boolean getForceShowSystemBars() {
-        return mForceShowSystemBarsFromExternal;
-    }
-
     public boolean hasNavigationBar() {
         return mHasNavigationBar;
     }
@@ -916,6 +952,20 @@
                 }
                 break;
         }
+
+        // Check if alternate bars positions were updated.
+        if (mStatusBarAlt == win) {
+            mStatusBarAltPosition = getAltBarPosition(attrs);
+        }
+        if (mNavigationBarAlt == win) {
+            mNavigationBarAltPosition = getAltBarPosition(attrs);
+        }
+        if (mClimateBarAlt == win) {
+            mClimateBarAltPosition = getAltBarPosition(attrs);
+        }
+        if (mExtraNavBarAlt == win) {
+            mExtraNavBarAltPosition = getAltBarPosition(attrs);
+        }
     }
 
     /**
@@ -955,10 +1005,9 @@
                 mContext.enforcePermission(
                         android.Manifest.permission.STATUS_BAR_SERVICE, callingPid, callingUid,
                         "DisplayPolicy");
-                if (mStatusBar != null) {
-                    if (mStatusBar.isAlive()) {
-                        return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
-                    }
+                if ((mStatusBar != null && mStatusBar.isAlive())
+                        || (mStatusBarAlt != null && mStatusBarAlt.isAlive())) {
+                    return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
                 }
                 break;
             case TYPE_NOTIFICATION_SHADE:
@@ -975,10 +1024,9 @@
                 mContext.enforcePermission(
                         android.Manifest.permission.STATUS_BAR_SERVICE, callingPid, callingUid,
                         "DisplayPolicy");
-                if (mNavigationBar != null) {
-                    if (mNavigationBar.isAlive()) {
-                        return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
-                    }
+                if ((mNavigationBar != null && mNavigationBar.isAlive())
+                        || (mNavigationBarAlt != null && mNavigationBarAlt.isAlive())) {
+                    return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
                 }
                 break;
             case TYPE_NAVIGATION_BAR_PANEL:
@@ -1010,6 +1058,33 @@
                     android.Manifest.permission.STATUS_BAR_SERVICE, callingPid, callingUid,
                     "DisplayPolicy");
             enforceSingleInsetsTypeCorrespondingToWindowType(attrs.providesInsetsTypes);
+
+            for (@InternalInsetsType int insetType : attrs.providesInsetsTypes) {
+                switch (insetType) {
+                    case ITYPE_STATUS_BAR:
+                        if ((mStatusBar != null && mStatusBar.isAlive())
+                                || (mStatusBarAlt != null && mStatusBarAlt.isAlive())) {
+                            return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
+                        }
+                        break;
+                    case ITYPE_NAVIGATION_BAR:
+                        if ((mNavigationBar != null && mNavigationBar.isAlive())
+                                || (mNavigationBarAlt != null && mNavigationBarAlt.isAlive())) {
+                            return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
+                        }
+                        break;
+                    case ITYPE_CLIMATE_BAR:
+                        if (mClimateBarAlt != null && mClimateBarAlt.isAlive()) {
+                            return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
+                        }
+                        break;
+                    case ITYPE_EXTRA_NAVIGATION_BAR:
+                        if (mExtraNavBarAlt != null && mExtraNavBarAlt.isAlive()) {
+                            return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
+                        }
+                        break;
+                }
+            }
         }
         return ADD_OKAY;
     }
@@ -1101,7 +1176,27 @@
                 break;
             default:
                 if (attrs.providesInsetsTypes != null) {
-                    for (int insetsType : attrs.providesInsetsTypes) {
+                    for (@InternalInsetsType int insetsType : attrs.providesInsetsTypes) {
+                        switch (insetsType) {
+                            case ITYPE_STATUS_BAR:
+                                mStatusBarAlt = win;
+                                mStatusBarController.setWindow(mStatusBarAlt);
+                                mStatusBarAltPosition = getAltBarPosition(attrs);
+                                break;
+                            case ITYPE_NAVIGATION_BAR:
+                                mNavigationBarAlt = win;
+                                mNavigationBarController.setWindow(mNavigationBarAlt);
+                                mNavigationBarAltPosition = getAltBarPosition(attrs);
+                                break;
+                            case ITYPE_CLIMATE_BAR:
+                                mClimateBarAlt = win;
+                                mClimateBarAltPosition = getAltBarPosition(attrs);
+                                break;
+                            case ITYPE_EXTRA_NAVIGATION_BAR:
+                                mExtraNavBarAlt = win;
+                                mExtraNavBarAltPosition = getAltBarPosition(attrs);
+                                break;
+                        }
                         mDisplayContent.setInsetProvider(insetsType, win, null);
                     }
                 }
@@ -1109,6 +1204,22 @@
         }
     }
 
+    @WindowManagerPolicy.AltBarPosition
+    private int getAltBarPosition(WindowManager.LayoutParams params) {
+        switch (params.gravity) {
+            case Gravity.LEFT:
+                return ALT_BAR_LEFT;
+            case Gravity.RIGHT:
+                return ALT_BAR_RIGHT;
+            case Gravity.BOTTOM:
+                return ALT_BAR_BOTTOM;
+            case Gravity.TOP:
+                return ALT_BAR_TOP;
+            default:
+                return ALT_BAR_UNKNOWN;
+        }
+    }
+
     TriConsumer<DisplayFrames, WindowState, Rect> getImeSourceFrameProvider() {
         return (displayFrames, windowState, inOutFrame) -> {
             if (mNavigationBar != null && navigationBarPosition(displayFrames.mDisplayWidth,
@@ -1133,6 +1244,8 @@
             switch (insetsType) {
                 case ITYPE_NAVIGATION_BAR:
                 case ITYPE_STATUS_BAR:
+                case ITYPE_CLIMATE_BAR:
+                case ITYPE_EXTRA_NAVIGATION_BAR:
                 case ITYPE_CAPTION_BAR:
                     if (++count > 1) {
                         throw new IllegalArgumentException(
@@ -1149,12 +1262,14 @@
      * @param win The window being removed.
      */
     void removeWindowLw(WindowState win) {
-        if (mStatusBar == win) {
+        if (mStatusBar == win || mStatusBarAlt == win) {
             mStatusBar = null;
+            mStatusBarAlt = null;
             mStatusBarController.setWindow(null);
             mDisplayContent.setInsetProvider(ITYPE_STATUS_BAR, null, null);
-        } else if (mNavigationBar == win) {
+        } else if (mNavigationBar == win || mNavigationBarAlt == win) {
             mNavigationBar = null;
+            mNavigationBarAlt = null;
             mNavigationBarController.setWindow(null);
             mDisplayContent.setInsetProvider(ITYPE_NAVIGATION_BAR, null, null);
         } else if (mNotificationShade == win) {
@@ -1162,6 +1277,12 @@
             if (mDisplayContent.isDefaultDisplay) {
                 mService.mPolicy.setKeyguardCandidateLw(null);
             }
+        } else if (mClimateBarAlt == win) {
+            mClimateBarAlt = null;
+            mDisplayContent.setInsetProvider(ITYPE_CLIMATE_BAR, null, null);
+        } else if (mExtraNavBarAlt == win) {
+            mExtraNavBarAlt = null;
+            mDisplayContent.setInsetProvider(ITYPE_EXTRA_NAVIGATION_BAR, null, null);
         }
         if (mLastFocusedWindow == win) {
             mLastFocusedWindow = null;
@@ -1180,7 +1301,7 @@
     }
 
     WindowState getStatusBar() {
-        return mStatusBar;
+        return mStatusBar != null ? mStatusBar : mStatusBarAlt;
     }
 
     WindowState getNotificationShade() {
@@ -1188,7 +1309,7 @@
     }
 
     WindowState getNavigationBar() {
-        return mNavigationBar;
+        return mNavigationBar != null ? mNavigationBar : mNavigationBarAlt;
     }
 
     /**
@@ -1250,6 +1371,47 @@
                     return R.anim.dock_left_enter;
                 }
             }
+        } else if (win == mStatusBarAlt || win == mNavigationBarAlt || win == mClimateBarAlt
+                || win == mExtraNavBarAlt) {
+            if (win.getAttrs().windowAnimations != 0) {
+                return ANIMATION_STYLEABLE;
+            }
+
+            int pos = (win == mStatusBarAlt) ? mStatusBarAltPosition : mNavigationBarAltPosition;
+
+            boolean isExitOrHide = transit == TRANSIT_EXIT || transit == TRANSIT_HIDE;
+            boolean isEnterOrShow = transit == TRANSIT_ENTER || transit == TRANSIT_SHOW;
+
+            switch (pos) {
+                case ALT_BAR_LEFT:
+                    if (isExitOrHide) {
+                        return R.anim.dock_left_exit;
+                    } else if (isEnterOrShow) {
+                        return R.anim.dock_left_enter;
+                    }
+                    break;
+                case ALT_BAR_RIGHT:
+                    if (isExitOrHide) {
+                        return R.anim.dock_right_exit;
+                    } else if (isEnterOrShow) {
+                        return R.anim.dock_right_enter;
+                    }
+                    break;
+                case ALT_BAR_BOTTOM:
+                    if (isExitOrHide) {
+                        return R.anim.dock_bottom_exit;
+                    } else if (isEnterOrShow) {
+                        return R.anim.dock_bottom_enter;
+                    }
+                    break;
+                case ALT_BAR_TOP:
+                    if (isExitOrHide) {
+                        return R.anim.dock_top_exit;
+                    } else if (isEnterOrShow) {
+                        return R.anim.dock_top_enter;
+                    }
+                    break;
+            }
         }
 
         if (transit == TRANSIT_PREVIEW_DONE) {
@@ -1430,7 +1592,7 @@
                             if (mInputConsumer == null) {
                                 return;
                             }
-                            showNavigationBar();
+                            showSystemBars();
                             // Any user activity always causes us to show the
                             // navigation controls, if they had been hidden.
                             // We also clear the low profile and only content
@@ -1465,13 +1627,13 @@
             }
         }
 
-        private void showNavigationBar() {
+        private void showSystemBars() {
             final InsetsSourceProvider provider = mDisplayContent.getInsetsStateController()
                     .peekSourceProvider(ITYPE_NAVIGATION_BAR);
             final InsetsControlTarget target =
                     provider != null ? provider.getControlTarget() : null;
             if (target != null) {
-                target.showInsets(Type.navigationBars(), false /* fromIme */);
+                target.showInsets(Type.systemBars(), false /* fromIme */);
             }
         }
     }
@@ -1608,7 +1770,7 @@
                 mInputConsumer = null;
                 Slog.v(TAG, INPUT_CONSUMER_NAVIGATION + " dismissed.");
             }
-        } else if (mInputConsumer == null && mStatusBar != null && canHideNavigationBar()) {
+        } else if (mInputConsumer == null && getStatusBar() != null && canHideNavigationBar()) {
             mInputConsumer = mDisplayContent.getInputMonitor().createInputConsumer(
                     mHandler.getLooper(),
                     INPUT_CONSUMER_NAVIGATION,
@@ -2083,6 +2245,13 @@
             df.set(left, top, dfu.right - right, dfu.bottom - bottom);
             if (attached == null) {
                 pf.set(df);
+                if ((pfl & PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME) != 0) {
+                    final InsetsSource source = mDisplayContent.getInsetsPolicy()
+                            .getInsetsForDispatch(win).peekSource(ITYPE_IME);
+                    if (source != null) {
+                        pf.inset(source.calculateInsets(pf, false /* ignoreVisibility */));
+                    }
+                }
                 vf.set(adjust != SOFT_INPUT_ADJUST_NOTHING
                         ? displayFrames.mCurrent : displayFrames.mDock);
             } else {
@@ -2490,6 +2659,14 @@
         }
 
         win.computeFrame(displayFrames);
+
+        // When system bars are added to the Android device through {@link #layoutStatusBar} and
+        // {@link #layoutNavigationBar}, the displayFrames are adjusted to take the system bars into
+        // account. The call below adjusts the display frames for system bars which use flexible
+        // insets mapping instead of {@link #layoutStatusbar} and {@link #layoutNavigationBar}. Note
+        // that this call is a no-op if not using flexible insets mapping.
+        adjustDisplayFramesForFlexibleInsets(win, displayFrames);
+
         // Dock windows carve out the bottom of the screen, so normal windows
         // can't appear underneath them.
         if (type == TYPE_INPUT_METHOD && win.isVisibleLw()
@@ -2502,6 +2679,40 @@
         }
     }
 
+    private void adjustDisplayFramesForFlexibleInsets(WindowState win,
+            DisplayFrames displayFrames) {
+        if (win == mStatusBarAlt) {
+            adjustDisplayFramesForWindow(win, mStatusBarAltPosition, displayFrames);
+        } else if (win == mNavigationBarAlt) {
+            adjustDisplayFramesForWindow(win, mNavigationBarAltPosition, displayFrames);
+        } else if (win == mClimateBarAlt) {
+            adjustDisplayFramesForWindow(win, mClimateBarAltPosition, displayFrames);
+        } else if (win == mExtraNavBarAlt) {
+            adjustDisplayFramesForWindow(win, mExtraNavBarAltPosition, displayFrames);
+        }
+    }
+
+    private static void adjustDisplayFramesForWindow(WindowState win,
+            @WindowManagerPolicy.AltBarPosition int position, DisplayFrames displayFrames) {
+        final Rect frame = win.getFrameLw();
+
+        // Note: This doesn't take into account display cutouts.
+        switch (position) {
+            case ALT_BAR_TOP:
+                displayFrames.mStable.top = frame.bottom;
+                break;
+            case ALT_BAR_BOTTOM:
+                displayFrames.mStable.bottom = displayFrames.mStableFullscreen.bottom = frame.top;
+                break;
+            case ALT_BAR_LEFT:
+                displayFrames.mStable.left = displayFrames.mStableFullscreen.left = frame.right;
+                break;
+            case ALT_BAR_RIGHT:
+                displayFrames.mStable.right = displayFrames.mStableFullscreen.right = frame.left;
+                break;
+        }
+    }
+
     private void layoutWallpaper(DisplayFrames displayFrames, Rect pf, Rect df, Rect cf) {
         // The wallpaper has Real Ultimate Power
         df.set(displayFrames.mUnrestricted);
@@ -2694,10 +2905,10 @@
             mDreamingLockscreen = mService.mPolicy.isKeyguardShowingAndNotOccluded();
         }
 
-        if (mStatusBar != null) {
+        if (getStatusBar() != null) {
             if (DEBUG_LAYOUT) Slog.i(TAG, "force=" + mForceStatusBar
                     + " top=" + mTopFullscreenOpaqueWindowState);
-            final boolean forceShowStatusBar = (mStatusBar.getAttrs().privateFlags
+            final boolean forceShowStatusBar = (getStatusBar().getAttrs().privateFlags
                     & PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR) != 0;
             final boolean notificationShadeForcesShowingNavigation =
                     mNotificationShade != null
@@ -3183,6 +3394,16 @@
         return mNavigationBarPosition;
     }
 
+    @WindowManagerPolicy.AltBarPosition
+    int getAlternateStatusBarPosition() {
+        return mStatusBarAltPosition;
+    }
+
+    @WindowManagerPolicy.AltBarPosition
+    int getAlternateNavBarPosition() {
+        return mNavigationBarAltPosition;
+    }
+
     /**
      * A new window has been focused.
      */
@@ -3215,8 +3436,22 @@
                 return;
             }
 
+            final InsetsState requestedState = controlTarget.getRequestedInsetsState();
+            final @InsetsType int restorePositionTypes =
+                    (requestedState.getSourceOrDefaultVisibility(ITYPE_NAVIGATION_BAR)
+                            ? Type.navigationBars() : 0)
+                    | (requestedState.getSourceOrDefaultVisibility(ITYPE_STATUS_BAR)
+                            ? Type.statusBars() : 0)
+                    | (mExtraNavBarAlt != null
+                            && requestedState.getSourceOrDefaultVisibility(
+                                    ITYPE_EXTRA_NAVIGATION_BAR)
+                            ? Type.navigationBars() : 0)
+                    | (mClimateBarAlt != null
+                            && requestedState.getSourceOrDefaultVisibility(ITYPE_CLIMATE_BAR)
+                            ? Type.statusBars() : 0);
+
             if (swipeTarget == mNavigationBar
-                    && !getInsetsPolicy().isHidden(ITYPE_NAVIGATION_BAR)) {
+                    && (restorePositionTypes & Type.navigationBars()) != 0) {
                 // Don't show status bar when swiping on already visible navigation bar.
                 // But restore the position of navigation bar if it has been moved by the control
                 // target.
@@ -3224,14 +3459,13 @@
                 return;
             }
 
-            int insetsTypesToShow = Type.systemBars();
-
             if (controlTarget.canShowTransient()) {
-                insetsTypesToShow &= ~mDisplayContent.getInsetsPolicy().showTransient(IntArray.wrap(
-                        new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR}));
-            }
-            if (insetsTypesToShow != 0) {
-                controlTarget.showInsets(insetsTypesToShow, false);
+                // Show transient bars if they are hidden; restore position if they are visible.
+                mDisplayContent.getInsetsPolicy().showTransient(SHOW_TYPES_FOR_SWIPE);
+                controlTarget.showInsets(restorePositionTypes, false);
+            } else {
+                // Restore visibilities and positions of system bars.
+                controlTarget.showInsets(Type.statusBars() | Type.navigationBars(), false);
             }
         } else {
             boolean sb = mStatusBarController.checkShowTransientBarLw();
@@ -3344,8 +3578,8 @@
         final boolean isFullscreen = (visibility & (View.SYSTEM_UI_FLAG_FULLSCREEN
                         | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)) != 0
                 || (PolicyControl.getWindowFlags(win, win.mAttrs) & FLAG_FULLSCREEN) != 0
-                || (mStatusBar != null && insetsPolicy.isHidden(ITYPE_STATUS_BAR))
-                || (mNavigationBar != null && insetsPolicy.isHidden(
+                || (getStatusBar() != null && insetsPolicy.isHidden(ITYPE_STATUS_BAR))
+                || (getNavigationBar() != null && insetsPolicy.isHidden(
                         ITYPE_NAVIGATION_BAR));
         final int behavior = win.mAttrs.insetsFlags.behavior;
         final boolean isImmersive = (visibility & (View.SYSTEM_UI_FLAG_IMMERSIVE
@@ -3547,8 +3781,7 @@
         // We need to force system bars when the docked stack is visible, when the freeform stack
         // is focused but also when we are resizing for the transitions when docked stack
         // visibility changes.
-        mForceShowSystemBars = dockedStackVisible || win.inFreeformWindowingMode() || resizing
-                || mForceShowSystemBarsFromExternal;
+        mForceShowSystemBars = dockedStackVisible || win.inFreeformWindowingMode() || resizing;
         final boolean forceOpaqueStatusBar = mForceShowSystemBars && !isKeyguardShowing();
 
         // apply translucent bar vis flags
@@ -3608,7 +3841,7 @@
         final boolean hideNavBarSysui =
                 (vis & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0;
 
-        final boolean transientStatusBarAllowed = mStatusBar != null
+        final boolean transientStatusBarAllowed = getStatusBar() != null
                 && (notificationShadeHasFocus || (!mForceShowSystemBars
                 && (hideStatusBarWM || (hideStatusBarSysui && immersiveSticky))));
 
@@ -3766,7 +3999,7 @@
     // TODO(b/118118435): Remove this after migration
     private boolean isImmersiveMode(int vis) {
         final int flags = View.SYSTEM_UI_FLAG_IMMERSIVE | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
-        return mNavigationBar != null
+        return getNavigationBar() != null
                 && (vis & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0
                 && (vis & flags) != 0
                 && canHideNavigationBar();
@@ -3774,7 +4007,7 @@
 
     private boolean isImmersiveMode(WindowState win) {
         final int behavior = win.mAttrs.insetsFlags.behavior;
-        return mNavigationBar != null
+        return getNavigationBar() != null
                 && canHideNavigationBar()
                 && (behavior == BEHAVIOR_SHOW_BARS_BY_SWIPE
                         || behavior == BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE)
@@ -3809,8 +4042,7 @@
                 mPendingPanicGestureUptime = SystemClock.uptimeMillis();
                 if (!isNavBarEmpty(mLastSystemUiFlags)) {
                     mNavigationBarController.showTransient();
-                    mDisplayContent.getInsetsPolicy().showTransient(IntArray.wrap(
-                            new int[] {ITYPE_NAVIGATION_BAR}));
+                    mDisplayContent.getInsetsPolicy().showTransient(SHOW_TYPES_FOR_PANIC);
                 }
             }
         }
@@ -3855,8 +4087,8 @@
     public void takeScreenshot(int screenshotType, int source) {
         if (mScreenshotHelper != null) {
             mScreenshotHelper.takeScreenshot(screenshotType,
-                    mStatusBar != null && mStatusBar.isVisibleLw(),
-                    mNavigationBar != null && mNavigationBar.isVisibleLw(),
+                    getStatusBar() != null && getStatusBar().isVisibleLw(),
+                    getNavigationBar() != null && getNavigationBar().isVisibleLw(),
                     source, mHandler, null /* completionConsumer */);
         }
     }
@@ -3894,6 +4126,11 @@
         if (mStatusBar != null) {
             pw.print(prefix); pw.print("mStatusBar="); pw.print(mStatusBar);
         }
+        if (mStatusBarAlt != null) {
+            pw.print(prefix); pw.print("mStatusBarAlt="); pw.print(mStatusBarAlt);
+            pw.print(prefix); pw.print("mStatusBarAltPosition=");
+            pw.println(mStatusBarAltPosition);
+        }
         if (mNotificationShade != null) {
             pw.print(prefix); pw.print("mExpandedPanel="); pw.print(mNotificationShade);
         }
@@ -3905,6 +4142,21 @@
             pw.print(prefix); pw.print("mNavigationBarPosition=");
             pw.println(mNavigationBarPosition);
         }
+        if (mNavigationBarAlt != null) {
+            pw.print(prefix); pw.print("mNavigationBarAlt="); pw.println(mNavigationBarAlt);
+            pw.print(prefix); pw.print("mNavigationBarAltPosition=");
+            pw.println(mNavigationBarAltPosition);
+        }
+        if (mClimateBarAlt != null) {
+            pw.print(prefix); pw.print("mClimateBarAlt="); pw.println(mClimateBarAlt);
+            pw.print(prefix); pw.print("mClimateBarAltPosition=");
+            pw.println(mClimateBarAltPosition);
+        }
+        if (mExtraNavBarAlt != null) {
+            pw.print(prefix); pw.print("mExtraNavBarAlt="); pw.println(mExtraNavBarAlt);
+            pw.print(prefix); pw.print("mExtraNavBarAltPosition=");
+            pw.println(mExtraNavBarAltPosition);
+        }
         if (mFocusedWindow != null) {
             pw.print(prefix); pw.print("mFocusedWindow="); pw.println(mFocusedWindow);
         }
@@ -3923,8 +4175,8 @@
         }
         pw.print(prefix); pw.print("mTopIsFullscreen="); pw.println(mTopIsFullscreen);
         pw.print(prefix); pw.print("mForceStatusBar="); pw.print(mForceStatusBar);
-        pw.print(prefix); pw.print("mForceShowSystemBarsFromExternal=");
-        pw.print(mForceShowSystemBarsFromExternal);
+        pw.print(prefix); pw.print("mRemoteInsetsControllerControlsSystemBars");
+        pw.print(mDisplayContent.getInsetsPolicy().getRemoteInsetsControllerControlsSystemBars());
         pw.print(" mAllowLockscreenWhenOn="); pw.println(mAllowLockscreenWhenOn);
         mStatusBarController.dump(pw, prefix);
         mNavigationBarController.dump(pw, prefix);
diff --git a/services/core/java/com/android/server/wm/DisplayRotation.java b/services/core/java/com/android/server/wm/DisplayRotation.java
index 37ecee8..1284e00 100644
--- a/services/core/java/com/android/server/wm/DisplayRotation.java
+++ b/services/core/java/com/android/server/wm/DisplayRotation.java
@@ -330,10 +330,8 @@
         // It's also not likely to rotate a TV screen.
         final boolean isTv = mContext.getPackageManager().hasSystemFeature(
                 PackageManager.FEATURE_LEANBACK);
-        final boolean forceDesktopMode =
-                mService.mForceDesktopModeOnExternalDisplays && !isDefaultDisplay;
         mDefaultFixedToUserRotation =
-                (isCar || isTv || mService.mIsPc || forceDesktopMode)
+                (isCar || isTv || mService.mIsPc || mDisplayContent.forceDesktopMode())
                 // For debug purposes the next line turns this feature off with:
                 // $ adb shell setprop config.override_forced_orient true
                 // $ adb shell wm size reset
diff --git a/services/core/java/com/android/server/wm/DisplayWindowSettings.java b/services/core/java/com/android/server/wm/DisplayWindowSettings.java
index 470a02e..34b403b 100644
--- a/services/core/java/com/android/server/wm/DisplayWindowSettings.java
+++ b/services/core/java/com/android/server/wm/DisplayWindowSettings.java
@@ -248,7 +248,7 @@
         writeSettingsIfNeeded(entry, displayInfo);
     }
 
-    private int getWindowingModeLocked(Entry entry, int displayId) {
+    private int getWindowingModeLocked(Entry entry, DisplayContent dc) {
         int windowingMode = entry != null ? entry.mWindowingMode
                 : WindowConfiguration.WINDOWING_MODE_UNDEFINED;
         // This display used to be in freeform, but we don't support freeform anymore, so fall
@@ -259,10 +259,8 @@
         }
         // No record is present so use default windowing mode policy.
         if (windowingMode == WindowConfiguration.WINDOWING_MODE_UNDEFINED) {
-            final boolean forceDesktopMode = mService.mForceDesktopModeOnExternalDisplays
-                    && displayId != Display.DEFAULT_DISPLAY;
             windowingMode = mService.mAtmService.mSupportsFreeformWindowManagement
-                    && (mService.mIsPc || forceDesktopMode)
+                    && (mService.mIsPc || dc.forceDesktopMode())
                     ? WindowConfiguration.WINDOWING_MODE_FREEFORM
                     : WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
         }
@@ -272,7 +270,7 @@
     int getWindowingModeLocked(DisplayContent dc) {
         final DisplayInfo displayInfo = dc.getDisplayInfo();
         final Entry entry = getEntry(displayInfo);
-        return getWindowingModeLocked(entry, dc.getDisplayId());
+        return getWindowingModeLocked(entry, dc);
     }
 
     void setWindowingModeLocked(DisplayContent dc, int mode) {
@@ -382,7 +380,7 @@
         final Entry entry = getOrCreateEntry(displayInfo);
 
         // Setting windowing mode first, because it may override overscan values later.
-        dc.setWindowingMode(getWindowingModeLocked(entry, dc.getDisplayId()));
+        dc.setWindowingMode(getWindowingModeLocked(entry, dc));
 
         dc.getDisplayRotation().restoreSettings(entry.mUserRotationMode,
                 entry.mUserRotation, entry.mFixedToUserRotation);
diff --git a/services/core/java/com/android/server/wm/DragState.java b/services/core/java/com/android/server/wm/DragState.java
index f840d92..7b562a9 100644
--- a/services/core/java/com/android/server/wm/DragState.java
+++ b/services/core/java/com/android/server/wm/DragState.java
@@ -269,10 +269,8 @@
             mInputEventReceiver = new DragInputEventReceiver(mClientChannel,
                     mService.mH.getLooper(), mDragDropController);
 
-            mDragApplicationHandle = new InputApplicationHandle(new Binder());
-            mDragApplicationHandle.name = "drag";
-            mDragApplicationHandle.dispatchingTimeoutNanos =
-                    WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS;
+            mDragApplicationHandle = new InputApplicationHandle(new Binder(), "drag",
+                    WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS);
 
             mDragWindowHandle = new InputWindowHandle(mDragApplicationHandle,
                     display.getDisplayId());
diff --git a/services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java b/services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java
index e7fbc334..5ab48e15 100644
--- a/services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java
+++ b/services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java
@@ -138,8 +138,9 @@
                         && dcTarget.getParentWindow() == mImeTargetFromIme
                         && dcTarget.mSubLayer > mImeTargetFromIme.getWindow().mSubLayer)
                 || mImeTargetFromIme == mDisplayContent.getImeFallback()
+                || mImeTargetFromIme == mDisplayContent.mInputMethodInputTarget
                 || controlTarget == mImeTargetFromIme
-                        && (mImeTargetFromIme.getWindow() == null 
+                        && (mImeTargetFromIme.getWindow() == null
                                 || !mImeTargetFromIme.getWindow().isClosing());
     }
 
diff --git a/services/core/java/com/android/server/wm/InputConsumerImpl.java b/services/core/java/com/android/server/wm/InputConsumerImpl.java
index 3b39b6b..1918573 100644
--- a/services/core/java/com/android/server/wm/InputConsumerImpl.java
+++ b/services/core/java/com/android/server/wm/InputConsumerImpl.java
@@ -67,10 +67,8 @@
         }
         mService.mInputManager.registerInputChannel(mServerChannel);
 
-        mApplicationHandle = new InputApplicationHandle(new Binder());
-        mApplicationHandle.name = name;
-        mApplicationHandle.dispatchingTimeoutNanos =
-                WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS;
+        mApplicationHandle = new InputApplicationHandle(new Binder(), name,
+                WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS);
 
         mWindowHandle = new InputWindowHandle(mApplicationHandle, displayId);
         mWindowHandle.name = name;
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index a70f98e..9bd6526 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -219,6 +219,11 @@
 
     WindowManagerPolicy.InputConsumer createInputConsumer(Looper looper, String name,
             InputEventReceiver.Factory inputEventReceiverFactory) {
+        if (!name.contentEquals(INPUT_CONSUMER_NAVIGATION)) {
+            throw new IllegalArgumentException("Illegal input consumer : " + name
+                    + ", display: " + mDisplayId);
+        }
+
         if (mInputConsumers.containsKey(name)) {
             throw new IllegalStateException("Existing input consumer found with name: " + name
                     + ", display: " + mDisplayId);
@@ -248,6 +253,11 @@
                 // stack, and we need FLAG_NOT_TOUCH_MODAL to ensure other events fall through
                 consumer.mWindowHandle.layoutParamsFlags |= FLAG_NOT_TOUCH_MODAL;
                 break;
+            case INPUT_CONSUMER_RECENTS_ANIMATION:
+                break;
+            default:
+                throw new IllegalArgumentException("Illegal input consumer : " + name
+                        + ", display: " + mDisplayId);
         }
         addInputConsumer(name, consumer);
     }
@@ -258,6 +268,8 @@
             final boolean hasFocus, final boolean hasWallpaper) {
         // Add a window to our list of input windows.
         inputWindowHandle.name = child.toString();
+        inputWindowHandle.inputApplicationHandle = child.mActivityRecord != null
+                ? child.mActivityRecord.getInputApplicationHandle(false /* update */) : null;
         flags = child.getSurfaceTouchableRegion(inputWindowHandle, flags);
         inputWindowHandle.layoutParamsFlags = flags;
         inputWindowHandle.layoutParamsType = type;
@@ -376,15 +388,8 @@
 
     public void setFocusedAppLw(ActivityRecord newApp) {
         // Focused app has changed.
-        if (newApp == null) {
-            mService.mInputManager.setFocusedApplication(mDisplayId, null);
-        } else {
-            final InputApplicationHandle handle = newApp.mInputApplicationHandle;
-            handle.name = newApp.toString();
-            handle.dispatchingTimeoutNanos = newApp.mInputDispatchingTimeoutNanos;
-
-            mService.mInputManager.setFocusedApplication(mDisplayId, handle);
-        }
+        mService.mInputManager.setFocusedApplication(mDisplayId,
+                newApp != null ? newApp.getInputApplicationHandle(true /* update */) : null);
     }
 
     public void pauseDispatchingLw(WindowToken window) {
@@ -459,9 +464,6 @@
             mDisplayContent.forAllWindows(this,
                     true /* traverseTopToBottom */);
 
-            if (mAddWallpaperInputConsumerHandle) {
-                mWallpaperInputConsumer.show(mInputTransaction, 0);
-            }
             if (!mUpdateInputWindowsImmediately) {
                 mDisplayContent.getPendingTransaction().merge(mInputTransaction);
                 mDisplayContent.scheduleAnimation();
diff --git a/services/core/java/com/android/server/wm/InsetsControlTarget.java b/services/core/java/com/android/server/wm/InsetsControlTarget.java
index 3ffc26a..5e7ed3f 100644
--- a/services/core/java/com/android/server/wm/InsetsControlTarget.java
+++ b/services/core/java/com/android/server/wm/InsetsControlTarget.java
@@ -17,6 +17,7 @@
 package com.android.server.wm;
 
 import android.inputmethodservice.InputMethodService;
+import android.view.InsetsState;
 import android.view.WindowInsets.Type.InsetsType;
 
 /**
@@ -38,6 +39,13 @@
     }
 
     /**
+     * @return The requested {@link InsetsState} of this target.
+     */
+    default InsetsState getRequestedInsetsState() {
+        return InsetsState.EMPTY;
+    }
+
+    /**
      * Instructs the control target to show inset sources.
      *
      * @param types to specify which types of insets source window should be shown.
diff --git a/services/core/java/com/android/server/wm/InsetsPolicy.java b/services/core/java/com/android/server/wm/InsetsPolicy.java
index 254356d..fd67db1 100644
--- a/services/core/java/com/android/server/wm/InsetsPolicy.java
+++ b/services/core/java/com/android/server/wm/InsetsPolicy.java
@@ -42,11 +42,12 @@
 import android.view.SurfaceControl;
 import android.view.SyncRtSurfaceTransactionApplier;
 import android.view.ViewRootImpl;
-import android.view.WindowInsets.Type.InsetsType;
 import android.view.WindowInsetsAnimation;
 import android.view.WindowInsetsAnimation.Bounds;
 import android.view.WindowInsetsAnimationControlListener;
+import android.view.WindowManager;
 
+import com.android.internal.R;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.server.DisplayThread;
 
@@ -97,12 +98,31 @@
     private BarWindow mStatusBar = new BarWindow(StatusBarManager.WINDOW_STATUS_BAR);
     private BarWindow mNavBar = new BarWindow(StatusBarManager.WINDOW_NAVIGATION_BAR);
     private boolean mAnimatingShown;
+
+    /**
+     * Let remote insets controller control system bars regardless of other settings.
+     */
+    private boolean mRemoteInsetsControllerControlsSystemBars;
     private final float[] mTmpFloat9 = new float[9];
 
     InsetsPolicy(InsetsStateController stateController, DisplayContent displayContent) {
         mStateController = stateController;
         mDisplayContent = displayContent;
         mPolicy = displayContent.getDisplayPolicy();
+        mRemoteInsetsControllerControlsSystemBars = mPolicy.getContext().getResources().getBoolean(
+                R.bool.config_remoteInsetsControllerControlsSystemBars);
+    }
+
+    boolean getRemoteInsetsControllerControlsSystemBars() {
+        return mRemoteInsetsControllerControlsSystemBars;
+    }
+
+    /**
+     * Used only for testing.
+     */
+    @VisibleForTesting
+    void setRemoteInsetsControllerControlsSystemBars(boolean controlsSystemBars) {
+        mRemoteInsetsControllerControlsSystemBars = controlsSystemBars;
     }
 
     /** Updates the target which can control system bars. */
@@ -133,15 +153,13 @@
         return provider != null && provider.hasWindow() && !provider.getSource().isVisible();
     }
 
-    @InsetsType int showTransient(IntArray types) {
-        @InsetsType int showingTransientTypes = 0;
+    void showTransient(@InternalInsetsType int[] types) {
         boolean changed = false;
-        for (int i = types.size() - 1; i >= 0; i--) {
-            final int type = types.get(i);
+        for (int i = types.length - 1; i >= 0; i--) {
+            final @InternalInsetsType int type = types[i];
             if (!isHidden(type)) {
                 continue;
             }
-            showingTransientTypes |= InsetsState.toPublicType(type);
             if (mShowingTransientTypes.indexOf(type) != -1) {
                 continue;
             }
@@ -169,7 +187,6 @@
                 }
             });
         }
-        return showingTransientTypes;
     }
 
     void hideTransient() {
@@ -256,6 +273,11 @@
             // Notification shade has control anyways, no reason to force anything.
             return focusedWin;
         }
+        if (remoteInsetsControllerControlsSystemBars(focusedWin)) {
+            mDisplayContent.mRemoteInsetsControlTarget.topFocusedWindowChanged(
+                    focusedWin.mAttrs.packageName);
+            return mDisplayContent.mRemoteInsetsControlTarget;
+        }
         if (forceShowsSystemBarsForWindowingMode) {
             // Status bar is forcibly shown for the windowing mode which is a steady state.
             // We don't want the client to control the status bar, and we will dispatch the real
@@ -285,6 +307,11 @@
             // Notification shade has control anyways, no reason to force anything.
             return focusedWin;
         }
+        if (remoteInsetsControllerControlsSystemBars(focusedWin)) {
+            mDisplayContent.mRemoteInsetsControlTarget.topFocusedWindowChanged(
+                    focusedWin.mAttrs.packageName);
+            return mDisplayContent.mRemoteInsetsControlTarget;
+        }
         if (forceShowsSystemBarsForWindowingMode) {
             // Navigation bar is forcibly shown for the windowing mode which is a steady state.
             // We don't want the client to control the navigation bar, and we will dispatch the real
@@ -300,6 +327,28 @@
         return focusedWin;
     }
 
+    /**
+     * Determines whether the remote insets controller should take control of system bars for all
+     * windows.
+     */
+    boolean remoteInsetsControllerControlsSystemBars(@Nullable WindowState focusedWin) {
+        if (focusedWin == null) {
+            return false;
+        }
+        if (!mRemoteInsetsControllerControlsSystemBars) {
+            return false;
+        }
+        if (mDisplayContent == null || mDisplayContent.mRemoteInsetsControlTarget == null) {
+            // No remote insets control target to take control of insets.
+            return false;
+        }
+        // If necessary, auto can control application windows when
+        // config_remoteInsetsControllerControlsSystemBars is set to true. This is useful in cases
+        // where we want to dictate system bar inset state for applications.
+        return focusedWin.getAttrs().type >= WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW
+                && 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;
@@ -321,10 +370,7 @@
         // We need to force system bars when the docked stack is visible, when the freeform stack
         // is visible but also when we are resizing for the transitions when docked stack
         // visibility changes.
-        return isDockedStackVisible
-                || isFreeformStackVisible
-                || isResizing
-                || mPolicy.getForceShowSystemBars();
+        return isDockedStackVisible || isFreeformStackVisible || isResizing;
     }
 
     @VisibleForTesting
diff --git a/services/core/java/com/android/server/wm/InsetsSourceProvider.java b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
index 8e6a265..9fdfbd0 100644
--- a/services/core/java/com/android/server/wm/InsetsSourceProvider.java
+++ b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
@@ -16,6 +16,8 @@
 
 package com.android.server.wm;
 
+import static android.view.InsetsState.ITYPE_CLIMATE_BAR;
+import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_IME;
 import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_STATUS_BAR;
@@ -94,7 +96,8 @@
                 new Point());
 
         final int type = source.getType();
-        if (type == ITYPE_STATUS_BAR || type == ITYPE_NAVIGATION_BAR) {
+        if (type == ITYPE_STATUS_BAR || type == ITYPE_NAVIGATION_BAR || type == ITYPE_CLIMATE_BAR
+                || type == ITYPE_EXTRA_NAVIGATION_BAR) {
             mControllable = sNewInsetsMode == NEW_INSETS_MODE_FULL;
         } else if (type == ITYPE_IME) {
             mControllable = sNewInsetsMode >= NEW_INSETS_MODE_IME;
diff --git a/services/core/java/com/android/server/wm/InsetsStateController.java b/services/core/java/com/android/server/wm/InsetsStateController.java
index 77bd4a4..68405c4 100644
--- a/services/core/java/com/android/server/wm/InsetsStateController.java
+++ b/services/core/java/com/android/server/wm/InsetsStateController.java
@@ -19,6 +19,8 @@
 import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
 import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
 import static android.view.InsetsState.ITYPE_CAPTION_BAR;
+import static android.view.InsetsState.ITYPE_CLIMATE_BAR;
+import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_IME;
 import static android.view.InsetsState.ITYPE_INVALID;
 import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
@@ -43,6 +45,7 @@
 import android.view.InsetsState;
 import android.view.InsetsState.InternalInsetsType;
 import android.view.WindowManager;
+import android.view.WindowManager.LayoutParams.WindowType;
 
 import com.android.server.inputmethod.InputMethodManagerInternal;
 import com.android.server.protolog.common.ProtoLog;
@@ -112,7 +115,7 @@
     }
 
     InsetsState getInsetsForWindowMetrics(@NonNull WindowManager.LayoutParams attrs) {
-        final @InternalInsetsType int type = getInsetsTypeForWindowType(attrs.type);
+        final @InternalInsetsType int type = getInsetsTypeForLayoutParams(attrs);
         final WindowToken token = mDisplayContent.getWindowToken(attrs.token);
         final @WindowingMode int windowingMode = token != null
                 ? token.getWindowingMode() : WINDOWING_MODE_UNDEFINED;
@@ -132,7 +135,9 @@
         return false;
     }
 
-    private static @InternalInsetsType int getInsetsTypeForWindowType(int type) {
+    private static @InternalInsetsType
+            int getInsetsTypeForLayoutParams(WindowManager.LayoutParams attrs) {
+        @WindowType int type = attrs.type;
         switch (type) {
             case TYPE_STATUS_BAR:
                 return ITYPE_STATUS_BAR;
@@ -140,9 +145,22 @@
                 return ITYPE_NAVIGATION_BAR;
             case TYPE_INPUT_METHOD:
                 return ITYPE_IME;
-            default:
-                return ITYPE_INVALID;
         }
+
+        // If not one of the types above, check whether an internal inset mapping is specified.
+        if (attrs.providesInsetsTypes != null) {
+            for (@InternalInsetsType int insetsType : attrs.providesInsetsTypes) {
+                switch (insetsType) {
+                    case ITYPE_STATUS_BAR:
+                    case ITYPE_NAVIGATION_BAR:
+                    case ITYPE_CLIMATE_BAR:
+                    case ITYPE_EXTRA_NAVIGATION_BAR:
+                        return insetsType;
+                }
+            }
+        }
+
+        return ITYPE_INVALID;
     }
 
     /** @see #getInsetsForDispatch */
@@ -155,14 +173,15 @@
             state.removeSource(type);
 
             // Navigation bar doesn't get influenced by anything else
-            if (type == ITYPE_NAVIGATION_BAR) {
+            if (type == ITYPE_NAVIGATION_BAR || type == ITYPE_EXTRA_NAVIGATION_BAR) {
                 state.removeSource(ITYPE_IME);
                 state.removeSource(ITYPE_STATUS_BAR);
+                state.removeSource(ITYPE_CLIMATE_BAR);
                 state.removeSource(ITYPE_CAPTION_BAR);
             }
 
             // Status bar doesn't get influenced by caption bar
-            if (type == ITYPE_STATUS_BAR) {
+            if (type == ITYPE_STATUS_BAR || type == ITYPE_CLIMATE_BAR) {
                 state.removeSource(ITYPE_CAPTION_BAR);
             }
 
@@ -280,6 +299,7 @@
         }
         if (changed) {
             notifyInsetsChanged();
+            mDisplayContent.updateSystemGestureExclusion();
             mDisplayContent.getDisplayPolicy().updateSystemUiVisibilityLw();
         }
     }
@@ -331,8 +351,12 @@
             @Nullable InsetsControlTarget fakeNavControlling) {
         onControlChanged(ITYPE_STATUS_BAR, statusControlling);
         onControlChanged(ITYPE_NAVIGATION_BAR, navControlling);
+        onControlChanged(ITYPE_CLIMATE_BAR, statusControlling);
+        onControlChanged(ITYPE_EXTRA_NAVIGATION_BAR, navControlling);
         onControlFakeTargetChanged(ITYPE_STATUS_BAR, fakeStatusControlling);
         onControlFakeTargetChanged(ITYPE_NAVIGATION_BAR, fakeNavControlling);
+        onControlFakeTargetChanged(ITYPE_CLIMATE_BAR, fakeStatusControlling);
+        onControlFakeTargetChanged(ITYPE_EXTRA_NAVIGATION_BAR, fakeNavControlling);
         notifyPendingInsetsControlChanged();
     }
 
diff --git a/services/core/java/com/android/server/wm/KeyguardController.java b/services/core/java/com/android/server/wm/KeyguardController.java
index 9c535e4..8ba92b5 100644
--- a/services/core/java/com/android/server/wm/KeyguardController.java
+++ b/services/core/java/com/android/server/wm/KeyguardController.java
@@ -49,7 +49,6 @@
 
 import com.android.internal.policy.IKeyguardDismissCallback;
 import com.android.server.policy.WindowManagerPolicy;
-import com.android.server.wm.ActivityTaskManagerInternal.SleepToken;
 
 import java.io.PrintWriter;
 
@@ -73,11 +72,14 @@
     private final SparseArray<KeyguardDisplayState> mDisplayStates = new SparseArray<>();
     private final ActivityTaskManagerService mService;
     private RootWindowContainer mRootWindowContainer;
+    private final ActivityTaskManagerInternal.SleepTokenAcquirer mSleepTokenAcquirer;
+
 
     KeyguardController(ActivityTaskManagerService service,
             ActivityStackSupervisor stackSupervisor) {
         mService = service;
         mStackSupervisor = stackSupervisor;
+        mSleepTokenAcquirer = mService.new SleepTokenAcquirerImpl("keyguard");
     }
 
     void setWindowManager(WindowManagerService windowManager) {
@@ -411,17 +413,17 @@
 
     private void updateKeyguardSleepToken(int displayId) {
         final KeyguardDisplayState state = getDisplay(displayId);
-        if (isKeyguardUnoccludedOrAodShowing(displayId) && state.mSleepToken == null) {
-            state.acquiredSleepToken();
-        } else if (!isKeyguardUnoccludedOrAodShowing(displayId) && state.mSleepToken != null) {
-            state.releaseSleepToken();
+        if (isKeyguardUnoccludedOrAodShowing(displayId)) {
+            state.mSleepTokenAcquirer.acquire(displayId);
+        } else if (!isKeyguardUnoccludedOrAodShowing(displayId)) {
+            state.mSleepTokenAcquirer.release(displayId);
         }
     }
 
     private KeyguardDisplayState getDisplay(int displayId) {
         KeyguardDisplayState state = mDisplayStates.get(displayId);
         if (state == null) {
-            state = new KeyguardDisplayState(mService, displayId);
+            state = new KeyguardDisplayState(mService, displayId, mSleepTokenAcquirer);
             mDisplayStates.append(displayId, state);
         }
         return state;
@@ -442,29 +444,18 @@
         private ActivityRecord mDismissingKeyguardActivity;
         private boolean mRequestDismissKeyguard;
         private final ActivityTaskManagerService mService;
-        private SleepToken mSleepToken;
+        private final ActivityTaskManagerInternal.SleepTokenAcquirer mSleepTokenAcquirer;
 
-        KeyguardDisplayState(ActivityTaskManagerService service, int displayId) {
+        KeyguardDisplayState(ActivityTaskManagerService service, int displayId,
+                ActivityTaskManagerInternal.SleepTokenAcquirer acquirer) {
             mService = service;
             mDisplayId = displayId;
+            mSleepTokenAcquirer = acquirer;
         }
 
         void onRemoved() {
             mDismissingKeyguardActivity = null;
-            releaseSleepToken();
-        }
-
-        void acquiredSleepToken() {
-            if (mSleepToken == null) {
-                mSleepToken = mService.acquireSleepToken("keyguard", mDisplayId);
-            }
-        }
-
-        void releaseSleepToken() {
-            if (mSleepToken != null) {
-                mSleepToken.release();
-                mSleepToken = null;
-            }
+            mSleepTokenAcquirer.release(mDisplayId);
         }
 
         void visibilitiesUpdated(KeyguardController controller, DisplayContent display) {
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
index a2b295a..65db23c 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimationController.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -702,6 +702,11 @@
                         "cleanupAnimation(): Notify animation finished mPendingAnimations=%d "
                                 + "reorderMode=%d",
                         mPendingAnimations.size(), reorderMode);
+        if (reorderMode != REORDER_MOVE_TO_ORIGINAL_POSITION) {
+            // Notify the state at the beginning because the removeAnimation may notify the
+            // transition is finished. This is a signal that there will be a next transition.
+            mDisplayContent.mFixedRotationTransitionListener.notifyRecentsWillBeTop();
+        }
         for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
             final TaskAnimationAdapter taskAdapter = mPendingAnimations.get(i);
             if (reorderMode == REORDER_MOVE_TO_TOP || reorderMode == REORDER_KEEP_IN_PLACE) {
@@ -742,8 +747,7 @@
                         mTargetActivityRecord.token);
             }
         }
-        mDisplayContent.mFixedRotationTransitionListener.onFinishRecentsAnimation(
-                reorderMode == REORDER_MOVE_TO_ORIGINAL_POSITION /* moveRecentsToBack */);
+        mDisplayContent.mFixedRotationTransitionListener.onFinishRecentsAnimation();
 
         // Notify that the animation has ended
         if (mStatusBar != null) {
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index 39aa60b..0d55dec 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -48,6 +48,7 @@
 import static com.android.server.wm.ActivityStack.ActivityState.RESUMED;
 import static com.android.server.wm.ActivityStack.ActivityState.STOPPED;
 import static com.android.server.wm.ActivityStack.ActivityState.STOPPING;
+import static com.android.server.wm.ActivityStack.STACK_VISIBILITY_INVISIBLE;
 import static com.android.server.wm.ActivityStackSupervisor.DEFER_RESUME;
 import static com.android.server.wm.ActivityStackSupervisor.ON_TOP;
 import static com.android.server.wm.ActivityStackSupervisor.dumpHistoryList;
@@ -219,6 +220,9 @@
     // transaction from the global transaction.
     private final SurfaceControl.Transaction mDisplayTransaction;
 
+    /** The token acquirer to put stacks on the displays to sleep */
+    final ActivityTaskManagerInternal.SleepTokenAcquirer mDisplayOffTokenAcquirer;
+
     /**
      * The modes which affect which tasks are returned when calling
      * {@link RootWindowContainer#anyTaskForId(int)}.
@@ -258,7 +262,7 @@
      * They are used by components that may hide and block interaction with underlying
      * activities.
      */
-    final ArrayList<ActivityTaskManagerInternal.SleepToken> mSleepTokens = new ArrayList<>();
+    final SparseArray<SleepToken> mSleepTokens = new SparseArray<>();
 
     /** Set when a power hint has started, but not ended. */
     private boolean mPowerHintSent;
@@ -443,6 +447,7 @@
         mService = service.mAtmService;
         mStackSupervisor = mService.mStackSupervisor;
         mStackSupervisor.mRootWindowContainer = this;
+        mDisplayOffTokenAcquirer = mService.new SleepTokenAcquirerImpl("Display-off");
     }
 
     boolean updateFocusedWindowLocked(int mode, boolean updateInputWindows) {
@@ -1927,24 +1932,29 @@
     }
 
     boolean attachApplication(WindowProcessController app) throws RemoteException {
-        final String processName = app.mName;
         boolean didSomething = false;
         for (int displayNdx = getChildCount() - 1; displayNdx >= 0; --displayNdx) {
-            final DisplayContent display = getChildAt(displayNdx);
-            final ActivityStack stack = display.getFocusedStack();
-            if (stack == null) {
-                continue;
-            }
-
             mTmpRemoteException = null;
             mTmpBoolean = false; // Set to true if an activity was started.
-            final PooledFunction c = PooledLambda.obtainFunction(
-                    RootWindowContainer::startActivityForAttachedApplicationIfNeeded, this,
-                    PooledLambda.__(ActivityRecord.class), app, stack.topRunningActivity());
-            stack.forAllActivities(c);
-            c.recycle();
-            if (mTmpRemoteException != null) {
-                throw mTmpRemoteException;
+
+            final DisplayContent display = getChildAt(displayNdx);
+            for (int areaNdx = display.getTaskDisplayAreaCount() - 1; areaNdx >= 0; --areaNdx) {
+                final TaskDisplayArea taskDisplayArea = display.getTaskDisplayAreaAt(areaNdx);
+                for (int taskNdx = taskDisplayArea.getStackCount() - 1; taskNdx >= 0; --taskNdx) {
+                    final ActivityStack rootTask = taskDisplayArea.getStackAt(taskNdx);
+                    if (rootTask.getVisibility(null /*starting*/) == STACK_VISIBILITY_INVISIBLE) {
+                        break;
+                    }
+                    final PooledFunction c = PooledLambda.obtainFunction(
+                            RootWindowContainer::startActivityForAttachedApplicationIfNeeded, this,
+                            PooledLambda.__(ActivityRecord.class), app,
+                            rootTask.topRunningActivity());
+                    rootTask.forAllActivities(c);
+                    c.recycle();
+                    if (mTmpRemoteException != null) {
+                        throw mTmpRemoteException;
+                    }
+                }
             }
             didSomething |= mTmpBoolean;
         }
@@ -1962,8 +1972,8 @@
         }
 
         try {
-            if (mStackSupervisor.realStartActivityLocked(r, app, top == r /*andResume*/,
-                    true /*checkConfig*/)) {
+            if (mStackSupervisor.realStartActivityLocked(r, app,
+                    top == r && r.isFocusable() /*andResume*/, true /*checkConfig*/)) {
                 mTmpBoolean = true;
             }
         } catch (RemoteException e) {
@@ -2300,8 +2310,8 @@
         }
 
         for (int displayNdx = getChildCount() - 1; displayNdx >= 0; --displayNdx) {
-            boolean resumedOnDisplay = false;
             final DisplayContent display = getChildAt(displayNdx);
+            boolean resumedOnDisplay = false;
             for (int tdaNdx = display.getTaskDisplayAreaCount() - 1; tdaNdx >= 0; --tdaNdx) {
                 final TaskDisplayArea taskDisplayArea = display.getTaskDisplayAreaAt(tdaNdx);
                 for (int sNdx = taskDisplayArea.getStackCount() - 1; sNdx >= 0; --sNdx) {
@@ -2390,7 +2400,7 @@
                             // process the keyguard going away, which can happen before the sleep
                             // token is released. As a result, it is important we resume the
                             // activity here.
-                            resumeFocusedStacksTopActivities();
+                            stack.resumeTopActivityUncheckedLocked(null, null);
                         }
                         // The visibility update must not be called before resuming the top, so the
                         // display orientation can be updated first if needed. Otherwise there may
@@ -2635,20 +2645,29 @@
         }
     }
 
-    ActivityTaskManagerInternal.SleepToken createSleepToken(String tag, int displayId) {
+    SleepToken createSleepToken(String tag, int displayId) {
         final DisplayContent display = getDisplayContent(displayId);
         if (display == null) {
             throw new IllegalArgumentException("Invalid display: " + displayId);
         }
 
-        final SleepTokenImpl token = new SleepTokenImpl(tag, displayId);
-        mSleepTokens.add(token);
-        display.mAllSleepTokens.add(token);
+        final int tokenKey = makeSleepTokenKey(tag, displayId);
+        SleepToken token = mSleepTokens.get(tokenKey);
+        if (token == null) {
+            token = new SleepToken(tag, displayId);
+            mSleepTokens.put(tokenKey, token);
+            display.mAllSleepTokens.add(token);
+        } else {
+            throw new RuntimeException("Create the same sleep token twice: " + token);
+        }
         return token;
     }
 
-    private void removeSleepToken(SleepTokenImpl token) {
-        mSleepTokens.remove(token);
+    void removeSleepToken(SleepToken token) {
+        if (!mSleepTokens.contains(token.mHashKey)) {
+            Slog.d(TAG, "Remove non-exist sleep token: " + token + " from " + Debug.getCallers(6));
+        }
+        mSleepTokens.remove(token.mHashKey);
 
         final DisplayContent display = getDisplayContent(token.mDisplayId);
         if (display != null) {
@@ -3246,7 +3265,7 @@
             int numTaskContainers = display.getTaskDisplayAreaCount();
             for (int tdaNdx = 0; tdaNdx < numTaskContainers; tdaNdx++) {
                 final TaskDisplayArea taskDisplayArea = display.getTaskDisplayAreaAt(tdaNdx);
-                final int numStacks = display.getStackCount();
+                final int numStacks = taskDisplayArea.getStackCount();
                 for (int stackNdx = 0; stackNdx < numStacks; ++stackNdx) {
                     final ActivityStack stack = taskDisplayArea.getStackAt(stackNdx);
                     stack.finishVoiceTask(session);
@@ -3657,22 +3676,22 @@
         return printed;
     }
 
-    private final class SleepTokenImpl extends ActivityTaskManagerInternal.SleepToken {
+    private static int makeSleepTokenKey(String tag, int displayId) {
+        final String tokenKey = tag + displayId;
+        return tokenKey.hashCode();
+    }
+
+    static final class SleepToken {
         private final String mTag;
         private final long mAcquireTime;
         private final int mDisplayId;
+        final int mHashKey;
 
-        public SleepTokenImpl(String tag, int displayId) {
+        SleepToken(String tag, int displayId) {
             mTag = tag;
             mDisplayId = displayId;
             mAcquireTime = SystemClock.uptimeMillis();
-        }
-
-        @Override
-        public void release() {
-            synchronized (mService.mGlobalLock) {
-                removeSleepToken(this);
-            }
+            mHashKey = makeSleepTokenKey(mTag, mDisplayId);
         }
 
         @Override
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 3f197f7..db3c74f 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -1528,14 +1528,25 @@
      */
     void performClearTaskLocked() {
         mReuseTask = true;
-        performClearTask("clear-task-all");
-        mReuseTask = false;
+        mStackSupervisor.beginDeferResume();
+        try {
+            performClearTask("clear-task-all");
+        } finally {
+            mStackSupervisor.endDeferResume();
+            mReuseTask = false;
+        }
     }
 
     ActivityRecord performClearTaskForReuseLocked(ActivityRecord newR, int launchFlags) {
         mReuseTask = true;
-        final ActivityRecord result = performClearTaskLocked(newR, launchFlags);
-        mReuseTask = false;
+        mStackSupervisor.beginDeferResume();
+        final ActivityRecord result;
+        try {
+            result = performClearTaskLocked(newR, launchFlags);
+        } finally {
+            mStackSupervisor.endDeferResume();
+            mReuseTask = false;
+        }
         return result;
     }
 
@@ -2371,8 +2382,16 @@
             // For calculating screen layout, we need to use the non-decor inset screen area for the
             // calculation for compatibility reasons, i.e. screen area without system bars that
             // could never go away in Honeycomb.
-            final int compatScreenWidthDp = (int) (mTmpNonDecorBounds.width() / density);
-            final int compatScreenHeightDp = (int) (mTmpNonDecorBounds.height() / density);
+            int compatScreenWidthDp = (int) (mTmpNonDecorBounds.width() / density);
+            int compatScreenHeightDp = (int) (mTmpNonDecorBounds.height() / density);
+            // Use overrides if provided. If both overrides are provided, mTmpNonDecorBounds is
+            // undefined so it can't be used.
+            if (inOutConfig.screenWidthDp != Configuration.SCREEN_WIDTH_DP_UNDEFINED) {
+                compatScreenWidthDp = inOutConfig.screenWidthDp;
+            }
+            if (inOutConfig.screenHeightDp != Configuration.SCREEN_HEIGHT_DP_UNDEFINED) {
+                compatScreenHeightDp = inOutConfig.screenHeightDp;
+            }
             // Reducing the screen layout starting from its parent config.
             inOutConfig.screenLayout = computeScreenLayoutOverride(parentConfig.screenLayout,
                     compatScreenWidthDp, compatScreenHeightDp);
@@ -3608,6 +3627,9 @@
         info.topActivityInfo = mReuseActivitiesReport.top != null
                 ? mReuseActivitiesReport.top.info
                 : null;
+        info.requestedOrientation = mReuseActivitiesReport.base != null
+                ? mReuseActivitiesReport.base.getRequestedOrientation()
+                : SCREEN_ORIENTATION_UNSET;
     }
 
     /**
@@ -3649,6 +3671,10 @@
             return STACK_VISIBILITY_INVISIBLE;
         }
 
+        if (isTopActivityLaunchedBehind()) {
+            return STACK_VISIBILITY_VISIBLE;
+        }
+
         boolean gotSplitScreenStack = false;
         boolean gotOpaqueSplitScreenPrimary = false;
         boolean gotOpaqueSplitScreenSecondary = false;
@@ -3766,6 +3792,14 @@
                 : STACK_VISIBILITY_VISIBLE;
     }
 
+    private boolean isTopActivityLaunchedBehind() {
+        final ActivityRecord top = topRunningActivity();
+        if (top != null && top.mLaunchTaskBehind) {
+            return true;
+        }
+        return false;
+    }
+
     ActivityRecord isInTask(ActivityRecord r) {
         if (r == null) {
             return null;
diff --git a/services/core/java/com/android/server/wm/TaskOrganizerController.java b/services/core/java/com/android/server/wm/TaskOrganizerController.java
index f70bf18..e153bef 100644
--- a/services/core/java/com/android/server/wm/TaskOrganizerController.java
+++ b/services/core/java/com/android/server/wm/TaskOrganizerController.java
@@ -458,7 +458,8 @@
                 || mTmpTaskInfo.topActivityType != lastInfo.topActivityType
                 || mTmpTaskInfo.isResizeable != lastInfo.isResizeable
                 || mTmpTaskInfo.pictureInPictureParams != lastInfo.pictureInPictureParams
-                || !TaskDescription.equals(mTmpTaskInfo.taskDescription, lastInfo.taskDescription);
+                || !TaskDescription.equals(mTmpTaskInfo.taskDescription, lastInfo.taskDescription)
+                || mTmpTaskInfo.requestedOrientation != lastInfo.requestedOrientation;
         if (!changed) {
             int cfgChanges = mTmpTaskInfo.configuration.diff(lastInfo.configuration);
             final int winCfgChanges = (cfgChanges & ActivityInfo.CONFIG_WINDOW_CONFIGURATION) != 0
diff --git a/services/core/java/com/android/server/wm/TaskPositioner.java b/services/core/java/com/android/server/wm/TaskPositioner.java
index c68b660..44f4a58 100644
--- a/services/core/java/com/android/server/wm/TaskPositioner.java
+++ b/services/core/java/com/android/server/wm/TaskPositioner.java
@@ -228,10 +228,8 @@
                 mClientChannel, mService.mAnimationHandler.getLooper(),
                 mService.mAnimator.getChoreographer());
 
-        mDragApplicationHandle = new InputApplicationHandle(new Binder());
-        mDragApplicationHandle.name = TAG;
-        mDragApplicationHandle.dispatchingTimeoutNanos =
-                WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS;
+        mDragApplicationHandle = new InputApplicationHandle(new Binder(), TAG,
+                WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS);
 
         mDragWindowHandle = new InputWindowHandle(mDragApplicationHandle,
                 displayContent.getDisplayId());
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
index 448b4aa..6cc0ba5 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
@@ -16,6 +16,7 @@
 
 package com.android.server.wm;
 
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
 import static android.graphics.Color.WHITE;
 import static android.graphics.Color.alpha;
 import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
@@ -142,6 +143,7 @@
     private final Handler mHandler;
     private boolean mSizeMismatch;
     private final Paint mBackgroundPaint = new Paint();
+    private final int mActivityType;
     private final int mStatusBarColor;
     @VisibleForTesting final SystemBarBackgroundPainter mSystemBarBackgroundPainter;
     private final int mOrientationOnCreation;
@@ -173,6 +175,7 @@
         final int windowFlags;
         final int windowPrivateFlags;
         final int currentOrientation;
+        final int activityType;
         final InsetsState insetsState;
         synchronized (service.mGlobalLock) {
             final WindowState mainWindow = activity.findMainWindow();
@@ -241,6 +244,7 @@
             taskBounds = new Rect();
             task.getBounds(taskBounds);
             currentOrientation = topFullscreenOpaqueWindow.getConfiguration().orientation;
+            activityType = activity.getActivityType();
 
             final InsetsPolicy insetsPolicy = topFullscreenOpaqueWindow.getDisplayContent()
                     .getInsetsPolicy();
@@ -261,7 +265,8 @@
         }
         final TaskSnapshotSurface snapshotSurface = new TaskSnapshotSurface(service, window,
                 surfaceControl, snapshot, layoutParams.getTitle(), taskDescription, sysUiVis,
-                windowFlags, windowPrivateFlags, taskBounds, currentOrientation, insetsState);
+                windowFlags, windowPrivateFlags, taskBounds, currentOrientation, activityType,
+                insetsState);
         window.setOuter(snapshotSurface);
         try {
             session.relayout(window, window.mSeq, layoutParams, -1, -1, View.VISIBLE, 0, -1,
@@ -282,7 +287,7 @@
     TaskSnapshotSurface(WindowManagerService service, Window window, SurfaceControl surfaceControl,
             TaskSnapshot snapshot, CharSequence title, TaskDescription taskDescription,
             int sysUiVis, int windowFlags, int windowPrivateFlags, Rect taskBounds,
-            int currentOrientation, InsetsState insetsState) {
+            int currentOrientation, int activityType, InsetsState insetsState) {
         mService = service;
         mSurface = service.mSurfaceFactory.get();
         mHandler = new Handler(mService.mH.getLooper());
@@ -298,6 +303,7 @@
                 windowPrivateFlags, sysUiVis, taskDescription, 1f, insetsState);
         mStatusBarColor = taskDescription.getStatusBarColor();
         mOrientationOnCreation = currentOrientation;
+        mActivityType = activityType;
         mTransaction = mService.mTransactionFactory.get();
     }
 
@@ -305,7 +311,9 @@
     public void remove() {
         synchronized (mService.mGlobalLock) {
             final long now = SystemClock.uptimeMillis();
-            if (mSizeMismatch && now - mShownTime < SIZE_MISMATCH_MINIMUM_TIME_MS) {
+            if (mSizeMismatch && now - mShownTime < SIZE_MISMATCH_MINIMUM_TIME_MS
+                    // Show the latest content as soon as possible for unlocking to home.
+                    && mActivityType != ACTIVITY_TYPE_HOME) {
                 mHandler.postAtTime(this::remove, mShownTime + SIZE_MISMATCH_MINIMUM_TIME_MS);
                 ProtoLog.v(WM_DEBUG_STARTING_WINDOW,
                         "Defer removing snapshot surface in %dms", (now - mShownTime));
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index ef81c0a..b7a2eb3 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -17,6 +17,7 @@
 package com.android.server.wm;
 
 import static android.Manifest.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS;
+import static android.Manifest.permission.INPUT_CONSUMER;
 import static android.Manifest.permission.INTERNAL_SYSTEM_WINDOW;
 import static android.Manifest.permission.MANAGE_ACTIVITY_STACKS;
 import static android.Manifest.permission.MANAGE_APP_TOKENS;
@@ -1476,9 +1477,14 @@
                         rootType, attrs.token, attrs.packageName)) {
                     return WindowManagerGlobal.ADD_BAD_APP_TOKEN;
                 }
-                final IBinder binder = attrs.token != null ? attrs.token : client.asBinder();
-                token = new WindowToken(this, binder, type, false, displayContent,
-                        session.mCanAddInternalSystemWindow, isRoundedCornerOverlay);
+                if (hasParent) {
+                    // Use existing parent window token for child windows.
+                    token = parentWindow.mToken;
+                } else {
+                    final IBinder binder = attrs.token != null ? attrs.token : client.asBinder();
+                    token = new WindowToken(this, binder, type, false, displayContent,
+                            session.mCanAddInternalSystemWindow, isRoundedCornerOverlay);
+                }
             } else if (rootType >= FIRST_APPLICATION_WINDOW
                     && rootType <= LAST_APPLICATION_WINDOW) {
                 activity = token.asActivityRecord();
@@ -2163,6 +2169,10 @@
                     throw new IllegalArgumentException(
                             "Window type can not be changed after the window is added.");
                 }
+                if (!Arrays.equals(win.mAttrs.providesInsetsTypes, attrs.providesInsetsTypes)) {
+                    throw new IllegalArgumentException(
+                            "Insets types can not be changed after the window is added.");
+                }
 
                 // Odd choice but less odd than embedding in copyFrom()
                 if ((attrs.privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_PRESERVE_GEOMETRY)
@@ -5827,27 +5837,6 @@
         }
     }
 
-    @Override
-    public void setForceShowSystemBars(boolean show) {
-        boolean isAutomotive = mContext.getPackageManager().hasSystemFeature(
-                PackageManager.FEATURE_AUTOMOTIVE);
-        if (!isAutomotive) {
-            throw new UnsupportedOperationException("Force showing system bars is only supported"
-                    + "for Automotive use cases.");
-        }
-        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
-                != PackageManager.PERMISSION_GRANTED) {
-            throw new SecurityException("Caller does not hold permission "
-                    + android.Manifest.permission.STATUS_BAR);
-        }
-        synchronized (mGlobalLock) {
-            final PooledConsumer c = PooledLambda.obtainConsumer(
-                    DisplayPolicy::setForceShowSystemBars, PooledLambda.__(), show);
-            mRoot.forAllDisplayPolicies(c);
-            c.recycle();
-        }
-    }
-
     public void setNavBarVirtualKeyHapticFeedbackEnabled(boolean enabled) {
         if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
                 != PackageManager.PERMISSION_GRANTED) {
@@ -5886,6 +5875,11 @@
     @Override
     public void createInputConsumer(IBinder token, String name, int displayId,
             InputChannel inputChannel) {
+        if (!mAtmInternal.isCallerRecents(Binder.getCallingUid())
+                && mContext.checkCallingOrSelfPermission(INPUT_CONSUMER) != PERMISSION_GRANTED) {
+            throw new SecurityException("createInputConsumer requires INPUT_CONSUMER permission");
+        }
+
         synchronized (mGlobalLock) {
             DisplayContent display = mRoot.getDisplayContent(displayId);
             if (display != null) {
@@ -5897,6 +5891,11 @@
 
     @Override
     public boolean destroyInputConsumer(String name, int displayId) {
+        if (!mAtmInternal.isCallerRecents(Binder.getCallingUid())
+                && mContext.checkCallingOrSelfPermission(INPUT_CONSUMER) != PERMISSION_GRANTED) {
+            throw new SecurityException("destroyInputConsumer requires INPUT_CONSUMER permission");
+        }
+
         synchronized (mGlobalLock) {
             DisplayContent display = mRoot.getDisplayContent(displayId);
             if (display != null) {
@@ -6188,7 +6187,7 @@
             }
             if (inputMethodControlTarget != null) {
                 pw.print("  inputMethodControlTarget in display# "); pw.print(displayId);
-                pw.print(' '); pw.println(inputMethodControlTarget.getWindow());
+                pw.print(' '); pw.println(inputMethodControlTarget);
             }
         });
         pw.print("  mInTouchMode="); pw.println(mInTouchMode);
diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java
index 930bfded..21a76ff 100644
--- a/services/core/java/com/android/server/wm/WindowOrganizerController.java
+++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java
@@ -335,7 +335,7 @@
                     }
                 }
             } else {
-                throw new RuntimeException("Reparenting leaf Tasks is not supported now.");
+                throw new RuntimeException("Reparenting leaf Tasks is not supported now. " + task);
             }
         } else {
             // Ugh, of course ActivityStack has its own special reorder logic...
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java
index 29cf177..df49ac7 100644
--- a/services/core/java/com/android/server/wm/WindowProcessController.java
+++ b/services/core/java/com/android/server/wm/WindowProcessController.java
@@ -186,14 +186,16 @@
 
     // Last configuration that was reported to the process.
     private final Configuration mLastReportedConfiguration = new Configuration();
-    // Configuration that is waiting to be dispatched to the process.
-    private Configuration mPendingConfiguration;
-    private final Configuration mNewOverrideConfig = new Configuration();
+    /** Whether the process configuration is waiting to be dispatched to the process. */
+    private boolean mHasPendingConfigurationChange;
     // Registered display id as a listener to override config change
     private int mDisplayId;
     private ActivityRecord mConfigActivityRecord;
     // Whether the activity config override is allowed for this process.
     private volatile boolean mIsActivityConfigOverrideAllowed = true;
+    /** Non-zero to pause dispatching process configuration change. */
+    private int mPauseConfigurationDispatchCount;
+
     /**
      * Activities that hosts some UI drawn by the current process. The activities live
      * in another process. This is used to check if the process is currently showing anything
@@ -1116,8 +1118,10 @@
         onMergedOverrideConfigurationChanged(Configuration.EMPTY);
     }
 
-    private void registerActivityConfigurationListener(ActivityRecord activityRecord) {
-        if (activityRecord == null || activityRecord.containsListener(this)) {
+    void registerActivityConfigurationListener(ActivityRecord activityRecord) {
+        if (activityRecord == null || activityRecord.containsListener(this)
+                // Check for the caller from outside of this class.
+                || !mIsActivityConfigOverrideAllowed) {
             return;
         }
         // A process can only register to one activityRecord to listen to the override configuration
@@ -1168,11 +1172,26 @@
     }
 
     @Override
+    public void onRequestedOverrideConfigurationChanged(Configuration overrideConfiguration) {
+        super.onRequestedOverrideConfigurationChanged(overrideConfiguration);
+    }
+
+    @Override
     public void onMergedOverrideConfigurationChanged(Configuration mergedOverrideConfig) {
+        super.onRequestedOverrideConfigurationChanged(mergedOverrideConfig);
+    }
+
+    @Override
+    void resolveOverrideConfiguration(Configuration newParentConfig) {
+        super.resolveOverrideConfiguration(newParentConfig);
+        final Configuration resolvedConfig = getResolvedOverrideConfiguration();
         // Make sure that we don't accidentally override the activity type.
-        mNewOverrideConfig.setTo(mergedOverrideConfig);
-        mNewOverrideConfig.windowConfiguration.setActivityType(ACTIVITY_TYPE_UNDEFINED);
-        super.onRequestedOverrideConfigurationChanged(mNewOverrideConfig);
+        resolvedConfig.windowConfiguration.setActivityType(ACTIVITY_TYPE_UNDEFINED);
+        // Activity has an independent ActivityRecord#mConfigurationSeq. If this process registers
+        // activity configuration, its config seq shouldn't go backwards by activity configuration.
+        // Otherwise if other places send wpc.getConfiguration() to client, the configuration may
+        // be ignored due to the seq is older.
+        resolvedConfig.seq = newParentConfig.seq;
     }
 
     private void updateConfiguration() {
@@ -1190,11 +1209,7 @@
         if (mListener.isCached()) {
             // This process is in a cached state. We will delay delivering the config change to the
             // process until the process is no longer cached.
-            if (mPendingConfiguration == null) {
-                mPendingConfiguration = new Configuration(config);
-            } else {
-                mPendingConfiguration.setTo(config);
-            }
+            mHasPendingConfigurationChange = true;
             return;
         }
 
@@ -1202,6 +1217,11 @@
     }
 
     private void dispatchConfigurationChange(Configuration config) {
+        if (mPauseConfigurationDispatchCount > 0) {
+            mHasPendingConfigurationChange = true;
+            return;
+        }
+        mHasPendingConfigurationChange = false;
         if (mThread == null) {
             if (Build.IS_DEBUGGABLE && mHasImeService) {
                 // TODO (b/135719017): Temporary log for debugging IME service.
@@ -1228,7 +1248,7 @@
         }
     }
 
-    private void setLastReportedConfiguration(Configuration config) {
+    void setLastReportedConfiguration(Configuration config) {
         mLastReportedConfiguration.setTo(config);
     }
 
@@ -1236,6 +1256,30 @@
         return mLastReportedConfiguration;
     }
 
+    void pauseConfigurationDispatch() {
+        mPauseConfigurationDispatchCount++;
+    }
+
+    void resumeConfigurationDispatch() {
+        mPauseConfigurationDispatchCount--;
+    }
+
+    /**
+     * This is called for sending {@link android.app.servertransaction.LaunchActivityItem}.
+     * The caller must call {@link #setLastReportedConfiguration} if the delivered configuration
+     * is newer.
+     */
+    Configuration prepareConfigurationForLaunchingActivity() {
+        final Configuration config = getConfiguration();
+        if (mHasPendingConfigurationChange) {
+            mHasPendingConfigurationChange = false;
+            // The global configuration may not change, so the client process may have the same
+            // config seq. This increment ensures that the client won't ignore the configuration.
+            config.seq = mAtm.increaseConfigurationSeqLocked();
+        }
+        return config;
+    }
+
     /** Returns the total time (in milliseconds) spent executing in both user and system code. */
     public long getCpuTime() {
         return (mListener != null) ? mListener.getCpuTime() : 0;
@@ -1327,10 +1371,8 @@
     public void onProcCachedStateChanged(boolean isCached) {
         if (!isCached) {
             synchronized (mAtm.mGlobalLockWithoutBoost) {
-                if (mPendingConfiguration != null) {
-                    final Configuration config = mPendingConfiguration;
-                    mPendingConfiguration = null;
-                    dispatchConfigurationChange(config);
+                if (mHasPendingConfigurationChange) {
+                    dispatchConfigurationChange(getConfiguration());
                 }
             }
         }
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 11db705..f9b5e0e 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -725,7 +725,8 @@
      * @return The insets state as requested by the client, i.e. the dispatched insets state
      *         for which the visibilities are overridden with what the client requested.
      */
-    InsetsState getRequestedInsetsState() {
+    @Override
+    public InsetsState getRequestedInsetsState() {
         return mRequestedInsetsState;
     }
 
@@ -942,7 +943,8 @@
         mLastRequestedHeight = 0;
         mLayer = 0;
         mInputWindowHandle = new InputWindowHandle(
-                mActivityRecord != null ? mActivityRecord.mInputApplicationHandle : null,
+                mActivityRecord != null ?
+                        mActivityRecord.getInputApplicationHandle(false /* update */) : null,
                     getDisplayId());
 
         // Make sure we initial all fields before adding to parentWindow, to prevent exception
@@ -2051,10 +2053,17 @@
         // animating... let's do something.
         final int left = mWindowFrames.mFrame.left;
         final int top = mWindowFrames.mFrame.top;
+
+        // During the transition from pip to fullscreen, the activity windowing mode is set to
+        // fullscreen at the beginning while the task is kept in pinned mode. Skip the move
+        // animation in such case since the transition is handled in SysUI.
+        final boolean hasMovementAnimation = getTask() == null
+                ? getWindowConfiguration().hasMovementAnimations()
+                : getTask().getWindowConfiguration().hasMovementAnimations();
         if (mToken.okToAnimate()
                 && (mAttrs.privateFlags & PRIVATE_FLAG_NO_MOVE_ANIMATION) == 0
                 && !isDragResizing()
-                && getWindowConfiguration().hasMovementAnimations()
+                && hasMovementAnimation
                 && !mWinAnimator.mLastHidden
                 && !mSeamlesslyRotated) {
             startMoveAnimation(left, top);
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index da45300..80c84ad 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -38,6 +38,7 @@
 import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_STARTING_WINDOW;
 import static com.android.server.wm.ProtoLogGroup.WM_SHOW_SURFACE_ALLOC;
 import static com.android.server.wm.ProtoLogGroup.WM_SHOW_TRANSACTIONS;
+import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_WINDOW_ANIMATION;
 import static com.android.server.wm.WindowContainer.AnimationFlags.PARENTS;
 import static com.android.server.wm.WindowContainer.AnimationFlags.TRANSITION;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG;
@@ -1478,7 +1479,7 @@
             mWin.getDisplayContent().adjustForImeIfNeeded();
         }
 
-        return mWin.isAnimating(PARENTS);
+        return mWin.isAnimating(0 /* flags */, ANIMATION_TYPE_WINDOW_ANIMATION);
     }
 
     void dumpDebug(ProtoOutputStream proto, long fieldId) {
diff --git a/services/core/java/com/android/server/wm/WindowToken.java b/services/core/java/com/android/server/wm/WindowToken.java
index 86aacf3..d86f6c9 100644
--- a/services/core/java/com/android/server/wm/WindowToken.java
+++ b/services/core/java/com/android/server/wm/WindowToken.java
@@ -172,6 +172,12 @@
                 }
             }
         }
+
+        /** The state may not only be used by self. Make sure to leave the influence by others. */
+        void disassociate(WindowToken token) {
+            mAssociatedTokens.remove(token);
+            mRotatedContainers.remove(token);
+        }
     }
 
     private class DeathRecipient implements IBinder.DeathRecipient {
@@ -531,7 +537,7 @@
     void applyFixedRotationTransform(DisplayInfo info, DisplayFrames displayFrames,
             Configuration config) {
         if (mFixedRotationTransformState != null) {
-            return;
+            mFixedRotationTransformState.disassociate(this);
         }
         mFixedRotationTransformState = new FixedRotationTransformState(info, displayFrames,
                 new Configuration(config), mDisplayContent.getRotation());
@@ -539,8 +545,7 @@
         mDisplayContent.getDisplayPolicy().simulateLayoutDisplay(displayFrames,
                 mFixedRotationTransformState.mInsetsState,
                 mFixedRotationTransformState.mBarContentFrames);
-        onConfigurationChanged(getParent().getConfiguration());
-        notifyFixedRotationTransform(true /* enabled */);
+        onFixedRotationStatePrepared();
     }
 
     /**
@@ -548,17 +553,34 @@
      * one. This takes the same effect as {@link #applyFixedRotationTransform}.
      */
     void linkFixedRotationTransform(WindowToken other) {
-        if (mFixedRotationTransformState != null) {
+        final FixedRotationTransformState fixedRotationState = other.mFixedRotationTransformState;
+        if (fixedRotationState == null || mFixedRotationTransformState == fixedRotationState) {
             return;
         }
-        final FixedRotationTransformState fixedRotationState = other.mFixedRotationTransformState;
-        if (fixedRotationState == null) {
-            return;
+        if (mFixedRotationTransformState != null) {
+            mFixedRotationTransformState.disassociate(this);
         }
         mFixedRotationTransformState = fixedRotationState;
         fixedRotationState.mAssociatedTokens.add(this);
-        onConfigurationChanged(getParent().getConfiguration());
+        onFixedRotationStatePrepared();
+    }
+
+    /**
+     * Makes the rotated states take effect for this window container and its client process.
+     * This should only be called when {@link #mFixedRotationTransformState} is non-null.
+     */
+    private void onFixedRotationStatePrepared() {
+        // Send the adjustment info first so when the client receives configuration change, it can
+        // get the rotated display metrics.
         notifyFixedRotationTransform(true /* enabled */);
+        // Resolve the rotated configuration.
+        onConfigurationChanged(getParent().getConfiguration());
+        final ActivityRecord r = asActivityRecord();
+        if (r != null && r.hasProcess()) {
+            // The application needs to be configured as in a rotated environment for compatibility.
+            // This registration will send the rotated configuration to its process.
+            r.app.registerActivityConfigurationListener(r);
+        }
     }
 
     /**
@@ -609,15 +631,12 @@
         // The state is cleared at the end, because it is used to indicate that other windows can
         // use seamless rotation when applying rotation to display.
         for (int i = state.mAssociatedTokens.size() - 1; i >= 0; i--) {
-            state.mAssociatedTokens.get(i).cleanUpFixedRotationTransformState();
+            final WindowToken token = state.mAssociatedTokens.get(i);
+            token.mFixedRotationTransformState = null;
+            token.notifyFixedRotationTransform(false /* enabled */);
         }
     }
 
-    private void cleanUpFixedRotationTransformState() {
-        mFixedRotationTransformState = null;
-        notifyFixedRotationTransform(false /* enabled */);
-    }
-
     /** Notifies application side to enable or disable the rotation adjustment of display info. */
     private void notifyFixedRotationTransform(boolean enabled) {
         FixedRotationAdjustments adjustments = null;
@@ -681,8 +700,9 @@
         if (!isFixedRotationTransforming()) {
             return null;
         }
-        return new FixedRotationAdjustments(mFixedRotationTransformState.mDisplayInfo.rotation,
-                mFixedRotationTransformState.mDisplayInfo.displayCutout);
+        final DisplayInfo displayInfo = mFixedRotationTransformState.mDisplayInfo;
+        return new FixedRotationAdjustments(displayInfo.rotation, displayInfo.appWidth,
+                displayInfo.appHeight, displayInfo.displayCutout);
     }
 
     @Override
diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp
index 8392370..da9d321 100644
--- a/services/core/jni/Android.bp
+++ b/services/core/jni/Android.bp
@@ -106,6 +106,7 @@
         "libkeystore_binder",
         "libmtp",
         "libnativehelper",
+        "libprocessgroup",
         "libutils",
         "libui",
         "libinput",
diff --git a/services/core/jni/OWNERS b/services/core/jni/OWNERS
index 8646a53..389d07a 100644
--- a/services/core/jni/OWNERS
+++ b/services/core/jni/OWNERS
@@ -11,3 +11,18 @@
 per-file com_android_server_HardwarePropertiesManagerService.cpp = michaelwr@google.com, santoscordon@google.com
 per-file com_android_server_power_PowerManagerService.* = michaelwr@google.com, santoscordon@google.com
 
+per-file Android.bp = file:platform/build/soong:/OWNERS
+per-file com_android_server_Usb* = file:/services/usb/OWNERS
+per-file com_android_server_Vibrator* = file:/services/core/java/com/android/server/vibrator/OWNERS
+per-file com_android_server_hdmi_* = file:/core/java/android/hardware/hdmi/OWNERS
+per-file com_android_server_input_* = file:/core/java/android/hardware/input/OWNERS
+per-file com_android_server_lights_* = file:/services/core/java/com/android/server/lights/OWNERS
+per-file com_android_server_location_* = file:/location/java/android/location/OWNERS
+per-file com_android_server_locksettings_* = file:/services/core/java/com/android/server/locksettings/OWNERS
+per-file com_android_server_net_* = file:/services/core/java/com/android/server/net/OWNERS
+per-file com_android_server_pm_* = file:/services/core/java/com/android/server/pm/OWNERS
+per-file com_android_server_power_* = file:/services/core/java/com/android/server/power/OWNERS
+per-file com_android_server_se_* = file:/core/java/android/se/OWNERS
+per-file com_android_server_security_* = file:/core/java/android/security/OWNERS
+per-file com_android_server_tv_* = file:/media/java/android/media/tv/OWNERS
+per-file com_android_server_vibrator_* = file:/services/core/java/com/android/server/vibrator/OWNERS
diff --git a/services/core/jni/com_android_server_am_BatteryStatsService.cpp b/services/core/jni/com_android_server_am_BatteryStatsService.cpp
index 0e68f5b..0034286 100644
--- a/services/core/jni/com_android_server_am_BatteryStatsService.cpp
+++ b/services/core/jni/com_android_server_am_BatteryStatsService.cpp
@@ -124,7 +124,7 @@
         {
             std::unique_lock<std::mutex> reasonsLock(mReasonsMutex, std::defer_lock);
             if (reasonsLock.try_lock() && mWakeupReasons.empty()) {
-                mWakeupReasons = std::move(wakeupReasons);
+                mWakeupReasons = wakeupReasons;
                 reasonsCaptured = true;
             }
         }
diff --git a/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp b/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp
index 6a6da0e..678308a 100644
--- a/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp
+++ b/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp
@@ -29,11 +29,16 @@
 
 #include <nativehelper/JNIHelp.h>
 #include <android_runtime/AndroidRuntime.h>
+#include <binder/IPCThreadState.h>
 #include <jni.h>
+#include <processgroup/processgroup.h>
 
 using android::base::StringPrintf;
 using android::base::WriteStringToFile;
 
+#define SYNC_RECEIVED_WHILE_FROZEN (1)
+#define ASYNC_RECEIVED_WHILE_FROZEN (2)
+
 namespace android {
 
 // This performs per-process reclaim on all processes belonging to non-app UIDs.
@@ -74,9 +79,60 @@
     }
 }
 
+static void com_android_server_am_CachedAppOptimizer_enableFreezerInternal(
+        JNIEnv *env, jobject clazz, jboolean enable) {
+    bool success = true;
+
+    if (enable) {
+        success = SetTaskProfiles(0, {"FreezerEnabled"}, true);
+    } else {
+        success = SetTaskProfiles(0, {"FreezerDisabled"}, true);
+    }
+
+    if (!success) {
+        jniThrowException(env, "java/lang/RuntimeException", "Unknown error");
+    }
+}
+
+static void com_android_server_am_CachedAppOptimizer_freezeBinder(
+        JNIEnv *env, jobject clazz, jint pid, jboolean freeze) {
+
+    if (IPCThreadState::freeze(pid, freeze, 100 /* timeout [ms] */) != 0) {
+        jniThrowException(env, "java/lang/RuntimeException", "Unable to freeze/unfreeze binder");
+    }
+}
+
+static jint com_android_server_am_CachedAppOptimizer_getBinderFreezeInfo(JNIEnv *env,
+        jobject clazz, jint pid) {
+    bool syncReceived = false, asyncReceived = false;
+
+    int error = IPCThreadState::getProcessFreezeInfo(pid, &syncReceived, &asyncReceived);
+
+    if (error < 0) {
+        jniThrowException(env, "java/lang/RuntimeException", strerror(error));
+    }
+
+    jint retVal = 0;
+
+    if(syncReceived) {
+        retVal |= SYNC_RECEIVED_WHILE_FROZEN;;
+    }
+
+    if(asyncReceived) {
+        retVal |= ASYNC_RECEIVED_WHILE_FROZEN;
+    }
+
+    return retVal;
+}
+
 static const JNINativeMethod sMethods[] = {
     /* name, signature, funcPtr */
     {"compactSystem", "()V", (void*)com_android_server_am_CachedAppOptimizer_compactSystem},
+    {"enableFreezerInternal", "(Z)V",
+        (void*)com_android_server_am_CachedAppOptimizer_enableFreezerInternal},
+    {"freezeBinder", "(IZ)V", (void*)com_android_server_am_CachedAppOptimizer_freezeBinder},
+    {"getBinderFreezeInfo", "(I)I",
+        (void*)com_android_server_am_CachedAppOptimizer_getBinderFreezeInfo}
 };
 
 int register_android_server_am_CachedAppOptimizer(JNIEnv* env)
diff --git a/services/core/jni/gnss/OWNERS b/services/core/jni/gnss/OWNERS
new file mode 100644
index 0000000..5ac6028
--- /dev/null
+++ b/services/core/jni/gnss/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/location/OWNERS
diff --git a/services/core/xsd/platform-compat-schema/OWNERS b/services/core/xsd/platform-compat-schema/OWNERS
new file mode 100644
index 0000000..f8c3520
--- /dev/null
+++ b/services/core/xsd/platform-compat-schema/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/compat/OWNERS
diff --git a/services/devicepolicy/OWNERS b/services/devicepolicy/OWNERS
new file mode 100644
index 0000000..e95633a
--- /dev/null
+++ b/services/devicepolicy/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/app/admin/OWNERS
diff --git a/services/incremental/OWNERS b/services/incremental/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/incremental/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 2ba94e8..b5c5bb5 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -229,8 +229,14 @@
             "com.android.server.usb.UsbService$Lifecycle";
     private static final String MIDI_SERVICE_CLASS =
             "com.android.server.midi.MidiService$Lifecycle";
+    private static final String WIFI_APEX_SERVICE_JAR_PATH =
+            "/apex/com.android.wifi/javalib/service-wifi.jar";
     private static final String WIFI_SERVICE_CLASS =
             "com.android.server.wifi.WifiService";
+    private static final String WIFI_SCANNING_SERVICE_CLASS =
+            "com.android.server.wifi.scanner.WifiScanningService";
+    private static final String WIFI_RTT_SERVICE_CLASS =
+            "com.android.server.wifi.rtt.RttService";
     private static final String WIFI_AWARE_SERVICE_CLASS =
             "com.android.server.wifi.aware.WifiAwareService";
     private static final String WIFI_P2P_SERVICE_CLASS =
@@ -1501,33 +1507,36 @@
                     PackageManager.FEATURE_WIFI)) {
                 // Wifi Service must be started first for wifi-related services.
                 t.traceBegin("StartWifi");
-                mSystemServiceManager.startService(WIFI_SERVICE_CLASS);
+                mSystemServiceManager.startServiceFromJar(
+                        WIFI_SERVICE_CLASS, WIFI_APEX_SERVICE_JAR_PATH);
                 t.traceEnd();
                 t.traceBegin("StartWifiScanning");
-                mSystemServiceManager.startService(
-                        "com.android.server.wifi.scanner.WifiScanningService");
+                mSystemServiceManager.startServiceFromJar(
+                        WIFI_SCANNING_SERVICE_CLASS, WIFI_APEX_SERVICE_JAR_PATH);
                 t.traceEnd();
             }
 
             if (context.getPackageManager().hasSystemFeature(
                     PackageManager.FEATURE_WIFI_RTT)) {
                 t.traceBegin("StartRttService");
-                mSystemServiceManager.startService(
-                        "com.android.server.wifi.rtt.RttService");
+                mSystemServiceManager.startServiceFromJar(
+                        WIFI_RTT_SERVICE_CLASS, WIFI_APEX_SERVICE_JAR_PATH);
                 t.traceEnd();
             }
 
             if (context.getPackageManager().hasSystemFeature(
                     PackageManager.FEATURE_WIFI_AWARE)) {
                 t.traceBegin("StartWifiAware");
-                mSystemServiceManager.startService(WIFI_AWARE_SERVICE_CLASS);
+                mSystemServiceManager.startServiceFromJar(
+                        WIFI_AWARE_SERVICE_CLASS, WIFI_APEX_SERVICE_JAR_PATH);
                 t.traceEnd();
             }
 
             if (context.getPackageManager().hasSystemFeature(
                     PackageManager.FEATURE_WIFI_DIRECT)) {
                 t.traceBegin("StartWifiP2P");
-                mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS);
+                mSystemServiceManager.startServiceFromJar(
+                        WIFI_P2P_SERVICE_CLASS, WIFI_APEX_SERVICE_JAR_PATH);
                 t.traceEnd();
             }
 
diff --git a/services/people/OWNERS b/services/people/OWNERS
new file mode 100644
index 0000000..7ac9b73
--- /dev/null
+++ b/services/people/OWNERS
@@ -0,0 +1,2 @@
+danningc@google.com
+juliacr@google.com
diff --git a/services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java b/services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java
index 236ac84..9e6cf84 100644
--- a/services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java
+++ b/services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java
@@ -86,8 +86,8 @@
             return;
         }
         List<ShareTarget> shareTargets = getDirectShareTargets();
-        SharesheetModelScorer.computeScore(shareTargets, getShareEventType(mIntentFilter),
-                System.currentTimeMillis());
+        SharesheetModelScorer.computeScoreForDirectShare(shareTargets,
+                getShareEventType(mIntentFilter), System.currentTimeMillis());
         Collections.sort(shareTargets,
                 Comparator.comparing(ShareTarget::getScore, reverseOrder())
                         .thenComparing(t -> t.getAppTarget().getRank()));
diff --git a/services/people/java/com/android/server/people/prediction/SharesheetModelScorer.java b/services/people/java/com/android/server/people/prediction/SharesheetModelScorer.java
index c77843c..d4a502d 100644
--- a/services/people/java/com/android/server/people/prediction/SharesheetModelScorer.java
+++ b/services/people/java/com/android/server/people/prediction/SharesheetModelScorer.java
@@ -20,6 +20,7 @@
 import android.annotation.Nullable;
 import android.annotation.UserIdInt;
 import android.app.usage.UsageEvents;
+import android.provider.DeviceConfig;
 import android.util.ArrayMap;
 import android.util.Pair;
 import android.util.Range;
@@ -27,12 +28,14 @@
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.app.ChooserActivity;
+import com.android.internal.config.sysui.SystemUiDeviceConfigFlags;
 import com.android.server.people.data.AppUsageStatsData;
 import com.android.server.people.data.DataManager;
 import com.android.server.people.data.Event;
 
 import java.time.Duration;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
@@ -46,6 +49,7 @@
     private static final String TAG = "SharesheetModelScorer";
     private static final boolean DEBUG = false;
     private static final Integer RECENCY_SCORE_COUNT = 6;
+    private static final Integer NATIVE_RANK_COUNT = 2;
     private static final float RECENCY_INITIAL_BASE_SCORE = 0.4F;
     private static final float RECENCY_SCORE_INITIAL_DECAY = 0.05F;
     private static final float RECENCY_SCORE_SUBSEQUENT_DECAY = 0.02F;
@@ -174,6 +178,77 @@
         postProcess(shareTargets, targetsLimit, dataManager, callingUserId);
     }
 
+    /**
+     * Computes ranking score for direct sharing. Update
+     * {@link ShareTargetPredictor.ShareTargetScore}.
+     */
+    static void computeScoreForDirectShare(List<ShareTargetPredictor.ShareTarget> shareTargets,
+            int shareEventType, long now) {
+        computeScore(shareTargets, shareEventType, now);
+        promoteTopNativeRankedShortcuts(shareTargets);
+    }
+
+    /**
+     * Promotes top (NATIVE_RANK_COUNT) shortcuts for each package and class, as per shortcut native
+     * ranking provided by apps.
+     */
+    private static void promoteTopNativeRankedShortcuts(
+            List<ShareTargetPredictor.ShareTarget> shareTargets) {
+        float topShortcutBonus = DeviceConfig.getFloat(
+                DeviceConfig.NAMESPACE_SYSTEMUI,
+                SystemUiDeviceConfigFlags.TOP_NATIVE_RANKED_SHARING_SHORTCUTS_BOOSTER,
+                0f);
+        float secondTopShortcutBonus = DeviceConfig.getFloat(
+                DeviceConfig.NAMESPACE_SYSTEMUI,
+                SystemUiDeviceConfigFlags.NON_TOP_NATIVE_RANKED_SHARING_SHORTCUTS_BOOSTER,
+                0f);
+        // Populates a map which key is a packageName and className pair, value is a max heap
+        // containing top (NATIVE_RANK_COUNT) shortcuts as per shortcut native ranking provided
+        // by apps.
+        Map<Pair<String, String>, PriorityQueue<ShareTargetPredictor.ShareTarget>>
+                topNativeRankedShareTargetMap = new ArrayMap<>();
+        for (ShareTargetPredictor.ShareTarget shareTarget : shareTargets) {
+            Pair<String, String> key = new Pair<>(shareTarget.getAppTarget().getPackageName(),
+                    shareTarget.getAppTarget().getClassName());
+            if (!topNativeRankedShareTargetMap.containsKey(key)) {
+                topNativeRankedShareTargetMap.put(key,
+                        new PriorityQueue<>(NATIVE_RANK_COUNT,
+                                Collections.reverseOrder(Comparator.comparingInt(
+                                        p -> p.getAppTarget().getRank()))));
+            }
+            PriorityQueue<ShareTargetPredictor.ShareTarget> rankMaxHeap =
+                    topNativeRankedShareTargetMap.get(key);
+            if (rankMaxHeap.isEmpty() || shareTarget.getAppTarget().getRank()
+                    < rankMaxHeap.peek().getAppTarget().getRank()) {
+                if (rankMaxHeap.size() == NATIVE_RANK_COUNT) {
+                    rankMaxHeap.poll();
+                }
+                rankMaxHeap.offer(shareTarget);
+            }
+        }
+        for (PriorityQueue<ShareTargetPredictor.ShareTarget> maxHeap :
+                topNativeRankedShareTargetMap.values()) {
+            while (!maxHeap.isEmpty()) {
+                ShareTargetPredictor.ShareTarget target = maxHeap.poll();
+                float bonus = maxHeap.isEmpty() ? topShortcutBonus : secondTopShortcutBonus;
+                target.setScore(probOR(target.getScore(), bonus));
+
+                if (DEBUG) {
+                    Slog.d(TAG, String.format(
+                            "SharesheetModel: promote top shortcut as per native ranking,"
+                                    + "packageName: %s, className: %s, shortcutId: %s, bonus:%.2f,"
+                                    + "total:%.2f",
+                            target.getAppTarget().getPackageName(),
+                            target.getAppTarget().getClassName(),
+                            target.getAppTarget().getShortcutInfo() != null
+                                    ? target.getAppTarget().getShortcutInfo().getId() : null,
+                            bonus,
+                            target.getScore()));
+                }
+            }
+        }
+    }
+
     private static void postProcess(List<ShareTargetPredictor.ShareTarget> shareTargets,
             int targetsLimit, @NonNull DataManager dataManager, @UserIdInt int callingUserId) {
         // Populates a map which key is package name and value is list of shareTargets descended
diff --git a/services/print/OWNERS b/services/print/OWNERS
new file mode 100644
index 0000000..2c7b881
--- /dev/null
+++ b/services/print/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/print/OWNERS
diff --git a/services/restrictions/OWNERS b/services/restrictions/OWNERS
new file mode 100644
index 0000000..95e614c
--- /dev/null
+++ b/services/restrictions/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/restrictions/OWNERS
diff --git a/services/robotests/backup/OWNERS b/services/robotests/backup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/services/robotests/backup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java b/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
index bd37e58..b450a80 100644
--- a/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
+++ b/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
@@ -123,6 +123,7 @@
 import com.android.server.testing.shadows.ShadowEventLog;
 import com.android.server.testing.shadows.ShadowSystemServiceRegistry;
 
+import com.google.common.base.Charsets;
 import com.google.common.truth.IterableSubject;
 
 import org.junit.After;
@@ -1911,7 +1912,8 @@
     }
 
     @Test
-    public void testRunTask_whenTransportReturnsError_updatesFilesAndCleansUp() throws Exception {
+    public void testRunTask_whenTransportReturnsErrorForGenericPackage_updatesFilesAndCleansUp()
+            throws Exception {
         TransportMock transportMock = setUpInitializedTransport(mTransport);
         when(transportMock.transport.performBackup(
                         argThat(packageInfo(PACKAGE_1)), any(), anyInt()))
@@ -1927,6 +1929,39 @@
         assertCleansUpFilesAndAgent(mTransport, PACKAGE_1);
     }
 
+    /**
+     * Checks that TRANSPORT_ERROR during @pm@ backup keeps the state file untouched.
+     * http://b/144030477
+     */
+    @Test
+    public void testRunTask_whenTransportReturnsErrorForPm_updatesFilesAndCleansUp()
+            throws Exception {
+        // TODO(tobiast): Refactor this method to share code with
+        //  testRunTask_whenTransportReturnsErrorForGenericPackage_updatesFilesAndCleansUp
+        // See patchset 7 of http://ag/11762961
+        final PackageData packageData = PM_PACKAGE;
+        TransportMock transportMock = setUpInitializedTransport(mTransport);
+        when(transportMock.transport.performBackup(
+                argThat(packageInfo(packageData)), any(), anyInt()))
+                .thenReturn(BackupTransport.TRANSPORT_ERROR);
+
+        byte[] pmStateBytes = "fake @pm@ state for testing".getBytes(Charsets.UTF_8);
+
+        Path pmStatePath = createPmStateFile(pmStateBytes.clone());
+        PackageManagerBackupAgent pmAgent = spy(createPmAgent());
+        KeyValueBackupTask task = createKeyValueBackupTask(transportMock, packageData);
+        runTask(task);
+        verify(pmAgent, never()).onBackup(any(), any(), any());
+
+        assertThat(Files.readAllBytes(pmStatePath)).isEqualTo(pmStateBytes.clone());
+
+        boolean existed = deletePmStateFile();
+        assertThat(existed).isTrue();
+        // unbindAgent() is skipped for @pm@. Comment in KeyValueBackupTask.java:
+        // "For PM metadata (for which applicationInfo is null) there is no agent-bound state."
+        assertCleansUpFiles(mTransport, packageData);
+    }
+
     @Test
     public void testRunTask_whenTransportGetBackupQuotaThrowsForPm() throws Exception {
         TransportMock transportMock = setUpInitializedTransport(mTransport);
@@ -2708,21 +2743,29 @@
      *       </ul>
      * </ul>
      */
-    private void createPmStateFile() throws IOException {
-        createPmStateFile(mTransport);
+    private Path createPmStateFile() throws IOException {
+        return createPmStateFile("pmState".getBytes());
     }
 
-    /** @see #createPmStateFile() */
-    private void createPmStateFile(TransportData transport) throws IOException {
-        Files.write(getStateFile(transport, PM_PACKAGE), "pmState".getBytes());
+    private Path createPmStateFile(byte[] bytes) throws IOException {
+        return createPmStateFile(bytes, mTransport);
+    }
+
+    private Path createPmStateFile(TransportData transport) throws IOException {
+        return createPmStateFile("pmState".getBytes(), mTransport);
+    }
+
+    /** @see #createPmStateFile(byte[]) */
+    private Path createPmStateFile(byte[] bytes, TransportData transport) throws IOException {
+        return Files.write(getStateFile(transport, PM_PACKAGE), bytes);
     }
 
     /**
      * Forces transport initialization and call to {@link
      * UserBackupManagerService#resetBackupState(File)}
      */
-    private void deletePmStateFile() throws IOException {
-        Files.deleteIfExists(getStateFile(mTransport, PM_PACKAGE));
+    private boolean deletePmStateFile() throws IOException {
+        return Files.deleteIfExists(getStateFile(mTransport, PM_PACKAGE));
     }
 
     /**
diff --git a/services/robotests/src/com/android/server/backup/OWNERS b/services/robotests/src/com/android/server/backup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/services/robotests/src/com/android/server/backup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/services/robotests/src/com/android/server/location/OWNERS b/services/robotests/src/com/android/server/location/OWNERS
new file mode 100644
index 0000000..696a0c2
--- /dev/null
+++ b/services/robotests/src/com/android/server/location/OWNERS
@@ -0,0 +1 @@
+file:/location/java/android/location/OWNERS
diff --git a/services/robotests/src/com/android/server/pm/OWNERS b/services/robotests/src/com/android/server/pm/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/robotests/src/com/android/server/pm/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/services/startop/OWNERS b/services/startop/OWNERS
new file mode 100644
index 0000000..bd3d829
--- /dev/null
+++ b/services/startop/OWNERS
@@ -0,0 +1 @@
+include /startop/OWNERS
diff --git a/services/systemcaptions/java/com/android/server/systemcaptions/SystemCaptionsManagerService.java b/services/systemcaptions/java/com/android/server/systemcaptions/SystemCaptionsManagerService.java
index 27a116c..1586a33 100644
--- a/services/systemcaptions/java/com/android/server/systemcaptions/SystemCaptionsManagerService.java
+++ b/services/systemcaptions/java/com/android/server/systemcaptions/SystemCaptionsManagerService.java
@@ -34,7 +34,8 @@
                         context,
                         com.android.internal.R.string.config_defaultSystemCaptionsManagerService),
                 /*disallowProperty=*/ null,
-                /*packageUpdatePolicy=*/ PACKAGE_UPDATE_POLICY_REFRESH_EAGER);
+                /*packageUpdatePolicy=*/ PACKAGE_UPDATE_POLICY_REFRESH_EAGER
+                    | PACKAGE_RESTART_POLICY_REFRESH_EAGER);
     }
 
     @Override
diff --git a/services/tests/PackageManager/OWNERS b/services/tests/PackageManager/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/tests/PackageManager/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/services/tests/PackageManagerComponentOverrideTests/OWNERS b/services/tests/PackageManagerComponentOverrideTests/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/tests/PackageManagerComponentOverrideTests/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/services/tests/mockingservicestests/assets/AppOpsUpgradeTest/OWNERS b/services/tests/mockingservicestests/assets/AppOpsUpgradeTest/OWNERS
new file mode 100644
index 0000000..999ea0e
--- /dev/null
+++ b/services/tests/mockingservicestests/assets/AppOpsUpgradeTest/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/permission/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/OWNERS b/services/tests/mockingservicestests/src/com/android/server/OWNERS
new file mode 100644
index 0000000..e779e21
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/OWNERS
@@ -0,0 +1 @@
+per-file *Alarm* = file:/apex/jobscheduler/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/alarm/OWNERS b/services/tests/mockingservicestests/src/com/android/server/alarm/OWNERS
new file mode 100644
index 0000000..6f207fb1
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/alarm/OWNERS
@@ -0,0 +1 @@
+include /apex/jobscheduler/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/OWNERS b/services/tests/mockingservicestests/src/com/android/server/am/OWNERS
new file mode 100644
index 0000000..72c0a9e
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/am/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/am/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/appop/OWNERS b/services/tests/mockingservicestests/src/com/android/server/appop/OWNERS
new file mode 100644
index 0000000..999ea0e
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/appop/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/permission/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/blob/OWNERS b/services/tests/mockingservicestests/src/com/android/server/blob/OWNERS
new file mode 100644
index 0000000..65bb6b8
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/blob/OWNERS
@@ -0,0 +1 @@
+include /apex/blobstore/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/display/OWNERS b/services/tests/mockingservicestests/src/com/android/server/display/OWNERS
new file mode 100644
index 0000000..6ce1ee4
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/display/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/display/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/job/OWNERS b/services/tests/mockingservicestests/src/com/android/server/job/OWNERS
new file mode 100644
index 0000000..6f207fb1
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/job/OWNERS
@@ -0,0 +1 @@
+include /apex/jobscheduler/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/power/OWNERS b/services/tests/mockingservicestests/src/com/android/server/power/OWNERS
new file mode 100644
index 0000000..d68066b
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/power/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/power/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/usage/OWNERS b/services/tests/mockingservicestests/src/com/android/server/usage/OWNERS
new file mode 100644
index 0000000..d3227de
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/usage/OWNERS
@@ -0,0 +1 @@
+include /services/usage/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/wallpaper/OWNERS b/services/tests/mockingservicestests/src/com/android/server/wallpaper/OWNERS
new file mode 100644
index 0000000..8ff0f74
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/wallpaper/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/wallpaper/OWNERS
diff --git a/services/tests/servicestests/apks/OWNERS b/services/tests/servicestests/apks/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/tests/servicestests/apks/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/services/tests/servicestests/assets/NetworkPolicy/OWNERS b/services/tests/servicestests/assets/NetworkPolicy/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/services/tests/servicestests/assets/NetworkPolicy/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/OWNERS b/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java b/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java
deleted file mode 100644
index 33ea1d6..0000000
--- a/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server;
-
-import static android.net.INetd.FIREWALL_CHAIN_DOZABLE;
-import static android.net.INetd.FIREWALL_CHAIN_POWERSAVE;
-import static android.net.INetd.FIREWALL_CHAIN_STANDBY;
-import static android.net.INetd.FIREWALL_RULE_ALLOW;
-import static android.net.INetd.FIREWALL_RULE_DENY;
-import static android.net.NetworkPolicyManager.FIREWALL_RULE_DEFAULT;
-import static android.util.DebugUtils.valueToString;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import android.net.NetworkPolicyManager;
-import android.util.ArrayMap;
-
-import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.util.function.BiFunction;
-
-/**
- * Test class for {@link NetworkManagementInternal}.
- *
- * To run the tests, use
- *
- * runtest -c com.android.server.NetworkManagementInternalTest frameworks-services
- *
- * or the following steps:
- *
- * Build: m FrameworksServicesTests
- * Install: adb install -r \
- *     ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
- * Run: adb shell am instrument -e class com.android.server.NetworkManagementInternalTest -w \
- *     com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
- */
-@SmallTest
-@RunWith(AndroidJUnit4.class)
-public class NetworkManagementInternalTest {
-    private static final int TEST_UID = 111;
-
-    private NetworkManagementService.Injector mInjector;
-    private NetworkManagementInternal mNmi;
-
-    @Before
-    public void setUp() {
-        final NetworkManagementService service = new NetworkManagementService();
-        mInjector = service.getInjector();
-        mNmi = service.new LocalService();
-    }
-
-    @Test
-    public void testIsNetworkRestrictedForUid() {
-        // No firewall chains enabled
-        assertFalse(mNmi.isNetworkRestrictedForUid(TEST_UID));
-
-        // Restrict usage of mobile data in background
-        mInjector.setUidOnMeteredNetworkList(true, TEST_UID, true);
-        assertTrue("Should be true since mobile data usage is restricted",
-                mNmi.isNetworkRestrictedForUid(TEST_UID));
-        mInjector.reset();
-
-        // Data saver is on and uid is not allowlisted
-        mInjector.setDataSaverMode(true);
-        mInjector.setUidOnMeteredNetworkList(false, TEST_UID, false);
-        assertTrue("Should be true since data saver is on and the uid is not whitelisted",
-                mNmi.isNetworkRestrictedForUid(TEST_UID));
-        mInjector.reset();
-
-        // Data saver is on and uid is allowlisted
-        mInjector.setDataSaverMode(true);
-        mInjector.setUidOnMeteredNetworkList(false, TEST_UID, true);
-        assertFalse("Should be false since data saver is on and the uid is whitelisted",
-                mNmi.isNetworkRestrictedForUid(TEST_UID));
-        mInjector.reset();
-
-        final ArrayMap<Integer, ArrayMap<Integer, Boolean>> expected = new ArrayMap<>();
-        // Dozable chain
-        final ArrayMap<Integer, Boolean> isRestrictedForDozable = new ArrayMap<>();
-        isRestrictedForDozable.put(FIREWALL_RULE_DEFAULT, true);
-        isRestrictedForDozable.put(FIREWALL_RULE_ALLOW, false);
-        isRestrictedForDozable.put(FIREWALL_RULE_DENY, true);
-        expected.put(FIREWALL_CHAIN_DOZABLE, isRestrictedForDozable);
-        // Powersaver chain
-        final ArrayMap<Integer, Boolean> isRestrictedForPowerSave = new ArrayMap<>();
-        isRestrictedForPowerSave.put(FIREWALL_RULE_DEFAULT, true);
-        isRestrictedForPowerSave.put(FIREWALL_RULE_ALLOW, false);
-        isRestrictedForPowerSave.put(FIREWALL_RULE_DENY, true);
-        expected.put(FIREWALL_CHAIN_POWERSAVE, isRestrictedForPowerSave);
-        // Standby chain
-        final ArrayMap<Integer, Boolean> isRestrictedForStandby = new ArrayMap<>();
-        isRestrictedForStandby.put(FIREWALL_RULE_DEFAULT, false);
-        isRestrictedForStandby.put(FIREWALL_RULE_ALLOW, false);
-        isRestrictedForStandby.put(FIREWALL_RULE_DENY, true);
-        expected.put(FIREWALL_CHAIN_STANDBY, isRestrictedForStandby);
-
-        final int[] chains = {
-                FIREWALL_CHAIN_STANDBY,
-                FIREWALL_CHAIN_POWERSAVE,
-                FIREWALL_CHAIN_DOZABLE
-        };
-        final int[] states = {
-                FIREWALL_RULE_ALLOW,
-                FIREWALL_RULE_DENY,
-                FIREWALL_RULE_DEFAULT
-        };
-        BiFunction<Integer, Integer, String> errorMsg = (chain, state) -> {
-            return String.format("Unexpected value for chain: %s and state: %s",
-                    valueToString(NetworkPolicyManager.class, "FIREWALL_CHAIN_", chain),
-                    valueToString(NetworkPolicyManager.class, "FIREWALL_RULE_", state));
-        };
-        for (int chain : chains) {
-            final ArrayMap<Integer, Boolean> expectedValues = expected.get(chain);
-            mInjector.setFirewallChainState(chain, true);
-            for (int state : states) {
-                mInjector.setFirewallRule(chain, TEST_UID, state);
-                assertEquals(errorMsg.apply(chain, state),
-                        expectedValues.get(state), mNmi.isNetworkRestrictedForUid(TEST_UID));
-            }
-            mInjector.reset();
-        }
-    }
-}
diff --git a/services/tests/servicestests/src/com/android/server/OWNERS b/services/tests/servicestests/src/com/android/server/OWNERS
new file mode 100644
index 0000000..6561778
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/OWNERS
@@ -0,0 +1,7 @@
+per-file *Alarm* = file:/apex/jobscheduler/OWNERS
+per-file *AppOp* = file:/core/java/android/permission/OWNERS
+per-file *Bluetooth* = file:/core/java/android/bluetooth/OWNERS
+per-file *Gnss* = file:/services/core/java/com/android/server/location/OWNERS
+per-file *Network* = file:/services/core/java/com/android/server/net/OWNERS
+per-file *Vibrator* = file:/services/core/java/com/android/server/vibrator/OWNERS
+per-file GestureLauncherServiceTest.java = file:platform/packages/apps/EmergencyInfo:/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/OWNERS b/services/tests/servicestests/src/com/android/server/accessibility/OWNERS
new file mode 100644
index 0000000..b74281e
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/accessibility/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/accessibility/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/accounts/OWNERS b/services/tests/servicestests/src/com/android/server/accounts/OWNERS
new file mode 100644
index 0000000..df1b4f4
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/accounts/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/accounts/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/adb/OWNERS b/services/tests/servicestests/src/com/android/server/adb/OWNERS
new file mode 100644
index 0000000..b97f795
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/adb/OWNERS
@@ -0,0 +1 @@
+include platform/packages/modules/adb:/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/am/OWNERS b/services/tests/servicestests/src/com/android/server/am/OWNERS
new file mode 100644
index 0000000..72c0a9e
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/am/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/am/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/appop/OWNERS b/services/tests/servicestests/src/com/android/server/appop/OWNERS
new file mode 100644
index 0000000..999ea0e
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/appop/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/permission/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/appsearch/OWNERS b/services/tests/servicestests/src/com/android/server/appsearch/OWNERS
new file mode 100644
index 0000000..ebe9e4e
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/appsearch/OWNERS
@@ -0,0 +1 @@
+include /apex/appsearch/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/attention/OWNERS b/services/tests/servicestests/src/com/android/server/attention/OWNERS
new file mode 100644
index 0000000..51fc9bd
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/attention/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/attention/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/backup/OWNERS b/services/tests/servicestests/src/com/android/server/backup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/backup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthServiceTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthServiceTest.java
index 737eeaf..6167d0d 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/AuthServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthServiceTest.java
@@ -28,6 +28,7 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.app.AppOpsManager;
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback;
@@ -72,6 +73,8 @@
     IIrisService mIrisService;
     @Mock
     IFaceService mFaceService;
+    @Mock
+    AppOpsManager mAppOpsManager;
 
     @Before
     public void setUp() {
@@ -90,6 +93,7 @@
         when(mInjector.getFingerprintService()).thenReturn(mFingerprintService);
         when(mInjector.getFaceService()).thenReturn(mFaceService);
         when(mInjector.getIrisService()).thenReturn(mIrisService);
+        when(mInjector.getAppOps(any())).thenReturn(mAppOpsManager);
     }
 
     @Test
@@ -137,7 +141,9 @@
 
     // TODO(b/141025588): Check that an exception is thrown when the userId != callingUserId
     @Test
-    public void testAuthenticate_callsBiometricServiceAuthenticate() throws Exception {
+    public void testAuthenticate_appOpsOk_callsBiometricServiceAuthenticate() throws Exception {
+        when(mAppOpsManager.noteOp(eq(AppOpsManager.OP_USE_BIOMETRIC), anyInt(), any(), any(),
+                any())).thenReturn(AppOpsManager.MODE_ALLOWED);
         mAuthService = new AuthService(mContext, mInjector);
         mAuthService.onStart();
 
@@ -167,6 +173,38 @@
     }
 
     @Test
+    public void testAuthenticate_appOpsDenied_doesNotCallBiometricService() throws Exception {
+        when(mAppOpsManager.noteOp(eq(AppOpsManager.OP_USE_BIOMETRIC), anyInt(), any(), any(),
+                any())).thenReturn(AppOpsManager.MODE_ERRORED);
+        mAuthService = new AuthService(mContext, mInjector);
+        mAuthService.onStart();
+
+        final Binder token = new Binder();
+        final Bundle bundle = new Bundle();
+        final long sessionId = 0;
+        final int userId = 0;
+
+        mAuthService.mImpl.authenticate(
+                token,
+                sessionId,
+                userId,
+                mReceiver,
+                TEST_OP_PACKAGE_NAME,
+                bundle);
+        waitForIdle();
+        verify(mBiometricService, never()).authenticate(
+                eq(token),
+                eq(sessionId),
+                eq(userId),
+                eq(mReceiver),
+                eq(TEST_OP_PACKAGE_NAME),
+                eq(bundle),
+                eq(Binder.getCallingUid()),
+                eq(Binder.getCallingPid()),
+                eq(UserHandle.getCallingUserId()));
+    }
+
+    @Test
     public void testCanAuthenticate_callsBiometricServiceCanAuthenticate() throws Exception {
         mAuthService = new AuthService(mContext, mInjector);
         mAuthService.onStart();
diff --git a/services/tests/servicestests/src/com/android/server/compat/OWNERS b/services/tests/servicestests/src/com/android/server/compat/OWNERS
new file mode 100644
index 0000000..f8c3520
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/compat/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/compat/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/OWNERS b/services/tests/servicestests/src/com/android/server/devicepolicy/OWNERS
new file mode 100644
index 0000000..e95633a
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/app/admin/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/devicestate/OWNERS b/services/tests/servicestests/src/com/android/server/devicestate/OWNERS
new file mode 100644
index 0000000..d9b0e2e
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/devicestate/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/devicestate/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/display/OWNERS b/services/tests/servicestests/src/com/android/server/display/OWNERS
new file mode 100644
index 0000000..6ce1ee4
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/display/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/display/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java
index 63d7dbd..24a01003 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java
@@ -56,6 +56,30 @@
     }
 
     @Test
+    public void isValid_unregisteredSource() {
+        // Message invokes a broadcast response
+        //   <Get Menu Language>
+        assertMessageValidity("F4:91").isEqualTo(OK);
+        //   <Request Active Source>
+        assertMessageValidity("FF:85").isEqualTo(OK);
+
+        // Message by CEC Switch
+        //   <Routing Change>
+        assertMessageValidity("FF:80:00:00:10:00").isEqualTo(OK);
+
+        //   <Routing Information>
+        assertMessageValidity("FF:81:10:00").isEqualTo(OK);
+
+        // Standby
+        assertMessageValidity("F4:36").isEqualTo(OK);
+        assertMessageValidity("FF:36").isEqualTo(OK);
+
+        // <Report Physical Address> / <Active Source>
+        assertMessageValidity("FF:84:10:00:04").isEqualTo(OK);
+        assertMessageValidity("FF:82:10:00").isEqualTo(OK);
+    }
+
+    @Test
     public void isValid_giveDevicePowerStatus() {
         assertMessageValidity("04:8F").isEqualTo(OK);
 
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/OWNERS b/services/tests/servicestests/src/com/android/server/hdmi/OWNERS
new file mode 100644
index 0000000..c3c47ed
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/hdmi/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/hardware/hdmi/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/input/OWNERS b/services/tests/servicestests/src/com/android/server/input/OWNERS
new file mode 100644
index 0000000..d701f23
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/input/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/hardware/input/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/inputmethod/OWNERS b/services/tests/servicestests/src/com/android/server/inputmethod/OWNERS
new file mode 100644
index 0000000..5deb2ce
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/inputmethod/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/inputmethod/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/integrity/OWNERS b/services/tests/servicestests/src/com/android/server/integrity/OWNERS
new file mode 100644
index 0000000..653d1c9
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/integrity/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/integrity/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/job/OWNERS b/services/tests/servicestests/src/com/android/server/job/OWNERS
new file mode 100644
index 0000000..6f207fb1
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/job/OWNERS
@@ -0,0 +1 @@
+include /apex/jobscheduler/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/lights/OWNERS b/services/tests/servicestests/src/com/android/server/lights/OWNERS
new file mode 100644
index 0000000..cb46a80
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/lights/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/lights/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/OWNERS b/services/tests/servicestests/src/com/android/server/locksettings/OWNERS
new file mode 100644
index 0000000..0a8dc8c
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/locksettings/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/locksettings/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/SyntheticPasswordTests.java b/services/tests/servicestests/src/com/android/server/locksettings/SyntheticPasswordTests.java
index ba85199..2c2fdca 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/SyntheticPasswordTests.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/SyntheticPasswordTests.java
@@ -519,10 +519,24 @@
         LockscreenCredential password = newPassword("password");
         initializeCredentialUnderSP(password, PRIMARY_USER_ID);
         assertTrue(mService.setLockCredential(password, password, PRIMARY_USER_ID));
+        assertNoOrphanedFilesLeft(PRIMARY_USER_ID);
+    }
 
+    @Test
+    public void testAddingEscrowToken_NoOrphanedFilesLeft() throws Exception {
+        final byte[] token = "some-high-entropy-secure-token".getBytes();
+        for (int i = 0; i < 16; i++) {
+            long handle = mLocalService.addEscrowToken(token, PRIMARY_USER_ID, null);
+            assertTrue(mLocalService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+            mLocalService.removeEscrowToken(handle, PRIMARY_USER_ID);
+        }
+        assertNoOrphanedFilesLeft(PRIMARY_USER_ID);
+    }
+
+    private void assertNoOrphanedFilesLeft(int userId) {
         String handleString = String.format("%016x",
-                mService.getSyntheticPasswordHandleLocked(PRIMARY_USER_ID));
-        File directory = mStorage.getSyntheticPasswordDirectoryForUser(PRIMARY_USER_ID);
+                mService.getSyntheticPasswordHandleLocked(userId));
+        File directory = mStorage.getSyntheticPasswordDirectoryForUser(userId);
         for (File file : directory.listFiles()) {
             String[] parts = file.getName().split("\\.");
             if (!parts[0].equals(handleString) && !parts[0].equals("0000000000000000")) {
diff --git a/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java b/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java
index 7767a28..9d300a6 100644
--- a/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java
+++ b/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java
@@ -20,11 +20,11 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
+import android.net.InetAddresses;
 import android.net.IpConfiguration;
 import android.net.IpConfiguration.IpAssignment;
 import android.net.IpConfiguration.ProxySettings;
 import android.net.LinkAddress;
-import android.net.NetworkUtils;
 import android.net.ProxyInfo;
 import android.net.StaticIpConfiguration;
 import android.util.ArrayMap;
@@ -79,8 +79,8 @@
 
         StaticIpConfiguration staticIpConfiguration = new StaticIpConfiguration();
         staticIpConfiguration.ipAddress = new LinkAddress(IP_ADDR_1);
-        staticIpConfiguration.dnsServers.add(NetworkUtils.numericToInetAddress(DNS_IP_ADDR_1));
-        staticIpConfiguration.dnsServers.add(NetworkUtils.numericToInetAddress(DNS_IP_ADDR_2));
+        staticIpConfiguration.dnsServers.add(InetAddresses.parseNumericAddress(DNS_IP_ADDR_1));
+        staticIpConfiguration.dnsServers.add(InetAddresses.parseNumericAddress(DNS_IP_ADDR_2));
 
         ProxyInfo proxyInfo = new ProxyInfo("10.10.10.10", 88, "host1,host2");
 
diff --git a/services/tests/servicestests/src/com/android/server/net/OWNERS b/services/tests/servicestests/src/com/android/server/net/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/net/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/om/OWNERS b/services/tests/servicestests/src/com/android/server/om/OWNERS
new file mode 100644
index 0000000..afb98d4
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/om/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/content/om/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/people/OWNERS b/services/tests/servicestests/src/com/android/server/people/OWNERS
new file mode 100644
index 0000000..3198a5e
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/people/OWNERS
@@ -0,0 +1 @@
+include /services/people/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/people/prediction/SharesheetModelScorerTest.java b/services/tests/servicestests/src/com/android/server/people/prediction/SharesheetModelScorerTest.java
index 45fff48..605878d 100644
--- a/services/tests/servicestests/src/com/android/server/people/prediction/SharesheetModelScorerTest.java
+++ b/services/tests/servicestests/src/com/android/server/people/prediction/SharesheetModelScorerTest.java
@@ -20,6 +20,7 @@
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.anySet;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -28,9 +29,13 @@
 import android.app.prediction.AppTarget;
 import android.app.prediction.AppTargetId;
 import android.app.usage.UsageEvents;
+import android.content.Context;
+import android.content.pm.ShortcutInfo;
 import android.os.UserHandle;
+import android.provider.DeviceConfig;
 import android.util.Range;
 
+import com.android.internal.config.sysui.SystemUiDeviceConfigFlags;
 import com.android.server.people.data.AppUsageStatsData;
 import com.android.server.people.data.DataManager;
 import com.android.server.people.data.Event;
@@ -121,6 +126,13 @@
     private ShareTargetPredictor.ShareTarget mShareTarget5;
     private ShareTargetPredictor.ShareTarget mShareTarget6;
 
+    private ShareTargetPredictor.ShareTarget mShareShortcutTarget1;
+    private ShareTargetPredictor.ShareTarget mShareShortcutTarget2;
+    private ShareTargetPredictor.ShareTarget mShareShortcutTarget3;
+    private ShareTargetPredictor.ShareTarget mShareShortcutTarget4;
+    private ShareTargetPredictor.ShareTarget mShareShortcutTarget5;
+    private ShareTargetPredictor.ShareTarget mShareShortcutTarget6;
+
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
@@ -154,6 +166,46 @@
                         new AppTargetId("cls2#pkg3"), PACKAGE_3, UserHandle.of(USER_ID))
                         .setClassName(CLASS_2).build(),
                 null, null);
+
+        mShareShortcutTarget1 = new ShareTargetPredictor.ShareTarget(
+                new AppTarget.Builder(
+                        new AppTargetId("cls1#pkg1#1"), buildShortcutInfo(PACKAGE_1, 0, "1"))
+                        .setClassName(CLASS_1).setRank(2).build(),
+                mEventHistory1, null);
+        mShareShortcutTarget2 = new ShareTargetPredictor.ShareTarget(
+                new AppTarget.Builder(
+                        new AppTargetId("cls1#pkg1#2"), buildShortcutInfo(PACKAGE_1, 0, "2"))
+                        .setClassName(CLASS_1).setRank(1).build(),
+                mEventHistory2, null);
+        mShareShortcutTarget3 = new ShareTargetPredictor.ShareTarget(
+                new AppTarget.Builder(
+                        new AppTargetId("cls1#pkg1#3"), buildShortcutInfo(PACKAGE_1, 0, "3"))
+                        .setClassName(CLASS_1).setRank(0).build(),
+                mEventHistory3, null);
+        mShareShortcutTarget4 = new ShareTargetPredictor.ShareTarget(
+                new AppTarget.Builder(
+                        new AppTargetId("cls1#pkg2#1"), buildShortcutInfo(PACKAGE_2, 0, "1"))
+                        .setClassName(CLASS_1).setRank(2).build(),
+                mEventHistory4, null);
+        mShareShortcutTarget5 = new ShareTargetPredictor.ShareTarget(
+                new AppTarget.Builder(
+                        new AppTargetId("cls1#pkg2#2"), buildShortcutInfo(PACKAGE_2, 0, "2"))
+                        .setClassName(CLASS_1).setRank(1).build(),
+                mEventHistory5, null);
+        mShareShortcutTarget6 = new ShareTargetPredictor.ShareTarget(
+                new AppTarget.Builder(
+                        new AppTargetId("cls1#pkg2#3"), buildShortcutInfo(PACKAGE_2, 0, "3"))
+                        .setClassName(CLASS_1).setRank(3).build(),
+                null, null);
+
+        DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
+                SystemUiDeviceConfigFlags.TOP_NATIVE_RANKED_SHARING_SHORTCUTS_BOOSTER,
+                Float.toString(0f),
+                true /* makeDefault*/);
+        DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
+                SystemUiDeviceConfigFlags.NON_TOP_NATIVE_RANKED_SHARING_SHORTCUTS_BOOSTER,
+                Float.toString(0f),
+                true /* makeDefault*/);
     }
 
     @Test
@@ -433,6 +485,101 @@
         assertEquals(0f, mShareTarget6.getScore(), DELTA);
     }
 
+    @Test
+    public void testComputeScoreForDirectShare() {
+        // Frequency and recency
+        when(mEventHistory1.getEventIndex(anySet())).thenReturn(mEventIndex1);
+        when(mEventHistory2.getEventIndex(anySet())).thenReturn(mEventIndex2);
+        when(mEventHistory3.getEventIndex(anySet())).thenReturn(mEventIndex3);
+        when(mEventHistory4.getEventIndex(anySet())).thenReturn(mEventIndex4);
+        when(mEventHistory5.getEventIndex(anySet())).thenReturn(mEventIndex5);
+
+        when(mEventIndex1.getActiveTimeSlots()).thenReturn(
+                List.of(WITHIN_ONE_DAY, TWO_DAYS_AGO, FIVE_DAYS_AGO));
+        when(mEventIndex2.getActiveTimeSlots()).thenReturn(List.of(TWO_DAYS_AGO, TWELVE_DAYS_AGO));
+        when(mEventIndex3.getActiveTimeSlots()).thenReturn(List.of(FIVE_DAYS_AGO, TWENTY_DAYS_AGO));
+        when(mEventIndex4.getActiveTimeSlots()).thenReturn(
+                List.of(EIGHT_DAYS_AGO, TWELVE_DAYS_AGO, FOUR_WEEKS_AGO));
+        when(mEventIndex5.getActiveTimeSlots()).thenReturn(List.of());
+
+        when(mEventIndex1.getMostRecentActiveTimeSlot()).thenReturn(WITHIN_ONE_DAY);
+        when(mEventIndex2.getMostRecentActiveTimeSlot()).thenReturn(TWO_DAYS_AGO);
+        when(mEventIndex3.getMostRecentActiveTimeSlot()).thenReturn(FIVE_DAYS_AGO);
+        when(mEventIndex4.getMostRecentActiveTimeSlot()).thenReturn(EIGHT_DAYS_AGO);
+        when(mEventIndex5.getMostRecentActiveTimeSlot()).thenReturn(null);
+
+        // Frequency of the same mime type
+        when(mEventHistory1.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex6);
+        when(mEventHistory2.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex7);
+        when(mEventHistory3.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex8);
+        when(mEventHistory4.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex9);
+        when(mEventHistory5.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex10);
+
+        when(mEventIndex6.getActiveTimeSlots()).thenReturn(List.of(TWO_DAYS_AGO));
+        when(mEventIndex7.getActiveTimeSlots()).thenReturn(List.of(TWO_DAYS_AGO, TWELVE_DAYS_AGO));
+        when(mEventIndex8.getActiveTimeSlots()).thenReturn(List.of());
+        when(mEventIndex9.getActiveTimeSlots()).thenReturn(List.of(EIGHT_DAYS_AGO));
+        when(mEventIndex10.getActiveTimeSlots()).thenReturn(List.of());
+
+        SharesheetModelScorer.computeScore(
+                List.of(mShareShortcutTarget1, mShareShortcutTarget2, mShareShortcutTarget3,
+                        mShareShortcutTarget4, mShareShortcutTarget5, mShareShortcutTarget6),
+                Event.TYPE_SHARE_TEXT,
+                NOW);
+
+        // Verification
+        assertEquals(0.514f, mShareShortcutTarget1.getScore(), DELTA);
+        assertEquals(0.475125f, mShareShortcutTarget2.getScore(), DELTA);
+        assertEquals(0.33f, mShareShortcutTarget3.getScore(), DELTA);
+        assertEquals(0.4411f, mShareShortcutTarget4.getScore(), DELTA);
+        assertEquals(0f, mShareShortcutTarget5.getScore(), DELTA);
+        assertEquals(0f, mShareShortcutTarget6.getScore(), DELTA);
+    }
+
+    @Test
+    public void testComputeScoreForDirectShare_promoteTopNativeRankedShortcuts() {
+        DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
+                SystemUiDeviceConfigFlags.TOP_NATIVE_RANKED_SHARING_SHORTCUTS_BOOSTER,
+                Float.toString(0.4f),
+                true /* makeDefault*/);
+        DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
+                SystemUiDeviceConfigFlags.NON_TOP_NATIVE_RANKED_SHARING_SHORTCUTS_BOOSTER,
+                Float.toString(0.3f),
+                true /* makeDefault*/);
+
+        when(mEventHistory1.getEventIndex(anySet())).thenReturn(mEventIndex1);
+        when(mEventHistory2.getEventIndex(anySet())).thenReturn(mEventIndex2);
+        when(mEventHistory3.getEventIndex(anySet())).thenReturn(mEventIndex3);
+        when(mEventHistory4.getEventIndex(anySet())).thenReturn(mEventIndex4);
+        when(mEventHistory5.getEventIndex(anySet())).thenReturn(mEventIndex5);
+        when(mEventHistory1.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex6);
+        when(mEventHistory2.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex7);
+        when(mEventHistory3.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex8);
+        when(mEventHistory4.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex9);
+        when(mEventHistory5.getEventIndex(Event.TYPE_SHARE_TEXT)).thenReturn(mEventIndex10);
+
+        SharesheetModelScorer.computeScoreForDirectShare(
+                List.of(mShareShortcutTarget1, mShareShortcutTarget2, mShareShortcutTarget3,
+                        mShareShortcutTarget4, mShareShortcutTarget5, mShareShortcutTarget6),
+                Event.TYPE_SHARE_TEXT, 20);
+
+        assertEquals(0f, mShareShortcutTarget1.getScore(), DELTA);
+        assertEquals(0.3f, mShareShortcutTarget2.getScore(), DELTA);
+        assertEquals(0.4f, mShareShortcutTarget3.getScore(), DELTA);
+        assertEquals(0.3f, mShareShortcutTarget4.getScore(), DELTA);
+        assertEquals(0.4f, mShareShortcutTarget5.getScore(), DELTA);
+        assertEquals(0f, mShareShortcutTarget6.getScore(), DELTA);
+    }
+
+    private static ShortcutInfo buildShortcutInfo(String packageName, int userId, String id) {
+        Context mockContext = mock(Context.class);
+        when(mockContext.getPackageName()).thenReturn(packageName);
+        when(mockContext.getUserId()).thenReturn(userId);
+        when(mockContext.getUser()).thenReturn(UserHandle.of(userId));
+        ShortcutInfo.Builder builder = new ShortcutInfo.Builder(mockContext, id).setShortLabel(id);
+        return builder.build();
+    }
+
     private static UsageEvents.Event createUsageEvent(String packageName) {
         UsageEvents.Event e = new UsageEvents.Event();
         e.mPackage = packageName;
diff --git a/services/tests/servicestests/src/com/android/server/pm/OWNERS b/services/tests/servicestests/src/com/android/server/pm/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/pm/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
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 66ca839..0ccc026 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
@@ -105,7 +105,7 @@
         UserData read = mUserManagerService.readUserLP(
                 data.info.id, new ByteArrayInputStream(bytes));
 
-        assertUserInfoEquals(data.info, read.info);
+        assertUserInfoEquals(data.info, read.info, /* parcelCopy= */ false);
     }
 
     @Test
@@ -123,7 +123,16 @@
         UserInfo read = UserInfo.CREATOR.createFromParcel(in);
         in.recycle();
 
-        assertUserInfoEquals(info, read);
+        assertUserInfoEquals(info, read, /* parcelCopy= */ true);
+    }
+
+    @Test
+    public void testCopyConstructor() throws Exception {
+        UserInfo info = createUser();
+
+        UserInfo copy = new UserInfo(info);
+
+        assertUserInfoEquals(info, copy, /* parcelCopy= */ false);
     }
 
     @Test
@@ -227,10 +236,11 @@
         user.partial = true;
         user.guestToRemove = true;
         user.preCreated = true;
+        user.convertedFromPreCreated = true;
         return user;
     }
 
-    private void assertUserInfoEquals(UserInfo one, UserInfo two) {
+    private void assertUserInfoEquals(UserInfo one, UserInfo two, boolean parcelCopy) {
         assertEquals("Id not preserved", one.id, two.id);
         assertEquals("Name not preserved", one.name, two.name);
         assertEquals("Icon path not preserved", one.iconPath, two.iconPath);
@@ -238,11 +248,17 @@
         assertEquals("UserType not preserved", one.userType, two.userType);
         assertEquals("profile group not preserved", one.profileGroupId,
                 two.profileGroupId);
-        assertEquals("restricted profile parent not preseved", one.restrictedProfileParentId,
+        assertEquals("restricted profile parent not preserved", one.restrictedProfileParentId,
                 two.restrictedProfileParentId);
-        assertEquals("profile badge not preseved", one.profileBadge, two.profileBadge);
-        assertEquals("partial not preseved", one.partial, two.partial);
-        assertEquals("guestToRemove not preseved", one.guestToRemove, two.guestToRemove);
-        assertEquals("preCreated not preseved", one.preCreated, two.preCreated);
+        assertEquals("profile badge not preserved", one.profileBadge, two.profileBadge);
+        assertEquals("partial not preserved", one.partial, two.partial);
+        assertEquals("guestToRemove not preserved", one.guestToRemove, two.guestToRemove);
+        assertEquals("preCreated not preserved", one.preCreated, two.preCreated);
+        if (parcelCopy) {
+            assertFalse("convertedFromPreCreated should not be set", two.convertedFromPreCreated);
+        } else {
+            assertEquals("convertedFromPreCreated not preserved", one.convertedFromPreCreated,
+                    two.convertedFromPreCreated);
+        }
     }
 }
diff --git a/services/tests/servicestests/src/com/android/server/policy/OWNERS b/services/tests/servicestests/src/com/android/server/policy/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/policy/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/power/OWNERS b/services/tests/servicestests/src/com/android/server/power/OWNERS
new file mode 100644
index 0000000..d68066b
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/power/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/power/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/powerstats/OWNERS b/services/tests/servicestests/src/com/android/server/powerstats/OWNERS
new file mode 100644
index 0000000..d68066b
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/powerstats/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/power/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/rollback/OWNERS b/services/tests/servicestests/src/com/android/server/rollback/OWNERS
new file mode 100644
index 0000000..d04a706
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/rollback/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/rollback/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/soundtrigger_middleware/OWNERS b/services/tests/servicestests/src/com/android/server/soundtrigger_middleware/OWNERS
new file mode 100644
index 0000000..816bc6b
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/soundtrigger_middleware/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/media/soundtrigger/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/stats/OWNERS b/services/tests/servicestests/src/com/android/server/stats/OWNERS
new file mode 100644
index 0000000..ee865b1
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/stats/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/stats/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/storage/OWNERS b/services/tests/servicestests/src/com/android/server/storage/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/storage/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/textclassifier/OWNERS b/services/tests/servicestests/src/com/android/server/textclassifier/OWNERS
new file mode 100644
index 0000000..46b3cb8
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/textclassifier/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/textclassifier/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/OWNERS b/services/tests/servicestests/src/com/android/server/timedetector/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/timedetector/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
index 2eeeb3e..f0b1be5 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
@@ -28,6 +28,7 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.app.timedetector.GnssTimeSuggestion;
 import android.app.timedetector.ManualTimeSuggestion;
 import android.app.timedetector.NetworkTimeSuggestion;
 import android.app.timedetector.TelephonyTimeSuggestion;
@@ -132,15 +133,14 @@
         doNothing().when(mMockContext).enforceCallingOrSelfPermission(anyString(), any());
 
         ManualTimeSuggestion manualTimeSuggestion = createManualTimeSuggestion();
-        mTimeDetectorService.suggestManualTime(manualTimeSuggestion);
-        mTestHandler.assertTotalMessagesEnqueued(1);
+
+        assertTrue(mTimeDetectorService.suggestManualTime(manualTimeSuggestion));
+        mStubbedTimeDetectorStrategy.verifySuggestManualTimeCalled(manualTimeSuggestion);
 
         verify(mMockContext).enforceCallingOrSelfPermission(
                 eq(android.Manifest.permission.SUGGEST_MANUAL_TIME_AND_ZONE),
                 anyString());
 
-        mTestHandler.waitForMessagesToBeProcessed();
-        mStubbedTimeDetectorStrategy.verifySuggestManualTimeCalled(manualTimeSuggestion);
     }
 
     @Test(expected = SecurityException.class)
@@ -173,6 +173,36 @@
         mStubbedTimeDetectorStrategy.verifySuggestNetworkTimeCalled(NetworkTimeSuggestion);
     }
 
+    @Test(expected = SecurityException.class)
+    public void testSuggestGnssTime_withoutPermission() {
+        doThrow(new SecurityException("Mock"))
+                .when(mMockContext).enforceCallingOrSelfPermission(anyString(), any());
+        GnssTimeSuggestion gnssTimeSuggestion = createGnssTimeSuggestion();
+
+        try {
+            mTimeDetectorService.suggestGnssTime(gnssTimeSuggestion);
+            fail();
+        } finally {
+            verify(mMockContext).enforceCallingOrSelfPermission(
+                    eq(android.Manifest.permission.SET_TIME), anyString());
+        }
+    }
+
+    @Test
+    public void testSuggestGnssTime() throws Exception {
+        doNothing().when(mMockContext).enforceCallingOrSelfPermission(anyString(), any());
+
+        GnssTimeSuggestion gnssTimeSuggestion = createGnssTimeSuggestion();
+        mTimeDetectorService.suggestGnssTime(gnssTimeSuggestion);
+        mTestHandler.assertTotalMessagesEnqueued(1);
+
+        verify(mMockContext).enforceCallingOrSelfPermission(
+                eq(android.Manifest.permission.SET_TIME), anyString());
+
+        mTestHandler.waitForMessagesToBeProcessed();
+        mStubbedTimeDetectorStrategy.verifySuggestGnssTimeCalled(gnssTimeSuggestion);
+    }
+
     @Test
     public void testDump() {
         when(mMockContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP))
@@ -217,27 +247,30 @@
         return new NetworkTimeSuggestion(timeValue);
     }
 
+    private static GnssTimeSuggestion createGnssTimeSuggestion() {
+        TimestampedValue<Long> timeValue = new TimestampedValue<>(100L, 1_000_000L);
+        return new GnssTimeSuggestion(timeValue);
+    }
+
     private static class StubbedTimeDetectorStrategy implements TimeDetectorStrategy {
 
         // Call tracking.
         private TelephonyTimeSuggestion mLastTelephonySuggestion;
         private ManualTimeSuggestion mLastManualSuggestion;
         private NetworkTimeSuggestion mLastNetworkSuggestion;
+        private GnssTimeSuggestion mLastGnssSuggestion;
         private boolean mHandleAutoTimeDetectionChangedCalled;
         private boolean mDumpCalled;
 
         @Override
-        public void initialize(Callback ignored) {
-        }
-
-        @Override
         public void suggestTelephonyTime(TelephonyTimeSuggestion timeSuggestion) {
             mLastTelephonySuggestion = timeSuggestion;
         }
 
         @Override
-        public void suggestManualTime(ManualTimeSuggestion timeSuggestion) {
+        public boolean suggestManualTime(ManualTimeSuggestion timeSuggestion) {
             mLastManualSuggestion = timeSuggestion;
+            return true;
         }
 
         @Override
@@ -246,7 +279,12 @@
         }
 
         @Override
-        public void handleAutoTimeDetectionChanged() {
+        public void suggestGnssTime(GnssTimeSuggestion timeSuggestion) {
+            mLastGnssSuggestion = timeSuggestion;
+        }
+
+        @Override
+        public void handleAutoTimeConfigChanged() {
             mHandleAutoTimeDetectionChangedCalled = true;
         }
 
@@ -259,6 +297,7 @@
             mLastTelephonySuggestion = null;
             mLastManualSuggestion = null;
             mLastNetworkSuggestion = null;
+            mLastGnssSuggestion = null;
             mHandleAutoTimeDetectionChangedCalled = false;
             mDumpCalled = false;
         }
@@ -267,14 +306,18 @@
             assertEquals(expectedSuggestion, mLastTelephonySuggestion);
         }
 
-        public void verifySuggestManualTimeCalled(ManualTimeSuggestion expectedSuggestion) {
+        void verifySuggestManualTimeCalled(ManualTimeSuggestion expectedSuggestion) {
             assertEquals(expectedSuggestion, mLastManualSuggestion);
         }
 
-        public void verifySuggestNetworkTimeCalled(NetworkTimeSuggestion expectedSuggestion) {
+        void verifySuggestNetworkTimeCalled(NetworkTimeSuggestion expectedSuggestion) {
             assertEquals(expectedSuggestion, mLastNetworkSuggestion);
         }
 
+        void verifySuggestGnssTimeCalled(GnssTimeSuggestion expectedSuggestion) {
+            assertEquals(expectedSuggestion, mLastGnssSuggestion);
+        }
+
         void verifyHandleAutoTimeDetectionChangedCalled() {
             assertTrue(mHandleAutoTimeDetectionChangedCalled);
         }
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
index 803b245..b1adb0b 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
+++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
@@ -16,41 +16,53 @@
 
 package com.android.server.timedetector;
 
+import static com.android.server.timedetector.TimeDetectorStrategy.ORIGIN_GNSS;
+import static com.android.server.timedetector.TimeDetectorStrategy.ORIGIN_NETWORK;
+import static com.android.server.timedetector.TimeDetectorStrategy.ORIGIN_TELEPHONY;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import android.app.timedetector.GnssTimeSuggestion;
 import android.app.timedetector.ManualTimeSuggestion;
 import android.app.timedetector.NetworkTimeSuggestion;
 import android.app.timedetector.TelephonyTimeSuggestion;
-import android.icu.util.Calendar;
-import android.icu.util.GregorianCalendar;
-import android.icu.util.TimeZone;
 import android.os.TimestampedValue;
 
 import androidx.test.runner.AndroidJUnit4;
 
+import com.android.server.timedetector.TimeDetectorStrategy.Origin;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
 import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
 
 @RunWith(AndroidJUnit4.class)
 public class TimeDetectorStrategyImplTest {
 
-    private static final TimestampedValue<Long> ARBITRARY_CLOCK_INITIALIZATION_INFO =
+    private static final Instant TIME_LOWER_BOUND = createUtcTime(2009, 1, 1, 12, 0, 0);
+
+    private static final TimestampedValue<Instant> ARBITRARY_CLOCK_INITIALIZATION_INFO =
             new TimestampedValue<>(
                     123456789L /* realtimeClockMillis */,
-                    createUtcTime(2008, 5, 23, 12, 0, 0));
+                    createUtcTime(2010, 5, 23, 12, 0, 0));
+
+    // This is the traditional ordering for time detection on Android.
+    private static final @Origin int [] PROVIDERS_PRIORITY = { ORIGIN_TELEPHONY, ORIGIN_NETWORK };
 
     /**
      * An arbitrary time, very different from the {@link #ARBITRARY_CLOCK_INITIALIZATION_INFO}
      * time. Can be used as the basis for time suggestions.
      */
-    private static final long ARBITRARY_TEST_TIME_MILLIS = createUtcTime(2018, 1, 1, 12, 0, 0);
+    private static final Instant ARBITRARY_TEST_TIME = createUtcTime(2018, 1, 1, 12, 0, 0);
 
     private static final int ARBITRARY_SLOT_INDEX = 123456;
 
@@ -67,10 +79,10 @@
                 .pokeAutoTimeDetectionEnabled(true);
 
         int slotIndex = ARBITRARY_SLOT_INDEX;
-        long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+        Instant testTime = ARBITRARY_TEST_TIME;
 
         TelephonyTimeSuggestion timeSuggestion =
-                mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+                mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
         mScript.simulateTimePassing()
                 .simulateTelephonyTimeSuggestion(timeSuggestion);
 
@@ -106,9 +118,9 @@
         // Send the first time signal. It should be used.
         {
             TelephonyTimeSuggestion timeSuggestion1 =
-                    mScript.generateTelephonyTimeSuggestion(slotIndex, ARBITRARY_TEST_TIME_MILLIS);
+                    mScript.generateTelephonyTimeSuggestion(slotIndex, ARBITRARY_TEST_TIME);
 
-            // Increment the the device clocks to simulate the passage of time.
+            // Increment the device clocks to simulate the passage of time.
             mScript.simulateTimePassing(clockIncrementMillis);
 
             long expectedSystemClockMillis1 =
@@ -157,13 +169,13 @@
         // uses the lowest slotIndex when multiple telephony suggestions are available.
         int slotIndex1 = ARBITRARY_SLOT_INDEX;
         int slotIndex2 = ARBITRARY_SLOT_INDEX + 1;
-        long slotIndex1TimeMillis = ARBITRARY_TEST_TIME_MILLIS;
-        long slotIndex2TimeMillis = ARBITRARY_TEST_TIME_MILLIS + Duration.ofDays(1).toMillis();
+        Instant slotIndex1Time = ARBITRARY_TEST_TIME;
+        Instant slotIndex2Time = ARBITRARY_TEST_TIME.plus(Duration.ofDays(1));
 
         // Make a suggestion with slotIndex2.
         {
             TelephonyTimeSuggestion slotIndex2TimeSuggestion =
-                    mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2TimeMillis);
+                    mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2Time);
             mScript.simulateTimePassing();
 
             long expectedSystemClockMillis =
@@ -180,7 +192,7 @@
         // Now make a different suggestion with slotIndex1.
         {
             TelephonyTimeSuggestion slotIndex1TimeSuggestion =
-                    mScript.generateTelephonyTimeSuggestion(slotIndex1, slotIndex1TimeMillis);
+                    mScript.generateTelephonyTimeSuggestion(slotIndex1, slotIndex1Time);
             mScript.simulateTimePassing();
 
             long expectedSystemClockMillis =
@@ -198,7 +210,7 @@
         // slotIndex1 suggestion will still "win".
         {
             TelephonyTimeSuggestion slotIndex2TimeSuggestion =
-                    mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2TimeMillis);
+                    mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2Time);
             mScript.simulateTimePassing();
 
             mScript.simulateTelephonyTimeSuggestion(slotIndex2TimeSuggestion)
@@ -213,7 +225,7 @@
         // is in an older "bucket".
         {
             TelephonyTimeSuggestion slotIndex2TimeSuggestion =
-                    mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2TimeMillis);
+                    mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2Time);
             mScript.simulateTimePassing();
 
             long expectedSystemClockMillis =
@@ -232,7 +244,7 @@
 
         int slotIndex = ARBITRARY_SLOT_INDEX;
         TelephonyTimeSuggestion timeSuggestion =
-                mScript.generateTelephonyTimeSuggestion(slotIndex, ARBITRARY_TEST_TIME_MILLIS);
+                mScript.generateTelephonyTimeSuggestion(slotIndex, ARBITRARY_TEST_TIME);
         mScript.simulateTimePassing()
                 .simulateTelephonyTimeSuggestion(timeSuggestion)
                 .verifySystemClockWasNotSetAndResetCallTracking()
@@ -246,11 +258,11 @@
                 .pokeThresholds(systemClockUpdateThreshold)
                 .pokeAutoTimeDetectionEnabled(true);
 
-        long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+        Instant testTime = ARBITRARY_TEST_TIME;
         int slotIndex = ARBITRARY_SLOT_INDEX;
 
         TelephonyTimeSuggestion timeSuggestion1 =
-                mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+                mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
         TimestampedValue<Long> utcTime1 = timeSuggestion1.getUtcTime();
 
         // Initialize the strategy / device with a time set from a telephony suggestion.
@@ -300,6 +312,23 @@
     }
 
     @Test
+    public void telephonyTimeSuggestion_ignoredWhenReferencedTimeIsInThePast() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true);
+
+        int slotIndex = ARBITRARY_SLOT_INDEX;
+        Instant suggestedTime = TIME_LOWER_BOUND.minus(Duration.ofDays(1));
+
+        TelephonyTimeSuggestion timeSuggestion =
+                mScript.generateTelephonyTimeSuggestion(
+                        slotIndex, suggestedTime);
+
+        mScript.simulateTelephonyTimeSuggestion(timeSuggestion)
+                .verifySystemClockWasNotSetAndResetCallTracking()
+                .assertLatestTelephonySuggestion(slotIndex, null);
+    }
+
+    @Test
     public void testSuggestTelephonyTime_timeDetectionToggled() {
         final int clockIncrementMillis = 100;
         final int systemClockUpdateThreshold = 2000;
@@ -308,9 +337,9 @@
                 .pokeAutoTimeDetectionEnabled(false);
 
         int slotIndex = ARBITRARY_SLOT_INDEX;
-        long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+        Instant testTime = ARBITRARY_TEST_TIME;
         TelephonyTimeSuggestion timeSuggestion1 =
-                mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+                mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
         TimestampedValue<Long> utcTime1 = timeSuggestion1.getUtcTime();
 
         // Simulate time passing.
@@ -366,9 +395,9 @@
                 .pokeAutoTimeDetectionEnabled(true);
 
         int slotIndex = ARBITRARY_SLOT_INDEX;
-        long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+        Instant testTime = ARBITRARY_TEST_TIME;
         TelephonyTimeSuggestion telephonySuggestion =
-                mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+                mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
 
         mScript.simulateTimePassing();
 
@@ -397,13 +426,13 @@
                 .pokeAutoTimeDetectionEnabled(false);
 
         ManualTimeSuggestion timeSuggestion =
-                mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME_MILLIS);
+                mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME);
 
         mScript.simulateTimePassing();
 
         long expectedSystemClockMillis =
                 mScript.calculateTimeInMillisForNow(timeSuggestion.getUtcTime());
-        mScript.simulateManualTimeSuggestion(timeSuggestion)
+        mScript.simulateManualTimeSuggestion(timeSuggestion, true /* expectedResult */)
                 .verifySystemClockWasSetAndResetCallTracking(expectedSystemClockMillis);
     }
 
@@ -416,9 +445,9 @@
         int slotIndex = ARBITRARY_SLOT_INDEX;
 
         // Simulate a telephony suggestion.
-        long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+        Instant testTime = ARBITRARY_TEST_TIME;
         TelephonyTimeSuggestion telephonyTimeSuggestion =
-                mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+                mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
 
         // Simulate the passage of time.
         mScript.simulateTimePassing();
@@ -441,14 +470,14 @@
         mScript.simulateTimePassing();
 
         // Simulate a manual suggestion 1 day different from the auto suggestion.
-        long manualTimeMillis = testTimeMillis + Duration.ofDays(1).toMillis();
+        Instant manualTime = testTime.plus(Duration.ofDays(1));
         ManualTimeSuggestion manualTimeSuggestion =
-                mScript.generateManualTimeSuggestion(manualTimeMillis);
+                mScript.generateManualTimeSuggestion(manualTime);
         mScript.simulateTimePassing();
 
         long expectedManualClockMillis =
                 mScript.calculateTimeInMillisForNow(manualTimeSuggestion.getUtcTime());
-        mScript.simulateManualTimeSuggestion(manualTimeSuggestion)
+        mScript.simulateManualTimeSuggestion(manualTimeSuggestion, true /* expectedResult */)
                 .verifySystemClockWasSetAndResetCallTracking(expectedManualClockMillis)
                 .assertLatestTelephonySuggestion(slotIndex, telephonyTimeSuggestion);
 
@@ -469,29 +498,40 @@
                 .assertLatestTelephonySuggestion(slotIndex, telephonyTimeSuggestion);
     }
 
-    /**
-     * Manual suggestions should be ignored if auto time is enabled.
-     */
     @Test
-    public void testSuggestManualTime_autoTimeEnabled() {
+    public void manualTimeSuggestion_isIgnored_whenAutoTimeEnabled() {
         mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
                 .pokeAutoTimeDetectionEnabled(true);
 
         ManualTimeSuggestion timeSuggestion =
-                mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME_MILLIS);
+                mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME);
 
         mScript.simulateTimePassing()
-                .simulateManualTimeSuggestion(timeSuggestion)
+                .simulateManualTimeSuggestion(timeSuggestion, false /* expectedResult */)
                 .verifySystemClockWasNotSetAndResetCallTracking();
     }
 
     @Test
+    public void manualTimeSuggestion_ignoresTimeLowerBound() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(false);
+        Instant suggestedTime = TIME_LOWER_BOUND.minus(Duration.ofDays(1));
+
+        ManualTimeSuggestion timeSuggestion =
+                mScript.generateManualTimeSuggestion(suggestedTime);
+
+        mScript.simulateManualTimeSuggestion(timeSuggestion, true /* expectedResult */)
+                .verifySystemClockWasSetAndResetCallTracking(suggestedTime.toEpochMilli());
+    }
+
+    @Test
     public void testSuggestNetworkTime_autoTimeEnabled() {
         mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoOriginPriorities(ORIGIN_NETWORK)
                 .pokeAutoTimeDetectionEnabled(true);
 
         NetworkTimeSuggestion timeSuggestion =
-                mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME_MILLIS);
+                mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME);
 
         mScript.simulateTimePassing();
 
@@ -504,10 +544,11 @@
     @Test
     public void testSuggestNetworkTime_autoTimeDisabled() {
         mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoOriginPriorities(ORIGIN_NETWORK)
                 .pokeAutoTimeDetectionEnabled(false);
 
         NetworkTimeSuggestion timeSuggestion =
-                mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME_MILLIS);
+                mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME);
 
         mScript.simulateTimePassing()
                 .simulateNetworkTimeSuggestion(timeSuggestion)
@@ -515,21 +556,83 @@
     }
 
     @Test
-    public void testSuggestNetworkTime_telephonySuggestionsBeatNetworkSuggestions() {
+    public void networkTimeSuggestion_ignoredWhenReferencedTimeIsInThePast() {
         mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoOriginPriorities(ORIGIN_NETWORK)
                 .pokeAutoTimeDetectionEnabled(true);
 
+        Instant suggestedTime = TIME_LOWER_BOUND.minus(Duration.ofDays(1));
+        NetworkTimeSuggestion timeSuggestion = mScript
+                .generateNetworkTimeSuggestion(suggestedTime);
+
+        mScript.simulateNetworkTimeSuggestion(timeSuggestion)
+                .verifySystemClockWasNotSetAndResetCallTracking()
+                .assertLatestNetworkSuggestion(null);
+    }
+
+    @Test
+    public void testSuggestGnssTime_autoTimeEnabled() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoOriginPriorities(ORIGIN_GNSS)
+                .pokeAutoTimeDetectionEnabled(true);
+
+        GnssTimeSuggestion timeSuggestion =
+                mScript.generateGnssTimeSuggestion(ARBITRARY_TEST_TIME);
+
+        mScript.simulateTimePassing();
+
+        long expectedSystemClockMillis =
+                mScript.calculateTimeInMillisForNow(timeSuggestion.getUtcTime());
+        mScript.simulateGnssTimeSuggestion(timeSuggestion)
+                .verifySystemClockWasSetAndResetCallTracking(expectedSystemClockMillis);
+    }
+
+    @Test
+    public void testSuggestGnssTime_autoTimeDisabled() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoOriginPriorities(ORIGIN_GNSS)
+                .pokeAutoTimeDetectionEnabled(false);
+
+        GnssTimeSuggestion timeSuggestion =
+                mScript.generateGnssTimeSuggestion(ARBITRARY_TEST_TIME);
+
+        mScript.simulateTimePassing()
+                .simulateGnssTimeSuggestion(timeSuggestion)
+                .verifySystemClockWasNotSetAndResetCallTracking();
+    }
+
+    @Test
+    public void gnssTimeSuggestion_ignoredWhenReferencedTimeIsInThePast() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoOriginPriorities(ORIGIN_GNSS)
+                .pokeAutoTimeDetectionEnabled(true);
+
+        Instant suggestedTime = TIME_LOWER_BOUND.minus(Duration.ofDays(1));
+        GnssTimeSuggestion timeSuggestion = mScript
+                .generateGnssTimeSuggestion(suggestedTime);
+
+        mScript.simulateGnssTimeSuggestion(timeSuggestion)
+                .verifySystemClockWasNotSetAndResetCallTracking()
+                .assertLatestGnssSuggestion(null);
+    }
+
+    @Test
+    public void highPrioritySuggestionsBeatLowerPrioritySuggestions_telephonyNetworkOrigins() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY, ORIGIN_NETWORK);
+
         // Three obviously different times that could not be mistaken for each other.
-        long networkTimeMillis1 = ARBITRARY_TEST_TIME_MILLIS;
-        long networkTimeMillis2 = ARBITRARY_TEST_TIME_MILLIS + Duration.ofDays(30).toMillis();
-        long telephonyTimeMillis = ARBITRARY_TEST_TIME_MILLIS + Duration.ofDays(60).toMillis();
+        Instant networkTime1 = ARBITRARY_TEST_TIME;
+        Instant networkTime2 = ARBITRARY_TEST_TIME.plus(Duration.ofDays(30));
+        Instant telephonyTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(60));
         // A small increment used to simulate the passage of time, but not enough to interfere with
         // macro-level time changes associated with suggestion age.
         final long smallTimeIncrementMillis = 101;
 
         // A network suggestion is made. It should be used because there is no telephony suggestion.
         NetworkTimeSuggestion networkTimeSuggestion1 =
-                mScript.generateNetworkTimeSuggestion(networkTimeMillis1);
+                mScript.generateNetworkTimeSuggestion(networkTime1);
         mScript.simulateTimePassing(smallTimeIncrementMillis)
                 .simulateNetworkTimeSuggestion(networkTimeSuggestion1)
                 .verifySystemClockWasSetAndResetCallTracking(
@@ -539,7 +642,7 @@
         mScript.assertLatestTelephonySuggestion(ARBITRARY_SLOT_INDEX, null)
                 .assertLatestNetworkSuggestion(networkTimeSuggestion1);
         assertEquals(networkTimeSuggestion1, mScript.peekLatestValidNetworkSuggestion());
-        assertNull(mScript.peekBestTelephonySuggestion());
+        assertNull("No telephony suggestions were made:", mScript.peekBestTelephonySuggestion());
 
         // Simulate a little time passing.
         mScript.simulateTimePassing(smallTimeIncrementMillis)
@@ -548,7 +651,7 @@
         // Now a telephony suggestion is made. Telephony suggestions are prioritized over network
         // suggestions so it should "win".
         TelephonyTimeSuggestion telephonyTimeSuggestion =
-                mScript.generateTelephonyTimeSuggestion(ARBITRARY_SLOT_INDEX, telephonyTimeMillis);
+                mScript.generateTelephonyTimeSuggestion(ARBITRARY_SLOT_INDEX, telephonyTime);
         mScript.simulateTimePassing(smallTimeIncrementMillis)
                 .simulateTelephonyTimeSuggestion(telephonyTimeSuggestion)
                 .verifySystemClockWasSetAndResetCallTracking(
@@ -568,7 +671,7 @@
         // Now another network suggestion is made. Telephony suggestions are prioritized over
         // network suggestions so the latest telephony suggestion should still "win".
         NetworkTimeSuggestion networkTimeSuggestion2 =
-                mScript.generateNetworkTimeSuggestion(networkTimeMillis2);
+                mScript.generateNetworkTimeSuggestion(networkTime2);
         mScript.simulateTimePassing(smallTimeIncrementMillis)
                 .simulateNetworkTimeSuggestion(networkTimeSuggestion2)
                 .verifySystemClockWasNotSetAndResetCallTracking();
@@ -594,7 +697,9 @@
         mScript.assertLatestTelephonySuggestion(ARBITRARY_SLOT_INDEX, telephonyTimeSuggestion)
                 .assertLatestNetworkSuggestion(networkTimeSuggestion2);
         assertEquals(networkTimeSuggestion2, mScript.peekLatestValidNetworkSuggestion());
-        assertNull(mScript.peekBestTelephonySuggestion());
+        assertNull(
+                "Telephony suggestion should be expired:",
+                mScript.peekBestTelephonySuggestion());
 
         // Toggle auto-time off and on to force the detection logic to run.
         mScript.simulateAutoTimeDetectionToggle()
@@ -609,19 +714,262 @@
         mScript.assertLatestTelephonySuggestion(ARBITRARY_SLOT_INDEX, telephonyTimeSuggestion)
                 .assertLatestNetworkSuggestion(networkTimeSuggestion2);
         assertEquals(networkTimeSuggestion2, mScript.peekLatestValidNetworkSuggestion());
-        assertNull(mScript.peekBestTelephonySuggestion());
+        assertNull(
+                "Telephony suggestion should still be expired:",
+                mScript.peekBestTelephonySuggestion());
+    }
+
+    @Test
+    public void highPrioritySuggestionsBeatLowerPrioritySuggestions_networkGnssOrigins() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_NETWORK, ORIGIN_GNSS);
+
+        // Three obviously different times that could not be mistaken for each other.
+        Instant gnssTime1 = ARBITRARY_TEST_TIME;
+        Instant gnssTime2 = ARBITRARY_TEST_TIME.plus(Duration.ofDays(30));
+        Instant networkTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(60));
+        // A small increment used to simulate the passage of time, but not enough to interfere with
+        // macro-level time changes associated with suggestion age.
+        final long smallTimeIncrementMillis = 101;
+
+        // A gnss suggestion is made. It should be used because there is no network suggestion.
+        GnssTimeSuggestion gnssTimeSuggestion1 =
+                mScript.generateGnssTimeSuggestion(gnssTime1);
+        mScript.simulateTimePassing(smallTimeIncrementMillis)
+                .simulateGnssTimeSuggestion(gnssTimeSuggestion1)
+                .verifySystemClockWasSetAndResetCallTracking(
+                        mScript.calculateTimeInMillisForNow(gnssTimeSuggestion1.getUtcTime()));
+
+        // Check internal state.
+        mScript.assertLatestNetworkSuggestion(null)
+                .assertLatestGnssSuggestion(gnssTimeSuggestion1);
+        assertEquals(gnssTimeSuggestion1, mScript.peekLatestValidGnssSuggestion());
+        assertNull("No network suggestions were made:", mScript.peekLatestValidNetworkSuggestion());
+
+        // Simulate a little time passing.
+        mScript.simulateTimePassing(smallTimeIncrementMillis)
+                .verifySystemClockWasNotSetAndResetCallTracking();
+
+        // Now a network suggestion is made. Network suggestions are prioritized over gnss
+        // suggestions so it should "win".
+        NetworkTimeSuggestion networkTimeSuggestion =
+                mScript.generateNetworkTimeSuggestion(networkTime);
+        mScript.simulateTimePassing(smallTimeIncrementMillis)
+                .simulateNetworkTimeSuggestion(networkTimeSuggestion)
+                .verifySystemClockWasSetAndResetCallTracking(
+                        mScript.calculateTimeInMillisForNow(networkTimeSuggestion.getUtcTime()));
+
+        // Check internal state.
+        mScript.assertLatestNetworkSuggestion(networkTimeSuggestion)
+                .assertLatestGnssSuggestion(gnssTimeSuggestion1);
+        assertEquals(gnssTimeSuggestion1, mScript.peekLatestValidGnssSuggestion());
+        assertEquals(networkTimeSuggestion, mScript.peekLatestValidNetworkSuggestion());
+
+        // Simulate some significant time passing: half the time allowed before a time signal
+        // becomes "too old to use".
+        mScript.simulateTimePassing(TimeDetectorStrategyImpl.MAX_UTC_TIME_AGE_MILLIS / 2)
+                .verifySystemClockWasNotSetAndResetCallTracking();
+
+        // Now another gnss suggestion is made. Network suggestions are prioritized over
+        // gnss suggestions so the latest network suggestion should still "win".
+        GnssTimeSuggestion gnssTimeSuggestion2 =
+                mScript.generateGnssTimeSuggestion(gnssTime2);
+        mScript.simulateTimePassing(smallTimeIncrementMillis)
+                .simulateGnssTimeSuggestion(gnssTimeSuggestion2)
+                .verifySystemClockWasNotSetAndResetCallTracking();
+
+        // Check internal state.
+        mScript.assertLatestNetworkSuggestion(networkTimeSuggestion)
+                .assertLatestGnssSuggestion(gnssTimeSuggestion2);
+        assertEquals(gnssTimeSuggestion2, mScript.peekLatestValidGnssSuggestion());
+        assertEquals(networkTimeSuggestion, mScript.peekLatestValidNetworkSuggestion());
+
+        // Simulate some significant time passing: half the time allowed before a time signal
+        // becomes "too old to use". This should mean that telephonyTimeSuggestion is now too old to
+        // be used but networkTimeSuggestion2 is not.
+        mScript.simulateTimePassing(TimeDetectorStrategyImpl.MAX_UTC_TIME_AGE_MILLIS / 2);
+
+        // NOTE: The TimeDetectorStrategyImpl doesn't set an alarm for the point when the last
+        // suggestion it used becomes too old: it requires a new suggestion or an auto-time toggle
+        // to re-run the detection logic. This may change in future but until then we rely on a
+        // steady stream of suggestions to re-evaluate.
+        mScript.verifySystemClockWasNotSetAndResetCallTracking();
+
+        // Check internal state.
+        mScript.assertLatestNetworkSuggestion(networkTimeSuggestion)
+                .assertLatestGnssSuggestion(gnssTimeSuggestion2);
+        assertEquals(gnssTimeSuggestion2, mScript.peekLatestValidGnssSuggestion());
+        assertNull(
+                "Network suggestion should be expired:",
+                mScript.peekLatestValidNetworkSuggestion());
+
+        // Toggle auto-time off and on to force the detection logic to run.
+        mScript.simulateAutoTimeDetectionToggle()
+                .simulateTimePassing(smallTimeIncrementMillis)
+                .simulateAutoTimeDetectionToggle();
+
+        // Verify the latest gnss time now wins.
+        mScript.verifySystemClockWasSetAndResetCallTracking(
+                mScript.calculateTimeInMillisForNow(gnssTimeSuggestion2.getUtcTime()));
+
+        // Check internal state.
+        mScript.assertLatestNetworkSuggestion(networkTimeSuggestion)
+                .assertLatestGnssSuggestion(gnssTimeSuggestion2);
+        assertEquals(gnssTimeSuggestion2, mScript.peekLatestValidGnssSuggestion());
+        assertNull(
+                "Network suggestion should still be expired:",
+                mScript.peekLatestValidNetworkSuggestion());
+    }
+
+    @Test
+    public void whenAllTimeSuggestionsAreAvailable_higherPriorityWins_lowerPriorityComesFirst() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY, ORIGIN_NETWORK, ORIGIN_GNSS);
+
+        Instant networkTime = ARBITRARY_TEST_TIME;
+        Instant gnssTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(30));
+        Instant telephonyTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(60));
+
+        NetworkTimeSuggestion networkTimeSuggestion =
+                mScript.generateNetworkTimeSuggestion(networkTime);
+        GnssTimeSuggestion gnssTimeSuggestion =
+                mScript.generateGnssTimeSuggestion(gnssTime);
+        TelephonyTimeSuggestion telephonyTimeSuggestion =
+                mScript.generateTelephonyTimeSuggestion(ARBITRARY_SLOT_INDEX, telephonyTime);
+
+        mScript.simulateNetworkTimeSuggestion(networkTimeSuggestion)
+                .simulateGnssTimeSuggestion(gnssTimeSuggestion)
+                .simulateTelephonyTimeSuggestion(telephonyTimeSuggestion)
+                .assertLatestNetworkSuggestion(networkTimeSuggestion)
+                .assertLatestGnssSuggestion(gnssTimeSuggestion)
+                .assertLatestTelephonySuggestion(ARBITRARY_SLOT_INDEX, telephonyTimeSuggestion)
+                .verifySystemClockWasSetAndResetCallTracking(telephonyTime.toEpochMilli());
+    }
+
+    @Test
+    public void whenAllTimeSuggestionsAreAvailable_higherPriorityWins_higherPriorityComesFirst() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY, ORIGIN_NETWORK, ORIGIN_GNSS);
+
+        Instant networkTime = ARBITRARY_TEST_TIME;
+        Instant telephonyTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(30));
+        Instant gnssTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(60));
+
+        NetworkTimeSuggestion networkTimeSuggestion =
+                mScript.generateNetworkTimeSuggestion(networkTime);
+        TelephonyTimeSuggestion telephonyTimeSuggestion =
+                mScript.generateTelephonyTimeSuggestion(ARBITRARY_SLOT_INDEX, telephonyTime);
+        GnssTimeSuggestion gnssTimeSuggestion =
+                mScript.generateGnssTimeSuggestion(gnssTime);
+
+        mScript.simulateTelephonyTimeSuggestion(telephonyTimeSuggestion)
+                .simulateNetworkTimeSuggestion(networkTimeSuggestion)
+                .simulateGnssTimeSuggestion(gnssTimeSuggestion)
+                .assertLatestNetworkSuggestion(networkTimeSuggestion)
+                .assertLatestTelephonySuggestion(ARBITRARY_SLOT_INDEX, telephonyTimeSuggestion)
+                .assertLatestGnssSuggestion(gnssTimeSuggestion)
+                .verifySystemClockWasSetAndResetCallTracking(telephonyTime.toEpochMilli());
+    }
+
+    @Test
+    public void whenHighestPrioritySuggestionIsNotAvailable_fallbacksToNext() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY, ORIGIN_NETWORK);
+
+        NetworkTimeSuggestion timeSuggestion =
+                mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME);
+
+        mScript.simulateNetworkTimeSuggestion(timeSuggestion)
+                .assertLatestNetworkSuggestion(timeSuggestion)
+                .verifySystemClockWasSetAndResetCallTracking(ARBITRARY_TEST_TIME.toEpochMilli());
+    }
+
+    @Test
+    public void whenHigherPrioritySuggestionsAreNotAvailable_fallbacksToNext() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY, ORIGIN_NETWORK, ORIGIN_GNSS);
+
+        GnssTimeSuggestion timeSuggestion =
+                mScript.generateGnssTimeSuggestion(ARBITRARY_TEST_TIME);
+
+        mScript.simulateGnssTimeSuggestion(timeSuggestion)
+                .assertLatestGnssSuggestion(timeSuggestion)
+                .verifySystemClockWasSetAndResetCallTracking(ARBITRARY_TEST_TIME.toEpochMilli());
+    }
+
+    @Test
+    public void suggestionsFromTelephonyOriginNotInPriorityList_areIgnored() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_NETWORK);
+
+        int slotIndex = ARBITRARY_SLOT_INDEX;
+        Instant testTime = ARBITRARY_TEST_TIME;
+        TelephonyTimeSuggestion timeSuggestion =
+                mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
+
+        mScript.simulateTelephonyTimeSuggestion(timeSuggestion)
+                .assertLatestTelephonySuggestion(ARBITRARY_SLOT_INDEX, timeSuggestion)
+                .verifySystemClockWasNotSetAndResetCallTracking();
+    }
+
+    @Test
+    public void suggestionsFromNetworkOriginNotInPriorityList_areIgnored() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY);
+
+        NetworkTimeSuggestion timeSuggestion = mScript.generateNetworkTimeSuggestion(
+                ARBITRARY_TEST_TIME);
+
+        mScript.simulateNetworkTimeSuggestion(timeSuggestion)
+                .assertLatestNetworkSuggestion(timeSuggestion)
+                .verifySystemClockWasNotSetAndResetCallTracking();
+    }
+
+    @Test
+    public void suggestionsFromGnssOriginNotInPriorityList_areIgnored() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(true)
+                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY);
+
+        GnssTimeSuggestion timeSuggestion = mScript.generateGnssTimeSuggestion(
+                ARBITRARY_TEST_TIME);
+
+        mScript.simulateGnssTimeSuggestion(timeSuggestion)
+                .assertLatestGnssSuggestion(timeSuggestion)
+                .verifySystemClockWasNotSetAndResetCallTracking();
+    }
+
+    @Test
+    public void autoOriginPrioritiesList_doesNotAffectManualSuggestion() {
+        mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+                .pokeAutoTimeDetectionEnabled(false)
+                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY);
+
+        ManualTimeSuggestion timeSuggestion =
+                mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME);
+
+        mScript.simulateManualTimeSuggestion(timeSuggestion, true /* expectedResult */)
+                .verifySystemClockWasSetAndResetCallTracking(ARBITRARY_TEST_TIME.toEpochMilli());
     }
 
     /**
      * A fake implementation of TimeDetectorStrategy.Callback. Besides tracking changes and behaving
      * like the real thing should, it also asserts preconditions.
      */
-    private static class FakeCallback implements TimeDetectorStrategy.Callback {
+    private static class FakeCallback implements TimeDetectorStrategyImpl.Callback {
         private boolean mAutoTimeDetectionEnabled;
         private boolean mWakeLockAcquired;
         private long mElapsedRealtimeMillis;
         private long mSystemClockMillis;
         private int mSystemClockUpdateThresholdMillis = 2000;
+        private int[] mAutoOriginPriorities = PROVIDERS_PRIORITY;
 
         // Tracking operations.
         private boolean mSystemClockWasSet;
@@ -637,6 +985,16 @@
         }
 
         @Override
+        public Instant autoTimeLowerBound() {
+            return TIME_LOWER_BOUND;
+        }
+
+        @Override
+        public int[] autoOriginPriorities() {
+            return mAutoOriginPriorities;
+        }
+
+        @Override
         public void acquireWakeLock() {
             if (mWakeLockAcquired) {
                 fail("Wake lock already acquired");
@@ -685,6 +1043,10 @@
             mAutoTimeDetectionEnabled = enabled;
         }
 
+        void pokeAutoOriginPriorities(@Origin int[] autoOriginPriorities) {
+            mAutoOriginPriorities = autoOriginPriorities;
+        }
+
         long peekElapsedRealtimeMillis() {
             return mElapsedRealtimeMillis;
         }
@@ -703,7 +1065,10 @@
         }
 
         void verifySystemClockNotSet() {
-            assertFalse(mSystemClockWasSet);
+            assertFalse(
+                    String.format("System clock was manipulated and set to %s(=%s)",
+                            Instant.ofEpochMilli(mSystemClockMillis), mSystemClockMillis),
+                    mSystemClockWasSet);
         }
 
         void verifySystemClockWasSet(long expectedSystemClockMillis) {
@@ -731,9 +1096,7 @@
 
         Script() {
             mFakeCallback = new FakeCallback();
-            mTimeDetectorStrategy = new TimeDetectorStrategyImpl();
-            mTimeDetectorStrategy.initialize(mFakeCallback);
-
+            mTimeDetectorStrategy = new TimeDetectorStrategyImpl(mFakeCallback);
         }
 
         Script pokeAutoTimeDetectionEnabled(boolean enabled) {
@@ -741,9 +1104,9 @@
             return this;
         }
 
-        Script pokeFakeClocks(TimestampedValue<Long> timeInfo) {
+        Script pokeFakeClocks(TimestampedValue<Instant> timeInfo) {
             mFakeCallback.pokeElapsedRealtimeMillis(timeInfo.getReferenceTimeMillis());
-            mFakeCallback.pokeSystemClockMillis(timeInfo.getValue());
+            mFakeCallback.pokeSystemClockMillis(timeInfo.getValue().toEpochMilli());
             return this;
         }
 
@@ -752,6 +1115,11 @@
             return this;
         }
 
+        Script pokeAutoOriginPriorities(@Origin int... autoOriginPriorities) {
+            mFakeCallback.pokeAutoOriginPriorities(autoOriginPriorities);
+            return this;
+        }
+
         long peekElapsedRealtimeMillis() {
             return mFakeCallback.peekElapsedRealtimeMillis();
         }
@@ -765,8 +1133,15 @@
             return this;
         }
 
-        Script simulateManualTimeSuggestion(ManualTimeSuggestion timeSuggestion) {
-            mTimeDetectorStrategy.suggestManualTime(timeSuggestion);
+        Script simulateManualTimeSuggestion(
+                ManualTimeSuggestion timeSuggestion, boolean expectedResult) {
+            String errorMessage = expectedResult
+                    ? "Manual time suggestion was ignored, but expected to be accepted."
+                    : "Manual time suggestion was accepted, but expected to be ignored.";
+            assertEquals(
+                    errorMessage,
+                    expectedResult,
+                    mTimeDetectorStrategy.suggestManualTime(timeSuggestion));
             return this;
         }
 
@@ -775,9 +1150,14 @@
             return this;
         }
 
+        Script simulateGnssTimeSuggestion(GnssTimeSuggestion timeSuggestion) {
+            mTimeDetectorStrategy.suggestGnssTime(timeSuggestion);
+            return this;
+        }
+
         Script simulateAutoTimeDetectionToggle() {
             mFakeCallback.simulateAutoTimeZoneDetectionToggle();
-            mTimeDetectorStrategy.handleAutoTimeDetectionChanged();
+            mTimeDetectorStrategy.handleAutoTimeConfigChanged();
             return this;
         }
 
@@ -809,7 +1189,10 @@
          * White box test info: Asserts the latest suggestion for the slotIndex is as expected.
          */
         Script assertLatestTelephonySuggestion(int slotIndex, TelephonyTimeSuggestion expected) {
-            assertEquals(expected, mTimeDetectorStrategy.getLatestTelephonySuggestion(slotIndex));
+            assertEquals(
+                    "Expected to see " + expected + " at slotIndex=" + slotIndex + ", but got "
+                            + mTimeDetectorStrategy.getLatestTelephonySuggestion(slotIndex),
+                    expected, mTimeDetectorStrategy.getLatestTelephonySuggestion(slotIndex));
             return this;
         }
 
@@ -822,6 +1205,14 @@
         }
 
         /**
+         * White box test info: Asserts the latest gnss suggestion is as expected.
+         */
+        Script assertLatestGnssSuggestion(GnssTimeSuggestion expected) {
+            assertEquals(expected, mTimeDetectorStrategy.getLatestGnssSuggestion());
+            return this;
+        }
+
+        /**
          * White box test info: Returns the telephony suggestion that would be used, if any, given
          * the current elapsed real time clock and regardless of origin prioritization.
          */
@@ -838,12 +1229,22 @@
         }
 
         /**
+         * White box test info: Returns the gnss suggestion that would be used, if any, given the
+         * current elapsed real time clock and regardless of origin prioritization.
+         */
+        GnssTimeSuggestion peekLatestValidGnssSuggestion() {
+            return mTimeDetectorStrategy.findLatestValidGnssSuggestionForTests();
+        }
+
+        /**
          * Generates a ManualTimeSuggestion using the current elapsed realtime clock for the
          * reference time.
          */
-        ManualTimeSuggestion generateManualTimeSuggestion(long timeMillis) {
+        ManualTimeSuggestion generateManualTimeSuggestion(Instant suggestedTime) {
             TimestampedValue<Long> utcTime =
-                    new TimestampedValue<>(mFakeCallback.peekElapsedRealtimeMillis(), timeMillis);
+                    new TimestampedValue<>(
+                            mFakeCallback.peekElapsedRealtimeMillis(),
+                            suggestedTime.toEpochMilli());
             return new ManualTimeSuggestion(utcTime);
         }
 
@@ -851,25 +1252,49 @@
          * Generates a {@link TelephonyTimeSuggestion} using the current elapsed realtime clock for
          * the reference time.
          */
-        TelephonyTimeSuggestion generateTelephonyTimeSuggestion(int slotIndex, Long timeMillis) {
-            TimestampedValue<Long> time = null;
-            if (timeMillis != null) {
-                time = new TimestampedValue<>(peekElapsedRealtimeMillis(), timeMillis);
-            }
+        TelephonyTimeSuggestion generateTelephonyTimeSuggestion(int slotIndex, long timeMillis) {
+            TimestampedValue<Long> time =
+                    new TimestampedValue<>(peekElapsedRealtimeMillis(), timeMillis);
             return createTelephonyTimeSuggestion(slotIndex, time);
         }
 
         /**
+         * Generates a {@link TelephonyTimeSuggestion} using the current elapsed realtime clock for
+         * the reference time.
+         */
+        TelephonyTimeSuggestion generateTelephonyTimeSuggestion(
+                int slotIndex, Instant suggestedTime) {
+            if (suggestedTime == null) {
+                return createTelephonyTimeSuggestion(slotIndex, null);
+            }
+            return generateTelephonyTimeSuggestion(slotIndex, suggestedTime.toEpochMilli());
+        }
+
+        /**
          * Generates a NetworkTimeSuggestion using the current elapsed realtime clock for the
          * reference time.
          */
-        NetworkTimeSuggestion generateNetworkTimeSuggestion(long timeMillis) {
+        NetworkTimeSuggestion generateNetworkTimeSuggestion(Instant suggestedTime) {
             TimestampedValue<Long> utcTime =
-                    new TimestampedValue<>(mFakeCallback.peekElapsedRealtimeMillis(), timeMillis);
+                    new TimestampedValue<>(
+                            mFakeCallback.peekElapsedRealtimeMillis(),
+                            suggestedTime.toEpochMilli());
             return new NetworkTimeSuggestion(utcTime);
         }
 
         /**
+         * Generates a GnssTimeSuggestion using the current elapsed realtime clock for the
+         * reference time.
+         */
+        GnssTimeSuggestion generateGnssTimeSuggestion(Instant suggestedTime) {
+            TimestampedValue<Long> utcTime =
+                    new TimestampedValue<>(
+                            mFakeCallback.peekElapsedRealtimeMillis(),
+                            suggestedTime.toEpochMilli());
+            return new GnssTimeSuggestion(utcTime);
+        }
+
+        /**
          * Calculates what the supplied time would be when adjusted for the movement of the fake
          * elapsed realtime clock.
          */
@@ -885,11 +1310,9 @@
                 .build();
     }
 
-    private static long createUtcTime(int year, int monthInYear, int day, int hourOfDay, int minute,
-            int second) {
-        Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("Etc/UTC"));
-        cal.clear();
-        cal.set(year, monthInYear - 1, day, hourOfDay, minute, second);
-        return cal.getTimeInMillis();
+    private static Instant createUtcTime(int year, int monthInYear, int day, int hourOfDay,
+            int minute, int second) {
+        return LocalDateTime.of(year, monthInYear, day, hourOfDay, minute, second)
+                .toInstant(ZoneOffset.UTC);
     }
 }
diff --git a/services/tests/servicestests/src/com/android/server/timezone/OWNERS b/services/tests/servicestests/src/com/android/server/timezone/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/timezone/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS b/services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS
new file mode 100644
index 0000000..8f80897
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+mingaleev@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
index da34e1b..baec558 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
@@ -96,15 +96,16 @@
         doNothing().when(mMockContext).enforceCallingOrSelfPermission(anyString(), any());
 
         ManualTimeZoneSuggestion timeZoneSuggestion = createManualTimeZoneSuggestion();
-        mTimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion);
-        mTestHandler.assertTotalMessagesEnqueued(1);
+
+        boolean expectedResult = true; // The test strategy always returns true.
+        assertEquals(expectedResult,
+                mTimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion));
+
+        mStubbedTimeZoneDetectorStrategy.verifySuggestManualTimeZoneCalled(timeZoneSuggestion);
 
         verify(mMockContext).enforceCallingOrSelfPermission(
                 eq(android.Manifest.permission.SUGGEST_MANUAL_TIME_AND_ZONE),
                 anyString());
-
-        mTestHandler.waitForMessagesToBeProcessed();
-        mStubbedTimeZoneDetectorStrategy.verifySuggestManualTimeZoneCalled(timeZoneSuggestion);
     }
 
     @Test(expected = SecurityException.class)
@@ -187,8 +188,9 @@
         private boolean mDumpCalled;
 
         @Override
-        public void suggestManualTimeZone(ManualTimeZoneSuggestion timeZoneSuggestion) {
+        public boolean suggestManualTimeZone(ManualTimeZoneSuggestion timeZoneSuggestion) {
             mLastManualSuggestion = timeZoneSuggestion;
+            return true;
         }
 
         @Override
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
index 30bb12e..1fbe781 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
@@ -98,7 +98,7 @@
                 .initializeAutoTimeZoneDetection(true)
                 .initializeTimeZoneSetting(ARBITRARY_TIME_ZONE_ID);
 
-        script.suggestTelephonyTimeZone(slotIndex1TimeZoneSuggestion)
+        script.simulateTelephonyTimeZoneSuggestion(slotIndex1TimeZoneSuggestion)
                 .verifyTimeZoneNotSet();
 
         // Assert internal service state.
@@ -111,7 +111,7 @@
         assertEquals(expectedSlotIndex1ScoredSuggestion,
                 mTimeZoneDetectorStrategy.findBestTelephonySuggestionForTests());
 
-        script.suggestTelephonyTimeZone(slotIndex2TimeZoneSuggestion)
+        script.simulateTelephonyTimeZoneSuggestion(slotIndex2TimeZoneSuggestion)
                 .verifyTimeZoneNotSet();
 
         // Assert internal service state.
@@ -144,8 +144,7 @@
         {
             TelephonyTimeZoneSuggestion lowQualitySuggestion =
                     testCase.createSuggestion(SLOT_INDEX1, "America/New_York");
-
-            script.suggestTelephonyTimeZone(lowQualitySuggestion)
+            script.simulateTelephonyTimeZoneSuggestion(lowQualitySuggestion)
                     .verifyTimeZoneNotSet();
 
             // Assert internal service state.
@@ -162,7 +161,7 @@
         {
             TelephonyTimeZoneSuggestion goodQualitySuggestion =
                     testCase2.createSuggestion(SLOT_INDEX1, "Europe/London");
-            script.suggestTelephonyTimeZone(goodQualitySuggestion)
+            script.simulateTelephonyTimeZoneSuggestion(goodQualitySuggestion)
                     .verifyTimeZoneSetAndReset(goodQualitySuggestion);
 
             // Assert internal service state.
@@ -179,7 +178,7 @@
         {
             TelephonyTimeZoneSuggestion lowQualitySuggestion2 =
                     testCase.createSuggestion(SLOT_INDEX1, "America/Los_Angeles");
-            script.suggestTelephonyTimeZone(lowQualitySuggestion2)
+            script.simulateTelephonyTimeZoneSuggestion(lowQualitySuggestion2)
                     .verifyTimeZoneNotSet();
 
             // Assert internal service state.
@@ -208,7 +207,7 @@
 
             TelephonyTimeZoneSuggestion suggestion =
                     testCase.createSuggestion(SLOT_INDEX1, "Europe/London");
-            script.suggestTelephonyTimeZone(suggestion);
+            script.simulateTelephonyTimeZoneSuggestion(suggestion);
 
             // When time zone detection is not enabled, the time zone suggestion will not be set
             // regardless of the score.
@@ -288,7 +287,7 @@
                 new QualifiedTelephonyTimeZoneSuggestion(
                         zoneSlotIndex1Suggestion, testCase.expectedScore);
 
-        script.suggestTelephonyTimeZone(zoneSlotIndex1Suggestion);
+        script.simulateTelephonyTimeZoneSuggestion(zoneSlotIndex1Suggestion);
         if (testCase.expectedScore >= TELEPHONY_SCORE_USAGE_THRESHOLD) {
             script.verifyTimeZoneSetAndReset(zoneSlotIndex1Suggestion);
         } else {
@@ -324,8 +323,8 @@
                 .initializeTimeZoneSetting(ARBITRARY_TIME_ZONE_ID)
                 // Initialize the latest suggestions as empty so we don't need to worry about nulls
                 // below for the first loop.
-                .suggestTelephonyTimeZone(emptySlotIndex1Suggestion)
-                .suggestTelephonyTimeZone(emptySlotIndex2Suggestion)
+                .simulateTelephonyTimeZoneSuggestion(emptySlotIndex1Suggestion)
+                .simulateTelephonyTimeZoneSuggestion(emptySlotIndex2Suggestion)
                 .resetState();
 
         for (SuggestionTestCase testCase : TEST_CASES) {
@@ -341,7 +340,7 @@
                             testCase.expectedScore);
 
             // Start the test by making a suggestion for slotIndex1.
-            script.suggestTelephonyTimeZone(zoneSlotIndex1Suggestion);
+            script.simulateTelephonyTimeZoneSuggestion(zoneSlotIndex1Suggestion);
             if (testCase.expectedScore >= TELEPHONY_SCORE_USAGE_THRESHOLD) {
                 script.verifyTimeZoneSetAndReset(zoneSlotIndex1Suggestion);
             } else {
@@ -358,7 +357,7 @@
 
             // SlotIndex2 then makes an alternative suggestion with an identical score. SlotIndex1's
             // suggestion should still "win" if it is above the required threshold.
-            script.suggestTelephonyTimeZone(zoneSlotIndex2Suggestion);
+            script.simulateTelephonyTimeZoneSuggestion(zoneSlotIndex2Suggestion);
             script.verifyTimeZoneNotSet();
 
             // Assert internal service state.
@@ -373,7 +372,7 @@
             // Withdrawing slotIndex1's suggestion should leave slotIndex2 as the new winner. Since
             // the zoneId is different, the time zone setting should be updated if the score is high
             // enough.
-            script.suggestTelephonyTimeZone(emptySlotIndex1Suggestion);
+            script.simulateTelephonyTimeZoneSuggestion(emptySlotIndex1Suggestion);
             if (testCase.expectedScore >= TELEPHONY_SCORE_USAGE_THRESHOLD) {
                 script.verifyTimeZoneSetAndReset(zoneSlotIndex2Suggestion);
             } else {
@@ -389,7 +388,7 @@
                     mTimeZoneDetectorStrategy.findBestTelephonySuggestionForTests());
 
             // Reset the state for the next loop.
-            script.suggestTelephonyTimeZone(emptySlotIndex2Suggestion)
+            script.simulateTelephonyTimeZoneSuggestion(emptySlotIndex2Suggestion)
                     .verifyTimeZoneNotSet();
             assertEquals(expectedEmptySlotIndex1ScoredSuggestion,
                     mTimeZoneDetectorStrategy.getLatestTelephonySuggestion(SLOT_INDEX1));
@@ -417,10 +416,10 @@
                 testCase.createSuggestion(SLOT_INDEX1, "America/New_York");
 
         // Initialization.
-        script.suggestTelephonyTimeZone(losAngelesSuggestion)
+        script.simulateTelephonyTimeZoneSuggestion(losAngelesSuggestion)
                 .verifyTimeZoneSetAndReset(losAngelesSuggestion);
         // Suggest it again - it should not be set because it is already set.
-        script.suggestTelephonyTimeZone(losAngelesSuggestion)
+        script.simulateTelephonyTimeZoneSuggestion(losAngelesSuggestion)
                 .verifyTimeZoneNotSet();
 
         // Toggling time zone detection should set the device time zone only if the current setting
@@ -433,7 +432,7 @@
         // Simulate a user turning auto detection off, a new suggestion being made while auto
         // detection is off, and the user turning it on again.
         script.autoTimeZoneDetectionEnabled(false)
-                .suggestTelephonyTimeZone(newYorkSuggestion)
+                .simulateTelephonyTimeZoneSuggestion(newYorkSuggestion)
                 .verifyTimeZoneNotSet();
         // Latest suggestion should be used.
         script.autoTimeZoneDetectionEnabled(true)
@@ -447,7 +446,8 @@
                 .initializeAutoTimeZoneDetection(true);
 
         // Auto time zone detection is enabled so the manual suggestion should be ignored.
-        script.suggestManualTimeZone(createManualSuggestion("Europe/Paris"))
+        script.simulateManualTimeZoneSuggestion(
+                createManualSuggestion("Europe/Paris"), false /* expectedResult */)
             .verifyTimeZoneNotSet();
     }
 
@@ -460,7 +460,7 @@
 
         // Auto time zone detection is disabled so the manual suggestion should be used.
         ManualTimeZoneSuggestion manualSuggestion = createManualSuggestion("Europe/Paris");
-        script.suggestManualTimeZone(manualSuggestion)
+        script.simulateManualTimeZoneSuggestion(manualSuggestion, true /* expectedResult */)
             .verifyTimeZoneSetAndReset(manualSuggestion);
     }
 
@@ -603,14 +603,16 @@
         /**
          * Simulates the time zone detection strategy receiving a telephony-originated suggestion.
          */
-        Script suggestTelephonyTimeZone(TelephonyTimeZoneSuggestion timeZoneSuggestion) {
+        Script simulateTelephonyTimeZoneSuggestion(TelephonyTimeZoneSuggestion timeZoneSuggestion) {
             mTimeZoneDetectorStrategy.suggestTelephonyTimeZone(timeZoneSuggestion);
             return this;
         }
 
         /** Simulates the time zone detection strategy receiving a user-originated suggestion. */
-        Script suggestManualTimeZone(ManualTimeZoneSuggestion manualTimeZoneSuggestion) {
-            mTimeZoneDetectorStrategy.suggestManualTimeZone(manualTimeZoneSuggestion);
+        Script simulateManualTimeZoneSuggestion(
+                ManualTimeZoneSuggestion manualTimeZoneSuggestion, boolean expectedResult) {
+            assertEquals(expectedResult,
+                    mTimeZoneDetectorStrategy.suggestManualTimeZone(manualTimeZoneSuggestion));
             return this;
         }
 
diff --git a/services/tests/servicestests/src/com/android/server/tv/OWNERS b/services/tests/servicestests/src/com/android/server/tv/OWNERS
new file mode 100644
index 0000000..305027c
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/tv/OWNERS
@@ -0,0 +1 @@
+include /media/java/android/media/tv/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/uri/OWNERS b/services/tests/servicestests/src/com/android/server/uri/OWNERS
new file mode 100644
index 0000000..ca5d5f98
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/uri/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/uri/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
index 4dec7a1..a07e60c 100644
--- a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
@@ -112,6 +112,8 @@
     private static final int UID_SYSTEM_HEADFULL = 10002;
     private static final String PACKAGE_SYSTEM_HEADLESS = "com.example.system.headless";
     private static final int UID_SYSTEM_HEADLESS = 10003;
+    private static final String PACKAGE_WELLBEING = "com.example.wellbeing";
+    private static final int UID_WELLBEING = 10004;
     private static final int USER_ID = 0;
     private static final int USER_ID2 = 10;
     private static final UserHandle USER_HANDLE_USER2 = new UserHandle(USER_ID2);
@@ -218,6 +220,11 @@
         }
 
         @Override
+        boolean isWellbeingPackage(String packageName) {
+            return PACKAGE_WELLBEING.equals(packageName);
+        }
+
+        @Override
         void updatePowerWhitelistCache() {
         }
 
@@ -329,6 +336,12 @@
         pish.packageName = PACKAGE_SYSTEM_HEADLESS;
         packages.add(pish);
 
+        PackageInfo piw = new PackageInfo();
+        piw.applicationInfo = new ApplicationInfo();
+        piw.applicationInfo.uid = UID_WELLBEING;
+        piw.packageName = PACKAGE_WELLBEING;
+        packages.add(piw);
+
         doReturn(packages).when(mockPm).getInstalledPackagesAsUser(anyInt(), anyInt());
         try {
             for (int i = 0; i < packages.size(); ++i) {
@@ -1516,6 +1529,25 @@
         assertBucket(STANDBY_BUCKET_RARE, PACKAGE_1);
     }
 
+    @Test
+    public void testWellbeingAppElevated() {
+        reportEvent(mController, USER_INTERACTION, mInjector.mElapsedRealtime, PACKAGE_WELLBEING);
+        assertBucket(STANDBY_BUCKET_ACTIVE, PACKAGE_WELLBEING);
+        reportEvent(mController, USER_INTERACTION, mInjector.mElapsedRealtime, PACKAGE_1);
+        assertBucket(STANDBY_BUCKET_ACTIVE, PACKAGE_1);
+        mInjector.mElapsedRealtime += RESTRICTED_THRESHOLD;
+
+        // Make sure the default wellbeing app does not get lowered below WORKING_SET.
+        mController.setAppStandbyBucket(PACKAGE_WELLBEING, USER_ID, STANDBY_BUCKET_RARE,
+                REASON_MAIN_TIMEOUT);
+        assertBucket(STANDBY_BUCKET_WORKING_SET, PACKAGE_WELLBEING);
+
+        // A non default wellbeing app should be able to fall lower than WORKING_SET.
+        mController.setAppStandbyBucket(PACKAGE_1, USER_ID, STANDBY_BUCKET_RARE,
+                REASON_MAIN_TIMEOUT);
+        assertBucket(STANDBY_BUCKET_RARE, PACKAGE_1);
+    }
+
     private String getAdminAppsStr(int userId) {
         return getAdminAppsStr(userId, mController.getActiveAdminAppsForTest(userId));
     }
diff --git a/services/tests/servicestests/src/com/android/server/usage/OWNERS b/services/tests/servicestests/src/com/android/server/usage/OWNERS
new file mode 100644
index 0000000..d3227de
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/usage/OWNERS
@@ -0,0 +1 @@
+include /services/usage/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/vibrator/OWNERS b/services/tests/servicestests/src/com/android/server/vibrator/OWNERS
new file mode 100644
index 0000000..cc63ceb
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/vibrator/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/vibrator/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/wallpaper/OWNERS b/services/tests/servicestests/src/com/android/server/wallpaper/OWNERS
new file mode 100644
index 0000000..8ff0f74
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/wallpaper/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/wallpaper/OWNERS
diff --git a/services/tests/servicestests/test-apps/JobTestApp/OWNERS b/services/tests/servicestests/test-apps/JobTestApp/OWNERS
new file mode 100644
index 0000000..6f207fb1
--- /dev/null
+++ b/services/tests/servicestests/test-apps/JobTestApp/OWNERS
@@ -0,0 +1 @@
+include /apex/jobscheduler/OWNERS
diff --git a/services/tests/servicestests/test-apps/PackageParserApp/OWNERS b/services/tests/servicestests/test-apps/PackageParserApp/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/tests/servicestests/test-apps/PackageParserApp/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/services/tests/servicestests/test-apps/PackageParsingTestManifests/OWNERS b/services/tests/servicestests/test-apps/PackageParsingTestManifests/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/tests/servicestests/test-apps/PackageParsingTestManifests/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/services/tests/uiservicestests/src/com/android/server/OWNERS b/services/tests/uiservicestests/src/com/android/server/OWNERS
new file mode 100644
index 0000000..05944c0
--- /dev/null
+++ b/services/tests/uiservicestests/src/com/android/server/OWNERS
@@ -0,0 +1 @@
+per-file UiModeManagerServiceTest.java = file:/packages/SystemUI/OWNERS
diff --git a/services/tests/uiservicestests/src/com/android/server/UiModeManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/UiModeManagerServiceTest.java
index 1d75967..dfde931 100644
--- a/services/tests/uiservicestests/src/com/android/server/UiModeManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/UiModeManagerServiceTest.java
@@ -16,6 +16,7 @@
 
 package com.android.server;
 
+import android.Manifest;
 import android.app.AlarmManager;
 import android.app.IUiModeManager;
 import android.content.BroadcastReceiver;
@@ -24,6 +25,7 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.PackageManager;
+import android.content.pm.UserInfo;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.os.Handler;
@@ -67,6 +69,7 @@
 import static org.mockito.Mockito.atLeastOnce;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -230,6 +233,15 @@
     }
 
     @Test
+    public void setNightModeActivated_permissiontoChangeOtherUsers() throws RemoteException {
+        mUiManagerService.onSwitchUser(9);
+        when(mContext.checkCallingOrSelfPermission(
+                eq(Manifest.permission.INTERACT_ACROSS_USERS)))
+                .thenReturn(PackageManager.PERMISSION_DENIED);
+        assertFalse(mService.setNightModeActivated(true));
+    }
+
+    @Test
     public void autoNightModeSwitch_batterySaverOn() throws RemoteException {
         mService.setNightMode(MODE_NIGHT_NO);
         when(mTwilightState.isNight()).thenReturn(false);
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java b/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
index abcc14c..078832d 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
@@ -1185,7 +1185,7 @@
         NotificationRecord r = getLightsNotification();
         mService.buzzBeepBlinkLocked(r);
         verifyNeverLights();
-        assertFalse(r.isInterruptive());
+        assertTrue(r.isInterruptive());
         assertEquals(-1, r.getLastAudiblyAlertedMs());
     }
 
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 10976882..24384b1 100755
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -3865,7 +3865,7 @@
         mService.updateUriPermissions(recordB, recordA, mContext.getPackageName(),
                 USER_SYSTEM);
         verify(mUgmInternal, times(1)).revokeUriPermissionFromOwner(any(),
-                eq(message1.getDataUri()), anyInt(), anyInt());
+                eq(message1.getDataUri()), anyInt(), anyInt(), eq(null), eq(-1));
 
         // Update back means we grant access to first again
         reset(mUgm);
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/OWNERS b/services/tests/uiservicestests/src/com/android/server/notification/OWNERS
new file mode 100644
index 0000000..396fd12
--- /dev/null
+++ b/services/tests/uiservicestests/src/com/android/server/notification/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/notification/OWNERS
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/PreferencesHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/PreferencesHelperTest.java
index 4dc8ad9..a118e0d 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/PreferencesHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/PreferencesHelperTest.java
@@ -2670,6 +2670,96 @@
     }
 
     @Test
+    public void testLockChannelsForOEM_onlyGivenPkg_appDoesNotExistYet() {
+        mHelper.lockChannelsForOEM(new String[] {PKG_O});
+
+        NotificationChannel a = new NotificationChannel("a", "a", IMPORTANCE_HIGH);
+        NotificationChannel b = new NotificationChannel("b", "b", IMPORTANCE_LOW);
+        mHelper.createNotificationChannel(PKG_O, 3, a, true, false);
+        mHelper.createNotificationChannel(PKG_N_MR1, 30, b, false, false);
+
+        assertTrue(mHelper.getNotificationChannel(PKG_O, 3, a.getId(), false)
+                .isImportanceLockedByOEM());
+        assertFalse(mHelper.getNotificationChannel(PKG_N_MR1, 30, b.getId(), false)
+                .isImportanceLockedByOEM());
+    }
+
+    @Test
+    public void testLockChannelsForOEM_channelSpecific_appDoesNotExistYet() {
+        mHelper.lockChannelsForOEM(new String[] {PKG_O + ":b", PKG_O + ":c"});
+
+        NotificationChannel a = new NotificationChannel("a", "a", IMPORTANCE_HIGH);
+        NotificationChannel b = new NotificationChannel("b", "b", IMPORTANCE_LOW);
+        NotificationChannel c = new NotificationChannel("c", "c", IMPORTANCE_DEFAULT);
+        // different uids, same package
+        mHelper.createNotificationChannel(PKG_O, 3, a, true, false);
+        mHelper.createNotificationChannel(PKG_O, 3, b, false, false);
+        mHelper.createNotificationChannel(PKG_O, 30, c, true, true);
+
+        assertFalse(mHelper.getNotificationChannel(PKG_O, 3, a.getId(), false)
+                .isImportanceLockedByOEM());
+        assertTrue(mHelper.getNotificationChannel(PKG_O, 3, b.getId(), false)
+                .isImportanceLockedByOEM());
+        assertTrue(mHelper.getNotificationChannel(PKG_O, 30, c.getId(), false)
+                .isImportanceLockedByOEM());
+    }
+
+    @Test
+    public void testLockChannelsForOEM_onlyGivenPkg_appDoesNotExistYet_restoreData()
+            throws Exception {
+        mHelper.lockChannelsForOEM(new String[] {PKG_O});
+
+        final String xml = "<ranking version=\"1\">\n"
+                + "<package name=\"" + PKG_O + "\" uid=\"" + UID_O + "\" >\n"
+                + "<channel id=\"a\" name=\"a\" importance=\"3\"/>"
+                + "<channel id=\"b\" name=\"b\" importance=\"3\"/>"
+                + "</package>"
+                + "<package name=\"" + PKG_N_MR1 + "\" uid=\"" + UID_N_MR1 + "\" >\n"
+                + "<channel id=\"a\" name=\"a\" importance=\"3\"/>"
+                + "<channel id=\"b\" name=\"b\" importance=\"3\"/>"
+                + "</package>"
+                + "</ranking>";
+        XmlPullParser parser = Xml.newPullParser();
+        parser.setInput(new BufferedInputStream(new ByteArrayInputStream(xml.getBytes())),
+                null);
+        parser.nextTag();
+        mHelper.readXml(parser, false, UserHandle.USER_ALL);
+
+        assertTrue(mHelper.getNotificationChannel(PKG_O, UID_O, "a", false)
+                .isImportanceLockedByOEM());
+        assertFalse(mHelper.getNotificationChannel(PKG_N_MR1, UID_N_MR1, "b", false)
+                .isImportanceLockedByOEM());
+    }
+
+    @Test
+    public void testLockChannelsForOEM_channelSpecific_appDoesNotExistYet_restoreData()
+            throws Exception {
+        mHelper.lockChannelsForOEM(new String[] {PKG_O + ":b", PKG_O + ":c"});
+
+        final String xml = "<ranking version=\"1\">\n"
+                + "<package name=\"" + PKG_O + "\" uid=\"" + 3 + "\" >\n"
+                + "<channel id=\"a\" name=\"a\" importance=\"3\"/>"
+                + "<channel id=\"b\" name=\"b\" importance=\"3\"/>"
+                + "</package>"
+                + "<package name=\"" + PKG_O + "\" uid=\"" + 30 + "\" >\n"
+                + "<channel id=\"c\" name=\"c\" importance=\"3\"/>"
+                + "</package>"
+                + "</ranking>";
+        XmlPullParser parser = Xml.newPullParser();
+        parser.setInput(new BufferedInputStream(new ByteArrayInputStream(xml.getBytes())),
+                null);
+        parser.nextTag();
+        mHelper.readXml(parser, false, UserHandle.USER_ALL);
+
+        assertFalse(mHelper.getNotificationChannel(PKG_O, 3, "a", false)
+                .isImportanceLockedByOEM());
+        assertTrue(mHelper.getNotificationChannel(PKG_O, 3, "b", false)
+                .isImportanceLockedByOEM());
+        assertTrue(mHelper.getNotificationChannel(PKG_O, 30, "c", false)
+                .isImportanceLockedByOEM());
+    }
+
+    @Test
     public void testLockChannelsForOEM_channelSpecific_clearData() {
         NotificationChannel a = new NotificationChannel("a", "a", IMPORTANCE_HIGH);
         mHelper.getImportance(PKG_O, UID_O);
diff --git a/services/tests/uiservicestests/src/com/android/server/slice/OWNERS b/services/tests/uiservicestests/src/com/android/server/slice/OWNERS
new file mode 100644
index 0000000..3d0859f
--- /dev/null
+++ b/services/tests/uiservicestests/src/com/android/server/slice/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/app/slice/OWNERS
diff --git a/services/tests/wmtests/OWNERS b/services/tests/wmtests/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/services/tests/wmtests/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
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 6ab0697..a37f4be 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
@@ -20,6 +20,10 @@
 import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
 import static android.content.pm.ActivityInfo.CONFIG_ORIENTATION;
 import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT;
+import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_ALWAYS;
+import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_DEFAULT;
+import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_IF_ALLOWLISTED;
+import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_NEVER;
 import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
 import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
 import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
@@ -79,6 +83,7 @@
 import android.content.ComponentName;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Rect;
@@ -536,14 +541,14 @@
         mActivity = new ActivityBuilder(mService)
                 .setTask(mTask)
                 .setLaunchTaskBehind(true)
-                .setConfigChanges(CONFIG_ORIENTATION)
+                .setConfigChanges(CONFIG_ORIENTATION | CONFIG_SCREEN_LAYOUT)
                 .build();
         mActivity.setState(ActivityStack.ActivityState.STOPPED, "Testing");
 
         final ActivityStack stack = new StackBuilder(mRootWindowContainer).build();
         try {
             doReturn(false).when(stack).isTranslucent(any());
-            assertFalse(mStack.shouldBeVisible(null /* starting */));
+            assertTrue(mStack.shouldBeVisible(null /* starting */));
 
             mActivity.setLastReportedConfiguration(new MergedConfiguration(new Configuration(),
                     mActivity.getConfiguration()));
@@ -1685,6 +1690,32 @@
                 .diff(wpc.getRequestedOverrideConfiguration()));
     }
 
+    @Test
+    public void testGetLockTaskLaunchMode() {
+        final ActivityOptions options = ActivityOptions.makeBasic().setLockTaskEnabled(true);
+        mActivity.info.lockTaskLaunchMode = LOCK_TASK_LAUNCH_MODE_DEFAULT;
+        assertEquals(LOCK_TASK_LAUNCH_MODE_IF_ALLOWLISTED,
+                ActivityRecord.getLockTaskLaunchMode(mActivity.info, options));
+
+        mActivity.info.lockTaskLaunchMode = LOCK_TASK_LAUNCH_MODE_ALWAYS;
+        assertEquals(LOCK_TASK_LAUNCH_MODE_DEFAULT,
+                ActivityRecord.getLockTaskLaunchMode(mActivity.info, null /*options*/));
+
+        mActivity.info.lockTaskLaunchMode = LOCK_TASK_LAUNCH_MODE_NEVER;
+        assertEquals(LOCK_TASK_LAUNCH_MODE_DEFAULT,
+                ActivityRecord.getLockTaskLaunchMode(mActivity.info, null /*options*/));
+
+        mActivity.info.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
+        mActivity.info.lockTaskLaunchMode = LOCK_TASK_LAUNCH_MODE_ALWAYS;
+        assertEquals(LOCK_TASK_LAUNCH_MODE_ALWAYS,
+                ActivityRecord.getLockTaskLaunchMode(mActivity.info, null /*options*/));
+
+        mActivity.info.lockTaskLaunchMode = LOCK_TASK_LAUNCH_MODE_NEVER;
+        assertEquals(LOCK_TASK_LAUNCH_MODE_NEVER,
+                ActivityRecord.getLockTaskLaunchMode(mActivity.info, null /*options*/));
+
+    }
+
     /**
      * Creates an activity on display. For non-default display request it will also create a new
      * display with custom DisplayInfo.
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java
index 1b42a04..e898c25 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java
@@ -1206,19 +1206,22 @@
     @Test
     public void testShouldSleepActivities() {
         // When focused activity and keyguard is going away, we should not sleep regardless
-        // of the display state
+        // of the display state, but keyguard-going-away should only take effects on default
+        // display since there is no keyguard on secondary displays (yet).
         verifyShouldSleepActivities(true /* focusedStack */, true /*keyguardGoingAway*/,
-                true /* displaySleeping */, false /* expected*/);
+                true /* displaySleeping */, true /* isDefaultDisplay */, false /* expected */);
+        verifyShouldSleepActivities(true /* focusedStack */, true /*keyguardGoingAway*/,
+                true /* displaySleeping */, false /* isDefaultDisplay */, true /* expected */);
 
         // When not the focused stack, defer to display sleeping state.
         verifyShouldSleepActivities(false /* focusedStack */, true /*keyguardGoingAway*/,
-                true /* displaySleeping */, true /* expected*/);
+                true /* displaySleeping */, true /* isDefaultDisplay */, true /* expected */);
 
         // If keyguard is going away, defer to the display sleeping state.
         verifyShouldSleepActivities(true /* focusedStack */, false /*keyguardGoingAway*/,
-                true /* displaySleeping */, true /* expected*/);
+                true /* displaySleeping */, true /* isDefaultDisplay */, true /* expected */);
         verifyShouldSleepActivities(true /* focusedStack */, false /*keyguardGoingAway*/,
-                false /* displaySleeping */, false /* expected*/);
+                false /* displaySleeping */, true /* isDefaultDisplay */, false /* expected */);
     }
 
     @Test
@@ -1428,9 +1431,11 @@
     }
 
     private void verifyShouldSleepActivities(boolean focusedStack,
-            boolean keyguardGoingAway, boolean displaySleeping, boolean expected) {
+            boolean keyguardGoingAway, boolean displaySleeping, boolean isDefaultDisplay,
+            boolean expected) {
         final DisplayContent display = mock(DisplayContent.class);
         final KeyguardController keyguardController = mSupervisor.getKeyguardController();
+        display.isDefaultDisplay = isDefaultDisplay;
 
         doReturn(display).when(mStack).getDisplay();
         doReturn(keyguardGoingAway).when(keyguardController).isKeyguardGoingAway();
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 f65d6e0..48be58f 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java
@@ -225,5 +225,27 @@
 
         mockSession.finishMocking();
     }
+
+    @Test
+    public void testResumeNextActivityOnCrashedAppDied() {
+        mSupervisor.beginDeferResume();
+        final ActivityRecord homeActivity = new ActivityBuilder(mService)
+                .setTask(mRootWindowContainer.getDefaultTaskDisplayArea().getOrCreateRootHomeTask())
+                .build();
+        final ActivityRecord activity = new ActivityBuilder(mService).setCreateTask(true).build();
+        mSupervisor.endDeferResume();
+        // Assume the activity is finishing and hidden because it was crashed.
+        activity.finishing = true;
+        activity.mVisibleRequested = false;
+        activity.setVisible(false);
+        activity.getRootTask().mPausingActivity = activity;
+        homeActivity.setState(ActivityStack.ActivityState.PAUSED, "test");
+
+        // Even the visibility states are invisible, the next activity should be resumed because
+        // the crashed activity was pausing.
+        mService.mInternal.handleAppDied(activity.app, false /* restarting */,
+                null /* finishInstrumentationCallback */);
+        assertEquals(ActivityStack.ActivityState.RESUMED, homeActivity.getState());
+    }
 }
 
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
index 66dfbfd..1948003a 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
@@ -28,6 +28,7 @@
 import static android.os.Build.VERSION_CODES.P;
 import static android.os.Build.VERSION_CODES.Q;
 import static android.view.Display.DEFAULT_DISPLAY;
+import static android.view.Display.FLAG_PRIVATE;
 import static android.view.DisplayCutout.BOUNDS_POSITION_LEFT;
 import static android.view.DisplayCutout.BOUNDS_POSITION_TOP;
 import static android.view.DisplayCutout.fromBoundingRect;
@@ -95,14 +96,12 @@
 import android.platform.test.annotations.Presubmit;
 import android.util.DisplayMetrics;
 import android.view.DisplayCutout;
+import android.view.DisplayInfo;
 import android.view.Gravity;
-import android.view.IDisplayWindowInsetsController;
 import android.view.IDisplayWindowRotationCallback;
 import android.view.IDisplayWindowRotationController;
 import android.view.ISystemGestureExclusionListener;
 import android.view.IWindowManager;
-import android.view.InsetsSourceControl;
-import android.view.InsetsState;
 import android.view.MotionEvent;
 import android.view.Surface;
 import android.view.SurfaceControl.Transaction;
@@ -934,28 +933,6 @@
         assertEquals(mAppWindow, mDisplayContent.computeImeControlTarget());
     }
 
-    private IDisplayWindowInsetsController createDisplayWindowInsetsController() {
-        return new IDisplayWindowInsetsController.Stub() {
-
-            @Override
-            public void insetsChanged(InsetsState insetsState) throws RemoteException {
-            }
-
-            @Override
-            public void insetsControlChanged(InsetsState insetsState,
-                    InsetsSourceControl[] insetsSourceControls) throws RemoteException {
-            }
-
-            @Override
-            public void showInsets(int i, boolean b) throws RemoteException {
-            }
-
-            @Override
-            public void hideInsets(int i, boolean b) throws RemoteException {
-            }
-        };
-    }
-
     @Test
     public void testUpdateSystemGestureExclusion() throws Exception {
         final DisplayContent dc = createNewDisplay();
@@ -1172,8 +1149,10 @@
         verify(t, never()).setPosition(any(), eq(0), eq(0));
 
         // Launch another activity before the transition is finished.
-        final ActivityRecord app2 = new ActivityTestsBase.StackBuilder(mWm.mRoot)
-                .setDisplay(mDisplayContent).build().getTopMostActivity();
+        final ActivityStack stack2 = new ActivityTestsBase.StackBuilder(mWm.mRoot)
+                .setDisplay(mDisplayContent).build();
+        final ActivityRecord app2 = new ActivityTestsBase.ActivityBuilder(mWm.mAtmService)
+                .setStack(stack2).setUseProcess(app.app).build();
         app2.setVisible(false);
         mDisplayContent.mOpeningApps.add(app2);
         app2.setRequestedOrientation(newOrientation);
@@ -1183,6 +1162,12 @@
         assertTrue(app.hasFixedRotationTransform(app2));
         assertTrue(mDisplayContent.isFixedRotationLaunchingApp(app2));
 
+        final Configuration expectedProcConfig = new Configuration(app2.app.getConfiguration());
+        expectedProcConfig.windowConfiguration.setActivityType(
+                WindowConfiguration.ACTIVITY_TYPE_UNDEFINED);
+        assertEquals("The process should receive rotated configuration for compatibility",
+                expectedProcConfig, app2.app.getConfiguration());
+
         // The fixed rotation transform can only be finished when all animation finished.
         doReturn(false).when(app2).isAnimating(anyInt(), anyInt());
         mDisplayContent.mAppTransition.notifyAppTransitionFinishedLocked(app2.token);
@@ -1291,6 +1276,27 @@
     }
 
     @Test
+    public void testNoFixedRotationOnResumedScheduledApp() {
+        final ActivityRecord app = new ActivityTestsBase.StackBuilder(mWm.mRoot)
+                .setDisplay(mDisplayContent).build().getTopMostActivity();
+        app.setVisible(false);
+        app.setState(ActivityStack.ActivityState.RESUMED, "test");
+        mDisplayContent.prepareAppTransition(WindowManager.TRANSIT_ACTIVITY_OPEN,
+                false /* alwaysKeepCurrent */);
+        mDisplayContent.mOpeningApps.add(app);
+        final int newOrientation = getRotatedOrientation(mDisplayContent);
+        app.setRequestedOrientation(newOrientation);
+
+        // The condition should reject using fixed rotation because the resumed client in real case
+        // might get display info immediately. And the fixed rotation adjustments haven't arrived
+        // client side so the info may be inconsistent with the requested orientation.
+        verify(mDisplayContent).handleTopActivityLaunchingInDifferentOrientation(eq(app),
+                eq(true) /* checkOpening */);
+        assertFalse(app.isFixedRotationTransforming());
+        assertFalse(mDisplayContent.hasTopFixedRotationLaunchingApp());
+    }
+
+    @Test
     public void testRecentsNotRotatingWithFixedRotation() {
         final DisplayRotation displayRotation = mDisplayContent.getDisplayRotation();
         doCallRealMethod().when(displayRotation).updateRotationUnchecked(anyBoolean());
@@ -1307,7 +1313,7 @@
         assertFalse(displayRotation.updateRotationUnchecked(false));
 
         // Rotation can be updated if the recents animation is finished.
-        mDisplayContent.mFixedRotationTransitionListener.onFinishRecentsAnimation(false);
+        mDisplayContent.mFixedRotationTransitionListener.onFinishRecentsAnimation();
         assertTrue(displayRotation.updateRotationUnchecked(false));
 
         // Rotation can be updated if the recents animation is animating but it is not on top, e.g.
@@ -1464,6 +1470,29 @@
         mDisplayContent.ensureActivitiesVisible(null, 0, false, false);
     }
 
+    @Test
+    public void testForceDesktopMode() {
+        mWm.mForceDesktopModeOnExternalDisplays = true;
+        // Not applicable for default display
+        final DisplayContent defaultDisplay = mWm.mRoot.getDefaultDisplay();
+        assertFalse(defaultDisplay.forceDesktopMode());
+
+        // Not applicable for private secondary display.
+        final DisplayInfo displayInfo = new DisplayInfo();
+        displayInfo.copyFrom(mDisplayInfo);
+        displayInfo.flags = FLAG_PRIVATE;
+        final DisplayContent privateDc = createNewDisplay(displayInfo);
+        assertFalse(privateDc.forceDesktopMode());
+
+        // Applicable for public secondary display.
+        final DisplayContent publicDc = createNewDisplay();
+        assertTrue(publicDc.forceDesktopMode());
+
+        // Make sure forceDesktopMode() is false when the force config is disabled.
+        mWm.mForceDesktopModeOnExternalDisplays = false;
+        assertFalse(publicDc.forceDesktopMode());
+    }
+
     private boolean isOptionsPanelAtRight(int displayId) {
         return (mWm.getPreferredOptionsPanelGravity(displayId) & Gravity.RIGHT) == Gravity.RIGHT;
     }
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java
index 1922351..58d4104 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java
@@ -20,6 +20,8 @@
 import static android.view.Gravity.LEFT;
 import static android.view.Gravity.RIGHT;
 import static android.view.Gravity.TOP;
+import static android.view.InsetsState.ITYPE_CLIMATE_BAR;
+import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_STATUS_BAR;
 import static android.view.InsetsState.ITYPE_TOP_GESTURES;
@@ -36,12 +38,19 @@
 import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
 import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER;
 import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR;
 import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
 import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
+import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL;
 import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_BOTTOM;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_LEFT;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_RIGHT;
+import static android.view.WindowManagerPolicyConstants.ALT_BAR_TOP;
 
 import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertEquals;
@@ -60,6 +69,7 @@
 import android.util.SparseArray;
 import android.view.DisplayCutout;
 import android.view.DisplayInfo;
+import android.view.Gravity;
 import android.view.InsetsState;
 import android.view.WindowInsets.Side;
 import android.view.WindowInsets.Type;
@@ -67,7 +77,6 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.server.policy.WindowManagerPolicy;
 import com.android.server.wm.utils.WmDisplayCutout;
 
 import org.junit.Before;
@@ -148,6 +157,8 @@
 
     @Test
     public void addingWindow_withInsetsTypes() {
+        mDisplayPolicy.removeWindowLw(mStatusBarWindow);  // Removes the existing one.
+
         WindowState win = createWindow(null, TYPE_STATUS_BAR_SUB_PANEL, "StatusBarSubPanel");
         win.mAttrs.providesInsetsTypes = new int[]{ITYPE_STATUS_BAR, ITYPE_TOP_GESTURES};
         win.getFrameLw().set(0, 0, 500, 100);
@@ -190,10 +201,56 @@
 
     @Test
     public void addingWindow_throwsException_WithMultipleInsetTypes() {
-        WindowState win = createWindow(null, TYPE_STATUS_BAR_SUB_PANEL, "StatusBarSubPanel");
-        win.mAttrs.providesInsetsTypes = new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR};
+        WindowState win1 = createWindow(null, TYPE_STATUS_BAR_SUB_PANEL, "StatusBarSubPanel");
+        win1.mAttrs.providesInsetsTypes = new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR};
 
-        expectThrows(IllegalArgumentException.class, () -> addWindow(win));
+        expectThrows(IllegalArgumentException.class, () -> addWindow(win1));
+
+        WindowState win2 = createWindow(null, TYPE_STATUS_BAR_SUB_PANEL, "StatusBarSubPanel");
+        win2.mAttrs.providesInsetsTypes = new int[]{ITYPE_CLIMATE_BAR, ITYPE_EXTRA_NAVIGATION_BAR};
+
+        expectThrows(IllegalArgumentException.class, () -> addWindow(win2));
+    }
+
+    @Test
+    public void addingWindow_variousGravities_alternateBarPosUpdated() {
+        mDisplayPolicy.removeWindowLw(mNavBarWindow);  // Removes the existing one.
+
+        WindowState win1 = createWindow(null, TYPE_NAVIGATION_BAR_PANEL, "NavBarPanel1");
+        win1.mAttrs.providesInsetsTypes = new int[]{ITYPE_NAVIGATION_BAR};
+        win1.mAttrs.gravity = Gravity.TOP;
+        win1.getFrameLw().set(0, 0, 200, 500);
+        addWindow(win1);
+
+        assertEquals(mDisplayPolicy.getAlternateNavBarPosition(), ALT_BAR_TOP);
+        mDisplayPolicy.removeWindowLw(win1);
+
+        WindowState win2 = createWindow(null, TYPE_NAVIGATION_BAR_PANEL, "NavBarPanel2");
+        win2.mAttrs.providesInsetsTypes = new int[]{ITYPE_NAVIGATION_BAR};
+        win2.mAttrs.gravity = Gravity.BOTTOM;
+        win2.getFrameLw().set(0, 0, 200, 500);
+        addWindow(win2);
+
+        assertEquals(mDisplayPolicy.getAlternateNavBarPosition(), ALT_BAR_BOTTOM);
+        mDisplayPolicy.removeWindowLw(win2);
+
+        WindowState win3 = createWindow(null, TYPE_NAVIGATION_BAR_PANEL, "NavBarPanel3");
+        win3.mAttrs.providesInsetsTypes = new int[]{ITYPE_NAVIGATION_BAR};
+        win3.mAttrs.gravity = Gravity.LEFT;
+        win3.getFrameLw().set(0, 0, 200, 500);
+        addWindow(win3);
+
+        assertEquals(mDisplayPolicy.getAlternateNavBarPosition(), ALT_BAR_LEFT);
+        mDisplayPolicy.removeWindowLw(win3);
+
+        WindowState win4 = createWindow(null, TYPE_NAVIGATION_BAR_PANEL, "NavBarPanel4");
+        win4.mAttrs.providesInsetsTypes = new int[]{ITYPE_NAVIGATION_BAR};
+        win4.mAttrs.gravity = Gravity.RIGHT;
+        win4.getFrameLw().set(0, 0, 200, 500);
+        addWindow(win4);
+
+        assertEquals(mDisplayPolicy.getAlternateNavBarPosition(), ALT_BAR_RIGHT);
+        mDisplayPolicy.removeWindowLw(win4);
     }
 
     @Test
@@ -301,6 +358,24 @@
     }
 
     @Test
+    public void layoutWindowLw_insetParentFrameByIme() {
+        final InsetsState state =
+                mDisplayContent.getInsetsStateController().getRawInsetsState();
+        state.getSource(InsetsState.ITYPE_IME).setVisible(true);
+        state.getSource(InsetsState.ITYPE_IME).setFrame(
+                0, DISPLAY_HEIGHT - IME_HEIGHT, DISPLAY_WIDTH, DISPLAY_HEIGHT);
+        mWindow.mAttrs.privateFlags |= PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME;
+        mWindow.mBehindIme = true;
+        addWindow(mWindow);
+
+        mDisplayPolicy.beginLayoutLw(mFrames, 0 /* UI mode */);
+        mDisplayPolicy.layoutWindowLw(mWindow, null, mFrames);
+
+        assertInsetByTopBottom(mWindow.getDisplayFrameLw(), STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT);
+        assertInsetByTopBottom(mWindow.getParentFrame(), STATUS_BAR_HEIGHT, IME_HEIGHT);
+    }
+
+    @Test
     public void layoutWindowLw_fitDisplayCutout() {
         addDisplayCutout();
 
@@ -679,6 +754,51 @@
     }
 
     @Test
+    public void layoutWindowLw_withFlexibleSystemBars_adjustStableFrame() {
+        mDisplayPolicy.removeWindowLw(mStatusBarWindow);
+        mDisplayPolicy.removeWindowLw(mNavBarWindow);
+
+        WindowState statusWin = spy(createWindow(null, TYPE_STATUS_BAR_ADDITIONAL,
+                "StatusBarAdditional"));
+        doNothing().when(statusWin).computeFrameLw();
+        statusWin.mAttrs.providesInsetsTypes = new int[]{ITYPE_STATUS_BAR};
+        statusWin.mAttrs.gravity = Gravity.TOP;
+        statusWin.mAttrs.height = STATUS_BAR_HEIGHT;
+        statusWin.mAttrs.width = MATCH_PARENT;
+        statusWin.getFrameLw().set(0, 0, DISPLAY_WIDTH, STATUS_BAR_HEIGHT);
+        addWindow(statusWin);
+
+        WindowState navWin = spy(createWindow(null, TYPE_NAVIGATION_BAR_PANEL,
+                "NavigationBarPanel"));
+        doNothing().when(navWin).computeFrameLw();
+        navWin.mAttrs.providesInsetsTypes = new int[]{ITYPE_NAVIGATION_BAR};
+        navWin.mAttrs.gravity = Gravity.BOTTOM;
+        navWin.mAttrs.height = NAV_BAR_HEIGHT;
+        navWin.mAttrs.width = MATCH_PARENT;
+        navWin.getFrameLw().set(0, DISPLAY_HEIGHT - NAV_BAR_HEIGHT, DISPLAY_WIDTH, DISPLAY_HEIGHT);
+        addWindow(navWin);
+
+        WindowState climateWin = spy(createWindow(null, TYPE_NAVIGATION_BAR_PANEL,
+                "ClimatePanel"));
+        doNothing().when(climateWin).computeFrameLw();
+        climateWin.mAttrs.providesInsetsTypes = new int[]{ITYPE_CLIMATE_BAR};
+        climateWin.mAttrs.gravity = Gravity.LEFT;
+        climateWin.mAttrs.height = MATCH_PARENT;
+        climateWin.mAttrs.width = 20;
+        climateWin.getFrameLw().set(0, 0, 20, DISPLAY_HEIGHT);
+        addWindow(climateWin);
+
+        mDisplayPolicy.beginLayoutLw(mFrames, 0 /* UI mode */);
+        mDisplayPolicy.layoutWindowLw(statusWin, null, mFrames);
+        mDisplayPolicy.layoutWindowLw(navWin, null, mFrames);
+        mDisplayPolicy.layoutWindowLw(climateWin, null, mFrames);
+
+        assertThat(mFrames.mStable,
+                is(new Rect(20, STATUS_BAR_HEIGHT, DISPLAY_WIDTH,
+                        DISPLAY_HEIGHT - NAV_BAR_HEIGHT)));
+    }
+
+    @Test
     public void layoutHint_appWindow() {
         mWindow.mAttrs.flags =
                 FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR | FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;
@@ -807,27 +927,6 @@
     }
 
     @Test
-    public void forceShowSystemBars_clearsSystemUIFlags() {
-        mDisplayPolicy.mLastSystemUiFlags |= SYSTEM_UI_FLAG_FULLSCREEN;
-        mWindow.mAttrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
-        mWindow.mAttrs.flags =
-                FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR | FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;
-        mWindow.mSystemUiVisibility = SYSTEM_UI_FLAG_FULLSCREEN;
-        mDisplayPolicy.setForceShowSystemBars(true);
-        addWindow(mWindow);
-
-        mDisplayPolicy.beginLayoutLw(mFrames, 0 /* UI mode */);
-        mDisplayPolicy.layoutWindowLw(mWindow, null, mFrames);
-        // triggers updateSystemUiVisibilityLw which will reset the flags as needed
-        int finishPostLayoutPolicyLw = mDisplayPolicy.focusChangedLw(mWindow, mWindow);
-
-        assertEquals(WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT, finishPostLayoutPolicyLw);
-        assertEquals(0, mDisplayPolicy.mLastSystemUiFlags);
-        assertEquals(0, mWindow.mAttrs.systemUiVisibility);
-        assertInsetByTopBottom(mWindow.getContentFrameLw(), STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT);
-    }
-
-    @Test
     public void testScreenDecorWindows() {
         final WindowState decorWindow = createWindow(null, TYPE_APPLICATION_OVERLAY, "decorWindow");
         mWindow.mAttrs.flags = FLAG_NOT_FOCUSABLE | FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTestsBase.java
index 7ba3fd8..c87014a 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTestsBase.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTestsBase.java
@@ -62,7 +62,7 @@
     static final int STATUS_BAR_HEIGHT = 10;
     static final int NAV_BAR_HEIGHT = 15;
     static final int DISPLAY_CUTOUT_HEIGHT = 8;
-    static final int INPUT_METHOD_WINDOW_TOP = 585;
+    static final int IME_HEIGHT = 415;
 
     DisplayPolicy mDisplayPolicy;
 
diff --git a/services/tests/wmtests/src/com/android/server/wm/ImeInsetsSourceProviderTest.java b/services/tests/wmtests/src/com/android/server/wm/ImeInsetsSourceProviderTest.java
index ca739c0..91cfd4e 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ImeInsetsSourceProviderTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ImeInsetsSourceProviderTest.java
@@ -56,4 +56,12 @@
         mImeProvider.scheduleShowImePostLayout(appWin);
         assertTrue(mImeProvider.isImeTargetFromDisplayContentAndImeSame());
     }
+
+    @Test
+    public void testInputMethodInputTargetCanShowIme() {
+        WindowState target = createWindow(null, TYPE_APPLICATION, "app");
+        mDisplayContent.mInputMethodTarget = target;
+        mImeProvider.scheduleShowImePostLayout(target);
+        assertTrue(mImeProvider.isImeTargetFromDisplayContentAndImeSame());
+    }
 }
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 c794e1a..90af8a1 100644
--- a/services/tests/wmtests/src/com/android/server/wm/InsetsPolicyTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/InsetsPolicyTest.java
@@ -43,7 +43,6 @@
 import static org.mockito.Mockito.spy;
 
 import android.platform.test.annotations.Presubmit;
-import android.util.IntArray;
 import android.view.InsetsSourceControl;
 import android.view.InsetsState;
 import android.view.test.InsetsModeSession;
@@ -172,8 +171,9 @@
     }
 
     @Test
-    public void testControlsForDispatch_forceShowSystemBarsFromExternal_appHasNoControl() {
-        mDisplayContent.getDisplayPolicy().setForceShowSystemBars(true);
+    public void testControlsForDispatch_remoteInsetsControllerControlsBars_appHasNoControl() {
+        mDisplayContent.setRemoteInsetsController(createDisplayWindowInsetsController());
+        mDisplayContent.getInsetsPolicy().setRemoteInsetsControllerControlsSystemBars(true);
         addWindow(TYPE_STATUS_BAR, "statusBar");
         addWindow(TYPE_NAVIGATION_BAR, "navBar");
 
@@ -240,8 +240,7 @@
         }).when(policy).startAnimation(anyBoolean(), any(), any());
 
         policy.updateBarControlTarget(mAppWindow);
-        policy.showTransient(
-                IntArray.wrap(new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR}));
+        policy.showTransient(new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR});
         waitUntilWindowAnimatorIdle();
         final InsetsSourceControl[] controls =
                 mDisplayContent.getInsetsStateController().getControlsForDispatch(mAppWindow);
@@ -268,8 +267,7 @@
         final InsetsPolicy policy = spy(mDisplayContent.getInsetsPolicy());
         doNothing().when(policy).startAnimation(anyBoolean(), any(), any());
         policy.updateBarControlTarget(mAppWindow);
-        policy.showTransient(
-                IntArray.wrap(new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR}));
+        policy.showTransient(new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR});
         waitUntilWindowAnimatorIdle();
         final InsetsSourceControl[] controls =
                 mDisplayContent.getInsetsStateController().getControlsForDispatch(mAppWindow);
@@ -297,8 +295,7 @@
         final InsetsPolicy policy = spy(mDisplayContent.getInsetsPolicy());
         doNothing().when(policy).startAnimation(anyBoolean(), any(), any());
         policy.updateBarControlTarget(mAppWindow);
-        policy.showTransient(
-                IntArray.wrap(new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR}));
+        policy.showTransient(new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR});
         waitUntilWindowAnimatorIdle();
         InsetsSourceControl[] controls =
                 mDisplayContent.getInsetsStateController().getControlsForDispatch(mAppWindow);
@@ -336,8 +333,7 @@
         final InsetsPolicy policy = spy(mDisplayContent.getInsetsPolicy());
         doNothing().when(policy).startAnimation(anyBoolean(), any(), any());
         policy.updateBarControlTarget(app);
-        policy.showTransient(
-                IntArray.wrap(new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR}));
+        policy.showTransient(new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR});
         final InsetsSourceControl[] controls =
                 mDisplayContent.getInsetsStateController().getControlsForDispatch(app);
         policy.updateBarControlTarget(app2);
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 0a27e1a..73ac408 100644
--- a/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java
@@ -20,6 +20,8 @@
 import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
 import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
 import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
+import static android.view.InsetsState.ITYPE_CLIMATE_BAR;
+import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_IME;
 import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
 import static android.view.InsetsState.ITYPE_STATUS_BAR;
@@ -292,12 +294,17 @@
     public void testBarControllingWinChanged() {
         final WindowState navBar = createWindow(null, TYPE_APPLICATION, "navBar");
         final WindowState statusBar = createWindow(null, TYPE_APPLICATION, "statusBar");
+        final WindowState climateBar = createWindow(null, TYPE_APPLICATION, "climateBar");
+        final WindowState extraNavBar = createWindow(null, TYPE_APPLICATION, "extraNavBar");
         final WindowState app = createWindow(null, TYPE_APPLICATION, "app");
         getController().getSourceProvider(ITYPE_STATUS_BAR).setWindow(statusBar, null, null);
         getController().getSourceProvider(ITYPE_NAVIGATION_BAR).setWindow(navBar, null, null);
+        getController().getSourceProvider(ITYPE_CLIMATE_BAR).setWindow(climateBar, null, null);
+        getController().getSourceProvider(ITYPE_EXTRA_NAVIGATION_BAR).setWindow(extraNavBar, null,
+                null);
         getController().onBarControlTargetChanged(app, null, app, null);
         InsetsSourceControl[] controls = getController().getControlsForDispatch(app);
-        assertEquals(2, controls.length);
+        assertEquals(4, controls.length);
     }
 
     @Test
diff --git a/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
index 8e85e7b..f277117 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
@@ -363,12 +363,14 @@
         assertFalse(homeActivity.hasFixedRotationTransform());
     }
 
-    @Test
-    public void testClearFixedRotationLaunchingAppAfterCleanupAnimation() {
+    private ActivityRecord prepareFixedRotationLaunchingAppWithRecentsAnim() {
         final ActivityRecord homeActivity = createHomeActivity();
         homeActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
         final ActivityRecord activity = createActivityRecord(mDefaultDisplay,
                 WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD);
+        // Add a window so it can be animated by the recents.
+        final WindowState win = createWindow(null, TYPE_BASE_APPLICATION, activity, "win");
+        activity.addWindow(win);
         // Assume an activity is launching to different rotation.
         mDefaultDisplay.setFixedRotationLaunchingApp(activity,
                 (mDefaultDisplay.getRotation() + 1) % 4);
@@ -379,6 +381,14 @@
         // Before the transition is done, the recents animation is triggered.
         initializeRecentsAnimationController(mController, homeActivity);
         assertFalse(homeActivity.hasFixedRotationTransform());
+        assertTrue(mController.isAnimatingTask(activity.getTask()));
+
+        return activity;
+    }
+
+    @Test
+    public void testClearFixedRotationLaunchingAppAfterCleanupAnimation() {
+        final ActivityRecord activity = prepareFixedRotationLaunchingAppWithRecentsAnim();
 
         // Simulate giving up the swipe up gesture to keep the original activity as top.
         mController.cleanupAnimation(REORDER_MOVE_TO_ORIGINAL_POSITION);
@@ -388,6 +398,21 @@
     }
 
     @Test
+    public void testKeepFixedRotationWhenMovingRecentsToTop() {
+        final ActivityRecord activity = prepareFixedRotationLaunchingAppWithRecentsAnim();
+        // Assume a transition animation has started running before recents animation. Then the
+        // activity will receive onAnimationFinished that notifies app transition finished when
+        // removing the recents animation of task.
+        activity.getTask().getAnimationSources().add(activity);
+
+        // Simulate swiping to home/recents before the transition is done.
+        mController.cleanupAnimation(REORDER_MOVE_TO_TOP);
+        // The rotation transform should be preserved. In real case, it will be cleared by the next
+        // move-to-top transition.
+        assertTrue(activity.hasFixedRotationTransform());
+    }
+
+    @Test
     public void testWallpaperHasFixedRotationApplied() {
         mWm.setRecentsAnimationController(mController);
 
diff --git a/services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java b/services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java
index 31a102a..25ba6db3 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ScreenDecorWindowTests.java
@@ -25,8 +25,8 @@
 import static android.view.Gravity.LEFT;
 import static android.view.Gravity.RIGHT;
 import static android.view.Gravity.TOP;
-import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
-import static android.view.InsetsState.ITYPE_STATUS_BAR;
+import static android.view.InsetsState.ITYPE_CLIMATE_BAR;
+import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR;
 import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
 import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
 import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
@@ -68,6 +68,7 @@
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.util.ArrayList;
@@ -142,6 +143,9 @@
         assertInsetGreaterOrEqual(mTestActivity, RIGHT, mDecorThickness);
     }
 
+    // Decor windows (i.e windows using PRIVATE_FLAG_IS_SCREEN_DECOR) are no longer supported.
+    // PRIVATE_FLAG_IS_SCREEN_DECOR and related code will be deprecated/removed soon.
+    @Ignore
     @Test
     public void testMultipleDecors() {
         // Test 2 decor windows on-top.
@@ -190,7 +194,7 @@
 
     @Test
     public void testProvidesInsetsTypes() {
-        int[] providesInsetsTypes = new int[]{ITYPE_STATUS_BAR};
+        int[] providesInsetsTypes = new int[]{ITYPE_CLIMATE_BAR};
         final View win = createWindow("StatusBarSubPanel", TOP, MATCH_PARENT, mDecorThickness, RED,
                 FLAG_LAYOUT_IN_SCREEN, 0, providesInsetsTypes);
 
@@ -199,7 +203,7 @@
 
     private View createDecorWindow(int gravity, int width, int height) {
         int[] providesInsetsTypes =
-                new int[]{gravity == TOP ? ITYPE_STATUS_BAR : ITYPE_NAVIGATION_BAR};
+                new int[]{gravity == TOP ? ITYPE_CLIMATE_BAR : ITYPE_EXTRA_NAVIGATION_BAR};
         return createWindow("decorWindow", gravity, width, height, RED,
                 FLAG_LAYOUT_IN_SCREEN, PRIVATE_FLAG_IS_SCREEN_DECOR, providesInsetsTypes);
     }
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskRecordTests.java
index fb24d86..ddaa586 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskRecordTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskRecordTests.java
@@ -403,6 +403,31 @@
     }
 
     @Test
+    public void testComputeConfigResourceLayoutOverrides() {
+        final Rect fullScreenBounds = new Rect(0, 0, 1000, 2500);
+        TestDisplayContent display = new TestDisplayContent.Builder(
+                mService, fullScreenBounds.width(), fullScreenBounds.height()).build();
+        final Task task = new TaskBuilder(mSupervisor).setDisplay(display).build();
+        final Configuration inOutConfig = new Configuration();
+        final Configuration parentConfig = new Configuration();
+        final Rect nonLongBounds = new Rect(0, 0, 1000, 1250);
+        parentConfig.windowConfiguration.setBounds(fullScreenBounds);
+        parentConfig.windowConfiguration.setAppBounds(fullScreenBounds);
+        parentConfig.densityDpi = 400;
+        parentConfig.screenHeightDp = (fullScreenBounds.bottom * 160) / parentConfig.densityDpi;
+        parentConfig.screenWidthDp = (fullScreenBounds.right * 160) / parentConfig.densityDpi;
+        parentConfig.windowConfiguration.setRotation(ROTATION_0);
+
+        // Set BOTH screenW/H to an override value
+        inOutConfig.screenWidthDp = nonLongBounds.width() * 160 / parentConfig.densityDpi;
+        inOutConfig.screenHeightDp = nonLongBounds.height() * 160 / parentConfig.densityDpi;
+        task.computeConfigResourceOverrides(inOutConfig, parentConfig);
+
+        // screenLayout should honor override when both screenW/H are set.
+        assertTrue((inOutConfig.screenLayout & Configuration.SCREENLAYOUT_LONG_NO) != 0);
+    }
+
+    @Test
     public void testComputeNestedConfigResourceOverrides() {
         final Task task = new TaskBuilder(mSupervisor).build();
         assertTrue(task.getResolvedOverrideBounds().isEmpty());
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
index d6ec788..1a85f74 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
@@ -16,6 +16,7 @@
 
 package com.android.server.wm;
 
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
 import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
 import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
 import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;
@@ -88,7 +89,7 @@
                 0 /* systemUiVisibility */, false /* isTranslucent */);
         mSurface = new TaskSnapshotSurface(mWm, new Window(), new SurfaceControl(), snapshot, "Test",
                 createTaskDescription(Color.WHITE, Color.RED, Color.BLUE), sysuiVis, windowFlags, 0,
-                taskBounds, ORIENTATION_PORTRAIT, new InsetsState());
+                taskBounds, ORIENTATION_PORTRAIT, ACTIVITY_TYPE_STANDARD, new InsetsState());
     }
 
     private static TaskDescription createTaskDescription(int background, int statusBar,
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskTests.java
index 9d88ada..9feb83f 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskTests.java
@@ -186,4 +186,19 @@
             assertTrue(r.finishing);
         });
     }
+
+    @Test
+    public void testSwitchUser() {
+        final Task rootTask = createTaskStackOnDisplay(mDisplayContent);
+        final Task childTask = createTaskInStack((ActivityStack) rootTask, 0 /* userId */);
+        final Task leafTask1 = createTaskInStack((ActivityStack) childTask, 10 /* userId */);
+        final Task leafTask2 = createTaskInStack((ActivityStack) childTask, 0 /* userId */);
+        assertEquals(1, rootTask.getChildCount());
+        assertEquals(leafTask2, childTask.getTopChild());
+
+        doReturn(true).when(leafTask1).showToCurrentUser();
+        rootTask.switchUser(10);
+        assertEquals(1, rootTask.getChildCount());
+        assertEquals(leafTask1, childTask.getTopChild());
+    }
 }
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java
index f52905e..499bf66 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java
@@ -60,24 +60,6 @@
     @Rule
     public ExpectedException mExpectedException = ExpectedException.none();
 
-    @Test
-    public void testForceShowSystemBarsThrowsExceptionForNonAutomotive() {
-        if (!isAutomotive()) {
-            mExpectedException.expect(UnsupportedOperationException.class);
-
-            mWm.setForceShowSystemBars(true);
-        }
-    }
-
-    @Test
-    public void testForceShowSystemBarsDoesNotThrowExceptionForAutomotiveWithStatusBarPermission() {
-        if (isAutomotive()) {
-            mExpectedException.none();
-
-            mWm.setForceShowSystemBars(true);
-        }
-    }
-
     private boolean isAutomotive() {
         return getInstrumentation().getTargetContext().getPackageManager().hasSystemFeature(
                 PackageManager.FEATURE_AUTOMOTIVE);
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java
index cdf8eb4..a46e6d3 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java
@@ -16,6 +16,8 @@
 
 package com.android.server.wm;
 
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
 import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
 import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
 import static android.view.Display.INVALID_DISPLAY;
@@ -253,6 +255,28 @@
         assertFalse(mWpc.registeredForActivityConfigChanges());
     }
 
+    @Test
+    public void testProcessLevelConfiguration() {
+        Configuration config = new Configuration();
+        config.windowConfiguration.setActivityType(ACTIVITY_TYPE_HOME);
+        mWpc.onRequestedOverrideConfigurationChanged(config);
+        assertEquals(ACTIVITY_TYPE_HOME, config.windowConfiguration.getActivityType());
+        assertEquals(ACTIVITY_TYPE_UNDEFINED, mWpc.getActivityType());
+
+        mWpc.onMergedOverrideConfigurationChanged(config);
+        assertEquals(ACTIVITY_TYPE_HOME, config.windowConfiguration.getActivityType());
+        assertEquals(ACTIVITY_TYPE_UNDEFINED, mWpc.getActivityType());
+
+        final int globalSeq = 100;
+        mRootWindowContainer.getConfiguration().seq = globalSeq;
+        invertOrientation(mWpc.getConfiguration());
+        new ActivityBuilder(mService).setCreateTask(true).setUseProcess(mWpc).build();
+
+        assertTrue(mWpc.registeredForActivityConfigChanges());
+        assertEquals("Config seq of process should not be affected by activity",
+                mWpc.getConfiguration().seq, globalSeq);
+    }
+
     private TestDisplayContent createTestDisplayContentInContainer() {
         return new TestDisplayContent.Builder(mService, 1000, 1500).build();
     }
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
index a1e5b80..156298c 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
@@ -41,11 +41,15 @@
 
 import android.content.Context;
 import android.content.Intent;
+import android.os.RemoteException;
 import android.os.UserHandle;
 import android.util.Log;
 import android.view.Display;
 import android.view.DisplayInfo;
+import android.view.IDisplayWindowInsetsController;
 import android.view.IWindow;
+import android.view.InsetsSourceControl;
+import android.view.InsetsState;
 import android.view.SurfaceControl.Transaction;
 import android.view.View;
 import android.view.WindowManager;
@@ -123,7 +127,7 @@
             mChildAppWindowBelow = createCommonWindow(mAppWindow,
                     TYPE_APPLICATION_MEDIA_OVERLAY,
                     "mChildAppWindowBelow");
-            mDisplayContent.getDisplayPolicy().setForceShowSystemBars(false);
+            mDisplayContent.getInsetsPolicy().setRemoteInsetsControllerControlsSystemBars(false);
 
             // Adding a display will cause freezing the display. Make sure to wait until it's
             // unfrozen to not run into race conditions with the tests.
@@ -344,6 +348,32 @@
         return createNewDisplay(displayInfo, false /* supportIme */);
     }
 
+    IDisplayWindowInsetsController createDisplayWindowInsetsController() {
+        return new IDisplayWindowInsetsController.Stub() {
+
+            @Override
+            public void insetsChanged(InsetsState insetsState) throws RemoteException {
+            }
+
+            @Override
+            public void insetsControlChanged(InsetsState insetsState,
+                    InsetsSourceControl[] insetsSourceControls) throws RemoteException {
+            }
+
+            @Override
+            public void showInsets(int i, boolean b) throws RemoteException {
+            }
+
+            @Override
+            public void hideInsets(int i, boolean b) throws RemoteException {
+            }
+
+            @Override
+            public void topFocusedWindowChanged(String packageName) {
+            }
+        };
+    }
+
     /** Sets the default minimum task size to 1 so that tests can use small task sizes */
     void removeGlobalMinSizeRestriction() {
         mWm.mAtmService.mRootWindowContainer.mDefaultMinSizeOfResizeableTaskDp = 1;
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java
index 23a097e..0ab9912 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTokenTests.java
@@ -24,6 +24,7 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -77,6 +78,10 @@
         assertFalse(token.hasWindow(window12));
         assertTrue(token.hasWindow(window2));
         assertTrue(token.hasWindow(window3));
+
+        // The child windows should have the same window token as their parents.
+        assertEquals(window1.mToken, window11.mToken);
+        assertEquals(window1.mToken, window12.mToken);
     }
 
     @Test
@@ -139,6 +144,8 @@
     public void testFinishFixedRotationTransform() {
         final WindowToken appToken = mAppWindow.mToken;
         final WindowToken wallpaperToken = mWallpaperWindow.mToken;
+        final WindowToken testToken =
+                WindowTestUtils.createTestWindowToken(TYPE_APPLICATION_OVERLAY, mDisplayContent);
         final Configuration config = new Configuration(mDisplayContent.getConfiguration());
         final int originalRotation = config.windowConfiguration.getRotation();
         final int targetRotation = (originalRotation + 1) % 4;
@@ -151,11 +158,20 @@
         assertEquals(targetRotation, appToken.getWindowConfiguration().getRotation());
         assertEquals(targetRotation, wallpaperToken.getWindowConfiguration().getRotation());
 
-        // The display doesn't rotate, the transformation will be canceled.
-        mAppWindow.mToken.finishFixedRotationTransform();
+        testToken.applyFixedRotationTransform(mDisplayInfo, mDisplayContent.mDisplayFrames, config);
+        // The wallpaperToken was linked to appToken, this should make it link to testToken.
+        wallpaperToken.linkFixedRotationTransform(testToken);
 
-        // The window tokens should restore to the original rotation.
+        // Assume the display doesn't rotate, the transformation will be canceled.
+        appToken.finishFixedRotationTransform();
+
+        // The appToken should restore to the original rotation.
         assertEquals(originalRotation, appToken.getWindowConfiguration().getRotation());
+        // The wallpaperToken is linked to testToken, it should keep the target rotation.
+        assertNotEquals(originalRotation, wallpaperToken.getWindowConfiguration().getRotation());
+
+        testToken.finishFixedRotationTransform();
+        // The rotation of wallpaperToken should be restored because its linked state is finished.
         assertEquals(originalRotation, wallpaperToken.getWindowConfiguration().getRotation());
     }
 
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 321657d..a5b6760 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -183,6 +183,7 @@
     private static class ActivityData {
         private final String mTaskRootPackage;
         private final String mTaskRootClass;
+        public int lastEvent = Event.NONE;
         private ActivityData(String taskRootPackage, String taskRootClass) {
             mTaskRootPackage = taskRootPackage;
             mTaskRootClass = taskRootClass;
@@ -787,6 +788,7 @@
         switch (event.mEventType) {
             case Event.ACTIVITY_RESUMED:
             case Event.ACTIVITY_PAUSED:
+            case Event.ACTIVITY_STOPPED:
                 uid = mPackageManagerInternal.getPackageUid(event.mPackage, 0, userId);
                 break;
             default:
@@ -819,8 +821,10 @@
                                     .APP_USAGE_EVENT_OCCURRED__EVENT_TYPE__MOVE_TO_FOREGROUND);
                     // check if this activity has already been resumed
                     if (mVisibleActivities.get(event.mInstanceId) != null) break;
-                    mVisibleActivities.put(event.mInstanceId,
-                            new ActivityData(event.mTaskRootPackage, event.mTaskRootClass));
+                    final ActivityData resumedData = new ActivityData(event.mTaskRootPackage,
+                            event.mTaskRootClass);
+                    resumedData.lastEvent = Event.ACTIVITY_RESUMED;
+                    mVisibleActivities.put(event.mInstanceId, resumedData);
                     try {
                         switch(mUsageSource) {
                             case USAGE_SOURCE_CURRENT_ACTIVITY:
@@ -836,16 +840,17 @@
                     }
                     break;
                 case Event.ACTIVITY_PAUSED:
-                    if (event.mTaskRootPackage == null) {
-                        // Task Root info is missing. Repair the event based on previous data
-                        final ActivityData prevData = mVisibleActivities.get(event.mInstanceId);
-                        if (prevData == null) {
-                            Slog.w(TAG, "Unexpected activity event reported! (" + event.mPackage
-                                    + "/" + event.mClass + " event : " + event.mEventType
-                                    + " instanceId : " + event.mInstanceId + ")");
-                        } else {
-                            event.mTaskRootPackage = prevData.mTaskRootPackage;
-                            event.mTaskRootClass = prevData.mTaskRootClass;
+                    final ActivityData pausedData = mVisibleActivities.get(event.mInstanceId);
+                    if (pausedData == null) {
+                        Slog.w(TAG, "Unexpected activity event reported! (" + event.mPackage
+                                + "/" + event.mClass + " event : " + event.mEventType
+                                + " instanceId : " + event.mInstanceId + ")");
+                    } else {
+                        pausedData.lastEvent = Event.ACTIVITY_PAUSED;
+                        if (event.mTaskRootPackage == null) {
+                            // Task Root info is missing. Repair the event based on previous data
+                            event.mTaskRootPackage = pausedData.mTaskRootPackage;
+                            event.mTaskRootClass = pausedData.mTaskRootClass;
                         }
                     }
                     FrameworkStatsLog.write(
@@ -868,6 +873,16 @@
                         return;
                     }
 
+                    if (prevData.lastEvent != Event.ACTIVITY_PAUSED) {
+                        FrameworkStatsLog.write(
+                                FrameworkStatsLog.APP_USAGE_EVENT_OCCURRED,
+                                uid,
+                                event.mPackage,
+                                event.mClass,
+                                FrameworkStatsLog
+                                        .APP_USAGE_EVENT_OCCURRED__EVENT_TYPE__MOVE_TO_BACKGROUND);
+                    }
+
                     ArraySet<String> tokens;
                     synchronized (mUsageReporters) {
                         tokens = mUsageReporters.removeReturnOld(event.mInstanceId);
diff --git a/services/voiceinteraction/OWNERS b/services/voiceinteraction/OWNERS
new file mode 100644
index 0000000..ef1061b
--- /dev/null
+++ b/services/voiceinteraction/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/voice/OWNERS
diff --git a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java
index 6c13cd7..fe0f7b8 100644
--- a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java
+++ b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java
@@ -697,7 +697,7 @@
             synchronized (mLock) {
                 ModuleProperties properties = mSoundTriggerHelper.getModuleProperties();
                 sEventLogger.log(new SoundTriggerLogger.StringEvent(
-                        "getModuleProperties(): " + properties.toString()));
+                        "getModuleProperties(): " + properties));
                 return properties;
             }
         }
@@ -1284,32 +1284,25 @@
          * @return The initialized AudioRecord
          */
         private @NonNull AudioRecord createAudioRecordForEvent(
-                @NonNull SoundTrigger.GenericRecognitionEvent event) {
+                @NonNull SoundTrigger.GenericRecognitionEvent event)
+                throws IllegalArgumentException, UnsupportedOperationException {
             AudioAttributes.Builder attributesBuilder = new AudioAttributes.Builder();
             attributesBuilder.setInternalCapturePreset(MediaRecorder.AudioSource.HOTWORD);
             AudioAttributes attributes = attributesBuilder.build();
 
-            // Use same AudioFormat processing as in RecognitionEvent.fromParcel
             AudioFormat originalFormat = event.getCaptureFormat();
-            AudioFormat captureFormat = (new AudioFormat.Builder())
-                    .setChannelMask(originalFormat.getChannelMask())
-                    .setEncoding(originalFormat.getEncoding())
-                    .setSampleRate(originalFormat.getSampleRate())
-                    .build();
-
-            int bufferSize = AudioRecord.getMinBufferSize(
-                    captureFormat.getSampleRate() == AudioFormat.SAMPLE_RATE_UNSPECIFIED
-                            ? AudioFormat.SAMPLE_RATE_HZ_MAX
-                            : captureFormat.getSampleRate(),
-                    captureFormat.getChannelCount() == 2
-                            ? AudioFormat.CHANNEL_IN_STEREO
-                            : AudioFormat.CHANNEL_IN_MONO,
-                    captureFormat.getEncoding());
 
             sEventLogger.log(new SoundTriggerLogger.StringEvent("createAudioRecordForEvent"));
 
-            return new AudioRecord(attributes, captureFormat, bufferSize,
-                    event.getCaptureSession());
+            return (new AudioRecord.Builder())
+                        .setAudioAttributes(attributes)
+                        .setAudioFormat((new AudioFormat.Builder())
+                            .setChannelMask(originalFormat.getChannelMask())
+                            .setEncoding(originalFormat.getEncoding())
+                            .setSampleRate(originalFormat.getSampleRate())
+                            .build())
+                        .setSessionId(event.getCaptureSession())
+                        .build();
         }
 
         @Override
@@ -1335,12 +1328,16 @@
                     // execute if throttled:
                     () -> {
                         if (event.isCaptureAvailable()) {
-                            AudioRecord capturedData = createAudioRecordForEvent(event);
-
-                            // Currently we need to start and release the audio record to reset
-                            // the DSP even if we don't want to process the event
-                            capturedData.startRecording();
-                            capturedData.release();
+                            try {
+                                // Currently we need to start and release the audio record to reset
+                                // the DSP even if we don't want to process the eve
+                                AudioRecord capturedData = createAudioRecordForEvent(event);
+                                capturedData.startRecording();
+                                capturedData.release();
+                            } catch (IllegalArgumentException | UnsupportedOperationException e) {
+                                Slog.w(TAG, mPuuid + ": createAudioRecordForEvent(" + event
+                                        + "), failed to create AudioRecord");
+                            }
                         }
                     }));
         }
diff --git a/services/wifi/OWNERS b/services/wifi/OWNERS
new file mode 100644
index 0000000..2ae7065
--- /dev/null
+++ b/services/wifi/OWNERS
@@ -0,0 +1 @@
+include /wifi/OWNERS
diff --git a/services/wifi/java/android/net/wifi/WifiApiServiceInfo.aidl b/services/wifi/java/android/net/wifi/WifiApiServiceInfo.aidl
deleted file mode 100644
index 45e4c69..0000000
--- a/services/wifi/java/android/net/wifi/WifiApiServiceInfo.aidl
+++ /dev/null
@@ -1,23 +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 android.net.wifi;
-
-/** @hide */
-parcelable WifiApiServiceInfo {
-    String name;
-    IBinder binder;
-}
diff --git a/telecomm/TEST_MAPPING b/telecomm/TEST_MAPPING
index c9903f9..1963ff3 100644
--- a/telecomm/TEST_MAPPING
+++ b/telecomm/TEST_MAPPING
@@ -23,7 +23,9 @@
           "exclude-annotation": "androidx.test.filters.FlakyTest"
         }
       ]
-    },
+    }
+  ],
+  "presubmit-large": [
     {
       "name": "CtsTelecomTestCases",
       "options": [
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 6288bc1..b1ccb53 100755
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -1988,8 +1988,10 @@
             connection.setAudioModeIsVoip(true);
         }
         connection.setTelecomCallId(callId);
+        PhoneAccountHandle phoneAccountHandle = connection.getPhoneAccountHandle() == null
+                            ? request.getAccountHandle() : connection.getPhoneAccountHandle();
         if (connection.getState() != Connection.STATE_DISCONNECTED) {
-            addConnection(request.getAccountHandle(), callId, connection);
+            addConnection(phoneAccountHandle, callId, connection);
         }
 
         Uri address = connection.getAddress();
@@ -2005,7 +2007,7 @@
                 callId,
                 request,
                 new ParcelableConnection(
-                        request.getAccountHandle(),
+                        phoneAccountHandle,
                         connection.getState(),
                         connection.getConnectionCapabilities(),
                         connection.getConnectionProperties(),
diff --git a/telecomm/java/android/telecom/OWNERS b/telecomm/java/android/telecom/OWNERS
new file mode 100644
index 0000000..6656a01
--- /dev/null
+++ b/telecomm/java/android/telecom/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+breadley@google.com
+hallliu@google.com
diff --git a/telephony/java/android/service/euicc/OWNERS b/telephony/java/android/service/euicc/OWNERS
new file mode 100644
index 0000000..6aa399d
--- /dev/null
+++ b/telephony/java/android/service/euicc/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+amitmahajan@google.com
diff --git a/telephony/java/android/service/sms/OWNERS b/telephony/java/android/service/sms/OWNERS
new file mode 100644
index 0000000..6aa399d
--- /dev/null
+++ b/telephony/java/android/service/sms/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+amitmahajan@google.com
diff --git a/telephony/java/android/telephony/Annotation.java b/telephony/java/android/telephony/Annotation.java
index 031c337..99f2e5e 100644
--- a/telephony/java/android/telephony/Annotation.java
+++ b/telephony/java/android/telephony/Annotation.java
@@ -624,6 +624,20 @@
     public @interface UiccAppType{}
 
     /**
+     * UICC SIM Application Types including UNKNOWN
+     */
+    @IntDef(prefix = { "APPTYPE_" }, value = {
+            TelephonyManager.APPTYPE_UNKNOWN,
+            TelephonyManager.APPTYPE_SIM,
+            TelephonyManager.APPTYPE_USIM,
+            TelephonyManager.APPTYPE_RUIM,
+            TelephonyManager.APPTYPE_CSIM,
+            TelephonyManager.APPTYPE_ISIM
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface UiccAppTypeExt{}
+
+    /**
      * Override network type
      */
     @Retention(RetentionPolicy.SOURCE)
@@ -634,4 +648,15 @@
             TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA,
             TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA_MMWAVE})
     public @interface OverrideNetworkType {}
+
+    /**
+     *  Result of a thermal mitigation request.
+     */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = { "THERMAL_MITIGATION_RESULT_" }, value = {
+        TelephonyManager.THERMAL_MITIGATION_RESULT_SUCCESS,
+        TelephonyManager.THERMAL_MITIGATION_RESULT_MODEM_ERROR,
+        TelephonyManager.THERMAL_MITIGATION_RESULT_INVALID_STATE,
+        TelephonyManager.THERMAL_MITIGATION_RESULT_UNKNOWN_ERROR})
+    public @interface ThermalMitigationResult {}
 }
diff --git a/telephony/java/android/telephony/CallForwardingInfo.java b/telephony/java/android/telephony/CallForwardingInfo.java
index 6ae6d00..aeac36e 100644
--- a/telephony/java/android/telephony/CallForwardingInfo.java
+++ b/telephony/java/android/telephony/CallForwardingInfo.java
@@ -86,7 +86,7 @@
      * Call forwarding reason types
      * @hide
      */
-    @IntDef(flag = true, prefix = { "REASON_" }, value = {
+    @IntDef(prefix = { "REASON_" }, value = {
         REASON_UNCONDITIONAL,
         REASON_BUSY,
         REASON_NO_REPLY,
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 92febd9..27ea690 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -2030,8 +2030,16 @@
             "allow_hold_call_during_emergency_bool";
 
     /**
-     * Flag indicating whether the carrier supports RCS presence indication for
-     * User Capability Exchange (UCE).  When presence is supported, the device should use the
+     * Flag indicating whether or not the carrier supports the periodic exchange of phone numbers
+     * in the user's address book with the carrier's presence server in order to retrieve the RCS
+     * capabilities for each contact used in the RCS User Capability Exchange (UCE) procedure. See
+     * RCC.71, section 3 for more information.
+     * <p>
+     * The flag {@link Ims#KEY_ENABLE_PRESENCE_PUBLISH_BOOL} must also be enabled if this flag is
+     * enabled, as sending a periodic SIP PUBLISH with this device's RCS capabilities is a
+     * requirement for capability exchange to begin.
+     * <p>
+     * When presence is supported, the device should use the
      * {@link android.provider.ContactsContract.Data#CARRIER_PRESENCE} bit mask and set the
      * {@link android.provider.ContactsContract.Data#CARRIER_PRESENCE_VT_CAPABLE} bit to indicate
      * whether each contact supports video calling.  The UI is made aware that presence is enabled
@@ -3847,12 +3855,27 @@
         public static final String KEY_IMS_SINGLE_REGISTRATION_REQUIRED_BOOL =
                 KEY_PREFIX + "ims_single_registration_required_bool";
 
+        /**
+         * A boolean flag specifying whether or not this carrier supports the device notifying the
+         * network of its RCS capabilities using the SIP PUBLISH procedure defined for User
+         * Capability Exchange (UCE). See RCC.71, section 3 for more information.
+         * <p>
+         * If this key's value is set to false, the procedure for RCS contact capability exchange
+         * via SIP SUBSCRIBE/NOTIFY will also be disabled internally, and
+         * {@link #KEY_USE_RCS_PRESENCE_BOOL} must also be set to false to ensure apps do not
+         * improperly think that capability exchange via SIP PUBLISH is enabled.
+         * <p> The default value for this key is {@code false}.
+         */
+        public static final String KEY_ENABLE_PRESENCE_PUBLISH_BOOL =
+                KEY_PREFIX + "enable_presence_publish_bool";
+
         private Ims() {}
 
         private static PersistableBundle getDefaults() {
             PersistableBundle defaults = new PersistableBundle();
             defaults.putInt(KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT, 4000);
             defaults.putBoolean(KEY_IMS_SINGLE_REGISTRATION_REQUIRED_BOOL, false);
+            defaults.putBoolean(KEY_ENABLE_PRESENCE_PUBLISH_BOOL, false);
             return defaults;
         }
     }
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java
index 3923c756..45a67b3 100644
--- a/telephony/java/android/telephony/CellIdentityNr.java
+++ b/telephony/java/android/telephony/CellIdentityNr.java
@@ -217,7 +217,7 @@
      * Get the tracking area code.
      * @return a 24 bit integer or {@link CellInfo#UNAVAILABLE} if unknown.
      */
-    @IntRange(from = 0, to = 16777215)
+    @IntRange(from = 0, to = 65535)
     public int getTac() {
         return mTac;
     }
diff --git a/telephony/java/android/telephony/CellInfo.java b/telephony/java/android/telephony/CellInfo.java
index b381cce..189a4b8 100644
--- a/telephony/java/android/telephony/CellInfo.java
+++ b/telephony/java/android/telephony/CellInfo.java
@@ -21,7 +21,6 @@
 import android.annotation.NonNull;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.hardware.radio.V1_4.CellInfo.Info;
-import android.hardware.radio.V1_5.CellInfo.CellInfoRatSpecificInfo;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -352,6 +351,13 @@
     }
 
     /** @hide */
+    protected CellInfo(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
+        this.mRegistered = ci.registered;
+        this.mTimeStamp = timeStamp;
+        this.mCellConnectionStatus = ci.connectionStatus;
+    }
+
+    /** @hide */
     public static CellInfo create(android.hardware.radio.V1_0.CellInfo ci) {
         if (ci == null) return null;
         switch(ci.cellInfoType) {
@@ -395,17 +401,49 @@
     public static CellInfo create(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
         if (ci == null) return null;
         switch (ci.ratSpecificInfo.getDiscriminator()) {
-            case CellInfoRatSpecificInfo.hidl_discriminator.gsm:
+            case android.hardware.radio.V1_5.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.gsm:
                 return new CellInfoGsm(ci, timeStamp);
-            case CellInfoRatSpecificInfo.hidl_discriminator.cdma:
+            case android.hardware.radio.V1_5.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.cdma:
                 return new CellInfoCdma(ci, timeStamp);
-            case CellInfoRatSpecificInfo.hidl_discriminator.lte:
+            case android.hardware.radio.V1_5.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.lte:
                 return new CellInfoLte(ci, timeStamp);
-            case CellInfoRatSpecificInfo.hidl_discriminator.wcdma:
+            case android.hardware.radio.V1_5.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.wcdma:
                 return new CellInfoWcdma(ci, timeStamp);
-            case CellInfoRatSpecificInfo.hidl_discriminator.tdscdma:
+            case android.hardware.radio.V1_5.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.tdscdma:
                 return new CellInfoTdscdma(ci, timeStamp);
-            case CellInfoRatSpecificInfo.hidl_discriminator.nr:
+            case android.hardware.radio.V1_5.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.nr:
+                return new CellInfoNr(ci, timeStamp);
+            default: return null;
+        }
+    }
+
+    /** @hide */
+    public static CellInfo create(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
+        if (ci == null) return null;
+        switch (ci.ratSpecificInfo.getDiscriminator()) {
+            case android.hardware.radio.V1_6.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.gsm:
+                return new CellInfoGsm(ci, timeStamp);
+            case android.hardware.radio.V1_6.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.cdma:
+                return new CellInfoCdma(ci, timeStamp);
+            case android.hardware.radio.V1_6.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.lte:
+                return new CellInfoLte(ci, timeStamp);
+            case android.hardware.radio.V1_6.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.wcdma:
+                return new CellInfoWcdma(ci, timeStamp);
+            case android.hardware.radio.V1_6.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.tdscdma:
+                return new CellInfoTdscdma(ci, timeStamp);
+            case android.hardware.radio.V1_6.CellInfo
+                    .CellInfoRatSpecificInfo.hidl_discriminator.nr:
                 return new CellInfoNr(ci, timeStamp);
             default: return null;
         }
diff --git a/telephony/java/android/telephony/CellInfoCdma.java b/telephony/java/android/telephony/CellInfoCdma.java
index 3ce99fa..dbb30d2 100644
--- a/telephony/java/android/telephony/CellInfoCdma.java
+++ b/telephony/java/android/telephony/CellInfoCdma.java
@@ -87,6 +87,15 @@
                 new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
     }
 
+    /** @hide */
+    public CellInfoCdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
+        super(ci, timeStamp);
+        final android.hardware.radio.V1_2.CellInfoCdma cic = ci.ratSpecificInfo.cdma();
+        mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
+        mCellSignalStrengthCdma =
+                new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
+    }
+
     /**
      * @return a {@link CellIdentityCdma} instance.
      */
diff --git a/telephony/java/android/telephony/CellInfoGsm.java b/telephony/java/android/telephony/CellInfoGsm.java
index e296e61..e1d996e 100644
--- a/telephony/java/android/telephony/CellInfoGsm.java
+++ b/telephony/java/android/telephony/CellInfoGsm.java
@@ -82,6 +82,14 @@
         mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
     }
 
+    /** @hide */
+    public CellInfoGsm(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
+        super(ci, timeStamp);
+        final android.hardware.radio.V1_5.CellInfoGsm cig = ci.ratSpecificInfo.gsm();
+        mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
+        mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
+    }
+
     /**
      * @return a {@link CellIdentityGsm} instance.
      */
diff --git a/telephony/java/android/telephony/CellInfoLte.java b/telephony/java/android/telephony/CellInfoLte.java
index 6f81234..39b320a 100644
--- a/telephony/java/android/telephony/CellInfoLte.java
+++ b/telephony/java/android/telephony/CellInfoLte.java
@@ -91,6 +91,15 @@
         mCellConfig = new CellConfigLte();
     }
 
+    /** @hide */
+    public CellInfoLte(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
+        super(ci, timeStamp);
+        final android.hardware.radio.V1_6.CellInfoLte cil = ci.ratSpecificInfo.lte();
+        mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
+        mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
+        mCellConfig = new CellConfigLte();
+    }
+
     /**
      * @return a {@link CellIdentityLte} instance.
      */
diff --git a/telephony/java/android/telephony/CellInfoNr.java b/telephony/java/android/telephony/CellInfoNr.java
index e01e8f0..12e6a38 100644
--- a/telephony/java/android/telephony/CellInfoNr.java
+++ b/telephony/java/android/telephony/CellInfoNr.java
@@ -68,6 +68,14 @@
         mCellSignalStrength = new CellSignalStrengthNr(cil.signalStrengthNr);
     }
 
+    /** @hide */
+    public CellInfoNr(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
+        super(ci, timeStamp);
+        final android.hardware.radio.V1_6.CellInfoNr cil = ci.ratSpecificInfo.nr();
+        mCellIdentity = new CellIdentityNr(cil.cellIdentityNr);
+        mCellSignalStrength = new CellSignalStrengthNr(cil.signalStrengthNr);
+    }
+
     /**
      * @return a {@link CellIdentityNr} instance.
      */
diff --git a/telephony/java/android/telephony/CellInfoTdscdma.java b/telephony/java/android/telephony/CellInfoTdscdma.java
index 038c49a..994b317 100644
--- a/telephony/java/android/telephony/CellInfoTdscdma.java
+++ b/telephony/java/android/telephony/CellInfoTdscdma.java
@@ -85,6 +85,14 @@
         mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
     }
 
+    /** @hide */
+    public CellInfoTdscdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
+        super(ci, timeStamp);
+        final android.hardware.radio.V1_5.CellInfoTdscdma cit = ci.ratSpecificInfo.tdscdma();
+        mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
+        mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
+    }
+
     /**
      * @return a {@link CellIdentityTdscdma} instance.
      */
diff --git a/telephony/java/android/telephony/CellInfoWcdma.java b/telephony/java/android/telephony/CellInfoWcdma.java
index c74955f..62ac0b8 100644
--- a/telephony/java/android/telephony/CellInfoWcdma.java
+++ b/telephony/java/android/telephony/CellInfoWcdma.java
@@ -80,6 +80,14 @@
         mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
     }
 
+    /** @hide */
+    public CellInfoWcdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
+        super(ci, timeStamp);
+        final android.hardware.radio.V1_5.CellInfoWcdma ciw = ci.ratSpecificInfo.wcdma();
+        mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
+        mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
+    }
+
     /**
      * @return a {@link CellIdentityWcdma} instance.
      */
diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index 47a8f72..db7d10a 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -86,6 +86,15 @@
     private int mRsrq;
     @UnsupportedAppUsage(maxTargetSdk = android.os.Build.VERSION_CODES.P)
     private int mRssnr;
+    /**
+     * CSI channel quality indicator (CQI) table index. There are multiple CQI tables.
+     * The definition of CQI in each table is different.
+     *
+     * Reference: 3GPP TS 136.213 section 7.2.3.
+     *
+     * Range [1, 6].
+     */
+    private int mCqiTableIndex;
     @UnsupportedAppUsage(maxTargetSdk = android.os.Build.VERSION_CODES.P)
     private int mCqi;
     @UnsupportedAppUsage(maxTargetSdk = android.os.Build.VERSION_CODES.P)
@@ -120,6 +129,32 @@
      * @param rsrp in dBm [-140,-43], UNKNOWN
      * @param rsrq in dB [-34, 3], UNKNOWN
      * @param rssnr in dB [-20, +30], UNKNOWN
+     * @param cqiTableIndex [1, 6], UNKNOWN
+     * @param cqi [0, 15], UNKNOWN
+     * @param timingAdvance [0, 1282], UNKNOWN
+     *
+     */
+    /** @hide */
+    public CellSignalStrengthLte(int rssi, int rsrp, int rsrq, int rssnr, int cqiTableIndex,
+            int cqi, int timingAdvance) {
+        mRssi = inRangeOrUnavailable(rssi, -113, -51);
+        mSignalStrength = mRssi;
+        mRsrp = inRangeOrUnavailable(rsrp, -140, -43);
+        mRsrq = inRangeOrUnavailable(rsrq, -34, 3);
+        mRssnr = inRangeOrUnavailable(rssnr, -20, 30);
+        mCqiTableIndex = inRangeOrUnavailable(cqiTableIndex, 1, 6);
+        mCqi = inRangeOrUnavailable(cqi, 0, 15);
+        mTimingAdvance = inRangeOrUnavailable(timingAdvance, 0, 1282);
+        updateLevel(null, null);
+    }
+
+    /**
+     * Construct a cell signal strength
+     *
+     * @param rssi in dBm [-113,-51], UNKNOWN
+     * @param rsrp in dBm [-140,-43], UNKNOWN
+     * @param rsrq in dB [-34, 3], UNKNOWN
+     * @param rssnr in dB [-20, +30], UNKNOWN
      * @param cqi [0, 15], UNKNOWN
      * @param timingAdvance [0, 1282], UNKNOWN
      *
@@ -127,15 +162,7 @@
     /** @hide */
     public CellSignalStrengthLte(int rssi, int rsrp, int rsrq, int rssnr, int cqi,
             int timingAdvance) {
-
-        mRssi = inRangeOrUnavailable(rssi, -113, -51);
-        mSignalStrength = mRssi;
-        mRsrp = inRangeOrUnavailable(rsrp, -140, -43);
-        mRsrq = inRangeOrUnavailable(rsrq, -34, 3);
-        mRssnr = inRangeOrUnavailable(rssnr, -20, 30);
-        mCqi = inRangeOrUnavailable(cqi, 0, 15);
-        mTimingAdvance = inRangeOrUnavailable(timingAdvance, 0, 1282);
-        updateLevel(null, null);
+        this(rssi, rsrp, rsrq, rssnr, CellInfo.UNAVAILABLE, cqi, timingAdvance);
     }
 
     /** @hide */
@@ -148,6 +175,16 @@
     }
 
     /** @hide */
+    public CellSignalStrengthLte(android.hardware.radio.V1_6.LteSignalStrength lte) {
+        // Convert from HAL values as part of construction.
+        this(convertRssiAsuToDBm(lte.base.signalStrength),
+                lte.base.rsrp != CellInfo.UNAVAILABLE ? -lte.base.rsrp : lte.base.rsrp,
+                lte.base.rsrq != CellInfo.UNAVAILABLE ? -lte.base.rsrq : lte.base.rsrq,
+                convertRssnrUnitFromTenDbToDB(lte.base.rssnr), lte.cqiTableIndex, lte.base.cqi,
+                lte.base.timingAdvance);
+    }
+
+    /** @hide */
     public CellSignalStrengthLte(CellSignalStrengthLte s) {
         copyFrom(s);
     }
@@ -159,6 +196,7 @@
         mRsrp = s.mRsrp;
         mRsrq = s.mRsrq;
         mRssnr = s.mRssnr;
+        mCqiTableIndex = s.mCqiTableIndex;
         mCqi = s.mCqi;
         mTimingAdvance = s.mTimingAdvance;
         mLevel = s.mLevel;
@@ -179,6 +217,7 @@
         mRsrp = CellInfo.UNAVAILABLE;
         mRsrq = CellInfo.UNAVAILABLE;
         mRssnr = CellInfo.UNAVAILABLE;
+        mCqiTableIndex = CellInfo.UNAVAILABLE;
         mCqi = CellInfo.UNAVAILABLE;
         mTimingAdvance = CellInfo.UNAVAILABLE;
         mLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
@@ -402,6 +441,17 @@
     }
 
     /**
+     * Get table index for channel quality indicator
+     *
+     * @return the CQI table index if available or
+     *         {@link android.telephony.CellInfo#UNAVAILABLE UNAVAILABLE} if unavailable.
+     */
+    /** @hide */
+    public int getCqiTableIndex() {
+        return mCqiTableIndex;
+    }
+
+    /**
      * Get channel quality indicator
      *
      * @return the CQI if available or
@@ -454,7 +504,8 @@
 
     @Override
     public int hashCode() {
-        return Objects.hash(mRssi, mRsrp, mRsrq, mRssnr, mCqi, mTimingAdvance, mLevel);
+        return Objects.hash(mRssi, mRsrp, mRsrq, mRssnr, mCqiTableIndex, mCqi, mTimingAdvance,
+                mLevel);
     }
 
     private static final CellSignalStrengthLte sInvalid = new CellSignalStrengthLte();
@@ -476,6 +527,7 @@
                 && mRsrp == s.mRsrp
                 && mRsrq == s.mRsrq
                 && mRssnr == s.mRssnr
+                && mCqiTableIndex == s.mCqiTableIndex
                 && mCqi == s.mCqi
                 && mTimingAdvance == s.mTimingAdvance
                 && mLevel == s.mLevel;
@@ -491,6 +543,7 @@
                 + " rsrp=" + mRsrp
                 + " rsrq=" + mRsrq
                 + " rssnr=" + mRssnr
+                + " cqiTableIndex=" + mCqiTableIndex
                 + " cqi=" + mCqi
                 + " ta=" + mTimingAdvance
                 + " level=" + mLevel
@@ -508,6 +561,7 @@
         dest.writeInt(mRsrp);
         dest.writeInt(mRsrq);
         dest.writeInt(mRssnr);
+        dest.writeInt(mCqiTableIndex);
         dest.writeInt(mCqi);
         dest.writeInt(mTimingAdvance);
         dest.writeInt(mLevel);
@@ -523,6 +577,7 @@
         mRsrp = in.readInt();
         mRsrq = in.readInt();
         mRssnr = in.readInt();
+        mCqiTableIndex = in.readInt();
         mCqi = in.readInt();
         mTimingAdvance = in.readInt();
         mLevel = in.readInt();
diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java
index 766019e..1518190 100644
--- a/telephony/java/android/telephony/CellSignalStrengthNr.java
+++ b/telephony/java/android/telephony/CellSignalStrengthNr.java
@@ -18,6 +18,7 @@
 
 import android.annotation.IntDef;
 import android.annotation.IntRange;
+import android.annotation.NonNull;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.PersistableBundle;
@@ -27,7 +28,10 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 import java.util.Objects;
+import java.util.stream.Collectors;
 
 /**
  * 5G NR signal strength related information.
@@ -109,6 +113,28 @@
     private int mCsiRsrp;
     private int mCsiRsrq;
     private int mCsiSinr;
+    /**
+     * CSI channel quality indicator (CQI) table index. There are multiple CQI tables.
+     * The definition of CQI in each table is different.
+     *
+     * Reference: 3GPP TS 138.214 section 5.2.2.1.
+     *
+     * Range [1, 3].
+     */
+    private int mCsiCqiTableIndex;
+    /**
+     * CSI channel quality indicators (CQI) for all subbands.
+     *
+     * If the CQI report is for the entire wideband, a single CQI index is provided.
+     * If the CQI report is for all subbands, one CQI index is provided for each subband,
+     * in ascending order of subband index.
+     * If CQI is not available, the CQI report is empty.
+     *
+     * Reference: 3GPP TS 138.214 section 5.2.2.1.
+     *
+     * Range [0, 15] for each CQI.
+     */
+    private List<Integer> mCsiCqiReport;;
     private int mSsRsrp;
     private int mSsRsrq;
     private int mSsSinr;
@@ -138,6 +164,32 @@
      * @param csiRsrp CSI reference signal received power.
      * @param csiRsrq CSI reference signal received quality.
      * @param csiSinr CSI signal-to-noise and interference ratio.
+     * @param csiCqiTableIndex CSI CSI channel quality indicator (CQI) table index.
+     * @param csiCqiReport CSI channel quality indicators (CQI) for all subbands.
+     * @param ssRsrp SS reference signal received power.
+     * @param ssRsrq SS reference signal received quality.
+     * @param ssSinr SS signal-to-noise and interference ratio.
+     * @hide
+     */
+    public CellSignalStrengthNr(int csiRsrp, int csiRsrq, int csiSinr, int csiCqiTableIndex,
+            List<Integer> csiCqiReport, int ssRsrp, int ssRsrq, int ssSinr) {
+        mCsiRsrp = inRangeOrUnavailable(csiRsrp, -140, -44);
+        mCsiRsrq = inRangeOrUnavailable(csiRsrq, -20, -3);
+        mCsiSinr = inRangeOrUnavailable(csiSinr, -23, 23);
+        mCsiCqiTableIndex = inRangeOrUnavailable(csiCqiTableIndex, 1, 3);
+        mCsiCqiReport =  csiCqiReport.stream()
+                .map(cqi -> new Integer(inRangeOrUnavailable(cqi.intValue(), 1, 3)))
+                .collect(Collectors.toList());
+        mSsRsrp = inRangeOrUnavailable(ssRsrp, -140, -44);
+        mSsRsrq = inRangeOrUnavailable(ssRsrq, -43, 20);
+        mSsSinr = inRangeOrUnavailable(ssSinr, -23, 40);
+        updateLevel(null, null);
+    }
+
+    /**
+     * @param csiRsrp CSI reference signal received power.
+     * @param csiRsrq CSI reference signal received quality.
+     * @param csiSinr CSI signal-to-noise and interference ratio.
      * @param ssRsrp SS reference signal received power.
      * @param ssRsrq SS reference signal received quality.
      * @param ssSinr SS signal-to-noise and interference ratio.
@@ -145,13 +197,8 @@
      */
     public CellSignalStrengthNr(
             int csiRsrp, int csiRsrq, int csiSinr, int ssRsrp, int ssRsrq, int ssSinr) {
-        mCsiRsrp = inRangeOrUnavailable(csiRsrp, -140, -44);
-        mCsiRsrq = inRangeOrUnavailable(csiRsrq, -20, -3);
-        mCsiSinr = inRangeOrUnavailable(csiSinr, -23, 23);
-        mSsRsrp = inRangeOrUnavailable(ssRsrp, -140, -44);
-        mSsRsrq = inRangeOrUnavailable(ssRsrq, -43, 20);
-        mSsSinr = inRangeOrUnavailable(ssSinr, -23, 40);
-        updateLevel(null, null);
+        this(csiRsrp, csiRsrq, csiSinr, CellInfo.UNAVAILABLE, Collections.emptyList(),
+                ssRsrp, ssRsrq, ssSinr);
     }
 
     /**
@@ -164,6 +211,15 @@
     }
 
     /**
+     * @hide
+     * @param ss signal strength from modem.
+     */
+    public CellSignalStrengthNr(android.hardware.radio.V1_6.NrSignalStrength ss) {
+        this(flip(ss.base.csiRsrp), flip(ss.base.csiRsrq), ss.base.csiSinr, ss.csiCqiTableIndex,
+                ss.csiCqiReport, flip(ss.base.ssRsrp), flip(ss.base.ssRsrq), ss.base.ssSinr);
+    }
+
+    /**
      * Flip sign cell strength value when taking in the value from hal
      * @param val cell strength value
      * @return flipped value
@@ -232,6 +288,36 @@
         return mCsiSinr;
     }
 
+    /**
+     * Return CSI channel quality indicator (CQI) table index. There are multiple CQI tables.
+     * The definition of CQI in each table is different.
+     *
+     * Reference: 3GPP TS 138.214 section 5.2.2.1.
+     *
+     * Range [1, 3].
+     */
+    /** @hide */
+    public int getCsiCqiTableIndex() {
+        return mCsiCqiTableIndex;
+    }
+    /**
+     * Return a list of CSI channel quality indicators (CQI) for all subbands.
+     *
+     * If the CQI report is for the entire wideband, a single CQI index is provided.
+     * If the CQI report is for all subbands, one CQI index is provided for each subband,
+     * in ascending order of subband index.
+     * If CQI is not available, the CQI report is empty.
+     *
+     * Reference: 3GPP TS 138.214 section 5.2.2.1.
+     *
+     * Range [0, 15] for each CQI.
+     */
+    /** @hide */
+    @NonNull
+    public List<Integer> getCsiCqiReport() {
+        return mCsiCqiReport;
+    }
+
     @Override
     public int describeContents() {
         return 0;
@@ -243,6 +329,8 @@
         dest.writeInt(mCsiRsrp);
         dest.writeInt(mCsiRsrq);
         dest.writeInt(mCsiSinr);
+        dest.writeInt(mCsiCqiTableIndex);
+        dest.writeList(mCsiCqiReport);
         dest.writeInt(mSsRsrp);
         dest.writeInt(mSsRsrq);
         dest.writeInt(mSsSinr);
@@ -253,6 +341,8 @@
         mCsiRsrp = in.readInt();
         mCsiRsrq = in.readInt();
         mCsiSinr = in.readInt();
+        mCsiCqiTableIndex = in.readInt();
+        mCsiCqiReport = in.readArrayList(Integer.class.getClassLoader());
         mSsRsrp = in.readInt();
         mSsRsrq = in.readInt();
         mSsSinr = in.readInt();
@@ -265,6 +355,8 @@
         mCsiRsrp = CellInfo.UNAVAILABLE;
         mCsiRsrq = CellInfo.UNAVAILABLE;
         mCsiSinr = CellInfo.UNAVAILABLE;
+        mCsiCqiTableIndex = CellInfo.UNAVAILABLE;
+        mCsiCqiReport = Collections.emptyList();
         mSsRsrp = CellInfo.UNAVAILABLE;
         mSsRsrq = CellInfo.UNAVAILABLE;
         mSsSinr = CellInfo.UNAVAILABLE;
@@ -408,6 +500,8 @@
         mCsiRsrp = s.mCsiRsrp;
         mCsiRsrq = s.mCsiRsrq;
         mCsiSinr = s.mCsiSinr;
+        mCsiCqiTableIndex = s.mCsiCqiTableIndex;
+        mCsiCqiReport = s.mCsiCqiReport;
         mSsRsrp = s.mSsRsrp;
         mSsRsrq = s.mSsRsrq;
         mSsSinr = s.mSsSinr;
@@ -423,7 +517,8 @@
 
     @Override
     public int hashCode() {
-        return Objects.hash(mCsiRsrp, mCsiRsrq, mCsiSinr, mSsRsrp, mSsRsrq, mSsSinr, mLevel);
+        return Objects.hash(mCsiRsrp, mCsiRsrq, mCsiSinr, mCsiCqiTableIndex,
+                mCsiCqiReport, mSsRsrp, mSsRsrq, mSsSinr, mLevel);
     }
 
     private static final CellSignalStrengthNr sInvalid = new CellSignalStrengthNr();
@@ -439,6 +534,8 @@
         if (obj instanceof CellSignalStrengthNr) {
             CellSignalStrengthNr o = (CellSignalStrengthNr) obj;
             return mCsiRsrp == o.mCsiRsrp && mCsiRsrq == o.mCsiRsrq && mCsiSinr == o.mCsiSinr
+                    && mCsiCqiTableIndex == o.mCsiCqiTableIndex
+                    && mCsiCqiReport.equals(o.mCsiCqiReport)
                     && mSsRsrp == o.mSsRsrp && mSsRsrq == o.mSsRsrq && mSsSinr == o.mSsSinr
                     && mLevel == o.mLevel;
         }
@@ -451,7 +548,8 @@
                 .append(TAG + ":{")
                 .append(" csiRsrp = " + mCsiRsrp)
                 .append(" csiRsrq = " + mCsiRsrq)
-                .append(" csiSinr = " + mCsiSinr)
+                .append(" csiCqiTableIndex = " + mCsiCqiTableIndex)
+                .append(" csiCqiReport = " + mCsiCqiReport)
                 .append(" ssRsrp = " + mSsRsrp)
                 .append(" ssRsrq = " + mSsRsrq)
                 .append(" ssSinr = " + mSsSinr)
diff --git a/telephony/java/android/telephony/DataFailCause.java b/telephony/java/android/telephony/DataFailCause.java
index 8b7a243..d502da9 100644
--- a/telephony/java/android/telephony/DataFailCause.java
+++ b/telephony/java/android/telephony/DataFailCause.java
@@ -916,6 +916,84 @@
     /** System preference change back to SRAT during handoff */
     public static final int HANDOFF_PREFERENCE_CHANGED = 0x8CB;
 
+    //IKE error notifications message as specified in 3GPP TS 24.302 (Section 8.1.2.2).
+
+    /** The PDN connection corresponding to the requested APN has been rejected. */
+    public static final int IWLAN_PDN_CONNECTION_REJECTION = 0x2000;
+    /**
+     * The PDN connection has been rejected. No additional PDN connections can be established
+     * for the UE due to the network policies or capabilities.
+     */
+    public static final int IWLAN_MAX_CONNECTION_REACHED = 0x2001;
+    /**
+     * The PDN connection has been rejected due to a semantic error in TFT operation.
+     */
+    public static final int IWLAN_SEMANTIC_ERROR_IN_THE_TFT_OPERATION = 0x2031;
+    /**
+     * The PDN connection has been rejected due to a syntactic error in TFT operation.
+     */
+    public static final int IWLAN_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION = 0x2032;
+    /**
+     * The PDN connection has been rejected due to sematic errors in the packet filter.
+     */
+    public static final int IWLAN_SEMANTIC_ERRORS_IN_PACKET_FILTERS = 0x2034;
+    /**
+     * The PDN connection has been rejected due to syntactic errors in the packet filter.
+     */
+    public static final int IWLAN_SYNTACTICAL_ERRORS_IN_PACKET_FILTERS = 0x2035;
+    /**
+     * No non-3GPP subscription is associated with the IMSI.
+     * The UE is not allowed to use non-3GPP access to EPC.
+     */
+    public static final int IWLAN_NON_3GPP_ACCESS_TO_EPC_NOT_ALLOWED = 0x2328;
+    /** The user identified by the IMSI is unknown. */
+    public static final int IWLAN_USER_UNKNOWN = 0x2329;
+    /**
+     * The requested APN is not included in the user's profile,
+     * and therefore is not authorized for that user.
+     */
+    public static final int IWLAN_NO_APN_SUBSCRIPTION = 0x232A;
+    /** The user is barred from using the non-3GPP access or the subscribed APN. */
+    public static final int IWLAN_AUTHORIZATION_REJECTED = 0x232B;
+    /** The Mobile Equipment used is not acceptable to the network */
+    public static final int IWLAN_ILLEGAL_ME = 0x232E;
+    /**
+     * The network has determined that the requested procedure cannot be completed successfully
+     * due to network failure.
+     */
+    public static final int IWLAN_NETWORK_FAILURE = 0x2904;
+    /** The access type is restricted to the user. */
+    public static final int IWLAN_RAT_TYPE_NOT_ALLOWED = 0x2AF9;
+    /** The network does not accept emergency PDN bringup request using an IMEI */
+    public static final int IWLAN_IMEI_NOT_ACCEPTED = 0x2AFD;
+    /**
+     * The ePDG performs PLMN filtering (based on roaming agreements) and rejects
+     * the request from the UE.
+     * The UE requests service in a PLMN where the UE is not allowed to operate.
+     */
+    public static final int IWLAN_PLMN_NOT_ALLOWED = 0x2B03;
+    /** The ePDG does not support un-authenticated IMSI based emergency PDN bringup **/
+    public static final int IWLAN_UNAUTHENTICATED_EMERGENCY_NOT_SUPPORTED = 0x2B2F;
+
+    // Device is unable to establish an IPSec tunnel with the ePDG for any reason
+    // e.g authentication fail or certificate validation or DNS Resolution and timeout failure.
+
+    /** IKE configuration error resulting in failure  */
+    public static final int IWLAN_IKEV2_CONFIG_FAILURE = 0x4000;
+    /**
+     * Sent in the response to an IKE_AUTH message when, for some reason,
+     * the authentication failed.
+     */
+    public static final int IWLAN_IKEV2_AUTH_FAILURE = 0x4001;
+    /** IKE message timeout, tunnel setup failed due to no response from EPDG  */
+    public static final int IWLAN_IKEV2_MSG_TIMEOUT = 0x4002;
+    /** IKE Certification validation failure  */
+    public static final int IWLAN_IKEV2_CERT_INVALID = 0x4003;
+    /** Unable to resolve FQDN for the ePDG to an IP address */
+    public static final int IWLAN_DNS_RESOLUTION_NAME_FAILURE = 0x4004;
+    /** No response received from the DNS Server due to a timeout*/
+    public static final int IWLAN_DNS_RESOLUTION_TIMEOUT = 0x4005;
+
     // OEM sepecific error codes. To be used by OEMs when they don't
     // want to reveal error code which would be replaced by ERROR_UNSPECIFIED
     public static final int OEM_DCFAILCAUSE_1 = 0x1001;
@@ -1341,6 +1419,34 @@
         sFailCauseMap.put(VSNCP_RECONNECT_NOT_ALLOWED, "VSNCP_RECONNECT_NOT_ALLOWED");
         sFailCauseMap.put(IPV6_PREFIX_UNAVAILABLE, "IPV6_PREFIX_UNAVAILABLE");
         sFailCauseMap.put(HANDOFF_PREFERENCE_CHANGED, "HANDOFF_PREFERENCE_CHANGED");
+        sFailCauseMap.put(IWLAN_PDN_CONNECTION_REJECTION, "IWLAN_PDN_CONNECTION_REJECTION");
+        sFailCauseMap.put(IWLAN_MAX_CONNECTION_REACHED, "IWLAN_MAX_CONNECTION_REACHED");
+        sFailCauseMap.put(IWLAN_SEMANTIC_ERROR_IN_THE_TFT_OPERATION,
+                "IWLAN_SEMANTIC_ERROR_IN_THE_TFT_OPERATION");
+        sFailCauseMap.put(IWLAN_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION,
+                "IWLAN_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION");
+        sFailCauseMap.put(IWLAN_SEMANTIC_ERRORS_IN_PACKET_FILTERS,
+                "IWLAN_SEMANTIC_ERRORS_IN_PACKET_FILTERS");
+        sFailCauseMap.put(IWLAN_SYNTACTICAL_ERRORS_IN_PACKET_FILTERS,
+                "IWLAN_SYNTACTICAL_ERRORS_IN_PACKET_FILTERS");
+        sFailCauseMap.put(IWLAN_NON_3GPP_ACCESS_TO_EPC_NOT_ALLOWED,
+                "IWLAN_NON_3GPP_ACCESS_TO_EPC_NOT_ALLOWED");
+        sFailCauseMap.put(IWLAN_USER_UNKNOWN, "IWLAN_USER_UNKNOWN");
+        sFailCauseMap.put(IWLAN_NO_APN_SUBSCRIPTION, "IWLAN_NO_APN_SUBSCRIPTION");
+        sFailCauseMap.put(IWLAN_AUTHORIZATION_REJECTED, "IWLAN_AUTHORIZATION_REJECTED");
+        sFailCauseMap.put(IWLAN_ILLEGAL_ME, "IWLAN_ILLEGAL_ME");
+        sFailCauseMap.put(IWLAN_NETWORK_FAILURE, "IWLAN_NETWORK_FAILURE");
+        sFailCauseMap.put(IWLAN_RAT_TYPE_NOT_ALLOWED, "IWLAN_RAT_TYPE_NOT_ALLOWED");
+        sFailCauseMap.put(IWLAN_IMEI_NOT_ACCEPTED, "IWLAN_IMEI_NOT_ACCEPTED");
+        sFailCauseMap.put(IWLAN_PLMN_NOT_ALLOWED, "IWLAN_PLMN_NOT_ALLOWED");
+        sFailCauseMap.put(IWLAN_UNAUTHENTICATED_EMERGENCY_NOT_SUPPORTED,
+                "IWLAN_UNAUTHENTICATED_EMERGENCY_NOT_SUPPORTED");
+        sFailCauseMap.put(IWLAN_IKEV2_CONFIG_FAILURE, "IWLAN_IKEV2_CONFIG_FAILURE");
+        sFailCauseMap.put(IWLAN_IKEV2_AUTH_FAILURE, "IWLAN_IKEV2_AUTH_FAILURE");
+        sFailCauseMap.put(IWLAN_IKEV2_MSG_TIMEOUT, "IWLAN_IKEV2_MSG_TIMEOUT");
+        sFailCauseMap.put(IWLAN_IKEV2_CERT_INVALID, "IWLAN_IKEV2_CERT_INVALID");
+        sFailCauseMap.put(IWLAN_DNS_RESOLUTION_NAME_FAILURE, "IWLAN_DNS_RESOLUTION_NAME_FAILURE");
+        sFailCauseMap.put(IWLAN_DNS_RESOLUTION_TIMEOUT, "IWLAN_DNS_RESOLUTION_TIMEOUT");
         sFailCauseMap.put(OEM_DCFAILCAUSE_1, "OEM_DCFAILCAUSE_1");
         sFailCauseMap.put(OEM_DCFAILCAUSE_2, "OEM_DCFAILCAUSE_2");
         sFailCauseMap.put(OEM_DCFAILCAUSE_3, "OEM_DCFAILCAUSE_3");
diff --git a/telephony/java/android/telephony/DataThrottlingRequest.aidl b/telephony/java/android/telephony/DataThrottlingRequest.aidl
new file mode 100644
index 0000000..e1a3b66
--- /dev/null
+++ b/telephony/java/android/telephony/DataThrottlingRequest.aidl
@@ -0,0 +1,19 @@
+/*
+* Copyright (C) 2020 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package android.telephony;
+
+parcelable DataThrottlingRequest;
\ No newline at end of file
diff --git a/telephony/java/android/telephony/DataThrottlingRequest.java b/telephony/java/android/telephony/DataThrottlingRequest.java
new file mode 100644
index 0000000..f50bb58
--- /dev/null
+++ b/telephony/java/android/telephony/DataThrottlingRequest.java
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+
+/**
+ * Class stores information related to the type of data throttling request. Must be populated as
+ * field in {@link ThermalMitigationRequest} for sending of thermal mitigation request at {@link
+ * TelephonyManager#sendThermalMitigationRequest(ThermalMitigationResult)}.
+ * @hide
+ */
+@SystemApi
+public final class DataThrottlingRequest implements Parcelable {
+    /**
+     * Clear all existing data throttling, enable data, and attempt to enable radio for thermal
+     * mitigation all within the requested completion window. Note that attempting to enable radio
+     * will not guarantee that radio will actually be enabled.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int DATA_THROTTLING_ACTION_NO_DATA_THROTTLING = 0;
+
+    /**
+     * Enact secondary carrier data throttling within specified completion window. This also
+     * attempts to enables radio if currently disabled for thermal mitigation, enables data, and
+     * removes any existing data throttling on primary carrier. Note that attempting to enable radio
+     * will not guarantee that radio will actually be enabled.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int DATA_THROTTLING_ACTION_THROTTLE_SECONDARY_CARRIER = 1;
+
+    /**
+     * Enact primary carrier data throttling within specified completion window. This also attempts
+     * to enable radio if currently disabled for thermal mitigation and disables data on secondary
+     * carrier if currently enabled. Note that attempting to enable radio will not guarantee that
+     * radio will actually be enabled.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int DATA_THROTTLING_ACTION_THROTTLE_PRIMARY_CARRIER = 2;
+
+    /**
+     * Immediately hold on to the current level of data throttling indicating that the current level
+     * of data throttling has alleviated the thermal concerns which caused the original data
+     * throttling request. A thermal module should remain actively monitoring the temperature levels
+     * and request an appropriate thermal mitigation action. {@link
+     * #THERMAL_MITIGATION_RESULT_INVALID_PARAMETERS} will be returned if completion window is not
+     * 0.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int DATA_THROTTLING_ACTION_HOLD = 3;
+
+    /**
+     * Type of data throttling action to carry out.
+     * @hide
+     */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = { "DATA_THROTTLING_ACTION_" }, value = {
+        DATA_THROTTLING_ACTION_NO_DATA_THROTTLING,
+        DATA_THROTTLING_ACTION_THROTTLE_SECONDARY_CARRIER,
+        DATA_THROTTLING_ACTION_THROTTLE_PRIMARY_CARRIER,
+        DATA_THROTTLING_ACTION_HOLD})
+    public @interface DataThrottlingAction {}
+
+    /**
+     * Represents the data throttling action that will be requested. See {@link
+     * DATA_THROTTLING_ACTION_NO_DATA_THROTTLING}, {@link
+     * #DATA_THROTTLING_ACTION_THROTTLE_SECONDARY_CARRIER}, {@link
+     * #DATA_THROTTLING_ACTION_THROTTLE_PRIMARY_CARRIER}, and {@link
+     * #DATA_THROTTLING_ACTION_HOLD} for more details.
+     **/
+    private @DataThrottlingAction int mDataThrottlingAction;
+    /**
+     * Represents the time over which modem should gradually execute the data thorttling request.
+     */
+    private long mCompletionDurationMillis;
+
+    private DataThrottlingRequest(@NonNull int dataThrottlingAction,
+            long completionDurationMillis) {
+        mDataThrottlingAction = dataThrottlingAction;
+        mCompletionDurationMillis = completionDurationMillis;
+    }
+
+    private DataThrottlingRequest(Parcel in) {
+        mDataThrottlingAction = in.readInt();
+        mCompletionDurationMillis = in.readLong();
+    }
+
+    /**
+     * Implement the Parcelable interface
+     */
+    @Override
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        dest.writeInt(mDataThrottlingAction);
+        dest.writeLong(mCompletionDurationMillis);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return "[DataThrottlingRequest "
+            + ", DataThrottlingAction=" + mDataThrottlingAction
+            + ", completionDurationMillis=" + mCompletionDurationMillis
+            + "]";
+    }
+
+    /**
+    * @return the dataThrottlingAction.
+    */
+    public @DataThrottlingAction int getDataThrottlingAction() {
+        return mDataThrottlingAction;
+    }
+
+    /**
+     * @return the completionDurationMillis which represents the time over which modem should
+     * gradually execute the data thorttling request.
+     */
+    public long getCompletionDurationMillis() {
+        return mCompletionDurationMillis;
+    }
+
+    public static final @NonNull Parcelable.Creator<DataThrottlingRequest> CREATOR =
+            new Parcelable.Creator<DataThrottlingRequest>() {
+
+        @Override
+        public DataThrottlingRequest createFromParcel(Parcel in) {
+            return new DataThrottlingRequest(in);
+        }
+
+        @Override
+        public DataThrottlingRequest[] newArray(int size) {
+            return new DataThrottlingRequest[size];
+        }
+    };
+
+    /**
+     * Provides a convenient way to set the fields of a {@link DataThrottlingRequest} when creating
+     * a new instance.
+     *
+     * <p>The example below shows how you might create a new {@code DataThrottlingRequest}:
+     *
+     * <pre><code>
+     *
+     * DataThrottlingRequest dp = new DataThrottlingRequest.Builder()
+     *     .setDataThrottlingAction(
+     *          DataThrottlingRequest.DATA_THROTTLING_ACTION_THROTTLE_SECONDARY_CARRIER)
+     *     .setCompletionDurationMillis(10000L)
+     *     .build();
+     * </code></pre>
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final class Builder {
+        private @DataThrottlingAction int mDataThrottlingAction;
+        private long mCompletionDurationMillis;
+
+        /**
+         * Default constructor for Builder.
+         */
+        public Builder() {}
+
+        /**
+         * Set the data throttling action.
+         *
+         * @param dataThrottlingAction data throttling action.
+         *
+         * @return The same instance of the builder.
+         */
+        public @NonNull Builder setDataThrottlingAction(
+                @DataThrottlingAction int dataThrottlingAction) {
+            mDataThrottlingAction = dataThrottlingAction;
+            return this;
+        }
+
+        /**
+         * Set the completion duration.
+         *
+         * @param completionDurationMillis completion duration in millis which represents the time
+         *      over which modem should gradually execute the data thorttling request. This can
+         *      never be a negative number and must be 0 for {@link #DATA_THROTTLING_ACTION_HOLD}.
+         *      Otherwise, an IllegalArgumentException will be thrown.
+         *
+         * @return The same instance of the builder.
+         */
+        public @NonNull Builder setCompletionDurationMillis(long completionDurationMillis) {
+            mCompletionDurationMillis = completionDurationMillis;
+            return this;
+        }
+
+        /**
+         * Build the DataThrottlingRequest.
+         *
+         * @return the DataThrottlingRequest object.
+         */
+        public @NonNull DataThrottlingRequest build() {
+            if (mCompletionDurationMillis < 0) {
+                throw new IllegalArgumentException("completionDurationMillis cannot be a negative "
+                        + "number");
+            }
+
+            if (mDataThrottlingAction == DataThrottlingRequest.DATA_THROTTLING_ACTION_HOLD
+                    && mCompletionDurationMillis != 0) {
+                throw new IllegalArgumentException("completionDurationMillis must be 0 for "
+                    + "DataThrottlingRequest.DATA_THROTTLING_ACTION_HOLD");
+            }
+
+            return new DataThrottlingRequest(mDataThrottlingAction, mCompletionDurationMillis);
+        }
+    }
+
+}
diff --git a/telephony/java/android/telephony/IBootstrapAuthenticationCallback.aidl b/telephony/java/android/telephony/IBootstrapAuthenticationCallback.aidl
new file mode 100644
index 0000000..d39ad0e
--- /dev/null
+++ b/telephony/java/android/telephony/IBootstrapAuthenticationCallback.aidl
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony;
+
+/**
+ * Callback to handle the response of bootstrapAuthenticationRequest
+ * @hide
+ */
+oneway interface IBootstrapAuthenticationCallback
+{
+    void onKeysAvailable(int token, in byte[] gbaKey, String btId);
+    void onAuthenticationFailure(int token, int reason);
+}
diff --git a/telephony/java/android/telephony/OWNERS b/telephony/java/android/telephony/OWNERS
new file mode 100644
index 0000000..6aa399d
--- /dev/null
+++ b/telephony/java/android/telephony/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+amitmahajan@google.com
diff --git a/telephony/java/android/telephony/PinResult.java b/telephony/java/android/telephony/PinResult.java
index c2a4f33..b8c1ffe 100644
--- a/telephony/java/android/telephony/PinResult.java
+++ b/telephony/java/android/telephony/PinResult.java
@@ -19,6 +19,7 @@
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -27,10 +28,16 @@
 import java.util.Objects;
 
 /**
- * Holds the result from a pin attempt.
+ * Holds the result from a PIN attempt.
+ *
+ * @see TelephonyManager#supplyIccLockPin
+ * @see TelephonyManager#supplyIccLockPuk
+ * @see TelephonyManager#setIccLockEnabled
+ * @see TelephonyManager#changeIccLockPin
  *
  * @hide
  */
+@SystemApi
 public final class PinResult implements Parcelable {
     /** @hide */
     @IntDef({
@@ -64,24 +71,24 @@
     private static final PinResult sFailedResult =
             new PinResult(PinResult.PIN_RESULT_TYPE_FAILURE, -1);
 
-    private final @PinResultType int mType;
+    private final @PinResultType int mResult;
 
     private final int mAttemptsRemaining;
 
     /**
-     * Returns either success, incorrect or failure.
+     * Returns the result of the PIN attempt.
      *
-     * @see #PIN_RESULT_TYPE_SUCCESS
-     * @see #PIN_RESULT_TYPE_INCORRECT
-     * @see #PIN_RESULT_TYPE_FAILURE
-     * @return The result type of the pin attempt.
+     * @return The result of the PIN attempt.
      */
-    public @PinResultType int getType() {
-        return mType;
+    public @PinResultType int getResult() {
+        return mResult;
     }
 
     /**
-     * The number of pin attempts remaining.
+     * Returns the number of PIN attempts remaining.
+     * This will be set when {@link #getResult} is {@link #PIN_RESULT_TYPE_INCORRECT}.
+     * Indicates the number of attempts at entering the PIN before the SIM will be locked and
+     * require a PUK unlock to be performed.
      *
      * @return Number of attempts remaining.
      */
@@ -89,22 +96,32 @@
         return mAttemptsRemaining;
     }
 
+    /**
+     * Used to indicate a failed PIN attempt result.
+     *
+     * @return default PinResult for failure.
+     *
+     * @hide
+     */
     @NonNull
     public static PinResult getDefaultFailedResult() {
         return sFailedResult;
     }
 
     /**
-     * PinResult constructor
+     * PinResult constructor.
      *
-     * @param type The type of pin result.
+     * @param result The pin result value.
      * @see #PIN_RESULT_TYPE_SUCCESS
      * @see #PIN_RESULT_TYPE_INCORRECT
      * @see #PIN_RESULT_TYPE_FAILURE
+     * @see #PIN_RESULT_TYPE_ABORTED
      * @param attemptsRemaining Number of pin attempts remaining.
+     *
+     * @hide
      */
-    public PinResult(@PinResultType int type, int attemptsRemaining) {
-        mType = type;
+    public PinResult(@PinResultType int result, int attemptsRemaining) {
+        mResult = result;
         mAttemptsRemaining = attemptsRemaining;
     }
 
@@ -114,7 +131,7 @@
      * @hide
      */
     private PinResult(Parcel in) {
-        mType = in.readInt();
+        mResult = in.readInt();
         mAttemptsRemaining = in.readInt();
     }
 
@@ -124,11 +141,11 @@
     @NonNull
     @Override
     public String toString() {
-        return "type: " + getType() + ", attempts remaining: " + getAttemptsRemaining();
+        return "result: " + getResult() + ", attempts remaining: " + getAttemptsRemaining();
     }
 
     /**
-     * Required to be Parcelable
+     * Describe the contents of this object.
      */
     @Override
     public int describeContents() {
@@ -136,15 +153,17 @@
     }
 
     /**
-     * Required to be Parcelable
+     * Write this object to a Parcel.
      */
     @Override
     public void writeToParcel(@NonNull Parcel out, int flags) {
-        out.writeInt(mType);
+        out.writeInt(mResult);
         out.writeInt(mAttemptsRemaining);
     }
 
-    /** Required to be Parcelable */
+    /**
+     * Parcel creator class.
+     */
     public static final @NonNull Parcelable.Creator<PinResult> CREATOR = new Creator<PinResult>() {
         public PinResult createFromParcel(Parcel in) {
             return new PinResult(in);
@@ -156,7 +175,7 @@
 
     @Override
     public int hashCode() {
-        return Objects.hash(mAttemptsRemaining, mType);
+        return Objects.hash(mAttemptsRemaining, mResult);
     }
 
     @Override
@@ -171,7 +190,7 @@
             return false;
         }
         PinResult other = (PinResult) obj;
-        return (mType == other.mType
+        return (mResult == other.mResult
                 && mAttemptsRemaining == other.mAttemptsRemaining);
     }
 }
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index 7bd0bc0..b317c55 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -187,6 +187,21 @@
                 new CellSignalStrengthNr(signalStrength.nr));
     }
 
+    /**
+     * Constructor for Radio HAL V1.6.
+     *
+     * @param signalStrength signal strength reported from modem.
+     * @hide
+     */
+    public SignalStrength(android.hardware.radio.V1_6.SignalStrength signalStrength) {
+        this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
+                new CellSignalStrengthGsm(signalStrength.gsm),
+                new CellSignalStrengthWcdma(signalStrength.wcdma),
+                new CellSignalStrengthTdscdma(signalStrength.tdscdma),
+                new CellSignalStrengthLte(signalStrength.lte),
+                new CellSignalStrengthNr(signalStrength.nr));
+    }
+
     private CellSignalStrength getPrimary() {
         // This behavior is intended to replicate the legacy behavior of getLevel() by prioritizing
         // newer faster RATs for default/for display purposes.
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 92dc2ff..8368e3a 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -76,13 +76,16 @@
 import android.telephony.Annotation.NetworkType;
 import android.telephony.Annotation.RadioPowerState;
 import android.telephony.Annotation.SimActivationState;
+import android.telephony.Annotation.ThermalMitigationResult;
 import android.telephony.Annotation.UiccAppType;
+import android.telephony.Annotation.UiccAppTypeExt;
 import android.telephony.CallForwardingInfo.CallForwardingReason;
 import android.telephony.VisualVoicemailService.VisualVoicemailTask;
 import android.telephony.data.ApnSetting;
 import android.telephony.data.ApnSetting.MvnoType;
 import android.telephony.emergency.EmergencyNumber;
 import android.telephony.emergency.EmergencyNumber.EmergencyServiceCategories;
+import android.telephony.gba.UaSecurityProtocolIdentifier;
 import android.telephony.ims.ImsMmTelManager;
 import android.telephony.ims.aidl.IImsConfig;
 import android.telephony.ims.aidl.IImsRegistration;
@@ -7162,6 +7165,8 @@
         }
     }
 
+    /** UICC application type is unknown or not specified */
+    public static final int APPTYPE_UNKNOWN = PhoneConstants.APPTYPE_UNKNOWN;
     /** UICC application type is SIM */
     public static final int APPTYPE_SIM = PhoneConstants.APPTYPE_SIM;
     /** UICC application type is USIM */
@@ -8825,9 +8830,13 @@
         return false;
     }
 
-    /** @hide */
+    /**
+     * @deprecated use {@link #supplyIccLockPin(String)} instead.
+     * @hide
+     */
     @SystemApi
     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+    @Deprecated
     public int[] supplyPinReportResult(String pin) {
         try {
             ITelephony telephony = getITelephony();
@@ -8839,65 +8848,91 @@
         return new int[0];
     }
 
-    /** @hide */
+    /**
+     * @deprecated use {@link #supplyIccLockPuk(String, String)} instead.
+     * @hide
+     */
     @SystemApi
     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+    @Deprecated
     public int[] supplyPukReportResult(String puk, String pin) {
         try {
             ITelephony telephony = getITelephony();
             if (telephony != null)
                 return telephony.supplyPukReportResultForSubscriber(getSubId(), puk, pin);
         } catch (RemoteException e) {
-            Log.e(TAG, "Error calling ITelephony#]", e);
+            Log.e(TAG, "Error calling ITelephony#supplyPukReportResultForSubscriber", e);
         }
         return new int[0];
     }
 
     /**
-     * Used when the user attempts to enter their pin.
+     * Supplies a PIN to unlock the ICC and returns the corresponding {@link PinResult}.
+     * Used when the user enters their ICC unlock PIN to attempt an unlock.
      *
-     * @param pin The user entered pin.
-     * @return The result of the pin.
+     * @param pin The user entered PIN.
+     * @return The result of the PIN.
+     * @throws SecurityException if the caller doesn't have the permission.
+     * @throws IllegalStateException if the Telephony process is not currently available.
+     *
+     * <p>Requires Permission:
+     * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+     * app has carrier privileges (see {@link #hasCarrierPrivileges}).
      *
      * @hide
      */
-    @Nullable
+    @SystemApi
+    @NonNull
     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
-    public PinResult supplyPinReportPinResult(@NonNull String pin) {
+    public PinResult supplyIccLockPin(@NonNull String pin) {
         try {
             ITelephony telephony = getITelephony();
             if (telephony != null) {
                 int[] result = telephony.supplyPinReportResultForSubscriber(getSubId(), pin);
                 return new PinResult(result[0], result[1]);
+            } else {
+                throw new IllegalStateException("telephony service is null.");
             }
         } catch (RemoteException e) {
-            Log.e(TAG, "Error calling ITelephony#supplyPinReportResultForSubscriber", e);
+            Log.e(TAG, "Error calling ITelephony#supplyIccLockPin", e);
+            e.rethrowFromSystemServer();
         }
-        return null;
+        return PinResult.getDefaultFailedResult();
     }
 
     /**
-     * Used when the user attempts to enter the puk or their pin.
+     * Supplies a PUK and PIN to unlock the ICC and returns the corresponding {@link PinResult}.
+     * Used when the user enters their ICC unlock PUK and PIN to attempt an unlock.
      *
-     * @param puk The product unblocking key.
-     * @param pin The user entered pin.
-     * @return The result of the pin.
+     * @param puk The product unlocking key.
+     * @param pin The user entered PIN.
+     * @return The result of the PUK and PIN.
+     * @throws SecurityException if the caller doesn't have the permission.
+     * @throws IllegalStateException if the Telephony process is not currently available.
+     *
+     * <p>Requires Permission:
+     * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+     * app has carrier privileges (see {@link #hasCarrierPrivileges}).
      *
      * @hide
      */
-    @Nullable
+    @SystemApi
+    @NonNull
     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
-    public PinResult supplyPukReportPinResult(@NonNull String puk, @NonNull String pin) {
+    public PinResult supplyIccLockPuk(@NonNull String puk, @NonNull String pin) {
         try {
             ITelephony telephony = getITelephony();
             if (telephony != null) {
                 int[] result = telephony.supplyPukReportResultForSubscriber(getSubId(), puk, pin);
                 return new PinResult(result[0], result[1]);
+            } else {
+                throw new IllegalStateException("telephony service is null.");
             }
         } catch (RemoteException e) {
-            Log.e(TAG, "Error calling ITelephony#]", e);
+            Log.e(TAG, "Error calling ITelephony#supplyIccLockPuk", e);
+            e.rethrowFromSystemServer();
         }
-        return null;
+        return PinResult.getDefaultFailedResult();
     }
 
     /**
@@ -9406,7 +9441,7 @@
     }
 
     /** @hide */
-    @IntDef(flag = true, prefix = { "CDMA_SUBSCRIPTION_" }, value = {
+    @IntDef(prefix = { "CDMA_SUBSCRIPTION_" }, value = {
             CDMA_SUBSCRIPTION_UNKNOWN,
             CDMA_SUBSCRIPTION_RUIM_SIM,
             CDMA_SUBSCRIPTION_NV
@@ -9950,6 +9985,16 @@
      */
     public static final int CARD_POWER_UP_PASS_THROUGH = 2;
 
+    /** @hide */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = {"CARD_POWER"},
+            value = {
+                    CARD_POWER_DOWN,
+                    CARD_POWER_UP,
+                    CARD_POWER_UP_PASS_THROUGH,
+            })
+    public @interface SimPowerState {}
+
     /**
      * Set SIM card power state.
      *
@@ -9960,12 +10005,17 @@
      * Callers should monitor for {@link TelephonyIntents#ACTION_SIM_STATE_CHANGED}
      * broadcasts to determine success or failure and timeout if needed.
      *
+     * @deprecated prefer {@link setSimPowerState(int, Executor, Consumer<Integer>)}.
+     * There is no guarantee that SIM power changes will trigger ACTION_SIM_STATE_CHANGED on new
+     * devices.
+     *
      * <p>Requires Permission:
      *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
      *
      * {@hide}
      **/
     @SystemApi
+    @Deprecated
     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
     public void setSimPowerState(int state) {
         setSimPowerStateForSlot(getSlotIndex(), state);
@@ -9982,12 +10032,16 @@
      * Callers should monitor for {@link TelephonyIntents#ACTION_SIM_STATE_CHANGED}
      * broadcasts to determine success or failure and timeout if needed.
      *
+     * @deprecated prefer {@link setSimPowerStateForSlot(int, int, Executor, Consumer<Integer>)}.
+     * changes will trigger ACTION_SIM_STATE_CHANGED on new devices.
+     *
      * <p>Requires Permission:
      *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
      *
      * {@hide}
      **/
     @SystemApi
+    @Deprecated
     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
     public void setSimPowerStateForSlot(int slotIndex, int state) {
         try {
@@ -10003,6 +10057,85 @@
     }
 
     /**
+     * Set SIM card power state.
+     *
+     * @param state  State of SIM (power down, power up, pass through)
+     * @see #CARD_POWER_DOWN
+     * @see #CARD_POWER_UP
+     * @see #CARD_POWER_UP_PASS_THROUGH
+     * @param executor The executor of where the callback will execute.
+     * @param callback Callback will be triggered once it succeeds or failed.
+     * @see #SET_SIM_POWER_STATE_SUCCESS
+     * @see #SET_SIM_POWER_STATE_ALREADY_IN_STATE
+     * @see #SET_SIM_POWER_STATE_MODEM_ERROR
+     * @see #SET_SIM_POWER_STATE_SIM_ERROR
+     * @see #SET_SIM_POWER_STATE_NOT_SUPPORTED
+     * @throws IllegalArgumentException if requested SIM state is invalid
+     *
+     * <p>Requires Permission:
+     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+     *
+     * {@hide}
+     **/
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+    public void setSimPowerState(@SimPowerState int state, @NonNull Executor executor,
+            @NonNull @SetSimPowerStateResult Consumer<Integer> callback) {
+        setSimPowerStateForSlot(getSlotIndex(), state, executor, callback);
+    }
+
+    /**
+     * Set SIM card power state.
+     *
+     * @param slotIndex SIM slot id
+     * @param state  State of SIM (power down, power up, pass through)
+     * @see #CARD_POWER_DOWN
+     * @see #CARD_POWER_UP
+     * @see #CARD_POWER_UP_PASS_THROUGH
+     * @param executor The executor of where the callback will execute.
+     * @param callback Callback will be triggered once it succeeds or failed.
+     * @see #SET_SIM_POWER_STATE_SUCCESS
+     * @see #SET_SIM_POWER_STATE_ALREADY_IN_STATE
+     * @see #SET_SIM_POWER_STATE_MODEM_ERROR
+     * @see #SET_SIM_POWER_STATE_SIM_ERROR
+     * @see #SET_SIM_POWER_STATE_NOT_SUPPORTED
+     * @throws IllegalArgumentException if requested SIM state is invalid
+     *
+     * <p>Requires Permission:
+     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+     *
+     * {@hide}
+     **/
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+    public void setSimPowerStateForSlot(int slotIndex, @SimPowerState int state,
+            @NonNull Executor executor,
+            @NonNull @SetSimPowerStateResult Consumer<Integer> callback) {
+        if (state != CARD_POWER_DOWN && state != CARD_POWER_UP
+                && state != CARD_POWER_UP_PASS_THROUGH) {
+            throw new IllegalArgumentException("requested SIM state is invalid");
+        }
+        try {
+            ITelephony telephony = getITelephony();
+            IIntegerConsumer internalCallback = new IIntegerConsumer.Stub() {
+                @Override
+                public void accept(int result) {
+                    executor.execute(() ->
+                            Binder.withCleanCallingIdentity(() -> callback.accept(result)));
+                }
+            };
+            if (telephony != null) {
+                telephony.setSimPowerStateForSlotWithCallback(slotIndex, state, internalCallback);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#setSimPowerStateForSlot", e);
+        } catch (SecurityException e) {
+            Log.e(TAG, "Permission error calling ITelephony#setSimPowerStateForSlot",
+                    e);
+        }
+    }
+
+    /**
      * Set baseband version for the default phone.
      *
      * @param version baseband version
@@ -10998,6 +11131,55 @@
     public @interface SetCarrierRestrictionResult {}
 
     /**
+     * The SIM power state was successfully set.
+     * @hide
+     */
+    @SystemApi
+    public static final int SET_SIM_POWER_STATE_SUCCESS = 0;
+
+    /**
+     * The SIM is already in the requested power state.
+     * @hide
+     */
+    @SystemApi
+    public static final int SET_SIM_POWER_STATE_ALREADY_IN_STATE = 1;
+
+    /**
+     * Failed to connect to the modem to make the power state request. This may happen if the
+     * modem has an error. The user may want to make the request again later.
+     * @hide
+     */
+    @SystemApi
+    public static final int SET_SIM_POWER_STATE_MODEM_ERROR = 2;
+
+    /**
+     * Failed to connect to the SIM to make the power state request. This may happen if the
+     * SIM has been removed. The user may want to make the request again later.
+     * @hide
+     */
+    @SystemApi
+    public static final int SET_SIM_POWER_STATE_SIM_ERROR = 3;
+
+    /**
+     * The modem version does not support synchronous power.
+     * @hide
+     */
+    @SystemApi
+    public static final int SET_SIM_POWER_STATE_NOT_SUPPORTED = 4;
+
+    /** @hide */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = {"SET_SIM_POWER_STATE_"},
+            value = {
+                    SET_SIM_POWER_STATE_SUCCESS,
+                    SET_SIM_POWER_STATE_ALREADY_IN_STATE,
+                    SET_SIM_POWER_STATE_MODEM_ERROR,
+                    SET_SIM_POWER_STATE_SIM_ERROR,
+                    SET_SIM_POWER_STATE_NOT_SUPPORTED
+            })
+    public @interface SetSimPowerStateResult {}
+
+    /**
      * Set the allowed carrier list and the excluded carrier list indicating the priority between
      * the two lists.
      * Requires system privileges.
@@ -11513,18 +11695,6 @@
     }
 
     /**
-     * In this mode, modem will not send specified indications when screen is off.
-     * @hide
-     */
-    public static final int INDICATION_UPDATE_MODE_NORMAL                   = 1;
-
-    /**
-     * In this mode, modem will still send specified indications when screen is off.
-     * @hide
-     */
-    public static final int INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF        = 2;
-
-    /**
      * The indication for signal strength update.
      * @hide
      */
@@ -13000,6 +13170,37 @@
     }
 
     /**
+     * Get which bands the modem's background scan is acting on, specified by
+     * {@link #setSystemSelectionChannels}.
+     *
+     * <p>Requires Permission:
+     * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
+     * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+     *
+     * @return a list of {@link RadioAccessSpecifier}, or an empty list if no bands are specified.
+     * @throws IllegalStateException if the Telephony process is not currently available.
+     *
+     * @hide
+     */
+    @SystemApi
+    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+    public @NonNull List<RadioAccessSpecifier> getSystemSelectionChannels() {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                return service.getSystemSelectionChannels(getSubId());
+            } else {
+                throw new IllegalStateException("telephony service is null.");
+            }
+        } catch (RemoteException ex) {
+            if (!isSystemProcess()) {
+                ex.rethrowAsRuntimeException();
+            }
+        }
+        return new ArrayList<>();
+    }
+
+    /**
      * Verifies whether the input MCC/MNC and MVNO correspond to the current carrier.
      *
      * @param mccmnc the carrier's mccmnc that you want to match
@@ -13462,18 +13663,22 @@
     }
 
     /**
-     * The IccLock state or password was changed successfully.
+     * Indicates that the ICC PIN lock state or PIN was changed successfully.
      * @hide
      */
     public static final int CHANGE_ICC_LOCK_SUCCESS = Integer.MAX_VALUE;
 
     /**
-     * Check whether ICC pin lock is enabled.
-     * This is a sync call which returns the cached pin enabled state.
+     * Check whether ICC PIN lock is enabled.
+     * This is a sync call which returns the cached PIN enabled state.
      *
-     * @return {@code true} if ICC lock enabled, {@code false} if ICC lock disabled.
-     *
+     * @return {@code true} if ICC PIN lock enabled, {@code false} if disabled.
      * @throws SecurityException if the caller doesn't have the permission.
+     * @throws IllegalStateException if the Telephony process is not currently available.
+     *
+     * <p>Requires Permission:
+     * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
+     * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
      *
      * @hide
      */
@@ -13485,81 +13690,97 @@
             ITelephony telephony = getITelephony();
             if (telephony != null) {
                 return telephony.isIccLockEnabled(getSubId());
+            } else {
+                throw new IllegalStateException("telephony service is null.");
             }
         } catch (RemoteException e) {
             Log.e(TAG, "isIccLockEnabled RemoteException", e);
+            e.rethrowFromSystemServer();
         }
         return false;
     }
 
     /**
-     * Set the ICC pin lock enabled or disabled.
+     * Enable or disable the ICC PIN lock.
      *
-     * If enable/disable ICC pin lock successfully, a value of {@link Integer#MAX_VALUE} is
-     * returned.
-     * If an incorrect old password is specified, the return value will indicate how many more
-     * attempts the user can make to change the password before the SIM is locked.
-     * Using PUK code to unlock SIM if enter the incorrect old password 3 times.
-     *
-     * @param enabled    "true" for locked, "false" for unlocked.
-     * @param password   needed to change the ICC pin state, aka. Pin1
-     * @return an integer representing the status of IccLock enabled or disabled in the following
-     * three cases:
-     *   - {@link TelephonyManager#CHANGE_ICC_LOCK_SUCCESS} if enabled or disabled IccLock
-     *   successfully.
-     *   - Positive number and zero for remaining password attempts.
-     *   - Negative number for other failure cases (such like enabling/disabling PIN failed).
-     *
+     * @param enabled "true" for locked, "false" for unlocked.
+     * @param pin needed to change the ICC PIN lock, aka. Pin1.
+     * @return the result of enabling or disabling the ICC PIN lock.
      * @throws SecurityException if the caller doesn't have the permission.
+     * @throws IllegalStateException if the Telephony process is not currently available.
+     *
+     * <p>Requires Permission:
+     * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+     * app has carrier privileges (see {@link #hasCarrierPrivileges}).
      *
      * @hide
      */
+    @SystemApi
+    @NonNull
     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
-    public int setIccLockEnabled(boolean enabled, @NonNull String password) {
-        checkNotNull(password, "setIccLockEnabled password can't be null.");
+    public PinResult setIccLockEnabled(boolean enabled, @NonNull String pin) {
+        checkNotNull(pin, "setIccLockEnabled pin can't be null.");
         try {
             ITelephony telephony = getITelephony();
             if (telephony != null) {
-                return telephony.setIccLockEnabled(getSubId(), enabled, password);
+                int result = telephony.setIccLockEnabled(getSubId(), enabled, pin);
+                if (result == CHANGE_ICC_LOCK_SUCCESS) {
+                    return new PinResult(PinResult.PIN_RESULT_TYPE_SUCCESS, 0);
+                } else if (result < 0) {
+                    return PinResult.getDefaultFailedResult();
+                } else {
+                    return new PinResult(PinResult.PIN_RESULT_TYPE_INCORRECT, result);
+                }
+            } else {
+                throw new IllegalStateException("telephony service is null.");
             }
         } catch (RemoteException e) {
             Log.e(TAG, "setIccLockEnabled RemoteException", e);
+            e.rethrowFromSystemServer();
         }
-        return 0;
+        return PinResult.getDefaultFailedResult();
     }
 
     /**
-     * Change the ICC password used in ICC pin lock.
+     * Change the ICC lock PIN.
      *
-     * If the password was changed successfully, a value of {@link Integer#MAX_VALUE} is returned.
-     * If an incorrect old password is specified, the return value will indicate how many more
-     * attempts the user can make to change the password before the SIM is locked.
-     * Using PUK code to unlock SIM if enter the incorrect old password 3 times.
-     *
-     * @param oldPassword is the old password
-     * @param newPassword is the new password
-     * @return an integer representing the status of IccLock changed in the following three cases:
-     *   - {@link TelephonyManager#CHANGE_ICC_LOCK_SUCCESS} if changed IccLock successfully.
-     *   - Positive number and zero for remaining password attempts.
-     *   - Negative number for other failure cases (such like enabling/disabling PIN failed).
-     *
+     * @param oldPin is the old PIN
+     * @param newPin is the new PIN
+     * @return The result of changing the ICC lock PIN.
      * @throws SecurityException if the caller doesn't have the permission.
+     * @throws IllegalStateException if the Telephony process is not currently available.
+     *
+     * <p>Requires Permission:
+     * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+     * app has carrier privileges (see {@link #hasCarrierPrivileges}).
      *
      * @hide
      */
+    @SystemApi
+    @NonNull
     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
-    public int changeIccLockPassword(@NonNull String oldPassword, @NonNull String newPassword) {
-        checkNotNull(oldPassword, "changeIccLockPassword oldPassword can't be null.");
-        checkNotNull(newPassword, "changeIccLockPassword newPassword can't be null.");
+    public PinResult changeIccLockPin(@NonNull String oldPin, @NonNull String newPin) {
+        checkNotNull(oldPin, "changeIccLockPin oldPin can't be null.");
+        checkNotNull(newPin, "changeIccLockPin newPin can't be null.");
         try {
             ITelephony telephony = getITelephony();
             if (telephony != null) {
-                return telephony.changeIccLockPassword(getSubId(), oldPassword, newPassword);
+                int result = telephony.changeIccLockPassword(getSubId(), oldPin, newPin);
+                if (result == CHANGE_ICC_LOCK_SUCCESS) {
+                    return new PinResult(PinResult.PIN_RESULT_TYPE_SUCCESS, 0);
+                } else if (result < 0) {
+                    return PinResult.getDefaultFailedResult();
+                } else {
+                    return new PinResult(PinResult.PIN_RESULT_TYPE_INCORRECT, result);
+                }
+            } else {
+                throw new IllegalStateException("telephony service is null.");
             }
         } catch (RemoteException e) {
-            Log.e(TAG, "changeIccLockPassword RemoteException", e);
+            Log.e(TAG, "changeIccLockPin RemoteException", e);
+            e.rethrowFromSystemServer();
         }
-        return 0;
+        return PinResult.getDefaultFailedResult();
     }
 
     /**
@@ -13962,4 +14183,275 @@
 
         return Collections.emptyList();
     }
+
+    /**
+     * Indicates that the thermal mitigation request was completed successfully.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int THERMAL_MITIGATION_RESULT_SUCCESS = 0;
+
+    /**
+     * Indicates that the thermal mitigation request was not completed because of a modem error.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int THERMAL_MITIGATION_RESULT_MODEM_ERROR = 1;
+
+    /**
+     * Indicates that the thermal mitigation request was not completed because the modem is not
+     * available.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int THERMAL_MITIGATION_RESULT_MODEM_NOT_AVAILABLE = 2;
+
+    /**
+     * Indicates that the thermal mitigation request could not power off the radio due to the device
+     * either being in an active voice call, device pending an emergency call, or any other state
+     * that would dissallow powering off of radio.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int THERMAL_MITIGATION_RESULT_INVALID_STATE = 3;
+
+    /**
+     * Indicates that the thermal mitigation request resulted an unknown error.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int THERMAL_MITIGATION_RESULT_UNKNOWN_ERROR = 4;
+
+    /**
+     * Thermal mitigation request to control functionalities at modem. Thermal mitigation is done
+     * per-subscription. Caller must be sure to bind the TelephonyManager instance to subId by
+     * calling {@link #createForSubscriptionId(int)} if they want thermal mitigation on a specific
+     * subscription Id. Otherwise, TelephonyManager will use the default subscription.
+     *
+     * Calling this does not guarantee that the thermal mitigation action requested was done to
+     * completion. A thermal module should actively monitor the temperature levels and request an
+     * appropriate thermal mitigation action. Every action is assumed to be done 'on top of' the
+     * previous action, where the order of actions from least thermal mitigation to most is as
+     * follows:
+     * <ol>
+     *   <li>{@link ThermalMitigationRequest#THERMAL_MITIGATION_ACTION_DATA_THROTTLING}</li>
+     *   <ol>
+     *      <li>{@link DataThrottlingRequest#DATA_THROTTLING_ACTION_NO_DATA_THROTTLING}</li>
+     *      <li>{@link DataThrottlingRequest#DATA_THROTTLING_ACTION_THROTTLE_SECONDARY_CARRIER}</li>
+     *      <li>{@link DataThrottlingRequest#DATA_THROTTLING_ACTION_THROTTLE_PRIMARY_CARRIER}</li>
+     *   </ol>
+     *   <li>{@link ThermalMitigationRequest#THERMAL_MITIGATION_ACTION_VOICE_ONLY}</li>
+     *   <li>{@link ThermalMitigationRequest#THERMAL_MITIGATION_ACTION_RADIO_OFF}</li>
+     * </ol>
+     *
+     * So, for example, requesting {@link
+     * DataThrottlingRequest#DATA_THROTTLING_ACTION_THROTTLE_PRIMARY_CARRIER} will ensure that the
+     * data on secondary carrier has been disabled before throttling on primary carrier. {@link
+     * ThermalMitigationRequest#THERMAL_MITIGATION_ACTION_VOICE_ONLY} will ensure that data on both
+     * primary and secondary have been disabled. {@link
+     * ThermalMitigationRequest#THERMAL_MITIGATION_ACTION_RADIO_OFF} will ensure that voice is
+     * disabled and that data on both primary and secondary carriers are disabled before turning
+     * radio off. {@link DataThrottlingRequest#DATA_THROTTLING_ACTION_HOLD} is not part of the order
+     * and can be used at any time during data throttling to hold onto the current level of data
+     * throttling.
+     *
+     * @param thermalMitigationRequest Thermal mitigation request. See {@link
+     * ThermalMitigationRequest} for details.
+     *
+     * @throws IllegalStateException if the Telephony process is not currently available.
+     * @throws IllegalArgumentException if the thermalMitigationRequest had invalid parameters.
+     *
+     * @hide
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+    @ThermalMitigationResult
+    public int sendThermalMitigationRequest(
+            @NonNull ThermalMitigationRequest thermalMitigationRequest) {
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null) {
+                return telephony.sendThermalMitigationRequest(getSubId(), thermalMitigationRequest);
+            }
+            throw new IllegalStateException("telephony service is null.");
+        } catch (RemoteException ex) {
+            Log.e(TAG, "Telephony#thermalMitigationRequest RemoteException", ex);
+            ex.rethrowFromSystemServer();
+        }
+        return THERMAL_MITIGATION_RESULT_UNKNOWN_ERROR;
+    }
+
+    /** @hide */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = {"GBA_FAILURE_REASON_"}, value = {
+            GBA_FAILURE_REASON_UNKNOWN,
+            GBA_FAILURE_REASON_FEATURE_NOT_SUPPORTED,
+            GBA_FAILURE_REASON_FEATURE_NOT_READY,
+            GBA_FAILURE_REASON_NETWORK_FAILURE,
+            GBA_FAILURE_REASON_INCORRECT_NAF_ID,
+            GBA_FAILURE_REASON_SECURITY_PROTOCOL_NOT_SUPPORTED})
+    public @interface AuthenticationFailureReason {}
+
+    /**
+     * GBA Authentication has failed for an unknown reason.
+     *
+     * <p>The caller should retry a message that failed with this response.
+     * @hide
+     */
+    @SystemApi
+    public static final int GBA_FAILURE_REASON_UNKNOWN = 0;
+
+    /**
+     * GBA Authentication is not supported by the carrier, SIM or android.
+     *
+     * <p>Application should use other authentication mechanisms if possible.
+     * @hide
+     */
+    @SystemApi
+    public static final int GBA_FAILURE_REASON_FEATURE_NOT_SUPPORTED = 1;
+
+    /**
+     * GBA Authentication service is not ready for use.
+     *
+     * <p>Application could try again at a later time.
+     * @hide
+     */
+    @SystemApi
+    public static final int GBA_FAILURE_REASON_FEATURE_NOT_READY = 2;
+
+    /**
+     * GBA Authentication has been failed by the network.
+     * @hide
+     */
+    @SystemApi
+    public static final int GBA_FAILURE_REASON_NETWORK_FAILURE = 3;
+
+    /**
+     * GBA Authentication has failed due to incorrect NAF URL.
+     * @hide
+     */
+    @SystemApi
+    public static final int GBA_FAILURE_REASON_INCORRECT_NAF_ID = 4;
+
+    /**
+     * GBA Authentication has failed due to unsupported security protocol
+     * @hide
+     */
+    @SystemApi
+    public static final int GBA_FAILURE_REASON_SECURITY_PROTOCOL_NOT_SUPPORTED = 5;
+
+    /**
+     * The callback associated with a {@link #bootstrapAuthenticationRequest()}.
+     * @hide
+     */
+    @SystemApi
+    public static class BootstrapAuthenticationCallback {
+
+        /**
+         * Invoked when the previously requested GBA keys are available (@see
+         * bootstrapAuthenticationRequest()).
+         * @param gbaKey Ks_NAF/Ks_ext_NAF Response
+         * @param transactionId Bootstrapping Transaction Identifier
+         */
+        public void onKeysAvailable(@NonNull byte[] gbaKey, @NonNull String transactionId) {}
+
+        /**
+         * @param reason The reason for the authentication failure.
+         */
+        public void onAuthenticationFailure(@AuthenticationFailureReason int reason) {}
+    }
+
+    /**
+     * Used to get the Generic Bootstrapping Architecture authentication keys
+     * KsNAF/Ks_ext_NAF for a particular NAF as defined in 3GPP spec TS 33.220 for
+     * the specified sub id.
+     *
+     * <p>Application must be prepared to wait for receiving the Gba keys through the
+     * registered callback and not invoke the API on the main application thread.
+     * Application also must call the api to get the fresh key every time instead
+     * of caching the key.
+     *
+     * Following steps may be invoked on the API call depending on the state of the
+     * underlying GBA implementation:
+     * <ol>
+     *     <li>Resolve and bind to a Gba implementation.</li>
+     *     <li>Run bootstrapping if no valid keys are available or bootstrapping is forced.</li>
+     *     <li>Generate the ks_NAF/ ks_Ext_NAF to be returned via the callback.</li>
+     * </ol>
+     *
+     * <p> Requires Permission: MODIFY_PHONE_STATE or that the calling app has carrier
+     * privileges (see {@link #hasCarrierPrivileges}).
+     * @param appType icc application type, like {@link #APPTYPE_USIM} or {@link
+     * #APPTYPE_ISIM} or {@link#APPTYPE_UNKNOWN}
+     * @param nafId Network Application Function(NAF) fully qualified domain name and
+     * the selected GBA mode. It shall contain two parts delimited by "@" sign. The first
+     * part is the constant string "3GPP-bootstrapping" (GBA_ME),
+     * "3GPP-bootstrapping-uicc" (GBA_ U), or "3GPP-bootstrapping-digest" (GBA_Digest),
+     * and the latter part shall be the FQDN of the NAF (e.g.
+     * "3GPP-bootstrapping@naf1.operator.com" or "3GPP-bootstrapping-uicc@naf1.operator.com",
+     * or "3GPP-bootstrapping-digest@naf1.operator.com").
+     * @param securityProtocol Security protocol identifier between UE and NAF.  See
+     * 3GPP TS 33.220 Annex H. Application can use
+     * {@link UaSecurityProtocolIdentifier#createDefaultUaSpId},
+     * {@link UaSecurityProtocolIdentifier#create3GppUaSpId},
+     * to create the ua security protocol identifier as needed
+     * @param forceBootStrapping true=force bootstrapping, false=do not force
+     * bootstrapping. Bootstrapping shouldn't be forced unless the application sees
+     * authentication errors from the server.
+     * @param e The {@link Executor} that will be used to call the Gba callback.
+     * @param callback A callback called on the supplied {@link Executor} that will
+     * contain the GBA Ks_NAF/Ks_ext_NAF when available. If the NAF keys are
+     * available and valid at the time of call and bootstrapping is not requested,
+     * then the callback shall be invoked with the available keys.
+     * @hide
+     */
+    @SystemApi
+    @WorkerThread
+    @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+    public void bootstrapAuthenticationRequest(
+            @UiccAppTypeExt int appType, @NonNull Uri nafId,
+            @NonNull UaSecurityProtocolIdentifier securityProtocol,
+            boolean forceBootStrapping, @NonNull Executor e,
+            @NonNull BootstrapAuthenticationCallback callback) {
+        try {
+            ITelephony service = getITelephony();
+            if (service == null) {
+                e.execute(() -> callback.onAuthenticationFailure(
+                        GBA_FAILURE_REASON_FEATURE_NOT_READY));
+                return;
+            }
+            service.bootstrapAuthenticationRequest(
+                    getSubId(), appType, nafId, securityProtocol, forceBootStrapping,
+                    new IBootstrapAuthenticationCallback.Stub() {
+                        @Override
+                        public void onKeysAvailable(int token, byte[] gbaKey,
+                                String transactionId) {
+                            final long identity = Binder.clearCallingIdentity();
+                            try {
+                                e.execute(() -> callback.onKeysAvailable(gbaKey, transactionId));
+                            } finally {
+                                Binder.restoreCallingIdentity(identity);
+                            }
+                        }
+
+                        @Override
+                        public void onAuthenticationFailure(int token, int reason) {
+                            final long identity = Binder.clearCallingIdentity();
+                            try {
+                                e.execute(() -> callback.onAuthenticationFailure(reason));
+                            } finally {
+                                Binder.restoreCallingIdentity(identity);
+                            }
+                        }
+                    });
+        } catch (RemoteException exception) {
+            Log.e(TAG, "Error calling ITelephony#bootstrapAuthenticationRequest", exception);
+            e.execute(() -> callback.onAuthenticationFailure(GBA_FAILURE_REASON_FEATURE_NOT_READY));
+        }
+    }
 }
diff --git a/telephony/java/android/telephony/ThermalMitigationRequest.aidl b/telephony/java/android/telephony/ThermalMitigationRequest.aidl
new file mode 100644
index 0000000..a912f77
--- /dev/null
+++ b/telephony/java/android/telephony/ThermalMitigationRequest.aidl
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony;
+
+parcelable ThermalMitigationRequest;
\ No newline at end of file
diff --git a/telephony/java/android/telephony/ThermalMitigationRequest.java b/telephony/java/android/telephony/ThermalMitigationRequest.java
new file mode 100644
index 0000000..91ad9c3
--- /dev/null
+++ b/telephony/java/android/telephony/ThermalMitigationRequest.java
@@ -0,0 +1,248 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+
+/**
+ * Class stores information related to the type of data throttling request to be sent to {@link
+ * TelephonyManager#sendThermalMitigationRequest(ThermalMitigationResult)}.
+ * @hide
+ */
+@SystemApi
+public final class ThermalMitigationRequest implements Parcelable {
+    /**
+     * Sent as a thermal mititgation action to {@link
+     * TelephonyManager#sendThermalMitigationRequest(ThermalMitigationResult)} to start data
+     * throttling. {@link TelephonyManager#InvalidThermalMitigationRequestException} will be thrown
+     * if dataThrottlingRequest is {@code null} or if completion duration is < 0.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int THERMAL_MITIGATION_ACTION_DATA_THROTTLING = 0;
+
+    /**
+     * Sent as a thermal mititgation action to {@link
+     * TelephonyManager#sendThermalMitigationRequest(ThermalMitigationResult)} to allow only voice
+     * calls and internet data will not be available. This attempts to enable radio if currently
+     * disabled for thermal mitigation with no guarantee of it actually turning on.
+     * dataThrottlingRequest must be {@code null} or {@link
+     * TelephonyManager#InvalidThermalMitigationRequestException} will be thrown.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int THERMAL_MITIGATION_ACTION_VOICE_ONLY = 1;
+
+    /**
+     * Sent as a thermal mititgation action to {@link'
+     * TelephonyManager#sendThermalMitigationRequest(ThermalMitigationResult)} to turn radio off. If
+     * radio is not able to be powered off because of an ongoing voice call, pending emergency call,
+     * or any other state that wouldn't allow radio off, {@link
+     * TelephonyManager#THERMAL_MITIGATION_RESULT_INVALID_STATE}.
+     * dataThrottlingRequest must be {@code null} or
+     * {@link TelephonyManager#InvalidThermalMitigationRequestException} will be returned.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int THERMAL_MITIGATION_ACTION_RADIO_OFF = 2;
+
+    /**
+     * Type of thermal mitigation action.
+     * @hide
+     */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = { "THERMAL_MITIGATION_ACTION_" }, value = {
+        THERMAL_MITIGATION_ACTION_DATA_THROTTLING,
+        THERMAL_MITIGATION_ACTION_VOICE_ONLY,
+        THERMAL_MITIGATION_ACTION_RADIO_OFF})
+    public @interface ThermalMitigationAction {}
+
+    private @ThermalMitigationAction int mThermalMitigationAction;
+    private DataThrottlingRequest mDataThrottlingRequest;
+
+    /**
+     * @param thermalMitigationAction thermal mitigation action.
+     * @param dataThrottlingRequest is the parameters for more fine-controlled data throttling. This
+     * is only applicable if thermalMitigationAction is
+     * {@link #THERMAL_MITIGATION_ACTION_DATA_THROTTLING}. Otherwise, it must be set to
+     * {@code null}. See {@link DataThrottlingRequest} for more details.
+     */
+    private ThermalMitigationRequest(@ThermalMitigationAction int thermalMitigationAction,
+            @Nullable DataThrottlingRequest dataThrottlingRequest) {
+        mThermalMitigationAction = thermalMitigationAction;
+        mDataThrottlingRequest = dataThrottlingRequest;
+    }
+
+    private ThermalMitigationRequest(Parcel in) {
+        mThermalMitigationAction = in.readInt();
+        mDataThrottlingRequest = in.readParcelable(DataThrottlingRequest.class.getClassLoader());
+    }
+
+     /**
+     * Implement the Parcelable interface
+     */
+    @Override
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        dest.writeInt(mThermalMitigationAction);
+        dest.writeParcelable(mDataThrottlingRequest, 0);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return "[ThermalMitigationRequest "
+            + ", thermalMitigationAction=" + mThermalMitigationAction
+            + ", dataThrottlingRequest=" + mDataThrottlingRequest
+            + "]";
+    }
+
+    /**
+     * @return the thermal mitigation action.
+     */
+    public @ThermalMitigationAction int getThermalMitigationAction() {
+        return mThermalMitigationAction;
+    }
+
+    /**
+     * @return the data throttling request.
+     */
+    @Nullable
+    public DataThrottlingRequest getDataThrottlingRequest() {
+        return mDataThrottlingRequest;
+    }
+
+    public static final @NonNull Parcelable.Creator<ThermalMitigationRequest> CREATOR =
+            new Parcelable.Creator<ThermalMitigationRequest>() {
+
+        @Override
+        public ThermalMitigationRequest createFromParcel(Parcel in) {
+            return new ThermalMitigationRequest(in);
+        }
+
+        @Override
+        public ThermalMitigationRequest[] newArray(int size) {
+            return new ThermalMitigationRequest[size];
+        }
+    };
+
+    /**
+     * Provides a convenient way to set the fields of a {@link ThermalMitigationRequest} when
+     * creating a new instance.
+     *
+     * <p>The example below shows how you might create a new {@code ThermalMitigationRequest}:
+     *
+     * <pre><code>
+     *
+     * ThermalMitigationRequest dp = new ThermalMitigationRequest.Builder()
+     *     .setThermalMitigationAction(
+     *          ThermalMitigationRequest.THERMAL_MITIGATION_ACTION_DATA_THROTTLING)
+     *     .setDataThrottlingRequest(new DataThrottlingRequest.Builder()
+     *          .setDataThrottlingAction(
+     *              DataThrottlingRequest.DATA_THROTTLING_ACTION_THROTTLE_SECONDARY_CARRIER)
+     *          .setCompletionDurationMillis(10000L)
+     *          .build())
+     *     .build();
+     * </code></pre>
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final class Builder {
+        private @ThermalMitigationAction int mThermalMitigationAction = -1;
+        private DataThrottlingRequest mDataThrottlingRequest;
+
+        /**
+         * Default constructor for Builder.
+         */
+        public Builder() {}
+
+        /**
+         * Set the thermal mitigation action.
+         *
+         * @param thermalMitigationAction thermal mitigation action. See {@link
+         *      #THERMAL_MITIGATION_ACTION_DATA_THROTTLING}, {@link
+         *      #THERMAL_MITIGATION_ACTION_VOICE_ONLY}, and {@link
+         *      #THERMAL_MITIGATION_ACTION_RADIO_OFF} for more details.
+         *
+         * @return The same instance of the builder.
+         */
+        public @NonNull Builder setThermalMitigationAction(
+                @ThermalMitigationAction int thermalMitigationAction) {
+            mThermalMitigationAction = thermalMitigationAction;
+            return this;
+        }
+
+        /**
+         * Set the data throttling request.
+         *
+         * @param dataThrottlingRequest is the parameters for more fine-controlled data throttling.
+         *      This is only applicable if thermalMitigationAction is {@link
+         *      #THERMAL_MITIGATION_ACTION_DATA_THROTTLING}. Otherwise, it should not be set and
+         *      will throw an IllegalArgumentException if it is. See {@link DataThrottlingRequest}
+         *      for more details.
+         *
+         * @return The same instance of the builder.
+         */
+        public @NonNull Builder setDataThrottlingRequest(
+                @NonNull DataThrottlingRequest dataThrottlingRequest) {
+            mDataThrottlingRequest = dataThrottlingRequest;
+            return this;
+        }
+
+        /**
+         * Build the ThermalMitigationRequest.
+         *
+         * @return the ThermalMitigationRequest object.
+         */
+        public @NonNull ThermalMitigationRequest build() {
+            if (mThermalMitigationAction < 0) {
+                throw new IllegalArgumentException("thermalMitigationAction was "
+                        + " not set");
+            }
+
+            if (mThermalMitigationAction == THERMAL_MITIGATION_ACTION_DATA_THROTTLING) {
+                if (mDataThrottlingRequest == null) {
+                    throw new IllegalArgumentException("dataThrottlingRequest  cannot be null for "
+                            + "THERMAL_MITIGATION_ACTION_DATA_THROTTLING");
+                }
+
+
+            } else if (mDataThrottlingRequest != null) {
+                throw new IllegalArgumentException("dataThrottlingRequest must be null for "
+                        + "THERMAL_MITIGATION_ACTION_VOICE_ONLY and "
+                        + "THERMAL_MITIGATION_ACTION_RADIO_OFF");
+            }
+
+            return new ThermalMitigationRequest(mThermalMitigationAction, mDataThrottlingRequest);
+        }
+    }
+}
diff --git a/telephony/java/android/telephony/cdma/OWNERS b/telephony/java/android/telephony/cdma/OWNERS
new file mode 100644
index 0000000..6aa399d
--- /dev/null
+++ b/telephony/java/android/telephony/cdma/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+amitmahajan@google.com
diff --git a/telephony/java/android/telephony/data/DataCallResponse.java b/telephony/java/android/telephony/data/DataCallResponse.java
index ca9bf3c..f0088b9 100644
--- a/telephony/java/android/telephony/data/DataCallResponse.java
+++ b/telephony/java/android/telephony/data/DataCallResponse.java
@@ -134,6 +134,8 @@
     private final int mMtuV6;
     private final @HandoverFailureMode int mHandoverFailureMode;
     private final int mPduSessionId;
+    private final Qos mDefaultQos;
+    private final List<QosSession> mQosSessions;
 
     /**
      * @param cause Data call fail cause. {@link DataFailCause#NONE} indicates no error.
@@ -182,6 +184,8 @@
         mMtu = mMtuV4 = mMtuV6 = mtu;
         mHandoverFailureMode = HANDOVER_FAILURE_MODE_LEGACY;
         mPduSessionId = PDU_SESSION_ID_NOT_SET;
+        mDefaultQos = null;
+        mQosSessions = new ArrayList<>();
     }
 
     private DataCallResponse(@DataFailureCause int cause, long suggestedRetryTime, int id,
@@ -189,7 +193,8 @@
             @Nullable String interfaceName, @Nullable List<LinkAddress> addresses,
             @Nullable List<InetAddress> dnsAddresses, @Nullable List<InetAddress> gatewayAddresses,
             @Nullable List<InetAddress> pcscfAddresses, int mtu, int mtuV4, int mtuV6,
-            @HandoverFailureMode int handoverFailureMode, int pduSessionId) {
+            @HandoverFailureMode int handoverFailureMode, int pduSessionId,
+            @Nullable Qos defaultQos, @Nullable List<QosSession> qosSessions) {
         mCause = cause;
         mSuggestedRetryTime = suggestedRetryTime;
         mId = id;
@@ -209,6 +214,8 @@
         mMtuV6 = mtuV6;
         mHandoverFailureMode = handoverFailureMode;
         mPduSessionId = pduSessionId;
+        mDefaultQos = defaultQos;
+        mQosSessions = qosSessions;
     }
 
     /** @hide */
@@ -233,6 +240,9 @@
         mMtuV6 = source.readInt();
         mHandoverFailureMode = source.readInt();
         mPduSessionId = source.readInt();
+        mDefaultQos = source.readParcelable(Qos.class.getClassLoader());
+        mQosSessions = new ArrayList<>();
+        source.readList(mQosSessions, QosSession.class.getClassLoader());
     }
 
     /**
@@ -350,6 +360,28 @@
         return mPduSessionId;
     }
 
+    /**
+     * @return default QOS of the data call received from the network
+     *
+     * @hide
+     */
+
+    @Nullable
+    public Qos getDefaultQos() {
+        return mDefaultQos;
+    }
+
+    /**
+     * @return All the dedicated bearer QOS sessions of the data call received from the network
+     *
+     * @hide
+     */
+
+    @NonNull
+    public List<QosSession> getQosSessions() {
+        return mQosSessions;
+    }
+
     @NonNull
     @Override
     public String toString() {
@@ -370,6 +402,8 @@
            .append(" mtuV6=").append(getMtuV6())
            .append(" handoverFailureMode=").append(getHandoverFailureMode())
            .append(" pduSessionId=").append(getPduSessionId())
+           .append(" defaultQos=").append(mDefaultQos)
+           .append(" qosSessions=").append(mQosSessions)
            .append("}");
         return sb.toString();
     }
@@ -383,12 +417,22 @@
         }
 
         DataCallResponse other = (DataCallResponse) o;
-        return this.mCause == other.mCause
-                && this.mSuggestedRetryTime == other.mSuggestedRetryTime
-                && this.mId == other.mId
-                && this.mLinkStatus == other.mLinkStatus
-                && this.mProtocolType == other.mProtocolType
-                && this.mInterfaceName.equals(other.mInterfaceName)
+
+        final boolean isQosSame = (mDefaultQos == null || other.mDefaultQos == null) ?
+                mDefaultQos == other.mDefaultQos :
+                mDefaultQos.equals(other.mDefaultQos);
+
+        final boolean isQosSessionsSame = (mQosSessions == null || mQosSessions == null) ?
+                mQosSessions == other.mQosSessions :
+                mQosSessions.size() == other.mQosSessions.size()
+                && mQosSessions.containsAll(other.mQosSessions);
+
+        return mCause == other.mCause
+                && mSuggestedRetryTime == other.mSuggestedRetryTime
+                && mId == other.mId
+                && mLinkStatus == other.mLinkStatus
+                && mProtocolType == other.mProtocolType
+                && mInterfaceName.equals(other.mInterfaceName)
                 && mAddresses.size() == other.mAddresses.size()
                 && mAddresses.containsAll(other.mAddresses)
                 && mDnsAddresses.size() == other.mDnsAddresses.size()
@@ -401,14 +445,17 @@
                 && mMtuV4 == other.mMtuV4
                 && mMtuV6 == other.mMtuV6
                 && mHandoverFailureMode == other.mHandoverFailureMode
-                && mPduSessionId == other.mPduSessionId;
+                && mPduSessionId == other.mPduSessionId
+                && isQosSame
+                && isQosSessionsSame;
     }
 
     @Override
     public int hashCode() {
         return Objects.hash(mCause, mSuggestedRetryTime, mId, mLinkStatus, mProtocolType,
                 mInterfaceName, mAddresses, mDnsAddresses, mGatewayAddresses, mPcscfAddresses,
-                mMtu, mMtuV4, mMtuV6, mHandoverFailureMode, mPduSessionId);
+                mMtu, mMtuV4, mMtuV6, mHandoverFailureMode, mPduSessionId, mDefaultQos,
+                mQosSessions);
     }
 
     @Override
@@ -433,6 +480,12 @@
         dest.writeInt(mMtuV6);
         dest.writeInt(mHandoverFailureMode);
         dest.writeInt(mPduSessionId);
+        if (mDefaultQos.getType() == Qos.QOS_TYPE_EPS) {
+            dest.writeParcelable((EpsQos)mDefaultQos, flags);
+        } else {
+            dest.writeParcelable((NrQos)mDefaultQos, flags);
+        }
+        dest.writeList(mQosSessions);
     }
 
     public static final @android.annotation.NonNull Parcelable.Creator<DataCallResponse> CREATOR =
@@ -512,6 +565,10 @@
 
         private int mPduSessionId = PDU_SESSION_ID_NOT_SET;
 
+        private Qos mDefaultQos;
+
+        private List<QosSession> mQosSessions = new ArrayList<>();
+
         /**
          * Default constructor for Builder.
          */
@@ -706,6 +763,35 @@
         }
 
         /**
+         * Set the default QOS for this data connection.
+         *
+         * @param defaultQos QOS (Quality Of Service) received from network.
+         *
+         * @return The same instance of the builder.
+         *
+         * @hide
+         */
+        public @NonNull Builder setDefaultQos(@Nullable Qos defaultQos) {
+            mDefaultQos = defaultQos;
+            return this;
+        }
+
+        /**
+         * Set the dedicated bearer QOS sessions for this data connection.
+         *
+         * @param qosSessions Dedicated bearer QOS (Quality Of Service) sessions received
+         * from network.
+         *
+         * @return The same instance of the builder.
+         *
+         * @hide
+         */
+        public @NonNull Builder setQosSessions(@NonNull List<QosSession> qosSessions) {
+            mQosSessions = qosSessions;
+            return this;
+        }
+
+        /**
          * Build the DataCallResponse.
          *
          * @return the DataCallResponse object.
@@ -713,7 +799,8 @@
         public @NonNull DataCallResponse build() {
             return new DataCallResponse(mCause, mSuggestedRetryTime, mId, mLinkStatus,
                     mProtocolType, mInterfaceName, mAddresses, mDnsAddresses, mGatewayAddresses,
-                    mPcscfAddresses, mMtu, mMtuV4, mMtuV6, mHandoverFailureMode, mPduSessionId);
+                    mPcscfAddresses, mMtu, mMtuV4, mMtuV6, mHandoverFailureMode, mPduSessionId,
+                    mDefaultQos, mQosSessions);
         }
     }
 }
diff --git a/telephony/java/android/telephony/data/EpsQos.java b/telephony/java/android/telephony/data/EpsQos.java
new file mode 100644
index 0000000..ad43068
--- /dev/null
+++ b/telephony/java/android/telephony/data/EpsQos.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.data;
+
+import android.annotation.NonNull;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Objects;
+
+
+/**
+ * Class that stores information specific to NR QOS.
+ *
+ * @hide
+ */
+public final class EpsQos extends Qos implements Parcelable {
+
+    int qosClassId;
+
+    public EpsQos() {
+        super(Qos.QOS_TYPE_EPS,
+                new android.hardware.radio.V1_6.QosBandwidth(),
+                new android.hardware.radio.V1_6.QosBandwidth());
+    }
+
+    public EpsQos(@NonNull android.hardware.radio.V1_6.EpsQos qos) {
+        super(Qos.QOS_TYPE_EPS, qos.downlink, qos.uplink);
+        qosClassId = qos.qci;
+    }
+
+    private EpsQos(Parcel source) {
+        super(source);
+        qosClassId = source.readInt();
+    }
+
+    public static @NonNull EpsQos createFromParcelBody(@NonNull Parcel in) {
+        return new EpsQos(in);
+    }
+
+    @Override
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(Qos.QOS_TYPE_EPS, dest, flags);
+        dest.writeInt(qosClassId);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(super.hashCode(), qosClassId);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+
+        if (o == null || !(o instanceof EpsQos)) {
+            return false;
+        }
+
+        EpsQos other = (EpsQos) o;
+
+        return this.qosClassId == other.qosClassId
+               && super.equals(other);
+    }
+
+    @Override
+    public String toString() {
+        return "EpsQos {"
+                + " qosClassId=" + qosClassId
+                + " downlink=" + downlink
+                + " uplink=" + uplink + "}";
+    }
+
+    public static final @NonNull Parcelable.Creator<EpsQos> CREATOR =
+            new Parcelable.Creator<EpsQos>() {
+                @Override
+                public EpsQos createFromParcel(Parcel source) {
+                    return new EpsQos(source);
+                }
+
+                @Override
+                public EpsQos[] newArray(int size) {
+                    return new EpsQos[size];
+                }
+            };
+}
diff --git a/telephony/java/android/telephony/data/NrQos.java b/telephony/java/android/telephony/data/NrQos.java
new file mode 100644
index 0000000..2011eed
--- /dev/null
+++ b/telephony/java/android/telephony/data/NrQos.java
@@ -0,0 +1,112 @@
+/**
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.data;
+
+import android.annotation.NonNull;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Objects;
+
+/**
+ * Class that stores information specific to NR QOS.
+ *
+ * @hide
+ */
+public final class NrQos extends Qos implements Parcelable {
+    int qosFlowId;
+    int fiveQi;
+    int averagingWindowMs;
+
+    public NrQos(@NonNull android.hardware.radio.V1_6.NrQos qos) {
+        super(Qos.QOS_TYPE_NR, qos.downlink, qos.uplink);
+        fiveQi = qos.fiveQi;
+        qosFlowId = qos.qfi;
+        averagingWindowMs = qos.averagingWindowMs;
+    }
+
+    private NrQos(Parcel source) {
+        super(source);
+        this.qosFlowId = source.readInt();
+        this.fiveQi = source.readInt();
+        this.averagingWindowMs = source.readInt();
+    }
+
+    public static @NonNull NrQos createFromParcelBody(@NonNull Parcel in) {
+        return new NrQos(in);
+    }
+
+    @Override
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(Qos.QOS_TYPE_NR, dest, flags);
+        dest.writeInt(qosFlowId);
+        dest.writeInt(fiveQi);
+        dest.writeInt(averagingWindowMs);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(super.hashCode(), qosFlowId, fiveQi, averagingWindowMs);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+
+        if (o == null || !(o instanceof NrQos)) {
+            return false;
+        }
+
+        NrQos other = (NrQos) o;
+
+        if (!super.equals(other)) {
+            return false;
+        }
+
+        return this.qosFlowId == other.qosFlowId
+            && this.fiveQi == other.fiveQi
+            && this.averagingWindowMs == other.averagingWindowMs;
+    }
+
+    @Override
+    public String toString() {
+        return "NrQos {"
+                + " fiveQi=" + fiveQi
+                + " downlink=" + downlink
+                + " uplink=" + uplink
+                + " qosFlowId=" + qosFlowId
+                + " averagingWindowMs=" + averagingWindowMs + "}";
+    }
+
+    public static final @NonNull Parcelable.Creator<NrQos> CREATOR =
+            new Parcelable.Creator<NrQos>() {
+                @Override
+                public NrQos createFromParcel(Parcel source) {
+                    return new NrQos(source);
+                }
+
+                @Override
+                public NrQos[] newArray(int size) {
+                    return new NrQos[size];
+                }
+            };
+}
diff --git a/telephony/java/android/telephony/data/OWNERS b/telephony/java/android/telephony/data/OWNERS
new file mode 100644
index 0000000..932b35c
--- /dev/null
+++ b/telephony/java/android/telephony/data/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+jackyu@google.com
diff --git a/telephony/java/android/telephony/data/Qos.java b/telephony/java/android/telephony/data/Qos.java
new file mode 100644
index 0000000..c8bb91e
--- /dev/null
+++ b/telephony/java/android/telephony/data/Qos.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.data;
+
+import android.annotation.CallSuper;
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
+
+/**
+ * Class that stores information specific to QOS.
+ *
+ * @hide
+ */
+public abstract class Qos {
+
+    /** @hide */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = "QOS_TYPE_",
+            value = {QOS_TYPE_EPS, QOS_TYPE_NR})
+    public @interface QosType {}
+
+    @QosType
+    final int type;
+
+    static final int QOS_TYPE_EPS = 1;
+    static final int QOS_TYPE_NR = 2;
+
+    final QosBandwidth downlink;
+    final QosBandwidth uplink;
+
+    Qos(int type,
+            @NonNull android.hardware.radio.V1_6.QosBandwidth downlink,
+            @NonNull android.hardware.radio.V1_6.QosBandwidth uplink) {
+        this.type = type;
+        this.downlink = new QosBandwidth(downlink.maxBitrateKbps, downlink.guaranteedBitrateKbps);
+        this.uplink = new QosBandwidth(uplink.maxBitrateKbps, uplink.guaranteedBitrateKbps);
+    }
+
+    static class QosBandwidth implements Parcelable {
+        int maxBitrateKbps;
+        int guaranteedBitrateKbps;
+
+        QosBandwidth() {
+        }
+
+        QosBandwidth(int maxBitrateKbps, int guaranteedBitrateKbps) {
+            this.maxBitrateKbps = maxBitrateKbps;
+            this.guaranteedBitrateKbps = guaranteedBitrateKbps;
+        }
+
+        private QosBandwidth(Parcel source) {
+            maxBitrateKbps = source.readInt();
+            guaranteedBitrateKbps = source.readInt();
+        }
+
+        @Override
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeInt(maxBitrateKbps);
+            dest.writeInt(guaranteedBitrateKbps);
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(maxBitrateKbps, guaranteedBitrateKbps);
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) return true;
+
+            if (o == null || !(o instanceof QosBandwidth)) {
+                return false;
+            }
+
+            QosBandwidth other = (QosBandwidth) o;
+            return maxBitrateKbps == other.maxBitrateKbps
+                    && guaranteedBitrateKbps == other.guaranteedBitrateKbps;
+        }
+
+        @Override
+        public String toString() {
+            return "Bandwidth {"
+                    + " maxBitrateKbps=" + maxBitrateKbps
+                    + " guaranteedBitrateKbps=" + guaranteedBitrateKbps + "}";
+        }
+
+        public static final @NonNull Parcelable.Creator<QosBandwidth> CREATOR =
+                new Parcelable.Creator<QosBandwidth>() {
+                    @Override
+                    public QosBandwidth createFromParcel(Parcel source) {
+                        return new QosBandwidth(source);
+                    }
+
+                    @Override
+                    public QosBandwidth[] newArray(int size) {
+                        return new QosBandwidth[size];
+                    }
+                };
+    };
+
+    protected Qos(@NonNull Parcel source) {
+        type = source.readInt();
+        downlink = source.readParcelable(QosBandwidth.class.getClassLoader());
+        uplink = source.readParcelable(QosBandwidth.class.getClassLoader());
+    }
+
+    /**
+     * Used by child classes for parceling.
+     *
+     * @hide
+     */
+    @CallSuper
+    public void writeToParcel(@QosType int type, Parcel dest, int flags) {
+        dest.writeInt(type);
+        dest.writeParcelable(downlink, flags);
+        dest.writeParcelable(uplink, flags);
+    }
+
+    /** @hide */
+    public static @NonNull Qos create(@NonNull android.hardware.radio.V1_6.Qos qos) {
+        switch (qos.getDiscriminator()) {
+            case android.hardware.radio.V1_6.Qos.hidl_discriminator.eps:
+                  return new EpsQos(qos.eps());
+            case android.hardware.radio.V1_6.Qos.hidl_discriminator.nr:
+                  return new NrQos(qos.nr());
+            default:
+                  return null;
+        }
+    }
+
+    /** @hide */
+    public @QosType int getType() {
+        return type;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(downlink, uplink);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+
+        Qos other = (Qos) o;
+        return type == other.type
+                && downlink.equals(other.downlink)
+                && uplink.equals(other.uplink);
+    }
+}
diff --git a/telephony/java/android/telephony/data/QosFilter.java b/telephony/java/android/telephony/data/QosFilter.java
new file mode 100644
index 0000000..6927744
--- /dev/null
+++ b/telephony/java/android/telephony/data/QosFilter.java
@@ -0,0 +1,373 @@
+/**
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.data;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.net.InetAddresses;
+import android.net.LinkAddress;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.net.InetAddress;
+import java.net.Inet4Address;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+
+/**
+ * Class that stores QOS filter parameters as defined in
+ * 3gpp 24.008 10.5.6.12 and 3gpp 24.501 9.11.4.13.
+ *
+ * @hide
+ */
+public final class QosFilter implements Parcelable {
+
+    private List<LinkAddress> localAddresses;
+    private List<LinkAddress> remoteAddresses;
+    private PortRange localPort;
+    private PortRange remotePort;
+
+    /** @hide */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = "QOS_PROTOCOL_",
+            value = {QOS_PROTOCOL_UNSPECIFIED, QOS_PROTOCOL_TCP, QOS_PROTOCOL_UDP,
+                    QOS_PROTOCOL_ESP, QOS_PROTOCOL_AH})
+    public @interface QosProtocol {}
+
+    public static final int QOS_PROTOCOL_UNSPECIFIED =
+            android.hardware.radio.V1_6.QosProtocol.UNSPECIFIED;
+    public static final int QOS_PROTOCOL_TCP = android.hardware.radio.V1_6.QosProtocol.TCP;
+    public static final int QOS_PROTOCOL_UDP = android.hardware.radio.V1_6.QosProtocol.UDP;
+    public static final int QOS_PROTOCOL_ESP = android.hardware.radio.V1_6.QosProtocol.ESP;
+    public static final int QOS_PROTOCOL_AH = android.hardware.radio.V1_6.QosProtocol.AH;
+
+    @QosProtocol
+    private int protocol;
+
+    private int typeOfServiceMask;
+
+    private long flowLabel;
+
+    /** IPSec security parameter index */
+    private long securityParameterIndex;
+
+    /** @hide */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = "QOS_FILTER_DIRECTION_",
+            value = {QOS_FILTER_DIRECTION_DOWNLINK, QOS_FILTER_DIRECTION_UPLINK,
+                    QOS_FILTER_DIRECTION_BIDIRECTIONAL})
+    public @interface QosFilterDirection {}
+
+    public static final int QOS_FILTER_DIRECTION_DOWNLINK =
+            android.hardware.radio.V1_6.QosFilterDirection.DOWNLINK;
+    public static final int QOS_FILTER_DIRECTION_UPLINK =
+            android.hardware.radio.V1_6.QosFilterDirection.UPLINK;
+    public static final int QOS_FILTER_DIRECTION_BIDIRECTIONAL =
+            android.hardware.radio.V1_6.QosFilterDirection.BIDIRECTIONAL;
+
+    @QosFilterDirection
+    private int filterDirection;
+
+    /**
+     * Specified the order in which the filter needs to be matched.
+     * A Lower numerical value has a higher precedence.
+     */
+    private int precedence;
+
+    QosFilter() {
+        localAddresses = new ArrayList<>();
+        remoteAddresses = new ArrayList<>();
+        localPort = new PortRange();
+        remotePort = new PortRange();
+        protocol = QOS_PROTOCOL_UNSPECIFIED;
+        filterDirection = QOS_FILTER_DIRECTION_BIDIRECTIONAL;
+    }
+
+    public QosFilter(List<LinkAddress> localAddresses, List<LinkAddress> remoteAddresses,
+            PortRange localPort, PortRange remotePort, int protocol, int tos,
+            long flowLabel, long spi, int direction, int precedence) {
+        this.localAddresses = localAddresses;
+        this.remoteAddresses = remoteAddresses;
+        this.localPort = localPort;
+        this.remotePort = remotePort;
+        this.protocol = protocol;
+        this.typeOfServiceMask = tos;
+        this.flowLabel = flowLabel;
+        this.securityParameterIndex = spi;
+        this.filterDirection = direction;
+        this.precedence = precedence;
+    }
+
+    /** @hide */
+    public static @NonNull QosFilter create(
+            @NonNull android.hardware.radio.V1_6.QosFilter qosFilter) {
+        QosFilter ret = new QosFilter();
+
+        String[] localAddresses = qosFilter.localAddresses.stream().toArray(String[]::new);
+        if (localAddresses != null) {
+            for (String address : localAddresses) {
+                ret.localAddresses.add(createLinkAddressFromString(address));
+            }
+        }
+
+        String[] remoteAddresses = qosFilter.remoteAddresses.stream().toArray(String[]::new);
+        if (remoteAddresses != null) {
+            for (String address : remoteAddresses) {
+                ret.remoteAddresses.add(createLinkAddressFromString(address));
+            }
+        }
+
+        if (qosFilter.localPort != null) {
+            if (qosFilter.localPort.getDiscriminator()
+                    == android.hardware.radio.V1_6.MaybePort.hidl_discriminator.range) {
+                final android.hardware.radio.V1_6.PortRange portRange = qosFilter.localPort.range();
+                ret.localPort.start = portRange.start;
+                ret.localPort.end = portRange.end;
+            }
+        }
+
+        if (qosFilter.remotePort != null) {
+            if (qosFilter.remotePort.getDiscriminator()
+                    == android.hardware.radio.V1_6.MaybePort.hidl_discriminator.range) {
+                final android.hardware.radio.V1_6.PortRange portRange
+                        = qosFilter.remotePort.range();
+                ret.remotePort.start = portRange.start;
+                ret.remotePort.end = portRange.end;
+            }
+        }
+
+        ret.protocol = qosFilter.protocol;
+
+        if (qosFilter.tos != null) {
+            if (qosFilter.tos.getDiscriminator()
+                == android.hardware.radio.V1_6.QosFilter.TypeOfService.hidl_discriminator.value) {
+                ret.typeOfServiceMask = qosFilter.tos.value();
+            }
+        }
+
+        if (qosFilter.flowLabel != null) {
+            if (qosFilter.flowLabel.getDiscriminator()
+                == android.hardware.radio.V1_6.QosFilter.Ipv6FlowLabel.hidl_discriminator.value) {
+                ret.flowLabel = qosFilter.flowLabel.value();
+            }
+        }
+
+        if (qosFilter.spi != null) {
+            if (qosFilter.spi.getDiscriminator()
+                == android.hardware.radio.V1_6.QosFilter.IpsecSpi.hidl_discriminator.value) {
+                ret.securityParameterIndex = qosFilter.spi.value();
+            }
+        }
+
+        ret.filterDirection = qosFilter.direction;
+        ret.precedence = qosFilter.precedence;
+
+        return ret;
+    }
+
+    public static class PortRange implements Parcelable {
+        int start;
+        int end;
+
+        PortRange() {
+            start = -1;
+            end = -1;
+        }
+
+        private PortRange(Parcel source) {
+            start = source.readInt();
+            end = source.readInt();
+        }
+
+        public PortRange(int start, int end) {
+            this.start = start;
+            this.end = end;
+        }
+
+        @Override
+        public void writeToParcel(@NonNull Parcel dest, int flags) {
+            dest.writeInt(start);
+            dest.writeInt(end);
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        public static final @NonNull Parcelable.Creator<PortRange> CREATOR =
+                new Parcelable.Creator<PortRange>() {
+                    @Override
+                    public PortRange createFromParcel(Parcel source) {
+                        return new PortRange(source);
+                    }
+
+                    @Override
+                    public PortRange[] newArray(int size) {
+                        return new PortRange[size];
+                    }
+                };
+
+        @Override
+        public String toString() {
+            return "PortRange {"
+                    + " start=" + start
+                    + " end=" + end + "}";
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) return true;
+
+            if (o == null || !(o instanceof PortRange)) {
+              return false;
+            }
+
+            PortRange other = (PortRange) o;
+            return start == other.start
+                    && end == other.end;
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(start, end);
+        }
+    };
+
+    @Override
+    public String toString() {
+        return "QosFilter {"
+                + " localAddresses=" + localAddresses
+                + " remoteAddresses=" + remoteAddresses
+                + " localPort=" + localPort
+                + " remotePort=" + remotePort
+                + " protocol=" + protocol
+                + " typeOfServiceMask=" + typeOfServiceMask
+                + " flowLabel=" + flowLabel
+                + " securityParameterIndex=" + securityParameterIndex
+                + " filterDirection=" + filterDirection
+                + " precedence=" + precedence + "}";
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(localAddresses, remoteAddresses, localPort,
+                remotePort, protocol, typeOfServiceMask, flowLabel,
+                securityParameterIndex, filterDirection, precedence);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+
+        if (o == null || !(o instanceof QosFilter)) {
+            return false;
+        }
+
+        QosFilter other = (QosFilter) o;
+
+        return localAddresses.size() == other.localAddresses.size()
+                && localAddresses.containsAll(other.localAddresses)
+                && remoteAddresses.size() == other.remoteAddresses.size()
+                && remoteAddresses.containsAll(other.remoteAddresses)
+                && localPort.equals(other.localPort)
+                && remotePort.equals(other.remotePort)
+                && protocol == other.protocol
+                && typeOfServiceMask == other.typeOfServiceMask
+                && flowLabel == other.flowLabel
+                && securityParameterIndex == other.securityParameterIndex
+                && filterDirection == other.filterDirection
+                && precedence == other.precedence;
+    }
+
+    private static LinkAddress createLinkAddressFromString(String addressString) {
+        addressString = addressString.trim();
+        InetAddress address = null;
+        int prefixLength = -1;
+        try {
+            String[] pieces = addressString.split("/", 2);
+            address = InetAddresses.parseNumericAddress(pieces[0]);
+            if (pieces.length == 1) {
+                prefixLength = (address instanceof Inet4Address) ? 32 : 128;
+            } else if (pieces.length == 2) {
+                prefixLength = Integer.parseInt(pieces[1]);
+            }
+        } catch (NullPointerException e) {            // Null string.
+        } catch (ArrayIndexOutOfBoundsException e) {  // No prefix length.
+        } catch (NumberFormatException e) {           // Non-numeric prefix.
+        } catch (IllegalArgumentException e) {        // Invalid IP address.
+        }
+
+        if (address == null || prefixLength == -1) {
+            throw new IllegalArgumentException("Invalid link address " + addressString);
+        }
+
+        return new LinkAddress(address, prefixLength, 0, 0,
+                LinkAddress.LIFETIME_UNKNOWN, LinkAddress.LIFETIME_UNKNOWN);
+    }
+
+    private QosFilter(Parcel source) {
+        localAddresses = new ArrayList<>();
+        source.readList(localAddresses, LinkAddress.class.getClassLoader());
+        remoteAddresses = new ArrayList<>();
+        source.readList(remoteAddresses, LinkAddress.class.getClassLoader());
+        localPort = source.readParcelable(PortRange.class.getClassLoader());
+        remotePort = source.readParcelable(PortRange.class.getClassLoader());
+        protocol = source.readInt();
+        typeOfServiceMask = source.readInt();
+        flowLabel = source.readLong();
+        securityParameterIndex = source.readLong();
+        filterDirection = source.readInt();
+        precedence = source.readInt();
+    }
+
+    @Override
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        dest.writeList(localAddresses);
+        dest.writeList(remoteAddresses);
+        dest.writeParcelable(localPort, flags);
+        dest.writeParcelable(remotePort, flags);
+        dest.writeInt(protocol);
+        dest.writeInt(typeOfServiceMask);
+        dest.writeLong(flowLabel);
+        dest.writeLong(securityParameterIndex);
+        dest.writeInt(filterDirection);
+        dest.writeInt(precedence);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final @NonNull Parcelable.Creator<QosFilter> CREATOR =
+            new Parcelable.Creator<QosFilter>() {
+                @Override
+                public QosFilter createFromParcel(Parcel source) {
+                    return new QosFilter(source);
+                }
+
+                @Override
+                public QosFilter[] newArray(int size) {
+                    return new QosFilter[size];
+                }
+            };
+}
diff --git a/telephony/java/android/telephony/data/QosSession.java b/telephony/java/android/telephony/data/QosSession.java
new file mode 100644
index 0000000..f07b6a9
--- /dev/null
+++ b/telephony/java/android/telephony/data/QosSession.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.data;
+
+import android.annotation.NonNull;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+
+/**
+ * Class that stores information specific to QOS session.
+ *
+ * @hide
+ */
+public final class QosSession implements Parcelable{
+
+    final int qosSessionId;
+    final Qos qos;
+    final List<QosFilter> qosFilterList;
+
+    public QosSession(int qosSessionId, @NonNull Qos qos, @NonNull List<QosFilter> qosFilterList) {
+        this.qosSessionId = qosSessionId;
+        this.qos = qos;
+        this.qosFilterList = qosFilterList;
+    }
+
+    private QosSession(Parcel source) {
+        qosSessionId = source.readInt();
+        qos = source.readParcelable(Qos.class.getClassLoader());
+        qosFilterList = new ArrayList<>();
+        source.readList(qosFilterList, QosFilter.class.getClassLoader());
+    }
+
+    @Override
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        dest.writeInt(qosSessionId);
+        if (qos.getType() == Qos.QOS_TYPE_EPS) {
+            dest.writeParcelable((EpsQos)qos, flags);
+        } else {
+            dest.writeParcelable((NrQos)qos, flags);
+        }
+        dest.writeList(qosFilterList);
+    }
+
+    public static @NonNull QosSession create(
+            @NonNull android.hardware.radio.V1_6.QosSession qosSession) {
+        List<QosFilter> qosFilters = new ArrayList<>();
+
+        if (qosSession.qosFilters != null) {
+            for (android.hardware.radio.V1_6.QosFilter filter : qosSession.qosFilters) {
+                qosFilters.add(QosFilter.create(filter));
+            }
+        }
+
+        return new QosSession(
+                        qosSession.qosSessionId,
+                        Qos.create(qosSession.qos),
+                        qosFilters);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return "QosSession {"
+                + " qosSessionId=" + qosSessionId
+                + " qos=" + qos
+                + " qosFilterList=" + qosFilterList + "}";
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(qosSessionId, qos, qosFilterList);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+
+        if (o == null || !(o instanceof QosSession)) {
+            return false;
+        }
+
+        QosSession other = (QosSession) o;
+        return this.qosSessionId == other.qosSessionId
+                && this.qos.equals(other.qos)
+                && this.qosFilterList.size() == other.qosFilterList.size()
+                && this.qosFilterList.containsAll(other.qosFilterList);
+    }
+
+
+    public static final @NonNull Parcelable.Creator<QosSession> CREATOR =
+            new Parcelable.Creator<QosSession>() {
+                @Override
+                public QosSession createFromParcel(Parcel source) {
+                    return new QosSession(source);
+                }
+
+                @Override
+                public QosSession[] newArray(int size) {
+                    return new QosSession[size];
+                }
+            };
+}
diff --git a/telephony/java/android/telephony/emergency/OWNERS b/telephony/java/android/telephony/emergency/OWNERS
new file mode 100644
index 0000000..fa07dce
--- /dev/null
+++ b/telephony/java/android/telephony/emergency/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+shuoq@google.com
diff --git a/telephony/java/android/telephony/euicc/OWNERS b/telephony/java/android/telephony/euicc/OWNERS
new file mode 100644
index 0000000..9e51a4b
--- /dev/null
+++ b/telephony/java/android/telephony/euicc/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+refuhoo@google.com
+amitmahajan@google.com
diff --git a/telephony/java/android/telephony/gba/GbaAuthRequest.aidl b/telephony/java/android/telephony/gba/GbaAuthRequest.aidl
new file mode 100644
index 0000000..ba243a2
--- /dev/null
+++ b/telephony/java/android/telephony/gba/GbaAuthRequest.aidl
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony.gba;
+
+parcelable GbaAuthRequest;
diff --git a/telephony/java/android/telephony/gba/GbaAuthRequest.java b/telephony/java/android/telephony/gba/GbaAuthRequest.java
new file mode 100644
index 0000000..5366e9a
--- /dev/null
+++ b/telephony/java/android/telephony/gba/GbaAuthRequest.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.gba;
+
+import android.annotation.NonNull;
+import android.net.Uri;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.telephony.IBootstrapAuthenticationCallback;
+
+import com.android.internal.telephony.uicc.IccUtils;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * GBA authentication request
+ * {@hide}
+ */
+public final class GbaAuthRequest implements Parcelable {
+    private int mToken;
+    private int mSubId;
+    private int mAppType;
+    private Uri mNafUrl;
+    private byte[] mSecurityProtocol;
+    private boolean mForceBootStrapping;
+    private IBootstrapAuthenticationCallback mCallback;
+
+    private static AtomicInteger sUniqueToken = new AtomicInteger(0);
+
+    public GbaAuthRequest(int subId, int appType, Uri nafUrl, byte[] securityProtocol,
+            boolean forceBootStrapping, IBootstrapAuthenticationCallback callback) {
+        this(nextUniqueToken(), subId, appType, nafUrl,
+                securityProtocol, forceBootStrapping, callback);
+    }
+
+    public GbaAuthRequest(GbaAuthRequest request) {
+        this(request.mToken, request.mSubId, request.mAppType, request.mNafUrl,
+                request.mSecurityProtocol, request.mForceBootStrapping, request.mCallback);
+    }
+
+    public GbaAuthRequest(int token, int subId, int appType, Uri nafUrl, byte[] securityProtocol,
+            boolean forceBootStrapping, IBootstrapAuthenticationCallback callback) {
+        mToken = token;
+        mSubId = subId;
+        mAppType = appType;
+        mNafUrl = nafUrl;
+        mSecurityProtocol = securityProtocol;
+        mCallback = callback;
+        mForceBootStrapping = forceBootStrapping;
+    }
+
+    public int getToken() {
+        return mToken;
+    }
+
+    public int getSubId() {
+        return mSubId;
+    }
+
+    public int getAppType() {
+        return mAppType;
+    }
+
+    public Uri getNafUrl() {
+        return mNafUrl;
+    }
+
+    public byte[] getSecurityProtocol() {
+        return mSecurityProtocol;
+    }
+
+    public boolean isForceBootStrapping() {
+        return mForceBootStrapping;
+    }
+
+    public void setCallback(IBootstrapAuthenticationCallback cb) {
+        mCallback = cb;
+    }
+
+    public IBootstrapAuthenticationCallback getCallback() {
+        return mCallback;
+    }
+
+    /**
+     * {@link Parcelable#writeToParcel}
+     */
+    public void writeToParcel(@NonNull Parcel out, int flags) {
+        out.writeInt(mToken);
+        out.writeInt(mSubId);
+        out.writeInt(mAppType);
+        out.writeParcelable(mNafUrl, 0);
+        out.writeInt(mSecurityProtocol.length);
+        out.writeByteArray(mSecurityProtocol);
+        out.writeBoolean(mForceBootStrapping);
+        out.writeStrongInterface(mCallback);
+    }
+
+    /**
+     * {@link Parcelable.Creator}
+     *
+     */
+    public static final @android.annotation.NonNull Parcelable.Creator<
+            GbaAuthRequest> CREATOR = new Creator<GbaAuthRequest>() {
+                @Override
+                public GbaAuthRequest createFromParcel(Parcel in) {
+                    int token = in.readInt();
+                    int subId = in.readInt();
+                    int appType = in.readInt();
+                    Uri nafUrl = in.readParcelable(GbaAuthRequest.class.getClassLoader());
+                    int len = in.readInt();
+                    byte[] protocol = new byte[len];
+                    in.readByteArray(protocol);
+                    boolean forceBootStrapping = in.readBoolean();
+                    IBootstrapAuthenticationCallback callback =
+                            IBootstrapAuthenticationCallback.Stub
+                            .asInterface(in.readStrongBinder());
+                    return new GbaAuthRequest(token, subId, appType, nafUrl, protocol,
+                            forceBootStrapping, callback);
+                }
+
+                @Override
+                public GbaAuthRequest[] newArray(int size) {
+                    return new GbaAuthRequest[size];
+                }
+            };
+
+    /**
+     * {@link Parcelable#describeContents}
+     */
+    public int describeContents() {
+        return 0;
+    }
+
+    private static int nextUniqueToken() {
+        return sUniqueToken.getAndIncrement() << 16 | (0xFFFF & (int) System.currentTimeMillis());
+    }
+
+    @Override
+    public String toString() {
+        String str = "Token: " +  mToken + "SubId:" + mSubId + ", AppType:"
+                + mAppType + ", NafUrl:" + mNafUrl + ", SecurityProtocol:"
+                + IccUtils.bytesToHexString(mSecurityProtocol)
+                + ", ForceBootStrapping:" + mForceBootStrapping
+                + ", CallBack:" + mCallback;
+        return str;
+    }
+}
diff --git a/telephony/java/android/telephony/gba/GbaService.java b/telephony/java/android/telephony/gba/GbaService.java
new file mode 100644
index 0000000..cb82e91
--- /dev/null
+++ b/telephony/java/android/telephony/gba/GbaService.java
@@ -0,0 +1,226 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.gba;
+
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.app.Service;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.RemoteException;
+import android.telephony.Annotation.UiccAppTypeExt;
+import android.telephony.IBootstrapAuthenticationCallback;
+import android.telephony.TelephonyManager;
+import android.telephony.TelephonyManager.AuthenticationFailureReason;
+import android.util.Log;
+import android.util.SparseArray;
+
+/**
+  * Base class for GBA (Generic Bootstrapping Architecture) Service. Any
+  * implementation which wants to provide GBA service must extend this class.
+  *
+  * <p>Note that the application to implement the service must declare to use
+  * the permission {@link android.Manifest.permission#BIND_GBA_SERVICE},
+  * and filter the intent of {@link #SERVICE_INTERFACE}.
+  * The manifest of the service must follow the format below:
+  *
+  * <p>...
+  * <service
+  *     android:name=".EgGbaService"
+  *     android:directBootAware="true"
+  *     android:permission="android.permission.BIND_GBA_SERVICE" >
+  *     ...
+  *     <intent-filter>
+  *         <action android:name="android.telephony.gba.GbaService"/>
+  *     </intent-filter>
+  * </service>
+  * ...
+  *
+  * <p>The service should also be file-based encryption (FBE) aware.
+  * {@hide}
+  */
+@SystemApi
+public class GbaService extends Service  {
+    private static final boolean DBG = Build.IS_DEBUGGABLE;
+    private static final String TAG = "GbaService";
+
+    /**
+    * The intent must be defined as an intent-filter in the
+    * AndroidManifest of the GbaService.
+    */
+    public static final String SERVICE_INTERFACE = "android.telephony.gba.GbaService";
+
+    private static final int EVENT_GBA_AUTH_REQUEST = 1;
+
+    private final HandlerThread mHandlerThread;
+    private final GbaServiceHandler mHandler;
+
+    private final SparseArray<IBootstrapAuthenticationCallback> mCallbacks = new SparseArray<>();
+    private final IGbaServiceWrapper mBinder = new IGbaServiceWrapper();
+
+    /**
+     * Default constructor.
+     */
+    public GbaService() {
+        mHandlerThread = new HandlerThread(TAG);
+        mHandlerThread.start();
+
+        mHandler = new GbaServiceHandler(mHandlerThread.getLooper());
+        Log.d(TAG, "GBA service created");
+    }
+
+    private class GbaServiceHandler extends Handler {
+
+        GbaServiceHandler(Looper looper) {
+            super(looper);
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case EVENT_GBA_AUTH_REQUEST:
+                    GbaAuthRequest req = (GbaAuthRequest) msg.obj;
+                    synchronized (mCallbacks) {
+                        mCallbacks.put(req.getToken(), req.getCallback());
+                    }
+                    onAuthenticationRequest(req.getSubId(), req.getToken(), req.getAppType(),
+                            req.getNafUrl(), req.getSecurityProtocol(), req.isForceBootStrapping());
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+
+    /**
+     * Called by the platform when a GBA authentication request is received from
+     * {@link TelephonyManager#bootstrapAuthenticationRequest} to get the KsNAF for
+     * a particular NAF.
+     *
+     * @param subscriptionId the ICC card to be used for the bootstrapping authentication.
+     * @param token the identification of the authentication request.
+     * @param appType icc application type, like {@link #APPTYPE_USIM} or {@link
+     * #APPTYPE_ISIM} or {@link#APPTYPE_UNKNOWN}
+     * @param nafUrl Network Application Function(NAF) fully qualified domain name and
+     * the selected GBA mode. It shall contain two parts delimited by "@" sign. The first
+     * part is the constant string "3GPP-bootstrapping" (GBA_ME),
+     * "3GPP-bootstrapping-uicc" (GBA_ U), or "3GPP-bootstrapping-digest" (GBA_Digest),
+     * and the latter part shall be the FQDN of the NAF (e.g.
+     * "3GPP-bootstrapping@naf1.operator.com" or "3GPP-bootstrapping-uicc@naf1.operator.com",
+     * or "3GPP-bootstrapping-digest@naf1.operator.com").
+     * @param securityProtocol Security protocol identifier between UE and NAF.  See
+     * 3GPP TS 33.220 Annex H. Application can use
+     * {@link UaSecurityProtocolIdentifier#createDefaultUaSpId},
+     * {@link UaSecurityProtocolIdentifier#create3GppUaSpId},
+     * to create the ua security protocol identifier as needed
+     * @param forceBootStrapping true=force bootstrapping, false=do not force
+     * bootstrapping. Bootstrapping shouldn't be forced unless the application sees
+     * authentication errors from the server.
+     * Response is returned via {@link TelephonyManager#BootstrapAuthenticationCallback}
+     * along with the token to identify the request.
+     *
+     * <p>Note that this is not called in the main thread.
+     */
+    public void onAuthenticationRequest(int subscriptionId, int token, @UiccAppTypeExt int appType,
+            @NonNull Uri nafUrl, @NonNull byte[] securityProtocol, boolean forceBootStrapping) {
+        //Default implementation should be overridden by vendor Gba Service. Vendor Gba Service
+        //should handle the gba bootstrap authentication request, and call reportKeysAvailable or
+        //reportAuthenticationFailure to notify the caller accordingly.
+        reportAuthenticationFailure(
+                token, TelephonyManager.GBA_FAILURE_REASON_FEATURE_NOT_SUPPORTED);
+    }
+
+    /**
+     * Called by {@link GbaService} when the previously requested GBA keys are available
+     * (@see onAuthenticationRequest())
+     *
+     * @param token unique identifier of the request.
+     * @param gbaKey KsNaf Response.
+     * @param transactionId Bootstrapping Transaction ID.
+     * @throws RuntimeException when there is remote failure of callback.
+     */
+    public final void reportKeysAvailable(int token, @NonNull byte[] gbaKey,
+            @NonNull String transactionId) throws RuntimeException {
+        IBootstrapAuthenticationCallback cb = null;
+        synchronized (mCallbacks) {
+            cb = mCallbacks.get(token);
+            mCallbacks.remove(token);
+        }
+        if (cb != null) {
+            try {
+                cb.onKeysAvailable(token, gbaKey, transactionId);
+            } catch (RemoteException exception) {
+                throw exception.rethrowAsRuntimeException();
+            }
+        }
+    }
+
+    /**
+     * Invoked when the previously requested GBA key authentication failed
+     * (@see onAuthenticationRequest())
+     *
+     * @param token unique identifier of the request.
+     * @param reason The reason for the authentication failure.
+     * @throws RuntimeException when there is remote failure of callback.
+     */
+    public final void reportAuthenticationFailure(int token,
+            @AuthenticationFailureReason int reason) throws RuntimeException {
+        IBootstrapAuthenticationCallback cb = null;
+        synchronized (mCallbacks) {
+            cb = mCallbacks.get(token);
+            mCallbacks.remove(token);
+        }
+        if (cb != null) {
+            try {
+                cb.onAuthenticationFailure(token, reason);
+            } catch (RemoteException exception) {
+                throw exception.rethrowAsRuntimeException();
+            }
+        }
+    }
+
+    /** @hide */
+    @Override
+    public IBinder onBind(Intent intent) {
+        if (SERVICE_INTERFACE.equals(intent.getAction())) {
+            Log.d(TAG, "GbaService Bound.");
+            return mBinder;
+        }
+        return null;
+    }
+
+    /** @hide */
+    @Override
+    public void onDestroy() {
+        mHandlerThread.quit();
+        super.onDestroy();
+    }
+
+    private class IGbaServiceWrapper extends IGbaService.Stub {
+        @Override
+        public void authenticationRequest(GbaAuthRequest request) {
+            if (DBG) Log.d(TAG, "receive request: " + request);
+            mHandler.obtainMessage(EVENT_GBA_AUTH_REQUEST, request).sendToTarget();
+        }
+    }
+}
diff --git a/telephony/java/android/telephony/gba/IGbaService.aidl b/telephony/java/android/telephony/gba/IGbaService.aidl
new file mode 100644
index 0000000..b7ba5a4
--- /dev/null
+++ b/telephony/java/android/telephony/gba/IGbaService.aidl
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony.gba;
+
+import android.net.Uri;
+import android.telephony.gba.GbaAuthRequest;
+
+/**
+ * @hide
+ */
+interface IGbaService
+{
+    oneway void authenticationRequest(in GbaAuthRequest request);
+}
diff --git a/telephony/java/android/telephony/gba/TlsParams.java b/telephony/java/android/telephony/gba/TlsParams.java
new file mode 100644
index 0000000..922f4bb
--- /dev/null
+++ b/telephony/java/android/telephony/gba/TlsParams.java
@@ -0,0 +1,281 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony.gba;
+
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Arrays;
+
+/**
+ * Defines the TLS parameters for GBA as per IANA and TS 33.210, which are used
+ * by some UA security protocol identifiers defined in 3GPP TS 33.220 Annex H,
+ * and 3GPP TS 33.222.
+ *
+ * @hide
+ */
+@SystemApi
+public class TlsParams {
+
+    private TlsParams() {}
+
+    /**
+     * TLS protocol version supported by GBA
+     */
+    public static final int PROTOCOL_VERSION_TLS_1_2 = 0x0303;
+    public static final int PROTOCOL_VERSION_TLS_1_3 = 0x0304;
+
+    /**
+     * TLS cipher suites are used to create {@link UaSecurityProtocolIdentifier}
+     * by {@link UaSecurityProtocolIdentifier#create3GppUaSpId}
+     *
+     * @hide
+     */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(
+        prefix = {"TLS_"},
+        value = {
+            TLS_NULL_WITH_NULL_NULL,
+            TLS_RSA_WITH_NULL_MD5,
+            TLS_RSA_WITH_NULL_SHA,
+            TLS_RSA_WITH_RC4_128_MD5,
+            TLS_RSA_WITH_RC4_128_SHA,
+            TLS_RSA_WITH_3DES_EDE_CBC_SHA,
+            TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,
+            TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,
+            TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
+            TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
+            TLS_DH_ANON_WITH_RC4_128_MD5,
+            TLS_DH_ANON_WITH_3DES_EDE_CBC_SHA,
+            TLS_RSA_WITH_AES_128_CBC_SHA,
+            TLS_DH_DSS_WITH_AES_128_CBC_SHA,
+            TLS_DH_RSA_WITH_AES_128_CBC_SHA,
+            TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
+            TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
+            TLS_DH_ANON_WITH_AES_128_CBC_SHA,
+            TLS_RSA_WITH_AES_256_CBC_SHA,
+            TLS_DH_DSS_WITH_AES_256_CBC_SHA,
+            TLS_DH_RSA_WITH_AES_256_CBC_SHA,
+            TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
+            TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
+            TLS_DH_ANON_WITH_AES_256_CBC_SHA,
+            TLS_RSA_WITH_NULL_SHA256,
+            TLS_RSA_WITH_AES_128_CBC_SHA256,
+            TLS_RSA_WITH_AES_256_CBC_SHA256,
+            TLS_DH_DSS_WITH_AES_128_CBC_SHA256,
+            TLS_DH_RSA_WITH_AES_128_CBC_SHA256,
+            TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
+            TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
+            TLS_DH_DSS_WITH_AES_256_CBC_SHA256,
+            TLS_DH_RSA_WITH_AES_256_CBC_SHA256,
+            TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
+            TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
+            TLS_DH_ANON_WITH_AES_128_CBC_SHA256,
+            TLS_DH_ANON_WITH_AES_256_CBC_SHA256,
+            TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
+            TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
+            TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,
+            TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,
+            TLS_AES_128_GCM_SHA256,
+            TLS_AES_256_GCM_SHA384,
+            TLS_CHACHA20_POLY1305_SHA256,
+            TLS_AES_128_CCM_SHA256,
+            TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+            TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
+            TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+            TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
+            TLS_DHE_RSA_WITH_AES_128_CCM,
+            TLS_DHE_RSA_WITH_AES_256_CCM,
+            TLS_DHE_PSK_WITH_AES_128_CCM,
+            TLS_DHE_PSK_WITH_AES_256_CCM,
+            TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
+            TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
+            TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
+            TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
+            TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
+            TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256,
+            TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384,
+            TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256
+        })
+    public @interface TlsCipherSuite {}
+
+    // Cipher suites for TLS v1.2 per RFC5246
+    public static final int TLS_NULL_WITH_NULL_NULL = 0x0000;
+    public static final int TLS_RSA_WITH_NULL_MD5 = 0x0001;
+    public static final int TLS_RSA_WITH_NULL_SHA = 0x0002;
+    public static final int TLS_RSA_WITH_RC4_128_MD5 = 0x0004;
+    public static final int TLS_RSA_WITH_RC4_128_SHA = 0x0005;
+    public static final int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A;
+    public static final int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 0x000D;
+    public static final int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 0x0010;
+    public static final int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x0013;
+    public static final int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x0016;
+    public static final int TLS_DH_ANON_WITH_RC4_128_MD5 = 0x0018;
+    public static final int TLS_DH_ANON_WITH_3DES_EDE_CBC_SHA = 0x001B;
+    public static final int TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F;
+    public static final int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 0x0030;
+    public static final int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 0x0031;
+    public static final int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x0032;
+    public static final int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033;
+    public static final int TLS_DH_ANON_WITH_AES_128_CBC_SHA = 0x0034;
+    public static final int TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035;
+    public static final int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 0x0036;
+    public static final int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 0x0037;
+    public static final int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 0x0038;
+    public static final int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x0039;
+    public static final int TLS_DH_ANON_WITH_AES_256_CBC_SHA = 0x003A;
+    public static final int TLS_RSA_WITH_NULL_SHA256 = 0x003B;
+    public static final int TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x003C;
+    public static final int TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x003D;
+    public static final int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 0x003E;
+    public static final int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 0x003F;
+    public static final int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 0x0040;
+    public static final int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x0067;
+    public static final int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 0x0068;
+    public static final int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 0x0069;
+    public static final int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 0x006A;
+    public static final int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x006B;
+    public static final int TLS_DH_ANON_WITH_AES_128_CBC_SHA256 = 0x006C;
+    public static final int TLS_DH_ANON_WITH_AES_256_CBC_SHA256 = 0x006D;
+
+    // Cipher suites for TLS v1.3 per RFC8446 and recommended by IANA
+    public static final int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 0x009E;
+    public static final int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 0x009F;
+    public static final int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 0x00AA;
+    public static final int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 0x00AB;
+    public static final int TLS_AES_128_GCM_SHA256 = 0x1301;
+    public static final int TLS_AES_256_GCM_SHA384 = 0x1302;
+    public static final int TLS_CHACHA20_POLY1305_SHA256 = 0x1303;
+    public static final int TLS_AES_128_CCM_SHA256 = 0x1304;
+    public static final int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B;
+    public static final int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C;
+    public static final int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F;
+    public static final int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030;
+    public static final int TLS_DHE_RSA_WITH_AES_128_CCM = 0xC09E;
+    public static final int TLS_DHE_RSA_WITH_AES_256_CCM = 0xC09F;
+    public static final int TLS_DHE_PSK_WITH_AES_128_CCM = 0xC0A6;
+    public static final int TLS_DHE_PSK_WITH_AES_256_CCM = 0xC0A7;
+    public static final int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8;
+    public static final int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9;
+    public static final int TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAA;
+    public static final int TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAC;
+    public static final int TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAD;
+    public static final int TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256 = 0xD001;
+    public static final int TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384 = 0xD002;
+    public static final int TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256 = 0xD005;
+
+    private static final int[] CS_EXPECTED = {
+        TLS_NULL_WITH_NULL_NULL,
+        TLS_RSA_WITH_NULL_MD5,
+        TLS_RSA_WITH_NULL_SHA,
+        TLS_RSA_WITH_RC4_128_MD5,
+        TLS_RSA_WITH_RC4_128_SHA,
+        TLS_RSA_WITH_3DES_EDE_CBC_SHA,
+        TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,
+        TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,
+        TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
+        TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
+        TLS_DH_ANON_WITH_RC4_128_MD5,
+        TLS_DH_ANON_WITH_3DES_EDE_CBC_SHA,
+        TLS_RSA_WITH_AES_128_CBC_SHA,
+        TLS_DH_DSS_WITH_AES_128_CBC_SHA,
+        TLS_DH_RSA_WITH_AES_128_CBC_SHA,
+        TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
+        TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
+        TLS_DH_ANON_WITH_AES_128_CBC_SHA,
+        TLS_RSA_WITH_AES_256_CBC_SHA,
+        TLS_DH_DSS_WITH_AES_256_CBC_SHA,
+        TLS_DH_RSA_WITH_AES_256_CBC_SHA,
+        TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
+        TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
+        TLS_DH_ANON_WITH_AES_256_CBC_SHA,
+        TLS_RSA_WITH_NULL_SHA256,
+        TLS_RSA_WITH_AES_128_CBC_SHA256,
+        TLS_RSA_WITH_AES_256_CBC_SHA256,
+        TLS_DH_DSS_WITH_AES_128_CBC_SHA256,
+        TLS_DH_RSA_WITH_AES_128_CBC_SHA256,
+        TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
+        TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
+        TLS_DH_DSS_WITH_AES_256_CBC_SHA256,
+        TLS_DH_RSA_WITH_AES_256_CBC_SHA256,
+        TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
+        TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
+        TLS_DH_ANON_WITH_AES_128_CBC_SHA256,
+        TLS_DH_ANON_WITH_AES_256_CBC_SHA256,
+        TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
+        TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
+        TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,
+        TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,
+        TLS_AES_128_GCM_SHA256,
+        TLS_AES_256_GCM_SHA384,
+        TLS_CHACHA20_POLY1305_SHA256,
+        TLS_AES_128_CCM_SHA256,
+        TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+        TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
+        TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+        TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
+        TLS_DHE_RSA_WITH_AES_128_CCM,
+        TLS_DHE_RSA_WITH_AES_256_CCM,
+        TLS_DHE_PSK_WITH_AES_128_CCM,
+        TLS_DHE_PSK_WITH_AES_256_CCM,
+        TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
+        TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
+        TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
+        TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
+        TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
+        TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256,
+        TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384,
+        TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256
+    };
+
+    /**
+     * TLS supported groups required by TS 33.210
+     */
+    public static final int GROUP_SECP256R1 = 23;
+    public static final int GROUP_SECP384R1 = 24;
+    public static final int GROUP_X25519 = 29;
+    public static final int GROUP_X448 = 30;
+
+    /**
+     * Signature algorithms shall be supported as per TS 33.210
+     */
+    public static final int SIG_RSA_PKCS1_SHA1 = 0X0201;
+    public static final int SIG_ECDSA_SHA1 = 0X0203;
+    public static final int SIG_RSA_PKCS1_SHA256 = 0X0401;
+    public static final int SIG_ECDSA_SECP256R1_SHA256 = 0X0403;
+    public static final int SIG_RSA_PKCS1_SHA256_LEGACY = 0X0420;
+    public static final int SIG_RSA_PKCS1_SHA384 = 0X0501;
+    public static final int SIG_ECDSA_SECP384R1_SHA384 = 0X0503;
+    public static final int SIG_RSA_PKCS1_SHA384_LEGACY = 0X0520;
+    public static final int SIG_RSA_PKCS1_SHA512 = 0X0601;
+    public static final int SIG_ECDSA_SECP521R1_SHA512 = 0X0603;
+    public static final int SIG_RSA_PKCS1_SHA512_LEGACY = 0X0620;
+    public static final int SIG_RSA_PSS_RSAE_SHA256 = 0X0804;
+    public static final int SIG_RSA_PSS_RSAE_SHA384 = 0X0805;
+    public static final int SIG_RSA_PSS_RSAE_SHA512 = 0X0806;
+    public static final int SIG_ECDSA_BRAINPOOLP256R1TLS13_SHA256 = 0X081A;
+    public static final int SIG_ECDSA_BRAINPOOLP384R1TLS13_SHA384 = 0X081B;
+    public static final int SIG_ECDSA_BRAINPOOLP512R1TLS13_SHA512 = 0X081C;
+
+    /**
+     * Returns whether the TLS cipher suite id is supported
+     */
+    public static boolean isTlsCipherSuiteSupported(int csId) {
+        return Arrays.binarySearch(CS_EXPECTED, csId) >= 0;
+    }
+}
diff --git a/telephony/java/android/telephony/gba/UaSecurityProtocolIdentifier.aidl b/telephony/java/android/telephony/gba/UaSecurityProtocolIdentifier.aidl
new file mode 100644
index 0000000..a71e860
--- /dev/null
+++ b/telephony/java/android/telephony/gba/UaSecurityProtocolIdentifier.aidl
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony.gba;
+
+parcelable UaSecurityProtocolIdentifier;
diff --git a/telephony/java/android/telephony/gba/UaSecurityProtocolIdentifier.java b/telephony/java/android/telephony/gba/UaSecurityProtocolIdentifier.java
new file mode 100644
index 0000000..c141875
--- /dev/null
+++ b/telephony/java/android/telephony/gba/UaSecurityProtocolIdentifier.java
@@ -0,0 +1,436 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony.gba;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.telephony.gba.TlsParams.TlsCipherSuite;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.nio.ByteBuffer;
+import java.util.Objects;
+
+/**
+ * Description of ua security protocol identifier defined in 3GPP TS 33.220 H.2
+ * @hide
+ */
+@SystemApi
+public final class UaSecurityProtocolIdentifier implements Parcelable {
+
+    /**
+     * Organization code defined in 3GPP TS 33.220 H.3
+     *
+     * @hide
+     */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = {"ORG_"}, value = {
+        ORG_NONE,
+        ORG_3GPP,
+        ORG_3GPP2,
+        ORG_OMA,
+        ORG_GSMA,
+        ORG_LOCAL})
+    public @interface OrganizationCode {}
+
+    /**
+     * Organization octet value for default ua security protocol
+     */
+    public static final int ORG_NONE  = 0;
+    /**
+     * Organization octet value for 3GPP ua security protocol
+     */
+    public static final int ORG_3GPP  = 0x01;
+    /**
+     * Organization octet value for 3GPP2 ua security protocol
+     */
+    public static final int ORG_3GPP2 = 0x02;
+    /**
+     * Organization octet value for OMA ua security protocol
+     */
+    public static final int ORG_OMA   = 0x03;
+    /**
+     * Organization octet value for GSMA ua security protocol
+     */
+    public static final int ORG_GSMA  = 0x04;
+    /**
+     * Internal organization octet value for local/experimental protocols
+     */
+    public static final int ORG_LOCAL = 0xFF;
+
+    /**
+     * 3GPP UA Security Protocol ID defined in 3GPP TS 33.220 H.3
+     *
+     * @hide
+     */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(prefix = {"UA_SECURITY_PROTOCOL_3GPP_"}, value = {
+        UA_SECURITY_PROTOCOL_3GPP_SUBSCRIBER_CERTIFICATE,
+        UA_SECURITY_PROTOCOL_3GPP_MBMS,
+        UA_SECURITY_PROTOCOL_3GPP_HTTP_DIGEST_AUTHENTICATION,
+        UA_SECURITY_PROTOCOL_3GPP_HTTP_BASED_MBMS,
+        UA_SECURITY_PROTOCOL_3GPP_SIP_BASED_MBMS,
+        UA_SECURITY_PROTOCOL_3GPP_GENERIC_PUSH_LAYER,
+        UA_SECURITY_PROTOCOL_3GPP_IMS_MEDIA_PLANE,
+        UA_SECURITY_PROTOCOL_3GPP_GENERATION_TMPI,
+        UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT,
+        UA_SECURITY_PROTOCOL_3GPP_TLS_BROWSER})
+    public @interface UaSecurityProtocol3gpp {}
+
+    /**
+     * Security protocol param according to TS 33.221 as described in TS
+     * 33.220 Annex H. Mapped to byte stream "0x01,0x00,0x00,0x00,0x00".
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_SUBSCRIBER_CERTIFICATE = 0;
+
+    /**
+     * Security protocol param according to TS 33.246 for Multimedia
+     * broadcast/Multimedia services (MBMS) as described in TS
+     * 33.220 Annex H. Mapped to byte stream "0x01,0x00,0x00,0x00,0x01".
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_MBMS = 1;
+
+    /**
+     * Security protocol param based on HTTP digest authentication
+     * according to TS 24.109 as described in TS 33.220 Annex H. Mapped to
+     * byte stream "0x01,0x00,0x00,0x00,0x02".
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_HTTP_DIGEST_AUTHENTICATION = 2;
+
+    /**
+     * Security protocol param used with HTTP-based security procedures for
+     * Multimedia broadcast/Multimedia services (MBMS) user services
+     * according to TS 26.237 as described in TS 33.220 Annex H.
+     * Mapped to byte stream "0x01,0x00,0x00,0x00,0x03".
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_HTTP_BASED_MBMS = 3;
+
+    /**
+     * Security protocol param used with SIP-based security procedures for
+     * Multimedia broadcast/Multimedia services (MBMS) user services
+     * according to TS 26.237 as described in TS 33.220 Annex H.
+     * Mapped to byte stream "0x01,0x00,0x00,0x00,0x04".
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_SIP_BASED_MBMS = 4;
+
+    /**
+     * Security protocol param used with Generic Push Layer according to TS
+     * 33.224  as described in TS 33.220 Annex H. Mapped to byte stream
+     * "0x01,0x00,0x00,0x00,0x05".
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_GENERIC_PUSH_LAYER = 5;
+
+    /**
+     * Security protocol param used for IMS UE to KMS http based message
+     * exchanges according to "IMS media plane security", TS 33.328   as
+     * described in TS 33.220 Annex H. Mapped to byte stream
+     * "0x01,0x00,0x00,0x00,0x06".
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_IMS_MEDIA_PLANE = 6;
+
+    /**
+     * Security protocol param used for Generation of Temporary IP
+     * Multimedia Private Identity (TMPI) according to TS 33.220 Annex B.4
+     * Mapped to byte stream "0x01,0x00,0x00,0x01,0x00".
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_GENERATION_TMPI = 0x0100;
+
+    /**
+     * Security protocol param used for Shared key-based UE authentication with
+     * certificate-based NAF authentication, according to TS 33.222 section 5.3,
+     * or Shared key-based mutual authentication between UE and NAF, according to
+     * TS 33.222 section 5.4. Mapped to byte stream "0x01,0x00,0x01,yy,zz".
+     * "yy, zz" is the TLS CipherSuite code.
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT = 0x010000;
+
+    /**
+     * Security protocol param used for Shared key-based UE authentication with
+     * certificate-based NAF authentication, according to TS 33.222 Annex D.
+     * Mapped to byte stream "0x01,0x00,0x02,yy,zz".
+     * "yy, zz" is the TLS CipherSuite code.
+     */
+    public static final int UA_SECURITY_PROTOCOL_3GPP_TLS_BROWSER = 0x020000;
+
+    private static final int PROTOCOL_SIZE = 5;
+    private static final int[] sUaSp3gppIds = new int[] {
+            UA_SECURITY_PROTOCOL_3GPP_SUBSCRIBER_CERTIFICATE,
+            UA_SECURITY_PROTOCOL_3GPP_MBMS,
+            UA_SECURITY_PROTOCOL_3GPP_HTTP_DIGEST_AUTHENTICATION,
+            UA_SECURITY_PROTOCOL_3GPP_HTTP_BASED_MBMS,
+            UA_SECURITY_PROTOCOL_3GPP_SIP_BASED_MBMS,
+            UA_SECURITY_PROTOCOL_3GPP_GENERIC_PUSH_LAYER,
+            UA_SECURITY_PROTOCOL_3GPP_IMS_MEDIA_PLANE,
+            UA_SECURITY_PROTOCOL_3GPP_GENERATION_TMPI,
+            UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT,
+            UA_SECURITY_PROTOCOL_3GPP_TLS_BROWSER};
+
+    private int mOrg;
+    private int mProtocol;
+    private int mTlsCipherSuite;
+
+    private UaSecurityProtocolIdentifier() {}
+
+    private UaSecurityProtocolIdentifier(UaSecurityProtocolIdentifier sp) {
+        mOrg = sp.mOrg;
+        mProtocol = sp.mProtocol;
+        mTlsCipherSuite = sp.mTlsCipherSuite;
+    }
+
+    /**
+     * Returns the byte array representing the ua security protocol
+     */
+    @NonNull
+    public byte[] toByteArray() {
+        byte[] data = new byte[PROTOCOL_SIZE];
+        ByteBuffer buf = ByteBuffer.wrap(data);
+        buf.put((byte) mOrg);
+        buf.putInt(mProtocol | mTlsCipherSuite);
+        return data;
+    }
+
+    /**
+     * Returns the organization code
+     */
+    public @OrganizationCode int getOrg() {
+        return mOrg;
+    }
+
+    /**
+     * Returns the security procotol id
+     *
+     * <p>Note that only 3GPP UA Security Protocols are supported for now
+     */
+    public @UaSecurityProtocol3gpp int getProtocol() {
+        return mProtocol;
+    }
+
+    /**
+     * Returns the TLS cipher suite
+     */
+    public @TlsCipherSuite int getTlsCipherSuite() {
+        return mTlsCipherSuite;
+    }
+
+    /**
+     * {@link Parcelable#writeToParcel}
+     */
+    @Override
+    public void writeToParcel(@NonNull Parcel out, int flags) {
+        out.writeInt(mOrg);
+        out.writeInt(mProtocol);
+        out.writeInt(mTlsCipherSuite);
+    }
+
+    /**
+     * {@link Parcelable.Creator}
+     *
+     */
+    public static final @NonNull Parcelable.Creator<
+            UaSecurityProtocolIdentifier> CREATOR = new Creator<UaSecurityProtocolIdentifier>() {
+                @Nullable
+                @Override
+                public UaSecurityProtocolIdentifier createFromParcel(Parcel in) {
+                    int org = in.readInt();
+                    int protocol = in.readInt();
+                    int cs = in.readInt();
+                    if (org < 0 || protocol < 0 || cs < 0) {
+                        return null;
+                    }
+                    Builder builder = new Builder();
+                    try {
+                        if (org > 0) {
+                            builder.setOrg(org);
+                        }
+                        if (protocol > 0) {
+                            builder.setProtocol(protocol);
+                        }
+                        if (cs > 0) {
+                            builder.setTlsCipherSuite(cs);
+                        }
+                    } catch (IllegalArgumentException e) {
+                        return null;
+                    }
+                    return builder.build();
+                }
+
+                @NonNull
+                @Override
+                public UaSecurityProtocolIdentifier[] newArray(int size) {
+                    return new UaSecurityProtocolIdentifier[size];
+                }
+            };
+
+    /**
+     * {@link Parcelable#describeContents}
+     */
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return "UaSecurityProtocolIdentifier[" + mOrg + " , " + (mProtocol | mTlsCipherSuite) + "]";
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof UaSecurityProtocolIdentifier)) {
+            return false;
+        }
+
+        UaSecurityProtocolIdentifier other = (UaSecurityProtocolIdentifier) obj;
+
+        return mOrg == other.mOrg && mProtocol == other.mProtocol
+                && mTlsCipherSuite == other.mTlsCipherSuite;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(mOrg, mProtocol, mTlsCipherSuite);
+    }
+
+    private boolean isTlsSupported() {
+        //TODO May update to support non 3gpp protocol in the future
+        if (mOrg == ORG_3GPP && (mProtocol == UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT
+                    || mProtocol == UA_SECURITY_PROTOCOL_3GPP_TLS_BROWSER)) {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Builder class for UaSecurityProtocolIdentifier
+     */
+    public static final class Builder {
+        private final UaSecurityProtocolIdentifier mSp;
+
+        /**
+         * Creates a Builder with default UaSecurityProtocolIdentifier, a.k.a 0x00 00 00 00 00
+         */
+        public Builder() {
+            mSp = new UaSecurityProtocolIdentifier();
+        }
+
+        /**
+         * Creates a Builder from a UaSecurityProtocolIdentifier
+         */
+        public Builder(@NonNull final UaSecurityProtocolIdentifier sp) {
+            Objects.requireNonNull(sp);
+            mSp = new UaSecurityProtocolIdentifier(sp);
+        }
+
+        /**
+         * Sets the organization code
+         *
+         * @param orgCode the organization code with the following value
+         * <ol>
+         * <li>{@link #ORG_NONE} </li>
+         * <li>{@link #ORG_3GPP} </li>
+         * <li>{@link #ORG_3GPP2} </li>
+         * <li>{@link #ORG_OMA} </li>
+         * <li>{@link #ORG_GSMA} </li>
+         * <li>{@link #ORG_LOCAL} </li>
+         * </ol>
+         * @throws IllegalArgumentException if it is not one of the value above.
+         *
+         * <p>Note that this method will reset the security protocol and TLS cipher suite
+         * if they have been set.
+         */
+        @NonNull
+        public Builder setOrg(@OrganizationCode int orgCode) {
+            if (orgCode < ORG_NONE || orgCode > ORG_LOCAL) {
+                throw new IllegalArgumentException("illegal organization code");
+            }
+            mSp.mOrg = orgCode;
+            mSp.mProtocol = 0;
+            mSp.mTlsCipherSuite = 0;
+            return this;
+        }
+
+        /**
+         * Sets the UA security protocol for 3GPP
+         *
+         * @param protocol only 3GPP ua security protocol ID is supported for now, which
+         * is one of the following value
+         * <ol>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_SUBSCRIBER_CERTIFICATE} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_MBMS} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_HTTP_DIGEST_AUTHENTICATION} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_HTTP_BASED_MBMS} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_SIP_BASED_MBMS} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_GENERIC_PUSH_LAYER} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_IMS_MEDIA_PLANE} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_GENERATION_TMPI} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT} </li>
+         * <li>{@link #UA_SECURITY_PROTOCOL_3GPP_TLS_BROWSER} </li>
+         * </ol>
+         * @throws IllegalArgumentException if the protocol is not one of the value above.
+         *
+         * <p>Note that this method will reset TLS cipher suite if it has been set.
+         */
+        @NonNull
+        public Builder setProtocol(@UaSecurityProtocol3gpp int protocol) {
+            //TODO May update to support non 3gpp protocol in the future
+            if (protocol < UA_SECURITY_PROTOCOL_3GPP_SUBSCRIBER_CERTIFICATE
+                    || (protocol > UA_SECURITY_PROTOCOL_3GPP_IMS_MEDIA_PLANE
+                    && protocol != UA_SECURITY_PROTOCOL_3GPP_GENERATION_TMPI
+                    && protocol != UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT
+                    && protocol != UA_SECURITY_PROTOCOL_3GPP_TLS_BROWSER)
+                    || mSp.mOrg != ORG_3GPP) {
+                throw new IllegalArgumentException("illegal protocol code");
+            }
+            mSp.mProtocol = protocol;
+            mSp.mTlsCipherSuite = 0;
+            return this;
+        }
+
+        /**
+         * Sets the UA security protocol for 3GPP
+         *
+         * @param cs TLS cipher suite value defined by {@link TlsParams#TlsCipherSuite}
+         * @throws IllegalArgumentException if it is not a 3GPP ua security protocol,
+         * the protocol does not support TLS, or does not support the cipher suite.
+         */
+        @NonNull
+        public Builder setTlsCipherSuite(@TlsCipherSuite int cs) {
+            if (!mSp.isTlsSupported()) {
+                throw new IllegalArgumentException("The protocol does not support TLS");
+            }
+            if (!TlsParams.isTlsCipherSuiteSupported(cs)) {
+                throw new IllegalArgumentException("TLS cipher suite is not supported");
+            }
+            mSp.mTlsCipherSuite = cs;
+            return this;
+        }
+
+        /**
+         * Builds the instance of UaSecurityProtocolIdentifier
+         *
+         * @return the built instance of UaSecurityProtocolIdentifier
+         */
+        @NonNull
+        public UaSecurityProtocolIdentifier build() {
+            return new UaSecurityProtocolIdentifier(mSp);
+        }
+    }
+}
diff --git a/telephony/java/android/telephony/gsm/OWNERS b/telephony/java/android/telephony/gsm/OWNERS
new file mode 100644
index 0000000..6aa399d
--- /dev/null
+++ b/telephony/java/android/telephony/gsm/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+amitmahajan@google.com
diff --git a/telephony/java/android/telephony/ims/DelegateMessageCallback.java b/telephony/java/android/telephony/ims/DelegateMessageCallback.java
index beec4a6..0d82a54 100644
--- a/telephony/java/android/telephony/ims/DelegateMessageCallback.java
+++ b/telephony/java/android/telephony/ims/DelegateMessageCallback.java
@@ -17,6 +17,7 @@
 package android.telephony.ims;
 
 import android.annotation.NonNull;
+import android.annotation.SystemApi;
 import android.telephony.ims.stub.SipDelegate;
 
 /**
@@ -30,6 +31,7 @@
  * </ul>
  * @hide
  */
+@SystemApi
 public interface DelegateMessageCallback {
 
     /**
diff --git a/telephony/java/android/telephony/ims/DelegateRegistrationState.java b/telephony/java/android/telephony/ims/DelegateRegistrationState.java
index 4facfa7..66281ed 100644
--- a/telephony/java/android/telephony/ims/DelegateRegistrationState.java
+++ b/telephony/java/android/telephony/ims/DelegateRegistrationState.java
@@ -18,14 +18,14 @@
 
 import android.annotation.IntDef;
 import android.annotation.NonNull;
+import android.annotation.SuppressLint;
+import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.util.ArraySet;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Objects;
 import java.util.Set;
 
@@ -34,6 +34,7 @@
  * ImsService.
  * @hide
  */
+@SystemApi
 public final class DelegateRegistrationState implements Parcelable {
 
     /**
@@ -61,7 +62,8 @@
     /**
      * This feature tag is being deregistered because the PDN that the IMS registration is on is
      *changing.
-     * All open SIP dialogs need to be closed before the PDN change can proceed.
+     * All open SIP dialogs need to be closed before the PDN change can proceed using
+     * {@link SipDelegateConnection#closeDialog(String)}.
      */
     public static final int DEREGISTERING_REASON_PDN_CHANGE = 3;
 
@@ -72,7 +74,8 @@
      * a user triggered hange, such as data being enabled/disabled.
      * <p>
      * All open SIP dialogs associated with the new deprovisioned feature tag need to be closed
-     * before the IMS registration modification can proceed.
+     * using {@link SipDelegateConnection#closeDialog(String)} before the IMS registration
+     * modification can proceed.
      */
     public static final int DEREGISTERING_REASON_PROVISIONING_CHANGE = 4;
 
@@ -80,8 +83,8 @@
      * This feature tag is deregistering because the SipDelegate associated with this feature tag
      * needs to change its supported feature set.
      * <p>
-     * All open SIP Dialogs associated with this feature tag must be closed before this operation
-     * can proceed.
+     * All open SIP Dialogs associated with this feature tag must be  closed
+     * using {@link SipDelegateConnection#closeDialog(String)} before this operation can proceed.
      */
     public static final int DEREGISTERING_REASON_FEATURE_TAGS_CHANGING = 5;
 
@@ -89,8 +92,8 @@
      * This feature tag is deregistering because the SipDelegate is in the process of being
      * destroyed.
      * <p>
-     * All open SIP Dialogs associated with this feature tag must be closed before this operation
-     * can proceed.
+     * All open SIP Dialogs associated with this feature tag must be closed
+     * using {@link SipDelegateConnection#closeDialog(String)} before this operation can proceed.
      */
     public static final int DEREGISTERING_REASON_DESTROY_PENDING = 6;
 
@@ -114,14 +117,14 @@
     })
     public @interface DeregisteringReason {}
 
-    private final ArrayList<String> mRegisteredTags = new ArrayList<>();
-    private final ArrayList<FeatureTagState> mDeregisteringTags = new ArrayList<>();
-    private final ArrayList<FeatureTagState> mDeregisteredTags = new ArrayList<>();
+    private ArraySet<String> mRegisteredTags = new ArraySet<>();
+    private final ArraySet<FeatureTagState> mDeregisteringTags = new ArraySet<>();
+    private final ArraySet<FeatureTagState> mDeregisteredTags = new ArraySet<>();
 
     /**
      * Builder used to create new instances of {@link DelegateRegistrationState}.
      */
-    public static class Builder {
+    public static final class Builder {
 
         private final DelegateRegistrationState mState;
 
@@ -135,10 +138,8 @@
          * @param featureTag The IMS media feature tag included in the current IMS registration.
          * @return The in-progress Builder instance for RegistrationState.
          */
-        public Builder addRegisteredFeatureTag(@NonNull String featureTag) {
-            if (!mState.mRegisteredTags.contains(featureTag)) {
-                mState.mRegisteredTags.add(featureTag);
-            }
+        public @NonNull Builder addRegisteredFeatureTag(@NonNull String featureTag) {
+            mState.mRegisteredTags.add(featureTag);
             return this;
         }
 
@@ -148,7 +149,8 @@
          * @param featureTags The IMS media feature tags included in the current IMS registration.
          * @return The in-progress Builder instance for RegistrationState.
          */
-        public Builder addRegisteredFeatureTags(@NonNull Set<String> featureTags) {
+        @SuppressLint("MissingGetterMatchingBuilder")
+        public @NonNull Builder addRegisteredFeatureTags(@NonNull Set<String> featureTags) {
             mState.mRegisteredTags.addAll(featureTags);
             return this;
         }
@@ -167,13 +169,9 @@
          *         The availability of the feature tag depends on the {@link DeregisteringReason}.
          * @return The in-progress Builder instance for RegistrationState.
          */
-        public Builder addDeregisteringFeatureTag(@NonNull String featureTag,
+        public @NonNull Builder addDeregisteringFeatureTag(@NonNull String featureTag,
                 @DeregisteringReason int reason) {
-            boolean ftExists = mState.mDeregisteringTags.stream().anyMatch(
-                    f -> f.getFeatureTag().equals(featureTag));
-            if (!ftExists) {
-                mState.mDeregisteringTags.add(new FeatureTagState(featureTag, reason));
-            }
+            mState.mDeregisteringTags.add(new FeatureTagState(featureTag, reason));
             return this;
         }
 
@@ -185,20 +183,16 @@
          * @param reason The reason why the media feature tag has been deregistered.
          * @return The in-progress Builder instance for RegistrationState.
          */
-        public Builder addDeregisteredFeatureTag(@NonNull String featureTag,
+        public @NonNull Builder addDeregisteredFeatureTag(@NonNull String featureTag,
                 @DeregisteredReason int reason) {
-            boolean ftExists = mState.mDeregisteredTags.stream().anyMatch(
-                    f -> f.getFeatureTag().equals(featureTag));
-            if (!ftExists) {
-                mState.mDeregisteredTags.add(new FeatureTagState(featureTag, reason));
-            }
+            mState.mDeregisteredTags.add(new FeatureTagState(featureTag, reason));
             return this;
         }
 
         /**
          * @return the finalized instance.
          */
-        public DelegateRegistrationState build() {
+        public @NonNull DelegateRegistrationState build() {
             return mState;
         }
     }
@@ -212,7 +206,7 @@
      * Used for unparcelling only.
      */
     private DelegateRegistrationState(Parcel source) {
-        source.readList(mRegisteredTags, null /*classloader*/);
+        mRegisteredTags = (ArraySet<String>) source.readArraySet(null);
         readStateFromParcel(source, mDeregisteringTags);
         readStateFromParcel(source, mDeregisteredTags);
     }
@@ -268,7 +262,8 @@
         return new ArraySet<>(mDeregisteredTags);
     }
 
-    public static final Creator<DelegateRegistrationState> CREATOR =
+
+    public static final @NonNull Creator<DelegateRegistrationState> CREATOR =
             new Creator<DelegateRegistrationState>() {
         @Override
         public DelegateRegistrationState createFromParcel(Parcel source) {
@@ -287,13 +282,13 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeList(mRegisteredTags);
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        dest.writeArraySet(mRegisteredTags);
         writeStateToParcel(dest, mDeregisteringTags);
         writeStateToParcel(dest, mDeregisteredTags);
     }
 
-    private void writeStateToParcel(Parcel dest, List<FeatureTagState> state) {
+    private void writeStateToParcel(Parcel dest, Set<FeatureTagState> state) {
         dest.writeInt(state.size());
         for (FeatureTagState s : state) {
             dest.writeString(s.getFeatureTag());
@@ -301,11 +296,12 @@
         }
     }
 
-    private void readStateFromParcel(Parcel source, List<FeatureTagState> emptyState) {
+    private void readStateFromParcel(Parcel source, Set<FeatureTagState> emptyState) {
         int len = source.readInt();
         for (int i = 0; i < len; i++) {
             String ft = source.readString();
             int reason = source.readInt();
+
             emptyState.add(new FeatureTagState(ft, reason));
         }
     }
diff --git a/telephony/java/android/telephony/ims/DelegateRequest.java b/telephony/java/android/telephony/ims/DelegateRequest.java
index 73d0840..c322d92 100644
--- a/telephony/java/android/telephony/ims/DelegateRequest.java
+++ b/telephony/java/android/telephony/ims/DelegateRequest.java
@@ -17,6 +17,7 @@
 package android.telephony.ims;
 
 import android.annotation.NonNull;
+import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.telephony.ims.stub.SipDelegate;
@@ -31,6 +32,7 @@
  * SipDelegateConnection given back to the requesting application.
  * @hide
  */
+@SystemApi
 public final class DelegateRequest implements Parcelable {
 
     private final ArrayList<String> mFeatureTags;
@@ -52,7 +54,7 @@
      * @return the list of IMS feature tag associated with this DelegateRequest in the format
      * defined in RCC.07 section 2.6.1.3.
      */
-    public Set<String> getFeatureTags() {
+    public @NonNull Set<String> getFeatureTags() {
         return new ArraySet<>(mFeatureTags);
     }
 
@@ -70,7 +72,7 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeList(mFeatureTags);
     }
 
diff --git a/telephony/java/android/telephony/ims/DelegateStateCallback.java b/telephony/java/android/telephony/ims/DelegateStateCallback.java
index 0f1afc4..fb65949 100644
--- a/telephony/java/android/telephony/ims/DelegateStateCallback.java
+++ b/telephony/java/android/telephony/ims/DelegateStateCallback.java
@@ -18,10 +18,11 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.SystemApi;
 import android.telephony.ims.stub.SipDelegate;
 import android.telephony.ims.stub.SipTransportImplBase;
 
-import java.util.List;
+import java.util.Set;
 
 /**
  * Callback interface to notify a remote application of the following:
@@ -34,26 +35,24 @@
  * </ul>
  * @hide
  */
+@SystemApi
 public interface DelegateStateCallback {
 
     /**
      * This must be called by the ImsService after {@link SipTransportImplBase#createSipDelegate} is
      * called by the framework to notify the framework and remote application that the
      * {@link SipDelegate} has been successfully created.
-     *
-     * @param delegate The SipDelegate created to service the DelegateRequest.
-     * @param deniedTags A List of {@link FeatureTagState}, which contains the feature tags
+     *  @param delegate The SipDelegate created to service the DelegateRequest.
+     * @param deniedTags A Set of {@link FeatureTagState}s, which contain the feature tags
      *    associated with this {@link SipDelegate} that have no access to send/receive SIP messages
      *    as well as a reason for why the feature tag is denied. For more information on the reason
      *    why the feature tag was denied access, see the
      *    {@link SipDelegateManager.DeniedReason} reasons. This is considered a permanent denial due
      *    to this {@link SipDelegate} not supporting a feature or this ImsService already
      *    implementing this feature elsewhere. If all features of this {@link SipDelegate} are
-     *    denied, {@link #onCreated(SipDelegate, List)} should still be called as the framework will
-     *    later call {@link SipTransportImplBase#destroySipDelegate(SipDelegate, int)} to clean the
-     *    delegate up.
+     *    denied, this method should still be called.
      */
-    void onCreated(@NonNull SipDelegate delegate, @Nullable List<FeatureTagState> deniedTags);
+    void onCreated(@NonNull SipDelegate delegate, @Nullable Set<FeatureTagState> deniedTags);
 
     /**
      * This must be called by the ImsService after the framework calls
diff --git a/telephony/java/android/telephony/ims/FeatureTagState.java b/telephony/java/android/telephony/ims/FeatureTagState.java
index 060be6f..3622065 100644
--- a/telephony/java/android/telephony/ims/FeatureTagState.java
+++ b/telephony/java/android/telephony/ims/FeatureTagState.java
@@ -17,6 +17,7 @@
 package android.telephony.ims;
 
 import android.annotation.NonNull;
+import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.telephony.ims.stub.DelegateConnectionStateCallback;
@@ -39,6 +40,7 @@
  * currently available.
  * @hide
  */
+@SystemApi
 public final class FeatureTagState implements Parcelable {
 
     private final String mFeatureTag;
@@ -48,8 +50,8 @@
      * Associate an IMS feature tag with its current state. See {@link DelegateRegistrationState}
      * and {@link DelegateConnectionStateCallback#onFeatureTagStatusChanged(
      * DelegateRegistrationState, List)} and
-     * {@link DelegateStateCallback#onCreated(SipDelegate, List)} for examples on how and when this
-     * is used.
+     * {@link DelegateStateCallback#onCreated(SipDelegate, java.util.Set)} for examples on how and
+     * when this is used.
      *
      * @param featureTag The IMS feature tag that is deregistered, in the process of
      *                   deregistering, or denied.
@@ -93,12 +95,12 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeString(mFeatureTag);
         dest.writeInt(mState);
     }
 
-    public static final Creator<FeatureTagState> CREATOR = new Creator<FeatureTagState>() {
+    public static final @NonNull Creator<FeatureTagState> CREATOR = new Creator<FeatureTagState>() {
         @Override
         public FeatureTagState createFromParcel(Parcel source) {
             return new FeatureTagState(source);
diff --git a/telephony/java/android/telephony/ims/ImsExternalCallState.java b/telephony/java/android/telephony/ims/ImsExternalCallState.java
index fdf636c..c663e39 100644
--- a/telephony/java/android/telephony/ims/ImsExternalCallState.java
+++ b/telephony/java/android/telephony/ims/ImsExternalCallState.java
@@ -49,8 +49,7 @@
     public static final int CALL_STATE_TERMINATED = 2;
 
     /**@hide*/
-    @IntDef(flag = true,
-            value = {
+    @IntDef(value = {
                     CALL_STATE_CONFIRMED,
                     CALL_STATE_TERMINATED
             },
@@ -59,8 +58,7 @@
     public @interface ExternalCallState {}
 
     /**@hide*/
-    @IntDef(flag = true,
-            value = {
+    @IntDef(value = {
                     ImsCallProfile.CALL_TYPE_VOICE,
                     ImsCallProfile.CALL_TYPE_VT_TX,
                     ImsCallProfile.CALL_TYPE_VT_RX,
diff --git a/telephony/java/android/telephony/ims/ImsReasonInfo.java b/telephony/java/android/telephony/ims/ImsReasonInfo.java
index 184477a..c140249 100644
--- a/telephony/java/android/telephony/ims/ImsReasonInfo.java
+++ b/telephony/java/android/telephony/ims/ImsReasonInfo.java
@@ -1322,6 +1322,13 @@
      */
     public static final int EXTRA_CODE_CALL_RETRY_BY_SETTINGS = 3;
 
+    /**
+     * An extra that may be populated when the {@link #CODE_LOCAL_CALL_CS_RETRY_REQUIRED} result has
+     * been returned.
+     * <p>
+     * Try to connect the call using CS as emergency
+     */
+    public static final int EXTRA_CODE_CALL_RETRY_EMERGENCY = 4;
 
     // For main reason code
     /** @hide */
diff --git a/telephony/java/android/telephony/ims/ImsSsData.java b/telephony/java/android/telephony/ims/ImsSsData.java
index fb8e5d3..868dea6a 100644
--- a/telephony/java/android/telephony/ims/ImsSsData.java
+++ b/telephony/java/android/telephony/ims/ImsSsData.java
@@ -72,7 +72,7 @@
 
 
     /**@hide*/
-    @IntDef(flag = true, prefix = {"SS_"}, value = {
+    @IntDef(prefix = {"SS_"}, value = {
             SS_ACTIVATION,
             SS_DEACTIVATION,
             SS_INTERROGATION,
@@ -89,7 +89,7 @@
     public static final int SS_ERASURE = 4;
 
     /**@hide*/
-    @IntDef(flag = true, prefix = {"SS_"}, value = {
+    @IntDef(prefix = {"SS_"}, value = {
             SS_ALL_TELE_AND_BEARER_SERVICES,
             SS_ALL_TELESEVICES,
             SS_TELEPHONY,
@@ -190,7 +190,7 @@
     public static final int RESULT_SUCCESS = 0;
 
     /** @hide */
-    @IntDef(flag = true, prefix = { "SS_" }, value = {
+    @IntDef(prefix = { "SS_" }, value = {
             SS_CFU,
             SS_CF_BUSY,
             SS_CF_NO_REPLY,
diff --git a/telephony/java/android/telephony/ims/OWNERS b/telephony/java/android/telephony/ims/OWNERS
new file mode 100644
index 0000000..0854c5d
--- /dev/null
+++ b/telephony/java/android/telephony/ims/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+breadley@google.com
diff --git a/telephony/java/android/telephony/ims/RcsContactUceCapability.java b/telephony/java/android/telephony/ims/RcsContactUceCapability.java
index d12a6ae..5848be8 100644
--- a/telephony/java/android/telephony/ims/RcsContactUceCapability.java
+++ b/telephony/java/android/telephony/ims/RcsContactUceCapability.java
@@ -105,10 +105,17 @@
     public @interface RequestResult {}
 
     /**
+     * The base class of {@link OptionsBuilder} and {@link PresenceBuilder}
+     */
+    public static abstract class RcsUcsCapabilityBuilder {
+        public abstract @NonNull RcsContactUceCapability build();
+    }
+
+    /**
      * Builder to help construct {@link RcsContactUceCapability} instances when capabilities were
      * queried through SIP OPTIONS.
      */
-    public static class OptionsBuilder {
+    public static class OptionsBuilder extends RcsUcsCapabilityBuilder {
 
         private final RcsContactUceCapability mCapabilities;
 
@@ -155,6 +162,7 @@
         /**
          * @return the constructed instance.
          */
+        @Override
         public @NonNull RcsContactUceCapability build() {
             return mCapabilities;
         }
@@ -164,7 +172,7 @@
      * Builder to help construct {@link RcsContactUceCapability} instances when capabilities were
      * queried through a presence server.
      */
-    public static class PresenceBuilder {
+    public static class PresenceBuilder extends RcsUcsCapabilityBuilder {
 
         private final RcsContactUceCapability mCapabilities;
 
@@ -205,6 +213,7 @@
         /**
          * @return the RcsContactUceCapability instance.
          */
+        @Override
         public @NonNull RcsContactUceCapability build() {
             return mCapabilities;
         }
diff --git a/telephony/java/android/telephony/ims/RcsUceAdapter.java b/telephony/java/android/telephony/ims/RcsUceAdapter.java
index ada0696..8d7742b 100644
--- a/telephony/java/android/telephony/ims/RcsUceAdapter.java
+++ b/telephony/java/android/telephony/ims/RcsUceAdapter.java
@@ -76,39 +76,46 @@
      * @hide
      */
     public static final int ERROR_GENERIC_FAILURE = 1;
+
     /**
      * The carrier network does not have UCE support enabled for this subscriber.
      * @hide
      */
     public static final int ERROR_NOT_ENABLED = 2;
+
     /**
      * The data network that the device is connected to does not support UCE currently (e.g. it is
      * 1x only currently).
      * @hide
      */
     public static final int ERROR_NOT_AVAILABLE = 3;
+
     /**
      * The network has responded with SIP 403 error and a reason "User not registered."
      * @hide
      */
     public static final int ERROR_NOT_REGISTERED = 4;
+
     /**
      * The network has responded to this request with a SIP 403 error and reason "not authorized for
      * presence" for this subscriber.
      * @hide
      */
     public static final int ERROR_NOT_AUTHORIZED = 5;
+
     /**
      * The network has responded to this request with a SIP 403 error and no reason.
      * @hide
      */
     public static final int ERROR_FORBIDDEN = 6;
+
     /**
      * The contact URI requested is not provisioned for VoLTE or it is not known as an IMS
      * subscriber to the carrier network.
      * @hide
      */
     public static final int ERROR_NOT_FOUND = 7;
+
     /**
      * The capabilities request contained too many URIs for the carrier network to handle. Retry
      * with a lower number of contact numbers. The number varies per carrier.
@@ -116,22 +123,32 @@
      */
     // TODO: Try to integrate this into the API so that the service will split based on carrier.
     public static final int ERROR_REQUEST_TOO_LARGE = 8;
+
     /**
      * The network did not respond to the capabilities request before the request timed out.
      * @hide
      */
     public static final int ERROR_REQUEST_TIMEOUT = 10;
+
     /**
      * The request failed due to the service having insufficient memory.
      * @hide
      */
     public static final int ERROR_INSUFFICIENT_MEMORY = 11;
+
     /**
      * The network was lost while trying to complete the request.
      * @hide
      */
     public static final int ERROR_LOST_NETWORK = 12;
 
+    /**
+     * The network is temporarily unavailable or busy. Retries should only be done after the retry
+     * time returned in {@link CapabilitiesCallback#onError} has elapsed.
+     * @hide
+     */
+    public static final int ERROR_SERVER_UNAVAILABLE = 13;
+
     /**@hide*/
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(prefix = "ERROR_", value = {
@@ -145,7 +162,8 @@
             ERROR_REQUEST_TOO_LARGE,
             ERROR_REQUEST_TIMEOUT,
             ERROR_INSUFFICIENT_MEMORY,
-            ERROR_LOST_NETWORK
+            ERROR_LOST_NETWORK,
+            ERROR_SERVER_UNAVAILABLE
     })
     public @interface ErrorCode {}
 
@@ -369,8 +387,10 @@
          * The pending request has resulted in an error and may need to be retried, depending on the
          * error code.
          * @param errorCode The reason for the framework being unable to process the request.
+         * @param retryAfterMilliseconds The time in milliseconds the requesting application should
+         * wait before retrying, if non-zero.
          */
-        void onError(@ErrorCode int errorCode);
+        void onError(@ErrorCode int errorCode, long retryAfterMilliseconds);
     }
 
     private final Context mContext;
@@ -451,10 +471,10 @@
                 }
             }
             @Override
-            public void onError(int errorCode) {
+            public void onError(int errorCode, long retryAfterMilliseconds) {
                 final long callingIdentity = Binder.clearCallingIdentity();
                 try {
-                    executor.execute(() -> c.onError(errorCode));
+                    executor.execute(() -> c.onError(errorCode, retryAfterMilliseconds));
                 } finally {
                     restoreCallingIdentity(callingIdentity);
                 }
@@ -535,10 +555,10 @@
                 }
             }
             @Override
-            public void onError(int errorCode) {
+            public void onError(int errorCode, long retryAfterMilliseconds) {
                 final long callingIdentity = Binder.clearCallingIdentity();
                 try {
-                    executor.execute(() -> c.onError(errorCode));
+                    executor.execute(() -> c.onError(errorCode, retryAfterMilliseconds));
                 } finally {
                     restoreCallingIdentity(callingIdentity);
                 }
diff --git a/telephony/java/android/telephony/ims/SipDelegateConnection.java b/telephony/java/android/telephony/ims/SipDelegateConnection.java
index 6bfdc2c..04a772c 100644
--- a/telephony/java/android/telephony/ims/SipDelegateConnection.java
+++ b/telephony/java/android/telephony/ims/SipDelegateConnection.java
@@ -17,6 +17,7 @@
 package android.telephony.ims;
 
 import android.annotation.NonNull;
+import android.annotation.SystemApi;
 import android.telephony.ims.stub.SipDelegate;
 
 /**
@@ -36,6 +37,7 @@
  * @see SipDelegateManager#createSipDelegate
  * @hide
  */
+@SystemApi
 public interface SipDelegateConnection {
 
     /**
@@ -47,9 +49,8 @@
      * @param sipMessage The SipMessage to be sent.
      * @param configVersion The SipDelegateImsConfiguration version used to construct the
      *                      SipMessage. See {@link SipDelegateImsConfiguration#getVersion} for more
-     *                      information on this parameter and why it is used.
      */
-    void sendMessage(@NonNull SipMessage sipMessage, int configVersion);
+    void sendMessage(@NonNull SipMessage sipMessage, long configVersion);
 
     /**
      * Notify the {@link SipDelegate} that a SIP message received from
@@ -61,6 +62,22 @@
     void notifyMessageReceived(@NonNull String viaTransactionId);
 
     /**
+     * The SIP Dialog associated with the provided Call-ID is being closed and routing resources
+     * associated with the SIP dialog are free to be released.
+     * <p>
+     * Calling this method is also mandatory for situations where the framework IMS stack is waiting
+     * for pending SIP dialogs to be closed before it can perform a handover or apply a provisioning
+     * change. See {@link DelegateRegistrationState} for more information about
+     * the scenarios where this can occur.
+     * <p>
+     * This method will need to be called for each SIP dialog managed by this application when it is
+     * closed.
+     * @param callId The call-ID header value associated with the ongoing SIP Dialog that is
+     *         closing.
+     */
+    void closeDialog(@NonNull String callId);
+
+    /**
      * Notify the SIP delegate that the SIP message has been received from
      * {@link DelegateMessageCallback#onMessageReceived(SipMessage)}, however there was an error
      * processing it.
diff --git a/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java b/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java
index 8abd0ee..eddbb10 100644
--- a/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java
+++ b/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java
@@ -17,7 +17,10 @@
 package android.telephony.ims;
 
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.annotation.StringDef;
+import android.annotation.SuppressLint;
+import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.PersistableBundle;
@@ -47,7 +50,8 @@
  * update.
  * @hide
  */
-public class SipDelegateImsConfiguration implements Parcelable {
+@SystemApi
+public final class SipDelegateImsConfiguration implements Parcelable {
 
     /**
      * IPV4 Address type.
@@ -354,7 +358,7 @@
     /**
      * Builder class to be used when constructing a new SipDelegateImsConfiguration.
      */
-    public static class Builder {
+    public static final class Builder {
         private final long mVersion;
         private final PersistableBundle mBundle;
 
@@ -381,7 +385,10 @@
         /**
          * Put a string value into this configuration bundle for the given key.
          */
-        public Builder putString(@StringConfigKey String key, String value) {
+        // getString is available below.
+        @SuppressLint("MissingGetterMatchingBuilder")
+        public @NonNull Builder addString(@NonNull @StringConfigKey String key,
+                @NonNull String value) {
             mBundle.putString(key, value);
             return this;
         }
@@ -389,7 +396,9 @@
         /**
          * Replace the existing default value with a new value for a given key.
          */
-        public Builder putInt(@IntConfigKey String key, int value) {
+        // getInt is available below.
+        @SuppressLint("MissingGetterMatchingBuilder")
+        public @NonNull Builder addInt(@NonNull @IntConfigKey String key, int value) {
             mBundle.putInt(key, value);
             return this;
         }
@@ -397,7 +406,9 @@
         /**
          * Replace the existing default value with a new value for a given key.
          */
-        public Builder putBoolean(@BooleanConfigKey String key, boolean value) {
+        // getBoolean is available below.
+        @SuppressLint("MissingGetterMatchingBuilder")
+        public @NonNull Builder addBoolean(@NonNull @BooleanConfigKey String key, boolean value) {
             mBundle.putBoolean(key, value);
             return this;
         }
@@ -405,7 +416,7 @@
         /**
          * @return a new SipDelegateImsConfiguration from this Builder.
          */
-        public SipDelegateImsConfiguration build() {
+        public @NonNull SipDelegateImsConfiguration build() {
             return new SipDelegateImsConfiguration(mVersion, mBundle);
         }
     }
@@ -424,30 +435,38 @@
     }
 
     /**
+     * @return {@code true} if this configuration object has a an entry for the key specified,
+     * {@code false} if it does not.
+     */
+    public boolean containsKey(@NonNull String key) {
+        return mBundle.containsKey(key);
+    }
+
+    /**
      * @return the string value associated with a given key or {@code null} if it doesn't exist.
      */
-    public @StringConfigKey String getString(String key) {
+    public @Nullable @StringConfigKey String getString(@NonNull String key) {
         return mBundle.getString(key);
     }
 
     /**
-     * @return the Integer value associated with a given key or {@code null} if the value doesn't
-     * exist.
+     * @return the integer value associated with a given key if it exists or the supplied default
+     * value if it does not.
      */
-    public @IntConfigKey Integer getInt(String key) {
+    public @IntConfigKey int getInt(@NonNull String key, int defaultValue) {
         if (!mBundle.containsKey(key)) {
-            return null;
+            return defaultValue;
         }
         return mBundle.getInt(key);
     }
 
     /**
-     * @return the Integer value associated with a given key or {@code null} if the value doesn't
-     * exist.
+     * @return the boolean value associated with a given key or the supplied default value if the
+     * value doesn't exist in the bundle.
      */
-    public @BooleanConfigKey Boolean getBoolen(String key) {
+    public @BooleanConfigKey boolean getBoolean(@NonNull String key, boolean defaultValue) {
         if (!mBundle.containsKey(key)) {
-            return null;
+            return defaultValue;
         }
         return mBundle.getBoolean(key);
     }
@@ -455,7 +474,7 @@
     /**
      * @return a shallow copy of the full configuration.
      */
-    public PersistableBundle copyBundle() {
+    public @NonNull PersistableBundle copyBundle() {
         return new PersistableBundle(mBundle);
     }
 
@@ -479,12 +498,12 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeLong(mVersion);
         dest.writePersistableBundle(mBundle);
     }
 
-    public static final Creator<SipDelegateImsConfiguration> CREATOR =
+    public static final @NonNull Creator<SipDelegateImsConfiguration> CREATOR =
             new Creator<SipDelegateImsConfiguration>() {
         @Override
         public SipDelegateImsConfiguration createFromParcel(Parcel source) {
diff --git a/telephony/java/android/telephony/ims/SipDelegateManager.java b/telephony/java/android/telephony/ims/SipDelegateManager.java
index 190a792..2ec88ff 100644
--- a/telephony/java/android/telephony/ims/SipDelegateManager.java
+++ b/telephony/java/android/telephony/ims/SipDelegateManager.java
@@ -54,7 +54,6 @@
      * The SIP message has failed being sent or received for an unknown reason.
      * <p>
      * The caller should retry a message that failed with this response.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_UNKNOWN = 0;
 
@@ -64,47 +63,40 @@
      * <p>
      * This is considered a permanent error and the system will automatically begin the teardown and
      * destruction of the SipDelegate. No further messages should be sent on this transport.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_DELEGATE_DEAD = 1;
 
     /**
      * The message has not been sent/received because the delegate is in the process of closing and
      * has become unavailable. No further messages should be sent/received on this delegate.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_DELEGATE_CLOSED = 2;
 
     /**
      * The SIP message has an invalid start line and the message can not be sent.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_INVALID_START_LINE = 3;
 
     /**
      * One or more of the header fields in the header section of the outgoing SIP message is invalid
      * and the SIP message can not be sent.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_INVALID_HEADER_FIELDS = 4;
 
     /**
      * The body content of the SIP message is invalid and the message can not be sent.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_INVALID_BODY_CONTENT = 5;
 
     /**
      * The feature tag associated with the outgoing message does not match any known feature tags
      * and this message can not be sent.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_INVALID_FEATURE_TAG = 6;
 
     /**
      * The feature tag associated with the outgoing message is not enabled for the associated
      * SipDelegateConnection and can not be sent.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_TAG_NOT_ENABLED_FOR_DELEGATE = 7;
 
@@ -113,7 +105,6 @@
      * <p>
      * This message should be retried when connectivity to the network is re-established. See
      * {@link android.net.ConnectivityManager.NetworkCallback} for how this can be determined.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_NETWORK_NOT_AVAILABLE = 8;
 
@@ -124,7 +115,6 @@
      * This is considered a temporary failure, the message should not be retried until an IMS
      * registration change callback is received via
      * {@link DelegateConnectionStateCallback#onFeatureTagStatusChanged}
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_NOT_REGISTERED = 9;
 
@@ -135,7 +125,6 @@
      * <p>
      * The @link SipMessage} should be recreated using the newest
      * {@link SipDelegateImsConfiguration} and sent again.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_STALE_IMS_CONFIGURATION = 10;
 
@@ -146,7 +135,6 @@
      * This is considered a temporary error and the {@link SipDelegateConnection} should resend the
      * message once {@link DelegateRegistrationState#DEREGISTERING_REASON_FEATURE_TAGS_CHANGING} is
      * no longer reported.
-     * @hide
      */
     public static final int MESSAGE_FAILURE_REASON_INTERNAL_DELEGATE_STATE_TRANSITION = 11;
 
@@ -171,7 +159,6 @@
 
     /**
      * Access to use this feature tag has been denied for an unknown reason.
-     * @hide
      */
     public static final int DENIED_REASON_UNKNOWN = 0;
 
@@ -179,14 +166,12 @@
      * This feature tag is allowed to be used by this SipDelegateConnection, but it is in use by
      * another SipDelegateConnection and can not be associated with this delegate. The feature tag
      * will stay in this state until the feature tag is release by the other application.
-     * @hide
      */
     public static final int DENIED_REASON_IN_USE_BY_ANOTHER_DELEGATE = 1;
 
     /**
      * Access to use this feature tag has been denied because this application does not have the
      * permissions required to access this feature tag.
-     * @hide
      */
     public static final int DENIED_REASON_NOT_ALLOWED = 2;
 
@@ -194,14 +179,12 @@
      * Access to use this feature tag has been denied because single registration is not allowed by
      * the carrier at this time. The application should fall back to dual registration if
      * applicable.
-     * @hide
      */
     public static final int DENIED_REASON_SINGLE_REGISTRATION_NOT_ALLOWED = 3;
 
     /**
      * This feature tag is not recognized as a valid feature tag by the SipDelegate and has been
      * denied.
-     * @hide
      */
     public static final int DENIED_REASON_INVALID = 4;
 
@@ -218,33 +201,28 @@
 
     /**
      * The SipDelegate has closed due to an unknown reason.
-     * @hide
      */
     public static final int SIP_DELEGATE_DESTROY_REASON_UNKNOWN = 0;
 
     /**
      * The SipDelegate has closed because the IMS service has died unexpectedly.
-     * @hide
      */
     public static final int SIP_DELEGATE_DESTROY_REASON_SERVICE_DEAD = 1;
 
     /**
      * The SipDelegate has closed because the IMS application has requested that the connection be
      * destroyed.
-     * @hide
      */
     public static final int SIP_DELEGATE_DESTROY_REASON_REQUESTED_BY_APP = 2;
 
     /**
      * The SipDelegate has been closed due to the user disabling RCS.
-     * @hide
      */
     public static final int SIP_DELEGATE_DESTROY_REASON_USER_DISABLED_RCS = 3;
 
     /**
      * The SipDelegate has been closed due to the subscription associated with this delegate being
      * torn down.
-     * @hide
      */
     public static final int SIP_DELEGATE_DESTROY_REASON_SUBSCRIPTION_TORN_DOWN = 4;
 
@@ -331,7 +309,6 @@
      *           SipDelegateConnection.
      * @throws ImsException Thrown if there was a problem communicating with the ImsService
      * associated with this SipDelegateManager. See {@link ImsException#getCode()}.
-     * @hide
      */
     @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
     public void createSipDelegate(@NonNull DelegateRequest request, @NonNull Executor executor,
@@ -366,7 +343,6 @@
      * This will also clean up all related callbacks in the associated ImsService.
      * @param delegateConnection The SipDelegateConnection to destroy.
      * @param reason The reason for why this SipDelegateConnection was destroyed.
-     * @hide
      */
     @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
     public void destroySipDelegate(@NonNull SipDelegateConnection delegateConnection,
diff --git a/telephony/java/android/telephony/ims/SipMessage.java b/telephony/java/android/telephony/ims/SipMessage.java
index c3b1be2..1539224 100644
--- a/telephony/java/android/telephony/ims/SipMessage.java
+++ b/telephony/java/android/telephony/ims/SipMessage.java
@@ -17,10 +17,14 @@
 package android.telephony.ims;
 
 import android.annotation.NonNull;
+import android.annotation.SystemApi;
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
 
+import java.util.Arrays;
+import java.util.Objects;
+
 /**
  * Represents a partially encoded SIP message. See RFC 3261 for more information on how SIP
  * messages are structured and used.
@@ -29,6 +33,7 @@
  * verification and should not be used as a generic SIP message container.
  * @hide
  */
+@SystemApi
 public final class SipMessage implements Parcelable {
     // Should not be set to true for production!
     private static final boolean IS_DEBUGGING = Build.IS_ENG;
@@ -95,14 +100,14 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeString(mStartLine);
         dest.writeString(mHeaderSection);
         dest.writeInt(mContent.length);
         dest.writeByteArray(mContent);
     }
 
-    public static final Creator<SipMessage> CREATOR = new Creator<SipMessage>() {
+    public static final @NonNull Creator<SipMessage> CREATOR = new Creator<SipMessage>() {
         @Override
         public SipMessage createFromParcel(Parcel source) {
             return new SipMessage(source);
@@ -152,4 +157,21 @@
         }
         return startLine;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SipMessage that = (SipMessage) o;
+        return mStartLine.equals(that.mStartLine)
+                && mHeaderSection.equals(that.mHeaderSection)
+                && Arrays.equals(mContent, that.mContent);
+    }
+
+    @Override
+    public int hashCode() {
+        int result = Objects.hash(mStartLine, mHeaderSection);
+        result = 31 * result + Arrays.hashCode(mContent);
+        return result;
+    }
 }
diff --git a/telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl b/telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl
index b47e3c7..10c50be 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl
@@ -22,7 +22,6 @@
 import android.telephony.ims.aidl.IImsCapabilityCallback;
 import android.telephony.ims.aidl.IOptionsResponseCallback;
 import android.telephony.ims.aidl.IPublishResponseCallback;
-import android.telephony.ims.aidl.IRcsFeatureListener;
 import android.telephony.ims.aidl.ISubscribeResponseCallback;
 import android.telephony.ims.feature.CapabilityChangeRequest;
 
@@ -34,7 +33,6 @@
  */
 interface IImsRcsFeature {
     // Not oneway because we need to verify this completes before doing anything else.
-    void setListener(IRcsFeatureListener listener);
     int queryCapabilityStatus();
     // Inherited from ImsFeature
     int getFeatureState();
@@ -50,14 +48,4 @@
     oneway void subscribeForCapabilities(in List<Uri> uris, ISubscribeResponseCallback cb);
     oneway void sendOptionsCapabilityRequest(in Uri contactUri,
             in List<String> myCapabilities, IOptionsResponseCallback cb);
-    // RcsPresenceExchangeImplBase specific api
-    oneway void requestCapabilities(in List<Uri> uris, int operationToken);
-    oneway void updateCapabilities(in RcsContactUceCapability capabilities, int operationToken);
-    // RcsSipOptionsImplBase specific api
-    oneway void sendCapabilityRequest(in Uri contactUri,
-            in RcsContactUceCapability capabilities, int operationToken);
-    oneway void respondToCapabilityRequest(in String contactUri,
-            in RcsContactUceCapability ownCapabilities, int operationToken);
-    oneway void respondToCapabilityRequestWithError(in Uri contactUri, int code, in String reason,
-            int operationToken);
 }
diff --git a/telephony/java/android/telephony/ims/aidl/IRcsFeatureListener.aidl b/telephony/java/android/telephony/ims/aidl/IRcsFeatureListener.aidl
deleted file mode 100644
index 70cf651..0000000
--- a/telephony/java/android/telephony/ims/aidl/IRcsFeatureListener.aidl
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims.aidl;
-
-import android.net.Uri;
-import android.telephony.ims.RcsContactUceCapability;
-
-import java.util.List;
-
-/**
- * Listener interface for updates from the RcsFeature back to the framework.
- * {@hide}
- */
-interface IRcsFeatureListener {
-    //RcsCapabilityExchange specific
-    oneway void onCommandUpdate(int commandCode, int operationToken);
-    // RcsPresenceExchangeImplBase Specific
-    oneway void onNetworkResponse(int code, in String reason, int operationToken);
-    oneway void onCapabilityRequestResponsePresence(in List<RcsContactUceCapability> infos,
-    int operationToken);
-    oneway void onNotifyUpdateCapabilities(int publishTriggerType);
-    oneway void onUnpublish();
-    // RcsSipOptionsImplBase specific
-    oneway void onCapabilityRequestResponseOptions(int code, in String reason,
-            in RcsContactUceCapability info, int operationToken);
-    oneway void onRemoteCapabilityRequest(in Uri contactUri, in RcsContactUceCapability remoteInfo,
-            int operationToken);
-}
diff --git a/telephony/java/android/telephony/ims/aidl/IRcsUceControllerCallback.aidl b/telephony/java/android/telephony/ims/aidl/IRcsUceControllerCallback.aidl
index 0bd3e5e..0f627b9 100644
--- a/telephony/java/android/telephony/ims/aidl/IRcsUceControllerCallback.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IRcsUceControllerCallback.aidl
@@ -26,5 +26,5 @@
 oneway interface IRcsUceControllerCallback {
     void onCapabilitiesReceived(in List<RcsContactUceCapability> contactCapabilities);
     void onComplete();
-    void onError(int errorCode);
+    void onError(int errorCode, long retryAfterMilliseconds);
 }
diff --git a/telephony/java/android/telephony/ims/aidl/ISipDelegate.aidl b/telephony/java/android/telephony/ims/aidl/ISipDelegate.aidl
index 477ee95..ad75be4 100644
--- a/telephony/java/android/telephony/ims/aidl/ISipDelegate.aidl
+++ b/telephony/java/android/telephony/ims/aidl/ISipDelegate.aidl
@@ -23,10 +23,8 @@
  * {@hide}
  */
 oneway interface ISipDelegate {
-    void sendMessage(in SipMessage sipMessage, int configVersion);
+    void sendMessage(in SipMessage sipMessage, long configVersion);
     void notifyMessageReceived(in String viaTransactionId);
     void notifyMessageReceiveError(in String viaTransactionId, int reason);
-
-    // only used by SipDelegate.
     void closeDialog(in String callId);
 }
diff --git a/telephony/java/android/telephony/ims/aidl/ISubscribeResponseCallback.aidl b/telephony/java/android/telephony/ims/aidl/ISubscribeResponseCallback.aidl
index 4deaba1..a141993 100644
--- a/telephony/java/android/telephony/ims/aidl/ISubscribeResponseCallback.aidl
+++ b/telephony/java/android/telephony/ims/aidl/ISubscribeResponseCallback.aidl
@@ -32,5 +32,5 @@
     void onNetworkResponse(int code, in String reason);
     void onNotifyCapabilitiesUpdate(in List<String> pidfXmls);
     void onResourceTerminated(in List<RcsContactTerminatedReason> uriTerminatedReason);
-    void onTerminated(in String reason, in String retryAfter);
+    void onTerminated(in String reason, long retryAfterMilliseconds);
 }
diff --git a/telephony/java/android/telephony/ims/aidl/OWNERS b/telephony/java/android/telephony/ims/aidl/OWNERS
new file mode 100644
index 0000000..0854c5d
--- /dev/null
+++ b/telephony/java/android/telephony/ims/aidl/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+breadley@google.com
diff --git a/telephony/java/android/telephony/ims/aidl/RcsSubscribeResponseAidlWrapper.java b/telephony/java/android/telephony/ims/aidl/RcsSubscribeResponseAidlWrapper.java
index 37588ed..1fb339c 100644
--- a/telephony/java/android/telephony/ims/aidl/RcsSubscribeResponseAidlWrapper.java
+++ b/telephony/java/android/telephony/ims/aidl/RcsSubscribeResponseAidlWrapper.java
@@ -86,9 +86,9 @@
     }
 
     @Override
-    public void onTerminated(String reason, String retryAfter) throws ImsException {
+    public void onTerminated(String reason, long retryAfterMilliseconds) throws ImsException {
         try {
-            mResponseBinder.onTerminated(reason, retryAfter);
+            mResponseBinder.onTerminated(reason, retryAfterMilliseconds);
         } catch (RemoteException e) {
         }
     }
diff --git a/telephony/java/android/telephony/ims/aidl/SipDelegateAidlWrapper.java b/telephony/java/android/telephony/ims/aidl/SipDelegateAidlWrapper.java
index a7f62cc..522ad81 100644
--- a/telephony/java/android/telephony/ims/aidl/SipDelegateAidlWrapper.java
+++ b/telephony/java/android/telephony/ims/aidl/SipDelegateAidlWrapper.java
@@ -29,12 +29,13 @@
 import android.telephony.ims.SipMessage;
 import android.telephony.ims.stub.SipDelegate;
 
-import java.util.List;
+import java.util.ArrayList;
+import java.util.Set;
 import java.util.concurrent.Executor;
 
 /**
  * Implementation of callbacks by wrapping the internal AIDL from telephony. Also implements
- * ISipDelegate internally when {@link DelegateStateCallback#onCreated(SipDelegate, List)} is called
+ * ISipDelegate internally when {@link DelegateStateCallback#onCreated(SipDelegate, Set)} is called
  * in order to trampoline events back to telephony.
  * @hide
  */
@@ -42,7 +43,7 @@
 
     private final ISipDelegate.Stub mDelegateBinder = new ISipDelegate.Stub() {
         @Override
-        public void sendMessage(SipMessage sipMessage, int configVersion) {
+        public void sendMessage(SipMessage sipMessage, long configVersion) {
             SipDelegate d = mDelegate;
             final long token = Binder.clearCallingIdentity();
             try {
@@ -136,10 +137,10 @@
 
     @Override
     public void onCreated(@NonNull SipDelegate delegate,
-            @Nullable List<FeatureTagState> deniedTags) {
+            @Nullable Set<FeatureTagState> deniedTags) {
         mDelegate = delegate;
         try {
-            mStateBinder.onCreated(mDelegateBinder, deniedTags);
+            mStateBinder.onCreated(mDelegateBinder, new ArrayList<>(deniedTags));
         } catch (RemoteException e) {
             // BinderDied will trigger destroySipDelegate, so just ignore this locally.
         }
diff --git a/telephony/java/android/telephony/ims/aidl/SipDelegateConnectionAidlWrapper.java b/telephony/java/android/telephony/ims/aidl/SipDelegateConnectionAidlWrapper.java
index 3bd1a46..a35039b 100644
--- a/telephony/java/android/telephony/ims/aidl/SipDelegateConnectionAidlWrapper.java
+++ b/telephony/java/android/telephony/ims/aidl/SipDelegateConnectionAidlWrapper.java
@@ -158,7 +158,7 @@
     }
 
     @Override
-    public void sendMessage(SipMessage sipMessage, int configVersion) {
+    public void sendMessage(SipMessage sipMessage, long configVersion) {
         try {
             ISipDelegate conn = getSipDelegateBinder();
             if (conn == null) {
@@ -199,6 +199,19 @@
         }
     }
 
+    @Override
+    public void closeDialog(String callId) {
+        try {
+            ISipDelegate conn = getSipDelegateBinder();
+            if (conn == null) {
+                return;
+            }
+            conn.closeDialog(callId);
+        } catch (RemoteException e) {
+            // Nothing to do here, app will eventually get remote death callback.
+        }
+    }
+
     // Also called upon IImsRcsController death (telephony process dies).
     @Override
     public void binderDied() {
diff --git a/telephony/java/android/telephony/ims/compat/OWNERS b/telephony/java/android/telephony/ims/compat/OWNERS
new file mode 100644
index 0000000..0854c5d
--- /dev/null
+++ b/telephony/java/android/telephony/ims/compat/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+breadley@google.com
diff --git a/telephony/java/android/telephony/ims/compat/feature/OWNERS b/telephony/java/android/telephony/ims/compat/feature/OWNERS
new file mode 100644
index 0000000..0854c5d
--- /dev/null
+++ b/telephony/java/android/telephony/ims/compat/feature/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+breadley@google.com
diff --git a/telephony/java/android/telephony/ims/compat/stub/OWNERS b/telephony/java/android/telephony/ims/compat/stub/OWNERS
new file mode 100644
index 0000000..0854c5d
--- /dev/null
+++ b/telephony/java/android/telephony/ims/compat/stub/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+breadley@google.com
diff --git a/telephony/java/android/telephony/ims/feature/OWNERS b/telephony/java/android/telephony/ims/feature/OWNERS
new file mode 100644
index 0000000..0854c5d
--- /dev/null
+++ b/telephony/java/android/telephony/ims/feature/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+breadley@google.com
diff --git a/telephony/java/android/telephony/ims/feature/RcsFeature.java b/telephony/java/android/telephony/ims/feature/RcsFeature.java
index 5de2ddc..cde7067 100644
--- a/telephony/java/android/telephony/ims/feature/RcsFeature.java
+++ b/telephony/java/android/telephony/ims/feature/RcsFeature.java
@@ -19,17 +19,16 @@
 import android.annotation.CallbackExecutor;
 import android.annotation.IntDef;
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.annotation.SystemApi;
 import android.net.Uri;
 import android.os.RemoteException;
-import android.telephony.ims.RcsContactUceCapability;
 import android.telephony.ims.RcsUceAdapter;
 import android.telephony.ims.aidl.ICapabilityExchangeEventListener;
 import android.telephony.ims.aidl.IImsCapabilityCallback;
 import android.telephony.ims.aidl.IImsRcsFeature;
 import android.telephony.ims.aidl.IOptionsResponseCallback;
 import android.telephony.ims.aidl.IPublishResponseCallback;
-import android.telephony.ims.aidl.IRcsFeatureListener;
 import android.telephony.ims.aidl.ISubscribeResponseCallback;
 import android.telephony.ims.aidl.RcsOptionsResponseAidlWrapper;
 import android.telephony.ims.aidl.RcsPublishResponseAidlWrapper;
@@ -74,16 +73,6 @@
             mExecutor = executor;
         }
 
-        /**
-         * @deprecated This method is deprecated. Please call the method
-         * setCapabilityExchangeEventListener instead.
-         */
-        @Override
-        @Deprecated
-        public void setListener(IRcsFeatureListener listener) {
-            Log.w(LOG_TAG, "The method setListener is deprecated");
-        }
-
         @Override
         public int queryCapabilityStatus() throws RemoteException {
             return executeMethodAsyncForResult(
@@ -124,7 +113,7 @@
         // RcsCapabilityExchangeImplBase specific APIs
         @Override
         public void setCapabilityExchangeEventListener(
-                @NonNull ICapabilityExchangeEventListener listener) throws RemoteException {
+                @Nullable ICapabilityExchangeEventListener listener) throws RemoteException {
             executeMethodAsync(() -> mReference.setCapabilityExchangeEventListener(listener),
                     "setCapabilityExchangeEventListener");
         }
@@ -155,34 +144,6 @@
                     "sendOptionsCapabilityRequest");
         }
 
-        // RcsPresenceExchangeImplBase specific APIS
-        @Override
-        public void requestCapabilities(List<Uri> uris, int operationToken) throws RemoteException {
-            throw new RemoteException("Unsupported operation: requestCapabilities");
-        }
-        @Override
-        public void updateCapabilities(RcsContactUceCapability capabilities, int operationToken)
-                throws RemoteException {
-            throw new RemoteException("Unsupported operation: updateCapabilities");
-        }
-        // RcsSipOptionsImplBase specific APIS
-        @Override
-        public void sendCapabilityRequest(Uri contactUri, RcsContactUceCapability capabilities,
-                int operationToken) throws RemoteException {
-            throw new RemoteException("Unsupported operation: sendCapabilityRequest");
-        }
-        @Override
-        public void respondToCapabilityRequest(String contactUri,
-                RcsContactUceCapability ownCapabilities, int operationToken)
-                throws RemoteException {
-            throw new RemoteException("Unsupported operation: respondToCapabilityRequest");
-        }
-        @Override
-        public void respondToCapabilityRequestWithError(Uri contactUri, int code, String reason,
-                int operationToken) throws RemoteException {
-            throw new RemoteException("Unsupported operation: respondToCapabilityRequestWithError");
-        }
-
         // Call the methods with a clean calling identity on the executor and wait indefinitely for
         // the future to return.
         private void executeMethodAsync(Runnable r, String errorLogName)
diff --git a/telephony/java/android/telephony/ims/stub/DelegateConnectionMessageCallback.java b/telephony/java/android/telephony/ims/stub/DelegateConnectionMessageCallback.java
index 59f9601..eefe849 100644
--- a/telephony/java/android/telephony/ims/stub/DelegateConnectionMessageCallback.java
+++ b/telephony/java/android/telephony/ims/stub/DelegateConnectionMessageCallback.java
@@ -17,6 +17,7 @@
 package android.telephony.ims.stub;
 
 import android.annotation.NonNull;
+import android.annotation.SystemApi;
 import android.telephony.ims.SipDelegateConnection;
 import android.telephony.ims.SipDelegateManager;
 import android.telephony.ims.SipMessage;
@@ -26,6 +27,7 @@
  * messages as well as the result of sending a SIP message.
  * @hide
  */
+@SystemApi
 public interface DelegateConnectionMessageCallback {
 
     /**
@@ -49,6 +51,6 @@
      *                         previously sent {@link SipMessage}.
      * @param reason The reason for the failure.
      */
-    void onMessageSendFailure(String viaTransactionId,
+    void onMessageSendFailure(@NonNull String viaTransactionId,
             @SipDelegateManager.MessageFailureReason int reason);
 }
diff --git a/telephony/java/android/telephony/ims/stub/DelegateConnectionStateCallback.java b/telephony/java/android/telephony/ims/stub/DelegateConnectionStateCallback.java
index 9761805..02218ea 100644
--- a/telephony/java/android/telephony/ims/stub/DelegateConnectionStateCallback.java
+++ b/telephony/java/android/telephony/ims/stub/DelegateConnectionStateCallback.java
@@ -17,6 +17,7 @@
 package android.telephony.ims.stub;
 
 import android.annotation.NonNull;
+import android.annotation.SystemApi;
 import android.telephony.ims.DelegateRegistrationState;
 import android.telephony.ims.DelegateRequest;
 import android.telephony.ims.FeatureTagState;
@@ -58,6 +59,7 @@
  *
  * @hide
  */
+@SystemApi
 public interface DelegateConnectionStateCallback {
 
     /**
diff --git a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
index e0290a5..e757d9f 100644
--- a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
@@ -126,7 +126,7 @@
          */
         @Override
         public synchronized String getConfigString(int item) throws RemoteException {
-            if (mProvisionedIntValue.containsKey(item)) {
+            if (mProvisionedStringValue.containsKey(item)) {
                 return mProvisionedStringValue.get(item);
             } else {
                 String retVal = getImsConfigImpl().getConfigString(item);
diff --git a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
index a6f5c45..153d687 100644
--- a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
@@ -49,8 +49,7 @@
      * @hide
      */
     // Defines the underlying radio technology type that we have registered for IMS over.
-    @IntDef(flag = true,
-            value = {
+    @IntDef(value = {
                     REGISTRATION_TECH_NONE,
                     REGISTRATION_TECH_LTE,
                     REGISTRATION_TECH_IWLAN
diff --git a/telephony/java/android/telephony/ims/stub/OWNERS b/telephony/java/android/telephony/ims/stub/OWNERS
new file mode 100644
index 0000000..0854c5d
--- /dev/null
+++ b/telephony/java/android/telephony/ims/stub/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+breadley@google.com
diff --git a/telephony/java/android/telephony/ims/stub/RcsCapabilityExchange.java b/telephony/java/android/telephony/ims/stub/RcsCapabilityExchange.java
deleted file mode 100644
index 0b13efb..0000000
--- a/telephony/java/android/telephony/ims/stub/RcsCapabilityExchange.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims.stub;
-
-import android.annotation.IntDef;
-import android.os.RemoteException;
-import android.telephony.ims.ImsException;
-import android.telephony.ims.aidl.IRcsFeatureListener;
-import android.telephony.ims.feature.ImsFeature;
-import android.telephony.ims.feature.RcsFeature;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Base class for different types of Capability exchange, presence using
- * {@link RcsPresenceExchangeImplBase} and SIP OPTIONS exchange using {@link RcsSipOptionsImplBase}.
- *
- * @hide
- */
-public class RcsCapabilityExchange {
-
-    /**  Service is unknown. */
-    public static final int COMMAND_CODE_SERVICE_UNKNOWN = 0;
-    /** The command completed successfully. */
-    public static final int COMMAND_CODE_SUCCESS = 1;
-    /** The command failed with an unknown error. */
-    public static final int COMMAND_CODE_GENERIC_FAILURE = 2;
-    /**  Invalid parameter(s). */
-    public static final int COMMAND_CODE_INVALID_PARAM = 3;
-    /**  Fetch error. */
-    public static final int COMMAND_CODE_FETCH_ERROR = 4;
-    /**  Request timed out. */
-    public static final int COMMAND_CODE_REQUEST_TIMEOUT = 5;
-    /**  Failure due to insufficient memory available. */
-    public static final int COMMAND_CODE_INSUFFICIENT_MEMORY = 6;
-    /**  Network connection is lost. */
-    public static final int COMMAND_CODE_LOST_NETWORK_CONNECTION = 7;
-    /**  Requested feature/resource is not supported. */
-    public static final int COMMAND_CODE_NOT_SUPPORTED = 8;
-    /**  Contact or resource is not found. */
-    public static final int COMMAND_CODE_NOT_FOUND = 9;
-    /**  Service is not available. */
-    public static final int COMMAND_CODE_SERVICE_UNAVAILABLE = 10;
-    /**  No Change in Capabilities */
-    public static final int COMMAND_CODE_NO_CHANGE_IN_CAP = 11;
-
-    /** @hide*/
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = "COMMAND_CODE_", value = {
-            COMMAND_CODE_SERVICE_UNKNOWN,
-            COMMAND_CODE_SUCCESS,
-            COMMAND_CODE_GENERIC_FAILURE,
-            COMMAND_CODE_INVALID_PARAM,
-            COMMAND_CODE_FETCH_ERROR,
-            COMMAND_CODE_REQUEST_TIMEOUT,
-            COMMAND_CODE_INSUFFICIENT_MEMORY,
-            COMMAND_CODE_LOST_NETWORK_CONNECTION,
-            COMMAND_CODE_NOT_SUPPORTED,
-            COMMAND_CODE_NOT_FOUND,
-            COMMAND_CODE_SERVICE_UNAVAILABLE,
-            COMMAND_CODE_NO_CHANGE_IN_CAP
-    })
-    public @interface CommandCode {}
-
-
-    private RcsFeature mFeature;
-
-    /** @hide */
-    public final void initialize(RcsFeature feature) {
-        mFeature = feature;
-    }
-
-    /** @hide */
-    protected final IRcsFeatureListener getListener() throws ImsException {
-        throw new ImsException("This method is deprecated.",
-                ImsException.CODE_ERROR_UNSUPPORTED_OPERATION);
-    }
-
-    /**
-     * Provides the framework with an update as to whether or not a command completed successfully
-     * locally. This includes capabilities requests and updates from the network. If it does not
-     * complete successfully, then the framework may retry the command again later, depending on the
-     * error. If the command does complete successfully, the framework will then wait for network
-     * updates.
-     *
-     * @param code The result of the pending command. If {@link #COMMAND_CODE_SUCCESS}, further
-     *             updates will be sent for this command using the associated operationToken.
-     * @param operationToken the token associated with the pending command.
-     * @throws ImsException If this {@link RcsCapabilityExchange} instance is not currently
-     * connected to the framework. This can happen if the {@link RcsFeature} is not
-     * {@link ImsFeature#STATE_READY} and the {@link RcsFeature} has not received the
-     * {@link ImsFeature#onFeatureReady()} callback. This may also happen in rare cases when the
-     * Telephony stack has crashed.
-     */
-    public final void onCommandUpdate(@CommandCode int code, int operationToken)
-            throws ImsException {
-        try {
-            getListener().onCommandUpdate(code, operationToken);
-        } catch (RemoteException e) {
-            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
-        }
-    }
-}
diff --git a/telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java b/telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java
index b5704bf..3a0fb6e 100644
--- a/telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java
@@ -250,7 +250,7 @@
          * This allows the framework to know that there will no longer be any
          * capability updates for the requested operationToken.
          */
-        void onTerminated(String reason, String retryAfter) throws ImsException;
+        void onTerminated(String reason, long retryAfterMilliseconds) throws ImsException;
     }
 
 
diff --git a/telephony/java/android/telephony/ims/stub/RcsPresenceExchangeImplBase.java b/telephony/java/android/telephony/ims/stub/RcsPresenceExchangeImplBase.java
deleted file mode 100644
index bb03448..0000000
--- a/telephony/java/android/telephony/ims/stub/RcsPresenceExchangeImplBase.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims.stub;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.net.Uri;
-import android.os.RemoteException;
-import android.telephony.ims.ImsException;
-import android.telephony.ims.RcsContactUceCapability;
-import android.telephony.ims.feature.ImsFeature;
-import android.telephony.ims.feature.RcsFeature;
-import android.util.Log;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.List;
-
-/**
- * Base implementation for RCS User Capability Exchange using Presence. Any ImsService implementing
- * this service must implement the stub methods {@link #requestCapabilities(List, int)}  and
- * {@link #updateCapabilities(RcsContactUceCapability, int)}.
- *
- * @hide
- */
-public class RcsPresenceExchangeImplBase extends RcsCapabilityExchange {
-
-    private static final String LOG_TAG = "RcsPresenceExchangeIB";
-
-    /**
-     * The request has resulted in any other 4xx/5xx/6xx that is not covered below. No retry will be
-     * attempted.
-     */
-    public static final int RESPONSE_SUBSCRIBE_GENERIC_FAILURE = -1;
-
-    /**
-     * The request has succeeded with a “200” message from the network.
-     */
-    public static final int RESPONSE_SUCCESS = 0;
-
-    /**
-     * The request has resulted in a “403” (User Not Registered) error from the network. Will retry
-     * capability polling with an exponential backoff.
-     */
-    public static final int RESPONSE_NOT_REGISTERED = 1;
-
-    /**
-     * The request has resulted in a “403” (not authorized (Requestor)) error from the network. No
-     * retry will be attempted.
-     */
-    public static final int RESPONSE_NOT_AUTHORIZED_FOR_PRESENCE = 2;
-
-    /**
-     * The request has resulted in a "403” (Forbidden) or other “403” error from the network and
-     * will be handled the same as “404” Not found. No retry will be attempted.
-     */
-    public static final int RESPONSE_FORBIDDEN = 3;
-
-    /**
-     * The request has resulted in a “404” (Not found) result from the network. No retry will be
-     * attempted.
-     */
-    public static final int RESPONSE_NOT_FOUND = 4;
-
-    /**
-     * The request has resulted in a “408” response. Retry after exponential backoff.
-     */
-    public static final int RESPONSE_SIP_REQUEST_TIMEOUT = 5;
-
-    /**
-     *  The network has responded with a “413” (Too Large) response from the network. Capability
-     *  request contains too many items and must be shrunk before the request will be accepted.
-     */
-    public static final int RESPONSE_SUBSCRIBE_TOO_LARGE = 6;
-
-    /**
-     * The request has resulted in a “423” response. Retry after exponential backoff.
-     */
-    public static final int RESPONSE_SIP_INTERVAL_TOO_SHORT = 7;
-
-    /**
-     * The request has resulted in a “503” response. Retry after exponential backoff.
-     */
-    public static final int RESPONSE_SIP_SERVICE_UNAVAILABLE = 8;
-
-    /** @hide*/
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = "RESPONSE_", value = {
-            RESPONSE_SUBSCRIBE_GENERIC_FAILURE,
-            RESPONSE_SUCCESS,
-            RESPONSE_NOT_REGISTERED,
-            RESPONSE_NOT_AUTHORIZED_FOR_PRESENCE,
-            RESPONSE_FORBIDDEN,
-            RESPONSE_NOT_FOUND,
-            RESPONSE_SIP_REQUEST_TIMEOUT,
-            RESPONSE_SUBSCRIBE_TOO_LARGE,
-            RESPONSE_SIP_INTERVAL_TOO_SHORT,
-            RESPONSE_SIP_SERVICE_UNAVAILABLE
-    })
-    public @interface PresenceResponseCode {}
-
-
-    /** A capability update has been requested due to the Entity Tag (ETag) expiring. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_ETAG_EXPIRED = 0;
-    /** A capability update has been requested due to moving to LTE with VoPS disabled. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_LTE_VOPS_DISABLED = 1;
-    /** A capability update has been requested due to moving to LTE with VoPS enabled. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_LTE_VOPS_ENABLED = 2;
-    /** A capability update has been requested due to moving to eHRPD. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_EHRPD = 3;
-    /** A capability update has been requested due to moving to HSPA+. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_HSPAPLUS = 4;
-    /** A capability update has been requested due to moving to 3G. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_3G = 5;
-    /** A capability update has been requested due to moving to 2G. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_2G = 6;
-    /** A capability update has been requested due to moving to WLAN */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_WLAN = 7;
-    /** A capability update has been requested due to moving to IWLAN */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_IWLAN = 8;
-    /** A capability update has been requested but the reason is unknown. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_UNKNOWN = 9;
-    /** A capability update has been requested due to moving to 5G NR with VoPS disabled. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_NR5G_VOPS_DISABLED = 10;
-    /** A capability update has been requested due to moving to 5G NR with VoPS enabled. */
-    public static final int CAPABILITY_UPDATE_TRIGGER_MOVE_TO_NR5G_VOPS_ENABLED = 11;
-
-    /** @hide*/
-    @IntDef(value = {
-            CAPABILITY_UPDATE_TRIGGER_ETAG_EXPIRED,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_LTE_VOPS_DISABLED,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_LTE_VOPS_ENABLED,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_EHRPD,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_HSPAPLUS,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_3G,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_2G,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_WLAN,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_IWLAN,
-            CAPABILITY_UPDATE_TRIGGER_UNKNOWN,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_NR5G_VOPS_DISABLED,
-            CAPABILITY_UPDATE_TRIGGER_MOVE_TO_NR5G_VOPS_ENABLED
-    }, prefix = "CAPABILITY_UPDATE_TRIGGER_")
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface StackPublishTriggerType {
-    }
-
-    /**
-     * Provide the framework with a subsequent network response update to
-     * {@link #updateCapabilities(RcsContactUceCapability, int)} and
-     * {@link #requestCapabilities(List, int)} operations.
-     *
-     * @param code The SIP response code sent from the network for the operation token specified.
-     * @param reason The optional reason response from the network. If the network provided no
-     *         reason with the code, the string should be empty.
-     * @param operationToken The token associated with the operation this service is providing a
-     *         response for.
-     * @throws ImsException If this {@link RcsPresenceExchangeImplBase} instance is not currently
-     * connected to the framework. This can happen if the {@link RcsFeature} is not
-     * {@link ImsFeature#STATE_READY} and the {@link RcsFeature} has not received the
-     * {@link ImsFeature#onFeatureReady()} callback. This may also happen in rare cases when the
-     * Telephony stack has crashed.
-     */
-    public final void onNetworkResponse(@PresenceResponseCode int code, @NonNull String reason,
-            int operationToken) throws ImsException {
-        try {
-            getListener().onNetworkResponse(code, reason, operationToken);
-        } catch (RemoteException e) {
-            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
-        }
-    }
-
-    /**
-     * Provides the framework with the requested contacts’ capabilities requested by the framework
-     * using {@link #requestCapabilities(List, int)}.
-     *
-     * @throws ImsException If this {@link RcsPresenceExchangeImplBase} instance is not currently
-     * connected to the framework. This can happen if the {@link RcsFeature} is not
-     * {@link ImsFeature#STATE_READY} and the {@link RcsFeature} has not received the
-     * {@link ImsFeature#onFeatureReady()} callback. This may also happen in rare cases when the
-     * Telephony stack has crashed.
-     */
-    public final void onCapabilityRequestResponse(@NonNull List<RcsContactUceCapability> infos,
-            int operationToken) throws ImsException {
-        try {
-            getListener().onCapabilityRequestResponsePresence(infos, operationToken);
-        } catch (RemoteException e) {
-            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
-        }
-    }
-
-    /**
-     * Trigger the framework to provide a capability update using
-     * {@link #updateCapabilities(RcsContactUceCapability, int)}.
-     * <p>
-     * This is typically used when trying to generate an initial PUBLISH for a new subscription to
-     * the network. The device will cache all presence publications after boot until this method is
-     * called once.
-     * @param publishTriggerType {@link StackPublishTriggerType} The reason for the capability
-     *         update request.
-     * @throws ImsException If this {@link RcsPresenceExchangeImplBase} instance is not currently
-     * connected to the framework. This can happen if the {@link RcsFeature} is not
-     * {@link ImsFeature#STATE_READY} and the {@link RcsFeature} has not received the
-     * {@link ImsFeature#onFeatureReady()} callback. This may also happen in rare cases when the
-     * Telephony stack has crashed.
-     */
-    public final void onNotifyUpdateCapabilites(@StackPublishTriggerType int publishTriggerType)
-            throws ImsException {
-        try {
-            getListener().onNotifyUpdateCapabilities(publishTriggerType);
-        } catch (RemoteException e) {
-            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
-        }
-    }
-
-    /**
-     * Notify the framework that the device’s capabilities have been unpublished from the network.
-     *
-     * @throws ImsException If this {@link RcsPresenceExchangeImplBase} instance is not currently
-     * connected to the framework. This can happen if the {@link RcsFeature} is not
-     * {@link ImsFeature#STATE_READY} and the {@link RcsFeature} has not received the
-     * {@link ImsFeature#onFeatureReady()} callback. This may also happen in rare cases when the
-     * Telephony stack has crashed.
-     */
-    public final void onUnpublish() throws ImsException {
-        try {
-            getListener().onUnpublish();
-        } catch (RemoteException e) {
-            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
-        }
-    }
-
-    /**
-     * The user capabilities of one or multiple contacts have been requested by the framework.
-     * <p>
-     * The implementer must follow up this call with an {@link #onCommandUpdate(int, int)} call to
-     * indicate whether or not this operation succeeded.  If this operation succeeds, network
-     * response updates should be sent to the framework using
-     * {@link #onNetworkResponse(int, String, int)}. When the operation is completed,
-     * {@link #onCapabilityRequestResponse(List, int)} should be called with the presence
-     * information for the contacts specified.
-     * @param uris A {@link List} of the {@link Uri}s that the framework is requesting the UCE
-     *             capabilities for.
-     * @param operationToken The token associated with this operation. Updates to this request using
-     *         {@link #onCommandUpdate(int, int)}, {@link #onNetworkResponse(int, String, int)}, and
-     *         {@link #onCapabilityRequestResponse(List, int)}  must use the same operation token
-     *         in response.
-     */
-    public void requestCapabilities(@NonNull List<Uri> uris, int operationToken) {
-        // Stub - to be implemented by service
-        Log.w(LOG_TAG, "requestCapabilities called with no implementation.");
-        try {
-            getListener().onCommandUpdate(COMMAND_CODE_NOT_SUPPORTED, operationToken);
-        } catch (RemoteException | ImsException e) {
-            // Do not do anything, this is a stub implementation.
-        }
-    }
-
-    /**
-     * The capabilities of this device have been updated and should be published to the network.
-     * <p>
-     * The implementer must follow up this call with an {@link #onCommandUpdate(int, int)} call to
-     * indicate whether or not this operation succeeded. If this operation succeeds, network
-     * response updates should be sent to the framework using
-     * {@link #onNetworkResponse(int, String, int)}.
-     * @param capabilities The capabilities for this device.
-     * @param operationToken The token associated with this operation. Any subsequent
-     *         {@link #onCommandUpdate(int, int)} or {@link #onNetworkResponse(int, String, int)}
-     *         calls regarding this update must use the same token.
-     */
-    public void updateCapabilities(@NonNull RcsContactUceCapability capabilities,
-            int operationToken) {
-        // Stub - to be implemented by service
-        Log.w(LOG_TAG, "updateCapabilities called with no implementation.");
-        try {
-            getListener().onCommandUpdate(COMMAND_CODE_NOT_SUPPORTED, operationToken);
-        } catch (RemoteException | ImsException e) {
-            // Do not do anything, this is a stub implementation.
-        }
-    }
-}
diff --git a/telephony/java/android/telephony/ims/stub/RcsSipOptionsImplBase.java b/telephony/java/android/telephony/ims/stub/RcsSipOptionsImplBase.java
deleted file mode 100644
index 2035fac..0000000
--- a/telephony/java/android/telephony/ims/stub/RcsSipOptionsImplBase.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims.stub;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.net.Uri;
-import android.os.RemoteException;
-import android.telephony.ims.ImsException;
-import android.telephony.ims.RcsContactUceCapability;
-import android.telephony.ims.feature.ImsFeature;
-import android.telephony.ims.feature.RcsFeature;
-import android.util.Log;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Base implementation for RCS User Capability Exchange using SIP OPTIONS.
- *
- * @hide
- */
-public class RcsSipOptionsImplBase extends RcsCapabilityExchange {
-
-    private static final String LOG_TAG = "RcsSipOptionsImplBase";
-
-    /**
-     * Indicates a SIP response from the remote user other than 200, 480, 408, 404, or 604.
-     */
-    public static final int RESPONSE_GENERIC_FAILURE = -1;
-
-    /**
-     * Indicates that the remote user responded with a 200 OK response.
-     */
-    public static final int RESPONSE_SUCCESS = 0;
-
-    /**
-     * Indicates that the remote user responded with a 480 TEMPORARY UNAVAILABLE response.
-     */
-    public static final int RESPONSE_TEMPORARILY_UNAVAILABLE = 1;
-
-    /**
-     * Indicates that the remote user responded with a 408 REQUEST TIMEOUT response.
-     */
-    public static final int RESPONSE_REQUEST_TIMEOUT = 2;
-
-    /**
-     * Indicates that the remote user responded with a 404 NOT FOUND response.
-     */
-    public static final int RESPONSE_NOT_FOUND = 3;
-
-    /**
-     * Indicates that the remote user responded with a 604 DOES NOT EXIST ANYWHERE response.
-     */
-    public static final int RESPONSE_DOES_NOT_EXIST_ANYWHERE = 4;
-
-    /**
-     * Indicates that the remote user responded with a 400 BAD REQUEST response.
-     */
-    public static final int RESPONSE_BAD_REQUEST = 5;
-
-    /** @hide*/
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = "RESPONSE_", value = {
-            RESPONSE_GENERIC_FAILURE,
-            RESPONSE_SUCCESS,
-            RESPONSE_TEMPORARILY_UNAVAILABLE,
-            RESPONSE_REQUEST_TIMEOUT,
-            RESPONSE_NOT_FOUND,
-            RESPONSE_DOES_NOT_EXIST_ANYWHERE,
-            RESPONSE_BAD_REQUEST
-    })
-    public @interface SipResponseCode {}
-
-    /**
-     * Send the response of a SIP OPTIONS capability exchange to the framework. If {@code code} is
-     * {@link #RESPONSE_SUCCESS}, info must be non-null.
-     * @param code The SIP response code that was sent by the network in response to the request
-     *        sent by {@link #sendCapabilityRequest(Uri, RcsContactUceCapability, int)}.
-     * @param reason The optional SIP response reason sent by the network. If none was sent, this
-     *        should be an empty string.
-     * @param info the contact's UCE capabilities associated with the capability request.
-     * @param operationToken The token associated with the original capability request, set by
-     *        {@link #sendCapabilityRequest(Uri, RcsContactUceCapability, int)}.
-     * @throws ImsException If this {@link RcsSipOptionsImplBase} instance is not currently
-     * connected to the framework. This can happen if the {@link RcsFeature} is not
-     * {@link ImsFeature#STATE_READY} and the {@link RcsFeature} has not received the
-     * {@link ImsFeature#onFeatureReady()} callback. This may also happen in rare cases when the
-     * Telephony stack has crashed.
-     */
-    public final void onCapabilityRequestResponse(@SipResponseCode int code, @NonNull String reason,
-            @Nullable RcsContactUceCapability info, int operationToken) throws ImsException {
-        try {
-            getListener().onCapabilityRequestResponseOptions(code, reason, info, operationToken);
-        } catch (RemoteException e) {
-            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
-        }
-    }
-
-    /**
-     * Inform the framework of a query for this device's UCE capabilities.
-     * <p>
-     * The framework will respond via the
-     * {@link #respondToCapabilityRequest(String, RcsContactUceCapability, int)} or
-     * {@link #respondToCapabilityRequestWithError(Uri, int, String, int)} method.
-     * @param contactUri The URI associated with the remote contact that is requesting capabilities.
-     * @param remoteInfo The remote contact's capability information.
-     * @param operationToken An unique operation token that you have generated that will be returned
-     *         by the framework in
-     *         {@link #respondToCapabilityRequest(String, RcsContactUceCapability, int)}.
-     * @throws ImsException If this {@link RcsSipOptionsImplBase} instance is not currently
-     * connected to the framework. This can happen if the {@link RcsFeature} is not
-     * {@link ImsFeature#STATE_READY} and the {@link RcsFeature} has not received the
-     * {@link ImsFeature#onFeatureReady()} callback. This may also happen in rare cases when the
-     * Telephony stack has crashed.
-     */
-    public final void onRemoteCapabilityRequest(@NonNull Uri contactUri,
-            @NonNull RcsContactUceCapability remoteInfo, int operationToken) throws ImsException {
-        try {
-            getListener().onRemoteCapabilityRequest(contactUri, remoteInfo, operationToken);
-        } catch (RemoteException e) {
-            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
-        }
-    }
-
-    /**
-     * Push one's own capabilities to a remote user via the SIP OPTIONS presence exchange mechanism
-     * in order to receive the capabilities of the remote user in response.
-     * <p>
-     * The implementer must call
-     * {@link #onCapabilityRequestResponse(int, String, RcsContactUceCapability, int)} to send the
-     * response of this query back to the framework.
-     * @param contactUri The URI of the remote user that we wish to get the capabilities of.
-     * @param capabilities The capabilities of this device to send to the remote user.
-     * @param operationToken A token generated by the framework that will be passed through
-     * {@link #onCapabilityRequestResponse(int, String, RcsContactUceCapability, int)} when this
-     *         operation has succeeded.
-     */
-    public void sendCapabilityRequest(@NonNull Uri contactUri,
-            @NonNull RcsContactUceCapability capabilities, int operationToken) {
-        // Stub - to be implemented by service
-        Log.w(LOG_TAG, "sendCapabilityRequest called with no implementation.");
-        try {
-            getListener().onCommandUpdate(COMMAND_CODE_NOT_SUPPORTED, operationToken);
-        } catch (RemoteException | ImsException e) {
-            // Do not do anything, this is a stub implementation.
-        }
-    }
-
-    /**
-     * Respond to a remote capability request from the contact specified with the capabilities of
-     * this device.
-     * <p>
-     * The framework will use the same token and uri as what was passed in to
-     * {@link #onRemoteCapabilityRequest(Uri, RcsContactUceCapability, int)}.
-     * @param contactUri The URI of the remote contact.
-     * @param ownCapabilities The capabilities of this device.
-     * @param operationToken The token generated by the framework that this service obtained when
-     *         {@link #onRemoteCapabilityRequest(Uri, RcsContactUceCapability, int)} was called.
-     */
-    public void respondToCapabilityRequest(@NonNull String contactUri,
-            @NonNull RcsContactUceCapability ownCapabilities, int operationToken) {
-        // Stub - to be implemented by service
-        Log.w(LOG_TAG, "respondToCapabilityRequest called with no implementation.");
-        try {
-            getListener().onCommandUpdate(COMMAND_CODE_NOT_SUPPORTED, operationToken);
-        } catch (RemoteException | ImsException e) {
-            // Do not do anything, this is a stub implementation.
-        }
-    }
-
-    /**
-     * Respond to a remote capability request from the contact specified with the specified error.
-     * <p>
-     * The framework will use the same token and uri as what was passed in to
-     * {@link #onRemoteCapabilityRequest(Uri, RcsContactUceCapability, int)}.
-     * @param contactUri A URI containing the remote contact.
-     * @param code The SIP response code to respond with.
-     * @param reason A non-null String containing the reason associated with the SIP code.
-     * @param operationToken The token provided by the framework when
-     *         {@link #onRemoteCapabilityRequest(Uri, RcsContactUceCapability, int)} was called.
-     */
-    public void respondToCapabilityRequestWithError(@NonNull Uri contactUri,
-            @SipResponseCode int code, @NonNull String reason, int operationToken) {
-        // Stub - to be implemented by service
-        Log.w(LOG_TAG, "respondToCapabiltyRequestWithError called with no implementation.");
-        try {
-            getListener().onCommandUpdate(COMMAND_CODE_NOT_SUPPORTED, operationToken);
-        } catch (RemoteException | ImsException e) {
-            // Do not do anything, this is a stub implementation.
-        }
-    }
-}
diff --git a/telephony/java/android/telephony/ims/stub/SipDelegate.java b/telephony/java/android/telephony/ims/stub/SipDelegate.java
index 3ec9709..b036b5e 100644
--- a/telephony/java/android/telephony/ims/stub/SipDelegate.java
+++ b/telephony/java/android/telephony/ims/stub/SipDelegate.java
@@ -17,8 +17,11 @@
 package android.telephony.ims.stub;
 
 import android.annotation.NonNull;
+import android.annotation.SystemApi;
 import android.telephony.ims.DelegateMessageCallback;
+import android.telephony.ims.DelegateRegistrationState;
 import android.telephony.ims.ImsService;
+import android.telephony.ims.SipDelegateConnection;
 import android.telephony.ims.SipDelegateImsConfiguration;
 import android.telephony.ims.SipDelegateManager;
 import android.telephony.ims.SipMessage;
@@ -40,6 +43,7 @@
  * {@link android.telephony.ims.DelegateStateCallback} for more information.
  * @hide
  */
+@SystemApi
 public interface SipDelegate {
 
     /**
@@ -57,16 +61,19 @@
      *         {@link DelegateMessageCallback#onMessageSendFailure} should be called with code
      *         {@link SipDelegateManager#MESSAGE_FAILURE_REASON_STALE_IMS_CONFIGURATION}.
      */
-    void sendMessage(@NonNull SipMessage message, int configVersion);
+    void sendMessage(@NonNull SipMessage message, long configVersion);
 
     /**
      * The framework is requesting that routing resources associated with the SIP dialog using the
      * provided Call-ID to be cleaned up.
      * <p>
-     * Typically a SIP Dialog close event will be signalled by that dialog receiving a BYE or 200 OK
-     * message, however, in some cases, the framework will request that the ImsService close the
+     * Typically, a SIP Dialog close event will be signalled by that dialog receiving a BYE or
+     * 200 OK message, however, the IMS application will still call
+     * {@link SipDelegateConnection#closeDialog(String)} to signal to the framework that resources
+     * can be released. In some cases, the framework will request that the ImsService close the
      * dialog due to the open dialog holding up an event such as applying a provisioning change or
-     * handing over to another transport type.
+     * handing over to another transport type. See {@link DelegateRegistrationState}.
+     *
      * @param callId The call-ID header value associated with the ongoing SIP Dialog that the
      *         framework is requesting be closed.
      */
diff --git a/telephony/java/android/telephony/ims/stub/SipTransportImplBase.java b/telephony/java/android/telephony/ims/stub/SipTransportImplBase.java
index 93d438c..1f74c09 100644
--- a/telephony/java/android/telephony/ims/stub/SipTransportImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/SipTransportImplBase.java
@@ -17,6 +17,7 @@
 package android.telephony.ims.stub;
 
 import android.annotation.NonNull;
+import android.annotation.SuppressLint;
 import android.annotation.SystemApi;
 import android.os.Binder;
 import android.os.IBinder;
@@ -32,7 +33,6 @@
 import android.util.Log;
 
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Objects;
 import java.util.concurrent.Executor;
 
@@ -99,7 +99,8 @@
     /**
      * Called by the Telephony framework to request the creation of a new {@link SipDelegate}.
      * <p>
-     * The implementation must call {@link DelegateStateCallback#onCreated(SipDelegate, List)} with
+     * The implementation must call
+     * {@link DelegateStateCallback#onCreated(SipDelegate, java.util.Set)} with
      * the {@link SipDelegate} that is associated with the {@link DelegateRequest}.
      * <p>
      * This method will be called on the Executor specified in
@@ -112,8 +113,9 @@
      *           for the SipDelegate.
      * @param mc A callback back to the remote application to be used to send SIP messages to the
      *           remote application and acknowledge the sending of outgoing SIP messages.
-     * @hide
      */
+    // executor used is defined in the constructor.
+    @SuppressLint("ExecutorRegistration")
     public void createSipDelegate(int subscriptionId, @NonNull DelegateRequest request,
             @NonNull DelegateStateCallback dc, @NonNull DelegateMessageCallback mc) {
         throw new UnsupportedOperationException("createSipDelegate not implemented!");
@@ -130,7 +132,6 @@
      * @param delegate The delegate to be destroyed.
      * @param reason The reason the remote connection to this {@link SipDelegate} is being
      *         destroyed.
-     * @hide
      */
     public void destroySipDelegate(@NonNull SipDelegate delegate,
             @SipDelegateManager.SipDelegateDestroyReason int reason) {
diff --git a/telephony/java/android/telephony/mbms/OWNERS b/telephony/java/android/telephony/mbms/OWNERS
new file mode 100644
index 0000000..718e0a2
--- /dev/null
+++ b/telephony/java/android/telephony/mbms/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+hallliu@google.com
diff --git a/telephony/java/android/telephony/mbms/vendor/OWNERS b/telephony/java/android/telephony/mbms/vendor/OWNERS
new file mode 100644
index 0000000..718e0a2
--- /dev/null
+++ b/telephony/java/android/telephony/mbms/vendor/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 20868
+
+rgreenwalt@google.com
+tgunn@google.com
+hallliu@google.com
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 4895fff..205a425 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -36,6 +36,9 @@
 import android.telephony.CellIdentity;
 import android.telephony.CellInfo;
 import android.telephony.ClientRequestStats;
+import android.telephony.ThermalMitigationRequest;
+import android.telephony.gba.UaSecurityProtocolIdentifier;
+import android.telephony.IBootstrapAuthenticationCallback;
 import android.telephony.IccOpenLogicalChannelResponse;
 import android.telephony.ICellInfoCallback;
 import android.telephony.ModemActivityInfo;
@@ -856,6 +859,11 @@
             in int[] featureTypes, in String packageName);
 
     /**
+     *  @return true if the ImsService cleared any carrier ImsService overrides, false otherwise.
+     */
+    boolean clearCarrierImsServiceOverride(int slotIndex);
+
+    /**
     * @return the package name of the carrier/device ImsService associated with this slot.
     */
     String getBoundImsServicePackage(int slotIndex, boolean isCarrierImsService, int featureType);
@@ -1668,10 +1676,19 @@
      * @param slotIndex SIM slot id
      * @param state  State of SIM (power down, power up, pass through)
      * @hide
-     * */
+     */
     void setSimPowerStateForSlot(int slotIndex, int state);
 
     /**
+     * Set SIM card power state.
+     * @param slotIndex SIM slot id
+     * @param state  State of SIM (power down, power up, pass through)
+     * @param callback callback to receive result info
+     * @hide
+     */
+    void setSimPowerStateForSlotWithCallback(int slotIndex, int state, IIntegerConsumer callback);
+
+    /**
      * Returns a list of Forbidden PLMNs from the specified SIM App
      * Returns null if the query fails.
      *
@@ -2154,6 +2171,8 @@
     oneway void setSystemSelectionChannels(in List<RadioAccessSpecifier> specifiers,
             int subId, IBooleanConsumer resultCallback);
 
+    List<RadioAccessSpecifier> getSystemSelectionChannels(int subId);
+
     boolean isMvnoMatched(int subId, int mvnoType, String mvnoMatchData);
 
     /**
@@ -2247,4 +2266,41 @@
      * @return CarrierBandwidth with bandwidth of both primary and secondary carrier.
      */
     CarrierBandwidth getCarrierBandwidth(int subId);
+
+    /**
+     * Thermal mitigation request to control functionalities at modem.
+     *
+     * @param subId the id of the subscription
+     * @param thermalMitigationRequest holds the parameters necessary for the request.
+     * @throws InvalidThermalMitigationRequestException if the parametes are invalid.
+     */
+    int sendThermalMitigationRequest(int subId,
+            in ThermalMitigationRequest thermalMitigationRequest);
+
+    /**
+     * Get the Generic Bootstrapping Architecture authentication keys
+     */
+    void bootstrapAuthenticationRequest(int subId, int appType, in Uri nafUrl,
+            in UaSecurityProtocolIdentifier securityProtocol,
+            boolean forceBootStrapping, IBootstrapAuthenticationCallback callback);
+
+    /**
+     * Set the GbaService Package Name that Telephony will bind to.
+     */
+    boolean setBoundGbaServiceOverride(int subId, String packageName);
+
+    /**
+     * Return the package name of the currently bound GbaService.
+     */
+    String getBoundGbaService(int subId);
+
+    /**
+     * Set the release time for telephony to unbind GbaService.
+     */
+    boolean setGbaReleaseTimeOverride(int subId, int interval);
+
+    /**
+     * Return the release time for telephony to unbind GbaService.
+     */
+    int getGbaReleaseTime(int subId);
 }
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index 9d4072f..21cca4c 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -519,6 +519,8 @@
     int RIL_REQUEST_RELEASE_PDU_SESSION_ID = 216;
     int RIL_REQUEST_START_HANDOVER = 217;
     int RIL_REQUEST_CANCEL_HANDOVER = 218;
+    int RIL_REQUEST_GET_SYSTEM_SELECTION_CHANNELS = 219;
+    int RIL_REQUEST_SET_DATA_THROTTLING = 221;
 
     /* Responses begin */
     int RIL_RESPONSE_ACKNOWLEDGEMENT = 800;
diff --git a/test-mock/src/android/test/mock/OWNERS b/test-mock/src/android/test/mock/OWNERS
new file mode 100644
index 0000000..36d9cb2
--- /dev/null
+++ b/test-mock/src/android/test/mock/OWNERS
@@ -0,0 +1 @@
+set noparent
diff --git a/tests/ActivityManagerPerfTests/OWNERS b/tests/ActivityManagerPerfTests/OWNERS
new file mode 100644
index 0000000..72c0a9e
--- /dev/null
+++ b/tests/ActivityManagerPerfTests/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/am/OWNERS
diff --git a/tests/AmSlam/OWNERS b/tests/AmSlam/OWNERS
new file mode 100644
index 0000000..72c0a9e
--- /dev/null
+++ b/tests/AmSlam/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/am/OWNERS
diff --git a/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java b/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
index 7d826f7..e05816e 100644
--- a/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
+++ b/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
@@ -264,9 +264,9 @@
             // Set time to future.
             setTimeFutureDays(deltaDays);
 
-            // Set filter to quicken.
-            compilePackageWithFilter(PACKAGE_NAME, "quicken");
-            Assert.assertEquals("quicken", getCompilerFilter(PACKAGE_NAME));
+            // Set filter to verify.
+            compilePackageWithFilter(PACKAGE_NAME, "verify");
+            Assert.assertEquals("verify", getCompilerFilter(PACKAGE_NAME));
 
             // Fill up storage to trigger low storage threshold.
             fillUpToLowStorage();
@@ -290,9 +290,9 @@
             // Set time to future.
             setTimeFutureDays(deltaDays);
 
-            // Set filter to quicken.
-            compilePackageWithFilter(PACKAGE_NAME, "quicken");
-            Assert.assertEquals("quicken", getCompilerFilter(PACKAGE_NAME));
+            // Set filter to speed-profile.
+            compilePackageWithFilter(PACKAGE_NAME, "speed-profile");
+            Assert.assertEquals("speed-profile", getCompilerFilter(PACKAGE_NAME));
 
             // Fill up storage to trigger low storage threshold.
             fillUpToLowStorage();
diff --git a/tests/BlobStoreTestUtils/OWNERS b/tests/BlobStoreTestUtils/OWNERS
new file mode 100644
index 0000000..65bb6b8
--- /dev/null
+++ b/tests/BlobStoreTestUtils/OWNERS
@@ -0,0 +1 @@
+include /apex/blobstore/OWNERS
diff --git a/tests/Camera2Tests/OWNERS b/tests/Camera2Tests/OWNERS
new file mode 100644
index 0000000..f48a95c
--- /dev/null
+++ b/tests/Camera2Tests/OWNERS
@@ -0,0 +1 @@
+include platform/frameworks/av:/camera/OWNERS
diff --git a/tests/CanvasCompare/OWNERS b/tests/CanvasCompare/OWNERS
new file mode 100644
index 0000000..c88a9f8
--- /dev/null
+++ b/tests/CanvasCompare/OWNERS
@@ -0,0 +1 @@
+include /libs/hwui/OWNERS
diff --git a/tests/Compatibility/OWNERS b/tests/Compatibility/OWNERS
new file mode 100644
index 0000000..f8c3520
--- /dev/null
+++ b/tests/Compatibility/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/compat/OWNERS
diff --git a/tests/DozeTest/OWNERS b/tests/DozeTest/OWNERS
new file mode 100644
index 0000000..2e96c97
--- /dev/null
+++ b/tests/DozeTest/OWNERS
@@ -0,0 +1 @@
+include /packages/SystemUI/OWNERS
diff --git a/tests/FixVibrateSetting/OWNERS b/tests/FixVibrateSetting/OWNERS
new file mode 100644
index 0000000..cc63ceb
--- /dev/null
+++ b/tests/FixVibrateSetting/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/vibrator/OWNERS
diff --git a/tests/FlickerTests/OWNERS b/tests/FlickerTests/OWNERS
new file mode 100644
index 0000000..f35a318
--- /dev/null
+++ b/tests/FlickerTests/OWNERS
@@ -0,0 +1,2 @@
+include /services/core/java/com/android/server/wm/OWNERS
+natanieljr@google.com
\ No newline at end of file
diff --git a/tests/HugeBackup/OWNERS b/tests/HugeBackup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/tests/HugeBackup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/tests/HwAccelerationTest/OWNERS b/tests/HwAccelerationTest/OWNERS
new file mode 100644
index 0000000..c88a9f8
--- /dev/null
+++ b/tests/HwAccelerationTest/OWNERS
@@ -0,0 +1 @@
+include /libs/hwui/OWNERS
diff --git a/tests/Input/OWNERS b/tests/Input/OWNERS
new file mode 100644
index 0000000..d701f23
--- /dev/null
+++ b/tests/Input/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/hardware/input/OWNERS
diff --git a/tests/JobSchedulerPerfTests/OWNERS b/tests/JobSchedulerPerfTests/OWNERS
new file mode 100644
index 0000000..6f207fb1
--- /dev/null
+++ b/tests/JobSchedulerPerfTests/OWNERS
@@ -0,0 +1 @@
+include /apex/jobscheduler/OWNERS
diff --git a/tests/JobSchedulerTestApp/OWNERS b/tests/JobSchedulerTestApp/OWNERS
new file mode 100644
index 0000000..6f207fb1
--- /dev/null
+++ b/tests/JobSchedulerTestApp/OWNERS
@@ -0,0 +1 @@
+include /apex/jobscheduler/OWNERS
diff --git a/tests/LocationTracker/OWNERS b/tests/LocationTracker/OWNERS
new file mode 100644
index 0000000..5ac6028
--- /dev/null
+++ b/tests/LocationTracker/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/location/OWNERS
diff --git a/tests/LowStorageTest/OWNERS b/tests/LowStorageTest/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/tests/LowStorageTest/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/tests/NetworkSecurityConfigTest/OWNERS b/tests/NetworkSecurityConfigTest/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/tests/NetworkSecurityConfigTest/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/tests/PackageWatchdog/OWNERS b/tests/PackageWatchdog/OWNERS
new file mode 100644
index 0000000..d04a706
--- /dev/null
+++ b/tests/PackageWatchdog/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/rollback/OWNERS
diff --git a/tests/PackageWatchdog/src/com/android/server/OWNERS b/tests/PackageWatchdog/src/com/android/server/OWNERS
new file mode 100644
index 0000000..5cf4dcf
--- /dev/null
+++ b/tests/PackageWatchdog/src/com/android/server/OWNERS
@@ -0,0 +1 @@
+per-file PackageWatchdogTest.java = file:/services/core/java/com/android/server/rollback/OWNERS
diff --git a/tests/PlatformCompatGating/OWNERS b/tests/PlatformCompatGating/OWNERS
new file mode 100644
index 0000000..f8c3520
--- /dev/null
+++ b/tests/PlatformCompatGating/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/compat/OWNERS
diff --git a/tests/RollbackTest/Android.bp b/tests/RollbackTest/Android.bp
index a23df92..4f5a305 100644
--- a/tests/RollbackTest/Android.bp
+++ b/tests/RollbackTest/Android.bp
@@ -53,6 +53,9 @@
     name: "MultiUserRollbackTest",
     srcs: ["MultiUserRollbackTest/src/**/*.java"],
     libs: ["tradefed"],
+    static_libs: [
+        "frameworks-base-hostutils",
+    ],
     test_suites: ["general-tests"],
     test_config: "MultiUserRollbackTest.xml",
 }
diff --git a/tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java b/tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java
index 42b886f..f160847 100644
--- a/tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java
+++ b/tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java
@@ -24,6 +24,7 @@
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -40,6 +41,9 @@
     private static final long SWITCH_USER_COMPLETED_NUMBER_OF_POLLS = 60;
     private static final long SWITCH_USER_COMPLETED_POLL_INTERVAL_IN_MILLIS = 1000;
 
+    @Rule
+    public AbandonSessionsRule mHostTestRule = new AbandonSessionsRule(this);
+
     @After
     public void tearDown() throws Exception {
         removeSecondaryUserIfNecessary();
@@ -59,6 +63,30 @@
         runPhaseForUsers("testBasic", mSecondaryUserId);
     }
 
+    /**
+     * Tests staged install/rollback works correctly on the 2nd user.
+     */
+    @Test
+    public void testStagedRollback() throws Exception {
+        runPhaseForUsers("testStagedRollback_Phase1", mSecondaryUserId);
+        getDevice().reboot();
+
+        // Need to unlock the user for device tests to run successfully
+        getDevice().startUser(mSecondaryUserId);
+        awaitUserUnlocked(mSecondaryUserId);
+        runPhaseForUsers("testStagedRollback_Phase2", mSecondaryUserId);
+        getDevice().reboot();
+
+        getDevice().startUser(mSecondaryUserId);
+        awaitUserUnlocked(mSecondaryUserId);
+        runPhaseForUsers("testStagedRollback_Phase3", mSecondaryUserId);
+        getDevice().reboot();
+
+        getDevice().startUser(mSecondaryUserId);
+        awaitUserUnlocked(mSecondaryUserId);
+        runPhaseForUsers("testStagedRollback_Phase4", mSecondaryUserId);
+    }
+
     @Test
     public void testMultipleUsers() throws Exception {
         runPhaseForUsers("testMultipleUsersInstallV1", mOriginalUserId, mSecondaryUserId);
diff --git a/tests/RollbackTest/OWNERS b/tests/RollbackTest/OWNERS
new file mode 100644
index 0000000..d04a706
--- /dev/null
+++ b/tests/RollbackTest/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/rollback/OWNERS
diff --git a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/MultiUserRollbackTest.java b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/MultiUserRollbackTest.java
index 8641f4d..5d133a4 100644
--- a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/MultiUserRollbackTest.java
+++ b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/MultiUserRollbackTest.java
@@ -115,4 +115,32 @@
         assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1);
         InstallUtils.processUserData(TestApp.A);
     }
+
+    @Test
+    public void testStagedRollback_Phase1() throws Exception {
+        assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1);
+        Install.single(TestApp.A1).setStaged().commit();
+        assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1);
+    }
+
+    @Test
+    public void testStagedRollback_Phase2() throws Exception {
+        assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1);
+        Install.single(TestApp.A2).setStaged().setEnableRollback().commit();
+        assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1);
+    }
+
+    @Test
+    public void testStagedRollback_Phase3() throws Exception {
+        assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2);
+        RollbackInfo rollback = RollbackUtils.waitForAvailableRollback(TestApp.A);
+        assertThat(rollback).packagesContainsExactly(Rollback.from(TestApp.A2).to(TestApp.A1));
+        RollbackUtils.rollback(rollback.getRollbackId());
+        assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2);
+    }
+
+    @Test
+    public void testStagedRollback_Phase4() {
+        assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1);
+    }
 }
diff --git a/tests/RollbackTest/TEST_MAPPING b/tests/RollbackTest/TEST_MAPPING
index 0f4c460..7f9f2dc 100644
--- a/tests/RollbackTest/TEST_MAPPING
+++ b/tests/RollbackTest/TEST_MAPPING
@@ -1,5 +1,5 @@
 {
-  "presubmit": [
+  "presubmit-large": [
     {
       "name": "RollbackTest"
     },
diff --git a/tests/SoundTriggerTestApp/OWNERS b/tests/SoundTriggerTestApp/OWNERS
new file mode 100644
index 0000000..816bc6b
--- /dev/null
+++ b/tests/SoundTriggerTestApp/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/media/soundtrigger/OWNERS
diff --git a/tests/SoundTriggerTests/OWNERS b/tests/SoundTriggerTests/OWNERS
new file mode 100644
index 0000000..816bc6b
--- /dev/null
+++ b/tests/SoundTriggerTests/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/media/soundtrigger/OWNERS
diff --git a/tests/StagedInstallTest/Android.bp b/tests/StagedInstallTest/Android.bp
index b001fe1..45c1c73 100644
--- a/tests/StagedInstallTest/Android.bp
+++ b/tests/StagedInstallTest/Android.bp
@@ -27,7 +27,6 @@
     static_libs: [
         "testng",
         "compatibility-tradefed",
-        "module_test_util",
         "frameworks-base-hostutils",
         "cts-install-lib-host",
     ],
diff --git a/tests/StagedInstallTest/OWNERS b/tests/StagedInstallTest/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/tests/StagedInstallTest/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/OWNERS
diff --git a/tests/StagedInstallTest/src/com/android/tests/stagedinstallinternal/host/StagedInstallInternalTest.java b/tests/StagedInstallTest/src/com/android/tests/stagedinstallinternal/host/StagedInstallInternalTest.java
index 407c65b..b7c9e59 100644
--- a/tests/StagedInstallTest/src/com/android/tests/stagedinstallinternal/host/StagedInstallInternalTest.java
+++ b/tests/StagedInstallTest/src/com/android/tests/stagedinstallinternal/host/StagedInstallInternalTest.java
@@ -27,7 +27,6 @@
 
 import com.android.ddmlib.Log;
 import com.android.tests.rollback.host.AbandonSessionsRule;
-import com.android.tests.util.ModuleTestUtils;
 import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
 import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
 import com.android.tradefed.util.ProcessInfo;
@@ -52,7 +51,6 @@
     private static final String SHIM_V2 = "com.android.apex.cts.shim.v2.apex";
     private static final String APK_A = "TestAppAv1.apk";
 
-    private final ModuleTestUtils mTestUtils = new ModuleTestUtils(this);
     private final InstallUtilsHost mHostUtils = new InstallUtilsHost(this);
 
     /**
@@ -101,7 +99,7 @@
         assumeTrue("Device does not support updating APEX",
                 mHostUtils.isApexUpdateSupported());
 
-        final File apexFile = mTestUtils.getTestFile(SHIM_V2);
+        final File apexFile = mHostUtils.getTestFile(SHIM_V2);
         final String output = getDevice().executeAdbCommand("install", "--staged",
                 "--staged-ready-timeout", "60000", apexFile.getAbsolutePath());
         assertThat(output).contains("Reboot device to apply staged session");
@@ -116,7 +114,7 @@
         assumeTrue("Device does not support updating APEX",
                 mHostUtils.isApexUpdateSupported());
 
-        final File apexFile = mTestUtils.getTestFile(SHIM_V2);
+        final File apexFile = mHostUtils.getTestFile(SHIM_V2);
         final String output = getDevice().executeAdbCommand("install", "--staged",
                 apexFile.getAbsolutePath());
         assertThat(output).contains("Reboot device to apply staged session");
@@ -131,7 +129,7 @@
         assumeTrue("Device does not support updating APEX",
                 mHostUtils.isApexUpdateSupported());
 
-        final File apexFile = mTestUtils.getTestFile(SHIM_V2);
+        final File apexFile = mHostUtils.getTestFile(SHIM_V2);
         final String output = getDevice().executeAdbCommand("install", "--staged",
                 "--staged-ready-timeout", "0", apexFile.getAbsolutePath());
         assertThat(output).doesNotContain("Reboot device to apply staged session");
@@ -147,7 +145,7 @@
         assumeTrue("Device does not support updating APEX",
                 mHostUtils.isApexUpdateSupported());
 
-        final File apexFile = mTestUtils.getTestFile(SHIM_V2);
+        final File apexFile = mHostUtils.getTestFile(SHIM_V2);
         String output = getDevice().executeAdbCommand("install", "--staged",
                 "--enable-rollback", apexFile.getAbsolutePath());
         assertThat(output).contains("Reboot device to apply staged session");
@@ -164,8 +162,8 @@
         assumeTrue("Device does not support updating APEX",
                 mHostUtils.isApexUpdateSupported());
 
-        final File apexFile = mTestUtils.getTestFile(SHIM_V2);
-        final File apkFile = mTestUtils.getTestFile(APK_A);
+        final File apexFile = mHostUtils.getTestFile(SHIM_V2);
+        final File apkFile = mHostUtils.getTestFile(APK_A);
         final String output = getDevice().executeAdbCommand("install-multi-package",
                 apexFile.getAbsolutePath(), apkFile.getAbsolutePath());
         assertThat(output).contains("Created parent session");
diff --git a/tests/StatusBar/OWNERS b/tests/StatusBar/OWNERS
new file mode 100644
index 0000000..2e96c97
--- /dev/null
+++ b/tests/StatusBar/OWNERS
@@ -0,0 +1 @@
+include /packages/SystemUI/OWNERS
diff --git a/tests/TaskOrganizerTest/OWNERS b/tests/TaskOrganizerTest/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/tests/TaskOrganizerTest/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/tests/TelephonyCommonTests/OWNERS b/tests/TelephonyCommonTests/OWNERS
new file mode 100644
index 0000000..640baf2
--- /dev/null
+++ b/tests/TelephonyCommonTests/OWNERS
@@ -0,0 +1 @@
+include /telephony/OWNERS
diff --git a/tests/UsageReportingTest/OWNERS b/tests/UsageReportingTest/OWNERS
new file mode 100644
index 0000000..d3227de
--- /dev/null
+++ b/tests/UsageReportingTest/OWNERS
@@ -0,0 +1 @@
+include /services/usage/OWNERS
diff --git a/tests/UsageStatsPerfTests/OWNERS b/tests/UsageStatsPerfTests/OWNERS
new file mode 100644
index 0000000..d3227de
--- /dev/null
+++ b/tests/UsageStatsPerfTests/OWNERS
@@ -0,0 +1 @@
+include /services/usage/OWNERS
diff --git a/tests/UsageStatsTest/OWNERS b/tests/UsageStatsTest/OWNERS
new file mode 100644
index 0000000..d3227de
--- /dev/null
+++ b/tests/UsageStatsTest/OWNERS
@@ -0,0 +1 @@
+include /services/usage/OWNERS
diff --git a/tests/UsbHostExternalManagmentTest/OWNERS b/tests/UsbHostExternalManagmentTest/OWNERS
new file mode 100644
index 0000000..f7b2a37
--- /dev/null
+++ b/tests/UsbHostExternalManagmentTest/OWNERS
@@ -0,0 +1 @@
+include /services/usb/OWNERS
diff --git a/tests/UsbManagerTests/OWNERS b/tests/UsbManagerTests/OWNERS
new file mode 100644
index 0000000..f7b2a37
--- /dev/null
+++ b/tests/UsbManagerTests/OWNERS
@@ -0,0 +1 @@
+include /services/usb/OWNERS
diff --git a/tests/UsbTests/OWNERS b/tests/UsbTests/OWNERS
new file mode 100644
index 0000000..f7b2a37
--- /dev/null
+++ b/tests/UsbTests/OWNERS
@@ -0,0 +1 @@
+include /services/usb/OWNERS
diff --git a/tests/VoiceInteraction/OWNERS b/tests/VoiceInteraction/OWNERS
new file mode 100644
index 0000000..ef1061b
--- /dev/null
+++ b/tests/VoiceInteraction/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/voice/OWNERS
diff --git a/tests/WindowAnimationJank/OWNERS b/tests/WindowAnimationJank/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/tests/WindowAnimationJank/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/tests/WindowInsetsTests/OWNERS b/tests/WindowInsetsTests/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/tests/WindowInsetsTests/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/tests/backup/OWNERS b/tests/backup/OWNERS
new file mode 100644
index 0000000..d99779e
--- /dev/null
+++ b/tests/backup/OWNERS
@@ -0,0 +1 @@
+include /services/backup/OWNERS
diff --git a/tests/benchmarks/src/com/android/server/net/OWNERS b/tests/benchmarks/src/com/android/server/net/OWNERS
new file mode 100644
index 0000000..aa87958
--- /dev/null
+++ b/tests/benchmarks/src/com/android/server/net/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/net/OWNERS
diff --git a/tests/net/common/java/android/net/LinkAddressTest.java b/tests/net/common/java/android/net/LinkAddressTest.java
index 60308e3..1eaf30c 100644
--- a/tests/net/common/java/android/net/LinkAddressTest.java
+++ b/tests/net/common/java/android/net/LinkAddressTest.java
@@ -68,8 +68,8 @@
 
     private static final String V4 = "192.0.2.1";
     private static final String V6 = "2001:db8::1";
-    private static final InetAddress V4_ADDRESS = NetworkUtils.numericToInetAddress(V4);
-    private static final InetAddress V6_ADDRESS = NetworkUtils.numericToInetAddress(V6);
+    private static final InetAddress V4_ADDRESS = InetAddresses.parseNumericAddress(V4);
+    private static final InetAddress V6_ADDRESS = InetAddresses.parseNumericAddress(V6);
 
     @Test
     public void testConstants() {
@@ -131,10 +131,10 @@
             ipv6Loopback = new LinkAddress(addrs.get(0));
         }
 
-        assertEquals(NetworkUtils.numericToInetAddress("127.0.0.1"), ipv4Loopback.getAddress());
+        assertEquals(InetAddresses.parseNumericAddress("127.0.0.1"), ipv4Loopback.getAddress());
         assertEquals(8, ipv4Loopback.getPrefixLength());
 
-        assertEquals(NetworkUtils.numericToInetAddress("::1"), ipv6Loopback.getAddress());
+        assertEquals(InetAddresses.parseNumericAddress("::1"), ipv6Loopback.getAddress());
         assertEquals(128, ipv6Loopback.getPrefixLength());
 
         // Null addresses are rejected.
diff --git a/tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt b/tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt
index a67156a..a5e44d5 100644
--- a/tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt
+++ b/tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt
@@ -53,8 +53,13 @@
         assertParcelSane(MatchAllNetworkSpecifier(), 0)
     }
 
-    @Test @IgnoreAfter(Build.VERSION_CODES.R)
-    fun testCanBeSatisfiedBy_BeforeS() {
+    @Test
+    @IgnoreUpTo(Build.VERSION_CODES.Q)
+    @IgnoreAfter(Build.VERSION_CODES.R)
+    // Only run this test on Android R.
+    // The method - satisfiedBy() has changed to canBeSatisfiedBy() starting from Android R, so the
+    // method - canBeSatisfiedBy() cannot be found when running this test on Android Q.
+    fun testCanBeSatisfiedBy_OnlyForR() {
         // MatchAllNetworkSpecifier didn't follow its parent class to change the satisfiedBy() to
         // canBeSatisfiedBy(), so if a caller calls MatchAllNetworkSpecifier#canBeSatisfiedBy(), the
         // NetworkSpecifier#canBeSatisfiedBy() will be called actually, and false will be returned.
diff --git a/tests/net/common/java/android/net/NetworkProviderTest.kt b/tests/net/common/java/android/net/NetworkProviderTest.kt
index dd3f5be..77e9f12 100644
--- a/tests/net/common/java/android/net/NetworkProviderTest.kt
+++ b/tests/net/common/java/android/net/NetworkProviderTest.kt
@@ -33,6 +33,9 @@
 import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
+import org.mockito.Mockito.doReturn
+import org.mockito.Mockito.mock
+import org.mockito.Mockito.verifyNoMoreInteractions
 import java.util.UUID
 import kotlin.test.assertEquals
 import kotlin.test.assertNotEquals
@@ -87,8 +90,8 @@
         ) = seenEvents.poll(DEFAULT_TIMEOUT_MS) { it is T && predicate(it) }
     }
 
-    private fun createNetworkProvider(): TestNetworkProvider {
-        return TestNetworkProvider(context, mHandlerThread.looper)
+    private fun createNetworkProvider(ctx: Context = context): TestNetworkProvider {
+        return TestNetworkProvider(ctx, mHandlerThread.looper)
     }
 
     @Test
@@ -169,7 +172,12 @@
 
     @Test
     fun testDeclareNetworkRequestUnfulfillable() {
-        val provider = createNetworkProvider()
+        val mockContext = mock(Context::class.java)
+        val provider = createNetworkProvider(mockContext)
+        // ConnectivityManager not required at creation time
+        verifyNoMoreInteractions(mockContext)
+        doReturn(mCm).`when`(mockContext).getSystemService(Context.CONNECTIVITY_SERVICE)
+
         mCm.registerNetworkProvider(provider)
 
         val specifier = StringNetworkSpecifier(UUID.randomUUID().toString())
diff --git a/tests/net/common/java/android/net/OemNetworkPreferencesTest.java b/tests/net/common/java/android/net/OemNetworkPreferencesTest.java
index b77ed6a..cade5ba 100644
--- a/tests/net/common/java/android/net/OemNetworkPreferencesTest.java
+++ b/tests/net/common/java/android/net/OemNetworkPreferencesTest.java
@@ -22,10 +22,13 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import android.os.Build;
 import android.util.SparseArray;
 
 import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
+
+import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo;
+import com.android.testutils.DevSdkIgnoreRunner;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -34,7 +37,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
-@RunWith(AndroidJUnit4.class)
+@IgnoreUpTo(Build.VERSION_CODES.R)
+@RunWith(DevSdkIgnoreRunner.class)
 @SmallTest
 public class OemNetworkPreferencesTest {
 
diff --git a/tests/net/integration/util/com/android/server/NetworkAgentWrapper.java b/tests/net/integration/util/com/android/server/NetworkAgentWrapper.java
index 2a24d1a..3d4dc4d 100644
--- a/tests/net/integration/util/com/android/server/NetworkAgentWrapper.java
+++ b/tests/net/integration/util/com/android/server/NetworkAgentWrapper.java
@@ -29,7 +29,7 @@
 import static junit.framework.Assert.assertTrue;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.fail;
 
 import android.content.Context;
 import android.net.ConnectivityManager;
@@ -38,7 +38,6 @@
 import android.net.NetworkAgent;
 import android.net.NetworkAgentConfig;
 import android.net.NetworkCapabilities;
-import android.net.NetworkInfo;
 import android.net.NetworkProvider;
 import android.net.NetworkSpecifier;
 import android.net.SocketKeepalive;
@@ -53,9 +52,9 @@
 import com.android.testutils.TestableNetworkCallback;
 
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 public class NetworkAgentWrapper implements TestableNetworkCallback.HasNetwork {
-    private final NetworkInfo mNetworkInfo;
     private final NetworkCapabilities mNetworkCapabilities;
     private final HandlerThread mHandlerThread;
     private final Context mContext;
@@ -63,6 +62,7 @@
 
     private final ConditionVariable mDisconnected = new ConditionVariable();
     private final ConditionVariable mPreventReconnectReceived = new ConditionVariable();
+    private final AtomicBoolean mConnected = new AtomicBoolean(false);
     private int mScore;
     private NetworkAgent mNetworkAgent;
     private int mStartKeepaliveError = SocketKeepalive.ERROR_UNSUPPORTED;
@@ -76,7 +76,6 @@
             NetworkCapabilities ncTemplate, Context context) throws Exception {
         final int type = transportToLegacyType(transport);
         final String typeName = ConnectivityManager.getNetworkTypeName(type);
-        mNetworkInfo = new NetworkInfo(type, 0, typeName, "Mock");
         mNetworkCapabilities = (ncTemplate != null) ? ncTemplate : new NetworkCapabilities();
         mNetworkCapabilities.addCapability(NET_CAPABILITY_NOT_SUSPENDED);
         mNetworkCapabilities.addTransportType(transport);
@@ -108,22 +107,29 @@
         mHandlerThread = new HandlerThread(mLogTag);
         mHandlerThread.start();
 
-        mNetworkAgent = makeNetworkAgent(linkProperties);
+        mNetworkAgent = makeNetworkAgent(linkProperties, type, typeName);
     }
 
-    protected InstrumentedNetworkAgent makeNetworkAgent(LinkProperties linkProperties)
+    protected InstrumentedNetworkAgent makeNetworkAgent(LinkProperties linkProperties,
+            final int type, final String typeName)
             throws Exception {
-        return new InstrumentedNetworkAgent(this, linkProperties);
+        return new InstrumentedNetworkAgent(this, linkProperties, type, typeName);
     }
 
     public static class InstrumentedNetworkAgent extends NetworkAgent {
         private final NetworkAgentWrapper mWrapper;
+        private static final String PROVIDER_NAME = "InstrumentedNetworkAgentProvider";
 
-        public InstrumentedNetworkAgent(NetworkAgentWrapper wrapper, LinkProperties lp) {
-            super(wrapper.mHandlerThread.getLooper(), wrapper.mContext, wrapper.mLogTag,
-                    wrapper.mNetworkInfo, wrapper.mNetworkCapabilities, lp, wrapper.mScore,
-                    new NetworkAgentConfig(), NetworkProvider.ID_NONE);
+        public InstrumentedNetworkAgent(NetworkAgentWrapper wrapper, LinkProperties lp,
+                final int type, final String typeName) {
+            super(wrapper.mContext, wrapper.mHandlerThread.getLooper(), wrapper.mLogTag,
+                    wrapper.mNetworkCapabilities, lp, wrapper.mScore,
+                    new NetworkAgentConfig.Builder()
+                            .setLegacyType(type).setLegacyTypeName(typeName).build(),
+                    new NetworkProvider(wrapper.mContext, wrapper.mHandlerThread.getLooper(),
+                            PROVIDER_NAME));
             mWrapper = wrapper;
+            register();
         }
 
         @Override
@@ -212,10 +218,12 @@
     }
 
     public void connect() {
-        assertNotEquals("MockNetworkAgents can only be connected once",
-                mNetworkInfo.getDetailedState(), NetworkInfo.DetailedState.CONNECTED);
-        mNetworkInfo.setDetailedState(NetworkInfo.DetailedState.CONNECTED, null, null);
-        mNetworkAgent.sendNetworkInfo(mNetworkInfo);
+        if (!mConnected.compareAndSet(false /* expect */, true /* update */)) {
+            // compareAndSet returns false when the value couldn't be updated because it did not
+            // match the expected value.
+            fail("Test NetworkAgents can only be connected once");
+        }
+        mNetworkAgent.markConnected();
     }
 
     public void suspend() {
@@ -227,8 +235,7 @@
     }
 
     public void disconnect() {
-        mNetworkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null);
-        mNetworkAgent.sendNetworkInfo(mNetworkInfo);
+        mNetworkAgent.unregister();
     }
 
     @Override
diff --git a/tests/net/java/android/net/TcpKeepalivePacketDataTest.java b/tests/net/java/android/net/TcpKeepalivePacketDataTest.java
index 835a83e..c5b25bd 100644
--- a/tests/net/java/android/net/TcpKeepalivePacketDataTest.java
+++ b/tests/net/java/android/net/TcpKeepalivePacketDataTest.java
@@ -147,5 +147,11 @@
         assertEquals(resultData.rcvWndScale, wndScale);
         assertEquals(resultData.tos, tos);
         assertEquals(resultData.ttl, ttl);
+
+        final String expected = ""
+                + "android.net.TcpKeepalivePacketDataParcelable{srcAddress: [10, 0, 0, 1],"
+                + " srcPort: 1234, dstAddress: [10, 0, 0, 5], dstPort: 4321, seq: 286331153,"
+                + " ack: 572662306, rcvWnd: 48000, rcvWndScale: 2, tos: 4, ttl: 64}";
+        assertEquals(expected, resultData.toString());
     }
 }
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index 408dd0a..8c403f1 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -18,6 +18,9 @@
 
 import static android.Manifest.permission.CHANGE_NETWORK_STATE;
 import static android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS;
+import static android.app.PendingIntent.FLAG_IMMUTABLE;
+import static android.content.Intent.ACTION_USER_ADDED;
+import static android.content.Intent.ACTION_USER_REMOVED;
 import static android.content.pm.PackageInfo.REQUESTED_PERMISSION_GRANTED;
 import static android.content.pm.PackageManager.GET_PERMISSIONS;
 import static android.content.pm.PackageManager.MATCH_ANY_USER;
@@ -54,8 +57,10 @@
 import static android.net.NetworkCapabilities.NET_CAPABILITY_IMS;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_MMS;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_PARTIAL_CONNECTIVITY;
@@ -177,13 +182,13 @@
 import android.net.NetworkStackClient;
 import android.net.NetworkState;
 import android.net.NetworkTestResultParcelable;
-import android.net.NetworkUtils;
 import android.net.ProxyInfo;
 import android.net.ResolverParamsParcel;
 import android.net.RouteInfo;
 import android.net.RouteInfoParcel;
 import android.net.SocketKeepalive;
 import android.net.UidRange;
+import android.net.UidRangeParcel;
 import android.net.Uri;
 import android.net.VpnManager;
 import android.net.metrics.IpConnectivityLog;
@@ -642,8 +647,8 @@
         }
 
         @Override
-        protected InstrumentedNetworkAgent makeNetworkAgent(LinkProperties linkProperties)
-                throws Exception {
+        protected InstrumentedNetworkAgent makeNetworkAgent(LinkProperties linkProperties,
+                final int type, final String typeName) throws Exception {
             mNetworkMonitor = mock(INetworkMonitor.class);
 
             final Answer validateAnswer = inv -> {
@@ -662,7 +667,8 @@
                     any() /* name */,
                     nmCbCaptor.capture());
 
-            final InstrumentedNetworkAgent na = new InstrumentedNetworkAgent(this, linkProperties) {
+            final InstrumentedNetworkAgent na = new InstrumentedNetworkAgent(this, linkProperties,
+                    type, typeName) {
                 @Override
                 public void networkStatus(int status, String redirectUrl) {
                     mRedirectUrl = redirectUrl;
@@ -1050,13 +1056,15 @@
 
         public MockVpn(int userId) {
             super(startHandlerThreadAndReturnLooper(), mServiceContext, mNetworkManagementService,
-                    userId, mock(KeyStore.class));
+                    mMockNetd, userId, mock(KeyStore.class));
             mConfig = new VpnConfig();
         }
 
         public void setUids(Set<UidRange> uids) {
             mNetworkCapabilities.setUids(uids);
-            updateCapabilitiesInternal(null /* defaultNetwork */, true);
+            if (mAgentRegistered) {
+                mMockNetworkAgent.setNetworkCapabilities(mNetworkCapabilities, true);
+            }
         }
 
         public void setVpnType(int vpnType) {
@@ -1082,11 +1090,16 @@
                 throws Exception {
             if (mAgentRegistered) throw new IllegalStateException("already registered");
             setUids(uids);
-            mConfig.isMetered = isAlwaysMetered;
+            if (!isAlwaysMetered) mNetworkCapabilities.addCapability(NET_CAPABILITY_NOT_METERED);
             mInterface = VPN_IFNAME;
             mMockNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_VPN, lp,
                     mNetworkCapabilities);
             mMockNetworkAgent.waitForIdle(TIMEOUT_MS);
+
+            verify(mMockNetd, times(1)).networkAddUidRanges(eq(mMockVpn.getNetId()),
+                    eq(toUidRangeStableParcels(uids)));
+            verify(mMockNetd, never())
+                    .networkRemoveUidRanges(eq(mMockVpn.getNetId()), any());
             mAgentRegistered = true;
             mNetworkCapabilities.set(mMockNetworkAgent.getNetworkCapabilities());
             mNetworkAgent = mMockNetworkAgent.getNetworkAgent();
@@ -1141,28 +1154,6 @@
             mMockNetworkAgent.sendLinkProperties(lp);
         }
 
-        private NetworkCapabilities updateCapabilitiesInternal(Network defaultNetwork,
-                boolean sendToConnectivityService) {
-            if (!mAgentRegistered) return null;
-            super.updateCapabilities(defaultNetwork);
-            // Because super.updateCapabilities will update the capabilities of the agent but
-            // not the mock agent, the mock agent needs to know about them.
-            copyCapabilitiesToNetworkAgent(sendToConnectivityService);
-            return new NetworkCapabilities(mNetworkCapabilities);
-        }
-
-        private void copyCapabilitiesToNetworkAgent(boolean sendToConnectivityService) {
-            if (null != mMockNetworkAgent) {
-                mMockNetworkAgent.setNetworkCapabilities(mNetworkCapabilities,
-                        sendToConnectivityService);
-            }
-        }
-
-        @Override
-        public NetworkCapabilities updateCapabilities(Network defaultNetwork) {
-            return updateCapabilitiesInternal(defaultNetwork, false);
-        }
-
         public void disconnect() {
             if (mMockNetworkAgent != null) mMockNetworkAgent.disconnect();
             mAgentRegistered = false;
@@ -1180,6 +1171,11 @@
         }
     }
 
+    private UidRangeParcel[] toUidRangeStableParcels(final @NonNull Set<UidRange> ranges) {
+        return ranges.stream().map(
+                r -> new UidRangeParcel(r.start, r.stop)).toArray(UidRangeParcel[]::new);
+    }
+
     private void mockVpn(int uid) {
         synchronized (mService.mVpns) {
             int userId = UserHandle.getUserId(uid);
@@ -1247,7 +1243,7 @@
         MockitoAnnotations.initMocks(this);
         when(mMetricsService.defaultNetworkMetrics()).thenReturn(mDefaultNetworkMetrics);
 
-        when(mUserManager.getUsers(eq(true))).thenReturn(
+        when(mUserManager.getAliveUsers()).thenReturn(
                 Arrays.asList(new UserInfo[] {
                         new UserInfo(VPN_USER, "", 0),
                 }));
@@ -1970,6 +1966,37 @@
     }
 
     @Test
+    public void testOwnerUidCannotChange() throws Exception {
+        // Owner UIDs are not visible without location permission.
+        setupLocationPermissions(Build.VERSION_CODES.Q, true, AppOpsManager.OPSTR_FINE_LOCATION,
+                Manifest.permission.ACCESS_FINE_LOCATION);
+
+        final NetworkCapabilities ncTemplate = new NetworkCapabilities();
+        final int originalOwnerUid = Process.myUid();
+        ncTemplate.setOwnerUid(originalOwnerUid);
+
+        mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI, new LinkProperties(),
+                ncTemplate);
+        mWiFiNetworkAgent.connect(false);
+        waitForIdle();
+
+        // Send ConnectivityService an update to the mWiFiNetworkAgent's capabilities that changes
+        // the owner UID and an unrelated capability.
+        NetworkCapabilities agentCapabilities = mWiFiNetworkAgent.getNetworkCapabilities();
+        assertEquals(originalOwnerUid, agentCapabilities.getOwnerUid());
+        agentCapabilities.setOwnerUid(42);
+        assertFalse(agentCapabilities.hasCapability(NET_CAPABILITY_NOT_CONGESTED));
+        agentCapabilities.addCapability(NET_CAPABILITY_NOT_CONGESTED);
+        mWiFiNetworkAgent.setNetworkCapabilities(agentCapabilities, true);
+        waitForIdle();
+
+        // Check that the capability change has been applied but the owner UID is not modified.
+        NetworkCapabilities nc = mCm.getNetworkCapabilities(mWiFiNetworkAgent.getNetwork());
+        assertEquals(originalOwnerUid, nc.getOwnerUid());
+        assertTrue(nc.hasCapability(NET_CAPABILITY_NOT_CONGESTED));
+    }
+
+    @Test
     public void testMultipleLingering() throws Exception {
         // This test would be flaky with the default 120ms timer: that is short enough that
         // lingered networks are torn down before assertions can be run. We don't want to mock the
@@ -2529,7 +2556,8 @@
 
     @Test
     public void testNoMutableNetworkRequests() throws Exception {
-        PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, new Intent("a"), 0);
+        final PendingIntent pendingIntent = PendingIntent.getBroadcast(
+                mContext, 0 /* requestCode */, new Intent("a"), FLAG_IMMUTABLE);
         NetworkRequest request1 = new NetworkRequest.Builder()
                 .addCapability(NET_CAPABILITY_VALIDATED)
                 .build();
@@ -3191,7 +3219,7 @@
 
         assertThrows(SecurityException.class, () ->
                 mCm.registerNetworkCallback(r, PendingIntent.getService(
-                        mServiceContext, 0, new Intent(), 0)));
+                        mServiceContext, 0 /* requestCode */, new Intent(), FLAG_IMMUTABLE)));
 
         // Requesting a Network with signal strength should get IllegalArgumentException.
         assertThrows(IllegalArgumentException.class, () ->
@@ -3199,7 +3227,7 @@
 
         assertThrows(IllegalArgumentException.class, () ->
                 mCm.requestNetwork(r, PendingIntent.getService(
-                        mServiceContext, 0, new Intent(), 0)));
+                        mServiceContext, 0 /* requestCode */, new Intent(), FLAG_IMMUTABLE)));
     }
 
     @Test
@@ -4663,12 +4691,14 @@
         }
         j = 0;
         while (j++ < INTENTS / 2) {
-            PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, new Intent("a" + j), 0);
+            final PendingIntent pi = PendingIntent.getBroadcast(mContext, 0 /* requestCode */,
+                    new Intent("a" + j), FLAG_IMMUTABLE);
             mCm.requestNetwork(networkRequest, pi);
             registered.add(pi);
         }
         while (j++ < INTENTS) {
-            PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, new Intent("b" + j), 0);
+            final PendingIntent pi = PendingIntent.getBroadcast(mContext, 0 /* requestCode */,
+                    new Intent("b" + j), FLAG_IMMUTABLE);
             mCm.registerNetworkCallback(networkRequest, pi);
             registered.add(pi);
         }
@@ -4682,11 +4712,13 @@
         );
         assertThrows(TooManyRequestsException.class, () ->
                 mCm.requestNetwork(networkRequest,
-                        PendingIntent.getBroadcast(mContext, 0, new Intent("c"), 0))
+                        PendingIntent.getBroadcast(mContext, 0 /* requestCode */,
+                                new Intent("c"), FLAG_IMMUTABLE))
         );
         assertThrows(TooManyRequestsException.class, () ->
                 mCm.registerNetworkCallback(networkRequest,
-                        PendingIntent.getBroadcast(mContext, 0, new Intent("d"), 0))
+                        PendingIntent.getBroadcast(mContext, 0 /* requestCode */,
+                                new Intent("d"), FLAG_IMMUTABLE))
         );
 
         for (Object o : registered) {
@@ -4715,16 +4747,16 @@
         waitForIdle();
 
         for (int i = 0; i < MAX_REQUESTS; i++) {
-            PendingIntent pendingIntent =
-                    PendingIntent.getBroadcast(mContext, 0, new Intent("e" + i), 0);
+            final PendingIntent pendingIntent = PendingIntent.getBroadcast(
+                    mContext, 0 /* requestCode */, new Intent("e" + i), FLAG_IMMUTABLE);
             mCm.requestNetwork(networkRequest, pendingIntent);
             mCm.unregisterNetworkCallback(pendingIntent);
         }
         waitForIdle();
 
         for (int i = 0; i < MAX_REQUESTS; i++) {
-            PendingIntent pendingIntent =
-                    PendingIntent.getBroadcast(mContext, 0, new Intent("f" + i), 0);
+            final PendingIntent pendingIntent = PendingIntent.getBroadcast(
+                    mContext, 0 /* requestCode */, new Intent("f" + i), FLAG_IMMUTABLE);
             mCm.registerNetworkCallback(networkRequest, pendingIntent);
             mCm.unregisterNetworkCallback(pendingIntent);
         }
@@ -4802,7 +4834,7 @@
         lp.setInterfaceName(WIFI_IFNAME);
         LinkAddress myIpv4Address = new LinkAddress("192.168.12.3/24");
         RouteInfo myIpv4DefaultRoute = new RouteInfo((IpPrefix) null,
-                NetworkUtils.numericToInetAddress("192.168.12.1"), lp.getInterfaceName());
+                InetAddresses.parseNumericAddress("192.168.12.1"), lp.getInterfaceName());
         lp.addLinkAddress(myIpv4Address);
         lp.addRoute(myIpv4DefaultRoute);
 
@@ -4922,8 +4954,8 @@
         expectForceUpdateIfaces(onlyCell, MOBILE_IFNAME);
         reset(mStatsService);
 
-        // Captive portal change shouldn't update ifaces
-        mCellNetworkAgent.addCapability(NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL);
+        // Temp metered change shouldn't update ifaces
+        mCellNetworkAgent.addCapability(NetworkCapabilities.NET_CAPABILITY_TEMPORARILY_NOT_METERED);
         waitForIdle();
         verify(mStatsService, never())
                 .forceUpdateIfaces(eq(onlyCell), any(NetworkState[].class), eq(MOBILE_IFNAME),
@@ -4944,8 +4976,6 @@
 
         final Network[] cellAndVpn = new Network[] {
                 mCellNetworkAgent.getNetwork(), mMockVpn.getNetwork()};
-        Network[] cellAndWifi = new Network[] {
-                mCellNetworkAgent.getNetwork(), mWiFiNetworkAgent.getNetwork()};
 
         // A VPN with default (null) underlying networks sets the underlying network's interfaces...
         expectForceUpdateIfaces(cellAndVpn, MOBILE_IFNAME, Process.myUid(), VPN_IFNAME,
@@ -4955,10 +4985,13 @@
         mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
         mWiFiNetworkAgent.connect(false);
         mWiFiNetworkAgent.sendLinkProperties(wifiLp);
+        final Network[] onlyNull = new Network[]{null};
         final Network[] wifiAndVpn = new Network[] {
                 mWiFiNetworkAgent.getNetwork(), mMockVpn.getNetwork()};
-        cellAndWifi = new Network[] {
+        final Network[] cellAndWifi = new Network[] {
                 mCellNetworkAgent.getNetwork(), mWiFiNetworkAgent.getNetwork()};
+        final Network[] cellNullAndWifi = new Network[] {
+                mCellNetworkAgent.getNetwork(), null, mWiFiNetworkAgent.getNetwork()};
 
         waitForIdle();
         assertEquals(wifiLp, mService.getActiveLinkProperties());
@@ -4984,6 +5017,13 @@
                 new String[]{MOBILE_IFNAME, WIFI_IFNAME});
         reset(mStatsService);
 
+        // Null underlying networks are ignored.
+        mService.setUnderlyingNetworksForVpn(cellNullAndWifi);
+        waitForIdle();
+        expectForceUpdateIfaces(wifiAndVpn, MOBILE_IFNAME, Process.myUid(), VPN_IFNAME,
+                new String[]{MOBILE_IFNAME, WIFI_IFNAME});
+        reset(mStatsService);
+
         // If an underlying network disconnects, that interface should no longer be underlying.
         // This doesn't actually work because disconnectAndDestroyNetwork only notifies
         // NetworkStatsService before the underlying network is actually removed. So the underlying
@@ -5018,6 +5058,7 @@
                 argThat(vpnInfos -> vpnInfos[0].underlyingIfaces.length == 1
                         && WIFI_IFNAME.equals(vpnInfos[0].underlyingIfaces[0])));
         mEthernetNetworkAgent.disconnect();
+        waitForIdle();
         reset(mStatsService);
 
         // When a VPN declares no underlying networks (i.e., no connectivity), getAllVpnInfo
@@ -5030,6 +5071,25 @@
         waitForIdle();
         expectForceUpdateIfaces(wifiAndVpn, null);
         reset(mStatsService);
+
+        // Specifying only a null underlying network is the same as no networks.
+        mService.setUnderlyingNetworksForVpn(onlyNull);
+        waitForIdle();
+        expectForceUpdateIfaces(wifiAndVpn, null);
+        reset(mStatsService);
+
+        // Specifying networks that are all disconnected is the same as specifying no networks.
+        mService.setUnderlyingNetworksForVpn(onlyCell);
+        waitForIdle();
+        expectForceUpdateIfaces(wifiAndVpn, null);
+        reset(mStatsService);
+
+        // Passing in null again means follow the default network again.
+        mService.setUnderlyingNetworksForVpn(null);
+        waitForIdle();
+        expectForceUpdateIfaces(wifiAndVpn, WIFI_IFNAME, Process.myUid(), VPN_IFNAME,
+                new String[]{WIFI_IFNAME});
+        reset(mStatsService);
     }
 
     @Test
@@ -5384,6 +5444,108 @@
     }
 
     @Test
+    public void testApplyUnderlyingCapabilities() throws Exception {
+        mCellNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_CELLULAR);
+        mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
+        mCellNetworkAgent.connect(false /* validated */);
+        mWiFiNetworkAgent.connect(false /* validated */);
+
+        final NetworkCapabilities cellNc = new NetworkCapabilities()
+                .addTransportType(TRANSPORT_CELLULAR)
+                .addCapability(NET_CAPABILITY_INTERNET)
+                .addCapability(NET_CAPABILITY_NOT_CONGESTED)
+                .setLinkDownstreamBandwidthKbps(10);
+        final NetworkCapabilities wifiNc = new NetworkCapabilities()
+                .addTransportType(TRANSPORT_WIFI)
+                .addCapability(NET_CAPABILITY_INTERNET)
+                .addCapability(NET_CAPABILITY_NOT_METERED)
+                .addCapability(NET_CAPABILITY_NOT_ROAMING)
+                .addCapability(NET_CAPABILITY_NOT_CONGESTED)
+                .addCapability(NET_CAPABILITY_NOT_SUSPENDED)
+                .setLinkUpstreamBandwidthKbps(20);
+        mCellNetworkAgent.setNetworkCapabilities(cellNc, true /* sendToConnectivityService */);
+        mWiFiNetworkAgent.setNetworkCapabilities(wifiNc, true /* sendToConnectivityService */);
+        waitForIdle();
+
+        final Network mobile = mCellNetworkAgent.getNetwork();
+        final Network wifi = mWiFiNetworkAgent.getNetwork();
+
+        final NetworkCapabilities initialCaps = new NetworkCapabilities();
+        initialCaps.addTransportType(TRANSPORT_VPN);
+        initialCaps.addCapability(NET_CAPABILITY_INTERNET);
+        initialCaps.removeCapability(NET_CAPABILITY_NOT_VPN);
+
+        final NetworkCapabilities withNoUnderlying = new NetworkCapabilities();
+        withNoUnderlying.addCapability(NET_CAPABILITY_INTERNET);
+        withNoUnderlying.addCapability(NET_CAPABILITY_NOT_CONGESTED);
+        withNoUnderlying.addCapability(NET_CAPABILITY_NOT_ROAMING);
+        withNoUnderlying.addCapability(NET_CAPABILITY_NOT_SUSPENDED);
+        withNoUnderlying.addTransportType(TRANSPORT_VPN);
+        withNoUnderlying.removeCapability(NET_CAPABILITY_NOT_VPN);
+
+        final NetworkCapabilities withMobileUnderlying = new NetworkCapabilities(withNoUnderlying);
+        withMobileUnderlying.addTransportType(TRANSPORT_CELLULAR);
+        withMobileUnderlying.removeCapability(NET_CAPABILITY_NOT_ROAMING);
+        withMobileUnderlying.removeCapability(NET_CAPABILITY_NOT_SUSPENDED);
+        withMobileUnderlying.setLinkDownstreamBandwidthKbps(10);
+
+        final NetworkCapabilities withWifiUnderlying = new NetworkCapabilities(withNoUnderlying);
+        withWifiUnderlying.addTransportType(TRANSPORT_WIFI);
+        withWifiUnderlying.addCapability(NET_CAPABILITY_NOT_METERED);
+        withWifiUnderlying.setLinkUpstreamBandwidthKbps(20);
+
+        final NetworkCapabilities withWifiAndMobileUnderlying =
+                new NetworkCapabilities(withNoUnderlying);
+        withWifiAndMobileUnderlying.addTransportType(TRANSPORT_CELLULAR);
+        withWifiAndMobileUnderlying.addTransportType(TRANSPORT_WIFI);
+        withWifiAndMobileUnderlying.removeCapability(NET_CAPABILITY_NOT_METERED);
+        withWifiAndMobileUnderlying.removeCapability(NET_CAPABILITY_NOT_ROAMING);
+        withWifiAndMobileUnderlying.setLinkDownstreamBandwidthKbps(10);
+        withWifiAndMobileUnderlying.setLinkUpstreamBandwidthKbps(20);
+
+        final NetworkCapabilities initialCapsNotMetered = new NetworkCapabilities(initialCaps);
+        initialCapsNotMetered.addCapability(NET_CAPABILITY_NOT_METERED);
+
+        NetworkCapabilities caps = new NetworkCapabilities(initialCaps);
+        mService.applyUnderlyingCapabilities(new Network[]{}, initialCapsNotMetered, caps);
+        assertEquals(withNoUnderlying, caps);
+
+        caps = new NetworkCapabilities(initialCaps);
+        mService.applyUnderlyingCapabilities(new Network[]{null}, initialCapsNotMetered, caps);
+        assertEquals(withNoUnderlying, caps);
+
+        caps = new NetworkCapabilities(initialCaps);
+        mService.applyUnderlyingCapabilities(new Network[]{mobile}, initialCapsNotMetered, caps);
+        assertEquals(withMobileUnderlying, caps);
+
+        mService.applyUnderlyingCapabilities(new Network[]{wifi}, initialCapsNotMetered, caps);
+        assertEquals(withWifiUnderlying, caps);
+
+        withWifiUnderlying.removeCapability(NET_CAPABILITY_NOT_METERED);
+        caps = new NetworkCapabilities(initialCaps);
+        mService.applyUnderlyingCapabilities(new Network[]{wifi}, initialCaps, caps);
+        assertEquals(withWifiUnderlying, caps);
+
+        caps = new NetworkCapabilities(initialCaps);
+        mService.applyUnderlyingCapabilities(new Network[]{mobile, wifi}, initialCaps, caps);
+        assertEquals(withWifiAndMobileUnderlying, caps);
+
+        withWifiUnderlying.addCapability(NET_CAPABILITY_NOT_METERED);
+        caps = new NetworkCapabilities(initialCaps);
+        mService.applyUnderlyingCapabilities(new Network[]{null, mobile, null, wifi},
+                initialCapsNotMetered, caps);
+        assertEquals(withWifiAndMobileUnderlying, caps);
+
+        caps = new NetworkCapabilities(initialCaps);
+        mService.applyUnderlyingCapabilities(new Network[]{null, mobile, null, wifi},
+                initialCapsNotMetered, caps);
+        assertEquals(withWifiAndMobileUnderlying, caps);
+
+        mService.applyUnderlyingCapabilities(null, initialCapsNotMetered, caps);
+        assertEquals(withWifiUnderlying, caps);
+    }
+
+    @Test
     public void testVpnConnectDisconnectUnderlyingNetwork() throws Exception {
         final TestNetworkCallback callback = new TestNetworkCallback();
         final NetworkRequest request = new NetworkRequest.Builder()
@@ -5471,6 +5633,7 @@
 
         final Set<UidRange> ranges = uidRangesForUid(uid);
         mMockVpn.registerAgent(ranges);
+        mService.setUnderlyingNetworksForVpn(new Network[0]);
 
         // VPN networks do not satisfy the default request and are automatically validated
         // by NetworkMonitor
@@ -5479,19 +5642,12 @@
         mMockVpn.getAgent().setNetworkValid(false /* isStrictMode */);
 
         mMockVpn.connect(false);
-        mService.setUnderlyingNetworksForVpn(new Network[0]);
 
-        genericNetworkCallback.expectAvailableCallbacksUnvalidated(mMockVpn);
+        genericNetworkCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
         genericNotVpnNetworkCallback.assertNoCallback();
         wifiNetworkCallback.assertNoCallback();
-        vpnNetworkCallback.expectAvailableCallbacksUnvalidated(mMockVpn);
-        defaultCallback.expectAvailableCallbacksUnvalidated(mMockVpn);
-        assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
-
-        genericNetworkCallback.expectCallback(CallbackEntry.NETWORK_CAPS_UPDATED, mMockVpn);
-        genericNotVpnNetworkCallback.assertNoCallback();
-        vpnNetworkCallback.expectCapabilitiesThat(mMockVpn, nc -> null == nc.getUids());
-        defaultCallback.expectCallback(CallbackEntry.NETWORK_CAPS_UPDATED, mMockVpn);
+        vpnNetworkCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
+        defaultCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
         assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
 
         ranges.clear();
@@ -5884,6 +6040,86 @@
     }
 
     @Test
+    public void testVpnRestrictedUsers() throws Exception {
+        // NETWORK_SETTINGS is necessary to see the UID ranges in NetworkCapabilities.
+        mServiceContext.setPermission(Manifest.permission.NETWORK_SETTINGS,
+                PERMISSION_GRANTED);
+
+        final NetworkRequest request = new NetworkRequest.Builder()
+                .removeCapability(NET_CAPABILITY_NOT_VPN)
+                .build();
+        final TestNetworkCallback callback = new TestNetworkCallback();
+        mCm.registerNetworkCallback(request, callback);
+
+        // Bring up a VPN
+        mMockVpn.establishForMyUid();
+        callback.expectAvailableThenValidatedCallbacks(mMockVpn);
+        callback.assertNoCallback();
+
+        final int uid = Process.myUid();
+        NetworkCapabilities nc = mCm.getNetworkCapabilities(mMockVpn.getNetwork());
+        assertNotNull("nc=" + nc, nc.getUids());
+        assertEquals(nc.getUids(), uidRangesForUid(uid));
+
+        // Set an underlying network and expect to see the VPN transports change.
+        mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
+        mWiFiNetworkAgent.connect(true);
+        callback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+        callback.expectCapabilitiesThat(mMockVpn, (caps)
+                -> caps.hasTransport(TRANSPORT_VPN)
+                && caps.hasTransport(TRANSPORT_WIFI));
+        callback.expectCapabilitiesThat(mWiFiNetworkAgent, (caps)
+                -> caps.hasCapability(NET_CAPABILITY_VALIDATED));
+
+        // Create a fake restricted profile whose parent is our user ID.
+        final int userId = UserHandle.getUserId(uid);
+        final int restrictedUserId = userId + 1;
+        final UserInfo info = new UserInfo(restrictedUserId, "user", UserInfo.FLAG_RESTRICTED);
+        info.restrictedProfileParentId = userId;
+        assertTrue(info.isRestricted());
+        when(mUserManager.getUserInfo(restrictedUserId)).thenReturn(info);
+        final Intent addedIntent = new Intent(ACTION_USER_ADDED);
+        addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, restrictedUserId);
+
+        // Send a USER_ADDED broadcast for it.
+        // The BroadcastReceiver for this broadcast checks that is being run on the handler thread.
+        final Handler handler = new Handler(mCsHandlerThread.getLooper());
+        handler.post(() -> mServiceContext.sendBroadcast(addedIntent));
+
+        // Expect that the VPN UID ranges contain both |uid| and the UID range for the newly-added
+        // restricted user.
+        callback.expectCapabilitiesThat(mMockVpn, (caps)
+                -> caps.getUids().size() == 2
+                && caps.getUids().contains(new UidRange(uid, uid))
+                && caps.getUids().contains(UidRange.createForUser(restrictedUserId))
+                && caps.hasTransport(TRANSPORT_VPN)
+                && caps.hasTransport(TRANSPORT_WIFI));
+
+        // Change the VPN's capabilities somehow (specifically, disconnect wifi).
+        mWiFiNetworkAgent.disconnect();
+        callback.expectCallback(CallbackEntry.LOST, mWiFiNetworkAgent);
+        callback.expectCapabilitiesThat(mMockVpn, (caps)
+                -> caps.getUids().size() == 2
+                && caps.getUids().contains(new UidRange(uid, uid))
+                && caps.getUids().contains(UidRange.createForUser(restrictedUserId))
+                && caps.hasTransport(TRANSPORT_VPN)
+                && !caps.hasTransport(TRANSPORT_WIFI));
+
+        // Send a USER_REMOVED broadcast and expect to lose the UID range for the restricted user.
+        final Intent removedIntent = new Intent(ACTION_USER_REMOVED);
+        removedIntent.putExtra(Intent.EXTRA_USER_HANDLE, restrictedUserId);
+        handler.post(() -> mServiceContext.sendBroadcast(removedIntent));
+
+        // Expect that the VPN gains the UID range for the restricted user, and that the capability
+        // change made just before that (i.e., loss of TRANSPORT_WIFI) is preserved.
+        callback.expectCapabilitiesThat(mMockVpn, (caps)
+                -> caps.getUids().size() == 1
+                && caps.getUids().contains(new UidRange(uid, uid))
+                && caps.hasTransport(TRANSPORT_VPN)
+                && !caps.hasTransport(TRANSPORT_WIFI));
+    }
+
+    @Test
     public void testIsActiveNetworkMeteredOverWifi() throws Exception {
         // Returns true by default when no network is available.
         assertTrue(mCm.isActiveNetworkMetered());
@@ -6829,8 +7065,8 @@
         final Set<UidRange> vpnRange = Collections.singleton(UidRange.createForUser(VPN_USER));
         mMockVpn.establish(lp, VPN_UID, vpnRange);
 
-        // Connected VPN should have interface rules set up. There are two expected invocations,
-        // one during VPN uid update, one during VPN LinkProperties update
+        // A connected VPN should have interface rules set up. There are two expected invocations,
+        // one during the VPN initial connection, one during the VPN LinkProperties update.
         ArgumentCaptor<int[]> uidCaptor = ArgumentCaptor.forClass(int[].class);
         verify(mMockNetd, times(2)).firewallAddUidInterfaceRules(eq("tun0"), uidCaptor.capture());
         assertContainsExactly(uidCaptor.getAllValues().get(0), APP1_UID, APP2_UID);
@@ -7345,20 +7581,14 @@
         setupLocationPermissions(Build.VERSION_CODES.Q, true, AppOpsManager.OPSTR_FINE_LOCATION,
                 Manifest.permission.ACCESS_FINE_LOCATION);
 
-        // setUp() calls mockVpn() which adds a VPN with the Test Runner's uid. Configure it to be
-        // active
-        final VpnInfo info = new VpnInfo();
-        info.ownerUid = Process.myUid();
-        info.vpnIface = VPN_IFNAME;
-        mMockVpn.setVpnInfo(info);
-
         mMockVpn.establishForMyUid();
-        waitForIdle();
 
+        // Wait for networks to connect and broadcasts to be sent before removing permissions.
+        waitForIdle();
         mServiceContext.setPermission(android.Manifest.permission.NETWORK_STACK, PERMISSION_DENIED);
 
-
         assertTrue(mService.setUnderlyingNetworksForVpn(new Network[] {network}));
+        waitForIdle();
         assertTrue(
                 "Active VPN permission not applied",
                 mService.checkConnectivityDiagnosticsPermissions(
@@ -7366,6 +7596,7 @@
                         mContext.getOpPackageName()));
 
         assertTrue(mService.setUnderlyingNetworksForVpn(null));
+        waitForIdle();
         assertFalse(
                 "VPN shouldn't receive callback on non-underlying network",
                 mService.checkConnectivityDiagnosticsPermissions(
diff --git a/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java b/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
index 529d03c..799bcc8 100644
--- a/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
+++ b/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
@@ -34,6 +34,7 @@
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.net.INetd;
+import android.net.InetAddresses;
 import android.net.IpSecAlgorithm;
 import android.net.IpSecConfig;
 import android.net.IpSecManager;
@@ -44,7 +45,6 @@
 import android.net.IpSecUdpEncapResponse;
 import android.net.LinkAddress;
 import android.net.Network;
-import android.net.NetworkUtils;
 import android.os.Binder;
 import android.os.INetworkManagementService;
 import android.os.ParcelFileDescriptor;
@@ -272,7 +272,7 @@
 
         IpSecSpiResponse spi =
                 mIpSecService.allocateSecurityParameterIndex(
-                        NetworkUtils.numericToInetAddress(remoteAddress).getHostAddress(),
+                        InetAddresses.parseNumericAddress(remoteAddress).getHostAddress(),
                         IpSecManager.INVALID_SECURITY_PARAMETER_INDEX,
                         new Binder());
         return spi.resourceId;
diff --git a/tests/net/java/com/android/server/NetworkManagementServiceTest.java b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
index 968b307..ea763d2 100644
--- a/tests/net/java/com/android/server/NetworkManagementServiceTest.java
+++ b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
@@ -16,6 +16,12 @@
 
 package com.android.server;
 
+import static android.util.DebugUtils.valueToString;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
@@ -29,15 +35,19 @@
 import android.net.INetd;
 import android.net.INetdUnsolicitedEventListener;
 import android.net.LinkAddress;
+import android.net.NetworkPolicyManager;
 import android.os.BatteryStats;
 import android.os.Binder;
 import android.os.IBinder;
+import android.os.Process;
+import android.os.RemoteException;
 import android.test.suitebuilder.annotation.SmallTest;
+import android.util.ArrayMap;
 
 import androidx.test.runner.AndroidJUnit4;
 
 import com.android.internal.app.IBatteryStats;
-import com.android.server.NetworkManagementService.SystemServices;
+import com.android.server.NetworkManagementService.Dependencies;
 import com.android.server.net.BaseNetworkObserver;
 
 import org.junit.After;
@@ -49,13 +59,14 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+import java.util.function.BiFunction;
+
 /**
  * Tests for {@link NetworkManagementService}.
  */
 @RunWith(AndroidJUnit4.class)
 @SmallTest
 public class NetworkManagementServiceTest {
-
     private NetworkManagementService mNMService;
 
     @Mock private Context mContext;
@@ -66,7 +77,9 @@
     @Captor
     private ArgumentCaptor<INetdUnsolicitedEventListener> mUnsolListenerCaptor;
 
-    private final SystemServices mServices = new SystemServices() {
+    private final MockDependencies mDeps = new MockDependencies();
+
+    private final class MockDependencies extends Dependencies {
         @Override
         public IBinder getService(String name) {
             switch (name) {
@@ -76,14 +89,21 @@
                     throw new UnsupportedOperationException("Unknown service " + name);
             }
         }
+
         @Override
         public void registerLocalService(NetworkManagementInternal nmi) {
         }
+
         @Override
         public INetd getNetd() {
             return mNetdService;
         }
-    };
+
+        @Override
+        public int getCallingUid() {
+            return Process.SYSTEM_UID;
+        }
+    }
 
     @Before
     public void setUp() throws Exception {
@@ -91,7 +111,7 @@
         doNothing().when(mNetdService)
                 .registerUnsolicitedEventListener(mUnsolListenerCaptor.capture());
         // Start the service and wait until it connects to our socket.
-        mNMService = NetworkManagementService.create(mContext, mServices);
+        mNMService = NetworkManagementService.create(mContext, mDeps);
     }
 
     @After
@@ -192,4 +212,105 @@
         // Make sure nothing else was called.
         verifyNoMoreInteractions(observer);
     }
+
+    @Test
+    public void testFirewallEnabled() {
+        mNMService.setFirewallEnabled(true);
+        assertTrue(mNMService.isFirewallEnabled());
+
+        mNMService.setFirewallEnabled(false);
+        assertFalse(mNMService.isFirewallEnabled());
+    }
+
+    private static final int TEST_UID = 111;
+
+    @Test
+    public void testNetworkRestrictedDefault() {
+        assertFalse(mNMService.isNetworkRestricted(TEST_UID));
+    }
+
+    @Test
+    public void testMeteredNetworkRestrictions() throws RemoteException {
+        // Make sure the mocked netd method returns true.
+        doReturn(true).when(mNetdService).bandwidthEnableDataSaver(anyBoolean());
+
+        // Restrict usage of mobile data in background
+        mNMService.setUidMeteredNetworkDenylist(TEST_UID, true);
+        assertTrue("Should be true since mobile data usage is restricted",
+                mNMService.isNetworkRestricted(TEST_UID));
+
+        mNMService.setDataSaverModeEnabled(true);
+        verify(mNetdService).bandwidthEnableDataSaver(true);
+
+        mNMService.setUidMeteredNetworkDenylist(TEST_UID, false);
+        assertTrue("Should be true since data saver is on and the uid is not allowlisted",
+                mNMService.isNetworkRestricted(TEST_UID));
+
+        mNMService.setUidMeteredNetworkAllowlist(TEST_UID, true);
+        assertFalse("Should be false since data saver is on and the uid is allowlisted",
+                mNMService.isNetworkRestricted(TEST_UID));
+
+        // remove uid from allowlist and turn datasaver off again
+        mNMService.setUidMeteredNetworkAllowlist(TEST_UID, false);
+        mNMService.setDataSaverModeEnabled(false);
+        verify(mNetdService).bandwidthEnableDataSaver(false);
+        assertFalse("Network should not be restricted when data saver is off",
+                mNMService.isNetworkRestricted(TEST_UID));
+    }
+
+    @Test
+    public void testFirewallChains() {
+        final ArrayMap<Integer, ArrayMap<Integer, Boolean>> expected = new ArrayMap<>();
+        // Dozable chain
+        final ArrayMap<Integer, Boolean> isRestrictedForDozable = new ArrayMap<>();
+        isRestrictedForDozable.put(NetworkPolicyManager.FIREWALL_RULE_DEFAULT, true);
+        isRestrictedForDozable.put(INetd.FIREWALL_RULE_ALLOW, false);
+        isRestrictedForDozable.put(INetd.FIREWALL_RULE_DENY, true);
+        expected.put(INetd.FIREWALL_CHAIN_DOZABLE, isRestrictedForDozable);
+        // Powersaver chain
+        final ArrayMap<Integer, Boolean> isRestrictedForPowerSave = new ArrayMap<>();
+        isRestrictedForPowerSave.put(NetworkPolicyManager.FIREWALL_RULE_DEFAULT, true);
+        isRestrictedForPowerSave.put(INetd.FIREWALL_RULE_ALLOW, false);
+        isRestrictedForPowerSave.put(INetd.FIREWALL_RULE_DENY, true);
+        expected.put(INetd.FIREWALL_CHAIN_POWERSAVE, isRestrictedForPowerSave);
+        // Standby chain
+        final ArrayMap<Integer, Boolean> isRestrictedForStandby = new ArrayMap<>();
+        isRestrictedForStandby.put(NetworkPolicyManager.FIREWALL_RULE_DEFAULT, false);
+        isRestrictedForStandby.put(INetd.FIREWALL_RULE_ALLOW, false);
+        isRestrictedForStandby.put(INetd.FIREWALL_RULE_DENY, true);
+        expected.put(INetd.FIREWALL_CHAIN_STANDBY, isRestrictedForStandby);
+        // Restricted mode chain
+        final ArrayMap<Integer, Boolean> isRestrictedForRestrictedMode = new ArrayMap<>();
+        isRestrictedForRestrictedMode.put(NetworkPolicyManager.FIREWALL_RULE_DEFAULT, true);
+        isRestrictedForRestrictedMode.put(INetd.FIREWALL_RULE_ALLOW, false);
+        isRestrictedForRestrictedMode.put(INetd.FIREWALL_RULE_DENY, true);
+        expected.put(INetd.FIREWALL_CHAIN_RESTRICTED, isRestrictedForRestrictedMode);
+
+        final int[] chains = {
+                INetd.FIREWALL_CHAIN_STANDBY,
+                INetd.FIREWALL_CHAIN_POWERSAVE,
+                INetd.FIREWALL_CHAIN_DOZABLE,
+                INetd.FIREWALL_CHAIN_RESTRICTED
+        };
+        final int[] states = {
+                INetd.FIREWALL_RULE_ALLOW,
+                INetd.FIREWALL_RULE_DENY,
+                NetworkPolicyManager.FIREWALL_RULE_DEFAULT
+        };
+        BiFunction<Integer, Integer, String> errorMsg = (chain, state) -> {
+            return String.format("Unexpected value for chain: %s and state: %s",
+                    valueToString(INetd.class, "FIREWALL_CHAIN_", chain),
+                    valueToString(INetd.class, "FIREWALL_RULE_", state));
+        };
+        for (int chain : chains) {
+            final ArrayMap<Integer, Boolean> expectedValues = expected.get(chain);
+            mNMService.setFirewallChainEnabled(chain, true);
+            for (int state : states) {
+                mNMService.setFirewallUidRule(chain, TEST_UID, state);
+                assertEquals(errorMsg.apply(chain, state),
+                        expectedValues.get(state), mNMService.isNetworkRestricted(TEST_UID));
+            }
+            mNMService.setFirewallChainEnabled(chain, false);
+        }
+    }
 }
diff --git a/tests/net/java/com/android/server/connectivity/MultipathPolicyTrackerTest.java b/tests/net/java/com/android/server/connectivity/MultipathPolicyTrackerTest.java
index c53462c..950d7163 100644
--- a/tests/net/java/com/android/server/connectivity/MultipathPolicyTrackerTest.java
+++ b/tests/net/java/com/android/server/connectivity/MultipathPolicyTrackerTest.java
@@ -130,6 +130,7 @@
 
         when(mContext.getResources()).thenReturn(mResources);
         when(mContext.getApplicationInfo()).thenReturn(new ApplicationInfo());
+        // Mock user id to all users that Context#registerReceiver will register with all users too.
         doReturn(UserHandle.ALL.getIdentifier()).when(mUserAllContext).getUserId();
         when(mContext.createContextAsUser(eq(UserHandle.ALL), anyInt()))
                 .thenReturn(mUserAllContext);
diff --git a/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java b/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java
index 5a29c2c..3556c72 100644
--- a/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java
+++ b/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java
@@ -58,7 +58,6 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManagerInternal;
-import android.content.pm.UserInfo;
 import android.net.INetd;
 import android.net.UidRange;
 import android.os.Build;
@@ -123,10 +122,10 @@
         MockitoAnnotations.initMocks(this);
         when(mContext.getPackageManager()).thenReturn(mPackageManager);
         when(mContext.getSystemService(eq(Context.USER_SERVICE))).thenReturn(mUserManager);
-        when(mUserManager.getUsers(eq(true))).thenReturn(
-                Arrays.asList(new UserInfo[] {
-                        new UserInfo(MOCK_USER1, "", 0),
-                        new UserInfo(MOCK_USER2, "", 0),
+        when(mUserManager.getUserHandles(eq(true))).thenReturn(
+                Arrays.asList(new UserHandle[] {
+                        new UserHandle(MOCK_USER1),
+                        new UserHandle(MOCK_USER2),
                 }));
 
         mPermissionMonitor = spy(new PermissionMonitor(mContext, mNetdService, mDeps));
diff --git a/tests/net/java/com/android/server/connectivity/VpnTest.java b/tests/net/java/com/android/server/connectivity/VpnTest.java
index a553b58..6e380be 100644
--- a/tests/net/java/com/android/server/connectivity/VpnTest.java
+++ b/tests/net/java/com/android/server/connectivity/VpnTest.java
@@ -21,15 +21,6 @@
 import static android.content.pm.UserInfo.FLAG_PRIMARY;
 import static android.content.pm.UserInfo.FLAG_RESTRICTED;
 import static android.net.ConnectivityManager.NetworkCallback;
-import static android.net.NetworkCapabilities.LINK_BANDWIDTH_UNSPECIFIED;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED;
-import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
-import static android.net.NetworkCapabilities.TRANSPORT_VPN;
-import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -41,6 +32,7 @@
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.argThat;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.atLeastOnce;
 import static org.mockito.Mockito.doAnswer;
@@ -66,6 +58,7 @@
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
 import android.net.ConnectivityManager;
+import android.net.INetd;
 import android.net.Ikev2VpnProfile;
 import android.net.InetAddresses;
 import android.net.IpPrefix;
@@ -78,6 +71,7 @@
 import android.net.NetworkInfo.DetailedState;
 import android.net.RouteInfo;
 import android.net.UidRange;
+import android.net.UidRangeParcel;
 import android.net.VpnManager;
 import android.net.VpnService;
 import android.net.ipsec.ike.IkeSessionCallback;
@@ -86,10 +80,10 @@
 import android.os.Bundle;
 import android.os.ConditionVariable;
 import android.os.INetworkManagementService;
-import android.os.Looper;
 import android.os.Process;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.os.test.TestLooper;
 import android.provider.Settings;
 import android.security.Credentials;
 import android.security.KeyStore;
@@ -100,6 +94,7 @@
 import androidx.test.runner.AndroidJUnit4;
 
 import com.android.internal.R;
+import com.android.internal.net.LegacyVpnInfo;
 import com.android.internal.net.VpnConfig;
 import com.android.internal.net.VpnProfile;
 import com.android.server.IpSecService;
@@ -179,11 +174,13 @@
             mPackages.put(PKGS[i], PKG_UIDS[i]);
         }
     }
+    private static final UidRange PRI_USER_RANGE = UidRange.createForUser(primaryUser.id);
 
     @Mock(answer = Answers.RETURNS_DEEP_STUBS) private Context mContext;
     @Mock private UserManager mUserManager;
     @Mock private PackageManager mPackageManager;
     @Mock private INetworkManagementService mNetService;
+    @Mock private INetd mNetd;
     @Mock private AppOpsManager mAppOps;
     @Mock private NotificationManager mNotificationManager;
     @Mock private Vpn.SystemServices mSystemServices;
@@ -223,6 +220,8 @@
                 .thenReturn(mNotificationManager);
         when(mContext.getSystemService(eq(Context.CONNECTIVITY_SERVICE)))
                 .thenReturn(mConnectivityManager);
+        when(mContext.getSystemServiceName(eq(ConnectivityManager.class)))
+                .thenReturn(Context.CONNECTIVITY_SERVICE);
         when(mContext.getSystemService(eq(Context.IPSEC_SERVICE))).thenReturn(mIpSecManager);
         when(mContext.getString(R.string.config_customVpnAlwaysOnDisconnectedDialogComponent))
                 .thenReturn(Resources.getSystem().getString(
@@ -261,8 +260,7 @@
                 null, null);
 
         assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] {
-            UidRange.createForUser(primaryUser.id),
-            UidRange.createForUser(restrictedProfileA.id)
+                PRI_USER_RANGE, UidRange.createForUser(restrictedProfileA.id)
         })), ranges);
     }
 
@@ -274,9 +272,7 @@
         final Set<UidRange> ranges = vpn.createUserAndRestrictedProfilesRanges(primaryUser.id,
                 null, null);
 
-        assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] {
-            UidRange.createForUser(primaryUser.id)
-        })), ranges);
+        assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { PRI_USER_RANGE })), ranges);
     }
 
     @Test
@@ -287,15 +283,13 @@
         final Set<UidRange> ranges = new ArraySet<>();
         vpn.addUserToRanges(ranges, primaryUser.id, null, null);
 
-        assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] {
-            UidRange.createForUser(primaryUser.id)
-        })), ranges);
+        assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { PRI_USER_RANGE })), ranges);
     }
 
     @Test
     public void testUidAllowAndDenylist() throws Exception {
         final Vpn vpn = createVpn(primaryUser.id);
-        final UidRange user = UidRange.createForUser(primaryUser.id);
+        final UidRange user = PRI_USER_RANGE;
         final String[] packages = {PKGS[0], PKGS[1], PKGS[2]};
 
         // Allowed list
@@ -344,62 +338,67 @@
     @Test
     public void testLockdownChangingPackage() throws Exception {
         final Vpn vpn = createVpn(primaryUser.id);
-        final UidRange user = UidRange.createForUser(primaryUser.id);
+        final UidRange user = PRI_USER_RANGE;
 
         // Default state.
-        assertUnblocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[1], user.start + PKG_UIDS[2], user.start + PKG_UIDS[3]);
+        assertUnblocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[1],
+                user.start + PKG_UIDS[2], user.start + PKG_UIDS[3]);
 
         // Set always-on without lockdown.
         assertTrue(vpn.setAlwaysOnPackage(PKGS[1], false, null, mKeyStore));
-        assertUnblocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[1], user.start + PKG_UIDS[2], user.start + PKG_UIDS[3]);
+        assertUnblocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[1],
+                user.start + PKG_UIDS[2], user.start + PKG_UIDS[3]);
 
         // Set always-on with lockdown.
         assertTrue(vpn.setAlwaysOnPackage(PKGS[1], true, null, mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-            new UidRange(user.start, user.start + PKG_UIDS[1] - 1),
-            new UidRange(user.start + PKG_UIDS[1] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start, user.start + PKG_UIDS[1] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[1] + 1, user.stop)
         }));
-        assertBlocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[2], user.start + PKG_UIDS[3]);
+
+        assertBlocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[2],
+                user.start + PKG_UIDS[3]);
         assertUnblocked(vpn, user.start + PKG_UIDS[1]);
 
         // Switch to another app.
         assertTrue(vpn.setAlwaysOnPackage(PKGS[3], true, null, mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(new UidRange[] {
-            new UidRange(user.start, user.start + PKG_UIDS[1] - 1),
-            new UidRange(user.start + PKG_UIDS[1] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start, user.start + PKG_UIDS[1] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[1] + 1, user.stop)
         }));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-            new UidRange(user.start, user.start + PKG_UIDS[3] - 1),
-            new UidRange(user.start + PKG_UIDS[3] + 1, user.stop)
+
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start, user.start + PKG_UIDS[3] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[3] + 1, user.stop)
         }));
-        assertBlocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[1], user.start + PKG_UIDS[2]);
+        assertBlocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[1],
+                user.start + PKG_UIDS[2]);
         assertUnblocked(vpn, user.start + PKG_UIDS[3]);
     }
 
     @Test
     public void testLockdownAllowlist() throws Exception {
         final Vpn vpn = createVpn(primaryUser.id);
-        final UidRange user = UidRange.createForUser(primaryUser.id);
+        final UidRange user = PRI_USER_RANGE;
 
         // Set always-on with lockdown and allow app PKGS[2] from lockdown.
         assertTrue(vpn.setAlwaysOnPackage(
                 PKGS[1], true, Collections.singletonList(PKGS[2]), mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-                new UidRange(user.start, user.start + PKG_UIDS[1] - 1),
-                new UidRange(user.start + PKG_UIDS[2] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start, user.start + PKG_UIDS[1] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[2] + 1, user.stop)
         }));
         assertBlocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[3]);
         assertUnblocked(vpn, user.start + PKG_UIDS[1], user.start + PKG_UIDS[2]);
-
         // Change allowed app list to PKGS[3].
         assertTrue(vpn.setAlwaysOnPackage(
                 PKGS[1], true, Collections.singletonList(PKGS[3]), mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(new UidRange[] {
-                new UidRange(user.start + PKG_UIDS[2] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start + PKG_UIDS[2] + 1, user.stop)
         }));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-                new UidRange(user.start + PKG_UIDS[1] + 1, user.start + PKG_UIDS[3] - 1),
-                new UidRange(user.start + PKG_UIDS[3] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start + PKG_UIDS[1] + 1, user.start + PKG_UIDS[3] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[3] + 1, user.stop)
         }));
         assertBlocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[2]);
         assertUnblocked(vpn, user.start + PKG_UIDS[1], user.start + PKG_UIDS[3]);
@@ -407,25 +406,25 @@
         // Change the VPN app.
         assertTrue(vpn.setAlwaysOnPackage(
                 PKGS[0], true, Collections.singletonList(PKGS[3]), mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(new UidRange[] {
-                new UidRange(user.start, user.start + PKG_UIDS[1] - 1),
-                new UidRange(user.start + PKG_UIDS[1] + 1, user.start + PKG_UIDS[3] - 1)
+        verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start, user.start + PKG_UIDS[1] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[1] + 1, user.start + PKG_UIDS[3] - 1)
         }));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-                new UidRange(user.start, user.start + PKG_UIDS[0] - 1),
-                new UidRange(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[3] - 1)
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start, user.start + PKG_UIDS[0] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[3] - 1)
         }));
         assertBlocked(vpn, user.start + PKG_UIDS[1], user.start + PKG_UIDS[2]);
         assertUnblocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[3]);
 
         // Remove the list of allowed packages.
         assertTrue(vpn.setAlwaysOnPackage(PKGS[0], true, null, mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(new UidRange[] {
-                new UidRange(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[3] - 1),
-                new UidRange(user.start + PKG_UIDS[3] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[3] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[3] + 1, user.stop)
         }));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-                new UidRange(user.start + PKG_UIDS[0] + 1, user.stop),
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start + PKG_UIDS[0] + 1, user.stop),
         }));
         assertBlocked(vpn, user.start + PKG_UIDS[1], user.start + PKG_UIDS[2],
                 user.start + PKG_UIDS[3]);
@@ -434,12 +433,12 @@
         // Add the list of allowed packages.
         assertTrue(vpn.setAlwaysOnPackage(
                 PKGS[0], true, Collections.singletonList(PKGS[1]), mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(new UidRange[] {
-                new UidRange(user.start + PKG_UIDS[0] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start + PKG_UIDS[0] + 1, user.stop)
         }));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-                new UidRange(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[1] - 1),
-                new UidRange(user.start + PKG_UIDS[1] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[1] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[1] + 1, user.stop)
         }));
         assertBlocked(vpn, user.start + PKG_UIDS[2], user.start + PKG_UIDS[3]);
         assertUnblocked(vpn, user.start + PKG_UIDS[0], user.start + PKG_UIDS[1]);
@@ -452,13 +451,13 @@
         // allowed package should change from PGKS[1] to PKGS[2].
         assertTrue(vpn.setAlwaysOnPackage(
                 PKGS[0], true, Arrays.asList("com.foo.app", PKGS[2], "com.bar.app"), mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(new UidRange[]{
-                new UidRange(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[1] - 1),
-                new UidRange(user.start + PKG_UIDS[1] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(new UidRangeParcel[]{
+                new UidRangeParcel(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[1] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[1] + 1, user.stop)
         }));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[]{
-                new UidRange(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[2] - 1),
-                new UidRange(user.start + PKG_UIDS[2] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[]{
+                new UidRangeParcel(user.start + PKG_UIDS[0] + 1, user.start + PKG_UIDS[2] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[2] + 1, user.stop)
         }));
     }
 
@@ -472,86 +471,86 @@
                 restrictedProfileA.flags);
         tempProfile.restrictedProfileParentId = primaryUser.id;
 
-        final UidRange user = UidRange.createForUser(primaryUser.id);
+        final UidRange user = PRI_USER_RANGE;
         final UidRange profile = UidRange.createForUser(tempProfile.id);
 
         // Set lockdown.
         assertTrue(vpn.setAlwaysOnPackage(PKGS[3], true, null, mKeyStore));
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-            new UidRange(user.start, user.start + PKG_UIDS[3] - 1),
-            new UidRange(user.start + PKG_UIDS[3] + 1, user.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(user.start, user.start + PKG_UIDS[3] - 1),
+                new UidRangeParcel(user.start + PKG_UIDS[3] + 1, user.stop)
         }));
-
         // Verify restricted user isn't affected at first.
         assertUnblocked(vpn, profile.start + PKG_UIDS[0]);
 
         // Add the restricted user.
         setMockedUsers(primaryUser, tempProfile);
         vpn.onUserAdded(tempProfile.id);
-        verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(new UidRange[] {
-            new UidRange(profile.start, profile.start + PKG_UIDS[3] - 1),
-            new UidRange(profile.start + PKG_UIDS[3] + 1, profile.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(profile.start, profile.start + PKG_UIDS[3] - 1),
+                new UidRangeParcel(profile.start + PKG_UIDS[3] + 1, profile.stop)
         }));
 
         // Remove the restricted user.
         tempProfile.partial = true;
         vpn.onUserRemoved(tempProfile.id);
-        verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(new UidRange[] {
-            new UidRange(profile.start, profile.start + PKG_UIDS[3] - 1),
-            new UidRange(profile.start + PKG_UIDS[3] + 1, profile.stop)
+        verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(new UidRangeParcel[] {
+                new UidRangeParcel(profile.start, profile.start + PKG_UIDS[3] - 1),
+                new UidRangeParcel(profile.start + PKG_UIDS[3] + 1, profile.stop)
         }));
     }
 
     @Test
     public void testLockdownRuleRepeatability() throws Exception {
         final Vpn vpn = createVpn(primaryUser.id);
-
+        final UidRangeParcel[] primaryUserRangeParcel = new UidRangeParcel[] {
+                new UidRangeParcel(PRI_USER_RANGE.start, PRI_USER_RANGE.stop)};
         // Given legacy lockdown is already enabled,
         vpn.setLockdown(true);
-        verify(mNetService, times(1)).setAllowOnlyVpnForUids(
-                eq(true), aryEq(new UidRange[] {UidRange.createForUser(primaryUser.id)}));
+
+        verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(primaryUserRangeParcel));
 
         // Enabling legacy lockdown twice should do nothing.
         vpn.setLockdown(true);
-        verify(mNetService, times(1)).setAllowOnlyVpnForUids(anyBoolean(), any(UidRange[].class));
+        verify(mNetd, times(1))
+                .networkRejectNonSecureVpn(anyBoolean(), any(UidRangeParcel[].class));
 
         // And disabling should remove the rules exactly once.
         vpn.setLockdown(false);
-        verify(mNetService, times(1)).setAllowOnlyVpnForUids(
-                eq(false), aryEq(new UidRange[] {UidRange.createForUser(primaryUser.id)}));
+        verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(primaryUserRangeParcel));
 
         // Removing the lockdown again should have no effect.
         vpn.setLockdown(false);
-        verify(mNetService, times(2)).setAllowOnlyVpnForUids(anyBoolean(), any(UidRange[].class));
+        verify(mNetd, times(2)).networkRejectNonSecureVpn(
+                anyBoolean(), any(UidRangeParcel[].class));
     }
 
     @Test
     public void testLockdownRuleReversibility() throws Exception {
         final Vpn vpn = createVpn(primaryUser.id);
-
-        final UidRange[] entireUser = {
-            UidRange.createForUser(primaryUser.id)
+        final UidRangeParcel[] entireUser = {
+            new UidRangeParcel(PRI_USER_RANGE.start, PRI_USER_RANGE.stop)
         };
-        final UidRange[] exceptPkg0 = {
-            new UidRange(entireUser[0].start, entireUser[0].start + PKG_UIDS[0] - 1),
-            new UidRange(entireUser[0].start + PKG_UIDS[0] + 1, entireUser[0].stop)
+        final UidRangeParcel[] exceptPkg0 = {
+            new UidRangeParcel(entireUser[0].start, entireUser[0].start + PKG_UIDS[0] - 1),
+            new UidRangeParcel(entireUser[0].start + PKG_UIDS[0] + 1, entireUser[0].stop)
         };
 
-        final InOrder order = inOrder(mNetService);
+        final InOrder order = inOrder(mNetd);
 
         // Given lockdown is enabled with no package (legacy VPN),
         vpn.setLockdown(true);
-        order.verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(entireUser));
+        order.verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(entireUser));
 
         // When a new VPN package is set the rules should change to cover that package.
         vpn.prepare(null, PKGS[0], VpnManager.TYPE_VPN_SERVICE);
-        order.verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(entireUser));
-        order.verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(exceptPkg0));
+        order.verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(entireUser));
+        order.verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(exceptPkg0));
 
         // When that VPN package is unset, everything should be undone again in reverse.
         vpn.prepare(null, VpnConfig.LEGACY_VPN, VpnManager.TYPE_VPN_SERVICE);
-        order.verify(mNetService).setAllowOnlyVpnForUids(eq(false), aryEq(exceptPkg0));
-        order.verify(mNetService).setAllowOnlyVpnForUids(eq(true), aryEq(entireUser));
+        order.verify(mNetd).networkRejectNonSecureVpn(eq(false), aryEq(exceptPkg0));
+        order.verify(mNetd).networkRejectNonSecureVpn(eq(true), aryEq(entireUser));
     }
 
     @Test
@@ -589,7 +588,7 @@
     }
 
     @Test
-    public void testNotificationShownForAlwaysOnApp() {
+    public void testNotificationShownForAlwaysOnApp() throws Exception {
         final UserHandle userHandle = UserHandle.of(primaryUser.id);
         final Vpn vpn = createVpn(primaryUser.id);
         setMockedUsers(primaryUser);
@@ -617,103 +616,6 @@
         order.verify(mNotificationManager).cancel(anyString(), anyInt());
     }
 
-    @Test
-    public void testCapabilities() {
-        final Vpn vpn = createVpn(primaryUser.id);
-        setMockedUsers(primaryUser);
-
-        final Network mobile = new Network(1);
-        final Network wifi = new Network(2);
-
-        final Map<Network, NetworkCapabilities> networks = new HashMap<>();
-        networks.put(
-                mobile,
-                new NetworkCapabilities()
-                        .addTransportType(TRANSPORT_CELLULAR)
-                        .addCapability(NET_CAPABILITY_INTERNET)
-                        .addCapability(NET_CAPABILITY_NOT_CONGESTED)
-                        .setLinkDownstreamBandwidthKbps(10));
-        networks.put(
-                wifi,
-                new NetworkCapabilities()
-                        .addTransportType(TRANSPORT_WIFI)
-                        .addCapability(NET_CAPABILITY_INTERNET)
-                        .addCapability(NET_CAPABILITY_NOT_METERED)
-                        .addCapability(NET_CAPABILITY_NOT_ROAMING)
-                        .addCapability(NET_CAPABILITY_NOT_CONGESTED)
-                        .addCapability(NET_CAPABILITY_NOT_SUSPENDED)
-                        .setLinkUpstreamBandwidthKbps(20));
-        setMockedNetworks(networks);
-
-        final NetworkCapabilities caps = new NetworkCapabilities();
-
-        Vpn.applyUnderlyingCapabilities(
-                mConnectivityManager, new Network[] {}, caps, false /* isAlwaysMetered */);
-        assertTrue(caps.hasTransport(TRANSPORT_VPN));
-        assertFalse(caps.hasTransport(TRANSPORT_CELLULAR));
-        assertFalse(caps.hasTransport(TRANSPORT_WIFI));
-        assertEquals(LINK_BANDWIDTH_UNSPECIFIED, caps.getLinkDownstreamBandwidthKbps());
-        assertEquals(LINK_BANDWIDTH_UNSPECIFIED, caps.getLinkUpstreamBandwidthKbps());
-        assertFalse(caps.hasCapability(NET_CAPABILITY_NOT_METERED));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_ROAMING));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_CONGESTED));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
-
-        Vpn.applyUnderlyingCapabilities(
-                mConnectivityManager,
-                new Network[] {mobile},
-                caps,
-                false /* isAlwaysMetered */);
-        assertTrue(caps.hasTransport(TRANSPORT_VPN));
-        assertTrue(caps.hasTransport(TRANSPORT_CELLULAR));
-        assertFalse(caps.hasTransport(TRANSPORT_WIFI));
-        assertEquals(10, caps.getLinkDownstreamBandwidthKbps());
-        assertEquals(LINK_BANDWIDTH_UNSPECIFIED, caps.getLinkUpstreamBandwidthKbps());
-        assertFalse(caps.hasCapability(NET_CAPABILITY_NOT_METERED));
-        assertFalse(caps.hasCapability(NET_CAPABILITY_NOT_ROAMING));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_CONGESTED));
-        assertFalse(caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
-
-        Vpn.applyUnderlyingCapabilities(
-                mConnectivityManager, new Network[] {wifi}, caps, false /* isAlwaysMetered */);
-        assertTrue(caps.hasTransport(TRANSPORT_VPN));
-        assertFalse(caps.hasTransport(TRANSPORT_CELLULAR));
-        assertTrue(caps.hasTransport(TRANSPORT_WIFI));
-        assertEquals(LINK_BANDWIDTH_UNSPECIFIED, caps.getLinkDownstreamBandwidthKbps());
-        assertEquals(20, caps.getLinkUpstreamBandwidthKbps());
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_METERED));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_ROAMING));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_CONGESTED));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
-
-        Vpn.applyUnderlyingCapabilities(
-                mConnectivityManager, new Network[] {wifi}, caps, true /* isAlwaysMetered */);
-        assertTrue(caps.hasTransport(TRANSPORT_VPN));
-        assertFalse(caps.hasTransport(TRANSPORT_CELLULAR));
-        assertTrue(caps.hasTransport(TRANSPORT_WIFI));
-        assertEquals(LINK_BANDWIDTH_UNSPECIFIED, caps.getLinkDownstreamBandwidthKbps());
-        assertEquals(20, caps.getLinkUpstreamBandwidthKbps());
-        assertFalse(caps.hasCapability(NET_CAPABILITY_NOT_METERED));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_ROAMING));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_CONGESTED));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
-
-        Vpn.applyUnderlyingCapabilities(
-                mConnectivityManager,
-                new Network[] {mobile, wifi},
-                caps,
-                false /* isAlwaysMetered */);
-        assertTrue(caps.hasTransport(TRANSPORT_VPN));
-        assertTrue(caps.hasTransport(TRANSPORT_CELLULAR));
-        assertTrue(caps.hasTransport(TRANSPORT_WIFI));
-        assertEquals(10, caps.getLinkDownstreamBandwidthKbps());
-        assertEquals(20, caps.getLinkUpstreamBandwidthKbps());
-        assertFalse(caps.hasCapability(NET_CAPABILITY_NOT_METERED));
-        assertFalse(caps.hasCapability(NET_CAPABILITY_NOT_ROAMING));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_CONGESTED));
-        assertTrue(caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
-    }
-
     /**
      * The profile name should NOT change between releases for backwards compatibility
      *
@@ -1037,7 +939,7 @@
         when(exception.getErrorType())
                 .thenReturn(IkeProtocolException.ERROR_TYPE_AUTHENTICATION_FAILED);
 
-        final Vpn vpn = startLegacyVpn(mVpnProfile);
+        final Vpn vpn = startLegacyVpn(createVpn(primaryUser.id), (mVpnProfile));
         final NetworkCallback cb = triggerOnAvailableAndGetCallback();
 
         // Wait for createIkeSession() to be called before proceeding in order to ensure consistent
@@ -1048,20 +950,20 @@
         ikeCb.onClosedExceptionally(exception);
 
         verify(mConnectivityManager, timeout(TEST_TIMEOUT_MS)).unregisterNetworkCallback(eq(cb));
-        assertEquals(DetailedState.FAILED, vpn.getNetworkInfo().getDetailedState());
+        assertEquals(LegacyVpnInfo.STATE_FAILED, vpn.getLegacyVpnInfo().state);
     }
 
     @Test
     public void testStartPlatformVpnIllegalArgumentExceptionInSetup() throws Exception {
         when(mIkev2SessionCreator.createIkeSession(any(), any(), any(), any(), any(), any()))
                 .thenThrow(new IllegalArgumentException());
-        final Vpn vpn = startLegacyVpn(mVpnProfile);
+        final Vpn vpn = startLegacyVpn(createVpn(primaryUser.id), mVpnProfile);
         final NetworkCallback cb = triggerOnAvailableAndGetCallback();
 
         // Wait for createIkeSession() to be called before proceeding in order to ensure consistent
         // state
         verify(mConnectivityManager, timeout(TEST_TIMEOUT_MS)).unregisterNetworkCallback(eq(cb));
-        assertEquals(DetailedState.FAILED, vpn.getNetworkInfo().getDetailedState());
+        assertEquals(LegacyVpnInfo.STATE_FAILED, vpn.getLegacyVpnInfo().state);
     }
 
     private void setAndVerifyAlwaysOnPackage(Vpn vpn, int uid, boolean lockdownEnabled) {
@@ -1100,8 +1002,7 @@
         // a subsequent CL.
     }
 
-    public Vpn startLegacyVpn(final VpnProfile vpnProfile) throws Exception {
-        final Vpn vpn = createVpn(primaryUser.id);
+    private Vpn startLegacyVpn(final Vpn vpn, final VpnProfile vpnProfile) throws Exception {
         setMockedUsers(primaryUser);
 
         // Dummy egress interface
@@ -1118,7 +1019,7 @@
 
     @Test
     public void testStartPlatformVpn() throws Exception {
-        startLegacyVpn(mVpnProfile);
+        startLegacyVpn(createVpn(primaryUser.id), mVpnProfile);
         // TODO: Test the Ikev2VpnRunner started up properly. Relies on utility methods added in
         // a subsequent patch.
     }
@@ -1153,7 +1054,7 @@
                     legacyRunnerReady.open();
                     return new Network(102);
                 });
-        final Vpn vpn = startLegacyVpn(profile);
+        final Vpn vpn = startLegacyVpn(createVpn(primaryUser.id), profile);
         final TestDeps deps = (TestDeps) vpn.mDeps;
         try {
             // udppsk and 1701 are the values for TYPE_L2TP_IPSEC_PSK
@@ -1287,8 +1188,13 @@
         doReturn(UserHandle.of(userId)).when(asUserContext).getUser();
         when(mContext.createContextAsUser(eq(UserHandle.of(userId)), anyInt()))
                 .thenReturn(asUserContext);
-        return new Vpn(Looper.myLooper(), mContext, new TestDeps(), mNetService,
-                userId, mKeyStore, mSystemServices, mIkev2SessionCreator);
+        final TestLooper testLooper = new TestLooper();
+        final Vpn vpn = new Vpn(testLooper.getLooper(), mContext, new TestDeps(), mNetService,
+                mNetd, userId, mKeyStore, mSystemServices, mIkev2SessionCreator);
+        verify(mConnectivityManager, times(1)).registerNetworkProvider(argThat(
+                provider -> provider.getName().contains("VpnNetworkProvider")
+        ));
+        return vpn;
     }
 
     private static void assertBlocked(Vpn vpn, int... uids) {
@@ -1318,15 +1224,14 @@
          * @see UserManagerService#getUsers(boolean)
          */
         doAnswer(invocation -> {
-            final boolean excludeDying = (boolean) invocation.getArguments()[0];
             final ArrayList<UserInfo> result = new ArrayList<>(users.length);
             for (UserInfo ui : users) {
-                if (!excludeDying || (ui.isEnabled() && !ui.partial)) {
+                if (ui.isEnabled() && !ui.partial) {
                     result.add(ui);
                 }
             }
             return result;
-        }).when(mUserManager).getUsers(anyBoolean());
+        }).when(mUserManager).getAliveUsers();
 
         doAnswer(invocation -> {
             final int id = (int) invocation.getArguments()[0];
diff --git a/tests/notification/OWNERS b/tests/notification/OWNERS
new file mode 100644
index 0000000..396fd12
--- /dev/null
+++ b/tests/notification/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/notification/OWNERS
diff --git a/tests/permission/OWNERS b/tests/permission/OWNERS
new file mode 100644
index 0000000..999ea0e
--- /dev/null
+++ b/tests/permission/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/permission/OWNERS
diff --git a/tests/utils/DummyIME/OWNERS b/tests/utils/DummyIME/OWNERS
new file mode 100644
index 0000000..5deb2ce
--- /dev/null
+++ b/tests/utils/DummyIME/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/inputmethod/OWNERS
diff --git a/tests/utils/StubIME/OWNERS b/tests/utils/StubIME/OWNERS
new file mode 100644
index 0000000..5deb2ce
--- /dev/null
+++ b/tests/utils/StubIME/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/inputmethod/OWNERS
diff --git a/tests/utils/hostutils/src/com/android/tests/rollback/OWNERS b/tests/utils/hostutils/src/com/android/tests/rollback/OWNERS
new file mode 100644
index 0000000..d04a706
--- /dev/null
+++ b/tests/utils/hostutils/src/com/android/tests/rollback/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/rollback/OWNERS
diff --git a/tests/utils/testutils/java/com/android/server/accessibility/OWNERS b/tests/utils/testutils/java/com/android/server/accessibility/OWNERS
new file mode 100644
index 0000000..b74281e
--- /dev/null
+++ b/tests/utils/testutils/java/com/android/server/accessibility/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/view/accessibility/OWNERS
diff --git a/tests/utils/testutils/java/com/android/server/wm/OWNERS b/tests/utils/testutils/java/com/android/server/wm/OWNERS
new file mode 100644
index 0000000..0862c05
--- /dev/null
+++ b/tests/utils/testutils/java/com/android/server/wm/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/wm/OWNERS
diff --git a/tools/aapt/OWNERS b/tools/aapt/OWNERS
new file mode 100644
index 0000000..c232ccd
--- /dev/null
+++ b/tools/aapt/OWNERS
@@ -0,0 +1 @@
+include /tools/aapt2/OWNERS
diff --git a/tools/fonts/OWNERS b/tools/fonts/OWNERS
new file mode 100644
index 0000000..a538331
--- /dev/null
+++ b/tools/fonts/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/graphics/fonts/OWNERS
diff --git a/tools/incident_report/OWNERS b/tools/incident_report/OWNERS
new file mode 100644
index 0000000..f766115
--- /dev/null
+++ b/tools/incident_report/OWNERS
@@ -0,0 +1 @@
+include /cmds/incidentd/OWNERS
diff --git a/tools/incident_section_gen/OWNERS b/tools/incident_section_gen/OWNERS
new file mode 100644
index 0000000..f766115
--- /dev/null
+++ b/tools/incident_section_gen/OWNERS
@@ -0,0 +1 @@
+include /cmds/incidentd/OWNERS
diff --git a/tools/powerstats/OWNERS b/tools/powerstats/OWNERS
new file mode 100644
index 0000000..d68066b
--- /dev/null
+++ b/tools/powerstats/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/power/OWNERS
diff --git a/tools/stats_log_api_gen/Collation.cpp b/tools/stats_log_api_gen/Collation.cpp
index a230de4..2608097 100644
--- a/tools/stats_log_api_gen/Collation.cpp
+++ b/tools/stats_log_api_gen/Collation.cpp
@@ -20,7 +20,7 @@
 
 #include <map>
 
-#include "frameworks/base/cmds/statsd/src/atoms.pb.h"
+#include "frameworks/proto_logging/stats/atoms.pb.h"
 
 namespace android {
 namespace stats_log_api_gen {
diff --git a/tools/stats_log_api_gen/Collation.h b/tools/stats_log_api_gen/Collation.h
index 10b34ec..3deb3ae 100644
--- a/tools/stats_log_api_gen/Collation.h
+++ b/tools/stats_log_api_gen/Collation.h
@@ -24,7 +24,7 @@
 #include <set>
 #include <vector>
 
-#include "frameworks/base/cmds/statsd/src/atom_field_options.pb.h"
+#include "frameworks/proto_logging/stats/atom_field_options.pb.h"
 
 namespace android {
 namespace stats_log_api_gen {
diff --git a/tools/stats_log_api_gen/OWNERS b/tools/stats_log_api_gen/OWNERS
new file mode 100644
index 0000000..41a0c95
--- /dev/null
+++ b/tools/stats_log_api_gen/OWNERS
@@ -0,0 +1 @@
+yro@google.com
diff --git a/tools/stats_log_api_gen/main.cpp b/tools/stats_log_api_gen/main.cpp
index b888ce9..416dfdd 100644
--- a/tools/stats_log_api_gen/main.cpp
+++ b/tools/stats_log_api_gen/main.cpp
@@ -9,7 +9,7 @@
 #include <vector>
 
 #include "Collation.h"
-#include "frameworks/base/cmds/statsd/src/atoms.pb.h"
+#include "frameworks/proto_logging/stats/atoms.pb.h"
 #include "java_writer.h"
 #include "java_writer_q.h"
 #include "native_writer.h"
diff --git a/tools/stats_log_api_gen/test.proto b/tools/stats_log_api_gen/test.proto
index aaa488e..a3ea785 100644
--- a/tools/stats_log_api_gen/test.proto
+++ b/tools/stats_log_api_gen/test.proto
@@ -16,8 +16,8 @@
 
 syntax = "proto2";
 
-import "frameworks/base/cmds/statsd/src/atoms.proto";
-import "frameworks/base/cmds/statsd/src/atom_field_options.proto";
+import "frameworks/proto_logging/stats/atoms.proto";
+import "frameworks/proto_logging/stats/atom_field_options.proto";
 
 package android.stats_log_api_gen;
 
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index c269ba6..5589bd13 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -582,12 +582,18 @@
      * 6 GHz band frequency of first channel in MHz
      * @hide
      */
-    public static final int BAND_6_GHZ_START_FREQ_MHZ = 5945;
+    public static final int BAND_6_GHZ_START_FREQ_MHZ = 5955;
     /**
      * 6 GHz band frequency of last channel in MHz
      * @hide
      */
-    public static final int BAND_6_GHZ_END_FREQ_MHZ = 7105;
+    public static final int BAND_6_GHZ_END_FREQ_MHZ = 7115;
+
+    /**
+     * 6 GHz band operating class 136 channel 2 center frequency in MHz
+     * @hide
+     */
+    public static final int BAND_6_GHZ_OP_CLASS_136_CH_2_FREQ_MHZ = 5935;
 
     /**
      * Utility function to check if a frequency within 2.4 GHz band
@@ -619,7 +625,10 @@
      * @hide
      */
     public static boolean is6GHz(int freqMhz) {
-        return freqMhz >= BAND_6_GHZ_START_FREQ_MHZ && freqMhz <= BAND_6_GHZ_END_FREQ_MHZ;
+        if (freqMhz == BAND_6_GHZ_OP_CLASS_136_CH_2_FREQ_MHZ) {
+            return true;
+        }
+        return (freqMhz >= BAND_6_GHZ_START_FREQ_MHZ && freqMhz <= BAND_6_GHZ_END_FREQ_MHZ);
     }
 
     /**
@@ -650,6 +659,9 @@
         }
         if (band == WifiScanner.WIFI_BAND_6_GHZ) {
             if (channel >= BAND_6_GHZ_FIRST_CH_NUM && channel <= BAND_6_GHZ_LAST_CH_NUM) {
+                if (channel == 2) {
+                    return BAND_6_GHZ_OP_CLASS_136_CH_2_FREQ_MHZ;
+                }
                 return ((channel - BAND_6_GHZ_FIRST_CH_NUM) * 5) + BAND_6_GHZ_START_FREQ_MHZ;
             } else {
                 return UNSPECIFIED;
@@ -674,6 +686,9 @@
         } else if (is5GHz(freqMhz)) {
             return ((freqMhz - BAND_5_GHZ_START_FREQ_MHZ) / 5) + BAND_5_GHZ_FIRST_CH_NUM;
         } else if (is6GHz(freqMhz)) {
+            if (freqMhz == BAND_6_GHZ_OP_CLASS_136_CH_2_FREQ_MHZ) {
+                return 2;
+            }
             return ((freqMhz - BAND_6_GHZ_START_FREQ_MHZ) / 5) + BAND_6_GHZ_FIRST_CH_NUM;
         }
 
diff --git a/wifi/java/android/net/wifi/SoftApConfiguration.java b/wifi/java/android/net/wifi/SoftApConfiguration.java
index a5e76e6..d2ff658 100644
--- a/wifi/java/android/net/wifi/SoftApConfiguration.java
+++ b/wifi/java/android/net/wifi/SoftApConfiguration.java
@@ -533,6 +533,7 @@
                 wifiConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
                 break;
             case SECURITY_TYPE_WPA2_PSK:
+            case SECURITY_TYPE_WPA3_SAE_TRANSITION:
                 wifiConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);
                 break;
             default:
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index 77fa673..90edc45 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -30,6 +30,9 @@
 import java.nio.charset.StandardCharsets;
 import java.security.PrivateKey;
 import java.security.cert.X509Certificate;
+import java.security.interfaces.ECPublicKey;
+import java.security.interfaces.RSAPublicKey;
+import java.security.spec.ECParameterSpec;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
@@ -1442,4 +1445,50 @@
         }
         return TextUtils.isEmpty(getCaPath());
     }
+
+    /**
+     * Check if a given certificate Get the Suite-B cipher from the certificate
+     *
+     * @param x509Certificate Certificate to process
+     * @return true if the certificate OID matches the Suite-B requirements for RSA or ECDSA
+     * certificates, or false otherwise.
+     * @hide
+     */
+    public static boolean isSuiteBCipherCert(@Nullable X509Certificate x509Certificate) {
+        if (x509Certificate == null) {
+            return false;
+        }
+        final String sigAlgOid = x509Certificate.getSigAlgOID();
+
+        // Wi-Fi alliance requires the use of both ECDSA secp384r1 and RSA 3072 certificates
+        // in WPA3-Enterprise 192-bit security networks, which are also known as Suite-B-192
+        // networks, even though NSA Suite-B-192 mandates ECDSA only. The use of the term
+        // Suite-B was already coined in the IEEE 802.11-2016 specification for
+        // AKM 00-0F-AC but the test plan for WPA3-Enterprise 192-bit for APs mandates
+        // support for both RSA and ECDSA, and for STAs it mandates ECDSA and optionally
+        // RSA. In order to be compatible with all WPA3-Enterprise 192-bit deployments,
+        // we are supporting both types here.
+        if (sigAlgOid.equals("1.2.840.113549.1.1.12")) {
+            // sha384WithRSAEncryption
+            if (x509Certificate.getPublicKey() instanceof RSAPublicKey) {
+                final RSAPublicKey rsaPublicKey = (RSAPublicKey) x509Certificate.getPublicKey();
+                if (rsaPublicKey.getModulus() != null
+                        && rsaPublicKey.getModulus().bitLength() >= 3072) {
+                    return true;
+                }
+            }
+        } else if (sigAlgOid.equals("1.2.840.10045.4.3.3")) {
+            // ecdsa-with-SHA384
+            if (x509Certificate.getPublicKey() instanceof ECPublicKey) {
+                final ECPublicKey ecPublicKey = (ECPublicKey) x509Certificate.getPublicKey();
+                final ECParameterSpec ecParameterSpec = ecPublicKey.getParams();
+
+                if (ecParameterSpec != null && ecParameterSpec.getOrder() != null
+                        && ecParameterSpec.getOrder().bitLength() >= 384) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
 }
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index b7f4c96..ccf8a80 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1054,8 +1054,8 @@
     /**
      * Broadcast intent action indicating that the link configuration changed on wifi.
      * <br />Included Extras:
-     * <br />{@link #EXTRA_LINK_PROPERTIES}: {@link android.net.LinkProperties} object associated
-     * with the Wi-Fi network.
+     * <br />{@link #EXTRA_LINK_PROPERTIES}: may not be set starting in Android 11. Check for
+     * <br /> null before reading its value.
      * <br /> No permissions are required to listen to this broadcast.
      * @hide
      */
@@ -1071,6 +1071,10 @@
      * Included in the {@link #ACTION_LINK_CONFIGURATION_CHANGED} broadcast.
      *
      * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
+     *
+     * Note: this extra may not be set starting in Android 11. Check for null before reading its
+     * value.
+     *
      * @hide
      */
     @SystemApi
diff --git a/wifi/java/android/net/wifi/WifiNetworkSpecifier.java b/wifi/java/android/net/wifi/WifiNetworkSpecifier.java
index b0213b0..e12bb91 100644
--- a/wifi/java/android/net/wifi/WifiNetworkSpecifier.java
+++ b/wifi/java/android/net/wifi/WifiNetworkSpecifier.java
@@ -78,12 +78,12 @@
         private @Nullable String mWpa3SaePassphrase;
         /**
          * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the WPA-EAP networks.
+         * certificates and other settings associated with the WPA/WPA2-Enterprise networks.
          */
         private @Nullable WifiEnterpriseConfig mWpa2EnterpriseConfig;
         /**
          * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the SuiteB networks.
+         * certificates and other settings associated with the WPA3-Enterprise networks.
          */
         private @Nullable WifiEnterpriseConfig mWpa3EnterpriseConfig;
         /**
@@ -243,7 +243,11 @@
 
         /**
          * Set the associated enterprise configuration for this network. Needed for authenticating
-         * to WPA3-SuiteB networks. See {@link WifiEnterpriseConfig} for description.
+         * to WPA3-Enterprise networks (standard and 192-bit security). See
+         * {@link WifiEnterpriseConfig} for description. For 192-bit security networks, both the
+         * client and CA certificates must be provided, and must be of type of either
+         * sha384WithRSAEncryption (OID 1.2.840.113549.1.1.12) or ecdsa-with-SHA384
+         * (OID 1.2.840.10045.4.3.3).
          *
          * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}.
          * @return Instance of {@link Builder} to enable chaining of the builder method.
@@ -284,8 +288,25 @@
             } else if (mWpa2EnterpriseConfig != null) { // WPA-EAP network
                 configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
                 configuration.enterpriseConfig = mWpa2EnterpriseConfig;
-            } else if (mWpa3EnterpriseConfig != null) { // WPA3-SuiteB network
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B);
+            } else if (mWpa3EnterpriseConfig != null) { // WPA3-Enterprise
+                if (mWpa3EnterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.TLS
+                        && WifiEnterpriseConfig.isSuiteBCipherCert(
+                        mWpa3EnterpriseConfig.getClientCertificate())
+                        && WifiEnterpriseConfig.isSuiteBCipherCert(
+                        mWpa3EnterpriseConfig.getCaCertificate())) {
+                    // WPA3-Enterprise in 192-bit security mode (Suite-B)
+                    configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B);
+                } else {
+                    // WPA3-Enterprise
+                    configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
+                    configuration.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
+                    configuration.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
+                    configuration.allowedPairwiseCiphers.set(
+                            WifiConfiguration.PairwiseCipher.GCMP_256);
+                    configuration.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
+                    configuration.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
+                    configuration.requirePmf = true;
+                }
                 configuration.enterpriseConfig = mWpa3EnterpriseConfig;
             } else if (mIsEnhancedOpen) { // OWE network
                 configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OWE);
diff --git a/wifi/java/android/net/wifi/WifiNetworkSuggestion.java b/wifi/java/android/net/wifi/WifiNetworkSuggestion.java
index 4d3a2c0..d8be1d2 100644
--- a/wifi/java/android/net/wifi/WifiNetworkSuggestion.java
+++ b/wifi/java/android/net/wifi/WifiNetworkSuggestion.java
@@ -72,12 +72,12 @@
         private @Nullable String mWpa3SaePassphrase;
         /**
          * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the WPA-EAP networks.
+         * certificates and other settings associated with the WPA/WPA2-Enterprise networks.
          */
         private @Nullable WifiEnterpriseConfig mWpa2EnterpriseConfig;
         /**
          * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the SuiteB networks.
+         * certificates and other settings associated with the WPA3-Enterprise networks.
          */
         private @Nullable WifiEnterpriseConfig mWpa3EnterpriseConfig;
         /**
@@ -276,7 +276,11 @@
 
         /**
          * Set the associated enterprise configuration for this network. Needed for authenticating
-         * to WPA3 enterprise networks. See {@link WifiEnterpriseConfig} for description.
+         * to WPA3-Enterprise networks (standard and 192-bit security). See
+         * {@link WifiEnterpriseConfig} for description. For 192-bit security networks, both the
+         * client and CA certificates must be provided, and must be of type of either
+         * sha384WithRSAEncryption (OID 1.2.840.113549.1.1.12) or ecdsa-with-SHA384
+         * (OID 1.2.840.10045.4.3.3).
          *
          * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}.
          * @return Instance of {@link Builder} to enable chaining of the builder method.
@@ -522,8 +526,25 @@
             } else if (mWpa2EnterpriseConfig != null) { // WPA-EAP network
                 configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
                 configuration.enterpriseConfig = mWpa2EnterpriseConfig;
-            } else if (mWpa3EnterpriseConfig != null) { // WPA3-SuiteB network
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B);
+            } else if (mWpa3EnterpriseConfig != null) { // WPA3-Enterprise
+                if (mWpa3EnterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.TLS
+                        && WifiEnterpriseConfig.isSuiteBCipherCert(
+                        mWpa3EnterpriseConfig.getClientCertificate())
+                        && WifiEnterpriseConfig.isSuiteBCipherCert(
+                        mWpa3EnterpriseConfig.getCaCertificate())) {
+                    // WPA3-Enterprise in 192-bit security mode (Suite-B)
+                    configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B);
+                } else {
+                    // WPA3-Enterprise
+                    configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
+                    configuration.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
+                    configuration.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
+                    configuration.allowedPairwiseCiphers.set(
+                            WifiConfiguration.PairwiseCipher.GCMP_256);
+                    configuration.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
+                    configuration.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
+                    configuration.requirePmf = true;
+                }
                 configuration.enterpriseConfig = mWpa3EnterpriseConfig;
             } else if (mIsEnhancedOpen) { // OWE network
                 configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OWE);
@@ -943,6 +964,9 @@
      */
     @Nullable
     public WifiEnterpriseConfig getEnterpriseConfig() {
+        if (!wifiConfiguration.isEnterprise()) {
+            return null;
+        }
         return wifiConfiguration.enterpriseConfig;
     }
 
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/Credential.java b/wifi/java/android/net/wifi/hotspot2/pps/Credential.java
index fa806e7..282757a 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/Credential.java
+++ b/wifi/java/android/net/wifi/hotspot2/pps/Credential.java
@@ -448,6 +448,16 @@
                     return new UserCredential[size];
                 }
             };
+
+        /**
+         * Get a unique identifier for UserCredential.
+         *
+         * @hide
+         * @return a Unique identifier for a UserCredential object
+         */
+        public int getUniqueId() {
+            return Objects.hash(mUsername);
+        }
     }
     private UserCredential mUserCredential = null;
     /**
@@ -1037,7 +1047,8 @@
      * @return a Unique identifier for a Credential object
      */
     public int getUniqueId() {
-        return Objects.hash(mUserCredential, mCertCredential, mSimCredential, mRealm);
+        return Objects.hash(mUserCredential != null ? mUserCredential.getUniqueId() : 0,
+                mCertCredential, mSimCredential, mRealm);
     }
 
     @Override
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java b/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java
index 224c4be..8f34579 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java
+++ b/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java
@@ -313,9 +313,7 @@
      * @return a Unique identifier for a HomeSp object
      */
     public int getUniqueId() {
-        return Objects.hash(mFqdn, mFriendlyName, mHomeNetworkIds, Arrays.hashCode(mMatchAllOis),
-                Arrays.hashCode(mMatchAnyOis), Arrays.hashCode(mOtherHomePartners),
-                Arrays.hashCode(mRoamingConsortiumOis));
+        return Objects.hash(mFqdn);
     }
 
 
diff --git a/wifi/tests/src/android/net/wifi/FakeKeys.java b/wifi/tests/src/android/net/wifi/FakeKeys.java
index c0d60c3..8aa6add 100644
--- a/wifi/tests/src/android/net/wifi/FakeKeys.java
+++ b/wifi/tests/src/android/net/wifi/FakeKeys.java
@@ -212,7 +212,443 @@
             (byte) 0xbc, (byte) 0xa7, (byte) 0x92, (byte) 0x90, (byte) 0xdd, (byte) 0xa1,
             (byte) 0x9c, (byte) 0xce, (byte) 0xa1, (byte) 0x87, (byte) 0x11, (byte) 0x51
     };
-    public static final PrivateKey RSA_KEY1 = loadPrivateRSAKey(FAKE_RSA_KEY_1);
+    public static final PrivateKey RSA_KEY1 = loadPrivateKey("RSA", FAKE_RSA_KEY_1);
+
+    private static final String CA_SUITE_B_RSA3072_CERT_STRING =
+            "-----BEGIN CERTIFICATE-----\n"
+                    + "MIIEnTCCAwWgAwIBAgIUD87Y8fFLzLr1HQ/64aEnjNq2R/4wDQYJKoZIhvcNAQEM\n"
+                    + "BQAwXjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQwwCgYDVQQHDANNVFYxEDAO\n"
+                    + "BgNVBAoMB0FuZHJvaWQxDjAMBgNVBAsMBVdpLUZpMRIwEAYDVQQDDAl1bml0ZXN0\n"
+                    + "Q0EwHhcNMjAwNzIxMDIxNzU0WhcNMzAwNTMwMDIxNzU0WjBeMQswCQYDVQQGEwJV\n"
+                    + "UzELMAkGA1UECAwCQ0ExDDAKBgNVBAcMA01UVjEQMA4GA1UECgwHQW5kcm9pZDEO\n"
+                    + "MAwGA1UECwwFV2ktRmkxEjAQBgNVBAMMCXVuaXRlc3RDQTCCAaIwDQYJKoZIhvcN\n"
+                    + "AQEBBQADggGPADCCAYoCggGBAMtrsT0otlxh0QS079KpRRbU1PQjCihSoltXnrxF\n"
+                    + "sTWZs2weVEeYVyYU5LaauCDDgISCMtjtfbfylMBeYjpWB5hYzYQOiTzo0anWhMyb\n"
+                    + "Ngb7gpMVZuIl6lwMYRyVRKwHWnTo2EUg1ZzW5rGe5fs/KHj6//hoNFm+3Oju0TQd\n"
+                    + "nraQULpoERPF5B7p85Cssk8uNbviBfZXvtCuJ4N6w7PNceOY/9bbwc1mC+pPZmzV\n"
+                    + "SOAg0vvbIQRzChm63C3jBC3xmxSOOZVrKN4zKDG2s8P0oCNGt0NlgRMrgbPRekzg\n"
+                    + "4avkbA0vTuc2AyriTEYkdea/Mt4EpRg9XuOb43U/GJ/d/vQv2/9fsxhXmsZrn8kr\n"
+                    + "Qo5MMHJFUd96GgHmvYSU3Mf/5r8gF626lvqHioGuTAuHUSnr02ri1WUxZ15LDRgY\n"
+                    + "quMjDCFZfucjJPDAdtiHcFSej/4SLJlN39z8oKKNPn3aL9Gv49oAKs9S8tfDVzMk\n"
+                    + "fDLROQFHFuW715GnnMgEAoOpRwIDAQABo1MwUTAdBgNVHQ4EFgQUeVuGmSVN4ARs\n"
+                    + "mesUMWSJ2qWLbxUwHwYDVR0jBBgwFoAUeVuGmSVN4ARsmesUMWSJ2qWLbxUwDwYD\n"
+                    + "VR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQwFAAOCAYEAit1Lo/hegZpPuT9dlWZJ\n"
+                    + "bC8JvAf95O8lnn6LFb69pgYOHCLgCIlvYXu9rdBUJgZo+V1MzJJljiO6RxWRfKbQ\n"
+                    + "8WBYkoqR1EqriR3Kn8q/SjIZCdFSaznTyU1wQMveBQ6RJWXSUhYVfE9RjyFTp7B4\n"
+                    + "UyH2uCluR/0T06HQNGfH5XpIYQqCk1Zgng5lmEmheLDPoJpa92lKeQFJMC6eYz9g\n"
+                    + "lF1GHxPxkPfbMJ6ZDp5X6Yopu6Q6uEXhVKM/iQVcgzRkx9rid+xTYl+nOKyK/XfC\n"
+                    + "z8P0/TFIoPTW02DLge5wKagdoCpy1B7HdrAXyUjoH4B8MsUkq3kYPFSjPzScuTtV\n"
+                    + "kUuDw5ipCNeXCRnhbYqRDk6PX5GUu2cmN9jtaH3tbgm3fKNOsd/BO1fLIl7qjXlR\n"
+                    + "27HHbC0JXjNvlm2DLp23v4NTxS7WZGYsxyUj5DZrxBxqCsTXu/01w1BrQKWKh9FM\n"
+                    + "aVrlA8omfVODK2CSuw+KhEMHepRv/AUgsLl4L4+RMoa+\n"
+                    + "-----END CERTIFICATE-----\n";
+    public static final X509Certificate CA_SUITE_B_RSA3072_CERT =
+            loadCertificate(CA_SUITE_B_RSA3072_CERT_STRING);
+
+    private static final String CA_SUITE_B_ECDSA_CERT_STRING =
+            "-----BEGIN CERTIFICATE-----\n"
+                    + "MIICTzCCAdSgAwIBAgIUdnLttwNPnQzFufplGOr9bTrGCqMwCgYIKoZIzj0EAwMw\n"
+                    + "XjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQwwCgYDVQQHDANNVFYxEDAOBgNV\n"
+                    + "BAoMB0FuZHJvaWQxDjAMBgNVBAsMBVdpLUZpMRIwEAYDVQQDDAl1bml0ZXN0Q0Ew\n"
+                    + "HhcNMjAwNzIxMDIyNDA1WhcNMzAwNTMwMDIyNDA1WjBeMQswCQYDVQQGEwJVUzEL\n"
+                    + "MAkGA1UECAwCQ0ExDDAKBgNVBAcMA01UVjEQMA4GA1UECgwHQW5kcm9pZDEOMAwG\n"
+                    + "A1UECwwFV2ktRmkxEjAQBgNVBAMMCXVuaXRlc3RDQTB2MBAGByqGSM49AgEGBSuB\n"
+                    + "BAAiA2IABFmntXwk9icqhDQFUP1xy04WyEpaGW4q6Q+8pujlSl/X3iotPZ++GZfp\n"
+                    + "Mfv3YDHDBl6sELPQ2BEjyPXmpsKjOUdiUe69e88oGEdeqT2xXiQ6uzpTfJD4170i\n"
+                    + "O/TwLrQGKKNTMFEwHQYDVR0OBBYEFCjptsX3g4g5W0L4oEP6N3gfyiZXMB8GA1Ud\n"
+                    + "IwQYMBaAFCjptsX3g4g5W0L4oEP6N3gfyiZXMA8GA1UdEwEB/wQFMAMBAf8wCgYI\n"
+                    + "KoZIzj0EAwMDaQAwZgIxAK61brUYRbLmQKiaEboZgrHtnPAcGo7Yzx3MwHecx3Dm\n"
+                    + "5soIeLVYc8bPYN1pbhXW1gIxALdEe2sh03nBHyQH4adYoZungoCwt8mp/7sJFxou\n"
+                    + "9UnRegyBgGzf74ROWdpZHzh+Pg==\n"
+                    + "-----END CERTIFICATE-----\n";
+    public static final X509Certificate CA_SUITE_B_ECDSA_CERT =
+            loadCertificate(CA_SUITE_B_ECDSA_CERT_STRING);
+
+    private static final String CLIENT_SUITE_B_RSA3072_CERT_STRING =
+            "-----BEGIN CERTIFICATE-----\n"
+                    + "MIIERzCCAq8CFDopjyNgaj+c2TN2k06h7okEWpHJMA0GCSqGSIb3DQEBDAUAMF4x\n"
+                    + "CzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTEMMAoGA1UEBwwDTVRWMRAwDgYDVQQK\n"
+                    + "DAdBbmRyb2lkMQ4wDAYDVQQLDAVXaS1GaTESMBAGA1UEAwwJdW5pdGVzdENBMB4X\n"
+                    + "DTIwMDcyMTAyMjkxMVoXDTMwMDUzMDAyMjkxMVowYjELMAkGA1UEBhMCVVMxCzAJ\n"
+                    + "BgNVBAgMAkNBMQwwCgYDVQQHDANNVFYxEDAOBgNVBAoMB0FuZHJvaWQxDjAMBgNV\n"
+                    + "BAsMBVdpLUZpMRYwFAYDVQQDDA11bml0ZXN0Q2xpZW50MIIBojANBgkqhkiG9w0B\n"
+                    + "AQEFAAOCAY8AMIIBigKCAYEAwSK3C5K5udtCKTnE14e8z2cZvwmB4Xe+a8+7QLud\n"
+                    + "Hooc/lQzClgK4MbVUC0D3FE+U32C78SxKoTaRWtvPmNm+UaFT8KkwyUno/dv+2XD\n"
+                    + "pd/zARQ+3FwAfWopAhEyCVSxwsCa+slQ4juRIMIuUC1Mm0NaptZyM3Tj/ICQEfpk\n"
+                    + "o9qVIbiK6eoJMTkY8EWfAn7RTFdfR1OLuO0mVOjgLW9/+upYv6hZ19nAMAxw4QTJ\n"
+                    + "x7lLwALX7B+tDYNEZHDqYL2zyvQWAj2HClere8QYILxkvktgBg2crEJJe4XbDH7L\n"
+                    + "A3rrXmsiqf1ZbfFFEzK9NFqovL+qGh+zIP+588ShJFO9H/RDnDpiTnAFTWXQdTwg\n"
+                    + "szSS0Vw2PB+JqEABAa9DeMvXT1Oy+NY3ItPHyy63nQZVI2rXANw4NhwS0Z6DF+Qs\n"
+                    + "TNrj+GU7e4SG/EGR8SvldjYfQTWFLg1l/UT1hOOkQZwdsaW1zgKyeuiFB2KdMmbA\n"
+                    + "Sq+Ux1L1KICo0IglwWcB/8nnAgMBAAEwDQYJKoZIhvcNAQEMBQADggGBAMYwJkNw\n"
+                    + "BaCviKFmReDTMwWPRy4AMNViEeqAXgERwDEKwM7efjsaj5gctWfKsxX6UdLzkhgg\n"
+                    + "6S/T6PxVWKzJ6l7SoOuTa6tMQOZp+h3R1mdfEQbw8B5cXBxZ+batzAai6Fiy1FKS\n"
+                    + "/ka3INbcGfYuIYghfTrb4/NJKN06ZaQ1bpPwq0e4gN7800T2nbawvSf7r+8ZLcG3\n"
+                    + "6bGCjRMwDSIipNvOwoj3TG315XC7TccX5difQ4sKOY+d2MkVJ3RiO0Ciw2ZbEW8d\n"
+                    + "1FH5vUQJWnBUfSFznosGzLwH3iWfqlP+27jNE+qB2igEwCRFgVAouURx5ou43xuX\n"
+                    + "qf6JkdI3HTJGLIWxkp7gOeln4dEaYzKjYw+P0VqJvKVqQ0IXiLjHgE0J9p0vgyD6\n"
+                    + "HVVcP7U8RgqrbIjL1QgHU4KBhGi+WSUh/mRplUCNvHgcYdcHi/gHpj/j6ubwqIGV\n"
+                    + "z4iSolAHYTmBWcLyE0NgpzE6ntp+53r2KaUJA99l2iGVzbWTwqPSm0XAVw==\n"
+                    + "-----END CERTIFICATE-----\n";
+    public static final X509Certificate CLIENT_SUITE_B_RSA3072_CERT =
+            loadCertificate(CLIENT_SUITE_B_RSA3072_CERT_STRING);
+
+    private static final byte[] CLIENT_SUITE_B_RSA3072_KEY_DATA = new byte[]{
+            (byte) 0x30, (byte) 0x82, (byte) 0x06, (byte) 0xfe, (byte) 0x02, (byte) 0x01,
+            (byte) 0x00, (byte) 0x30, (byte) 0x0d, (byte) 0x06, (byte) 0x09, (byte) 0x2a,
+            (byte) 0x86, (byte) 0x48, (byte) 0x86, (byte) 0xf7, (byte) 0x0d, (byte) 0x01,
+            (byte) 0x01, (byte) 0x01, (byte) 0x05, (byte) 0x00, (byte) 0x04, (byte) 0x82,
+            (byte) 0x06, (byte) 0xe8, (byte) 0x30, (byte) 0x82, (byte) 0x06, (byte) 0xe4,
+            (byte) 0x02, (byte) 0x01, (byte) 0x00, (byte) 0x02, (byte) 0x82, (byte) 0x01,
+            (byte) 0x81, (byte) 0x00, (byte) 0xc1, (byte) 0x22, (byte) 0xb7, (byte) 0x0b,
+            (byte) 0x92, (byte) 0xb9, (byte) 0xb9, (byte) 0xdb, (byte) 0x42, (byte) 0x29,
+            (byte) 0x39, (byte) 0xc4, (byte) 0xd7, (byte) 0x87, (byte) 0xbc, (byte) 0xcf,
+            (byte) 0x67, (byte) 0x19, (byte) 0xbf, (byte) 0x09, (byte) 0x81, (byte) 0xe1,
+            (byte) 0x77, (byte) 0xbe, (byte) 0x6b, (byte) 0xcf, (byte) 0xbb, (byte) 0x40,
+            (byte) 0xbb, (byte) 0x9d, (byte) 0x1e, (byte) 0x8a, (byte) 0x1c, (byte) 0xfe,
+            (byte) 0x54, (byte) 0x33, (byte) 0x0a, (byte) 0x58, (byte) 0x0a, (byte) 0xe0,
+            (byte) 0xc6, (byte) 0xd5, (byte) 0x50, (byte) 0x2d, (byte) 0x03, (byte) 0xdc,
+            (byte) 0x51, (byte) 0x3e, (byte) 0x53, (byte) 0x7d, (byte) 0x82, (byte) 0xef,
+            (byte) 0xc4, (byte) 0xb1, (byte) 0x2a, (byte) 0x84, (byte) 0xda, (byte) 0x45,
+            (byte) 0x6b, (byte) 0x6f, (byte) 0x3e, (byte) 0x63, (byte) 0x66, (byte) 0xf9,
+            (byte) 0x46, (byte) 0x85, (byte) 0x4f, (byte) 0xc2, (byte) 0xa4, (byte) 0xc3,
+            (byte) 0x25, (byte) 0x27, (byte) 0xa3, (byte) 0xf7, (byte) 0x6f, (byte) 0xfb,
+            (byte) 0x65, (byte) 0xc3, (byte) 0xa5, (byte) 0xdf, (byte) 0xf3, (byte) 0x01,
+            (byte) 0x14, (byte) 0x3e, (byte) 0xdc, (byte) 0x5c, (byte) 0x00, (byte) 0x7d,
+            (byte) 0x6a, (byte) 0x29, (byte) 0x02, (byte) 0x11, (byte) 0x32, (byte) 0x09,
+            (byte) 0x54, (byte) 0xb1, (byte) 0xc2, (byte) 0xc0, (byte) 0x9a, (byte) 0xfa,
+            (byte) 0xc9, (byte) 0x50, (byte) 0xe2, (byte) 0x3b, (byte) 0x91, (byte) 0x20,
+            (byte) 0xc2, (byte) 0x2e, (byte) 0x50, (byte) 0x2d, (byte) 0x4c, (byte) 0x9b,
+            (byte) 0x43, (byte) 0x5a, (byte) 0xa6, (byte) 0xd6, (byte) 0x72, (byte) 0x33,
+            (byte) 0x74, (byte) 0xe3, (byte) 0xfc, (byte) 0x80, (byte) 0x90, (byte) 0x11,
+            (byte) 0xfa, (byte) 0x64, (byte) 0xa3, (byte) 0xda, (byte) 0x95, (byte) 0x21,
+            (byte) 0xb8, (byte) 0x8a, (byte) 0xe9, (byte) 0xea, (byte) 0x09, (byte) 0x31,
+            (byte) 0x39, (byte) 0x18, (byte) 0xf0, (byte) 0x45, (byte) 0x9f, (byte) 0x02,
+            (byte) 0x7e, (byte) 0xd1, (byte) 0x4c, (byte) 0x57, (byte) 0x5f, (byte) 0x47,
+            (byte) 0x53, (byte) 0x8b, (byte) 0xb8, (byte) 0xed, (byte) 0x26, (byte) 0x54,
+            (byte) 0xe8, (byte) 0xe0, (byte) 0x2d, (byte) 0x6f, (byte) 0x7f, (byte) 0xfa,
+            (byte) 0xea, (byte) 0x58, (byte) 0xbf, (byte) 0xa8, (byte) 0x59, (byte) 0xd7,
+            (byte) 0xd9, (byte) 0xc0, (byte) 0x30, (byte) 0x0c, (byte) 0x70, (byte) 0xe1,
+            (byte) 0x04, (byte) 0xc9, (byte) 0xc7, (byte) 0xb9, (byte) 0x4b, (byte) 0xc0,
+            (byte) 0x02, (byte) 0xd7, (byte) 0xec, (byte) 0x1f, (byte) 0xad, (byte) 0x0d,
+            (byte) 0x83, (byte) 0x44, (byte) 0x64, (byte) 0x70, (byte) 0xea, (byte) 0x60,
+            (byte) 0xbd, (byte) 0xb3, (byte) 0xca, (byte) 0xf4, (byte) 0x16, (byte) 0x02,
+            (byte) 0x3d, (byte) 0x87, (byte) 0x0a, (byte) 0x57, (byte) 0xab, (byte) 0x7b,
+            (byte) 0xc4, (byte) 0x18, (byte) 0x20, (byte) 0xbc, (byte) 0x64, (byte) 0xbe,
+            (byte) 0x4b, (byte) 0x60, (byte) 0x06, (byte) 0x0d, (byte) 0x9c, (byte) 0xac,
+            (byte) 0x42, (byte) 0x49, (byte) 0x7b, (byte) 0x85, (byte) 0xdb, (byte) 0x0c,
+            (byte) 0x7e, (byte) 0xcb, (byte) 0x03, (byte) 0x7a, (byte) 0xeb, (byte) 0x5e,
+            (byte) 0x6b, (byte) 0x22, (byte) 0xa9, (byte) 0xfd, (byte) 0x59, (byte) 0x6d,
+            (byte) 0xf1, (byte) 0x45, (byte) 0x13, (byte) 0x32, (byte) 0xbd, (byte) 0x34,
+            (byte) 0x5a, (byte) 0xa8, (byte) 0xbc, (byte) 0xbf, (byte) 0xaa, (byte) 0x1a,
+            (byte) 0x1f, (byte) 0xb3, (byte) 0x20, (byte) 0xff, (byte) 0xb9, (byte) 0xf3,
+            (byte) 0xc4, (byte) 0xa1, (byte) 0x24, (byte) 0x53, (byte) 0xbd, (byte) 0x1f,
+            (byte) 0xf4, (byte) 0x43, (byte) 0x9c, (byte) 0x3a, (byte) 0x62, (byte) 0x4e,
+            (byte) 0x70, (byte) 0x05, (byte) 0x4d, (byte) 0x65, (byte) 0xd0, (byte) 0x75,
+            (byte) 0x3c, (byte) 0x20, (byte) 0xb3, (byte) 0x34, (byte) 0x92, (byte) 0xd1,
+            (byte) 0x5c, (byte) 0x36, (byte) 0x3c, (byte) 0x1f, (byte) 0x89, (byte) 0xa8,
+            (byte) 0x40, (byte) 0x01, (byte) 0x01, (byte) 0xaf, (byte) 0x43, (byte) 0x78,
+            (byte) 0xcb, (byte) 0xd7, (byte) 0x4f, (byte) 0x53, (byte) 0xb2, (byte) 0xf8,
+            (byte) 0xd6, (byte) 0x37, (byte) 0x22, (byte) 0xd3, (byte) 0xc7, (byte) 0xcb,
+            (byte) 0x2e, (byte) 0xb7, (byte) 0x9d, (byte) 0x06, (byte) 0x55, (byte) 0x23,
+            (byte) 0x6a, (byte) 0xd7, (byte) 0x00, (byte) 0xdc, (byte) 0x38, (byte) 0x36,
+            (byte) 0x1c, (byte) 0x12, (byte) 0xd1, (byte) 0x9e, (byte) 0x83, (byte) 0x17,
+            (byte) 0xe4, (byte) 0x2c, (byte) 0x4c, (byte) 0xda, (byte) 0xe3, (byte) 0xf8,
+            (byte) 0x65, (byte) 0x3b, (byte) 0x7b, (byte) 0x84, (byte) 0x86, (byte) 0xfc,
+            (byte) 0x41, (byte) 0x91, (byte) 0xf1, (byte) 0x2b, (byte) 0xe5, (byte) 0x76,
+            (byte) 0x36, (byte) 0x1f, (byte) 0x41, (byte) 0x35, (byte) 0x85, (byte) 0x2e,
+            (byte) 0x0d, (byte) 0x65, (byte) 0xfd, (byte) 0x44, (byte) 0xf5, (byte) 0x84,
+            (byte) 0xe3, (byte) 0xa4, (byte) 0x41, (byte) 0x9c, (byte) 0x1d, (byte) 0xb1,
+            (byte) 0xa5, (byte) 0xb5, (byte) 0xce, (byte) 0x02, (byte) 0xb2, (byte) 0x7a,
+            (byte) 0xe8, (byte) 0x85, (byte) 0x07, (byte) 0x62, (byte) 0x9d, (byte) 0x32,
+            (byte) 0x66, (byte) 0xc0, (byte) 0x4a, (byte) 0xaf, (byte) 0x94, (byte) 0xc7,
+            (byte) 0x52, (byte) 0xf5, (byte) 0x28, (byte) 0x80, (byte) 0xa8, (byte) 0xd0,
+            (byte) 0x88, (byte) 0x25, (byte) 0xc1, (byte) 0x67, (byte) 0x01, (byte) 0xff,
+            (byte) 0xc9, (byte) 0xe7, (byte) 0x02, (byte) 0x03, (byte) 0x01, (byte) 0x00,
+            (byte) 0x01, (byte) 0x02, (byte) 0x82, (byte) 0x01, (byte) 0x80, (byte) 0x04,
+            (byte) 0xb1, (byte) 0xcc, (byte) 0x53, (byte) 0x3a, (byte) 0xb0, (byte) 0xcb,
+            (byte) 0x04, (byte) 0xba, (byte) 0x59, (byte) 0xf8, (byte) 0x2e, (byte) 0x81,
+            (byte) 0xb2, (byte) 0xa9, (byte) 0xf3, (byte) 0x3c, (byte) 0xa5, (byte) 0x52,
+            (byte) 0x90, (byte) 0x6f, (byte) 0x98, (byte) 0xc4, (byte) 0x69, (byte) 0x5b,
+            (byte) 0x83, (byte) 0x84, (byte) 0x20, (byte) 0xb1, (byte) 0xae, (byte) 0xc3,
+            (byte) 0x04, (byte) 0x46, (byte) 0x6a, (byte) 0x24, (byte) 0x2f, (byte) 0xcd,
+            (byte) 0x6b, (byte) 0x90, (byte) 0x70, (byte) 0x20, (byte) 0x45, (byte) 0x25,
+            (byte) 0x1a, (byte) 0xc3, (byte) 0x02, (byte) 0x42, (byte) 0xf3, (byte) 0x49,
+            (byte) 0xe2, (byte) 0x3e, (byte) 0x21, (byte) 0x87, (byte) 0xdd, (byte) 0x6a,
+            (byte) 0x94, (byte) 0x2a, (byte) 0x1e, (byte) 0x0f, (byte) 0xdb, (byte) 0x77,
+            (byte) 0x5f, (byte) 0xc1, (byte) 0x2c, (byte) 0x03, (byte) 0xfb, (byte) 0xcf,
+            (byte) 0x91, (byte) 0x82, (byte) 0xa1, (byte) 0xbf, (byte) 0xb0, (byte) 0x73,
+            (byte) 0xfa, (byte) 0xda, (byte) 0xbc, (byte) 0xf8, (byte) 0x9f, (byte) 0x45,
+            (byte) 0xd3, (byte) 0xe8, (byte) 0xbb, (byte) 0x38, (byte) 0xfb, (byte) 0xc2,
+            (byte) 0x2d, (byte) 0x76, (byte) 0x51, (byte) 0x96, (byte) 0x18, (byte) 0x03,
+            (byte) 0x15, (byte) 0xd9, (byte) 0xea, (byte) 0x82, (byte) 0x25, (byte) 0x83,
+            (byte) 0xff, (byte) 0x5c, (byte) 0x85, (byte) 0x06, (byte) 0x09, (byte) 0xb2,
+            (byte) 0x46, (byte) 0x12, (byte) 0x64, (byte) 0x02, (byte) 0x74, (byte) 0x4f,
+            (byte) 0xbc, (byte) 0x9a, (byte) 0x25, (byte) 0x18, (byte) 0x01, (byte) 0x07,
+            (byte) 0x17, (byte) 0x25, (byte) 0x55, (byte) 0x7c, (byte) 0xdc, (byte) 0xe1,
+            (byte) 0xd1, (byte) 0x5a, (byte) 0x2f, (byte) 0x25, (byte) 0xaf, (byte) 0xf6,
+            (byte) 0x8f, (byte) 0xa4, (byte) 0x9a, (byte) 0x5a, (byte) 0x3a, (byte) 0xfe,
+            (byte) 0x2e, (byte) 0x93, (byte) 0x24, (byte) 0xa0, (byte) 0x27, (byte) 0xac,
+            (byte) 0x07, (byte) 0x75, (byte) 0x33, (byte) 0x01, (byte) 0x54, (byte) 0x23,
+            (byte) 0x0f, (byte) 0xe8, (byte) 0x9f, (byte) 0xfa, (byte) 0x36, (byte) 0xe6,
+            (byte) 0x3a, (byte) 0xd5, (byte) 0x78, (byte) 0xb0, (byte) 0xe4, (byte) 0x6a,
+            (byte) 0x16, (byte) 0x50, (byte) 0xbd, (byte) 0x0f, (byte) 0x9f, (byte) 0x32,
+            (byte) 0xa1, (byte) 0x6b, (byte) 0xf5, (byte) 0xa4, (byte) 0x34, (byte) 0x58,
+            (byte) 0xb6, (byte) 0xa4, (byte) 0xb3, (byte) 0xc3, (byte) 0x83, (byte) 0x08,
+            (byte) 0x18, (byte) 0xc7, (byte) 0xef, (byte) 0x95, (byte) 0xe2, (byte) 0x1b,
+            (byte) 0xba, (byte) 0x35, (byte) 0x61, (byte) 0xa3, (byte) 0xb4, (byte) 0x30,
+            (byte) 0xe0, (byte) 0xd1, (byte) 0xc1, (byte) 0xa2, (byte) 0x3a, (byte) 0xc6,
+            (byte) 0xb4, (byte) 0xd2, (byte) 0x80, (byte) 0x5a, (byte) 0xaf, (byte) 0xa4,
+            (byte) 0x54, (byte) 0x3c, (byte) 0x66, (byte) 0x5a, (byte) 0x1c, (byte) 0x4d,
+            (byte) 0xe1, (byte) 0xd9, (byte) 0x98, (byte) 0x44, (byte) 0x01, (byte) 0x1b,
+            (byte) 0x8c, (byte) 0xe9, (byte) 0x80, (byte) 0x54, (byte) 0x83, (byte) 0x3d,
+            (byte) 0x96, (byte) 0x25, (byte) 0x41, (byte) 0x1c, (byte) 0xad, (byte) 0xae,
+            (byte) 0x3b, (byte) 0x7a, (byte) 0xd7, (byte) 0x9d, (byte) 0x10, (byte) 0x7c,
+            (byte) 0xd1, (byte) 0xa7, (byte) 0x96, (byte) 0x39, (byte) 0xa5, (byte) 0x2f,
+            (byte) 0xbe, (byte) 0xc3, (byte) 0x2c, (byte) 0x64, (byte) 0x01, (byte) 0xfe,
+            (byte) 0xa2, (byte) 0xd1, (byte) 0x6a, (byte) 0xcf, (byte) 0x4c, (byte) 0x76,
+            (byte) 0x3b, (byte) 0xc8, (byte) 0x35, (byte) 0x21, (byte) 0xda, (byte) 0x98,
+            (byte) 0xcf, (byte) 0xf9, (byte) 0x29, (byte) 0xff, (byte) 0x30, (byte) 0x59,
+            (byte) 0x36, (byte) 0x53, (byte) 0x0b, (byte) 0xbb, (byte) 0xfa, (byte) 0xba,
+            (byte) 0xc4, (byte) 0x03, (byte) 0x23, (byte) 0xe0, (byte) 0xd3, (byte) 0x33,
+            (byte) 0xff, (byte) 0x32, (byte) 0xdb, (byte) 0x30, (byte) 0x64, (byte) 0xc7,
+            (byte) 0x56, (byte) 0xca, (byte) 0x55, (byte) 0x14, (byte) 0xee, (byte) 0x58,
+            (byte) 0xfe, (byte) 0x96, (byte) 0x7e, (byte) 0x1c, (byte) 0x34, (byte) 0x16,
+            (byte) 0xeb, (byte) 0x76, (byte) 0x26, (byte) 0x48, (byte) 0xe2, (byte) 0xe5,
+            (byte) 0x5c, (byte) 0xd5, (byte) 0x83, (byte) 0x37, (byte) 0xd9, (byte) 0x09,
+            (byte) 0x71, (byte) 0xbc, (byte) 0x54, (byte) 0x25, (byte) 0xca, (byte) 0x2e,
+            (byte) 0xdb, (byte) 0x36, (byte) 0x39, (byte) 0xcc, (byte) 0x3a, (byte) 0x81,
+            (byte) 0x95, (byte) 0x9e, (byte) 0xf4, (byte) 0x01, (byte) 0xa7, (byte) 0xc0,
+            (byte) 0x20, (byte) 0xce, (byte) 0x70, (byte) 0x55, (byte) 0x2c, (byte) 0xe0,
+            (byte) 0x93, (byte) 0x72, (byte) 0xa6, (byte) 0x25, (byte) 0xda, (byte) 0x64,
+            (byte) 0x19, (byte) 0x18, (byte) 0xd2, (byte) 0x31, (byte) 0xe2, (byte) 0x7c,
+            (byte) 0xf2, (byte) 0x30, (byte) 0x9e, (byte) 0x8d, (byte) 0xc6, (byte) 0x14,
+            (byte) 0x8a, (byte) 0x38, (byte) 0xf0, (byte) 0x94, (byte) 0xeb, (byte) 0xf4,
+            (byte) 0x64, (byte) 0x92, (byte) 0x3d, (byte) 0x67, (byte) 0xa6, (byte) 0x2c,
+            (byte) 0x52, (byte) 0xfc, (byte) 0x60, (byte) 0xca, (byte) 0x2a, (byte) 0xcf,
+            (byte) 0x24, (byte) 0xd5, (byte) 0x42, (byte) 0x5f, (byte) 0xc7, (byte) 0x9f,
+            (byte) 0xf3, (byte) 0xb4, (byte) 0xdf, (byte) 0x76, (byte) 0x6e, (byte) 0x53,
+            (byte) 0xa1, (byte) 0x7b, (byte) 0xae, (byte) 0xa5, (byte) 0x84, (byte) 0x1f,
+            (byte) 0xfa, (byte) 0xc0, (byte) 0xb4, (byte) 0x6c, (byte) 0xc9, (byte) 0x02,
+            (byte) 0x81, (byte) 0xc1, (byte) 0x00, (byte) 0xf3, (byte) 0x17, (byte) 0xd9,
+            (byte) 0x48, (byte) 0x17, (byte) 0x87, (byte) 0x84, (byte) 0x16, (byte) 0xea,
+            (byte) 0x2d, (byte) 0x31, (byte) 0x1b, (byte) 0xce, (byte) 0xec, (byte) 0xaf,
+            (byte) 0xdc, (byte) 0x6b, (byte) 0xaf, (byte) 0xc8, (byte) 0xf1, (byte) 0x40,
+            (byte) 0xa7, (byte) 0x4f, (byte) 0xef, (byte) 0x48, (byte) 0x08, (byte) 0x5e,
+            (byte) 0x9a, (byte) 0xd1, (byte) 0xc0, (byte) 0xb1, (byte) 0xfe, (byte) 0xe7,
+            (byte) 0x03, (byte) 0xd5, (byte) 0x96, (byte) 0x01, (byte) 0xe8, (byte) 0x40,
+            (byte) 0xca, (byte) 0x78, (byte) 0xcb, (byte) 0xb3, (byte) 0x28, (byte) 0x1a,
+            (byte) 0xf0, (byte) 0xe5, (byte) 0xf6, (byte) 0x46, (byte) 0xef, (byte) 0xcd,
+            (byte) 0x1a, (byte) 0x0f, (byte) 0x13, (byte) 0x2d, (byte) 0x38, (byte) 0xf8,
+            (byte) 0xf7, (byte) 0x88, (byte) 0x21, (byte) 0x15, (byte) 0xce, (byte) 0x48,
+            (byte) 0xf4, (byte) 0x92, (byte) 0x7e, (byte) 0x9b, (byte) 0x2e, (byte) 0x2f,
+            (byte) 0x22, (byte) 0x3e, (byte) 0x5c, (byte) 0x67, (byte) 0xd7, (byte) 0x58,
+            (byte) 0xf6, (byte) 0xef, (byte) 0x1f, (byte) 0xb4, (byte) 0x04, (byte) 0xc7,
+            (byte) 0xfd, (byte) 0x8c, (byte) 0x4e, (byte) 0x27, (byte) 0x9e, (byte) 0xb9,
+            (byte) 0xef, (byte) 0x0f, (byte) 0xf7, (byte) 0x4a, (byte) 0xc2, (byte) 0xf4,
+            (byte) 0x64, (byte) 0x6b, (byte) 0xe0, (byte) 0xfb, (byte) 0xe3, (byte) 0x45,
+            (byte) 0xd5, (byte) 0x37, (byte) 0xa0, (byte) 0x2a, (byte) 0xc6, (byte) 0xf3,
+            (byte) 0xf6, (byte) 0xcc, (byte) 0xb5, (byte) 0x94, (byte) 0xbf, (byte) 0x56,
+            (byte) 0xa0, (byte) 0x61, (byte) 0x36, (byte) 0x88, (byte) 0x35, (byte) 0xd5,
+            (byte) 0xa5, (byte) 0xad, (byte) 0x20, (byte) 0x48, (byte) 0xda, (byte) 0x70,
+            (byte) 0x35, (byte) 0xd9, (byte) 0x75, (byte) 0x66, (byte) 0xa5, (byte) 0xac,
+            (byte) 0x86, (byte) 0x7a, (byte) 0x75, (byte) 0x49, (byte) 0x88, (byte) 0x40,
+            (byte) 0xce, (byte) 0xb0, (byte) 0x6f, (byte) 0x57, (byte) 0x15, (byte) 0x54,
+            (byte) 0xd3, (byte) 0x2f, (byte) 0x11, (byte) 0x9b, (byte) 0xe3, (byte) 0x87,
+            (byte) 0xc8, (byte) 0x8d, (byte) 0x98, (byte) 0xc6, (byte) 0xe0, (byte) 0xbc,
+            (byte) 0x85, (byte) 0xb9, (byte) 0x04, (byte) 0x43, (byte) 0xa9, (byte) 0x41,
+            (byte) 0xce, (byte) 0x42, (byte) 0x1a, (byte) 0x57, (byte) 0x10, (byte) 0xd8,
+            (byte) 0xe4, (byte) 0x6a, (byte) 0x51, (byte) 0x10, (byte) 0x0a, (byte) 0xec,
+            (byte) 0xe4, (byte) 0x57, (byte) 0xc7, (byte) 0xee, (byte) 0xe9, (byte) 0xd6,
+            (byte) 0xcb, (byte) 0x3e, (byte) 0xba, (byte) 0xfa, (byte) 0xe9, (byte) 0x0e,
+            (byte) 0xed, (byte) 0x87, (byte) 0x04, (byte) 0x9a, (byte) 0x48, (byte) 0xba,
+            (byte) 0xaf, (byte) 0x08, (byte) 0xf5, (byte) 0x02, (byte) 0x81, (byte) 0xc1,
+            (byte) 0x00, (byte) 0xcb, (byte) 0x63, (byte) 0xd6, (byte) 0x54, (byte) 0xb6,
+            (byte) 0xf3, (byte) 0xf3, (byte) 0x8c, (byte) 0xf8, (byte) 0xd0, (byte) 0xd2,
+            (byte) 0x84, (byte) 0xc1, (byte) 0xf5, (byte) 0x12, (byte) 0xe0, (byte) 0x02,
+            (byte) 0x80, (byte) 0x42, (byte) 0x92, (byte) 0x4e, (byte) 0xa4, (byte) 0x5c,
+            (byte) 0xa5, (byte) 0x64, (byte) 0xec, (byte) 0xb7, (byte) 0xdc, (byte) 0xe0,
+            (byte) 0x2d, (byte) 0x5d, (byte) 0xac, (byte) 0x0e, (byte) 0x24, (byte) 0x48,
+            (byte) 0x13, (byte) 0x05, (byte) 0xe8, (byte) 0xff, (byte) 0x96, (byte) 0x93,
+            (byte) 0xba, (byte) 0x3c, (byte) 0x88, (byte) 0xcc, (byte) 0x80, (byte) 0xf9,
+            (byte) 0xdb, (byte) 0xa8, (byte) 0x4d, (byte) 0x86, (byte) 0x47, (byte) 0xc8,
+            (byte) 0xbf, (byte) 0x34, (byte) 0x2d, (byte) 0xda, (byte) 0xb6, (byte) 0x28,
+            (byte) 0xf0, (byte) 0x1e, (byte) 0xd2, (byte) 0x46, (byte) 0x0d, (byte) 0x6f,
+            (byte) 0x36, (byte) 0x8e, (byte) 0x84, (byte) 0xd8, (byte) 0xaf, (byte) 0xf7,
+            (byte) 0x69, (byte) 0x23, (byte) 0x77, (byte) 0xfb, (byte) 0xc5, (byte) 0x04,
+            (byte) 0x08, (byte) 0x18, (byte) 0xac, (byte) 0x85, (byte) 0x80, (byte) 0x87,
+            (byte) 0x1c, (byte) 0xfe, (byte) 0x8e, (byte) 0x5d, (byte) 0x00, (byte) 0x7f,
+            (byte) 0x5b, (byte) 0x33, (byte) 0xf5, (byte) 0xdf, (byte) 0x70, (byte) 0x81,
+            (byte) 0xad, (byte) 0x81, (byte) 0xf4, (byte) 0x5a, (byte) 0x37, (byte) 0x8a,
+            (byte) 0x79, (byte) 0x09, (byte) 0xc5, (byte) 0x55, (byte) 0xab, (byte) 0x58,
+            (byte) 0x7c, (byte) 0x47, (byte) 0xca, (byte) 0xa5, (byte) 0x80, (byte) 0x49,
+            (byte) 0x5f, (byte) 0x71, (byte) 0x83, (byte) 0xfb, (byte) 0x3b, (byte) 0x06,
+            (byte) 0xec, (byte) 0x75, (byte) 0x23, (byte) 0xc4, (byte) 0x32, (byte) 0xc7,
+            (byte) 0x18, (byte) 0xf6, (byte) 0x82, (byte) 0x95, (byte) 0x98, (byte) 0x39,
+            (byte) 0xf7, (byte) 0x92, (byte) 0x31, (byte) 0xc0, (byte) 0x89, (byte) 0xba,
+            (byte) 0xd4, (byte) 0xd4, (byte) 0x58, (byte) 0x4e, (byte) 0x38, (byte) 0x35,
+            (byte) 0x10, (byte) 0xb9, (byte) 0xf1, (byte) 0x27, (byte) 0xdc, (byte) 0xff,
+            (byte) 0xc7, (byte) 0xb2, (byte) 0xba, (byte) 0x1f, (byte) 0x27, (byte) 0xaf,
+            (byte) 0x99, (byte) 0xd5, (byte) 0xb0, (byte) 0x39, (byte) 0xe7, (byte) 0x43,
+            (byte) 0x88, (byte) 0xd3, (byte) 0xce, (byte) 0x38, (byte) 0xc2, (byte) 0x99,
+            (byte) 0x43, (byte) 0xfc, (byte) 0x8a, (byte) 0xe3, (byte) 0x60, (byte) 0x0d,
+            (byte) 0x0a, (byte) 0xb8, (byte) 0xc4, (byte) 0x29, (byte) 0xca, (byte) 0x0d,
+            (byte) 0x30, (byte) 0xaf, (byte) 0xca, (byte) 0xd0, (byte) 0xaa, (byte) 0x67,
+            (byte) 0xb1, (byte) 0xdd, (byte) 0xdb, (byte) 0x7a, (byte) 0x11, (byte) 0xad,
+            (byte) 0xeb, (byte) 0x02, (byte) 0x81, (byte) 0xc0, (byte) 0x71, (byte) 0xb8,
+            (byte) 0xcf, (byte) 0x72, (byte) 0x35, (byte) 0x67, (byte) 0xb5, (byte) 0x38,
+            (byte) 0x8f, (byte) 0x16, (byte) 0xd3, (byte) 0x29, (byte) 0x82, (byte) 0x35,
+            (byte) 0x21, (byte) 0xd4, (byte) 0x49, (byte) 0x20, (byte) 0x74, (byte) 0x2d,
+            (byte) 0xc0, (byte) 0xa4, (byte) 0x44, (byte) 0xf5, (byte) 0xd8, (byte) 0xc9,
+            (byte) 0xe9, (byte) 0x90, (byte) 0x1d, (byte) 0xde, (byte) 0x3a, (byte) 0xa6,
+            (byte) 0xd7, (byte) 0xe5, (byte) 0xe8, (byte) 0x4e, (byte) 0x83, (byte) 0xd7,
+            (byte) 0xe6, (byte) 0x2f, (byte) 0x92, (byte) 0x31, (byte) 0x21, (byte) 0x3f,
+            (byte) 0xfa, (byte) 0xd2, (byte) 0x85, (byte) 0x92, (byte) 0x1f, (byte) 0xff,
+            (byte) 0x61, (byte) 0x00, (byte) 0xf6, (byte) 0xda, (byte) 0x6e, (byte) 0xc6,
+            (byte) 0x7f, (byte) 0x5a, (byte) 0x35, (byte) 0x79, (byte) 0xdc, (byte) 0xdc,
+            (byte) 0xa3, (byte) 0x2e, (byte) 0x9f, (byte) 0x35, (byte) 0xd1, (byte) 0x5c,
+            (byte) 0xda, (byte) 0xb9, (byte) 0xf7, (byte) 0x58, (byte) 0x7d, (byte) 0x4f,
+            (byte) 0xb6, (byte) 0x13, (byte) 0xd7, (byte) 0x2c, (byte) 0x0a, (byte) 0xa8,
+            (byte) 0x4d, (byte) 0xf2, (byte) 0xe4, (byte) 0x67, (byte) 0x4f, (byte) 0x8b,
+            (byte) 0xa6, (byte) 0xca, (byte) 0x1a, (byte) 0xbb, (byte) 0x02, (byte) 0x63,
+            (byte) 0x8f, (byte) 0xb7, (byte) 0x46, (byte) 0xec, (byte) 0x7a, (byte) 0x8a,
+            (byte) 0x09, (byte) 0x0a, (byte) 0x45, (byte) 0x3a, (byte) 0x8d, (byte) 0xa8,
+            (byte) 0x83, (byte) 0x4b, (byte) 0x0a, (byte) 0xdb, (byte) 0x4b, (byte) 0x99,
+            (byte) 0xf3, (byte) 0x69, (byte) 0x95, (byte) 0xf0, (byte) 0xcf, (byte) 0xe9,
+            (byte) 0xf7, (byte) 0x67, (byte) 0xc9, (byte) 0x45, (byte) 0x18, (byte) 0x2f,
+            (byte) 0xf0, (byte) 0x5c, (byte) 0x90, (byte) 0xbd, (byte) 0xa6, (byte) 0x66,
+            (byte) 0x8c, (byte) 0xfe, (byte) 0x60, (byte) 0x5d, (byte) 0x6c, (byte) 0x27,
+            (byte) 0xec, (byte) 0xc1, (byte) 0x84, (byte) 0xb2, (byte) 0xa1, (byte) 0x97,
+            (byte) 0x9e, (byte) 0x16, (byte) 0x29, (byte) 0xa7, (byte) 0xe0, (byte) 0x38,
+            (byte) 0xa2, (byte) 0x36, (byte) 0x05, (byte) 0x5f, (byte) 0xda, (byte) 0x72,
+            (byte) 0x1a, (byte) 0x5f, (byte) 0xa8, (byte) 0x7d, (byte) 0x41, (byte) 0x35,
+            (byte) 0xf6, (byte) 0x4e, (byte) 0x0a, (byte) 0x88, (byte) 0x8e, (byte) 0x00,
+            (byte) 0x98, (byte) 0xa6, (byte) 0xca, (byte) 0xc1, (byte) 0xdf, (byte) 0x72,
+            (byte) 0x6c, (byte) 0xfe, (byte) 0x29, (byte) 0xbe, (byte) 0xa3, (byte) 0x9b,
+            (byte) 0x0b, (byte) 0x5c, (byte) 0x0b, (byte) 0x9d, (byte) 0xa7, (byte) 0x71,
+            (byte) 0xce, (byte) 0x04, (byte) 0xfa, (byte) 0xac, (byte) 0x01, (byte) 0x8d,
+            (byte) 0x52, (byte) 0xa0, (byte) 0x3d, (byte) 0xdd, (byte) 0x02, (byte) 0x81,
+            (byte) 0xc1, (byte) 0x00, (byte) 0xc1, (byte) 0xc0, (byte) 0x2e, (byte) 0xa9,
+            (byte) 0xee, (byte) 0xca, (byte) 0xff, (byte) 0xe4, (byte) 0xf8, (byte) 0x15,
+            (byte) 0xfd, (byte) 0xa5, (byte) 0x68, (byte) 0x1b, (byte) 0x2d, (byte) 0x4a,
+            (byte) 0xe6, (byte) 0x37, (byte) 0x06, (byte) 0xb3, (byte) 0xd7, (byte) 0x64,
+            (byte) 0xad, (byte) 0xb9, (byte) 0x05, (byte) 0x26, (byte) 0x97, (byte) 0x94,
+            (byte) 0x3a, (byte) 0x9e, (byte) 0x1c, (byte) 0xd0, (byte) 0xcd, (byte) 0x7b,
+            (byte) 0xf4, (byte) 0x88, (byte) 0xe2, (byte) 0xa5, (byte) 0x6d, (byte) 0xed,
+            (byte) 0x24, (byte) 0x77, (byte) 0x52, (byte) 0x39, (byte) 0x43, (byte) 0x0f,
+            (byte) 0x4e, (byte) 0x75, (byte) 0xd8, (byte) 0xa3, (byte) 0x59, (byte) 0x5a,
+            (byte) 0xc2, (byte) 0xba, (byte) 0x9a, (byte) 0x5b, (byte) 0x60, (byte) 0x31,
+            (byte) 0x0d, (byte) 0x58, (byte) 0x89, (byte) 0x13, (byte) 0xe8, (byte) 0x95,
+            (byte) 0xdd, (byte) 0xae, (byte) 0xcc, (byte) 0x1f, (byte) 0x73, (byte) 0x48,
+            (byte) 0x55, (byte) 0xd8, (byte) 0xfb, (byte) 0x67, (byte) 0xce, (byte) 0x18,
+            (byte) 0x85, (byte) 0x59, (byte) 0xad, (byte) 0x1f, (byte) 0x93, (byte) 0xe1,
+            (byte) 0xb7, (byte) 0x54, (byte) 0x80, (byte) 0x8e, (byte) 0x5f, (byte) 0xbc,
+            (byte) 0x1c, (byte) 0x96, (byte) 0x66, (byte) 0x2e, (byte) 0x40, (byte) 0x17,
+            (byte) 0x2e, (byte) 0x01, (byte) 0x7a, (byte) 0x7d, (byte) 0xaa, (byte) 0xff,
+            (byte) 0xa3, (byte) 0xd2, (byte) 0xdf, (byte) 0xe2, (byte) 0xf3, (byte) 0x54,
+            (byte) 0x51, (byte) 0xeb, (byte) 0xba, (byte) 0x7c, (byte) 0x2a, (byte) 0x22,
+            (byte) 0xc6, (byte) 0x42, (byte) 0xbc, (byte) 0xa1, (byte) 0x6c, (byte) 0xcf,
+            (byte) 0x73, (byte) 0x2e, (byte) 0x07, (byte) 0xfc, (byte) 0xf5, (byte) 0x67,
+            (byte) 0x25, (byte) 0xd0, (byte) 0xfa, (byte) 0xeb, (byte) 0xb4, (byte) 0xd4,
+            (byte) 0x19, (byte) 0xcc, (byte) 0x64, (byte) 0xa1, (byte) 0x2e, (byte) 0x78,
+            (byte) 0x45, (byte) 0xd9, (byte) 0x7f, (byte) 0x1b, (byte) 0x4c, (byte) 0x10,
+            (byte) 0x31, (byte) 0x44, (byte) 0xe8, (byte) 0xcc, (byte) 0xf9, (byte) 0x1b,
+            (byte) 0x87, (byte) 0x31, (byte) 0xd6, (byte) 0x69, (byte) 0x85, (byte) 0x4a,
+            (byte) 0x49, (byte) 0xf6, (byte) 0xb2, (byte) 0xe0, (byte) 0xb8, (byte) 0x98,
+            (byte) 0x3c, (byte) 0xf6, (byte) 0x78, (byte) 0x46, (byte) 0xc8, (byte) 0x3d,
+            (byte) 0x60, (byte) 0xc1, (byte) 0xaa, (byte) 0x2f, (byte) 0x28, (byte) 0xa1,
+            (byte) 0x14, (byte) 0x6b, (byte) 0x75, (byte) 0x4d, (byte) 0xb1, (byte) 0x3d,
+            (byte) 0x80, (byte) 0x49, (byte) 0x33, (byte) 0xfd, (byte) 0x71, (byte) 0xc0,
+            (byte) 0x13, (byte) 0x1e, (byte) 0x16, (byte) 0x69, (byte) 0x80, (byte) 0xa4,
+            (byte) 0x9c, (byte) 0xd7, (byte) 0x02, (byte) 0x81, (byte) 0xc1, (byte) 0x00,
+            (byte) 0x8c, (byte) 0x33, (byte) 0x2d, (byte) 0xd9, (byte) 0xf3, (byte) 0x42,
+            (byte) 0x4d, (byte) 0xca, (byte) 0x5e, (byte) 0x60, (byte) 0x14, (byte) 0x10,
+            (byte) 0xf6, (byte) 0xf3, (byte) 0x71, (byte) 0x15, (byte) 0x88, (byte) 0x54,
+            (byte) 0x84, (byte) 0x21, (byte) 0x04, (byte) 0xb1, (byte) 0xaf, (byte) 0x02,
+            (byte) 0x11, (byte) 0x7f, (byte) 0x42, (byte) 0x3e, (byte) 0x86, (byte) 0xcb,
+            (byte) 0x6c, (byte) 0xf5, (byte) 0x57, (byte) 0x78, (byte) 0x4a, (byte) 0x03,
+            (byte) 0x9b, (byte) 0x80, (byte) 0xc2, (byte) 0x04, (byte) 0x3a, (byte) 0x6b,
+            (byte) 0xb3, (byte) 0x30, (byte) 0x31, (byte) 0x7e, (byte) 0xc3, (byte) 0x89,
+            (byte) 0x09, (byte) 0x4e, (byte) 0x86, (byte) 0x59, (byte) 0x41, (byte) 0xb5,
+            (byte) 0xae, (byte) 0xd5, (byte) 0xc6, (byte) 0x38, (byte) 0xbc, (byte) 0xd7,
+            (byte) 0xd7, (byte) 0x8e, (byte) 0xa3, (byte) 0x1a, (byte) 0xde, (byte) 0x32,
+            (byte) 0xad, (byte) 0x8d, (byte) 0x15, (byte) 0x81, (byte) 0xfe, (byte) 0xac,
+            (byte) 0xbd, (byte) 0xd0, (byte) 0xca, (byte) 0xbc, (byte) 0xd8, (byte) 0x6a,
+            (byte) 0xe1, (byte) 0xfe, (byte) 0xda, (byte) 0xc4, (byte) 0xd8, (byte) 0x62,
+            (byte) 0x71, (byte) 0x20, (byte) 0xa3, (byte) 0xd3, (byte) 0x06, (byte) 0x11,
+            (byte) 0xa9, (byte) 0x53, (byte) 0x7a, (byte) 0x44, (byte) 0x89, (byte) 0x3d,
+            (byte) 0x28, (byte) 0x5e, (byte) 0x7d, (byte) 0xf0, (byte) 0x60, (byte) 0xeb,
+            (byte) 0xb5, (byte) 0xdf, (byte) 0xed, (byte) 0x4f, (byte) 0x6d, (byte) 0x05,
+            (byte) 0x59, (byte) 0x06, (byte) 0xb0, (byte) 0x62, (byte) 0x50, (byte) 0x1c,
+            (byte) 0xb7, (byte) 0x2c, (byte) 0x44, (byte) 0xa4, (byte) 0x49, (byte) 0xf8,
+            (byte) 0x4f, (byte) 0x4b, (byte) 0xab, (byte) 0x71, (byte) 0x5b, (byte) 0xcb,
+            (byte) 0x31, (byte) 0x10, (byte) 0x41, (byte) 0xe0, (byte) 0x1a, (byte) 0x15,
+            (byte) 0xdc, (byte) 0x4c, (byte) 0x5d, (byte) 0x4f, (byte) 0x62, (byte) 0x83,
+            (byte) 0xa4, (byte) 0x80, (byte) 0x06, (byte) 0x36, (byte) 0xba, (byte) 0xc9,
+            (byte) 0xe2, (byte) 0xa4, (byte) 0x11, (byte) 0x98, (byte) 0x6b, (byte) 0x4c,
+            (byte) 0xe9, (byte) 0x90, (byte) 0x55, (byte) 0x18, (byte) 0xde, (byte) 0xe1,
+            (byte) 0x42, (byte) 0x38, (byte) 0x28, (byte) 0xa3, (byte) 0x54, (byte) 0x56,
+            (byte) 0x31, (byte) 0xaf, (byte) 0x5a, (byte) 0xd6, (byte) 0xf0, (byte) 0x26,
+            (byte) 0xe0, (byte) 0x7a, (byte) 0xd9, (byte) 0x6c, (byte) 0x64, (byte) 0xca,
+            (byte) 0x5d, (byte) 0x6d, (byte) 0x3d, (byte) 0x9a, (byte) 0xfe, (byte) 0x36,
+            (byte) 0x93, (byte) 0x9e, (byte) 0x62, (byte) 0x94, (byte) 0xc6, (byte) 0x07,
+            (byte) 0x83, (byte) 0x96, (byte) 0xd6, (byte) 0x27, (byte) 0xa6, (byte) 0xd8
+    };
+    public static final PrivateKey CLIENT_SUITE_B_RSA3072_KEY =
+            loadPrivateKey("RSA", CLIENT_SUITE_B_RSA3072_KEY_DATA);
+
+    private static final String CLIENT_SUITE_B_ECDSA_CERT_STRING =
+            "-----BEGIN CERTIFICATE-----\n"
+                    + "MIIB9zCCAX4CFDpfSZh3AH07BEfGWuMDa7Ynz6y+MAoGCCqGSM49BAMDMF4xCzAJ\n"
+                    + "BgNVBAYTAlVTMQswCQYDVQQIDAJDQTEMMAoGA1UEBwwDTVRWMRAwDgYDVQQKDAdB\n"
+                    + "bmRyb2lkMQ4wDAYDVQQLDAVXaS1GaTESMBAGA1UEAwwJdW5pdGVzdENBMB4XDTIw\n"
+                    + "MDcyMTAyMjk1MFoXDTMwMDUzMDAyMjk1MFowYjELMAkGA1UEBhMCVVMxCzAJBgNV\n"
+                    + "BAgMAkNBMQwwCgYDVQQHDANNVFYxEDAOBgNVBAoMB0FuZHJvaWQxDjAMBgNVBAsM\n"
+                    + "BVdpLUZpMRYwFAYDVQQDDA11bml0ZXN0Q2xpZW50MHYwEAYHKoZIzj0CAQYFK4EE\n"
+                    + "ACIDYgAEhxhVJ7dcSqrto0X+dgRxtd8BWG8cWmPjBji3MIxDLfpcMDoIB84ae1Ew\n"
+                    + "gJn4YUYHrWsUDiVNihv8j7a/Ol1qcIY2ybH7tbezefLmagqA4vXEUXZXoUyL4ZNC\n"
+                    + "DWcdw6LrMAoGCCqGSM49BAMDA2cAMGQCMH4aP73HrriRUJRguiuRic+X4Cqj/7YQ\n"
+                    + "ueJmP87KF92/thhoQ9OrRo8uJITPmNDswwIwP2Q1AZCSL4BI9dYrqu07Ar+pSkXE\n"
+                    + "R7oOqGdZR+d/MvXcFSrbIaLKEoHXmQamIHLe\n"
+                    + "-----END CERTIFICATE-----\n";
+    public static final X509Certificate CLIENT_SUITE_B_ECDSA_CERT =
+            loadCertificate(CLIENT_SUITE_B_ECDSA_CERT_STRING);
+
+    private static final byte[] CLIENT_SUITE_B_ECC_KEY_DATA = new byte[]{
+            (byte) 0x30, (byte) 0x81, (byte) 0xb6, (byte) 0x02, (byte) 0x01, (byte) 0x00,
+            (byte) 0x30, (byte) 0x10, (byte) 0x06, (byte) 0x07, (byte) 0x2a, (byte) 0x86,
+            (byte) 0x48, (byte) 0xce, (byte) 0x3d, (byte) 0x02, (byte) 0x01, (byte) 0x06,
+            (byte) 0x05, (byte) 0x2b, (byte) 0x81, (byte) 0x04, (byte) 0x00, (byte) 0x22,
+            (byte) 0x04, (byte) 0x81, (byte) 0x9e, (byte) 0x30, (byte) 0x81, (byte) 0x9b,
+            (byte) 0x02, (byte) 0x01, (byte) 0x01, (byte) 0x04, (byte) 0x30, (byte) 0xea,
+            (byte) 0x6c, (byte) 0x4b, (byte) 0x6d, (byte) 0x43, (byte) 0xf9, (byte) 0x6c,
+            (byte) 0x91, (byte) 0xdc, (byte) 0x2d, (byte) 0x6e, (byte) 0x87, (byte) 0x4f,
+            (byte) 0x0a, (byte) 0x0b, (byte) 0x97, (byte) 0x25, (byte) 0x1c, (byte) 0x79,
+            (byte) 0xa2, (byte) 0x07, (byte) 0xdc, (byte) 0x94, (byte) 0xc2, (byte) 0xee,
+            (byte) 0x64, (byte) 0x51, (byte) 0x6d, (byte) 0x4e, (byte) 0x35, (byte) 0x1c,
+            (byte) 0x22, (byte) 0x2f, (byte) 0xc0, (byte) 0xea, (byte) 0x09, (byte) 0x47,
+            (byte) 0x3e, (byte) 0xb9, (byte) 0xb6, (byte) 0xb8, (byte) 0x83, (byte) 0x9e,
+            (byte) 0xed, (byte) 0x59, (byte) 0xe5, (byte) 0xe7, (byte) 0x0f, (byte) 0xa1,
+            (byte) 0x64, (byte) 0x03, (byte) 0x62, (byte) 0x00, (byte) 0x04, (byte) 0x87,
+            (byte) 0x18, (byte) 0x55, (byte) 0x27, (byte) 0xb7, (byte) 0x5c, (byte) 0x4a,
+            (byte) 0xaa, (byte) 0xed, (byte) 0xa3, (byte) 0x45, (byte) 0xfe, (byte) 0x76,
+            (byte) 0x04, (byte) 0x71, (byte) 0xb5, (byte) 0xdf, (byte) 0x01, (byte) 0x58,
+            (byte) 0x6f, (byte) 0x1c, (byte) 0x5a, (byte) 0x63, (byte) 0xe3, (byte) 0x06,
+            (byte) 0x38, (byte) 0xb7, (byte) 0x30, (byte) 0x8c, (byte) 0x43, (byte) 0x2d,
+            (byte) 0xfa, (byte) 0x5c, (byte) 0x30, (byte) 0x3a, (byte) 0x08, (byte) 0x07,
+            (byte) 0xce, (byte) 0x1a, (byte) 0x7b, (byte) 0x51, (byte) 0x30, (byte) 0x80,
+            (byte) 0x99, (byte) 0xf8, (byte) 0x61, (byte) 0x46, (byte) 0x07, (byte) 0xad,
+            (byte) 0x6b, (byte) 0x14, (byte) 0x0e, (byte) 0x25, (byte) 0x4d, (byte) 0x8a,
+            (byte) 0x1b, (byte) 0xfc, (byte) 0x8f, (byte) 0xb6, (byte) 0xbf, (byte) 0x3a,
+            (byte) 0x5d, (byte) 0x6a, (byte) 0x70, (byte) 0x86, (byte) 0x36, (byte) 0xc9,
+            (byte) 0xb1, (byte) 0xfb, (byte) 0xb5, (byte) 0xb7, (byte) 0xb3, (byte) 0x79,
+            (byte) 0xf2, (byte) 0xe6, (byte) 0x6a, (byte) 0x0a, (byte) 0x80, (byte) 0xe2,
+            (byte) 0xf5, (byte) 0xc4, (byte) 0x51, (byte) 0x76, (byte) 0x57, (byte) 0xa1,
+            (byte) 0x4c, (byte) 0x8b, (byte) 0xe1, (byte) 0x93, (byte) 0x42, (byte) 0x0d,
+            (byte) 0x67, (byte) 0x1d, (byte) 0xc3, (byte) 0xa2, (byte) 0xeb
+    };
+    public static final PrivateKey CLIENT_SUITE_B_ECC_KEY =
+            loadPrivateKey("EC", CLIENT_SUITE_B_ECC_KEY_DATA);
 
     private static X509Certificate loadCertificate(String blob) {
         try {
@@ -226,9 +662,9 @@
         }
     }
 
-    private static PrivateKey loadPrivateRSAKey(byte[] fakeKey) {
+    private static PrivateKey loadPrivateKey(String algorithm, byte[] fakeKey) {
         try {
-            KeyFactory kf = KeyFactory.getInstance("RSA");
+            KeyFactory kf = KeyFactory.getInstance(algorithm);
             return kf.generatePrivate(new PKCS8EncodedKeySpec(fakeKey));
         } catch (InvalidKeySpecException | NoSuchAlgorithmException e) {
             return null;
diff --git a/wifi/tests/src/android/net/wifi/ScanResultTest.java b/wifi/tests/src/android/net/wifi/ScanResultTest.java
index 5516f43..f1ec5e8 100644
--- a/wifi/tests/src/android/net/wifi/ScanResultTest.java
+++ b/wifi/tests/src/android/net/wifi/ScanResultTest.java
@@ -102,9 +102,10 @@
             5845, WifiScanner.WIFI_BAND_5_GHZ, 169,
             5865, WifiScanner.WIFI_BAND_5_GHZ, 173,
             /* Now some 6GHz channels */
-            5945, WifiScanner.WIFI_BAND_6_GHZ, 1,
-            5960, WifiScanner.WIFI_BAND_6_GHZ, 4,
-            6100, WifiScanner.WIFI_BAND_6_GHZ, 32
+            5955, WifiScanner.WIFI_BAND_6_GHZ, 1,
+            5935, WifiScanner.WIFI_BAND_6_GHZ, 2,
+            5970, WifiScanner.WIFI_BAND_6_GHZ, 4,
+            6110, WifiScanner.WIFI_BAND_6_GHZ, 32
     };
 
     /**
diff --git a/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java b/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java
index 31e508c..2d7e535 100644
--- a/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java
+++ b/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java
@@ -282,12 +282,6 @@
                 .build();
 
         assertNull(band_6g_config.toWifiConfiguration());
-        SoftApConfiguration sae_transition_config = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret",
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
-                .build();
-
-        assertNull(sae_transition_config.toWifiConfiguration());
     }
 
     @Test
@@ -330,5 +324,16 @@
         assertThat(wifiConfig_2g5g.apBand).isEqualTo(WifiConfiguration.AP_BAND_ANY);
         assertThat(wifiConfig_2g5g.apChannel).isEqualTo(0);
         assertThat(wifiConfig_2g5g.hiddenSSID).isEqualTo(true);
+
+        SoftApConfiguration softApConfig_sae_transition = new SoftApConfiguration.Builder()
+                .setPassphrase("secretsecret",
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
+                .build();
+
+        WifiConfiguration wifiConfig_sae_transition =
+                softApConfig_sae_transition.toWifiConfiguration();
+        assertThat(wifiConfig_sae_transition.getAuthType())
+                .isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK);
+        assertThat(wifiConfig_sae_transition.preSharedKey).isEqualTo("secretsecret");
     }
 }
diff --git a/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java b/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java
index fc0ef46..6f47f3d 100644
--- a/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java
@@ -22,6 +22,8 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import android.net.MacAddress;
@@ -35,6 +37,8 @@
 
 import org.junit.Test;
 
+import java.security.cert.X509Certificate;
+
 /**
  * Unit tests for {@link android.net.wifi.WifiNetworkSpecifier}.
  */
@@ -45,6 +49,7 @@
     private static final String TEST_BSSID_OUI_MASK = "ff:ff:ff:00:00:00";
     private static final String TEST_BSSID = "12:12:12:12:12:12";
     private static final String TEST_PRESHARED_KEY = "\"Test123\"";
+    private static final String TEST_DOMAIN_SUFFIX_MATCH = "domainSuffixMatch";
 
     /**
      * Validate correctness of WifiNetworkSpecifier object created by
@@ -135,6 +140,106 @@
                 wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig.getPhase2Method());
     }
 
+    /**
+     * Validate correctness of WifiNetworkSuggestion object created by
+     * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise network.
+     */
+    @Test
+    public void testWifiNetworkSuggestionBuilderForWpa3EapNetwork() {
+        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
+        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
+        enterpriseConfig.setCaCertificate(FakeKeys.CA_CERT0);
+        enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
+
+        NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder()
+                .setSsid(TEST_SSID)
+                .setWpa3EnterpriseConfig(enterpriseConfig)
+                .build();
+
+        assertTrue(specifier instanceof WifiNetworkSpecifier);
+        WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier;
+
+        assertEquals("\"" + TEST_SSID + "\"", wifiNetworkSpecifier.wifiConfiguration.SSID);
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.IEEE8021X));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.WPA_EAP));
+        assertFalse(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.SUITE_B_192));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupCiphers
+                .get(WifiConfiguration.GroupCipher.CCMP));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.requirePmf);
+        assertNull(wifiNetworkSpecifier.wifiConfiguration.preSharedKey);
+        assertNotNull(wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig);
+    }
+
+    /**
+     * Validate correctness of WifiNetworkSuggestion object created by
+     * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise 192-bit RSA SuiteB network.
+     */
+    @Test
+    public void testWifiNetworkSuggestionBuilderForWpa3SuiteBRsaEapNetwork() {
+        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
+        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
+        enterpriseConfig.setCaCertificate(FakeKeys.CA_SUITE_B_RSA3072_CERT);
+        enterpriseConfig.setClientKeyEntryWithCertificateChain(FakeKeys.CLIENT_SUITE_B_RSA3072_KEY,
+                new X509Certificate[] {FakeKeys.CLIENT_SUITE_B_RSA3072_CERT});
+
+        enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
+
+        NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder()
+                .setSsid(TEST_SSID)
+                .setWpa3EnterpriseConfig(enterpriseConfig)
+                .build();
+
+        assertTrue(specifier instanceof WifiNetworkSpecifier);
+        WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier;
+
+        assertEquals("\"" + TEST_SSID + "\"", wifiNetworkSpecifier.wifiConfiguration.SSID);
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.SUITE_B_192));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupCiphers
+                .get(WifiConfiguration.GroupCipher.GCMP_256));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupManagementCiphers
+                .get(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.requirePmf);
+        assertNull(wifiNetworkSpecifier.wifiConfiguration.preSharedKey);
+        assertNotNull(wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig);
+    }
+
+    /**
+     * Validate correctness of WifiNetworkSuggestion object created by
+     * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise 192-bit ECC SuiteB network.
+     */
+    @Test
+    public void testWifiNetworkSuggestionBuilderForWpa3SuiteBEccEapNetwork() {
+        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
+        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
+        enterpriseConfig.setCaCertificate(FakeKeys.CA_SUITE_B_ECDSA_CERT);
+        enterpriseConfig.setClientKeyEntryWithCertificateChain(FakeKeys.CLIENT_SUITE_B_ECC_KEY,
+                new X509Certificate[] {FakeKeys.CLIENT_SUITE_B_ECDSA_CERT});
+
+        enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
+
+        NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder()
+                .setSsid(TEST_SSID)
+                .setWpa3EnterpriseConfig(enterpriseConfig)
+                .build();
+
+        assertTrue(specifier instanceof WifiNetworkSpecifier);
+        WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier;
+
+        assertEquals("\"" + TEST_SSID + "\"", wifiNetworkSpecifier.wifiConfiguration.SSID);
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.SUITE_B_192));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupCiphers
+                .get(WifiConfiguration.GroupCipher.GCMP_256));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupManagementCiphers
+                .get(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256));
+        assertTrue(wifiNetworkSpecifier.wifiConfiguration.requirePmf);
+        assertNull(wifiNetworkSpecifier.wifiConfiguration.preSharedKey);
+        assertNotNull(wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig);
+    }
 
     /**
      * Ensure {@link WifiNetworkSpecifier.Builder#setSsid(String)} throws an exception
diff --git a/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java b/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java
index 16b4ad0..00a0442 100644
--- a/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java
@@ -27,6 +27,8 @@
 
 import org.junit.Test;
 
+import java.security.cert.X509Certificate;
+
 /**
  * Unit tests for {@link android.net.wifi.WifiNetworkSuggestion}.
  */
@@ -199,16 +201,14 @@
         assertFalse(suggestion.isInitialAutoJoinEnabled);
     }
 
-
     /**
      * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for SuiteB network.
+     * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise network.
      */
     @Test
     public void testWifiNetworkSuggestionBuilderForWpa3EapNetwork() {
         WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
         enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
-        enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC);
         enterpriseConfig.setCaCertificate(FakeKeys.CA_CERT0);
         enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
 
@@ -219,6 +219,78 @@
 
         assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
         assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.IEEE8021X));
+        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.WPA_EAP));
+        assertFalse(suggestion.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.SUITE_B_192));
+        assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers
+                .get(WifiConfiguration.GroupCipher.CCMP));
+        assertTrue(suggestion.wifiConfiguration.requirePmf);
+        assertNull(suggestion.wifiConfiguration.preSharedKey);
+        // allowedSuiteBCiphers are set according to the loaded certificate and cannot be tested
+        // here.
+        assertTrue(suggestion.isUserAllowedToManuallyConnect);
+        assertTrue(suggestion.isInitialAutoJoinEnabled);
+        assertNotNull(suggestion.getEnterpriseConfig());
+    }
+
+    /**
+     * Validate correctness of WifiNetworkSuggestion object created by
+     * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise 192-bit RSA SuiteB network.
+     */
+    @Test
+    public void testWifiNetworkSuggestionBuilderForWpa3SuiteBRsaEapNetwork() {
+        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
+        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
+        enterpriseConfig.setCaCertificate(FakeKeys.CA_SUITE_B_RSA3072_CERT);
+        enterpriseConfig.setClientKeyEntryWithCertificateChain(FakeKeys.CLIENT_SUITE_B_RSA3072_KEY,
+                new X509Certificate[] {FakeKeys.CLIENT_SUITE_B_RSA3072_CERT});
+
+        enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
+
+        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
+                .setSsid(TEST_SSID)
+                .setWpa3EnterpriseConfig(enterpriseConfig)
+                .build();
+
+        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
+        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
+                .get(WifiConfiguration.KeyMgmt.SUITE_B_192));
+        assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers
+                .get(WifiConfiguration.GroupCipher.GCMP_256));
+        assertTrue(suggestion.wifiConfiguration.allowedGroupManagementCiphers
+                .get(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256));
+        assertTrue(suggestion.wifiConfiguration.requirePmf);
+        assertNull(suggestion.wifiConfiguration.preSharedKey);
+        // allowedSuiteBCiphers are set according to the loaded certificate and cannot be tested
+        // here.
+        assertTrue(suggestion.isUserAllowedToManuallyConnect);
+        assertTrue(suggestion.isInitialAutoJoinEnabled);
+        assertNotNull(suggestion.getEnterpriseConfig());
+    }
+
+    /**
+     * Validate correctness of WifiNetworkSuggestion object created by
+     * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise 192-bit ECC SuiteB network.
+     */
+    @Test
+    public void testWifiNetworkSuggestionBuilderForWpa3SuiteBEccEapNetwork() {
+        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
+        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
+        enterpriseConfig.setCaCertificate(FakeKeys.CA_SUITE_B_ECDSA_CERT);
+        enterpriseConfig.setClientKeyEntryWithCertificateChain(FakeKeys.CLIENT_SUITE_B_ECC_KEY,
+                new X509Certificate[] {FakeKeys.CLIENT_SUITE_B_ECDSA_CERT});
+
+        enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
+
+        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
+                .setSsid(TEST_SSID)
+                .setWpa3EnterpriseConfig(enterpriseConfig)
+                .build();
+
+        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
+        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
                 .get(WifiConfiguration.KeyMgmt.SUITE_B_192));
         assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers
                 .get(WifiConfiguration.GroupCipher.GCMP_256));
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java b/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
index 638efb9..8270d64 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
@@ -23,6 +23,8 @@
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 
+import android.net.wifi.EAPConstants;
+import android.net.wifi.FakeKeys;
 import android.net.wifi.hotspot2.pps.Credential;
 import android.net.wifi.hotspot2.pps.HomeSp;
 import android.os.Parcel;
@@ -32,6 +34,11 @@
 import org.junit.Test;
 
 import java.nio.charset.StandardCharsets;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.cert.CertificateEncodingException;
+import java.security.cert.X509Certificate;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
@@ -383,19 +390,39 @@
     }
 
     /**
-     * Verify that the unique identifier generated is different for two instances with different
-     * HomeSp node
+     * Verify that the unique identifier generated is the same for two instances with different
+     * HomeSp node but same FQDN
      *
      * @throws Exception
      */
     @Test
-    public void validateUniqueIdDifferentHomeSp() throws Exception {
+    public void validateUniqueIdDifferentHomeSpSameFqdn() throws Exception {
         PasspointConfiguration config1 = PasspointTestUtils.createConfig();
 
-        // Modify config2's RCOIs to a different set of values
+        // Modify config2's RCOIs and friendly name to a different set of values
         PasspointConfiguration config2 = PasspointTestUtils.createConfig();
         HomeSp homeSp = config2.getHomeSp();
         homeSp.setRoamingConsortiumOis(new long[] {0xaa, 0xbb});
+        homeSp.setFriendlyName("Some other name");
+        config2.setHomeSp(homeSp);
+
+        assertEquals(config1.getUniqueId(), config2.getUniqueId());
+    }
+
+    /**
+     * Verify that the unique identifier generated is different for two instances with the same
+     * HomeSp node but different FQDN
+     *
+     * @throws Exception
+     */
+    @Test
+    public void validateUniqueIdSameHomeSpDifferentFqdn() throws Exception {
+        PasspointConfiguration config1 = PasspointTestUtils.createConfig();
+
+        // Modify config2's FQDN to a different value
+        PasspointConfiguration config2 = PasspointTestUtils.createConfig();
+        HomeSp homeSp = config2.getHomeSp();
+        homeSp.setFqdn("fqdn2.com");
         config2.setHomeSp(homeSp);
 
         assertNotEquals(config1.getUniqueId(), config2.getUniqueId());
@@ -403,15 +430,15 @@
 
     /**
      * Verify that the unique identifier generated is different for two instances with different
-     * Credential node
+     * SIM Credential node
      *
      * @throws Exception
      */
     @Test
-    public void validateUniqueIdDifferentCredential() throws Exception {
+    public void validateUniqueIdDifferentSimCredential() throws Exception {
         PasspointConfiguration config1 = PasspointTestUtils.createConfig();
 
-        // Modify config2's RCOIs to a different set of values
+        // Modify config2's realm and SIM credential to a different set of values
         PasspointConfiguration config2 = PasspointTestUtils.createConfig();
         Credential credential = config2.getCredential();
         credential.setRealm("realm2.example.com");
@@ -422,6 +449,157 @@
     }
 
     /**
+     * Verify that the unique identifier generated is different for two instances with different
+     * Realm in the Credential node
+     *
+     * @throws Exception
+     */
+    @Test
+    public void validateUniqueIdDifferentRealm() throws Exception {
+        PasspointConfiguration config1 = PasspointTestUtils.createConfig();
+
+        // Modify config2's realm to a different set of values
+        PasspointConfiguration config2 = PasspointTestUtils.createConfig();
+        Credential credential = config2.getCredential();
+        credential.setRealm("realm2.example.com");
+        config2.setCredential(credential);
+
+        assertNotEquals(config1.getUniqueId(), config2.getUniqueId());
+    }
+
+    /**
+     * Verify that the unique identifier generated is the same for two instances with different
+     * password and same username in the User Credential node
+     *
+     * @throws Exception
+     */
+    @Test
+    public void validateUniqueIdSameUserInUserCredential() throws Exception {
+        PasspointConfiguration config1 = PasspointTestUtils.createConfig();
+        Credential credential = createCredentialWithUserCredential("user", "passwd");
+        config1.setCredential(credential);
+
+        // Modify config2's Passpowrd to a different set of values
+        PasspointConfiguration config2 = PasspointTestUtils.createConfig();
+        credential = createCredentialWithUserCredential("user", "newpasswd");
+        config2.setCredential(credential);
+
+        assertEquals(config1.getUniqueId(), config2.getUniqueId());
+    }
+
+    /**
+     * Verify that the unique identifier generated is different for two instances with different
+     * username in the User Credential node
+     *
+     * @throws Exception
+     */
+    @Test
+    public void validateUniqueIdDifferentUserCredential() throws Exception {
+        PasspointConfiguration config1 = PasspointTestUtils.createConfig();
+        Credential credential = createCredentialWithUserCredential("user", "passwd");
+        config1.setCredential(credential);
+
+        // Modify config2's username to a different value
+        PasspointConfiguration config2 = PasspointTestUtils.createConfig();
+        credential = createCredentialWithUserCredential("user2", "passwd");
+        config2.setCredential(credential);
+
+        assertNotEquals(config1.getUniqueId(), config2.getUniqueId());
+    }
+
+    /**
+     * Verify that the unique identifier generated is different for two instances with different
+     * Cert Credential node
+     *
+     * @throws Exception
+     */
+    @Test
+    public void validateUniqueIdDifferentCertCredential() throws Exception {
+        PasspointConfiguration config1 = PasspointTestUtils.createConfig();
+        Credential credential = createCredentialWithCertificateCredential(true, true);
+        config1.setCredential(credential);
+
+        // Modify config2's cert credential to a different set of values
+        PasspointConfiguration config2 = PasspointTestUtils.createConfig();
+        credential = createCredentialWithCertificateCredential(false, false);
+        config2.setCredential(credential);
+
+        assertNotEquals(config1.getUniqueId(), config2.getUniqueId());
+    }
+
+    /**
+     * Helper function for generating certificate credential for testing.
+     *
+     * @return {@link Credential}
+     */
+    private static Credential createCredentialWithCertificateCredential(Boolean useCaCert0,
+            Boolean useCert0)
+            throws NoSuchAlgorithmException, CertificateEncodingException {
+        Credential.CertificateCredential certCred = new Credential.CertificateCredential();
+        certCred.setCertType("x509v3");
+        if (useCert0) {
+            certCred.setCertSha256Fingerprint(
+                    MessageDigest.getInstance("SHA-256").digest(FakeKeys.CLIENT_CERT.getEncoded()));
+        } else {
+            certCred.setCertSha256Fingerprint(MessageDigest.getInstance("SHA-256")
+                    .digest(FakeKeys.CLIENT_SUITE_B_RSA3072_CERT.getEncoded()));
+        }
+        return createCredential(null, certCred, null, new X509Certificate[] {FakeKeys.CLIENT_CERT},
+                FakeKeys.RSA_KEY1, useCaCert0 ? FakeKeys.CA_CERT0 : FakeKeys.CA_CERT1);
+    }
+
+    /**
+     * Helper function for generating user credential for testing.
+     *
+     * @return {@link Credential}
+     */
+    private static Credential createCredentialWithUserCredential(String username, String password) {
+        Credential.UserCredential userCred = new Credential.UserCredential();
+        userCred.setUsername(username);
+        userCred.setPassword(password);
+        userCred.setMachineManaged(true);
+        userCred.setAbleToShare(true);
+        userCred.setSoftTokenApp("TestApp");
+        userCred.setEapType(EAPConstants.EAP_TTLS);
+        userCred.setNonEapInnerMethod("MS-CHAP");
+        return createCredential(userCred, null, null, null, null, FakeKeys.CA_CERT0);
+    }
+
+    /**
+     * Helper function for generating Credential for testing.
+     *
+     * @param userCred Instance of UserCredential
+     * @param certCred Instance of CertificateCredential
+     * @param simCred Instance of SimCredential
+     * @param clientCertificateChain Chain of client certificates
+     * @param clientPrivateKey Client private key
+     * @param caCerts CA certificates
+     * @return {@link Credential}
+     */
+    private static Credential createCredential(Credential.UserCredential userCred,
+            Credential.CertificateCredential certCred,
+            Credential.SimCredential simCred,
+            X509Certificate[] clientCertificateChain, PrivateKey clientPrivateKey,
+            X509Certificate... caCerts) {
+        Credential cred = new Credential();
+        cred.setCreationTimeInMillis(123455L);
+        cred.setExpirationTimeInMillis(2310093L);
+        cred.setRealm("realm");
+        cred.setCheckAaaServerCertStatus(true);
+        cred.setUserCredential(userCred);
+        cred.setCertCredential(certCred);
+        cred.setSimCredential(simCred);
+        if (caCerts != null && caCerts.length == 1) {
+            cred.setCaCertificate(caCerts[0]);
+        } else {
+            cred.setCaCertificates(caCerts);
+        }
+        cred.setClientCertificateChain(clientCertificateChain);
+        cred.setClientPrivateKey(clientPrivateKey);
+        return cred;
+    }
+
+    /**
      * Verify that the unique identifier API generates an exception if HomeSP is not initialized.
      *
      * @throws Exception
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
index 829d8f0..a44df40 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
@@ -593,10 +593,10 @@
     }
 
     /**
-     * Verify that unique identifiers are different for a credential with different values
+     * Verify that unique identifiers are different for a credential with different username
      */
     @Test
-    public void testUniqueIdDifferentForUserCredentialsWithDifferentValues() throws Exception {
+    public void testUniqueIdDifferentForUserCredentialsWithDifferentUsername() throws Exception {
         Credential userCred1 = createCredentialWithUserCredential();
         Credential userCred2 = createCredentialWithUserCredential();
         userCred2.getUserCredential().setUsername("anotheruser");
@@ -605,7 +605,24 @@
     }
 
     /**
-     * Verify that unique identifiers are different for a credential with different values
+     * Verify that unique identifiers are different for a credential with different password and
+     * other values other than username
+     */
+    @Test
+    public void testUniqueIdSameForUserCredentialsWithDifferentPassword() throws Exception {
+        Credential userCred1 = createCredentialWithUserCredential();
+        Credential userCred2 = createCredentialWithUserCredential();
+        userCred2.getUserCredential().setPassword("someotherpassword!");
+        userCred2.getUserCredential().setMachineManaged(false);
+        userCred2.getUserCredential().setAbleToShare(false);
+        userCred2.getUserCredential().setSoftTokenApp("TestApp2");
+        userCred2.getUserCredential().setNonEapInnerMethod("PAP");
+
+        assertEquals(userCred1.getUniqueId(), userCred2.getUniqueId());
+    }
+
+    /**
+     * Verify that unique identifiers are different for a cert credential with different values
      */
     @Test
     public void testUniqueIdDifferentForCertCredentialsWithDifferentValues() throws Exception {